@botpress/webchat 1.3.7 → 1.3.9

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.
@@ -14,20 +14,20 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var fb;function nR(){return fb||(fb=1,process.env.NODE_ENV!=="production"&&function(){var e=w,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),h=Symbol.iterator,m="@@iterator";function v(I){if(I===null||typeof I!="object")return null;var he=h&&I[h]||I[m];return typeof he=="function"?he:null}var g=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(I){{for(var he=arguments.length,Te=new Array(he>1?he-1:0),it=1;it<he;it++)Te[it-1]=arguments[it];b("error",I,Te)}}function b(I,he,Te){{var it=g.ReactDebugCurrentFrame,Tt=it.getStackAddendum();Tt!==""&&(he+="%s",Te=Te.concat([Tt]));var It=Te.map(function(xt){return String(xt)});It.unshift("Warning: "+he),Function.prototype.apply.call(console[I],console,It)}}var x=!1,_=!1,S=!1,R=!1,M=!1,j;j=Symbol.for("react.module.reference");function k(I){return!!(typeof I=="string"||typeof I=="function"||I===r||I===o||M||I===i||I===c||I===u||R||I===f||x||_||S||typeof I=="object"&&I!==null&&(I.$$typeof===p||I.$$typeof===d||I.$$typeof===a||I.$$typeof===s||I.$$typeof===l||I.$$typeof===j||I.getModuleId!==void 0))}function N(I,he,Te){var it=I.displayName;if(it)return it;var Tt=he.displayName||he.name||"";return Tt!==""?Te+"("+Tt+")":Te}function z(I){return I.displayName||"Context"}function U(I){if(I==null)return null;if(typeof I.tag=="number"&&y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof I=="function")return I.displayName||I.name||null;if(typeof I=="string")return I;switch(I){case r:return"Fragment";case n:return"Portal";case o:return"Profiler";case i:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof I=="object")switch(I.$$typeof){case s:var he=I;return z(he)+".Consumer";case a:var Te=I;return z(Te._context)+".Provider";case l:return N(I,I.render,"ForwardRef");case d:var it=I.displayName||null;return it!==null?it:U(I.type)||"Memo";case p:{var Tt=I,It=Tt._payload,xt=Tt._init;try{return U(xt(It))}catch{return null}}}return null}var Z=Object.assign,L=0,F,V,W,pe,C,se,we;function O(){}O.__reactDisabledLog=!0;function Oe(){{if(L===0){F=console.log,V=console.info,W=console.warn,pe=console.error,C=console.group,se=console.groupCollapsed,we=console.groupEnd;var I={configurable:!0,enumerable:!0,value:O,writable:!0};Object.defineProperties(console,{info:I,log:I,warn:I,error:I,group:I,groupCollapsed:I,groupEnd:I})}L++}}function Be(){{if(L--,L===0){var I={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Z({},I,{value:F}),info:Z({},I,{value:V}),warn:Z({},I,{value:W}),error:Z({},I,{value:pe}),group:Z({},I,{value:C}),groupCollapsed:Z({},I,{value:se}),groupEnd:Z({},I,{value:we})})}L<0&&y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Me=g.ReactCurrentDispatcher,Ze;function nt(I,he,Te){{if(Ze===void 0)try{throw Error()}catch(Tt){var it=Tt.stack.trim().match(/\n( *(at )?)/);Ze=it&&it[1]||""}return`
17
+ */var fb;function nR(){return fb||(fb=1,process.env.NODE_ENV!=="production"&&function(){var e=w,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),h=Symbol.iterator,m="@@iterator";function v(I){if(I===null||typeof I!="object")return null;var he=h&&I[h]||I[m];return typeof he=="function"?he:null}var g=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(I){{for(var he=arguments.length,Te=new Array(he>1?he-1:0),it=1;it<he;it++)Te[it-1]=arguments[it];b("error",I,Te)}}function b(I,he,Te){{var it=g.ReactDebugCurrentFrame,Tt=it.getStackAddendum();Tt!==""&&(he+="%s",Te=Te.concat([Tt]));var It=Te.map(function(xt){return String(xt)});It.unshift("Warning: "+he),Function.prototype.apply.call(console[I],console,It)}}var x=!1,_=!1,S=!1,R=!1,M=!1,j;j=Symbol.for("react.module.reference");function k(I){return!!(typeof I=="string"||typeof I=="function"||I===r||I===o||M||I===i||I===c||I===u||R||I===f||x||_||S||typeof I=="object"&&I!==null&&(I.$$typeof===p||I.$$typeof===d||I.$$typeof===a||I.$$typeof===s||I.$$typeof===l||I.$$typeof===j||I.getModuleId!==void 0))}function N(I,he,Te){var it=I.displayName;if(it)return it;var Tt=he.displayName||he.name||"";return Tt!==""?Te+"("+Tt+")":Te}function z(I){return I.displayName||"Context"}function B(I){if(I==null)return null;if(typeof I.tag=="number"&&y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof I=="function")return I.displayName||I.name||null;if(typeof I=="string")return I;switch(I){case r:return"Fragment";case n:return"Portal";case o:return"Profiler";case i:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof I=="object")switch(I.$$typeof){case s:var he=I;return z(he)+".Consumer";case a:var Te=I;return z(Te._context)+".Provider";case l:return N(I,I.render,"ForwardRef");case d:var it=I.displayName||null;return it!==null?it:B(I.type)||"Memo";case p:{var Tt=I,It=Tt._payload,xt=Tt._init;try{return B(xt(It))}catch{return null}}}return null}var Z=Object.assign,L=0,F,V,W,pe,C,se,we;function O(){}O.__reactDisabledLog=!0;function Oe(){{if(L===0){F=console.log,V=console.info,W=console.warn,pe=console.error,C=console.group,se=console.groupCollapsed,we=console.groupEnd;var I={configurable:!0,enumerable:!0,value:O,writable:!0};Object.defineProperties(console,{info:I,log:I,warn:I,error:I,group:I,groupCollapsed:I,groupEnd:I})}L++}}function Be(){{if(L--,L===0){var I={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Z({},I,{value:F}),info:Z({},I,{value:V}),warn:Z({},I,{value:W}),error:Z({},I,{value:pe}),group:Z({},I,{value:C}),groupCollapsed:Z({},I,{value:se}),groupEnd:Z({},I,{value:we})})}L<0&&y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Me=g.ReactCurrentDispatcher,Ze;function nt(I,he,Te){{if(Ze===void 0)try{throw Error()}catch(Tt){var it=Tt.stack.trim().match(/\n( *(at )?)/);Ze=it&&it[1]||""}return`
18
18
  `+Ze+I}}var We=!1,_e;{var ye=typeof WeakMap=="function"?WeakMap:Map;_e=new ye}function $e(I,he){if(!I||We)return"";{var Te=_e.get(I);if(Te!==void 0)return Te}var it;We=!0;var Tt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var It;It=Me.current,Me.current=null,Oe();try{if(he){var xt=function(){throw Error()};if(Object.defineProperty(xt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(xt,[])}catch(Ai){it=Ai}Reflect.construct(I,[],xt)}else{try{xt.call()}catch(Ai){it=Ai}I.call(xt.prototype)}}else{try{throw Error()}catch(Ai){it=Ai}I()}}catch(Ai){if(Ai&&it&&typeof Ai.stack=="string"){for(var yt=Ai.stack.split(`
19
19
  `),Bn=it.stack.split(`
20
20
  `),Gt=yt.length-1,nn=Bn.length-1;Gt>=1&&nn>=0&&yt[Gt]!==Bn[nn];)nn--;for(;Gt>=1&&nn>=0;Gt--,nn--)if(yt[Gt]!==Bn[nn]){if(Gt!==1||nn!==1)do if(Gt--,nn--,nn<0||yt[Gt]!==Bn[nn]){var mr=`
21
- `+yt[Gt].replace(" at new "," at ");return I.displayName&&mr.includes("<anonymous>")&&(mr=mr.replace("<anonymous>",I.displayName)),typeof I=="function"&&_e.set(I,mr),mr}while(Gt>=1&&nn>=0);break}}}finally{We=!1,Me.current=It,Be(),Error.prepareStackTrace=Tt}var Os=I?I.displayName||I.name:"",HI=Os?nt(Os):"";return typeof I=="function"&&_e.set(I,HI),HI}function xe(I,he,Te){return $e(I,!1)}function Ue(I){var he=I.prototype;return!!(he&&he.isReactComponent)}function ot(I,he,Te){if(I==null)return"";if(typeof I=="function")return $e(I,Ue(I));if(typeof I=="string")return nt(I);switch(I){case c:return nt("Suspense");case u:return nt("SuspenseList")}if(typeof I=="object")switch(I.$$typeof){case l:return xe(I.render);case d:return ot(I.type,he,Te);case p:{var it=I,Tt=it._payload,It=it._init;try{return ot(It(Tt),he,Te)}catch{}}}return""}var D=Object.prototype.hasOwnProperty,ue={},me=g.ReactDebugCurrentFrame;function fe(I){if(I){var he=I._owner,Te=ot(I.type,I._source,he?he.type:null);me.setExtraStackFrame(Te)}else me.setExtraStackFrame(null)}function Le(I,he,Te,it,Tt){{var It=Function.call.bind(D);for(var xt in I)if(It(I,xt)){var yt=void 0;try{if(typeof I[xt]!="function"){var Bn=Error((it||"React class")+": "+Te+" type `"+xt+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof I[xt]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Bn.name="Invariant Violation",Bn}yt=I[xt](he,xt,it,Te,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Gt){yt=Gt}yt&&!(yt instanceof Error)&&(fe(Tt),y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",it||"React class",Te,xt,typeof yt),fe(null)),yt instanceof Error&&!(yt.message in ue)&&(ue[yt.message]=!0,fe(Tt),y("Failed %s type: %s",Te,yt.message),fe(null))}}}var De=Array.isArray;function Ke(I){return De(I)}function gt(I){{var he=typeof Symbol=="function"&&Symbol.toStringTag,Te=he&&I[Symbol.toStringTag]||I.constructor.name||"Object";return Te}}function Xe(I){try{return q(I),!1}catch{return!0}}function q(I){return""+I}function X(I){if(Xe(I))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",gt(I)),q(I)}var de=g.ReactCurrentOwner,je={key:!0,ref:!0,__self:!0,__source:!0},rt,Zt,Pt;Pt={};function Ot(I){if(D.call(I,"ref")){var he=Object.getOwnPropertyDescriptor(I,"ref").get;if(he&&he.isReactWarning)return!1}return I.ref!==void 0}function qt(I){if(D.call(I,"key")){var he=Object.getOwnPropertyDescriptor(I,"key").get;if(he&&he.isReactWarning)return!1}return I.key!==void 0}function Mn(I,he){if(typeof I.ref=="string"&&de.current&&he&&de.current.stateNode!==he){var Te=U(de.current.type);Pt[Te]||(y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',U(de.current.type),I.ref),Pt[Te]=!0)}}function Ht(I,he){{var Te=function(){rt||(rt=!0,y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",he))};Te.isReactWarning=!0,Object.defineProperty(I,"key",{get:Te,configurable:!0})}}function tn(I,he){{var Te=function(){Zt||(Zt=!0,y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",he))};Te.isReactWarning=!0,Object.defineProperty(I,"ref",{get:Te,configurable:!0})}}var mn=function(I,he,Te,it,Tt,It,xt){var yt={$$typeof:t,type:I,key:he,ref:Te,props:xt,_owner:It};return yt._store={},Object.defineProperty(yt._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(yt,"_self",{configurable:!1,enumerable:!1,writable:!1,value:it}),Object.defineProperty(yt,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Tt}),Object.freeze&&(Object.freeze(yt.props),Object.freeze(yt)),yt};function un(I,he,Te,it,Tt){{var It,xt={},yt=null,Bn=null;Te!==void 0&&(X(Te),yt=""+Te),qt(he)&&(X(he.key),yt=""+he.key),Ot(he)&&(Bn=he.ref,Mn(he,Tt));for(It in he)D.call(he,It)&&!je.hasOwnProperty(It)&&(xt[It]=he[It]);if(I&&I.defaultProps){var Gt=I.defaultProps;for(It in Gt)xt[It]===void 0&&(xt[It]=Gt[It])}if(yt||Bn){var nn=typeof I=="function"?I.displayName||I.name||"Unknown":I;yt&&Ht(xt,nn),Bn&&tn(xt,nn)}return mn(I,yt,Bn,Tt,it,de.current,xt)}}var Oi=g.ReactCurrentOwner,hr=g.ReactDebugCurrentFrame;function ei(I){if(I){var he=I._owner,Te=ot(I.type,I._source,he?he.type:null);hr.setExtraStackFrame(Te)}else hr.setExtraStackFrame(null)}var ta;ta=!1;function A(I){return typeof I=="object"&&I!==null&&I.$$typeof===t}function Ee(){{if(Oi.current){var I=U(Oi.current.type);if(I)return`
21
+ `+yt[Gt].replace(" at new "," at ");return I.displayName&&mr.includes("<anonymous>")&&(mr=mr.replace("<anonymous>",I.displayName)),typeof I=="function"&&_e.set(I,mr),mr}while(Gt>=1&&nn>=0);break}}}finally{We=!1,Me.current=It,Be(),Error.prepareStackTrace=Tt}var Os=I?I.displayName||I.name:"",HI=Os?nt(Os):"";return typeof I=="function"&&_e.set(I,HI),HI}function Se(I,he,Te){return $e(I,!1)}function Ue(I){var he=I.prototype;return!!(he&&he.isReactComponent)}function ot(I,he,Te){if(I==null)return"";if(typeof I=="function")return $e(I,Ue(I));if(typeof I=="string")return nt(I);switch(I){case c:return nt("Suspense");case u:return nt("SuspenseList")}if(typeof I=="object")switch(I.$$typeof){case l:return Se(I.render);case d:return ot(I.type,he,Te);case p:{var it=I,Tt=it._payload,It=it._init;try{return ot(It(Tt),he,Te)}catch{}}}return""}var D=Object.prototype.hasOwnProperty,ue={},me=g.ReactDebugCurrentFrame;function fe(I){if(I){var he=I._owner,Te=ot(I.type,I._source,he?he.type:null);me.setExtraStackFrame(Te)}else me.setExtraStackFrame(null)}function Le(I,he,Te,it,Tt){{var It=Function.call.bind(D);for(var xt in I)if(It(I,xt)){var yt=void 0;try{if(typeof I[xt]!="function"){var Bn=Error((it||"React class")+": "+Te+" type `"+xt+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof I[xt]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Bn.name="Invariant Violation",Bn}yt=I[xt](he,xt,it,Te,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Gt){yt=Gt}yt&&!(yt instanceof Error)&&(fe(Tt),y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",it||"React class",Te,xt,typeof yt),fe(null)),yt instanceof Error&&!(yt.message in ue)&&(ue[yt.message]=!0,fe(Tt),y("Failed %s type: %s",Te,yt.message),fe(null))}}}var De=Array.isArray;function Ke(I){return De(I)}function gt(I){{var he=typeof Symbol=="function"&&Symbol.toStringTag,Te=he&&I[Symbol.toStringTag]||I.constructor.name||"Object";return Te}}function Xe(I){try{return q(I),!1}catch{return!0}}function q(I){return""+I}function X(I){if(Xe(I))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",gt(I)),q(I)}var de=g.ReactCurrentOwner,je={key:!0,ref:!0,__self:!0,__source:!0},rt,Zt,Pt;Pt={};function Ot(I){if(D.call(I,"ref")){var he=Object.getOwnPropertyDescriptor(I,"ref").get;if(he&&he.isReactWarning)return!1}return I.ref!==void 0}function qt(I){if(D.call(I,"key")){var he=Object.getOwnPropertyDescriptor(I,"key").get;if(he&&he.isReactWarning)return!1}return I.key!==void 0}function Mn(I,he){if(typeof I.ref=="string"&&de.current&&he&&de.current.stateNode!==he){var Te=B(de.current.type);Pt[Te]||(y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',B(de.current.type),I.ref),Pt[Te]=!0)}}function Ht(I,he){{var Te=function(){rt||(rt=!0,y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",he))};Te.isReactWarning=!0,Object.defineProperty(I,"key",{get:Te,configurable:!0})}}function tn(I,he){{var Te=function(){Zt||(Zt=!0,y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",he))};Te.isReactWarning=!0,Object.defineProperty(I,"ref",{get:Te,configurable:!0})}}var mn=function(I,he,Te,it,Tt,It,xt){var yt={$$typeof:t,type:I,key:he,ref:Te,props:xt,_owner:It};return yt._store={},Object.defineProperty(yt._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(yt,"_self",{configurable:!1,enumerable:!1,writable:!1,value:it}),Object.defineProperty(yt,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Tt}),Object.freeze&&(Object.freeze(yt.props),Object.freeze(yt)),yt};function un(I,he,Te,it,Tt){{var It,xt={},yt=null,Bn=null;Te!==void 0&&(X(Te),yt=""+Te),qt(he)&&(X(he.key),yt=""+he.key),Ot(he)&&(Bn=he.ref,Mn(he,Tt));for(It in he)D.call(he,It)&&!je.hasOwnProperty(It)&&(xt[It]=he[It]);if(I&&I.defaultProps){var Gt=I.defaultProps;for(It in Gt)xt[It]===void 0&&(xt[It]=Gt[It])}if(yt||Bn){var nn=typeof I=="function"?I.displayName||I.name||"Unknown":I;yt&&Ht(xt,nn),Bn&&tn(xt,nn)}return mn(I,yt,Bn,Tt,it,de.current,xt)}}var Oi=g.ReactCurrentOwner,hr=g.ReactDebugCurrentFrame;function ei(I){if(I){var he=I._owner,Te=ot(I.type,I._source,he?he.type:null);hr.setExtraStackFrame(Te)}else hr.setExtraStackFrame(null)}var ta;ta=!1;function A(I){return typeof I=="object"&&I!==null&&I.$$typeof===t}function Ee(){{if(Oi.current){var I=B(Oi.current.type);if(I)return`
22
22
 
23
23
  Check the render method of \``+I+"`."}return""}}function Pe(I){{if(I!==void 0){var he=I.fileName.replace(/^.*[\\\/]/,""),Te=I.lineNumber;return`
24
24
 
25
25
  Check your code at `+he+":"+Te+"."}return""}}var Fe={};function Ce(I){{var he=Ee();if(!he){var Te=typeof I=="string"?I:I.displayName||I.name;Te&&(he=`
26
26
 
27
- Check the top-level render call using <`+Te+">.")}return he}}function Ie(I,he){{if(!I._store||I._store.validated||I.key!=null)return;I._store.validated=!0;var Te=Ce(he);if(Fe[Te])return;Fe[Te]=!0;var it="";I&&I._owner&&I._owner!==Oi.current&&(it=" It was passed a child from "+U(I._owner.type)+"."),ei(I),y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Te,it),ei(null)}}function at(I,he){{if(typeof I!="object")return;if(Ke(I))for(var Te=0;Te<I.length;Te++){var it=I[Te];A(it)&&Ie(it,he)}else if(A(I))I._store&&(I._store.validated=!0);else if(I){var Tt=v(I);if(typeof Tt=="function"&&Tt!==I.entries)for(var It=Tt.call(I),xt;!(xt=It.next()).done;)A(xt.value)&&Ie(xt.value,he)}}}function pt(I){{var he=I.type;if(he==null||typeof he=="string")return;var Te;if(typeof he=="function")Te=he.propTypes;else if(typeof he=="object"&&(he.$$typeof===l||he.$$typeof===d))Te=he.propTypes;else return;if(Te){var it=U(he);Le(Te,I.props,"prop",it,I)}else if(he.PropTypes!==void 0&&!ta){ta=!0;var Tt=U(he);y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Tt||"Unknown")}typeof he.getDefaultProps=="function"&&!he.getDefaultProps.isReactClassApproved&&y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ft(I){{for(var he=Object.keys(I.props),Te=0;Te<he.length;Te++){var it=he[Te];if(it!=="children"&&it!=="key"){ei(I),y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",it),ei(null);break}}I.ref!==null&&(ei(I),y("Invalid attribute `ref` supplied to `React.Fragment`."),ei(null))}}function Kt(I,he,Te,it,Tt,It){{var xt=k(I);if(!xt){var yt="";(I===void 0||typeof I=="object"&&I!==null&&Object.keys(I).length===0)&&(yt+=" 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 Bn=Pe(Tt);Bn?yt+=Bn:yt+=Ee();var Gt;I===null?Gt="null":Ke(I)?Gt="array":I!==void 0&&I.$$typeof===t?(Gt="<"+(U(I.type)||"Unknown")+" />",yt=" Did you accidentally export a JSX literal instead of a component?"):Gt=typeof I,y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Gt,yt)}var nn=un(I,he,Te,Tt,It);if(nn==null)return nn;if(xt){var mr=he.children;if(mr!==void 0)if(it)if(Ke(mr)){for(var Os=0;Os<mr.length;Os++)at(mr[Os],I);Object.freeze&&Object.freeze(mr)}else y("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 at(mr,I)}return I===r?Ft(nn):pt(nn),nn}}function Yn(I,he,Te){return Kt(I,he,Te,!0)}function Or(I,he,Te){return Kt(I,he,Te,!1)}var rb=Or,Jye=Yn;Ps.Fragment=r,Ps.jsx=rb,Ps.jsxs=Jye}()),Ps}process.env.NODE_ENV==="production"?Fp.exports=tR():Fp.exports=nR();var B=Fp.exports;function lt(){return lt=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},lt.apply(this,arguments)}function kc(e,t=[]){let n=[];function r(o,a){const s=w.createContext(a),l=n.length;n=[...n,a];function c(d){const{scope:p,children:f,...h}=d,m=(p==null?void 0:p[e][l])||s,v=w.useMemo(()=>h,Object.values(h));return w.createElement(m.Provider,{value:v},f)}function u(d,p){const f=(p==null?void 0:p[e][l])||s,h=w.useContext(f);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${o}\``)}return c.displayName=o+"Provider",[c,u]}const i=()=>{const o=n.map(a=>w.createContext(a));return function(s){const l=(s==null?void 0:s[e])||o;return w.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,rR(i,...t)]}function rR(...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 d=l(o)[`__scope${c}`];return{...s,...d}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Nn(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const na=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{};function iR(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function pb(...e){return t=>e.forEach(n=>iR(n,t))}function Jn(...e){return w.useCallback(pb(...e),e)}const Up=w.forwardRef((e,t)=>{const{children:n,...r}=e,i=w.Children.toArray(n),o=i.find(aR);if(o){const a=o.props.children,s=i.map(l=>l===o?w.Children.count(a)>1?w.Children.only(null):w.isValidElement(a)?a.props.children:null:l);return w.createElement(Bp,lt({},r,{ref:t}),w.isValidElement(a)?w.cloneElement(a,void 0,s):null)}return w.createElement(Bp,lt({},r,{ref:t}),n)});Up.displayName="Slot";const Bp=w.forwardRef((e,t)=>{const{children:n,...r}=e;return w.isValidElement(n)?w.cloneElement(n,{...sR(r,n.props),ref:t?pb(t,n.ref):n.ref}):w.Children.count(n)>1?w.Children.only(null):null});Bp.displayName="SlotClone";const oR=({children:e})=>w.createElement(w.Fragment,null,e);function aR(e){return w.isValidElement(e)&&e.type===oR}function sR(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 gn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const n=w.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Up:t;return w.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),w.createElement(s,lt({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function lR(e,t){e&&$r.flushSync(()=>e.dispatchEvent(t))}const hb="Avatar",[cR,tve]=kc(hb),[uR,mb]=cR(hb),gb=w.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,o]=w.useState("idle");return w.createElement(uR,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:o},w.createElement(gn.span,lt({},r,{ref:t})))}),dR="AvatarImage",yb=w.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...o}=e,a=mb(dR,n),s=pR(r),l=Nn(c=>{i(c),a.onImageLoadingStatusChange(c)});return na(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?w.createElement(gn.img,lt({},o,{ref:t,src:r})):null}),fR="AvatarFallback",vb=w.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,o=mb(fR,n),[a,s]=w.useState(r===void 0);return w.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(l)}},[r]),a&&o.imageLoadingStatus!=="loaded"?w.createElement(gn.span,lt({},i,{ref:t})):null});function pR(e){const[t,n]=w.useState("idle");return w.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 zp=class{constructor(){T(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;(r=this.eventMap[t])==null||r.forEach(i=>{i(n)})}};const hR=new zp;function bb(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 Zp=w.forwardRef(({userId:e,src:t,container:n,image:r,fallback:i,...o},a)=>{const s=bb(e??"",15);return B.jsxs(gb,{ref:a,"data-color":s,...n,...o,children:[B.jsx(yb,{src:t,...r}),B.jsx(vb,{...i,children:typeof o.children=="string"?o.children[0]:o.children})]})});function nve(){}function rve(){}function mR(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const gR=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yR=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,vR={};function wb(e,t){return((t||vR).jsx?yR:gR).test(e)}const bR=/[ \t\n\f\r]/g;function wR(e){return typeof e=="object"?e.type==="text"?_b(e.value):!1:_b(e)}function _b(e){return e.replace(bR,"")===""}let Is=class{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}};Is.prototype.property={},Is.prototype.normal={},Is.prototype.space=null;function xb(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 Is(n,r,t)}function qp(e){return e.toLowerCase()}class ar{constructor(t,n){this.property=t,this.attribute=n}}ar.prototype.space=null,ar.prototype.boolean=!1,ar.prototype.booleanish=!1,ar.prototype.overloadedBoolean=!1,ar.prototype.number=!1,ar.prototype.commaSeparated=!1,ar.prototype.spaceSeparated=!1,ar.prototype.commaOrSpaceSeparated=!1,ar.prototype.mustUseProperty=!1,ar.prototype.defined=!1;let _R=0;const ut=fo(),Yt=fo(),Sb=fo(),ge=fo(),Dt=fo(),ra=fo(),Xn=fo();function fo(){return 2**++_R}const Hp=Object.freeze(Object.defineProperty({__proto__:null,boolean:ut,booleanish:Yt,commaOrSpaceSeparated:Xn,commaSeparated:ra,number:ge,overloadedBoolean:Sb,spaceSeparated:Dt},Symbol.toStringTag,{value:"Module"})),Wp=Object.keys(Hp);class Vp extends ar{constructor(t,n,r,i){let o=-1;if(super(t,n),Eb(this,"space",i),typeof r=="number")for(;++o<Wp.length;){const a=Wp[o];Eb(this,Wp[o],(r&Hp[a])===Hp[a])}}}Vp.prototype.defined=!0;function Eb(e,t,n){n&&(e[t]=n)}const xR={}.hasOwnProperty;function ia(e){const t={},n={};let r;for(r in e.properties)if(xR.call(e.properties,r)){const i=e.properties[r],o=new Vp(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[qp(r)]=r,n[qp(o.attribute)]=r}return new Is(t,n,e.space)}const Cb=ia({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}}),Tb=ia({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function kb(e,t){return t in e?e[t]:t}function Ob(e,t){return kb(e,t.toLowerCase())}const Ab=ia({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Ob,properties:{xmlns:null,xmlnsXLink:null}}),$b=ia({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Yt,ariaAutoComplete:null,ariaBusy:Yt,ariaChecked:Yt,ariaColCount:ge,ariaColIndex:ge,ariaColSpan:ge,ariaControls:Dt,ariaCurrent:null,ariaDescribedBy:Dt,ariaDetails:null,ariaDisabled:Yt,ariaDropEffect:Dt,ariaErrorMessage:null,ariaExpanded:Yt,ariaFlowTo:Dt,ariaGrabbed:Yt,ariaHasPopup:null,ariaHidden:Yt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Dt,ariaLevel:ge,ariaLive:null,ariaModal:Yt,ariaMultiLine:Yt,ariaMultiSelectable:Yt,ariaOrientation:null,ariaOwns:Dt,ariaPlaceholder:null,ariaPosInSet:ge,ariaPressed:Yt,ariaReadOnly:Yt,ariaRelevant:null,ariaRequired:Yt,ariaRoleDescription:Dt,ariaRowCount:ge,ariaRowIndex:ge,ariaRowSpan:ge,ariaSelected:Yt,ariaSetSize:ge,ariaSort:null,ariaValueMax:ge,ariaValueMin:ge,ariaValueNow:ge,ariaValueText:null,role:null}}),SR=ia({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Ob,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ra,acceptCharset:Dt,accessKey:Dt,action:null,allow:null,allowFullScreen:ut,allowPaymentRequest:ut,allowUserMedia:ut,alt:null,as:null,async:ut,autoCapitalize:null,autoComplete:Dt,autoFocus:ut,autoPlay:ut,capture:ut,charSet:null,checked:ut,cite:null,className:Dt,cols:ge,colSpan:null,content:null,contentEditable:Yt,controls:ut,controlsList:Dt,coords:ge|ra,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ut,defer:ut,dir:null,dirName:null,disabled:ut,download:Sb,draggable:Yt,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ut,formTarget:null,headers:Dt,height:ge,hidden:ut,high:ge,href:null,hrefLang:null,htmlFor:Dt,httpEquiv:Dt,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:ut,itemId:null,itemProp:Dt,itemRef:Dt,itemScope:ut,itemType:Dt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ut,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,multiple:ut,muted:ut,name:null,nonce:null,noModule:ut,noValidate:ut,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:ut,optimum:ge,pattern:null,ping:Dt,placeholder:null,playsInline:ut,poster:null,preload:null,readOnly:ut,referrerPolicy:null,rel:Dt,required:ut,reversed:ut,rows:ge,rowSpan:ge,sandbox:Dt,scope:null,scoped:ut,seamless:ut,selected:ut,shape:null,size:ge,sizes:null,slot:null,span:ge,spellCheck:Yt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ge,step:null,style:null,tabIndex:ge,target:null,title:null,translate:null,type:null,typeMustMatch:ut,useMap:null,value:Yt,width:ge,wrap:null,align:null,aLink:null,archive:Dt,axis:null,background:null,bgColor:null,border:ge,borderColor:null,bottomMargin:ge,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ut,declare:ut,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:ut,noHref:ut,noShade:ut,noWrap:ut,object:null,profile:null,prompt:null,rev:null,rightMargin:ge,rules:null,scheme:null,scrolling:Yt,standby:null,summary:null,text:null,topMargin:ge,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ge,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ut,disableRemotePlayback:ut,prefix:null,property:null,results:ge,security:null,unselectable:null}}),ER=ia({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:kb,properties:{about:Xn,accentHeight:ge,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ge,amplitude:ge,arabicForm:null,ascent:ge,attributeName:null,attributeType:null,azimuth:ge,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ge,by:null,calcMode:null,capHeight:ge,className:Dt,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:ge,diffuseConstant:ge,direction:null,display:null,dur:null,divisor:ge,dominantBaseline:null,download:ut,dx:null,dy:null,edgeMode:null,editable:null,elevation:ge,enableBackground:null,end:null,event:null,exponent:ge,externalResourcesRequired:null,fill:null,fillOpacity:ge,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:ra,g2:ra,glyphName:ra,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ge,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ge,horizOriginX:ge,horizOriginY:ge,id:null,ideographic:ge,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ge,k:ge,k1:ge,k2:ge,k3:ge,k4:ge,kernelMatrix:Xn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ge,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:ge,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:ge,overlineThickness:ge,paintOrder:null,panose1:null,path:null,pathLength:ge,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Dt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ge,pointsAtY:ge,pointsAtZ:ge,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Xn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Xn,rev:Xn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Xn,requiredFeatures:Xn,requiredFonts:Xn,requiredFormats:Xn,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:ge,specularExponent:ge,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ge,strikethroughThickness:ge,string:null,stroke:null,strokeDashArray:Xn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ge,strokeOpacity:ge,strokeWidth:null,style:null,surfaceScale:ge,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Xn,tabIndex:ge,tableValues:null,target:null,targetX:ge,targetY:ge,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Xn,to:null,transform:null,u1:null,u2:null,underlinePosition:ge,underlineThickness:ge,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ge,values:null,vAlphabetic:ge,vMathematical:ge,vectorEffect:null,vHanging:ge,vIdeographic:ge,version:null,vertAdvY:ge,vertOriginX:ge,vertOriginY:ge,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ge,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),CR=/^data[-\w.:]+$/i,Pb=/-[a-z]/g,TR=/[A-Z]/g;function kR(e,t){const n=qp(t);let r=t,i=ar;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&CR.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Pb,AR);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Pb.test(o)){let a=o.replace(TR,OR);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=Vp}return new i(r,t)}function OR(e){return"-"+e.toLowerCase()}function AR(e){return e.charAt(1).toUpperCase()}const $R={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"},PR=xb([Tb,Cb,Ab,$b,SR],"html"),Kp=xb([Tb,Cb,Ab,$b,ER],"svg");function IR(e){return e.join(" ").trim()}var Ib={},Rb=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,RR=/\n/g,MR=/^\s*/,NR=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,DR=/^:\s*/,jR=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,LR=/^[;\s]*/,FR=/^\s+|\s+$/g,UR=`
28
- `,Mb="/",Nb="*",po="",BR="comment",zR="declaration",ZR=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(h){var m=h.match(RR);m&&(n+=m.length);var v=h.lastIndexOf(UR);r=~v?h.length-v:r+h.length}function o(){var h={line:n,column:r};return function(m){return m.position=new a(h),c(),m}}function a(h){this.start=h,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function s(h){var m=new Error(t.source+":"+n+":"+r+": "+h);if(m.reason=h,m.filename=t.source,m.line=n,m.column=r,m.source=e,!t.silent)throw m}function l(h){var m=h.exec(e);if(m){var v=m[0];return i(v),e=e.slice(v.length),m}}function c(){l(MR)}function u(h){var m;for(h=h||[];m=d();)m!==!1&&h.push(m);return h}function d(){var h=o();if(!(Mb!=e.charAt(0)||Nb!=e.charAt(1))){for(var m=2;po!=e.charAt(m)&&(Nb!=e.charAt(m)||Mb!=e.charAt(m+1));)++m;if(m+=2,po===e.charAt(m-1))return s("End of comment missing");var v=e.slice(2,m-2);return r+=2,i(v),e=e.slice(m),r+=2,h({type:BR,comment:v})}}function p(){var h=o(),m=l(NR);if(m){if(d(),!l(DR))return s("property missing ':'");var v=l(jR),g=h({type:zR,property:Db(m[0].replace(Rb,po)),value:v?Db(v[0].replace(Rb,po)):po});return l(LR),g}}function f(){var h=[];u(h);for(var m;m=p();)m!==!1&&(h.push(m),u(h));return h}return c(),f()};function Db(e){return e?e.replace(FR,po):po}var qR=K&&K.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ib,"__esModule",{value:!0});var HR=qR(ZR);function WR(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,HR.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 jb=Ib.default=WR;const VR=jb.default||jb,Lb=Fb("end"),Gp=Fb("start");function Fb(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 KR(e){const t=Gp(e),n=Lb(e);if(t&&n)return{start:t,end:n}}function Rs(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ub(e.position):"start"in e||"end"in e?Ub(e):"line"in e||"column"in e?Yp(e):""}function Yp(e){return Bb(e&&e.line)+":"+Bb(e&&e.column)}function Ub(e){return Yp(e&&e.start)+"-"+Yp(e&&e.end)}function Bb(e){return e&&typeof e=="number"?e:1}class xn 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=Rs(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}}xn.prototype.file="",xn.prototype.name="",xn.prototype.reason="",xn.prototype.message="",xn.prototype.stack="",xn.prototype.column=void 0,xn.prototype.line=void 0,xn.prototype.ancestors=void 0,xn.prototype.cause=void 0,xn.prototype.fatal=void 0,xn.prototype.place=void 0,xn.prototype.ruleId=void 0,xn.prototype.source=void 0;const Jp={}.hasOwnProperty,GR=new Map,YR=/[A-Z]/g,JR=/-([a-z])/g,XR=new Set(["table","tbody","thead","tfoot","tr"]),QR=new Set(["td","th"]),zb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function eM(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=lM(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=sM(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"?Kp:PR,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Zb(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Zb(e,t,n){if(t.type==="element")return tM(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return nM(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return iM(e,t,n);if(t.type==="mdxjsEsm")return rM(e,t);if(t.type==="root")return oM(e,t,n);if(t.type==="text")return aM(e,t)}function tM(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Kp,e.schema=i),e.ancestors.push(t);const o=Hb(e,t.tagName,!1),a=cM(e,t);let s=Qp(e,t);return XR.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!wR(l):!0})),qb(e,a,o,t),Xp(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function nM(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)}Ms(e,t.position)}function rM(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ms(e,t.position)}function iM(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Kp,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Hb(e,t.name,!0),a=uM(e,t),s=Qp(e,t);return qb(e,a,o,t),Xp(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function oM(e,t,n){const r={};return Xp(r,Qp(e,t)),e.create(t,e.Fragment,r,n)}function aM(e,t){return t.value}function qb(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Xp(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function sM(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 lM(e,t){return n;function n(r,i,o,a){const s=Array.isArray(o.children),l=Gp(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 cM(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Jp.call(t.properties,i)){const o=dM(e,i,t.properties[i]);if(o){const[a,s]=o;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&QR.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 uM(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 Ms(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 Ms(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function Qp(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:GR;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=Zb(e,o,a);s!==void 0&&n.push(s)}return n}function dM(e,t,n){const r=kR(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?mR(n):IR(n)),r.property==="style"){let i=typeof n=="object"?n:fM(e,String(n));return e.stylePropertyNameCase==="css"&&(i=pM(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?$R[r.property]||r.property:r.attribute,n]}}function fM(e,t){const n={};try{VR(t,r)}catch(i){if(!e.ignoreInvalidStyle){const o=i,a=new xn("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=zb+"#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(JR,mM)),n[a]=o}}function Hb(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=wb(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=wb(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Jp.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ms(e)}function Ms(e,t){const n=new xn("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=zb+"#cannot-handle-mdx-estrees-without-createevaluater",n}function pM(e){const t={};let n;for(n in e)Jp.call(e,n)&&(t[hM(n)]=e[n]);return t}function hM(e){let t=e.replace(YR,gM);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function mM(e,t){return t.toUpperCase()}function gM(e){return"-"+e.toLowerCase()}const eh={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"]},yM={};function th(e,t){const n=t||yM,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Wb(e,r,i)}function Wb(e,t,n){if(vM(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 Vb(e.children,t,n)}return Array.isArray(e)?Vb(e,t,n):""}function Vb(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Wb(e[i],t,n);return r.join("")}function vM(e){return!!(e&&typeof e=="object")}const Kb=document.createElement("i");function nh(e){const t="&"+e+";";Kb.innerHTML=t;const n=Kb.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Qn(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 sr(e,t){return e.length>0?(Qn(e,e.length,0,t),e):t}const Gb={}.hasOwnProperty;function Yb(e){const t={};let n=-1;for(;++n<e.length;)bM(t,e[n]);return t}function bM(e,t){let n;for(n in t){const i=(Gb.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let a;if(o)for(a in o){Gb.call(i,a)||(i[a]=[]);const s=o[a];wM(i[a],Array.isArray(s)?s:s?[s]:[])}}}function wM(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Qn(e,0,0,r)}function Jb(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 gr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Dn=$i(/[A-Za-z]/),Sn=$i(/[\dA-Za-z]/),_M=$i(/[#-'*+\--9=?A-Z^-~]/);function Oc(e){return e!==null&&(e<32||e===127)}const rh=$i(/\d/),xM=$i(/[\dA-Fa-f]/),SM=$i(/[!-/:-@[-`{-~]/);function Ve(e){return e!==null&&e<-2}function At(e){return e!==null&&(e<0||e===32)}function ht(e){return e===-2||e===-1||e===32}const Ac=$i(/\p{P}|\p{S}/u),ho=$i(/\s/);function $i(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function oa(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(o===37&&Sn(e.charCodeAt(n+1))&&Sn(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 bt(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(l){return ht(l)?(e.enter(n),s(l)):t(l)}function s(l){return ht(l)&&o++<i?(e.consume(l),s):(e.exit(n),t(l))}}const EM={tokenize:CM};function CM(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"),bt(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 Ve(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),a)}}const TM={tokenize:kM},Xb={tokenize:OM};function kM(e){const t=this,n=[];let r=0,i,o,a;return s;function s(b){if(r<n.length){const x=n[r];return t.containerState=x[1],e.attempt(x[0].continuation,l,c)(b)}return c(b)}function l(b){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&y();const x=t.events.length;let _=x,S;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){S=t.events[_][1].end;break}g(r);let R=x;for(;R<t.events.length;)t.events[R][1].end=Object.assign({},S),R++;return Qn(t.events,_+1,0,t.events.slice(x)),t.events.length=R,c(b)}return s(b)}function c(b){if(r===n.length){if(!i)return p(b);if(i.currentConstruct&&i.currentConstruct.concrete)return h(b);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Xb,u,d)(b)}function u(b){return i&&y(),g(r),p(b)}function d(b){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,h(b)}function p(b){return t.containerState={},e.attempt(Xb,f,h)(b)}function f(b){return r++,n.push([t.currentConstruct,t.containerState]),p(b)}function h(b){if(b===null){i&&y(),g(0),e.consume(b);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:i}),m(b)}function m(b){if(b===null){v(e.exit("chunkFlow"),!0),g(0),e.consume(b);return}return Ve(b)?(e.consume(b),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(b),m)}function v(b,x){const _=t.sliceStream(b);if(x&&_.push(null),b.previous=o,o&&(o.next=b),o=b,i.defineSkip(b.start),i.write(_),t.parser.lazy[b.start.line]){let S=i.events.length;for(;S--;)if(i.events[S][1].start.offset<a&&(!i.events[S][1].end||i.events[S][1].end.offset>a))return;const R=t.events.length;let M=R,j,k;for(;M--;)if(t.events[M][0]==="exit"&&t.events[M][1].type==="chunkFlow"){if(j){k=t.events[M][1].end;break}j=!0}for(g(r),S=R;S<t.events.length;)t.events[S][1].end=Object.assign({},k),S++;Qn(t.events,M+1,0,t.events.slice(R)),t.events.length=S}}function g(b){let x=n.length;for(;x-- >b;){const _=n[x];t.containerState=_[1],_[0].exit.call(t,e)}n.length=b}function y(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function OM(e,t,n){return bt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function $c(e){if(e===null||At(e)||ho(e))return 1;if(Ac(e))return 2}function Pc(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 ih={name:"attention",tokenize:$M,resolveAll:AM};function AM(e,t){let n=-1,r,i,o,a,s,l,c,u;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 d=Object.assign({},e[r][1].end),p=Object.assign({},e[n][1].start);Qb(d,-l),Qb(p,l),a={type:l>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},e[r][1].end)},s={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:p},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=sr(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=sr(c,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),c=sr(c,Pc(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=sr(c,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=sr(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,Qn(e,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function $M(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=$c(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"),u=$c(l),d=!u||u===2&&i||n.includes(l),p=!i||i===2&&u||n.includes(r);return c._open=!!(o===42?d:d&&(i||!p)),c._close=!!(o===42?p:p&&(u||!d)),t(l)}}function Qb(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const PM={name:"autolink",tokenize:IM};function IM(e,t,n){let r=0;return i;function i(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(f){return Dn(f)?(e.consume(f),a):c(f)}function a(f){return f===43||f===45||f===46||Sn(f)?(r=1,s(f)):c(f)}function s(f){return f===58?(e.consume(f),r=0,l):(f===43||f===45||f===46||Sn(f))&&r++<32?(e.consume(f),s):(r=0,c(f))}function l(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||Oc(f)?n(f):(e.consume(f),l)}function c(f){return f===64?(e.consume(f),u):_M(f)?(e.consume(f),c):n(f)}function u(f){return Sn(f)?d(f):n(f)}function d(f){return f===46?(e.consume(f),r=0,u):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):p(f)}function p(f){if((f===45||Sn(f))&&r++<63){const h=f===45?p:d;return e.consume(f),h}return n(f)}}const Ns={tokenize:RM,partial:!0};function RM(e,t,n){return r;function r(o){return ht(o)?bt(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||Ve(o)?t(o):n(o)}}const e0={name:"blockQuote",tokenize:MM,continuation:{tokenize:NM},exit:DM};function MM(e,t,n){const r=this;return i;function i(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return n(a)}function o(a){return ht(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function NM(e,t,n){const r=this;return i;function i(a){return ht(a)?bt(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(e0,t,n)(a)}}function DM(e){e.exit("blockQuote")}const t0={name:"characterEscape",tokenize:jM};function jM(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 SM(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const n0={name:"characterReference",tokenize:LM};function LM(e,t,n){const r=this;let i=0,o,a;return s;function s(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),o=31,a=Sn,u(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=xM,u):(e.enter("characterReferenceValue"),o=7,a=rh,u(d))}function u(d){if(d===59&&i){const p=e.exit("characterReferenceValue");return a===Sn&&!nh(r.sliceSerialize(p))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(d)&&i++<o?(e.consume(d),u):n(d)}}const r0={tokenize:UM,partial:!0},i0={name:"codeFenced",tokenize:FM,concrete:!0};function FM(e,t,n){const r=this,i={tokenize:_,partial:!0};let o=0,a=0,s;return l;function l(S){return c(S)}function c(S){const R=r.events[r.events.length-1];return o=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,s=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(S)}function u(S){return S===s?(a++,e.consume(S),u):a<3?n(S):(e.exit("codeFencedFenceSequence"),ht(S)?bt(e,d,"whitespace")(S):d(S))}function d(S){return S===null||Ve(S)?(e.exit("codeFencedFence"),r.interrupt?t(S):e.check(r0,m,x)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(S))}function p(S){return S===null||Ve(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(S)):ht(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),bt(e,f,"whitespace")(S)):S===96&&S===s?n(S):(e.consume(S),p)}function f(S){return S===null||Ve(S)?d(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(S))}function h(S){return S===null||Ve(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(S)):S===96&&S===s?n(S):(e.consume(S),h)}function m(S){return e.attempt(i,x,v)(S)}function v(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),g}function g(S){return o>0&&ht(S)?bt(e,y,"linePrefix",o+1)(S):y(S)}function y(S){return S===null||Ve(S)?e.check(r0,m,x)(S):(e.enter("codeFlowValue"),b(S))}function b(S){return S===null||Ve(S)?(e.exit("codeFlowValue"),y(S)):(e.consume(S),b)}function x(S){return e.exit("codeFenced"),t(S)}function _(S,R,M){let j=0;return k;function k(L){return S.enter("lineEnding"),S.consume(L),S.exit("lineEnding"),N}function N(L){return S.enter("codeFencedFence"),ht(L)?bt(S,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):z(L)}function z(L){return L===s?(S.enter("codeFencedFenceSequence"),U(L)):M(L)}function U(L){return L===s?(j++,S.consume(L),U):j>=a?(S.exit("codeFencedFenceSequence"),ht(L)?bt(S,Z,"whitespace")(L):Z(L)):M(L)}function Z(L){return L===null||Ve(L)?(S.exit("codeFencedFence"),R(L)):M(L)}}}function UM(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 oh={name:"codeIndented",tokenize:zM},BM={tokenize:ZM,partial:!0};function zM(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),bt(e,o,"linePrefix",4+1)(c)}function o(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?l(c):Ve(c)?e.attempt(BM,a,l)(c):(e.enter("codeFlowValue"),s(c))}function s(c){return c===null||Ve(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),s)}function l(c){return e.exit("codeIndented"),t(c)}}function ZM(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):Ve(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):bt(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):Ve(a)?i(a):n(a)}}const qM={name:"codeText",tokenize:VM,resolve:HM,previous:WM};function HM(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 WM(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function VM(e,t,n){let r=0,i,o;return a;function a(d){return e.enter("codeText"),e.enter("codeTextSequence"),s(d)}function s(d){return d===96?(e.consume(d),r++,s):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(o=e.enter("codeTextSequence"),i=0,u(d)):Ve(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||Ve(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),c)}function u(d){return d===96?(e.consume(d),i++,u):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(o.type="codeTextData",c(d))}}function o0(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,KM(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),Qn(e,i,n-i+1,s))}}return!c}function KM(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 u,d,p=-1,f=n,h=0,m=0;const v=[m];for(;f;){for(;e[++i][1]!==f;);o.push(i),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),d&&a.defineSkip(f.start),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(m=p+1,v.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(a.events=[],f?(f._tokenizer=void 0,f.previous=void 0):v.pop(),p=v.length;p--;){const g=s.slice(v[p],v[p+1]),y=o.pop();l.unshift([y,y+g.length-1]),Qn(e,y,2,g)}for(p=-1;++p<l.length;)c[h+l[p][0]]=h+l[p][1],h+=l[p][1]-l[p][0]-1;return c}const GM={tokenize:XM,resolve:JM},YM={tokenize:QM,partial:!0};function JM(e){return o0(e),e}function XM(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):Ve(s)?e.check(YM,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 QM(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),bt(e,o,"linePrefix")}function o(a){if(a===null||Ve(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 a0(e,t,n,r,i,o,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return d;function d(g){return g===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(g),e.exit(o),p):g===null||g===32||g===41||Oc(g)?n(g):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),m(g))}function p(g){return g===62?(e.enter(o),e.consume(g),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),f(g))}function f(g){return g===62?(e.exit("chunkString"),e.exit(s),p(g)):g===null||g===60||Ve(g)?n(g):(e.consume(g),g===92?h:f)}function h(g){return g===60||g===62||g===92?(e.consume(g),f):f(g)}function m(g){return!u&&(g===null||g===41||At(g))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(g)):u<c&&g===40?(e.consume(g),u++,m):g===41?(e.consume(g),u--,m):g===null||g===32||g===40||Oc(g)?n(g):(e.consume(g),g===92?v:m)}function v(g){return g===40||g===41||g===92?(e.consume(g),m):m(g)}}function s0(e,t,n,r,i,o){const a=this;let s=0,l;return c;function c(f){return e.enter(r),e.enter(i),e.consume(f),e.exit(i),e.enter(o),u}function u(f){return s>999||f===null||f===91||f===93&&!l||f===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(f):f===93?(e.exit(o),e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):Ve(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||Ve(f)||s++>999?(e.exit("chunkString"),u(f)):(e.consume(f),l||(l=!ht(f)),f===92?p:d)}function p(f){return f===91||f===92||f===93?(e.consume(f),s++,d):d(f)}}function l0(e,t,n,r,i,o){let a;return s;function s(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),a=p===40?41:p,l):n(p)}function l(p){return p===a?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),c(p))}function c(p){return p===a?(e.exit(o),l(a)):p===null?n(p):Ve(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),bt(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(p))}function u(p){return p===a||p===null||Ve(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?d:u)}function d(p){return p===a||p===92?(e.consume(p),u):u(p)}}function Ds(e,t){let n;return r;function r(i){return Ve(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ht(i)?bt(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const eN={name:"definition",tokenize:nN},tN={tokenize:rN,partial:!0};function nN(e,t,n){const r=this;let i;return o;function o(f){return e.enter("definition"),a(f)}function a(f){return s0.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function s(f){return i=gr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),l):n(f)}function l(f){return At(f)?Ds(e,c)(f):c(f)}function c(f){return a0(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function u(f){return e.attempt(tN,d,d)(f)}function d(f){return ht(f)?bt(e,p,"whitespace")(f):p(f)}function p(f){return f===null||Ve(f)?(e.exit("definition"),r.parser.defined.push(i),t(f)):n(f)}}function rN(e,t,n){return r;function r(s){return At(s)?Ds(e,i)(s):n(s)}function i(s){return l0(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return ht(s)?bt(e,a,"whitespace")(s):a(s)}function a(s){return s===null||Ve(s)?t(s):n(s)}}const iN={name:"hardBreakEscape",tokenize:oN};function oN(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return Ve(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const aN={name:"headingAtx",tokenize:lN,resolve:sN};function sN(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"},Qn(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function lN(e,t,n){let r=0;return i;function i(u){return e.enter("atxHeading"),o(u)}function o(u){return e.enter("atxHeadingSequence"),a(u)}function a(u){return u===35&&r++<6?(e.consume(u),a):u===null||At(u)?(e.exit("atxHeadingSequence"),s(u)):n(u)}function s(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||Ve(u)?(e.exit("atxHeading"),t(u)):ht(u)?bt(e,s,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),s(u))}function c(u){return u===null||u===35||At(u)?(e.exit("atxHeadingText"),s(u)):(e.consume(u),c)}}const cN=["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"],c0=["pre","script","style","textarea"],uN={name:"htmlFlow",tokenize:hN,resolveTo:pN,concrete:!0},dN={tokenize:gN,partial:!0},fN={tokenize:mN,partial:!0};function pN(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 hN(e,t,n){const r=this;let i,o,a,s,l;return c;function c(O){return u(O)}function u(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),d}function d(O){return O===33?(e.consume(O),p):O===47?(e.consume(O),o=!0,m):O===63?(e.consume(O),i=3,r.interrupt?t:C):Dn(O)?(e.consume(O),a=String.fromCharCode(O),v):n(O)}function p(O){return O===45?(e.consume(O),i=2,f):O===91?(e.consume(O),i=5,s=0,h):Dn(O)?(e.consume(O),i=4,r.interrupt?t:C):n(O)}function f(O){return O===45?(e.consume(O),r.interrupt?t:C):n(O)}function h(O){const Oe="CDATA[";return O===Oe.charCodeAt(s++)?(e.consume(O),s===Oe.length?r.interrupt?t:z:h):n(O)}function m(O){return Dn(O)?(e.consume(O),a=String.fromCharCode(O),v):n(O)}function v(O){if(O===null||O===47||O===62||At(O)){const Oe=O===47,Be=a.toLowerCase();return!Oe&&!o&&c0.includes(Be)?(i=1,r.interrupt?t(O):z(O)):cN.includes(a.toLowerCase())?(i=6,Oe?(e.consume(O),g):r.interrupt?t(O):z(O)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):o?y(O):b(O))}return O===45||Sn(O)?(e.consume(O),a+=String.fromCharCode(O),v):n(O)}function g(O){return O===62?(e.consume(O),r.interrupt?t:z):n(O)}function y(O){return ht(O)?(e.consume(O),y):k(O)}function b(O){return O===47?(e.consume(O),k):O===58||O===95||Dn(O)?(e.consume(O),x):ht(O)?(e.consume(O),b):k(O)}function x(O){return O===45||O===46||O===58||O===95||Sn(O)?(e.consume(O),x):_(O)}function _(O){return O===61?(e.consume(O),S):ht(O)?(e.consume(O),_):b(O)}function S(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),l=O,R):ht(O)?(e.consume(O),S):M(O)}function R(O){return O===l?(e.consume(O),l=null,j):O===null||Ve(O)?n(O):(e.consume(O),R)}function M(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||At(O)?_(O):(e.consume(O),M)}function j(O){return O===47||O===62||ht(O)?b(O):n(O)}function k(O){return O===62?(e.consume(O),N):n(O)}function N(O){return O===null||Ve(O)?z(O):ht(O)?(e.consume(O),N):n(O)}function z(O){return O===45&&i===2?(e.consume(O),F):O===60&&i===1?(e.consume(O),V):O===62&&i===4?(e.consume(O),se):O===63&&i===3?(e.consume(O),C):O===93&&i===5?(e.consume(O),pe):Ve(O)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(dN,we,U)(O)):O===null||Ve(O)?(e.exit("htmlFlowData"),U(O)):(e.consume(O),z)}function U(O){return e.check(fN,Z,we)(O)}function Z(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),L}function L(O){return O===null||Ve(O)?U(O):(e.enter("htmlFlowData"),z(O))}function F(O){return O===45?(e.consume(O),C):z(O)}function V(O){return O===47?(e.consume(O),a="",W):z(O)}function W(O){if(O===62){const Oe=a.toLowerCase();return c0.includes(Oe)?(e.consume(O),se):z(O)}return Dn(O)&&a.length<8?(e.consume(O),a+=String.fromCharCode(O),W):z(O)}function pe(O){return O===93?(e.consume(O),C):z(O)}function C(O){return O===62?(e.consume(O),se):O===45&&i===2?(e.consume(O),C):z(O)}function se(O){return O===null||Ve(O)?(e.exit("htmlFlowData"),we(O)):(e.consume(O),se)}function we(O){return e.exit("htmlFlow"),t(O)}}function mN(e,t,n){const r=this;return i;function i(a){return Ve(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 gN(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ns,t,n)}}const yN={name:"htmlText",tokenize:vN};function vN(e,t,n){const r=this;let i,o,a;return s;function s(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),l}function l(C){return C===33?(e.consume(C),c):C===47?(e.consume(C),_):C===63?(e.consume(C),b):Dn(C)?(e.consume(C),M):n(C)}function c(C){return C===45?(e.consume(C),u):C===91?(e.consume(C),o=0,h):Dn(C)?(e.consume(C),y):n(C)}function u(C){return C===45?(e.consume(C),f):n(C)}function d(C){return C===null?n(C):C===45?(e.consume(C),p):Ve(C)?(a=d,V(C)):(e.consume(C),d)}function p(C){return C===45?(e.consume(C),f):d(C)}function f(C){return C===62?F(C):C===45?p(C):d(C)}function h(C){const se="CDATA[";return C===se.charCodeAt(o++)?(e.consume(C),o===se.length?m:h):n(C)}function m(C){return C===null?n(C):C===93?(e.consume(C),v):Ve(C)?(a=m,V(C)):(e.consume(C),m)}function v(C){return C===93?(e.consume(C),g):m(C)}function g(C){return C===62?F(C):C===93?(e.consume(C),g):m(C)}function y(C){return C===null||C===62?F(C):Ve(C)?(a=y,V(C)):(e.consume(C),y)}function b(C){return C===null?n(C):C===63?(e.consume(C),x):Ve(C)?(a=b,V(C)):(e.consume(C),b)}function x(C){return C===62?F(C):b(C)}function _(C){return Dn(C)?(e.consume(C),S):n(C)}function S(C){return C===45||Sn(C)?(e.consume(C),S):R(C)}function R(C){return Ve(C)?(a=R,V(C)):ht(C)?(e.consume(C),R):F(C)}function M(C){return C===45||Sn(C)?(e.consume(C),M):C===47||C===62||At(C)?j(C):n(C)}function j(C){return C===47?(e.consume(C),F):C===58||C===95||Dn(C)?(e.consume(C),k):Ve(C)?(a=j,V(C)):ht(C)?(e.consume(C),j):F(C)}function k(C){return C===45||C===46||C===58||C===95||Sn(C)?(e.consume(C),k):N(C)}function N(C){return C===61?(e.consume(C),z):Ve(C)?(a=N,V(C)):ht(C)?(e.consume(C),N):j(C)}function z(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),i=C,U):Ve(C)?(a=z,V(C)):ht(C)?(e.consume(C),z):(e.consume(C),Z)}function U(C){return C===i?(e.consume(C),i=void 0,L):C===null?n(C):Ve(C)?(a=U,V(C)):(e.consume(C),U)}function Z(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===47||C===62||At(C)?j(C):(e.consume(C),Z)}function L(C){return C===47||C===62||At(C)?j(C):n(C)}function F(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):n(C)}function V(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),W}function W(C){return ht(C)?bt(e,pe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):pe(C)}function pe(C){return e.enter("htmlTextData"),a(C)}}const ah={name:"labelEnd",tokenize:EN,resolveTo:SN,resolveAll:xN},bN={tokenize:CN},wN={tokenize:TN},_N={tokenize:kN};function xN(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 SN(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)},u={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=sr(s,e.slice(o+1,o+r+3)),s=sr(s,[["enter",u,t]]),s=sr(s,Pc(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),s=sr(s,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),s=sr(s,e.slice(a+1)),s=sr(s,[["exit",l,t]]),Qn(e,o,e.length,s),e}function EN(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(p){return o?o._inactive?d(p):(a=r.parser.defined.includes(gr(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),l):n(p)}function l(p){return p===40?e.attempt(bN,u,a?u:d)(p):p===91?e.attempt(wN,u,a?c:d)(p):a?u(p):d(p)}function c(p){return e.attempt(_N,u,d)(p)}function u(p){return t(p)}function d(p){return o._balanced=!0,n(p)}}function CN(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return At(d)?Ds(e,o)(d):o(d)}function o(d){return d===41?u(d):a0(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return At(d)?Ds(e,l)(d):u(d)}function s(d){return n(d)}function l(d){return d===34||d===39||d===40?l0(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return At(d)?Ds(e,u)(d):u(d)}function u(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function TN(e,t,n){const r=this;return i;function i(s){return s0.call(r,e,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(gr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function kN(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 ON={name:"labelStartImage",tokenize:AN,resolveAll:ah.resolveAll};function AN(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 $N={name:"labelStartLink",tokenize:PN,resolveAll:ah.resolveAll};function PN(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 sh={name:"lineEnding",tokenize:IN};function IN(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),bt(e,t,"linePrefix")}}const Ic={name:"thematicBreak",tokenize:RN};function RN(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||Ve(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),ht(c)?bt(e,s,"whitespace")(c):s(c))}}const zn={name:"list",tokenize:DN,continuation:{tokenize:jN},exit:FN},MN={tokenize:UN,partial:!0},NN={tokenize:LN,partial:!0};function DN(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(f){const h=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:rh(f)){if(r.containerState.type||(r.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(Ic,n,c)(f):c(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(f)}return n(f)}function l(f){return rh(f)&&++a<10?(e.consume(f),l):(!r.interrupt||a<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),c(f)):n(f)}function c(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(Ns,r.interrupt?n:u,e.attempt(MN,p,d))}function u(f){return r.containerState.initialBlankLine=!0,o++,p(f)}function d(f){return ht(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),p):n(f)}function p(f){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function jN(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ns,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,bt(e,t,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!ht(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(NN,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,bt(e,e.attempt(zn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function LN(e,t,n){const r=this;return bt(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 FN(e){e.exit(this.containerState.type)}function UN(e,t,n){const r=this;return bt(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function i(o){const a=r.events[r.events.length-1];return!ht(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const u0={name:"setextUnderline",tokenize:zN,resolveTo:BN};function BN(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 zN(e,t,n){const r=this;let i;return o;function o(c){let u=r.events.length,d;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){d=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,a(c)):n(c)}function a(c){return e.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===i?(e.consume(c),s):(e.exit("setextHeadingLineSequence"),ht(c)?bt(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||Ve(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const ZN={tokenize:qN};function qN(e){const t=this,n=e.attempt(Ns,r,e.attempt(this.parser.constructs.flowInitial,i,bt(e,e.attempt(this.parser.constructs.flow,i,e.attempt(GM,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 HN={resolveAll:f0()},WN=d0("string"),VN=d0("text");function d0(e){return{tokenize:t,resolveAll:f0(e==="text"?KN:void 0)};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,a,s);return a;function a(u){return c(u)?o(u):s(u)}function s(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),o(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const d=i[u];let p=-1;if(d)for(;++p<d.length;){const f=d[p];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function f0(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 KN(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 GN(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:y,enter:b,exit:x,attempt:R(_),check:R(S),interrupt:R(S,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:f,sliceSerialize:p,now:h,defineSkip:m,write:d};let u=t.tokenize.call(c,l);return t.resolveAll&&o.push(t),c;function d(N){return a=sr(a,N),v(),a[a.length-1]!==null?[]:(M(t,0),c.events=Pc(o,c.events,c),c.events)}function p(N,z){return JN(f(N),z)}function f(N){return YN(a,N)}function h(){const{line:N,column:z,offset:U,_index:Z,_bufferIndex:L}=r;return{line:N,column:z,offset:U,_index:Z,_bufferIndex:L}}function m(N){i[N.line]=N.column,k()}function v(){let N;for(;r._index<a.length;){const z=a[r._index];if(typeof z=="string")for(N=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===N&&r._bufferIndex<z.length;)g(z.charCodeAt(r._bufferIndex));else g(z)}}function g(N){u=u(N)}function y(N){Ve(N)?(r.line++,r.column=1,r.offset+=N===-3?2:1,k()):N!==-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=N}function b(N,z){const U=z||{};return U.type=N,U.start=h(),c.events.push(["enter",U,c]),s.push(U),U}function x(N){const z=s.pop();return z.end=h(),c.events.push(["exit",z,c]),z}function _(N,z){M(N,z.from)}function S(N,z){z.restore()}function R(N,z){return U;function U(Z,L,F){let V,W,pe,C;return Array.isArray(Z)?we(Z):"tokenize"in Z?we([Z]):se(Z);function se(Me){return Ze;function Ze(nt){const We=nt!==null&&Me[nt],_e=nt!==null&&Me.null,ye=[...Array.isArray(We)?We:We?[We]:[],...Array.isArray(_e)?_e:_e?[_e]:[]];return we(ye)(nt)}}function we(Me){return V=Me,W=0,Me.length===0?F:O(Me[W])}function O(Me){return Ze;function Ze(nt){return C=j(),pe=Me,Me.partial||(c.currentConstruct=Me),Me.name&&c.parser.constructs.disable.null.includes(Me.name)?Be():Me.tokenize.call(z?Object.assign(Object.create(c),z):c,l,Oe,Be)(nt)}}function Oe(Me){return N(pe,C),L}function Be(Me){return C.restore(),++W<V.length?O(V[W]):F}}}function M(N,z){N.resolveAll&&!o.includes(N)&&o.push(N),N.resolve&&Qn(c.events,z,c.events.length-z,N.resolve(c.events.slice(z),c)),N.resolveTo&&(c.events=N.resolveTo(c.events,c))}function j(){const N=h(),z=c.previous,U=c.currentConstruct,Z=c.events.length,L=Array.from(s);return{restore:F,from:Z};function F(){r=N,c.previous=z,c.currentConstruct=U,c.events.length=Z,s=L,k()}}function k(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function YN(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 JN(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 <`+Te+">.")}return he}}function Ie(I,he){{if(!I._store||I._store.validated||I.key!=null)return;I._store.validated=!0;var Te=Ce(he);if(Fe[Te])return;Fe[Te]=!0;var it="";I&&I._owner&&I._owner!==Oi.current&&(it=" It was passed a child from "+B(I._owner.type)+"."),ei(I),y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Te,it),ei(null)}}function at(I,he){{if(typeof I!="object")return;if(Ke(I))for(var Te=0;Te<I.length;Te++){var it=I[Te];A(it)&&Ie(it,he)}else if(A(I))I._store&&(I._store.validated=!0);else if(I){var Tt=v(I);if(typeof Tt=="function"&&Tt!==I.entries)for(var It=Tt.call(I),xt;!(xt=It.next()).done;)A(xt.value)&&Ie(xt.value,he)}}}function pt(I){{var he=I.type;if(he==null||typeof he=="string")return;var Te;if(typeof he=="function")Te=he.propTypes;else if(typeof he=="object"&&(he.$$typeof===l||he.$$typeof===d))Te=he.propTypes;else return;if(Te){var it=B(he);Le(Te,I.props,"prop",it,I)}else if(he.PropTypes!==void 0&&!ta){ta=!0;var Tt=B(he);y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Tt||"Unknown")}typeof he.getDefaultProps=="function"&&!he.getDefaultProps.isReactClassApproved&&y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ft(I){{for(var he=Object.keys(I.props),Te=0;Te<he.length;Te++){var it=he[Te];if(it!=="children"&&it!=="key"){ei(I),y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",it),ei(null);break}}I.ref!==null&&(ei(I),y("Invalid attribute `ref` supplied to `React.Fragment`."),ei(null))}}function Kt(I,he,Te,it,Tt,It){{var xt=k(I);if(!xt){var yt="";(I===void 0||typeof I=="object"&&I!==null&&Object.keys(I).length===0)&&(yt+=" 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 Bn=Pe(Tt);Bn?yt+=Bn:yt+=Ee();var Gt;I===null?Gt="null":Ke(I)?Gt="array":I!==void 0&&I.$$typeof===t?(Gt="<"+(B(I.type)||"Unknown")+" />",yt=" Did you accidentally export a JSX literal instead of a component?"):Gt=typeof I,y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Gt,yt)}var nn=un(I,he,Te,Tt,It);if(nn==null)return nn;if(xt){var mr=he.children;if(mr!==void 0)if(it)if(Ke(mr)){for(var Os=0;Os<mr.length;Os++)at(mr[Os],I);Object.freeze&&Object.freeze(mr)}else y("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 at(mr,I)}return I===r?Ft(nn):pt(nn),nn}}function Yn(I,he,Te){return Kt(I,he,Te,!0)}function Or(I,he,Te){return Kt(I,he,Te,!1)}var rb=Or,Jye=Yn;Ps.Fragment=r,Ps.jsx=rb,Ps.jsxs=Jye}()),Ps}process.env.NODE_ENV==="production"?Fp.exports=tR():Fp.exports=nR();var U=Fp.exports;function lt(){return lt=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},lt.apply(this,arguments)}function kc(e,t=[]){let n=[];function r(o,a){const s=w.createContext(a),l=n.length;n=[...n,a];function c(d){const{scope:p,children:f,...h}=d,m=(p==null?void 0:p[e][l])||s,v=w.useMemo(()=>h,Object.values(h));return w.createElement(m.Provider,{value:v},f)}function u(d,p){const f=(p==null?void 0:p[e][l])||s,h=w.useContext(f);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${o}\``)}return c.displayName=o+"Provider",[c,u]}const i=()=>{const o=n.map(a=>w.createContext(a));return function(s){const l=(s==null?void 0:s[e])||o;return w.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,rR(i,...t)]}function rR(...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 d=l(o)[`__scope${c}`];return{...s,...d}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Nn(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const na=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{};function iR(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function pb(...e){return t=>e.forEach(n=>iR(n,t))}function Jn(...e){return w.useCallback(pb(...e),e)}const Up=w.forwardRef((e,t)=>{const{children:n,...r}=e,i=w.Children.toArray(n),o=i.find(aR);if(o){const a=o.props.children,s=i.map(l=>l===o?w.Children.count(a)>1?w.Children.only(null):w.isValidElement(a)?a.props.children:null:l);return w.createElement(Bp,lt({},r,{ref:t}),w.isValidElement(a)?w.cloneElement(a,void 0,s):null)}return w.createElement(Bp,lt({},r,{ref:t}),n)});Up.displayName="Slot";const Bp=w.forwardRef((e,t)=>{const{children:n,...r}=e;return w.isValidElement(n)?w.cloneElement(n,{...sR(r,n.props),ref:t?pb(t,n.ref):n.ref}):w.Children.count(n)>1?w.Children.only(null):null});Bp.displayName="SlotClone";const oR=({children:e})=>w.createElement(w.Fragment,null,e);function aR(e){return w.isValidElement(e)&&e.type===oR}function sR(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 gn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const n=w.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Up:t;return w.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),w.createElement(s,lt({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function lR(e,t){e&&$r.flushSync(()=>e.dispatchEvent(t))}const hb="Avatar",[cR,tve]=kc(hb),[uR,mb]=cR(hb),gb=w.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,o]=w.useState("idle");return w.createElement(uR,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:o},w.createElement(gn.span,lt({},r,{ref:t})))}),dR="AvatarImage",yb=w.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...o}=e,a=mb(dR,n),s=pR(r),l=Nn(c=>{i(c),a.onImageLoadingStatusChange(c)});return na(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?w.createElement(gn.img,lt({},o,{ref:t,src:r})):null}),fR="AvatarFallback",vb=w.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,o=mb(fR,n),[a,s]=w.useState(r===void 0);return w.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(l)}},[r]),a&&o.imageLoadingStatus!=="loaded"?w.createElement(gn.span,lt({},i,{ref:t})):null});function pR(e){const[t,n]=w.useState("idle");return w.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 zp=class{constructor(){T(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;(r=this.eventMap[t])==null||r.forEach(i=>{i(n)})}};const hR=new zp;function bb(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 Zp=w.forwardRef(({userId:e,src:t,container:n,image:r,fallback:i,...o},a)=>{const s=bb(e??"",15);return U.jsxs(gb,{ref:a,"data-color":s,...n,...o,children:[U.jsx(yb,{src:t,...r}),U.jsx(vb,{...i,children:typeof o.children=="string"?o.children[0]:o.children})]})});function nve(){}function rve(){}function mR(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const gR=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yR=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,vR={};function wb(e,t){return((t||vR).jsx?yR:gR).test(e)}const bR=/[ \t\n\f\r]/g;function wR(e){return typeof e=="object"?e.type==="text"?_b(e.value):!1:_b(e)}function _b(e){return e.replace(bR,"")===""}let Is=class{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}};Is.prototype.property={},Is.prototype.normal={},Is.prototype.space=null;function xb(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 Is(n,r,t)}function qp(e){return e.toLowerCase()}class ar{constructor(t,n){this.property=t,this.attribute=n}}ar.prototype.space=null,ar.prototype.boolean=!1,ar.prototype.booleanish=!1,ar.prototype.overloadedBoolean=!1,ar.prototype.number=!1,ar.prototype.commaSeparated=!1,ar.prototype.spaceSeparated=!1,ar.prototype.commaOrSpaceSeparated=!1,ar.prototype.mustUseProperty=!1,ar.prototype.defined=!1;let _R=0;const ut=fo(),Yt=fo(),Sb=fo(),ge=fo(),Dt=fo(),ra=fo(),Xn=fo();function fo(){return 2**++_R}const Hp=Object.freeze(Object.defineProperty({__proto__:null,boolean:ut,booleanish:Yt,commaOrSpaceSeparated:Xn,commaSeparated:ra,number:ge,overloadedBoolean:Sb,spaceSeparated:Dt},Symbol.toStringTag,{value:"Module"})),Wp=Object.keys(Hp);class Vp extends ar{constructor(t,n,r,i){let o=-1;if(super(t,n),Eb(this,"space",i),typeof r=="number")for(;++o<Wp.length;){const a=Wp[o];Eb(this,Wp[o],(r&Hp[a])===Hp[a])}}}Vp.prototype.defined=!0;function Eb(e,t,n){n&&(e[t]=n)}const xR={}.hasOwnProperty;function ia(e){const t={},n={};let r;for(r in e.properties)if(xR.call(e.properties,r)){const i=e.properties[r],o=new Vp(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[qp(r)]=r,n[qp(o.attribute)]=r}return new Is(t,n,e.space)}const Cb=ia({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}}),Tb=ia({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function kb(e,t){return t in e?e[t]:t}function Ob(e,t){return kb(e,t.toLowerCase())}const Ab=ia({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Ob,properties:{xmlns:null,xmlnsXLink:null}}),$b=ia({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Yt,ariaAutoComplete:null,ariaBusy:Yt,ariaChecked:Yt,ariaColCount:ge,ariaColIndex:ge,ariaColSpan:ge,ariaControls:Dt,ariaCurrent:null,ariaDescribedBy:Dt,ariaDetails:null,ariaDisabled:Yt,ariaDropEffect:Dt,ariaErrorMessage:null,ariaExpanded:Yt,ariaFlowTo:Dt,ariaGrabbed:Yt,ariaHasPopup:null,ariaHidden:Yt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Dt,ariaLevel:ge,ariaLive:null,ariaModal:Yt,ariaMultiLine:Yt,ariaMultiSelectable:Yt,ariaOrientation:null,ariaOwns:Dt,ariaPlaceholder:null,ariaPosInSet:ge,ariaPressed:Yt,ariaReadOnly:Yt,ariaRelevant:null,ariaRequired:Yt,ariaRoleDescription:Dt,ariaRowCount:ge,ariaRowIndex:ge,ariaRowSpan:ge,ariaSelected:Yt,ariaSetSize:ge,ariaSort:null,ariaValueMax:ge,ariaValueMin:ge,ariaValueNow:ge,ariaValueText:null,role:null}}),SR=ia({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Ob,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ra,acceptCharset:Dt,accessKey:Dt,action:null,allow:null,allowFullScreen:ut,allowPaymentRequest:ut,allowUserMedia:ut,alt:null,as:null,async:ut,autoCapitalize:null,autoComplete:Dt,autoFocus:ut,autoPlay:ut,capture:ut,charSet:null,checked:ut,cite:null,className:Dt,cols:ge,colSpan:null,content:null,contentEditable:Yt,controls:ut,controlsList:Dt,coords:ge|ra,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ut,defer:ut,dir:null,dirName:null,disabled:ut,download:Sb,draggable:Yt,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ut,formTarget:null,headers:Dt,height:ge,hidden:ut,high:ge,href:null,hrefLang:null,htmlFor:Dt,httpEquiv:Dt,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:ut,itemId:null,itemProp:Dt,itemRef:Dt,itemScope:ut,itemType:Dt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ut,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,multiple:ut,muted:ut,name:null,nonce:null,noModule:ut,noValidate:ut,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:ut,optimum:ge,pattern:null,ping:Dt,placeholder:null,playsInline:ut,poster:null,preload:null,readOnly:ut,referrerPolicy:null,rel:Dt,required:ut,reversed:ut,rows:ge,rowSpan:ge,sandbox:Dt,scope:null,scoped:ut,seamless:ut,selected:ut,shape:null,size:ge,sizes:null,slot:null,span:ge,spellCheck:Yt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ge,step:null,style:null,tabIndex:ge,target:null,title:null,translate:null,type:null,typeMustMatch:ut,useMap:null,value:Yt,width:ge,wrap:null,align:null,aLink:null,archive:Dt,axis:null,background:null,bgColor:null,border:ge,borderColor:null,bottomMargin:ge,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ut,declare:ut,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:ut,noHref:ut,noShade:ut,noWrap:ut,object:null,profile:null,prompt:null,rev:null,rightMargin:ge,rules:null,scheme:null,scrolling:Yt,standby:null,summary:null,text:null,topMargin:ge,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ge,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ut,disableRemotePlayback:ut,prefix:null,property:null,results:ge,security:null,unselectable:null}}),ER=ia({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:kb,properties:{about:Xn,accentHeight:ge,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ge,amplitude:ge,arabicForm:null,ascent:ge,attributeName:null,attributeType:null,azimuth:ge,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ge,by:null,calcMode:null,capHeight:ge,className:Dt,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:ge,diffuseConstant:ge,direction:null,display:null,dur:null,divisor:ge,dominantBaseline:null,download:ut,dx:null,dy:null,edgeMode:null,editable:null,elevation:ge,enableBackground:null,end:null,event:null,exponent:ge,externalResourcesRequired:null,fill:null,fillOpacity:ge,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:ra,g2:ra,glyphName:ra,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ge,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ge,horizOriginX:ge,horizOriginY:ge,id:null,ideographic:ge,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ge,k:ge,k1:ge,k2:ge,k3:ge,k4:ge,kernelMatrix:Xn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ge,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:ge,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:ge,overlineThickness:ge,paintOrder:null,panose1:null,path:null,pathLength:ge,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Dt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ge,pointsAtY:ge,pointsAtZ:ge,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Xn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Xn,rev:Xn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Xn,requiredFeatures:Xn,requiredFonts:Xn,requiredFormats:Xn,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:ge,specularExponent:ge,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ge,strikethroughThickness:ge,string:null,stroke:null,strokeDashArray:Xn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ge,strokeOpacity:ge,strokeWidth:null,style:null,surfaceScale:ge,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Xn,tabIndex:ge,tableValues:null,target:null,targetX:ge,targetY:ge,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Xn,to:null,transform:null,u1:null,u2:null,underlinePosition:ge,underlineThickness:ge,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ge,values:null,vAlphabetic:ge,vMathematical:ge,vectorEffect:null,vHanging:ge,vIdeographic:ge,version:null,vertAdvY:ge,vertOriginX:ge,vertOriginY:ge,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ge,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),CR=/^data[-\w.:]+$/i,Pb=/-[a-z]/g,TR=/[A-Z]/g;function kR(e,t){const n=qp(t);let r=t,i=ar;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&CR.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Pb,AR);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Pb.test(o)){let a=o.replace(TR,OR);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=Vp}return new i(r,t)}function OR(e){return"-"+e.toLowerCase()}function AR(e){return e.charAt(1).toUpperCase()}const $R={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"},PR=xb([Tb,Cb,Ab,$b,SR],"html"),Kp=xb([Tb,Cb,Ab,$b,ER],"svg");function IR(e){return e.join(" ").trim()}var Ib={},Rb=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,RR=/\n/g,MR=/^\s*/,NR=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,DR=/^:\s*/,jR=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,LR=/^[;\s]*/,FR=/^\s+|\s+$/g,UR=`
28
+ `,Mb="/",Nb="*",po="",BR="comment",zR="declaration",ZR=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(h){var m=h.match(RR);m&&(n+=m.length);var v=h.lastIndexOf(UR);r=~v?h.length-v:r+h.length}function o(){var h={line:n,column:r};return function(m){return m.position=new a(h),c(),m}}function a(h){this.start=h,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function s(h){var m=new Error(t.source+":"+n+":"+r+": "+h);if(m.reason=h,m.filename=t.source,m.line=n,m.column=r,m.source=e,!t.silent)throw m}function l(h){var m=h.exec(e);if(m){var v=m[0];return i(v),e=e.slice(v.length),m}}function c(){l(MR)}function u(h){var m;for(h=h||[];m=d();)m!==!1&&h.push(m);return h}function d(){var h=o();if(!(Mb!=e.charAt(0)||Nb!=e.charAt(1))){for(var m=2;po!=e.charAt(m)&&(Nb!=e.charAt(m)||Mb!=e.charAt(m+1));)++m;if(m+=2,po===e.charAt(m-1))return s("End of comment missing");var v=e.slice(2,m-2);return r+=2,i(v),e=e.slice(m),r+=2,h({type:BR,comment:v})}}function p(){var h=o(),m=l(NR);if(m){if(d(),!l(DR))return s("property missing ':'");var v=l(jR),g=h({type:zR,property:Db(m[0].replace(Rb,po)),value:v?Db(v[0].replace(Rb,po)):po});return l(LR),g}}function f(){var h=[];u(h);for(var m;m=p();)m!==!1&&(h.push(m),u(h));return h}return c(),f()};function Db(e){return e?e.replace(FR,po):po}var qR=K&&K.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ib,"__esModule",{value:!0});var HR=qR(ZR);function WR(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,HR.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 jb=Ib.default=WR;const VR=jb.default||jb,Lb=Fb("end"),Gp=Fb("start");function Fb(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 KR(e){const t=Gp(e),n=Lb(e);if(t&&n)return{start:t,end:n}}function Rs(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ub(e.position):"start"in e||"end"in e?Ub(e):"line"in e||"column"in e?Yp(e):""}function Yp(e){return Bb(e&&e.line)+":"+Bb(e&&e.column)}function Ub(e){return Yp(e&&e.start)+"-"+Yp(e&&e.end)}function Bb(e){return e&&typeof e=="number"?e:1}class xn 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=Rs(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}}xn.prototype.file="",xn.prototype.name="",xn.prototype.reason="",xn.prototype.message="",xn.prototype.stack="",xn.prototype.column=void 0,xn.prototype.line=void 0,xn.prototype.ancestors=void 0,xn.prototype.cause=void 0,xn.prototype.fatal=void 0,xn.prototype.place=void 0,xn.prototype.ruleId=void 0,xn.prototype.source=void 0;const Jp={}.hasOwnProperty,GR=new Map,YR=/[A-Z]/g,JR=/-([a-z])/g,XR=new Set(["table","tbody","thead","tfoot","tr"]),QR=new Set(["td","th"]),zb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function eM(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=lM(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=sM(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"?Kp:PR,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Zb(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Zb(e,t,n){if(t.type==="element")return tM(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return nM(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return iM(e,t,n);if(t.type==="mdxjsEsm")return rM(e,t);if(t.type==="root")return oM(e,t,n);if(t.type==="text")return aM(e,t)}function tM(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Kp,e.schema=i),e.ancestors.push(t);const o=Hb(e,t.tagName,!1),a=cM(e,t);let s=Qp(e,t);return XR.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!wR(l):!0})),qb(e,a,o,t),Xp(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function nM(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)}Ms(e,t.position)}function rM(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ms(e,t.position)}function iM(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Kp,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Hb(e,t.name,!0),a=uM(e,t),s=Qp(e,t);return qb(e,a,o,t),Xp(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function oM(e,t,n){const r={};return Xp(r,Qp(e,t)),e.create(t,e.Fragment,r,n)}function aM(e,t){return t.value}function qb(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Xp(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function sM(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 lM(e,t){return n;function n(r,i,o,a){const s=Array.isArray(o.children),l=Gp(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 cM(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Jp.call(t.properties,i)){const o=dM(e,i,t.properties[i]);if(o){const[a,s]=o;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&QR.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 uM(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 Ms(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 Ms(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function Qp(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:GR;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=Zb(e,o,a);s!==void 0&&n.push(s)}return n}function dM(e,t,n){const r=kR(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?mR(n):IR(n)),r.property==="style"){let i=typeof n=="object"?n:fM(e,String(n));return e.stylePropertyNameCase==="css"&&(i=pM(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?$R[r.property]||r.property:r.attribute,n]}}function fM(e,t){const n={};try{VR(t,r)}catch(i){if(!e.ignoreInvalidStyle){const o=i,a=new xn("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=zb+"#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(JR,mM)),n[a]=o}}function Hb(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=wb(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=wb(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Jp.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ms(e)}function Ms(e,t){const n=new xn("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=zb+"#cannot-handle-mdx-estrees-without-createevaluater",n}function pM(e){const t={};let n;for(n in e)Jp.call(e,n)&&(t[hM(n)]=e[n]);return t}function hM(e){let t=e.replace(YR,gM);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function mM(e,t){return t.toUpperCase()}function gM(e){return"-"+e.toLowerCase()}const eh={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"]},yM={};function th(e,t){const n=t||yM,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Wb(e,r,i)}function Wb(e,t,n){if(vM(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 Vb(e.children,t,n)}return Array.isArray(e)?Vb(e,t,n):""}function Vb(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Wb(e[i],t,n);return r.join("")}function vM(e){return!!(e&&typeof e=="object")}const Kb=document.createElement("i");function nh(e){const t="&"+e+";";Kb.innerHTML=t;const n=Kb.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Qn(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 sr(e,t){return e.length>0?(Qn(e,e.length,0,t),e):t}const Gb={}.hasOwnProperty;function Yb(e){const t={};let n=-1;for(;++n<e.length;)bM(t,e[n]);return t}function bM(e,t){let n;for(n in t){const i=(Gb.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let a;if(o)for(a in o){Gb.call(i,a)||(i[a]=[]);const s=o[a];wM(i[a],Array.isArray(s)?s:s?[s]:[])}}}function wM(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Qn(e,0,0,r)}function Jb(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 gr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Dn=$i(/[A-Za-z]/),Sn=$i(/[\dA-Za-z]/),_M=$i(/[#-'*+\--9=?A-Z^-~]/);function Oc(e){return e!==null&&(e<32||e===127)}const rh=$i(/\d/),xM=$i(/[\dA-Fa-f]/),SM=$i(/[!-/:-@[-`{-~]/);function Ve(e){return e!==null&&e<-2}function At(e){return e!==null&&(e<0||e===32)}function ht(e){return e===-2||e===-1||e===32}const Ac=$i(/\p{P}|\p{S}/u),ho=$i(/\s/);function $i(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function oa(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(o===37&&Sn(e.charCodeAt(n+1))&&Sn(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 bt(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(l){return ht(l)?(e.enter(n),s(l)):t(l)}function s(l){return ht(l)&&o++<i?(e.consume(l),s):(e.exit(n),t(l))}}const EM={tokenize:CM};function CM(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"),bt(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 Ve(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),a)}}const TM={tokenize:kM},Xb={tokenize:OM};function kM(e){const t=this,n=[];let r=0,i,o,a;return s;function s(b){if(r<n.length){const x=n[r];return t.containerState=x[1],e.attempt(x[0].continuation,l,c)(b)}return c(b)}function l(b){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&y();const x=t.events.length;let _=x,S;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){S=t.events[_][1].end;break}g(r);let R=x;for(;R<t.events.length;)t.events[R][1].end=Object.assign({},S),R++;return Qn(t.events,_+1,0,t.events.slice(x)),t.events.length=R,c(b)}return s(b)}function c(b){if(r===n.length){if(!i)return p(b);if(i.currentConstruct&&i.currentConstruct.concrete)return h(b);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Xb,u,d)(b)}function u(b){return i&&y(),g(r),p(b)}function d(b){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,h(b)}function p(b){return t.containerState={},e.attempt(Xb,f,h)(b)}function f(b){return r++,n.push([t.currentConstruct,t.containerState]),p(b)}function h(b){if(b===null){i&&y(),g(0),e.consume(b);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:i}),m(b)}function m(b){if(b===null){v(e.exit("chunkFlow"),!0),g(0),e.consume(b);return}return Ve(b)?(e.consume(b),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(b),m)}function v(b,x){const _=t.sliceStream(b);if(x&&_.push(null),b.previous=o,o&&(o.next=b),o=b,i.defineSkip(b.start),i.write(_),t.parser.lazy[b.start.line]){let S=i.events.length;for(;S--;)if(i.events[S][1].start.offset<a&&(!i.events[S][1].end||i.events[S][1].end.offset>a))return;const R=t.events.length;let M=R,j,k;for(;M--;)if(t.events[M][0]==="exit"&&t.events[M][1].type==="chunkFlow"){if(j){k=t.events[M][1].end;break}j=!0}for(g(r),S=R;S<t.events.length;)t.events[S][1].end=Object.assign({},k),S++;Qn(t.events,M+1,0,t.events.slice(R)),t.events.length=S}}function g(b){let x=n.length;for(;x-- >b;){const _=n[x];t.containerState=_[1],_[0].exit.call(t,e)}n.length=b}function y(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function OM(e,t,n){return bt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function $c(e){if(e===null||At(e)||ho(e))return 1;if(Ac(e))return 2}function Pc(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 ih={name:"attention",tokenize:$M,resolveAll:AM};function AM(e,t){let n=-1,r,i,o,a,s,l,c,u;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 d=Object.assign({},e[r][1].end),p=Object.assign({},e[n][1].start);Qb(d,-l),Qb(p,l),a={type:l>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},e[r][1].end)},s={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:p},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=sr(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=sr(c,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),c=sr(c,Pc(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=sr(c,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=sr(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,Qn(e,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function $M(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=$c(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"),u=$c(l),d=!u||u===2&&i||n.includes(l),p=!i||i===2&&u||n.includes(r);return c._open=!!(o===42?d:d&&(i||!p)),c._close=!!(o===42?p:p&&(u||!d)),t(l)}}function Qb(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const PM={name:"autolink",tokenize:IM};function IM(e,t,n){let r=0;return i;function i(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(f){return Dn(f)?(e.consume(f),a):c(f)}function a(f){return f===43||f===45||f===46||Sn(f)?(r=1,s(f)):c(f)}function s(f){return f===58?(e.consume(f),r=0,l):(f===43||f===45||f===46||Sn(f))&&r++<32?(e.consume(f),s):(r=0,c(f))}function l(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||Oc(f)?n(f):(e.consume(f),l)}function c(f){return f===64?(e.consume(f),u):_M(f)?(e.consume(f),c):n(f)}function u(f){return Sn(f)?d(f):n(f)}function d(f){return f===46?(e.consume(f),r=0,u):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):p(f)}function p(f){if((f===45||Sn(f))&&r++<63){const h=f===45?p:d;return e.consume(f),h}return n(f)}}const Ns={tokenize:RM,partial:!0};function RM(e,t,n){return r;function r(o){return ht(o)?bt(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||Ve(o)?t(o):n(o)}}const e0={name:"blockQuote",tokenize:MM,continuation:{tokenize:NM},exit:DM};function MM(e,t,n){const r=this;return i;function i(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return n(a)}function o(a){return ht(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function NM(e,t,n){const r=this;return i;function i(a){return ht(a)?bt(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(e0,t,n)(a)}}function DM(e){e.exit("blockQuote")}const t0={name:"characterEscape",tokenize:jM};function jM(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 SM(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const n0={name:"characterReference",tokenize:LM};function LM(e,t,n){const r=this;let i=0,o,a;return s;function s(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),o=31,a=Sn,u(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=xM,u):(e.enter("characterReferenceValue"),o=7,a=rh,u(d))}function u(d){if(d===59&&i){const p=e.exit("characterReferenceValue");return a===Sn&&!nh(r.sliceSerialize(p))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(d)&&i++<o?(e.consume(d),u):n(d)}}const r0={tokenize:UM,partial:!0},i0={name:"codeFenced",tokenize:FM,concrete:!0};function FM(e,t,n){const r=this,i={tokenize:_,partial:!0};let o=0,a=0,s;return l;function l(S){return c(S)}function c(S){const R=r.events[r.events.length-1];return o=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,s=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(S)}function u(S){return S===s?(a++,e.consume(S),u):a<3?n(S):(e.exit("codeFencedFenceSequence"),ht(S)?bt(e,d,"whitespace")(S):d(S))}function d(S){return S===null||Ve(S)?(e.exit("codeFencedFence"),r.interrupt?t(S):e.check(r0,m,x)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(S))}function p(S){return S===null||Ve(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(S)):ht(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),bt(e,f,"whitespace")(S)):S===96&&S===s?n(S):(e.consume(S),p)}function f(S){return S===null||Ve(S)?d(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(S))}function h(S){return S===null||Ve(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(S)):S===96&&S===s?n(S):(e.consume(S),h)}function m(S){return e.attempt(i,x,v)(S)}function v(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),g}function g(S){return o>0&&ht(S)?bt(e,y,"linePrefix",o+1)(S):y(S)}function y(S){return S===null||Ve(S)?e.check(r0,m,x)(S):(e.enter("codeFlowValue"),b(S))}function b(S){return S===null||Ve(S)?(e.exit("codeFlowValue"),y(S)):(e.consume(S),b)}function x(S){return e.exit("codeFenced"),t(S)}function _(S,R,M){let j=0;return k;function k(L){return S.enter("lineEnding"),S.consume(L),S.exit("lineEnding"),N}function N(L){return S.enter("codeFencedFence"),ht(L)?bt(S,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):z(L)}function z(L){return L===s?(S.enter("codeFencedFenceSequence"),B(L)):M(L)}function B(L){return L===s?(j++,S.consume(L),B):j>=a?(S.exit("codeFencedFenceSequence"),ht(L)?bt(S,Z,"whitespace")(L):Z(L)):M(L)}function Z(L){return L===null||Ve(L)?(S.exit("codeFencedFence"),R(L)):M(L)}}}function UM(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 oh={name:"codeIndented",tokenize:zM},BM={tokenize:ZM,partial:!0};function zM(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),bt(e,o,"linePrefix",4+1)(c)}function o(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?l(c):Ve(c)?e.attempt(BM,a,l)(c):(e.enter("codeFlowValue"),s(c))}function s(c){return c===null||Ve(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),s)}function l(c){return e.exit("codeIndented"),t(c)}}function ZM(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):Ve(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):bt(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):Ve(a)?i(a):n(a)}}const qM={name:"codeText",tokenize:VM,resolve:HM,previous:WM};function HM(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 WM(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function VM(e,t,n){let r=0,i,o;return a;function a(d){return e.enter("codeText"),e.enter("codeTextSequence"),s(d)}function s(d){return d===96?(e.consume(d),r++,s):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(o=e.enter("codeTextSequence"),i=0,u(d)):Ve(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||Ve(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),c)}function u(d){return d===96?(e.consume(d),i++,u):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(o.type="codeTextData",c(d))}}function o0(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,KM(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),Qn(e,i,n-i+1,s))}}return!c}function KM(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 u,d,p=-1,f=n,h=0,m=0;const v=[m];for(;f;){for(;e[++i][1]!==f;);o.push(i),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),d&&a.defineSkip(f.start),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(m=p+1,v.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(a.events=[],f?(f._tokenizer=void 0,f.previous=void 0):v.pop(),p=v.length;p--;){const g=s.slice(v[p],v[p+1]),y=o.pop();l.unshift([y,y+g.length-1]),Qn(e,y,2,g)}for(p=-1;++p<l.length;)c[h+l[p][0]]=h+l[p][1],h+=l[p][1]-l[p][0]-1;return c}const GM={tokenize:XM,resolve:JM},YM={tokenize:QM,partial:!0};function JM(e){return o0(e),e}function XM(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):Ve(s)?e.check(YM,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 QM(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),bt(e,o,"linePrefix")}function o(a){if(a===null||Ve(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 a0(e,t,n,r,i,o,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return d;function d(g){return g===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(g),e.exit(o),p):g===null||g===32||g===41||Oc(g)?n(g):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),m(g))}function p(g){return g===62?(e.enter(o),e.consume(g),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),f(g))}function f(g){return g===62?(e.exit("chunkString"),e.exit(s),p(g)):g===null||g===60||Ve(g)?n(g):(e.consume(g),g===92?h:f)}function h(g){return g===60||g===62||g===92?(e.consume(g),f):f(g)}function m(g){return!u&&(g===null||g===41||At(g))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(g)):u<c&&g===40?(e.consume(g),u++,m):g===41?(e.consume(g),u--,m):g===null||g===32||g===40||Oc(g)?n(g):(e.consume(g),g===92?v:m)}function v(g){return g===40||g===41||g===92?(e.consume(g),m):m(g)}}function s0(e,t,n,r,i,o){const a=this;let s=0,l;return c;function c(f){return e.enter(r),e.enter(i),e.consume(f),e.exit(i),e.enter(o),u}function u(f){return s>999||f===null||f===91||f===93&&!l||f===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(f):f===93?(e.exit(o),e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):Ve(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||Ve(f)||s++>999?(e.exit("chunkString"),u(f)):(e.consume(f),l||(l=!ht(f)),f===92?p:d)}function p(f){return f===91||f===92||f===93?(e.consume(f),s++,d):d(f)}}function l0(e,t,n,r,i,o){let a;return s;function s(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),a=p===40?41:p,l):n(p)}function l(p){return p===a?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),c(p))}function c(p){return p===a?(e.exit(o),l(a)):p===null?n(p):Ve(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),bt(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(p))}function u(p){return p===a||p===null||Ve(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?d:u)}function d(p){return p===a||p===92?(e.consume(p),u):u(p)}}function Ds(e,t){let n;return r;function r(i){return Ve(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ht(i)?bt(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const eN={name:"definition",tokenize:nN},tN={tokenize:rN,partial:!0};function nN(e,t,n){const r=this;let i;return o;function o(f){return e.enter("definition"),a(f)}function a(f){return s0.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function s(f){return i=gr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),l):n(f)}function l(f){return At(f)?Ds(e,c)(f):c(f)}function c(f){return a0(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function u(f){return e.attempt(tN,d,d)(f)}function d(f){return ht(f)?bt(e,p,"whitespace")(f):p(f)}function p(f){return f===null||Ve(f)?(e.exit("definition"),r.parser.defined.push(i),t(f)):n(f)}}function rN(e,t,n){return r;function r(s){return At(s)?Ds(e,i)(s):n(s)}function i(s){return l0(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return ht(s)?bt(e,a,"whitespace")(s):a(s)}function a(s){return s===null||Ve(s)?t(s):n(s)}}const iN={name:"hardBreakEscape",tokenize:oN};function oN(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return Ve(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const aN={name:"headingAtx",tokenize:lN,resolve:sN};function sN(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"},Qn(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function lN(e,t,n){let r=0;return i;function i(u){return e.enter("atxHeading"),o(u)}function o(u){return e.enter("atxHeadingSequence"),a(u)}function a(u){return u===35&&r++<6?(e.consume(u),a):u===null||At(u)?(e.exit("atxHeadingSequence"),s(u)):n(u)}function s(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||Ve(u)?(e.exit("atxHeading"),t(u)):ht(u)?bt(e,s,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),s(u))}function c(u){return u===null||u===35||At(u)?(e.exit("atxHeadingText"),s(u)):(e.consume(u),c)}}const cN=["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"],c0=["pre","script","style","textarea"],uN={name:"htmlFlow",tokenize:hN,resolveTo:pN,concrete:!0},dN={tokenize:gN,partial:!0},fN={tokenize:mN,partial:!0};function pN(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 hN(e,t,n){const r=this;let i,o,a,s,l;return c;function c(O){return u(O)}function u(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),d}function d(O){return O===33?(e.consume(O),p):O===47?(e.consume(O),o=!0,m):O===63?(e.consume(O),i=3,r.interrupt?t:C):Dn(O)?(e.consume(O),a=String.fromCharCode(O),v):n(O)}function p(O){return O===45?(e.consume(O),i=2,f):O===91?(e.consume(O),i=5,s=0,h):Dn(O)?(e.consume(O),i=4,r.interrupt?t:C):n(O)}function f(O){return O===45?(e.consume(O),r.interrupt?t:C):n(O)}function h(O){const Oe="CDATA[";return O===Oe.charCodeAt(s++)?(e.consume(O),s===Oe.length?r.interrupt?t:z:h):n(O)}function m(O){return Dn(O)?(e.consume(O),a=String.fromCharCode(O),v):n(O)}function v(O){if(O===null||O===47||O===62||At(O)){const Oe=O===47,Be=a.toLowerCase();return!Oe&&!o&&c0.includes(Be)?(i=1,r.interrupt?t(O):z(O)):cN.includes(a.toLowerCase())?(i=6,Oe?(e.consume(O),g):r.interrupt?t(O):z(O)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):o?y(O):b(O))}return O===45||Sn(O)?(e.consume(O),a+=String.fromCharCode(O),v):n(O)}function g(O){return O===62?(e.consume(O),r.interrupt?t:z):n(O)}function y(O){return ht(O)?(e.consume(O),y):k(O)}function b(O){return O===47?(e.consume(O),k):O===58||O===95||Dn(O)?(e.consume(O),x):ht(O)?(e.consume(O),b):k(O)}function x(O){return O===45||O===46||O===58||O===95||Sn(O)?(e.consume(O),x):_(O)}function _(O){return O===61?(e.consume(O),S):ht(O)?(e.consume(O),_):b(O)}function S(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),l=O,R):ht(O)?(e.consume(O),S):M(O)}function R(O){return O===l?(e.consume(O),l=null,j):O===null||Ve(O)?n(O):(e.consume(O),R)}function M(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||At(O)?_(O):(e.consume(O),M)}function j(O){return O===47||O===62||ht(O)?b(O):n(O)}function k(O){return O===62?(e.consume(O),N):n(O)}function N(O){return O===null||Ve(O)?z(O):ht(O)?(e.consume(O),N):n(O)}function z(O){return O===45&&i===2?(e.consume(O),F):O===60&&i===1?(e.consume(O),V):O===62&&i===4?(e.consume(O),se):O===63&&i===3?(e.consume(O),C):O===93&&i===5?(e.consume(O),pe):Ve(O)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(dN,we,B)(O)):O===null||Ve(O)?(e.exit("htmlFlowData"),B(O)):(e.consume(O),z)}function B(O){return e.check(fN,Z,we)(O)}function Z(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),L}function L(O){return O===null||Ve(O)?B(O):(e.enter("htmlFlowData"),z(O))}function F(O){return O===45?(e.consume(O),C):z(O)}function V(O){return O===47?(e.consume(O),a="",W):z(O)}function W(O){if(O===62){const Oe=a.toLowerCase();return c0.includes(Oe)?(e.consume(O),se):z(O)}return Dn(O)&&a.length<8?(e.consume(O),a+=String.fromCharCode(O),W):z(O)}function pe(O){return O===93?(e.consume(O),C):z(O)}function C(O){return O===62?(e.consume(O),se):O===45&&i===2?(e.consume(O),C):z(O)}function se(O){return O===null||Ve(O)?(e.exit("htmlFlowData"),we(O)):(e.consume(O),se)}function we(O){return e.exit("htmlFlow"),t(O)}}function mN(e,t,n){const r=this;return i;function i(a){return Ve(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 gN(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ns,t,n)}}const yN={name:"htmlText",tokenize:vN};function vN(e,t,n){const r=this;let i,o,a;return s;function s(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),l}function l(C){return C===33?(e.consume(C),c):C===47?(e.consume(C),_):C===63?(e.consume(C),b):Dn(C)?(e.consume(C),M):n(C)}function c(C){return C===45?(e.consume(C),u):C===91?(e.consume(C),o=0,h):Dn(C)?(e.consume(C),y):n(C)}function u(C){return C===45?(e.consume(C),f):n(C)}function d(C){return C===null?n(C):C===45?(e.consume(C),p):Ve(C)?(a=d,V(C)):(e.consume(C),d)}function p(C){return C===45?(e.consume(C),f):d(C)}function f(C){return C===62?F(C):C===45?p(C):d(C)}function h(C){const se="CDATA[";return C===se.charCodeAt(o++)?(e.consume(C),o===se.length?m:h):n(C)}function m(C){return C===null?n(C):C===93?(e.consume(C),v):Ve(C)?(a=m,V(C)):(e.consume(C),m)}function v(C){return C===93?(e.consume(C),g):m(C)}function g(C){return C===62?F(C):C===93?(e.consume(C),g):m(C)}function y(C){return C===null||C===62?F(C):Ve(C)?(a=y,V(C)):(e.consume(C),y)}function b(C){return C===null?n(C):C===63?(e.consume(C),x):Ve(C)?(a=b,V(C)):(e.consume(C),b)}function x(C){return C===62?F(C):b(C)}function _(C){return Dn(C)?(e.consume(C),S):n(C)}function S(C){return C===45||Sn(C)?(e.consume(C),S):R(C)}function R(C){return Ve(C)?(a=R,V(C)):ht(C)?(e.consume(C),R):F(C)}function M(C){return C===45||Sn(C)?(e.consume(C),M):C===47||C===62||At(C)?j(C):n(C)}function j(C){return C===47?(e.consume(C),F):C===58||C===95||Dn(C)?(e.consume(C),k):Ve(C)?(a=j,V(C)):ht(C)?(e.consume(C),j):F(C)}function k(C){return C===45||C===46||C===58||C===95||Sn(C)?(e.consume(C),k):N(C)}function N(C){return C===61?(e.consume(C),z):Ve(C)?(a=N,V(C)):ht(C)?(e.consume(C),N):j(C)}function z(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),i=C,B):Ve(C)?(a=z,V(C)):ht(C)?(e.consume(C),z):(e.consume(C),Z)}function B(C){return C===i?(e.consume(C),i=void 0,L):C===null?n(C):Ve(C)?(a=B,V(C)):(e.consume(C),B)}function Z(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===47||C===62||At(C)?j(C):(e.consume(C),Z)}function L(C){return C===47||C===62||At(C)?j(C):n(C)}function F(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):n(C)}function V(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),W}function W(C){return ht(C)?bt(e,pe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):pe(C)}function pe(C){return e.enter("htmlTextData"),a(C)}}const ah={name:"labelEnd",tokenize:EN,resolveTo:SN,resolveAll:xN},bN={tokenize:CN},wN={tokenize:TN},_N={tokenize:kN};function xN(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 SN(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)},u={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=sr(s,e.slice(o+1,o+r+3)),s=sr(s,[["enter",u,t]]),s=sr(s,Pc(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),s=sr(s,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),s=sr(s,e.slice(a+1)),s=sr(s,[["exit",l,t]]),Qn(e,o,e.length,s),e}function EN(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(p){return o?o._inactive?d(p):(a=r.parser.defined.includes(gr(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),l):n(p)}function l(p){return p===40?e.attempt(bN,u,a?u:d)(p):p===91?e.attempt(wN,u,a?c:d)(p):a?u(p):d(p)}function c(p){return e.attempt(_N,u,d)(p)}function u(p){return t(p)}function d(p){return o._balanced=!0,n(p)}}function CN(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return At(d)?Ds(e,o)(d):o(d)}function o(d){return d===41?u(d):a0(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return At(d)?Ds(e,l)(d):u(d)}function s(d){return n(d)}function l(d){return d===34||d===39||d===40?l0(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return At(d)?Ds(e,u)(d):u(d)}function u(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function TN(e,t,n){const r=this;return i;function i(s){return s0.call(r,e,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(gr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function kN(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 ON={name:"labelStartImage",tokenize:AN,resolveAll:ah.resolveAll};function AN(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 $N={name:"labelStartLink",tokenize:PN,resolveAll:ah.resolveAll};function PN(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 sh={name:"lineEnding",tokenize:IN};function IN(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),bt(e,t,"linePrefix")}}const Ic={name:"thematicBreak",tokenize:RN};function RN(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||Ve(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),ht(c)?bt(e,s,"whitespace")(c):s(c))}}const zn={name:"list",tokenize:DN,continuation:{tokenize:jN},exit:FN},MN={tokenize:UN,partial:!0},NN={tokenize:LN,partial:!0};function DN(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(f){const h=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:rh(f)){if(r.containerState.type||(r.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(Ic,n,c)(f):c(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(f)}return n(f)}function l(f){return rh(f)&&++a<10?(e.consume(f),l):(!r.interrupt||a<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),c(f)):n(f)}function c(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(Ns,r.interrupt?n:u,e.attempt(MN,p,d))}function u(f){return r.containerState.initialBlankLine=!0,o++,p(f)}function d(f){return ht(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),p):n(f)}function p(f){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function jN(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ns,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,bt(e,t,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!ht(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(NN,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,bt(e,e.attempt(zn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function LN(e,t,n){const r=this;return bt(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 FN(e){e.exit(this.containerState.type)}function UN(e,t,n){const r=this;return bt(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function i(o){const a=r.events[r.events.length-1];return!ht(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const u0={name:"setextUnderline",tokenize:zN,resolveTo:BN};function BN(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 zN(e,t,n){const r=this;let i;return o;function o(c){let u=r.events.length,d;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){d=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,a(c)):n(c)}function a(c){return e.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===i?(e.consume(c),s):(e.exit("setextHeadingLineSequence"),ht(c)?bt(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||Ve(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const ZN={tokenize:qN};function qN(e){const t=this,n=e.attempt(Ns,r,e.attempt(this.parser.constructs.flowInitial,i,bt(e,e.attempt(this.parser.constructs.flow,i,e.attempt(GM,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 HN={resolveAll:f0()},WN=d0("string"),VN=d0("text");function d0(e){return{tokenize:t,resolveAll:f0(e==="text"?KN:void 0)};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,a,s);return a;function a(u){return c(u)?o(u):s(u)}function s(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),o(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const d=i[u];let p=-1;if(d)for(;++p<d.length;){const f=d[p];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function f0(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 KN(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 GN(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:y,enter:b,exit:x,attempt:R(_),check:R(S),interrupt:R(S,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:f,sliceSerialize:p,now:h,defineSkip:m,write:d};let u=t.tokenize.call(c,l);return t.resolveAll&&o.push(t),c;function d(N){return a=sr(a,N),v(),a[a.length-1]!==null?[]:(M(t,0),c.events=Pc(o,c.events,c),c.events)}function p(N,z){return JN(f(N),z)}function f(N){return YN(a,N)}function h(){const{line:N,column:z,offset:B,_index:Z,_bufferIndex:L}=r;return{line:N,column:z,offset:B,_index:Z,_bufferIndex:L}}function m(N){i[N.line]=N.column,k()}function v(){let N;for(;r._index<a.length;){const z=a[r._index];if(typeof z=="string")for(N=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===N&&r._bufferIndex<z.length;)g(z.charCodeAt(r._bufferIndex));else g(z)}}function g(N){u=u(N)}function y(N){Ve(N)?(r.line++,r.column=1,r.offset+=N===-3?2:1,k()):N!==-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=N}function b(N,z){const B=z||{};return B.type=N,B.start=h(),c.events.push(["enter",B,c]),s.push(B),B}function x(N){const z=s.pop();return z.end=h(),c.events.push(["exit",z,c]),z}function _(N,z){M(N,z.from)}function S(N,z){z.restore()}function R(N,z){return B;function B(Z,L,F){let V,W,pe,C;return Array.isArray(Z)?we(Z):"tokenize"in Z?we([Z]):se(Z);function se(Me){return Ze;function Ze(nt){const We=nt!==null&&Me[nt],_e=nt!==null&&Me.null,ye=[...Array.isArray(We)?We:We?[We]:[],...Array.isArray(_e)?_e:_e?[_e]:[]];return we(ye)(nt)}}function we(Me){return V=Me,W=0,Me.length===0?F:O(Me[W])}function O(Me){return Ze;function Ze(nt){return C=j(),pe=Me,Me.partial||(c.currentConstruct=Me),Me.name&&c.parser.constructs.disable.null.includes(Me.name)?Be():Me.tokenize.call(z?Object.assign(Object.create(c),z):c,l,Oe,Be)(nt)}}function Oe(Me){return N(pe,C),L}function Be(Me){return C.restore(),++W<V.length?O(V[W]):F}}}function M(N,z){N.resolveAll&&!o.includes(N)&&o.push(N),N.resolve&&Qn(c.events,z,c.events.length-z,N.resolve(c.events.slice(z),c)),N.resolveTo&&(c.events=N.resolveTo(c.events,c))}function j(){const N=h(),z=c.previous,B=c.currentConstruct,Z=c.events.length,L=Array.from(s);return{restore:F,from:Z};function F(){r=N,c.previous=z,c.currentConstruct=B,c.events.length=Z,s=L,k()}}function k(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function YN(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 JN(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 XN=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:eN},disable:{null:[]},document:{42:zn,43:zn,45:zn,48:zn,49:zn,50:zn,51:zn,52:zn,53:zn,54:zn,55:zn,56:zn,57:zn,62:e0},flow:{35:aN,42:Ic,45:[u0,Ic],60:uN,61:u0,95:Ic,96:i0,126:i0},flowInitial:{[-2]:oh,[-1]:oh,32:oh},insideSpan:{null:[ih,HN]},string:{38:n0,92:t0},text:{[-5]:sh,[-4]:sh,[-3]:sh,33:ON,38:n0,42:ih,60:[PM,yN],91:$N,92:[iN,t0],93:ah,95:ih,96:qM}},Symbol.toStringTag,{value:"Module"}));function QN(e){const n=Yb([XN,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(EM),document:i(TM),flow:i(ZN),string:i(WN),text:i(VN)};return r;function i(o){return a;function a(s){return GN(r,o,s)}}}function eD(e){for(;!o0(e););return e}const p0=/[\0\t\n\r]/g;function tD(){let e=1,t="",n=!0,r;return i;function i(o,a,s){const l=[];let c,u,d,p,f;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),d=0,t="",n&&(o.charCodeAt(0)===65279&&d++,n=void 0);d<o.length;){if(p0.lastIndex=d,c=p0.exec(o),p=c&&c.index!==void 0?c.index:o.length,f=o.charCodeAt(p),!c){t=o.slice(d);break}if(f===10&&d===p&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<p&&(l.push(o.slice(d,p)),e+=p-d),f){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}d=p+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const nD=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function rD(e){return e.replace(nD,iD)}function iD(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Jb(n.slice(o?2:1),o?16:10)}return nh(n)||e}const h0={}.hasOwnProperty;function oD(e,t,n){return typeof t!="string"&&(n=t,t=void 0),aD(n)(eD(QN(n).document().write(tD()(e,t,!0))))}function aD(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(me),autolinkProtocol:j,autolinkEmail:j,atxHeading:o(Ue),blockQuote:o(We),characterEscape:j,characterReference:j,codeFenced:o(_e),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(_e,a),codeText:o(ye,a),codeTextData:j,data:j,codeFlowValue:j,definition:o($e),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(xe),hardBreakEscape:o(ot),hardBreakTrailing:o(ot),htmlFlow:o(D,a),htmlFlowData:j,htmlText:o(D,a),htmlTextData:j,image:o(ue),label:a,link:o(me),listItem:o(Le),listItemValue:p,listOrdered:o(fe,d),listUnordered:o(fe),paragraph:o(De),reference:O,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(Ue),strong:o(Ke),thematicBreak:o(Xe)},exit:{atxHeading:l(),atxHeadingSequence:_,autolink:l(),autolinkEmail:nt,autolinkProtocol:Ze,blockQuote:l(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:Be,characterReferenceMarkerNumeric:Be,characterReferenceValue:Me,codeFenced:l(v),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:h,codeFlowValue:k,codeIndented:l(g),codeText:l(L),codeTextData:k,data:k,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(z),hardBreakTrailing:l(z),htmlFlow:l(U),htmlFlowData:k,htmlText:l(Z),htmlTextData:k,image:l(V),label:pe,labelText:W,lineEnding:N,link:l(F),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:Oe,resourceDestinationString:C,resourceTitleString:se,resource:we,setextHeading:l(M),setextHeadingLineSequence:R,setextHeadingText:S,strong:l(),thematicBreak:l()}};m0(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(q){let X={type:"root",children:[]};const de={stack:[X],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:u,data:n},je=[];let rt=-1;for(;++rt<q.length;)if(q[rt][1].type==="listOrdered"||q[rt][1].type==="listUnordered")if(q[rt][0]==="enter")je.push(rt);else{const Zt=je.pop();rt=i(q,Zt,rt)}for(rt=-1;++rt<q.length;){const Zt=t[q[rt][0]];h0.call(Zt,q[rt][1].type)&&Zt[q[rt][1].type].call(Object.assign({sliceSerialize:q[rt][2].sliceSerialize},de),q[rt][1])}if(de.tokenStack.length>0){const Zt=de.tokenStack[de.tokenStack.length-1];(Zt[1]||g0).call(de,void 0,Zt[0])}for(X.position={start:Pi(q.length>0?q[0][1].start:{line:1,column:1,offset:0}),end:Pi(q.length>0?q[q.length-2][1].end:{line:1,column:1,offset:0})},rt=-1;++rt<t.transforms.length;)X=t.transforms[rt](X)||X;return X}function i(q,X,de){let je=X-1,rt=-1,Zt=!1,Pt,Ot,qt,Mn;for(;++je<=de;){const Ht=q[je];switch(Ht[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ht[0]==="enter"?rt++:rt--,Mn=void 0;break}case"lineEndingBlank":{Ht[0]==="enter"&&(Pt&&!Mn&&!rt&&!qt&&(qt=je),Mn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Mn=void 0}if(!rt&&Ht[0]==="enter"&&Ht[1].type==="listItemPrefix"||rt===-1&&Ht[0]==="exit"&&(Ht[1].type==="listUnordered"||Ht[1].type==="listOrdered")){if(Pt){let tn=je;for(Ot=void 0;tn--;){const mn=q[tn];if(mn[1].type==="lineEnding"||mn[1].type==="lineEndingBlank"){if(mn[0]==="exit")continue;Ot&&(q[Ot][1].type="lineEndingBlank",Zt=!0),mn[1].type="lineEnding",Ot=tn}else if(!(mn[1].type==="linePrefix"||mn[1].type==="blockQuotePrefix"||mn[1].type==="blockQuotePrefixWhitespace"||mn[1].type==="blockQuoteMarker"||mn[1].type==="listItemIndent"))break}qt&&(!Ot||qt<Ot)&&(Pt._spread=!0),Pt.end=Object.assign({},Ot?q[Ot][1].start:Ht[1].end),q.splice(Ot||je,0,["exit",Pt,Ht[2]]),je++,de++}if(Ht[1].type==="listItemPrefix"){const tn={type:"listItem",_spread:!1,start:Object.assign({},Ht[1].start),end:void 0};Pt=tn,q.splice(je,0,["enter",tn,Ht[2]]),je++,de++,qt=void 0,Mn=!0}}}return q[X][1]._spread=Zt,de}function o(q,X){return de;function de(je){s.call(this,q(je),je),X&&X.call(this,je)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(q,X,de){this.stack[this.stack.length-1].children.push(q),this.stack.push(q),this.tokenStack.push([X,de]),q.position={start:Pi(X.start),end:void 0}}function l(q){return X;function X(de){q&&q.call(this,de),c.call(this,de)}}function c(q,X){const de=this.stack.pop(),je=this.tokenStack.pop();if(je)je[0].type!==q.type&&(X?X.call(this,q,je[0]):(je[1]||g0).call(this,q,je[0]));else throw new Error("Cannot close `"+q.type+"` ("+Rs({start:q.start,end:q.end})+"): it’s not open");de.position.end=Pi(q.end)}function u(){return th(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(q){if(this.data.expectingFirstListItemValue){const X=this.stack[this.stack.length-2];X.start=Number.parseInt(this.sliceSerialize(q),10),this.data.expectingFirstListItemValue=void 0}}function f(){const q=this.resume(),X=this.stack[this.stack.length-1];X.lang=q}function h(){const q=this.resume(),X=this.stack[this.stack.length-1];X.meta=q}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const q=this.resume(),X=this.stack[this.stack.length-1];X.value=q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const q=this.resume(),X=this.stack[this.stack.length-1];X.value=q.replace(/(\r?\n|\r)$/g,"")}function y(q){const X=this.resume(),de=this.stack[this.stack.length-1];de.label=X,de.identifier=gr(this.sliceSerialize(q)).toLowerCase()}function b(){const q=this.resume(),X=this.stack[this.stack.length-1];X.title=q}function x(){const q=this.resume(),X=this.stack[this.stack.length-1];X.url=q}function _(q){const X=this.stack[this.stack.length-1];if(!X.depth){const de=this.sliceSerialize(q).length;X.depth=de}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function R(q){const X=this.stack[this.stack.length-1];X.depth=this.sliceSerialize(q).codePointAt(0)===61?1:2}function M(){this.data.setextHeadingSlurpLineEnding=void 0}function j(q){const de=this.stack[this.stack.length-1].children;let je=de[de.length-1];(!je||je.type!=="text")&&(je=gt(),je.position={start:Pi(q.start),end:void 0},de.push(je)),this.stack.push(je)}function k(q){const X=this.stack.pop();X.value+=this.sliceSerialize(q),X.position.end=Pi(q.end)}function N(q){const X=this.stack[this.stack.length-1];if(this.data.atHardBreak){const de=X.children[X.children.length-1];de.position.end=Pi(q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(X.type)&&(j.call(this,q),k.call(this,q))}function z(){this.data.atHardBreak=!0}function U(){const q=this.resume(),X=this.stack[this.stack.length-1];X.value=q}function Z(){const q=this.resume(),X=this.stack[this.stack.length-1];X.value=q}function L(){const q=this.resume(),X=this.stack[this.stack.length-1];X.value=q}function F(){const q=this.stack[this.stack.length-1];if(this.data.inReference){const X=this.data.referenceType||"shortcut";q.type+="Reference",q.referenceType=X,delete q.url,delete q.title}else delete q.identifier,delete q.label;this.data.referenceType=void 0}function V(){const q=this.stack[this.stack.length-1];if(this.data.inReference){const X=this.data.referenceType||"shortcut";q.type+="Reference",q.referenceType=X,delete q.url,delete q.title}else delete q.identifier,delete q.label;this.data.referenceType=void 0}function W(q){const X=this.sliceSerialize(q),de=this.stack[this.stack.length-2];de.label=rD(X),de.identifier=gr(X).toLowerCase()}function pe(){const q=this.stack[this.stack.length-1],X=this.resume(),de=this.stack[this.stack.length-1];if(this.data.inReference=!0,de.type==="link"){const je=q.children;de.children=je}else de.alt=X}function C(){const q=this.resume(),X=this.stack[this.stack.length-1];X.url=q}function se(){const q=this.resume(),X=this.stack[this.stack.length-1];X.title=q}function we(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function Oe(q){const X=this.resume(),de=this.stack[this.stack.length-1];de.label=X,de.identifier=gr(this.sliceSerialize(q)).toLowerCase(),this.data.referenceType="full"}function Be(q){this.data.characterReferenceType=q.type}function Me(q){const X=this.sliceSerialize(q),de=this.data.characterReferenceType;let je;de?(je=Jb(X,de==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):je=nh(X);const rt=this.stack.pop();rt.value+=je,rt.position.end=Pi(q.end)}function Ze(q){k.call(this,q);const X=this.stack[this.stack.length-1];X.url=this.sliceSerialize(q)}function nt(q){k.call(this,q);const X=this.stack[this.stack.length-1];X.url="mailto:"+this.sliceSerialize(q)}function We(){return{type:"blockquote",children:[]}}function _e(){return{type:"code",lang:null,meta:null,value:""}}function ye(){return{type:"inlineCode",value:""}}function $e(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function xe(){return{type:"emphasis",children:[]}}function Ue(){return{type:"heading",depth:0,children:[]}}function ot(){return{type:"break"}}function D(){return{type:"html",value:""}}function ue(){return{type:"image",title:null,url:"",alt:null}}function me(){return{type:"link",title:null,url:"",children:[]}}function fe(q){return{type:"list",ordered:q.type==="listOrdered",start:null,spread:q._spread,children:[]}}function Le(q){return{type:"listItem",spread:q._spread,checked:null,children:[]}}function De(){return{type:"paragraph",children:[]}}function Ke(){return{type:"strong",children:[]}}function gt(){return{type:"text",value:""}}function Xe(){return{type:"thematicBreak"}}}function Pi(e){return{line:e.line,column:e.column,offset:e.offset}}function m0(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?m0(e,r):sD(e,r)}}function sD(e,t){let n;for(n in t)if(h0.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 g0(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Rs({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Rs({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Rs({start:t.start,end:t.end})+") is still open")}function lD(e){const t=this;t.parser=n;function n(r){return oD(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function cD(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 uD(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 XN=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:eN},disable:{null:[]},document:{42:zn,43:zn,45:zn,48:zn,49:zn,50:zn,51:zn,52:zn,53:zn,54:zn,55:zn,56:zn,57:zn,62:e0},flow:{35:aN,42:Ic,45:[u0,Ic],60:uN,61:u0,95:Ic,96:i0,126:i0},flowInitial:{[-2]:oh,[-1]:oh,32:oh},insideSpan:{null:[ih,HN]},string:{38:n0,92:t0},text:{[-5]:sh,[-4]:sh,[-3]:sh,33:ON,38:n0,42:ih,60:[PM,yN],91:$N,92:[iN,t0],93:ah,95:ih,96:qM}},Symbol.toStringTag,{value:"Module"}));function QN(e){const n=Yb([XN,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(EM),document:i(TM),flow:i(ZN),string:i(WN),text:i(VN)};return r;function i(o){return a;function a(s){return GN(r,o,s)}}}function eD(e){for(;!o0(e););return e}const p0=/[\0\t\n\r]/g;function tD(){let e=1,t="",n=!0,r;return i;function i(o,a,s){const l=[];let c,u,d,p,f;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),d=0,t="",n&&(o.charCodeAt(0)===65279&&d++,n=void 0);d<o.length;){if(p0.lastIndex=d,c=p0.exec(o),p=c&&c.index!==void 0?c.index:o.length,f=o.charCodeAt(p),!c){t=o.slice(d);break}if(f===10&&d===p&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<p&&(l.push(o.slice(d,p)),e+=p-d),f){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}d=p+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const nD=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function rD(e){return e.replace(nD,iD)}function iD(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Jb(n.slice(o?2:1),o?16:10)}return nh(n)||e}const h0={}.hasOwnProperty;function oD(e,t,n){return typeof t!="string"&&(n=t,t=void 0),aD(n)(eD(QN(n).document().write(tD()(e,t,!0))))}function aD(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(me),autolinkProtocol:j,autolinkEmail:j,atxHeading:o(Ue),blockQuote:o(We),characterEscape:j,characterReference:j,codeFenced:o(_e),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(_e,a),codeText:o(ye,a),codeTextData:j,data:j,codeFlowValue:j,definition:o($e),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(Se),hardBreakEscape:o(ot),hardBreakTrailing:o(ot),htmlFlow:o(D,a),htmlFlowData:j,htmlText:o(D,a),htmlTextData:j,image:o(ue),label:a,link:o(me),listItem:o(Le),listItemValue:p,listOrdered:o(fe,d),listUnordered:o(fe),paragraph:o(De),reference:O,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(Ue),strong:o(Ke),thematicBreak:o(Xe)},exit:{atxHeading:l(),atxHeadingSequence:_,autolink:l(),autolinkEmail:nt,autolinkProtocol:Ze,blockQuote:l(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:Be,characterReferenceMarkerNumeric:Be,characterReferenceValue:Me,codeFenced:l(v),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:h,codeFlowValue:k,codeIndented:l(g),codeText:l(L),codeTextData:k,data:k,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(z),hardBreakTrailing:l(z),htmlFlow:l(B),htmlFlowData:k,htmlText:l(Z),htmlTextData:k,image:l(V),label:pe,labelText:W,lineEnding:N,link:l(F),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:Oe,resourceDestinationString:C,resourceTitleString:se,resource:we,setextHeading:l(M),setextHeadingLineSequence:R,setextHeadingText:S,strong:l(),thematicBreak:l()}};m0(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(q){let X={type:"root",children:[]};const de={stack:[X],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:u,data:n},je=[];let rt=-1;for(;++rt<q.length;)if(q[rt][1].type==="listOrdered"||q[rt][1].type==="listUnordered")if(q[rt][0]==="enter")je.push(rt);else{const Zt=je.pop();rt=i(q,Zt,rt)}for(rt=-1;++rt<q.length;){const Zt=t[q[rt][0]];h0.call(Zt,q[rt][1].type)&&Zt[q[rt][1].type].call(Object.assign({sliceSerialize:q[rt][2].sliceSerialize},de),q[rt][1])}if(de.tokenStack.length>0){const Zt=de.tokenStack[de.tokenStack.length-1];(Zt[1]||g0).call(de,void 0,Zt[0])}for(X.position={start:Pi(q.length>0?q[0][1].start:{line:1,column:1,offset:0}),end:Pi(q.length>0?q[q.length-2][1].end:{line:1,column:1,offset:0})},rt=-1;++rt<t.transforms.length;)X=t.transforms[rt](X)||X;return X}function i(q,X,de){let je=X-1,rt=-1,Zt=!1,Pt,Ot,qt,Mn;for(;++je<=de;){const Ht=q[je];switch(Ht[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ht[0]==="enter"?rt++:rt--,Mn=void 0;break}case"lineEndingBlank":{Ht[0]==="enter"&&(Pt&&!Mn&&!rt&&!qt&&(qt=je),Mn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Mn=void 0}if(!rt&&Ht[0]==="enter"&&Ht[1].type==="listItemPrefix"||rt===-1&&Ht[0]==="exit"&&(Ht[1].type==="listUnordered"||Ht[1].type==="listOrdered")){if(Pt){let tn=je;for(Ot=void 0;tn--;){const mn=q[tn];if(mn[1].type==="lineEnding"||mn[1].type==="lineEndingBlank"){if(mn[0]==="exit")continue;Ot&&(q[Ot][1].type="lineEndingBlank",Zt=!0),mn[1].type="lineEnding",Ot=tn}else if(!(mn[1].type==="linePrefix"||mn[1].type==="blockQuotePrefix"||mn[1].type==="blockQuotePrefixWhitespace"||mn[1].type==="blockQuoteMarker"||mn[1].type==="listItemIndent"))break}qt&&(!Ot||qt<Ot)&&(Pt._spread=!0),Pt.end=Object.assign({},Ot?q[Ot][1].start:Ht[1].end),q.splice(Ot||je,0,["exit",Pt,Ht[2]]),je++,de++}if(Ht[1].type==="listItemPrefix"){const tn={type:"listItem",_spread:!1,start:Object.assign({},Ht[1].start),end:void 0};Pt=tn,q.splice(je,0,["enter",tn,Ht[2]]),je++,de++,qt=void 0,Mn=!0}}}return q[X][1]._spread=Zt,de}function o(q,X){return de;function de(je){s.call(this,q(je),je),X&&X.call(this,je)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(q,X,de){this.stack[this.stack.length-1].children.push(q),this.stack.push(q),this.tokenStack.push([X,de]),q.position={start:Pi(X.start),end:void 0}}function l(q){return X;function X(de){q&&q.call(this,de),c.call(this,de)}}function c(q,X){const de=this.stack.pop(),je=this.tokenStack.pop();if(je)je[0].type!==q.type&&(X?X.call(this,q,je[0]):(je[1]||g0).call(this,q,je[0]));else throw new Error("Cannot close `"+q.type+"` ("+Rs({start:q.start,end:q.end})+"): it’s not open");de.position.end=Pi(q.end)}function u(){return th(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(q){if(this.data.expectingFirstListItemValue){const X=this.stack[this.stack.length-2];X.start=Number.parseInt(this.sliceSerialize(q),10),this.data.expectingFirstListItemValue=void 0}}function f(){const q=this.resume(),X=this.stack[this.stack.length-1];X.lang=q}function h(){const q=this.resume(),X=this.stack[this.stack.length-1];X.meta=q}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const q=this.resume(),X=this.stack[this.stack.length-1];X.value=q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const q=this.resume(),X=this.stack[this.stack.length-1];X.value=q.replace(/(\r?\n|\r)$/g,"")}function y(q){const X=this.resume(),de=this.stack[this.stack.length-1];de.label=X,de.identifier=gr(this.sliceSerialize(q)).toLowerCase()}function b(){const q=this.resume(),X=this.stack[this.stack.length-1];X.title=q}function x(){const q=this.resume(),X=this.stack[this.stack.length-1];X.url=q}function _(q){const X=this.stack[this.stack.length-1];if(!X.depth){const de=this.sliceSerialize(q).length;X.depth=de}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function R(q){const X=this.stack[this.stack.length-1];X.depth=this.sliceSerialize(q).codePointAt(0)===61?1:2}function M(){this.data.setextHeadingSlurpLineEnding=void 0}function j(q){const de=this.stack[this.stack.length-1].children;let je=de[de.length-1];(!je||je.type!=="text")&&(je=gt(),je.position={start:Pi(q.start),end:void 0},de.push(je)),this.stack.push(je)}function k(q){const X=this.stack.pop();X.value+=this.sliceSerialize(q),X.position.end=Pi(q.end)}function N(q){const X=this.stack[this.stack.length-1];if(this.data.atHardBreak){const de=X.children[X.children.length-1];de.position.end=Pi(q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(X.type)&&(j.call(this,q),k.call(this,q))}function z(){this.data.atHardBreak=!0}function B(){const q=this.resume(),X=this.stack[this.stack.length-1];X.value=q}function Z(){const q=this.resume(),X=this.stack[this.stack.length-1];X.value=q}function L(){const q=this.resume(),X=this.stack[this.stack.length-1];X.value=q}function F(){const q=this.stack[this.stack.length-1];if(this.data.inReference){const X=this.data.referenceType||"shortcut";q.type+="Reference",q.referenceType=X,delete q.url,delete q.title}else delete q.identifier,delete q.label;this.data.referenceType=void 0}function V(){const q=this.stack[this.stack.length-1];if(this.data.inReference){const X=this.data.referenceType||"shortcut";q.type+="Reference",q.referenceType=X,delete q.url,delete q.title}else delete q.identifier,delete q.label;this.data.referenceType=void 0}function W(q){const X=this.sliceSerialize(q),de=this.stack[this.stack.length-2];de.label=rD(X),de.identifier=gr(X).toLowerCase()}function pe(){const q=this.stack[this.stack.length-1],X=this.resume(),de=this.stack[this.stack.length-1];if(this.data.inReference=!0,de.type==="link"){const je=q.children;de.children=je}else de.alt=X}function C(){const q=this.resume(),X=this.stack[this.stack.length-1];X.url=q}function se(){const q=this.resume(),X=this.stack[this.stack.length-1];X.title=q}function we(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function Oe(q){const X=this.resume(),de=this.stack[this.stack.length-1];de.label=X,de.identifier=gr(this.sliceSerialize(q)).toLowerCase(),this.data.referenceType="full"}function Be(q){this.data.characterReferenceType=q.type}function Me(q){const X=this.sliceSerialize(q),de=this.data.characterReferenceType;let je;de?(je=Jb(X,de==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):je=nh(X);const rt=this.stack.pop();rt.value+=je,rt.position.end=Pi(q.end)}function Ze(q){k.call(this,q);const X=this.stack[this.stack.length-1];X.url=this.sliceSerialize(q)}function nt(q){k.call(this,q);const X=this.stack[this.stack.length-1];X.url="mailto:"+this.sliceSerialize(q)}function We(){return{type:"blockquote",children:[]}}function _e(){return{type:"code",lang:null,meta:null,value:""}}function ye(){return{type:"inlineCode",value:""}}function $e(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Se(){return{type:"emphasis",children:[]}}function Ue(){return{type:"heading",depth:0,children:[]}}function ot(){return{type:"break"}}function D(){return{type:"html",value:""}}function ue(){return{type:"image",title:null,url:"",alt:null}}function me(){return{type:"link",title:null,url:"",children:[]}}function fe(q){return{type:"list",ordered:q.type==="listOrdered",start:null,spread:q._spread,children:[]}}function Le(q){return{type:"listItem",spread:q._spread,checked:null,children:[]}}function De(){return{type:"paragraph",children:[]}}function Ke(){return{type:"strong",children:[]}}function gt(){return{type:"text",value:""}}function Xe(){return{type:"thematicBreak"}}}function Pi(e){return{line:e.line,column:e.column,offset:e.offset}}function m0(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?m0(e,r):sD(e,r)}}function sD(e,t){let n;for(n in t)if(h0.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 g0(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Rs({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Rs({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Rs({start:t.start,end:t.end})+") is still open")}function lD(e){const t=this;t.parser=n;function n(r){return oD(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function cD(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 uD(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 dD(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 fD(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function pD(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hD(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=oa(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 mD(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 gD(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function y0(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 yD(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return y0(e,t);const i={src:oa(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 vD(e,t){const n={src:oa(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 bD(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 wD(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return y0(e,t);const i={href:oa(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 _D(e,t){const n={href:oa(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 xD(e,t,n){const r=e.all(t),i=n?SD(n):v0(t),o={},a=[];if(typeof t.checked=="boolean"){const u=r[0];let d;u&&u.type==="element"&&u.tagName==="p"?d=u:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.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 u=r[s];(i||s!==0||u.type!=="element"||u.tagName!=="p")&&a.push({type:"text",value:`
33
33
  `}),u.type==="element"&&u.tagName==="p"&&!i?a.push(...u.children):a.push(u)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
@@ -37,7 +37,7 @@ Check the top-level render call using <`+Te+">.")}return he}}function Ie(I,he){{
37
37
  `});++r<e.length;)r&&n.push({type:"text",value:`
38
38
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
39
39
  `}),n}function $0(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function P0(e,t){const n=JD(e,t),r=n.one(e,void 0),i=BD(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
40
- `},i),o}function n2(e,t){return e&&"run"in e?async function(n,r){const i=P0(n,{file:r,...t});await e.run(i,r)}:function(n,r){return P0(n,{file:r,...t||e})}}function I0(e){if(e)throw e}var Bc=Object.prototype.hasOwnProperty,R0=Object.prototype.toString,M0=Object.defineProperty,N0=Object.getOwnPropertyDescriptor,D0=function(t){return typeof Array.isArray=="function"?Array.isArray(t):R0.call(t)==="[object Array]"},j0=function(t){if(!t||R0.call(t)!=="[object Object]")return!1;var n=Bc.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Bc.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Bc.call(t,i)},L0=function(t,n){M0&&n.name==="__proto__"?M0(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},F0=function(t,n){if(n==="__proto__")if(Bc.call(t,n)){if(N0)return N0(t,n).value}else return;return t[n]},r2=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,u=!1;for(typeof s=="boolean"&&(u=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=F0(s,n),i=F0(t,n),s!==i&&(u&&i&&(j0(i)||(o=D0(i)))?(o?(o=!1,a=r&&D0(r)?r:[]):a=r&&j0(r)?r:{},L0(s,{name:n,newValue:e(u,a,i)})):typeof i<"u"&&L0(s,{name:n,newValue:i}));return s};const mh=ti(r2);function gh(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function i2(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...i);function s(l,...c){const u=e[++o];let d=-1;if(l){a(l);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,u?o2(u,s)(...c):a(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function o2(e,t){let n;return r;function r(...a){const s=e.length>a.length;let l;s&&a.push(i);try{l=e.apply(this,a)}catch(c){const u=c;if(s&&n)throw u;return i(u)}s||(l instanceof Promise?l.then(o,i):l instanceof Error?i(l):o(l))}function i(a,...s){n||(n=!0,t(a,...s))}function o(a){i(null,a)}}const Pr={basename:a2,dirname:s2,extname:l2,join:c2,sep:"/"};function a2(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ls(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function s2(e){if(Ls(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function l2(e){Ls(e);let t=e.length,n=-1,r=0,i=-1,o=0,a;for(;t--;){const s=e.codePointAt(t);if(s===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),s===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function c2(...e){let t=-1,n;for(;++t<e.length;)Ls(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":u2(n)}function u2(e){Ls(e);const t=e.codePointAt(0)===47;let n=d2(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function d2(e,t){let n="",r=0,i=-1,o=0,a=-1,s,l;for(;++a<=e.length;){if(a<e.length)s=e.codePointAt(a);else{if(s===47)break;s=47}if(s===47){if(!(i===a-1||o===1))if(i!==a-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length>0){n="",r=0,i=a,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,o=0}else s===46&&o>-1?o++:o=-1}return n}function Ls(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const f2={cwd:p2};function p2(){return"/"}function yh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function h2(e){if(typeof e=="string")e=new URL(e);else if(!yh(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return m2(e)}function m2(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const vh=["history","path","basename","stem","extname","dirname"];class U0{constructor(t){let n;t?yh(t)?n={path:t}:typeof t=="string"||g2(t)?n={value:t}:n=t:n={},this.cwd=f2.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<vh.length;){const o=vh[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)vh.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Pr.basename(this.path):void 0}set basename(t){wh(t,"basename"),bh(t,"basename"),this.path=Pr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Pr.dirname(this.path):void 0}set dirname(t){B0(this.basename,"dirname"),this.path=Pr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Pr.extname(this.path):void 0}set extname(t){if(bh(t,"extname"),B0(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Pr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){yh(t)&&(t=h2(t)),wh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Pr.basename(this.path,this.extname):void 0}set stem(t){wh(t,"stem"),bh(t,"stem"),this.path=Pr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new xn(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function bh(e,t){if(e&&e.includes(Pr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Pr.sep+"`")}function wh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function B0(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function g2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const y2=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};Object.setPrototypeOf(o,r);const a=Object.getOwnPropertyNames(i);for(const s of a){const l=Object.getOwnPropertyDescriptor(i,s);l&&Object.defineProperty(o,s,l)}return o},v2={}.hasOwnProperty;class _h extends y2{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=i2()}copy(){const t=new _h;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(mh(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Eh("data",this.frozen),this.namespace[t]=n,this):v2.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Eh("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=zc(t),r=this.parser||this.Parser;return xh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),xh("process",this.parser||this.Parser),Sh("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,a){const s=zc(t),l=r.parse(s);r.run(l,s,function(u,d,p){if(u||!d||!p)return c(u);const f=d,h=r.stringify(f,p);_2(h)?p.value=h:p.result=h,c(u,p)});function c(u,d){u||!d?a(u):o?o(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),xh("processSync",this.parser||this.Parser),Sh("processSync",this.compiler||this.Compiler),this.process(t,i),Z0("processSync","process",n),r;function i(o,a){n=!0,I0(o),r=a}}run(t,n,r){z0(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(a,s){const l=zc(n);i.run(t,l,c);function c(u,d,p){const f=d||t;u?s(u):a?a(f):r(void 0,f,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),Z0("runSync","run",r),i;function o(a,s){I0(a),i=s,r=!0}}stringify(t,n){this.freeze();const r=zc(n),i=this.compiler||this.Compiler;return Sh("stringify",i),z0(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Eh("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...d]=c;l(u,d)}else a(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function a(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(c.plugins),c.settings&&(i.settings=mh(!0,i.settings,c.settings))}function s(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const d=c[u];o(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let d=-1,p=-1;for(;++d<r.length;)if(r[d][0]===c){p=d;break}if(p===-1)r.push([c,...u]);else if(u.length>0){let[f,...h]=u;const m=r[p][1];gh(m)&&gh(f)&&(f=mh(!0,m,f)),r[p]=[c,f,...h]}}}}const b2=new _h().freeze();function xh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Sh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Eh(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function z0(e){if(!gh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Z0(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function zc(e){return w2(e)?e:new U0(e)}function w2(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function _2(e){return typeof e=="string"||x2(e)}function x2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const S2="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",q0=[],H0={allowDangerousHtml:!0},E2=/^(https?|ircs?|mailto|xmpp)$/i,C2=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function T2(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,o=e.components,a=e.disallowedElements,s=e.rehypePlugins||q0,l=e.remarkPlugins||q0,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...H0}:H0,u=e.skipHtml,d=e.unwrapDisallowed,p=e.urlTransform||k2,f=b2().use(lD).use(l).use(n2,c).use(s),h=new U0;typeof r=="string"&&(h.value=r);for(const y of C2)Object.hasOwn(e,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+S2+y.id,void 0);const m=f.parse(h);let v=f.runSync(m,h);return i&&(v={type:"element",tagName:"div",properties:{className:i},children:v.type==="root"?v.children:[v]}),ph(v,g),eM(v,{Fragment:B.Fragment,components:o,ignoreInvalidStyle:!0,jsx:B.jsx,jsxs:B.jsxs,passKeys:!0,passNode:!0});function g(y,b,x){if(y.type==="raw"&&x&&typeof b=="number")return u?x.children.splice(b,1):x.children[b]={type:"text",value:y.value},b;if(y.type==="element"){let _;for(_ in eh)if(Object.hasOwn(eh,_)&&Object.hasOwn(y.properties,_)){const S=y.properties[_],R=eh[_];(R===null||R.includes(y.tagName))&&(y.properties[_]=p(String(S||""),_,y))}}if(y.type==="element"){let _=t?!t.includes(y.tagName):a?a.includes(y.tagName):!1;if(!_&&n&&typeof b=="number"&&(_=!n(y,b,x)),_&&x&&typeof b=="number")return d&&y.children?x.children.splice(b,1,...y.children):x.children.splice(b,1),b}}}function k2(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||E2.test(e.slice(0,t))?e:""}function O2(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function W0(e,t,n){const i=Fc((n||{}).ignore||[]),o=A2(t);let a=-1;for(;++a<o.length;)A0(e,"text",s);function s(c,u){let d=-1,p;for(;++d<u.length;){const f=u[d],h=p?p.children:void 0;if(i(f,h?h.indexOf(f):void 0,p))return;p=f}if(p)return l(c,u)}function l(c,u){const d=u[u.length-1],p=o[a][0],f=o[a][1];let h=0;const v=d.children.indexOf(c);let g=!1,y=[];p.lastIndex=0;let b=p.exec(c.value);for(;b;){const x=b.index,_={index:b.index,input:b.input,stack:[...u,c]};let S=f(...b,_);if(typeof S=="string"&&(S=S.length>0?{type:"text",value:S}:void 0),S===!1?p.lastIndex=x+1:(h!==x&&y.push({type:"text",value:c.value.slice(h,x)}),Array.isArray(S)?y.push(...S):S&&y.push(S),h=x+b[0].length,g=!0),!p.global)break;b=p.exec(c.value)}return g?(h<c.value.length&&y.push({type:"text",value:c.value.slice(h)}),d.children.splice(v,1,...y)):y=[c],v+y.length}}function A2(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([$2(i[0]),P2(i[1])])}return t}function $2(e){return typeof e=="string"?new RegExp(O2(e),"g"):e}function P2(e){return typeof e=="function"?e:function(){return e}}function I2(e){W0(e,[/\r?\n|\r/g,R2])}function R2(){return{type:"break"}}function M2(){return function(e){I2(e)}}function V0(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const Ch="phrasing",Th=["autolink","link","image","label"];function N2(){return{transforms:[z2],enter:{literalAutolink:j2,literalAutolinkEmail:kh,literalAutolinkHttp:kh,literalAutolinkWww:kh},exit:{literalAutolink:B2,literalAutolinkEmail:U2,literalAutolinkHttp:L2,literalAutolinkWww:F2}}}function D2(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ch,notInConstruct:Th},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ch,notInConstruct:Th},{character:":",before:"[ps]",after:"\\/",inConstruct:Ch,notInConstruct:Th}]}}function j2(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function kh(e){this.config.enter.autolinkProtocol.call(this,e)}function L2(e){this.config.exit.autolinkProtocol.call(this,e)}function F2(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function U2(e){this.config.exit.autolinkEmail.call(this,e)}function B2(e){this.exit(e)}function z2(e){W0(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Z2],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,q2]],{ignore:["link","linkReference"]})}function Z2(e,t,n,r,i){let o="";if(!K0(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!H2(n)))return!1;const a=W2(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function q2(e,t,n,r){return!K0(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function H2(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function W2(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=V0(e,"(");let o=V0(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function K0(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ho(n)||Ac(n))&&(!t||n!==47)}G0.peek=rj;function V2(){return{enter:{gfmFootnoteDefinition:G2,gfmFootnoteDefinitionLabelString:Y2,gfmFootnoteCall:Q2,gfmFootnoteCallString:ej},exit:{gfmFootnoteDefinition:X2,gfmFootnoteDefinitionLabelString:J2,gfmFootnoteCall:nj,gfmFootnoteCallString:tj}}}function K2(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:ij,footnoteReference:G0}}}function G2(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Y2(){this.buffer()}function J2(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=gr(this.sliceSerialize(e)).toLowerCase()}function X2(e){this.exit(e)}function Q2(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function ej(){this.buffer()}function tj(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=gr(this.sliceSerialize(e)).toLowerCase()}function nj(e){this.exit(e)}function G0(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),s(),a(),o+=i.move("]"),o}function rj(){return"["}function ij(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteDefinition"),s=n.enter("label");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),s(),o+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),o+=i.move(n.indentLines(n.containerFlow(e,i.current()),oj)),a(),o}function oj(e,t,n){return t===0?e:(n?"":" ")+e}const aj=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Y0.peek=dj;function sj(){return{canContainEols:["delete"],enter:{strikethrough:cj},exit:{strikethrough:uj}}}function lj(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:aj}],handlers:{delete:Y0}}}function cj(e){this.enter({type:"delete",children:[]},e)}function uj(e){this.exit(e)}function Y0(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function dj(){return"~"}function fj(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||hj,i=[],o=[],a=[],s=[];let l=0,c=-1;for(;++c<e.length;){const h=[],m=[];let v=-1;for(e[c].length>l&&(l=e[c].length);++v<e[c].length;){const g=pj(e[c][v]);if(t.alignDelimiters!==!1){const y=r(g);m[v]=y,(s[v]===void 0||y>s[v])&&(s[v]=y)}h.push(g)}o[c]=h,a[c]=m}let u=-1;if(typeof n=="object"&&"length"in n)for(;++u<l;)i[u]=J0(n[u]);else{const h=J0(n);for(;++u<l;)i[u]=h}u=-1;const d=[],p=[];for(;++u<l;){const h=i[u];let m="",v="";h===99?(m=":",v=":"):h===108?m=":":h===114&&(v=":");let g=t.alignDelimiters===!1?1:Math.max(1,s[u]-m.length-v.length);const y=m+"-".repeat(g)+v;t.alignDelimiters!==!1&&(g=m.length+g+v.length,g>s[u]&&(s[u]=g),p[u]=g),d[u]=y}o.splice(1,0,d),a.splice(1,0,p),c=-1;const f=[];for(;++c<o.length;){const h=o[c],m=a[c];u=-1;const v=[];for(;++u<l;){const g=h[u]||"";let y="",b="";if(t.alignDelimiters!==!1){const x=s[u]-(m[u]||0),_=i[u];_===114?y=" ".repeat(x):_===99?x%2?(y=" ".repeat(x/2+.5),b=" ".repeat(x/2-.5)):(y=" ".repeat(x/2),b=y):b=" ".repeat(x)}t.delimiterStart!==!1&&!u&&v.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&g==="")&&(t.delimiterStart!==!1||u)&&v.push(" "),t.alignDelimiters!==!1&&v.push(y),v.push(g),t.alignDelimiters!==!1&&v.push(b),t.padding!==!1&&v.push(" "),(t.delimiterEnd!==!1||u!==l-1)&&v.push("|")}f.push(t.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return f.join(`
40
+ `},i),o}function n2(e,t){return e&&"run"in e?async function(n,r){const i=P0(n,{file:r,...t});await e.run(i,r)}:function(n,r){return P0(n,{file:r,...t||e})}}function I0(e){if(e)throw e}var Bc=Object.prototype.hasOwnProperty,R0=Object.prototype.toString,M0=Object.defineProperty,N0=Object.getOwnPropertyDescriptor,D0=function(t){return typeof Array.isArray=="function"?Array.isArray(t):R0.call(t)==="[object Array]"},j0=function(t){if(!t||R0.call(t)!=="[object Object]")return!1;var n=Bc.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Bc.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Bc.call(t,i)},L0=function(t,n){M0&&n.name==="__proto__"?M0(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},F0=function(t,n){if(n==="__proto__")if(Bc.call(t,n)){if(N0)return N0(t,n).value}else return;return t[n]},r2=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,u=!1;for(typeof s=="boolean"&&(u=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=F0(s,n),i=F0(t,n),s!==i&&(u&&i&&(j0(i)||(o=D0(i)))?(o?(o=!1,a=r&&D0(r)?r:[]):a=r&&j0(r)?r:{},L0(s,{name:n,newValue:e(u,a,i)})):typeof i<"u"&&L0(s,{name:n,newValue:i}));return s};const mh=ti(r2);function gh(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function i2(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...i);function s(l,...c){const u=e[++o];let d=-1;if(l){a(l);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,u?o2(u,s)(...c):a(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function o2(e,t){let n;return r;function r(...a){const s=e.length>a.length;let l;s&&a.push(i);try{l=e.apply(this,a)}catch(c){const u=c;if(s&&n)throw u;return i(u)}s||(l instanceof Promise?l.then(o,i):l instanceof Error?i(l):o(l))}function i(a,...s){n||(n=!0,t(a,...s))}function o(a){i(null,a)}}const Pr={basename:a2,dirname:s2,extname:l2,join:c2,sep:"/"};function a2(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ls(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function s2(e){if(Ls(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function l2(e){Ls(e);let t=e.length,n=-1,r=0,i=-1,o=0,a;for(;t--;){const s=e.codePointAt(t);if(s===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),s===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function c2(...e){let t=-1,n;for(;++t<e.length;)Ls(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":u2(n)}function u2(e){Ls(e);const t=e.codePointAt(0)===47;let n=d2(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function d2(e,t){let n="",r=0,i=-1,o=0,a=-1,s,l;for(;++a<=e.length;){if(a<e.length)s=e.codePointAt(a);else{if(s===47)break;s=47}if(s===47){if(!(i===a-1||o===1))if(i!==a-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length>0){n="",r=0,i=a,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,o=0}else s===46&&o>-1?o++:o=-1}return n}function Ls(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const f2={cwd:p2};function p2(){return"/"}function yh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function h2(e){if(typeof e=="string")e=new URL(e);else if(!yh(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return m2(e)}function m2(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const vh=["history","path","basename","stem","extname","dirname"];class U0{constructor(t){let n;t?yh(t)?n={path:t}:typeof t=="string"||g2(t)?n={value:t}:n=t:n={},this.cwd=f2.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<vh.length;){const o=vh[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)vh.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Pr.basename(this.path):void 0}set basename(t){wh(t,"basename"),bh(t,"basename"),this.path=Pr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Pr.dirname(this.path):void 0}set dirname(t){B0(this.basename,"dirname"),this.path=Pr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Pr.extname(this.path):void 0}set extname(t){if(bh(t,"extname"),B0(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Pr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){yh(t)&&(t=h2(t)),wh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Pr.basename(this.path,this.extname):void 0}set stem(t){wh(t,"stem"),bh(t,"stem"),this.path=Pr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new xn(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function bh(e,t){if(e&&e.includes(Pr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Pr.sep+"`")}function wh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function B0(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function g2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const y2=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};Object.setPrototypeOf(o,r);const a=Object.getOwnPropertyNames(i);for(const s of a){const l=Object.getOwnPropertyDescriptor(i,s);l&&Object.defineProperty(o,s,l)}return o},v2={}.hasOwnProperty;class _h extends y2{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=i2()}copy(){const t=new _h;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(mh(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Eh("data",this.frozen),this.namespace[t]=n,this):v2.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Eh("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=zc(t),r=this.parser||this.Parser;return xh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),xh("process",this.parser||this.Parser),Sh("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,a){const s=zc(t),l=r.parse(s);r.run(l,s,function(u,d,p){if(u||!d||!p)return c(u);const f=d,h=r.stringify(f,p);_2(h)?p.value=h:p.result=h,c(u,p)});function c(u,d){u||!d?a(u):o?o(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),xh("processSync",this.parser||this.Parser),Sh("processSync",this.compiler||this.Compiler),this.process(t,i),Z0("processSync","process",n),r;function i(o,a){n=!0,I0(o),r=a}}run(t,n,r){z0(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(a,s){const l=zc(n);i.run(t,l,c);function c(u,d,p){const f=d||t;u?s(u):a?a(f):r(void 0,f,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),Z0("runSync","run",r),i;function o(a,s){I0(a),i=s,r=!0}}stringify(t,n){this.freeze();const r=zc(n),i=this.compiler||this.Compiler;return Sh("stringify",i),z0(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Eh("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...d]=c;l(u,d)}else a(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function a(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(c.plugins),c.settings&&(i.settings=mh(!0,i.settings,c.settings))}function s(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const d=c[u];o(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let d=-1,p=-1;for(;++d<r.length;)if(r[d][0]===c){p=d;break}if(p===-1)r.push([c,...u]);else if(u.length>0){let[f,...h]=u;const m=r[p][1];gh(m)&&gh(f)&&(f=mh(!0,m,f)),r[p]=[c,f,...h]}}}}const b2=new _h().freeze();function xh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Sh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Eh(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function z0(e){if(!gh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Z0(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function zc(e){return w2(e)?e:new U0(e)}function w2(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function _2(e){return typeof e=="string"||x2(e)}function x2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const S2="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",q0=[],H0={allowDangerousHtml:!0},E2=/^(https?|ircs?|mailto|xmpp)$/i,C2=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function T2(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,o=e.components,a=e.disallowedElements,s=e.rehypePlugins||q0,l=e.remarkPlugins||q0,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...H0}:H0,u=e.skipHtml,d=e.unwrapDisallowed,p=e.urlTransform||k2,f=b2().use(lD).use(l).use(n2,c).use(s),h=new U0;typeof r=="string"&&(h.value=r);for(const y of C2)Object.hasOwn(e,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+S2+y.id,void 0);const m=f.parse(h);let v=f.runSync(m,h);return i&&(v={type:"element",tagName:"div",properties:{className:i},children:v.type==="root"?v.children:[v]}),ph(v,g),eM(v,{Fragment:U.Fragment,components:o,ignoreInvalidStyle:!0,jsx:U.jsx,jsxs:U.jsxs,passKeys:!0,passNode:!0});function g(y,b,x){if(y.type==="raw"&&x&&typeof b=="number")return u?x.children.splice(b,1):x.children[b]={type:"text",value:y.value},b;if(y.type==="element"){let _;for(_ in eh)if(Object.hasOwn(eh,_)&&Object.hasOwn(y.properties,_)){const S=y.properties[_],R=eh[_];(R===null||R.includes(y.tagName))&&(y.properties[_]=p(String(S||""),_,y))}}if(y.type==="element"){let _=t?!t.includes(y.tagName):a?a.includes(y.tagName):!1;if(!_&&n&&typeof b=="number"&&(_=!n(y,b,x)),_&&x&&typeof b=="number")return d&&y.children?x.children.splice(b,1,...y.children):x.children.splice(b,1),b}}}function k2(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||E2.test(e.slice(0,t))?e:""}function O2(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function W0(e,t,n){const i=Fc((n||{}).ignore||[]),o=A2(t);let a=-1;for(;++a<o.length;)A0(e,"text",s);function s(c,u){let d=-1,p;for(;++d<u.length;){const f=u[d],h=p?p.children:void 0;if(i(f,h?h.indexOf(f):void 0,p))return;p=f}if(p)return l(c,u)}function l(c,u){const d=u[u.length-1],p=o[a][0],f=o[a][1];let h=0;const v=d.children.indexOf(c);let g=!1,y=[];p.lastIndex=0;let b=p.exec(c.value);for(;b;){const x=b.index,_={index:b.index,input:b.input,stack:[...u,c]};let S=f(...b,_);if(typeof S=="string"&&(S=S.length>0?{type:"text",value:S}:void 0),S===!1?p.lastIndex=x+1:(h!==x&&y.push({type:"text",value:c.value.slice(h,x)}),Array.isArray(S)?y.push(...S):S&&y.push(S),h=x+b[0].length,g=!0),!p.global)break;b=p.exec(c.value)}return g?(h<c.value.length&&y.push({type:"text",value:c.value.slice(h)}),d.children.splice(v,1,...y)):y=[c],v+y.length}}function A2(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([$2(i[0]),P2(i[1])])}return t}function $2(e){return typeof e=="string"?new RegExp(O2(e),"g"):e}function P2(e){return typeof e=="function"?e:function(){return e}}function I2(e){W0(e,[/\r?\n|\r/g,R2])}function R2(){return{type:"break"}}function M2(){return function(e){I2(e)}}function V0(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const Ch="phrasing",Th=["autolink","link","image","label"];function N2(){return{transforms:[z2],enter:{literalAutolink:j2,literalAutolinkEmail:kh,literalAutolinkHttp:kh,literalAutolinkWww:kh},exit:{literalAutolink:B2,literalAutolinkEmail:U2,literalAutolinkHttp:L2,literalAutolinkWww:F2}}}function D2(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ch,notInConstruct:Th},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ch,notInConstruct:Th},{character:":",before:"[ps]",after:"\\/",inConstruct:Ch,notInConstruct:Th}]}}function j2(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function kh(e){this.config.enter.autolinkProtocol.call(this,e)}function L2(e){this.config.exit.autolinkProtocol.call(this,e)}function F2(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function U2(e){this.config.exit.autolinkEmail.call(this,e)}function B2(e){this.exit(e)}function z2(e){W0(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Z2],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,q2]],{ignore:["link","linkReference"]})}function Z2(e,t,n,r,i){let o="";if(!K0(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!H2(n)))return!1;const a=W2(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function q2(e,t,n,r){return!K0(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function H2(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function W2(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=V0(e,"(");let o=V0(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function K0(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ho(n)||Ac(n))&&(!t||n!==47)}G0.peek=rj;function V2(){return{enter:{gfmFootnoteDefinition:G2,gfmFootnoteDefinitionLabelString:Y2,gfmFootnoteCall:Q2,gfmFootnoteCallString:ej},exit:{gfmFootnoteDefinition:X2,gfmFootnoteDefinitionLabelString:J2,gfmFootnoteCall:nj,gfmFootnoteCallString:tj}}}function K2(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:ij,footnoteReference:G0}}}function G2(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Y2(){this.buffer()}function J2(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=gr(this.sliceSerialize(e)).toLowerCase()}function X2(e){this.exit(e)}function Q2(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function ej(){this.buffer()}function tj(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=gr(this.sliceSerialize(e)).toLowerCase()}function nj(e){this.exit(e)}function G0(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),s(),a(),o+=i.move("]"),o}function rj(){return"["}function ij(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteDefinition"),s=n.enter("label");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),s(),o+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),o+=i.move(n.indentLines(n.containerFlow(e,i.current()),oj)),a(),o}function oj(e,t,n){return t===0?e:(n?"":" ")+e}const aj=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Y0.peek=dj;function sj(){return{canContainEols:["delete"],enter:{strikethrough:cj},exit:{strikethrough:uj}}}function lj(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:aj}],handlers:{delete:Y0}}}function cj(e){this.enter({type:"delete",children:[]},e)}function uj(e){this.exit(e)}function Y0(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function dj(){return"~"}function fj(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||hj,i=[],o=[],a=[],s=[];let l=0,c=-1;for(;++c<e.length;){const h=[],m=[];let v=-1;for(e[c].length>l&&(l=e[c].length);++v<e[c].length;){const g=pj(e[c][v]);if(t.alignDelimiters!==!1){const y=r(g);m[v]=y,(s[v]===void 0||y>s[v])&&(s[v]=y)}h.push(g)}o[c]=h,a[c]=m}let u=-1;if(typeof n=="object"&&"length"in n)for(;++u<l;)i[u]=J0(n[u]);else{const h=J0(n);for(;++u<l;)i[u]=h}u=-1;const d=[],p=[];for(;++u<l;){const h=i[u];let m="",v="";h===99?(m=":",v=":"):h===108?m=":":h===114&&(v=":");let g=t.alignDelimiters===!1?1:Math.max(1,s[u]-m.length-v.length);const y=m+"-".repeat(g)+v;t.alignDelimiters!==!1&&(g=m.length+g+v.length,g>s[u]&&(s[u]=g),p[u]=g),d[u]=y}o.splice(1,0,d),a.splice(1,0,p),c=-1;const f=[];for(;++c<o.length;){const h=o[c],m=a[c];u=-1;const v=[];for(;++u<l;){const g=h[u]||"";let y="",b="";if(t.alignDelimiters!==!1){const x=s[u]-(m[u]||0),_=i[u];_===114?y=" ".repeat(x):_===99?x%2?(y=" ".repeat(x/2+.5),b=" ".repeat(x/2-.5)):(y=" ".repeat(x/2),b=y):b=" ".repeat(x)}t.delimiterStart!==!1&&!u&&v.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&g==="")&&(t.delimiterStart!==!1||u)&&v.push(" "),t.alignDelimiters!==!1&&v.push(y),v.push(g),t.alignDelimiters!==!1&&v.push(b),t.padding!==!1&&v.push(" "),(t.delimiterEnd!==!1||u!==l-1)&&v.push("|")}f.push(t.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return f.join(`
41
41
  `)}function pj(e){return e==null?"":String(e)}function hj(e){return e.length}function J0(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function mj(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const a=n.indentLines(n.containerFlow(e,o.current()),gj);return i(),a}function gj(e,t,n){return">"+(n?"":" ")+e}function yj(e,t){return X0(e,t.inConstruct,!0)&&!X0(e,t.notInConstruct,!1)}function X0(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Q0(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
42
42
  `&&yj(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
43
43
  `}function vj(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>a&&(a=o):o=1,i=r+t.length,r=n.indexOf(t,i);return a}function bj(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function wj(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function _j(e,t,n,r){const i=wj(n),o=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(bj(e,n)){const d=n.enter("codeIndented"),p=n.indentLines(o,xj);return d(),p}const s=n.createTracker(r),l=i.repeat(Math.max(vj(o,i)+1,3)),c=n.enter("codeFenced");let u=s.move(l);if(e.lang){const d=n.enter(`codeFencedLang${a}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${a}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:`
@@ -51,7 +51,7 @@ Check the top-level render call using <`+Te+">.")}return he}}function Ie(I,he){{
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}tw.peek=Oj;function tw(e){return e.value||""}function Oj(){return"<"}nw.peek=Aj;function nw(e,t,n,r){const i=Oh(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 Aj(){return"!"}rw.peek=$j;function rw(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 u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,o(),i==="full"||!c||c!==d?l+=s.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function $j(){return"!"}iw.peek=Pj;function iw(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 Pj(){return"`"}function ow(e,t){const n=th(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))}aw.peek=Ij;function aw(e,t,n,r){const i=Oh(n),o=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(ow(e,n)){const u=n.stack;n.stack=[],s=n.enter("autolink");let d=a.move("<");return d+=a.move(n.containerPhrasing(e,{before:d,after:">",...a.current()})),d+=a.move(">"),s(),n.stack=u,d}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 Ij(e,t,n){return ow(e,n)?"<":"["}sw.peek=Rj;function sw(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 u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,o(),i==="full"||!c||c!==d?l+=s.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function Rj(){return"["}function Ah(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 Mj(e){const t=Ah(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 Nj(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 lw(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 Dj(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let a=e.ordered?Nj(n):Ah(n);const s=e.ordered?a==="."?")":".":Mj(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const u=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&u&&(!u.children||!u.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),lw(n)===a&&u){let d=-1;for(;++d<e.children.length;){const p=e.children[d];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.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 jj(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 Lj(e,t,n,r){const i=jj(n);let o=n.bulletCurrent||Ah(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()),u);return l(),c;function u(d,p,f){return p?(f?"":" ".repeat(a))+d:(f?o:o+" ".repeat(a-o.length))+d}}function Fj(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),a=n.containerPhrasing(e,r);return o(),i(),a}const Uj=Fc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Bj(e,t,n,r){return(e.children.some(function(a){return Uj(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function zj(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}cw.peek=Zj;function cw(e,t,n,r){const i=zj(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 Zj(e,t,n){return n.options.strong||"*"}function qj(e,t,n,r){return n.safe(e.value,r)}function Hj(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 Wj(e,t,n){const r=(lw(n)+(n.options.ruleSpaces?" ":"")).repeat(Hj(n));return n.options.ruleSpaces?r.slice(0,-1):r}const uw={blockquote:mj,break:Q0,code:_j,definition:Sj,emphasis:ew,hardBreak:Q0,heading:kj,html:tw,image:nw,imageReference:rw,inlineCode:iw,link:aw,linkReference:sw,list:Dj,listItem:Lj,paragraph:Fj,root:Bj,strong:cw,text:qj,thematicBreak:Wj};function Vj(){return{enter:{table:Kj,tableData:dw,tableHeader:dw,tableRow:Yj},exit:{codeText:Jj,table:Gj,tableData:$h,tableHeader:$h,tableRow:$h}}}function Kj(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 Gj(e){this.exit(e),this.data.inTable=void 0}function Yj(e){this.enter({type:"tableRow",children:[]},e)}function $h(e){this.exit(e)}function dw(e){this.enter({type:"tableCell",children:[]},e)}function Jj(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Xj));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Xj(e,t){return t==="|"?t:e}function Qj(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:p,table:a,tableCell:l,tableRow:s}};function a(f,h,m,v){return c(u(f,m,v),f.align)}function s(f,h,m,v){const g=d(f,m,v),y=c([g]);return y.slice(0,y.indexOf(`
54
- `))}function l(f,h,m,v){const g=m.enter("tableCell"),y=m.enter("phrasing"),b=m.containerPhrasing(f,{...v,before:o,after:o});return y(),g(),b}function c(f,h){return fj(f,{align:h,alignDelimiters:r,padding:n,stringLength:i})}function u(f,h,m){const v=f.children;let g=-1;const y=[],b=h.enter("table");for(;++g<v.length;)y[g]=d(v[g],h,m);return b(),y}function d(f,h,m){const v=f.children;let g=-1;const y=[],b=h.enter("tableRow");for(;++g<v.length;)y[g]=l(v[g],f,h,m);return b(),y}function p(f,h,m){let v=uw.inlineCode(f,h,m);return m.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function eL(){return{exit:{taskListCheckValueChecked:fw,taskListCheckValueUnchecked:fw,paragraph:nL}}}function tL(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:rL}}}function fw(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function nL(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 rL(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=uw.listItem(e,t,n,{...r,...s.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+a}}function iL(){return[N2(),V2(),sj(),Vj(),eL()]}function oL(e){return{extensions:[D2(),K2(),lj(),Qj(e),tL()]}}const aL={tokenize:fL,partial:!0},pw={tokenize:pL,partial:!0},hw={tokenize:hL,partial:!0},mw={tokenize:mL,partial:!0},sL={tokenize:gL,partial:!0},gw={tokenize:uL,previous:vw},yw={tokenize:dL,previous:bw},ni={tokenize:cL,previous:ww},Ir={};function lL(){return{text:Ir}}let mo=48;for(;mo<123;)Ir[mo]=ni,mo++,mo===58?mo=65:mo===91&&(mo=97);Ir[43]=ni,Ir[45]=ni,Ir[46]=ni,Ir[95]=ni,Ir[72]=[ni,yw],Ir[104]=[ni,yw],Ir[87]=[ni,gw],Ir[119]=[ni,gw];function cL(e,t,n){const r=this;let i,o;return a;function a(d){return!Ph(d)||!ww.call(r,r.previous)||Ih(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(d))}function s(d){return Ph(d)?(e.consume(d),s):d===64?(e.consume(d),l):n(d)}function l(d){return d===46?e.check(sL,u,c)(d):d===45||d===95||Sn(d)?(o=!0,e.consume(d),l):u(d)}function c(d){return e.consume(d),i=!0,l}function u(d){return o&&i&&Dn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function uL(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!vw.call(r,r.previous)||Ih(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(aL,e.attempt(pw,e.attempt(hw,o),n),n)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function dL(e,t,n){const r=this;let i="",o=!1;return a;function a(d){return(d===72||d===104)&&bw.call(r,r.previous)&&!Ih(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),s):n(d)}function s(d){if(Dn(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),s;if(d===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(d),l}return n(d)}function l(d){return d===47?(e.consume(d),o?c:(o=!0,l)):n(d)}function c(d){return d===null||Oc(d)||At(d)||ho(d)||Ac(d)?n(d):e.attempt(pw,e.attempt(hw,u),n)(d)}function u(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function fL(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 pL(e,t,n){let r,i,o;return a;function a(c){return c===46||c===95?e.check(mw,l,s)(c):c===null||At(c)||ho(c)||c!==45&&Ac(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 hL(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(mw,t,o)(a):a===null||At(a)||ho(a)?t(a):(e.consume(a),i)}function o(a){return a===41&&r++,e.consume(a),i}}function mL(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||At(s)||ho(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||At(s)||ho(s)?t(s):r(s)}function o(s){return Dn(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):Dn(s)?(e.consume(s),a):n(s)}}function gL(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return Sn(o)?n(o):t(o)}}function vw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||At(e)}function bw(e){return!Dn(e)}function ww(e){return!(e===47||Ph(e))}function Ph(e){return e===43||e===45||e===46||e===95||Sn(e)}function Ih(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 yL={tokenize:CL,partial:!0};function vL(){return{document:{91:{tokenize:xL,continuation:{tokenize:SL},exit:EL}},text:{91:{tokenize:_L},93:{add:"after",tokenize:bL,resolveTo:wL}}}}function bL(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=gr(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 wL(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 _L(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,a;return s;function s(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(o>999||d===93&&!a||d===null||d===91||At(d))return n(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(gr(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return At(d)||(a=!0),o++,e.consume(d),d===92?u:c}function u(d){return d===91||d===92||d===93?(e.consume(d),o++,c):c(d)}}function xL(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,a=0,s;return l;function l(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(h)}function u(h){if(a>999||h===93&&!s||h===null||h===91||At(h))return n(h);if(h===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return o=gr(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return At(h)||(s=!0),a++,e.consume(h),h===92?d:u}function d(h){return h===91||h===92||h===93?(e.consume(h),a++,u):u(h)}function p(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),i.includes(o)||i.push(o),bt(e,f,"gfmFootnoteDefinitionWhitespace")):n(h)}function f(h){return t(h)}}function SL(e,t,n){return e.check(Ns,t,e.attempt(yL,t,n))}function EL(e){e.exit("gfmFootnoteDefinition")}function CL(e,t,n){const r=this;return bt(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 TL(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 u={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[l][1].end)},d={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[l][1].start)},p=[["enter",u,s],["enter",a[c][1],s],["exit",a[c][1],s],["enter",d,s]],f=s.parser.constructs.insideSpan.null;f&&Qn(p,p.length,0,Pc(f,a.slice(c+1,l),s)),Qn(p,p.length,0,[["exit",d,s],["enter",a[l][1],s],["exit",a[l][1],s],["exit",u,s]]),Qn(a,c-1,l-c+3,p),l=c+p.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,u=this.events;let d=0;return p;function p(h){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(h):(a.enter("strikethroughSequenceTemporary"),f(h))}function f(h){const m=$c(c);if(h===126)return d>1?l(h):(a.consume(h),d++,f);if(d<2&&!n)return l(h);const v=a.exit("strikethroughSequenceTemporary"),g=$c(h);return v._open=!g||g===2&&!!m,v._close=!m||m===2&&!!g,s(h)}}}class kL{constructor(){this.map=[]}add(t,n,r){OL(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 OL(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 AL(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 $L(){return{flow:{null:{tokenize:PL,resolveAll:IL}}}}function PL(e,t,n){const r=this;let i=0,o=0,a;return s;function s(k){let N=r.events.length-1;for(;N>-1;){const Z=r.events[N][1].type;if(Z==="lineEnding"||Z==="linePrefix")N--;else break}const z=N>-1?r.events[N][1].type:null,U=z==="tableHead"||z==="tableRow"?S:l;return U===S&&r.parser.lazy[r.now().line]?n(k):U(k)}function l(k){return e.enter("tableHead"),e.enter("tableRow"),c(k)}function c(k){return k===124||(a=!0,o+=1),u(k)}function u(k){return k===null?n(k):Ve(k)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),f):n(k):ht(k)?bt(e,u,"whitespace")(k):(o+=1,a&&(a=!1,i+=1),k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),a=!0,u):(e.enter("data"),d(k)))}function d(k){return k===null||k===124||At(k)?(e.exit("data"),u(k)):(e.consume(k),k===92?p:d)}function p(k){return k===92||k===124?(e.consume(k),d):d(k)}function f(k){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(k):(e.enter("tableDelimiterRow"),a=!1,ht(k)?bt(e,h,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):h(k))}function h(k){return k===45||k===58?v(k):k===124?(a=!0,e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),m):_(k)}function m(k){return ht(k)?bt(e,v,"whitespace")(k):v(k)}function v(k){return k===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),g):k===45?(o+=1,g(k)):k===null||Ve(k)?x(k):_(k)}function g(k){return k===45?(e.enter("tableDelimiterFiller"),y(k)):_(k)}function y(k){return k===45?(e.consume(k),y):k===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(k))}function b(k){return ht(k)?bt(e,x,"whitespace")(k):x(k)}function x(k){return k===124?h(k):k===null||Ve(k)?!a||i!==o?_(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(k)):_(k)}function _(k){return n(k)}function S(k){return e.enter("tableRow"),R(k)}function R(k){return k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),R):k===null||Ve(k)?(e.exit("tableRow"),t(k)):ht(k)?bt(e,R,"whitespace")(k):(e.enter("data"),M(k))}function M(k){return k===null||k===124||At(k)?(e.exit("data"),R(k)):(e.consume(k),k===92?j:M)}function j(k){return k===92||k===124?(e.consume(k),M):M(k)}}function IL(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],a=[0,0,0,0],s=!1,l=0,c,u,d;const p=new kL;for(;++n<e.length;){const f=e[n],h=f[1];f[0]==="enter"?h.type==="tableHead"?(s=!1,l!==0&&(_w(p,t,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(n,0,[["enter",c,t]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(r=!0,d=void 0,o=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,u={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(n,0,[["enter",u,t]])),i=h.type==="tableDelimiterRow"?2:u?3:1):i&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(o[1]!==0&&(a[0]=a[1],d=Zc(p,t,o,i,void 0,d),o=[0,0,0,0]),a[2]=n)):h.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(a[0]=a[1],d=Zc(p,t,o,i,void 0,d)),o=a,a=[o[1],n,0,0])):h.type==="tableHead"?(s=!0,l=n):h.type==="tableRow"||h.type==="tableDelimiterRow"?(l=n,o[1]!==0?(a[0]=a[1],d=Zc(p,t,o,i,n,d)):a[1]!==0&&(d=Zc(p,t,a,i,n,d)),i=0):i&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&_w(p,t,l,c,u),p.consume(t.events),n=-1;++n<t.events.length;){const f=t.events[n];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=AL(t.events,n))}return e}function Zc(e,t,n,r,i,o){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(o.end=Object.assign({},sa(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const l=sa(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=sa(t.events,n[2]),u=sa(t.events,n[3]),d={type:s,start:Object.assign({},c),end:Object.assign({},u)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const p=t.events[n[2]],f=t.events[n[3]];if(p[1].end=Object.assign({},f[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const h=n[2]+1,m=n[3]-n[2]-1;e.add(h,m,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(o.end=Object.assign({},sa(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function _w(e,t,n,r,i){const o=[],a=sa(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 sa(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const RL={tokenize:NL};function ML(){return{text:{91:RL}}}function NL(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 At(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 Ve(l)?t(l):ht(l)?e.check({tokenize:DL},t,n)(l):n(l)}}function DL(e,t,n){return bt(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function jL(e){return Yb([lL(),vL(),TL(e),$L(),ML()])}const LL={};function FL(e){const t=this,n=e||LL,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(jL(n)),o.push(iL()),a.push(oL(n))}const UL=({text:e,type:t,styles:n})=>{const r=n==null?void 0:n[t],i={h1:({node:o,...a})=>B.jsx("h1",{...a,...r==null?void 0:r.heading1}),h2:({node:o,...a})=>B.jsx("h2",{...a,...r==null?void 0:r.heading2}),h3:({node:o,...a})=>B.jsx("h3",{...a,...r==null?void 0:r.heading3}),h4:"h3",h5:"h3",h6:"h3",em:({node:o,...a})=>B.jsx("em",{...a,...r==null?void 0:r.italic}),strong:({node:o,...a})=>B.jsx("strong",{...a,...r==null?void 0:r.bold}),p:({node:o,...a})=>B.jsx("p",{...a,...r==null?void 0:r.text}),hr:({node:o,...a})=>B.jsx("hr",{...a,...r==null?void 0:r.horizontalRule}),a:({node:o,...a})=>B.jsx("a",{...a,...r==null?void 0:r.link,target:"_blank"}),ol:({node:o,...a})=>B.jsx("ol",{...a,...r==null?void 0:r.orderedList}),ul:({node:o,...a})=>B.jsx("ul",{...a,...r==null?void 0:r.unorderedList}),li:({node:o,...a})=>B.jsx("li",{...a,...r==null?void 0:r.listItem}),br:({node:o,...a})=>B.jsx("br",{...a,...r==null?void 0:r.lineBreak}),img:()=>null,pre:({node:o,...a})=>B.jsx("pre",{...a,...r==null?void 0:r.pre})};return B.jsx(T2,{components:i,remarkPlugins:[FL,M2],children:e})},xw=w.createContext(null);function Sw(){const e=w.useContext(xw);if(!e)throw new Error("useComposerContext must be used within a Message");return e}const Ew=w.createContext(null);function BL(){const e=w.useContext(Ew);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const Cw=w.createContext(null);function Tw(){const e=w.useContext(Cw);if(!e)throw new Error("useModalContext must be used within a ModalProvider");return e}const kw=w.createContext(null);function $t(){const e=w.useContext(kw);if(!e)throw new Error("useWebchatContext must be used within a WebchatProvider");return e}const zL=({text:e,buttonValue:t,type:n,styles:r,variant:i,groupId:o,reusable:a,...s})=>{const{eventEmitter:l,client:c}=$t(),[u,d]=w.useState(!1),[p,f]=w.useState(!1),[h,m]=w.useState(!1),{state:v}=$t();w.useEffect(()=>{if(o)return l.on(`button-group-${o}-click`,()=>{f(!0),a||m(!0)})},[l,o,a]);function g(){o&&l.emit(`button-group-${o}-click`),d(!0),a||m(!0),i!=="link"&&(c==null||c.sendMessage(t))}return B.jsx(ZL,{...s,variant:i,onClick:g,disabled:h||v.isReadOnly,"data-activated":u?"":void 0,"data-group-activated":p?"":void 0,"data-type":i,value:t,...r==null?void 0:r[n],children:e})},ZL=e=>{if(e.variant==="link"){const{value:r,variant:i,...o}=e;return B.jsx("a",{...o,href:r,target:"_blank",rel:"noopener noreferrer"})}const{variant:t,...n}=e;return B.jsx("button",{...n})},qL=w.forwardRef(({block:e,styles:t,type:n,...r},i)=>B.jsx("div",{...r,...t==null?void 0:t[n],ref:i,children:B.jsx(ga,{styles:t,block:e})}));function HL(e,t){const n=t?`The ${t} has been copied to your clipboard.`:"Copied to clipboard.";return navigator.clipboard.writeText(e).then(()=>sU({title:n,type:"success"}))}const WL=(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 VL={data:""},KL=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||VL,GL=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,YL=/\/\*[^]*?\*\/| +/g,Ow=/\n+/g,Ii=(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"?Ii(a,o):o+"{"+Ii(a,o[1]=="k"?"":t)+"}":typeof a=="object"?r+=Ii(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+=Ii.p?Ii.p(o,a):o+":"+a+";")}return n+(t&&i?t+"{"+i+"}":i)+r},ri={},Aw=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Aw(e[n]);return t}return e},JL=(e,t,n,r,i)=>{let o=Aw(e),a=ri[o]||(ri[o]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(o));if(!ri[a]){let l=o!==e?e:(c=>{let u,d,p=[{}];for(;u=GL.exec(c.replace(YL,""));)u[4]?p.shift():u[3]?(d=u[3].replace(Ow," ").trim(),p.unshift(p[0][d]=p[0][d]||{})):p[0][u[1]]=u[2].replace(Ow," ").trim();return p[0]})(e);ri[a]=Ii(i?{["@keyframes "+a]:l}:l,n?"":"."+a)}let s=n&&ri.g?ri.g:null;return n&&(ri.g=ri[a]),((l,c,u,d)=>{d?c.data=c.data.replace(d,l):c.data.indexOf(l)===-1&&(c.data=u?l+c.data:c.data+l)})(ri[a],t,r,s),a},XL=(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?"":Ii(s,""):s===!1?"":s}return r+i+(a??"")},"");function qc(e){let t=this||{},n=e.call?e(t.p):e;return JL(n.unshift?n.raw?XL(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,KL(t.target),t.g,t.o,t.k)}let $w,Rh,Mh;qc.bind({g:1});let ii=qc.bind({k:1});function QL(e,t,n,r){Ii.p=t,$w=e,Rh=n,Mh=r}function Ri(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:Rh&&Rh()},s),n.o=/ *go\d+/.test(l),s.className=qc.apply(n,r)+(l?" "+l:""),t&&(s.ref=a);let c=e;return e[0]&&(c=s.as||e,delete s.as),Mh&&c[0]&&Mh(s),$w(c,s)}return t?t(i):i}}var eF=e=>typeof e=="function",Hc=(e,t)=>eF(e)?e(t):e,tF=(()=>{let e=0;return()=>(++e).toString()})(),Pw=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),nF=20,Wc=new Map,rF=1e3,Iw=e=>{if(Wc.has(e))return;let t=setTimeout(()=>{Wc.delete(e),go({type:4,toastId:e})},rF);Wc.set(e,t)},iF=e=>{let t=Wc.get(e);t&&clearTimeout(t)},Nh=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,nF)};case 1:return t.toast.id&&iF(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)?Nh(e,{type:1,toast:n}):Nh(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?Iw(r):e.toasts.forEach(o=>{Iw(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}))}}},Vc=[],Kc={toasts:[],pausedAt:void 0},go=e=>{Kc=Nh(Kc,e),Vc.forEach(t=>{t(Kc)})},oF={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},aF=(e={})=>{let[t,n]=w.useState(Kc);w.useEffect(()=>(Vc.push(n),()=>{let i=Vc.indexOf(n);i>-1&&Vc.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)||oF[i.type],style:{...e.style,...(a=e[i.type])==null?void 0:a.style,...i.style}}});return{...t,toasts:r}},sF=(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)||tF()}),Fs=e=>(t,n)=>{let r=sF(t,e,n);return go({type:2,toast:r}),r.id},Zn=(e,t)=>Fs("blank")(e,t);Zn.error=Fs("error"),Zn.success=Fs("success"),Zn.loading=Fs("loading"),Zn.custom=Fs("custom"),Zn.dismiss=e=>{go({type:3,toastId:e})},Zn.remove=e=>go({type:4,toastId:e}),Zn.promise=(e,t,n)=>{let r=Zn.loading(t.loading,{...n,...n==null?void 0:n.loading});return e.then(i=>(Zn.success(Hc(t.success,i),{id:r,...n,...n==null?void 0:n.success}),i)).catch(i=>{Zn.error(Hc(t.error,i),{id:r,...n,...n==null?void 0:n.error})}),e};var lF=(e,t)=>{go({type:1,toast:{id:e,height:t}})},cF=()=>{go({type:5,time:Date.now()})},uF=e=>{let{toasts:t,pausedAt:n}=aF(e);w.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&&Zn.dismiss(s.id);return}return setTimeout(()=>Zn.dismiss(s.id),l)});return()=>{a.forEach(s=>s&&clearTimeout(s))}},[t,n]);let r=w.useCallback(()=>{n&&go({type:6,time:Date.now()})},[n]),i=w.useCallback((o,a)=>{let{reverseOrder:s=!1,gutter:l=8,defaultPosition:c}=a||{},u=t.filter(f=>(f.position||c)===(o.position||c)&&f.height),d=u.findIndex(f=>f.id===o.id),p=u.filter((f,h)=>h<d&&f.visible).length;return u.filter(f=>f.visible).slice(...s?[p+1]:[0,p]).reduce((f,h)=>f+(h.height||0)+l,0)},[t]);return{toasts:t,handlers:{updateHeight:lF,startPause:cF,endPause:r,calculateOffset:i}}},dF=ii`
54
+ `))}function l(f,h,m,v){const g=m.enter("tableCell"),y=m.enter("phrasing"),b=m.containerPhrasing(f,{...v,before:o,after:o});return y(),g(),b}function c(f,h){return fj(f,{align:h,alignDelimiters:r,padding:n,stringLength:i})}function u(f,h,m){const v=f.children;let g=-1;const y=[],b=h.enter("table");for(;++g<v.length;)y[g]=d(v[g],h,m);return b(),y}function d(f,h,m){const v=f.children;let g=-1;const y=[],b=h.enter("tableRow");for(;++g<v.length;)y[g]=l(v[g],f,h,m);return b(),y}function p(f,h,m){let v=uw.inlineCode(f,h,m);return m.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function eL(){return{exit:{taskListCheckValueChecked:fw,taskListCheckValueUnchecked:fw,paragraph:nL}}}function tL(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:rL}}}function fw(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function nL(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 rL(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=uw.listItem(e,t,n,{...r,...s.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+a}}function iL(){return[N2(),V2(),sj(),Vj(),eL()]}function oL(e){return{extensions:[D2(),K2(),lj(),Qj(e),tL()]}}const aL={tokenize:fL,partial:!0},pw={tokenize:pL,partial:!0},hw={tokenize:hL,partial:!0},mw={tokenize:mL,partial:!0},sL={tokenize:gL,partial:!0},gw={tokenize:uL,previous:vw},yw={tokenize:dL,previous:bw},ni={tokenize:cL,previous:ww},Ir={};function lL(){return{text:Ir}}let mo=48;for(;mo<123;)Ir[mo]=ni,mo++,mo===58?mo=65:mo===91&&(mo=97);Ir[43]=ni,Ir[45]=ni,Ir[46]=ni,Ir[95]=ni,Ir[72]=[ni,yw],Ir[104]=[ni,yw],Ir[87]=[ni,gw],Ir[119]=[ni,gw];function cL(e,t,n){const r=this;let i,o;return a;function a(d){return!Ph(d)||!ww.call(r,r.previous)||Ih(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(d))}function s(d){return Ph(d)?(e.consume(d),s):d===64?(e.consume(d),l):n(d)}function l(d){return d===46?e.check(sL,u,c)(d):d===45||d===95||Sn(d)?(o=!0,e.consume(d),l):u(d)}function c(d){return e.consume(d),i=!0,l}function u(d){return o&&i&&Dn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function uL(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!vw.call(r,r.previous)||Ih(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(aL,e.attempt(pw,e.attempt(hw,o),n),n)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function dL(e,t,n){const r=this;let i="",o=!1;return a;function a(d){return(d===72||d===104)&&bw.call(r,r.previous)&&!Ih(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),s):n(d)}function s(d){if(Dn(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),s;if(d===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(d),l}return n(d)}function l(d){return d===47?(e.consume(d),o?c:(o=!0,l)):n(d)}function c(d){return d===null||Oc(d)||At(d)||ho(d)||Ac(d)?n(d):e.attempt(pw,e.attempt(hw,u),n)(d)}function u(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function fL(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 pL(e,t,n){let r,i,o;return a;function a(c){return c===46||c===95?e.check(mw,l,s)(c):c===null||At(c)||ho(c)||c!==45&&Ac(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 hL(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(mw,t,o)(a):a===null||At(a)||ho(a)?t(a):(e.consume(a),i)}function o(a){return a===41&&r++,e.consume(a),i}}function mL(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||At(s)||ho(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||At(s)||ho(s)?t(s):r(s)}function o(s){return Dn(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):Dn(s)?(e.consume(s),a):n(s)}}function gL(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return Sn(o)?n(o):t(o)}}function vw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||At(e)}function bw(e){return!Dn(e)}function ww(e){return!(e===47||Ph(e))}function Ph(e){return e===43||e===45||e===46||e===95||Sn(e)}function Ih(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 yL={tokenize:CL,partial:!0};function vL(){return{document:{91:{tokenize:xL,continuation:{tokenize:SL},exit:EL}},text:{91:{tokenize:_L},93:{add:"after",tokenize:bL,resolveTo:wL}}}}function bL(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=gr(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 wL(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 _L(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,a;return s;function s(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(o>999||d===93&&!a||d===null||d===91||At(d))return n(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(gr(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return At(d)||(a=!0),o++,e.consume(d),d===92?u:c}function u(d){return d===91||d===92||d===93?(e.consume(d),o++,c):c(d)}}function xL(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,a=0,s;return l;function l(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(h)}function u(h){if(a>999||h===93&&!s||h===null||h===91||At(h))return n(h);if(h===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return o=gr(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return At(h)||(s=!0),a++,e.consume(h),h===92?d:u}function d(h){return h===91||h===92||h===93?(e.consume(h),a++,u):u(h)}function p(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),i.includes(o)||i.push(o),bt(e,f,"gfmFootnoteDefinitionWhitespace")):n(h)}function f(h){return t(h)}}function SL(e,t,n){return e.check(Ns,t,e.attempt(yL,t,n))}function EL(e){e.exit("gfmFootnoteDefinition")}function CL(e,t,n){const r=this;return bt(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 TL(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 u={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[l][1].end)},d={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[l][1].start)},p=[["enter",u,s],["enter",a[c][1],s],["exit",a[c][1],s],["enter",d,s]],f=s.parser.constructs.insideSpan.null;f&&Qn(p,p.length,0,Pc(f,a.slice(c+1,l),s)),Qn(p,p.length,0,[["exit",d,s],["enter",a[l][1],s],["exit",a[l][1],s],["exit",u,s]]),Qn(a,c-1,l-c+3,p),l=c+p.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,u=this.events;let d=0;return p;function p(h){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(h):(a.enter("strikethroughSequenceTemporary"),f(h))}function f(h){const m=$c(c);if(h===126)return d>1?l(h):(a.consume(h),d++,f);if(d<2&&!n)return l(h);const v=a.exit("strikethroughSequenceTemporary"),g=$c(h);return v._open=!g||g===2&&!!m,v._close=!m||m===2&&!!g,s(h)}}}class kL{constructor(){this.map=[]}add(t,n,r){OL(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 OL(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 AL(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 $L(){return{flow:{null:{tokenize:PL,resolveAll:IL}}}}function PL(e,t,n){const r=this;let i=0,o=0,a;return s;function s(k){let N=r.events.length-1;for(;N>-1;){const Z=r.events[N][1].type;if(Z==="lineEnding"||Z==="linePrefix")N--;else break}const z=N>-1?r.events[N][1].type:null,B=z==="tableHead"||z==="tableRow"?S:l;return B===S&&r.parser.lazy[r.now().line]?n(k):B(k)}function l(k){return e.enter("tableHead"),e.enter("tableRow"),c(k)}function c(k){return k===124||(a=!0,o+=1),u(k)}function u(k){return k===null?n(k):Ve(k)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),f):n(k):ht(k)?bt(e,u,"whitespace")(k):(o+=1,a&&(a=!1,i+=1),k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),a=!0,u):(e.enter("data"),d(k)))}function d(k){return k===null||k===124||At(k)?(e.exit("data"),u(k)):(e.consume(k),k===92?p:d)}function p(k){return k===92||k===124?(e.consume(k),d):d(k)}function f(k){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(k):(e.enter("tableDelimiterRow"),a=!1,ht(k)?bt(e,h,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):h(k))}function h(k){return k===45||k===58?v(k):k===124?(a=!0,e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),m):_(k)}function m(k){return ht(k)?bt(e,v,"whitespace")(k):v(k)}function v(k){return k===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),g):k===45?(o+=1,g(k)):k===null||Ve(k)?x(k):_(k)}function g(k){return k===45?(e.enter("tableDelimiterFiller"),y(k)):_(k)}function y(k){return k===45?(e.consume(k),y):k===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(k))}function b(k){return ht(k)?bt(e,x,"whitespace")(k):x(k)}function x(k){return k===124?h(k):k===null||Ve(k)?!a||i!==o?_(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(k)):_(k)}function _(k){return n(k)}function S(k){return e.enter("tableRow"),R(k)}function R(k){return k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),R):k===null||Ve(k)?(e.exit("tableRow"),t(k)):ht(k)?bt(e,R,"whitespace")(k):(e.enter("data"),M(k))}function M(k){return k===null||k===124||At(k)?(e.exit("data"),R(k)):(e.consume(k),k===92?j:M)}function j(k){return k===92||k===124?(e.consume(k),M):M(k)}}function IL(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],a=[0,0,0,0],s=!1,l=0,c,u,d;const p=new kL;for(;++n<e.length;){const f=e[n],h=f[1];f[0]==="enter"?h.type==="tableHead"?(s=!1,l!==0&&(_w(p,t,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(n,0,[["enter",c,t]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(r=!0,d=void 0,o=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,u={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(n,0,[["enter",u,t]])),i=h.type==="tableDelimiterRow"?2:u?3:1):i&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(o[1]!==0&&(a[0]=a[1],d=Zc(p,t,o,i,void 0,d),o=[0,0,0,0]),a[2]=n)):h.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(a[0]=a[1],d=Zc(p,t,o,i,void 0,d)),o=a,a=[o[1],n,0,0])):h.type==="tableHead"?(s=!0,l=n):h.type==="tableRow"||h.type==="tableDelimiterRow"?(l=n,o[1]!==0?(a[0]=a[1],d=Zc(p,t,o,i,n,d)):a[1]!==0&&(d=Zc(p,t,a,i,n,d)),i=0):i&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&_w(p,t,l,c,u),p.consume(t.events),n=-1;++n<t.events.length;){const f=t.events[n];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=AL(t.events,n))}return e}function Zc(e,t,n,r,i,o){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(o.end=Object.assign({},sa(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const l=sa(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=sa(t.events,n[2]),u=sa(t.events,n[3]),d={type:s,start:Object.assign({},c),end:Object.assign({},u)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const p=t.events[n[2]],f=t.events[n[3]];if(p[1].end=Object.assign({},f[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const h=n[2]+1,m=n[3]-n[2]-1;e.add(h,m,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(o.end=Object.assign({},sa(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function _w(e,t,n,r,i){const o=[],a=sa(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 sa(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const RL={tokenize:NL};function ML(){return{text:{91:RL}}}function NL(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 At(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 Ve(l)?t(l):ht(l)?e.check({tokenize:DL},t,n)(l):n(l)}}function DL(e,t,n){return bt(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function jL(e){return Yb([lL(),vL(),TL(e),$L(),ML()])}const LL={};function FL(e){const t=this,n=e||LL,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(jL(n)),o.push(iL()),a.push(oL(n))}const UL=({text:e,type:t,styles:n})=>{const r=n==null?void 0:n[t],i={h1:({node:o,...a})=>U.jsx("h1",{...a,...r==null?void 0:r.heading1}),h2:({node:o,...a})=>U.jsx("h2",{...a,...r==null?void 0:r.heading2}),h3:({node:o,...a})=>U.jsx("h3",{...a,...r==null?void 0:r.heading3}),h4:"h3",h5:"h3",h6:"h3",em:({node:o,...a})=>U.jsx("em",{...a,...r==null?void 0:r.italic}),strong:({node:o,...a})=>U.jsx("strong",{...a,...r==null?void 0:r.bold}),p:({node:o,...a})=>U.jsx("p",{...a,...r==null?void 0:r.text}),hr:({node:o,...a})=>U.jsx("hr",{...a,...r==null?void 0:r.horizontalRule}),a:({node:o,...a})=>U.jsx("a",{...a,...r==null?void 0:r.link,target:"_blank"}),ol:({node:o,...a})=>U.jsx("ol",{...a,...r==null?void 0:r.orderedList}),ul:({node:o,...a})=>U.jsx("ul",{...a,...r==null?void 0:r.unorderedList}),li:({node:o,...a})=>U.jsx("li",{...a,...r==null?void 0:r.listItem}),br:({node:o,...a})=>U.jsx("br",{...a,...r==null?void 0:r.lineBreak}),img:()=>null,pre:({node:o,...a})=>U.jsx("pre",{...a,...r==null?void 0:r.pre})};return U.jsx(T2,{components:i,remarkPlugins:[FL,M2],children:e})},xw=w.createContext(null);function Sw(){const e=w.useContext(xw);if(!e)throw new Error("useComposerContext must be used within a Message");return e}const Ew=w.createContext(null);function BL(){const e=w.useContext(Ew);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const Cw=w.createContext(null);function Tw(){const e=w.useContext(Cw);if(!e)throw new Error("useModalContext must be used within a ModalProvider");return e}const kw=w.createContext(null);function $t(){const e=w.useContext(kw);if(!e)throw new Error("useWebchatContext must be used within a WebchatProvider");return e}const zL=({text:e,buttonValue:t,type:n,styles:r,variant:i,groupId:o,reusable:a,...s})=>{const{eventEmitter:l,client:c}=$t(),[u,d]=w.useState(!1),[p,f]=w.useState(!1),[h,m]=w.useState(!1),{state:v}=$t();w.useEffect(()=>{if(o)return l.on(`button-group-${o}-click`,()=>{f(!0),a||m(!0)})},[l,o,a]);function g(){o&&l.emit(`button-group-${o}-click`),d(!0),a||m(!0),i!=="link"&&(c==null||c.sendMessage(t))}return U.jsx(ZL,{...s,variant:i,onClick:g,disabled:h||v.isReadOnly,"data-activated":u?"":void 0,"data-group-activated":p?"":void 0,"data-type":i,value:t,...r==null?void 0:r[n],children:e})},ZL=e=>{if(e.variant==="link"){const{value:r,variant:i,...o}=e;return U.jsx("a",{...o,href:r,target:"_blank",rel:"noopener noreferrer"})}const{variant:t,...n}=e;return U.jsx("button",{...n})},qL=w.forwardRef(({block:e,styles:t,type:n,...r},i)=>U.jsx("div",{...r,...t==null?void 0:t[n],ref:i,children:U.jsx(ga,{styles:t,block:e})}));function HL(e,t){const n=t?`The ${t} has been copied to your clipboard.`:"Copied to clipboard.";return navigator.clipboard.writeText(e).then(()=>sU({title:n,type:"success"}))}const WL=(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 VL={data:""},KL=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||VL,GL=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,YL=/\/\*[^]*?\*\/| +/g,Ow=/\n+/g,Ii=(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"?Ii(a,o):o+"{"+Ii(a,o[1]=="k"?"":t)+"}":typeof a=="object"?r+=Ii(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+=Ii.p?Ii.p(o,a):o+":"+a+";")}return n+(t&&i?t+"{"+i+"}":i)+r},ri={},Aw=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Aw(e[n]);return t}return e},JL=(e,t,n,r,i)=>{let o=Aw(e),a=ri[o]||(ri[o]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(o));if(!ri[a]){let l=o!==e?e:(c=>{let u,d,p=[{}];for(;u=GL.exec(c.replace(YL,""));)u[4]?p.shift():u[3]?(d=u[3].replace(Ow," ").trim(),p.unshift(p[0][d]=p[0][d]||{})):p[0][u[1]]=u[2].replace(Ow," ").trim();return p[0]})(e);ri[a]=Ii(i?{["@keyframes "+a]:l}:l,n?"":"."+a)}let s=n&&ri.g?ri.g:null;return n&&(ri.g=ri[a]),((l,c,u,d)=>{d?c.data=c.data.replace(d,l):c.data.indexOf(l)===-1&&(c.data=u?l+c.data:c.data+l)})(ri[a],t,r,s),a},XL=(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?"":Ii(s,""):s===!1?"":s}return r+i+(a??"")},"");function qc(e){let t=this||{},n=e.call?e(t.p):e;return JL(n.unshift?n.raw?XL(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,KL(t.target),t.g,t.o,t.k)}let $w,Rh,Mh;qc.bind({g:1});let ii=qc.bind({k:1});function QL(e,t,n,r){Ii.p=t,$w=e,Rh=n,Mh=r}function Ri(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:Rh&&Rh()},s),n.o=/ *go\d+/.test(l),s.className=qc.apply(n,r)+(l?" "+l:""),t&&(s.ref=a);let c=e;return e[0]&&(c=s.as||e,delete s.as),Mh&&c[0]&&Mh(s),$w(c,s)}return t?t(i):i}}var eF=e=>typeof e=="function",Hc=(e,t)=>eF(e)?e(t):e,tF=(()=>{let e=0;return()=>(++e).toString()})(),Pw=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),nF=20,Wc=new Map,rF=1e3,Iw=e=>{if(Wc.has(e))return;let t=setTimeout(()=>{Wc.delete(e),go({type:4,toastId:e})},rF);Wc.set(e,t)},iF=e=>{let t=Wc.get(e);t&&clearTimeout(t)},Nh=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,nF)};case 1:return t.toast.id&&iF(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)?Nh(e,{type:1,toast:n}):Nh(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?Iw(r):e.toasts.forEach(o=>{Iw(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}))}}},Vc=[],Kc={toasts:[],pausedAt:void 0},go=e=>{Kc=Nh(Kc,e),Vc.forEach(t=>{t(Kc)})},oF={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},aF=(e={})=>{let[t,n]=w.useState(Kc);w.useEffect(()=>(Vc.push(n),()=>{let i=Vc.indexOf(n);i>-1&&Vc.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)||oF[i.type],style:{...e.style,...(a=e[i.type])==null?void 0:a.style,...i.style}}});return{...t,toasts:r}},sF=(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)||tF()}),Fs=e=>(t,n)=>{let r=sF(t,e,n);return go({type:2,toast:r}),r.id},Zn=(e,t)=>Fs("blank")(e,t);Zn.error=Fs("error"),Zn.success=Fs("success"),Zn.loading=Fs("loading"),Zn.custom=Fs("custom"),Zn.dismiss=e=>{go({type:3,toastId:e})},Zn.remove=e=>go({type:4,toastId:e}),Zn.promise=(e,t,n)=>{let r=Zn.loading(t.loading,{...n,...n==null?void 0:n.loading});return e.then(i=>(Zn.success(Hc(t.success,i),{id:r,...n,...n==null?void 0:n.success}),i)).catch(i=>{Zn.error(Hc(t.error,i),{id:r,...n,...n==null?void 0:n.error})}),e};var lF=(e,t)=>{go({type:1,toast:{id:e,height:t}})},cF=()=>{go({type:5,time:Date.now()})},uF=e=>{let{toasts:t,pausedAt:n}=aF(e);w.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&&Zn.dismiss(s.id);return}return setTimeout(()=>Zn.dismiss(s.id),l)});return()=>{a.forEach(s=>s&&clearTimeout(s))}},[t,n]);let r=w.useCallback(()=>{n&&go({type:6,time:Date.now()})},[n]),i=w.useCallback((o,a)=>{let{reverseOrder:s=!1,gutter:l=8,defaultPosition:c}=a||{},u=t.filter(f=>(f.position||c)===(o.position||c)&&f.height),d=u.findIndex(f=>f.id===o.id),p=u.filter((f,h)=>h<d&&f.visible).length;return u.filter(f=>f.visible).slice(...s?[p+1]:[0,p]).reduce((f,h)=>f+(h.height||0)+l,0)},[t]);return{toasts:t,handlers:{updateHeight:lF,startPause:cF,endPause:r,calculateOffset:i}}},dF=ii`
55
55
  from {
56
56
  transform: scale(0) rotate(45deg);
57
57
  opacity: 0;
@@ -230,10 +230,10 @@ to {
230
230
  `,Gc=16,DF=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:i,containerStyle:o,containerClassName:a})=>{let{toasts:s,handlers:l}=uF(n);return $.createElement("div",{style:{position:"fixed",zIndex:9999,top:Gc,left:Gc,right:Gc,bottom:Gc,pointerEvents:"none",...o},className:a,onMouseEnter:l.startPause,onMouseLeave:l.endPause},s.map(c=>{let u=c.position||t,d=l.calculateOffset(c,{reverseOrder:e,gutter:r,defaultPosition:t}),p=MF(u,d);return $.createElement(RF,{id:c.id,key:c.id,onHeightUpdate:l.updateHeight,className:c.visible?NF:"",style:p},c.type==="custom"?Hc(c.message,c):i?i(c):$.createElement(IF,{toast:c,position:u}))}))},jF=Object.defineProperty,LF=(e,t,n)=>t in e?jF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Dh=(e,t,n)=>(LF(e,typeof t!="symbol"?t+"":t,n),n);let FF=class{constructor(){Dh(this,"current",this.detect()),Dh(this,"handoffState","pending"),Dh(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Us=new FF,Yc=(e,t)=>{Us.isServer?w.useEffect(e,t):w.useLayoutEffect(e,t)};function la(e){let t=w.useRef(e);return Yc(()=>{t.current=e},[e]),t}function UF(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Jc(){let e=[],t=[],n={enqueue(r){t.push(r)},addEventListener(r,i,o,a){return r.addEventListener(i,o,a),n.add(()=>r.removeEventListener(i,o,a))},requestAnimationFrame(...r){let i=requestAnimationFrame(...r);return n.add(()=>cancelAnimationFrame(i))},nextFrame(...r){return n.requestAnimationFrame(()=>n.requestAnimationFrame(...r))},setTimeout(...r){let i=setTimeout(...r);return n.add(()=>clearTimeout(i))},microTask(...r){let i={current:!0};return UF(()=>{i.current&&r[0]()}),n.add(()=>{i.current=!1})},add(r){return e.push(r),()=>{let i=e.indexOf(r);if(i>=0){let[o]=e.splice(i,1);o()}}},dispose(){for(let r of e.splice(0))r()},async workQueue(){for(let r of t.splice(0))await r()},style(r,i,o){let a=r.style.getPropertyValue(i);return Object.assign(r.style,{[i]:o}),this.add(()=>{Object.assign(r.style,{[i]:a})})}};return n}function Rw(){let[e]=w.useState(Jc);return w.useEffect(()=>()=>e.dispose(),[e]),e}let yo=function(e){let t=la(e);return w.useCallback((...n)=>t.current(...n),[t])};function Mw(){let[e,t]=w.useState(Us.isHandoffComplete);return e&&Us.isHandoffComplete===!1&&t(!1),w.useEffect(()=>{e!==!0&&t(!0)},[e]),w.useEffect(()=>Us.handoff(),[]),e}function Rr(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Rr),r}let BF=Symbol();function Nw(...e){let t=w.useRef(e);w.useEffect(()=>{t.current=e},[e]);let n=yo(r=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(r):i.current=r)});return e.every(r=>r==null||(r==null?void 0:r[BF]))?void 0:n}function Dw(...e){return e.filter(Boolean).join(" ")}var jw=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(jw||{}),oi=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(oi||{});function Lw({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:o=!0,name:a}){let s=Fw(t,e);if(o)return Xc(s,n,r,a);let l=i??0;if(l&2){let{static:c=!1,...u}=s;if(c)return Xc(u,n,r,a)}if(l&1){let{unmount:c=!0,...u}=s;return Rr(c?0:1,{0(){return null},1(){return Xc({...u,hidden:!0,style:{display:"none"}},n,r,a)}})}return Xc(s,n,r,a)}function Xc(e,t={},n,r){var i;let{as:o=n,children:a,refName:s="ref",...l}=Lh(e,["unmount","static"]),c=e.ref!==void 0?{[s]:e.ref}:{},u=typeof a=="function"?a(t):a;l.className&&typeof l.className=="function"&&(l.className=l.className(t));let d={};if(t){let p=!1,f=[];for(let[h,m]of Object.entries(t))typeof m=="boolean"&&(p=!0),m===!0&&f.push(h);p&&(d["data-headlessui-state"]=f.join(" "))}if(o===w.Fragment&&Object.keys(Uw(l)).length>0){if(!w.isValidElement(u)||Array.isArray(u)&&u.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(l).map(h=>` - ${h}`).join(`
231
231
  `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(h=>` - ${h}`).join(`
232
232
  `)].join(`
233
- `));let p=Dw((i=u.props)==null?void 0:i.className,l.className),f=p?{className:p}:{};return w.cloneElement(u,Object.assign({},Fw(u.props,Uw(Lh(l,["ref"]))),d,c,zF(u.ref,c.ref),f))}return w.createElement(o,Object.assign({},Lh(l,["ref"]),o!==w.Fragment&&c,o!==w.Fragment&&d),u)}function zF(...e){return{ref:e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}}function Fw(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](i,...o){let a=n[r];for(let s of a){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;s(i,...o)}}});return t}function jh(e){var t;return Object.assign(w.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Uw(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Lh(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let Fh=w.createContext(null);Fh.displayName="OpenClosedContext";var ai=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ai||{});function Bw(){return w.useContext(Fh)}function ZF({value:e,children:t}){return w.createElement(Fh.Provider,{value:e},t)}function zw(){let e=w.useRef(!1);return Yc(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function qF(e=0){let[t,n]=w.useState(e),r=w.useCallback(s=>n(l=>l|s),[t]),i=w.useCallback(s=>!!(t&s),[t]),o=w.useCallback(s=>n(l=>l&~s),[n]),a=w.useCallback(s=>n(l=>l^s),[n]);return{flags:t,addFlag:r,hasFlag:i,removeFlag:o,toggleFlag:a}}function HF(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function Uh(e,...t){e&&t.length>0&&e.classList.add(...t)}function Bh(e,...t){e&&t.length>0&&e.classList.remove(...t)}function WF(e,t){let n=Jc();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:i}=getComputedStyle(e),[o,a]=[r,i].map(s=>{let[l=0]=s.split(",").filter(Boolean).map(c=>c.includes("ms")?parseFloat(c):parseFloat(c)*1e3).sort((c,u)=>u-c);return l});if(o+a!==0){let s=n.addEventListener(e,"transitionend",l=>{l.target===l.currentTarget&&(t(),s())})}else t();return n.add(()=>t()),n.dispose}function VF(e,t,n,r){let i=n?"enter":"leave",o=Jc(),a=r!==void 0?HF(r):()=>{};i==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let s=Rr(i,{enter:()=>t.enter,leave:()=>t.leave}),l=Rr(i,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),c=Rr(i,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Bh(e,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Uh(e,...s,...c),o.nextFrame(()=>{Bh(e,...c),Uh(e,...l),WF(e,()=>(Bh(e,...s),Uh(e,...t.entered),a()))}),o.dispose}function KF({container:e,direction:t,classes:n,onStart:r,onStop:i}){let o=zw(),a=Rw(),s=la(t);Yc(()=>{let l=Jc();a.add(l.dispose);let c=e.current;if(c&&s.current!=="idle"&&o.current)return l.dispose(),r.current(s.current),l.add(VF(c,n.current,s.current==="enter",()=>{l.dispose(),i.current(s.current)})),l.dispose},[t])}function vo(e=""){return e.split(" ").filter(t=>t.trim().length>1)}let Qc=w.createContext(null);Qc.displayName="TransitionContext";var GF=(e=>(e.Visible="visible",e.Hidden="hidden",e))(GF||{});function YF(){let e=w.useContext(Qc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function JF(){let e=w.useContext(eu);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let eu=w.createContext(null);eu.displayName="NestingContext";function tu(e){return"children"in e?tu(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function Zw(e,t){let n=la(e),r=w.useRef([]),i=zw(),o=Rw(),a=yo((f,h=oi.Hidden)=>{let m=r.current.findIndex(({el:v})=>v===f);m!==-1&&(Rr(h,{[oi.Unmount](){r.current.splice(m,1)},[oi.Hidden](){r.current[m].state="hidden"}}),o.microTask(()=>{var v;!tu(r)&&i.current&&((v=n.current)==null||v.call(n))}))}),s=yo(f=>{let h=r.current.find(({el:m})=>m===f);return h?h.state!=="visible"&&(h.state="visible"):r.current.push({el:f,state:"visible"}),()=>a(f,oi.Unmount)}),l=w.useRef([]),c=w.useRef(Promise.resolve()),u=w.useRef({enter:[],leave:[],idle:[]}),d=yo((f,h,m)=>{l.current.splice(0),t&&(t.chains.current[h]=t.chains.current[h].filter(([v])=>v!==f)),t==null||t.chains.current[h].push([f,new Promise(v=>{l.current.push(v)})]),t==null||t.chains.current[h].push([f,new Promise(v=>{Promise.all(u.current[h].map(([g,y])=>y)).then(()=>v())})]),h==="enter"?c.current=c.current.then(()=>t==null?void 0:t.wait.current).then(()=>m(h)):m(h)}),p=yo((f,h,m)=>{Promise.all(u.current[h].splice(0).map(([v,g])=>g)).then(()=>{var v;(v=l.current.shift())==null||v()}).then(()=>m(h))});return w.useMemo(()=>({children:r,register:s,unregister:a,onStart:d,onStop:p,wait:c,chains:u}),[s,a,r,d,p,u,c])}function XF(){}let QF=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function qw(e){var t;let n={};for(let r of QF)n[r]=(t=e[r])!=null?t:XF;return n}function eU(e){let t=w.useRef(qw(e));return w.useEffect(()=>{t.current=qw(e)},[e]),t}let tU="div",Hw=jw.RenderStrategy,Ww=jh(function(e,t){let{beforeEnter:n,afterEnter:r,beforeLeave:i,afterLeave:o,enter:a,enterFrom:s,enterTo:l,entered:c,leave:u,leaveFrom:d,leaveTo:p,...f}=e,h=w.useRef(null),m=Nw(h,t),v=f.unmount?oi.Unmount:oi.Hidden,{show:g,appear:y,initial:b}=YF(),[x,_]=w.useState(g?"visible":"hidden"),S=JF(),{register:R,unregister:M}=S,j=w.useRef(null);w.useEffect(()=>R(h),[R,h]),w.useEffect(()=>{if(v===oi.Hidden&&h.current){if(g&&x!=="visible"){_("visible");return}return Rr(x,{hidden:()=>M(h),visible:()=>R(h)})}},[x,h,R,M,g,v]);let k=la({enter:vo(a),enterFrom:vo(s),enterTo:vo(l),entered:vo(c),leave:vo(u),leaveFrom:vo(d),leaveTo:vo(p)}),N=eU({beforeEnter:n,afterEnter:r,beforeLeave:i,afterLeave:o}),z=Mw();w.useEffect(()=>{if(z&&x==="visible"&&h.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[h,x,z]);let U=b&&!y,Z=(()=>!z||U||j.current===g?"idle":g?"enter":"leave")(),L=qF(0),F=yo(se=>Rr(se,{enter:()=>{L.addFlag(ai.Opening),N.current.beforeEnter()},leave:()=>{L.addFlag(ai.Closing),N.current.beforeLeave()},idle:()=>{}})),V=yo(se=>Rr(se,{enter:()=>{L.removeFlag(ai.Opening),N.current.afterEnter()},leave:()=>{L.removeFlag(ai.Closing),N.current.afterLeave()},idle:()=>{}})),W=Zw(()=>{_("hidden"),M(h)},S);KF({container:h,classes:k,direction:Z,onStart:la(se=>{W.onStart(h,se,F)}),onStop:la(se=>{W.onStop(h,se,V),se==="leave"&&!tu(W)&&(_("hidden"),M(h))})}),w.useEffect(()=>{!U||(v===oi.Hidden?j.current=null:j.current=g)},[g,U,x]);let pe=f,C={ref:m};return y&&g&&Us.isServer&&(pe={...pe,className:Dw(f.className,...k.current.enter,...k.current.enterFrom)}),w.createElement(eu.Provider,{value:W},w.createElement(ZF,{value:Rr(x,{visible:ai.Open,hidden:ai.Closed})|L.flags},Lw({ourProps:C,theirProps:pe,defaultTag:tU,features:Hw,visible:x==="visible",name:"Transition.Child"})))}),zh=jh(function(e,t){let{show:n,appear:r=!1,unmount:i,...o}=e,a=w.useRef(null),s=Nw(a,t);Mw();let l=Bw();if(n===void 0&&l!==null&&(n=(l&ai.Open)===ai.Open),![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,u]=w.useState(n?"visible":"hidden"),d=Zw(()=>{u("hidden")}),[p,f]=w.useState(!0),h=w.useRef([n]);Yc(()=>{p!==!1&&h.current[h.current.length-1]!==n&&(h.current.push(n),f(!1))},[h,n]);let m=w.useMemo(()=>({show:n,appear:r,initial:p}),[n,r,p]);w.useEffect(()=>{if(n)u("visible");else if(!tu(d))u("hidden");else{let g=a.current;if(!g)return;let y=g.getBoundingClientRect();y.x===0&&y.y===0&&y.width===0&&y.height===0&&u("hidden")}},[n,d]);let v={unmount:i};return w.createElement(eu.Provider,{value:d},w.createElement(Qc.Provider,{value:m},Lw({ourProps:{...v,as:w.Fragment,children:w.createElement(Ww,{ref:s,...v,...o})},theirProps:{},defaultTag:w.Fragment,features:Hw,visible:c==="visible",name:"Transition"})))}),nU=jh(function(e,t){let n=w.useContext(Qc)!==null,r=Bw()!==null;return w.createElement(w.Fragment,null,!n&&r?w.createElement(zh,{ref:t,...e}):w.createElement(Ww,{ref:t,...e}))}),rU=Object.assign(zh,{Child:nU,Root:zh});const iU=e=>$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,...e},$.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m7.5 12 3 3 6-6m5.5 3c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"})),oU=e=>$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",...e},$.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M18 6 6 18M6 6l12 12"})),aU=e=>$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,...e},$.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m15 9-6 6m0-6 6 6m7-3c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));function sU(e){return Zn.custom(t=>B.jsx(cU,{type:e.type,show:t.visible,children:e.type==="custom"?e.content:B.jsx(lU,{...e,toastId:t.id})}))}const lU=({icon:e,type:t,title:n,description:r,toastId:i})=>{const{theme:{notification:o}}=$t();return B.jsxs(B.Fragment,{children:[e?B.jsx(e,{...o==null?void 0:o.icon}):B.jsx(uU,{...o==null?void 0:o.icon,type:t}),B.jsx("p",{...o==null?void 0:o.title,children:n}),r?B.jsx("p",{...o==null?void 0:o.description,children:r}):null,B.jsx(oU,{...o==null?void 0:o.closeIcon,onClick:()=>Zn.dismiss(i)})]})},cU=({type:e,...t})=>{const{theme:{notification:n}}=$t();return B.jsx(rU,{...t,...n==null?void 0:n.container,appear:!0,"data-type":e??"neutral"})},uU=({type:e,className:t})=>{switch(e){case"success":return B.jsx(iU,{className:t});case"error":return B.jsx(aU,{className:t});default:return null}},dU=w.forwardRef(({url:e,type:t,styles:n,orientation:r="auto",...i},o)=>{var p,f;const a=w.useId(),{setIsLoading:s}=BL(),[l,c]=w.useState(r),[u,d]=w.useState(!1);return w.useLayoutEffect(()=>{s(h=>[...h,a])},[]),w.useEffect(()=>{e&&l==="auto"&&WL(e).then(({width:h,height:m})=>{c(fU(h,m)),s(v=>v.filter(g=>g!==a))})},[e]),B.jsxs(B.Fragment,{children:[u?null:B.jsx("div",{"data-orientation":l,...(p=n==null?void 0:n[t])==null?void 0:p.placeholder}),B.jsx("img",{"data-orientation":l,"data-loaded":u,...i,...(f=n==null?void 0:n[t])==null?void 0:f.image,src:e,alt:"",ref:o,loading:"lazy",onLoad:()=>{d(!0)}})]})});function fU(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 pU=w.forwardRef(({url:e,type:t,styles:n,...r},i)=>B.jsx("div",{children:B.jsx("video",{...r,controls:!0,src:e,...n==null?void 0:n[t],ref:i})})),hU=w.forwardRef(({url:e,type:t,styles:n,...r},i)=>B.jsx("div",{children:B.jsx("audio",{...r,controls:!0,src:e,...n==null?void 0:n[t],ref:i})}));function mU({title:e,titleId:t,...n},r){return $.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?$.createElement("title",{id:t},e):null,$.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 gU=$.forwardRef(mU);function yU({title:e,titleId:t,...n},r){return $.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?$.createElement("title",{id:t},e):null,$.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 vU=$.forwardRef(yU);function bU({title:e,titleId:t,...n},r){return $.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?$.createElement("title",{id:t},e):null,$.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 wU=$.forwardRef(bU);function _U({title:e,titleId:t,...n},r){return $.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?$.createElement("title",{id:t},e):null,$.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 xU=$.forwardRef(_U);function SU({title:e,titleId:t,...n},r){return $.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?$.createElement("title",{id:t},e):null,$.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 EU=$.forwardRef(SU);function CU({title:e,titleId:t,...n},r){return $.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?$.createElement("title",{id:t},e):null,$.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 TU=$.forwardRef(CU),kU=w.forwardRef(({type:e,latitude:t,longitude:n,title:r,styles:i,...o},a)=>{var l,c,u;const s=`https://www.google.com/maps/search/?api=1&query=${t},${n}`;return B.jsxs("a",{...o,...(l=i==null?void 0:i[e])==null?void 0:l.container,href:s,type:"_blank",rel:"noopener",ref:a,children:[B.jsx("p",{...(c=i==null?void 0:i[e])==null?void 0:c.title,children:r}),B.jsx(TU,{...(u=i==null?void 0:i[e])==null?void 0:u.icon})]})}),OU=w.forwardRef(({blocks:e,styles:t,type:n,horizontalAlignment:r,verticalAlignment:i,...o},a)=>B.jsx("div",{"data-horizontal":r,"data-vertical":i,...o,...t==null?void 0:t[n],ref:a,children:e.map((s,l)=>B.jsx(ga,{styles:t,block:s},l))})),AU=w.forwardRef(({blocks:e,styles:t,type:n,horizontalAlignment:r,verticalAlignment:i,...o},a)=>B.jsx("div",{"data-horizontal":r,"data-vertical":i,...o,...t==null?void 0:t[n],ref:a,children:e.map((s,l)=>B.jsx(ga,{styles:t,block:s},l))}));function $U(e){return Object.prototype.toString.call(e)==="[object Object]"}function Vw(e){return $U(e)||Array.isArray(e)}function PU(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Zh(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}`:!Vw(s)||!Vw(l)?s===l:Zh(s,l)})}function Kw(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function IU(e,t){if(e.length!==t.length)return!1;const n=Kw(e),r=Kw(t);return n.every((i,o)=>{const a=r[o];return Zh(i,a)})}function qh(e){return typeof e=="number"}function Gw(e){return typeof e=="string"}function Hh(e){return typeof e=="boolean"}function Yw(e){return Object.prototype.toString.call(e)==="[object Object]"}function zt(e){return Math.abs(e)}function Wh(e){return Math.sign(e)}function nu(e,t){return zt(e-t)}function RU(e,t){if(e===0||t===0||zt(e)<=zt(t))return 0;const n=nu(zt(e),zt(t));return zt(n/e)}function Bs(e){return iu(e).map(Number)}function si(e){return e[ru(e)]}function ru(e){return Math.max(0,e.length-1)}function iu(e){return Object.keys(e)}function Jw(e,t){return[e,t].reduce((n,r)=>(iu(r).forEach(i=>{const o=n[i],a=r[i],s=Yw(o)&&Yw(a);n[i]=s?Jw(o,a):a}),n),{})}function Xw(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function MU(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 qh(e)?a():n[e](c)}return{measure:s}}function NU(e,t){const n=e==="y"?"y":"x",r=e==="y"?"x":"y",i=s(),o=l();function a(u){const{width:d,height:p}=u;return n==="x"?d:p}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 Mi(e,t){const n=zt(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 Qw(e,t,n){const{constrain:r}=Mi(0,e),i=e+1;let o=a(t);function a(p){return n?zt((i+p)%i):r(p)}function s(){return o}function l(p){return o=a(p),d}function c(p){return u().set(s()+p)}function u(){return Qw(e,s(),n)}const d={get:s,set:l,add:c,clone:u};return d}function DU(e){const t=e==="rtl"?-1:1;function n(i){return i*t}return{apply:n}}function zs(){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 jU(e,t,n,r,i,o,a,s,l,c,u,d,p,f,h,m,v,g,y){const{cross:b}=e,x=["INPUT","SELECT","TEXTAREA"],_={passive:!1},S=zs(),R=zs(),M=Mi(50,225).constrain(h.measure(20)),j={mouse:300,touch:400},k={mouse:500,touch:600},N=m?43:25;let z=!1,U=0,Z=0,L=!1,F=!1,V=!1,W=!1;function pe(ye,$e){if(!$e)return;function xe(ot){(Hh($e)||$e(ye,ot))&&Be(ot)}const Ue=n;S.add(Ue,"dragstart",ot=>ot.preventDefault(),_).add(Ue,"touchmove",()=>{},_).add(Ue,"touchend",()=>{}).add(Ue,"touchstart",xe).add(Ue,"mousedown",xe).add(Ue,"touchcancel",Ze).add(Ue,"contextmenu",Ze).add(Ue,"click",nt,!0)}function C(){S.clear(),R.clear()}function se(){const ye=W?r:n;R.add(ye,"touchmove",Me,_).add(ye,"touchend",Ze).add(ye,"mousemove",Me,_).add(ye,"mouseup",Ze)}function we(ye){const $e=ye.nodeName||"";return x.includes($e)}function O(){return(m?k:j)[W?"mouse":"touch"]}function Oe(ye,$e){const xe=p.add(Wh(ye)*-1),Ue=d.byDistance(ye,!m).distance;return m||zt(ye)<M?Ue:g&&$e?Ue*.5:d.byIndex(xe.get(),0).distance}function Be(ye){const $e=Xw(ye,i);W=$e,!($e&&ye.button!==0)&&(we(ye.target)||(V=m&&$e&&!ye.buttons&&z,z=nu(o.get(),s.get())>=2,L=!0,a.pointerDown(ye),u.useFriction(0).useDuration(0),o.set(s),se(),U=a.readPoint(ye),Z=a.readPoint(ye,b),f.emit("pointerDown")))}function Me(ye){const $e=a.readPoint(ye),xe=a.readPoint(ye,b),Ue=nu($e,U),ot=nu(xe,Z);if(!F&&!W&&(!ye.cancelable||(F=Ue>ot,!F)))return Ze(ye);const D=a.pointerMove(ye);Ue>v&&(V=!0),u.useFriction(.3).useDuration(1),l.start(),o.add(t.apply(D)),ye.preventDefault()}function Ze(ye){const xe=d.byDistance(0,!1).index!==p.get(),Ue=a.pointerUp(ye)*O(),ot=Oe(t.apply(Ue),xe),D=RU(Ue,ot),ue=N-10*D,me=y+D/50;F=!1,L=!1,R.clear(),u.useDuration(ue).useFriction(me),c.distance(ot,!m),W=!1,f.emit("pointerUp")}function nt(ye){V&&(ye.stopPropagation(),ye.preventDefault())}function We(){return L}return{init:pe,pointerDown:We,destroy:C}}function LU(e,t){let r,i;function o(d){return d.timeStamp}function a(d,p){const h=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(Xw(d,t)?d:d.touches[0])[h]}function s(d){return r=d,i=d,a(d)}function l(d){const p=a(d)-a(i),f=o(d)-o(r)>170;return i=d,f&&(r=d),p}function c(d){if(!r||!i)return 0;const p=a(i)-a(r),f=o(d)-o(r),h=o(d)-o(i)>170,m=p/f;return f&&!h&&zt(m)>.1?m:0}return{pointerDown:s,pointerMove:l,pointerUp:c,readPoint:a}}function FU(e){function t(r){return e*(r/100)}return{measure:t}}function UU(e,t,n,r,i){let o,a,s=[],l=!1;function c(f){return i.measureSize(f.getBoundingClientRect())}function u(f,h){if(!h)return;a=c(e),s=r.map(c);function m(g){for(const y of g){const b=y.target===e,x=r.indexOf(y.target),_=b?a:s[x],S=c(b?e:r[x]);if(_!==S){n.requestAnimationFrame(()=>{f.reInit(),t.emit("resize")});break}}}o=new ResizeObserver(g=>{l||(Hh(h)||h(f,g))&&m(g)}),[e].concat(r).forEach(g=>o.observe(g))}function d(){o&&o.disconnect(),l=!0}return{init:u,destroy:d}}function BU(e,t,n,r){let i=!0,o=0,a=0,s=n,l=r,c=e.get(),u=0;function d(){const _=t.get()-e.get(),S=!s;let R=0;return S?(o=0,e.set(t),R=_):(o+=_/s,o*=l,c+=o,e.add(o),R=c-u),a=Wh(R),u=c,i=zt(_)<.001,x}function p(){return i}function f(){return s}function h(){return a}function m(){return o}function v(){return y(n)}function g(){return b(r)}function y(_){return s=_,x}function b(_){return l=_,x}const x={direction:h,duration:f,velocity:m,seek:d,settled:p,useBaseFriction:g,useBaseDuration:v,useFriction:b,useDuration:y};return x}function zU(e,t,n,r,i){const o=i.measure(10),a=i.measure(50),s=Mi(.1,.99);let l=!1;function c(){return!(l||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(f){if(!c())return;const h=e.reachedMin(t.get())?"min":"max",m=zt(e[h]-t.get()),v=n.get()-t.get(),g=s.constrain(m/a);n.subtract(v*g),!f&&zt(v)<o&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function d(f){l=!f}return{constrain:u,toggleActive:d}}function ZU(e,t,n,r){const i=Mi(-t+e,n[0]),o=l(),a=c();function s(){const d=o[0],p=si(o),f=o.lastIndexOf(d),h=o.indexOf(p)+1;return Mi(f,h)}function l(){return n.map(i.constrain).map(d=>parseFloat(d.toFixed(3)))}function c(){if(t<=e)return[i.max];if(r==="keepSnaps")return o;const{min:d,max:p}=s();return o.slice(d,p)}return{snapsContained:a}}function qU(e,t,n){const r=t[0],i=n?r-e:si(t);return{limit:Mi(i,r)}}function HU(e,t,n,r){const o=t.min+.1,a=t.max+.1,{reachedMin:s,reachedMax:l}=Mi(o,a);function c(p){return p===1?l(n.get()):p===-1?s(n.get()):!1}function u(p){if(!c(p))return;const f=e*(p*-1);r.forEach(h=>h.add(f))}return{loop:u}}function WU(e){const{max:t,length:n}=e;function r(o){return(o-t)/-n}return{get:r}}function VU(e,t,n,r,i,o,a){const{startEdge:s,endEdge:l}=e,{groupSlides:c}=o,u=f().map(t.measure),d=h(),p=m();function f(){return c(r).map(g=>si(g)[l]-g[0][s]).map(zt)}function h(){return r.map(g=>n[s]-g[s]).map(g=>-zt(g))}function m(){const y=si(d)-si(i);return c(d).map(b=>b[0]).map((b,x,_)=>{const S=!x,R=x===ru(_);return a&&S?0:a&&R?y:b+u[x]})}return{snaps:d,snapsAligned:p}}function KU(e,t,n,r,i){const{reachedAny:o,removeOffset:a,constrain:s}=r;function l(h){return h.concat().sort((m,v)=>zt(m)-zt(v))[0]}function c(h){const m=e?a(h):s(h),v=t.map(y=>y-m).map(y=>u(y,0)).map((y,b)=>({diff:y,index:b})).sort((y,b)=>zt(y.diff)-zt(b.diff)),{index:g}=v[0];return{index:g,distance:m}}function u(h,m){const v=[h,h+n,h-n];if(!e)return v[0];if(!m)return l(v);const g=v.filter(y=>Wh(y)===m);return l(g)}function d(h,m){const v=t[h]-i.get(),g=u(v,m);return{index:h,distance:g}}function p(h,m){const v=i.get()+h,{index:g,distance:y}=c(v),b=!e&&o(v);if(!m||b)return{index:g,distance:h};const x=t[g]-y,_=h+u(x,0);return{index:g,distance:_}}return{byDistance:p,byIndex:d,shortcut:u}}function GU(e,t,n,r,i,o,a){function s(d){const p=d.distance,f=d.index!==t.get();o.add(p),p&&(i.duration()?e.start():(e.update(),e.render(1),e.update())),f&&(n.set(t.get()),t.set(d.index),a.emit("select"))}function l(d,p){const f=r.byDistance(d,p);s(f)}function c(d,p){const f=t.clone().set(d),h=r.byIndex(f.get(),p);s(h)}return{distance:l,index:c}}function ou(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 qh(l)?l:l.get()}return{get:n,set:r,add:i,subtract:o}}function e_(e,t,n){const r=e.scroll==="x"?a:s,i=n.style;let o=!1;function a(p){return`translate3d(${p}px,0px,0px)`}function s(p){return`translate3d(0px,${p}px,0px)`}function l(p){o||(i.transform=r(t.apply(p)))}function c(p){o=!p}function u(){o||(i.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:u,to:l,toggleActive:c}}function YU(e,t,n,r,i,o,a,s,l){const c=Bs(i),u=Bs(i).reverse(),d=m().concat(v());function p(_,S){return _.reduce((R,M)=>R-i[M],S)}function f(_,S){return _.reduce((R,M)=>p(R,S)>0?R.concat([M]):R,[])}function h(_,S){const R=S==="start",M=R?-r:r,j=a.findSlideBounds([M]);return _.map(k=>{const N=R?0:-r,z=R?r:0,Z=j.filter(L=>L.index===k)[0][R?"end":"start"];return{index:k,slideLocation:ou(-1),translate:e_(e,t,l[k]),target:()=>s.get()>Z?N:z}})}function m(){const _=o[0]-1,S=f(u,_);return h(S,"end")}function v(){const _=n-o[0]-1,S=f(c,_);return h(S,"start")}function g(){return d.every(({index:_})=>{const S=c.filter(R=>R!==_);return p(S,n)<=.1})}function y(){d.forEach(_=>{const{target:S,translate:R,slideLocation:M}=_,j=S();j!==M.get()&&(R.to(j),M.set(j))})}function b(){d.forEach(_=>_.translate.clear())}return{canLoop:g,clear:b,loop:y,loopPoints:d}}function JU(e,t){let n,r=!1;function i(s,l){if(!l)return;function c(u){for(const d of u)if(d.type==="childList"){s.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(u=>{r||(Hh(l)||l(s,u))&&c(u)}),n.observe(e,{childList:!0})}function o(){n&&n.disconnect(),r=!0}return{init:i,destroy:o}}function XU(e,t,n,r,i,o,a){const{removeOffset:s,constrain:l}=i,c=.5,u=o?[0,t,-t]:[0],d=f(u,a);function p(v){const g=v||0;return n.map(y=>Mi(c,y-c).constrain(y*g))}function f(v,g){const y=v||u,b=p(g);return y.reduce((x,_)=>{const S=r.map((R,M)=>({start:R-n[M]+b[M]+_,end:R+e-b[M]+_,index:M}));return x.concat(S)},[])}function h(v,g){const y=o?s(v):l(v);return(g||d).reduce((x,_)=>{const{index:S,start:R,end:M}=_,j=x.includes(S),k=R<y&&M>y;return!j&&k?x.concat([S]):x},[])}return{check:h,findSlideBounds:f}}function QU(e,t,n,r,i,o){const{measureSize:a,startEdge:s,endEdge:l}=e,c=n[0]&&i,u=h(),d=m(),p=n.map(a),f=v();function h(){if(!c)return 0;const y=n[0];return zt(t[s]-y[s])}function m(){if(!c)return 0;const y=o.getComputedStyle(si(r));return parseFloat(y.getPropertyValue(`margin-${l}`))}function v(){return n.map((y,b,x)=>{const _=!b,S=b===ru(x);return _?p[b]+u:S?p[b]+d:x[b+1][s]-y[s]}).map(zt)}return{slideSizes:p,slideSizesWithGaps:f}}function eB(e,t,n){const r=qh(n);function i(l,c){return Bs(l).filter(u=>u%c===0).map(u=>l.slice(u,u+c))}function o(l){return Bs(l).reduce((c,u)=>{const p=t.slice(si(c),u+1).reduce((f,h)=>f+h,0);return!u||p>e?c.concat(u):c},[]).map((c,u,d)=>l.slice(c,d[u+1]))}function a(l){return r?i(l,n):o(l)}return{groupSlides:a}}function tB(e,t,n,r,i,o,a,s){const{align:l,axis:c,direction:u,startIndex:d,inViewThreshold:p,loop:f,duration:h,dragFree:m,dragThreshold:v,slidesToScroll:g,skipSnaps:y,containScroll:b}=o,x=t.getBoundingClientRect(),_=n.map(me=>me.getBoundingClientRect()),S=DU(u),R=NU(c,u),M=R.measureSize(x),j=FU(M),k=MU(l,M),N=!f&&!!b,z=f||!!b,{slideSizes:U,slideSizesWithGaps:Z}=QU(R,x,_,n,z,i),L=eB(M,Z,g),{snaps:F,snapsAligned:V}=VU(R,k,x,_,Z,L,N),W=-si(F)+si(Z),{snapsContained:pe}=ZU(M,W,V,b),C=N?pe:V,{limit:se}=qU(W,C,f),we=Qw(ru(C),d,f),O=we.clone(),Oe=Bs(n),Be=({dragHandler:me,scrollBody:fe,scrollBounds:Le,eventHandler:De,animation:Ke,options:{loop:gt}})=>{const Xe=me.pointerDown();gt||Le.constrain(Xe);const q=fe.seek().settled();q&&!Xe&&(Ke.stop(),De.emit("settle")),q||De.emit("scroll")},Me=({scrollBody:me,translate:fe,location:Le,offsetLocation:De,scrollLooper:Ke,slideLooper:gt,options:{loop:Xe}},q)=>{const X=me.velocity();De.set(Le.get()-X+X*q),Xe&&(Ke.loop(me.direction()),gt.loop()),fe.to(De.get())},Ze={start:()=>s.start(ue),stop:()=>s.stop(ue),update:()=>Be(ue),render:me=>Me(ue,me)},nt=.68,We=C[we.get()],_e=ou(We),ye=ou(We),$e=ou(We),xe=BU(_e,$e,h,nt),Ue=KU(f,C,W,se,$e),ot=GU(Ze,we,O,Ue,xe,$e,a),D=XU(M,W,U,F,se,f,p),ue={ownerDocument:r,ownerWindow:i,eventHandler:a,containerRect:x,slideRects:_,animation:Ze,axis:R,direction:S,dragHandler:jU(R,S,e,r,i,$e,LU(R,i),_e,Ze,ot,xe,Ue,we,a,j,m,v,y,nt),eventStore:zs(),percentOfView:j,index:we,indexPrevious:O,limit:se,location:_e,offsetLocation:ye,options:o,resizeHandler:UU(t,a,i,n,R),scrollBody:xe,scrollBounds:zU(se,_e,$e,xe,j),scrollLooper:HU(W,se,ye,[_e,ye,$e]),scrollProgress:WU(se),scrollSnaps:C,scrollTarget:Ue,scrollTo:ot,slideLooper:YU(R,S,M,W,Z,C,D,ye,n),slidesHandler:JU(t,a),slidesInView:D,slideIndexes:Oe,slidesToScroll:L,target:$e,translate:e_(R,S,t)};return ue}function nB(e){const t=16.666666666666668;let n=[],r=null,i=0,o=0;function a(d){r||(r=d);const p=d-r;for(r=d,i+=p;i>=t;)n.forEach(({animation:h})=>h.update()),i-=t;const f=zt(i/t);n.forEach(({animation:h})=>h.render(f)),o&&e.requestAnimationFrame(a)}function s(d){n.includes(d)||n.push(d),!o&&(o=e.requestAnimationFrame(a))}function l(d){n=n.filter(p=>p!==d),!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 rB(){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(u=>u!==c),s}const s={init:n,emit:i,off:a,on:o};return s}const iB={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 oB(e){function t(o,a){return Jw(o,a||{})}function n(o){const a=o.breakpoints||{},s=iu(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=>iu(a.breakpoints||{})).reduce((a,s)=>a.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function aB(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 ca(e,t,n){const r=e.ownerDocument,i=r.defaultView,o=oB(i),a=aB(o),s=zs(),l=zs(),c=rB(),{animationRealms:u}=ca,{mergeOptions:d,optionsAtMedia:p,optionsMediaQueries:f}=o,{on:h,off:m,emit:v}=c,g=U;let y=!1,b,x=d(iB,ca.globalOptions),_=d(x),S=[],R,M,j;function k(){const{container:xe,slides:Ue}=_;M=(Gw(xe)?e.querySelector(xe):xe)||e.children[0];const D=Gw(Ue)?M.querySelectorAll(Ue):Ue;j=[].slice.call(D||M.children)}function N(xe,Ue){const ot=tB(e,M,j,r,i,xe,c,Ue);if(xe.loop&&!ot.slideLooper.canLoop()){const D=Object.assign({},xe,{loop:!1});return N(D,Ue)}return ot}function z(xe,Ue){if(y)return;const ot=u.find(ue=>ue.window===i),D=ot||nB(i);ot||u.push(D),x=d(x,xe),_=p(x),S=Ue||S,k(),b=N(_,D),f([x,...S.map(({options:ue})=>ue)]).forEach(ue=>s.add(ue,"change",U)),_.active&&(b.translate.to(b.location.get()),b.eventHandler.init($e),b.resizeHandler.init($e,_.watchResize),b.slidesHandler.init($e,_.watchSlides),l.add(r,"visibilitychange",()=>{r.hidden&&D.reset()}),b.options.loop&&b.slideLooper.loop(),M.offsetParent&&j.length&&b.dragHandler.init($e,_.watchDrag),R=a.init(S,$e))}function U(xe,Ue){const ot=Be();Z(),z(d({startIndex:ot},xe),Ue),c.emit("reInit")}function Z(){b.dragHandler.destroy(),b.animation.stop(),b.eventStore.clear(),b.translate.clear(),b.slideLooper.clear(),b.resizeHandler.destroy(),b.slidesHandler.destroy(),a.destroy(),s.clear(),l.clear()}function L(){y||(y=!0,s.clear(),Z(),c.emit("destroy"))}function F(xe){const Ue=b[xe?"target":"location"].get(),ot=_.loop?"removeOffset":"constrain";return b.slidesInView.check(b.limit[ot](Ue))}function V(xe){const Ue=F(xe);return b.slideIndexes.filter(ot=>!Ue.includes(ot))}function W(xe,Ue,ot){!_.active||y||(b.scrollBody.useBaseFriction().useDuration(Ue?0:_.duration),b.scrollTo.index(xe,ot||0))}function pe(xe){const Ue=b.index.add(1).get();W(Ue,xe===!0,-1)}function C(xe){const Ue=b.index.add(-1).get();W(Ue,xe===!0,1)}function se(){return b.index.add(1).get()!==Be()}function we(){return b.index.add(-1).get()!==Be()}function O(){return b.scrollSnaps.map(b.scrollProgress.get)}function Oe(){return b.scrollProgress.get(b.location.get())}function Be(){return b.index.get()}function Me(){return b.indexPrevious.get()}function Ze(){return R}function nt(){return b}function We(){return e}function _e(){return M}function ye(){return j}const $e={canScrollNext:se,canScrollPrev:we,containerNode:_e,internalEngine:nt,destroy:L,off:m,on:h,emit:v,plugins:Ze,previousScrollSnap:Me,reInit:g,rootNode:We,scrollNext:pe,scrollPrev:C,scrollProgress:Oe,scrollSnapList:O,scrollTo:W,selectedScrollSnap:Be,slideNodes:ye,slidesInView:F,slidesNotInView:V};return z(t,n),setTimeout(()=>c.emit("init"),0),$e}ca.animationRealms=[],ca.globalOptions=void 0;function Vh(e={},t=[]){const n=w.useRef(e),r=w.useRef(t),[i,o]=w.useState(),[a,s]=w.useState(),l=w.useCallback(()=>{i&&i.reInit(n.current,r.current)},[i]);return w.useEffect(()=>{if(PU()&&a){ca.globalOptions=Vh.globalOptions;const c=ca(a,n.current,r.current);return o(c),()=>c.destroy()}else o(void 0)},[a,o]),w.useEffect(()=>{Zh(n.current,e)||(n.current=e,l())},[e,l]),w.useEffect(()=>{IU(r.current,t)||(r.current=t,l())},[t,l]),[s,i]}Vh.globalOptions=void 0;function sB({title:e,titleId:t,...n},r){return $.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?$.createElement("title",{id:t},e):null,$.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 lB=$.forwardRef(sB);function cB({title:e,titleId:t,...n},r){return $.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?$.createElement("title",{id:t},e):null,$.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 uB=$.forwardRef(cB);function dB({title:e,titleId:t,...n},r){return $.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?$.createElement("title",{id:t},e):null,$.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"}),$.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 fB=$.forwardRef(dB);function pB({title:e,titleId:t,...n},r){return $.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?$.createElement("title",{id:t},e):null,$.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"}),$.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 hB=$.forwardRef(pB);function mB({title:e,titleId:t,...n},r){return $.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?$.createElement("title",{id:t},e):null,$.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 gB=$.forwardRef(mB);function yB({title:e,titleId:t,...n},r){return $.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?$.createElement("title",{id:t},e):null,$.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 vB=$.forwardRef(yB);function bB({title:e,titleId:t,...n},r){return $.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?$.createElement("title",{id:t},e):null,$.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 wB=$.forwardRef(bB),_B=w.forwardRef(({type:e,styles:t,blocks:n},r)=>{const[i,o]=Vh({skipSnaps:!0}),[a,s]=w.useState(!0),[l,c]=w.useState(!0),u=w.useCallback(()=>o&&o.scrollPrev(),[o]),d=w.useCallback(()=>o&&o.scrollNext(),[o]),p=t==null?void 0:t[e],f=w.useCallback(h=>{s(!h.canScrollPrev()),c(!h.canScrollNext())},[]);return w.useEffect(()=>{o&&(f(o),o.on("reInit",f),o.on("select",f))},[o,f]),B.jsxs("div",{...p==null?void 0:p.container,"data-container":"carousel",ref:i,children:[B.jsx("div",{ref:r,...p==null?void 0:p.slidesContainer,children:n.map((h,m)=>B.jsx(ga,{styles:t,block:h},m))}),B.jsx(lB,{...p==null?void 0:p.backButton,"data-disabled":a?"":void 0,onClick:u}),B.jsx(uB,{...p==null?void 0:p.nextButton,"data-disabled":l?"":void 0,onClick:d})]})}),ua=Math.min,er=Math.max,au=Math.round,da=Math.floor,Ni=e=>({x:e,y:e});function t_(e,t,n){return er(e,ua(t,n))}function su(e,t){return typeof e=="function"?e(t):e}function Zs(e){return e.split("-")[0]}function Kh(e){return e.split("-")[1]}function n_(e){return e==="x"?"y":"x"}function xB(e){return e==="y"?"height":"width"}function qs(e){return["top","bottom"].includes(Zs(e))?"y":"x"}function SB(e){return n_(qs(e))}function EB(e){return{top:0,right:0,bottom:0,left:0,...e}}function CB(e){return typeof e!="number"?EB(e):{top:e,right:e,bottom:e,left:e}}function lu(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Di(e){return r_(e)?(e.nodeName||"").toLowerCase():"#document"}function tr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function li(e){var t;return(t=(r_(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function r_(e){return e instanceof Node||e instanceof tr(e).Node}function Wt(e){return e instanceof Element||e instanceof tr(e).Element}function En(e){return e instanceof HTMLElement||e instanceof tr(e).HTMLElement}function Gh(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof tr(e).ShadowRoot}function Hs(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=nr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function TB(e){return["table","td","th"].includes(Di(e))}function Yh(e){const t=Jh(),n=nr(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 kB(e){let t=bo(e);for(;En(t)&&!Ws(t);){if(Yh(t))return t;t=bo(t)}return null}function Jh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ws(e){return["html","body","#document"].includes(Di(e))}function nr(e){return tr(e).getComputedStyle(e)}function cu(e){return Wt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function bo(e){if(Di(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Gh(e)&&e.host||li(e);return Gh(t)?t.host:t}function i_(e){const t=bo(e);return Ws(t)?e.ownerDocument?e.ownerDocument.body:e.body:En(t)&&Hs(t)?t:i_(t)}function ji(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=i_(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=tr(i);return o?t.concat(a,a.visualViewport||[],Hs(i)?i:[],a.frameElement&&n?ji(a.frameElement):[]):t.concat(i,ji(i,[],n))}function Li(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 qn(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Gh(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function o_(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function OB(){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 a_(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(o_())||t.test(OB()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function s_(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 l_(){return/apple/i.test(navigator.vendor)}function AB(){return o_().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function c_(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function $B(e){return"nativeEvent"in e}function PB(e){return e.matches("html,body")}function yr(e){return(e==null?void 0:e.ownerDocument)||document}function Xh(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 u_(e){return"composedPath"in e?e.composedPath()[0]:e.target}const IB="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function d_(e){return En(e)&&e.matches(IB)}function yn(e){e.preventDefault(),e.stopPropagation()}function f_(e,t,n){let{reference:r,floating:i}=e;const o=qs(t),a=SB(t),s=xB(a),l=Zs(t),c=o==="y",u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,p=r[s]/2-i[s]/2;let f;switch(l){case"top":f={x:u,y:r.y-i.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-i.width,y:d};break;default:f={x:r.x,y:r.y}}switch(Kh(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1);break}return f}const RB=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:u,y:d}=f_(c,r,l),p=r,f={},h=0;for(let m=0;m<s.length;m++){const{name:v,fn:g}=s[m],{x:y,y:b,data:x,reset:_}=await g({x:u,y:d,initialPlacement:r,placement:p,strategy:i,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});if(u=y??u,d=b??d,f={...f,[v]:{...f[v],...x}},_&&h<=50){h++,typeof _=="object"&&(_.placement&&(p=_.placement),_.rects&&(c=_.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):_.rects),{x:u,y:d}=f_(c,p,l)),m=-1;continue}}return{x:u,y:d,placement:p,strategy:i,middlewareData:f}};async function p_(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:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=su(t,e),h=CB(f),v=s[p?d==="floating"?"reference":"floating":d],g=lu(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(v)))==null||n?v:v.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y=d==="floating"?{...a.floating,x:r,y:i}:a.reference,b=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),x=await(o.isElement==null?void 0:o.isElement(b))?await(o.getScale==null?void 0:o.getScale(b))||{x:1,y:1}:{x:1,y:1},_=lu(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:y,offsetParent:b,strategy:l}):y);return{top:(g.top-_.top+h.top)/x.y,bottom:(_.bottom-g.bottom+h.bottom)/x.y,left:(g.left-_.left+h.left)/x.x,right:(_.right-g.right+h.right)/x.x}}async function MB(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=Zs(n),s=Kh(n),l=qs(n)==="y",c=["left","top"].includes(a)?-1:1,u=o&&l?-1:1,d=su(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof h=="number"&&(f=s==="end"?h*-1:h),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}const NB=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await MB(t,e);return{x:n+i.x,y:r+i.y,data:i}}}},DB=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:v=>{let{x:g,y}=v;return{x:g,y}}},...l}=su(e,t),c={x:n,y:r},u=await p_(t,l),d=qs(Zs(i)),p=n_(d);let f=c[p],h=c[d];if(o){const v=p==="y"?"top":"left",g=p==="y"?"bottom":"right",y=f+u[v],b=f-u[g];f=t_(y,f,b)}if(a){const v=d==="y"?"top":"left",g=d==="y"?"bottom":"right",y=h+u[v],b=h-u[g];h=t_(y,h,b)}const m=s.fn({...t,[p]:f,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},jB=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}=su(e,t),l=await p_(t,s),c=Zs(n),u=Kh(n),d=qs(n)==="y",{width:p,height:f}=r.floating;let h,m;c==="top"||c==="bottom"?(h=c,m=u===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(m=c,h=u==="end"?"top":"bottom");const v=f-l[h],g=p-l[m],y=!t.middlewareData.shift;let b=v,x=g;if(d){const S=p-l.left-l.right;x=u||y?ua(g,S):S}else{const S=f-l.top-l.bottom;b=u||y?ua(v,S):S}if(y&&!u){const S=er(l.left,0),R=er(l.right,0),M=er(l.top,0),j=er(l.bottom,0);d?x=p-2*(S!==0||R!==0?S+R:er(l.left,l.right)):b=f-2*(M!==0||j!==0?M+j:er(l.top,l.bottom))}await a({...t,availableWidth:x,availableHeight:b});const _=await i.getDimensions(o.floating);return p!==_.width||f!==_.height?{reset:{rects:!0}}:{}}}};function h_(e){const t=nr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=En(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=au(n)!==o||au(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function Qh(e){return Wt(e)?e:e.contextElement}function fa(e){const t=Qh(e);if(!En(t))return Ni(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=h_(t);let a=(o?au(n.width):n.width)/r,s=(o?au(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const LB=Ni(0);function m_(e){const t=tr(e);return!Jh()||!t.visualViewport?LB:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function FB(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==tr(e)?!1:t}function wo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=Qh(e);let a=Ni(1);t&&(r?Wt(r)&&(a=fa(r)):a=fa(e));const s=FB(o,n,r)?m_(o):Ni(0);let l=(i.left+s.x)/a.x,c=(i.top+s.y)/a.y,u=i.width/a.x,d=i.height/a.y;if(o){const p=tr(o),f=r&&Wt(r)?tr(r):r;let h=p.frameElement;for(;h&&r&&f!==p;){const m=fa(h),v=h.getBoundingClientRect(),g=nr(h),y=v.left+(h.clientLeft+parseFloat(g.paddingLeft))*m.x,b=v.top+(h.clientTop+parseFloat(g.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,d*=m.y,l+=y,c+=b,h=tr(h).frameElement}}return lu({width:u,height:d,x:l,y:c})}function UB(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=En(n),o=li(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0},s=Ni(1);const l=Ni(0);if((i||!i&&r!=="fixed")&&((Di(n)!=="body"||Hs(o))&&(a=cu(n)),En(n))){const c=wo(n);s=fa(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 BB(e){return Array.from(e.getClientRects())}function g_(e){return wo(li(e)).left+cu(e).scrollLeft}function zB(e){const t=li(e),n=cu(e),r=e.ownerDocument.body,i=er(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=er(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+g_(e);const s=-n.scrollTop;return nr(r).direction==="rtl"&&(a+=er(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}function ZB(e,t){const n=tr(e),r=li(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=Jh();(!c||c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function qB(e,t){const n=wo(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=En(e)?fa(e):Ni(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 y_(e,t,n){let r;if(t==="viewport")r=ZB(e,n);else if(t==="document")r=zB(li(e));else if(Wt(t))r=qB(t,n);else{const i=m_(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return lu(r)}function v_(e,t){const n=bo(e);return n===t||!Wt(n)||Ws(n)?!1:nr(n).position==="fixed"||v_(n,t)}function HB(e,t){const n=t.get(e);if(n)return n;let r=ji(e,[],!1).filter(s=>Wt(s)&&Di(s)!=="body"),i=null;const o=nr(e).position==="fixed";let a=o?bo(e):e;for(;Wt(a)&&!Ws(a);){const s=nr(a),l=Yh(a);!l&&s.position==="fixed"&&(i=null),(o?!l&&!i:!l&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Hs(a)&&!l&&v_(e,a))?r=r.filter(u=>u!==a):i=s,a=bo(a)}return t.set(e,r),r}function WB(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?HB(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=y_(t,u,i);return c.top=er(d.top,c.top),c.right=ua(d.right,c.right),c.bottom=ua(d.bottom,c.bottom),c.left=er(d.left,c.left),c},y_(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function VB(e){return h_(e)}function KB(e,t,n){const r=En(t),i=li(t),o=n==="fixed",a=wo(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=Ni(0);if(r||!r&&!o)if((Di(t)!=="body"||Hs(i))&&(s=cu(t)),r){const c=wo(t,!0,o,t);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else i&&(l.x=g_(i));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function b_(e,t){return!En(e)||nr(e).position==="fixed"?null:t?t(e):e.offsetParent}function w_(e,t){const n=tr(e);if(!En(e))return n;let r=b_(e,t);for(;r&&TB(r)&&nr(r).position==="static";)r=b_(r,t);return r&&(Di(r)==="html"||Di(r)==="body"&&nr(r).position==="static"&&!Yh(r))?n:r||kB(e)||n}const GB=async function(e){let{reference:t,floating:n,strategy:r}=e;const i=this.getOffsetParent||w_,o=this.getDimensions;return{reference:KB(t,await i(n),r),floating:{x:0,y:0,...await o(n)}}};function YB(e){return nr(e).direction==="rtl"}const JB={convertOffsetParentRelativeRectToViewportRelativeRect:UB,getDocumentElement:li,getClippingRect:WB,getOffsetParent:w_,getElementRects:GB,getClientRects:BB,getDimensions:VB,getScale:fa,isElement:Wt,isRTL:YB};function XB(e,t){let n=null,r;const i=li(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:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const f=da(u),h=da(i.clientWidth-(c+d)),m=da(i.clientHeight-(u+p)),v=da(c),y={rootMargin:-f+"px "+-h+"px "+-m+"px "+-v+"px",threshold:er(0,ua(1,l))||1};let b=!0;function x(_){const S=_[0].intersectionRatio;if(S!==l){if(!b)return a();S?a(!1,S):r=setTimeout(()=>{a(!1,1e-7)},100)}b=!1}try{n=new IntersectionObserver(x,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(x,y)}n.observe(e)}return a(!0),o}function QB(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=Qh(e),u=i||o?[...c?ji(c):[],...ji(t)]:[];u.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),o&&g.addEventListener("resize",n)});const d=c&&s?XB(c,n):null;let p=-1,f=null;a&&(f=new ResizeObserver(g=>{let[y]=g;y&&y.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{f&&f.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let h,m=l?wo(e):null;l&&v();function v(){const g=wo(e);m&&(g.x!==m.x||g.y!==m.y||g.width!==m.width||g.height!==m.height)&&n(),m=g,h=requestAnimationFrame(v)}return n(),()=>{u.forEach(g=>{i&&g.removeEventListener("scroll",n),o&&g.removeEventListener("resize",n)}),d&&d(),f&&f.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const e3=(e,t,n)=>{const r=new Map,i={platform:JB,...n},o={...i.platform,_c:r};return RB(e,t,{...i,platform:o})};var uu=typeof document<"u"?w.useLayoutEffect:w.useEffect;function du(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(!du(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)&&!du(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function __(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function x_(e,t){const n=__(e);return Math.round(t*n)/n}function S_(e){const t=$.useRef(e);return uu(()=>{t.current=e}),t}function t3(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,[u,d]=$.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=$.useState(r);du(p,r)||f(r);const[h,m]=$.useState(null),[v,g]=$.useState(null),y=$.useCallback(F=>{F!=S.current&&(S.current=F,m(F))},[m]),b=$.useCallback(F=>{F!==R.current&&(R.current=F,g(F))},[g]),x=o||h,_=a||v,S=$.useRef(null),R=$.useRef(null),M=$.useRef(u),j=S_(l),k=S_(i),N=$.useCallback(()=>{if(!S.current||!R.current)return;const F={placement:t,strategy:n,middleware:p};k.current&&(F.platform=k.current),e3(S.current,R.current,F).then(V=>{const W={...V,isPositioned:!0};z.current&&!du(M.current,W)&&(M.current=W,eR.flushSync(()=>{d(W)}))})},[p,t,n,k]);uu(()=>{c===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,d(F=>({...F,isPositioned:!1})))},[c]);const z=$.useRef(!1);uu(()=>(z.current=!0,()=>{z.current=!1}),[]),uu(()=>{if(x&&(S.current=x),_&&(R.current=_),x&&_){if(j.current)return j.current(x,_,N);N()}},[x,_,N,j]);const U=$.useMemo(()=>({reference:S,floating:R,setReference:y,setFloating:b}),[y,b]),Z=$.useMemo(()=>({reference:x,floating:_}),[x,_]),L=$.useMemo(()=>{const F={position:n,left:0,top:0};if(!Z.floating)return F;const V=x_(Z.floating,u.x),W=x_(Z.floating,u.y);return s?{...F,transform:"translate("+V+"px, "+W+"px)",...__(Z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:W}},[n,s,Z.floating,u.x,u.y]);return $.useMemo(()=>({...u,update:N,refs:U,elements:Z,floatingStyles:L}),[u,N,U,Z,L])}/*!
233
+ `));let p=Dw((i=u.props)==null?void 0:i.className,l.className),f=p?{className:p}:{};return w.cloneElement(u,Object.assign({},Fw(u.props,Uw(Lh(l,["ref"]))),d,c,zF(u.ref,c.ref),f))}return w.createElement(o,Object.assign({},Lh(l,["ref"]),o!==w.Fragment&&c,o!==w.Fragment&&d),u)}function zF(...e){return{ref:e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}}function Fw(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](i,...o){let a=n[r];for(let s of a){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;s(i,...o)}}});return t}function jh(e){var t;return Object.assign(w.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Uw(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Lh(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let Fh=w.createContext(null);Fh.displayName="OpenClosedContext";var ai=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ai||{});function Bw(){return w.useContext(Fh)}function ZF({value:e,children:t}){return w.createElement(Fh.Provider,{value:e},t)}function zw(){let e=w.useRef(!1);return Yc(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function qF(e=0){let[t,n]=w.useState(e),r=w.useCallback(s=>n(l=>l|s),[t]),i=w.useCallback(s=>!!(t&s),[t]),o=w.useCallback(s=>n(l=>l&~s),[n]),a=w.useCallback(s=>n(l=>l^s),[n]);return{flags:t,addFlag:r,hasFlag:i,removeFlag:o,toggleFlag:a}}function HF(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function Uh(e,...t){e&&t.length>0&&e.classList.add(...t)}function Bh(e,...t){e&&t.length>0&&e.classList.remove(...t)}function WF(e,t){let n=Jc();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:i}=getComputedStyle(e),[o,a]=[r,i].map(s=>{let[l=0]=s.split(",").filter(Boolean).map(c=>c.includes("ms")?parseFloat(c):parseFloat(c)*1e3).sort((c,u)=>u-c);return l});if(o+a!==0){let s=n.addEventListener(e,"transitionend",l=>{l.target===l.currentTarget&&(t(),s())})}else t();return n.add(()=>t()),n.dispose}function VF(e,t,n,r){let i=n?"enter":"leave",o=Jc(),a=r!==void 0?HF(r):()=>{};i==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let s=Rr(i,{enter:()=>t.enter,leave:()=>t.leave}),l=Rr(i,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),c=Rr(i,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Bh(e,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Uh(e,...s,...c),o.nextFrame(()=>{Bh(e,...c),Uh(e,...l),WF(e,()=>(Bh(e,...s),Uh(e,...t.entered),a()))}),o.dispose}function KF({container:e,direction:t,classes:n,onStart:r,onStop:i}){let o=zw(),a=Rw(),s=la(t);Yc(()=>{let l=Jc();a.add(l.dispose);let c=e.current;if(c&&s.current!=="idle"&&o.current)return l.dispose(),r.current(s.current),l.add(VF(c,n.current,s.current==="enter",()=>{l.dispose(),i.current(s.current)})),l.dispose},[t])}function vo(e=""){return e.split(" ").filter(t=>t.trim().length>1)}let Qc=w.createContext(null);Qc.displayName="TransitionContext";var GF=(e=>(e.Visible="visible",e.Hidden="hidden",e))(GF||{});function YF(){let e=w.useContext(Qc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function JF(){let e=w.useContext(eu);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let eu=w.createContext(null);eu.displayName="NestingContext";function tu(e){return"children"in e?tu(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function Zw(e,t){let n=la(e),r=w.useRef([]),i=zw(),o=Rw(),a=yo((f,h=oi.Hidden)=>{let m=r.current.findIndex(({el:v})=>v===f);m!==-1&&(Rr(h,{[oi.Unmount](){r.current.splice(m,1)},[oi.Hidden](){r.current[m].state="hidden"}}),o.microTask(()=>{var v;!tu(r)&&i.current&&((v=n.current)==null||v.call(n))}))}),s=yo(f=>{let h=r.current.find(({el:m})=>m===f);return h?h.state!=="visible"&&(h.state="visible"):r.current.push({el:f,state:"visible"}),()=>a(f,oi.Unmount)}),l=w.useRef([]),c=w.useRef(Promise.resolve()),u=w.useRef({enter:[],leave:[],idle:[]}),d=yo((f,h,m)=>{l.current.splice(0),t&&(t.chains.current[h]=t.chains.current[h].filter(([v])=>v!==f)),t==null||t.chains.current[h].push([f,new Promise(v=>{l.current.push(v)})]),t==null||t.chains.current[h].push([f,new Promise(v=>{Promise.all(u.current[h].map(([g,y])=>y)).then(()=>v())})]),h==="enter"?c.current=c.current.then(()=>t==null?void 0:t.wait.current).then(()=>m(h)):m(h)}),p=yo((f,h,m)=>{Promise.all(u.current[h].splice(0).map(([v,g])=>g)).then(()=>{var v;(v=l.current.shift())==null||v()}).then(()=>m(h))});return w.useMemo(()=>({children:r,register:s,unregister:a,onStart:d,onStop:p,wait:c,chains:u}),[s,a,r,d,p,u,c])}function XF(){}let QF=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function qw(e){var t;let n={};for(let r of QF)n[r]=(t=e[r])!=null?t:XF;return n}function eU(e){let t=w.useRef(qw(e));return w.useEffect(()=>{t.current=qw(e)},[e]),t}let tU="div",Hw=jw.RenderStrategy,Ww=jh(function(e,t){let{beforeEnter:n,afterEnter:r,beforeLeave:i,afterLeave:o,enter:a,enterFrom:s,enterTo:l,entered:c,leave:u,leaveFrom:d,leaveTo:p,...f}=e,h=w.useRef(null),m=Nw(h,t),v=f.unmount?oi.Unmount:oi.Hidden,{show:g,appear:y,initial:b}=YF(),[x,_]=w.useState(g?"visible":"hidden"),S=JF(),{register:R,unregister:M}=S,j=w.useRef(null);w.useEffect(()=>R(h),[R,h]),w.useEffect(()=>{if(v===oi.Hidden&&h.current){if(g&&x!=="visible"){_("visible");return}return Rr(x,{hidden:()=>M(h),visible:()=>R(h)})}},[x,h,R,M,g,v]);let k=la({enter:vo(a),enterFrom:vo(s),enterTo:vo(l),entered:vo(c),leave:vo(u),leaveFrom:vo(d),leaveTo:vo(p)}),N=eU({beforeEnter:n,afterEnter:r,beforeLeave:i,afterLeave:o}),z=Mw();w.useEffect(()=>{if(z&&x==="visible"&&h.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[h,x,z]);let B=b&&!y,Z=(()=>!z||B||j.current===g?"idle":g?"enter":"leave")(),L=qF(0),F=yo(se=>Rr(se,{enter:()=>{L.addFlag(ai.Opening),N.current.beforeEnter()},leave:()=>{L.addFlag(ai.Closing),N.current.beforeLeave()},idle:()=>{}})),V=yo(se=>Rr(se,{enter:()=>{L.removeFlag(ai.Opening),N.current.afterEnter()},leave:()=>{L.removeFlag(ai.Closing),N.current.afterLeave()},idle:()=>{}})),W=Zw(()=>{_("hidden"),M(h)},S);KF({container:h,classes:k,direction:Z,onStart:la(se=>{W.onStart(h,se,F)}),onStop:la(se=>{W.onStop(h,se,V),se==="leave"&&!tu(W)&&(_("hidden"),M(h))})}),w.useEffect(()=>{!B||(v===oi.Hidden?j.current=null:j.current=g)},[g,B,x]);let pe=f,C={ref:m};return y&&g&&Us.isServer&&(pe={...pe,className:Dw(f.className,...k.current.enter,...k.current.enterFrom)}),w.createElement(eu.Provider,{value:W},w.createElement(ZF,{value:Rr(x,{visible:ai.Open,hidden:ai.Closed})|L.flags},Lw({ourProps:C,theirProps:pe,defaultTag:tU,features:Hw,visible:x==="visible",name:"Transition.Child"})))}),zh=jh(function(e,t){let{show:n,appear:r=!1,unmount:i,...o}=e,a=w.useRef(null),s=Nw(a,t);Mw();let l=Bw();if(n===void 0&&l!==null&&(n=(l&ai.Open)===ai.Open),![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,u]=w.useState(n?"visible":"hidden"),d=Zw(()=>{u("hidden")}),[p,f]=w.useState(!0),h=w.useRef([n]);Yc(()=>{p!==!1&&h.current[h.current.length-1]!==n&&(h.current.push(n),f(!1))},[h,n]);let m=w.useMemo(()=>({show:n,appear:r,initial:p}),[n,r,p]);w.useEffect(()=>{if(n)u("visible");else if(!tu(d))u("hidden");else{let g=a.current;if(!g)return;let y=g.getBoundingClientRect();y.x===0&&y.y===0&&y.width===0&&y.height===0&&u("hidden")}},[n,d]);let v={unmount:i};return w.createElement(eu.Provider,{value:d},w.createElement(Qc.Provider,{value:m},Lw({ourProps:{...v,as:w.Fragment,children:w.createElement(Ww,{ref:s,...v,...o})},theirProps:{},defaultTag:w.Fragment,features:Hw,visible:c==="visible",name:"Transition"})))}),nU=jh(function(e,t){let n=w.useContext(Qc)!==null,r=Bw()!==null;return w.createElement(w.Fragment,null,!n&&r?w.createElement(zh,{ref:t,...e}):w.createElement(Ww,{ref:t,...e}))}),rU=Object.assign(zh,{Child:nU,Root:zh});const iU=e=>$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,...e},$.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m7.5 12 3 3 6-6m5.5 3c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"})),oU=e=>$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",...e},$.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M18 6 6 18M6 6l12 12"})),aU=e=>$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,...e},$.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m15 9-6 6m0-6 6 6m7-3c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));function sU(e){return Zn.custom(t=>U.jsx(cU,{type:e.type,show:t.visible,children:e.type==="custom"?e.content:U.jsx(lU,{...e,toastId:t.id})}))}const lU=({icon:e,type:t,title:n,description:r,toastId:i})=>{const{theme:{notification:o}}=$t();return U.jsxs(U.Fragment,{children:[e?U.jsx(e,{...o==null?void 0:o.icon}):U.jsx(uU,{...o==null?void 0:o.icon,type:t}),U.jsx("p",{...o==null?void 0:o.title,children:n}),r?U.jsx("p",{...o==null?void 0:o.description,children:r}):null,U.jsx(oU,{...o==null?void 0:o.closeIcon,onClick:()=>Zn.dismiss(i)})]})},cU=({type:e,...t})=>{const{theme:{notification:n}}=$t();return U.jsx(rU,{...t,...n==null?void 0:n.container,appear:!0,"data-type":e??"neutral"})},uU=({type:e,className:t})=>{switch(e){case"success":return U.jsx(iU,{className:t});case"error":return U.jsx(aU,{className:t});default:return null}},dU=w.forwardRef(({url:e,type:t,styles:n,orientation:r="auto",...i},o)=>{var p,f;const a=w.useId(),{setIsLoading:s}=BL(),[l,c]=w.useState(r),[u,d]=w.useState(!1);return w.useLayoutEffect(()=>{s(h=>[...h,a])},[]),w.useEffect(()=>{e&&l==="auto"&&WL(e).then(({width:h,height:m})=>{c(fU(h,m)),s(v=>v.filter(g=>g!==a))})},[e]),U.jsxs(U.Fragment,{children:[u?null:U.jsx("div",{"data-orientation":l,...(p=n==null?void 0:n[t])==null?void 0:p.placeholder}),U.jsx("img",{"data-orientation":l,"data-loaded":u,...i,...(f=n==null?void 0:n[t])==null?void 0:f.image,src:e,alt:"",ref:o,loading:"lazy",onLoad:()=>{d(!0)}})]})});function fU(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 pU=w.forwardRef(({url:e,type:t,styles:n,...r},i)=>U.jsx("div",{children:U.jsx("video",{...r,controls:!0,src:e,...n==null?void 0:n[t],ref:i})})),hU=w.forwardRef(({url:e,type:t,styles:n,...r},i)=>U.jsx("div",{children:U.jsx("audio",{...r,controls:!0,src:e,...n==null?void 0:n[t],ref:i})}));function mU({title:e,titleId:t,...n},r){return $.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?$.createElement("title",{id:t},e):null,$.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 gU=$.forwardRef(mU);function yU({title:e,titleId:t,...n},r){return $.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?$.createElement("title",{id:t},e):null,$.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 vU=$.forwardRef(yU);function bU({title:e,titleId:t,...n},r){return $.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?$.createElement("title",{id:t},e):null,$.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 wU=$.forwardRef(bU);function _U({title:e,titleId:t,...n},r){return $.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?$.createElement("title",{id:t},e):null,$.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 xU=$.forwardRef(_U);function SU({title:e,titleId:t,...n},r){return $.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?$.createElement("title",{id:t},e):null,$.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 EU=$.forwardRef(SU);function CU({title:e,titleId:t,...n},r){return $.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?$.createElement("title",{id:t},e):null,$.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 TU=$.forwardRef(CU),kU=w.forwardRef(({type:e,latitude:t,longitude:n,title:r,styles:i,...o},a)=>{var l,c,u;const s=`https://www.google.com/maps/search/?api=1&query=${t},${n}`;return U.jsxs("a",{...o,...(l=i==null?void 0:i[e])==null?void 0:l.container,href:s,type:"_blank",rel:"noopener",ref:a,children:[U.jsx("p",{...(c=i==null?void 0:i[e])==null?void 0:c.title,children:r}),U.jsx(TU,{...(u=i==null?void 0:i[e])==null?void 0:u.icon})]})}),OU=w.forwardRef(({blocks:e,styles:t,type:n,horizontalAlignment:r,verticalAlignment:i,...o},a)=>U.jsx("div",{"data-horizontal":r,"data-vertical":i,...o,...t==null?void 0:t[n],ref:a,children:e.map((s,l)=>U.jsx(ga,{styles:t,block:s},l))})),AU=w.forwardRef(({blocks:e,styles:t,type:n,horizontalAlignment:r,verticalAlignment:i,...o},a)=>U.jsx("div",{"data-horizontal":r,"data-vertical":i,...o,...t==null?void 0:t[n],ref:a,children:e.map((s,l)=>U.jsx(ga,{styles:t,block:s},l))}));function $U(e){return Object.prototype.toString.call(e)==="[object Object]"}function Vw(e){return $U(e)||Array.isArray(e)}function PU(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Zh(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}`:!Vw(s)||!Vw(l)?s===l:Zh(s,l)})}function Kw(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function IU(e,t){if(e.length!==t.length)return!1;const n=Kw(e),r=Kw(t);return n.every((i,o)=>{const a=r[o];return Zh(i,a)})}function qh(e){return typeof e=="number"}function Gw(e){return typeof e=="string"}function Hh(e){return typeof e=="boolean"}function Yw(e){return Object.prototype.toString.call(e)==="[object Object]"}function zt(e){return Math.abs(e)}function Wh(e){return Math.sign(e)}function nu(e,t){return zt(e-t)}function RU(e,t){if(e===0||t===0||zt(e)<=zt(t))return 0;const n=nu(zt(e),zt(t));return zt(n/e)}function Bs(e){return iu(e).map(Number)}function si(e){return e[ru(e)]}function ru(e){return Math.max(0,e.length-1)}function iu(e){return Object.keys(e)}function Jw(e,t){return[e,t].reduce((n,r)=>(iu(r).forEach(i=>{const o=n[i],a=r[i],s=Yw(o)&&Yw(a);n[i]=s?Jw(o,a):a}),n),{})}function Xw(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function MU(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 qh(e)?a():n[e](c)}return{measure:s}}function NU(e,t){const n=e==="y"?"y":"x",r=e==="y"?"x":"y",i=s(),o=l();function a(u){const{width:d,height:p}=u;return n==="x"?d:p}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 Mi(e,t){const n=zt(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 Qw(e,t,n){const{constrain:r}=Mi(0,e),i=e+1;let o=a(t);function a(p){return n?zt((i+p)%i):r(p)}function s(){return o}function l(p){return o=a(p),d}function c(p){return u().set(s()+p)}function u(){return Qw(e,s(),n)}const d={get:s,set:l,add:c,clone:u};return d}function DU(e){const t=e==="rtl"?-1:1;function n(i){return i*t}return{apply:n}}function zs(){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 jU(e,t,n,r,i,o,a,s,l,c,u,d,p,f,h,m,v,g,y){const{cross:b}=e,x=["INPUT","SELECT","TEXTAREA"],_={passive:!1},S=zs(),R=zs(),M=Mi(50,225).constrain(h.measure(20)),j={mouse:300,touch:400},k={mouse:500,touch:600},N=m?43:25;let z=!1,B=0,Z=0,L=!1,F=!1,V=!1,W=!1;function pe(ye,$e){if(!$e)return;function Se(ot){(Hh($e)||$e(ye,ot))&&Be(ot)}const Ue=n;S.add(Ue,"dragstart",ot=>ot.preventDefault(),_).add(Ue,"touchmove",()=>{},_).add(Ue,"touchend",()=>{}).add(Ue,"touchstart",Se).add(Ue,"mousedown",Se).add(Ue,"touchcancel",Ze).add(Ue,"contextmenu",Ze).add(Ue,"click",nt,!0)}function C(){S.clear(),R.clear()}function se(){const ye=W?r:n;R.add(ye,"touchmove",Me,_).add(ye,"touchend",Ze).add(ye,"mousemove",Me,_).add(ye,"mouseup",Ze)}function we(ye){const $e=ye.nodeName||"";return x.includes($e)}function O(){return(m?k:j)[W?"mouse":"touch"]}function Oe(ye,$e){const Se=p.add(Wh(ye)*-1),Ue=d.byDistance(ye,!m).distance;return m||zt(ye)<M?Ue:g&&$e?Ue*.5:d.byIndex(Se.get(),0).distance}function Be(ye){const $e=Xw(ye,i);W=$e,!($e&&ye.button!==0)&&(we(ye.target)||(V=m&&$e&&!ye.buttons&&z,z=nu(o.get(),s.get())>=2,L=!0,a.pointerDown(ye),u.useFriction(0).useDuration(0),o.set(s),se(),B=a.readPoint(ye),Z=a.readPoint(ye,b),f.emit("pointerDown")))}function Me(ye){const $e=a.readPoint(ye),Se=a.readPoint(ye,b),Ue=nu($e,B),ot=nu(Se,Z);if(!F&&!W&&(!ye.cancelable||(F=Ue>ot,!F)))return Ze(ye);const D=a.pointerMove(ye);Ue>v&&(V=!0),u.useFriction(.3).useDuration(1),l.start(),o.add(t.apply(D)),ye.preventDefault()}function Ze(ye){const Se=d.byDistance(0,!1).index!==p.get(),Ue=a.pointerUp(ye)*O(),ot=Oe(t.apply(Ue),Se),D=RU(Ue,ot),ue=N-10*D,me=y+D/50;F=!1,L=!1,R.clear(),u.useDuration(ue).useFriction(me),c.distance(ot,!m),W=!1,f.emit("pointerUp")}function nt(ye){V&&(ye.stopPropagation(),ye.preventDefault())}function We(){return L}return{init:pe,pointerDown:We,destroy:C}}function LU(e,t){let r,i;function o(d){return d.timeStamp}function a(d,p){const h=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(Xw(d,t)?d:d.touches[0])[h]}function s(d){return r=d,i=d,a(d)}function l(d){const p=a(d)-a(i),f=o(d)-o(r)>170;return i=d,f&&(r=d),p}function c(d){if(!r||!i)return 0;const p=a(i)-a(r),f=o(d)-o(r),h=o(d)-o(i)>170,m=p/f;return f&&!h&&zt(m)>.1?m:0}return{pointerDown:s,pointerMove:l,pointerUp:c,readPoint:a}}function FU(e){function t(r){return e*(r/100)}return{measure:t}}function UU(e,t,n,r,i){let o,a,s=[],l=!1;function c(f){return i.measureSize(f.getBoundingClientRect())}function u(f,h){if(!h)return;a=c(e),s=r.map(c);function m(g){for(const y of g){const b=y.target===e,x=r.indexOf(y.target),_=b?a:s[x],S=c(b?e:r[x]);if(_!==S){n.requestAnimationFrame(()=>{f.reInit(),t.emit("resize")});break}}}o=new ResizeObserver(g=>{l||(Hh(h)||h(f,g))&&m(g)}),[e].concat(r).forEach(g=>o.observe(g))}function d(){o&&o.disconnect(),l=!0}return{init:u,destroy:d}}function BU(e,t,n,r){let i=!0,o=0,a=0,s=n,l=r,c=e.get(),u=0;function d(){const _=t.get()-e.get(),S=!s;let R=0;return S?(o=0,e.set(t),R=_):(o+=_/s,o*=l,c+=o,e.add(o),R=c-u),a=Wh(R),u=c,i=zt(_)<.001,x}function p(){return i}function f(){return s}function h(){return a}function m(){return o}function v(){return y(n)}function g(){return b(r)}function y(_){return s=_,x}function b(_){return l=_,x}const x={direction:h,duration:f,velocity:m,seek:d,settled:p,useBaseFriction:g,useBaseDuration:v,useFriction:b,useDuration:y};return x}function zU(e,t,n,r,i){const o=i.measure(10),a=i.measure(50),s=Mi(.1,.99);let l=!1;function c(){return!(l||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(f){if(!c())return;const h=e.reachedMin(t.get())?"min":"max",m=zt(e[h]-t.get()),v=n.get()-t.get(),g=s.constrain(m/a);n.subtract(v*g),!f&&zt(v)<o&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function d(f){l=!f}return{constrain:u,toggleActive:d}}function ZU(e,t,n,r){const i=Mi(-t+e,n[0]),o=l(),a=c();function s(){const d=o[0],p=si(o),f=o.lastIndexOf(d),h=o.indexOf(p)+1;return Mi(f,h)}function l(){return n.map(i.constrain).map(d=>parseFloat(d.toFixed(3)))}function c(){if(t<=e)return[i.max];if(r==="keepSnaps")return o;const{min:d,max:p}=s();return o.slice(d,p)}return{snapsContained:a}}function qU(e,t,n){const r=t[0],i=n?r-e:si(t);return{limit:Mi(i,r)}}function HU(e,t,n,r){const o=t.min+.1,a=t.max+.1,{reachedMin:s,reachedMax:l}=Mi(o,a);function c(p){return p===1?l(n.get()):p===-1?s(n.get()):!1}function u(p){if(!c(p))return;const f=e*(p*-1);r.forEach(h=>h.add(f))}return{loop:u}}function WU(e){const{max:t,length:n}=e;function r(o){return(o-t)/-n}return{get:r}}function VU(e,t,n,r,i,o,a){const{startEdge:s,endEdge:l}=e,{groupSlides:c}=o,u=f().map(t.measure),d=h(),p=m();function f(){return c(r).map(g=>si(g)[l]-g[0][s]).map(zt)}function h(){return r.map(g=>n[s]-g[s]).map(g=>-zt(g))}function m(){const y=si(d)-si(i);return c(d).map(b=>b[0]).map((b,x,_)=>{const S=!x,R=x===ru(_);return a&&S?0:a&&R?y:b+u[x]})}return{snaps:d,snapsAligned:p}}function KU(e,t,n,r,i){const{reachedAny:o,removeOffset:a,constrain:s}=r;function l(h){return h.concat().sort((m,v)=>zt(m)-zt(v))[0]}function c(h){const m=e?a(h):s(h),v=t.map(y=>y-m).map(y=>u(y,0)).map((y,b)=>({diff:y,index:b})).sort((y,b)=>zt(y.diff)-zt(b.diff)),{index:g}=v[0];return{index:g,distance:m}}function u(h,m){const v=[h,h+n,h-n];if(!e)return v[0];if(!m)return l(v);const g=v.filter(y=>Wh(y)===m);return l(g)}function d(h,m){const v=t[h]-i.get(),g=u(v,m);return{index:h,distance:g}}function p(h,m){const v=i.get()+h,{index:g,distance:y}=c(v),b=!e&&o(v);if(!m||b)return{index:g,distance:h};const x=t[g]-y,_=h+u(x,0);return{index:g,distance:_}}return{byDistance:p,byIndex:d,shortcut:u}}function GU(e,t,n,r,i,o,a){function s(d){const p=d.distance,f=d.index!==t.get();o.add(p),p&&(i.duration()?e.start():(e.update(),e.render(1),e.update())),f&&(n.set(t.get()),t.set(d.index),a.emit("select"))}function l(d,p){const f=r.byDistance(d,p);s(f)}function c(d,p){const f=t.clone().set(d),h=r.byIndex(f.get(),p);s(h)}return{distance:l,index:c}}function ou(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 qh(l)?l:l.get()}return{get:n,set:r,add:i,subtract:o}}function e_(e,t,n){const r=e.scroll==="x"?a:s,i=n.style;let o=!1;function a(p){return`translate3d(${p}px,0px,0px)`}function s(p){return`translate3d(0px,${p}px,0px)`}function l(p){o||(i.transform=r(t.apply(p)))}function c(p){o=!p}function u(){o||(i.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:u,to:l,toggleActive:c}}function YU(e,t,n,r,i,o,a,s,l){const c=Bs(i),u=Bs(i).reverse(),d=m().concat(v());function p(_,S){return _.reduce((R,M)=>R-i[M],S)}function f(_,S){return _.reduce((R,M)=>p(R,S)>0?R.concat([M]):R,[])}function h(_,S){const R=S==="start",M=R?-r:r,j=a.findSlideBounds([M]);return _.map(k=>{const N=R?0:-r,z=R?r:0,Z=j.filter(L=>L.index===k)[0][R?"end":"start"];return{index:k,slideLocation:ou(-1),translate:e_(e,t,l[k]),target:()=>s.get()>Z?N:z}})}function m(){const _=o[0]-1,S=f(u,_);return h(S,"end")}function v(){const _=n-o[0]-1,S=f(c,_);return h(S,"start")}function g(){return d.every(({index:_})=>{const S=c.filter(R=>R!==_);return p(S,n)<=.1})}function y(){d.forEach(_=>{const{target:S,translate:R,slideLocation:M}=_,j=S();j!==M.get()&&(R.to(j),M.set(j))})}function b(){d.forEach(_=>_.translate.clear())}return{canLoop:g,clear:b,loop:y,loopPoints:d}}function JU(e,t){let n,r=!1;function i(s,l){if(!l)return;function c(u){for(const d of u)if(d.type==="childList"){s.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(u=>{r||(Hh(l)||l(s,u))&&c(u)}),n.observe(e,{childList:!0})}function o(){n&&n.disconnect(),r=!0}return{init:i,destroy:o}}function XU(e,t,n,r,i,o,a){const{removeOffset:s,constrain:l}=i,c=.5,u=o?[0,t,-t]:[0],d=f(u,a);function p(v){const g=v||0;return n.map(y=>Mi(c,y-c).constrain(y*g))}function f(v,g){const y=v||u,b=p(g);return y.reduce((x,_)=>{const S=r.map((R,M)=>({start:R-n[M]+b[M]+_,end:R+e-b[M]+_,index:M}));return x.concat(S)},[])}function h(v,g){const y=o?s(v):l(v);return(g||d).reduce((x,_)=>{const{index:S,start:R,end:M}=_,j=x.includes(S),k=R<y&&M>y;return!j&&k?x.concat([S]):x},[])}return{check:h,findSlideBounds:f}}function QU(e,t,n,r,i,o){const{measureSize:a,startEdge:s,endEdge:l}=e,c=n[0]&&i,u=h(),d=m(),p=n.map(a),f=v();function h(){if(!c)return 0;const y=n[0];return zt(t[s]-y[s])}function m(){if(!c)return 0;const y=o.getComputedStyle(si(r));return parseFloat(y.getPropertyValue(`margin-${l}`))}function v(){return n.map((y,b,x)=>{const _=!b,S=b===ru(x);return _?p[b]+u:S?p[b]+d:x[b+1][s]-y[s]}).map(zt)}return{slideSizes:p,slideSizesWithGaps:f}}function eB(e,t,n){const r=qh(n);function i(l,c){return Bs(l).filter(u=>u%c===0).map(u=>l.slice(u,u+c))}function o(l){return Bs(l).reduce((c,u)=>{const p=t.slice(si(c),u+1).reduce((f,h)=>f+h,0);return!u||p>e?c.concat(u):c},[]).map((c,u,d)=>l.slice(c,d[u+1]))}function a(l){return r?i(l,n):o(l)}return{groupSlides:a}}function tB(e,t,n,r,i,o,a,s){const{align:l,axis:c,direction:u,startIndex:d,inViewThreshold:p,loop:f,duration:h,dragFree:m,dragThreshold:v,slidesToScroll:g,skipSnaps:y,containScroll:b}=o,x=t.getBoundingClientRect(),_=n.map(me=>me.getBoundingClientRect()),S=DU(u),R=NU(c,u),M=R.measureSize(x),j=FU(M),k=MU(l,M),N=!f&&!!b,z=f||!!b,{slideSizes:B,slideSizesWithGaps:Z}=QU(R,x,_,n,z,i),L=eB(M,Z,g),{snaps:F,snapsAligned:V}=VU(R,k,x,_,Z,L,N),W=-si(F)+si(Z),{snapsContained:pe}=ZU(M,W,V,b),C=N?pe:V,{limit:se}=qU(W,C,f),we=Qw(ru(C),d,f),O=we.clone(),Oe=Bs(n),Be=({dragHandler:me,scrollBody:fe,scrollBounds:Le,eventHandler:De,animation:Ke,options:{loop:gt}})=>{const Xe=me.pointerDown();gt||Le.constrain(Xe);const q=fe.seek().settled();q&&!Xe&&(Ke.stop(),De.emit("settle")),q||De.emit("scroll")},Me=({scrollBody:me,translate:fe,location:Le,offsetLocation:De,scrollLooper:Ke,slideLooper:gt,options:{loop:Xe}},q)=>{const X=me.velocity();De.set(Le.get()-X+X*q),Xe&&(Ke.loop(me.direction()),gt.loop()),fe.to(De.get())},Ze={start:()=>s.start(ue),stop:()=>s.stop(ue),update:()=>Be(ue),render:me=>Me(ue,me)},nt=.68,We=C[we.get()],_e=ou(We),ye=ou(We),$e=ou(We),Se=BU(_e,$e,h,nt),Ue=KU(f,C,W,se,$e),ot=GU(Ze,we,O,Ue,Se,$e,a),D=XU(M,W,B,F,se,f,p),ue={ownerDocument:r,ownerWindow:i,eventHandler:a,containerRect:x,slideRects:_,animation:Ze,axis:R,direction:S,dragHandler:jU(R,S,e,r,i,$e,LU(R,i),_e,Ze,ot,Se,Ue,we,a,j,m,v,y,nt),eventStore:zs(),percentOfView:j,index:we,indexPrevious:O,limit:se,location:_e,offsetLocation:ye,options:o,resizeHandler:UU(t,a,i,n,R),scrollBody:Se,scrollBounds:zU(se,_e,$e,Se,j),scrollLooper:HU(W,se,ye,[_e,ye,$e]),scrollProgress:WU(se),scrollSnaps:C,scrollTarget:Ue,scrollTo:ot,slideLooper:YU(R,S,M,W,Z,C,D,ye,n),slidesHandler:JU(t,a),slidesInView:D,slideIndexes:Oe,slidesToScroll:L,target:$e,translate:e_(R,S,t)};return ue}function nB(e){const t=16.666666666666668;let n=[],r=null,i=0,o=0;function a(d){r||(r=d);const p=d-r;for(r=d,i+=p;i>=t;)n.forEach(({animation:h})=>h.update()),i-=t;const f=zt(i/t);n.forEach(({animation:h})=>h.render(f)),o&&e.requestAnimationFrame(a)}function s(d){n.includes(d)||n.push(d),!o&&(o=e.requestAnimationFrame(a))}function l(d){n=n.filter(p=>p!==d),!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 rB(){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(u=>u!==c),s}const s={init:n,emit:i,off:a,on:o};return s}const iB={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 oB(e){function t(o,a){return Jw(o,a||{})}function n(o){const a=o.breakpoints||{},s=iu(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=>iu(a.breakpoints||{})).reduce((a,s)=>a.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function aB(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 ca(e,t,n){const r=e.ownerDocument,i=r.defaultView,o=oB(i),a=aB(o),s=zs(),l=zs(),c=rB(),{animationRealms:u}=ca,{mergeOptions:d,optionsAtMedia:p,optionsMediaQueries:f}=o,{on:h,off:m,emit:v}=c,g=B;let y=!1,b,x=d(iB,ca.globalOptions),_=d(x),S=[],R,M,j;function k(){const{container:Se,slides:Ue}=_;M=(Gw(Se)?e.querySelector(Se):Se)||e.children[0];const D=Gw(Ue)?M.querySelectorAll(Ue):Ue;j=[].slice.call(D||M.children)}function N(Se,Ue){const ot=tB(e,M,j,r,i,Se,c,Ue);if(Se.loop&&!ot.slideLooper.canLoop()){const D=Object.assign({},Se,{loop:!1});return N(D,Ue)}return ot}function z(Se,Ue){if(y)return;const ot=u.find(ue=>ue.window===i),D=ot||nB(i);ot||u.push(D),x=d(x,Se),_=p(x),S=Ue||S,k(),b=N(_,D),f([x,...S.map(({options:ue})=>ue)]).forEach(ue=>s.add(ue,"change",B)),_.active&&(b.translate.to(b.location.get()),b.eventHandler.init($e),b.resizeHandler.init($e,_.watchResize),b.slidesHandler.init($e,_.watchSlides),l.add(r,"visibilitychange",()=>{r.hidden&&D.reset()}),b.options.loop&&b.slideLooper.loop(),M.offsetParent&&j.length&&b.dragHandler.init($e,_.watchDrag),R=a.init(S,$e))}function B(Se,Ue){const ot=Be();Z(),z(d({startIndex:ot},Se),Ue),c.emit("reInit")}function Z(){b.dragHandler.destroy(),b.animation.stop(),b.eventStore.clear(),b.translate.clear(),b.slideLooper.clear(),b.resizeHandler.destroy(),b.slidesHandler.destroy(),a.destroy(),s.clear(),l.clear()}function L(){y||(y=!0,s.clear(),Z(),c.emit("destroy"))}function F(Se){const Ue=b[Se?"target":"location"].get(),ot=_.loop?"removeOffset":"constrain";return b.slidesInView.check(b.limit[ot](Ue))}function V(Se){const Ue=F(Se);return b.slideIndexes.filter(ot=>!Ue.includes(ot))}function W(Se,Ue,ot){!_.active||y||(b.scrollBody.useBaseFriction().useDuration(Ue?0:_.duration),b.scrollTo.index(Se,ot||0))}function pe(Se){const Ue=b.index.add(1).get();W(Ue,Se===!0,-1)}function C(Se){const Ue=b.index.add(-1).get();W(Ue,Se===!0,1)}function se(){return b.index.add(1).get()!==Be()}function we(){return b.index.add(-1).get()!==Be()}function O(){return b.scrollSnaps.map(b.scrollProgress.get)}function Oe(){return b.scrollProgress.get(b.location.get())}function Be(){return b.index.get()}function Me(){return b.indexPrevious.get()}function Ze(){return R}function nt(){return b}function We(){return e}function _e(){return M}function ye(){return j}const $e={canScrollNext:se,canScrollPrev:we,containerNode:_e,internalEngine:nt,destroy:L,off:m,on:h,emit:v,plugins:Ze,previousScrollSnap:Me,reInit:g,rootNode:We,scrollNext:pe,scrollPrev:C,scrollProgress:Oe,scrollSnapList:O,scrollTo:W,selectedScrollSnap:Be,slideNodes:ye,slidesInView:F,slidesNotInView:V};return z(t,n),setTimeout(()=>c.emit("init"),0),$e}ca.animationRealms=[],ca.globalOptions=void 0;function Vh(e={},t=[]){const n=w.useRef(e),r=w.useRef(t),[i,o]=w.useState(),[a,s]=w.useState(),l=w.useCallback(()=>{i&&i.reInit(n.current,r.current)},[i]);return w.useEffect(()=>{if(PU()&&a){ca.globalOptions=Vh.globalOptions;const c=ca(a,n.current,r.current);return o(c),()=>c.destroy()}else o(void 0)},[a,o]),w.useEffect(()=>{Zh(n.current,e)||(n.current=e,l())},[e,l]),w.useEffect(()=>{IU(r.current,t)||(r.current=t,l())},[t,l]),[s,i]}Vh.globalOptions=void 0;function sB({title:e,titleId:t,...n},r){return $.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?$.createElement("title",{id:t},e):null,$.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 lB=$.forwardRef(sB);function cB({title:e,titleId:t,...n},r){return $.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?$.createElement("title",{id:t},e):null,$.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 uB=$.forwardRef(cB);function dB({title:e,titleId:t,...n},r){return $.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?$.createElement("title",{id:t},e):null,$.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"}),$.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 fB=$.forwardRef(dB);function pB({title:e,titleId:t,...n},r){return $.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?$.createElement("title",{id:t},e):null,$.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"}),$.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 hB=$.forwardRef(pB);function mB({title:e,titleId:t,...n},r){return $.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?$.createElement("title",{id:t},e):null,$.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 gB=$.forwardRef(mB);function yB({title:e,titleId:t,...n},r){return $.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?$.createElement("title",{id:t},e):null,$.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 vB=$.forwardRef(yB);function bB({title:e,titleId:t,...n},r){return $.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?$.createElement("title",{id:t},e):null,$.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 wB=$.forwardRef(bB),_B=w.forwardRef(({type:e,styles:t,blocks:n},r)=>{const[i,o]=Vh({skipSnaps:!0}),[a,s]=w.useState(!0),[l,c]=w.useState(!0),u=w.useCallback(()=>o&&o.scrollPrev(),[o]),d=w.useCallback(()=>o&&o.scrollNext(),[o]),p=t==null?void 0:t[e],f=w.useCallback(h=>{s(!h.canScrollPrev()),c(!h.canScrollNext())},[]);return w.useEffect(()=>{o&&(f(o),o.on("reInit",f),o.on("select",f))},[o,f]),U.jsxs("div",{...p==null?void 0:p.container,"data-container":"carousel",ref:i,children:[U.jsx("div",{ref:r,...p==null?void 0:p.slidesContainer,children:n.map((h,m)=>U.jsx(ga,{styles:t,block:h},m))}),U.jsx(lB,{...p==null?void 0:p.backButton,"data-disabled":a?"":void 0,onClick:u}),U.jsx(uB,{...p==null?void 0:p.nextButton,"data-disabled":l?"":void 0,onClick:d})]})}),ua=Math.min,er=Math.max,au=Math.round,da=Math.floor,Ni=e=>({x:e,y:e});function t_(e,t,n){return er(e,ua(t,n))}function su(e,t){return typeof e=="function"?e(t):e}function Zs(e){return e.split("-")[0]}function Kh(e){return e.split("-")[1]}function n_(e){return e==="x"?"y":"x"}function xB(e){return e==="y"?"height":"width"}function qs(e){return["top","bottom"].includes(Zs(e))?"y":"x"}function SB(e){return n_(qs(e))}function EB(e){return{top:0,right:0,bottom:0,left:0,...e}}function CB(e){return typeof e!="number"?EB(e):{top:e,right:e,bottom:e,left:e}}function lu(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Di(e){return r_(e)?(e.nodeName||"").toLowerCase():"#document"}function tr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function li(e){var t;return(t=(r_(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function r_(e){return e instanceof Node||e instanceof tr(e).Node}function Wt(e){return e instanceof Element||e instanceof tr(e).Element}function En(e){return e instanceof HTMLElement||e instanceof tr(e).HTMLElement}function Gh(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof tr(e).ShadowRoot}function Hs(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=nr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function TB(e){return["table","td","th"].includes(Di(e))}function Yh(e){const t=Jh(),n=nr(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 kB(e){let t=bo(e);for(;En(t)&&!Ws(t);){if(Yh(t))return t;t=bo(t)}return null}function Jh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ws(e){return["html","body","#document"].includes(Di(e))}function nr(e){return tr(e).getComputedStyle(e)}function cu(e){return Wt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function bo(e){if(Di(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Gh(e)&&e.host||li(e);return Gh(t)?t.host:t}function i_(e){const t=bo(e);return Ws(t)?e.ownerDocument?e.ownerDocument.body:e.body:En(t)&&Hs(t)?t:i_(t)}function ji(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=i_(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=tr(i);return o?t.concat(a,a.visualViewport||[],Hs(i)?i:[],a.frameElement&&n?ji(a.frameElement):[]):t.concat(i,ji(i,[],n))}function Li(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 qn(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Gh(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function o_(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function OB(){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 a_(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(o_())||t.test(OB()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function s_(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 l_(){return/apple/i.test(navigator.vendor)}function AB(){return o_().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function c_(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function $B(e){return"nativeEvent"in e}function PB(e){return e.matches("html,body")}function yr(e){return(e==null?void 0:e.ownerDocument)||document}function Xh(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 u_(e){return"composedPath"in e?e.composedPath()[0]:e.target}const IB="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function d_(e){return En(e)&&e.matches(IB)}function yn(e){e.preventDefault(),e.stopPropagation()}function f_(e,t,n){let{reference:r,floating:i}=e;const o=qs(t),a=SB(t),s=xB(a),l=Zs(t),c=o==="y",u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,p=r[s]/2-i[s]/2;let f;switch(l){case"top":f={x:u,y:r.y-i.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-i.width,y:d};break;default:f={x:r.x,y:r.y}}switch(Kh(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1);break}return f}const RB=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:u,y:d}=f_(c,r,l),p=r,f={},h=0;for(let m=0;m<s.length;m++){const{name:v,fn:g}=s[m],{x:y,y:b,data:x,reset:_}=await g({x:u,y:d,initialPlacement:r,placement:p,strategy:i,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});if(u=y??u,d=b??d,f={...f,[v]:{...f[v],...x}},_&&h<=50){h++,typeof _=="object"&&(_.placement&&(p=_.placement),_.rects&&(c=_.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):_.rects),{x:u,y:d}=f_(c,p,l)),m=-1;continue}}return{x:u,y:d,placement:p,strategy:i,middlewareData:f}};async function p_(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:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=su(t,e),h=CB(f),v=s[p?d==="floating"?"reference":"floating":d],g=lu(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(v)))==null||n?v:v.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y=d==="floating"?{...a.floating,x:r,y:i}:a.reference,b=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),x=await(o.isElement==null?void 0:o.isElement(b))?await(o.getScale==null?void 0:o.getScale(b))||{x:1,y:1}:{x:1,y:1},_=lu(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:y,offsetParent:b,strategy:l}):y);return{top:(g.top-_.top+h.top)/x.y,bottom:(_.bottom-g.bottom+h.bottom)/x.y,left:(g.left-_.left+h.left)/x.x,right:(_.right-g.right+h.right)/x.x}}async function MB(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=Zs(n),s=Kh(n),l=qs(n)==="y",c=["left","top"].includes(a)?-1:1,u=o&&l?-1:1,d=su(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof h=="number"&&(f=s==="end"?h*-1:h),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}const NB=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await MB(t,e);return{x:n+i.x,y:r+i.y,data:i}}}},DB=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:v=>{let{x:g,y}=v;return{x:g,y}}},...l}=su(e,t),c={x:n,y:r},u=await p_(t,l),d=qs(Zs(i)),p=n_(d);let f=c[p],h=c[d];if(o){const v=p==="y"?"top":"left",g=p==="y"?"bottom":"right",y=f+u[v],b=f-u[g];f=t_(y,f,b)}if(a){const v=d==="y"?"top":"left",g=d==="y"?"bottom":"right",y=h+u[v],b=h-u[g];h=t_(y,h,b)}const m=s.fn({...t,[p]:f,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},jB=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}=su(e,t),l=await p_(t,s),c=Zs(n),u=Kh(n),d=qs(n)==="y",{width:p,height:f}=r.floating;let h,m;c==="top"||c==="bottom"?(h=c,m=u===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(m=c,h=u==="end"?"top":"bottom");const v=f-l[h],g=p-l[m],y=!t.middlewareData.shift;let b=v,x=g;if(d){const S=p-l.left-l.right;x=u||y?ua(g,S):S}else{const S=f-l.top-l.bottom;b=u||y?ua(v,S):S}if(y&&!u){const S=er(l.left,0),R=er(l.right,0),M=er(l.top,0),j=er(l.bottom,0);d?x=p-2*(S!==0||R!==0?S+R:er(l.left,l.right)):b=f-2*(M!==0||j!==0?M+j:er(l.top,l.bottom))}await a({...t,availableWidth:x,availableHeight:b});const _=await i.getDimensions(o.floating);return p!==_.width||f!==_.height?{reset:{rects:!0}}:{}}}};function h_(e){const t=nr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=En(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=au(n)!==o||au(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function Qh(e){return Wt(e)?e:e.contextElement}function fa(e){const t=Qh(e);if(!En(t))return Ni(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=h_(t);let a=(o?au(n.width):n.width)/r,s=(o?au(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const LB=Ni(0);function m_(e){const t=tr(e);return!Jh()||!t.visualViewport?LB:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function FB(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==tr(e)?!1:t}function wo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=Qh(e);let a=Ni(1);t&&(r?Wt(r)&&(a=fa(r)):a=fa(e));const s=FB(o,n,r)?m_(o):Ni(0);let l=(i.left+s.x)/a.x,c=(i.top+s.y)/a.y,u=i.width/a.x,d=i.height/a.y;if(o){const p=tr(o),f=r&&Wt(r)?tr(r):r;let h=p.frameElement;for(;h&&r&&f!==p;){const m=fa(h),v=h.getBoundingClientRect(),g=nr(h),y=v.left+(h.clientLeft+parseFloat(g.paddingLeft))*m.x,b=v.top+(h.clientTop+parseFloat(g.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,d*=m.y,l+=y,c+=b,h=tr(h).frameElement}}return lu({width:u,height:d,x:l,y:c})}function UB(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=En(n),o=li(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0},s=Ni(1);const l=Ni(0);if((i||!i&&r!=="fixed")&&((Di(n)!=="body"||Hs(o))&&(a=cu(n)),En(n))){const c=wo(n);s=fa(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 BB(e){return Array.from(e.getClientRects())}function g_(e){return wo(li(e)).left+cu(e).scrollLeft}function zB(e){const t=li(e),n=cu(e),r=e.ownerDocument.body,i=er(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=er(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+g_(e);const s=-n.scrollTop;return nr(r).direction==="rtl"&&(a+=er(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}function ZB(e,t){const n=tr(e),r=li(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=Jh();(!c||c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function qB(e,t){const n=wo(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=En(e)?fa(e):Ni(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 y_(e,t,n){let r;if(t==="viewport")r=ZB(e,n);else if(t==="document")r=zB(li(e));else if(Wt(t))r=qB(t,n);else{const i=m_(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return lu(r)}function v_(e,t){const n=bo(e);return n===t||!Wt(n)||Ws(n)?!1:nr(n).position==="fixed"||v_(n,t)}function HB(e,t){const n=t.get(e);if(n)return n;let r=ji(e,[],!1).filter(s=>Wt(s)&&Di(s)!=="body"),i=null;const o=nr(e).position==="fixed";let a=o?bo(e):e;for(;Wt(a)&&!Ws(a);){const s=nr(a),l=Yh(a);!l&&s.position==="fixed"&&(i=null),(o?!l&&!i:!l&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Hs(a)&&!l&&v_(e,a))?r=r.filter(u=>u!==a):i=s,a=bo(a)}return t.set(e,r),r}function WB(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?HB(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=y_(t,u,i);return c.top=er(d.top,c.top),c.right=ua(d.right,c.right),c.bottom=ua(d.bottom,c.bottom),c.left=er(d.left,c.left),c},y_(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function VB(e){return h_(e)}function KB(e,t,n){const r=En(t),i=li(t),o=n==="fixed",a=wo(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=Ni(0);if(r||!r&&!o)if((Di(t)!=="body"||Hs(i))&&(s=cu(t)),r){const c=wo(t,!0,o,t);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else i&&(l.x=g_(i));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function b_(e,t){return!En(e)||nr(e).position==="fixed"?null:t?t(e):e.offsetParent}function w_(e,t){const n=tr(e);if(!En(e))return n;let r=b_(e,t);for(;r&&TB(r)&&nr(r).position==="static";)r=b_(r,t);return r&&(Di(r)==="html"||Di(r)==="body"&&nr(r).position==="static"&&!Yh(r))?n:r||kB(e)||n}const GB=async function(e){let{reference:t,floating:n,strategy:r}=e;const i=this.getOffsetParent||w_,o=this.getDimensions;return{reference:KB(t,await i(n),r),floating:{x:0,y:0,...await o(n)}}};function YB(e){return nr(e).direction==="rtl"}const JB={convertOffsetParentRelativeRectToViewportRelativeRect:UB,getDocumentElement:li,getClippingRect:WB,getOffsetParent:w_,getElementRects:GB,getClientRects:BB,getDimensions:VB,getScale:fa,isElement:Wt,isRTL:YB};function XB(e,t){let n=null,r;const i=li(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:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const f=da(u),h=da(i.clientWidth-(c+d)),m=da(i.clientHeight-(u+p)),v=da(c),y={rootMargin:-f+"px "+-h+"px "+-m+"px "+-v+"px",threshold:er(0,ua(1,l))||1};let b=!0;function x(_){const S=_[0].intersectionRatio;if(S!==l){if(!b)return a();S?a(!1,S):r=setTimeout(()=>{a(!1,1e-7)},100)}b=!1}try{n=new IntersectionObserver(x,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(x,y)}n.observe(e)}return a(!0),o}function QB(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=Qh(e),u=i||o?[...c?ji(c):[],...ji(t)]:[];u.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),o&&g.addEventListener("resize",n)});const d=c&&s?XB(c,n):null;let p=-1,f=null;a&&(f=new ResizeObserver(g=>{let[y]=g;y&&y.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{f&&f.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let h,m=l?wo(e):null;l&&v();function v(){const g=wo(e);m&&(g.x!==m.x||g.y!==m.y||g.width!==m.width||g.height!==m.height)&&n(),m=g,h=requestAnimationFrame(v)}return n(),()=>{u.forEach(g=>{i&&g.removeEventListener("scroll",n),o&&g.removeEventListener("resize",n)}),d&&d(),f&&f.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const e3=(e,t,n)=>{const r=new Map,i={platform:JB,...n},o={...i.platform,_c:r};return RB(e,t,{...i,platform:o})};var uu=typeof document<"u"?w.useLayoutEffect:w.useEffect;function du(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(!du(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)&&!du(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function __(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function x_(e,t){const n=__(e);return Math.round(t*n)/n}function S_(e){const t=$.useRef(e);return uu(()=>{t.current=e}),t}function t3(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,[u,d]=$.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=$.useState(r);du(p,r)||f(r);const[h,m]=$.useState(null),[v,g]=$.useState(null),y=$.useCallback(F=>{F!=S.current&&(S.current=F,m(F))},[m]),b=$.useCallback(F=>{F!==R.current&&(R.current=F,g(F))},[g]),x=o||h,_=a||v,S=$.useRef(null),R=$.useRef(null),M=$.useRef(u),j=S_(l),k=S_(i),N=$.useCallback(()=>{if(!S.current||!R.current)return;const F={placement:t,strategy:n,middleware:p};k.current&&(F.platform=k.current),e3(S.current,R.current,F).then(V=>{const W={...V,isPositioned:!0};z.current&&!du(M.current,W)&&(M.current=W,eR.flushSync(()=>{d(W)}))})},[p,t,n,k]);uu(()=>{c===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,d(F=>({...F,isPositioned:!1})))},[c]);const z=$.useRef(!1);uu(()=>(z.current=!0,()=>{z.current=!1}),[]),uu(()=>{if(x&&(S.current=x),_&&(R.current=_),x&&_){if(j.current)return j.current(x,_,N);N()}},[x,_,N,j]);const B=$.useMemo(()=>({reference:S,floating:R,setReference:y,setFloating:b}),[y,b]),Z=$.useMemo(()=>({reference:x,floating:_}),[x,_]),L=$.useMemo(()=>{const F={position:n,left:0,top:0};if(!Z.floating)return F;const V=x_(Z.floating,u.x),W=x_(Z.floating,u.y);return s?{...F,transform:"translate("+V+"px, "+W+"px)",...__(Z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:W}},[n,s,Z.floating,u.x,u.y]);return $.useMemo(()=>({...u,update:N,refs:B,elements:Z,floatingStyles:L}),[u,N,B,Z,L])}/*!
234
234
  * tabbable 6.2.0
235
235
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
236
- */var n3=["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])"],em=n3.join(","),E_=typeof Element>"u",Vs=E_?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,fu=!E_&&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},pu=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},r3=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},i3=function(t,n,r){if(pu(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(em));return n&&Vs.call(t,em)&&i.unshift(t),i=i.filter(r),i},o3=function e(t,n,r){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!pu(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 u=Vs.call(a,em);u&&r.filter(a)&&(n||!t.includes(a))&&i.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!pu(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&p){var f=e(d===!0?a.children:d.children,!0,r);r.flatten?i.push.apply(i,f):i.push({scopeParent:a,candidates:f})}else o.unshift.apply(o,a.children)}}return i},C_=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},T_=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||r3(t))&&!C_(t)?0:t.tabIndex},a3=function(t,n){var r=T_(t);return r<0&&n&&!C_(t)?0:r},s3=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},k_=function(t){return t.tagName==="INPUT"},l3=function(t){return k_(t)&&t.type==="hidden"},c3=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},u3=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},d3=function(t){if(!t.name)return!0;var n=t.form||fu(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=u3(i,t.form);return!o||o===t},f3=function(t){return k_(t)&&t.type==="radio"},p3=function(t){return f3(t)&&!d3(t)},h3=function(t){var n,r=t&&fu(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,u,d;r=fu(i),i=(c=r)===null||c===void 0?void 0:c.host,o=!!((u=i)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(i))}}return o},O_=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},m3=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var o=Vs.call(t,"details>summary:first-of-type"),a=o?t.parentElement:t;if(Vs.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=fu(t);if(l&&!l.shadowRoot&&i(l)===!0)return O_(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(h3(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return O_(t);return!1},g3=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 Vs.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},y3=function(t,n){return!(n.disabled||pu(n)||l3(n)||m3(n,t)||c3(n)||g3(n))},A_=function(t,n){return!(p3(n)||T_(n)<0||!y3(t,n))},v3=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},b3=function e(t){var n=[],r=[];return t.forEach(function(i,o){var a=!!i.scopeParent,s=a?i.scopeParent:i,l=a3(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(s3).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},tm=function(t,n){n=n||{};var r;return n.getShadowRoot?r=o3([t],n.includeContainer,{filter:A_.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:v3}):r=i3(t,n.includeContainer,A_.bind(null,n)),b3(r)};const nm="ArrowUp",hu="ArrowDown",pa="ArrowLeft",Ks="ArrowRight";function mu(e,t,n){return Math.floor(e/t)!==n}function Gs(e,t){return t<0||t>=e.current.length}function rm(e,t){return Cn(e,{disabledIndices:t})}function $_(e,t){return Cn(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Cn(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 w3(e,t){let{event:n,orientation:r,loop:i,cols:o,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===nm){if(u&&yn(n),c===-1)d=l;else if(d=Cn(e,{startingIndex:d,amount:o,decrement:!0,disabledIndices:a}),i&&(c-o<s||d<0)){const p=c%o,f=l%o,h=l-(f-p);f===p?d=l:d=f>p?h:h-o}Gs(e,d)&&(d=c)}if(n.key===hu&&(u&&yn(n),c===-1?d=s:(d=Cn(e,{startingIndex:c,amount:o,disabledIndices:a}),i&&c+o>l&&(d=Cn(e,{startingIndex:c%o-o,amount:o,disabledIndices:a}))),Gs(e,d)&&(d=c)),r==="both"){const p=da(c/o);n.key===Ks&&(u&&yn(n),c%o!==o-1?(d=Cn(e,{startingIndex:c,disabledIndices:a}),i&&mu(d,o,p)&&(d=Cn(e,{startingIndex:c-c%o-1,disabledIndices:a}))):i&&(d=Cn(e,{startingIndex:c-c%o-1,disabledIndices:a})),mu(d,o,p)&&(d=c)),n.key===pa&&(u&&yn(n),c%o!==0?(d=Cn(e,{startingIndex:c,disabledIndices:a,decrement:!0}),i&&mu(d,o,p)&&(d=Cn(e,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:a}))):i&&(d=Cn(e,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:a})),mu(d,o,p)&&(d=c));const f=da(l/o)===p;Gs(e,d)&&(i&&f?d=n.key===pa?l:Cn(e,{startingIndex:c-c%o-1,disabledIndices:a}):d=c)}return d}let P_=0;function ci(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(P_);const o=()=>e==null?void 0:e.focus({preventScroll:n});i?o():P_=requestAnimationFrame(o)}var rn=typeof document<"u"?w.useLayoutEffect:w.useEffect;function gu(){return gu=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},gu.apply(this,arguments)}let im=!1,_3=0;const I_=()=>"floating-ui-"+_3++;function x3(){const[e,t]=$.useState(()=>im?I_():void 0);return rn(()=>{e==null&&t(I_())},[]),$.useEffect(()=>{im||(im=!0)},[]),e}const om=$["useId".toString()]||x3;function S3(){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 E3=$.createContext(null),C3=$.createContext(null),R_=()=>{var e;return((e=$.useContext(E3))==null?void 0:e.id)||null},yu=()=>$.useContext(C3);function Ys(e){return"data-floating-ui-"+e}function Fi(e){const t=w.useRef(e);return rn(()=>{t.current=e}),t}function T3(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 ha(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 k3(e,t){let n,r=-1;function i(o,a){a>r&&(n=o,r=a),ha(e,o).forEach(l=>{i(l.id,a+1)})}return i(t,0),e.find(o=>o.id===n)}let ma=new WeakMap,vu=new WeakSet,bu={},am=0;const O3=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,M_=e=>e&&(e.host||M_(e.parentNode)),A3=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=M_(n);return e.contains(r)?r:null}).filter(n=>n!=null);function $3(e,t,n,r){const i="data-floating-ui-inert",o=r?"inert":n?"aria-hidden":null,a=A3(t,e),s=new Set,l=new Set(a),c=[];bu[i]||(bu[i]=new WeakMap);const u=bu[i];a.forEach(d),p(t),s.clear();function d(f){!f||s.has(f)||(s.add(f),f.parentNode&&d(f.parentNode))}function p(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,h=>{if(s.has(h))p(h);else{const m=o?h.getAttribute(o):null,v=m!==null&&m!=="false",g=(ma.get(h)||0)+1,y=(u.get(h)||0)+1;ma.set(h,g),u.set(h,y),c.push(h),g===1&&v&&vu.add(h),y===1&&h.setAttribute(i,""),!v&&o&&h.setAttribute(o,"true")}})}return am++,()=>{c.forEach(f=>{const h=(ma.get(f)||0)-1,m=(u.get(f)||0)-1;ma.set(f,h),u.set(f,m),h||(!vu.has(f)&&o&&f.removeAttribute(o),vu.delete(f)),m||f.removeAttribute(i)}),am--,am||(ma=new WeakMap,ma=new WeakMap,vu=new WeakSet,bu={})}}function N_(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=yr(e[0]).body;return $3(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const sm=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function D_(e,t){const n=tm(e,sm());t==="prev"&&n.reverse();const r=n.indexOf(Li(yr(e)));return n.slice(r+1)[0]}function j_(){return D_(document.body,"next")}function L_(){return D_(document.body,"prev")}function Js(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!qn(n,r)}function P3(e){tm(e,sm()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function I3(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 lm={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 R3;function F_(e){e.key==="Tab"&&(e.target,clearTimeout(R3))}const wu=$.forwardRef(function(t,n){const[r,i]=$.useState();rn(()=>(l_()&&i("button"),document.addEventListener("keydown",F_),()=>{document.removeEventListener("keydown",F_)}),[]);const o={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Ys("focus-guard")]:"",style:lm};return $.createElement("span",gu({},t,o))}),U_=$.createContext(null);function M3(e){let{id:t,root:n}=e===void 0?{}:e;const[r,i]=$.useState(null),o=om(),a=B_(),s=$.useMemo(()=>({id:t,root:n,portalContext:a,uniqueId:o}),[t,n,a,o]),l=$.useRef();return rn(()=>()=>{r==null||r.remove()},[r,s]),rn(()=>{if(l.current===s)return;l.current=s;const{id:c,root:u,portalContext:d,uniqueId:p}=s,f=c?document.getElementById(c):null,h=Ys("portal");if(f){const m=document.createElement("div");m.id=p,m.setAttribute(h,""),f.appendChild(m),i(m)}else{let m=u||(d==null?void 0:d.portalNode);m&&!Wt(m)&&(m=m.current),m=m||document.body;let v=null;c&&(v=document.createElement("div"),v.id=c,m.appendChild(v));const g=document.createElement("div");g.id=p,g.setAttribute(h,""),m=v||m,m.appendChild(g),i(g)}},[s]),r}function N3(e){let{children:t,id:n,root:r=null,preserveTabOrder:i=!0}=e;const o=M3({id:n,root:r}),[a,s]=$.useState(null),l=$.useRef(null),c=$.useRef(null),u=$.useRef(null),d=$.useRef(null),p=!!a&&!a.modal&&a.open&&i&&!!(r||o);return $.useEffect(()=>{if(!o||!i||a!=null&&a.modal)return;function f(h){o&&Js(h)&&(h.type==="focusin"?I3:P3)(o)}return o.addEventListener("focusin",f,!0),o.addEventListener("focusout",f,!0),()=>{o.removeEventListener("focusin",f,!0),o.removeEventListener("focusout",f,!0)}},[o,i,a==null?void 0:a.modal]),$.createElement(U_.Provider,{value:$.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:o,setFocusManagerState:s}),[i,o])},p&&o&&$.createElement(wu,{"data-type":"outside",ref:l,onFocus:f=>{if(Js(f,o)){var h;(h=u.current)==null||h.focus()}else{const m=L_()||(a==null?void 0:a.refs.domReference.current);m==null||m.focus()}}}),p&&o&&$.createElement("span",{"aria-owns":o.id,style:lm}),o&&$r.createPortal(t,o),p&&o&&$.createElement(wu,{"data-type":"outside",ref:c,onFocus:f=>{if(Js(f,o)){var h;(h=d.current)==null||h.focus()}else{const m=j_()||(a==null?void 0:a.refs.domReference.current);m==null||m.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,f.nativeEvent))}}}))}const B_=()=>$.useContext(U_),D3=$.forwardRef(function(t,n){return $.createElement("button",gu({},t,{type:"button",ref:n,tabIndex:-1,style:lm}))});function j3(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:u=!0}=e,{open:d,refs:p,nodeId:f,onOpenChange:h,events:m,dataRef:v,elements:{domReference:g,floating:y}}=t,b=O3()?o:!0,x=Fi(i),_=Fi(a),S=Fi(s),R=yu(),M=B_(),j=typeof a=="number"&&a<0,k=$.useRef(null),N=$.useRef(null),z=$.useRef(!1),U=$.useRef(null),Z=$.useRef(!1),L=M!=null,F=g&&g.getAttribute("role")==="combobox"&&d_(g)&&j,V=$.useCallback(function(se){return se===void 0&&(se=y),se?tm(se,sm()):[]},[y]),W=$.useCallback(se=>{const we=V(se);return x.current.map(O=>g&&O==="reference"?g:y&&O==="floating"?y:we).filter(Boolean).flat()},[g,y,x,V]);$.useEffect(()=>{if(r||!l)return;function se(O){if(O.key==="Tab"){qn(y,Li(yr(y)))&&V().length===0&&!F&&yn(O);const Oe=W(),Be=u_(O);x.current[0]==="reference"&&Be===g&&(yn(O),O.shiftKey?ci(Oe[Oe.length-1]):ci(Oe[1])),x.current[1]==="floating"&&Be===y&&O.shiftKey&&(yn(O),ci(Oe[0]))}}const we=yr(y);return we.addEventListener("keydown",se),()=>{we.removeEventListener("keydown",se)}},[r,g,y,l,x,p,F,V,W]),$.useEffect(()=>{if(r||!u)return;function se(){Z.current=!0,setTimeout(()=>{Z.current=!1})}function we(O){const Oe=O.relatedTarget;queueMicrotask(()=>{const Be=!(qn(g,Oe)||qn(y,Oe)||qn(Oe,y)||qn(M==null?void 0:M.portalNode,Oe)||Oe!=null&&Oe.hasAttribute(Ys("focus-guard"))||R&&(ha(R.nodesRef.current,f).find(Me=>{var Ze,nt;return qn((Ze=Me.context)==null?void 0:Ze.elements.floating,Oe)||qn((nt=Me.context)==null?void 0:nt.elements.domReference,Oe)})||T3(R.nodesRef.current,f).find(Me=>{var Ze,nt;return((Ze=Me.context)==null?void 0:Ze.elements.floating)===Oe||((nt=Me.context)==null?void 0:nt.elements.domReference)===Oe})));Oe&&Be&&!Z.current&&Oe!==U.current&&(z.current=!0,h(!1,O))})}if(y&&En(g))return g.addEventListener("focusout",we),g.addEventListener("pointerdown",se),!l&&y.addEventListener("focusout",we),()=>{g.removeEventListener("focusout",we),g.removeEventListener("pointerdown",se),!l&&y.removeEventListener("focusout",we)}},[r,g,y,l,f,R,M,h,u]),$.useEffect(()=>{var se;if(r)return;const we=Array.from((M==null||(se=M.portalNode)==null?void 0:se.querySelectorAll("["+Ys("portal")+"]"))||[]);if(y){const O=[y,...we,k.current,N.current,x.current.includes("reference")||F?g:null].filter(Be=>Be!=null),Oe=l?N_(O,b,!b):N_(O);return()=>{Oe()}}},[r,g,y,l,x,M,F,b]),rn(()=>{if(r||!y)return;const se=yr(y),we=Li(se);queueMicrotask(()=>{const O=W(y),Oe=_.current,Be=(typeof Oe=="number"?O[Oe]:Oe.current)||y,Me=qn(y,we);!j&&!Me&&d&&ci(Be,{preventScroll:Be===y})})},[r,d,y,j,W,_]),rn(()=>{if(r||!y)return;let se=!1;const we=yr(y),O=Li(we),Oe=v.current;U.current=O;function Be(Me){if(Me.type==="escapeKey"&&p.domReference.current&&(U.current=p.domReference.current),["referencePress","escapeKey"].includes(Me.type))return;const Ze=Me.data.returnFocus;typeof Ze=="object"?(z.current=!1,se=Ze.preventScroll):z.current=!Ze}return m.on("dismiss",Be),()=>{m.off("dismiss",Be);const Me=Li(we);(qn(y,Me)||R&&ha(R.nodesRef.current,f).some(nt=>{var We;return qn((We=nt.context)==null?void 0:We.elements.floating,Me)})||Oe.openEvent&&["click","mousedown"].includes(Oe.openEvent.type))&&p.domReference.current&&(U.current=p.domReference.current),S.current&&En(U.current)&&!z.current&&ci(U.current,{cancelPrevious:!1,preventScroll:se})}},[r,y,S,v,p,m,R,f]),rn(()=>{if(!(r||!M))return M.setFocusManagerState({modal:l,closeOnFocusOut:u,open:d,onOpenChange:h,refs:p}),()=>{M.setFocusManagerState(null)}},[r,M,l,d,h,p,u]),rn(()=>{if(!r&&y&&typeof MutationObserver=="function"&&!j){const se=()=>{const O=y.getAttribute("tabindex");x.current.includes("floating")||Li(yr(y))!==p.domReference.current&&V().length===0?O!=="0"&&y.setAttribute("tabindex","0"):O!=="-1"&&y.setAttribute("tabindex","-1")};se();const we=new MutationObserver(se);return we.observe(y,{childList:!0,subtree:!0,attributes:!0}),()=>{we.disconnect()}}},[r,y,p,x,V,j]);function pe(se){return r||!c||!l?null:$.createElement(D3,{ref:se==="start"?k:N,onClick:we=>h(!1,we.nativeEvent)},typeof c=="string"?c:"Dismiss")}const C=!r&&b&&!F&&(L||l);return $.createElement($.Fragment,null,C&&$.createElement(wu,{"data-type":"inside",ref:M==null?void 0:M.beforeInsideRef,onFocus:se=>{if(l){const O=W();ci(i[0]==="reference"?O[0]:O[O.length-1])}else if(M!=null&&M.preserveTabOrder&&M.portalNode)if(z.current=!1,Js(se,M.portalNode)){const O=j_()||g;O==null||O.focus()}else{var we;(we=M.beforeOutsideRef.current)==null||we.focus()}}}),!F&&pe("start"),n,pe("end"),C&&$.createElement(wu,{"data-type":"inside",ref:M==null?void 0:M.afterInsideRef,onFocus:se=>{if(l)ci(W()[0]);else if(M!=null&&M.preserveTabOrder&&M.portalNode)if(u&&(z.current=!0),Js(se,M.portalNode)){const O=L_()||g;O==null||O.focus()}else{var we;(we=M.afterOutsideRef.current)==null||we.focus()}}}))}function z_(e){return En(e.target)&&e.target.tagName==="BUTTON"}function Z_(e){return d_(e)}function L3(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:u=!0}=t,d=$.useRef(),p=$.useRef(!1);return $.useMemo(()=>a?{reference:{onPointerDown(f){d.current=f.pointerType},onMouseDown(f){f.button===0&&(c_(d.current,!0)&&c||s!=="click"&&(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")?r(!1,f.nativeEvent):(f.preventDefault(),r(!0,f.nativeEvent))))},onClick(f){if(s==="mousedown"&&d.current){d.current=void 0;return}c_(d.current,!0)&&c||(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="click")?r(!1,f.nativeEvent):r(!0,f.nativeEvent))},onKeyDown(f){d.current=void 0,!(f.defaultPrevented||!u||z_(f))&&(f.key===" "&&!Z_(o)&&(f.preventDefault(),p.current=!0),f.key==="Enter"&&r(!(n&&l),f.nativeEvent))},onKeyUp(f){f.defaultPrevented||!u||z_(f)||Z_(o)||f.key===" "&&p.current&&(p.current=!1,r(!(n&&l),f.nativeEvent))}}}:{},[a,i,s,c,u,o,l,n,r])}const F3=$["useInsertionEffect".toString()]||(e=>e());function Ui(e){const t=$.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return F3(()=>{t.current=e}),$.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 U3={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},B3={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},z3=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 Z3(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:u=!0,escapeKey:d=!0,outsidePress:p=!0,outsidePressEvent:f="pointerdown",referencePress:h=!1,referencePressEvent:m="pointerdown",ancestorScroll:v=!1,bubbles:g}=t,y=yu(),b=R_()!=null,x=Ui(typeof p=="function"?p:()=>!1),_=typeof p=="function"?x:p,S=$.useRef(!1),{escapeKeyBubbles:R,outsidePressBubbles:M}=z3(g),j=Ui(N=>{if(!n||!u||!d||N.key!=="Escape")return;const z=y?ha(y.nodesRef.current,o):[];if(!R&&(N.stopPropagation(),z.length>0)){let U=!0;if(z.forEach(Z=>{var L;if((L=Z.context)!=null&&L.open&&!Z.context.dataRef.current.__escapeKeyBubbles){U=!1;return}}),!U)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,$B(N)?N.nativeEvent:N)}),k=Ui(N=>{const z=S.current;if(S.current=!1,z||typeof _=="function"&&!_(N))return;const U=u_(N),Z="["+Ys("inert")+"]",L=yr(l).querySelectorAll(Z);let F=Wt(U)?U:null;for(;F&&!Ws(F);){const pe=bo(F);if(pe===yr(l).body||!Wt(pe))break;F=pe}if(L.length&&Wt(U)&&!PB(U)&&!qn(U,l)&&Array.from(L).every(pe=>!qn(F,pe)))return;if(En(U)&&l){const pe=U.clientWidth>0&&U.scrollWidth>U.clientWidth,C=U.clientHeight>0&&U.scrollHeight>U.clientHeight;let se=C&&N.offsetX>U.clientWidth;if(C&&nr(U).direction==="rtl"&&(se=N.offsetX<=U.offsetWidth-U.clientWidth),se||pe&&N.offsetY>U.clientHeight)return}const V=y&&ha(y.nodesRef.current,o).some(pe=>{var C;return Xh(N,(C=pe.context)==null?void 0:C.elements.floating)});if(Xh(N,l)||Xh(N,s)||V)return;const W=y?ha(y.nodesRef.current,o):[];if(W.length>0){let pe=!0;if(W.forEach(C=>{var se;if((se=C.context)!=null&&se.open&&!C.context.dataRef.current.__outsidePressBubbles){pe=!1;return}}),!pe)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:b?{preventScroll:!0}:a_(N)||s_(N)}}),r(!1,N)});return $.useEffect(()=>{if(!n||!u)return;c.current.__escapeKeyBubbles=R,c.current.__outsidePressBubbles=M;function N(Z){r(!1,Z)}const z=yr(l);d&&z.addEventListener("keydown",j),_&&z.addEventListener(f,k);let U=[];return v&&(Wt(s)&&(U=ji(s)),Wt(l)&&(U=U.concat(ji(l))),!Wt(a)&&a&&a.contextElement&&(U=U.concat(ji(a.contextElement)))),U=U.filter(Z=>{var L;return Z!==((L=z.defaultView)==null?void 0:L.visualViewport)}),U.forEach(Z=>{Z.addEventListener("scroll",N,{passive:!0})}),()=>{d&&z.removeEventListener("keydown",j),_&&z.removeEventListener(f,k),U.forEach(Z=>{Z.removeEventListener("scroll",N)})}},[c,l,s,a,d,_,f,n,r,v,u,R,M,j,k]),$.useEffect(()=>{S.current=!1},[_,f]),$.useMemo(()=>u?{reference:{onKeyDown:j,[U3[m]]:N=>{h&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,N.nativeEvent))}},floating:{onKeyDown:j,[B3[f]]:()=>{S.current=!0}}}:{},[u,i,h,f,m,r,j])}let cm;process.env.NODE_ENV!=="production"&&(cm=new Set);function q3(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 R="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&&!Wt(e.elements.reference)){var a;if(!((a=cm)!=null&&a.has(R))){var s;(s=cm)==null||s.add(R),console.error(R)}}}const[l,c]=$.useState(null),u=((t=e.elements)==null?void 0:t.reference)||l,d=t3(e),p=yu(),f=Ui((R,M)=>{R&&(m.current.openEvent=M),r==null||r(R,M)}),h=$.useRef(null),m=$.useRef({}),v=$.useState(()=>S3())[0],g=om(),y=$.useCallback(R=>{const M=Wt(R)?{getBoundingClientRect:()=>R.getBoundingClientRect(),contextElement:R}:R;d.refs.setReference(M)},[d.refs]),b=$.useCallback(R=>{(Wt(R)||R===null)&&(h.current=R,c(R)),(Wt(d.refs.reference.current)||d.refs.reference.current===null||R!==null&&!Wt(R))&&d.refs.setReference(R)},[d.refs]),x=$.useMemo(()=>({...d.refs,setReference:b,setPositionReference:y,domReference:h}),[d.refs,b,y]),_=$.useMemo(()=>({...d.elements,domReference:u}),[d.elements,u]),S=$.useMemo(()=>({...d,refs:x,elements:_,dataRef:m,nodeId:i,floatingId:g,events:v,open:n,onOpenChange:f}),[d,i,g,v,n,f,x,_]);return rn(()=>{const R=p==null?void 0:p.nodesRef.current.find(M=>M.id===i);R&&(R.context=S)}),$.useMemo(()=>({...d,context:S,refs:x,elements:_}),[d,x,_,S])}function um(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 u,d=arguments.length,p=new Array(d),f=0;f<d;f++)p[f]=arguments[f];return(u=r.get(s))==null?void 0:u.map(h=>h(...p)).find(h=>h!==void 0)}}}else i[s]=l}),i),{})}}function H3(e){e===void 0&&(e=[]);const t=e,n=$.useCallback(o=>um(o,e,"reference"),t),r=$.useCallback(o=>um(o,e,"floating"),t),i=$.useCallback(o=>um(o,e,"item"),e.map(o=>o==null?void 0:o.item));return $.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])}let q_=!1;function _u(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function H_(e,t){return _u(t,e===nm||e===hu,e===pa||e===Ks)}function dm(e,t,n){return _u(t,e===hu,n?e===pa:e===Ks)||e==="Enter"||e==" "||e===""}function W3(e,t,n){return _u(t,n?e===pa:e===Ks,e===hu)}function W_(e,t,n){return _u(t,n?e===Ks:e===pa,e===nm)}function V3(e,t){const{open:n,onOpenChange:r,refs:i,elements:{domReference:o,floating:a}}=e,{listRef:s,activeIndex:l,onNavigate:c=()=>{},enabled:u=!0,selectedIndex:d=null,allowEscape:p=!1,loop:f=!1,nested:h=!1,rtl:m=!1,virtual:v=!1,focusItemOnOpen:g="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:b=!0,disabledIndices:x=void 0,orientation:_="vertical",cols:S=1,scrollItemIntoView:R=!0,virtualItemRef:M}=t;process.env.NODE_ENV!=="production"&&(p&&(f||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),v||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),_==="vertical"&&S>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const j=R_(),k=yu(),N=Ui(c),z=$.useRef(g),U=$.useRef(d??-1),Z=$.useRef(null),L=$.useRef(!0),F=$.useRef(N),V=$.useRef(!!a),W=$.useRef(!1),pe=$.useRef(!1),C=Fi(x),se=Fi(n),we=Fi(R),[O,Oe]=$.useState(),[Be,Me]=$.useState(),Ze=Ui(function(_e,ye,$e){$e===void 0&&($e=!1);const xe=_e.current[ye.current];xe&&(v?(Oe(xe.id),k==null||k.events.emit("virtualfocus",xe),M&&(M.current=xe)):ci(xe,{preventScroll:!0,sync:AB()&&l_()?q_||W.current:!1}),requestAnimationFrame(()=>{const Ue=we.current;Ue&&xe&&($e||!L.current)&&(xe.scrollIntoView==null||xe.scrollIntoView(typeof Ue=="boolean"?{block:"nearest",inline:"nearest"}:Ue))}))});rn(()=>{document.createElement("div").focus({get preventScroll(){return q_=!0,!1}})},[]),rn(()=>{u&&(n&&a?z.current&&d!=null&&(pe.current=!0,N(d)):V.current&&(U.current=-1,F.current(null)))},[u,n,a,d,N]),rn(()=>{if(u&&n&&a)if(l==null){if(W.current=!1,d!=null)return;if(V.current&&(U.current=-1,Ze(s,U)),!V.current&&z.current&&(Z.current!=null||z.current===!0&&Z.current==null)){let _e=0;const ye=()=>{s.current[0]==null?(_e<2&&(_e?requestAnimationFrame:queueMicrotask)(ye),_e++):(U.current=Z.current==null||dm(Z.current,_,m)||h?rm(s,C.current):$_(s,C.current),Z.current=null,N(U.current))};ye()}}else Gs(s,l)||(U.current=l,Ze(s,U,pe.current),pe.current=!1)},[u,n,a,l,d,h,s,_,m,N,Ze,C]),rn(()=>{var _e,ye;if(!u||a||!k||v||!V.current)return;const $e=k.nodesRef.current,xe=(_e=$e.find(D=>D.id===j))==null||(ye=_e.context)==null?void 0:ye.elements.floating,Ue=Li(yr(a)),ot=$e.some(D=>D.context&&qn(D.context.elements.floating,Ue));xe&&!ot&&L.current&&xe.focus({preventScroll:!0})},[u,a,k,j,v]),rn(()=>{if(!u||!k||!v||j)return;function _e(ye){Me(ye.id),M&&(M.current=ye)}return k.events.on("virtualfocus",_e),()=>{k.events.off("virtualfocus",_e)}},[u,k,v,j,M]),rn(()=>{F.current=N,V.current=!!a}),rn(()=>{n||(Z.current=null)},[n]);const nt=l!=null,We=$.useMemo(()=>{function _e($e){if(!n)return;const xe=s.current.indexOf($e);xe!==-1&&N(xe)}return{onFocus($e){let{currentTarget:xe}=$e;_e(xe)},onClick:$e=>{let{currentTarget:xe}=$e;return xe.focus({preventScroll:!0})},...y&&{onMouseMove($e){let{currentTarget:xe}=$e;_e(xe)},onPointerLeave($e){let{pointerType:xe}=$e;!L.current||xe==="touch"||(U.current=-1,Ze(s,U),N(null),v||ci(i.floating.current,{preventScroll:!0}))}}}},[n,i,Ze,y,s,N,v]);return $.useMemo(()=>{if(!u)return{};const _e=C.current;function ye(D){if(L.current=!1,W.current=!0,!se.current&&D.currentTarget===i.floating.current)return;if(h&&W_(D.key,_,m)){yn(D),r(!1,D.nativeEvent),En(o)&&!v&&o.focus();return}const ue=U.current,me=rm(s,_e),fe=$_(s,_e);if(D.key==="Home"&&(yn(D),U.current=me,N(U.current)),D.key==="End"&&(yn(D),U.current=fe,N(U.current)),!(S>1&&(U.current=w3(s,{event:D,orientation:_,loop:f,cols:S,disabledIndices:_e,minIndex:me,maxIndex:fe,prevIndex:U.current,stopEvent:!0}),N(U.current),_==="both"))&&H_(D.key,_)){if(yn(D),n&&!v&&Li(D.currentTarget.ownerDocument)===D.currentTarget){U.current=dm(D.key,_,m)?me:fe,N(U.current);return}dm(D.key,_,m)?f?U.current=ue>=fe?p&&ue!==s.current.length?-1:me:Cn(s,{startingIndex:ue,disabledIndices:_e}):U.current=Math.min(fe,Cn(s,{startingIndex:ue,disabledIndices:_e})):f?U.current=ue<=me?p&&ue!==-1?s.current.length:fe:Cn(s,{startingIndex:ue,decrement:!0,disabledIndices:_e}):U.current=Math.max(me,Cn(s,{startingIndex:ue,decrement:!0,disabledIndices:_e})),Gs(s,U.current)?N(null):N(U.current)}}function $e(D){g==="auto"&&a_(D.nativeEvent)&&(z.current=!0)}function xe(D){z.current=g,g==="auto"&&s_(D.nativeEvent)&&(z.current=!0)}const Ue=v&&n&&nt&&{"aria-activedescendant":Be||O},ot=s.current.find(D=>(D==null?void 0:D.id)===O);return{reference:{...Ue,onKeyDown(D){L.current=!1;const ue=D.key.indexOf("Arrow")===0,me=W3(D.key,_,m),fe=W_(D.key,_,m),Le=H_(D.key,_),De=(h?me:Le)||D.key==="Enter"||D.key.trim()==="";if(v&&n){const q=k==null?void 0:k.nodesRef.current.find(de=>de.parentId==null),X=k&&q?k3(k.nodesRef.current,q.id):null;if(ue&&X&&M){const de=new KeyboardEvent("keydown",{key:D.key,bubbles:!0});if(me||fe){var Ke,gt;const je=((Ke=X.context)==null?void 0:Ke.elements.domReference)===D.currentTarget,rt=fe&&!je?(gt=X.context)==null?void 0:gt.elements.domReference:me?ot:null;rt&&(yn(D),rt.dispatchEvent(de),Me(void 0))}if(Le&&X.context&&X.context.open&&X.parentId&&D.currentTarget!==X.context.elements.domReference){var Xe;yn(D),(Xe=X.context.elements.domReference)==null||Xe.dispatchEvent(de);return}}return ye(D)}if(!(!n&&!b&&ue)){if(De&&(Z.current=h&&Le?null:D.key),h){me&&(yn(D),n?(U.current=rm(s,_e),N(U.current)):r(!0,D.nativeEvent));return}Le&&(d!=null&&(U.current=d),yn(D),!n&&b?r(!0,D.nativeEvent):ye(D),n&&N(U.current))}},onFocus(){n&&N(null)},onPointerDown:xe,onMouseDown:$e,onClick:$e},floating:{"aria-orientation":_==="both"?void 0:_,...Ue,onKeyDown:ye,onPointerMove(){L.current=!0}},item:We}},[o,i,O,Be,C,se,s,u,_,m,v,n,nt,h,d,b,p,S,f,g,N,r,We,k,M])}function K3(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:i=!0,role:o="dialog"}=t,a=om();return $.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 G3(e,t){var n;const{open:r,dataRef:i}=e,{listRef:o,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:p=[],selectedIndex:f=null}=t,h=$.useRef(),m=$.useRef(""),v=$.useRef((n=f??a)!=null?n:-1),g=$.useRef(null),y=Ui(s),b=Ui(l),x=Fi(u),_=Fi(p);return rn(()=>{r&&(clearTimeout(h.current),g.current=null,m.current="")},[r]),rn(()=>{if(r&&m.current===""){var S;v.current=(S=f??a)!=null?S:-1}},[r,f,a]),$.useMemo(()=>{if(!c)return{};function S(j){j?i.current.typing||(i.current.typing=j,b(j)):i.current.typing&&(i.current.typing=j,b(j))}function R(j,k,N){const z=x.current?x.current(k,N):k.find(U=>(U==null?void 0:U.toLocaleLowerCase().indexOf(N.toLocaleLowerCase()))===0);return z?j.indexOf(z):-1}function M(j){const k=o.current;if(m.current.length>0&&m.current[0]!==" "&&(R(k,k,m.current)===-1?S(!1):j.key===" "&&yn(j)),k==null||_.current.includes(j.key)||j.key.length!==1||j.ctrlKey||j.metaKey||j.altKey)return;r&&j.key!==" "&&(yn(j),S(!0)),k.every(Z=>{var L,F;return Z?((L=Z[0])==null?void 0:L.toLocaleLowerCase())!==((F=Z[1])==null?void 0:F.toLocaleLowerCase()):!0})&&m.current===j.key&&(m.current="",v.current=g.current),m.current+=j.key,clearTimeout(h.current),h.current=setTimeout(()=>{m.current="",v.current=g.current,S(!1)},d);const z=v.current,U=R(k,[...k.slice((z||0)+1),...k.slice(0,(z||0)+1)],m.current);U!==-1?(y(U),g.current=U):j.key!==" "&&(m.current="",S(!1))}return{reference:{onKeyDown:M},floating:{onKeyDown:M,onKeyUp(j){j.key===" "&&S(!1)}}}},[c,r,i,o,d,_,x,y,b])}const Y3=({styles:e,type:t,options:n,label:r,reusable:i})=>{var V,W,pe,C,se,we,O,Oe,Be,Me,Ze,nt;const{state:o,client:a,messageContainerRef:s}=$t(),[l,c]=$.useState(!1),[u,d]=$.useState(null),[p,f]=$.useState(null),h=n.reduce((We,_e)=>(We[_e.label]=_e.value,We),{}),m=h?Object.keys(h):[],v=We=>{c(p!==null&&!i?!1:We)},{refs:g,floatingStyles:y,context:b}=q3({placement:"bottom-start",open:l,onOpenChange:v,whileElementsMounted:QB,middleware:[NB(5),DB({padding:10,boundary:(s==null?void 0:s.current)??void 0,crossAxis:!0}),jB({apply({rects:We,elements:_e,availableHeight:ye}){Object.assign(_e.floating.style,{maxHeight:`${ye}px`,minWidth:`${We.reference.width}px`})},padding:10})]}),x=$.useRef([]),_=$.useRef(m),S=$.useRef(!1),R=L3(b,{event:"mousedown"}),M=Z3(b),j=K3(b,{role:"listbox"}),k=V3(b,{listRef:x,activeIndex:u,selectedIndex:p,onNavigate:d,loop:!0}),N=G3(b,{listRef:_,activeIndex:u,selectedIndex:p,onMatch:l?d:f,onTypingChange(We){S.current=We}}),{getReferenceProps:z,getFloatingProps:U,getItemProps:Z}=H3([M,j,k,N,R]),L=We=>{f(We),a==null||a.sendMessage(h[m[We]]),c(!1)},F=p!==null?m[p]:void 0;return B.jsxs(B.Fragment,{children:[B.jsxs("div",{tabIndex:0,ref:g.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":p!==null&&!i?"":void 0,...(W=(V=e==null?void 0:e[t])==null?void 0:V.button)==null?void 0:W.container,...z(),children:[B.jsx("span",{...(C=(pe=e==null?void 0:e[t])==null?void 0:pe.button)==null?void 0:C.text,children:F||r||"Select..."}),B.jsx(xU,{...(we=(se=e==null?void 0:e[t])==null?void 0:se.button)==null?void 0:we.icon})]}),l&&B.jsx(N3,{children:B.jsx(j3,{context:b,modal:!1,children:B.jsx("div",{ref:g.setFloating,className:(Be=(Oe=(O=e==null?void 0:e[t])==null?void 0:O.content)==null?void 0:Oe.container)==null?void 0:Be.className,style:{...y,...(nt=(Ze=(Me=e==null?void 0:e[t])==null?void 0:Me.content)==null?void 0:Ze.container)==null?void 0:nt.style},...U(),children:m.map((We,_e)=>{var ye,$e;return B.jsx("div",{ref:xe=>{x.current[_e]=xe},role:"option",tabIndex:_e===u?0:-1,"aria-selected":_e===p&&_e===u,"data-active":_e===u?"":void 0,...($e=(ye=e==null?void 0:e[t])==null?void 0:ye.content)==null?void 0:$e.item,...Z({onClick(){o.isReadOnly||L(_e)},onKeyDown(xe){o.isReadOnly||(xe.key==="Enter"&&(xe.preventDefault(),L(_e)),xe.key===" "&&!S.current&&(xe.preventDefault(),L(_e)))}}),children:We},We)})})})})]})},J3=w.forwardRef(({type:e,title:t,styles:n,url:r,...i},o)=>{var a,s,l;return B.jsxs("a",{...i,...(a=n==null?void 0:n[e])==null?void 0:a.container,href:r,download:!0,ref:o,children:[B.jsx("p",{...(s=n==null?void 0:n[e])==null?void 0:s.title,children:t||r}),B.jsx(EU,{...(l=n==null?void 0:n[e])==null?void 0:l.icon})]})}),fm={audio:hU,bubble:qL,button:zL,carousel:_B,column:OU,dropdown:Y3,file:J3,image:dU,location:kU,row:AU,text:UL,video:pU},ga=({block:e,styles:t,...n})=>{const r=fm[e.type],i={...n,styles:t,...e};return B.jsx(r,{...i})},V_=e=>{let t;const n=new Set,r=(l,c)=>{const u=typeof l=="function"?l(t):l;if(!Object.is(u,t)){const d=t;t=c??typeof u!="object"?u:Object.assign({},t,u),n.forEach(p=>p(t,d))}},i=()=>t,s={setState:r,getState:i,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{n.clear()}};return t=e(r,i,s),s},X3=e=>e?V_(e):V_;var pm={exports:{}},hm={},xu={exports:{}},mm={};/**
236
+ */var n3=["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])"],em=n3.join(","),E_=typeof Element>"u",Vs=E_?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,fu=!E_&&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},pu=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},r3=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},i3=function(t,n,r){if(pu(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(em));return n&&Vs.call(t,em)&&i.unshift(t),i=i.filter(r),i},o3=function e(t,n,r){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!pu(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 u=Vs.call(a,em);u&&r.filter(a)&&(n||!t.includes(a))&&i.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!pu(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&p){var f=e(d===!0?a.children:d.children,!0,r);r.flatten?i.push.apply(i,f):i.push({scopeParent:a,candidates:f})}else o.unshift.apply(o,a.children)}}return i},C_=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},T_=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||r3(t))&&!C_(t)?0:t.tabIndex},a3=function(t,n){var r=T_(t);return r<0&&n&&!C_(t)?0:r},s3=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},k_=function(t){return t.tagName==="INPUT"},l3=function(t){return k_(t)&&t.type==="hidden"},c3=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},u3=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},d3=function(t){if(!t.name)return!0;var n=t.form||fu(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=u3(i,t.form);return!o||o===t},f3=function(t){return k_(t)&&t.type==="radio"},p3=function(t){return f3(t)&&!d3(t)},h3=function(t){var n,r=t&&fu(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,u,d;r=fu(i),i=(c=r)===null||c===void 0?void 0:c.host,o=!!((u=i)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(i))}}return o},O_=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},m3=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var o=Vs.call(t,"details>summary:first-of-type"),a=o?t.parentElement:t;if(Vs.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=fu(t);if(l&&!l.shadowRoot&&i(l)===!0)return O_(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(h3(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return O_(t);return!1},g3=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 Vs.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},y3=function(t,n){return!(n.disabled||pu(n)||l3(n)||m3(n,t)||c3(n)||g3(n))},A_=function(t,n){return!(p3(n)||T_(n)<0||!y3(t,n))},v3=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},b3=function e(t){var n=[],r=[];return t.forEach(function(i,o){var a=!!i.scopeParent,s=a?i.scopeParent:i,l=a3(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(s3).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},tm=function(t,n){n=n||{};var r;return n.getShadowRoot?r=o3([t],n.includeContainer,{filter:A_.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:v3}):r=i3(t,n.includeContainer,A_.bind(null,n)),b3(r)};const nm="ArrowUp",hu="ArrowDown",pa="ArrowLeft",Ks="ArrowRight";function mu(e,t,n){return Math.floor(e/t)!==n}function Gs(e,t){return t<0||t>=e.current.length}function rm(e,t){return Cn(e,{disabledIndices:t})}function $_(e,t){return Cn(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Cn(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 w3(e,t){let{event:n,orientation:r,loop:i,cols:o,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===nm){if(u&&yn(n),c===-1)d=l;else if(d=Cn(e,{startingIndex:d,amount:o,decrement:!0,disabledIndices:a}),i&&(c-o<s||d<0)){const p=c%o,f=l%o,h=l-(f-p);f===p?d=l:d=f>p?h:h-o}Gs(e,d)&&(d=c)}if(n.key===hu&&(u&&yn(n),c===-1?d=s:(d=Cn(e,{startingIndex:c,amount:o,disabledIndices:a}),i&&c+o>l&&(d=Cn(e,{startingIndex:c%o-o,amount:o,disabledIndices:a}))),Gs(e,d)&&(d=c)),r==="both"){const p=da(c/o);n.key===Ks&&(u&&yn(n),c%o!==o-1?(d=Cn(e,{startingIndex:c,disabledIndices:a}),i&&mu(d,o,p)&&(d=Cn(e,{startingIndex:c-c%o-1,disabledIndices:a}))):i&&(d=Cn(e,{startingIndex:c-c%o-1,disabledIndices:a})),mu(d,o,p)&&(d=c)),n.key===pa&&(u&&yn(n),c%o!==0?(d=Cn(e,{startingIndex:c,disabledIndices:a,decrement:!0}),i&&mu(d,o,p)&&(d=Cn(e,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:a}))):i&&(d=Cn(e,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:a})),mu(d,o,p)&&(d=c));const f=da(l/o)===p;Gs(e,d)&&(i&&f?d=n.key===pa?l:Cn(e,{startingIndex:c-c%o-1,disabledIndices:a}):d=c)}return d}let P_=0;function ci(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(P_);const o=()=>e==null?void 0:e.focus({preventScroll:n});i?o():P_=requestAnimationFrame(o)}var rn=typeof document<"u"?w.useLayoutEffect:w.useEffect;function gu(){return gu=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},gu.apply(this,arguments)}let im=!1,_3=0;const I_=()=>"floating-ui-"+_3++;function x3(){const[e,t]=$.useState(()=>im?I_():void 0);return rn(()=>{e==null&&t(I_())},[]),$.useEffect(()=>{im||(im=!0)},[]),e}const om=$["useId".toString()]||x3;function S3(){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 E3=$.createContext(null),C3=$.createContext(null),R_=()=>{var e;return((e=$.useContext(E3))==null?void 0:e.id)||null},yu=()=>$.useContext(C3);function Ys(e){return"data-floating-ui-"+e}function Fi(e){const t=w.useRef(e);return rn(()=>{t.current=e}),t}function T3(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 ha(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 k3(e,t){let n,r=-1;function i(o,a){a>r&&(n=o,r=a),ha(e,o).forEach(l=>{i(l.id,a+1)})}return i(t,0),e.find(o=>o.id===n)}let ma=new WeakMap,vu=new WeakSet,bu={},am=0;const O3=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,M_=e=>e&&(e.host||M_(e.parentNode)),A3=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=M_(n);return e.contains(r)?r:null}).filter(n=>n!=null);function $3(e,t,n,r){const i="data-floating-ui-inert",o=r?"inert":n?"aria-hidden":null,a=A3(t,e),s=new Set,l=new Set(a),c=[];bu[i]||(bu[i]=new WeakMap);const u=bu[i];a.forEach(d),p(t),s.clear();function d(f){!f||s.has(f)||(s.add(f),f.parentNode&&d(f.parentNode))}function p(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,h=>{if(s.has(h))p(h);else{const m=o?h.getAttribute(o):null,v=m!==null&&m!=="false",g=(ma.get(h)||0)+1,y=(u.get(h)||0)+1;ma.set(h,g),u.set(h,y),c.push(h),g===1&&v&&vu.add(h),y===1&&h.setAttribute(i,""),!v&&o&&h.setAttribute(o,"true")}})}return am++,()=>{c.forEach(f=>{const h=(ma.get(f)||0)-1,m=(u.get(f)||0)-1;ma.set(f,h),u.set(f,m),h||(!vu.has(f)&&o&&f.removeAttribute(o),vu.delete(f)),m||f.removeAttribute(i)}),am--,am||(ma=new WeakMap,ma=new WeakMap,vu=new WeakSet,bu={})}}function N_(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=yr(e[0]).body;return $3(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const sm=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function D_(e,t){const n=tm(e,sm());t==="prev"&&n.reverse();const r=n.indexOf(Li(yr(e)));return n.slice(r+1)[0]}function j_(){return D_(document.body,"next")}function L_(){return D_(document.body,"prev")}function Js(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!qn(n,r)}function P3(e){tm(e,sm()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function I3(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 lm={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 R3;function F_(e){e.key==="Tab"&&(e.target,clearTimeout(R3))}const wu=$.forwardRef(function(t,n){const[r,i]=$.useState();rn(()=>(l_()&&i("button"),document.addEventListener("keydown",F_),()=>{document.removeEventListener("keydown",F_)}),[]);const o={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Ys("focus-guard")]:"",style:lm};return $.createElement("span",gu({},t,o))}),U_=$.createContext(null);function M3(e){let{id:t,root:n}=e===void 0?{}:e;const[r,i]=$.useState(null),o=om(),a=B_(),s=$.useMemo(()=>({id:t,root:n,portalContext:a,uniqueId:o}),[t,n,a,o]),l=$.useRef();return rn(()=>()=>{r==null||r.remove()},[r,s]),rn(()=>{if(l.current===s)return;l.current=s;const{id:c,root:u,portalContext:d,uniqueId:p}=s,f=c?document.getElementById(c):null,h=Ys("portal");if(f){const m=document.createElement("div");m.id=p,m.setAttribute(h,""),f.appendChild(m),i(m)}else{let m=u||(d==null?void 0:d.portalNode);m&&!Wt(m)&&(m=m.current),m=m||document.body;let v=null;c&&(v=document.createElement("div"),v.id=c,m.appendChild(v));const g=document.createElement("div");g.id=p,g.setAttribute(h,""),m=v||m,m.appendChild(g),i(g)}},[s]),r}function N3(e){let{children:t,id:n,root:r=null,preserveTabOrder:i=!0}=e;const o=M3({id:n,root:r}),[a,s]=$.useState(null),l=$.useRef(null),c=$.useRef(null),u=$.useRef(null),d=$.useRef(null),p=!!a&&!a.modal&&a.open&&i&&!!(r||o);return $.useEffect(()=>{if(!o||!i||a!=null&&a.modal)return;function f(h){o&&Js(h)&&(h.type==="focusin"?I3:P3)(o)}return o.addEventListener("focusin",f,!0),o.addEventListener("focusout",f,!0),()=>{o.removeEventListener("focusin",f,!0),o.removeEventListener("focusout",f,!0)}},[o,i,a==null?void 0:a.modal]),$.createElement(U_.Provider,{value:$.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:o,setFocusManagerState:s}),[i,o])},p&&o&&$.createElement(wu,{"data-type":"outside",ref:l,onFocus:f=>{if(Js(f,o)){var h;(h=u.current)==null||h.focus()}else{const m=L_()||(a==null?void 0:a.refs.domReference.current);m==null||m.focus()}}}),p&&o&&$.createElement("span",{"aria-owns":o.id,style:lm}),o&&$r.createPortal(t,o),p&&o&&$.createElement(wu,{"data-type":"outside",ref:c,onFocus:f=>{if(Js(f,o)){var h;(h=d.current)==null||h.focus()}else{const m=j_()||(a==null?void 0:a.refs.domReference.current);m==null||m.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,f.nativeEvent))}}}))}const B_=()=>$.useContext(U_),D3=$.forwardRef(function(t,n){return $.createElement("button",gu({},t,{type:"button",ref:n,tabIndex:-1,style:lm}))});function j3(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:u=!0}=e,{open:d,refs:p,nodeId:f,onOpenChange:h,events:m,dataRef:v,elements:{domReference:g,floating:y}}=t,b=O3()?o:!0,x=Fi(i),_=Fi(a),S=Fi(s),R=yu(),M=B_(),j=typeof a=="number"&&a<0,k=$.useRef(null),N=$.useRef(null),z=$.useRef(!1),B=$.useRef(null),Z=$.useRef(!1),L=M!=null,F=g&&g.getAttribute("role")==="combobox"&&d_(g)&&j,V=$.useCallback(function(se){return se===void 0&&(se=y),se?tm(se,sm()):[]},[y]),W=$.useCallback(se=>{const we=V(se);return x.current.map(O=>g&&O==="reference"?g:y&&O==="floating"?y:we).filter(Boolean).flat()},[g,y,x,V]);$.useEffect(()=>{if(r||!l)return;function se(O){if(O.key==="Tab"){qn(y,Li(yr(y)))&&V().length===0&&!F&&yn(O);const Oe=W(),Be=u_(O);x.current[0]==="reference"&&Be===g&&(yn(O),O.shiftKey?ci(Oe[Oe.length-1]):ci(Oe[1])),x.current[1]==="floating"&&Be===y&&O.shiftKey&&(yn(O),ci(Oe[0]))}}const we=yr(y);return we.addEventListener("keydown",se),()=>{we.removeEventListener("keydown",se)}},[r,g,y,l,x,p,F,V,W]),$.useEffect(()=>{if(r||!u)return;function se(){Z.current=!0,setTimeout(()=>{Z.current=!1})}function we(O){const Oe=O.relatedTarget;queueMicrotask(()=>{const Be=!(qn(g,Oe)||qn(y,Oe)||qn(Oe,y)||qn(M==null?void 0:M.portalNode,Oe)||Oe!=null&&Oe.hasAttribute(Ys("focus-guard"))||R&&(ha(R.nodesRef.current,f).find(Me=>{var Ze,nt;return qn((Ze=Me.context)==null?void 0:Ze.elements.floating,Oe)||qn((nt=Me.context)==null?void 0:nt.elements.domReference,Oe)})||T3(R.nodesRef.current,f).find(Me=>{var Ze,nt;return((Ze=Me.context)==null?void 0:Ze.elements.floating)===Oe||((nt=Me.context)==null?void 0:nt.elements.domReference)===Oe})));Oe&&Be&&!Z.current&&Oe!==B.current&&(z.current=!0,h(!1,O))})}if(y&&En(g))return g.addEventListener("focusout",we),g.addEventListener("pointerdown",se),!l&&y.addEventListener("focusout",we),()=>{g.removeEventListener("focusout",we),g.removeEventListener("pointerdown",se),!l&&y.removeEventListener("focusout",we)}},[r,g,y,l,f,R,M,h,u]),$.useEffect(()=>{var se;if(r)return;const we=Array.from((M==null||(se=M.portalNode)==null?void 0:se.querySelectorAll("["+Ys("portal")+"]"))||[]);if(y){const O=[y,...we,k.current,N.current,x.current.includes("reference")||F?g:null].filter(Be=>Be!=null),Oe=l?N_(O,b,!b):N_(O);return()=>{Oe()}}},[r,g,y,l,x,M,F,b]),rn(()=>{if(r||!y)return;const se=yr(y),we=Li(se);queueMicrotask(()=>{const O=W(y),Oe=_.current,Be=(typeof Oe=="number"?O[Oe]:Oe.current)||y,Me=qn(y,we);!j&&!Me&&d&&ci(Be,{preventScroll:Be===y})})},[r,d,y,j,W,_]),rn(()=>{if(r||!y)return;let se=!1;const we=yr(y),O=Li(we),Oe=v.current;B.current=O;function Be(Me){if(Me.type==="escapeKey"&&p.domReference.current&&(B.current=p.domReference.current),["referencePress","escapeKey"].includes(Me.type))return;const Ze=Me.data.returnFocus;typeof Ze=="object"?(z.current=!1,se=Ze.preventScroll):z.current=!Ze}return m.on("dismiss",Be),()=>{m.off("dismiss",Be);const Me=Li(we);(qn(y,Me)||R&&ha(R.nodesRef.current,f).some(nt=>{var We;return qn((We=nt.context)==null?void 0:We.elements.floating,Me)})||Oe.openEvent&&["click","mousedown"].includes(Oe.openEvent.type))&&p.domReference.current&&(B.current=p.domReference.current),S.current&&En(B.current)&&!z.current&&ci(B.current,{cancelPrevious:!1,preventScroll:se})}},[r,y,S,v,p,m,R,f]),rn(()=>{if(!(r||!M))return M.setFocusManagerState({modal:l,closeOnFocusOut:u,open:d,onOpenChange:h,refs:p}),()=>{M.setFocusManagerState(null)}},[r,M,l,d,h,p,u]),rn(()=>{if(!r&&y&&typeof MutationObserver=="function"&&!j){const se=()=>{const O=y.getAttribute("tabindex");x.current.includes("floating")||Li(yr(y))!==p.domReference.current&&V().length===0?O!=="0"&&y.setAttribute("tabindex","0"):O!=="-1"&&y.setAttribute("tabindex","-1")};se();const we=new MutationObserver(se);return we.observe(y,{childList:!0,subtree:!0,attributes:!0}),()=>{we.disconnect()}}},[r,y,p,x,V,j]);function pe(se){return r||!c||!l?null:$.createElement(D3,{ref:se==="start"?k:N,onClick:we=>h(!1,we.nativeEvent)},typeof c=="string"?c:"Dismiss")}const C=!r&&b&&!F&&(L||l);return $.createElement($.Fragment,null,C&&$.createElement(wu,{"data-type":"inside",ref:M==null?void 0:M.beforeInsideRef,onFocus:se=>{if(l){const O=W();ci(i[0]==="reference"?O[0]:O[O.length-1])}else if(M!=null&&M.preserveTabOrder&&M.portalNode)if(z.current=!1,Js(se,M.portalNode)){const O=j_()||g;O==null||O.focus()}else{var we;(we=M.beforeOutsideRef.current)==null||we.focus()}}}),!F&&pe("start"),n,pe("end"),C&&$.createElement(wu,{"data-type":"inside",ref:M==null?void 0:M.afterInsideRef,onFocus:se=>{if(l)ci(W()[0]);else if(M!=null&&M.preserveTabOrder&&M.portalNode)if(u&&(z.current=!0),Js(se,M.portalNode)){const O=L_()||g;O==null||O.focus()}else{var we;(we=M.afterOutsideRef.current)==null||we.focus()}}}))}function z_(e){return En(e.target)&&e.target.tagName==="BUTTON"}function Z_(e){return d_(e)}function L3(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:u=!0}=t,d=$.useRef(),p=$.useRef(!1);return $.useMemo(()=>a?{reference:{onPointerDown(f){d.current=f.pointerType},onMouseDown(f){f.button===0&&(c_(d.current,!0)&&c||s!=="click"&&(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")?r(!1,f.nativeEvent):(f.preventDefault(),r(!0,f.nativeEvent))))},onClick(f){if(s==="mousedown"&&d.current){d.current=void 0;return}c_(d.current,!0)&&c||(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="click")?r(!1,f.nativeEvent):r(!0,f.nativeEvent))},onKeyDown(f){d.current=void 0,!(f.defaultPrevented||!u||z_(f))&&(f.key===" "&&!Z_(o)&&(f.preventDefault(),p.current=!0),f.key==="Enter"&&r(!(n&&l),f.nativeEvent))},onKeyUp(f){f.defaultPrevented||!u||z_(f)||Z_(o)||f.key===" "&&p.current&&(p.current=!1,r(!(n&&l),f.nativeEvent))}}}:{},[a,i,s,c,u,o,l,n,r])}const F3=$["useInsertionEffect".toString()]||(e=>e());function Ui(e){const t=$.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return F3(()=>{t.current=e}),$.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 U3={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},B3={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},z3=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 Z3(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:u=!0,escapeKey:d=!0,outsidePress:p=!0,outsidePressEvent:f="pointerdown",referencePress:h=!1,referencePressEvent:m="pointerdown",ancestorScroll:v=!1,bubbles:g}=t,y=yu(),b=R_()!=null,x=Ui(typeof p=="function"?p:()=>!1),_=typeof p=="function"?x:p,S=$.useRef(!1),{escapeKeyBubbles:R,outsidePressBubbles:M}=z3(g),j=Ui(N=>{if(!n||!u||!d||N.key!=="Escape")return;const z=y?ha(y.nodesRef.current,o):[];if(!R&&(N.stopPropagation(),z.length>0)){let B=!0;if(z.forEach(Z=>{var L;if((L=Z.context)!=null&&L.open&&!Z.context.dataRef.current.__escapeKeyBubbles){B=!1;return}}),!B)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,$B(N)?N.nativeEvent:N)}),k=Ui(N=>{const z=S.current;if(S.current=!1,z||typeof _=="function"&&!_(N))return;const B=u_(N),Z="["+Ys("inert")+"]",L=yr(l).querySelectorAll(Z);let F=Wt(B)?B:null;for(;F&&!Ws(F);){const pe=bo(F);if(pe===yr(l).body||!Wt(pe))break;F=pe}if(L.length&&Wt(B)&&!PB(B)&&!qn(B,l)&&Array.from(L).every(pe=>!qn(F,pe)))return;if(En(B)&&l){const pe=B.clientWidth>0&&B.scrollWidth>B.clientWidth,C=B.clientHeight>0&&B.scrollHeight>B.clientHeight;let se=C&&N.offsetX>B.clientWidth;if(C&&nr(B).direction==="rtl"&&(se=N.offsetX<=B.offsetWidth-B.clientWidth),se||pe&&N.offsetY>B.clientHeight)return}const V=y&&ha(y.nodesRef.current,o).some(pe=>{var C;return Xh(N,(C=pe.context)==null?void 0:C.elements.floating)});if(Xh(N,l)||Xh(N,s)||V)return;const W=y?ha(y.nodesRef.current,o):[];if(W.length>0){let pe=!0;if(W.forEach(C=>{var se;if((se=C.context)!=null&&se.open&&!C.context.dataRef.current.__outsidePressBubbles){pe=!1;return}}),!pe)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:b?{preventScroll:!0}:a_(N)||s_(N)}}),r(!1,N)});return $.useEffect(()=>{if(!n||!u)return;c.current.__escapeKeyBubbles=R,c.current.__outsidePressBubbles=M;function N(Z){r(!1,Z)}const z=yr(l);d&&z.addEventListener("keydown",j),_&&z.addEventListener(f,k);let B=[];return v&&(Wt(s)&&(B=ji(s)),Wt(l)&&(B=B.concat(ji(l))),!Wt(a)&&a&&a.contextElement&&(B=B.concat(ji(a.contextElement)))),B=B.filter(Z=>{var L;return Z!==((L=z.defaultView)==null?void 0:L.visualViewport)}),B.forEach(Z=>{Z.addEventListener("scroll",N,{passive:!0})}),()=>{d&&z.removeEventListener("keydown",j),_&&z.removeEventListener(f,k),B.forEach(Z=>{Z.removeEventListener("scroll",N)})}},[c,l,s,a,d,_,f,n,r,v,u,R,M,j,k]),$.useEffect(()=>{S.current=!1},[_,f]),$.useMemo(()=>u?{reference:{onKeyDown:j,[U3[m]]:N=>{h&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,N.nativeEvent))}},floating:{onKeyDown:j,[B3[f]]:()=>{S.current=!0}}}:{},[u,i,h,f,m,r,j])}let cm;process.env.NODE_ENV!=="production"&&(cm=new Set);function q3(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 R="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&&!Wt(e.elements.reference)){var a;if(!((a=cm)!=null&&a.has(R))){var s;(s=cm)==null||s.add(R),console.error(R)}}}const[l,c]=$.useState(null),u=((t=e.elements)==null?void 0:t.reference)||l,d=t3(e),p=yu(),f=Ui((R,M)=>{R&&(m.current.openEvent=M),r==null||r(R,M)}),h=$.useRef(null),m=$.useRef({}),v=$.useState(()=>S3())[0],g=om(),y=$.useCallback(R=>{const M=Wt(R)?{getBoundingClientRect:()=>R.getBoundingClientRect(),contextElement:R}:R;d.refs.setReference(M)},[d.refs]),b=$.useCallback(R=>{(Wt(R)||R===null)&&(h.current=R,c(R)),(Wt(d.refs.reference.current)||d.refs.reference.current===null||R!==null&&!Wt(R))&&d.refs.setReference(R)},[d.refs]),x=$.useMemo(()=>({...d.refs,setReference:b,setPositionReference:y,domReference:h}),[d.refs,b,y]),_=$.useMemo(()=>({...d.elements,domReference:u}),[d.elements,u]),S=$.useMemo(()=>({...d,refs:x,elements:_,dataRef:m,nodeId:i,floatingId:g,events:v,open:n,onOpenChange:f}),[d,i,g,v,n,f,x,_]);return rn(()=>{const R=p==null?void 0:p.nodesRef.current.find(M=>M.id===i);R&&(R.context=S)}),$.useMemo(()=>({...d,context:S,refs:x,elements:_}),[d,x,_,S])}function um(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 u,d=arguments.length,p=new Array(d),f=0;f<d;f++)p[f]=arguments[f];return(u=r.get(s))==null?void 0:u.map(h=>h(...p)).find(h=>h!==void 0)}}}else i[s]=l}),i),{})}}function H3(e){e===void 0&&(e=[]);const t=e,n=$.useCallback(o=>um(o,e,"reference"),t),r=$.useCallback(o=>um(o,e,"floating"),t),i=$.useCallback(o=>um(o,e,"item"),e.map(o=>o==null?void 0:o.item));return $.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])}let q_=!1;function _u(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function H_(e,t){return _u(t,e===nm||e===hu,e===pa||e===Ks)}function dm(e,t,n){return _u(t,e===hu,n?e===pa:e===Ks)||e==="Enter"||e==" "||e===""}function W3(e,t,n){return _u(t,n?e===pa:e===Ks,e===hu)}function W_(e,t,n){return _u(t,n?e===Ks:e===pa,e===nm)}function V3(e,t){const{open:n,onOpenChange:r,refs:i,elements:{domReference:o,floating:a}}=e,{listRef:s,activeIndex:l,onNavigate:c=()=>{},enabled:u=!0,selectedIndex:d=null,allowEscape:p=!1,loop:f=!1,nested:h=!1,rtl:m=!1,virtual:v=!1,focusItemOnOpen:g="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:b=!0,disabledIndices:x=void 0,orientation:_="vertical",cols:S=1,scrollItemIntoView:R=!0,virtualItemRef:M}=t;process.env.NODE_ENV!=="production"&&(p&&(f||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),v||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),_==="vertical"&&S>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const j=R_(),k=yu(),N=Ui(c),z=$.useRef(g),B=$.useRef(d??-1),Z=$.useRef(null),L=$.useRef(!0),F=$.useRef(N),V=$.useRef(!!a),W=$.useRef(!1),pe=$.useRef(!1),C=Fi(x),se=Fi(n),we=Fi(R),[O,Oe]=$.useState(),[Be,Me]=$.useState(),Ze=Ui(function(_e,ye,$e){$e===void 0&&($e=!1);const Se=_e.current[ye.current];Se&&(v?(Oe(Se.id),k==null||k.events.emit("virtualfocus",Se),M&&(M.current=Se)):ci(Se,{preventScroll:!0,sync:AB()&&l_()?q_||W.current:!1}),requestAnimationFrame(()=>{const Ue=we.current;Ue&&Se&&($e||!L.current)&&(Se.scrollIntoView==null||Se.scrollIntoView(typeof Ue=="boolean"?{block:"nearest",inline:"nearest"}:Ue))}))});rn(()=>{document.createElement("div").focus({get preventScroll(){return q_=!0,!1}})},[]),rn(()=>{u&&(n&&a?z.current&&d!=null&&(pe.current=!0,N(d)):V.current&&(B.current=-1,F.current(null)))},[u,n,a,d,N]),rn(()=>{if(u&&n&&a)if(l==null){if(W.current=!1,d!=null)return;if(V.current&&(B.current=-1,Ze(s,B)),!V.current&&z.current&&(Z.current!=null||z.current===!0&&Z.current==null)){let _e=0;const ye=()=>{s.current[0]==null?(_e<2&&(_e?requestAnimationFrame:queueMicrotask)(ye),_e++):(B.current=Z.current==null||dm(Z.current,_,m)||h?rm(s,C.current):$_(s,C.current),Z.current=null,N(B.current))};ye()}}else Gs(s,l)||(B.current=l,Ze(s,B,pe.current),pe.current=!1)},[u,n,a,l,d,h,s,_,m,N,Ze,C]),rn(()=>{var _e,ye;if(!u||a||!k||v||!V.current)return;const $e=k.nodesRef.current,Se=(_e=$e.find(D=>D.id===j))==null||(ye=_e.context)==null?void 0:ye.elements.floating,Ue=Li(yr(a)),ot=$e.some(D=>D.context&&qn(D.context.elements.floating,Ue));Se&&!ot&&L.current&&Se.focus({preventScroll:!0})},[u,a,k,j,v]),rn(()=>{if(!u||!k||!v||j)return;function _e(ye){Me(ye.id),M&&(M.current=ye)}return k.events.on("virtualfocus",_e),()=>{k.events.off("virtualfocus",_e)}},[u,k,v,j,M]),rn(()=>{F.current=N,V.current=!!a}),rn(()=>{n||(Z.current=null)},[n]);const nt=l!=null,We=$.useMemo(()=>{function _e($e){if(!n)return;const Se=s.current.indexOf($e);Se!==-1&&N(Se)}return{onFocus($e){let{currentTarget:Se}=$e;_e(Se)},onClick:$e=>{let{currentTarget:Se}=$e;return Se.focus({preventScroll:!0})},...y&&{onMouseMove($e){let{currentTarget:Se}=$e;_e(Se)},onPointerLeave($e){let{pointerType:Se}=$e;!L.current||Se==="touch"||(B.current=-1,Ze(s,B),N(null),v||ci(i.floating.current,{preventScroll:!0}))}}}},[n,i,Ze,y,s,N,v]);return $.useMemo(()=>{if(!u)return{};const _e=C.current;function ye(D){if(L.current=!1,W.current=!0,!se.current&&D.currentTarget===i.floating.current)return;if(h&&W_(D.key,_,m)){yn(D),r(!1,D.nativeEvent),En(o)&&!v&&o.focus();return}const ue=B.current,me=rm(s,_e),fe=$_(s,_e);if(D.key==="Home"&&(yn(D),B.current=me,N(B.current)),D.key==="End"&&(yn(D),B.current=fe,N(B.current)),!(S>1&&(B.current=w3(s,{event:D,orientation:_,loop:f,cols:S,disabledIndices:_e,minIndex:me,maxIndex:fe,prevIndex:B.current,stopEvent:!0}),N(B.current),_==="both"))&&H_(D.key,_)){if(yn(D),n&&!v&&Li(D.currentTarget.ownerDocument)===D.currentTarget){B.current=dm(D.key,_,m)?me:fe,N(B.current);return}dm(D.key,_,m)?f?B.current=ue>=fe?p&&ue!==s.current.length?-1:me:Cn(s,{startingIndex:ue,disabledIndices:_e}):B.current=Math.min(fe,Cn(s,{startingIndex:ue,disabledIndices:_e})):f?B.current=ue<=me?p&&ue!==-1?s.current.length:fe:Cn(s,{startingIndex:ue,decrement:!0,disabledIndices:_e}):B.current=Math.max(me,Cn(s,{startingIndex:ue,decrement:!0,disabledIndices:_e})),Gs(s,B.current)?N(null):N(B.current)}}function $e(D){g==="auto"&&a_(D.nativeEvent)&&(z.current=!0)}function Se(D){z.current=g,g==="auto"&&s_(D.nativeEvent)&&(z.current=!0)}const Ue=v&&n&&nt&&{"aria-activedescendant":Be||O},ot=s.current.find(D=>(D==null?void 0:D.id)===O);return{reference:{...Ue,onKeyDown(D){L.current=!1;const ue=D.key.indexOf("Arrow")===0,me=W3(D.key,_,m),fe=W_(D.key,_,m),Le=H_(D.key,_),De=(h?me:Le)||D.key==="Enter"||D.key.trim()==="";if(v&&n){const q=k==null?void 0:k.nodesRef.current.find(de=>de.parentId==null),X=k&&q?k3(k.nodesRef.current,q.id):null;if(ue&&X&&M){const de=new KeyboardEvent("keydown",{key:D.key,bubbles:!0});if(me||fe){var Ke,gt;const je=((Ke=X.context)==null?void 0:Ke.elements.domReference)===D.currentTarget,rt=fe&&!je?(gt=X.context)==null?void 0:gt.elements.domReference:me?ot:null;rt&&(yn(D),rt.dispatchEvent(de),Me(void 0))}if(Le&&X.context&&X.context.open&&X.parentId&&D.currentTarget!==X.context.elements.domReference){var Xe;yn(D),(Xe=X.context.elements.domReference)==null||Xe.dispatchEvent(de);return}}return ye(D)}if(!(!n&&!b&&ue)){if(De&&(Z.current=h&&Le?null:D.key),h){me&&(yn(D),n?(B.current=rm(s,_e),N(B.current)):r(!0,D.nativeEvent));return}Le&&(d!=null&&(B.current=d),yn(D),!n&&b?r(!0,D.nativeEvent):ye(D),n&&N(B.current))}},onFocus(){n&&N(null)},onPointerDown:Se,onMouseDown:$e,onClick:$e},floating:{"aria-orientation":_==="both"?void 0:_,...Ue,onKeyDown:ye,onPointerMove(){L.current=!0}},item:We}},[o,i,O,Be,C,se,s,u,_,m,v,n,nt,h,d,b,p,S,f,g,N,r,We,k,M])}function K3(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:i=!0,role:o="dialog"}=t,a=om();return $.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 G3(e,t){var n;const{open:r,dataRef:i}=e,{listRef:o,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:p=[],selectedIndex:f=null}=t,h=$.useRef(),m=$.useRef(""),v=$.useRef((n=f??a)!=null?n:-1),g=$.useRef(null),y=Ui(s),b=Ui(l),x=Fi(u),_=Fi(p);return rn(()=>{r&&(clearTimeout(h.current),g.current=null,m.current="")},[r]),rn(()=>{if(r&&m.current===""){var S;v.current=(S=f??a)!=null?S:-1}},[r,f,a]),$.useMemo(()=>{if(!c)return{};function S(j){j?i.current.typing||(i.current.typing=j,b(j)):i.current.typing&&(i.current.typing=j,b(j))}function R(j,k,N){const z=x.current?x.current(k,N):k.find(B=>(B==null?void 0:B.toLocaleLowerCase().indexOf(N.toLocaleLowerCase()))===0);return z?j.indexOf(z):-1}function M(j){const k=o.current;if(m.current.length>0&&m.current[0]!==" "&&(R(k,k,m.current)===-1?S(!1):j.key===" "&&yn(j)),k==null||_.current.includes(j.key)||j.key.length!==1||j.ctrlKey||j.metaKey||j.altKey)return;r&&j.key!==" "&&(yn(j),S(!0)),k.every(Z=>{var L,F;return Z?((L=Z[0])==null?void 0:L.toLocaleLowerCase())!==((F=Z[1])==null?void 0:F.toLocaleLowerCase()):!0})&&m.current===j.key&&(m.current="",v.current=g.current),m.current+=j.key,clearTimeout(h.current),h.current=setTimeout(()=>{m.current="",v.current=g.current,S(!1)},d);const z=v.current,B=R(k,[...k.slice((z||0)+1),...k.slice(0,(z||0)+1)],m.current);B!==-1?(y(B),g.current=B):j.key!==" "&&(m.current="",S(!1))}return{reference:{onKeyDown:M},floating:{onKeyDown:M,onKeyUp(j){j.key===" "&&S(!1)}}}},[c,r,i,o,d,_,x,y,b])}const Y3=({styles:e,type:t,options:n,label:r,reusable:i})=>{var V,W,pe,C,se,we,O,Oe,Be,Me,Ze,nt;const{state:o,client:a,messageContainerRef:s}=$t(),[l,c]=$.useState(!1),[u,d]=$.useState(null),[p,f]=$.useState(null),h=n.reduce((We,_e)=>(We[_e.label]=_e.value,We),{}),m=h?Object.keys(h):[],v=We=>{c(p!==null&&!i?!1:We)},{refs:g,floatingStyles:y,context:b}=q3({placement:"bottom-start",open:l,onOpenChange:v,whileElementsMounted:QB,middleware:[NB(5),DB({padding:10,boundary:(s==null?void 0:s.current)??void 0,crossAxis:!0}),jB({apply({rects:We,elements:_e,availableHeight:ye}){Object.assign(_e.floating.style,{maxHeight:`${ye}px`,minWidth:`${We.reference.width}px`})},padding:10})]}),x=$.useRef([]),_=$.useRef(m),S=$.useRef(!1),R=L3(b,{event:"mousedown"}),M=Z3(b),j=K3(b,{role:"listbox"}),k=V3(b,{listRef:x,activeIndex:u,selectedIndex:p,onNavigate:d,loop:!0}),N=G3(b,{listRef:_,activeIndex:u,selectedIndex:p,onMatch:l?d:f,onTypingChange(We){S.current=We}}),{getReferenceProps:z,getFloatingProps:B,getItemProps:Z}=H3([M,j,k,N,R]),L=We=>{f(We),a==null||a.sendMessage(h[m[We]]),c(!1)},F=p!==null?m[p]:void 0;return U.jsxs(U.Fragment,{children:[U.jsxs("div",{tabIndex:0,ref:g.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":p!==null&&!i?"":void 0,...(W=(V=e==null?void 0:e[t])==null?void 0:V.button)==null?void 0:W.container,...z(),children:[U.jsx("span",{...(C=(pe=e==null?void 0:e[t])==null?void 0:pe.button)==null?void 0:C.text,children:F||r||"Select..."}),U.jsx(xU,{...(we=(se=e==null?void 0:e[t])==null?void 0:se.button)==null?void 0:we.icon})]}),l&&U.jsx(N3,{children:U.jsx(j3,{context:b,modal:!1,children:U.jsx("div",{ref:g.setFloating,className:(Be=(Oe=(O=e==null?void 0:e[t])==null?void 0:O.content)==null?void 0:Oe.container)==null?void 0:Be.className,style:{...y,...(nt=(Ze=(Me=e==null?void 0:e[t])==null?void 0:Me.content)==null?void 0:Ze.container)==null?void 0:nt.style},...B(),children:m.map((We,_e)=>{var ye,$e;return U.jsx("div",{ref:Se=>{x.current[_e]=Se},role:"option",tabIndex:_e===u?0:-1,"aria-selected":_e===p&&_e===u,"data-active":_e===u?"":void 0,...($e=(ye=e==null?void 0:e[t])==null?void 0:ye.content)==null?void 0:$e.item,...Z({onClick(){o.isReadOnly||L(_e)},onKeyDown(Se){o.isReadOnly||(Se.key==="Enter"&&(Se.preventDefault(),L(_e)),Se.key===" "&&!S.current&&(Se.preventDefault(),L(_e)))}}),children:We},We)})})})})]})},J3=w.forwardRef(({type:e,title:t,styles:n,url:r,...i},o)=>{var a,s,l;return U.jsxs("a",{...i,...(a=n==null?void 0:n[e])==null?void 0:a.container,href:r,download:!0,ref:o,children:[U.jsx("p",{...(s=n==null?void 0:n[e])==null?void 0:s.title,children:t||r}),U.jsx(EU,{...(l=n==null?void 0:n[e])==null?void 0:l.icon})]})}),fm={audio:hU,bubble:qL,button:zL,carousel:_B,column:OU,dropdown:Y3,file:J3,image:dU,location:kU,row:AU,text:UL,video:pU},ga=({block:e,styles:t,...n})=>{const r=fm[e.type],i={...n,styles:t,...e};return U.jsx(r,{...i})},V_=e=>{let t;const n=new Set,r=(l,c)=>{const u=typeof l=="function"?l(t):l;if(!Object.is(u,t)){const d=t;t=c??typeof u!="object"?u:Object.assign({},t,u),n.forEach(p=>p(t,d))}},i=()=>t,s={setState:r,getState:i,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{n.clear()}};return t=e(r,i,s),s},X3=e=>e?V_(e):V_;var pm={exports:{}},hm={},xu={exports:{}},mm={};/**
237
237
  * @license React
238
238
  * use-sync-external-store-shim.production.min.js
239
239
  *
@@ -265,7 +265,7 @@ to {
265
265
  *
266
266
  * This source code is licensed under the MIT license found in the
267
267
  * LICENSE file in the root directory of this source tree.
268
- */var Q_;function n5(){return Q_||(Q_=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=w,t=J_();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;function c(u,d,p,f,h){var m=o(null),v;m.current===null?(v={hasValue:!1,value:null},m.current=v):v=m.current;var g=s(function(){var _=!1,S,R,M=function(z){if(!_){_=!0,S=z;var U=f(z);if(h!==void 0&&v.hasValue){var Z=v.value;if(h(Z,U))return R=Z,Z}return R=U,U}var L=S,F=R;if(r(L,z))return F;var V=f(z);return h!==void 0&&h(F,V)?F:(S=z,R=V,V)},j=p===void 0?null:p,k=function(){return M(d())},N=j===null?void 0:function(){return M(j())};return[k,N]},[d,p,f,h]),y=g[0],b=g[1],x=i(u,y,b);return a(function(){v.hasValue=!0,v.value=x},[x]),l(x),x}ym.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),ym}process.env.NODE_ENV==="production"?pm.exports=t5():pm.exports=n5();var r5=pm.exports;const i5=ti(r5),{useSyncExternalStoreWithSelector:o5}=i5;let Ave=!1;function a5(e,t=e.getState,n){const r=o5(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return w.useDebugValue(r),r}const ex=e=>{const t=typeof e=="function"?X3(e):e,n=(r,i)=>a5(t,r,i);return Object.assign(n,t),n},s5=e=>e?ex(e):ex,vm=new Map,Su=e=>{const t=vm.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},l5=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=vm.get(n.name);if(r)return{type:"tracked",store:e,...r};const i={connection:t.connect(n),stores:{}};return vm.set(n.name,i),{type:"tracked",store:e,...i}},c5=(e,t={})=>(n,r,i)=>{const{enabled:o,anonymousActionType:a,store:s,...l}=t;let c;try{c=(o??!1)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!c)return e(n,r,i);const{connection:u,...d}=l5(s,c,l);let p=!0;i.setState=(m,v,g)=>{const y=n(m,v);if(!p)return y;const b=g===void 0?{type:a||"anonymous"}:typeof g=="string"?{type:g}:g;return s===void 0?(u==null||u.send(b,r()),y):(u==null||u.send({...b,type:`${s}/${b.type}`},{...Su(l.name),[s]:i.getState()}),y)};const f=(...m)=>{const v=p;p=!1,n(...m),p=v},h=e(i.setState,r,i);if(d.type==="untracked"?u==null||u.init(h):(d.stores[d.store]=i,u==null||u.init(Object.fromEntries(Object.entries(d.stores).map(([m,v])=>[m,m===d.store?h:v.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let m=!1;const v=i.dispatch;i.dispatch=(...g)=>{v(...g)}}return u.subscribe(m=>{var v;switch(m.type){case"ACTION":if(typeof m.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return bm(m.payload,g=>{if(g.type==="__setState"){if(s===void 0){f(g.state);return}Object.keys(g.state).length!==1&&console.error(`
268
+ */var Q_;function n5(){return Q_||(Q_=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=w,t=J_();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;function c(u,d,p,f,h){var m=o(null),v;m.current===null?(v={hasValue:!1,value:null},m.current=v):v=m.current;var g=s(function(){var _=!1,S,R,M=function(z){if(!_){_=!0,S=z;var B=f(z);if(h!==void 0&&v.hasValue){var Z=v.value;if(h(Z,B))return R=Z,Z}return R=B,B}var L=S,F=R;if(r(L,z))return F;var V=f(z);return h!==void 0&&h(F,V)?F:(S=z,R=V,V)},j=p===void 0?null:p,k=function(){return M(d())},N=j===null?void 0:function(){return M(j())};return[k,N]},[d,p,f,h]),y=g[0],b=g[1],x=i(u,y,b);return a(function(){v.hasValue=!0,v.value=x},[x]),l(x),x}ym.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),ym}process.env.NODE_ENV==="production"?pm.exports=t5():pm.exports=n5();var r5=pm.exports;const i5=ti(r5),{useSyncExternalStoreWithSelector:o5}=i5;let Ave=!1;function a5(e,t=e.getState,n){const r=o5(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return w.useDebugValue(r),r}const ex=e=>{const t=typeof e=="function"?X3(e):e,n=(r,i)=>a5(t,r,i);return Object.assign(n,t),n},s5=e=>e?ex(e):ex,vm=new Map,Su=e=>{const t=vm.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},l5=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=vm.get(n.name);if(r)return{type:"tracked",store:e,...r};const i={connection:t.connect(n),stores:{}};return vm.set(n.name,i),{type:"tracked",store:e,...i}},c5=(e,t={})=>(n,r,i)=>{const{enabled:o,anonymousActionType:a,store:s,...l}=t;let c;try{c=(o??!1)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!c)return e(n,r,i);const{connection:u,...d}=l5(s,c,l);let p=!0;i.setState=(m,v,g)=>{const y=n(m,v);if(!p)return y;const b=g===void 0?{type:a||"anonymous"}:typeof g=="string"?{type:g}:g;return s===void 0?(u==null||u.send(b,r()),y):(u==null||u.send({...b,type:`${s}/${b.type}`},{...Su(l.name),[s]:i.getState()}),y)};const f=(...m)=>{const v=p;p=!1,n(...m),p=v},h=e(i.setState,r,i);if(d.type==="untracked"?u==null||u.init(h):(d.stores[d.store]=i,u==null||u.init(Object.fromEntries(Object.entries(d.stores).map(([m,v])=>[m,m===d.store?h:v.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let m=!1;const v=i.dispatch;i.dispatch=(...g)=>{v(...g)}}return u.subscribe(m=>{var v;switch(m.type){case"ACTION":if(typeof m.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return bm(m.payload,g=>{if(g.type==="__setState"){if(s===void 0){f(g.state);return}Object.keys(g.state).length!==1&&console.error(`
269
269
  [zustand devtools middleware] Unsupported __setState action format.
270
270
  When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
271
271
  and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
@@ -358,27 +358,27 @@ ${u}`:u,{ast:c,isPatternProperty:!1,isRequired:(0,wg.default)(e.required||[],l),
358
358
  `,i+=`}
359
359
  `,i+=`}
360
360
  `),i+=`}
361
- `,i+="})"}let o=n?i?n+i:r?r==="z.never()"?n+".strict()":n+`.catchall(${r})`:n:i||(r?`z.record(${r})`:"z.record(z.any())");return Xt.an.anyOf(e)&&(o+=`.and(${eT(G(P({},e),{anyOf:e.anyOf.map(a=>typeof a=="object"&&!a.type&&(a.properties||a.additionalProperties||a.patternProperties)?G(P({},a),{type:"object"}):a)}),t)})`),Xt.a.oneOf(e)&&(o+=`.and(${Lg(G(P({},e),{oneOf:e.oneOf.map(a=>typeof a=="object"&&!a.type&&(a.properties||a.additionalProperties||a.patternProperties)?G(P({},a),{type:"object"}):a)}),t)})`),Xt.an.allOf(e)&&(o+=`.and(${Nl(G(P({},e),{allOf:e.allOf.map(a=>typeof a=="object"&&!a.type&&(a.properties||a.additionalProperties||a.patternProperties)?G(P({},a),{type:"object"}):a)}),t)})`),o}E(tT,"parseObject");var Bne=E(e=>{let t="z.string()";return t+=kn(e,"format",({value:n})=>{switch(n){case"email":return[".email(",")"];case"ip":return[".ip(",")"];case"ipv4":return['.ip({ version: "v4"',", message: "," })"];case"ipv6":return['.ip({ version: "v6"',", message: "," })"];case"uri":return[".url(",")"];case"uuid":return[".uuid(",")"];case"date-time":return[".datetime(",")"]}}),t+=kn(e,"pattern",({json:n})=>[`.regex(new RegExp(${n})`,", ",")"]),t+=kn(e,"minLength",({json:n})=>[`.min(${n}`,", ",")"]),t+=kn(e,"maxLength",({json:n})=>[`.max(${n}`,", ",")"]),t},"parseString"),zne=E((e,t)=>`${fn(Mne(e,"nullable"),t,!0)}.nullable()`,"parseNullable"),Zne=E((e,t)=>{var n,r;if(e.oneOf.length<=1||!((n=e.discriminator)!=null&&n.propertyName))return Lg(e,t);const i=e.oneOf.map((o,a)=>fn(o,G(P({},t),{path:[...t.path,"oneOf",a]})));return`z.discriminatedUnion("${(r=e.discriminator)==null?void 0:r.propertyName}", [${i.join(", ")}])`},"parseDiscriminator"),fn=E((e,t={seen:new Map,path:[]},n)=>{if(typeof e!="object")return e?"z.any()":"z.never()";if(t.parserOverride){const o=t.parserOverride(e,t);if(typeof o=="string")return o}let r=t.seen.get(e);if(r){if(r.r!==void 0)return r.r;if(t.depth===void 0||r.n>=t.depth)return"z.any()";r.n+=1}else r={r:void 0,n:0},t.seen.set(e,r);let i=Wne(e,t);return n||(i=qne(e,i),t.withoutDefaults||(i=Hne(e,i))),r.r=i,i},"parseSchema"),qne=E((e,t)=>(e.description&&(t+=`.describe(${JSON.stringify(e.description)})`),t),"addMeta"),Hne=E((e,t)=>(e.default!==void 0&&(t+=`.default(${JSON.stringify(e.default)})`),t),"addDefaults"),Wne=E((e,t)=>Xt.a.nullable(e)?zne(e,t):Xt.an.object(e)?tT(e,t):Xt.an.array(e)?Dne(e,t):Xt.an.anyOf(e)?eT(e,t):Xt.an.allOf(e)?Nl(e,t):Xt.a.discriminator(e)?Zne(e,t):Xt.a.oneOf(e)?Lg(e,t):Xt.a.not(e)?Pne(e,t):Xt.an.enum(e)?Lne(e):Xt.a.const(e)?jne(e):Xt.a.multipleType(e)?$ne(e,t):Xt.a.primitive(e,"string")?Bne(e):Xt.a.primitive(e,"number")||Xt.a.primitive(e,"integer")?Une(e):Xt.a.primitive(e,"boolean")?One(e):Xt.a.primitive(e,"null")?Ine(e):Xt.a.conditional(e)?Fne(e,t):Ane(e),"selectParser"),Xt={an:{object:e=>e.type==="object",array:e=>e.type==="array",anyOf:e=>e.anyOf!==void 0,allOf:e=>e.allOf!==void 0,enum:e=>e.enum!==void 0},a:{nullable:e=>e.nullable===!0,multipleType:e=>Array.isArray(e.type),not:e=>e.not!==void 0,const:e=>e.const!==void 0,primitive:(e,t)=>e.type===t,conditional:e=>!!("if"in e&&e.if&&"then"in e&&"else"in e&&e.then&&e.else),discriminator:e=>{var t;return e.oneOf!==void 0&&((t=e.discriminator)==null?void 0:t.propertyName)!==void 0},oneOf:e=>e.oneOf!==void 0}},Vne=E(e=>fn(e,{seen:new Map,path:[]}),"jsonSchemaToZodStr"),Kne=E(e=>{let t=Vne(e);return t=t.replaceAll("errors: z.ZodError[]","errors"),new Function("z",`return ${t}`)(an)},"jsonSchemaToZod"),Dl=E((e,t)=>{var n,r;if(t[Vt]&&e._def&&(e._def[Vt]=t[Vt]),((n=e._def)==null?void 0:n.typeName)==="ZodObject"&&t.type==="object"&&t.properties&&Object.entries(t.properties).forEach(([i,o])=>{const a=typeof e._def.shape=="function"?e._def.shape():e._def.shape;a[i]&&Dl(a[i],o)}),((r=e._def)==null?void 0:r.typeName)==="ZodRecord"&&t.type==="object"&&t.additionalProperties&&Dl(e._def.valueType,t.additionalProperties),t.type==="array"&&t.items){const i=t.items;if(typeof i=="object"&&!Array.isArray(i)){const o=e._def.type;o&&Dl(o,i)}else Array.isArray(i)&&i.forEach((o,a)=>{const s=e._def;s.typeName===an.ZodFirstPartyTypeKind.ZodTuple&&Dl(s.items[a],o)})}},"applyZuiPropsRecursively"),jl=E(e=>{const t=Kne(e);return Dl(t,e),t},"jsonSchemaToZui"),wn=Mt(w,1),ir=w,Gne=Mt(w,1),nT=(0,ir.createContext)({formData:void 0,formSchema:void 0,setFormData:()=>{throw new Error("Must be within a FormDataProvider")},setHiddenState:()=>{throw new Error("Must be within a FormDataProvider")},setDisabledState:()=>{throw new Error("Must be within a FormDataProvider")},hiddenState:{},disabledState:{},disableValidation:!1}),rT=E((e,t,n)=>{var r;const i=(r=t[Vt])==null?void 0:r[e];if(typeof i>"u")return!1;if(typeof i=="boolean")return i;if(typeof i=="string"){if(typeof window>"u")return console.warn("Function evaluation is not supported in server side rendering"),!1;const a=new Function("return "+i)()(n);switch(typeof a){case"object":case"boolean":return a;default:return!1}}return!1},"parseMaskableField"),iT=E((e,t)=>{const n=(0,ir.useContext)(nT);if(n===void 0)throw new Error("useFormData must be used within a FormDataProvider");const r=(0,ir.useMemo)(()=>Uo(n.formData,t),[n.formData,t]),i=(0,ir.useMemo)(()=>{if(n.disableValidation)return{formValid:null,formErrors:null};if(!n.formSchema)return{formValid:null,formErrors:null};const p=jl(n.formSchema).safeParse(n.formData);return p.success?{formValid:!0,formErrors:[]}:{formValid:!1,formErrors:p.error.issues}},[n.formData]),o=(0,ir.useMemo)(()=>rT("hidden",e,r),[e,r]),a=(0,ir.useMemo)(()=>rT("disabled",e,r),[e,r]);(0,ir.useEffect)(()=>{n.setHiddenState(Xa(n.hiddenState,t,o||{})),n.setDisabledState(Xa(n.disabledState,t,a||{}))},[o,a]);const{disabled:s,hidden:l}=(0,ir.useMemo)(()=>{const p=o===!0||Uo(n.hiddenState,t),f=a===!0||Uo(n.disabledState,t);return{hidden:p===!0,disabled:f===!0}},[n.hiddenState,n.disabledState,t]),c=(0,ir.useCallback)((p,f)=>{n.setFormData(Xa(n.formData,p,f))},[n.formData]),u=(0,ir.useCallback)((p,f)=>{const h=Uo(n.formData,p)||[];n.setFormData(Xa(n.formData,p,[...h,f]))},[n.formData]),d=(0,ir.useCallback)((p,f)=>{const h=Uo(n.formData,p);h.splice(f,1),n.setFormData(Xa(n.formData,p,h))},[n.formData]);return P(G(P({},n),{data:r,disabled:s,hidden:l,handlePropertyChange:c,addArrayItem:u,removeArrayItem:d}),i)},"useFormData");function Xa(e,t,n){if(t.length===0)return n;const r=t.length;return t.reduce((i,o,a)=>(a===r-1?i[o]=n:i[o]||(i[o]=isNaN(Number(o))?{}:[]),i[o]),e??{}),P({},e)}E(Xa,"setObjectPath");var oT=E(e=>Array.isArray(e)?e.map(t=>oT(t)):e.type==="object"?{}:e.type==="array"?[]:e.type==="string"?"":e.type==="number"?0:e.type==="boolean"?!1:null,"getDefaultItemData"),Yne=E(({children:e,setFormData:t,formData:n,formSchema:r,disableValidation:i})=>{const[o,a]=(0,ir.useState)({}),[s,l]=(0,ir.useState)({});return Gne.default.createElement(nT.Provider,{value:{formData:n,setFormData:t,formSchema:r,disableValidation:i,hiddenState:o,setHiddenState:a,disabledState:s,setDisabledState:l}},e)},"FormDataProvider");function Uo(e,t){return t.reduce((n,r)=>n?n[r]:null,e)}E(Uo,"getPathData");function Fg(e,t){return t||(t=new RegExp("/s|-|_| ","g")),lT(e).split(t).map(aT).map(cT).reduce(sT)}E(Fg,"formatTitle");function aT(e){return e.charAt(0).toUpperCase()+e.substring(1)}E(aT,"capitalize");function sT(e,t){return`${e} ${t}`}E(sT,"combine");function lT(e){return e.replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/([A-Z]+)([A-Z][a-z\d]+)/g,"$1_$2").toLowerCase()}E(lT,"decamelize");function cT(e,t,n){const r=e.toLowerCase(),i=e.toUpperCase();for(const o of tre)if(o.toLowerCase()===r)return o;return Jne.includes(i)?i:t===0||t===n.length-1||e.length>=4?e:ere.includes(r)||Qne.includes(r)||Xne.includes(r)?r:e}E(cT,"handleSpecialWords");var Jne=["2D","3D","4WD","A2O","API","BIOS","CCTV","CC","CCV","CD","CD-ROM","COBOL","CIA","CMS","CSS","CSV","CV","DIY","DVD","DB","DNA","E3","EIN","ESPN","FAQ","FAQs","FTP","FPS","FORTRAN","FBI","HTML","HTTP","ID","IP","ISO","JS","JSON","LASER","M2A","M2M","M2MM","M2O","MMORPG","NAFTA","NASA","NDA","O2M","PDF","PHP","POP","RAM","RNGR","ROM","RPG","RTFM","RTS","SCUBA","SITCOM","SKU","SMTP","SQL","SSN","SWAT","TBS","TTL","TV","TNA","UI","URL","USB","UWP","VIP","W3C","WYSIWYG","WWW","WWE","WWF"],Xne=["a","an","the"],Qne=["and","that","but","or","as","if","when","than","because","while","where","after","so","though","since","until","whether","before","although","nor","like","once","unless","now","except"],ere=["about","above","across","after","against","along","among","around","at","because of","before","behind","below","beneath","beside","besides","between","beyond","but","by","concerning","despite","down","during","except","excepting","for","from","in","in front of","inside","in spite of","instead of","into","like","near","of","off","on","onto","out","outside","over","past","regarding","since","through","throughout","to","toward","under","underneath","until","up","upon","up to","with","within","without","with regard to","with respect to"],tre=["2FA","3D","4K","5K","8K","AGI","BI","ChatGPT","CTA","DateTime","GitHub","GPT","HD","IBMid","ID","IDs","iMac","IMAX","iOS","IP","iPad","iPhone","iPod","LDAP","LinkedIn","LLM","M2M","M2O","macOS","McDonalds","ML","MySQL","NLG","NLP","NLU","O2M","OpenAI","PDFs","PEFT","pH","PostgreSQL","SEO","TTS","UHD","UUID","XSS","YouTube"],uT=Mt(w,1),dT=class extends uT.Component{constructor(){super(...arguments),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n)}render(){return this.state.hasError&&this.props.fallback?uT.default.createElement(this.props.fallback,{error:this.state.error,schema:this.props.fieldSchema}):this.props.children}};E(dT,"ErrorBoundary");var pf=dT,nre=E(e=>{var t;return(t=e.anyOf)!=null&&t.length?fT(e.anyOf)?"discriminatedUnion":"object":e.type==="integer"?"number":e.type},"getSchemaType"),rre=E((e,t)=>{var n,r,i;const o=nre(t),a=((n=t[Vt])==null?void 0:n.displayAs)||null;if(!a||!Array.isArray(a)||a.length<2){const u=(r=e==null?void 0:e[o])==null?void 0:r.default;return u?{Component:u,type:o,id:"default",params:{}}:null}const s=a[0],l=((i=e==null?void 0:e[o])==null?void 0:i[s])||null;if(!l)return console.warn(`Component ${o}.${s} not found`),null;const c=a[1]||{};return{Component:l,type:o,id:s,params:c}},"resolveComponent"),fT=E(e=>{const t=e==null?void 0:e.map(n=>n.type!=="object"||!n.properties?null:Object.entries(n.properties).map(([r,i])=>{var o;return i.type==="string"&&((o=i.enum)!=null&&o.length)?{key:r,value:i.enum[0]}:null}).filter(r=>!!r)).flat().reduce((n,r)=>{if(!r)return n;const{key:i,value:o}=r;return n.key===null&&(n.key=i),n.key===i&&n.values.push(o),n},{key:null,values:[]});return(t==null?void 0:t.key)===null||!(t!=null&&t.values.length)?null:t},"resolveDiscriminator"),ire=E((e,t,n)=>{var r,i;if(!(n!=null&&n.length)||!e||!t)return null;for(const o of n){if(o.type!=="object")continue;const a=(r=o.properties)==null?void 0:r[e];if((a==null?void 0:a.type)==="string"&&((i=a.enum)!=null&&i.length)&&a.enum[0]===t)return G(P({},o),{properties:G(P({},o.properties),{[e]:G(P({},a),{[Vt]:{hidden:!0}})})})}return null},"resolveDiscriminatedSchema"),ore=E(({schema:e,components:t,onChange:n,value:r,disableValidation:i,fallback:o})=>wn.default.createElement(Yne,{formData:r,setFormData:n,formSchema:e,disableValidation:i||!1},wn.default.createElement(pf,{fallback:o,fieldSchema:e,path:[]},wn.default.createElement(hf,{components:t,fieldSchema:e,path:[],fallback:o,required:!0,isArrayChild:!1}))),"ZuiForm"),are=E((e,t,n)=>{const{handlePropertyChange:r}=iT(e,t),{discriminator:i,value:o,discriminatedSchema:a}=(0,wn.useMemo)(()=>{const s=fT(e.anyOf),l=s!=null&&s.key?n==null?void 0:n[s.key]:null,c=ire((s==null?void 0:s.key)||null,l,e.anyOf);return{discriminator:s,value:l,discriminatedSchema:c}},[e.anyOf,n]);return(0,wn.useEffect)(()=>{i!=null&&i.key&&(i!=null&&i.values.length)&&r(t,{[i.key]:i.values[0]})},[]),{discriminator:i,discriminatorValue:o,discriminatedSchema:a}},"useDiscriminator"),hf=E(e=>{var t=e,{components:n,fieldSchema:r,path:i,required:o,fallback:a}=t,s=BS(t,["components","fieldSchema","path","required","fallback"]),l,c;const{formData:u,disabled:d,hidden:p,handlePropertyChange:f,addArrayItem:h,removeArrayItem:m,formErrors:v,formValid:g}=iT(r,i),y=(0,wn.useMemo)(()=>Uo(u,i),[u,i]),b=(0,wn.useMemo)(()=>rre(n,r),[r,n]),{discriminator:x,discriminatedSchema:_,discriminatorValue:S}=are(r,i,y);if(!b||p===!0)return null;const{Component:R,type:M}=b,j={type:M,componentID:b.id,scope:i.join("."),context:{path:i,readonly:!1,formData:u,formErrors:v,formValid:g,updateForm:f},onChange:z=>f(i,z),disabled:d,errors:(v==null?void 0:v.filter(z=>z.path===i))||[],label:((l=r[Vt])==null?void 0:l.title)||Fg(((c=i[i.length-1])==null?void 0:c.toString())||""),params:b.params,schema:r,zuiProps:r[Vt]};if(r.type==="array"&&M==="array"){const z=R,U=j.schema,Z=Array.isArray(y)||typeof y=="object"?y:[],L=P(G(P({},j),{type:M,schema:U,data:Z,addItem:(F=void 0)=>h(i,typeof F>"u"?oT(U.items):F),removeItem:F=>m(i,F)}),s);return Array.isArray(r.items)?null:wn.default.createElement(z,G(P({key:j.scope},L),{isArrayChild:L.isArrayChild}),Array.isArray(L.data)?L.data.map((F,V)=>{const W=[...i,V.toString()];return wn.default.createElement(pf,{key:W.join("."),fallback:a,fieldSchema:r.items,path:W},wn.default.createElement(hf,{key:W.join("."),components:n,fieldSchema:r.items,path:W,required:o,isArrayChild:!0,index:V,removeSelf:()=>m(i,V),fallback:a}))}):[])}if(r.type==="object"&&M==="object"&&r.properties){const z=R,U=P(G(P({},j),{type:M,schema:j.schema,data:y||{}}),s);return wn.default.createElement(z,G(P({key:j.scope},U),{isArrayChild:U.isArrayChild}),Object.entries(r.properties).map(([Z,L])=>{var F;const V=[...i,Z];return wn.default.createElement(pf,{key:V.join("."),fallback:a,fieldSchema:L,path:V},wn.default.createElement(hf,{key:V.join("."),components:n,fieldSchema:L,path:V,required:((F=r.required)==null?void 0:F.includes(Z))||!1,isArrayChild:!1,fallback:a}))}))}if(M==="discriminatedUnion"){const z=R,U=P(G(P({},j),{type:M,schema:j.schema,data:y||{},discriminatorKey:(x==null?void 0:x.key)||null,discriminatorLabel:Fg((x==null?void 0:x.key)||"Unknown"),discriminatorOptions:(x==null?void 0:x.values)||null,discriminatorValue:S,setDiscriminator:Z=>{if(!(x!=null&&x.key)){console.warn("No discriminator key found, cannot set discriminator");return}f(i,{[x.key]:Z})}}),s);return wn.default.createElement(z,G(P({key:j.scope},U),{isArrayChild:U.isArrayChild}),_&&wn.default.createElement(pf,{key:i.join("."),fallback:a,fieldSchema:_,path:i},wn.default.createElement(hf,{components:n,fieldSchema:_,path:i,required:o,isArrayChild:!1,fallback:a})))}const k=R,N=P(G(P({},j),{type:M,schema:j.schema,config:{},required:o,data:y,description:r.description}),s);return wn.default.createElement(k,P({},N))},"FormElementRenderer"),sre={jsonSchemaToZui:jl,zuiToJsonSchema:sd,objectToZui:Da,zuiToTypescriptTypings:eC};const Ug={},Bo=Tc(Object.freeze(Object.defineProperty({__proto__:null,default:Ug},Symbol.toStringTag,{value:"Module"})));function pT(e,t){return function(){return e.apply(t,arguments)}}const{toString:lre}=Object.prototype,{getPrototypeOf:Bg}=Object,mf=(e=>t=>{const n=lre.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),zr=e=>(e=e.toLowerCase(),t=>mf(t)===e),gf=e=>t=>typeof t===e,{isArray:Qa}=Array,Ll=gf("undefined");function cre(e){return e!==null&&!Ll(e)&&e.constructor!==null&&!Ll(e.constructor)&&dr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const hT=zr("ArrayBuffer");function ure(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&hT(e.buffer),t}const dre=gf("string"),dr=gf("function"),mT=gf("number"),yf=e=>e!==null&&typeof e=="object",fre=e=>e===!0||e===!1,vf=e=>{if(mf(e)!=="object")return!1;const t=Bg(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},pre=zr("Date"),hre=zr("File"),mre=zr("Blob"),gre=zr("FileList"),yre=e=>yf(e)&&dr(e.pipe),vre=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||dr(e.append)&&((t=mf(e))==="formdata"||t==="object"&&dr(e.toString)&&e.toString()==="[object FormData]"))},bre=zr("URLSearchParams"),wre=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Fl(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Qa(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 gT(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 yT=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),vT=e=>!Ll(e)&&e!==yT;function zg(){const{caseless:e}=vT(this)&&this||{},t={},n=(r,i)=>{const o=e&&gT(t,i)||i;vf(t[o])&&vf(r)?t[o]=zg(t[o],r):vf(r)?t[o]=zg({},r):Qa(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Fl(arguments[r],n);return t}const _re=(e,t,n,{allOwnKeys:r}={})=>(Fl(t,(i,o)=>{n&&dr(i)?e[o]=pT(i,n):e[o]=i},{allOwnKeys:r}),e),xre=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Sre=(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)},Ere=(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&&Bg(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Cre=(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},Tre=e=>{if(!e)return null;if(Qa(e))return e;let t=e.length;if(!mT(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},kre=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Bg(Uint8Array)),Ore=(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])}},Are=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},$re=zr("HTMLFormElement"),Pre=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),bT=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ire=zr("RegExp"),wT=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Fl(n,(i,o)=>{let a;(a=t(i,o,e))!==!1&&(r[o]=a||i)}),Object.defineProperties(e,r)},Rre=e=>{wT(e,(t,n)=>{if(dr(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(dr(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+"'")})}})},Mre=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Qa(e)?r(e):r(String(e).split(t)),n},Nre=()=>{},Dre=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Zg="abcdefghijklmnopqrstuvwxyz",_T="0123456789",xT={DIGIT:_T,ALPHA:Zg,ALPHA_DIGIT:Zg+Zg.toUpperCase()+_T},jre=(e=16,t=xT.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Lre(e){return!!(e&&dr(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Fre=e=>{const t=new Array(10),n=(r,i)=>{if(yf(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=Qa(r)?[]:{};return Fl(r,(a,s)=>{const l=n(a,i+1);!Ll(l)&&(o[s]=l)}),t[i]=void 0,o}}return r};return n(e,0)},Ure=zr("AsyncFunction"),le={isArray:Qa,isArrayBuffer:hT,isBuffer:cre,isFormData:vre,isArrayBufferView:ure,isString:dre,isNumber:mT,isBoolean:fre,isObject:yf,isPlainObject:vf,isUndefined:Ll,isDate:pre,isFile:hre,isBlob:mre,isRegExp:Ire,isFunction:dr,isStream:yre,isURLSearchParams:bre,isTypedArray:kre,isFileList:gre,forEach:Fl,merge:zg,extend:_re,trim:wre,stripBOM:xre,inherits:Sre,toFlatObject:Ere,kindOf:mf,kindOfTest:zr,endsWith:Cre,toArray:Tre,forEachEntry:Ore,matchAll:Are,isHTMLForm:$re,hasOwnProperty:bT,hasOwnProp:bT,reduceDescriptors:wT,freezeMethods:Rre,toObjectSet:Mre,toCamelCase:Pre,noop:Nre,toFiniteNumber:Dre,findKey:gT,global:yT,isContextDefined:vT,ALPHABET:xT,generateString:jre,isSpecCompliantForm:Lre,toJSONObject:Fre,isAsyncFn:Ure,isThenable:e=>e&&(yf(e)||dr(e))&&dr(e.then)&&dr(e.catch)};function wt(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)}le.inherits(wt,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:le.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const ST=wt.prototype,ET={};["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=>{ET[e]={value:e}}),Object.defineProperties(wt,ET),Object.defineProperty(ST,"isAxiosError",{value:!0}),wt.from=(e,t,n,r,i,o)=>{const a=Object.create(ST);return le.toFlatObject(e,a,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),wt.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const Bre=null;function qg(e){return le.isPlainObject(e)||le.isArray(e)}function CT(e){return le.endsWith(e,"[]")?e.slice(0,-2):e}function TT(e,t,n){return e?e.concat(t).map(function(i,o){return i=CT(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function zre(e){return le.isArray(e)&&!e.some(qg)}const Zre=le.toFlatObject(le,{},null,function(t){return/^is[A-Z]/.test(t)});function bf(e,t,n){if(!le.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=le.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,v){return!le.isUndefined(v[m])});const r=n.metaTokens,i=n.visitor||u,o=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&le.isSpecCompliantForm(t);if(!le.isFunction(i))throw new TypeError("visitor must be a function");function c(h){if(h===null)return"";if(le.isDate(h))return h.toISOString();if(!l&&le.isBlob(h))throw new wt("Blob is not supported. Use a Buffer instead.");return le.isArrayBuffer(h)||le.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,m,v){let g=h;if(h&&!v&&typeof h=="object"){if(le.endsWith(m,"{}"))m=r?m:m.slice(0,-2),h=JSON.stringify(h);else if(le.isArray(h)&&zre(h)||(le.isFileList(h)||le.endsWith(m,"[]"))&&(g=le.toArray(h)))return m=CT(m),g.forEach(function(b,x){!(le.isUndefined(b)||b===null)&&t.append(a===!0?TT([m],x,o):a===null?m:m+"[]",c(b))}),!1}return qg(h)?!0:(t.append(TT(v,m,o),c(h)),!1)}const d=[],p=Object.assign(Zre,{defaultVisitor:u,convertValue:c,isVisitable:qg});function f(h,m){if(!le.isUndefined(h)){if(d.indexOf(h)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(h),le.forEach(h,function(g,y){(!(le.isUndefined(g)||g===null)&&i.call(t,g,le.isString(y)?y.trim():y,m,p))===!0&&f(g,m?m.concat(y):[y])}),d.pop()}}if(!le.isObject(e))throw new TypeError("data must be an object");return f(e),t}function kT(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Hg(e,t){this._pairs=[],e&&bf(e,this,t)}const OT=Hg.prototype;OT.append=function(t,n){this._pairs.push([t,n])},OT.toString=function(t){const n=t?function(r){return t.call(this,r,kT)}:kT;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function qre(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function AT(e,t,n){if(!t)return e;const r=n&&n.encode||qre,i=n&&n.serialize;let o;if(i?o=i(t,n):o=le.isURLSearchParams(t)?t.toString():new Hg(t,n).toString(r),o){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}const $T=class{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){le.forEach(this.handlers,function(r){r!==null&&t(r)})}},PT={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Hre={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Hg,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},IT=typeof window<"u"&&typeof document<"u",Wre=(e=>IT&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),Vre=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Zr={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:IT,hasStandardBrowserEnv:Wre,hasStandardBrowserWebWorkerEnv:Vre},Symbol.toStringTag,{value:"Module"})),...Hre};function Kre(e,t){return bf(e,new Zr.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Zr.isNode&&le.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Gre(e){return le.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Yre(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 RT(e){function t(n,r,i,o){let a=n[o++];if(a==="__proto__")return!0;const s=Number.isFinite(+a),l=o>=n.length;return a=!a&&le.isArray(i)?i.length:a,l?(le.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!s):((!i[a]||!le.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&le.isArray(i[a])&&(i[a]=Yre(i[a])),!s)}if(le.isFormData(e)&&le.isFunction(e.entries)){const n={};return le.forEachEntry(e,(r,i)=>{t(Gre(r),i,n,0)}),n}return null}function Jre(e,t,n){if(le.isString(e))try{return(t||JSON.parse)(e),le.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Wg={transitional:PT,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=le.isObject(t);if(o&&le.isHTMLForm(t)&&(t=new FormData(t)),le.isFormData(t))return i?JSON.stringify(RT(t)):t;if(le.isArrayBuffer(t)||le.isBuffer(t)||le.isStream(t)||le.isFile(t)||le.isBlob(t))return t;if(le.isArrayBufferView(t))return t.buffer;if(le.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 Kre(t,this.formSerializer).toString();if((s=le.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return bf(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),Jre(t)):t}],transformResponse:[function(t){const n=this.transitional||Wg.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&le.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"?wt.from(s,wt.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:Zr.classes.FormData,Blob:Zr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};le.forEach(["delete","get","head","post","put","patch"],e=>{Wg.headers[e]={}});const Vg=Wg,Xre=le.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"]),Qre=e=>{const t={};let n,r,i;return e&&e.split(`
361
+ `,i+="})"}let o=n?i?n+i:r?r==="z.never()"?n+".strict()":n+`.catchall(${r})`:n:i||(r?`z.record(${r})`:"z.record(z.any())");return Xt.an.anyOf(e)&&(o+=`.and(${eT(G(P({},e),{anyOf:e.anyOf.map(a=>typeof a=="object"&&!a.type&&(a.properties||a.additionalProperties||a.patternProperties)?G(P({},a),{type:"object"}):a)}),t)})`),Xt.a.oneOf(e)&&(o+=`.and(${Lg(G(P({},e),{oneOf:e.oneOf.map(a=>typeof a=="object"&&!a.type&&(a.properties||a.additionalProperties||a.patternProperties)?G(P({},a),{type:"object"}):a)}),t)})`),Xt.an.allOf(e)&&(o+=`.and(${Nl(G(P({},e),{allOf:e.allOf.map(a=>typeof a=="object"&&!a.type&&(a.properties||a.additionalProperties||a.patternProperties)?G(P({},a),{type:"object"}):a)}),t)})`),o}E(tT,"parseObject");var Bne=E(e=>{let t="z.string()";return t+=kn(e,"format",({value:n})=>{switch(n){case"email":return[".email(",")"];case"ip":return[".ip(",")"];case"ipv4":return['.ip({ version: "v4"',", message: "," })"];case"ipv6":return['.ip({ version: "v6"',", message: "," })"];case"uri":return[".url(",")"];case"uuid":return[".uuid(",")"];case"date-time":return[".datetime(",")"]}}),t+=kn(e,"pattern",({json:n})=>[`.regex(new RegExp(${n})`,", ",")"]),t+=kn(e,"minLength",({json:n})=>[`.min(${n}`,", ",")"]),t+=kn(e,"maxLength",({json:n})=>[`.max(${n}`,", ",")"]),t},"parseString"),zne=E((e,t)=>`${fn(Mne(e,"nullable"),t,!0)}.nullable()`,"parseNullable"),Zne=E((e,t)=>{var n,r;if(e.oneOf.length<=1||!((n=e.discriminator)!=null&&n.propertyName))return Lg(e,t);const i=e.oneOf.map((o,a)=>fn(o,G(P({},t),{path:[...t.path,"oneOf",a]})));return`z.discriminatedUnion("${(r=e.discriminator)==null?void 0:r.propertyName}", [${i.join(", ")}])`},"parseDiscriminator"),fn=E((e,t={seen:new Map,path:[]},n)=>{if(typeof e!="object")return e?"z.any()":"z.never()";if(t.parserOverride){const o=t.parserOverride(e,t);if(typeof o=="string")return o}let r=t.seen.get(e);if(r){if(r.r!==void 0)return r.r;if(t.depth===void 0||r.n>=t.depth)return"z.any()";r.n+=1}else r={r:void 0,n:0},t.seen.set(e,r);let i=Wne(e,t);return n||(i=qne(e,i),t.withoutDefaults||(i=Hne(e,i))),r.r=i,i},"parseSchema"),qne=E((e,t)=>(e.description&&(t+=`.describe(${JSON.stringify(e.description)})`),t),"addMeta"),Hne=E((e,t)=>(e.default!==void 0&&(t+=`.default(${JSON.stringify(e.default)})`),t),"addDefaults"),Wne=E((e,t)=>Xt.a.nullable(e)?zne(e,t):Xt.an.object(e)?tT(e,t):Xt.an.array(e)?Dne(e,t):Xt.an.anyOf(e)?eT(e,t):Xt.an.allOf(e)?Nl(e,t):Xt.a.discriminator(e)?Zne(e,t):Xt.a.oneOf(e)?Lg(e,t):Xt.a.not(e)?Pne(e,t):Xt.an.enum(e)?Lne(e):Xt.a.const(e)?jne(e):Xt.a.multipleType(e)?$ne(e,t):Xt.a.primitive(e,"string")?Bne(e):Xt.a.primitive(e,"number")||Xt.a.primitive(e,"integer")?Une(e):Xt.a.primitive(e,"boolean")?One(e):Xt.a.primitive(e,"null")?Ine(e):Xt.a.conditional(e)?Fne(e,t):Ane(e),"selectParser"),Xt={an:{object:e=>e.type==="object",array:e=>e.type==="array",anyOf:e=>e.anyOf!==void 0,allOf:e=>e.allOf!==void 0,enum:e=>e.enum!==void 0},a:{nullable:e=>e.nullable===!0,multipleType:e=>Array.isArray(e.type),not:e=>e.not!==void 0,const:e=>e.const!==void 0,primitive:(e,t)=>e.type===t,conditional:e=>!!("if"in e&&e.if&&"then"in e&&"else"in e&&e.then&&e.else),discriminator:e=>{var t;return e.oneOf!==void 0&&((t=e.discriminator)==null?void 0:t.propertyName)!==void 0},oneOf:e=>e.oneOf!==void 0}},Vne=E(e=>fn(e,{seen:new Map,path:[]}),"jsonSchemaToZodStr"),Kne=E(e=>{let t=Vne(e);return t=t.replaceAll("errors: z.ZodError[]","errors"),new Function("z",`return ${t}`)(an)},"jsonSchemaToZod"),Dl=E((e,t)=>{var n,r;if(t[Vt]&&e._def&&(e._def[Vt]=t[Vt]),((n=e._def)==null?void 0:n.typeName)==="ZodObject"&&t.type==="object"&&t.properties&&Object.entries(t.properties).forEach(([i,o])=>{const a=typeof e._def.shape=="function"?e._def.shape():e._def.shape;a[i]&&Dl(a[i],o)}),((r=e._def)==null?void 0:r.typeName)==="ZodRecord"&&t.type==="object"&&t.additionalProperties&&Dl(e._def.valueType,t.additionalProperties),t.type==="array"&&t.items){const i=t.items;if(typeof i=="object"&&!Array.isArray(i)){const o=e._def.type;o&&Dl(o,i)}else Array.isArray(i)&&i.forEach((o,a)=>{const s=e._def;s.typeName===an.ZodFirstPartyTypeKind.ZodTuple&&Dl(s.items[a],o)})}},"applyZuiPropsRecursively"),jl=E(e=>{const t=Kne(e);return Dl(t,e),t},"jsonSchemaToZui"),wn=Mt(w,1),ir=w,Gne=Mt(w,1),nT=(0,ir.createContext)({formData:void 0,formSchema:void 0,setFormData:()=>{throw new Error("Must be within a FormDataProvider")},setHiddenState:()=>{throw new Error("Must be within a FormDataProvider")},setDisabledState:()=>{throw new Error("Must be within a FormDataProvider")},hiddenState:{},disabledState:{},disableValidation:!1}),rT=E((e,t,n)=>{var r;const i=(r=t[Vt])==null?void 0:r[e];if(typeof i>"u")return!1;if(typeof i=="boolean")return i;if(typeof i=="string"){if(typeof window>"u")return console.warn("Function evaluation is not supported in server side rendering"),!1;const a=new Function("return "+i)()(n);switch(typeof a){case"object":case"boolean":return a;default:return!1}}return!1},"parseMaskableField"),iT=E((e,t)=>{const n=(0,ir.useContext)(nT);if(n===void 0)throw new Error("useFormData must be used within a FormDataProvider");const r=(0,ir.useMemo)(()=>Uo(n.formData,t),[n.formData,t]),i=(0,ir.useMemo)(()=>{if(n.disableValidation)return{formValid:null,formErrors:null};if(!n.formSchema)return{formValid:null,formErrors:null};const p=jl(n.formSchema).safeParse(n.formData);return p.success?{formValid:!0,formErrors:[]}:{formValid:!1,formErrors:p.error.issues}},[n.formData]),o=(0,ir.useMemo)(()=>rT("hidden",e,r),[e,r]),a=(0,ir.useMemo)(()=>rT("disabled",e,r),[e,r]);(0,ir.useEffect)(()=>{n.setHiddenState(Xa(n.hiddenState,t,o||{})),n.setDisabledState(Xa(n.disabledState,t,a||{}))},[o,a]);const{disabled:s,hidden:l}=(0,ir.useMemo)(()=>{const p=o===!0||Uo(n.hiddenState,t),f=a===!0||Uo(n.disabledState,t);return{hidden:p===!0,disabled:f===!0}},[n.hiddenState,n.disabledState,t]),c=(0,ir.useCallback)((p,f)=>{n.setFormData(Xa(n.formData,p,f))},[n.formData]),u=(0,ir.useCallback)((p,f)=>{const h=Uo(n.formData,p)||[];n.setFormData(Xa(n.formData,p,[...h,f]))},[n.formData]),d=(0,ir.useCallback)((p,f)=>{const h=Uo(n.formData,p);h.splice(f,1),n.setFormData(Xa(n.formData,p,h))},[n.formData]);return P(G(P({},n),{data:r,disabled:s,hidden:l,handlePropertyChange:c,addArrayItem:u,removeArrayItem:d}),i)},"useFormData");function Xa(e,t,n){if(t.length===0)return n;const r=t.length;return t.reduce((i,o,a)=>(a===r-1?i[o]=n:i[o]||(i[o]=isNaN(Number(o))?{}:[]),i[o]),e??{}),P({},e)}E(Xa,"setObjectPath");var oT=E(e=>Array.isArray(e)?e.map(t=>oT(t)):e.type==="object"?{}:e.type==="array"?[]:e.type==="string"?"":e.type==="number"?0:e.type==="boolean"?!1:null,"getDefaultItemData"),Yne=E(({children:e,setFormData:t,formData:n,formSchema:r,disableValidation:i})=>{const[o,a]=(0,ir.useState)({}),[s,l]=(0,ir.useState)({});return Gne.default.createElement(nT.Provider,{value:{formData:n,setFormData:t,formSchema:r,disableValidation:i,hiddenState:o,setHiddenState:a,disabledState:s,setDisabledState:l}},e)},"FormDataProvider");function Uo(e,t){return t.reduce((n,r)=>n?n[r]:null,e)}E(Uo,"getPathData");function Fg(e,t){return t||(t=new RegExp("/s|-|_| ","g")),lT(e).split(t).map(aT).map(cT).reduce(sT)}E(Fg,"formatTitle");function aT(e){return e.charAt(0).toUpperCase()+e.substring(1)}E(aT,"capitalize");function sT(e,t){return`${e} ${t}`}E(sT,"combine");function lT(e){return e.replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/([A-Z]+)([A-Z][a-z\d]+)/g,"$1_$2").toLowerCase()}E(lT,"decamelize");function cT(e,t,n){const r=e.toLowerCase(),i=e.toUpperCase();for(const o of tre)if(o.toLowerCase()===r)return o;return Jne.includes(i)?i:t===0||t===n.length-1||e.length>=4?e:ere.includes(r)||Qne.includes(r)||Xne.includes(r)?r:e}E(cT,"handleSpecialWords");var Jne=["2D","3D","4WD","A2O","API","BIOS","CCTV","CC","CCV","CD","CD-ROM","COBOL","CIA","CMS","CSS","CSV","CV","DIY","DVD","DB","DNA","E3","EIN","ESPN","FAQ","FAQs","FTP","FPS","FORTRAN","FBI","HTML","HTTP","ID","IP","ISO","JS","JSON","LASER","M2A","M2M","M2MM","M2O","MMORPG","NAFTA","NASA","NDA","O2M","PDF","PHP","POP","RAM","RNGR","ROM","RPG","RTFM","RTS","SCUBA","SITCOM","SKU","SMTP","SQL","SSN","SWAT","TBS","TTL","TV","TNA","UI","URL","USB","UWP","VIP","W3C","WYSIWYG","WWW","WWE","WWF"],Xne=["a","an","the"],Qne=["and","that","but","or","as","if","when","than","because","while","where","after","so","though","since","until","whether","before","although","nor","like","once","unless","now","except"],ere=["about","above","across","after","against","along","among","around","at","because of","before","behind","below","beneath","beside","besides","between","beyond","but","by","concerning","despite","down","during","except","excepting","for","from","in","in front of","inside","in spite of","instead of","into","like","near","of","off","on","onto","out","outside","over","past","regarding","since","through","throughout","to","toward","under","underneath","until","up","upon","up to","with","within","without","with regard to","with respect to"],tre=["2FA","3D","4K","5K","8K","AGI","BI","ChatGPT","CTA","DateTime","GitHub","GPT","HD","IBMid","ID","IDs","iMac","IMAX","iOS","IP","iPad","iPhone","iPod","LDAP","LinkedIn","LLM","M2M","M2O","macOS","McDonalds","ML","MySQL","NLG","NLP","NLU","O2M","OpenAI","PDFs","PEFT","pH","PostgreSQL","SEO","TTS","UHD","UUID","XSS","YouTube"],uT=Mt(w,1),dT=class extends uT.Component{constructor(){super(...arguments),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n)}render(){return this.state.hasError&&this.props.fallback?uT.default.createElement(this.props.fallback,{error:this.state.error,schema:this.props.fieldSchema}):this.props.children}};E(dT,"ErrorBoundary");var pf=dT,nre=E(e=>{var t;return(t=e.anyOf)!=null&&t.length?fT(e.anyOf)?"discriminatedUnion":"object":e.type==="integer"?"number":e.type},"getSchemaType"),rre=E((e,t)=>{var n,r,i;const o=nre(t),a=((n=t[Vt])==null?void 0:n.displayAs)||null;if(!a||!Array.isArray(a)||a.length<2){const u=(r=e==null?void 0:e[o])==null?void 0:r.default;return u?{Component:u,type:o,id:"default",params:{}}:null}const s=a[0],l=((i=e==null?void 0:e[o])==null?void 0:i[s])||null;if(!l)return console.warn(`Component ${o}.${s} not found`),null;const c=a[1]||{};return{Component:l,type:o,id:s,params:c}},"resolveComponent"),fT=E(e=>{const t=e==null?void 0:e.map(n=>n.type!=="object"||!n.properties?null:Object.entries(n.properties).map(([r,i])=>{var o;return i.type==="string"&&((o=i.enum)!=null&&o.length)?{key:r,value:i.enum[0]}:null}).filter(r=>!!r)).flat().reduce((n,r)=>{if(!r)return n;const{key:i,value:o}=r;return n.key===null&&(n.key=i),n.key===i&&n.values.push(o),n},{key:null,values:[]});return(t==null?void 0:t.key)===null||!(t!=null&&t.values.length)?null:t},"resolveDiscriminator"),ire=E((e,t,n)=>{var r,i;if(!(n!=null&&n.length)||!e||!t)return null;for(const o of n){if(o.type!=="object")continue;const a=(r=o.properties)==null?void 0:r[e];if((a==null?void 0:a.type)==="string"&&((i=a.enum)!=null&&i.length)&&a.enum[0]===t)return G(P({},o),{properties:G(P({},o.properties),{[e]:G(P({},a),{[Vt]:{hidden:!0}})})})}return null},"resolveDiscriminatedSchema"),ore=E(({schema:e,components:t,onChange:n,value:r,disableValidation:i,fallback:o})=>wn.default.createElement(Yne,{formData:r,setFormData:n,formSchema:e,disableValidation:i||!1},wn.default.createElement(pf,{fallback:o,fieldSchema:e,path:[]},wn.default.createElement(hf,{components:t,fieldSchema:e,path:[],fallback:o,required:!0,isArrayChild:!1}))),"ZuiForm"),are=E((e,t,n)=>{const{handlePropertyChange:r}=iT(e,t),{discriminator:i,value:o,discriminatedSchema:a}=(0,wn.useMemo)(()=>{const s=fT(e.anyOf),l=s!=null&&s.key?n==null?void 0:n[s.key]:null,c=ire((s==null?void 0:s.key)||null,l,e.anyOf);return{discriminator:s,value:l,discriminatedSchema:c}},[e.anyOf,n]);return(0,wn.useEffect)(()=>{i!=null&&i.key&&(i!=null&&i.values.length)&&r(t,{[i.key]:i.values[0]})},[]),{discriminator:i,discriminatorValue:o,discriminatedSchema:a}},"useDiscriminator"),hf=E(e=>{var t=e,{components:n,fieldSchema:r,path:i,required:o,fallback:a}=t,s=BS(t,["components","fieldSchema","path","required","fallback"]),l,c;const{formData:u,disabled:d,hidden:p,handlePropertyChange:f,addArrayItem:h,removeArrayItem:m,formErrors:v,formValid:g}=iT(r,i),y=(0,wn.useMemo)(()=>Uo(u,i),[u,i]),b=(0,wn.useMemo)(()=>rre(n,r),[r,n]),{discriminator:x,discriminatedSchema:_,discriminatorValue:S}=are(r,i,y);if(!b||p===!0)return null;const{Component:R,type:M}=b,j={type:M,componentID:b.id,scope:i.join("."),context:{path:i,readonly:!1,formData:u,formErrors:v,formValid:g,updateForm:f},onChange:z=>f(i,z),disabled:d,errors:(v==null?void 0:v.filter(z=>z.path===i))||[],label:((l=r[Vt])==null?void 0:l.title)||Fg(((c=i[i.length-1])==null?void 0:c.toString())||""),params:b.params,schema:r,zuiProps:r[Vt]};if(r.type==="array"&&M==="array"){const z=R,B=j.schema,Z=Array.isArray(y)||typeof y=="object"?y:[],L=P(G(P({},j),{type:M,schema:B,data:Z,addItem:(F=void 0)=>h(i,typeof F>"u"?oT(B.items):F),removeItem:F=>m(i,F)}),s);return Array.isArray(r.items)?null:wn.default.createElement(z,G(P({key:j.scope},L),{isArrayChild:L.isArrayChild}),Array.isArray(L.data)?L.data.map((F,V)=>{const W=[...i,V.toString()];return wn.default.createElement(pf,{key:W.join("."),fallback:a,fieldSchema:r.items,path:W},wn.default.createElement(hf,{key:W.join("."),components:n,fieldSchema:r.items,path:W,required:o,isArrayChild:!0,index:V,removeSelf:()=>m(i,V),fallback:a}))}):[])}if(r.type==="object"&&M==="object"&&r.properties){const z=R,B=P(G(P({},j),{type:M,schema:j.schema,data:y||{}}),s);return wn.default.createElement(z,G(P({key:j.scope},B),{isArrayChild:B.isArrayChild}),Object.entries(r.properties).map(([Z,L])=>{var F;const V=[...i,Z];return wn.default.createElement(pf,{key:V.join("."),fallback:a,fieldSchema:L,path:V},wn.default.createElement(hf,{key:V.join("."),components:n,fieldSchema:L,path:V,required:((F=r.required)==null?void 0:F.includes(Z))||!1,isArrayChild:!1,fallback:a}))}))}if(M==="discriminatedUnion"){const z=R,B=P(G(P({},j),{type:M,schema:j.schema,data:y||{},discriminatorKey:(x==null?void 0:x.key)||null,discriminatorLabel:Fg((x==null?void 0:x.key)||"Unknown"),discriminatorOptions:(x==null?void 0:x.values)||null,discriminatorValue:S,setDiscriminator:Z=>{if(!(x!=null&&x.key)){console.warn("No discriminator key found, cannot set discriminator");return}f(i,{[x.key]:Z})}}),s);return wn.default.createElement(z,G(P({key:j.scope},B),{isArrayChild:B.isArrayChild}),_&&wn.default.createElement(pf,{key:i.join("."),fallback:a,fieldSchema:_,path:i},wn.default.createElement(hf,{components:n,fieldSchema:_,path:i,required:o,isArrayChild:!1,fallback:a})))}const k=R,N=P(G(P({},j),{type:M,schema:j.schema,config:{},required:o,data:y,description:r.description}),s);return wn.default.createElement(k,P({},N))},"FormElementRenderer"),sre={jsonSchemaToZui:jl,zuiToJsonSchema:sd,objectToZui:Da,zuiToTypescriptTypings:eC};const Ug={},Bo=Tc(Object.freeze(Object.defineProperty({__proto__:null,default:Ug},Symbol.toStringTag,{value:"Module"})));function pT(e,t){return function(){return e.apply(t,arguments)}}const{toString:lre}=Object.prototype,{getPrototypeOf:Bg}=Object,mf=(e=>t=>{const n=lre.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),zr=e=>(e=e.toLowerCase(),t=>mf(t)===e),gf=e=>t=>typeof t===e,{isArray:Qa}=Array,Ll=gf("undefined");function cre(e){return e!==null&&!Ll(e)&&e.constructor!==null&&!Ll(e.constructor)&&dr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const hT=zr("ArrayBuffer");function ure(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&hT(e.buffer),t}const dre=gf("string"),dr=gf("function"),mT=gf("number"),yf=e=>e!==null&&typeof e=="object",fre=e=>e===!0||e===!1,vf=e=>{if(mf(e)!=="object")return!1;const t=Bg(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},pre=zr("Date"),hre=zr("File"),mre=zr("Blob"),gre=zr("FileList"),yre=e=>yf(e)&&dr(e.pipe),vre=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||dr(e.append)&&((t=mf(e))==="formdata"||t==="object"&&dr(e.toString)&&e.toString()==="[object FormData]"))},bre=zr("URLSearchParams"),wre=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Fl(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Qa(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 gT(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 yT=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),vT=e=>!Ll(e)&&e!==yT;function zg(){const{caseless:e}=vT(this)&&this||{},t={},n=(r,i)=>{const o=e&&gT(t,i)||i;vf(t[o])&&vf(r)?t[o]=zg(t[o],r):vf(r)?t[o]=zg({},r):Qa(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Fl(arguments[r],n);return t}const _re=(e,t,n,{allOwnKeys:r}={})=>(Fl(t,(i,o)=>{n&&dr(i)?e[o]=pT(i,n):e[o]=i},{allOwnKeys:r}),e),xre=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Sre=(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)},Ere=(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&&Bg(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Cre=(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},Tre=e=>{if(!e)return null;if(Qa(e))return e;let t=e.length;if(!mT(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},kre=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Bg(Uint8Array)),Ore=(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])}},Are=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},$re=zr("HTMLFormElement"),Pre=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),bT=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ire=zr("RegExp"),wT=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Fl(n,(i,o)=>{let a;(a=t(i,o,e))!==!1&&(r[o]=a||i)}),Object.defineProperties(e,r)},Rre=e=>{wT(e,(t,n)=>{if(dr(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(dr(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+"'")})}})},Mre=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Qa(e)?r(e):r(String(e).split(t)),n},Nre=()=>{},Dre=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Zg="abcdefghijklmnopqrstuvwxyz",_T="0123456789",xT={DIGIT:_T,ALPHA:Zg,ALPHA_DIGIT:Zg+Zg.toUpperCase()+_T},jre=(e=16,t=xT.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Lre(e){return!!(e&&dr(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Fre=e=>{const t=new Array(10),n=(r,i)=>{if(yf(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=Qa(r)?[]:{};return Fl(r,(a,s)=>{const l=n(a,i+1);!Ll(l)&&(o[s]=l)}),t[i]=void 0,o}}return r};return n(e,0)},Ure=zr("AsyncFunction"),le={isArray:Qa,isArrayBuffer:hT,isBuffer:cre,isFormData:vre,isArrayBufferView:ure,isString:dre,isNumber:mT,isBoolean:fre,isObject:yf,isPlainObject:vf,isUndefined:Ll,isDate:pre,isFile:hre,isBlob:mre,isRegExp:Ire,isFunction:dr,isStream:yre,isURLSearchParams:bre,isTypedArray:kre,isFileList:gre,forEach:Fl,merge:zg,extend:_re,trim:wre,stripBOM:xre,inherits:Sre,toFlatObject:Ere,kindOf:mf,kindOfTest:zr,endsWith:Cre,toArray:Tre,forEachEntry:Ore,matchAll:Are,isHTMLForm:$re,hasOwnProperty:bT,hasOwnProp:bT,reduceDescriptors:wT,freezeMethods:Rre,toObjectSet:Mre,toCamelCase:Pre,noop:Nre,toFiniteNumber:Dre,findKey:gT,global:yT,isContextDefined:vT,ALPHABET:xT,generateString:jre,isSpecCompliantForm:Lre,toJSONObject:Fre,isAsyncFn:Ure,isThenable:e=>e&&(yf(e)||dr(e))&&dr(e.then)&&dr(e.catch)};function wt(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)}le.inherits(wt,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:le.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const ST=wt.prototype,ET={};["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=>{ET[e]={value:e}}),Object.defineProperties(wt,ET),Object.defineProperty(ST,"isAxiosError",{value:!0}),wt.from=(e,t,n,r,i,o)=>{const a=Object.create(ST);return le.toFlatObject(e,a,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),wt.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const Bre=null;function qg(e){return le.isPlainObject(e)||le.isArray(e)}function CT(e){return le.endsWith(e,"[]")?e.slice(0,-2):e}function TT(e,t,n){return e?e.concat(t).map(function(i,o){return i=CT(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function zre(e){return le.isArray(e)&&!e.some(qg)}const Zre=le.toFlatObject(le,{},null,function(t){return/^is[A-Z]/.test(t)});function bf(e,t,n){if(!le.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=le.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,v){return!le.isUndefined(v[m])});const r=n.metaTokens,i=n.visitor||u,o=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&le.isSpecCompliantForm(t);if(!le.isFunction(i))throw new TypeError("visitor must be a function");function c(h){if(h===null)return"";if(le.isDate(h))return h.toISOString();if(!l&&le.isBlob(h))throw new wt("Blob is not supported. Use a Buffer instead.");return le.isArrayBuffer(h)||le.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,m,v){let g=h;if(h&&!v&&typeof h=="object"){if(le.endsWith(m,"{}"))m=r?m:m.slice(0,-2),h=JSON.stringify(h);else if(le.isArray(h)&&zre(h)||(le.isFileList(h)||le.endsWith(m,"[]"))&&(g=le.toArray(h)))return m=CT(m),g.forEach(function(b,x){!(le.isUndefined(b)||b===null)&&t.append(a===!0?TT([m],x,o):a===null?m:m+"[]",c(b))}),!1}return qg(h)?!0:(t.append(TT(v,m,o),c(h)),!1)}const d=[],p=Object.assign(Zre,{defaultVisitor:u,convertValue:c,isVisitable:qg});function f(h,m){if(!le.isUndefined(h)){if(d.indexOf(h)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(h),le.forEach(h,function(g,y){(!(le.isUndefined(g)||g===null)&&i.call(t,g,le.isString(y)?y.trim():y,m,p))===!0&&f(g,m?m.concat(y):[y])}),d.pop()}}if(!le.isObject(e))throw new TypeError("data must be an object");return f(e),t}function kT(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Hg(e,t){this._pairs=[],e&&bf(e,this,t)}const OT=Hg.prototype;OT.append=function(t,n){this._pairs.push([t,n])},OT.toString=function(t){const n=t?function(r){return t.call(this,r,kT)}:kT;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function qre(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function AT(e,t,n){if(!t)return e;const r=n&&n.encode||qre,i=n&&n.serialize;let o;if(i?o=i(t,n):o=le.isURLSearchParams(t)?t.toString():new Hg(t,n).toString(r),o){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}const $T=class{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){le.forEach(this.handlers,function(r){r!==null&&t(r)})}},PT={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Hre={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Hg,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},IT=typeof window<"u"&&typeof document<"u",Wre=(e=>IT&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),Vre=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Zr={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:IT,hasStandardBrowserEnv:Wre,hasStandardBrowserWebWorkerEnv:Vre},Symbol.toStringTag,{value:"Module"})),...Hre};function Kre(e,t){return bf(e,new Zr.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Zr.isNode&&le.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Gre(e){return le.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Yre(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 RT(e){function t(n,r,i,o){let a=n[o++];if(a==="__proto__")return!0;const s=Number.isFinite(+a),l=o>=n.length;return a=!a&&le.isArray(i)?i.length:a,l?(le.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!s):((!i[a]||!le.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&le.isArray(i[a])&&(i[a]=Yre(i[a])),!s)}if(le.isFormData(e)&&le.isFunction(e.entries)){const n={};return le.forEachEntry(e,(r,i)=>{t(Gre(r),i,n,0)}),n}return null}function Jre(e,t,n){if(le.isString(e))try{return(t||JSON.parse)(e),le.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Wg={transitional:PT,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=le.isObject(t);if(o&&le.isHTMLForm(t)&&(t=new FormData(t)),le.isFormData(t))return i?JSON.stringify(RT(t)):t;if(le.isArrayBuffer(t)||le.isBuffer(t)||le.isStream(t)||le.isFile(t)||le.isBlob(t))return t;if(le.isArrayBufferView(t))return t.buffer;if(le.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 Kre(t,this.formSerializer).toString();if((s=le.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return bf(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),Jre(t)):t}],transformResponse:[function(t){const n=this.transitional||Wg.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&le.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"?wt.from(s,wt.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:Zr.classes.FormData,Blob:Zr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};le.forEach(["delete","get","head","post","put","patch"],e=>{Wg.headers[e]={}});const Vg=Wg,Xre=le.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"]),Qre=e=>{const t={};let n,r,i;return e&&e.split(`
362
362
  `).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!n||t[n]&&Xre[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},MT=Symbol("internals");function Ul(e){return e&&String(e).trim().toLowerCase()}function wf(e){return e===!1||e==null?e:le.isArray(e)?e.map(wf):String(e)}function eie(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 tie=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Kg(e,t,n,r,i){if(le.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!le.isString(t)){if(le.isString(r))return t.indexOf(r)!==-1;if(le.isRegExp(r))return r.test(t)}}function nie(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function rie(e,t){const n=le.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 _f=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(s,l,c){const u=Ul(l);if(!u)throw new Error("header name must be a non-empty string");const d=le.findKey(i,u);(!d||i[d]===void 0||c===!0||c===void 0&&i[d]!==!1)&&(i[d||l]=wf(s))}const a=(s,l)=>le.forEach(s,(c,u)=>o(c,u,l));return le.isPlainObject(t)||t instanceof this.constructor?a(t,n):le.isString(t)&&(t=t.trim())&&!tie(t)?a(Qre(t),n):t!=null&&o(n,t,r),this}get(t,n){if(t=Ul(t),t){const r=le.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return eie(i);if(le.isFunction(n))return n.call(this,i,r);if(le.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ul(t),t){const r=le.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Kg(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(a){if(a=Ul(a),a){const s=le.findKey(r,a);s&&(!n||Kg(r,r[s],s,n))&&(delete r[s],i=!0)}}return le.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||Kg(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return le.forEach(this,(i,o)=>{const a=le.findKey(r,o);if(a){n[a]=wf(i),delete n[o];return}const s=t?nie(o):String(o).trim();s!==o&&delete n[o],n[s]=wf(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return le.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&le.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(`
363
363
  `)}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[MT]=this[MT]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=Ul(a);r[s]||(rie(i,a),r[s]=!0)}return le.isArray(t)?t.forEach(o):o(t),this}};_f.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),le.reduceDescriptors(_f.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),le.freezeMethods(_f);const vi=_f;function Gg(e,t){const n=this||Vg,r=t||n,i=vi.from(r.headers);let o=r.data;return le.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function NT(e){return!!(e&&e.__CANCEL__)}function Bl(e,t,n){wt.call(this,e??"canceled",wt.ERR_CANCELED,t,n),this.name="CanceledError"}le.inherits(Bl,wt,{__CANCEL__:!0});function iie(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new wt("Request failed with status code "+n.status,[wt.ERR_BAD_REQUEST,wt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const oie=Zr.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const a=[e+"="+encodeURIComponent(t)];le.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),le.isString(r)&&a.push("path="+r),le.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 aie(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function sie(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function DT(e,t){return e&&!aie(t)?sie(e,t):t}const lie=Zr.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=le.isString(a)?i(a):a;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function cie(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function uie(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(),u=r[o];a||(a=c),n[i]=l,r[i]=c;let d=o,p=0;for(;d!==i;)p+=n[d++],d=d%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),c-a<t)return;const f=u&&c-u;return f?Math.round(p*1e3/f):void 0}}function jT(e,t){let n=0;const r=uie(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 u={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};u[t?"download":"upload"]=!0,e(u)}}const Yg={http:Bre,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let i=e.data;const o=vi.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 u;if(le.isFormData(i)){if(Zr.hasStandardBrowserEnv||Zr.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if((u=o.getContentType())!==!1){const[m,...v]=u?u.split(";").map(g=>g.trim()).filter(Boolean):[];o.setContentType([m||"multipart/form-data",...v].join("; "))}}let d=new XMLHttpRequest;if(e.auth){const m=e.auth.username||"",v=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(m+":"+v))}const p=DT(e.baseURL,e.url);d.open(e.method.toUpperCase(),AT(p,e.params,e.paramsSerializer),!0),d.timeout=e.timeout;function f(){if(!d)return;const m=vi.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),g={data:!a||a==="text"||a==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:m,config:e,request:d};iie(function(b){n(b),c()},function(b){r(b),c()},g),d=null}if("onloadend"in d?d.onloadend=f:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(f)},d.onabort=function(){d&&(r(new wt("Request aborted",wt.ECONNABORTED,e,d)),d=null)},d.onerror=function(){r(new wt("Network Error",wt.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let v=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const g=e.transitional||PT;e.timeoutErrorMessage&&(v=e.timeoutErrorMessage),r(new wt(v,g.clarifyTimeoutError?wt.ETIMEDOUT:wt.ECONNABORTED,e,d)),d=null},Zr.hasStandardBrowserEnv&&(s&&le.isFunction(s)&&(s=s(e)),s||s!==!1&&lie(p))){const m=e.xsrfHeaderName&&e.xsrfCookieName&&oie.read(e.xsrfCookieName);m&&o.set(e.xsrfHeaderName,m)}i===void 0&&o.setContentType(null),"setRequestHeader"in d&&le.forEach(o.toJSON(),function(v,g){d.setRequestHeader(g,v)}),le.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),a&&a!=="json"&&(d.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&d.addEventListener("progress",jT(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",jT(e.onUploadProgress)),(e.cancelToken||e.signal)&&(l=m=>{d&&(r(!m||m.type?new Bl(null,e,d):m),d.abort(),d=null)},e.cancelToken&&e.cancelToken.subscribe(l),e.signal&&(e.signal.aborted?l():e.signal.addEventListener("abort",l)));const h=cie(p);if(h&&Zr.protocols.indexOf(h)===-1){r(new wt("Unsupported protocol "+h+":",wt.ERR_BAD_REQUEST,e));return}d.send(i||null)})}};le.forEach(Yg,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const LT=e=>`- ${e}`,die=e=>le.isFunction(e)||e===null||e===!1,FT={getAdapter:e=>{e=le.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,!die(n)&&(r=Yg[(a=String(n)).toLowerCase()],r===void 0))throw new wt(`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 :
364
364
  `+o.map(LT).join(`
365
365
  `):" "+LT(o[0]):"as no adapter specified";throw new wt("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Yg};function Jg(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Bl(null,e)}function UT(e){return Jg(e),e.headers=vi.from(e.headers),e.data=Gg.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),FT.getAdapter(e.adapter||Vg.adapter)(e).then(function(r){return Jg(e),r.data=Gg.call(e,e.transformResponse,r),r.headers=vi.from(r.headers),r},function(r){return NT(r)||(Jg(e),r&&r.response&&(r.response.data=Gg.call(e,e.transformResponse,r.response),r.response.headers=vi.from(r.response.headers))),Promise.reject(r)})}const BT=e=>e instanceof vi?{...e}:e;function es(e,t){t=t||{};const n={};function r(c,u,d){return le.isPlainObject(c)&&le.isPlainObject(u)?le.merge.call({caseless:d},c,u):le.isPlainObject(u)?le.merge({},u):le.isArray(u)?u.slice():u}function i(c,u,d){if(le.isUndefined(u)){if(!le.isUndefined(c))return r(void 0,c,d)}else return r(c,u,d)}function o(c,u){if(!le.isUndefined(u))return r(void 0,u)}function a(c,u){if(le.isUndefined(u)){if(!le.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function s(c,u,d){if(d in t)return r(c,u);if(d 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,u)=>i(BT(c),BT(u),!0)};return le.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=l[u]||i,p=d(e[u],t[u],u);le.isUndefined(p)&&d!==s||(n[u]=p)}),n}const zT="1.6.8",Xg={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Xg[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ZT={};Xg.transitional=function(t,n,r){function i(o,a){return"[Axios v"+zT+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(t===!1)throw new wt(i(a," has been removed"+(n?" in "+n:"")),wt.ERR_DEPRECATED);return n&&!ZT[a]&&(ZT[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 fie(e,t,n){if(typeof e!="object")throw new wt("options must be an object",wt.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 wt("option "+o+" must be "+l,wt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new wt("Unknown option "+o,wt.ERR_BAD_OPTION)}}const Qg={assertOptions:fie,validators:Xg},Ki=Qg.validators;let xf=class{constructor(t){this.defaults=t,this.interceptors={request:new $T,response:new $T}}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+=`
366
- `+o):r.stack=o}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=es(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Qg.assertOptions(r,{silentJSONParsing:Ki.transitional(Ki.boolean),forcedJSONParsing:Ki.transitional(Ki.boolean),clarifyTimeoutError:Ki.transitional(Ki.boolean)},!1),i!=null&&(le.isFunction(i)?n.paramsSerializer={serialize:i}:Qg.assertOptions(i,{encode:Ki.function,serialize:Ki.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&le.merge(o.common,o[n.method]);o&&le.forEach(["delete","get","head","post","put","patch","common"],h=>{delete o[h]}),n.headers=vi.concat(a,o);const s=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,d=0,p;if(!l){const h=[UT.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,c),p=h.length,u=Promise.resolve(n);d<p;)u=u.then(h[d++],h[d++]);return u}p=s.length;let f=n;for(d=0;d<p;){const h=s[d++],m=s[d++];try{f=h(f)}catch(v){m.call(this,v);break}}try{u=UT.call(this,f)}catch(h){return Promise.reject(h)}for(d=0,p=c.length;d<p;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=es(this.defaults,t);const n=DT(t.baseURL,t.url);return AT(n,t.params,t.paramsSerializer)}};le.forEach(["delete","get","head","options"],function(t){xf.prototype[t]=function(n,r){return this.request(es(r||{},{method:t,url:n,data:(r||{}).data}))}}),le.forEach(["post","put","patch"],function(t){function n(r){return function(o,a,s){return this.request(es(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}xf.prototype[t]=n(),xf.prototype[t+"Form"]=n(!0)});const Sf=xf,pie=class XI{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 Bl(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 XI(function(i){t=i}),cancel:t}}};function hie(e){return function(n){return e.apply(null,n)}}function mie(e){return le.isObject(e)&&e.isAxiosError===!0}const ey={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(ey).forEach(([e,t])=>{ey[t]=e});const gie=ey;function qT(e){const t=new Sf(e),n=pT(Sf.prototype.request,t);return le.extend(n,Sf.prototype,t,{allOwnKeys:!0}),le.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return qT(es(e,i))},n}const Qt=qT(Vg);Qt.Axios=Sf,Qt.CanceledError=Bl,Qt.CancelToken=pie,Qt.isCancel=NT,Qt.VERSION=zT,Qt.toFormData=bf,Qt.AxiosError=wt,Qt.Cancel=Qt.CanceledError,Qt.all=function(t){return Promise.all(t)},Qt.spread=hie,Qt.isAxiosError=mie,Qt.mergeConfig=es,Qt.AxiosHeaders=vi,Qt.formToJSON=e=>RT(le.isHTMLForm(e)?new FormData(e):e),Qt.getAdapter=FT.getAdapter,Qt.HttpStatusCode=gie,Qt.default=Qt;const J=Qt,{Axios:yie,AxiosError:vie,CanceledError:bie,isCancel:wie,CancelToken:_ie,VERSION:xie,all:Sie,Cancel:Eie,isAxiosError:Cie,spread:Tie,toFormData:kie,AxiosHeaders:Oie,HttpStatusCode:Aie,formToJSON:$ie,getAdapter:Pie,mergeConfig:Iie}=J,Rie=Object.freeze(Object.defineProperty({__proto__:null,Axios:yie,AxiosError:vie,AxiosHeaders:Oie,Cancel:Eie,CancelToken:_ie,CanceledError:bie,HttpStatusCode:Aie,VERSION:xie,all:Sie,default:J,formToJSON:$ie,getAdapter:Pie,isAxiosError:Cie,isCancel:wie,mergeConfig:Iie,spread:Tie,toFormData:kie},Symbol.toStringTag,{value:"Module"}));var ts={};Object.defineProperty(ts,"__esModule",{value:!0});var Mie=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},Nie=typeof window<"u"&&typeof window.document<"u",Die=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,jie=(typeof self>"u"?"undefined":Mie(self))==="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope",Lie=typeof window<"u"&&window.name==="nodejs"||typeof navigator<"u"&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),Fie=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u",HT=ts.isBrowser=Nie;ts.isWebWorker=jie;var ty=ts.isNode=Die;ts.isJsDom=Lie,ts.isDeno=Fie;var Uie=Object.create,WT=Object.defineProperty,Bie=Object.getOwnPropertyDescriptor,zie=Object.getOwnPropertyNames,Zie=Object.getPrototypeOf,qie=Object.prototype.hasOwnProperty,VT=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Hie=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of zie(t))!qie.call(e,i)&&i!==n&&WT(e,i,{get:()=>t[i],enumerable:!(r=Bie(t,i))||r.enumerable});return e},KT=(e,t,n)=>(n=e!=null?Uie(Zie(e)):{},Hie(t||!e||!e.__esModule?WT(n,"default",{value:e,enumerable:!0}):n,e)),Wie=VT(()=>{}),Vie=VT(()=>{}),Kie=KT(Wie()),Gie=KT(Vie()),Yie="https://api.botpress.cloud",Jie=6e4,Xie="BP_API_URL",Qie="BP_BOT_ID",eoe="BP_INTEGRATION_ID",toe="BP_WORKSPACE_ID",noe="BP_TOKEN";function roe(e){let t=ioe(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??Yie,i=t.timeout??Jie;return{apiUrl:r,timeout:i,withCredentials:HT,headers:n}}function ioe(e){return HT?e:ty?ooe(e):e}function ooe(e){let t={...e,apiUrl:e.apiUrl??process.env[Xie],botId:e.botId??process.env[Qie],integrationId:e.integrationId??process.env[eoe],workspaceId:e.workspaceId??process.env[toe]},n=t.token??process.env[noe];return n&&(t.token=n),t}var Q="https://api.botpress.cloud".replace(/\/+$/,""),aoe=class{constructor(e,t=Q,n=J){T(this,"configuration");this.basePath=t,this.axios=n,e&&(this.configuration=e,this.basePath=e.basePath||this.basePath)}},soe=class extends Error{constructor(e,t){super(t),this.field=e,this.name="RequiredError"}},ee="https://example.com",ce=function(e,t,n){if(n==null)throw new soe(t,`Required parameter ${t} was null or undefined when calling ${e}.`)};function ny(e,t,n=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(r=>ny(e,r,n)):Object.keys(t).forEach(r=>ny(e,t[r],`${n}${n!==""?".":""}${r}`)):e.has(n)?e.append(n,t):e.set(n,t))}var te=function(e,...t){let n=new URLSearchParams(e.search);ny(n,t),e.search=n.toString()},Ye=function(e,t,n){let r=typeof e!="string";return(r&&n&&n.isJsonMime?n.isJsonMime(t.headers["Content-Type"]):r)?JSON.stringify(e!==void 0?e:{}):e||""},ne=function(e){return e.pathname+e.search+e.hash},re=function(e,t,n,r){return(i=t,o=n)=>{let a={...e.options,url:((r==null?void 0:r.basePath)||o)+e.url};return i.request(a)}},loe=function(e){return{addParticipant:async(t,n,r={})=>{ce("addParticipant","id",t);let i="/v1/chat/conversations/{id}/participants".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"POST",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},breakDownWorkspaceUsageByBot:async(t,n,r,i={})=>{ce("breakDownWorkspaceUsageByBot","id",t),ce("breakDownWorkspaceUsageByBot","type",n);let o="/v1/admin/workspaces/{id}/usages/by-bot".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,ee),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...i},c={},u={};n!==void 0&&(u.type=n),r!==void 0&&(u.period=r),te(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...i.headers},{url:ne(a),options:l}},callAction:async(t,n={})=>{let r="/v1/chat/actions",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},changeAISpendQuota:async(t,n={})=>{let r="/v1/admin/quotas/ai-spend",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"PUT",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},chargeWorkspaceUnpaidInvoices:async(t,n,r={})=>{ce("chargeWorkspaceUnpaidInvoices","id",t);let i="/v1/admin/workspaces/{id}/billing/invoices/charge-unpaid".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"POST",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},checkHandleAvailability:async(t,n={})=>{let r="/v1/admin/workspaces/handle-availability",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"PUT",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},configureIntegration:async(t,n={})=>{let r="/v1/chat/integrations/configure",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},createBot:async(t,n={})=>{let r="/v1/admin/bots",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},createConversation:async(t,n={})=>{let r="/v1/chat/conversations",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},createEvent:async(t,n={})=>{let r="/v1/chat/events",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},createFile:async(t,n={})=>{let r="/v1/files",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},createIntegration:async(t,n={})=>{let r="/v1/admin/integrations",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},createIntegrationApiKey:async(t,n={})=>{let r="/v1/admin/integrations/iaks",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},createMessage:async(t,n={})=>{let r="/v1/chat/messages",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},createPersonalAccessToken:async(t,n={})=>{let r="/v1/admin/account/pats",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},createTable:async(t,n={})=>{let r="/v1/tables",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},createTableRows:async(t,n,r={})=>{ce("createTableRows","table",t);let i="/v1/tables/{table}/rows".replace("{table}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"POST",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},createTask:async(t,n={})=>{let r="/v1/chat/tasks",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},createUser:async(t,n={})=>{let r="/v1/chat/users",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},createWorkspace:async(t,n={})=>{let r="/v1/admin/workspaces",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},createWorkspaceMember:async(t,n={})=>{let r="/v1/admin/workspace-members",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},deleteBot:async(t,n={})=>{ce("deleteBot","id",t);let r="/v1/admin/bots/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"DELETE",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},deleteBotIssue:async(t,n,r={})=>{ce("deleteBotIssue","id",t),ce("deleteBotIssue","issueId",n);let i="/v1/admin/bots/{id}/issues/{issueId}".replace("{id}",encodeURIComponent(String(t))).replace("{issueId}",encodeURIComponent(String(n))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"DELETE",...a,...r},l={};te(o,{});let c=a&&a.headers?a.headers:{};return s.headers={...l,...c,...r.headers},{url:ne(o),options:s}},deleteConversation:async(t,n={})=>{ce("deleteConversation","id",t);let r="/v1/chat/conversations/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"DELETE",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},deleteFile:async(t,n={})=>{ce("deleteFile","id",t);let r="/v1/files/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"DELETE",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},deleteIntegration:async(t,n={})=>{ce("deleteIntegration","id",t);let r="/v1/admin/integrations/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"DELETE",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},deleteIntegrationApiKey:async(t,n={})=>{ce("deleteIntegrationApiKey","id",t);let r="/v1/admin/integrations/iaks/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"DELETE",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},deleteMessage:async(t,n={})=>{ce("deleteMessage","id",t);let r="/v1/chat/messages/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"DELETE",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},deletePersonalAccessToken:async(t,n={})=>{ce("deletePersonalAccessToken","id",t);let r="/v1/admin/account/pats/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"DELETE",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},deleteTable:async(t,n={})=>{ce("deleteTable","table",t);let r="/v1/tables/{table}".replace("{table}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"DELETE",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},deleteTableRows:async(t,n,r={})=>{ce("deleteTableRows","table",t);let i="/v1/tables/{table}/rows/delete".replace("{table}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"POST",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},deleteTask:async(t,n={})=>{ce("deleteTask","id",t);let r="/v1/chat/tasks/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"DELETE",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},deleteUser:async(t,n={})=>{ce("deleteUser","id",t);let r="/v1/chat/users/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"DELETE",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},deleteWorkspace:async(t,n={})=>{ce("deleteWorkspace","id",t);let r="/v1/admin/workspaces/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"DELETE",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},deleteWorkspaceMember:async(t,n={})=>{ce("deleteWorkspaceMember","id",t);let r="/v1/admin/workspace-members/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"DELETE",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},duplicateTable:async(t,n,r={})=>{ce("duplicateTable","sourceTableId",t);let i="/v1/tables/{sourceTableId}/duplicate".replace("{sourceTableId}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"POST",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},findTableRows:async(t,n,r={})=>{ce("findTableRows","table",t);let i="/v1/tables/{table}/rows/find".replace("{table}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"POST",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},getAccount:async(t={})=>{let n="/v1/admin/account/me",r=new URL(n,ee),i;e&&(i=e.baseOptions);let o={method:"GET",...i,...t},a={};te(r,{});let s=i&&i.headers?i.headers:{};return o.headers={...a,...s,...t.headers},{url:ne(r),options:o}},getAccountPreference:async(t,n={})=>{ce("getAccountPreference","key",t);let r="/v1/admin/account/preferences/{key}".replace("{key}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},getAllWorkspaceQuotaCompletion:async(t={})=>{let n="/v1/admin/workspaces/usages/quota-completion",r=new URL(n,ee),i;e&&(i=e.baseOptions);let o={method:"GET",...i,...t},a={};te(r,{});let s=i&&i.headers?i.headers:{};return o.headers={...a,...s,...t.headers},{url:ne(r),options:o}},getAuditRecords:async(t,n,r={})=>{ce("getAuditRecords","id",t);let i="/v1/admin/workspaces/{id}/audit-records".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...r},l={},c={};n!==void 0&&(c.nextToken=n),te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},{url:ne(o),options:s}},getBot:async(t,n={})=>{ce("getBot","id",t);let r="/v1/admin/bots/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},getBotAnalytics:async(t,n,r,i={})=>{ce("getBotAnalytics","id",t),ce("getBotAnalytics","startDate",n),ce("getBotAnalytics","endDate",r);let o="/v1/admin/bots/{id}/analytics".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,ee),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...i},c={},u={};n!==void 0&&(u.startDate=n),r!==void 0&&(u.endDate=r),te(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...i.headers},{url:ne(a),options:l}},getBotLogs:async(t,n,r,i,o={})=>{ce("getBotLogs","id",t),ce("getBotLogs","timeStart",n),ce("getBotLogs","timeEnd",r);let a="/v1/admin/bots/{id}/logs".replace("{id}",encodeURIComponent(String(t))),s=new URL(a,ee),l;e&&(l=e.baseOptions);let c={method:"GET",...l,...o},u={},d={};n!==void 0&&(d.timeStart=n),r!==void 0&&(d.timeEnd=r),i!==void 0&&(d.nextToken=i),te(s,d);let p=l&&l.headers?l.headers:{};return c.headers={...u,...p,...o.headers},{url:ne(s),options:c}},getBotWebchat:async(t,n,r={})=>{ce("getBotWebchat","id",t),ce("getBotWebchat","type",n);let i="/v1/admin/bots/{id}/webchat".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...r},l={},c={};n!==void 0&&(c.type=n),te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},{url:ne(o),options:s}},getConversation:async(t,n={})=>{ce("getConversation","id",t);let r="/v1/chat/conversations/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},getEvent:async(t,n={})=>{ce("getEvent","id",t);let r="/v1/chat/events/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},getFileContent:async(t,n={})=>{ce("getFileContent","id",t);let r="/v1/files/{id}/content".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},getFileMetadata:async(t,n={})=>{ce("getFileMetadata","id",t);let r="/v1/files/{id}/metadata".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},getIntegration:async(t,n={})=>{ce("getIntegration","id",t);let r="/v1/admin/integrations/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},getIntegrationByName:async(t,n,r={})=>{ce("getIntegrationByName","name",t),ce("getIntegrationByName","version",n);let i="/v1/admin/integrations/{name}/{version}".replace("{name}",encodeURIComponent(String(t))).replace("{version}",encodeURIComponent(String(n))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...r},l={};te(o,{});let c=a&&a.headers?a.headers:{};return s.headers={...l,...c,...r.headers},{url:ne(o),options:s}},getIntegrationLogs:async(t,n,r,i,o={})=>{ce("getIntegrationLogs","id",t),ce("getIntegrationLogs","timeStart",n),ce("getIntegrationLogs","timeEnd",r);let a="/v1/admin/integrations/{id}/logs".replace("{id}",encodeURIComponent(String(t))),s=new URL(a,ee),l;e&&(l=e.baseOptions);let c={method:"GET",...l,...o},u={},d={};n!==void 0&&(d.timeStart=n),r!==void 0&&(d.timeEnd=r),i!==void 0&&(d.nextToken=i),te(s,d);let p=l&&l.headers?l.headers:{};return c.headers={...u,...p,...o.headers},{url:ne(s),options:c}},getMessage:async(t,n={})=>{ce("getMessage","id",t);let r="/v1/chat/messages/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},getOrCreateConversation:async(t,n={})=>{let r="/v1/chat/conversations/get-or-create",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},getOrCreateMessage:async(t,n={})=>{let r="/v1/chat/messages/get-or-create",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},getOrCreateTable:async(t,n,r={})=>{ce("getOrCreateTable","table",t);let i="/v1/tables/{table}".replace("{table}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"POST",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},getOrCreateUser:async(t,n={})=>{let r="/v1/chat/users/get-or-create",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},getOrSetState:async(t,n,r,i,o={})=>{ce("getOrSetState","type",t),ce("getOrSetState","id",n),ce("getOrSetState","name",r);let a="/v1/chat/states/{type}/{id}/{name}/get-or-set".replace("{type}",encodeURIComponent(String(t))).replace("{id}",encodeURIComponent(String(n))).replace("{name}",encodeURIComponent(String(r))),s=new URL(a,ee),l;e&&(l=e.baseOptions);let c={method:"POST",...l,...o},u={},d={};u["Content-Type"]="application/json",te(s,d);let p=l&&l.headers?l.headers:{};return c.headers={...u,...p,...o.headers},c.data=Ye(i,c,e),{url:ne(s),options:c}},getParticipant:async(t,n,r={})=>{ce("getParticipant","id",t),ce("getParticipant","userId",n);let i="/v1/chat/conversations/{id}/participants/{userId}".replace("{id}",encodeURIComponent(String(t))).replace("{userId}",encodeURIComponent(String(n))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...r},l={};te(o,{});let c=a&&a.headers?a.headers:{};return s.headers={...l,...c,...r.headers},{url:ne(o),options:s}},getPublicIntegration:async(t,n,r={})=>{ce("getPublicIntegration","name",t),ce("getPublicIntegration","version",n);let i="/v1/admin/hub/integrations/{name}/{version}".replace("{name}",encodeURIComponent(String(t))).replace("{version}",encodeURIComponent(String(n))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...r},l={};te(o,{});let c=a&&a.headers?a.headers:{};return s.headers={...l,...c,...r.headers},{url:ne(o),options:s}},getPublicIntegrationById:async(t,n={})=>{ce("getPublicIntegrationById","id",t);let r="/v1/admin/hub/integrations/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},getPublicWorkspace:async(t,n={})=>{ce("getPublicWorkspace","id",t);let r="/v1/admin/workspaces/{id}/public".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},getState:async(t,n,r,i={})=>{ce("getState","type",t),ce("getState","id",n),ce("getState","name",r);let o="/v1/chat/states/{type}/{id}/{name}".replace("{type}",encodeURIComponent(String(t))).replace("{id}",encodeURIComponent(String(n))).replace("{name}",encodeURIComponent(String(r))),a=new URL(o,ee),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...i},c={};te(a,{});let u=s&&s.headers?s.headers:{};return l.headers={...c,...u,...i.headers},{url:ne(a),options:l}},getTable:async(t,n={})=>{ce("getTable","table",t);let r="/v1/tables/{table}".replace("{table}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},getTableRow:async(t,n,r={})=>{ce("getTableRow","table",t),ce("getTableRow","id",n);let i="/v1/tables/{table}/row".replace("{table}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...r},l={},c={};n!==void 0&&(c.id=n),te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},{url:ne(o),options:s}},getTask:async(t,n={})=>{ce("getTask","id",t);let r="/v1/chat/tasks/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},getUpcomingInvoice:async(t,n={})=>{ce("getUpcomingInvoice","id",t);let r="/v1/admin/workspaces/{id}/billing/upcoming-invoice".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},getUsage:async(t,n,r,i={})=>{ce("getUsage","type",t),ce("getUsage","id",n);let o="/v1/admin/usages/{id}".replace("{id}",encodeURIComponent(String(n))),a=new URL(o,ee),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...i},c={},u={};t!==void 0&&(u.type=t),r!==void 0&&(u.period=r),te(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...i.headers},{url:ne(a),options:l}},getUser:async(t,n={})=>{ce("getUser","id",t);let r="/v1/chat/users/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},getWorkspace:async(t,n={})=>{ce("getWorkspace","id",t);let r="/v1/admin/workspaces/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},getWorkspaceQuota:async(t,n,r,i={})=>{ce("getWorkspaceQuota","id",t),ce("getWorkspaceQuota","type",n);let o="/v1/admin/workspaces/{id}/quota".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,ee),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...i},c={},u={};n!==void 0&&(u.type=n),r!==void 0&&(u.period=r),te(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...i.headers},{url:ne(a),options:l}},introspect:async(t,n={})=>{let r="/v1/admin/introspect",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},listActivities:async(t,n,r,i={})=>{ce("listActivities","taskId",t),ce("listActivities","botId",n);let o="/v1/admin/activities",a=new URL(o,ee),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...i},c={},u={};r!==void 0&&(u.nextToken=r),t!==void 0&&(u.taskId=t),n!==void 0&&(u.botId=n),te(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...i.headers},{url:ne(a),options:l}},listBotIssueEvents:async(t,n,r={})=>{ce("listBotIssueEvents","id",t),ce("listBotIssueEvents","issueId",n);let i="/v1/admin/bots/{id}/issues/{issueId}/events".replace("{id}",encodeURIComponent(String(t))).replace("{issueId}",encodeURIComponent(String(n))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...r},l={};te(o,{});let c=a&&a.headers?a.headers:{};return s.headers={...l,...c,...r.headers},{url:ne(o),options:s}},listBotIssues:async(t,n,r={})=>{ce("listBotIssues","id",t);let i="/v1/admin/bots/{id}/issues".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...r},l={},c={};n!==void 0&&(c.nextToken=n),te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},{url:ne(o),options:s}},listBots:async(t,n,r={})=>{let i="/v1/admin/bots",o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...r},l={},c={};t!==void 0&&(c.dev=t),n!==void 0&&(c.nextToken=n),te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},{url:ne(o),options:s}},listConversations:async(t,n,r,i={})=>{let o="/v1/chat/conversations",a=new URL(o,ee),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...i},c={},u={};t!==void 0&&(u.nextToken=t),n!==void 0&&(u.tags=n),r&&(u.participantIds=r),te(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...i.headers},{url:ne(a),options:l}},listEvents:async(t,n,r,i,o,a,s={})=>{let l="/v1/chat/events",c=new URL(l,ee),u;e&&(u=e.baseOptions);let d={method:"GET",...u,...s},p={},f={};t!==void 0&&(f.nextToken=t),n!==void 0&&(f.type=n),r!==void 0&&(f.conversationId=r),i!==void 0&&(f.userId=i),o!==void 0&&(f.messageId=o),a!==void 0&&(f.status=a),te(c,f);let h=u&&u.headers?u.headers:{};return d.headers={...p,...h,...s.headers},{url:ne(c),options:d}},listFiles:async(t,n,r,i={})=>{ce("listFiles","botId",t);let o="/v1/files/bot/{botId}".replace("{botId}",encodeURIComponent(String(t))),a=new URL(o,ee),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...i},c={},u={};n!==void 0&&(u.nextToken=n),r!==void 0&&(u.tags=r),te(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...i.headers},{url:ne(a),options:l}},listIntegrationApiKeys:async(t,n={})=>{ce("listIntegrationApiKeys","integrationId",t);let r="/v1/admin/integrations/iaks",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={},l={};t!==void 0&&(l.integrationId=t),te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},{url:ne(i),options:a}},listIntegrations:async(t,n,r,i,o={})=>{let a="/v1/admin/integrations",s=new URL(a,ee),l;e&&(l=e.baseOptions);let c={method:"GET",...l,...o},u={},d={};t!==void 0&&(d.nextToken=t),n!==void 0&&(d.name=n),r!==void 0&&(d.version=r),i!==void 0&&(d.dev=i),te(s,d);let p=l&&l.headers?l.headers:{};return c.headers={...u,...p,...o.headers},{url:ne(s),options:c}},listMessages:async(t,n,r,i={})=>{let o="/v1/chat/messages",a=new URL(o,ee),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...i},c={},u={};t!==void 0&&(u.nextToken=t),n!==void 0&&(u.conversationId=n),r!==void 0&&(u.tags=r),te(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...i.headers},{url:ne(a),options:l}},listParticipants:async(t,n,r={})=>{ce("listParticipants","id",t);let i="/v1/chat/conversations/{id}/participants".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...r},l={},c={};n!==void 0&&(c.nextToken=n),te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},{url:ne(o),options:s}},listPersonalAccessTokens:async(t={})=>{let n="/v1/admin/account/pats",r=new URL(n,ee),i;e&&(i=e.baseOptions);let o={method:"GET",...i,...t},a={};te(r,{});let s=i&&i.headers?i.headers:{};return o.headers={...a,...s,...t.headers},{url:ne(r),options:o}},listPublicIntegrations:async(t,n,r,i={})=>{let o="/v1/admin/hub/integrations",a=new URL(o,ee),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...i},c={},u={};t!==void 0&&(u.nextToken=t),n!==void 0&&(u.name=n),r!==void 0&&(u.version=r),te(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...i.headers},{url:ne(a),options:l}},listTables:async(t,n={})=>{let r="/v1/tables",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={},l={};t!==void 0&&(l.tags=t),te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},{url:ne(i),options:a}},listTasks:async(t,n,r,i,o,a,s,l={})=>{let c="/v1/chat/tasks",u=new URL(c,ee),d;e&&(d=e.baseOptions);let p={method:"GET",...d,...l},f={},h={};t!==void 0&&(h.nextToken=t),n!==void 0&&(h.tags=n),r!==void 0&&(h.conversationId=r),i!==void 0&&(h.userId=i),o!==void 0&&(h.parentTaskId=o),a&&(h.status=a),s!==void 0&&(h.type=s),te(u,h);let m=d&&d.headers?d.headers:{};return p.headers={...f,...m,...l.headers},{url:ne(u),options:p}},listUsageHistory:async(t,n,r={})=>{ce("listUsageHistory","type",t),ce("listUsageHistory","id",n);let i="/v1/admin/usages/{id}/history".replace("{id}",encodeURIComponent(String(n))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...r},l={},c={};t!==void 0&&(c.type=t),te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},{url:ne(o),options:s}},listUsers:async(t,n,r,i={})=>{let o="/v1/chat/users",a=new URL(o,ee),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...i},c={},u={};t!==void 0&&(u.nextToken=t),n!==void 0&&(u.conversationId=n),r!==void 0&&(u.tags=r),te(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...i.headers},{url:ne(a),options:l}},listWorkspaceInvoices:async(t,n={})=>{ce("listWorkspaceInvoices","id",t);let r="/v1/admin/workspaces/{id}/billing/invoices".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},listWorkspaceMembers:async(t,n={})=>{let r="/v1/admin/workspace-members",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={},l={};t!==void 0&&(l.nextToken=t),te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},{url:ne(i),options:a}},listWorkspaceQuotas:async(t,n,r={})=>{ce("listWorkspaceQuotas","id",t);let i="/v1/admin/workspaces/{id}/quotas".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...r},l={},c={};n!==void 0&&(c.period=n),te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},{url:ne(o),options:s}},listWorkspaceUsages:async(t,n,r,i={})=>{ce("listWorkspaceUsages","id",t),ce("listWorkspaceUsages","type",n);let o="/v1/admin/workspaces/{id}/usages".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,ee),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...i},c={},u={};n!==void 0&&(u.type=n),r!==void 0&&(u.period=r),te(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...i.headers},{url:ne(a),options:l}},listWorkspaces:async(t,n={})=>{let r="/v1/admin/workspaces",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={},l={};t!==void 0&&(l.nextToken=t),te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},{url:ne(i),options:a}},patchState:async(t,n,r,i,o={})=>{ce("patchState","type",t),ce("patchState","id",n),ce("patchState","name",r);let a="/v1/chat/states/{type}/{id}/{name}".replace("{type}",encodeURIComponent(String(t))).replace("{id}",encodeURIComponent(String(n))).replace("{name}",encodeURIComponent(String(r))),s=new URL(a,ee),l;e&&(l=e.baseOptions);let c={method:"PATCH",...l,...o},u={},d={};u["Content-Type"]="application/json",te(s,d);let p=l&&l.headers?l.headers:{};return c.headers={...u,...p,...o.headers},c.data=Ye(i,c,e),{url:ne(s),options:c}},removeParticipant:async(t,n,r={})=>{ce("removeParticipant","id",t),ce("removeParticipant","userId",n);let i="/v1/chat/conversations/{id}/participants/{userId}".replace("{id}",encodeURIComponent(String(t))).replace("{userId}",encodeURIComponent(String(n))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"DELETE",...a,...r},l={};te(o,{});let c=a&&a.headers?a.headers:{};return s.headers={...l,...c,...r.headers},{url:ne(o),options:s}},renameTableColumn:async(t,n,r={})=>{ce("renameTableColumn","table",t);let i="/v1/tables/{table}/column".replace("{table}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},runVrl:async(t,n={})=>{let r="/v1/admin/helper/vrl",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},searchFiles:async(t,n,r,i,o,a={})=>{ce("searchFiles","botId",t),ce("searchFiles","query",n);let s="/v1/files/bot/{botId}/search".replace("{botId}",encodeURIComponent(String(t))),l=new URL(s,ee),c;e&&(c=e.baseOptions);let u={method:"GET",...c,...a},d={},p={};r!==void 0&&(p.tags=r),n!==void 0&&(p.query=n),i!==void 0&&(p.contextDepth=i),o!==void 0&&(p.limit=o),te(l,p);let f=c&&c.headers?c.headers:{};return u.headers={...d,...f,...a.headers},{url:ne(l),options:u}},setAccountPreference:async(t,n,r={})=>{ce("setAccountPreference","key",t);let i="/v1/admin/account/preferences/{key}".replace("{key}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"POST",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},setState:async(t,n,r,i,o={})=>{ce("setState","type",t),ce("setState","id",n),ce("setState","name",r);let a="/v1/chat/states/{type}/{id}/{name}".replace("{type}",encodeURIComponent(String(t))).replace("{id}",encodeURIComponent(String(n))).replace("{name}",encodeURIComponent(String(r))),s=new URL(a,ee),l;e&&(l=e.baseOptions);let c={method:"POST",...l,...o},u={},d={};u["Content-Type"]="application/json",te(s,d);let p=l&&l.headers?l.headers:{};return c.headers={...u,...p,...o.headers},c.data=Ye(i,c,e),{url:ne(s),options:c}},setWorkspacePaymentMethod:async(t,n,r={})=>{ce("setWorkspacePaymentMethod","id",t);let i="/v1/admin/workspaces/{id}/billing/payment-method".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},trackAnalytics:async(t,n={})=>{let r="/v1/chat/analytics",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},transferBot:async(t,n,r={})=>{ce("transferBot","id",t);let i="/v1/admin/bots/{id}/transfer".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"POST",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},updateAccount:async(t,n={})=>{let r="/v1/admin/account/me",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"PUT",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},updateBot:async(t,n,r={})=>{ce("updateBot","id",t);let i="/v1/admin/bots/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},updateConversation:async(t,n,r={})=>{ce("updateConversation","id",t);let i="/v1/chat/conversations/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},updateFileMetadata:async(t,n,r={})=>{ce("updateFileMetadata","id",t);let i="/v1/files/{id}/metadata".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},updateIntegration:async(t,n,r={})=>{ce("updateIntegration","id",t);let i="/v1/admin/integrations/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},updateMessage:async(t,n,r={})=>{ce("updateMessage","id",t);let i="/v1/chat/messages/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},updateTable:async(t,n,r={})=>{ce("updateTable","table",t);let i="/v1/tables/{table}".replace("{table}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},updateTableRows:async(t,n,r={})=>{ce("updateTableRows","table",t);let i="/v1/tables/{table}/rows".replace("{table}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},updateTask:async(t,n,r={})=>{ce("updateTask","id",t);let i="/v1/chat/tasks/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},updateUser:async(t,n,r={})=>{ce("updateUser","id",t);let i="/v1/chat/users/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},updateWorkspace:async(t,n,r={})=>{ce("updateWorkspace","id",t);let i="/v1/admin/workspaces/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},updateWorkspaceMember:async(t,n,r={})=>{ce("updateWorkspaceMember","id",t);let i="/v1/admin/workspace-members/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},upsertTableRows:async(t,n,r={})=>{ce("upsertTableRows","table",t);let i="/v1/tables/{table}/rows/upsert".replace("{table}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"POST",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}}}},ie=function(e){let t=loe(e);return{async addParticipant(n,r,i){let o=await t.addParticipant(n,r,i);return re(o,J,Q,e)},async breakDownWorkspaceUsageByBot(n,r,i,o){let a=await t.breakDownWorkspaceUsageByBot(n,r,i,o);return re(a,J,Q,e)},async callAction(n,r){let i=await t.callAction(n,r);return re(i,J,Q,e)},async changeAISpendQuota(n,r){let i=await t.changeAISpendQuota(n,r);return re(i,J,Q,e)},async chargeWorkspaceUnpaidInvoices(n,r,i){let o=await t.chargeWorkspaceUnpaidInvoices(n,r,i);return re(o,J,Q,e)},async checkHandleAvailability(n,r){let i=await t.checkHandleAvailability(n,r);return re(i,J,Q,e)},async configureIntegration(n,r){let i=await t.configureIntegration(n,r);return re(i,J,Q,e)},async createBot(n,r){let i=await t.createBot(n,r);return re(i,J,Q,e)},async createConversation(n,r){let i=await t.createConversation(n,r);return re(i,J,Q,e)},async createEvent(n,r){let i=await t.createEvent(n,r);return re(i,J,Q,e)},async createFile(n,r){let i=await t.createFile(n,r);return re(i,J,Q,e)},async createIntegration(n,r){let i=await t.createIntegration(n,r);return re(i,J,Q,e)},async createIntegrationApiKey(n,r){let i=await t.createIntegrationApiKey(n,r);return re(i,J,Q,e)},async createMessage(n,r){let i=await t.createMessage(n,r);return re(i,J,Q,e)},async createPersonalAccessToken(n,r){let i=await t.createPersonalAccessToken(n,r);return re(i,J,Q,e)},async createTable(n,r){let i=await t.createTable(n,r);return re(i,J,Q,e)},async createTableRows(n,r,i){let o=await t.createTableRows(n,r,i);return re(o,J,Q,e)},async createTask(n,r){let i=await t.createTask(n,r);return re(i,J,Q,e)},async createUser(n,r){let i=await t.createUser(n,r);return re(i,J,Q,e)},async createWorkspace(n,r){let i=await t.createWorkspace(n,r);return re(i,J,Q,e)},async createWorkspaceMember(n,r){let i=await t.createWorkspaceMember(n,r);return re(i,J,Q,e)},async deleteBot(n,r){let i=await t.deleteBot(n,r);return re(i,J,Q,e)},async deleteBotIssue(n,r,i){let o=await t.deleteBotIssue(n,r,i);return re(o,J,Q,e)},async deleteConversation(n,r){let i=await t.deleteConversation(n,r);return re(i,J,Q,e)},async deleteFile(n,r){let i=await t.deleteFile(n,r);return re(i,J,Q,e)},async deleteIntegration(n,r){let i=await t.deleteIntegration(n,r);return re(i,J,Q,e)},async deleteIntegrationApiKey(n,r){let i=await t.deleteIntegrationApiKey(n,r);return re(i,J,Q,e)},async deleteMessage(n,r){let i=await t.deleteMessage(n,r);return re(i,J,Q,e)},async deletePersonalAccessToken(n,r){let i=await t.deletePersonalAccessToken(n,r);return re(i,J,Q,e)},async deleteTable(n,r){let i=await t.deleteTable(n,r);return re(i,J,Q,e)},async deleteTableRows(n,r,i){let o=await t.deleteTableRows(n,r,i);return re(o,J,Q,e)},async deleteTask(n,r){let i=await t.deleteTask(n,r);return re(i,J,Q,e)},async deleteUser(n,r){let i=await t.deleteUser(n,r);return re(i,J,Q,e)},async deleteWorkspace(n,r){let i=await t.deleteWorkspace(n,r);return re(i,J,Q,e)},async deleteWorkspaceMember(n,r){let i=await t.deleteWorkspaceMember(n,r);return re(i,J,Q,e)},async duplicateTable(n,r,i){let o=await t.duplicateTable(n,r,i);return re(o,J,Q,e)},async findTableRows(n,r,i){let o=await t.findTableRows(n,r,i);return re(o,J,Q,e)},async getAccount(n){let r=await t.getAccount(n);return re(r,J,Q,e)},async getAccountPreference(n,r){let i=await t.getAccountPreference(n,r);return re(i,J,Q,e)},async getAllWorkspaceQuotaCompletion(n){let r=await t.getAllWorkspaceQuotaCompletion(n);return re(r,J,Q,e)},async getAuditRecords(n,r,i){let o=await t.getAuditRecords(n,r,i);return re(o,J,Q,e)},async getBot(n,r){let i=await t.getBot(n,r);return re(i,J,Q,e)},async getBotAnalytics(n,r,i,o){let a=await t.getBotAnalytics(n,r,i,o);return re(a,J,Q,e)},async getBotLogs(n,r,i,o,a){let s=await t.getBotLogs(n,r,i,o,a);return re(s,J,Q,e)},async getBotWebchat(n,r,i){let o=await t.getBotWebchat(n,r,i);return re(o,J,Q,e)},async getConversation(n,r){let i=await t.getConversation(n,r);return re(i,J,Q,e)},async getEvent(n,r){let i=await t.getEvent(n,r);return re(i,J,Q,e)},async getFileContent(n,r){let i=await t.getFileContent(n,r);return re(i,J,Q,e)},async getFileMetadata(n,r){let i=await t.getFileMetadata(n,r);return re(i,J,Q,e)},async getIntegration(n,r){let i=await t.getIntegration(n,r);return re(i,J,Q,e)},async getIntegrationByName(n,r,i){let o=await t.getIntegrationByName(n,r,i);return re(o,J,Q,e)},async getIntegrationLogs(n,r,i,o,a){let s=await t.getIntegrationLogs(n,r,i,o,a);return re(s,J,Q,e)},async getMessage(n,r){let i=await t.getMessage(n,r);return re(i,J,Q,e)},async getOrCreateConversation(n,r){let i=await t.getOrCreateConversation(n,r);return re(i,J,Q,e)},async getOrCreateMessage(n,r){let i=await t.getOrCreateMessage(n,r);return re(i,J,Q,e)},async getOrCreateTable(n,r,i){let o=await t.getOrCreateTable(n,r,i);return re(o,J,Q,e)},async getOrCreateUser(n,r){let i=await t.getOrCreateUser(n,r);return re(i,J,Q,e)},async getOrSetState(n,r,i,o,a){let s=await t.getOrSetState(n,r,i,o,a);return re(s,J,Q,e)},async getParticipant(n,r,i){let o=await t.getParticipant(n,r,i);return re(o,J,Q,e)},async getPublicIntegration(n,r,i){let o=await t.getPublicIntegration(n,r,i);return re(o,J,Q,e)},async getPublicIntegrationById(n,r){let i=await t.getPublicIntegrationById(n,r);return re(i,J,Q,e)},async getPublicWorkspace(n,r){let i=await t.getPublicWorkspace(n,r);return re(i,J,Q,e)},async getState(n,r,i,o){let a=await t.getState(n,r,i,o);return re(a,J,Q,e)},async getTable(n,r){let i=await t.getTable(n,r);return re(i,J,Q,e)},async getTableRow(n,r,i){let o=await t.getTableRow(n,r,i);return re(o,J,Q,e)},async getTask(n,r){let i=await t.getTask(n,r);return re(i,J,Q,e)},async getUpcomingInvoice(n,r){let i=await t.getUpcomingInvoice(n,r);return re(i,J,Q,e)},async getUsage(n,r,i,o){let a=await t.getUsage(n,r,i,o);return re(a,J,Q,e)},async getUser(n,r){let i=await t.getUser(n,r);return re(i,J,Q,e)},async getWorkspace(n,r){let i=await t.getWorkspace(n,r);return re(i,J,Q,e)},async getWorkspaceQuota(n,r,i,o){let a=await t.getWorkspaceQuota(n,r,i,o);return re(a,J,Q,e)},async introspect(n,r){let i=await t.introspect(n,r);return re(i,J,Q,e)},async listActivities(n,r,i,o){let a=await t.listActivities(n,r,i,o);return re(a,J,Q,e)},async listBotIssueEvents(n,r,i){let o=await t.listBotIssueEvents(n,r,i);return re(o,J,Q,e)},async listBotIssues(n,r,i){let o=await t.listBotIssues(n,r,i);return re(o,J,Q,e)},async listBots(n,r,i){let o=await t.listBots(n,r,i);return re(o,J,Q,e)},async listConversations(n,r,i,o){let a=await t.listConversations(n,r,i,o);return re(a,J,Q,e)},async listEvents(n,r,i,o,a,s,l){let c=await t.listEvents(n,r,i,o,a,s,l);return re(c,J,Q,e)},async listFiles(n,r,i,o){let a=await t.listFiles(n,r,i,o);return re(a,J,Q,e)},async listIntegrationApiKeys(n,r){let i=await t.listIntegrationApiKeys(n,r);return re(i,J,Q,e)},async listIntegrations(n,r,i,o,a){let s=await t.listIntegrations(n,r,i,o,a);return re(s,J,Q,e)},async listMessages(n,r,i,o){let a=await t.listMessages(n,r,i,o);return re(a,J,Q,e)},async listParticipants(n,r,i){let o=await t.listParticipants(n,r,i);return re(o,J,Q,e)},async listPersonalAccessTokens(n){let r=await t.listPersonalAccessTokens(n);return re(r,J,Q,e)},async listPublicIntegrations(n,r,i,o){let a=await t.listPublicIntegrations(n,r,i,o);return re(a,J,Q,e)},async listTables(n,r){let i=await t.listTables(n,r);return re(i,J,Q,e)},async listTasks(n,r,i,o,a,s,l,c){let u=await t.listTasks(n,r,i,o,a,s,l,c);return re(u,J,Q,e)},async listUsageHistory(n,r,i){let o=await t.listUsageHistory(n,r,i);return re(o,J,Q,e)},async listUsers(n,r,i,o){let a=await t.listUsers(n,r,i,o);return re(a,J,Q,e)},async listWorkspaceInvoices(n,r){let i=await t.listWorkspaceInvoices(n,r);return re(i,J,Q,e)},async listWorkspaceMembers(n,r){let i=await t.listWorkspaceMembers(n,r);return re(i,J,Q,e)},async listWorkspaceQuotas(n,r,i){let o=await t.listWorkspaceQuotas(n,r,i);return re(o,J,Q,e)},async listWorkspaceUsages(n,r,i,o){let a=await t.listWorkspaceUsages(n,r,i,o);return re(a,J,Q,e)},async listWorkspaces(n,r){let i=await t.listWorkspaces(n,r);return re(i,J,Q,e)},async patchState(n,r,i,o,a){let s=await t.patchState(n,r,i,o,a);return re(s,J,Q,e)},async removeParticipant(n,r,i){let o=await t.removeParticipant(n,r,i);return re(o,J,Q,e)},async renameTableColumn(n,r,i){let o=await t.renameTableColumn(n,r,i);return re(o,J,Q,e)},async runVrl(n,r){let i=await t.runVrl(n,r);return re(i,J,Q,e)},async searchFiles(n,r,i,o,a,s){let l=await t.searchFiles(n,r,i,o,a,s);return re(l,J,Q,e)},async setAccountPreference(n,r,i){let o=await t.setAccountPreference(n,r,i);return re(o,J,Q,e)},async setState(n,r,i,o,a){let s=await t.setState(n,r,i,o,a);return re(s,J,Q,e)},async setWorkspacePaymentMethod(n,r,i){let o=await t.setWorkspacePaymentMethod(n,r,i);return re(o,J,Q,e)},async trackAnalytics(n,r){let i=await t.trackAnalytics(n,r);return re(i,J,Q,e)},async transferBot(n,r,i){let o=await t.transferBot(n,r,i);return re(o,J,Q,e)},async updateAccount(n,r){let i=await t.updateAccount(n,r);return re(i,J,Q,e)},async updateBot(n,r,i){let o=await t.updateBot(n,r,i);return re(o,J,Q,e)},async updateConversation(n,r,i){let o=await t.updateConversation(n,r,i);return re(o,J,Q,e)},async updateFileMetadata(n,r,i){let o=await t.updateFileMetadata(n,r,i);return re(o,J,Q,e)},async updateIntegration(n,r,i){let o=await t.updateIntegration(n,r,i);return re(o,J,Q,e)},async updateMessage(n,r,i){let o=await t.updateMessage(n,r,i);return re(o,J,Q,e)},async updateTable(n,r,i){let o=await t.updateTable(n,r,i);return re(o,J,Q,e)},async updateTableRows(n,r,i){let o=await t.updateTableRows(n,r,i);return re(o,J,Q,e)},async updateTask(n,r,i){let o=await t.updateTask(n,r,i);return re(o,J,Q,e)},async updateUser(n,r,i){let o=await t.updateUser(n,r,i);return re(o,J,Q,e)},async updateWorkspace(n,r,i){let o=await t.updateWorkspace(n,r,i);return re(o,J,Q,e)},async updateWorkspaceMember(n,r,i){let o=await t.updateWorkspaceMember(n,r,i);return re(o,J,Q,e)},async upsertTableRows(n,r,i){let o=await t.upsertTableRows(n,r,i);return re(o,J,Q,e)}}},coe=class extends aoe{addParticipant(e,t){return ie(this.configuration).addParticipant(e.id,e.addParticipantBody,t).then(n=>n(this.axios,this.basePath))}breakDownWorkspaceUsageByBot(e,t){return ie(this.configuration).breakDownWorkspaceUsageByBot(e.id,e.type,e.period,t).then(n=>n(this.axios,this.basePath))}callAction(e={},t){return ie(this.configuration).callAction(e.callActionBody,t).then(n=>n(this.axios,this.basePath))}changeAISpendQuota(e={},t){return ie(this.configuration).changeAISpendQuota(e.changeAISpendQuotaBody,t).then(n=>n(this.axios,this.basePath))}chargeWorkspaceUnpaidInvoices(e,t){return ie(this.configuration).chargeWorkspaceUnpaidInvoices(e.id,e.chargeWorkspaceUnpaidInvoicesBody,t).then(n=>n(this.axios,this.basePath))}checkHandleAvailability(e={},t){return ie(this.configuration).checkHandleAvailability(e.checkHandleAvailabilityBody,t).then(n=>n(this.axios,this.basePath))}configureIntegration(e={},t){return ie(this.configuration).configureIntegration(e.configureIntegrationBody,t).then(n=>n(this.axios,this.basePath))}createBot(e={},t){return ie(this.configuration).createBot(e.createBotBody,t).then(n=>n(this.axios,this.basePath))}createConversation(e={},t){return ie(this.configuration).createConversation(e.createConversationBody,t).then(n=>n(this.axios,this.basePath))}createEvent(e={},t){return ie(this.configuration).createEvent(e.createEventBody,t).then(n=>n(this.axios,this.basePath))}createFile(e={},t){return ie(this.configuration).createFile(e.createFileBody,t).then(n=>n(this.axios,this.basePath))}createIntegration(e={},t){return ie(this.configuration).createIntegration(e.createIntegrationBody,t).then(n=>n(this.axios,this.basePath))}createIntegrationApiKey(e={},t){return ie(this.configuration).createIntegrationApiKey(e.createIntegrationApiKeyBody,t).then(n=>n(this.axios,this.basePath))}createMessage(e={},t){return ie(this.configuration).createMessage(e.createMessageBody,t).then(n=>n(this.axios,this.basePath))}createPersonalAccessToken(e={},t){return ie(this.configuration).createPersonalAccessToken(e.createPersonalAccessTokenBody,t).then(n=>n(this.axios,this.basePath))}createTable(e={},t){return ie(this.configuration).createTable(e.createTableBody,t).then(n=>n(this.axios,this.basePath))}createTableRows(e,t){return ie(this.configuration).createTableRows(e.table,e.createTableRowsBody,t).then(n=>n(this.axios,this.basePath))}createTask(e={},t){return ie(this.configuration).createTask(e.createTaskBody,t).then(n=>n(this.axios,this.basePath))}createUser(e={},t){return ie(this.configuration).createUser(e.createUserBody,t).then(n=>n(this.axios,this.basePath))}createWorkspace(e={},t){return ie(this.configuration).createWorkspace(e.createWorkspaceBody,t).then(n=>n(this.axios,this.basePath))}createWorkspaceMember(e={},t){return ie(this.configuration).createWorkspaceMember(e.createWorkspaceMemberBody,t).then(n=>n(this.axios,this.basePath))}deleteBot(e,t){return ie(this.configuration).deleteBot(e.id,t).then(n=>n(this.axios,this.basePath))}deleteBotIssue(e,t){return ie(this.configuration).deleteBotIssue(e.id,e.issueId,t).then(n=>n(this.axios,this.basePath))}deleteConversation(e,t){return ie(this.configuration).deleteConversation(e.id,t).then(n=>n(this.axios,this.basePath))}deleteFile(e,t){return ie(this.configuration).deleteFile(e.id,t).then(n=>n(this.axios,this.basePath))}deleteIntegration(e,t){return ie(this.configuration).deleteIntegration(e.id,t).then(n=>n(this.axios,this.basePath))}deleteIntegrationApiKey(e,t){return ie(this.configuration).deleteIntegrationApiKey(e.id,t).then(n=>n(this.axios,this.basePath))}deleteMessage(e,t){return ie(this.configuration).deleteMessage(e.id,t).then(n=>n(this.axios,this.basePath))}deletePersonalAccessToken(e,t){return ie(this.configuration).deletePersonalAccessToken(e.id,t).then(n=>n(this.axios,this.basePath))}deleteTable(e,t){return ie(this.configuration).deleteTable(e.table,t).then(n=>n(this.axios,this.basePath))}deleteTableRows(e,t){return ie(this.configuration).deleteTableRows(e.table,e.deleteTableRowsBody,t).then(n=>n(this.axios,this.basePath))}deleteTask(e,t){return ie(this.configuration).deleteTask(e.id,t).then(n=>n(this.axios,this.basePath))}deleteUser(e,t){return ie(this.configuration).deleteUser(e.id,t).then(n=>n(this.axios,this.basePath))}deleteWorkspace(e,t){return ie(this.configuration).deleteWorkspace(e.id,t).then(n=>n(this.axios,this.basePath))}deleteWorkspaceMember(e,t){return ie(this.configuration).deleteWorkspaceMember(e.id,t).then(n=>n(this.axios,this.basePath))}duplicateTable(e,t){return ie(this.configuration).duplicateTable(e.sourceTableId,e.duplicateTableBody,t).then(n=>n(this.axios,this.basePath))}findTableRows(e,t){return ie(this.configuration).findTableRows(e.table,e.findTableRowsBody,t).then(n=>n(this.axios,this.basePath))}getAccount(e){return ie(this.configuration).getAccount(e).then(t=>t(this.axios,this.basePath))}getAccountPreference(e,t){return ie(this.configuration).getAccountPreference(e.key,t).then(n=>n(this.axios,this.basePath))}getAllWorkspaceQuotaCompletion(e){return ie(this.configuration).getAllWorkspaceQuotaCompletion(e).then(t=>t(this.axios,this.basePath))}getAuditRecords(e,t){return ie(this.configuration).getAuditRecords(e.id,e.nextToken,t).then(n=>n(this.axios,this.basePath))}getBot(e,t){return ie(this.configuration).getBot(e.id,t).then(n=>n(this.axios,this.basePath))}getBotAnalytics(e,t){return ie(this.configuration).getBotAnalytics(e.id,e.startDate,e.endDate,t).then(n=>n(this.axios,this.basePath))}getBotLogs(e,t){return ie(this.configuration).getBotLogs(e.id,e.timeStart,e.timeEnd,e.nextToken,t).then(n=>n(this.axios,this.basePath))}getBotWebchat(e,t){return ie(this.configuration).getBotWebchat(e.id,e.type,t).then(n=>n(this.axios,this.basePath))}getConversation(e,t){return ie(this.configuration).getConversation(e.id,t).then(n=>n(this.axios,this.basePath))}getEvent(e,t){return ie(this.configuration).getEvent(e.id,t).then(n=>n(this.axios,this.basePath))}getFileContent(e,t){return ie(this.configuration).getFileContent(e.id,t).then(n=>n(this.axios,this.basePath))}getFileMetadata(e,t){return ie(this.configuration).getFileMetadata(e.id,t).then(n=>n(this.axios,this.basePath))}getIntegration(e,t){return ie(this.configuration).getIntegration(e.id,t).then(n=>n(this.axios,this.basePath))}getIntegrationByName(e,t){return ie(this.configuration).getIntegrationByName(e.name,e.version,t).then(n=>n(this.axios,this.basePath))}getIntegrationLogs(e,t){return ie(this.configuration).getIntegrationLogs(e.id,e.timeStart,e.timeEnd,e.nextToken,t).then(n=>n(this.axios,this.basePath))}getMessage(e,t){return ie(this.configuration).getMessage(e.id,t).then(n=>n(this.axios,this.basePath))}getOrCreateConversation(e={},t){return ie(this.configuration).getOrCreateConversation(e.getOrCreateConversationBody,t).then(n=>n(this.axios,this.basePath))}getOrCreateMessage(e={},t){return ie(this.configuration).getOrCreateMessage(e.getOrCreateMessageBody,t).then(n=>n(this.axios,this.basePath))}getOrCreateTable(e,t){return ie(this.configuration).getOrCreateTable(e.table,e.getOrCreateTableBody,t).then(n=>n(this.axios,this.basePath))}getOrCreateUser(e={},t){return ie(this.configuration).getOrCreateUser(e.getOrCreateUserBody,t).then(n=>n(this.axios,this.basePath))}getOrSetState(e,t){return ie(this.configuration).getOrSetState(e.type,e.id,e.name,e.getOrSetStateBody,t).then(n=>n(this.axios,this.basePath))}getParticipant(e,t){return ie(this.configuration).getParticipant(e.id,e.userId,t).then(n=>n(this.axios,this.basePath))}getPublicIntegration(e,t){return ie(this.configuration).getPublicIntegration(e.name,e.version,t).then(n=>n(this.axios,this.basePath))}getPublicIntegrationById(e,t){return ie(this.configuration).getPublicIntegrationById(e.id,t).then(n=>n(this.axios,this.basePath))}getPublicWorkspace(e,t){return ie(this.configuration).getPublicWorkspace(e.id,t).then(n=>n(this.axios,this.basePath))}getState(e,t){return ie(this.configuration).getState(e.type,e.id,e.name,t).then(n=>n(this.axios,this.basePath))}getTable(e,t){return ie(this.configuration).getTable(e.table,t).then(n=>n(this.axios,this.basePath))}getTableRow(e,t){return ie(this.configuration).getTableRow(e.table,e.id,t).then(n=>n(this.axios,this.basePath))}getTask(e,t){return ie(this.configuration).getTask(e.id,t).then(n=>n(this.axios,this.basePath))}getUpcomingInvoice(e,t){return ie(this.configuration).getUpcomingInvoice(e.id,t).then(n=>n(this.axios,this.basePath))}getUsage(e,t){return ie(this.configuration).getUsage(e.type,e.id,e.period,t).then(n=>n(this.axios,this.basePath))}getUser(e,t){return ie(this.configuration).getUser(e.id,t).then(n=>n(this.axios,this.basePath))}getWorkspace(e,t){return ie(this.configuration).getWorkspace(e.id,t).then(n=>n(this.axios,this.basePath))}getWorkspaceQuota(e,t){return ie(this.configuration).getWorkspaceQuota(e.id,e.type,e.period,t).then(n=>n(this.axios,this.basePath))}introspect(e={},t){return ie(this.configuration).introspect(e.introspectBody,t).then(n=>n(this.axios,this.basePath))}listActivities(e,t){return ie(this.configuration).listActivities(e.taskId,e.botId,e.nextToken,t).then(n=>n(this.axios,this.basePath))}listBotIssueEvents(e,t){return ie(this.configuration).listBotIssueEvents(e.id,e.issueId,t).then(n=>n(this.axios,this.basePath))}listBotIssues(e,t){return ie(this.configuration).listBotIssues(e.id,e.nextToken,t).then(n=>n(this.axios,this.basePath))}listBots(e={},t){return ie(this.configuration).listBots(e.dev,e.nextToken,t).then(n=>n(this.axios,this.basePath))}listConversations(e={},t){return ie(this.configuration).listConversations(e.nextToken,e.tags,e.participantIds,t).then(n=>n(this.axios,this.basePath))}listEvents(e={},t){return ie(this.configuration).listEvents(e.nextToken,e.type,e.conversationId,e.userId,e.messageId,e.status,t).then(n=>n(this.axios,this.basePath))}listFiles(e,t){return ie(this.configuration).listFiles(e.botId,e.nextToken,e.tags,t).then(n=>n(this.axios,this.basePath))}listIntegrationApiKeys(e,t){return ie(this.configuration).listIntegrationApiKeys(e.integrationId,t).then(n=>n(this.axios,this.basePath))}listIntegrations(e={},t){return ie(this.configuration).listIntegrations(e.nextToken,e.name,e.version,e.dev,t).then(n=>n(this.axios,this.basePath))}listMessages(e={},t){return ie(this.configuration).listMessages(e.nextToken,e.conversationId,e.tags,t).then(n=>n(this.axios,this.basePath))}listParticipants(e,t){return ie(this.configuration).listParticipants(e.id,e.nextToken,t).then(n=>n(this.axios,this.basePath))}listPersonalAccessTokens(e){return ie(this.configuration).listPersonalAccessTokens(e).then(t=>t(this.axios,this.basePath))}listPublicIntegrations(e={},t){return ie(this.configuration).listPublicIntegrations(e.nextToken,e.name,e.version,t).then(n=>n(this.axios,this.basePath))}listTables(e={},t){return ie(this.configuration).listTables(e.tags,t).then(n=>n(this.axios,this.basePath))}listTasks(e={},t){return ie(this.configuration).listTasks(e.nextToken,e.tags,e.conversationId,e.userId,e.parentTaskId,e.status,e.type,t).then(n=>n(this.axios,this.basePath))}listUsageHistory(e,t){return ie(this.configuration).listUsageHistory(e.type,e.id,t).then(n=>n(this.axios,this.basePath))}listUsers(e={},t){return ie(this.configuration).listUsers(e.nextToken,e.conversationId,e.tags,t).then(n=>n(this.axios,this.basePath))}listWorkspaceInvoices(e,t){return ie(this.configuration).listWorkspaceInvoices(e.id,t).then(n=>n(this.axios,this.basePath))}listWorkspaceMembers(e={},t){return ie(this.configuration).listWorkspaceMembers(e.nextToken,t).then(n=>n(this.axios,this.basePath))}listWorkspaceQuotas(e,t){return ie(this.configuration).listWorkspaceQuotas(e.id,e.period,t).then(n=>n(this.axios,this.basePath))}listWorkspaceUsages(e,t){return ie(this.configuration).listWorkspaceUsages(e.id,e.type,e.period,t).then(n=>n(this.axios,this.basePath))}listWorkspaces(e={},t){return ie(this.configuration).listWorkspaces(e.nextToken,t).then(n=>n(this.axios,this.basePath))}patchState(e,t){return ie(this.configuration).patchState(e.type,e.id,e.name,e.patchStateBody,t).then(n=>n(this.axios,this.basePath))}removeParticipant(e,t){return ie(this.configuration).removeParticipant(e.id,e.userId,t).then(n=>n(this.axios,this.basePath))}renameTableColumn(e,t){return ie(this.configuration).renameTableColumn(e.table,e.renameTableColumnBody,t).then(n=>n(this.axios,this.basePath))}runVrl(e={},t){return ie(this.configuration).runVrl(e.runVrlBody,t).then(n=>n(this.axios,this.basePath))}searchFiles(e,t){return ie(this.configuration).searchFiles(e.botId,e.query,e.tags,e.contextDepth,e.limit,t).then(n=>n(this.axios,this.basePath))}setAccountPreference(e,t){return ie(this.configuration).setAccountPreference(e.key,e.setAccountPreferenceBody,t).then(n=>n(this.axios,this.basePath))}setState(e,t){return ie(this.configuration).setState(e.type,e.id,e.name,e.setStateBody,t).then(n=>n(this.axios,this.basePath))}setWorkspacePaymentMethod(e,t){return ie(this.configuration).setWorkspacePaymentMethod(e.id,e.setWorkspacePaymentMethodBody,t).then(n=>n(this.axios,this.basePath))}trackAnalytics(e={},t){return ie(this.configuration).trackAnalytics(e.trackAnalyticsBody,t).then(n=>n(this.axios,this.basePath))}transferBot(e,t){return ie(this.configuration).transferBot(e.id,e.transferBotBody,t).then(n=>n(this.axios,this.basePath))}updateAccount(e={},t){return ie(this.configuration).updateAccount(e.updateAccountBody,t).then(n=>n(this.axios,this.basePath))}updateBot(e,t){return ie(this.configuration).updateBot(e.id,e.updateBotBody,t).then(n=>n(this.axios,this.basePath))}updateConversation(e,t){return ie(this.configuration).updateConversation(e.id,e.updateConversationBody,t).then(n=>n(this.axios,this.basePath))}updateFileMetadata(e,t){return ie(this.configuration).updateFileMetadata(e.id,e.updateFileMetadataBody,t).then(n=>n(this.axios,this.basePath))}updateIntegration(e,t){return ie(this.configuration).updateIntegration(e.id,e.updateIntegrationBody,t).then(n=>n(this.axios,this.basePath))}updateMessage(e,t){return ie(this.configuration).updateMessage(e.id,e.updateMessageBody,t).then(n=>n(this.axios,this.basePath))}updateTable(e,t){return ie(this.configuration).updateTable(e.table,e.updateTableBody,t).then(n=>n(this.axios,this.basePath))}updateTableRows(e,t){return ie(this.configuration).updateTableRows(e.table,e.updateTableRowsBody,t).then(n=>n(this.axios,this.basePath))}updateTask(e,t){return ie(this.configuration).updateTask(e.id,e.updateTaskBody,t).then(n=>n(this.axios,this.basePath))}updateUser(e,t){return ie(this.configuration).updateUser(e.id,e.updateUserBody,t).then(n=>n(this.axios,this.basePath))}updateWorkspace(e,t){return ie(this.configuration).updateWorkspace(e.id,e.updateWorkspaceBody,t).then(n=>n(this.axios,this.basePath))}updateWorkspaceMember(e,t){return ie(this.configuration).updateWorkspaceMember(e.id,e.updateWorkspaceMemberBody,t).then(n=>n(this.axios,this.basePath))}upsertTableRows(e,t){return ie(this.configuration).upsertTableRows(e.table,e.upsertTableRowsBody,t).then(n=>n(this.axios,this.basePath))}},uoe={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},ry=typeof window<"u"&&typeof window.document<"u"?window.crypto:Ug;ry.getRandomValues||(ry=uoe);var Lt=class extends Error{constructor(t,n,r,i,o,a){super(i);T(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=Lt.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(ry.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"}},doe=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,GT=e=>e instanceof Lt||doe(e)&&e.isApiError===!0,ns=class extends Lt{constructor(e,t,n){super(500,"An unknown error occurred","Unknown",e,t,n)}},YT=class extends Lt{constructor(e,t,n){super(500,"An internal error occurred","Internal",e,t,n)}},JT=class extends Lt{constructor(e,t,n){super(401,"The request requires to be authenticated.","Unauthorized",e,t,n)}},XT=class extends Lt{constructor(e,t,n){super(403,"The requested action can't be peform by this resource.","Forbidden",e,t,n)}},QT=class extends Lt{constructor(e,t,n){super(413,"The request payload is too large.","PayloadTooLarge",e,t,n)}},ek=class extends Lt{constructor(e,t,n){super(400,"The request payload is invalid.","InvalidPayload",e,t,n)}},tk=class extends Lt{constructor(e,t,n){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",e,t,n)}},nk=class extends Lt{constructor(e,t,n){super(405,"The requested method does not exist.","MethodNotFound",e,t,n)}},rk=class extends Lt{constructor(e,t,n){super(404,"The requested resource does not exist.","ResourceNotFound",e,t,n)}},ik=class extends Lt{constructor(e,t,n){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",e,t,n)}},ok=class extends Lt{constructor(e,t,n){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",e,t,n)}},ak=class extends Lt{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)}},sk=class extends Lt{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)}},lk=class extends Lt{constructor(e,t,n){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",e,t,n)}},ck=class extends Lt{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)}},uk=class extends Lt{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)}},dk=class extends Lt{constructor(e,t,n){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",e,t,n)}},fk=class extends Lt{constructor(t,n,r){super(409,"The record attempted to be created already exists.","AlreadyExists",t,n,r)}},pk=class extends Lt{constructor(e,t,n){super(429,"The request has been rate limited.","RateLimited",e,t,n)}},hk=class extends Lt{constructor(e,t,n){super(402,"A payment is required to perform this request.","PaymentRequired",e,t,n)}},mk=class extends Lt{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)}},gk=class extends Lt{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)}},yk=class extends Lt{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)}},foe={Unknown:ns,Internal:YT,Unauthorized:JT,Forbidden:XT,PayloadTooLarge:QT,InvalidPayload:ek,UnsupportedMediaType:tk,MethodNotFound:nk,ResourceNotFound:rk,InvalidJsonSchema:ik,InvalidDataFormat:ok,InvalidIdentifier:ak,RelationConflict:sk,ReferenceConstraint:lk,ReferenceNotFound:ck,InvalidQuery:uk,Runtime:dk,AlreadyExists:fk,RateLimited:pk,PaymentRequired:hk,QuotaExceeded:mk,LimitExceeded:gk,BreakingChanges:yk},iy=e=>GT(e)?e:e instanceof Error?new ns(e.message,e):typeof e=="string"?new ns(e):poe(e);function poe(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=foe[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new ns(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new ns("An invalid error occurred: "+JSON.stringify(e))}var hoe=class{constructor(e,t,n){T(this,"_innerClient");T(this,"createConversation",e=>this._innerClient.createConversation({createConversationBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getConversation",e=>this._innerClient.getConversation(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listConversations",e=>this._innerClient.listConversations(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getOrCreateConversation",e=>this._innerClient.getOrCreateConversation({getOrCreateConversationBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"updateConversation",({id:e,...t})=>this._innerClient.updateConversation({id:e,updateConversationBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"deleteConversation",e=>this._innerClient.deleteConversation(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listParticipants",e=>this._innerClient.listParticipants(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"addParticipant",({id:e,...t})=>this._innerClient.addParticipant({id:e,addParticipantBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"getParticipant",e=>this._innerClient.getParticipant(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"removeParticipant",e=>this._innerClient.removeParticipant(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"createEvent",e=>this._innerClient.createEvent({createEventBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getEvent",e=>this._innerClient.getEvent(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listEvents",e=>this._innerClient.listEvents(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"createMessage",e=>this._innerClient.createMessage({createMessageBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getOrCreateMessage",e=>this._innerClient.getOrCreateMessage({getOrCreateMessageBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getMessage",e=>this._innerClient.getMessage(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"updateMessage",({id:e,...t})=>this._innerClient.updateMessage({id:e,updateMessageBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"listMessages",e=>this._innerClient.listMessages(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"deleteMessage",e=>this._innerClient.deleteMessage(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"createUser",e=>this._innerClient.createUser({createUserBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getUser",e=>this._innerClient.getUser(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listUsers",e=>this._innerClient.listUsers(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getOrCreateUser",e=>this._innerClient.getOrCreateUser({getOrCreateUserBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"updateUser",({id:e,...t})=>this._innerClient.updateUser({id:e,updateUserBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"deleteUser",e=>this._innerClient.deleteUser(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getState",e=>this._innerClient.getState(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"setState",({type:e,id:t,name:n,...r})=>this._innerClient.setState({type:e,id:t,name:n,setStateBody:r}).then(i=>i.data).catch(i=>{throw oe(i)}));T(this,"getOrSetState",({type:e,id:t,name:n,...r})=>this._innerClient.getOrSetState({type:e,id:t,name:n,getOrSetStateBody:r}).then(i=>i.data).catch(i=>{throw oe(i)}));T(this,"patchState",({type:e,id:t,name:n,...r})=>this._innerClient.patchState({type:e,id:t,name:n,patchStateBody:r}).then(i=>i.data).catch(i=>{throw oe(i)}));T(this,"callAction",e=>this._innerClient.callAction({callActionBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"configureIntegration",e=>this._innerClient.configureIntegration({configureIntegrationBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getTask",e=>this._innerClient.getTask(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"createTask",e=>this._innerClient.createTask({createTaskBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"updateTask",({id:e,...t})=>this._innerClient.updateTask({id:e,updateTaskBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"deleteTask",e=>this._innerClient.deleteTask(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listTasks",e=>this._innerClient.listTasks(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"trackAnalytics",e=>this._innerClient.trackAnalytics({trackAnalyticsBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"runVrl",e=>this._innerClient.runVrl({runVrlBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getAccount",()=>this._innerClient.getAccount().then(e=>e.data).catch(e=>{throw oe(e)}));T(this,"updateAccount",e=>this._innerClient.updateAccount({updateAccountBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listPersonalAccessTokens",()=>this._innerClient.listPersonalAccessTokens().then(e=>e.data).catch(e=>{throw oe(e)}));T(this,"createPersonalAccessToken",e=>this._innerClient.createPersonalAccessToken({createPersonalAccessTokenBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"deletePersonalAccessToken",e=>this._innerClient.deletePersonalAccessToken(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"setAccountPreference",({key:e,...t})=>this._innerClient.setAccountPreference({key:e,setAccountPreferenceBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"getAccountPreference",e=>this._innerClient.getAccountPreference(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listPublicIntegrations",e=>this._innerClient.listPublicIntegrations(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getPublicIntegrationById",e=>this._innerClient.getPublicIntegrationById(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getPublicIntegration",e=>this._innerClient.getPublicIntegration(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"createBot",e=>this._innerClient.createBot({createBotBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"updateBot",({id:e,...t})=>this._innerClient.updateBot({id:e,updateBotBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"transferBot",({id:e,...t})=>this._innerClient.transferBot({id:e,transferBotBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"listBots",e=>this._innerClient.listBots(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getBot",e=>this._innerClient.getBot(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"deleteBot",e=>this._innerClient.deleteBot(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getBotLogs",e=>this._innerClient.getBotLogs(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getBotWebchat",e=>this._innerClient.getBotWebchat(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getBotAnalytics",e=>this._innerClient.getBotAnalytics(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listBotIssues",e=>this._innerClient.listBotIssues(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"deleteBotIssue",e=>this._innerClient.deleteBotIssue(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listBotIssueEvents",e=>this._innerClient.listBotIssueEvents(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"setWorkspacePaymentMethod",({id:e,...t})=>this._innerClient.setWorkspacePaymentMethod({id:e,setWorkspacePaymentMethodBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"listWorkspaceInvoices",e=>this._innerClient.listWorkspaceInvoices(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getUpcomingInvoice",e=>this._innerClient.getUpcomingInvoice(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"chargeWorkspaceUnpaidInvoices",({id:e,...t})=>this._innerClient.chargeWorkspaceUnpaidInvoices({id:e,chargeWorkspaceUnpaidInvoicesBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"createWorkspace",e=>this._innerClient.createWorkspace({createWorkspaceBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getPublicWorkspace",e=>this._innerClient.getPublicWorkspace(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getWorkspace",e=>this._innerClient.getWorkspace(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listWorkspaceUsages",e=>this._innerClient.listWorkspaceUsages(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"breakDownWorkspaceUsageByBot",e=>this._innerClient.breakDownWorkspaceUsageByBot(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getAllWorkspaceQuotaCompletion",()=>this._innerClient.getAllWorkspaceQuotaCompletion().then(e=>e.data).catch(e=>{throw oe(e)}));T(this,"getWorkspaceQuota",e=>this._innerClient.getWorkspaceQuota(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listWorkspaceQuotas",e=>this._innerClient.listWorkspaceQuotas(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"updateWorkspace",({id:e,...t})=>this._innerClient.updateWorkspace({id:e,updateWorkspaceBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"checkHandleAvailability",e=>this._innerClient.checkHandleAvailability({checkHandleAvailabilityBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listWorkspaces",e=>this._innerClient.listWorkspaces(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"deleteWorkspace",e=>this._innerClient.deleteWorkspace(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getAuditRecords",e=>this._innerClient.getAuditRecords(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listWorkspaceMembers",e=>this._innerClient.listWorkspaceMembers(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"deleteWorkspaceMember",e=>this._innerClient.deleteWorkspaceMember(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"createWorkspaceMember",e=>this._innerClient.createWorkspaceMember({createWorkspaceMemberBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"updateWorkspaceMember",({id:e,...t})=>this._innerClient.updateWorkspaceMember({id:e,updateWorkspaceMemberBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"listIntegrationApiKeys",e=>this._innerClient.listIntegrationApiKeys(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"createIntegrationApiKey",e=>this._innerClient.createIntegrationApiKey({createIntegrationApiKeyBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"deleteIntegrationApiKey",e=>this._innerClient.deleteIntegrationApiKey(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"createIntegration",e=>this._innerClient.createIntegration({createIntegrationBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"updateIntegration",({id:e,...t})=>this._innerClient.updateIntegration({id:e,updateIntegrationBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"listIntegrations",e=>this._innerClient.listIntegrations(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getIntegration",e=>this._innerClient.getIntegration(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getIntegrationLogs",e=>this._innerClient.getIntegrationLogs(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getIntegrationByName",e=>this._innerClient.getIntegrationByName(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"deleteIntegration",e=>this._innerClient.deleteIntegration(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getUsage",e=>this._innerClient.getUsage(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listUsageHistory",e=>this._innerClient.listUsageHistory(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"changeAISpendQuota",e=>this._innerClient.changeAISpendQuota({changeAISpendQuotaBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listActivities",e=>this._innerClient.listActivities(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"introspect",e=>this._innerClient.introspect({introspectBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"createFile",e=>this._innerClient.createFile({createFileBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"deleteFile",e=>this._innerClient.deleteFile(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listFiles",e=>this._innerClient.listFiles(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getFileMetadata",e=>this._innerClient.getFileMetadata(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getFileContent",e=>this._innerClient.getFileContent(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"updateFileMetadata",({id:e,...t})=>this._innerClient.updateFileMetadata({id:e,updateFileMetadataBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"searchFiles",e=>this._innerClient.searchFiles(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listTables",e=>this._innerClient.listTables(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getTable",e=>this._innerClient.getTable(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getOrCreateTable",({table:e,...t})=>this._innerClient.getOrCreateTable({table:e,getOrCreateTableBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"createTable",e=>this._innerClient.createTable({createTableBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"duplicateTable",({sourceTableId:e,...t})=>this._innerClient.duplicateTable({sourceTableId:e,duplicateTableBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"updateTable",({table:e,...t})=>this._innerClient.updateTable({table:e,updateTableBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"renameTableColumn",({table:e,...t})=>this._innerClient.renameTableColumn({table:e,renameTableColumnBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"deleteTable",e=>this._innerClient.deleteTable(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getTableRow",e=>this._innerClient.getTableRow(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"findTableRows",({table:e,...t})=>this._innerClient.findTableRows({table:e,findTableRowsBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"createTableRows",({table:e,...t})=>this._innerClient.createTableRows({table:e,createTableRowsBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"deleteTableRows",({table:e,...t})=>this._innerClient.deleteTableRows({table:e,deleteTableRowsBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"updateTableRows",({table:e,...t})=>this._innerClient.updateTableRows({table:e,updateTableRowsBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"upsertTableRows",({table:e,...t})=>this._innerClient.upsertTableRows({table:e,upsertTableRowsBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));this._innerClient=new coe(e,t,n)}};function oe(e){var t;return J.isAxiosError(e)&&((t=e.response)!=null&&t.data)?iy(e.response.data):iy(e)}var vk=100*1024*1024,moe=vk,goe=vk,yoe=class extends hoe{constructor(t={}){let n=roe(t),r=voe(n);super(void 0,n.apiUrl,r);T(this,"config");this.config=n}};function voe(e){let{headers:t,withCredentials:n,timeout:r}=e;return J.create({headers:t,withCredentials:n,timeout:r,maxBodyLength:moe,maxContentLength:goe,httpAgent:ty?new Kie.default.Agent({keepAlive:!0}):void 0,httpsAgent:ty?new Gie.default.Agent({keepAlive:!0}):void 0})}const oy=Tc(Object.freeze(Object.defineProperty({__proto__:null,AlreadyExistsError:fk,BreakingChangesError:yk,Client:yoe,ForbiddenError:XT,InternalError:YT,InvalidDataFormatError:ok,InvalidIdentifierError:ak,InvalidJsonSchemaError:ik,InvalidPayloadError:ek,InvalidQueryError:uk,LimitExceededError:gk,MethodNotFoundError:nk,PayloadTooLargeError:QT,PaymentRequiredError:hk,QuotaExceededError:mk,RateLimitedError:pk,ReferenceConstraintError:lk,ReferenceNotFoundError:ck,RelationConflictError:sk,ResourceNotFoundError:rk,RuntimeError:dk,UnauthorizedError:JT,UnknownError:ns,UnsupportedMediaTypeError:tk,axios:Rie,errorFrom:iy,isApiError:GT},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=(A,Ee)=>{for(var Pe in Ee)n(A,Pe,{get:Ee[Pe],enumerable:!0})},l=(A,Ee,Pe,Fe)=>{if(Ee&&typeof Ee=="object"||typeof Ee=="function")for(let Ce of i(Ee))!a.call(A,Ce)&&Ce!==Pe&&n(A,Ce,{get:()=>Ee[Ce],enumerable:!(Fe=r(Ee,Ce))||Fe.enumerable});return A},c=(A,Ee,Pe)=>(l(A,Ee,"default"),Pe&&l(Pe,Ee,"default")),u=(A,Ee,Pe)=>(Pe=A!=null?t(o(A)):{},l(Ee||!A||!A.__esModule?n(Pe,"default",{value:A,enumerable:!0}):Pe,A)),d=A=>l(n({},"__esModule",{value:!0}),A),p={};s(p,{Bot:()=>ta,BotSpecificClient:()=>qt,Integration:()=>Pt,IntegrationDefinition:()=>D,IntegrationSpecificClient:()=>me,RuntimeError:()=>$e.RuntimeError,botIdHeader:()=>V,botUserIdHeader:()=>W,configurationHeader:()=>se,integrationIdHeader:()=>pe,isApiError:()=>$e.isApiError,messages:()=>f,operationHeader:()=>we,parseBody:()=>Me,serve:()=>Ze,studioComponentDefinitions:()=>g,typeHeader:()=>O,webhookIdHeader:()=>C,z:()=>m.z}),e.exports=d(p);var f={};s(f,{defaults:()=>F});var h={};s(h,{default:()=>y,studioComponentDefinitions:()=>g,z:()=>m.z});var m=od;c(h,od);var v=m.z.object({allowDynamicVariable:m.z.boolean().optional(),horizontal:m.z.boolean().optional()}),g={string:{textInput:{id:"textInput",params:v.extend({multiLine:m.z.boolean().optional(),growVertically:m.z.boolean().optional(),suggestions:m.z.array(m.z.string()).optional()})},dropdown:{id:"dropdown",params:v.extend({filterable:m.z.boolean().optional()})},radiogroup:{id:"radiogroup",params:v.extend({})},datepicker:{id:"datepicker",params:v.extend({dateFormat:m.z.string().optional(),minDate:m.z.string().optional(),maxDate:m.z.string().optional(),defaultTimezone:m.z.string().optional(),disableTimezoneSelection:m.z.boolean().optional(),highlightCurrentDay:m.z.boolean().optional(),showShortcutButtons:m.z.boolean().optional(),showOutsideDaysOfMonth:m.z.boolean().optional(),firstDayOfWeek:m.z.number().optional(),canChangeMonth:m.z.boolean().optional(),showWeekNumbers:m.z.boolean().optional()})},timepicker:{id:"timepicker",params:v.extend({useAMPM:m.z.boolean().optional(),timeFormat:m.z.string().optional(),minTime:m.z.string().optional(),maxTime:m.z.string().optional(),showArrowButtons:m.z.boolean().optional(),precision:m.z.enum(["minute","second","millisecond"]).optional()})},variablepicker:{id:"variablepicker",params:m.z.object({type:m.z.enum(["any","string","number","boolean","object","pattern","date","array","target","time","enum"]),horizontal:m.z.boolean().optional()})},richTextEditor:{id:"richTextEditor",params:m.z.object({allowDynamicVariable:m.z.boolean().optional(),resizable:m.z.boolean().optional()})},JSONInput:{id:"JSONInput",params:v.extend({showPreview:m.z.boolean().optional(),showValidationError:m.z.boolean().optional()})},fileInput:{id:"fileInput",params:v.extend({fileTypes:m.z.array(m.z.enum(["image","audio","video"])).optional(),showUploadedFiles:m.z.boolean().optional()})}},number:{numberInput:{id:"numberInput",params:v.extend({allowNumericCharactersOnly:m.z.boolean().optional(),stepSize:m.z.number().optional()})},slider:{id:"slider",params:m.z.object({horizontal:m.z.boolean().optional(),stepSize:m.z.number().optional()})}},boolean:{switch:{id:"switch",params:v}},array:{optionList:{id:"optionList",params:v},stringList:{id:"stringList",params:v}},object:{collapsible:{id:"collapsible",params:m.z.object({defaultOpen:m.z.boolean().optional()})}},discriminatedUnion:{}},y=m.z,b=m.z.string().min(1),x=m.z.object({text:b}),_=m.z.object({markdown:b}),S=m.z.object({imageUrl:b}),R=m.z.object({audioUrl:b}),M=m.z.object({videoUrl:b}),j=m.z.object({fileUrl:b,title:b.optional()}),k=m.z.object({latitude:m.z.number(),longitude:m.z.number(),address:m.z.string().optional(),title:m.z.string().optional()}),N=m.z.object({title:b,subtitle:b.optional(),imageUrl:b.optional(),actions:m.z.array(m.z.object({action:m.z.enum(["postback","url","say"]),label:b,value:b}))}),z=m.z.object({text:b,options:m.z.array(m.z.object({label:b,value:b}))}),U=m.z.object({items:m.z.array(N)}),Z=m.z.discriminatedUnion("type",[m.z.object({type:m.z.literal("text"),payload:x}),m.z.object({type:m.z.literal("markdown"),payload:_}),m.z.object({type:m.z.literal("image"),payload:S}),m.z.object({type:m.z.literal("audio"),payload:R}),m.z.object({type:m.z.literal("video"),payload:M}),m.z.object({type:m.z.literal("file"),payload:j}),m.z.object({type:m.z.literal("location"),payload:k})]),L=m.z.object({items:m.z.array(Z)}),F={text:{schema:x},markdown:{schema:_},image:{schema:S},audio:{schema:R},video:{schema:M},file:{schema:j},location:{schema:k},carousel:{schema:U},card:{schema:N},dropdown:{schema:z},choice:{schema:z},bloc:{schema:L}},V="x-bot-id",W="x-bot-user-id",pe="x-integration-id",C="x-webhook-id",se="x-bp-configuration",we="x-bp-operation",O="x-bp-type",Oe=Bo,Be=console;function Me(A){if(!A.body)throw new Error("Missing body");return JSON.parse(A.body)}async function Ze(A,Ee=8072,Pe=ye){let Fe=(0,Oe.createServer)(async(Ce,Ie)=>{try{let at=await nt(Ce);if(at.path==="/health"){Ie.writeHead(200).end("ok");return}let pt=await A(at);Ie.writeHead((pt==null?void 0:pt.status)??200,(pt==null?void 0:pt.headers)??{}).end((pt==null?void 0:pt.body)??"{}")}catch(at){Be.error("Error while handling request",{error:(at==null?void 0:at.message)??"Internal error occured"}),Ie.writeHead(500).end(JSON.stringify({error:(at==null?void 0:at.message)??"Internal error occured"}))}});return Fe.listen(Ee,()=>Pe(Ee)),Fe}async function nt(A){var Ce;let Ee=await _e(A),Pe={};for(let Ie=0;Ie<A.rawHeaders.length;Ie+=2){let at=A.rawHeaders[Ie].toLowerCase(),pt=A.rawHeaders[Ie+1];Pe[at]=pt}let Fe=new URL(A.url??"",A.headers.host?`http://${A.headers.host}`:"http://botpress.cloud");return{body:Ee,path:Fe.pathname,query:We(Fe.search,"?"),headers:Pe,method:((Ce=A.method)==null?void 0:Ce.toUpperCase())??"GET"}}function We(A,Ee){return A.indexOf(Ee)===0?A.slice(Ee.length):A}async function _e(A){return new Promise((Ee,Pe)=>{if(A.method!=="POST"&&A.method!=="PUT"&&A.method!=="PATCH")return Ee(void 0);let Fe="";A.on("data",Ce=>Fe+=Ce.toString()),A.on("error",Ce=>Pe(Ce)),A.on("end",()=>Ee(Fe))})}function ye(A){Be.info(`Listening on port ${A}`)}c(p,h,e.exports);var $e=oy,xe=od,Ue=xe.z.enum(["webhook_received","message_created","action_triggered","register","unregister","ping","create_user","create_conversation"]),ot=A=>{let Ee=A[V],Pe=A[W],Fe=A[pe],Ce=A[C],Ie=A[se],at=Ue.parse(A[we]);if(!Ee)throw new Error("Missing bot headers");if(!Pe)throw new Error("Missing bot user headers");if(!Fe)throw new Error("Missing integration headers");if(!Ce)throw new Error("Missing webhook headers");if(!Ie)throw new Error("Missing configuration headers");if(!at)throw new Error("Missing operation headers");return{botId:Ee,botUserId:Pe,integrationId:Fe,webhookId:Ce,operation:at,configuration:Ie?JSON.parse(Buffer.from(Ie,"base64").toString("utf-8")):{}}},D=class{constructor(A){T(this,"name");T(this,"version");T(this,"title");T(this,"description");T(this,"icon");T(this,"readme");T(this,"configuration");T(this,"events");T(this,"actions");T(this,"channels");T(this,"states");T(this,"user");T(this,"secrets");T(this,"identifier");T(this,"entities");this.props=A,this.name=A.name,this.version=A.version,this.icon=A.icon,this.readme=A.readme,this.title=A.title,this.identifier=A.identifier,this.description=A.description,this.configuration=A.configuration,this.events=A.events,this.actions=A.actions,this.channels=A.channels,this.states=A.states,this.user=A.user,this.secrets=A.secrets,this.entities=A.entities}},ue=oy,me=class{constructor(A){T(this,"createConversation",A=>this.client.createConversation(A));T(this,"getConversation",A=>this.client.getConversation(A));T(this,"listConversations",A=>this.client.listConversations(A));T(this,"getOrCreateConversation",A=>this.client.getOrCreateConversation(A));T(this,"updateConversation",A=>this.client.updateConversation(A));T(this,"deleteConversation",A=>this.client.deleteConversation(A));T(this,"listParticipants",A=>this.client.listParticipants(A));T(this,"addParticipant",A=>this.client.addParticipant(A));T(this,"getParticipant",A=>this.client.getParticipant(A));T(this,"removeParticipant",A=>this.client.removeParticipant(A));T(this,"createEvent",A=>this.client.createEvent(A));T(this,"getEvent",A=>this.client.getEvent(A));T(this,"listEvents",A=>this.client.listEvents(A));T(this,"createMessage",A=>this.client.createMessage(A));T(this,"getOrCreateMessage",A=>this.client.getOrCreateMessage(A));T(this,"getMessage",A=>this.client.getMessage(A));T(this,"updateMessage",A=>this.client.updateMessage(A));T(this,"listMessages",A=>this.client.listMessages(A));T(this,"deleteMessage",A=>this.client.deleteMessage(A));T(this,"createUser",A=>this.client.createUser(A));T(this,"getUser",A=>this.client.getUser(A));T(this,"listUsers",A=>this.client.listUsers(A));T(this,"getOrCreateUser",A=>this.client.getOrCreateUser(A));T(this,"updateUser",A=>this.client.updateUser(A));T(this,"deleteUser",A=>this.client.deleteUser(A));T(this,"getState",A=>this.client.getState(A));T(this,"setState",A=>this.client.setState(A));T(this,"getOrSetState",A=>this.client.getOrSetState(A));T(this,"patchState",A=>this.client.patchState(A));T(this,"configureIntegration",A=>this.client.configureIntegration(A));this.client=A}},fe=u(Bo),Le=A=>{if(process.env.BP_LOG_FORMAT==="json")return JSON.stringify({msg:fe.default.format(...A),visible_to_bot_owner:!0});{let[Ee,...Pe]=A;return fe.default.format(`[For Bot Owner] ${Ee}`,...Pe)}},De={forBot:()=>({info:(...A)=>{console.info(Le(A))},warn:(...A)=>{console.warn(Le(A))},error:(...A)=>{console.error(Le(A))},debug:(...A)=>{console.debug(Le(A))}})},Ke=A=>async Ee=>{let Pe=ot(Ee.headers),Fe=new me(new ue.Client({botId:Pe.botId,integrationId:Pe.integrationId})),Ce={ctx:Pe,req:Ee,client:Fe,logger:De,instance:A};try{let Ie;switch(Pe.operation){case"webhook_received":Ie=await Xe(Ce);break;case"register":Ie=await q(Ce);break;case"unregister":Ie=await X(Ce);break;case"message_created":Ie=await rt(Ce);break;case"action_triggered":Ie=await Zt(Ce);break;case"ping":Ie=await gt(Ce);break;case"create_user":Ie=await de(Ce);break;case"create_conversation":Ie=await je(Ce);break;default:throw new Error(`Unknown operation ${Pe.operation}`)}return Ie?{...Ie,status:Ie.status??200}:{status:200}}catch(Ie){if((0,ue.isApiError)(Ie)){let at=new ue.RuntimeError(Ie.message,Ie);return{status:at.code,body:JSON.stringify(at.toJSON())}}throw Ie}},gt=async A=>{},Xe=async({client:A,ctx:Ee,req:Pe,logger:Fe,instance:Ce})=>{let{req:Ie}=Me(Pe);return Ce.webhook({client:A,ctx:Ee,req:Ie,logger:Fe})},q=async({client:A,ctx:Ee,req:Pe,logger:Fe,instance:Ce})=>{if(!Ce.register)return;let{webhookUrl:Ie}=Me(Pe);await Ce.register({client:A,ctx:Ee,webhookUrl:Ie,logger:Fe})},X=async({client:A,ctx:Ee,req:Pe,logger:Fe,instance:Ce})=>{if(!Ce.unregister)return;let{webhookUrl:Ie}=Me(Pe);await Ce.unregister({ctx:Ee,webhookUrl:Ie,client:A,logger:Fe})},de=async({client:A,ctx:Ee,req:Pe,logger:Fe,instance:Ce})=>{if(!Ce.createUser)return;let{tags:Ie}=Me(Pe);return await Ce.createUser({ctx:Ee,client:A,tags:Ie,logger:Fe})},je=async({client:A,ctx:Ee,req:Pe,logger:Fe,instance:Ce})=>{if(!Ce.createConversation)return;let{channel:Ie,tags:at}=Me(Pe);return await Ce.createConversation({ctx:Ee,client:A,channel:Ie,tags:at,logger:Fe})},rt=async({ctx:A,req:Ee,client:Pe,logger:Fe,instance:Ce})=>{let{conversation:Ie,user:at,type:pt,payload:Ft,message:Kt}=Me(Ee),Yn=Ce.channels[Ie.channel];if(!Yn)throw new Error(`Channel ${Ie.channel} not found`);let Or=Yn.messages[pt];if(!Or)throw new Error(`Message of type ${pt} not found in channel ${Ie.channel}`);await Or({ctx:A,conversation:Ie,message:Kt,user:at,type:pt,client:Pe,payload:Ft,ack:async({tags:rb})=>{await Pe.updateMessage({id:Kt.id,tags:rb})},logger:Fe})},Zt=async({req:A,ctx:Ee,client:Pe,logger:Fe,instance:Ce})=>{let{input:Ie,type:at}=Me(A);if(!at)throw new Error("Missing action type");let pt=Ce.actions[at];if(!pt)throw new Error(`Action ${at} not found`);let Ft=await pt({ctx:Ee,input:Ie,client:Pe,type:at,logger:Fe});return{body:JSON.stringify({output:Ft})}},Pt=class{constructor(A){T(this,"props");T(this,"actions");T(this,"channels");T(this,"register");T(this,"unregister");T(this,"createUser");T(this,"createConversation");T(this,"webhook");T(this,"handler",Ke(this));T(this,"start",A=>Ze(this.handler,A));this.props=A,this.actions=A.actions,this.channels=A.channels,this.register=A.register,this.unregister=A.unregister,this.createUser=A.createUser,this.createConversation=A.createConversation,this.webhook=A.handler}},Ot=u(oy),qt=class{constructor(A){T(this,"getConversation",A=>this.client.getConversation(A));T(this,"listConversations",A=>this.client.listConversations(A));T(this,"updateConversation",A=>this.client.updateConversation(A));T(this,"deleteConversation",A=>this.client.deleteConversation(A));T(this,"listParticipants",A=>this.client.listParticipants(A));T(this,"addParticipant",A=>this.client.addParticipant(A));T(this,"getParticipant",A=>this.client.getParticipant(A));T(this,"removeParticipant",A=>this.client.removeParticipant(A));T(this,"getEvent",A=>this.client.getEvent(A));T(this,"listEvents",A=>this.client.listEvents(A));T(this,"createMessage",A=>this.client.createMessage(A));T(this,"getOrCreateMessage",A=>this.client.getOrCreateMessage(A));T(this,"getMessage",A=>this.client.getMessage(A));T(this,"updateMessage",A=>this.client.updateMessage(A));T(this,"listMessages",A=>this.client.listMessages(A));T(this,"deleteMessage",A=>this.client.deleteMessage(A));T(this,"getUser",A=>this.client.getUser(A));T(this,"listUsers",A=>this.client.listUsers(A));T(this,"updateUser",A=>this.client.updateUser(A));T(this,"deleteUser",A=>this.client.deleteUser(A));T(this,"getState",A=>this.client.getState(A).then(Ee=>({state:{...Ee.state,payload:Ee.state.payload}})));T(this,"setState",A=>this.client.setState(A).then(Ee=>({state:{...Ee.state,payload:Ee.state.payload}})));T(this,"getOrSetState",A=>this.client.getOrSetState(A).then(Ee=>({state:{...Ee.state,payload:Ee.state.payload}})));T(this,"patchState",A=>this.client.patchState(A).then(Ee=>({state:{...Ee.state,payload:Ee.state.payload}})));T(this,"callAction",A=>this.client.callAction(A));T(this,"createConversation",A=>this.client.createConversation(A));T(this,"getOrCreateConversation",A=>this.client.getOrCreateConversation(A));T(this,"createUser",A=>this.client.createUser(A));T(this,"getOrCreateUser",A=>this.client.getOrCreateUser(A));this.client=A}},Mn=od,Ht=Mn.z.enum(["event_received","register","unregister","ping","action_triggered"]),tn=A=>{let Ee=A[V],Pe=A[se],Fe=A[O],Ce=Ht.parse(A[we]);if(!Ee)throw new Error("Missing bot headers");if(!Fe)throw new Error("Missing type headers");if(!Pe)throw new Error("Missing configuration headers");if(!Ce)throw new Error("Missing operation headers");return{botId:Ee,operation:Ce,type:Fe,configuration:Pe?JSON.parse(Buffer.from(Pe,"base64").toString("utf-8")):{}}},mn=A=>async Ee=>{let Pe=tn(Ee.headers);Pe.operation!=="ping"&&Be.info(`Received ${Pe.operation} operation for bot ${Pe.botId} of type ${Pe.type}`);let Fe=new qt(new Ot.Client({botId:Pe.botId})),Ce={req:Ee,ctx:Pe,client:Fe,instance:A};switch(Pe.operation){case"action_triggered":throw new Error(`Operation ${Pe.operation} not supported yet`);case"event_received":await ei(Ce);break;case"register":await Oi();break;case"unregister":await hr();break;case"ping":await un();break;default:throw new Error(`Unknown operation ${Pe.operation}`)}return{status:200}},un=async A=>{},Oi=async A=>{},hr=async A=>{},ei=async({ctx:A,req:Ee,client:Pe,instance:Fe})=>{Be.debug(`Received event ${A.type}`);let Ce=Me(Ee),Ie=Ce.event;switch(A.type){case"message_created":let at={user:Ie.payload.user,conversation:Ie.payload.conversation,message:Ie.payload.message,states:Ie.payload.states,event:Ie};await Promise.all(Fe.messageHandlers.map(Kt=>Kt({client:Pe,ctx:A,...at})));break;case"state_expired":let pt={state:Ie.payload.state};await Promise.all(Fe.stateExpiredHandlers.map(Kt=>Kt({client:Pe,ctx:A,...pt})));break;default:let Ft={event:Ce.event};await Promise.all(Fe.eventHandlers.map(Kt=>Kt({client:Pe,ctx:A,...Ft})))}},ta=class{constructor(A){T(this,"_state",{messageHandlers:[],eventHandlers:[],stateExpiredHandlers:[]});T(this,"props");T(this,"message",A=>{this._state.messageHandlers.push(A)});T(this,"event",A=>{this._state.eventHandlers.push(A)});T(this,"stateExpired",A=>{this._state.stateExpiredHandlers.push(A)});T(this,"handler",mn(this._state));T(this,"start",A=>Ze(this.handler,A));this.props=A}}})(Fx);var Y=Fx.exports;const{defaults:qr}=Y.messages,_r={className:Y.z.string().describe("CSS className to apply to the message").optional()},bk=qr.audio.schema.extend({..._r,type:Y.z.literal("audio")}),ay=qr.card.schema.extend({type:Y.z.literal("card"),subtitle:Y.z.string().optional(),imageUrl:Y.z.string().optional(),..._r}),boe=ay.omit({type:!0}),wk=Y.z.object({items:Y.z.array(boe),..._r,type:Y.z.literal("carousel")}),_k=qr.choice.schema.extend({text:Y.z.string(),..._r,type:Y.z.literal("choice"),disableFreeText:Y.z.boolean().optional()}),xk=qr.dropdown.schema.extend({text:Y.z.string(),..._r,type:Y.z.literal("dropdown")}),Sk=qr.file.schema.extend({..._r,type:Y.z.literal("file")}),Ek=qr.image.schema.extend({..._r,type:Y.z.literal("image")}),Ck=qr.location.schema.extend({..._r,type:Y.z.literal("location")}),Tk=qr.markdown.schema.extend({..._r,type:Y.z.literal("markdown")}),kk=qr.text.schema.extend({..._r,type:Y.z.literal("text")}),Ok=qr.video.schema.extend({..._r,type:Y.z.literal("video")}),Ak=Y.z.union([bk,ay,wk,_k,xk,Sk,Ek,Ck,Tk,kk,Ok]),$k=Y.z.object({type:Y.z.literal("webchat_visibility"),data:Y.z.object({visibility:Y.z.union([Y.z.literal("show"),Y.z.literal("hide"),Y.z.literal("toggle")])})}),Pk=Y.z.object({type:Y.z.literal("webchat_config"),data:Y.z.object({config:Y.z.record(Y.z.any())})}),Ik=Y.z.object({type:Y.z.literal("custom"),data:Y.z.object({event:Y.z.record(Y.z.any())})}),Rk=Y.z.union([$k,Pk,Ik]),woe=Rk,_oe=Y.z.object({type:Y.z.literal("message_created"),data:Ak}),xoe=Object.freeze(Object.defineProperty({__proto__:null,audioSchema:bk,cardSchema:ay,carouselSchema:wk,choiceSchema:_k,customSchema:Ik,dropdownSchema:xk,fileSchema:Sk,imageSchema:Ek,locationSchema:Ck,markdownSchema:Tk,messageCreatedSchema:_oe,messageSchema:Ak,textSchema:kk,triggerSchema:Rk,triggerSignalSchema:woe,videoSchema:Ok,webchatConfigSchema:Pk,webchatVisibilitySchema:$k},Symbol.toStringTag,{value:"Module"})),Hr=Y.z.object({className:Y.z.string().optional(),avatarUrl:Y.z.string().url().optional()}),Mk=Hr.extend({type:Y.z.literal("audio"),audio:Y.z.string(),title:Y.z.string().optional()}),Soe=Y.z.union([Y.z.object({title:Y.z.string(),action:Y.z.literal("Say something"),text:Y.z.string()}),Y.z.object({title:Y.z.string(),action:Y.z.literal("Open URL"),url:Y.z.string()}),Y.z.object({title:Y.z.string(),action:Y.z.literal("Postback"),payload:Y.z.string()})]),sy=Hr.extend({type:Y.z.literal("card"),title:Y.z.string(),subtitle:Y.z.string().optional(),image:Y.z.string().optional(),actions:Y.z.array(Soe)}),Nk=Hr.extend({type:Y.z.literal("carousel"),items:Y.z.array(sy)}),Dk=Hr.extend({type:Y.z.literal("dropdown"),message:Y.z.string().optional(),options:Y.z.array(Y.z.object({label:Y.z.string(),value:Y.z.string()})),allowCreation:Y.z.boolean().optional(),placeholderText:Y.z.string().optional(),allowMultiple:Y.z.boolean().optional(),buttonText:Y.z.string().optional(),width:Y.z.number().optional(),displayInKeyboard:Y.z.boolean().optional(),markdown:Y.z.boolean().optional(),text:Y.z.string().optional()}),jk=Hr.extend({type:Y.z.literal("file"),file:Y.z.string(),title:Y.z.string().optional()}),Lk=Hr.extend({type:Y.z.literal("image"),image:Y.z.string()}),Fk=Hr.extend({type:Y.z.literal("location"),latitude:Y.z.number(),longitude:Y.z.number(),address:Y.z.string().optional(),title:Y.z.string().optional()}),Uk=Hr.extend({type:Y.z.literal("single-choice"),text:Y.z.string(),disableFreeText:Y.z.boolean().optional(),choices:Y.z.array(Y.z.object({title:Y.z.string(),value:Y.z.string()}))}),Bk=Hr.extend({type:Y.z.literal("text"),text:Y.z.string(),markdown:Y.z.boolean().optional()}),zk=Hr.extend({type:Y.z.literal("video"),video:Y.z.string(),title:Y.z.string().optional()}),Zk=Y.z.object({type:Y.z.literal("quick_reply"),text:Y.z.string(),payload:Y.z.string().optional()}),Ef=Y.z.union([Mk,sy,Nk,Dk,jk,Lk,Fk,Uk,Bk,zk,Zk]),qk=Y.z.object({type:Y.z.literal("webchat-visibility"),visibility:Y.z.union([Y.z.literal("show"),Y.z.literal("hide"),Y.z.literal("toggle")])}),Hk=Y.z.object({type:Y.z.literal("webchat-config"),config:Y.z.record(Y.z.any())}),Wk=Y.z.object({type:Y.z.literal("custom-event"),event:Y.z.record(Y.z.any())}),Vk=Y.z.union([qk,Hk,Wk]),Eoe=Y.z.object({type:Y.z.literal("trigger"),trigger:Vk}),Coe=Object.freeze(Object.defineProperty({__proto__:null,audioSchema:Mk,cardSchema:sy,carouselSchame:Nk,customEventSchema:Wk,dropdownSchema:Dk,fileSchema:jk,imageSchema:Lk,locationSchema:Fk,messageSchema:Ef,messageSignalSchema:Ef,quickReplySchema:Zk,singleChoiceSchema:Uk,textSchema:Bk,triggerSchema:Vk,triggerSignalSchema:Eoe,videoSchema:zk,webchatConfigSchema:Hk,webchatVisibilitySchema:qk},Symbol.toStringTag,{value:"Module"})),Kk=e=>({type:"card",title:e.title,subtitle:e.subtitle,image:e.imageUrl,actions:e.actions.map(Toe)}),Toe=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}`)}},Gk=e=>({...e,type:"audio",audio:e.audioUrl}),Yk=e=>Kk(e),Jk=e=>({...e,type:"carousel",items:e.items.map(Kk)}),Xk=e=>({...e,type:"single-choice",text:e.text,choices:e.options.map(t=>({title:t.label,value:t.value})),disableFreeText:e.disableFreeText}),Qk=e=>({...e,type:"dropdown",message:e.text,options:e.options.map(t=>({label:t.label,value:t.value}))}),eO=e=>({...e,type:"file",file:e.fileUrl,title:e.title}),tO=e=>({...e,type:"image",image:e.imageUrl}),nO=e=>({...e,type:"location",latitude:e.latitude,longitude:e.longitude}),rO=e=>({...e,type:"text",text:e.markdown,markdown:!0}),iO=e=>({...e,type:"text",text:e.text,markdown:!0}),oO=e=>({...e,type:"video",video:e.videoUrl}),koe=e=>{switch(e.type){case"audio":return Gk(e);case"card":return Yk(e);case"carousel":return Jk(e);case"choice":return Xk(e);case"dropdown":return Qk(e);case"file":return eO(e);case"image":return tO(e);case"location":return nO(e);case"markdown":return rO(e);case"text":return iO(e);case"video":return oO(e);default:throw new Error("Unsuported message type")}},aO=e=>({type:"webchat-visibility",visibility:e.data.visibility}),sO=e=>({type:"webchat-config",config:e.data.config}),lO=e=>({type:"custom-event",event:e.data.event}),Ooe=Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:Gk,cardAdapter:Yk,carouselAdapter:Jk,choiceAdapter:Xk,customAdapter:lO,dropdownAdapter:Qk,fileAdapter:eO,imageAdapter:tO,locationAdapter:nO,markdownAdapter:rO,messageAdapter:koe,textAdapter:iO,triggerAdapter:e=>{switch(e.type){case"webchat_visibility":return aO(e);case"webchat_config":return sO(e);case"custom":return lO(e);default:throw new Error("unknown trigger type")}},videoAdapter:oO,webchatConfigAdapter:sO,webchatVisibilityAdapter:aO},Symbol.toStringTag,{value:"Module"})),cO=e=>({type:"card",title:e.title,subtitle:e.subtitle,imageUrl:e.image,actions:e.actions.map(Aoe)}),Aoe=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")}},$oe=e=>({...e,type:"audio",audioUrl:e.audio}),Poe=e=>cO(e),Ioe=e=>({...e,type:"carousel",items:e.items.map(cO)}),Roe=e=>({...e,type:"dropdown",text:e.message??"",options:e.options.map(t=>({label:t.label,value:t.value}))}),Moe=e=>({...e,type:"file",fileUrl:e.file,title:e.title}),Noe=e=>({...e,type:"image",imageUrl:e.image}),Doe=e=>({...e,type:"location",latitude:e.latitude,longitude:e.longitude}),joe=e=>({...e,type:"choice",text:e.text,options:e.choices.map(t=>({label:t.title,value:t.value})),disableFreeText:e.disableFreeText}),Loe=e=>({...e,type:"text",text:e.text}),Foe=e=>({...e,type:"video",videoUrl:e.video}),Uoe=e=>({...e,type:"text",text:e.text??e.payload}),Boe=Object.freeze(Object.defineProperty({__proto__:null,messaging:Coe,messagingToWebChat:Object.freeze(Object.defineProperty({__proto__:null,messageAdapter:e=>{switch(e.type){case"audio":return $oe(e);case"card":return Poe(e);case"carousel":return Ioe(e);case"dropdown":return Roe(e);case"file":return Moe(e);case"image":return Noe(e);case"location":return Doe(e);case"single-choice":return joe(e);case"text":return Loe(e);case"video":return Foe(e);case"quick_reply":return Uoe(e);default:throw new Error("Unsuported message type")}}},Symbol.toStringTag,{value:"Module"})),webchat:xoe,webchatToMessaging:Ooe},Symbol.toStringTag,{value:"Module"}));let Cf;const zoe=new Uint8Array(16);function Zoe(){if(!Cf&&(Cf=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Cf))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Cf(zoe)}const _n=[];for(let e=0;e<256;++e)_n.push((e+256).toString(16).slice(1));function qoe(e,t=0){return _n[e[t+0]]+_n[e[t+1]]+_n[e[t+2]]+_n[e[t+3]]+"-"+_n[e[t+4]]+_n[e[t+5]]+"-"+_n[e[t+6]]+_n[e[t+7]]+"-"+_n[e[t+8]]+_n[e[t+9]]+"-"+_n[e[t+10]]+_n[e[t+11]]+_n[e[t+12]]+_n[e[t+13]]+_n[e[t+14]]+_n[e[t+15]]}const uO={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Hoe(e,t,n){if(uO.randomUUID&&!t&&!e)return uO.randomUUID();e=e||{};const r=e.random||(e.rng||Zoe)();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 qoe(r)}const Tf=e=>({block:e,type:"bubble"}),Woe=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},dO=({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(Woe)}),{type:"column",horizontalAlignment:"center",blocks:[...i]}},Voe=({choices:e,text:t})=>{const n=Hoe(),r=Tf({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}))}]}},Koe=({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}},fO=({type:e,audio:t})=>({payload:{type:e,url:t}}),pO=e=>({payload:Tf(dO(e))}),hO=({items:e})=>({payload:{type:"carousel",blocks:e.map(dO)}}),mO=e=>({disableInput:e.disableFreeText,payload:Voe(e)}),gO=e=>({disableInput:!0,payload:Tf(Koe(e))}),yO=({file:e,...t})=>({payload:{url:e,...t}}),vO=({type:e,image:t})=>({payload:{type:e,url:t}}),bO=({type:e,latitude:t,longitude:n,title:r,address:i})=>({payload:{type:e,latitude:t,longitude:n,title:r??i??"View on map"}}),Goe=({text:e,payload:t})=>({payload:{type:"text",text:e??t}}),ly=({type:e,text:t})=>({payload:Tf({type:e,text:t})}),wO=({type:e,video:t})=>({payload:{type:e,url:t}}),_O=e=>{switch(e.type){case"audio":return fO(e);case"card":return pO(e);case"carousel":return hO(e);case"single-choice":return mO(e);case"dropdown":return gO(e);case"file":return yO(e);case"image":return vO(e);case"location":return bO(e);case"quick_reply":return Goe(e);case"text":return ly(e);case"video":return wO(e);default:throw new Error("Unsuported message type")}},{webchatToMessaging:xr}=Boe,Yoe=e=>{const t=xr.audioAdapter(e);return fO(t)},Joe=e=>{const t=xr.cardAdapter(e);return pO(t)},Xoe=e=>{const t=xr.carouselAdapter(e);return hO(t)},Qoe=e=>{const t=xr.choiceAdapter(e);return mO(t)},eae=e=>{const t=xr.dropdownAdapter(e);return gO(t)},tae=e=>{const t=xr.fileAdapter(e);return yO(t)},nae=e=>{const t=xr.imageAdapter(e);return vO(t)},rae=e=>{const t=xr.locationAdapter(e);return bO(t)},iae=e=>{const t=xr.markdownAdapter(e);return ly(t)},oae=e=>{const t=xr.textAdapter(e);return ly(t)},aae=e=>{const t=xr.videoAdapter(e);return wO(t)},sae=e=>{switch(e.type){case"audio":return Yoe(e);case"card":return Joe(e);case"carousel":return Xoe(e);case"choice":return Qoe(e);case"dropdown":return eae(e);case"file":return tae(e);case"image":return nae(e);case"location":return rae(e);case"markdown":return iae(e);case"text":return oae(e);case"video":return aae(e);default:throw new Error("Unsuported message type")}};class xO{constructor(t){T(this,"socket");T(this,"clientId");T(this,"userId");T(this,"conversationId");T(this,"userToken");T(this,"connected",!1);T(this,"emitter");T(this,"on");T(this,"mode","messaging");this.socket=new nx.MessagingSocket(t),this.emitter=new zp,this.clientId=t.clientId,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=Ef.parse(r),{payload:o,disableInput:a}=_O(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 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=Ef.parse(r.payload),{payload:o,disableInput:a}=_O(i);return{...r,payload:o,disableInput:a}})}}function SO(e,t){return function(){return e.apply(t,arguments)}}const{toString:EO}=Object.prototype,{getPrototypeOf:cy}=Object,uy=(e=>t=>{const n=EO.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),bi=e=>(e=e.toLowerCase(),t=>uy(t)===e),kf=e=>t=>typeof t===e,{isArray:rs}=Array,zl=kf("undefined");function lae(e){return e!==null&&!zl(e)&&e.constructor!==null&&!zl(e.constructor)&&zo(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const CO=bi("ArrayBuffer");function cae(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&CO(e.buffer),t}const uae=kf("string"),zo=kf("function"),TO=kf("number"),dy=e=>e!==null&&typeof e=="object",dae=e=>e===!0||e===!1,Of=e=>{if(uy(e)!=="object")return!1;const t=cy(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},fae=bi("Date"),pae=bi("File"),hae=bi("Blob"),mae=bi("FileList"),gae=e=>dy(e)&&zo(e.pipe),yae=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||EO.call(e)===t||zo(e.toString)&&e.toString()===t)},vae=bi("URLSearchParams"),bae=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Zl(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),rs(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 kO(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 OO=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),AO=e=>!zl(e)&&e!==OO;function fy(){const{caseless:e}=AO(this)&&this||{},t={},n=(r,i)=>{const o=e&&kO(t,i)||i;Of(t[o])&&Of(r)?t[o]=fy(t[o],r):Of(r)?t[o]=fy({},r):rs(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Zl(arguments[r],n);return t}const wae=(e,t,n,{allOwnKeys:r}={})=>(Zl(t,(i,o)=>{n&&zo(i)?e[o]=SO(i,n):e[o]=i},{allOwnKeys:r}),e),_ae=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),xae=(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)},Sae=(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&&cy(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Eae=(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},Cae=e=>{if(!e)return null;if(rs(e))return e;let t=e.length;if(!TO(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Tae=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&cy(Uint8Array)),kae=(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])}},Oae=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Aae=bi("HTMLFormElement"),$ae=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),$O=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Pae=bi("RegExp"),PO=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Zl(n,(i,o)=>{t(i,o,e)!==!1&&(r[o]=i)}),Object.defineProperties(e,r)},ae={isArray:rs,isArrayBuffer:CO,isBuffer:lae,isFormData:yae,isArrayBufferView:cae,isString:uae,isNumber:TO,isBoolean:dae,isObject:dy,isPlainObject:Of,isUndefined:zl,isDate:fae,isFile:pae,isBlob:hae,isRegExp:Pae,isFunction:zo,isStream:gae,isURLSearchParams:vae,isTypedArray:Tae,isFileList:mae,forEach:Zl,merge:fy,extend:wae,trim:bae,stripBOM:_ae,inherits:xae,toFlatObject:Sae,kindOf:uy,kindOfTest:bi,endsWith:Eae,toArray:Cae,forEachEntry:kae,matchAll:Oae,isHTMLForm:Aae,hasOwnProperty:$O,hasOwnProp:$O,reduceDescriptors:PO,freezeMethods:e=>{PO(e,(t,n)=>{if(zo(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(zo(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 rs(e)?r(e):r(String(e).split(t)),n},toCamelCase:$ae,noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:kO,global:OO,isContextDefined:AO,toJSONObject:e=>{const t=new Array(10),n=(r,i)=>{if(dy(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=rs(r)?[]:{};return Zl(r,(a,s)=>{const l=n(a,i+1);!zl(l)&&(o[s]=l)}),t[i]=void 0,o}}return r};return n(e,0)}};function St(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)}ae.inherits(St,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:ae.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const IO=St.prototype,RO={};["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=>{RO[e]={value:e}}),Object.defineProperties(St,RO),Object.defineProperty(IO,"isAxiosError",{value:!0}),St.from=(e,t,n,r,i,o)=>{const a=Object.create(IO);return ae.toFlatObject(e,a,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),St.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};var Iae=typeof self=="object"?self.FormData:window.FormData;const Rae=ti(Iae);function py(e){return ae.isPlainObject(e)||ae.isArray(e)}function MO(e){return ae.endsWith(e,"[]")?e.slice(0,-2):e}function NO(e,t,n){return e?e.concat(t).map(function(i,o){return i=MO(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function Mae(e){return ae.isArray(e)&&!e.some(py)}const Nae=ae.toFlatObject(ae,{},null,function(t){return/^is[A-Z]/.test(t)});function Dae(e){return e&&ae.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function Af(e,t,n){if(!ae.isObject(e))throw new TypeError("target must be an object");t=t||new(Rae||FormData),n=ae.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,v){return!ae.isUndefined(v[m])});const r=n.metaTokens,i=n.visitor||u,o=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&Dae(t);if(!ae.isFunction(i))throw new TypeError("visitor must be a function");function c(h){if(h===null)return"";if(ae.isDate(h))return h.toISOString();if(!l&&ae.isBlob(h))throw new St("Blob is not supported. Use a Buffer instead.");return ae.isArrayBuffer(h)||ae.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,m,v){let g=h;if(h&&!v&&typeof h=="object"){if(ae.endsWith(m,"{}"))m=r?m:m.slice(0,-2),h=JSON.stringify(h);else if(ae.isArray(h)&&Mae(h)||ae.isFileList(h)||ae.endsWith(m,"[]")&&(g=ae.toArray(h)))return m=MO(m),g.forEach(function(b,x){!(ae.isUndefined(b)||b===null)&&t.append(a===!0?NO([m],x,o):a===null?m:m+"[]",c(b))}),!1}return py(h)?!0:(t.append(NO(v,m,o),c(h)),!1)}const d=[],p=Object.assign(Nae,{defaultVisitor:u,convertValue:c,isVisitable:py});function f(h,m){if(!ae.isUndefined(h)){if(d.indexOf(h)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(h),ae.forEach(h,function(g,y){(!(ae.isUndefined(g)||g===null)&&i.call(t,g,ae.isString(y)?y.trim():y,m,p))===!0&&f(g,m?m.concat(y):[y])}),d.pop()}}if(!ae.isObject(e))throw new TypeError("data must be an object");return f(e),t}function DO(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function hy(e,t){this._pairs=[],e&&Af(e,this,t)}const jO=hy.prototype;jO.append=function(t,n){this._pairs.push([t,n])},jO.toString=function(t){const n=t?function(r){return t.call(this,r,DO)}:DO;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function jae(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function LO(e,t,n){if(!t)return e;const r=n&&n.encode||jae,i=n&&n.serialize;let o;if(i?o=i(t,n):o=ae.isURLSearchParams(t)?t.toString():new hy(t,n).toString(r),o){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Lae{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){ae.forEach(this.handlers,function(r){r!==null&&t(r)})}}const FO=Lae,UO={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Fae=typeof URLSearchParams<"u"?URLSearchParams:hy,Uae=FormData,Bae=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),zae=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Wr={isBrowser:!0,classes:{URLSearchParams:Fae,FormData:Uae,Blob},isStandardBrowserEnv:Bae,isStandardBrowserWebWorkerEnv:zae,protocols:["http","https","file","blob","url","data"]};function Zae(e,t){return Af(e,new Wr.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Wr.isNode&&ae.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function qae(e){return ae.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Hae(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function BO(e){function t(n,r,i,o){let a=n[o++];const s=Number.isFinite(+a),l=o>=n.length;return a=!a&&ae.isArray(i)?i.length:a,l?(ae.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!s):((!i[a]||!ae.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&ae.isArray(i[a])&&(i[a]=Hae(i[a])),!s)}if(ae.isFormData(e)&&ae.isFunction(e.entries)){const n={};return ae.forEachEntry(e,(r,i)=>{t(qae(r),i,n,0)}),n}return null}const Wae={"Content-Type":void 0};function Vae(e,t,n){if(ae.isString(e))try{return(t||JSON.parse)(e),ae.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const $f={transitional:UO,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=ae.isObject(t);if(o&&ae.isHTMLForm(t)&&(t=new FormData(t)),ae.isFormData(t))return i&&i?JSON.stringify(BO(t)):t;if(ae.isArrayBuffer(t)||ae.isBuffer(t)||ae.isStream(t)||ae.isFile(t)||ae.isBlob(t))return t;if(ae.isArrayBufferView(t))return t.buffer;if(ae.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 Zae(t,this.formSerializer).toString();if((s=ae.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Af(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),Vae(t)):t}],transformResponse:[function(t){const n=this.transitional||$f.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&ae.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"?St.from(s,St.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:Wr.classes.FormData,Blob:Wr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};ae.forEach(["delete","get","head"],function(t){$f.headers[t]={}}),ae.forEach(["post","put","patch"],function(t){$f.headers[t]=ae.merge(Wae)});const my=$f,Kae=ae.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"]),Gae=e=>{const t={};let n,r,i;return e&&e.split(`
366
+ `+o):r.stack=o}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=es(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Qg.assertOptions(r,{silentJSONParsing:Ki.transitional(Ki.boolean),forcedJSONParsing:Ki.transitional(Ki.boolean),clarifyTimeoutError:Ki.transitional(Ki.boolean)},!1),i!=null&&(le.isFunction(i)?n.paramsSerializer={serialize:i}:Qg.assertOptions(i,{encode:Ki.function,serialize:Ki.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&le.merge(o.common,o[n.method]);o&&le.forEach(["delete","get","head","post","put","patch","common"],h=>{delete o[h]}),n.headers=vi.concat(a,o);const s=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,d=0,p;if(!l){const h=[UT.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,c),p=h.length,u=Promise.resolve(n);d<p;)u=u.then(h[d++],h[d++]);return u}p=s.length;let f=n;for(d=0;d<p;){const h=s[d++],m=s[d++];try{f=h(f)}catch(v){m.call(this,v);break}}try{u=UT.call(this,f)}catch(h){return Promise.reject(h)}for(d=0,p=c.length;d<p;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=es(this.defaults,t);const n=DT(t.baseURL,t.url);return AT(n,t.params,t.paramsSerializer)}};le.forEach(["delete","get","head","options"],function(t){xf.prototype[t]=function(n,r){return this.request(es(r||{},{method:t,url:n,data:(r||{}).data}))}}),le.forEach(["post","put","patch"],function(t){function n(r){return function(o,a,s){return this.request(es(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}xf.prototype[t]=n(),xf.prototype[t+"Form"]=n(!0)});const Sf=xf,pie=class XI{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 Bl(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 XI(function(i){t=i}),cancel:t}}};function hie(e){return function(n){return e.apply(null,n)}}function mie(e){return le.isObject(e)&&e.isAxiosError===!0}const ey={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(ey).forEach(([e,t])=>{ey[t]=e});const gie=ey;function qT(e){const t=new Sf(e),n=pT(Sf.prototype.request,t);return le.extend(n,Sf.prototype,t,{allOwnKeys:!0}),le.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return qT(es(e,i))},n}const Qt=qT(Vg);Qt.Axios=Sf,Qt.CanceledError=Bl,Qt.CancelToken=pie,Qt.isCancel=NT,Qt.VERSION=zT,Qt.toFormData=bf,Qt.AxiosError=wt,Qt.Cancel=Qt.CanceledError,Qt.all=function(t){return Promise.all(t)},Qt.spread=hie,Qt.isAxiosError=mie,Qt.mergeConfig=es,Qt.AxiosHeaders=vi,Qt.formToJSON=e=>RT(le.isHTMLForm(e)?new FormData(e):e),Qt.getAdapter=FT.getAdapter,Qt.HttpStatusCode=gie,Qt.default=Qt;const J=Qt,{Axios:yie,AxiosError:vie,CanceledError:bie,isCancel:wie,CancelToken:_ie,VERSION:xie,all:Sie,Cancel:Eie,isAxiosError:Cie,spread:Tie,toFormData:kie,AxiosHeaders:Oie,HttpStatusCode:Aie,formToJSON:$ie,getAdapter:Pie,mergeConfig:Iie}=J,Rie=Object.freeze(Object.defineProperty({__proto__:null,Axios:yie,AxiosError:vie,AxiosHeaders:Oie,Cancel:Eie,CancelToken:_ie,CanceledError:bie,HttpStatusCode:Aie,VERSION:xie,all:Sie,default:J,formToJSON:$ie,getAdapter:Pie,isAxiosError:Cie,isCancel:wie,mergeConfig:Iie,spread:Tie,toFormData:kie},Symbol.toStringTag,{value:"Module"}));var ts={};Object.defineProperty(ts,"__esModule",{value:!0});var Mie=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},Nie=typeof window<"u"&&typeof window.document<"u",Die=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,jie=(typeof self>"u"?"undefined":Mie(self))==="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope",Lie=typeof window<"u"&&window.name==="nodejs"||typeof navigator<"u"&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),Fie=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u",HT=ts.isBrowser=Nie;ts.isWebWorker=jie;var ty=ts.isNode=Die;ts.isJsDom=Lie,ts.isDeno=Fie;var Uie=Object.create,WT=Object.defineProperty,Bie=Object.getOwnPropertyDescriptor,zie=Object.getOwnPropertyNames,Zie=Object.getPrototypeOf,qie=Object.prototype.hasOwnProperty,VT=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Hie=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of zie(t))!qie.call(e,i)&&i!==n&&WT(e,i,{get:()=>t[i],enumerable:!(r=Bie(t,i))||r.enumerable});return e},KT=(e,t,n)=>(n=e!=null?Uie(Zie(e)):{},Hie(t||!e||!e.__esModule?WT(n,"default",{value:e,enumerable:!0}):n,e)),Wie=VT(()=>{}),Vie=VT(()=>{}),Kie=KT(Wie()),Gie=KT(Vie()),Yie="https://api.botpress.cloud",Jie=6e4,Xie="BP_API_URL",Qie="BP_BOT_ID",eoe="BP_INTEGRATION_ID",toe="BP_WORKSPACE_ID",noe="BP_TOKEN";function roe(e){let t=ioe(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??Yie,i=t.timeout??Jie;return{apiUrl:r,timeout:i,withCredentials:HT,headers:n}}function ioe(e){return HT?e:ty?ooe(e):e}function ooe(e){let t={...e,apiUrl:e.apiUrl??process.env[Xie],botId:e.botId??process.env[Qie],integrationId:e.integrationId??process.env[eoe],workspaceId:e.workspaceId??process.env[toe]},n=t.token??process.env[noe];return n&&(t.token=n),t}var Q="https://api.botpress.cloud".replace(/\/+$/,""),aoe=class{constructor(e,t=Q,n=J){T(this,"configuration");this.basePath=t,this.axios=n,e&&(this.configuration=e,this.basePath=e.basePath||this.basePath)}},soe=class extends Error{constructor(e,t){super(t),this.field=e,this.name="RequiredError"}},ee="https://example.com",ce=function(e,t,n){if(n==null)throw new soe(t,`Required parameter ${t} was null or undefined when calling ${e}.`)};function ny(e,t,n=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(r=>ny(e,r,n)):Object.keys(t).forEach(r=>ny(e,t[r],`${n}${n!==""?".":""}${r}`)):e.has(n)?e.append(n,t):e.set(n,t))}var te=function(e,...t){let n=new URLSearchParams(e.search);ny(n,t),e.search=n.toString()},Ye=function(e,t,n){let r=typeof e!="string";return(r&&n&&n.isJsonMime?n.isJsonMime(t.headers["Content-Type"]):r)?JSON.stringify(e!==void 0?e:{}):e||""},ne=function(e){return e.pathname+e.search+e.hash},re=function(e,t,n,r){return(i=t,o=n)=>{let a={...e.options,url:((r==null?void 0:r.basePath)||o)+e.url};return i.request(a)}},loe=function(e){return{addParticipant:async(t,n,r={})=>{ce("addParticipant","id",t);let i="/v1/chat/conversations/{id}/participants".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"POST",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},breakDownWorkspaceUsageByBot:async(t,n,r,i={})=>{ce("breakDownWorkspaceUsageByBot","id",t),ce("breakDownWorkspaceUsageByBot","type",n);let o="/v1/admin/workspaces/{id}/usages/by-bot".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,ee),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...i},c={},u={};n!==void 0&&(u.type=n),r!==void 0&&(u.period=r),te(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...i.headers},{url:ne(a),options:l}},callAction:async(t,n={})=>{let r="/v1/chat/actions",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},changeAISpendQuota:async(t,n={})=>{let r="/v1/admin/quotas/ai-spend",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"PUT",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},chargeWorkspaceUnpaidInvoices:async(t,n,r={})=>{ce("chargeWorkspaceUnpaidInvoices","id",t);let i="/v1/admin/workspaces/{id}/billing/invoices/charge-unpaid".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"POST",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},checkHandleAvailability:async(t,n={})=>{let r="/v1/admin/workspaces/handle-availability",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"PUT",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},configureIntegration:async(t,n={})=>{let r="/v1/chat/integrations/configure",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},createBot:async(t,n={})=>{let r="/v1/admin/bots",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},createConversation:async(t,n={})=>{let r="/v1/chat/conversations",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},createEvent:async(t,n={})=>{let r="/v1/chat/events",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},createFile:async(t,n={})=>{let r="/v1/files",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},createIntegration:async(t,n={})=>{let r="/v1/admin/integrations",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},createIntegrationApiKey:async(t,n={})=>{let r="/v1/admin/integrations/iaks",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},createMessage:async(t,n={})=>{let r="/v1/chat/messages",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},createPersonalAccessToken:async(t,n={})=>{let r="/v1/admin/account/pats",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},createTable:async(t,n={})=>{let r="/v1/tables",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},createTableRows:async(t,n,r={})=>{ce("createTableRows","table",t);let i="/v1/tables/{table}/rows".replace("{table}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"POST",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},createTask:async(t,n={})=>{let r="/v1/chat/tasks",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},createUser:async(t,n={})=>{let r="/v1/chat/users",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},createWorkspace:async(t,n={})=>{let r="/v1/admin/workspaces",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},createWorkspaceMember:async(t,n={})=>{let r="/v1/admin/workspace-members",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},deleteBot:async(t,n={})=>{ce("deleteBot","id",t);let r="/v1/admin/bots/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"DELETE",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},deleteBotIssue:async(t,n,r={})=>{ce("deleteBotIssue","id",t),ce("deleteBotIssue","issueId",n);let i="/v1/admin/bots/{id}/issues/{issueId}".replace("{id}",encodeURIComponent(String(t))).replace("{issueId}",encodeURIComponent(String(n))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"DELETE",...a,...r},l={};te(o,{});let c=a&&a.headers?a.headers:{};return s.headers={...l,...c,...r.headers},{url:ne(o),options:s}},deleteConversation:async(t,n={})=>{ce("deleteConversation","id",t);let r="/v1/chat/conversations/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"DELETE",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},deleteFile:async(t,n={})=>{ce("deleteFile","id",t);let r="/v1/files/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"DELETE",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},deleteIntegration:async(t,n={})=>{ce("deleteIntegration","id",t);let r="/v1/admin/integrations/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"DELETE",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},deleteIntegrationApiKey:async(t,n={})=>{ce("deleteIntegrationApiKey","id",t);let r="/v1/admin/integrations/iaks/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"DELETE",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},deleteMessage:async(t,n={})=>{ce("deleteMessage","id",t);let r="/v1/chat/messages/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"DELETE",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},deletePersonalAccessToken:async(t,n={})=>{ce("deletePersonalAccessToken","id",t);let r="/v1/admin/account/pats/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"DELETE",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},deleteTable:async(t,n={})=>{ce("deleteTable","table",t);let r="/v1/tables/{table}".replace("{table}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"DELETE",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},deleteTableRows:async(t,n,r={})=>{ce("deleteTableRows","table",t);let i="/v1/tables/{table}/rows/delete".replace("{table}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"POST",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},deleteTask:async(t,n={})=>{ce("deleteTask","id",t);let r="/v1/chat/tasks/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"DELETE",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},deleteUser:async(t,n={})=>{ce("deleteUser","id",t);let r="/v1/chat/users/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"DELETE",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},deleteWorkspace:async(t,n={})=>{ce("deleteWorkspace","id",t);let r="/v1/admin/workspaces/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"DELETE",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},deleteWorkspaceMember:async(t,n={})=>{ce("deleteWorkspaceMember","id",t);let r="/v1/admin/workspace-members/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"DELETE",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},duplicateTable:async(t,n,r={})=>{ce("duplicateTable","sourceTableId",t);let i="/v1/tables/{sourceTableId}/duplicate".replace("{sourceTableId}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"POST",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},findTableRows:async(t,n,r={})=>{ce("findTableRows","table",t);let i="/v1/tables/{table}/rows/find".replace("{table}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"POST",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},getAccount:async(t={})=>{let n="/v1/admin/account/me",r=new URL(n,ee),i;e&&(i=e.baseOptions);let o={method:"GET",...i,...t},a={};te(r,{});let s=i&&i.headers?i.headers:{};return o.headers={...a,...s,...t.headers},{url:ne(r),options:o}},getAccountPreference:async(t,n={})=>{ce("getAccountPreference","key",t);let r="/v1/admin/account/preferences/{key}".replace("{key}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},getAllWorkspaceQuotaCompletion:async(t={})=>{let n="/v1/admin/workspaces/usages/quota-completion",r=new URL(n,ee),i;e&&(i=e.baseOptions);let o={method:"GET",...i,...t},a={};te(r,{});let s=i&&i.headers?i.headers:{};return o.headers={...a,...s,...t.headers},{url:ne(r),options:o}},getAuditRecords:async(t,n,r={})=>{ce("getAuditRecords","id",t);let i="/v1/admin/workspaces/{id}/audit-records".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...r},l={},c={};n!==void 0&&(c.nextToken=n),te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},{url:ne(o),options:s}},getBot:async(t,n={})=>{ce("getBot","id",t);let r="/v1/admin/bots/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},getBotAnalytics:async(t,n,r,i={})=>{ce("getBotAnalytics","id",t),ce("getBotAnalytics","startDate",n),ce("getBotAnalytics","endDate",r);let o="/v1/admin/bots/{id}/analytics".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,ee),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...i},c={},u={};n!==void 0&&(u.startDate=n),r!==void 0&&(u.endDate=r),te(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...i.headers},{url:ne(a),options:l}},getBotLogs:async(t,n,r,i,o={})=>{ce("getBotLogs","id",t),ce("getBotLogs","timeStart",n),ce("getBotLogs","timeEnd",r);let a="/v1/admin/bots/{id}/logs".replace("{id}",encodeURIComponent(String(t))),s=new URL(a,ee),l;e&&(l=e.baseOptions);let c={method:"GET",...l,...o},u={},d={};n!==void 0&&(d.timeStart=n),r!==void 0&&(d.timeEnd=r),i!==void 0&&(d.nextToken=i),te(s,d);let p=l&&l.headers?l.headers:{};return c.headers={...u,...p,...o.headers},{url:ne(s),options:c}},getBotWebchat:async(t,n,r={})=>{ce("getBotWebchat","id",t),ce("getBotWebchat","type",n);let i="/v1/admin/bots/{id}/webchat".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...r},l={},c={};n!==void 0&&(c.type=n),te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},{url:ne(o),options:s}},getConversation:async(t,n={})=>{ce("getConversation","id",t);let r="/v1/chat/conversations/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},getEvent:async(t,n={})=>{ce("getEvent","id",t);let r="/v1/chat/events/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},getFileContent:async(t,n={})=>{ce("getFileContent","id",t);let r="/v1/files/{id}/content".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},getFileMetadata:async(t,n={})=>{ce("getFileMetadata","id",t);let r="/v1/files/{id}/metadata".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},getIntegration:async(t,n={})=>{ce("getIntegration","id",t);let r="/v1/admin/integrations/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},getIntegrationByName:async(t,n,r={})=>{ce("getIntegrationByName","name",t),ce("getIntegrationByName","version",n);let i="/v1/admin/integrations/{name}/{version}".replace("{name}",encodeURIComponent(String(t))).replace("{version}",encodeURIComponent(String(n))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...r},l={};te(o,{});let c=a&&a.headers?a.headers:{};return s.headers={...l,...c,...r.headers},{url:ne(o),options:s}},getIntegrationLogs:async(t,n,r,i,o={})=>{ce("getIntegrationLogs","id",t),ce("getIntegrationLogs","timeStart",n),ce("getIntegrationLogs","timeEnd",r);let a="/v1/admin/integrations/{id}/logs".replace("{id}",encodeURIComponent(String(t))),s=new URL(a,ee),l;e&&(l=e.baseOptions);let c={method:"GET",...l,...o},u={},d={};n!==void 0&&(d.timeStart=n),r!==void 0&&(d.timeEnd=r),i!==void 0&&(d.nextToken=i),te(s,d);let p=l&&l.headers?l.headers:{};return c.headers={...u,...p,...o.headers},{url:ne(s),options:c}},getMessage:async(t,n={})=>{ce("getMessage","id",t);let r="/v1/chat/messages/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},getOrCreateConversation:async(t,n={})=>{let r="/v1/chat/conversations/get-or-create",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},getOrCreateMessage:async(t,n={})=>{let r="/v1/chat/messages/get-or-create",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},getOrCreateTable:async(t,n,r={})=>{ce("getOrCreateTable","table",t);let i="/v1/tables/{table}".replace("{table}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"POST",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},getOrCreateUser:async(t,n={})=>{let r="/v1/chat/users/get-or-create",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},getOrSetState:async(t,n,r,i,o={})=>{ce("getOrSetState","type",t),ce("getOrSetState","id",n),ce("getOrSetState","name",r);let a="/v1/chat/states/{type}/{id}/{name}/get-or-set".replace("{type}",encodeURIComponent(String(t))).replace("{id}",encodeURIComponent(String(n))).replace("{name}",encodeURIComponent(String(r))),s=new URL(a,ee),l;e&&(l=e.baseOptions);let c={method:"POST",...l,...o},u={},d={};u["Content-Type"]="application/json",te(s,d);let p=l&&l.headers?l.headers:{};return c.headers={...u,...p,...o.headers},c.data=Ye(i,c,e),{url:ne(s),options:c}},getParticipant:async(t,n,r={})=>{ce("getParticipant","id",t),ce("getParticipant","userId",n);let i="/v1/chat/conversations/{id}/participants/{userId}".replace("{id}",encodeURIComponent(String(t))).replace("{userId}",encodeURIComponent(String(n))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...r},l={};te(o,{});let c=a&&a.headers?a.headers:{};return s.headers={...l,...c,...r.headers},{url:ne(o),options:s}},getPublicIntegration:async(t,n,r={})=>{ce("getPublicIntegration","name",t),ce("getPublicIntegration","version",n);let i="/v1/admin/hub/integrations/{name}/{version}".replace("{name}",encodeURIComponent(String(t))).replace("{version}",encodeURIComponent(String(n))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...r},l={};te(o,{});let c=a&&a.headers?a.headers:{};return s.headers={...l,...c,...r.headers},{url:ne(o),options:s}},getPublicIntegrationById:async(t,n={})=>{ce("getPublicIntegrationById","id",t);let r="/v1/admin/hub/integrations/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},getPublicWorkspace:async(t,n={})=>{ce("getPublicWorkspace","id",t);let r="/v1/admin/workspaces/{id}/public".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},getState:async(t,n,r,i={})=>{ce("getState","type",t),ce("getState","id",n),ce("getState","name",r);let o="/v1/chat/states/{type}/{id}/{name}".replace("{type}",encodeURIComponent(String(t))).replace("{id}",encodeURIComponent(String(n))).replace("{name}",encodeURIComponent(String(r))),a=new URL(o,ee),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...i},c={};te(a,{});let u=s&&s.headers?s.headers:{};return l.headers={...c,...u,...i.headers},{url:ne(a),options:l}},getTable:async(t,n={})=>{ce("getTable","table",t);let r="/v1/tables/{table}".replace("{table}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},getTableRow:async(t,n,r={})=>{ce("getTableRow","table",t),ce("getTableRow","id",n);let i="/v1/tables/{table}/row".replace("{table}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...r},l={},c={};n!==void 0&&(c.id=n),te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},{url:ne(o),options:s}},getTask:async(t,n={})=>{ce("getTask","id",t);let r="/v1/chat/tasks/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},getUpcomingInvoice:async(t,n={})=>{ce("getUpcomingInvoice","id",t);let r="/v1/admin/workspaces/{id}/billing/upcoming-invoice".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},getUsage:async(t,n,r,i={})=>{ce("getUsage","type",t),ce("getUsage","id",n);let o="/v1/admin/usages/{id}".replace("{id}",encodeURIComponent(String(n))),a=new URL(o,ee),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...i},c={},u={};t!==void 0&&(u.type=t),r!==void 0&&(u.period=r),te(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...i.headers},{url:ne(a),options:l}},getUser:async(t,n={})=>{ce("getUser","id",t);let r="/v1/chat/users/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},getWorkspace:async(t,n={})=>{ce("getWorkspace","id",t);let r="/v1/admin/workspaces/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},getWorkspaceQuota:async(t,n,r,i={})=>{ce("getWorkspaceQuota","id",t),ce("getWorkspaceQuota","type",n);let o="/v1/admin/workspaces/{id}/quota".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,ee),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...i},c={},u={};n!==void 0&&(u.type=n),r!==void 0&&(u.period=r),te(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...i.headers},{url:ne(a),options:l}},introspect:async(t,n={})=>{let r="/v1/admin/introspect",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},listActivities:async(t,n,r,i={})=>{ce("listActivities","taskId",t),ce("listActivities","botId",n);let o="/v1/admin/activities",a=new URL(o,ee),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...i},c={},u={};r!==void 0&&(u.nextToken=r),t!==void 0&&(u.taskId=t),n!==void 0&&(u.botId=n),te(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...i.headers},{url:ne(a),options:l}},listBotIssueEvents:async(t,n,r={})=>{ce("listBotIssueEvents","id",t),ce("listBotIssueEvents","issueId",n);let i="/v1/admin/bots/{id}/issues/{issueId}/events".replace("{id}",encodeURIComponent(String(t))).replace("{issueId}",encodeURIComponent(String(n))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...r},l={};te(o,{});let c=a&&a.headers?a.headers:{};return s.headers={...l,...c,...r.headers},{url:ne(o),options:s}},listBotIssues:async(t,n,r={})=>{ce("listBotIssues","id",t);let i="/v1/admin/bots/{id}/issues".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...r},l={},c={};n!==void 0&&(c.nextToken=n),te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},{url:ne(o),options:s}},listBots:async(t,n,r={})=>{let i="/v1/admin/bots",o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...r},l={},c={};t!==void 0&&(c.dev=t),n!==void 0&&(c.nextToken=n),te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},{url:ne(o),options:s}},listConversations:async(t,n,r,i={})=>{let o="/v1/chat/conversations",a=new URL(o,ee),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...i},c={},u={};t!==void 0&&(u.nextToken=t),n!==void 0&&(u.tags=n),r&&(u.participantIds=r),te(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...i.headers},{url:ne(a),options:l}},listEvents:async(t,n,r,i,o,a,s={})=>{let l="/v1/chat/events",c=new URL(l,ee),u;e&&(u=e.baseOptions);let d={method:"GET",...u,...s},p={},f={};t!==void 0&&(f.nextToken=t),n!==void 0&&(f.type=n),r!==void 0&&(f.conversationId=r),i!==void 0&&(f.userId=i),o!==void 0&&(f.messageId=o),a!==void 0&&(f.status=a),te(c,f);let h=u&&u.headers?u.headers:{};return d.headers={...p,...h,...s.headers},{url:ne(c),options:d}},listFiles:async(t,n,r,i={})=>{ce("listFiles","botId",t);let o="/v1/files/bot/{botId}".replace("{botId}",encodeURIComponent(String(t))),a=new URL(o,ee),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...i},c={},u={};n!==void 0&&(u.nextToken=n),r!==void 0&&(u.tags=r),te(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...i.headers},{url:ne(a),options:l}},listIntegrationApiKeys:async(t,n={})=>{ce("listIntegrationApiKeys","integrationId",t);let r="/v1/admin/integrations/iaks",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={},l={};t!==void 0&&(l.integrationId=t),te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},{url:ne(i),options:a}},listIntegrations:async(t,n,r,i,o={})=>{let a="/v1/admin/integrations",s=new URL(a,ee),l;e&&(l=e.baseOptions);let c={method:"GET",...l,...o},u={},d={};t!==void 0&&(d.nextToken=t),n!==void 0&&(d.name=n),r!==void 0&&(d.version=r),i!==void 0&&(d.dev=i),te(s,d);let p=l&&l.headers?l.headers:{};return c.headers={...u,...p,...o.headers},{url:ne(s),options:c}},listMessages:async(t,n,r,i={})=>{let o="/v1/chat/messages",a=new URL(o,ee),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...i},c={},u={};t!==void 0&&(u.nextToken=t),n!==void 0&&(u.conversationId=n),r!==void 0&&(u.tags=r),te(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...i.headers},{url:ne(a),options:l}},listParticipants:async(t,n,r={})=>{ce("listParticipants","id",t);let i="/v1/chat/conversations/{id}/participants".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...r},l={},c={};n!==void 0&&(c.nextToken=n),te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},{url:ne(o),options:s}},listPersonalAccessTokens:async(t={})=>{let n="/v1/admin/account/pats",r=new URL(n,ee),i;e&&(i=e.baseOptions);let o={method:"GET",...i,...t},a={};te(r,{});let s=i&&i.headers?i.headers:{};return o.headers={...a,...s,...t.headers},{url:ne(r),options:o}},listPublicIntegrations:async(t,n,r,i={})=>{let o="/v1/admin/hub/integrations",a=new URL(o,ee),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...i},c={},u={};t!==void 0&&(u.nextToken=t),n!==void 0&&(u.name=n),r!==void 0&&(u.version=r),te(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...i.headers},{url:ne(a),options:l}},listTables:async(t,n={})=>{let r="/v1/tables",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={},l={};t!==void 0&&(l.tags=t),te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},{url:ne(i),options:a}},listTasks:async(t,n,r,i,o,a,s,l={})=>{let c="/v1/chat/tasks",u=new URL(c,ee),d;e&&(d=e.baseOptions);let p={method:"GET",...d,...l},f={},h={};t!==void 0&&(h.nextToken=t),n!==void 0&&(h.tags=n),r!==void 0&&(h.conversationId=r),i!==void 0&&(h.userId=i),o!==void 0&&(h.parentTaskId=o),a&&(h.status=a),s!==void 0&&(h.type=s),te(u,h);let m=d&&d.headers?d.headers:{};return p.headers={...f,...m,...l.headers},{url:ne(u),options:p}},listUsageHistory:async(t,n,r={})=>{ce("listUsageHistory","type",t),ce("listUsageHistory","id",n);let i="/v1/admin/usages/{id}/history".replace("{id}",encodeURIComponent(String(n))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...r},l={},c={};t!==void 0&&(c.type=t),te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},{url:ne(o),options:s}},listUsers:async(t,n,r,i={})=>{let o="/v1/chat/users",a=new URL(o,ee),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...i},c={},u={};t!==void 0&&(u.nextToken=t),n!==void 0&&(u.conversationId=n),r!==void 0&&(u.tags=r),te(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...i.headers},{url:ne(a),options:l}},listWorkspaceInvoices:async(t,n={})=>{ce("listWorkspaceInvoices","id",t);let r="/v1/admin/workspaces/{id}/billing/invoices".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={};te(i,{});let l=o&&o.headers?o.headers:{};return a.headers={...s,...l,...n.headers},{url:ne(i),options:a}},listWorkspaceMembers:async(t,n={})=>{let r="/v1/admin/workspace-members",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={},l={};t!==void 0&&(l.nextToken=t),te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},{url:ne(i),options:a}},listWorkspaceQuotas:async(t,n,r={})=>{ce("listWorkspaceQuotas","id",t);let i="/v1/admin/workspaces/{id}/quotas".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"GET",...a,...r},l={},c={};n!==void 0&&(c.period=n),te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},{url:ne(o),options:s}},listWorkspaceUsages:async(t,n,r,i={})=>{ce("listWorkspaceUsages","id",t),ce("listWorkspaceUsages","type",n);let o="/v1/admin/workspaces/{id}/usages".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,ee),s;e&&(s=e.baseOptions);let l={method:"GET",...s,...i},c={},u={};n!==void 0&&(u.type=n),r!==void 0&&(u.period=r),te(a,u);let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...i.headers},{url:ne(a),options:l}},listWorkspaces:async(t,n={})=>{let r="/v1/admin/workspaces",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"GET",...o,...n},s={},l={};t!==void 0&&(l.nextToken=t),te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},{url:ne(i),options:a}},patchState:async(t,n,r,i,o={})=>{ce("patchState","type",t),ce("patchState","id",n),ce("patchState","name",r);let a="/v1/chat/states/{type}/{id}/{name}".replace("{type}",encodeURIComponent(String(t))).replace("{id}",encodeURIComponent(String(n))).replace("{name}",encodeURIComponent(String(r))),s=new URL(a,ee),l;e&&(l=e.baseOptions);let c={method:"PATCH",...l,...o},u={},d={};u["Content-Type"]="application/json",te(s,d);let p=l&&l.headers?l.headers:{};return c.headers={...u,...p,...o.headers},c.data=Ye(i,c,e),{url:ne(s),options:c}},removeParticipant:async(t,n,r={})=>{ce("removeParticipant","id",t),ce("removeParticipant","userId",n);let i="/v1/chat/conversations/{id}/participants/{userId}".replace("{id}",encodeURIComponent(String(t))).replace("{userId}",encodeURIComponent(String(n))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"DELETE",...a,...r},l={};te(o,{});let c=a&&a.headers?a.headers:{};return s.headers={...l,...c,...r.headers},{url:ne(o),options:s}},renameTableColumn:async(t,n,r={})=>{ce("renameTableColumn","table",t);let i="/v1/tables/{table}/column".replace("{table}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},runVrl:async(t,n={})=>{let r="/v1/admin/helper/vrl",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},searchFiles:async(t,n,r,i,o,a={})=>{ce("searchFiles","botId",t),ce("searchFiles","query",n);let s="/v1/files/bot/{botId}/search".replace("{botId}",encodeURIComponent(String(t))),l=new URL(s,ee),c;e&&(c=e.baseOptions);let u={method:"GET",...c,...a},d={},p={};r!==void 0&&(p.tags=r),n!==void 0&&(p.query=n),i!==void 0&&(p.contextDepth=i),o!==void 0&&(p.limit=o),te(l,p);let f=c&&c.headers?c.headers:{};return u.headers={...d,...f,...a.headers},{url:ne(l),options:u}},setAccountPreference:async(t,n,r={})=>{ce("setAccountPreference","key",t);let i="/v1/admin/account/preferences/{key}".replace("{key}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"POST",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},setState:async(t,n,r,i,o={})=>{ce("setState","type",t),ce("setState","id",n),ce("setState","name",r);let a="/v1/chat/states/{type}/{id}/{name}".replace("{type}",encodeURIComponent(String(t))).replace("{id}",encodeURIComponent(String(n))).replace("{name}",encodeURIComponent(String(r))),s=new URL(a,ee),l;e&&(l=e.baseOptions);let c={method:"POST",...l,...o},u={},d={};u["Content-Type"]="application/json",te(s,d);let p=l&&l.headers?l.headers:{};return c.headers={...u,...p,...o.headers},c.data=Ye(i,c,e),{url:ne(s),options:c}},setWorkspacePaymentMethod:async(t,n,r={})=>{ce("setWorkspacePaymentMethod","id",t);let i="/v1/admin/workspaces/{id}/billing/payment-method".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},trackAnalytics:async(t,n={})=>{let r="/v1/chat/analytics",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"POST",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},transferBot:async(t,n,r={})=>{ce("transferBot","id",t);let i="/v1/admin/bots/{id}/transfer".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"POST",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},updateAccount:async(t,n={})=>{let r="/v1/admin/account/me",i=new URL(r,ee),o;e&&(o=e.baseOptions);let a={method:"PUT",...o,...n},s={},l={};s["Content-Type"]="application/json",te(i,l);let c=o&&o.headers?o.headers:{};return a.headers={...s,...c,...n.headers},a.data=Ye(t,a,e),{url:ne(i),options:a}},updateBot:async(t,n,r={})=>{ce("updateBot","id",t);let i="/v1/admin/bots/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},updateConversation:async(t,n,r={})=>{ce("updateConversation","id",t);let i="/v1/chat/conversations/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},updateFileMetadata:async(t,n,r={})=>{ce("updateFileMetadata","id",t);let i="/v1/files/{id}/metadata".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},updateIntegration:async(t,n,r={})=>{ce("updateIntegration","id",t);let i="/v1/admin/integrations/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},updateMessage:async(t,n,r={})=>{ce("updateMessage","id",t);let i="/v1/chat/messages/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},updateTable:async(t,n,r={})=>{ce("updateTable","table",t);let i="/v1/tables/{table}".replace("{table}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},updateTableRows:async(t,n,r={})=>{ce("updateTableRows","table",t);let i="/v1/tables/{table}/rows".replace("{table}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},updateTask:async(t,n,r={})=>{ce("updateTask","id",t);let i="/v1/chat/tasks/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},updateUser:async(t,n,r={})=>{ce("updateUser","id",t);let i="/v1/chat/users/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},updateWorkspace:async(t,n,r={})=>{ce("updateWorkspace","id",t);let i="/v1/admin/workspaces/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},updateWorkspaceMember:async(t,n,r={})=>{ce("updateWorkspaceMember","id",t);let i="/v1/admin/workspace-members/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"PUT",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}},upsertTableRows:async(t,n,r={})=>{ce("upsertTableRows","table",t);let i="/v1/tables/{table}/rows/upsert".replace("{table}",encodeURIComponent(String(t))),o=new URL(i,ee),a;e&&(a=e.baseOptions);let s={method:"POST",...a,...r},l={},c={};l["Content-Type"]="application/json",te(o,c);let u=a&&a.headers?a.headers:{};return s.headers={...l,...u,...r.headers},s.data=Ye(n,s,e),{url:ne(o),options:s}}}},ie=function(e){let t=loe(e);return{async addParticipant(n,r,i){let o=await t.addParticipant(n,r,i);return re(o,J,Q,e)},async breakDownWorkspaceUsageByBot(n,r,i,o){let a=await t.breakDownWorkspaceUsageByBot(n,r,i,o);return re(a,J,Q,e)},async callAction(n,r){let i=await t.callAction(n,r);return re(i,J,Q,e)},async changeAISpendQuota(n,r){let i=await t.changeAISpendQuota(n,r);return re(i,J,Q,e)},async chargeWorkspaceUnpaidInvoices(n,r,i){let o=await t.chargeWorkspaceUnpaidInvoices(n,r,i);return re(o,J,Q,e)},async checkHandleAvailability(n,r){let i=await t.checkHandleAvailability(n,r);return re(i,J,Q,e)},async configureIntegration(n,r){let i=await t.configureIntegration(n,r);return re(i,J,Q,e)},async createBot(n,r){let i=await t.createBot(n,r);return re(i,J,Q,e)},async createConversation(n,r){let i=await t.createConversation(n,r);return re(i,J,Q,e)},async createEvent(n,r){let i=await t.createEvent(n,r);return re(i,J,Q,e)},async createFile(n,r){let i=await t.createFile(n,r);return re(i,J,Q,e)},async createIntegration(n,r){let i=await t.createIntegration(n,r);return re(i,J,Q,e)},async createIntegrationApiKey(n,r){let i=await t.createIntegrationApiKey(n,r);return re(i,J,Q,e)},async createMessage(n,r){let i=await t.createMessage(n,r);return re(i,J,Q,e)},async createPersonalAccessToken(n,r){let i=await t.createPersonalAccessToken(n,r);return re(i,J,Q,e)},async createTable(n,r){let i=await t.createTable(n,r);return re(i,J,Q,e)},async createTableRows(n,r,i){let o=await t.createTableRows(n,r,i);return re(o,J,Q,e)},async createTask(n,r){let i=await t.createTask(n,r);return re(i,J,Q,e)},async createUser(n,r){let i=await t.createUser(n,r);return re(i,J,Q,e)},async createWorkspace(n,r){let i=await t.createWorkspace(n,r);return re(i,J,Q,e)},async createWorkspaceMember(n,r){let i=await t.createWorkspaceMember(n,r);return re(i,J,Q,e)},async deleteBot(n,r){let i=await t.deleteBot(n,r);return re(i,J,Q,e)},async deleteBotIssue(n,r,i){let o=await t.deleteBotIssue(n,r,i);return re(o,J,Q,e)},async deleteConversation(n,r){let i=await t.deleteConversation(n,r);return re(i,J,Q,e)},async deleteFile(n,r){let i=await t.deleteFile(n,r);return re(i,J,Q,e)},async deleteIntegration(n,r){let i=await t.deleteIntegration(n,r);return re(i,J,Q,e)},async deleteIntegrationApiKey(n,r){let i=await t.deleteIntegrationApiKey(n,r);return re(i,J,Q,e)},async deleteMessage(n,r){let i=await t.deleteMessage(n,r);return re(i,J,Q,e)},async deletePersonalAccessToken(n,r){let i=await t.deletePersonalAccessToken(n,r);return re(i,J,Q,e)},async deleteTable(n,r){let i=await t.deleteTable(n,r);return re(i,J,Q,e)},async deleteTableRows(n,r,i){let o=await t.deleteTableRows(n,r,i);return re(o,J,Q,e)},async deleteTask(n,r){let i=await t.deleteTask(n,r);return re(i,J,Q,e)},async deleteUser(n,r){let i=await t.deleteUser(n,r);return re(i,J,Q,e)},async deleteWorkspace(n,r){let i=await t.deleteWorkspace(n,r);return re(i,J,Q,e)},async deleteWorkspaceMember(n,r){let i=await t.deleteWorkspaceMember(n,r);return re(i,J,Q,e)},async duplicateTable(n,r,i){let o=await t.duplicateTable(n,r,i);return re(o,J,Q,e)},async findTableRows(n,r,i){let o=await t.findTableRows(n,r,i);return re(o,J,Q,e)},async getAccount(n){let r=await t.getAccount(n);return re(r,J,Q,e)},async getAccountPreference(n,r){let i=await t.getAccountPreference(n,r);return re(i,J,Q,e)},async getAllWorkspaceQuotaCompletion(n){let r=await t.getAllWorkspaceQuotaCompletion(n);return re(r,J,Q,e)},async getAuditRecords(n,r,i){let o=await t.getAuditRecords(n,r,i);return re(o,J,Q,e)},async getBot(n,r){let i=await t.getBot(n,r);return re(i,J,Q,e)},async getBotAnalytics(n,r,i,o){let a=await t.getBotAnalytics(n,r,i,o);return re(a,J,Q,e)},async getBotLogs(n,r,i,o,a){let s=await t.getBotLogs(n,r,i,o,a);return re(s,J,Q,e)},async getBotWebchat(n,r,i){let o=await t.getBotWebchat(n,r,i);return re(o,J,Q,e)},async getConversation(n,r){let i=await t.getConversation(n,r);return re(i,J,Q,e)},async getEvent(n,r){let i=await t.getEvent(n,r);return re(i,J,Q,e)},async getFileContent(n,r){let i=await t.getFileContent(n,r);return re(i,J,Q,e)},async getFileMetadata(n,r){let i=await t.getFileMetadata(n,r);return re(i,J,Q,e)},async getIntegration(n,r){let i=await t.getIntegration(n,r);return re(i,J,Q,e)},async getIntegrationByName(n,r,i){let o=await t.getIntegrationByName(n,r,i);return re(o,J,Q,e)},async getIntegrationLogs(n,r,i,o,a){let s=await t.getIntegrationLogs(n,r,i,o,a);return re(s,J,Q,e)},async getMessage(n,r){let i=await t.getMessage(n,r);return re(i,J,Q,e)},async getOrCreateConversation(n,r){let i=await t.getOrCreateConversation(n,r);return re(i,J,Q,e)},async getOrCreateMessage(n,r){let i=await t.getOrCreateMessage(n,r);return re(i,J,Q,e)},async getOrCreateTable(n,r,i){let o=await t.getOrCreateTable(n,r,i);return re(o,J,Q,e)},async getOrCreateUser(n,r){let i=await t.getOrCreateUser(n,r);return re(i,J,Q,e)},async getOrSetState(n,r,i,o,a){let s=await t.getOrSetState(n,r,i,o,a);return re(s,J,Q,e)},async getParticipant(n,r,i){let o=await t.getParticipant(n,r,i);return re(o,J,Q,e)},async getPublicIntegration(n,r,i){let o=await t.getPublicIntegration(n,r,i);return re(o,J,Q,e)},async getPublicIntegrationById(n,r){let i=await t.getPublicIntegrationById(n,r);return re(i,J,Q,e)},async getPublicWorkspace(n,r){let i=await t.getPublicWorkspace(n,r);return re(i,J,Q,e)},async getState(n,r,i,o){let a=await t.getState(n,r,i,o);return re(a,J,Q,e)},async getTable(n,r){let i=await t.getTable(n,r);return re(i,J,Q,e)},async getTableRow(n,r,i){let o=await t.getTableRow(n,r,i);return re(o,J,Q,e)},async getTask(n,r){let i=await t.getTask(n,r);return re(i,J,Q,e)},async getUpcomingInvoice(n,r){let i=await t.getUpcomingInvoice(n,r);return re(i,J,Q,e)},async getUsage(n,r,i,o){let a=await t.getUsage(n,r,i,o);return re(a,J,Q,e)},async getUser(n,r){let i=await t.getUser(n,r);return re(i,J,Q,e)},async getWorkspace(n,r){let i=await t.getWorkspace(n,r);return re(i,J,Q,e)},async getWorkspaceQuota(n,r,i,o){let a=await t.getWorkspaceQuota(n,r,i,o);return re(a,J,Q,e)},async introspect(n,r){let i=await t.introspect(n,r);return re(i,J,Q,e)},async listActivities(n,r,i,o){let a=await t.listActivities(n,r,i,o);return re(a,J,Q,e)},async listBotIssueEvents(n,r,i){let o=await t.listBotIssueEvents(n,r,i);return re(o,J,Q,e)},async listBotIssues(n,r,i){let o=await t.listBotIssues(n,r,i);return re(o,J,Q,e)},async listBots(n,r,i){let o=await t.listBots(n,r,i);return re(o,J,Q,e)},async listConversations(n,r,i,o){let a=await t.listConversations(n,r,i,o);return re(a,J,Q,e)},async listEvents(n,r,i,o,a,s,l){let c=await t.listEvents(n,r,i,o,a,s,l);return re(c,J,Q,e)},async listFiles(n,r,i,o){let a=await t.listFiles(n,r,i,o);return re(a,J,Q,e)},async listIntegrationApiKeys(n,r){let i=await t.listIntegrationApiKeys(n,r);return re(i,J,Q,e)},async listIntegrations(n,r,i,o,a){let s=await t.listIntegrations(n,r,i,o,a);return re(s,J,Q,e)},async listMessages(n,r,i,o){let a=await t.listMessages(n,r,i,o);return re(a,J,Q,e)},async listParticipants(n,r,i){let o=await t.listParticipants(n,r,i);return re(o,J,Q,e)},async listPersonalAccessTokens(n){let r=await t.listPersonalAccessTokens(n);return re(r,J,Q,e)},async listPublicIntegrations(n,r,i,o){let a=await t.listPublicIntegrations(n,r,i,o);return re(a,J,Q,e)},async listTables(n,r){let i=await t.listTables(n,r);return re(i,J,Q,e)},async listTasks(n,r,i,o,a,s,l,c){let u=await t.listTasks(n,r,i,o,a,s,l,c);return re(u,J,Q,e)},async listUsageHistory(n,r,i){let o=await t.listUsageHistory(n,r,i);return re(o,J,Q,e)},async listUsers(n,r,i,o){let a=await t.listUsers(n,r,i,o);return re(a,J,Q,e)},async listWorkspaceInvoices(n,r){let i=await t.listWorkspaceInvoices(n,r);return re(i,J,Q,e)},async listWorkspaceMembers(n,r){let i=await t.listWorkspaceMembers(n,r);return re(i,J,Q,e)},async listWorkspaceQuotas(n,r,i){let o=await t.listWorkspaceQuotas(n,r,i);return re(o,J,Q,e)},async listWorkspaceUsages(n,r,i,o){let a=await t.listWorkspaceUsages(n,r,i,o);return re(a,J,Q,e)},async listWorkspaces(n,r){let i=await t.listWorkspaces(n,r);return re(i,J,Q,e)},async patchState(n,r,i,o,a){let s=await t.patchState(n,r,i,o,a);return re(s,J,Q,e)},async removeParticipant(n,r,i){let o=await t.removeParticipant(n,r,i);return re(o,J,Q,e)},async renameTableColumn(n,r,i){let o=await t.renameTableColumn(n,r,i);return re(o,J,Q,e)},async runVrl(n,r){let i=await t.runVrl(n,r);return re(i,J,Q,e)},async searchFiles(n,r,i,o,a,s){let l=await t.searchFiles(n,r,i,o,a,s);return re(l,J,Q,e)},async setAccountPreference(n,r,i){let o=await t.setAccountPreference(n,r,i);return re(o,J,Q,e)},async setState(n,r,i,o,a){let s=await t.setState(n,r,i,o,a);return re(s,J,Q,e)},async setWorkspacePaymentMethod(n,r,i){let o=await t.setWorkspacePaymentMethod(n,r,i);return re(o,J,Q,e)},async trackAnalytics(n,r){let i=await t.trackAnalytics(n,r);return re(i,J,Q,e)},async transferBot(n,r,i){let o=await t.transferBot(n,r,i);return re(o,J,Q,e)},async updateAccount(n,r){let i=await t.updateAccount(n,r);return re(i,J,Q,e)},async updateBot(n,r,i){let o=await t.updateBot(n,r,i);return re(o,J,Q,e)},async updateConversation(n,r,i){let o=await t.updateConversation(n,r,i);return re(o,J,Q,e)},async updateFileMetadata(n,r,i){let o=await t.updateFileMetadata(n,r,i);return re(o,J,Q,e)},async updateIntegration(n,r,i){let o=await t.updateIntegration(n,r,i);return re(o,J,Q,e)},async updateMessage(n,r,i){let o=await t.updateMessage(n,r,i);return re(o,J,Q,e)},async updateTable(n,r,i){let o=await t.updateTable(n,r,i);return re(o,J,Q,e)},async updateTableRows(n,r,i){let o=await t.updateTableRows(n,r,i);return re(o,J,Q,e)},async updateTask(n,r,i){let o=await t.updateTask(n,r,i);return re(o,J,Q,e)},async updateUser(n,r,i){let o=await t.updateUser(n,r,i);return re(o,J,Q,e)},async updateWorkspace(n,r,i){let o=await t.updateWorkspace(n,r,i);return re(o,J,Q,e)},async updateWorkspaceMember(n,r,i){let o=await t.updateWorkspaceMember(n,r,i);return re(o,J,Q,e)},async upsertTableRows(n,r,i){let o=await t.upsertTableRows(n,r,i);return re(o,J,Q,e)}}},coe=class extends aoe{addParticipant(e,t){return ie(this.configuration).addParticipant(e.id,e.addParticipantBody,t).then(n=>n(this.axios,this.basePath))}breakDownWorkspaceUsageByBot(e,t){return ie(this.configuration).breakDownWorkspaceUsageByBot(e.id,e.type,e.period,t).then(n=>n(this.axios,this.basePath))}callAction(e={},t){return ie(this.configuration).callAction(e.callActionBody,t).then(n=>n(this.axios,this.basePath))}changeAISpendQuota(e={},t){return ie(this.configuration).changeAISpendQuota(e.changeAISpendQuotaBody,t).then(n=>n(this.axios,this.basePath))}chargeWorkspaceUnpaidInvoices(e,t){return ie(this.configuration).chargeWorkspaceUnpaidInvoices(e.id,e.chargeWorkspaceUnpaidInvoicesBody,t).then(n=>n(this.axios,this.basePath))}checkHandleAvailability(e={},t){return ie(this.configuration).checkHandleAvailability(e.checkHandleAvailabilityBody,t).then(n=>n(this.axios,this.basePath))}configureIntegration(e={},t){return ie(this.configuration).configureIntegration(e.configureIntegrationBody,t).then(n=>n(this.axios,this.basePath))}createBot(e={},t){return ie(this.configuration).createBot(e.createBotBody,t).then(n=>n(this.axios,this.basePath))}createConversation(e={},t){return ie(this.configuration).createConversation(e.createConversationBody,t).then(n=>n(this.axios,this.basePath))}createEvent(e={},t){return ie(this.configuration).createEvent(e.createEventBody,t).then(n=>n(this.axios,this.basePath))}createFile(e={},t){return ie(this.configuration).createFile(e.createFileBody,t).then(n=>n(this.axios,this.basePath))}createIntegration(e={},t){return ie(this.configuration).createIntegration(e.createIntegrationBody,t).then(n=>n(this.axios,this.basePath))}createIntegrationApiKey(e={},t){return ie(this.configuration).createIntegrationApiKey(e.createIntegrationApiKeyBody,t).then(n=>n(this.axios,this.basePath))}createMessage(e={},t){return ie(this.configuration).createMessage(e.createMessageBody,t).then(n=>n(this.axios,this.basePath))}createPersonalAccessToken(e={},t){return ie(this.configuration).createPersonalAccessToken(e.createPersonalAccessTokenBody,t).then(n=>n(this.axios,this.basePath))}createTable(e={},t){return ie(this.configuration).createTable(e.createTableBody,t).then(n=>n(this.axios,this.basePath))}createTableRows(e,t){return ie(this.configuration).createTableRows(e.table,e.createTableRowsBody,t).then(n=>n(this.axios,this.basePath))}createTask(e={},t){return ie(this.configuration).createTask(e.createTaskBody,t).then(n=>n(this.axios,this.basePath))}createUser(e={},t){return ie(this.configuration).createUser(e.createUserBody,t).then(n=>n(this.axios,this.basePath))}createWorkspace(e={},t){return ie(this.configuration).createWorkspace(e.createWorkspaceBody,t).then(n=>n(this.axios,this.basePath))}createWorkspaceMember(e={},t){return ie(this.configuration).createWorkspaceMember(e.createWorkspaceMemberBody,t).then(n=>n(this.axios,this.basePath))}deleteBot(e,t){return ie(this.configuration).deleteBot(e.id,t).then(n=>n(this.axios,this.basePath))}deleteBotIssue(e,t){return ie(this.configuration).deleteBotIssue(e.id,e.issueId,t).then(n=>n(this.axios,this.basePath))}deleteConversation(e,t){return ie(this.configuration).deleteConversation(e.id,t).then(n=>n(this.axios,this.basePath))}deleteFile(e,t){return ie(this.configuration).deleteFile(e.id,t).then(n=>n(this.axios,this.basePath))}deleteIntegration(e,t){return ie(this.configuration).deleteIntegration(e.id,t).then(n=>n(this.axios,this.basePath))}deleteIntegrationApiKey(e,t){return ie(this.configuration).deleteIntegrationApiKey(e.id,t).then(n=>n(this.axios,this.basePath))}deleteMessage(e,t){return ie(this.configuration).deleteMessage(e.id,t).then(n=>n(this.axios,this.basePath))}deletePersonalAccessToken(e,t){return ie(this.configuration).deletePersonalAccessToken(e.id,t).then(n=>n(this.axios,this.basePath))}deleteTable(e,t){return ie(this.configuration).deleteTable(e.table,t).then(n=>n(this.axios,this.basePath))}deleteTableRows(e,t){return ie(this.configuration).deleteTableRows(e.table,e.deleteTableRowsBody,t).then(n=>n(this.axios,this.basePath))}deleteTask(e,t){return ie(this.configuration).deleteTask(e.id,t).then(n=>n(this.axios,this.basePath))}deleteUser(e,t){return ie(this.configuration).deleteUser(e.id,t).then(n=>n(this.axios,this.basePath))}deleteWorkspace(e,t){return ie(this.configuration).deleteWorkspace(e.id,t).then(n=>n(this.axios,this.basePath))}deleteWorkspaceMember(e,t){return ie(this.configuration).deleteWorkspaceMember(e.id,t).then(n=>n(this.axios,this.basePath))}duplicateTable(e,t){return ie(this.configuration).duplicateTable(e.sourceTableId,e.duplicateTableBody,t).then(n=>n(this.axios,this.basePath))}findTableRows(e,t){return ie(this.configuration).findTableRows(e.table,e.findTableRowsBody,t).then(n=>n(this.axios,this.basePath))}getAccount(e){return ie(this.configuration).getAccount(e).then(t=>t(this.axios,this.basePath))}getAccountPreference(e,t){return ie(this.configuration).getAccountPreference(e.key,t).then(n=>n(this.axios,this.basePath))}getAllWorkspaceQuotaCompletion(e){return ie(this.configuration).getAllWorkspaceQuotaCompletion(e).then(t=>t(this.axios,this.basePath))}getAuditRecords(e,t){return ie(this.configuration).getAuditRecords(e.id,e.nextToken,t).then(n=>n(this.axios,this.basePath))}getBot(e,t){return ie(this.configuration).getBot(e.id,t).then(n=>n(this.axios,this.basePath))}getBotAnalytics(e,t){return ie(this.configuration).getBotAnalytics(e.id,e.startDate,e.endDate,t).then(n=>n(this.axios,this.basePath))}getBotLogs(e,t){return ie(this.configuration).getBotLogs(e.id,e.timeStart,e.timeEnd,e.nextToken,t).then(n=>n(this.axios,this.basePath))}getBotWebchat(e,t){return ie(this.configuration).getBotWebchat(e.id,e.type,t).then(n=>n(this.axios,this.basePath))}getConversation(e,t){return ie(this.configuration).getConversation(e.id,t).then(n=>n(this.axios,this.basePath))}getEvent(e,t){return ie(this.configuration).getEvent(e.id,t).then(n=>n(this.axios,this.basePath))}getFileContent(e,t){return ie(this.configuration).getFileContent(e.id,t).then(n=>n(this.axios,this.basePath))}getFileMetadata(e,t){return ie(this.configuration).getFileMetadata(e.id,t).then(n=>n(this.axios,this.basePath))}getIntegration(e,t){return ie(this.configuration).getIntegration(e.id,t).then(n=>n(this.axios,this.basePath))}getIntegrationByName(e,t){return ie(this.configuration).getIntegrationByName(e.name,e.version,t).then(n=>n(this.axios,this.basePath))}getIntegrationLogs(e,t){return ie(this.configuration).getIntegrationLogs(e.id,e.timeStart,e.timeEnd,e.nextToken,t).then(n=>n(this.axios,this.basePath))}getMessage(e,t){return ie(this.configuration).getMessage(e.id,t).then(n=>n(this.axios,this.basePath))}getOrCreateConversation(e={},t){return ie(this.configuration).getOrCreateConversation(e.getOrCreateConversationBody,t).then(n=>n(this.axios,this.basePath))}getOrCreateMessage(e={},t){return ie(this.configuration).getOrCreateMessage(e.getOrCreateMessageBody,t).then(n=>n(this.axios,this.basePath))}getOrCreateTable(e,t){return ie(this.configuration).getOrCreateTable(e.table,e.getOrCreateTableBody,t).then(n=>n(this.axios,this.basePath))}getOrCreateUser(e={},t){return ie(this.configuration).getOrCreateUser(e.getOrCreateUserBody,t).then(n=>n(this.axios,this.basePath))}getOrSetState(e,t){return ie(this.configuration).getOrSetState(e.type,e.id,e.name,e.getOrSetStateBody,t).then(n=>n(this.axios,this.basePath))}getParticipant(e,t){return ie(this.configuration).getParticipant(e.id,e.userId,t).then(n=>n(this.axios,this.basePath))}getPublicIntegration(e,t){return ie(this.configuration).getPublicIntegration(e.name,e.version,t).then(n=>n(this.axios,this.basePath))}getPublicIntegrationById(e,t){return ie(this.configuration).getPublicIntegrationById(e.id,t).then(n=>n(this.axios,this.basePath))}getPublicWorkspace(e,t){return ie(this.configuration).getPublicWorkspace(e.id,t).then(n=>n(this.axios,this.basePath))}getState(e,t){return ie(this.configuration).getState(e.type,e.id,e.name,t).then(n=>n(this.axios,this.basePath))}getTable(e,t){return ie(this.configuration).getTable(e.table,t).then(n=>n(this.axios,this.basePath))}getTableRow(e,t){return ie(this.configuration).getTableRow(e.table,e.id,t).then(n=>n(this.axios,this.basePath))}getTask(e,t){return ie(this.configuration).getTask(e.id,t).then(n=>n(this.axios,this.basePath))}getUpcomingInvoice(e,t){return ie(this.configuration).getUpcomingInvoice(e.id,t).then(n=>n(this.axios,this.basePath))}getUsage(e,t){return ie(this.configuration).getUsage(e.type,e.id,e.period,t).then(n=>n(this.axios,this.basePath))}getUser(e,t){return ie(this.configuration).getUser(e.id,t).then(n=>n(this.axios,this.basePath))}getWorkspace(e,t){return ie(this.configuration).getWorkspace(e.id,t).then(n=>n(this.axios,this.basePath))}getWorkspaceQuota(e,t){return ie(this.configuration).getWorkspaceQuota(e.id,e.type,e.period,t).then(n=>n(this.axios,this.basePath))}introspect(e={},t){return ie(this.configuration).introspect(e.introspectBody,t).then(n=>n(this.axios,this.basePath))}listActivities(e,t){return ie(this.configuration).listActivities(e.taskId,e.botId,e.nextToken,t).then(n=>n(this.axios,this.basePath))}listBotIssueEvents(e,t){return ie(this.configuration).listBotIssueEvents(e.id,e.issueId,t).then(n=>n(this.axios,this.basePath))}listBotIssues(e,t){return ie(this.configuration).listBotIssues(e.id,e.nextToken,t).then(n=>n(this.axios,this.basePath))}listBots(e={},t){return ie(this.configuration).listBots(e.dev,e.nextToken,t).then(n=>n(this.axios,this.basePath))}listConversations(e={},t){return ie(this.configuration).listConversations(e.nextToken,e.tags,e.participantIds,t).then(n=>n(this.axios,this.basePath))}listEvents(e={},t){return ie(this.configuration).listEvents(e.nextToken,e.type,e.conversationId,e.userId,e.messageId,e.status,t).then(n=>n(this.axios,this.basePath))}listFiles(e,t){return ie(this.configuration).listFiles(e.botId,e.nextToken,e.tags,t).then(n=>n(this.axios,this.basePath))}listIntegrationApiKeys(e,t){return ie(this.configuration).listIntegrationApiKeys(e.integrationId,t).then(n=>n(this.axios,this.basePath))}listIntegrations(e={},t){return ie(this.configuration).listIntegrations(e.nextToken,e.name,e.version,e.dev,t).then(n=>n(this.axios,this.basePath))}listMessages(e={},t){return ie(this.configuration).listMessages(e.nextToken,e.conversationId,e.tags,t).then(n=>n(this.axios,this.basePath))}listParticipants(e,t){return ie(this.configuration).listParticipants(e.id,e.nextToken,t).then(n=>n(this.axios,this.basePath))}listPersonalAccessTokens(e){return ie(this.configuration).listPersonalAccessTokens(e).then(t=>t(this.axios,this.basePath))}listPublicIntegrations(e={},t){return ie(this.configuration).listPublicIntegrations(e.nextToken,e.name,e.version,t).then(n=>n(this.axios,this.basePath))}listTables(e={},t){return ie(this.configuration).listTables(e.tags,t).then(n=>n(this.axios,this.basePath))}listTasks(e={},t){return ie(this.configuration).listTasks(e.nextToken,e.tags,e.conversationId,e.userId,e.parentTaskId,e.status,e.type,t).then(n=>n(this.axios,this.basePath))}listUsageHistory(e,t){return ie(this.configuration).listUsageHistory(e.type,e.id,t).then(n=>n(this.axios,this.basePath))}listUsers(e={},t){return ie(this.configuration).listUsers(e.nextToken,e.conversationId,e.tags,t).then(n=>n(this.axios,this.basePath))}listWorkspaceInvoices(e,t){return ie(this.configuration).listWorkspaceInvoices(e.id,t).then(n=>n(this.axios,this.basePath))}listWorkspaceMembers(e={},t){return ie(this.configuration).listWorkspaceMembers(e.nextToken,t).then(n=>n(this.axios,this.basePath))}listWorkspaceQuotas(e,t){return ie(this.configuration).listWorkspaceQuotas(e.id,e.period,t).then(n=>n(this.axios,this.basePath))}listWorkspaceUsages(e,t){return ie(this.configuration).listWorkspaceUsages(e.id,e.type,e.period,t).then(n=>n(this.axios,this.basePath))}listWorkspaces(e={},t){return ie(this.configuration).listWorkspaces(e.nextToken,t).then(n=>n(this.axios,this.basePath))}patchState(e,t){return ie(this.configuration).patchState(e.type,e.id,e.name,e.patchStateBody,t).then(n=>n(this.axios,this.basePath))}removeParticipant(e,t){return ie(this.configuration).removeParticipant(e.id,e.userId,t).then(n=>n(this.axios,this.basePath))}renameTableColumn(e,t){return ie(this.configuration).renameTableColumn(e.table,e.renameTableColumnBody,t).then(n=>n(this.axios,this.basePath))}runVrl(e={},t){return ie(this.configuration).runVrl(e.runVrlBody,t).then(n=>n(this.axios,this.basePath))}searchFiles(e,t){return ie(this.configuration).searchFiles(e.botId,e.query,e.tags,e.contextDepth,e.limit,t).then(n=>n(this.axios,this.basePath))}setAccountPreference(e,t){return ie(this.configuration).setAccountPreference(e.key,e.setAccountPreferenceBody,t).then(n=>n(this.axios,this.basePath))}setState(e,t){return ie(this.configuration).setState(e.type,e.id,e.name,e.setStateBody,t).then(n=>n(this.axios,this.basePath))}setWorkspacePaymentMethod(e,t){return ie(this.configuration).setWorkspacePaymentMethod(e.id,e.setWorkspacePaymentMethodBody,t).then(n=>n(this.axios,this.basePath))}trackAnalytics(e={},t){return ie(this.configuration).trackAnalytics(e.trackAnalyticsBody,t).then(n=>n(this.axios,this.basePath))}transferBot(e,t){return ie(this.configuration).transferBot(e.id,e.transferBotBody,t).then(n=>n(this.axios,this.basePath))}updateAccount(e={},t){return ie(this.configuration).updateAccount(e.updateAccountBody,t).then(n=>n(this.axios,this.basePath))}updateBot(e,t){return ie(this.configuration).updateBot(e.id,e.updateBotBody,t).then(n=>n(this.axios,this.basePath))}updateConversation(e,t){return ie(this.configuration).updateConversation(e.id,e.updateConversationBody,t).then(n=>n(this.axios,this.basePath))}updateFileMetadata(e,t){return ie(this.configuration).updateFileMetadata(e.id,e.updateFileMetadataBody,t).then(n=>n(this.axios,this.basePath))}updateIntegration(e,t){return ie(this.configuration).updateIntegration(e.id,e.updateIntegrationBody,t).then(n=>n(this.axios,this.basePath))}updateMessage(e,t){return ie(this.configuration).updateMessage(e.id,e.updateMessageBody,t).then(n=>n(this.axios,this.basePath))}updateTable(e,t){return ie(this.configuration).updateTable(e.table,e.updateTableBody,t).then(n=>n(this.axios,this.basePath))}updateTableRows(e,t){return ie(this.configuration).updateTableRows(e.table,e.updateTableRowsBody,t).then(n=>n(this.axios,this.basePath))}updateTask(e,t){return ie(this.configuration).updateTask(e.id,e.updateTaskBody,t).then(n=>n(this.axios,this.basePath))}updateUser(e,t){return ie(this.configuration).updateUser(e.id,e.updateUserBody,t).then(n=>n(this.axios,this.basePath))}updateWorkspace(e,t){return ie(this.configuration).updateWorkspace(e.id,e.updateWorkspaceBody,t).then(n=>n(this.axios,this.basePath))}updateWorkspaceMember(e,t){return ie(this.configuration).updateWorkspaceMember(e.id,e.updateWorkspaceMemberBody,t).then(n=>n(this.axios,this.basePath))}upsertTableRows(e,t){return ie(this.configuration).upsertTableRows(e.table,e.upsertTableRowsBody,t).then(n=>n(this.axios,this.basePath))}},uoe={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},ry=typeof window<"u"&&typeof window.document<"u"?window.crypto:Ug;ry.getRandomValues||(ry=uoe);var Lt=class extends Error{constructor(t,n,r,i,o,a){super(i);T(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=Lt.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(ry.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"}},doe=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,GT=e=>e instanceof Lt||doe(e)&&e.isApiError===!0,ns=class extends Lt{constructor(e,t,n){super(500,"An unknown error occurred","Unknown",e,t,n)}},YT=class extends Lt{constructor(e,t,n){super(500,"An internal error occurred","Internal",e,t,n)}},JT=class extends Lt{constructor(e,t,n){super(401,"The request requires to be authenticated.","Unauthorized",e,t,n)}},XT=class extends Lt{constructor(e,t,n){super(403,"The requested action can't be peform by this resource.","Forbidden",e,t,n)}},QT=class extends Lt{constructor(e,t,n){super(413,"The request payload is too large.","PayloadTooLarge",e,t,n)}},ek=class extends Lt{constructor(e,t,n){super(400,"The request payload is invalid.","InvalidPayload",e,t,n)}},tk=class extends Lt{constructor(e,t,n){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",e,t,n)}},nk=class extends Lt{constructor(e,t,n){super(405,"The requested method does not exist.","MethodNotFound",e,t,n)}},rk=class extends Lt{constructor(e,t,n){super(404,"The requested resource does not exist.","ResourceNotFound",e,t,n)}},ik=class extends Lt{constructor(e,t,n){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",e,t,n)}},ok=class extends Lt{constructor(e,t,n){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",e,t,n)}},ak=class extends Lt{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)}},sk=class extends Lt{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)}},lk=class extends Lt{constructor(e,t,n){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",e,t,n)}},ck=class extends Lt{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)}},uk=class extends Lt{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)}},dk=class extends Lt{constructor(e,t,n){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",e,t,n)}},fk=class extends Lt{constructor(t,n,r){super(409,"The record attempted to be created already exists.","AlreadyExists",t,n,r)}},pk=class extends Lt{constructor(e,t,n){super(429,"The request has been rate limited.","RateLimited",e,t,n)}},hk=class extends Lt{constructor(e,t,n){super(402,"A payment is required to perform this request.","PaymentRequired",e,t,n)}},mk=class extends Lt{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)}},gk=class extends Lt{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)}},yk=class extends Lt{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)}},foe={Unknown:ns,Internal:YT,Unauthorized:JT,Forbidden:XT,PayloadTooLarge:QT,InvalidPayload:ek,UnsupportedMediaType:tk,MethodNotFound:nk,ResourceNotFound:rk,InvalidJsonSchema:ik,InvalidDataFormat:ok,InvalidIdentifier:ak,RelationConflict:sk,ReferenceConstraint:lk,ReferenceNotFound:ck,InvalidQuery:uk,Runtime:dk,AlreadyExists:fk,RateLimited:pk,PaymentRequired:hk,QuotaExceeded:mk,LimitExceeded:gk,BreakingChanges:yk},iy=e=>GT(e)?e:e instanceof Error?new ns(e.message,e):typeof e=="string"?new ns(e):poe(e);function poe(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=foe[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new ns(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new ns("An invalid error occurred: "+JSON.stringify(e))}var hoe=class{constructor(e,t,n){T(this,"_innerClient");T(this,"createConversation",e=>this._innerClient.createConversation({createConversationBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getConversation",e=>this._innerClient.getConversation(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listConversations",e=>this._innerClient.listConversations(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getOrCreateConversation",e=>this._innerClient.getOrCreateConversation({getOrCreateConversationBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"updateConversation",({id:e,...t})=>this._innerClient.updateConversation({id:e,updateConversationBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"deleteConversation",e=>this._innerClient.deleteConversation(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listParticipants",e=>this._innerClient.listParticipants(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"addParticipant",({id:e,...t})=>this._innerClient.addParticipant({id:e,addParticipantBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"getParticipant",e=>this._innerClient.getParticipant(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"removeParticipant",e=>this._innerClient.removeParticipant(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"createEvent",e=>this._innerClient.createEvent({createEventBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getEvent",e=>this._innerClient.getEvent(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listEvents",e=>this._innerClient.listEvents(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"createMessage",e=>this._innerClient.createMessage({createMessageBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getOrCreateMessage",e=>this._innerClient.getOrCreateMessage({getOrCreateMessageBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getMessage",e=>this._innerClient.getMessage(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"updateMessage",({id:e,...t})=>this._innerClient.updateMessage({id:e,updateMessageBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"listMessages",e=>this._innerClient.listMessages(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"deleteMessage",e=>this._innerClient.deleteMessage(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"createUser",e=>this._innerClient.createUser({createUserBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getUser",e=>this._innerClient.getUser(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listUsers",e=>this._innerClient.listUsers(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getOrCreateUser",e=>this._innerClient.getOrCreateUser({getOrCreateUserBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"updateUser",({id:e,...t})=>this._innerClient.updateUser({id:e,updateUserBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"deleteUser",e=>this._innerClient.deleteUser(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getState",e=>this._innerClient.getState(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"setState",({type:e,id:t,name:n,...r})=>this._innerClient.setState({type:e,id:t,name:n,setStateBody:r}).then(i=>i.data).catch(i=>{throw oe(i)}));T(this,"getOrSetState",({type:e,id:t,name:n,...r})=>this._innerClient.getOrSetState({type:e,id:t,name:n,getOrSetStateBody:r}).then(i=>i.data).catch(i=>{throw oe(i)}));T(this,"patchState",({type:e,id:t,name:n,...r})=>this._innerClient.patchState({type:e,id:t,name:n,patchStateBody:r}).then(i=>i.data).catch(i=>{throw oe(i)}));T(this,"callAction",e=>this._innerClient.callAction({callActionBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"configureIntegration",e=>this._innerClient.configureIntegration({configureIntegrationBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getTask",e=>this._innerClient.getTask(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"createTask",e=>this._innerClient.createTask({createTaskBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"updateTask",({id:e,...t})=>this._innerClient.updateTask({id:e,updateTaskBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"deleteTask",e=>this._innerClient.deleteTask(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listTasks",e=>this._innerClient.listTasks(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"trackAnalytics",e=>this._innerClient.trackAnalytics({trackAnalyticsBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"runVrl",e=>this._innerClient.runVrl({runVrlBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getAccount",()=>this._innerClient.getAccount().then(e=>e.data).catch(e=>{throw oe(e)}));T(this,"updateAccount",e=>this._innerClient.updateAccount({updateAccountBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listPersonalAccessTokens",()=>this._innerClient.listPersonalAccessTokens().then(e=>e.data).catch(e=>{throw oe(e)}));T(this,"createPersonalAccessToken",e=>this._innerClient.createPersonalAccessToken({createPersonalAccessTokenBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"deletePersonalAccessToken",e=>this._innerClient.deletePersonalAccessToken(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"setAccountPreference",({key:e,...t})=>this._innerClient.setAccountPreference({key:e,setAccountPreferenceBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"getAccountPreference",e=>this._innerClient.getAccountPreference(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listPublicIntegrations",e=>this._innerClient.listPublicIntegrations(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getPublicIntegrationById",e=>this._innerClient.getPublicIntegrationById(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getPublicIntegration",e=>this._innerClient.getPublicIntegration(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"createBot",e=>this._innerClient.createBot({createBotBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"updateBot",({id:e,...t})=>this._innerClient.updateBot({id:e,updateBotBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"transferBot",({id:e,...t})=>this._innerClient.transferBot({id:e,transferBotBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"listBots",e=>this._innerClient.listBots(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getBot",e=>this._innerClient.getBot(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"deleteBot",e=>this._innerClient.deleteBot(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getBotLogs",e=>this._innerClient.getBotLogs(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getBotWebchat",e=>this._innerClient.getBotWebchat(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getBotAnalytics",e=>this._innerClient.getBotAnalytics(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listBotIssues",e=>this._innerClient.listBotIssues(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"deleteBotIssue",e=>this._innerClient.deleteBotIssue(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listBotIssueEvents",e=>this._innerClient.listBotIssueEvents(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"setWorkspacePaymentMethod",({id:e,...t})=>this._innerClient.setWorkspacePaymentMethod({id:e,setWorkspacePaymentMethodBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"listWorkspaceInvoices",e=>this._innerClient.listWorkspaceInvoices(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getUpcomingInvoice",e=>this._innerClient.getUpcomingInvoice(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"chargeWorkspaceUnpaidInvoices",({id:e,...t})=>this._innerClient.chargeWorkspaceUnpaidInvoices({id:e,chargeWorkspaceUnpaidInvoicesBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"createWorkspace",e=>this._innerClient.createWorkspace({createWorkspaceBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getPublicWorkspace",e=>this._innerClient.getPublicWorkspace(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getWorkspace",e=>this._innerClient.getWorkspace(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listWorkspaceUsages",e=>this._innerClient.listWorkspaceUsages(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"breakDownWorkspaceUsageByBot",e=>this._innerClient.breakDownWorkspaceUsageByBot(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getAllWorkspaceQuotaCompletion",()=>this._innerClient.getAllWorkspaceQuotaCompletion().then(e=>e.data).catch(e=>{throw oe(e)}));T(this,"getWorkspaceQuota",e=>this._innerClient.getWorkspaceQuota(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listWorkspaceQuotas",e=>this._innerClient.listWorkspaceQuotas(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"updateWorkspace",({id:e,...t})=>this._innerClient.updateWorkspace({id:e,updateWorkspaceBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"checkHandleAvailability",e=>this._innerClient.checkHandleAvailability({checkHandleAvailabilityBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listWorkspaces",e=>this._innerClient.listWorkspaces(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"deleteWorkspace",e=>this._innerClient.deleteWorkspace(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getAuditRecords",e=>this._innerClient.getAuditRecords(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listWorkspaceMembers",e=>this._innerClient.listWorkspaceMembers(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"deleteWorkspaceMember",e=>this._innerClient.deleteWorkspaceMember(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"createWorkspaceMember",e=>this._innerClient.createWorkspaceMember({createWorkspaceMemberBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"updateWorkspaceMember",({id:e,...t})=>this._innerClient.updateWorkspaceMember({id:e,updateWorkspaceMemberBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"listIntegrationApiKeys",e=>this._innerClient.listIntegrationApiKeys(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"createIntegrationApiKey",e=>this._innerClient.createIntegrationApiKey({createIntegrationApiKeyBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"deleteIntegrationApiKey",e=>this._innerClient.deleteIntegrationApiKey(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"createIntegration",e=>this._innerClient.createIntegration({createIntegrationBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"updateIntegration",({id:e,...t})=>this._innerClient.updateIntegration({id:e,updateIntegrationBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"listIntegrations",e=>this._innerClient.listIntegrations(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getIntegration",e=>this._innerClient.getIntegration(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getIntegrationLogs",e=>this._innerClient.getIntegrationLogs(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getIntegrationByName",e=>this._innerClient.getIntegrationByName(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"deleteIntegration",e=>this._innerClient.deleteIntegration(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getUsage",e=>this._innerClient.getUsage(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listUsageHistory",e=>this._innerClient.listUsageHistory(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"changeAISpendQuota",e=>this._innerClient.changeAISpendQuota({changeAISpendQuotaBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listActivities",e=>this._innerClient.listActivities(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"introspect",e=>this._innerClient.introspect({introspectBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"createFile",e=>this._innerClient.createFile({createFileBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"deleteFile",e=>this._innerClient.deleteFile(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listFiles",e=>this._innerClient.listFiles(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getFileMetadata",e=>this._innerClient.getFileMetadata(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getFileContent",e=>this._innerClient.getFileContent(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"updateFileMetadata",({id:e,...t})=>this._innerClient.updateFileMetadata({id:e,updateFileMetadataBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"searchFiles",e=>this._innerClient.searchFiles(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"listTables",e=>this._innerClient.listTables(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getTable",e=>this._innerClient.getTable(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getOrCreateTable",({table:e,...t})=>this._innerClient.getOrCreateTable({table:e,getOrCreateTableBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"createTable",e=>this._innerClient.createTable({createTableBody:e}).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"duplicateTable",({sourceTableId:e,...t})=>this._innerClient.duplicateTable({sourceTableId:e,duplicateTableBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"updateTable",({table:e,...t})=>this._innerClient.updateTable({table:e,updateTableBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"renameTableColumn",({table:e,...t})=>this._innerClient.renameTableColumn({table:e,renameTableColumnBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"deleteTable",e=>this._innerClient.deleteTable(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"getTableRow",e=>this._innerClient.getTableRow(e).then(t=>t.data).catch(t=>{throw oe(t)}));T(this,"findTableRows",({table:e,...t})=>this._innerClient.findTableRows({table:e,findTableRowsBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"createTableRows",({table:e,...t})=>this._innerClient.createTableRows({table:e,createTableRowsBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"deleteTableRows",({table:e,...t})=>this._innerClient.deleteTableRows({table:e,deleteTableRowsBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"updateTableRows",({table:e,...t})=>this._innerClient.updateTableRows({table:e,updateTableRowsBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));T(this,"upsertTableRows",({table:e,...t})=>this._innerClient.upsertTableRows({table:e,upsertTableRowsBody:t}).then(n=>n.data).catch(n=>{throw oe(n)}));this._innerClient=new coe(e,t,n)}};function oe(e){var t;return J.isAxiosError(e)&&((t=e.response)!=null&&t.data)?iy(e.response.data):iy(e)}var vk=100*1024*1024,moe=vk,goe=vk,yoe=class extends hoe{constructor(t={}){let n=roe(t),r=voe(n);super(void 0,n.apiUrl,r);T(this,"config");this.config=n}};function voe(e){let{headers:t,withCredentials:n,timeout:r}=e;return J.create({headers:t,withCredentials:n,timeout:r,maxBodyLength:moe,maxContentLength:goe,httpAgent:ty?new Kie.default.Agent({keepAlive:!0}):void 0,httpsAgent:ty?new Gie.default.Agent({keepAlive:!0}):void 0})}const oy=Tc(Object.freeze(Object.defineProperty({__proto__:null,AlreadyExistsError:fk,BreakingChangesError:yk,Client:yoe,ForbiddenError:XT,InternalError:YT,InvalidDataFormatError:ok,InvalidIdentifierError:ak,InvalidJsonSchemaError:ik,InvalidPayloadError:ek,InvalidQueryError:uk,LimitExceededError:gk,MethodNotFoundError:nk,PayloadTooLargeError:QT,PaymentRequiredError:hk,QuotaExceededError:mk,RateLimitedError:pk,ReferenceConstraintError:lk,ReferenceNotFoundError:ck,RelationConflictError:sk,ResourceNotFoundError:rk,RuntimeError:dk,UnauthorizedError:JT,UnknownError:ns,UnsupportedMediaTypeError:tk,axios:Rie,errorFrom:iy,isApiError:GT},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=(A,Ee)=>{for(var Pe in Ee)n(A,Pe,{get:Ee[Pe],enumerable:!0})},l=(A,Ee,Pe,Fe)=>{if(Ee&&typeof Ee=="object"||typeof Ee=="function")for(let Ce of i(Ee))!a.call(A,Ce)&&Ce!==Pe&&n(A,Ce,{get:()=>Ee[Ce],enumerable:!(Fe=r(Ee,Ce))||Fe.enumerable});return A},c=(A,Ee,Pe)=>(l(A,Ee,"default"),Pe&&l(Pe,Ee,"default")),u=(A,Ee,Pe)=>(Pe=A!=null?t(o(A)):{},l(Ee||!A||!A.__esModule?n(Pe,"default",{value:A,enumerable:!0}):Pe,A)),d=A=>l(n({},"__esModule",{value:!0}),A),p={};s(p,{Bot:()=>ta,BotSpecificClient:()=>qt,Integration:()=>Pt,IntegrationDefinition:()=>D,IntegrationSpecificClient:()=>me,RuntimeError:()=>$e.RuntimeError,botIdHeader:()=>V,botUserIdHeader:()=>W,configurationHeader:()=>se,integrationIdHeader:()=>pe,isApiError:()=>$e.isApiError,messages:()=>f,operationHeader:()=>we,parseBody:()=>Me,serve:()=>Ze,studioComponentDefinitions:()=>g,typeHeader:()=>O,webhookIdHeader:()=>C,z:()=>m.z}),e.exports=d(p);var f={};s(f,{defaults:()=>F});var h={};s(h,{default:()=>y,studioComponentDefinitions:()=>g,z:()=>m.z});var m=od;c(h,od);var v=m.z.object({allowDynamicVariable:m.z.boolean().optional(),horizontal:m.z.boolean().optional()}),g={string:{textInput:{id:"textInput",params:v.extend({multiLine:m.z.boolean().optional(),growVertically:m.z.boolean().optional(),suggestions:m.z.array(m.z.string()).optional()})},dropdown:{id:"dropdown",params:v.extend({filterable:m.z.boolean().optional()})},radiogroup:{id:"radiogroup",params:v.extend({})},datepicker:{id:"datepicker",params:v.extend({dateFormat:m.z.string().optional(),minDate:m.z.string().optional(),maxDate:m.z.string().optional(),defaultTimezone:m.z.string().optional(),disableTimezoneSelection:m.z.boolean().optional(),highlightCurrentDay:m.z.boolean().optional(),showShortcutButtons:m.z.boolean().optional(),showOutsideDaysOfMonth:m.z.boolean().optional(),firstDayOfWeek:m.z.number().optional(),canChangeMonth:m.z.boolean().optional(),showWeekNumbers:m.z.boolean().optional()})},timepicker:{id:"timepicker",params:v.extend({useAMPM:m.z.boolean().optional(),timeFormat:m.z.string().optional(),minTime:m.z.string().optional(),maxTime:m.z.string().optional(),showArrowButtons:m.z.boolean().optional(),precision:m.z.enum(["minute","second","millisecond"]).optional()})},variablepicker:{id:"variablepicker",params:m.z.object({type:m.z.enum(["any","string","number","boolean","object","pattern","date","array","target","time","enum"]),horizontal:m.z.boolean().optional()})},richTextEditor:{id:"richTextEditor",params:m.z.object({allowDynamicVariable:m.z.boolean().optional(),resizable:m.z.boolean().optional()})},JSONInput:{id:"JSONInput",params:v.extend({showPreview:m.z.boolean().optional(),showValidationError:m.z.boolean().optional()})},fileInput:{id:"fileInput",params:v.extend({fileTypes:m.z.array(m.z.enum(["image","audio","video"])).optional(),showUploadedFiles:m.z.boolean().optional()})}},number:{numberInput:{id:"numberInput",params:v.extend({allowNumericCharactersOnly:m.z.boolean().optional(),stepSize:m.z.number().optional()})},slider:{id:"slider",params:m.z.object({horizontal:m.z.boolean().optional(),stepSize:m.z.number().optional()})}},boolean:{switch:{id:"switch",params:v}},array:{optionList:{id:"optionList",params:v},stringList:{id:"stringList",params:v}},object:{collapsible:{id:"collapsible",params:m.z.object({defaultOpen:m.z.boolean().optional()})}},discriminatedUnion:{}},y=m.z,b=m.z.string().min(1),x=m.z.object({text:b}),_=m.z.object({markdown:b}),S=m.z.object({imageUrl:b}),R=m.z.object({audioUrl:b}),M=m.z.object({videoUrl:b}),j=m.z.object({fileUrl:b,title:b.optional()}),k=m.z.object({latitude:m.z.number(),longitude:m.z.number(),address:m.z.string().optional(),title:m.z.string().optional()}),N=m.z.object({title:b,subtitle:b.optional(),imageUrl:b.optional(),actions:m.z.array(m.z.object({action:m.z.enum(["postback","url","say"]),label:b,value:b}))}),z=m.z.object({text:b,options:m.z.array(m.z.object({label:b,value:b}))}),B=m.z.object({items:m.z.array(N)}),Z=m.z.discriminatedUnion("type",[m.z.object({type:m.z.literal("text"),payload:x}),m.z.object({type:m.z.literal("markdown"),payload:_}),m.z.object({type:m.z.literal("image"),payload:S}),m.z.object({type:m.z.literal("audio"),payload:R}),m.z.object({type:m.z.literal("video"),payload:M}),m.z.object({type:m.z.literal("file"),payload:j}),m.z.object({type:m.z.literal("location"),payload:k})]),L=m.z.object({items:m.z.array(Z)}),F={text:{schema:x},markdown:{schema:_},image:{schema:S},audio:{schema:R},video:{schema:M},file:{schema:j},location:{schema:k},carousel:{schema:B},card:{schema:N},dropdown:{schema:z},choice:{schema:z},bloc:{schema:L}},V="x-bot-id",W="x-bot-user-id",pe="x-integration-id",C="x-webhook-id",se="x-bp-configuration",we="x-bp-operation",O="x-bp-type",Oe=Bo,Be=console;function Me(A){if(!A.body)throw new Error("Missing body");return JSON.parse(A.body)}async function Ze(A,Ee=8072,Pe=ye){let Fe=(0,Oe.createServer)(async(Ce,Ie)=>{try{let at=await nt(Ce);if(at.path==="/health"){Ie.writeHead(200).end("ok");return}let pt=await A(at);Ie.writeHead((pt==null?void 0:pt.status)??200,(pt==null?void 0:pt.headers)??{}).end((pt==null?void 0:pt.body)??"{}")}catch(at){Be.error("Error while handling request",{error:(at==null?void 0:at.message)??"Internal error occured"}),Ie.writeHead(500).end(JSON.stringify({error:(at==null?void 0:at.message)??"Internal error occured"}))}});return Fe.listen(Ee,()=>Pe(Ee)),Fe}async function nt(A){var Ce;let Ee=await _e(A),Pe={};for(let Ie=0;Ie<A.rawHeaders.length;Ie+=2){let at=A.rawHeaders[Ie].toLowerCase(),pt=A.rawHeaders[Ie+1];Pe[at]=pt}let Fe=new URL(A.url??"",A.headers.host?`http://${A.headers.host}`:"http://botpress.cloud");return{body:Ee,path:Fe.pathname,query:We(Fe.search,"?"),headers:Pe,method:((Ce=A.method)==null?void 0:Ce.toUpperCase())??"GET"}}function We(A,Ee){return A.indexOf(Ee)===0?A.slice(Ee.length):A}async function _e(A){return new Promise((Ee,Pe)=>{if(A.method!=="POST"&&A.method!=="PUT"&&A.method!=="PATCH")return Ee(void 0);let Fe="";A.on("data",Ce=>Fe+=Ce.toString()),A.on("error",Ce=>Pe(Ce)),A.on("end",()=>Ee(Fe))})}function ye(A){Be.info(`Listening on port ${A}`)}c(p,h,e.exports);var $e=oy,Se=od,Ue=Se.z.enum(["webhook_received","message_created","action_triggered","register","unregister","ping","create_user","create_conversation"]),ot=A=>{let Ee=A[V],Pe=A[W],Fe=A[pe],Ce=A[C],Ie=A[se],at=Ue.parse(A[we]);if(!Ee)throw new Error("Missing bot headers");if(!Pe)throw new Error("Missing bot user headers");if(!Fe)throw new Error("Missing integration headers");if(!Ce)throw new Error("Missing webhook headers");if(!Ie)throw new Error("Missing configuration headers");if(!at)throw new Error("Missing operation headers");return{botId:Ee,botUserId:Pe,integrationId:Fe,webhookId:Ce,operation:at,configuration:Ie?JSON.parse(Buffer.from(Ie,"base64").toString("utf-8")):{}}},D=class{constructor(A){T(this,"name");T(this,"version");T(this,"title");T(this,"description");T(this,"icon");T(this,"readme");T(this,"configuration");T(this,"events");T(this,"actions");T(this,"channels");T(this,"states");T(this,"user");T(this,"secrets");T(this,"identifier");T(this,"entities");this.props=A,this.name=A.name,this.version=A.version,this.icon=A.icon,this.readme=A.readme,this.title=A.title,this.identifier=A.identifier,this.description=A.description,this.configuration=A.configuration,this.events=A.events,this.actions=A.actions,this.channels=A.channels,this.states=A.states,this.user=A.user,this.secrets=A.secrets,this.entities=A.entities}},ue=oy,me=class{constructor(A){T(this,"createConversation",A=>this.client.createConversation(A));T(this,"getConversation",A=>this.client.getConversation(A));T(this,"listConversations",A=>this.client.listConversations(A));T(this,"getOrCreateConversation",A=>this.client.getOrCreateConversation(A));T(this,"updateConversation",A=>this.client.updateConversation(A));T(this,"deleteConversation",A=>this.client.deleteConversation(A));T(this,"listParticipants",A=>this.client.listParticipants(A));T(this,"addParticipant",A=>this.client.addParticipant(A));T(this,"getParticipant",A=>this.client.getParticipant(A));T(this,"removeParticipant",A=>this.client.removeParticipant(A));T(this,"createEvent",A=>this.client.createEvent(A));T(this,"getEvent",A=>this.client.getEvent(A));T(this,"listEvents",A=>this.client.listEvents(A));T(this,"createMessage",A=>this.client.createMessage(A));T(this,"getOrCreateMessage",A=>this.client.getOrCreateMessage(A));T(this,"getMessage",A=>this.client.getMessage(A));T(this,"updateMessage",A=>this.client.updateMessage(A));T(this,"listMessages",A=>this.client.listMessages(A));T(this,"deleteMessage",A=>this.client.deleteMessage(A));T(this,"createUser",A=>this.client.createUser(A));T(this,"getUser",A=>this.client.getUser(A));T(this,"listUsers",A=>this.client.listUsers(A));T(this,"getOrCreateUser",A=>this.client.getOrCreateUser(A));T(this,"updateUser",A=>this.client.updateUser(A));T(this,"deleteUser",A=>this.client.deleteUser(A));T(this,"getState",A=>this.client.getState(A));T(this,"setState",A=>this.client.setState(A));T(this,"getOrSetState",A=>this.client.getOrSetState(A));T(this,"patchState",A=>this.client.patchState(A));T(this,"configureIntegration",A=>this.client.configureIntegration(A));this.client=A}},fe=u(Bo),Le=A=>{if(process.env.BP_LOG_FORMAT==="json")return JSON.stringify({msg:fe.default.format(...A),visible_to_bot_owner:!0});{let[Ee,...Pe]=A;return fe.default.format(`[For Bot Owner] ${Ee}`,...Pe)}},De={forBot:()=>({info:(...A)=>{console.info(Le(A))},warn:(...A)=>{console.warn(Le(A))},error:(...A)=>{console.error(Le(A))},debug:(...A)=>{console.debug(Le(A))}})},Ke=A=>async Ee=>{let Pe=ot(Ee.headers),Fe=new me(new ue.Client({botId:Pe.botId,integrationId:Pe.integrationId})),Ce={ctx:Pe,req:Ee,client:Fe,logger:De,instance:A};try{let Ie;switch(Pe.operation){case"webhook_received":Ie=await Xe(Ce);break;case"register":Ie=await q(Ce);break;case"unregister":Ie=await X(Ce);break;case"message_created":Ie=await rt(Ce);break;case"action_triggered":Ie=await Zt(Ce);break;case"ping":Ie=await gt(Ce);break;case"create_user":Ie=await de(Ce);break;case"create_conversation":Ie=await je(Ce);break;default:throw new Error(`Unknown operation ${Pe.operation}`)}return Ie?{...Ie,status:Ie.status??200}:{status:200}}catch(Ie){if((0,ue.isApiError)(Ie)){let at=new ue.RuntimeError(Ie.message,Ie);return{status:at.code,body:JSON.stringify(at.toJSON())}}throw Ie}},gt=async A=>{},Xe=async({client:A,ctx:Ee,req:Pe,logger:Fe,instance:Ce})=>{let{req:Ie}=Me(Pe);return Ce.webhook({client:A,ctx:Ee,req:Ie,logger:Fe})},q=async({client:A,ctx:Ee,req:Pe,logger:Fe,instance:Ce})=>{if(!Ce.register)return;let{webhookUrl:Ie}=Me(Pe);await Ce.register({client:A,ctx:Ee,webhookUrl:Ie,logger:Fe})},X=async({client:A,ctx:Ee,req:Pe,logger:Fe,instance:Ce})=>{if(!Ce.unregister)return;let{webhookUrl:Ie}=Me(Pe);await Ce.unregister({ctx:Ee,webhookUrl:Ie,client:A,logger:Fe})},de=async({client:A,ctx:Ee,req:Pe,logger:Fe,instance:Ce})=>{if(!Ce.createUser)return;let{tags:Ie}=Me(Pe);return await Ce.createUser({ctx:Ee,client:A,tags:Ie,logger:Fe})},je=async({client:A,ctx:Ee,req:Pe,logger:Fe,instance:Ce})=>{if(!Ce.createConversation)return;let{channel:Ie,tags:at}=Me(Pe);return await Ce.createConversation({ctx:Ee,client:A,channel:Ie,tags:at,logger:Fe})},rt=async({ctx:A,req:Ee,client:Pe,logger:Fe,instance:Ce})=>{let{conversation:Ie,user:at,type:pt,payload:Ft,message:Kt}=Me(Ee),Yn=Ce.channels[Ie.channel];if(!Yn)throw new Error(`Channel ${Ie.channel} not found`);let Or=Yn.messages[pt];if(!Or)throw new Error(`Message of type ${pt} not found in channel ${Ie.channel}`);await Or({ctx:A,conversation:Ie,message:Kt,user:at,type:pt,client:Pe,payload:Ft,ack:async({tags:rb})=>{await Pe.updateMessage({id:Kt.id,tags:rb})},logger:Fe})},Zt=async({req:A,ctx:Ee,client:Pe,logger:Fe,instance:Ce})=>{let{input:Ie,type:at}=Me(A);if(!at)throw new Error("Missing action type");let pt=Ce.actions[at];if(!pt)throw new Error(`Action ${at} not found`);let Ft=await pt({ctx:Ee,input:Ie,client:Pe,type:at,logger:Fe});return{body:JSON.stringify({output:Ft})}},Pt=class{constructor(A){T(this,"props");T(this,"actions");T(this,"channels");T(this,"register");T(this,"unregister");T(this,"createUser");T(this,"createConversation");T(this,"webhook");T(this,"handler",Ke(this));T(this,"start",A=>Ze(this.handler,A));this.props=A,this.actions=A.actions,this.channels=A.channels,this.register=A.register,this.unregister=A.unregister,this.createUser=A.createUser,this.createConversation=A.createConversation,this.webhook=A.handler}},Ot=u(oy),qt=class{constructor(A){T(this,"getConversation",A=>this.client.getConversation(A));T(this,"listConversations",A=>this.client.listConversations(A));T(this,"updateConversation",A=>this.client.updateConversation(A));T(this,"deleteConversation",A=>this.client.deleteConversation(A));T(this,"listParticipants",A=>this.client.listParticipants(A));T(this,"addParticipant",A=>this.client.addParticipant(A));T(this,"getParticipant",A=>this.client.getParticipant(A));T(this,"removeParticipant",A=>this.client.removeParticipant(A));T(this,"getEvent",A=>this.client.getEvent(A));T(this,"listEvents",A=>this.client.listEvents(A));T(this,"createMessage",A=>this.client.createMessage(A));T(this,"getOrCreateMessage",A=>this.client.getOrCreateMessage(A));T(this,"getMessage",A=>this.client.getMessage(A));T(this,"updateMessage",A=>this.client.updateMessage(A));T(this,"listMessages",A=>this.client.listMessages(A));T(this,"deleteMessage",A=>this.client.deleteMessage(A));T(this,"getUser",A=>this.client.getUser(A));T(this,"listUsers",A=>this.client.listUsers(A));T(this,"updateUser",A=>this.client.updateUser(A));T(this,"deleteUser",A=>this.client.deleteUser(A));T(this,"getState",A=>this.client.getState(A).then(Ee=>({state:{...Ee.state,payload:Ee.state.payload}})));T(this,"setState",A=>this.client.setState(A).then(Ee=>({state:{...Ee.state,payload:Ee.state.payload}})));T(this,"getOrSetState",A=>this.client.getOrSetState(A).then(Ee=>({state:{...Ee.state,payload:Ee.state.payload}})));T(this,"patchState",A=>this.client.patchState(A).then(Ee=>({state:{...Ee.state,payload:Ee.state.payload}})));T(this,"callAction",A=>this.client.callAction(A));T(this,"createConversation",A=>this.client.createConversation(A));T(this,"getOrCreateConversation",A=>this.client.getOrCreateConversation(A));T(this,"createUser",A=>this.client.createUser(A));T(this,"getOrCreateUser",A=>this.client.getOrCreateUser(A));this.client=A}},Mn=od,Ht=Mn.z.enum(["event_received","register","unregister","ping","action_triggered"]),tn=A=>{let Ee=A[V],Pe=A[se],Fe=A[O],Ce=Ht.parse(A[we]);if(!Ee)throw new Error("Missing bot headers");if(!Fe)throw new Error("Missing type headers");if(!Pe)throw new Error("Missing configuration headers");if(!Ce)throw new Error("Missing operation headers");return{botId:Ee,operation:Ce,type:Fe,configuration:Pe?JSON.parse(Buffer.from(Pe,"base64").toString("utf-8")):{}}},mn=A=>async Ee=>{let Pe=tn(Ee.headers);Pe.operation!=="ping"&&Be.info(`Received ${Pe.operation} operation for bot ${Pe.botId} of type ${Pe.type}`);let Fe=new qt(new Ot.Client({botId:Pe.botId})),Ce={req:Ee,ctx:Pe,client:Fe,instance:A};switch(Pe.operation){case"action_triggered":throw new Error(`Operation ${Pe.operation} not supported yet`);case"event_received":await ei(Ce);break;case"register":await Oi();break;case"unregister":await hr();break;case"ping":await un();break;default:throw new Error(`Unknown operation ${Pe.operation}`)}return{status:200}},un=async A=>{},Oi=async A=>{},hr=async A=>{},ei=async({ctx:A,req:Ee,client:Pe,instance:Fe})=>{Be.debug(`Received event ${A.type}`);let Ce=Me(Ee),Ie=Ce.event;switch(A.type){case"message_created":let at={user:Ie.payload.user,conversation:Ie.payload.conversation,message:Ie.payload.message,states:Ie.payload.states,event:Ie};await Promise.all(Fe.messageHandlers.map(Kt=>Kt({client:Pe,ctx:A,...at})));break;case"state_expired":let pt={state:Ie.payload.state};await Promise.all(Fe.stateExpiredHandlers.map(Kt=>Kt({client:Pe,ctx:A,...pt})));break;default:let Ft={event:Ce.event};await Promise.all(Fe.eventHandlers.map(Kt=>Kt({client:Pe,ctx:A,...Ft})))}},ta=class{constructor(A){T(this,"_state",{messageHandlers:[],eventHandlers:[],stateExpiredHandlers:[]});T(this,"props");T(this,"message",A=>{this._state.messageHandlers.push(A)});T(this,"event",A=>{this._state.eventHandlers.push(A)});T(this,"stateExpired",A=>{this._state.stateExpiredHandlers.push(A)});T(this,"handler",mn(this._state));T(this,"start",A=>Ze(this.handler,A));this.props=A}}})(Fx);var Y=Fx.exports;const{defaults:qr}=Y.messages,_r={className:Y.z.string().describe("CSS className to apply to the message").optional()},bk=qr.audio.schema.extend({..._r,type:Y.z.literal("audio")}),ay=qr.card.schema.extend({type:Y.z.literal("card"),subtitle:Y.z.string().optional(),imageUrl:Y.z.string().optional(),..._r}),boe=ay.omit({type:!0}),wk=Y.z.object({items:Y.z.array(boe),..._r,type:Y.z.literal("carousel")}),_k=qr.choice.schema.extend({text:Y.z.string(),..._r,type:Y.z.literal("choice"),disableFreeText:Y.z.boolean().optional()}),xk=qr.dropdown.schema.extend({text:Y.z.string(),..._r,type:Y.z.literal("dropdown")}),Sk=qr.file.schema.extend({..._r,type:Y.z.literal("file")}),Ek=qr.image.schema.extend({..._r,type:Y.z.literal("image")}),Ck=qr.location.schema.extend({..._r,type:Y.z.literal("location")}),Tk=qr.markdown.schema.extend({..._r,type:Y.z.literal("markdown")}),kk=qr.text.schema.extend({..._r,type:Y.z.literal("text")}),Ok=qr.video.schema.extend({..._r,type:Y.z.literal("video")}),Ak=Y.z.union([bk,ay,wk,_k,xk,Sk,Ek,Ck,Tk,kk,Ok]),$k=Y.z.object({type:Y.z.literal("webchat_visibility"),data:Y.z.object({visibility:Y.z.union([Y.z.literal("show"),Y.z.literal("hide"),Y.z.literal("toggle")])})}),Pk=Y.z.object({type:Y.z.literal("webchat_config"),data:Y.z.object({config:Y.z.record(Y.z.any())})}),Ik=Y.z.object({type:Y.z.literal("custom"),data:Y.z.object({event:Y.z.record(Y.z.any())})}),Rk=Y.z.union([$k,Pk,Ik]),woe=Rk,_oe=Y.z.object({type:Y.z.literal("message_created"),data:Ak}),xoe=Object.freeze(Object.defineProperty({__proto__:null,audioSchema:bk,cardSchema:ay,carouselSchema:wk,choiceSchema:_k,customSchema:Ik,dropdownSchema:xk,fileSchema:Sk,imageSchema:Ek,locationSchema:Ck,markdownSchema:Tk,messageCreatedSchema:_oe,messageSchema:Ak,textSchema:kk,triggerSchema:Rk,triggerSignalSchema:woe,videoSchema:Ok,webchatConfigSchema:Pk,webchatVisibilitySchema:$k},Symbol.toStringTag,{value:"Module"})),Hr=Y.z.object({className:Y.z.string().optional(),avatarUrl:Y.z.string().url().optional()}),Mk=Hr.extend({type:Y.z.literal("audio"),audio:Y.z.string(),title:Y.z.string().optional()}),Soe=Y.z.union([Y.z.object({title:Y.z.string(),action:Y.z.literal("Say something"),text:Y.z.string()}),Y.z.object({title:Y.z.string(),action:Y.z.literal("Open URL"),url:Y.z.string()}),Y.z.object({title:Y.z.string(),action:Y.z.literal("Postback"),payload:Y.z.string()})]),sy=Hr.extend({type:Y.z.literal("card"),title:Y.z.string(),subtitle:Y.z.string().optional(),image:Y.z.string().optional(),actions:Y.z.array(Soe)}),Nk=Hr.extend({type:Y.z.literal("carousel"),items:Y.z.array(sy)}),Dk=Hr.extend({type:Y.z.literal("dropdown"),message:Y.z.string().optional(),options:Y.z.array(Y.z.object({label:Y.z.string(),value:Y.z.string()})),allowCreation:Y.z.boolean().optional(),placeholderText:Y.z.string().optional(),allowMultiple:Y.z.boolean().optional(),buttonText:Y.z.string().optional(),width:Y.z.number().optional(),displayInKeyboard:Y.z.boolean().optional(),markdown:Y.z.boolean().optional(),text:Y.z.string().optional()}),jk=Hr.extend({type:Y.z.literal("file"),file:Y.z.string(),title:Y.z.string().optional()}),Lk=Hr.extend({type:Y.z.literal("image"),image:Y.z.string()}),Fk=Hr.extend({type:Y.z.literal("location"),latitude:Y.z.number(),longitude:Y.z.number(),address:Y.z.string().optional(),title:Y.z.string().optional()}),Uk=Hr.extend({type:Y.z.literal("single-choice"),text:Y.z.string(),disableFreeText:Y.z.boolean().optional(),choices:Y.z.array(Y.z.object({title:Y.z.string(),value:Y.z.string()}))}),Bk=Hr.extend({type:Y.z.literal("text"),text:Y.z.string(),markdown:Y.z.boolean().optional()}),zk=Hr.extend({type:Y.z.literal("video"),video:Y.z.string(),title:Y.z.string().optional()}),Zk=Y.z.object({type:Y.z.literal("quick_reply"),text:Y.z.string(),payload:Y.z.string().optional()}),Ef=Y.z.union([Mk,sy,Nk,Dk,jk,Lk,Fk,Uk,Bk,zk,Zk]),qk=Y.z.object({type:Y.z.literal("webchat-visibility"),visibility:Y.z.union([Y.z.literal("show"),Y.z.literal("hide"),Y.z.literal("toggle")])}),Hk=Y.z.object({type:Y.z.literal("webchat-config"),config:Y.z.record(Y.z.any())}),Wk=Y.z.object({type:Y.z.literal("custom-event"),event:Y.z.record(Y.z.any())}),Vk=Y.z.union([qk,Hk,Wk]),Eoe=Y.z.object({type:Y.z.literal("trigger"),trigger:Vk}),Coe=Object.freeze(Object.defineProperty({__proto__:null,audioSchema:Mk,cardSchema:sy,carouselSchame:Nk,customEventSchema:Wk,dropdownSchema:Dk,fileSchema:jk,imageSchema:Lk,locationSchema:Fk,messageSchema:Ef,messageSignalSchema:Ef,quickReplySchema:Zk,singleChoiceSchema:Uk,textSchema:Bk,triggerSchema:Vk,triggerSignalSchema:Eoe,videoSchema:zk,webchatConfigSchema:Hk,webchatVisibilitySchema:qk},Symbol.toStringTag,{value:"Module"})),Kk=e=>({type:"card",title:e.title,subtitle:e.subtitle,image:e.imageUrl,actions:e.actions.map(Toe)}),Toe=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}`)}},Gk=e=>({...e,type:"audio",audio:e.audioUrl}),Yk=e=>Kk(e),Jk=e=>({...e,type:"carousel",items:e.items.map(Kk)}),Xk=e=>({...e,type:"single-choice",text:e.text,choices:e.options.map(t=>({title:t.label,value:t.value})),disableFreeText:e.disableFreeText}),Qk=e=>({...e,type:"dropdown",message:e.text,options:e.options.map(t=>({label:t.label,value:t.value}))}),eO=e=>({...e,type:"file",file:e.fileUrl,title:e.title}),tO=e=>({...e,type:"image",image:e.imageUrl}),nO=e=>({...e,type:"location",latitude:e.latitude,longitude:e.longitude}),rO=e=>({...e,type:"text",text:e.markdown,markdown:!0}),iO=e=>({...e,type:"text",text:e.text,markdown:!0}),oO=e=>({...e,type:"video",video:e.videoUrl}),koe=e=>{switch(e.type){case"audio":return Gk(e);case"card":return Yk(e);case"carousel":return Jk(e);case"choice":return Xk(e);case"dropdown":return Qk(e);case"file":return eO(e);case"image":return tO(e);case"location":return nO(e);case"markdown":return rO(e);case"text":return iO(e);case"video":return oO(e);default:throw new Error("Unsuported message type")}},aO=e=>({type:"webchat-visibility",visibility:e.data.visibility}),sO=e=>({type:"webchat-config",config:e.data.config}),lO=e=>({type:"custom-event",event:e.data.event}),Ooe=Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:Gk,cardAdapter:Yk,carouselAdapter:Jk,choiceAdapter:Xk,customAdapter:lO,dropdownAdapter:Qk,fileAdapter:eO,imageAdapter:tO,locationAdapter:nO,markdownAdapter:rO,messageAdapter:koe,textAdapter:iO,triggerAdapter:e=>{switch(e.type){case"webchat_visibility":return aO(e);case"webchat_config":return sO(e);case"custom":return lO(e);default:throw new Error("unknown trigger type")}},videoAdapter:oO,webchatConfigAdapter:sO,webchatVisibilityAdapter:aO},Symbol.toStringTag,{value:"Module"})),cO=e=>({type:"card",title:e.title,subtitle:e.subtitle,imageUrl:e.image,actions:e.actions.map(Aoe)}),Aoe=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")}},$oe=e=>({...e,type:"audio",audioUrl:e.audio}),Poe=e=>cO(e),Ioe=e=>({...e,type:"carousel",items:e.items.map(cO)}),Roe=e=>({...e,type:"dropdown",text:e.message??"",options:e.options.map(t=>({label:t.label,value:t.value}))}),Moe=e=>({...e,type:"file",fileUrl:e.file,title:e.title}),Noe=e=>({...e,type:"image",imageUrl:e.image}),Doe=e=>({...e,type:"location",latitude:e.latitude,longitude:e.longitude}),joe=e=>({...e,type:"choice",text:e.text,options:e.choices.map(t=>({label:t.title,value:t.value})),disableFreeText:e.disableFreeText}),Loe=e=>({...e,type:"text",text:e.text}),Foe=e=>({...e,type:"video",videoUrl:e.video}),Uoe=e=>({...e,type:"text",text:e.text??e.payload}),Boe=Object.freeze(Object.defineProperty({__proto__:null,messaging:Coe,messagingToWebChat:Object.freeze(Object.defineProperty({__proto__:null,messageAdapter:e=>{switch(e.type){case"audio":return $oe(e);case"card":return Poe(e);case"carousel":return Ioe(e);case"dropdown":return Roe(e);case"file":return Moe(e);case"image":return Noe(e);case"location":return Doe(e);case"single-choice":return joe(e);case"text":return Loe(e);case"video":return Foe(e);case"quick_reply":return Uoe(e);default:throw new Error("Unsuported message type")}}},Symbol.toStringTag,{value:"Module"})),webchat:xoe,webchatToMessaging:Ooe},Symbol.toStringTag,{value:"Module"}));let Cf;const zoe=new Uint8Array(16);function Zoe(){if(!Cf&&(Cf=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Cf))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Cf(zoe)}const _n=[];for(let e=0;e<256;++e)_n.push((e+256).toString(16).slice(1));function qoe(e,t=0){return _n[e[t+0]]+_n[e[t+1]]+_n[e[t+2]]+_n[e[t+3]]+"-"+_n[e[t+4]]+_n[e[t+5]]+"-"+_n[e[t+6]]+_n[e[t+7]]+"-"+_n[e[t+8]]+_n[e[t+9]]+"-"+_n[e[t+10]]+_n[e[t+11]]+_n[e[t+12]]+_n[e[t+13]]+_n[e[t+14]]+_n[e[t+15]]}const uO={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Hoe(e,t,n){if(uO.randomUUID&&!t&&!e)return uO.randomUUID();e=e||{};const r=e.random||(e.rng||Zoe)();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 qoe(r)}const Tf=e=>({block:e,type:"bubble"}),Woe=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},dO=({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(Woe)}),{type:"column",horizontalAlignment:"center",blocks:[...i]}},Voe=({choices:e,text:t})=>{const n=Hoe(),r=Tf({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}))}]}},Koe=({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}},fO=({type:e,audio:t})=>({payload:{type:e,url:t}}),pO=e=>({payload:Tf(dO(e))}),hO=({items:e})=>({payload:{type:"carousel",blocks:e.map(dO)}}),mO=e=>({disableInput:e.disableFreeText,payload:Voe(e)}),gO=e=>({disableInput:!0,payload:Tf(Koe(e))}),yO=({file:e,...t})=>({payload:{url:e,...t}}),vO=({type:e,image:t})=>({payload:{type:e,url:t}}),bO=({type:e,latitude:t,longitude:n,title:r,address:i})=>({payload:{type:e,latitude:t,longitude:n,title:r??i??"View on map"}}),Goe=({text:e,payload:t})=>({payload:{type:"text",text:e??t}}),ly=({type:e,text:t})=>({payload:Tf({type:e,text:t})}),wO=({type:e,video:t})=>({payload:{type:e,url:t}}),_O=e=>{switch(e.type){case"audio":return fO(e);case"card":return pO(e);case"carousel":return hO(e);case"single-choice":return mO(e);case"dropdown":return gO(e);case"file":return yO(e);case"image":return vO(e);case"location":return bO(e);case"quick_reply":return Goe(e);case"text":return ly(e);case"video":return wO(e);default:throw new Error("Unsuported message type")}},{webchatToMessaging:xr}=Boe,Yoe=e=>{const t=xr.audioAdapter(e);return fO(t)},Joe=e=>{const t=xr.cardAdapter(e);return pO(t)},Xoe=e=>{const t=xr.carouselAdapter(e);return hO(t)},Qoe=e=>{const t=xr.choiceAdapter(e);return mO(t)},eae=e=>{const t=xr.dropdownAdapter(e);return gO(t)},tae=e=>{const t=xr.fileAdapter(e);return yO(t)},nae=e=>{const t=xr.imageAdapter(e);return vO(t)},rae=e=>{const t=xr.locationAdapter(e);return bO(t)},iae=e=>{const t=xr.markdownAdapter(e);return ly(t)},oae=e=>{const t=xr.textAdapter(e);return ly(t)},aae=e=>{const t=xr.videoAdapter(e);return wO(t)},sae=e=>{switch(e.type){case"audio":return Yoe(e);case"card":return Joe(e);case"carousel":return Xoe(e);case"choice":return Qoe(e);case"dropdown":return eae(e);case"file":return tae(e);case"image":return nae(e);case"location":return rae(e);case"markdown":return iae(e);case"text":return oae(e);case"video":return aae(e);default:throw new Error("Unsuported message type")}};class xO{constructor(t){T(this,"socket");T(this,"clientId");T(this,"userId");T(this,"conversationId");T(this,"userToken");T(this,"connected",!1);T(this,"emitter");T(this,"on");T(this,"mode","messaging");this.socket=new nx.MessagingSocket(t),this.emitter=new zp,this.clientId=t.clientId,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=Ef.parse(r),{payload:o,disableInput:a}=_O(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 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=Ef.parse(r.payload),{payload:o,disableInput:a}=_O(i);return{...r,payload:o,disableInput:a}})}}function SO(e,t){return function(){return e.apply(t,arguments)}}const{toString:EO}=Object.prototype,{getPrototypeOf:cy}=Object,uy=(e=>t=>{const n=EO.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),bi=e=>(e=e.toLowerCase(),t=>uy(t)===e),kf=e=>t=>typeof t===e,{isArray:rs}=Array,zl=kf("undefined");function lae(e){return e!==null&&!zl(e)&&e.constructor!==null&&!zl(e.constructor)&&zo(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const CO=bi("ArrayBuffer");function cae(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&CO(e.buffer),t}const uae=kf("string"),zo=kf("function"),TO=kf("number"),dy=e=>e!==null&&typeof e=="object",dae=e=>e===!0||e===!1,Of=e=>{if(uy(e)!=="object")return!1;const t=cy(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},fae=bi("Date"),pae=bi("File"),hae=bi("Blob"),mae=bi("FileList"),gae=e=>dy(e)&&zo(e.pipe),yae=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||EO.call(e)===t||zo(e.toString)&&e.toString()===t)},vae=bi("URLSearchParams"),bae=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Zl(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),rs(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 kO(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 OO=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),AO=e=>!zl(e)&&e!==OO;function fy(){const{caseless:e}=AO(this)&&this||{},t={},n=(r,i)=>{const o=e&&kO(t,i)||i;Of(t[o])&&Of(r)?t[o]=fy(t[o],r):Of(r)?t[o]=fy({},r):rs(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Zl(arguments[r],n);return t}const wae=(e,t,n,{allOwnKeys:r}={})=>(Zl(t,(i,o)=>{n&&zo(i)?e[o]=SO(i,n):e[o]=i},{allOwnKeys:r}),e),_ae=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),xae=(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)},Sae=(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&&cy(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Eae=(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},Cae=e=>{if(!e)return null;if(rs(e))return e;let t=e.length;if(!TO(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Tae=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&cy(Uint8Array)),kae=(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])}},Oae=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Aae=bi("HTMLFormElement"),$ae=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),$O=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Pae=bi("RegExp"),PO=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Zl(n,(i,o)=>{t(i,o,e)!==!1&&(r[o]=i)}),Object.defineProperties(e,r)},ae={isArray:rs,isArrayBuffer:CO,isBuffer:lae,isFormData:yae,isArrayBufferView:cae,isString:uae,isNumber:TO,isBoolean:dae,isObject:dy,isPlainObject:Of,isUndefined:zl,isDate:fae,isFile:pae,isBlob:hae,isRegExp:Pae,isFunction:zo,isStream:gae,isURLSearchParams:vae,isTypedArray:Tae,isFileList:mae,forEach:Zl,merge:fy,extend:wae,trim:bae,stripBOM:_ae,inherits:xae,toFlatObject:Sae,kindOf:uy,kindOfTest:bi,endsWith:Eae,toArray:Cae,forEachEntry:kae,matchAll:Oae,isHTMLForm:Aae,hasOwnProperty:$O,hasOwnProp:$O,reduceDescriptors:PO,freezeMethods:e=>{PO(e,(t,n)=>{if(zo(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(zo(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 rs(e)?r(e):r(String(e).split(t)),n},toCamelCase:$ae,noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:kO,global:OO,isContextDefined:AO,toJSONObject:e=>{const t=new Array(10),n=(r,i)=>{if(dy(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=rs(r)?[]:{};return Zl(r,(a,s)=>{const l=n(a,i+1);!zl(l)&&(o[s]=l)}),t[i]=void 0,o}}return r};return n(e,0)}};function St(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)}ae.inherits(St,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:ae.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const IO=St.prototype,RO={};["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=>{RO[e]={value:e}}),Object.defineProperties(St,RO),Object.defineProperty(IO,"isAxiosError",{value:!0}),St.from=(e,t,n,r,i,o)=>{const a=Object.create(IO);return ae.toFlatObject(e,a,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),St.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};var Iae=typeof self=="object"?self.FormData:window.FormData;const Rae=ti(Iae);function py(e){return ae.isPlainObject(e)||ae.isArray(e)}function MO(e){return ae.endsWith(e,"[]")?e.slice(0,-2):e}function NO(e,t,n){return e?e.concat(t).map(function(i,o){return i=MO(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function Mae(e){return ae.isArray(e)&&!e.some(py)}const Nae=ae.toFlatObject(ae,{},null,function(t){return/^is[A-Z]/.test(t)});function Dae(e){return e&&ae.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function Af(e,t,n){if(!ae.isObject(e))throw new TypeError("target must be an object");t=t||new(Rae||FormData),n=ae.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,v){return!ae.isUndefined(v[m])});const r=n.metaTokens,i=n.visitor||u,o=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&Dae(t);if(!ae.isFunction(i))throw new TypeError("visitor must be a function");function c(h){if(h===null)return"";if(ae.isDate(h))return h.toISOString();if(!l&&ae.isBlob(h))throw new St("Blob is not supported. Use a Buffer instead.");return ae.isArrayBuffer(h)||ae.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,m,v){let g=h;if(h&&!v&&typeof h=="object"){if(ae.endsWith(m,"{}"))m=r?m:m.slice(0,-2),h=JSON.stringify(h);else if(ae.isArray(h)&&Mae(h)||ae.isFileList(h)||ae.endsWith(m,"[]")&&(g=ae.toArray(h)))return m=MO(m),g.forEach(function(b,x){!(ae.isUndefined(b)||b===null)&&t.append(a===!0?NO([m],x,o):a===null?m:m+"[]",c(b))}),!1}return py(h)?!0:(t.append(NO(v,m,o),c(h)),!1)}const d=[],p=Object.assign(Nae,{defaultVisitor:u,convertValue:c,isVisitable:py});function f(h,m){if(!ae.isUndefined(h)){if(d.indexOf(h)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(h),ae.forEach(h,function(g,y){(!(ae.isUndefined(g)||g===null)&&i.call(t,g,ae.isString(y)?y.trim():y,m,p))===!0&&f(g,m?m.concat(y):[y])}),d.pop()}}if(!ae.isObject(e))throw new TypeError("data must be an object");return f(e),t}function DO(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function hy(e,t){this._pairs=[],e&&Af(e,this,t)}const jO=hy.prototype;jO.append=function(t,n){this._pairs.push([t,n])},jO.toString=function(t){const n=t?function(r){return t.call(this,r,DO)}:DO;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function jae(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function LO(e,t,n){if(!t)return e;const r=n&&n.encode||jae,i=n&&n.serialize;let o;if(i?o=i(t,n):o=ae.isURLSearchParams(t)?t.toString():new hy(t,n).toString(r),o){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Lae{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){ae.forEach(this.handlers,function(r){r!==null&&t(r)})}}const FO=Lae,UO={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Fae=typeof URLSearchParams<"u"?URLSearchParams:hy,Uae=FormData,Bae=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),zae=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Wr={isBrowser:!0,classes:{URLSearchParams:Fae,FormData:Uae,Blob},isStandardBrowserEnv:Bae,isStandardBrowserWebWorkerEnv:zae,protocols:["http","https","file","blob","url","data"]};function Zae(e,t){return Af(e,new Wr.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Wr.isNode&&ae.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function qae(e){return ae.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Hae(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function BO(e){function t(n,r,i,o){let a=n[o++];const s=Number.isFinite(+a),l=o>=n.length;return a=!a&&ae.isArray(i)?i.length:a,l?(ae.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!s):((!i[a]||!ae.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&ae.isArray(i[a])&&(i[a]=Hae(i[a])),!s)}if(ae.isFormData(e)&&ae.isFunction(e.entries)){const n={};return ae.forEachEntry(e,(r,i)=>{t(qae(r),i,n,0)}),n}return null}const Wae={"Content-Type":void 0};function Vae(e,t,n){if(ae.isString(e))try{return(t||JSON.parse)(e),ae.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const $f={transitional:UO,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=ae.isObject(t);if(o&&ae.isHTMLForm(t)&&(t=new FormData(t)),ae.isFormData(t))return i&&i?JSON.stringify(BO(t)):t;if(ae.isArrayBuffer(t)||ae.isBuffer(t)||ae.isStream(t)||ae.isFile(t)||ae.isBlob(t))return t;if(ae.isArrayBufferView(t))return t.buffer;if(ae.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 Zae(t,this.formSerializer).toString();if((s=ae.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Af(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),Vae(t)):t}],transformResponse:[function(t){const n=this.transitional||$f.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&ae.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"?St.from(s,St.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:Wr.classes.FormData,Blob:Wr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};ae.forEach(["delete","get","head"],function(t){$f.headers[t]={}}),ae.forEach(["post","put","patch"],function(t){$f.headers[t]=ae.merge(Wae)});const my=$f,Kae=ae.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"]),Gae=e=>{const t={};let n,r,i;return e&&e.split(`
367
367
  `).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!n||t[n]&&Kae[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},zO=Symbol("internals");function ql(e){return e&&String(e).trim().toLowerCase()}function Pf(e){return e===!1||e==null?e:ae.isArray(e)?e.map(Pf):String(e)}function Yae(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 Jae(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function ZO(e,t,n,r){if(ae.isFunction(r))return r.call(this,t,n);if(ae.isString(t)){if(ae.isString(r))return t.indexOf(r)!==-1;if(ae.isRegExp(r))return r.test(t)}}function Xae(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Qae(e,t){const n=ae.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 If{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(s,l,c){const u=ql(l);if(!u)throw new Error("header name must be a non-empty string");const d=ae.findKey(i,u);(!d||i[d]===void 0||c===!0||c===void 0&&i[d]!==!1)&&(i[d||l]=Pf(s))}const a=(s,l)=>ae.forEach(s,(c,u)=>o(c,u,l));return ae.isPlainObject(t)||t instanceof this.constructor?a(t,n):ae.isString(t)&&(t=t.trim())&&!Jae(t)?a(Gae(t),n):t!=null&&o(n,t,r),this}get(t,n){if(t=ql(t),t){const r=ae.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return Yae(i);if(ae.isFunction(n))return n.call(this,i,r);if(ae.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ql(t),t){const r=ae.findKey(this,t);return!!(r&&(!n||ZO(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(a){if(a=ql(a),a){const s=ae.findKey(r,a);s&&(!n||ZO(r,r[s],s,n))&&(delete r[s],i=!0)}}return ae.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 ae.forEach(this,(i,o)=>{const a=ae.findKey(r,o);if(a){n[a]=Pf(i),delete n[o];return}const s=t?Xae(o):String(o).trim();s!==o&&delete n[o],n[s]=Pf(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return ae.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&ae.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(`
368
- `)}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[zO]=this[zO]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=ql(a);r[s]||(Qae(i,a),r[s]=!0)}return ae.isArray(t)?t.forEach(o):o(t),this}}If.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),ae.freezeMethods(If.prototype),ae.freezeMethods(If);const wi=If;function gy(e,t){const n=this||my,r=t||n,i=wi.from(r.headers);let o=r.data;return ae.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function qO(e){return!!(e&&e.__CANCEL__)}function Hl(e,t,n){St.call(this,e??"canceled",St.ERR_CANCELED,t,n),this.name="CanceledError"}ae.inherits(Hl,St,{__CANCEL__:!0});const ese=null;function tse(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new St("Request failed with status code "+n.status,[St.ERR_BAD_REQUEST,St.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const nse=Wr.isStandardBrowserEnv?function(){return{write:function(n,r,i,o,a,s){const l=[];l.push(n+"="+encodeURIComponent(r)),ae.isNumber(i)&&l.push("expires="+new Date(i).toGMTString()),ae.isString(o)&&l.push("path="+o),ae.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 rse(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ise(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function HO(e,t){return e&&!rse(t)?ise(e,t):t}const ose=Wr.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=ae.isString(a)?i(a):a;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function ase(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function sse(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(),u=r[o];a||(a=c),n[i]=l,r[i]=c;let d=o,p=0;for(;d!==i;)p+=n[d++],d=d%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),c-a<t)return;const f=u&&c-u;return f?Math.round(p*1e3/f):void 0}}function WO(e,t){let n=0;const r=sse(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 u={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};u[t?"download":"upload"]=!0,e(u)}}const Rf={http:ese,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let i=e.data;const o=wi.from(e.headers).normalize(),a=e.responseType;let s;function l(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}ae.isFormData(i)&&(Wr.isStandardBrowserEnv||Wr.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let c=new XMLHttpRequest;if(e.auth){const f=e.auth.username||"",h=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(f+":"+h))}const u=HO(e.baseURL,e.url);c.open(e.method.toUpperCase(),LO(u,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function d(){if(!c)return;const f=wi.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),m={data:!a||a==="text"||a==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:f,config:e,request:c};tse(function(g){n(g),l()},function(g){r(g),l()},m),c=null}if("onloadend"in c?c.onloadend=d:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(d)},c.onabort=function(){c&&(r(new St("Request aborted",St.ECONNABORTED,e,c)),c=null)},c.onerror=function(){r(new St("Network Error",St.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let h=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const m=e.transitional||UO;e.timeoutErrorMessage&&(h=e.timeoutErrorMessage),r(new St(h,m.clarifyTimeoutError?St.ETIMEDOUT:St.ECONNABORTED,e,c)),c=null},Wr.isStandardBrowserEnv){const f=(e.withCredentials||ose(u))&&e.xsrfCookieName&&nse.read(e.xsrfCookieName);f&&o.set(e.xsrfHeaderName,f)}i===void 0&&o.setContentType(null),"setRequestHeader"in c&&ae.forEach(o.toJSON(),function(h,m){c.setRequestHeader(m,h)}),ae.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),a&&a!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",WO(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",WO(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=f=>{c&&(r(!f||f.type?new Hl(null,e,c):f),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const p=ase(u);if(p&&Wr.protocols.indexOf(p)===-1){r(new St("Unsupported protocol "+p+":",St.ERR_BAD_REQUEST,e));return}c.send(i||null)})}};ae.forEach(Rf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const lse={getAdapter:e=>{e=ae.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let i=0;i<t&&(n=e[i],!(r=ae.isString(n)?Rf[n.toLowerCase()]:n));i++);if(!r)throw r===!1?new St(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(ae.hasOwnProp(Rf,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!ae.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:Rf};function yy(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Hl(null,e)}function VO(e){return yy(e),e.headers=wi.from(e.headers),e.data=gy.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),lse.getAdapter(e.adapter||my.adapter)(e).then(function(r){return yy(e),r.data=gy.call(e,e.transformResponse,r),r.headers=wi.from(r.headers),r},function(r){return qO(r)||(yy(e),r&&r.response&&(r.response.data=gy.call(e,e.transformResponse,r.response),r.response.headers=wi.from(r.response.headers))),Promise.reject(r)})}const KO=e=>e instanceof wi?e.toJSON():e;function is(e,t){t=t||{};const n={};function r(c,u,d){return ae.isPlainObject(c)&&ae.isPlainObject(u)?ae.merge.call({caseless:d},c,u):ae.isPlainObject(u)?ae.merge({},u):ae.isArray(u)?u.slice():u}function i(c,u,d){if(ae.isUndefined(u)){if(!ae.isUndefined(c))return r(void 0,c,d)}else return r(c,u,d)}function o(c,u){if(!ae.isUndefined(u))return r(void 0,u)}function a(c,u){if(ae.isUndefined(u)){if(!ae.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function s(c,u,d){if(d in t)return r(c,u);if(d 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,u)=>i(KO(c),KO(u),!0)};return ae.forEach(Object.keys(e).concat(Object.keys(t)),function(u){const d=l[u]||i,p=d(e[u],t[u],u);ae.isUndefined(p)&&d!==s||(n[u]=p)}),n}const GO="1.2.5",vy={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{vy[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const YO={};vy.transitional=function(t,n,r){function i(o,a){return"[Axios v"+GO+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(t===!1)throw new St(i(a," has been removed"+(n?" in "+n:"")),St.ERR_DEPRECATED);return n&&!YO[a]&&(YO[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 cse(e,t,n){if(typeof e!="object")throw new St("options must be an object",St.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 St("option "+o+" must be "+l,St.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new St("Unknown option "+o,St.ERR_BAD_OPTION)}}const by={assertOptions:cse,validators:vy},Gi=by.validators;class Mf{constructor(t){this.defaults=t,this.interceptors={request:new FO,response:new FO}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=is(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&by.assertOptions(r,{silentJSONParsing:Gi.transitional(Gi.boolean),forcedJSONParsing:Gi.transitional(Gi.boolean),clarifyTimeoutError:Gi.transitional(Gi.boolean)},!1),i!==void 0&&by.assertOptions(i,{encode:Gi.function,serialize:Gi.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a;a=o&&ae.merge(o.common,o[n.method]),a&&ae.forEach(["delete","get","head","post","put","patch","common"],h=>{delete o[h]}),n.headers=wi.concat(a,o);const s=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,d=0,p;if(!l){const h=[VO.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,c),p=h.length,u=Promise.resolve(n);d<p;)u=u.then(h[d++],h[d++]);return u}p=s.length;let f=n;for(d=0;d<p;){const h=s[d++],m=s[d++];try{f=h(f)}catch(v){m.call(this,v);break}}try{u=VO.call(this,f)}catch(h){return Promise.reject(h)}for(d=0,p=c.length;d<p;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=is(this.defaults,t);const n=HO(t.baseURL,t.url);return LO(n,t.params,t.paramsSerializer)}}ae.forEach(["delete","get","head","options"],function(t){Mf.prototype[t]=function(n,r){return this.request(is(r||{},{method:t,url:n,data:(r||{}).data}))}}),ae.forEach(["post","put","patch"],function(t){function n(r){return function(o,a,s){return this.request(is(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}Mf.prototype[t]=n(),Mf.prototype[t+"Form"]=n(!0)});const Nf=Mf;class wy{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 Hl(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 wy(function(i){t=i}),cancel:t}}}const use=wy;function dse(e){return function(n){return e.apply(null,n)}}function fse(e){return ae.isObject(e)&&e.isAxiosError===!0}const _y={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(_y).forEach(([e,t])=>{_y[t]=e});const pse=_y;function JO(e){const t=new Nf(e),n=SO(Nf.prototype.request,t);return ae.extend(n,Nf.prototype,t,{allOwnKeys:!0}),ae.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return JO(is(e,i))},n}const sn=JO(my);sn.Axios=Nf,sn.CanceledError=Hl,sn.CancelToken=use,sn.isCancel=qO,sn.VERSION=GO,sn.toFormData=Af,sn.AxiosError=St,sn.Cancel=sn.CanceledError,sn.all=function(t){return Promise.all(t)},sn.spread=dse,sn.isAxiosError=fse,sn.mergeConfig=is,sn.AxiosHeaders=wi,sn.formToJSON=e=>BO(ae.isHTMLForm(e)?new FormData(e):e),sn.HttpStatusCode=pse,sn.default=sn;const XO=sn;var hse=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},QO=typeof Symbol<"u"&&Symbol,mse=hse,gse=function(){return typeof QO!="function"||typeof Symbol!="function"||typeof QO("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:mse()},eA={foo:{}},yse=Object,vse=function(){return{__proto__:eA}.foo===eA.foo&&!({__proto__:null}instanceof yse)},bse="Function.prototype.bind called on incompatible ",wse=Object.prototype.toString,_se=Math.max,xse="[object Function]",tA=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},Sse=function(t,n){for(var r=[],i=n||0,o=0;i<t.length;i+=1,o+=1)r[o]=t[i];return r},Ese=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},Cse=function(t){var n=this;if(typeof n!="function"||wse.apply(n)!==xse)throw new TypeError(bse+n);for(var r=Sse(arguments,1),i,o=function(){if(this instanceof i){var u=n.apply(this,tA(r,arguments));return Object(u)===u?u:this}return n.apply(t,tA(r,arguments))},a=_se(0,n.length-r.length),s=[],l=0;l<a;l++)s[l]="$"+l;if(i=Function("binder","return function ("+Ese(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},Tse=Cse,xy=Function.prototype.bind||Tse,kse=xy,Ose=kse.call(Function.call,Object.prototype.hasOwnProperty),mt,os=SyntaxError,nA=Function,as=TypeError,Sy=function(e){try{return nA('"use strict"; return ('+e+").constructor;")()}catch{}},Zo=Object.getOwnPropertyDescriptor;if(Zo)try{Zo({},"")}catch{Zo=null}var Ey=function(){throw new as},Ase=Zo?function(){try{return arguments.callee,Ey}catch{try{return Zo(arguments,"callee").get}catch{return Ey}}}():Ey,ss=gse(),$se=vse(),pn=Object.getPrototypeOf||($se?function(e){return e.__proto__}:null),ls={},Pse=typeof Uint8Array>"u"||!pn?mt:pn(Uint8Array),qo={"%AggregateError%":typeof AggregateError>"u"?mt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?mt:ArrayBuffer,"%ArrayIteratorPrototype%":ss&&pn?pn([][Symbol.iterator]()):mt,"%AsyncFromSyncIteratorPrototype%":mt,"%AsyncFunction%":ls,"%AsyncGenerator%":ls,"%AsyncGeneratorFunction%":ls,"%AsyncIteratorPrototype%":ls,"%Atomics%":typeof Atomics>"u"?mt:Atomics,"%BigInt%":typeof BigInt>"u"?mt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?mt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?mt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?mt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?mt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?mt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?mt:FinalizationRegistry,"%Function%":nA,"%GeneratorFunction%":ls,"%Int8Array%":typeof Int8Array>"u"?mt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?mt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?mt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ss&&pn?pn(pn([][Symbol.iterator]())):mt,"%JSON%":typeof JSON=="object"?JSON:mt,"%Map%":typeof Map>"u"?mt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ss||!pn?mt:pn(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?mt:Promise,"%Proxy%":typeof Proxy>"u"?mt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?mt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?mt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ss||!pn?mt:pn(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?mt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ss&&pn?pn(""[Symbol.iterator]()):mt,"%Symbol%":ss?Symbol:mt,"%SyntaxError%":os,"%ThrowTypeError%":Ase,"%TypedArray%":Pse,"%TypeError%":as,"%Uint8Array%":typeof Uint8Array>"u"?mt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?mt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?mt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?mt:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?mt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?mt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?mt:WeakSet};if(pn)try{null.error}catch(e){var Ise=pn(pn(e));qo["%Error.prototype%"]=Ise}var Rse=function e(t){var n;if(t==="%AsyncFunction%")n=Sy("async function () {}");else if(t==="%GeneratorFunction%")n=Sy("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Sy("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&pn&&(n=pn(i.prototype))}return qo[t]=n,n},rA={"%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"]},Wl=xy,Df=Ose,Mse=Wl.call(Function.call,Array.prototype.concat),Nse=Wl.call(Function.apply,Array.prototype.splice),iA=Wl.call(Function.call,String.prototype.replace),jf=Wl.call(Function.call,String.prototype.slice),Dse=Wl.call(Function.call,RegExp.prototype.exec),jse=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Lse=/\\(\\)?/g,Fse=function(t){var n=jf(t,0,1),r=jf(t,-1);if(n==="%"&&r!=="%")throw new os("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new os("invalid intrinsic syntax, expected opening `%`");var i=[];return iA(t,jse,function(o,a,s,l){i[i.length]=s?iA(l,Lse,"$1"):a||o}),i},Use=function(t,n){var r=t,i;if(Df(rA,r)&&(i=rA[r],r="%"+i[0]+"%"),Df(qo,r)){var o=qo[r];if(o===ls&&(o=Rse(r)),typeof o>"u"&&!n)throw new as("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new os("intrinsic "+t+" does not exist!")},Cy=function(t,n){if(typeof t!="string"||t.length===0)throw new as("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new as('"allowMissing" argument must be a boolean');if(Dse(/^%?[^%]*%?$/,t)===null)throw new os("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Fse(t),i=r.length>0?r[0]:"",o=Use("%"+i+"%",n),a=o.name,s=o.value,l=!1,c=o.alias;c&&(i=c[0],Nse(r,Mse([0,1],c)));for(var u=1,d=!0;u<r.length;u+=1){var p=r[u],f=jf(p,0,1),h=jf(p,-1);if((f==='"'||f==="'"||f==="`"||h==='"'||h==="'"||h==="`")&&f!==h)throw new os("property names with quotes must have matching quotes");if((p==="constructor"||!d)&&(l=!0),i+="."+p,a="%"+i+"%",Df(qo,a))s=qo[a];else if(s!=null){if(!(p in s)){if(!n)throw new as("base intrinsic for "+t+" exists, but the property is not available.");return}if(Zo&&u+1>=r.length){var m=Zo(s,p);d=!!m,d&&"get"in m&&!("originalValue"in m.get)?s=m.get:s=s[p]}else d=Df(s,p),s=s[p];d&&!l&&(qo[a]=s)}}return s},oA={exports:{}};(function(e){var t=xy,n=Cy,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(d){var p=o(t,i,arguments);if(a&&s){var f=a(p,"length");f.configurable&&s(p,"length",{value:1+l(0,d.length-(arguments.length-1))})}return p};var c=function(){return o(t,r,arguments)};s?s(e.exports,"apply",{value:c}):e.exports.apply=c})(oA);var Bse=oA.exports,aA=Cy,sA=Bse,zse=sA(aA("String.prototype.indexOf")),Zse=function(t,n){var r=aA(t,!!n);return typeof r=="function"&&zse(t,".prototype.")>-1?sA(r):r},Ty=typeof Map=="function"&&Map.prototype,ky=Object.getOwnPropertyDescriptor&&Ty?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Lf=Ty&&ky&&typeof ky.get=="function"?ky.get:null,lA=Ty&&Map.prototype.forEach,Oy=typeof Set=="function"&&Set.prototype,Ay=Object.getOwnPropertyDescriptor&&Oy?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Ff=Oy&&Ay&&typeof Ay.get=="function"?Ay.get:null,cA=Oy&&Set.prototype.forEach,qse=typeof WeakMap=="function"&&WeakMap.prototype,Vl=qse?WeakMap.prototype.has:null,Hse=typeof WeakSet=="function"&&WeakSet.prototype,Kl=Hse?WeakSet.prototype.has:null,Wse=typeof WeakRef=="function"&&WeakRef.prototype,uA=Wse?WeakRef.prototype.deref:null,Vse=Boolean.prototype.valueOf,Kse=Object.prototype.toString,Gse=Function.prototype.toString,Yse=String.prototype.match,$y=String.prototype.slice,Yi=String.prototype.replace,Jse=String.prototype.toUpperCase,dA=String.prototype.toLowerCase,fA=RegExp.prototype.test,pA=Array.prototype.concat,Vr=Array.prototype.join,Xse=Array.prototype.slice,hA=Math.floor,Py=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Iy=Object.getOwnPropertySymbols,Ry=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,cs=typeof Symbol=="function"&&typeof Symbol.iterator=="object",On=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===cs||"symbol")?Symbol.toStringTag:null,mA=Object.prototype.propertyIsEnumerable,gA=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function yA(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||fA.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-hA(-e):hA(e);if(r!==e){var i=String(r),o=$y.call(t,i.length+1);return Yi.call(i,n,"$&_")+"."+Yi.call(Yi.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Yi.call(t,n,"$&_")}var My=Bo,vA=My.custom,bA=xA(vA)?vA:null,Qse=function e(t,n,r,i){var o=n||{};if(Ji(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ji(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=Ji(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(Ji(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(Ji(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 EA(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return s?yA(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return s?yA(t,c):c}var u=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return Ny(t)?"[Array]":"[Object]";var d=yle(o,r);if(typeof i>"u")i=[];else if(SA(i,t)>=0)return"[Circular]";function p(U,Z,L){if(Z&&(i=Xse.call(i),i.push(Z)),L){var F={depth:o.depth};return Ji(o,"quoteStyle")&&(F.quoteStyle=o.quoteStyle),e(U,F,r+1,i)}return e(U,o,r+1,i)}if(typeof t=="function"&&!_A(t)){var f=lle(t),h=Uf(t,p);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(h.length>0?" { "+Vr.call(h,", ")+" }":"")}if(xA(t)){var m=cs?Yi.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Ry.call(t);return typeof t=="object"&&!cs?Gl(m):m}if(hle(t)){for(var v="<"+dA.call(String(t.nodeName)),g=t.attributes||[],y=0;y<g.length;y++)v+=" "+g[y].name+"="+wA(ele(g[y].value),"double",o);return v+=">",t.childNodes&&t.childNodes.length&&(v+="..."),v+="</"+dA.call(String(t.nodeName))+">",v}if(Ny(t)){if(t.length===0)return"[]";var b=Uf(t,p);return d&&!gle(b)?"["+jy(b,d)+"]":"[ "+Vr.call(b,", ")+" ]"}if(nle(t)){var x=Uf(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!mA.call(t,"cause")?"{ ["+String(t)+"] "+Vr.call(pA.call("[cause]: "+p(t.cause),x),", ")+" }":x.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Vr.call(x,", ")+" }"}if(typeof t=="object"&&a){if(bA&&typeof t[bA]=="function"&&My)return My(t,{depth:u-r});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(cle(t)){var _=[];return lA&&lA.call(t,function(U,Z){_.push(p(Z,t,!0)+" => "+p(U,t))}),CA("Map",Lf.call(t),_,d)}if(fle(t)){var S=[];return cA&&cA.call(t,function(U){S.push(p(U,t))}),CA("Set",Ff.call(t),S,d)}if(ule(t))return Dy("WeakMap");if(ple(t))return Dy("WeakSet");if(dle(t))return Dy("WeakRef");if(ile(t))return Gl(p(Number(t)));if(ale(t))return Gl(p(Py.call(t)));if(ole(t))return Gl(Vse.call(t));if(rle(t))return Gl(p(String(t)));if(!tle(t)&&!_A(t)){var R=Uf(t,p),M=gA?gA(t)===Object.prototype:t instanceof Object||t.constructor===Object,j=t instanceof Object?"":"null prototype",k=!M&&On&&Object(t)===t&&On in t?$y.call(Xi(t),8,-1):j?"Object":"",N=M||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",z=N+(k||j?"["+Vr.call(pA.call([],k||[],j||[]),": ")+"] ":"");return R.length===0?z+"{}":d?z+"{"+jy(R,d)+"}":z+"{ "+Vr.call(R,", ")+" }"}return String(t)};function wA(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function ele(e){return Yi.call(String(e),/"/g,"&quot;")}function Ny(e){return Xi(e)==="[object Array]"&&(!On||!(typeof e=="object"&&On in e))}function tle(e){return Xi(e)==="[object Date]"&&(!On||!(typeof e=="object"&&On in e))}function _A(e){return Xi(e)==="[object RegExp]"&&(!On||!(typeof e=="object"&&On in e))}function nle(e){return Xi(e)==="[object Error]"&&(!On||!(typeof e=="object"&&On in e))}function rle(e){return Xi(e)==="[object String]"&&(!On||!(typeof e=="object"&&On in e))}function ile(e){return Xi(e)==="[object Number]"&&(!On||!(typeof e=="object"&&On in e))}function ole(e){return Xi(e)==="[object Boolean]"&&(!On||!(typeof e=="object"&&On in e))}function xA(e){if(cs)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Ry)return!1;try{return Ry.call(e),!0}catch{}return!1}function ale(e){if(!e||typeof e!="object"||!Py)return!1;try{return Py.call(e),!0}catch{}return!1}var sle=Object.prototype.hasOwnProperty||function(e){return e in this};function Ji(e,t){return sle.call(e,t)}function Xi(e){return Kse.call(e)}function lle(e){if(e.name)return e.name;var t=Yse.call(Gse.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function SA(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 cle(e){if(!Lf||!e||typeof e!="object")return!1;try{Lf.call(e);try{Ff.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function ule(e){if(!Vl||!e||typeof e!="object")return!1;try{Vl.call(e,Vl);try{Kl.call(e,Kl)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function dle(e){if(!uA||!e||typeof e!="object")return!1;try{return uA.call(e),!0}catch{}return!1}function fle(e){if(!Ff||!e||typeof e!="object")return!1;try{Ff.call(e);try{Lf.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function ple(e){if(!Kl||!e||typeof e!="object")return!1;try{Kl.call(e,Kl);try{Vl.call(e,Vl)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function hle(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function EA(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return EA($y.call(e,0,t.maxStringLength),t)+r}var i=Yi.call(Yi.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,mle);return wA(i,"single",t)}function mle(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":"")+Jse.call(t.toString(16))}function Gl(e){return"Object("+e+")"}function Dy(e){return e+" { ? }"}function CA(e,t,n,r){var i=r?jy(n,r):Vr.call(n,", ");return e+" ("+t+") {"+i+"}"}function gle(e){for(var t=0;t<e.length;t++)if(SA(e[t],`
368
+ `)}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[zO]=this[zO]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=ql(a);r[s]||(Qae(i,a),r[s]=!0)}return ae.isArray(t)?t.forEach(o):o(t),this}}If.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),ae.freezeMethods(If.prototype),ae.freezeMethods(If);const wi=If;function gy(e,t){const n=this||my,r=t||n,i=wi.from(r.headers);let o=r.data;return ae.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function qO(e){return!!(e&&e.__CANCEL__)}function Hl(e,t,n){St.call(this,e??"canceled",St.ERR_CANCELED,t,n),this.name="CanceledError"}ae.inherits(Hl,St,{__CANCEL__:!0});const ese=null;function tse(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new St("Request failed with status code "+n.status,[St.ERR_BAD_REQUEST,St.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const nse=Wr.isStandardBrowserEnv?function(){return{write:function(n,r,i,o,a,s){const l=[];l.push(n+"="+encodeURIComponent(r)),ae.isNumber(i)&&l.push("expires="+new Date(i).toGMTString()),ae.isString(o)&&l.push("path="+o),ae.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 rse(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ise(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function HO(e,t){return e&&!rse(t)?ise(e,t):t}const ose=Wr.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=ae.isString(a)?i(a):a;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function ase(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function sse(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(),u=r[o];a||(a=c),n[i]=l,r[i]=c;let d=o,p=0;for(;d!==i;)p+=n[d++],d=d%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),c-a<t)return;const f=u&&c-u;return f?Math.round(p*1e3/f):void 0}}function WO(e,t){let n=0;const r=sse(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 u={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};u[t?"download":"upload"]=!0,e(u)}}const Rf={http:ese,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let i=e.data;const o=wi.from(e.headers).normalize(),a=e.responseType;let s;function l(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}ae.isFormData(i)&&(Wr.isStandardBrowserEnv||Wr.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let c=new XMLHttpRequest;if(e.auth){const f=e.auth.username||"",h=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(f+":"+h))}const u=HO(e.baseURL,e.url);c.open(e.method.toUpperCase(),LO(u,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function d(){if(!c)return;const f=wi.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),m={data:!a||a==="text"||a==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:f,config:e,request:c};tse(function(g){n(g),l()},function(g){r(g),l()},m),c=null}if("onloadend"in c?c.onloadend=d:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(d)},c.onabort=function(){c&&(r(new St("Request aborted",St.ECONNABORTED,e,c)),c=null)},c.onerror=function(){r(new St("Network Error",St.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let h=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const m=e.transitional||UO;e.timeoutErrorMessage&&(h=e.timeoutErrorMessage),r(new St(h,m.clarifyTimeoutError?St.ETIMEDOUT:St.ECONNABORTED,e,c)),c=null},Wr.isStandardBrowserEnv){const f=(e.withCredentials||ose(u))&&e.xsrfCookieName&&nse.read(e.xsrfCookieName);f&&o.set(e.xsrfHeaderName,f)}i===void 0&&o.setContentType(null),"setRequestHeader"in c&&ae.forEach(o.toJSON(),function(h,m){c.setRequestHeader(m,h)}),ae.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),a&&a!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",WO(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",WO(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=f=>{c&&(r(!f||f.type?new Hl(null,e,c):f),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const p=ase(u);if(p&&Wr.protocols.indexOf(p)===-1){r(new St("Unsupported protocol "+p+":",St.ERR_BAD_REQUEST,e));return}c.send(i||null)})}};ae.forEach(Rf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const lse={getAdapter:e=>{e=ae.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let i=0;i<t&&(n=e[i],!(r=ae.isString(n)?Rf[n.toLowerCase()]:n));i++);if(!r)throw r===!1?new St(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(ae.hasOwnProp(Rf,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!ae.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:Rf};function yy(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Hl(null,e)}function VO(e){return yy(e),e.headers=wi.from(e.headers),e.data=gy.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),lse.getAdapter(e.adapter||my.adapter)(e).then(function(r){return yy(e),r.data=gy.call(e,e.transformResponse,r),r.headers=wi.from(r.headers),r},function(r){return qO(r)||(yy(e),r&&r.response&&(r.response.data=gy.call(e,e.transformResponse,r.response),r.response.headers=wi.from(r.response.headers))),Promise.reject(r)})}const KO=e=>e instanceof wi?e.toJSON():e;function is(e,t){t=t||{};const n={};function r(c,u,d){return ae.isPlainObject(c)&&ae.isPlainObject(u)?ae.merge.call({caseless:d},c,u):ae.isPlainObject(u)?ae.merge({},u):ae.isArray(u)?u.slice():u}function i(c,u,d){if(ae.isUndefined(u)){if(!ae.isUndefined(c))return r(void 0,c,d)}else return r(c,u,d)}function o(c,u){if(!ae.isUndefined(u))return r(void 0,u)}function a(c,u){if(ae.isUndefined(u)){if(!ae.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function s(c,u,d){if(d in t)return r(c,u);if(d 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,u)=>i(KO(c),KO(u),!0)};return ae.forEach(Object.keys(e).concat(Object.keys(t)),function(u){const d=l[u]||i,p=d(e[u],t[u],u);ae.isUndefined(p)&&d!==s||(n[u]=p)}),n}const GO="1.2.5",vy={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{vy[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const YO={};vy.transitional=function(t,n,r){function i(o,a){return"[Axios v"+GO+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(t===!1)throw new St(i(a," has been removed"+(n?" in "+n:"")),St.ERR_DEPRECATED);return n&&!YO[a]&&(YO[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 cse(e,t,n){if(typeof e!="object")throw new St("options must be an object",St.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 St("option "+o+" must be "+l,St.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new St("Unknown option "+o,St.ERR_BAD_OPTION)}}const by={assertOptions:cse,validators:vy},Gi=by.validators;class Mf{constructor(t){this.defaults=t,this.interceptors={request:new FO,response:new FO}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=is(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&by.assertOptions(r,{silentJSONParsing:Gi.transitional(Gi.boolean),forcedJSONParsing:Gi.transitional(Gi.boolean),clarifyTimeoutError:Gi.transitional(Gi.boolean)},!1),i!==void 0&&by.assertOptions(i,{encode:Gi.function,serialize:Gi.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a;a=o&&ae.merge(o.common,o[n.method]),a&&ae.forEach(["delete","get","head","post","put","patch","common"],h=>{delete o[h]}),n.headers=wi.concat(a,o);const s=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,d=0,p;if(!l){const h=[VO.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,c),p=h.length,u=Promise.resolve(n);d<p;)u=u.then(h[d++],h[d++]);return u}p=s.length;let f=n;for(d=0;d<p;){const h=s[d++],m=s[d++];try{f=h(f)}catch(v){m.call(this,v);break}}try{u=VO.call(this,f)}catch(h){return Promise.reject(h)}for(d=0,p=c.length;d<p;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=is(this.defaults,t);const n=HO(t.baseURL,t.url);return LO(n,t.params,t.paramsSerializer)}}ae.forEach(["delete","get","head","options"],function(t){Mf.prototype[t]=function(n,r){return this.request(is(r||{},{method:t,url:n,data:(r||{}).data}))}}),ae.forEach(["post","put","patch"],function(t){function n(r){return function(o,a,s){return this.request(is(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}Mf.prototype[t]=n(),Mf.prototype[t+"Form"]=n(!0)});const Nf=Mf;class wy{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 Hl(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 wy(function(i){t=i}),cancel:t}}}const use=wy;function dse(e){return function(n){return e.apply(null,n)}}function fse(e){return ae.isObject(e)&&e.isAxiosError===!0}const _y={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(_y).forEach(([e,t])=>{_y[t]=e});const pse=_y;function JO(e){const t=new Nf(e),n=SO(Nf.prototype.request,t);return ae.extend(n,Nf.prototype,t,{allOwnKeys:!0}),ae.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return JO(is(e,i))},n}const sn=JO(my);sn.Axios=Nf,sn.CanceledError=Hl,sn.CancelToken=use,sn.isCancel=qO,sn.VERSION=GO,sn.toFormData=Af,sn.AxiosError=St,sn.Cancel=sn.CanceledError,sn.all=function(t){return Promise.all(t)},sn.spread=dse,sn.isAxiosError=fse,sn.mergeConfig=is,sn.AxiosHeaders=wi,sn.formToJSON=e=>BO(ae.isHTMLForm(e)?new FormData(e):e),sn.HttpStatusCode=pse,sn.default=sn;const XO=sn;var hse=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},QO=typeof Symbol<"u"&&Symbol,mse=hse,gse=function(){return typeof QO!="function"||typeof Symbol!="function"||typeof QO("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:mse()},eA={foo:{}},yse=Object,vse=function(){return{__proto__:eA}.foo===eA.foo&&!({__proto__:null}instanceof yse)},bse="Function.prototype.bind called on incompatible ",wse=Object.prototype.toString,_se=Math.max,xse="[object Function]",tA=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},Sse=function(t,n){for(var r=[],i=n||0,o=0;i<t.length;i+=1,o+=1)r[o]=t[i];return r},Ese=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},Cse=function(t){var n=this;if(typeof n!="function"||wse.apply(n)!==xse)throw new TypeError(bse+n);for(var r=Sse(arguments,1),i,o=function(){if(this instanceof i){var u=n.apply(this,tA(r,arguments));return Object(u)===u?u:this}return n.apply(t,tA(r,arguments))},a=_se(0,n.length-r.length),s=[],l=0;l<a;l++)s[l]="$"+l;if(i=Function("binder","return function ("+Ese(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},Tse=Cse,xy=Function.prototype.bind||Tse,kse=xy,Ose=kse.call(Function.call,Object.prototype.hasOwnProperty),mt,os=SyntaxError,nA=Function,as=TypeError,Sy=function(e){try{return nA('"use strict"; return ('+e+").constructor;")()}catch{}},Zo=Object.getOwnPropertyDescriptor;if(Zo)try{Zo({},"")}catch{Zo=null}var Ey=function(){throw new as},Ase=Zo?function(){try{return arguments.callee,Ey}catch{try{return Zo(arguments,"callee").get}catch{return Ey}}}():Ey,ss=gse(),$se=vse(),pn=Object.getPrototypeOf||($se?function(e){return e.__proto__}:null),ls={},Pse=typeof Uint8Array>"u"||!pn?mt:pn(Uint8Array),qo={"%AggregateError%":typeof AggregateError>"u"?mt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?mt:ArrayBuffer,"%ArrayIteratorPrototype%":ss&&pn?pn([][Symbol.iterator]()):mt,"%AsyncFromSyncIteratorPrototype%":mt,"%AsyncFunction%":ls,"%AsyncGenerator%":ls,"%AsyncGeneratorFunction%":ls,"%AsyncIteratorPrototype%":ls,"%Atomics%":typeof Atomics>"u"?mt:Atomics,"%BigInt%":typeof BigInt>"u"?mt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?mt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?mt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?mt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?mt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?mt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?mt:FinalizationRegistry,"%Function%":nA,"%GeneratorFunction%":ls,"%Int8Array%":typeof Int8Array>"u"?mt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?mt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?mt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ss&&pn?pn(pn([][Symbol.iterator]())):mt,"%JSON%":typeof JSON=="object"?JSON:mt,"%Map%":typeof Map>"u"?mt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ss||!pn?mt:pn(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?mt:Promise,"%Proxy%":typeof Proxy>"u"?mt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?mt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?mt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ss||!pn?mt:pn(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?mt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ss&&pn?pn(""[Symbol.iterator]()):mt,"%Symbol%":ss?Symbol:mt,"%SyntaxError%":os,"%ThrowTypeError%":Ase,"%TypedArray%":Pse,"%TypeError%":as,"%Uint8Array%":typeof Uint8Array>"u"?mt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?mt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?mt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?mt:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?mt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?mt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?mt:WeakSet};if(pn)try{null.error}catch(e){var Ise=pn(pn(e));qo["%Error.prototype%"]=Ise}var Rse=function e(t){var n;if(t==="%AsyncFunction%")n=Sy("async function () {}");else if(t==="%GeneratorFunction%")n=Sy("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Sy("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&pn&&(n=pn(i.prototype))}return qo[t]=n,n},rA={"%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"]},Wl=xy,Df=Ose,Mse=Wl.call(Function.call,Array.prototype.concat),Nse=Wl.call(Function.apply,Array.prototype.splice),iA=Wl.call(Function.call,String.prototype.replace),jf=Wl.call(Function.call,String.prototype.slice),Dse=Wl.call(Function.call,RegExp.prototype.exec),jse=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Lse=/\\(\\)?/g,Fse=function(t){var n=jf(t,0,1),r=jf(t,-1);if(n==="%"&&r!=="%")throw new os("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new os("invalid intrinsic syntax, expected opening `%`");var i=[];return iA(t,jse,function(o,a,s,l){i[i.length]=s?iA(l,Lse,"$1"):a||o}),i},Use=function(t,n){var r=t,i;if(Df(rA,r)&&(i=rA[r],r="%"+i[0]+"%"),Df(qo,r)){var o=qo[r];if(o===ls&&(o=Rse(r)),typeof o>"u"&&!n)throw new as("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new os("intrinsic "+t+" does not exist!")},Cy=function(t,n){if(typeof t!="string"||t.length===0)throw new as("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new as('"allowMissing" argument must be a boolean');if(Dse(/^%?[^%]*%?$/,t)===null)throw new os("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Fse(t),i=r.length>0?r[0]:"",o=Use("%"+i+"%",n),a=o.name,s=o.value,l=!1,c=o.alias;c&&(i=c[0],Nse(r,Mse([0,1],c)));for(var u=1,d=!0;u<r.length;u+=1){var p=r[u],f=jf(p,0,1),h=jf(p,-1);if((f==='"'||f==="'"||f==="`"||h==='"'||h==="'"||h==="`")&&f!==h)throw new os("property names with quotes must have matching quotes");if((p==="constructor"||!d)&&(l=!0),i+="."+p,a="%"+i+"%",Df(qo,a))s=qo[a];else if(s!=null){if(!(p in s)){if(!n)throw new as("base intrinsic for "+t+" exists, but the property is not available.");return}if(Zo&&u+1>=r.length){var m=Zo(s,p);d=!!m,d&&"get"in m&&!("originalValue"in m.get)?s=m.get:s=s[p]}else d=Df(s,p),s=s[p];d&&!l&&(qo[a]=s)}}return s},oA={exports:{}};(function(e){var t=xy,n=Cy,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(d){var p=o(t,i,arguments);if(a&&s){var f=a(p,"length");f.configurable&&s(p,"length",{value:1+l(0,d.length-(arguments.length-1))})}return p};var c=function(){return o(t,r,arguments)};s?s(e.exports,"apply",{value:c}):e.exports.apply=c})(oA);var Bse=oA.exports,aA=Cy,sA=Bse,zse=sA(aA("String.prototype.indexOf")),Zse=function(t,n){var r=aA(t,!!n);return typeof r=="function"&&zse(t,".prototype.")>-1?sA(r):r},Ty=typeof Map=="function"&&Map.prototype,ky=Object.getOwnPropertyDescriptor&&Ty?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Lf=Ty&&ky&&typeof ky.get=="function"?ky.get:null,lA=Ty&&Map.prototype.forEach,Oy=typeof Set=="function"&&Set.prototype,Ay=Object.getOwnPropertyDescriptor&&Oy?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Ff=Oy&&Ay&&typeof Ay.get=="function"?Ay.get:null,cA=Oy&&Set.prototype.forEach,qse=typeof WeakMap=="function"&&WeakMap.prototype,Vl=qse?WeakMap.prototype.has:null,Hse=typeof WeakSet=="function"&&WeakSet.prototype,Kl=Hse?WeakSet.prototype.has:null,Wse=typeof WeakRef=="function"&&WeakRef.prototype,uA=Wse?WeakRef.prototype.deref:null,Vse=Boolean.prototype.valueOf,Kse=Object.prototype.toString,Gse=Function.prototype.toString,Yse=String.prototype.match,$y=String.prototype.slice,Yi=String.prototype.replace,Jse=String.prototype.toUpperCase,dA=String.prototype.toLowerCase,fA=RegExp.prototype.test,pA=Array.prototype.concat,Vr=Array.prototype.join,Xse=Array.prototype.slice,hA=Math.floor,Py=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Iy=Object.getOwnPropertySymbols,Ry=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,cs=typeof Symbol=="function"&&typeof Symbol.iterator=="object",On=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===cs||"symbol")?Symbol.toStringTag:null,mA=Object.prototype.propertyIsEnumerable,gA=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function yA(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||fA.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-hA(-e):hA(e);if(r!==e){var i=String(r),o=$y.call(t,i.length+1);return Yi.call(i,n,"$&_")+"."+Yi.call(Yi.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Yi.call(t,n,"$&_")}var My=Bo,vA=My.custom,bA=xA(vA)?vA:null,Qse=function e(t,n,r,i){var o=n||{};if(Ji(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ji(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=Ji(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(Ji(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(Ji(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 EA(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return s?yA(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return s?yA(t,c):c}var u=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return Ny(t)?"[Array]":"[Object]";var d=yle(o,r);if(typeof i>"u")i=[];else if(SA(i,t)>=0)return"[Circular]";function p(B,Z,L){if(Z&&(i=Xse.call(i),i.push(Z)),L){var F={depth:o.depth};return Ji(o,"quoteStyle")&&(F.quoteStyle=o.quoteStyle),e(B,F,r+1,i)}return e(B,o,r+1,i)}if(typeof t=="function"&&!_A(t)){var f=lle(t),h=Uf(t,p);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(h.length>0?" { "+Vr.call(h,", ")+" }":"")}if(xA(t)){var m=cs?Yi.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Ry.call(t);return typeof t=="object"&&!cs?Gl(m):m}if(hle(t)){for(var v="<"+dA.call(String(t.nodeName)),g=t.attributes||[],y=0;y<g.length;y++)v+=" "+g[y].name+"="+wA(ele(g[y].value),"double",o);return v+=">",t.childNodes&&t.childNodes.length&&(v+="..."),v+="</"+dA.call(String(t.nodeName))+">",v}if(Ny(t)){if(t.length===0)return"[]";var b=Uf(t,p);return d&&!gle(b)?"["+jy(b,d)+"]":"[ "+Vr.call(b,", ")+" ]"}if(nle(t)){var x=Uf(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!mA.call(t,"cause")?"{ ["+String(t)+"] "+Vr.call(pA.call("[cause]: "+p(t.cause),x),", ")+" }":x.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Vr.call(x,", ")+" }"}if(typeof t=="object"&&a){if(bA&&typeof t[bA]=="function"&&My)return My(t,{depth:u-r});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(cle(t)){var _=[];return lA&&lA.call(t,function(B,Z){_.push(p(Z,t,!0)+" => "+p(B,t))}),CA("Map",Lf.call(t),_,d)}if(fle(t)){var S=[];return cA&&cA.call(t,function(B){S.push(p(B,t))}),CA("Set",Ff.call(t),S,d)}if(ule(t))return Dy("WeakMap");if(ple(t))return Dy("WeakSet");if(dle(t))return Dy("WeakRef");if(ile(t))return Gl(p(Number(t)));if(ale(t))return Gl(p(Py.call(t)));if(ole(t))return Gl(Vse.call(t));if(rle(t))return Gl(p(String(t)));if(!tle(t)&&!_A(t)){var R=Uf(t,p),M=gA?gA(t)===Object.prototype:t instanceof Object||t.constructor===Object,j=t instanceof Object?"":"null prototype",k=!M&&On&&Object(t)===t&&On in t?$y.call(Xi(t),8,-1):j?"Object":"",N=M||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",z=N+(k||j?"["+Vr.call(pA.call([],k||[],j||[]),": ")+"] ":"");return R.length===0?z+"{}":d?z+"{"+jy(R,d)+"}":z+"{ "+Vr.call(R,", ")+" }"}return String(t)};function wA(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function ele(e){return Yi.call(String(e),/"/g,"&quot;")}function Ny(e){return Xi(e)==="[object Array]"&&(!On||!(typeof e=="object"&&On in e))}function tle(e){return Xi(e)==="[object Date]"&&(!On||!(typeof e=="object"&&On in e))}function _A(e){return Xi(e)==="[object RegExp]"&&(!On||!(typeof e=="object"&&On in e))}function nle(e){return Xi(e)==="[object Error]"&&(!On||!(typeof e=="object"&&On in e))}function rle(e){return Xi(e)==="[object String]"&&(!On||!(typeof e=="object"&&On in e))}function ile(e){return Xi(e)==="[object Number]"&&(!On||!(typeof e=="object"&&On in e))}function ole(e){return Xi(e)==="[object Boolean]"&&(!On||!(typeof e=="object"&&On in e))}function xA(e){if(cs)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Ry)return!1;try{return Ry.call(e),!0}catch{}return!1}function ale(e){if(!e||typeof e!="object"||!Py)return!1;try{return Py.call(e),!0}catch{}return!1}var sle=Object.prototype.hasOwnProperty||function(e){return e in this};function Ji(e,t){return sle.call(e,t)}function Xi(e){return Kse.call(e)}function lle(e){if(e.name)return e.name;var t=Yse.call(Gse.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function SA(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 cle(e){if(!Lf||!e||typeof e!="object")return!1;try{Lf.call(e);try{Ff.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function ule(e){if(!Vl||!e||typeof e!="object")return!1;try{Vl.call(e,Vl);try{Kl.call(e,Kl)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function dle(e){if(!uA||!e||typeof e!="object")return!1;try{return uA.call(e),!0}catch{}return!1}function fle(e){if(!Ff||!e||typeof e!="object")return!1;try{Ff.call(e);try{Lf.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function ple(e){if(!Kl||!e||typeof e!="object")return!1;try{Kl.call(e,Kl);try{Vl.call(e,Vl)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function hle(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function EA(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return EA($y.call(e,0,t.maxStringLength),t)+r}var i=Yi.call(Yi.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,mle);return wA(i,"single",t)}function mle(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":"")+Jse.call(t.toString(16))}function Gl(e){return"Object("+e+")"}function Dy(e){return e+" { ? }"}function CA(e,t,n,r){var i=r?jy(n,r):Vr.call(n,", ");return e+" ("+t+") {"+i+"}"}function gle(e){for(var t=0;t<e.length;t++)if(SA(e[t],`
369
369
  `)>=0)return!1;return!0}function yle(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Vr.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Vr.call(Array(t+1),n)}}function jy(e,t){if(e.length===0)return"";var n=`
370
370
  `+t.prev+t.base;return n+Vr.call(e,","+n)+`
371
- `+t.prev}function Uf(e,t){var n=Ny(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=Ji(e,i)?t(e[i],e):""}var o=typeof Iy=="function"?Iy(e):[],a;if(cs){a={};for(var s=0;s<o.length;s++)a["$"+o[s]]=o[s]}for(var l in e)Ji(e,l)&&(n&&String(Number(l))===l&&l<e.length||cs&&a["$"+l]instanceof Symbol||(fA.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof Iy=="function")for(var c=0;c<o.length;c++)mA.call(e,o[c])&&r.push("["+t(o[c])+"]: "+t(e[o[c]],e));return r}var Ly=Cy,us=Zse,vle=Qse,ble=Ly("%TypeError%"),Bf=Ly("%WeakMap%",!0),zf=Ly("%Map%",!0),wle=us("WeakMap.prototype.get",!0),_le=us("WeakMap.prototype.set",!0),xle=us("WeakMap.prototype.has",!0),Sle=us("Map.prototype.get",!0),Ele=us("Map.prototype.set",!0),Cle=us("Map.prototype.has",!0),Fy=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},Tle=function(e,t){var n=Fy(e,t);return n&&n.value},kle=function(e,t,n){var r=Fy(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},Ole=function(e,t){return!!Fy(e,t)},Ale=function(){var t,n,r,i={assert:function(o){if(!i.has(o))throw new ble("Side channel does not contain "+vle(o))},get:function(o){if(Bf&&o&&(typeof o=="object"||typeof o=="function")){if(t)return wle(t,o)}else if(zf){if(n)return Sle(n,o)}else if(r)return Tle(r,o)},has:function(o){if(Bf&&o&&(typeof o=="object"||typeof o=="function")){if(t)return xle(t,o)}else if(zf){if(n)return Cle(n,o)}else if(r)return Ole(r,o);return!1},set:function(o,a){Bf&&o&&(typeof o=="object"||typeof o=="function")?(t||(t=new Bf),_le(t,o,a)):zf?(n||(n=new zf),Ele(n,o,a)):(r||(r={key:{},next:null}),kle(r,o,a))}};return i},$le=String.prototype.replace,Ple=/%20/g,Uy={RFC1738:"RFC1738",RFC3986:"RFC3986"},By={default:Uy.RFC3986,formatters:{RFC1738:function(e){return $le.call(e,Ple,"+")},RFC3986:function(e){return String(e)}},RFC1738:Uy.RFC1738,RFC3986:Uy.RFC3986},Ile=By,zy=Object.prototype.hasOwnProperty,Ho=Array.isArray,Kr=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Rle=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Ho(r)){for(var i=[],o=0;o<r.length;++o)typeof r[o]<"u"&&i.push(r[o]);n.obj[n.prop]=i}}},TA=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},Mle=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Ho(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!zy.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 Ho(t)&&!Ho(n)&&(i=TA(t,r)),Ho(t)&&Ho(n)?(n.forEach(function(o,a){if(zy.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 zy.call(o,a)?o[a]=e(o[a],s,r):o[a]=s,o},i)},Nle=function(t,n){return Object.keys(n).reduce(function(r,i){return r[i]=n[i],r},t)},Dle=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}},jle=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(u){return"%26%23"+parseInt(u.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===Ile.RFC1738&&(c===40||c===41)){s+=a.charAt(l);continue}if(c<128){s=s+Kr[c];continue}if(c<2048){s=s+(Kr[192|c>>6]+Kr[128|c&63]);continue}if(c<55296||c>=57344){s=s+(Kr[224|c>>12]+Kr[128|c>>6&63]+Kr[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|a.charCodeAt(l)&1023),s+=Kr[240|c>>18]+Kr[128|c>>12&63]+Kr[128|c>>6&63]+Kr[128|c&63]}return s},Lle=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],u=a[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:a,prop:c}),r.push(u))}return Rle(n),t},Fle=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},Ule=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},Ble=function(t,n){return[].concat(t,n)},zle=function(t,n){if(Ho(t)){for(var r=[],i=0;i<t.length;i+=1)r.push(n(t[i]));return r}return n(t)},kA={arrayToObject:TA,assign:Nle,combine:Ble,compact:Lle,decode:Dle,encode:jle,isBuffer:Ule,isRegExp:Fle,maybeMap:zle,merge:Mle},OA=Ale,Zf=kA,Yl=By,Zle=Object.prototype.hasOwnProperty,AA={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},_i=Array.isArray,qle=Array.prototype.push,$A=function(e,t){qle.apply(e,_i(t)?t:[t])},Hle=Date.prototype.toISOString,PA=Yl.default,An={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Zf.encode,encodeValuesOnly:!1,format:PA,formatter:Yl.formatters[PA],indices:!1,serializeDate:function(t){return Hle.call(t)},skipNulls:!1,strictNullHandling:!1},Wle=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Zy={},Vle=function e(t,n,r,i,o,a,s,l,c,u,d,p,f,h,m,v){for(var g=t,y=v,b=0,x=!1;(y=y.get(Zy))!==void 0&&!x;){var _=y.get(t);if(b+=1,typeof _<"u"){if(_===b)throw new RangeError("Cyclic object value");x=!0}typeof y.get(Zy)>"u"&&(b=0)}if(typeof l=="function"?g=l(n,g):g instanceof Date?g=d(g):r==="comma"&&_i(g)&&(g=Zf.maybeMap(g,function(F){return F instanceof Date?d(F):F})),g===null){if(o)return s&&!h?s(n,An.encoder,m,"key",p):n;g=""}if(Wle(g)||Zf.isBuffer(g)){if(s){var S=h?n:s(n,An.encoder,m,"key",p);return[f(S)+"="+f(s(g,An.encoder,m,"value",p))]}return[f(n)+"="+f(String(g))]}var R=[];if(typeof g>"u")return R;var M;if(r==="comma"&&_i(g))h&&s&&(g=Zf.maybeMap(g,s)),M=[{value:g.length>0?g.join(",")||null:void 0}];else if(_i(l))M=l;else{var j=Object.keys(g);M=c?j.sort(c):j}for(var k=i&&_i(g)&&g.length===1?n+"[]":n,N=0;N<M.length;++N){var z=M[N],U=typeof z=="object"&&typeof z.value<"u"?z.value:g[z];if(!(a&&U===null)){var Z=_i(g)?typeof r=="function"?r(k,z):k:k+(u?"."+z:"["+z+"]");v.set(t,b);var L=OA();L.set(Zy,v),$A(R,e(U,Z,r,i,o,a,r==="comma"&&h&&_i(g)?null:s,l,c,u,d,p,f,h,m,L))}}return R},Kle=function(t){if(!t)return An;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||An.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=Yl.default;if(typeof t.format<"u"){if(!Zle.call(Yl.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var i=Yl.formatters[r],o=An.filter;return(typeof t.filter=="function"||_i(t.filter))&&(o=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:An.addQueryPrefix,allowDots:typeof t.allowDots>"u"?An.allowDots:!!t.allowDots,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:An.charsetSentinel,delimiter:typeof t.delimiter>"u"?An.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:An.encode,encoder:typeof t.encoder=="function"?t.encoder:An.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:An.encodeValuesOnly,filter:o,format:r,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:An.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:An.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:An.strictNullHandling}},Gle=function(e,t){var n=e,r=Kle(t),i,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):_i(r.filter)&&(o=r.filter,i=o);var a=[];if(typeof n!="object"||n===null)return"";var s;t&&t.arrayFormat in AA?s=t.arrayFormat:t&&"indices"in t?s=t.indices?"indices":"repeat":s="indices";var l=AA[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 u=OA(),d=0;d<i.length;++d){var p=i[d];r.skipNulls&&n[p]===null||$A(a,Vle(n[p],p,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,u))}var f=a.join(r.delimiter),h=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),f.length>0?h+f:""},ds=kA,qy=Object.prototype.hasOwnProperty,Yle=Array.isArray,hn={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:ds.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Jle=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},IA=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},Xle="utf8=%26%2310003%3B",Qle="utf8=%E2%9C%93",ece=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]===Qle?c="utf-8":a[l]===Xle&&(c="iso-8859-1"),s=l,l=a.length);for(l=0;l<a.length;++l)if(l!==s){var u=a[l],d=u.indexOf("]="),p=d===-1?u.indexOf("="):d+1,f,h;p===-1?(f=n.decoder(u,hn.decoder,c,"key"),h=n.strictNullHandling?null:""):(f=n.decoder(u.slice(0,p),hn.decoder,c,"key"),h=ds.maybeMap(IA(u.slice(p+1),n),function(m){return n.decoder(m,hn.decoder,c,"value")})),h&&n.interpretNumericEntities&&c==="iso-8859-1"&&(h=Jle(h)),u.indexOf("[]=")>-1&&(h=Yle(h)?[h]:h),qy.call(r,f)?r[f]=ds.combine(r[f],h):r[f]=h}return r},tce=function(e,t,n,r){for(var i=r?t:IA(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},nce=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,u=[];if(c){if(!r.plainObjects&&qy.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var d=0;r.depth>0&&(l=s.exec(o))!==null&&d<r.depth;){if(d+=1,!r.plainObjects&&qy.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+o.slice(l.index)+"]"),tce(u,n,r,i)}},rce=function(t){if(!t)return hn;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"?hn.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?hn.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:hn.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:hn.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:hn.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:hn.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:hn.comma,decoder:typeof t.decoder=="function"?t.decoder:hn.decoder,delimiter:typeof t.delimiter=="string"||ds.isRegExp(t.delimiter)?t.delimiter:hn.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:hn.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:hn.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:hn.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:hn.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:hn.strictNullHandling}},ice=function(e,t){var n=rce(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?ece(e,n):e,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),a=0;a<o.length;++a){var s=o[a],l=nce(s,r[s],n,typeof e=="string");i=ds.merge(i,l,n)}return n.allowSparse===!0?i:ds.compact(i)},oce=Gle,ace=ice,sce=By,lce={formats:sce,parse:ace,stringify:oce};const cce=ti(lce),uce={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))};let Hy=typeof window<"u"&&typeof window.document<"u"?window.crypto:Ug;Hy.getRandomValues||(Hy=uce);class Nt extends Error{constructor(n,r,i,o,a,s){super(o);T(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=Nt.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(Hy.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 dce=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,Wy=e=>e instanceof Nt||dce(e)&&e.isApiError===!0;class Jl extends Nt{constructor(t,n,r){super(500,"An unknown error occurred","Unknown",t,n,r)}}class fce extends Nt{constructor(t,n,r){super(500,"An internal error occurred","Internal",t,n,r)}}class pce extends Nt{constructor(t,n,r){super(401,"The request requires to be authenticated.","Unauthorized",t,n,r)}}class hce extends Nt{constructor(t,n,r){super(403,"The requested action can't be peform by this resource.","Forbidden",t,n,r)}}class mce extends Nt{constructor(t,n,r){super(413,"The request payload is too large.","PayloadTooLarge",t,n,r)}}class gce extends Nt{constructor(t,n,r){super(400,"The request payload is invalid.","InvalidPayload",t,n,r)}}class yce extends Nt{constructor(t,n,r){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",t,n,r)}}class vce extends Nt{constructor(t,n,r){super(405,"The requested method does not exist.","MethodNotFound",t,n,r)}}class bce extends Nt{constructor(t,n,r){super(404,"The requested resource does not exist.","ResourceNotFound",t,n,r)}}class wce extends Nt{constructor(t,n,r){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",t,n,r)}}class _ce extends Nt{constructor(t,n,r){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,n,r)}}class xce extends Nt{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 Sce extends Nt{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 Ece extends Nt{constructor(t,n,r){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",t,n,r)}}class Cce extends Nt{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 Tce extends Nt{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 kce extends Nt{constructor(t,n,r){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",t,n,r)}}class Oce extends Nt{constructor(t,n,r){super(409,"The record attempted to be created already exists.","AlreadyExists",t,n,r)}}class Ace extends Nt{constructor(t,n,r){super(429,"The request has been rate limited.","RateLimited",t,n,r)}}class $ce extends Nt{constructor(t,n,r){super(402,"A payment is required to perform this request.","PaymentRequired",t,n,r)}}class Pce extends Nt{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 Ice extends Nt{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 Rce extends Nt{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 Mce={Unknown:Jl,Internal:fce,Unauthorized:pce,Forbidden:hce,PayloadTooLarge:mce,InvalidPayload:gce,UnsupportedMediaType:yce,MethodNotFound:vce,ResourceNotFound:bce,InvalidJsonSchema:wce,InvalidDataFormat:_ce,InvalidIdentifier:xce,RelationConflict:Sce,ReferenceConstraint:Ece,ReferenceNotFound:Cce,InvalidQuery:Tce,Runtime:kce,AlreadyExists:Oce,RateLimited:Ace,PaymentRequired:$ce,QuotaExceeded:Pce,LimitExceeded:Ice,BreakingChanges:Rce},RA=e=>Wy(e)?e:e instanceof Error?new Jl(e.message,e):typeof e=="string"?new Jl(e):Nce(e);function Nce(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=Mce[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new Jl(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new Jl("An invalid error occurred: "+JSON.stringify(e))}const Dce=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{userId:e.userId}}),jce=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{_:e._}}),Lce=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Fce=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Uce=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:{}}),Bce=e=>({path:`/conversations/${encodeURIComponent(e.id)}/messages`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),zce=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{},body:{}}),Zce=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),qce=e=>({path:`/conversations/${encodeURIComponent(e.id)}/listen`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Hce=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:{}}),Wce=e=>({path:"/messages",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId}}),Vce=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Kce=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Gce=e=>({path:"/users",headers:{},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),Yce=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),Jce=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),Xce=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),Qce=e=>({path:"/events",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId}}),eue=e=>({path:`/events/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}});let tue=class{constructor(t){T(this,"addParticipant",async t=>{const{path:n,headers:r,query:i,body:o}=Dce(t),a=cn({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"createConversation",async t=>{const{path:n,headers:r,query:i,body:o}=jce(t),a=cn({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"deleteConversation",async t=>{const{path:n,headers:r,query:i,body:o}=Lce(t),a=cn({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"getConversation",async t=>{const{path:n,headers:r,query:i,body:o}=Fce(t),a=cn({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"getParticipant",async t=>{const{path:n,headers:r,query:i,body:o}=Uce(t),a=cn({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"listConversationMessages",async t=>{const{path:n,headers:r,query:i,body:o}=Bce(t),a=cn({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"listConversations",async t=>{const{path:n,headers:r,query:i,body:o}=zce(t),a=cn({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"listParticipants",async t=>{const{path:n,headers:r,query:i,body:o}=Zce(t),a=cn({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"listenConversation",async t=>{const{path:n,headers:r,query:i,body:o}=qce(t),a=cn({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"removeParticipant",async t=>{const{path:n,headers:r,query:i,body:o}=Hce(t),a=cn({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"createMessage",async t=>{const{path:n,headers:r,query:i,body:o}=Wce(t),a=cn({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"deleteMessage",async t=>{const{path:n,headers:r,query:i,body:o}=Vce(t),a=cn({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"getMessage",async t=>{const{path:n,headers:r,query:i,body:o}=Kce(t),a=cn({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"createUser",async t=>{const{path:n,headers:r,query:i,body:o}=Gce(t),a=cn({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"deleteUser",async t=>{const{path:n,headers:r,query:i,body:o}=Yce(t),a=cn({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"getUser",async t=>{const{path:n,headers:r,query:i,body:o}=Jce(t),a=cn({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"updateUser",async t=>{const{path:n,headers:r,query:i,body:o}=Xce(t),a=cn({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"createEvent",async t=>{const{path:n,headers:r,query:i,body:o}=Qce(t),a=cn({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"getEvent",async t=>{const{path:n,headers:r,query:i,body:o}=eue(t),a=cn({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});this.axiosInstance=t}};function ln(e){var t;return XO.isAxiosError(e)&&((t=e.response)!=null&&t.data)?RA(e.response.data):RA(e)}const nue=e=>e[1]!==void 0,cn=e=>{const{method:t,path:n,query:r,headers:i,body:o}=e,a=Object.entries(i).filter(nue),s=Object.fromEntries(a),l=cce.stringify(r,{encode:!0,arrayFormat:"repeat",allowDots:!0}),c=new URLSearchParams(l);return{method:t,url:n,headers:s,params:c,data:o}};class MA{constructor(){T(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 Vy={exports:{}};/** @license
371
+ `+t.prev}function Uf(e,t){var n=Ny(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=Ji(e,i)?t(e[i],e):""}var o=typeof Iy=="function"?Iy(e):[],a;if(cs){a={};for(var s=0;s<o.length;s++)a["$"+o[s]]=o[s]}for(var l in e)Ji(e,l)&&(n&&String(Number(l))===l&&l<e.length||cs&&a["$"+l]instanceof Symbol||(fA.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof Iy=="function")for(var c=0;c<o.length;c++)mA.call(e,o[c])&&r.push("["+t(o[c])+"]: "+t(e[o[c]],e));return r}var Ly=Cy,us=Zse,vle=Qse,ble=Ly("%TypeError%"),Bf=Ly("%WeakMap%",!0),zf=Ly("%Map%",!0),wle=us("WeakMap.prototype.get",!0),_le=us("WeakMap.prototype.set",!0),xle=us("WeakMap.prototype.has",!0),Sle=us("Map.prototype.get",!0),Ele=us("Map.prototype.set",!0),Cle=us("Map.prototype.has",!0),Fy=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},Tle=function(e,t){var n=Fy(e,t);return n&&n.value},kle=function(e,t,n){var r=Fy(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},Ole=function(e,t){return!!Fy(e,t)},Ale=function(){var t,n,r,i={assert:function(o){if(!i.has(o))throw new ble("Side channel does not contain "+vle(o))},get:function(o){if(Bf&&o&&(typeof o=="object"||typeof o=="function")){if(t)return wle(t,o)}else if(zf){if(n)return Sle(n,o)}else if(r)return Tle(r,o)},has:function(o){if(Bf&&o&&(typeof o=="object"||typeof o=="function")){if(t)return xle(t,o)}else if(zf){if(n)return Cle(n,o)}else if(r)return Ole(r,o);return!1},set:function(o,a){Bf&&o&&(typeof o=="object"||typeof o=="function")?(t||(t=new Bf),_le(t,o,a)):zf?(n||(n=new zf),Ele(n,o,a)):(r||(r={key:{},next:null}),kle(r,o,a))}};return i},$le=String.prototype.replace,Ple=/%20/g,Uy={RFC1738:"RFC1738",RFC3986:"RFC3986"},By={default:Uy.RFC3986,formatters:{RFC1738:function(e){return $le.call(e,Ple,"+")},RFC3986:function(e){return String(e)}},RFC1738:Uy.RFC1738,RFC3986:Uy.RFC3986},Ile=By,zy=Object.prototype.hasOwnProperty,Ho=Array.isArray,Kr=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Rle=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Ho(r)){for(var i=[],o=0;o<r.length;++o)typeof r[o]<"u"&&i.push(r[o]);n.obj[n.prop]=i}}},TA=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},Mle=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Ho(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!zy.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 Ho(t)&&!Ho(n)&&(i=TA(t,r)),Ho(t)&&Ho(n)?(n.forEach(function(o,a){if(zy.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 zy.call(o,a)?o[a]=e(o[a],s,r):o[a]=s,o},i)},Nle=function(t,n){return Object.keys(n).reduce(function(r,i){return r[i]=n[i],r},t)},Dle=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}},jle=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(u){return"%26%23"+parseInt(u.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===Ile.RFC1738&&(c===40||c===41)){s+=a.charAt(l);continue}if(c<128){s=s+Kr[c];continue}if(c<2048){s=s+(Kr[192|c>>6]+Kr[128|c&63]);continue}if(c<55296||c>=57344){s=s+(Kr[224|c>>12]+Kr[128|c>>6&63]+Kr[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|a.charCodeAt(l)&1023),s+=Kr[240|c>>18]+Kr[128|c>>12&63]+Kr[128|c>>6&63]+Kr[128|c&63]}return s},Lle=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],u=a[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:a,prop:c}),r.push(u))}return Rle(n),t},Fle=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},Ule=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},Ble=function(t,n){return[].concat(t,n)},zle=function(t,n){if(Ho(t)){for(var r=[],i=0;i<t.length;i+=1)r.push(n(t[i]));return r}return n(t)},kA={arrayToObject:TA,assign:Nle,combine:Ble,compact:Lle,decode:Dle,encode:jle,isBuffer:Ule,isRegExp:Fle,maybeMap:zle,merge:Mle},OA=Ale,Zf=kA,Yl=By,Zle=Object.prototype.hasOwnProperty,AA={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},_i=Array.isArray,qle=Array.prototype.push,$A=function(e,t){qle.apply(e,_i(t)?t:[t])},Hle=Date.prototype.toISOString,PA=Yl.default,An={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Zf.encode,encodeValuesOnly:!1,format:PA,formatter:Yl.formatters[PA],indices:!1,serializeDate:function(t){return Hle.call(t)},skipNulls:!1,strictNullHandling:!1},Wle=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Zy={},Vle=function e(t,n,r,i,o,a,s,l,c,u,d,p,f,h,m,v){for(var g=t,y=v,b=0,x=!1;(y=y.get(Zy))!==void 0&&!x;){var _=y.get(t);if(b+=1,typeof _<"u"){if(_===b)throw new RangeError("Cyclic object value");x=!0}typeof y.get(Zy)>"u"&&(b=0)}if(typeof l=="function"?g=l(n,g):g instanceof Date?g=d(g):r==="comma"&&_i(g)&&(g=Zf.maybeMap(g,function(F){return F instanceof Date?d(F):F})),g===null){if(o)return s&&!h?s(n,An.encoder,m,"key",p):n;g=""}if(Wle(g)||Zf.isBuffer(g)){if(s){var S=h?n:s(n,An.encoder,m,"key",p);return[f(S)+"="+f(s(g,An.encoder,m,"value",p))]}return[f(n)+"="+f(String(g))]}var R=[];if(typeof g>"u")return R;var M;if(r==="comma"&&_i(g))h&&s&&(g=Zf.maybeMap(g,s)),M=[{value:g.length>0?g.join(",")||null:void 0}];else if(_i(l))M=l;else{var j=Object.keys(g);M=c?j.sort(c):j}for(var k=i&&_i(g)&&g.length===1?n+"[]":n,N=0;N<M.length;++N){var z=M[N],B=typeof z=="object"&&typeof z.value<"u"?z.value:g[z];if(!(a&&B===null)){var Z=_i(g)?typeof r=="function"?r(k,z):k:k+(u?"."+z:"["+z+"]");v.set(t,b);var L=OA();L.set(Zy,v),$A(R,e(B,Z,r,i,o,a,r==="comma"&&h&&_i(g)?null:s,l,c,u,d,p,f,h,m,L))}}return R},Kle=function(t){if(!t)return An;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||An.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=Yl.default;if(typeof t.format<"u"){if(!Zle.call(Yl.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var i=Yl.formatters[r],o=An.filter;return(typeof t.filter=="function"||_i(t.filter))&&(o=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:An.addQueryPrefix,allowDots:typeof t.allowDots>"u"?An.allowDots:!!t.allowDots,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:An.charsetSentinel,delimiter:typeof t.delimiter>"u"?An.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:An.encode,encoder:typeof t.encoder=="function"?t.encoder:An.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:An.encodeValuesOnly,filter:o,format:r,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:An.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:An.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:An.strictNullHandling}},Gle=function(e,t){var n=e,r=Kle(t),i,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):_i(r.filter)&&(o=r.filter,i=o);var a=[];if(typeof n!="object"||n===null)return"";var s;t&&t.arrayFormat in AA?s=t.arrayFormat:t&&"indices"in t?s=t.indices?"indices":"repeat":s="indices";var l=AA[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 u=OA(),d=0;d<i.length;++d){var p=i[d];r.skipNulls&&n[p]===null||$A(a,Vle(n[p],p,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,u))}var f=a.join(r.delimiter),h=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),f.length>0?h+f:""},ds=kA,qy=Object.prototype.hasOwnProperty,Yle=Array.isArray,hn={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:ds.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Jle=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},IA=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},Xle="utf8=%26%2310003%3B",Qle="utf8=%E2%9C%93",ece=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]===Qle?c="utf-8":a[l]===Xle&&(c="iso-8859-1"),s=l,l=a.length);for(l=0;l<a.length;++l)if(l!==s){var u=a[l],d=u.indexOf("]="),p=d===-1?u.indexOf("="):d+1,f,h;p===-1?(f=n.decoder(u,hn.decoder,c,"key"),h=n.strictNullHandling?null:""):(f=n.decoder(u.slice(0,p),hn.decoder,c,"key"),h=ds.maybeMap(IA(u.slice(p+1),n),function(m){return n.decoder(m,hn.decoder,c,"value")})),h&&n.interpretNumericEntities&&c==="iso-8859-1"&&(h=Jle(h)),u.indexOf("[]=")>-1&&(h=Yle(h)?[h]:h),qy.call(r,f)?r[f]=ds.combine(r[f],h):r[f]=h}return r},tce=function(e,t,n,r){for(var i=r?t:IA(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},nce=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,u=[];if(c){if(!r.plainObjects&&qy.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var d=0;r.depth>0&&(l=s.exec(o))!==null&&d<r.depth;){if(d+=1,!r.plainObjects&&qy.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+o.slice(l.index)+"]"),tce(u,n,r,i)}},rce=function(t){if(!t)return hn;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"?hn.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?hn.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:hn.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:hn.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:hn.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:hn.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:hn.comma,decoder:typeof t.decoder=="function"?t.decoder:hn.decoder,delimiter:typeof t.delimiter=="string"||ds.isRegExp(t.delimiter)?t.delimiter:hn.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:hn.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:hn.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:hn.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:hn.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:hn.strictNullHandling}},ice=function(e,t){var n=rce(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?ece(e,n):e,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),a=0;a<o.length;++a){var s=o[a],l=nce(s,r[s],n,typeof e=="string");i=ds.merge(i,l,n)}return n.allowSparse===!0?i:ds.compact(i)},oce=Gle,ace=ice,sce=By,lce={formats:sce,parse:ace,stringify:oce};const cce=ti(lce),uce={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))};let Hy=typeof window<"u"&&typeof window.document<"u"?window.crypto:Ug;Hy.getRandomValues||(Hy=uce);class Nt extends Error{constructor(n,r,i,o,a,s){super(o);T(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=Nt.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(Hy.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 dce=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,Wy=e=>e instanceof Nt||dce(e)&&e.isApiError===!0;class Jl extends Nt{constructor(t,n,r){super(500,"An unknown error occurred","Unknown",t,n,r)}}class fce extends Nt{constructor(t,n,r){super(500,"An internal error occurred","Internal",t,n,r)}}class pce extends Nt{constructor(t,n,r){super(401,"The request requires to be authenticated.","Unauthorized",t,n,r)}}class hce extends Nt{constructor(t,n,r){super(403,"The requested action can't be peform by this resource.","Forbidden",t,n,r)}}class mce extends Nt{constructor(t,n,r){super(413,"The request payload is too large.","PayloadTooLarge",t,n,r)}}class gce extends Nt{constructor(t,n,r){super(400,"The request payload is invalid.","InvalidPayload",t,n,r)}}class yce extends Nt{constructor(t,n,r){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",t,n,r)}}class vce extends Nt{constructor(t,n,r){super(405,"The requested method does not exist.","MethodNotFound",t,n,r)}}class bce extends Nt{constructor(t,n,r){super(404,"The requested resource does not exist.","ResourceNotFound",t,n,r)}}class wce extends Nt{constructor(t,n,r){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",t,n,r)}}class _ce extends Nt{constructor(t,n,r){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,n,r)}}class xce extends Nt{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 Sce extends Nt{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 Ece extends Nt{constructor(t,n,r){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",t,n,r)}}class Cce extends Nt{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 Tce extends Nt{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 kce extends Nt{constructor(t,n,r){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",t,n,r)}}class Oce extends Nt{constructor(t,n,r){super(409,"The record attempted to be created already exists.","AlreadyExists",t,n,r)}}class Ace extends Nt{constructor(t,n,r){super(429,"The request has been rate limited.","RateLimited",t,n,r)}}class $ce extends Nt{constructor(t,n,r){super(402,"A payment is required to perform this request.","PaymentRequired",t,n,r)}}class Pce extends Nt{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 Ice extends Nt{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 Rce extends Nt{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 Mce={Unknown:Jl,Internal:fce,Unauthorized:pce,Forbidden:hce,PayloadTooLarge:mce,InvalidPayload:gce,UnsupportedMediaType:yce,MethodNotFound:vce,ResourceNotFound:bce,InvalidJsonSchema:wce,InvalidDataFormat:_ce,InvalidIdentifier:xce,RelationConflict:Sce,ReferenceConstraint:Ece,ReferenceNotFound:Cce,InvalidQuery:Tce,Runtime:kce,AlreadyExists:Oce,RateLimited:Ace,PaymentRequired:$ce,QuotaExceeded:Pce,LimitExceeded:Ice,BreakingChanges:Rce},RA=e=>Wy(e)?e:e instanceof Error?new Jl(e.message,e):typeof e=="string"?new Jl(e):Nce(e);function Nce(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=Mce[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new Jl(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new Jl("An invalid error occurred: "+JSON.stringify(e))}const Dce=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{userId:e.userId}}),jce=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{_:e._}}),Lce=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Fce=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Uce=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:{}}),Bce=e=>({path:`/conversations/${encodeURIComponent(e.id)}/messages`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),zce=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{},body:{}}),Zce=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),qce=e=>({path:`/conversations/${encodeURIComponent(e.id)}/listen`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Hce=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:{}}),Wce=e=>({path:"/messages",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId}}),Vce=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Kce=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Gce=e=>({path:"/users",headers:{},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),Yce=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),Jce=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),Xce=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),Qce=e=>({path:"/events",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId}}),eue=e=>({path:`/events/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}});let tue=class{constructor(t){T(this,"addParticipant",async t=>{const{path:n,headers:r,query:i,body:o}=Dce(t),a=cn({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"createConversation",async t=>{const{path:n,headers:r,query:i,body:o}=jce(t),a=cn({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"deleteConversation",async t=>{const{path:n,headers:r,query:i,body:o}=Lce(t),a=cn({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"getConversation",async t=>{const{path:n,headers:r,query:i,body:o}=Fce(t),a=cn({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"getParticipant",async t=>{const{path:n,headers:r,query:i,body:o}=Uce(t),a=cn({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"listConversationMessages",async t=>{const{path:n,headers:r,query:i,body:o}=Bce(t),a=cn({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"listConversations",async t=>{const{path:n,headers:r,query:i,body:o}=zce(t),a=cn({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"listParticipants",async t=>{const{path:n,headers:r,query:i,body:o}=Zce(t),a=cn({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"listenConversation",async t=>{const{path:n,headers:r,query:i,body:o}=qce(t),a=cn({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"removeParticipant",async t=>{const{path:n,headers:r,query:i,body:o}=Hce(t),a=cn({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"createMessage",async t=>{const{path:n,headers:r,query:i,body:o}=Wce(t),a=cn({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"deleteMessage",async t=>{const{path:n,headers:r,query:i,body:o}=Vce(t),a=cn({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"getMessage",async t=>{const{path:n,headers:r,query:i,body:o}=Kce(t),a=cn({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"createUser",async t=>{const{path:n,headers:r,query:i,body:o}=Gce(t),a=cn({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"deleteUser",async t=>{const{path:n,headers:r,query:i,body:o}=Yce(t),a=cn({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"getUser",async t=>{const{path:n,headers:r,query:i,body:o}=Jce(t),a=cn({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"updateUser",async t=>{const{path:n,headers:r,query:i,body:o}=Xce(t),a=cn({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"createEvent",async t=>{const{path:n,headers:r,query:i,body:o}=Qce(t),a=cn({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});T(this,"getEvent",async t=>{const{path:n,headers:r,query:i,body:o}=eue(t),a=cn({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ln(s)})});this.axiosInstance=t}};function ln(e){var t;return XO.isAxiosError(e)&&((t=e.response)!=null&&t.data)?RA(e.response.data):RA(e)}const nue=e=>e[1]!==void 0,cn=e=>{const{method:t,path:n,query:r,headers:i,body:o}=e,a=Object.entries(i).filter(nue),s=Object.fromEntries(a),l=cce.stringify(r,{encode:!0,arrayFormat:"repeat",allowDots:!0}),c=new URLSearchParams(l);return{method:t,url:n,headers:s,params:c,data:o}};class MA{constructor(){T(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 Vy={exports:{}};/** @license
372
372
  * eventsource.js
373
373
  * Available under MIT License (MIT)
374
374
  * https://github.com/Yaffle/EventSource/
375
375
  */(function(e,t){(function(n){var r=n.setTimeout,i=n.clearTimeout,o=n.XMLHttpRequest,a=n.XDomainRequest,s=n.ActiveXObject,l=n.EventSource,c=n.document,u=n.Promise,d=n.fetch,p=n.Response,f=n.TextDecoder,h=n.TextEncoder,m=n.AbortController;if(typeof window<"u"&&typeof c<"u"&&!("readyState"in c)&&c.body==null&&(c.readyState="loading",window.addEventListener("load",function(D){c.readyState="complete"},!1)),o==null&&s!=null&&(o=function(){return new s("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(D){function ue(){}return ue.prototype=D,new ue}),Date.now||(Date.now=function(){return new Date().getTime()}),m==null){var v=d;d=function(D,ue){var me=ue.signal;return v(D,{headers:ue.headers,credentials:ue.credentials,cache:ue.cache}).then(function(fe){var Le=fe.body.getReader();return me._reader=Le,me._aborted&&me._reader.cancel(),{status:fe.status,statusText:fe.statusText,headers:fe.headers,body:{getReader:function(){return Le}}}})},m=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function g(){this.bitsNeeded=0,this.codePoint=0}g.prototype.decode=function(D){function ue(q,X,de){if(de===1)return q>=128>>X&&q<<X<=2047;if(de===2)return q>=2048>>X&&q<<X<=55295||q>=57344>>X&&q<<X<=65535;if(de===3)return q>=65536>>X&&q<<X<=1114111;throw new Error}function me(q,X){if(q===6*1)return X>>6>15?3:X>31?2:1;if(q===6*2)return X>15?3:2;if(q===6*3)return 3;throw new Error}for(var fe=65533,Le="",De=this.bitsNeeded,Ke=this.codePoint,gt=0;gt<D.length;gt+=1){var Xe=D[gt];De!==0&&(Xe<128||Xe>191||!ue(Ke<<6|Xe&63,De-6,me(De,Ke)))&&(De=0,Ke=fe,Le+=String.fromCharCode(Ke)),De===0?(Xe>=0&&Xe<=127?(De=0,Ke=Xe):Xe>=192&&Xe<=223?(De=6*1,Ke=Xe&31):Xe>=224&&Xe<=239?(De=6*2,Ke=Xe&15):Xe>=240&&Xe<=247?(De=6*3,Ke=Xe&7):(De=0,Ke=fe),De!==0&&!ue(Ke,De,me(De,Ke))&&(De=0,Ke=fe)):(De-=6,Ke=Ke<<6|Xe&63),De===0&&(Ke<=65535?Le+=String.fromCharCode(Ke):(Le+=String.fromCharCode(55296+(Ke-65535-1>>10)),Le+=String.fromCharCode(56320+(Ke-65535-1&1023))))}return this.bitsNeeded=De,this.codePoint=Ke,Le};var y=function(){try{return new f().decode(new h().encode("test"),{stream:!0})==="test"}catch(D){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+D)}return!1};(f==null||h==null||!y())&&(f=g);var b=function(){};function x(D){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=b,this.onload=b,this.onerror=b,this.onreadystatechange=b,this._contentType="",this._xhr=D,this._sendTimeout=0,this._abort=b}x.prototype.open=function(D,ue){this._abort(!0);var me=this,fe=this._xhr,Le=1,De=0;this._abort=function(de){me._sendTimeout!==0&&(i(me._sendTimeout),me._sendTimeout=0),(Le===1||Le===2||Le===3)&&(Le=4,fe.onload=b,fe.onerror=b,fe.onabort=b,fe.onprogress=b,fe.onreadystatechange=b,fe.abort(),De!==0&&(i(De),De=0),de||(me.readyState=4,me.onabort(null),me.onreadystatechange())),Le=0};var Ke=function(){if(Le===1){var de=0,je="",rt=void 0;if("contentType"in fe)de=200,je="OK",rt=fe.contentType;else try{de=fe.status,je=fe.statusText,rt=fe.getResponseHeader("Content-Type")}catch{de=0,je="",rt=void 0}de!==0&&(Le=2,me.readyState=2,me.status=de,me.statusText=je,me._contentType=rt,me.onreadystatechange())}},gt=function(){if(Ke(),Le===2||Le===3){Le=3;var de="";try{de=fe.responseText}catch{}me.readyState=3,me.responseText=de,me.onprogress()}},Xe=function(de,je){if((je==null||je.preventDefault==null)&&(je={preventDefault:b}),gt(),Le===1||Le===2||Le===3){if(Le=4,De!==0&&(i(De),De=0),me.readyState=4,de==="load")me.onload(je);else if(de==="error")me.onerror(je);else if(de==="abort")me.onabort(je);else throw new TypeError;me.onreadystatechange()}},q=function(de){fe!=null&&(fe.readyState===4?(!("onload"in fe)||!("onerror"in fe)||!("onabort"in fe))&&Xe(fe.responseText===""?"error":"load",de):fe.readyState===3?"onprogress"in fe||gt():fe.readyState===2&&Ke())},X=function(){De=r(function(){X()},500),fe.readyState===3&&gt()};"onload"in fe&&(fe.onload=function(de){Xe("load",de)}),"onerror"in fe&&(fe.onerror=function(de){Xe("error",de)}),"onabort"in fe&&(fe.onabort=function(de){Xe("abort",de)}),"onprogress"in fe&&(fe.onprogress=gt),"onreadystatechange"in fe&&(fe.onreadystatechange=function(de){q(de)}),("contentType"in fe||!("ontimeout"in o.prototype))&&(ue+=(ue.indexOf("?")===-1?"?":"&")+"padding=true"),fe.open(D,ue,!0),"readyState"in fe&&(De=r(function(){X()},0))},x.prototype.abort=function(){this._abort(!1)},x.prototype.getResponseHeader=function(D){return this._contentType},x.prototype.setRequestHeader=function(D,ue){var me=this._xhr;"setRequestHeader"in me&&me.setRequestHeader(D,ue)},x.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},x.prototype.send=function(){if((!("ontimeout"in o.prototype)||!("sendAsBinary"in o.prototype)&&!("mozAnon"in o.prototype))&&c!=null&&c.readyState!=null&&c.readyState!=="complete"){var D=this;D._sendTimeout=r(function(){D._sendTimeout=0,D.send()},4);return}var ue=this._xhr;"withCredentials"in ue&&(ue.withCredentials=this.withCredentials);try{ue.send(void 0)}catch(me){throw me}};function _(D){return D.replace(/[A-Z]/g,function(ue){return String.fromCharCode(ue.charCodeAt(0)+32)})}function S(D){for(var ue=Object.create(null),me=D.split(`\r
376
- `),fe=0;fe<me.length;fe+=1){var Le=me[fe],De=Le.split(": "),Ke=De.shift(),gt=De.join(": ");ue[_(Ke)]=gt}this._map=ue}S.prototype.get=function(D){return this._map[_(D)]},o!=null&&o.HEADERS_RECEIVED==null&&(o.HEADERS_RECEIVED=2);function R(){}R.prototype.open=function(D,ue,me,fe,Le,De,Ke){D.open("GET",Le);var gt=0;D.onprogress=function(){var q=D.responseText,X=q.slice(gt);gt+=X.length,me(X)},D.onerror=function(q){q.preventDefault(),fe(new Error("NetworkError"))},D.onload=function(){fe(null)},D.onabort=function(){fe(null)},D.onreadystatechange=function(){if(D.readyState===o.HEADERS_RECEIVED){var q=D.status,X=D.statusText,de=D.getResponseHeader("Content-Type"),je=D.getAllResponseHeaders();ue(q,X,de,new S(je))}},D.withCredentials=De;for(var Xe in Ke)Object.prototype.hasOwnProperty.call(Ke,Xe)&&D.setRequestHeader(Xe,Ke[Xe]);return D.send(),D};function M(D){this._headers=D}M.prototype.get=function(D){return this._headers.get(D)};function j(){}j.prototype.open=function(D,ue,me,fe,Le,De,Ke){var gt=null,Xe=new m,q=Xe.signal,X=new f;return d(Le,{headers:Ke,credentials:De?"include":"same-origin",signal:q,cache:"no-store"}).then(function(de){return gt=de.body.getReader(),ue(de.status,de.statusText,de.headers.get("Content-Type"),new M(de.headers)),new u(function(je,rt){var Zt=function(){gt.read().then(function(Pt){if(Pt.done)je(void 0);else{var Ot=X.decode(Pt.value,{stream:!0});me(Ot),Zt()}}).catch(function(Pt){rt(Pt)})};Zt()})}).catch(function(de){if(de.name!=="AbortError")return de}).then(function(de){fe(de)}),{abort:function(){gt!=null&&gt.cancel(),Xe.abort()}}};function k(){this._listeners=Object.create(null)}function N(D){r(function(){throw D},0)}k.prototype.dispatchEvent=function(D){D.target=this;var ue=this._listeners[D.type];if(ue!=null)for(var me=ue.length,fe=0;fe<me;fe+=1){var Le=ue[fe];try{typeof Le.handleEvent=="function"?Le.handleEvent(D):Le.call(this,D)}catch(De){N(De)}}},k.prototype.addEventListener=function(D,ue){D=String(D);var me=this._listeners,fe=me[D];fe==null&&(fe=[],me[D]=fe);for(var Le=!1,De=0;De<fe.length;De+=1)fe[De]===ue&&(Le=!0);Le||fe.push(ue)},k.prototype.removeEventListener=function(D,ue){D=String(D);var me=this._listeners,fe=me[D];if(fe!=null){for(var Le=[],De=0;De<fe.length;De+=1)fe[De]!==ue&&Le.push(fe[De]);Le.length===0?delete me[D]:me[D]=Le}};function z(D){this.type=D,this.target=void 0}function U(D,ue){z.call(this,D),this.data=ue.data,this.lastEventId=ue.lastEventId}U.prototype=Object.create(z.prototype);function Z(D,ue){z.call(this,D),this.status=ue.status,this.statusText=ue.statusText,this.headers=ue.headers}Z.prototype=Object.create(z.prototype);function L(D,ue){z.call(this,D),this.error=ue.error}L.prototype=Object.create(z.prototype);var F=-1,V=0,W=1,pe=2,C=-1,se=0,we=1,O=2,Oe=3,Be=/^text\/event\-stream(;.*)?$/i,Me=1e3,Ze=18e6,nt=function(D,ue){var me=D==null?ue:parseInt(D,10);return me!==me&&(me=ue),We(me)},We=function(D){return Math.min(Math.max(D,Me),Ze)},_e=function(D,ue,me){try{typeof ue=="function"&&ue.call(D,me)}catch(fe){N(fe)}};function ye(D,ue){k.call(this),ue=ue||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,Ue(this,D,ue)}function $e(){return o!=null&&"withCredentials"in o.prototype||a==null?new o:new a}var xe=d!=null&&p!=null&&"body"in p.prototype;function Ue(D,ue,me){ue=String(ue);var fe=!!me.withCredentials,Le=me.lastEventIdQueryParameterName||"lastEventId",De=We(1e3),Ke=nt(me.heartbeatTimeout,45e3),gt="",Xe=De,q=!1,X=0,de=me.headers||{},je=me.Transport,rt=xe&&je==null?void 0:new x(je!=null?new je:$e()),Zt=je!=null&&typeof je!="string"?new je:rt==null?new j:new R,Pt=void 0,Ot=0,qt=F,Mn="",Ht="",tn="",mn="",un=se,Oi=0,hr=0,ei=function(Fe,Ce,Ie,at){if(qt===V)if(Fe===200&&Ie!=null&&Be.test(Ie)){qt=W,q=Date.now(),Xe=De,D.readyState=W;var pt=new Z("open",{status:Fe,statusText:Ce,headers:at});D.dispatchEvent(pt),_e(D,D.onopen,pt)}else{var Ft="";Fe!==200?(Ce&&(Ce=Ce.replace(/\s+/g," ")),Ft="EventSource's response has a status "+Fe+" "+Ce+" that is not 200. Aborting the connection."):Ft="EventSource's response has a Content-Type specifying an unsupported type: "+(Ie==null?"-":Ie.replace(/\s+/g," "))+". Aborting the connection.",Ee();var pt=new Z("error",{status:Fe,statusText:Ce,headers:at});D.dispatchEvent(pt),_e(D,D.onerror,pt),console.error(Ft)}},ta=function(Fe){if(qt===W){for(var Ce=-1,Ie=0;Ie<Fe.length;Ie+=1){var at=Fe.charCodeAt(Ie);(at===`
376
+ `),fe=0;fe<me.length;fe+=1){var Le=me[fe],De=Le.split(": "),Ke=De.shift(),gt=De.join(": ");ue[_(Ke)]=gt}this._map=ue}S.prototype.get=function(D){return this._map[_(D)]},o!=null&&o.HEADERS_RECEIVED==null&&(o.HEADERS_RECEIVED=2);function R(){}R.prototype.open=function(D,ue,me,fe,Le,De,Ke){D.open("GET",Le);var gt=0;D.onprogress=function(){var q=D.responseText,X=q.slice(gt);gt+=X.length,me(X)},D.onerror=function(q){q.preventDefault(),fe(new Error("NetworkError"))},D.onload=function(){fe(null)},D.onabort=function(){fe(null)},D.onreadystatechange=function(){if(D.readyState===o.HEADERS_RECEIVED){var q=D.status,X=D.statusText,de=D.getResponseHeader("Content-Type"),je=D.getAllResponseHeaders();ue(q,X,de,new S(je))}},D.withCredentials=De;for(var Xe in Ke)Object.prototype.hasOwnProperty.call(Ke,Xe)&&D.setRequestHeader(Xe,Ke[Xe]);return D.send(),D};function M(D){this._headers=D}M.prototype.get=function(D){return this._headers.get(D)};function j(){}j.prototype.open=function(D,ue,me,fe,Le,De,Ke){var gt=null,Xe=new m,q=Xe.signal,X=new f;return d(Le,{headers:Ke,credentials:De?"include":"same-origin",signal:q,cache:"no-store"}).then(function(de){return gt=de.body.getReader(),ue(de.status,de.statusText,de.headers.get("Content-Type"),new M(de.headers)),new u(function(je,rt){var Zt=function(){gt.read().then(function(Pt){if(Pt.done)je(void 0);else{var Ot=X.decode(Pt.value,{stream:!0});me(Ot),Zt()}}).catch(function(Pt){rt(Pt)})};Zt()})}).catch(function(de){if(de.name!=="AbortError")return de}).then(function(de){fe(de)}),{abort:function(){gt!=null&&gt.cancel(),Xe.abort()}}};function k(){this._listeners=Object.create(null)}function N(D){r(function(){throw D},0)}k.prototype.dispatchEvent=function(D){D.target=this;var ue=this._listeners[D.type];if(ue!=null)for(var me=ue.length,fe=0;fe<me;fe+=1){var Le=ue[fe];try{typeof Le.handleEvent=="function"?Le.handleEvent(D):Le.call(this,D)}catch(De){N(De)}}},k.prototype.addEventListener=function(D,ue){D=String(D);var me=this._listeners,fe=me[D];fe==null&&(fe=[],me[D]=fe);for(var Le=!1,De=0;De<fe.length;De+=1)fe[De]===ue&&(Le=!0);Le||fe.push(ue)},k.prototype.removeEventListener=function(D,ue){D=String(D);var me=this._listeners,fe=me[D];if(fe!=null){for(var Le=[],De=0;De<fe.length;De+=1)fe[De]!==ue&&Le.push(fe[De]);Le.length===0?delete me[D]:me[D]=Le}};function z(D){this.type=D,this.target=void 0}function B(D,ue){z.call(this,D),this.data=ue.data,this.lastEventId=ue.lastEventId}B.prototype=Object.create(z.prototype);function Z(D,ue){z.call(this,D),this.status=ue.status,this.statusText=ue.statusText,this.headers=ue.headers}Z.prototype=Object.create(z.prototype);function L(D,ue){z.call(this,D),this.error=ue.error}L.prototype=Object.create(z.prototype);var F=-1,V=0,W=1,pe=2,C=-1,se=0,we=1,O=2,Oe=3,Be=/^text\/event\-stream(;.*)?$/i,Me=1e3,Ze=18e6,nt=function(D,ue){var me=D==null?ue:parseInt(D,10);return me!==me&&(me=ue),We(me)},We=function(D){return Math.min(Math.max(D,Me),Ze)},_e=function(D,ue,me){try{typeof ue=="function"&&ue.call(D,me)}catch(fe){N(fe)}};function ye(D,ue){k.call(this),ue=ue||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,Ue(this,D,ue)}function $e(){return o!=null&&"withCredentials"in o.prototype||a==null?new o:new a}var Se=d!=null&&p!=null&&"body"in p.prototype;function Ue(D,ue,me){ue=String(ue);var fe=!!me.withCredentials,Le=me.lastEventIdQueryParameterName||"lastEventId",De=We(1e3),Ke=nt(me.heartbeatTimeout,45e3),gt="",Xe=De,q=!1,X=0,de=me.headers||{},je=me.Transport,rt=Se&&je==null?void 0:new x(je!=null?new je:$e()),Zt=je!=null&&typeof je!="string"?new je:rt==null?new j:new R,Pt=void 0,Ot=0,qt=F,Mn="",Ht="",tn="",mn="",un=se,Oi=0,hr=0,ei=function(Fe,Ce,Ie,at){if(qt===V)if(Fe===200&&Ie!=null&&Be.test(Ie)){qt=W,q=Date.now(),Xe=De,D.readyState=W;var pt=new Z("open",{status:Fe,statusText:Ce,headers:at});D.dispatchEvent(pt),_e(D,D.onopen,pt)}else{var Ft="";Fe!==200?(Ce&&(Ce=Ce.replace(/\s+/g," ")),Ft="EventSource's response has a status "+Fe+" "+Ce+" that is not 200. Aborting the connection."):Ft="EventSource's response has a Content-Type specifying an unsupported type: "+(Ie==null?"-":Ie.replace(/\s+/g," "))+". Aborting the connection.",Ee();var pt=new Z("error",{status:Fe,statusText:Ce,headers:at});D.dispatchEvent(pt),_e(D,D.onerror,pt),console.error(Ft)}},ta=function(Fe){if(qt===W){for(var Ce=-1,Ie=0;Ie<Fe.length;Ie+=1){var at=Fe.charCodeAt(Ie);(at===`
377
377
  `.charCodeAt(0)||at==="\r".charCodeAt(0))&&(Ce=Ie)}var pt=(Ce!==-1?mn:"")+Fe.slice(0,Ce+1);mn=(Ce===-1?mn:"")+Fe.slice(Ce+1),Fe!==""&&(q=Date.now(),X+=Fe.length);for(var Ft=0;Ft<pt.length;Ft+=1){var at=pt.charCodeAt(Ft);if(un===C&&at===`
378
378
  `.charCodeAt(0))un=se;else if(un===C&&(un=se),at==="\r".charCodeAt(0)||at===`
379
379
  `.charCodeAt(0)){if(un!==se){un===we&&(hr=Ft+1);var Kt=pt.slice(Oi,hr-1),Yn=pt.slice(hr+(hr<Ft&&pt.charCodeAt(hr)===" ".charCodeAt(0)?1:0),Ft);Kt==="data"?(Mn+=`
380
- `,Mn+=Yn):Kt==="id"?Ht=Yn:Kt==="event"?tn=Yn:Kt==="retry"?(De=nt(Yn,De),Xe=De):Kt==="heartbeatTimeout"&&(Ke=nt(Yn,Ke),Ot!==0&&(i(Ot),Ot=r(function(){Pe()},Ke)))}if(un===se){if(Mn!==""){gt=Ht,tn===""&&(tn="message");var Or=new U(tn,{data:Mn.slice(1),lastEventId:Ht});if(D.dispatchEvent(Or),tn==="open"?_e(D,D.onopen,Or):tn==="message"?_e(D,D.onmessage,Or):tn==="error"&&_e(D,D.onerror,Or),qt===pe)return}Mn="",tn=""}un=at==="\r".charCodeAt(0)?C:se}else un===se&&(Oi=Ft,un=we),un===we?at===":".charCodeAt(0)&&(hr=Ft+1,un=O):un===O&&(un=Oe)}}},A=function(Fe){if(qt===W||qt===V){qt=F,Ot!==0&&(i(Ot),Ot=0),Ot=r(function(){Pe()},Xe),Xe=We(Math.min(De*16,Xe*2)),D.readyState=V;var Ce=new L("error",{error:Fe});D.dispatchEvent(Ce),_e(D,D.onerror,Ce),Fe!=null&&console.error(Fe)}},Ee=function(){qt=pe,Pt!=null&&(Pt.abort(),Pt=void 0),Ot!==0&&(i(Ot),Ot=0),D.readyState=pe},Pe=function(){if(Ot=0,qt!==F){if(!q&&Pt!=null)A(new Error("No activity within "+Ke+" milliseconds. "+(qt===V?"No response received.":X+" chars received.")+" Reconnecting.")),Pt!=null&&(Pt.abort(),Pt=void 0);else{var Fe=Math.max((q||Date.now())+Ke-Date.now(),1);q=!1,Ot=r(function(){Pe()},Fe)}return}q=!1,X=0,Ot=r(function(){Pe()},Ke),qt=V,Mn="",tn="",Ht=gt,mn="",Oi=0,hr=0,un=se;var Ce=ue;if(ue.slice(0,5)!=="data:"&&ue.slice(0,5)!=="blob:"&&gt!==""){var Ie=ue.indexOf("?");Ce=Ie===-1?ue:ue.slice(0,Ie+1)+ue.slice(Ie+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Yn,Or){return Or===Le?"":Yn}),Ce+=(ue.indexOf("?")===-1?"?":"&")+Le+"="+encodeURIComponent(gt)}var at=D.withCredentials,pt={};pt.Accept="text/event-stream";var Ft=D.headers;if(Ft!=null)for(var Kt in Ft)Object.prototype.hasOwnProperty.call(Ft,Kt)&&(pt[Kt]=Ft[Kt]);try{Pt=Zt.open(rt,ei,ta,A,Ce,at,pt)}catch(Yn){throw Ee(),Yn}};D.url=ue,D.readyState=V,D.withCredentials=fe,D.headers=de,D._close=Ee,Pe()}ye.prototype=Object.create(k.prototype),ye.prototype.CONNECTING=V,ye.prototype.OPEN=W,ye.prototype.CLOSED=pe,ye.prototype.close=function(){this._close()},ye.CONNECTING=V,ye.OPEN=W,ye.CLOSED=pe,ye.prototype.withCredentials=void 0;var ot=l;o!=null&&(l==null||!("withCredentials"in l.prototype))&&(ot=ye),function(D){{var ue=D(t);ue!==void 0&&(e.exports=ue)}}(function(D){D.EventSourcePolyfill=ye,D.NativeEventSource=l,D.EventSource=ot})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:K:globalThis)})(Vy,Vy.exports);var rue=Vy.exports;const iue=ti(rue),oue=(e,t={})=>{const n=new iue.EventSourcePolyfill(e,{headers:t.headers}),r=new MA;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}},aue=async(e,t={})=>{const{emitter:n,source:r}=oue(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 Ct;(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})(Ct||(Ct={}));var Ky;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Ky||(Ky={}));const Re=Ct.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Qi=e=>{switch(typeof e){case"undefined":return Re.undefined;case"string":return Re.string;case"number":return isNaN(e)?Re.nan:Re.number;case"boolean":return Re.boolean;case"function":return Re.function;case"bigint":return Re.bigint;case"symbol":return Re.symbol;case"object":return Array.isArray(e)?Re.array:e===null?Re.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Re.promise:typeof Map<"u"&&e instanceof Map?Re.map:typeof Set<"u"&&e instanceof Set?Re.set:typeof Date<"u"&&e instanceof Date?Re.date:Re.object;default:return Re.unknown}},be=Ct.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"]),sue=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Sr 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,Ct.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()}}Sr.create=e=>new Sr(e);const Xl=(e,t)=>{let n;switch(e.code){case be.invalid_type:e.received===Re.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case be.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Ct.jsonStringifyReplacer)}`;break;case be.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ct.joinValues(e.keys,", ")}`;break;case be.invalid_union:n="Invalid input";break;case be.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ct.joinValues(e.options)}`;break;case be.invalid_enum_value:n=`Invalid enum value. Expected ${Ct.joinValues(e.options)}, received '${e.received}'`;break;case be.invalid_arguments:n="Invalid function arguments";break;case be.invalid_return_type:n="Invalid function return type";break;case be.invalid_date:n="Invalid date";break;case be.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}"`:Ct.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case be.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 be.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 be.custom:n="Invalid input";break;case be.invalid_intersection_types:n="Intersection results could not be merged";break;case be.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case be.not_finite:n="Number must be finite";break;default:n=t.defaultError,Ct.assertNever(e)}return{message:n}};let NA=Xl;function lue(e){NA=e}function qf(){return NA}const Hf=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}},cue=[];function Ne(e,t){const n=Hf({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,qf(),Xl].filter(r=>!!r)});e.common.issues.push(n)}class $n{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 st;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 $n.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 st;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 st=Object.freeze({status:"aborted"}),DA=e=>({status:"dirty",value:e}),Fn=e=>({status:"valid",value:e}),Gy=e=>e.status==="aborted",Yy=e=>e.status==="dirty",Ql=e=>e.status==="valid",Wf=e=>typeof Promise<"u"&&e instanceof Promise;var He;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(He||(He={}));class Gr{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 jA=(e,t)=>{if(Ql(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 Sr(e.common.issues);return this._error=n,this._error}}};function ct(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 dt{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 Qi(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Qi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new $n,ctx:{common:t.parent.common,data:t.data,parsedType:Qi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Wf(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:Qi(t)},o=this._parseSync({data:t,path:i.path,parent:i});return jA(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:Qi(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(Wf(i)?i:Promise.resolve(i));return jA(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:be.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 Tr({schema:this,typeName:Je.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Si.create(this,this._def)}nullable(){return Go.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Cr.create(this,this._def)}promise(){return ms.create(this,this._def)}or(t){return rc.create([this,t],this._def)}and(t){return ic.create(this,t,this._def)}transform(t){return new Tr({...ct(this._def),schema:this,typeName:Je.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new cc({...ct(this._def),innerType:this,defaultValue:n,typeName:Je.ZodDefault})}brand(){return new FA({typeName:Je.ZodBranded,type:this,...ct(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Xf({...ct(this._def),innerType:this,catchValue:n,typeName:Je.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return uc.create(this,t)}readonly(){return ep.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const uue=/^c[^\s-]{8,}$/i,due=/^[a-z][a-z0-9]*$/,fue=/^[0-9A-HJKMNP-TV-Z]{26}$/,pue=/^[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,hue=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,mue="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Jy;const gue=/^(((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}))$/,yue=/^(([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})))$/,vue=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 bue(e,t){return!!((t==="v4"||!t)&&gue.test(e)||(t==="v6"||!t)&&yue.test(e))}class Er extends dt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Re.string){const o=this._getOrReturnCtx(t);return Ne(o,{code:be.invalid_type,expected:Re.string,received:o.parsedType}),st}const r=new $n;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(i=this._getOrReturnCtx(t,i),Ne(i,{code:be.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),Ne(i,{code:be.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?Ne(i,{code:be.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&Ne(i,{code:be.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")hue.test(t.data)||(i=this._getOrReturnCtx(t,i),Ne(i,{validation:"email",code:be.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")Jy||(Jy=new RegExp(mue,"u")),Jy.test(t.data)||(i=this._getOrReturnCtx(t,i),Ne(i,{validation:"emoji",code:be.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")pue.test(t.data)||(i=this._getOrReturnCtx(t,i),Ne(i,{validation:"uuid",code:be.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")uue.test(t.data)||(i=this._getOrReturnCtx(t,i),Ne(i,{validation:"cuid",code:be.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")due.test(t.data)||(i=this._getOrReturnCtx(t,i),Ne(i,{validation:"cuid2",code:be.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")fue.test(t.data)||(i=this._getOrReturnCtx(t,i),Ne(i,{validation:"ulid",code:be.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),Ne(i,{validation:"url",code:be.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),Ne(i,{validation:"regex",code:be.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),Ne(i,{code:be.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),Ne(i,{code:be.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(i=this._getOrReturnCtx(t,i),Ne(i,{code:be.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?vue(o).test(t.data)||(i=this._getOrReturnCtx(t,i),Ne(i,{code:be.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="ip"?bue(t.data,o.version)||(i=this._getOrReturnCtx(t,i),Ne(i,{validation:"ip",code:be.invalid_string,message:o.message}),r.dirty()):Ct.assertNever(o);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:be.invalid_string,...He.errToObj(r)})}_addCheck(t){return new Er({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...He.errToObj(t)})}url(t){return this._addCheck({kind:"url",...He.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...He.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...He.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...He.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...He.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...He.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...He.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,...He.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...He.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...He.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...He.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...He.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...He.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...He.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...He.errToObj(n)})}nonempty(t){return this.min(1,He.errToObj(t))}trim(){return new Er({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Er({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Er({...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}}Er.create=e=>{var t;return new Er({checks:[],typeName:Je.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ct(e)})};function wue(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 eo extends dt{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)!==Re.number){const o=this._getOrReturnCtx(t);return Ne(o,{code:be.invalid_type,expected:Re.number,received:o.parsedType}),st}let r;const i=new $n;for(const o of this._def.checks)o.kind==="int"?Ct.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),Ne(r,{code:be.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),Ne(r,{code:be.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),Ne(r,{code:be.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?wue(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),Ne(r,{code:be.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),Ne(r,{code:be.not_finite,message:o.message}),i.dirty()):Ct.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,He.toString(n))}gt(t,n){return this.setLimit("min",t,!1,He.toString(n))}lte(t,n){return this.setLimit("max",t,!0,He.toString(n))}lt(t,n){return this.setLimit("max",t,!1,He.toString(n))}setLimit(t,n,r,i){return new eo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:He.toString(i)}]})}_addCheck(t){return new eo({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:He.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:He.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:He.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:He.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:He.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:He.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:He.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:He.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:He.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"&&Ct.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)}}eo.create=e=>new eo({checks:[],typeName:Je.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ct(e)});class to extends dt{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)!==Re.bigint){const o=this._getOrReturnCtx(t);return Ne(o,{code:be.invalid_type,expected:Re.bigint,received:o.parsedType}),st}let r;const i=new $n;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),Ne(r,{code:be.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),Ne(r,{code:be.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),Ne(r,{code:be.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):Ct.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,He.toString(n))}gt(t,n){return this.setLimit("min",t,!1,He.toString(n))}lte(t,n){return this.setLimit("max",t,!0,He.toString(n))}lt(t,n){return this.setLimit("max",t,!1,He.toString(n))}setLimit(t,n,r,i){return new to({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:He.toString(i)}]})}_addCheck(t){return new to({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:He.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:He.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:He.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:He.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:He.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}}to.create=e=>{var t;return new to({checks:[],typeName:Je.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ct(e)})};class ec extends dt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Re.boolean){const r=this._getOrReturnCtx(t);return Ne(r,{code:be.invalid_type,expected:Re.boolean,received:r.parsedType}),st}return Fn(t.data)}}ec.create=e=>new ec({typeName:Je.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ct(e)});class Wo extends dt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Re.date){const o=this._getOrReturnCtx(t);return Ne(o,{code:be.invalid_type,expected:Re.date,received:o.parsedType}),st}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return Ne(o,{code:be.invalid_date}),st}const r=new $n;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(i=this._getOrReturnCtx(t,i),Ne(i,{code:be.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),Ne(i,{code:be.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):Ct.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Wo({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:He.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:He.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}}Wo.create=e=>new Wo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Je.ZodDate,...ct(e)});class Vf extends dt{_parse(t){if(this._getType(t)!==Re.symbol){const r=this._getOrReturnCtx(t);return Ne(r,{code:be.invalid_type,expected:Re.symbol,received:r.parsedType}),st}return Fn(t.data)}}Vf.create=e=>new Vf({typeName:Je.ZodSymbol,...ct(e)});class tc extends dt{_parse(t){if(this._getType(t)!==Re.undefined){const r=this._getOrReturnCtx(t);return Ne(r,{code:be.invalid_type,expected:Re.undefined,received:r.parsedType}),st}return Fn(t.data)}}tc.create=e=>new tc({typeName:Je.ZodUndefined,...ct(e)});class nc extends dt{_parse(t){if(this._getType(t)!==Re.null){const r=this._getOrReturnCtx(t);return Ne(r,{code:be.invalid_type,expected:Re.null,received:r.parsedType}),st}return Fn(t.data)}}nc.create=e=>new nc({typeName:Je.ZodNull,...ct(e)});class fs extends dt{constructor(){super(...arguments),this._any=!0}_parse(t){return Fn(t.data)}}fs.create=e=>new fs({typeName:Je.ZodAny,...ct(e)});class Vo extends dt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Fn(t.data)}}Vo.create=e=>new Vo({typeName:Je.ZodUnknown,...ct(e)});class xi extends dt{_parse(t){const n=this._getOrReturnCtx(t);return Ne(n,{code:be.invalid_type,expected:Re.never,received:n.parsedType}),st}}xi.create=e=>new xi({typeName:Je.ZodNever,...ct(e)});class Kf extends dt{_parse(t){if(this._getType(t)!==Re.undefined){const r=this._getOrReturnCtx(t);return Ne(r,{code:be.invalid_type,expected:Re.void,received:r.parsedType}),st}return Fn(t.data)}}Kf.create=e=>new Kf({typeName:Je.ZodVoid,...ct(e)});class Cr extends dt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==Re.array)return Ne(n,{code:be.invalid_type,expected:Re.array,received:n.parsedType}),st;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(a||s)&&(Ne(n,{code:a?be.too_big:be.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&&(Ne(n,{code:be.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&&(Ne(n,{code:be.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 Gr(n,a,n.path,s)))).then(a=>$n.mergeArray(r,a));const o=[...n.data].map((a,s)=>i.type._parseSync(new Gr(n,a,n.path,s)));return $n.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Cr({...this._def,minLength:{value:t,message:He.toString(n)}})}max(t,n){return new Cr({...this._def,maxLength:{value:t,message:He.toString(n)}})}length(t,n){return new Cr({...this._def,exactLength:{value:t,message:He.toString(n)}})}nonempty(t){return this.min(1,t)}}Cr.create=(e,t)=>new Cr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Je.ZodArray,...ct(t)});function ps(e){if(e instanceof Bt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Si.create(ps(r))}return new Bt({...e._def,shape:()=>t})}else return e instanceof Cr?new Cr({...e._def,type:ps(e.element)}):e instanceof Si?Si.create(ps(e.unwrap())):e instanceof Go?Go.create(ps(e.unwrap())):e instanceof Yr?Yr.create(e.items.map(t=>ps(t))):e}class Bt extends dt{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=Ct.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==Re.object){const c=this._getOrReturnCtx(t);return Ne(c,{code:be.invalid_type,expected:Re.object,received:c.parsedType}),st}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof xi&&this._def.unknownKeys==="strip"))for(const c in i.data)a.includes(c)||s.push(c);const l=[];for(const c of a){const u=o[c],d=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Gr(i,d,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof xi){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(c==="strict")s.length>0&&(Ne(i,{code:be.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 u of s){const d=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Gr(i,d,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key;c.push({key:d,value:await u.value,alwaysSet:u.alwaysSet})}return c}).then(c=>$n.mergeObjectSync(r,c)):$n.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return He.errToObj,new Bt({...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=He.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new Bt({...this._def,unknownKeys:"strip"})}passthrough(){return new Bt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Bt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Bt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Je.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Bt({...this._def,catchall:t})}pick(t){const n={};return Ct.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Bt({...this._def,shape:()=>n})}omit(t){const n={};return Ct.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Bt({...this._def,shape:()=>n})}deepPartial(){return ps(this)}partial(t){const n={};return Ct.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new Bt({...this._def,shape:()=>n})}required(t){const n={};return Ct.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Si;)o=o._def.innerType;n[r]=o}}),new Bt({...this._def,shape:()=>n})}keyof(){return LA(Ct.objectKeys(this.shape))}}Bt.create=(e,t)=>new Bt({shape:()=>e,unknownKeys:"strip",catchall:xi.create(),typeName:Je.ZodObject,...ct(t)}),Bt.strictCreate=(e,t)=>new Bt({shape:()=>e,unknownKeys:"strict",catchall:xi.create(),typeName:Je.ZodObject,...ct(t)}),Bt.lazycreate=(e,t)=>new Bt({shape:e,unknownKeys:"strip",catchall:xi.create(),typeName:Je.ZodObject,...ct(t)});class rc extends dt{_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 Sr(s.ctx.common.issues));return Ne(n,{code:be.invalid_union,unionErrors:a}),st}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},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!o&&(o={result:u,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 Sr(l));return Ne(n,{code:be.invalid_union,unionErrors:s}),st}}get options(){return this._def.options}}rc.create=(e,t)=>new rc({options:e,typeName:Je.ZodUnion,...ct(t)});const Gf=e=>e instanceof ac?Gf(e.schema):e instanceof Tr?Gf(e.innerType()):e instanceof sc?[e.value]:e instanceof no?e.options:e instanceof lc?Object.keys(e.enum):e instanceof cc?Gf(e._def.innerType):e instanceof tc?[void 0]:e instanceof nc?[null]:null;class Yf extends dt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Re.object)return Ne(n,{code:be.invalid_type,expected:Re.object,received:n.parsedType}),st;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}):(Ne(n,{code:be.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),st)}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=Gf(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 Yf({typeName:Je.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...ct(r)})}}function Xy(e,t){const n=Qi(e),r=Qi(t);if(e===t)return{valid:!0,data:e};if(n===Re.object&&r===Re.object){const i=Ct.objectKeys(t),o=Ct.objectKeys(e).filter(s=>i.indexOf(s)!==-1),a={...e,...t};for(const s of o){const l=Xy(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===Re.array&&r===Re.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=Xy(a,s);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===Re.date&&r===Re.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class ic extends dt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(o,a)=>{if(Gy(o)||Gy(a))return st;const s=Xy(o.value,a.value);return s.valid?((Yy(o)||Yy(a))&&n.dirty(),{status:n.value,value:s.data}):(Ne(r,{code:be.invalid_intersection_types}),st)};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}))}}ic.create=(e,t,n)=>new ic({left:e,right:t,typeName:Je.ZodIntersection,...ct(n)});class Yr extends dt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Re.array)return Ne(r,{code:be.invalid_type,expected:Re.array,received:r.parsedType}),st;if(r.data.length<this._def.items.length)return Ne(r,{code:be.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),st;!this._def.rest&&r.data.length>this._def.items.length&&(Ne(r,{code:be.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 Gr(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>$n.mergeArray(n,a)):$n.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Yr({...this._def,rest:t})}}Yr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Yr({items:e,typeName:Je.ZodTuple,rest:null,...ct(t)})};class oc extends dt{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!==Re.object)return Ne(r,{code:be.invalid_type,expected:Re.object,received:r.parsedType}),st;const i=[],o=this._def.keyType,a=this._def.valueType;for(const s in r.data)i.push({key:o._parse(new Gr(r,s,r.path,s)),value:a._parse(new Gr(r,r.data[s],r.path,s))});return r.common.async?$n.mergeObjectAsync(n,i):$n.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof dt?new oc({keyType:t,valueType:n,typeName:Je.ZodRecord,...ct(r)}):new oc({keyType:Er.create(),valueType:t,typeName:Je.ZodRecord,...ct(n)})}}class Jf extends dt{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!==Re.map)return Ne(r,{code:be.invalid_type,expected:Re.map,received:r.parsedType}),st;const i=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:i._parse(new Gr(r,s,r.path,[c,"key"])),value:o._parse(new Gr(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,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return st;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of a){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return st;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}Jf.create=(e,t,n)=>new Jf({valueType:t,keyType:e,typeName:Je.ZodMap,...ct(n)});class Ko extends dt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Re.set)return Ne(r,{code:be.invalid_type,expected:Re.set,received:r.parsedType}),st;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(Ne(r,{code:be.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&&(Ne(r,{code:be.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 u of l){if(u.status==="aborted")return st;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const s=[...r.data.values()].map((l,c)=>o._parse(new Gr(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new Ko({...this._def,minSize:{value:t,message:He.toString(n)}})}max(t,n){return new Ko({...this._def,maxSize:{value:t,message:He.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Ko.create=(e,t)=>new Ko({valueType:e,minSize:null,maxSize:null,typeName:Je.ZodSet,...ct(t)});class hs extends dt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Re.function)return Ne(n,{code:be.invalid_type,expected:Re.function,received:n.parsedType}),st;function r(s,l){return Hf({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,qf(),Xl].filter(c=>!!c),issueData:{code:be.invalid_arguments,argumentsError:l}})}function i(s,l){return Hf({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,qf(),Xl].filter(c=>!!c),issueData:{code:be.invalid_return_type,returnTypeError:l}})}const o={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof ms){const s=this;return Fn(async function(...l){const c=new Sr([]),u=await s._def.args.parseAsync(l,o).catch(f=>{throw c.addIssue(r(l,f)),c}),d=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(d,o).catch(f=>{throw c.addIssue(i(d,f)),c})})}else{const s=this;return Fn(function(...l){const c=s._def.args.safeParse(l,o);if(!c.success)throw new Sr([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=s._def.returns.safeParse(u,o);if(!d.success)throw new Sr([i(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new hs({...this._def,args:Yr.create(t).rest(Vo.create())})}returns(t){return new hs({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new hs({args:t||Yr.create([]).rest(Vo.create()),returns:n||Vo.create(),typeName:Je.ZodFunction,...ct(r)})}}class ac extends dt{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})}}ac.create=(e,t)=>new ac({getter:e,typeName:Je.ZodLazy,...ct(t)});class sc extends dt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Ne(n,{received:n.data,code:be.invalid_literal,expected:this._def.value}),st}return{status:"valid",value:t.data}}get value(){return this._def.value}}sc.create=(e,t)=>new sc({value:e,typeName:Je.ZodLiteral,...ct(t)});function LA(e,t){return new no({values:e,typeName:Je.ZodEnum,...ct(t)})}class no extends dt{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Ne(n,{expected:Ct.joinValues(r),received:n.parsedType,code:be.invalid_type}),st}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return Ne(n,{received:n.data,code:be.invalid_enum_value,options:r}),st}return Fn(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 no.create(t)}exclude(t){return no.create(this.options.filter(n=>!t.includes(n)))}}no.create=LA;class lc extends dt{_parse(t){const n=Ct.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Re.string&&r.parsedType!==Re.number){const i=Ct.objectValues(n);return Ne(r,{expected:Ct.joinValues(i),received:r.parsedType,code:be.invalid_type}),st}if(n.indexOf(t.data)===-1){const i=Ct.objectValues(n);return Ne(r,{received:r.data,code:be.invalid_enum_value,options:i}),st}return Fn(t.data)}get enum(){return this._def.values}}lc.create=(e,t)=>new lc({values:e,typeName:Je.ZodNativeEnum,...ct(t)});class ms extends dt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Re.promise&&n.common.async===!1)return Ne(n,{code:be.invalid_type,expected:Re.promise,received:n.parsedType}),st;const r=n.parsedType===Re.promise?n.data:Promise.resolve(n.data);return Fn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}ms.create=(e,t)=>new ms({type:e,typeName:Je.ZodPromise,...ct(t)});class Tr extends dt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Je.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=>{Ne(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"?st:(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"?st:(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(!Ql(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=>Ql(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:n.value,value:s})):a);Ct.assertNever(i)}}Tr.create=(e,t,n)=>new Tr({schema:e,typeName:Je.ZodEffects,effect:t,...ct(n)}),Tr.createWithPreprocess=(e,t,n)=>new Tr({schema:t,effect:{type:"preprocess",transform:e},typeName:Je.ZodEffects,...ct(n)});class Si extends dt{_parse(t){return this._getType(t)===Re.undefined?Fn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Si.create=(e,t)=>new Si({innerType:e,typeName:Je.ZodOptional,...ct(t)});class Go extends dt{_parse(t){return this._getType(t)===Re.null?Fn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Go.create=(e,t)=>new Go({innerType:e,typeName:Je.ZodNullable,...ct(t)});class cc extends dt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Re.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}cc.create=(e,t)=>new cc({innerType:e,typeName:Je.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ct(t)});class Xf extends dt{_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 Wf(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Sr(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Sr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Xf.create=(e,t)=>new Xf({innerType:e,typeName:Je.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ct(t)});class Qf extends dt{_parse(t){if(this._getType(t)!==Re.nan){const r=this._getOrReturnCtx(t);return Ne(r,{code:be.invalid_type,expected:Re.nan,received:r.parsedType}),st}return{status:"valid",value:t.data}}}Qf.create=e=>new Qf({typeName:Je.ZodNaN,...ct(e)});const _ue=Symbol("zod_brand");class FA extends dt{_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 uc extends dt{_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"?st:o.status==="dirty"?(n.dirty(),DA(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"?st: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 uc({in:t,out:n,typeName:Je.ZodPipeline})}}class ep extends dt{_parse(t){const n=this._def.innerType._parse(t);return Ql(n)&&(n.value=Object.freeze(n.value)),n}}ep.create=(e,t)=>new ep({innerType:e,typeName:Je.ZodReadonly,...ct(t)});const UA=(e,t={},n)=>e?fs.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})}}):fs.create(),xue={object:Bt.lazycreate};var Je;(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"})(Je||(Je={}));const Sue=(e,t={message:`Input not instance of ${e.name}`})=>UA(n=>n instanceof e,t),BA=Er.create,zA=eo.create,Eue=Qf.create,Cue=to.create,ZA=ec.create,Tue=Wo.create,kue=Vf.create,Oue=tc.create,Aue=nc.create,$ue=fs.create,Pue=Vo.create,Iue=xi.create,Rue=Kf.create,Mue=Cr.create,Nue=Bt.create,Due=Bt.strictCreate,jue=rc.create,Lue=Yf.create,Fue=ic.create,Uue=Yr.create,Bue=oc.create,zue=Jf.create,Zue=Ko.create,que=hs.create,Hue=ac.create,Wue=sc.create,Vue=no.create,Kue=lc.create,Gue=ms.create,qA=Tr.create,Yue=Si.create,Jue=Go.create,Xue=Tr.createWithPreprocess,Que=uc.create;var H=Object.freeze({__proto__:null,defaultErrorMap:Xl,setErrorMap:lue,getErrorMap:qf,makeIssue:Hf,EMPTY_PATH:cue,addIssueToContext:Ne,ParseStatus:$n,INVALID:st,DIRTY:DA,OK:Fn,isAborted:Gy,isDirty:Yy,isValid:Ql,isAsync:Wf,get util(){return Ct},get objectUtil(){return Ky},ZodParsedType:Re,getParsedType:Qi,ZodType:dt,ZodString:Er,ZodNumber:eo,ZodBigInt:to,ZodBoolean:ec,ZodDate:Wo,ZodSymbol:Vf,ZodUndefined:tc,ZodNull:nc,ZodAny:fs,ZodUnknown:Vo,ZodNever:xi,ZodVoid:Kf,ZodArray:Cr,ZodObject:Bt,ZodUnion:rc,ZodDiscriminatedUnion:Yf,ZodIntersection:ic,ZodTuple:Yr,ZodRecord:oc,ZodMap:Jf,ZodSet:Ko,ZodFunction:hs,ZodLazy:ac,ZodLiteral:sc,ZodEnum:no,ZodNativeEnum:lc,ZodPromise:ms,ZodEffects:Tr,ZodTransformer:Tr,ZodOptional:Si,ZodNullable:Go,ZodDefault:cc,ZodCatch:Xf,ZodNaN:Qf,BRAND:_ue,ZodBranded:FA,ZodPipeline:uc,ZodReadonly:ep,custom:UA,Schema:dt,ZodSchema:dt,late:xue,get ZodFirstPartyTypeKind(){return Je},coerce:{string:e=>Er.create({...e,coerce:!0}),number:e=>eo.create({...e,coerce:!0}),boolean:e=>ec.create({...e,coerce:!0}),bigint:e=>to.create({...e,coerce:!0}),date:e=>Wo.create({...e,coerce:!0})},any:$ue,array:Mue,bigint:Cue,boolean:ZA,date:Tue,discriminatedUnion:Lue,effect:qA,enum:Vue,function:que,instanceof:Sue,intersection:Fue,lazy:Hue,literal:Wue,map:zue,nan:Eue,nativeEnum:Kue,never:Iue,null:Aue,nullable:Jue,number:zA,object:Nue,oboolean:()=>ZA().optional(),onumber:()=>zA().optional(),optional:Yue,ostring:()=>BA().optional(),pipeline:Que,preprocess:Xue,promise:Gue,record:Bue,set:Zue,strictObject:Due,string:BA,symbol:kue,transformer:qA,tuple:Uue,undefined:Oue,union:jue,unknown:Pue,void:Rue,NEVER:st,ZodIssueCode:be,quotelessJson:sue,ZodError:Sr});const ede=H.object({type:H.literal("message_created"),data:H.object({id:H.string(),createdAt:H.string().datetime(),payload:H.union([H.object({audioUrl:H.string().min(1),className:H.string().describe("CSS className to apply to the message").optional(),type:H.literal("audio")}),H.object({title:H.string().min(1),subtitle:H.string().optional(),imageUrl:H.string().optional(),actions:H.array(H.object({action:H.enum(["postback","url","say"]),label:H.string().min(1),value:H.string().min(1)})),type:H.literal("card"),className:H.string().describe("CSS className to apply to the message").optional()}),H.object({items:H.array(H.object({title:H.string().min(1),subtitle:H.string().optional(),imageUrl:H.string().optional(),actions:H.array(H.object({action:H.enum(["postback","url","say"]),label:H.string().min(1),value:H.string().min(1)})),className:H.string().describe("CSS className to apply to the message").optional()})),className:H.string().describe("CSS className to apply to the message").optional(),type:H.literal("carousel")}),H.object({text:H.string(),options:H.array(H.object({label:H.string().min(1),value:H.string().min(1)})),className:H.string().describe("CSS className to apply to the message").optional(),type:H.literal("choice"),disableFreeText:H.boolean().optional()}),H.object({text:H.string(),options:H.array(H.object({label:H.string().min(1),value:H.string().min(1)})),className:H.string().describe("CSS className to apply to the message").optional(),type:H.literal("dropdown")}),H.object({fileUrl:H.string().min(1),title:H.string().min(1).optional(),className:H.string().describe("CSS className to apply to the message").optional(),type:H.literal("file")}),H.object({imageUrl:H.string().min(1),className:H.string().describe("CSS className to apply to the message").optional(),type:H.literal("image")}),H.object({latitude:H.number(),longitude:H.number(),address:H.string().optional(),title:H.string().optional(),className:H.string().describe("CSS className to apply to the message").optional(),type:H.literal("location")}),H.object({markdown:H.string().min(1),className:H.string().describe("CSS className to apply to the message").optional(),type:H.literal("markdown")}),H.object({text:H.string().min(1),className:H.string().describe("CSS className to apply to the message").optional(),type:H.literal("text")}),H.object({videoUrl:H.string().min(1),className:H.string().describe("CSS className to apply to the message").optional(),type:H.literal("video")})]),userId:H.string(),conversationId:H.string()})}),tde=H.object({type:H.literal("webchat_visibility"),data:H.object({visibility:H.enum(["show","hide","toggle"])})}),nde=H.object({type:H.literal("webchat_config"),data:H.object({config:H.record(H.any())})}),rde=H.object({type:H.literal("custom"),data:H.object({event:H.record(H.any())})}),ide={messageCreated:ede,webchatVisibility:tde,webchatConfig:nde,custom:rde},HA="unknown error",Dp=class Dp extends MA{constructor(n){super();T(this,"_state",{status:"disconnected"});T(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});T(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)});T(this,"_connect",async()=>{const n=await aue(`${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});T(this,"_disconnectSync",n=>{n.close(),this._state={status:"disconnected"}});T(this,"_handleMessage",n=>{const r=this._parseSignal(n.data);this.emit(r.type,r.data)});T(this,"_handleError",n=>r=>{this._disconnectSync(n);const i=this._toError(r);this.emit("error",i)});T(this,"_parseSignal",n=>{for(const r of Object.values(ide)){const i=this._safeJsonParse(n),o=r.safeParse(i);if(o.success)return o.data}return{type:"unknown",data:n}});T(this,"_safeJsonParse",n=>{try{return JSON.parse(n)}catch{return n}});T(this,"_toError",n=>{if(n instanceof Error)return n;if(typeof n=="string")return new Error(n);if(n===null)return new Error(HA);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(HA)}});this._props=n}get status(){return this._state.status}};T(Dp,"listen",async n=>{const r=new Dp(n);return await r.connect(),r});let Qy=Dp;const WA=100*1024*1024,ode=WA,ade=WA,sde=6e4;class lde{constructor(t){T(this,"_auto");T(this,"createConversation",t=>this._auto.createConversation(t));T(this,"getConversation",t=>this._auto.getConversation(t));T(this,"deleteConversation",t=>this._auto.deleteConversation(t));T(this,"listConversations",t=>this._auto.listConversations(t));T(this,"listConversationMessages",t=>this._auto.listConversationMessages(t));T(this,"addParticipant",t=>this._auto.addParticipant(t));T(this,"removeParticipant",t=>this._auto.removeParticipant(t));T(this,"getParticipant",t=>this._auto.getParticipant(t));T(this,"listParticipants",t=>this._auto.listParticipants(t));T(this,"createMessage",t=>this._auto.createMessage(t));T(this,"getMessage",t=>this._auto.getMessage(t));T(this,"deleteMessage",t=>this._auto.deleteMessage(t));T(this,"createUser",t=>this._auto.createUser(t));T(this,"getUser",t=>this._auto.getUser(t));T(this,"updateUser",t=>this._auto.updateUser(t));T(this,"deleteUser",t=>this._auto.deleteUser(t));T(this,"createEvent",t=>this._auto.createEvent(t));T(this,"getEvent",t=>this._auto.getEvent(t));T(this,"listenConversation",async({id:t,"x-user-key":n})=>await Qy.listen({url:this.props.apiUrl,conversationId:t,userKey:n}));this.props=t;const{apiUrl:n}=t,r={...t.headers},i=t.timeout??sde,o=XO.create({baseURL:n,headers:r,withCredentials:!0,timeout:i,maxBodyLength:ode,maxContentLength:ade});this._auto=new tue(o)}}const tp={disconnected:0,user_creating:1,user_created:2,conversation_creating:3,conversation_created:4},fr=(e,t)=>e.status===t,Yo=(e,t)=>tp[e.status]<tp[t],VA=(e,t)=>tp[e.status]>=tp[t];class gs extends Error{constructor(t){super(`Unexpected state: ${t.status}`),this.state=t}}class KA extends zp{constructor(n){super();T(this,"_client");T(this,"_webhookId");T(this,"_state",{status:"disconnected"});T(this,"mode","pushpin");T(this,"_initialConnect",async n=>{if(VA(this._state,"user_created"))throw new Error("Client is already connected. Please disconnect first.");if(fr(this._state,"user_creating"))return;this._state={status:"user_creating"},console.log("createUser");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}});T(this,"_reConnect",async(n,r)=>{if(VA(this._state,"user_created")){if(this._state.userId!==n.userId)throw new Error("Client is already connected. Please disconnect first.");return n}return fr(this._state,"user_creating")||(this._state={status:"user_created",userId:n.userId,userKey:n.userToken},console.log("updateUser"),await this._client.updateUser({"x-user-key":n.userToken,name:void 0,pictureUrl:void 0,userData:r})),n});T(this,"_mapMessage",n=>{const{payload:r,disableInput:i}=sae(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._client=new lde({apiUrl:r})}get clientId(){return this._webhookId}get userId(){if(!Yo(this._state,"user_created"))return this._state.userId}get conversationId(){if(!Yo(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(){fr(this._state,"conversation_created")?this._state.signalEmitter.cleanup():fr(this._state,"conversation_creating")&&console.warn("zombie conversation..."),this._state={status:"disconnected"}}async sendMessage(n){if(Yo(this._state,"user_created"))throw new gs(this._state);if(fr(this._state,"conversation_creating"))throw new gs(this._state);let r;fr(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)),console.log("createMessage"),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(Yo(this._state,"user_created"))throw new gs(this._state);if(fr(this._state,"conversation_creating"))throw new gs(this._state);let r;fr(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)),console.log("createEvent"),await this._client.createEvent({"x-user-key":r.userKey,conversationId:r.conversationId,payload:{type:"custom",data:n}})}async switchConversation(n){if(Yo(this._state,"user_created"))throw new gs(this._state);fr(this._state,"conversation_created")&&this._state.conversationId===n||fr(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(Yo(this._state,"user_created"))return!1;try{return await this._client.getConversation({"x-user-key":this._state.userKey,id:n}),!0}catch(r){if(Wy(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(Wy(r)&&i(r))return!1;throw r}}async newConversation(){if(Yo(this._state,"user_created"))throw new gs(this._state);fr(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){console.log("createConversation");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(!fr(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=>console.log("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 cde=({clientId:e,apiUrl:t="https://webchat.botpress.cloud",mode:n="pushpin"})=>{const[r,i]=w.useState();return w.useEffect(()=>{const o=n==="messaging"?new xO({url:t,clientId:e}):new KA({apiUrl:t,clientId:e});i(o)},[e,t,n]),r},ude=(e,t,n=120)=>{w.useEffect(()=>{if(e){e.style.height="0px";const r=Math.min(e.scrollHeight,n);e.style.height=r+"px"}},[e,t])},GA=w.memo(w.forwardRef((e,t)=>{const{state:n,theme:{composer:r},client:i}=$t(),[o,a]=w.useState(""),[s,l]=w.useState(-1);if(n.isReadOnly||!i)return null;const c=()=>{o&&(i.sendMessage(o),a(""),l(-1))};return B.jsx(xw.Provider,{value:{value:o,setValue:a,historyIndex:s,setHistoryIndex:l,sendMessage:c},children:B.jsx("div",{"data-disabled":n.disableComposer,...e,...r==null?void 0:r.container,ref:t})})})),YA=w.memo(e=>{const{state:t,theme:{composer:n},configuration:r}=$t(),{value:i,setValue:o,historyIndex:a,setHistoryIndex:s,sendMessage:l}=Sw(),c=w.useRef(null),u=Bi(v=>v.user),d=Bi(v=>v.messageHistory),[p,f]=w.useState(!1);ude(c.current,i),w.useEffect(()=>{c.current&&(c.current.selectionStart=c.current.value.length,c.current.selectionEnd=c.current.value.length)},[i]);function h({key:v}){v==="Shift"&&f(!0)}function m({key:v}){v==="Shift"&&f(!1)}return w.useEffect(()=>(window.addEventListener("keydown",h),window.addEventListener("keyup",m),()=>{window.removeEventListener("keydown",h),window.removeEventListener("keyup",m)}),[]),B.jsx("textarea",{...n==null?void 0:n.input,placeholder:(r==null?void 0:r.composerPlaceholder)??"Type your message...",disabled:t.disableComposer,ref:c,value:i,"data-has-value":!!i,onChange:v=>o(v.target.value),onKeyDown:v=>{if(!t.disableComposer){if(v.key==="Enter"&&(v.preventDefault(),p?(o(i+`
381
- `),setTimeout(()=>{var g;return(g=c.current)==null?void 0:g.scroll({behavior:"instant",top:c.current.scrollHeight})},0)):l()),v.key==="ArrowUp"){v.preventDefault();const g=d[(u==null?void 0:u.userId)??""]??[];a<g.length-1&&o(g[a+1]),s(()=>Math.min(a+1,g.length-1))}if(v.key==="ArrowDown"){v.preventDefault();const g=d[(u==null?void 0:u.userId)??""]??[];o(a===0?"":g[a-1]),s(()=>Math.max(a-1,-1))}}},...e})}),JA=w.memo(w.forwardRef(({icon:e=wU,...t},n)=>{var a,s;const{value:r,sendMessage:i}=Sw(),{theme:{composer:o}}=$t();return B.jsx("button",{ref:n,...t,...(a=o==null?void 0:o.button)==null?void 0:a.container,disabled:!r,onClick:i,children:B.jsx(e,{...(s=o==null?void 0:o.button)==null?void 0:s.icon})})})),XA=({children:e})=>{const[t,n]=w.useState(!1),[r,i]=w.useState(""),[o,a]=w.useState(null),s=({title:c,content:u})=>{i(c),a(u),n(!0)},l=()=>{n(!1)};return B.jsxs(Cw.Provider,{value:{hideModal:l,showModal:s,title:r,content:o,open:t},children:[B.jsx(oo,{open:t,onOpenChange:n,children:B.jsx(oo.Content,{title:r,children:o})}),e]})},dde=({theme:e={},renderers:t,client:n,children:r,configuration:i={},userData:o,closeWindow:a,...s})=>{const[l,c]=w.useState(0),[u,d]=w.useState([]),[p,f]=w.useState({disableComposer:!1,...s.defaultState,connected:!0}),[h,m]=w.useState(i),[v,g]=w.useState(e),y=Bi(k=>k.addMessageToHistory),b=Bi(k=>k.setConversationId),x=Bi(k=>k.user),_=Bi(k=>k.conversationId),S=Bi(k=>k.setUser),R=Bi(k=>k.setClientMode),M=w.useRef(null),j={...s,value:{theme:v,renderers:{...fm,...t},messages:u,messageContainerRef:M,setMessages:d,eventEmitter:hR,configuration:i,setConfiguration:m,state:p,closeWindow:a,setState:k=>f({...p,...k}),setTheme:g,client:n?{...n,sendMessage:async k=>{await n.sendMessage(k),d(N=>[...N,{direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:"bubble",block:{type:"text",text:k}}}]),n.userId&&y({message:k,userId:n.userId})},on:n.on,restartConversation:async()=>{await n.newConversation(),d([])}}:void 0}};return _o(()=>{n&&R(n.mode)}),_o(()=>{if(n)return n.on("message",k=>{try{const{payload:N,disableInput:z}=k;d(U=>[...U,{direction:"incoming",sender:{name:h.botName??"Bot",avatar:h.botAvatar},timestamp:new Date(k.sentOn),block:N,disableInput:z}])}catch{console.error("Invalid message payload")}})}),wm(async()=>{if(n)return n.on("error",()=>{console.log("client disconnected"),c(k=>k+1)})}),_o(()=>{if(n)return n.on("conversation",k=>{b(k)})}),wm(async()=>{if(!n)return;let k;try{k=await n.connect(x,o),f(z=>({...z,connected:!0}))}catch{f(U=>({...U,connected:!1}));return}S(k),_&&await n.conversationExists(_)?await n.switchConversation(_):await n.newConversation();const N=[];for(const z of await n.listMessages())try{const{payload:U,authorId:Z,sentOn:L,disableInput:F}=z,V=Z===n.userId?"outgoing":"incoming";N.push({direction:V,sender:V==="outgoing"?{name:"You"}:{name:h.botName??"Bot",avatar:h.botAvatar},timestamp:new Date(L),block:U,disableInput:F})}catch{console.error("Invalid message payload")}return d(N.reverse()),()=>{n.disconnect()}},[l]),B.jsx(kw.Provider,{...j,children:typeof r=="function"?r(h):r})};function Pn(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 fde=$["useId".toString()]||(()=>{});let pde=0;function np(e){const[t,n]=$.useState(fde());return na(()=>{e||n(r=>r??String(pde++))},[e]),e||(t?`radix-${t}`:"")}function QA({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=hde({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Nn(n),l=w.useCallback(c=>{if(o){const d=typeof c=="function"?c(e):c;d!==e&&s(d)}else i(c)},[o,e,i,s]);return[a,l]}function hde({defaultProp:e,onChange:t}){const n=w.useState(e),[r]=n,i=w.useRef(r),o=Nn(t);return w.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function mde(e,t=globalThis==null?void 0:globalThis.document){const n=Nn(e);w.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const ev="dismissableLayer.update",gde="dismissableLayer.pointerDownOutside",yde="dismissableLayer.focusOutside";let e$;const vde=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),bde=w.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...c}=e,u=w.useContext(vde),[d,p]=w.useState(null),f=(n=d==null?void 0:d.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,h]=w.useState({}),m=Jn(t,M=>p(M)),v=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf(g),b=d?v.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,_=b>=y,S=wde(M=>{const j=M.target,k=[...u.branches].some(N=>N.contains(j));!_||k||(o==null||o(M),s==null||s(M),M.defaultPrevented||l==null||l())},f),R=_de(M=>{const j=M.target;[...u.branches].some(N=>N.contains(j))||(a==null||a(M),s==null||s(M),M.defaultPrevented||l==null||l())},f);return mde(M=>{b===u.layers.size-1&&(i==null||i(M),!M.defaultPrevented&&l&&(M.preventDefault(),l()))},f),w.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(e$=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),t$(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=e$)}},[d,f,r,u]),w.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),t$())},[d,u]),w.useEffect(()=>{const M=()=>h({});return document.addEventListener(ev,M),()=>document.removeEventListener(ev,M)},[]),w.createElement(gn.div,lt({},c,{ref:m,style:{pointerEvents:x?_?"auto":"none":void 0,...e.style},onFocusCapture:Pn(e.onFocusCapture,R.onFocusCapture),onBlurCapture:Pn(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:Pn(e.onPointerDownCapture,S.onPointerDownCapture)}))});function wde(e,t=globalThis==null?void 0:globalThis.document){const n=Nn(e),r=w.useRef(!1),i=w.useRef(()=>{});return w.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let c=function(){n$(gde,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 _de(e,t=globalThis==null?void 0:globalThis.document){const n=Nn(e),r=w.useRef(!1);return w.useEffect(()=>{const i=o=>{o.target&&!r.current&&n$(yde,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 t$(){const e=new CustomEvent(ev);document.dispatchEvent(e)}function n$(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?lR(i,o):i.dispatchEvent(o)}const tv="focusScope.autoFocusOnMount",nv="focusScope.autoFocusOnUnmount",r$={bubbles:!1,cancelable:!0},xde=w.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=w.useState(null),c=Nn(i),u=Nn(o),d=w.useRef(null),p=Jn(t,m=>l(m)),f=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(r){let m=function(b){if(f.paused||!s)return;const x=b.target;s.contains(x)?d.current=x:ro(d.current,{select:!0})},v=function(b){if(f.paused||!s)return;const x=b.relatedTarget;x!==null&&(s.contains(x)||ro(d.current,{select:!0}))},g=function(b){const x=document.activeElement;for(const _ of b)_.removedNodes.length>0&&(s!=null&&s.contains(x)||ro(s))};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const y=new MutationObserver(g);return s&&y.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),y.disconnect()}}},[r,s,f.paused]),w.useEffect(()=>{if(s){a$.add(f);const m=document.activeElement;if(!s.contains(m)){const g=new CustomEvent(tv,r$);s.addEventListener(tv,c),s.dispatchEvent(g),g.defaultPrevented||(Sde(Ode(i$(s)),{select:!0}),document.activeElement===m&&ro(s))}return()=>{s.removeEventListener(tv,c),setTimeout(()=>{const g=new CustomEvent(nv,r$);s.addEventListener(nv,u),s.dispatchEvent(g),g.defaultPrevented||ro(m??document.body,{select:!0}),s.removeEventListener(nv,u),a$.remove(f)},0)}}},[s,c,u,f]);const h=w.useCallback(m=>{if(!n&&!r||f.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,g=document.activeElement;if(v&&g){const y=m.currentTarget,[b,x]=Ede(y);b&&x?!m.shiftKey&&g===x?(m.preventDefault(),n&&ro(b,{select:!0})):m.shiftKey&&g===b&&(m.preventDefault(),n&&ro(x,{select:!0})):g===y&&m.preventDefault()}},[n,r,f.paused]);return w.createElement(gn.div,lt({tabIndex:-1},a,{ref:p,onKeyDown:h}))});function Sde(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ro(r,{select:t}),document.activeElement!==n)return}function Ede(e){const t=i$(e),n=o$(t,e),r=o$(t.reverse(),e);return[n,r]}function i$(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 o$(e,t){for(const n of e)if(!Cde(n,{upTo:t}))return n}function Cde(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 Tde(e){return e instanceof HTMLInputElement&&"select"in e}function ro(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Tde(e)&&t&&e.select()}}const a$=kde();function kde(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=s$(e,t),e.unshift(t)},remove(t){var n;e=s$(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function s$(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Ode(e){return e.filter(t=>t.tagName!=="A")}function Ade(e,t){return w.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const io=e=>{const{present:t,children:n}=e,r=$de(t),i=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),o=Jn(r.ref,i.ref);return typeof n=="function"||r.isPresent?w.cloneElement(i,{ref:o}):null};io.displayName="Presence";function $de(e){const[t,n]=w.useState(),r=w.useRef({}),i=w.useRef(e),o=w.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Ade(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const c=rp(r.current);o.current=s==="mounted"?c:"none"},[s]),na(()=>{const c=r.current,u=i.current;if(u!==e){const p=o.current,f=rp(c);e?l("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&p!==f?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),na(()=>{if(t){const c=d=>{const f=rp(r.current).includes(d.animationName);d.target===t&&f&&$r.flushSync(()=>l("ANIMATION_END"))},u=d=>{d.target===t&&(o.current=rp(r.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:w.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function rp(e){return(e==null?void 0:e.animationName)||"none"}let rv=0;function Pde(){w.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:l$()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:l$()),rv++,()=>{rv===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),rv--}},[])}function l$(){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 ip="right-scroll-bar-position",op="width-before-scroll-bar",Ide="with-scroll-bars-hidden",Rde="--removed-body-scroll-bar-size";function Mde(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Nde(e,t){var n=w.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 Dde(e,t){return Nde(t||null,function(n){return e.forEach(function(r){return Mde(r,n)})})}function jde(e){return e}function Lde(e,t){t===void 0&&(t=jde);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 u=a;a=[],u.forEach(o)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){a.push(u),c()},filter:function(u){return a=a.filter(u),n}}}};return i}function Fde(e){e===void 0&&(e={});var t=Lde(null);return t.options=lr({async:!0,ssr:!1},e),t}var c$=function(e){var t=e.sideCar,n=tx(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 $.createElement(r,lr({},n))};c$.isSideCarExport=!0;function Ude(e,t){return e.useMedium(t),c$}var u$=Fde(),iv=function(){},ap=$.forwardRef(function(e,t){var n=$.useRef(null),r=$.useState({onScrollCapture:iv,onWheelCapture:iv,onTouchMoveCapture:iv}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,p=e.sideCar,f=e.noIsolation,h=e.inert,m=e.allowPinchZoom,v=e.as,g=v===void 0?"div":v,y=tx(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),b=p,x=Dde([n,t]),_=lr(lr({},y),i);return $.createElement($.Fragment,null,u&&$.createElement(b,{sideCar:u$,removeScrollBar:c,shards:d,noIsolation:f,inert:h,setCallbacks:o,allowPinchZoom:!!m,lockRef:n}),a?$.cloneElement($.Children.only(s),lr(lr({},_),{ref:x})):$.createElement(g,lr({},_,{className:l,ref:x}),s))});ap.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ap.classNames={fullWidth:op,zeroRight:ip};var d$,Bde=function(){if(d$)return d$;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function zde(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Bde();return t&&e.setAttribute("nonce",t),e}function Zde(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function qde(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Hde=function(){var e=0,t=null;return{add:function(n){e==0&&(t=zde())&&(Zde(t,n),qde(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Wde=function(){var e=Hde();return function(t,n){$.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},f$=function(){var e=Wde(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Vde={left:0,top:0,right:0,gap:0},ov=function(e){return parseInt(e||"",10)||0},Kde=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[ov(n),ov(r),ov(i)]},Gde=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Vde;var t=Kde(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])}},Yde=f$(),Jde=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
380
+ `,Mn+=Yn):Kt==="id"?Ht=Yn:Kt==="event"?tn=Yn:Kt==="retry"?(De=nt(Yn,De),Xe=De):Kt==="heartbeatTimeout"&&(Ke=nt(Yn,Ke),Ot!==0&&(i(Ot),Ot=r(function(){Pe()},Ke)))}if(un===se){if(Mn!==""){gt=Ht,tn===""&&(tn="message");var Or=new B(tn,{data:Mn.slice(1),lastEventId:Ht});if(D.dispatchEvent(Or),tn==="open"?_e(D,D.onopen,Or):tn==="message"?_e(D,D.onmessage,Or):tn==="error"&&_e(D,D.onerror,Or),qt===pe)return}Mn="",tn=""}un=at==="\r".charCodeAt(0)?C:se}else un===se&&(Oi=Ft,un=we),un===we?at===":".charCodeAt(0)&&(hr=Ft+1,un=O):un===O&&(un=Oe)}}},A=function(Fe){if(qt===W||qt===V){qt=F,Ot!==0&&(i(Ot),Ot=0),Ot=r(function(){Pe()},Xe),Xe=We(Math.min(De*16,Xe*2)),D.readyState=V;var Ce=new L("error",{error:Fe});D.dispatchEvent(Ce),_e(D,D.onerror,Ce),Fe!=null&&console.error(Fe)}},Ee=function(){qt=pe,Pt!=null&&(Pt.abort(),Pt=void 0),Ot!==0&&(i(Ot),Ot=0),D.readyState=pe},Pe=function(){if(Ot=0,qt!==F){if(!q&&Pt!=null)A(new Error("No activity within "+Ke+" milliseconds. "+(qt===V?"No response received.":X+" chars received.")+" Reconnecting.")),Pt!=null&&(Pt.abort(),Pt=void 0);else{var Fe=Math.max((q||Date.now())+Ke-Date.now(),1);q=!1,Ot=r(function(){Pe()},Fe)}return}q=!1,X=0,Ot=r(function(){Pe()},Ke),qt=V,Mn="",tn="",Ht=gt,mn="",Oi=0,hr=0,un=se;var Ce=ue;if(ue.slice(0,5)!=="data:"&&ue.slice(0,5)!=="blob:"&&gt!==""){var Ie=ue.indexOf("?");Ce=Ie===-1?ue:ue.slice(0,Ie+1)+ue.slice(Ie+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Yn,Or){return Or===Le?"":Yn}),Ce+=(ue.indexOf("?")===-1?"?":"&")+Le+"="+encodeURIComponent(gt)}var at=D.withCredentials,pt={};pt.Accept="text/event-stream";var Ft=D.headers;if(Ft!=null)for(var Kt in Ft)Object.prototype.hasOwnProperty.call(Ft,Kt)&&(pt[Kt]=Ft[Kt]);try{Pt=Zt.open(rt,ei,ta,A,Ce,at,pt)}catch(Yn){throw Ee(),Yn}};D.url=ue,D.readyState=V,D.withCredentials=fe,D.headers=de,D._close=Ee,Pe()}ye.prototype=Object.create(k.prototype),ye.prototype.CONNECTING=V,ye.prototype.OPEN=W,ye.prototype.CLOSED=pe,ye.prototype.close=function(){this._close()},ye.CONNECTING=V,ye.OPEN=W,ye.CLOSED=pe,ye.prototype.withCredentials=void 0;var ot=l;o!=null&&(l==null||!("withCredentials"in l.prototype))&&(ot=ye),function(D){{var ue=D(t);ue!==void 0&&(e.exports=ue)}}(function(D){D.EventSourcePolyfill=ye,D.NativeEventSource=l,D.EventSource=ot})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:K:globalThis)})(Vy,Vy.exports);var rue=Vy.exports;const iue=ti(rue),oue=(e,t={})=>{const n=new iue.EventSourcePolyfill(e,{headers:t.headers}),r=new MA;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}},aue=async(e,t={})=>{const{emitter:n,source:r}=oue(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 Ct;(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})(Ct||(Ct={}));var Ky;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Ky||(Ky={}));const Re=Ct.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Qi=e=>{switch(typeof e){case"undefined":return Re.undefined;case"string":return Re.string;case"number":return isNaN(e)?Re.nan:Re.number;case"boolean":return Re.boolean;case"function":return Re.function;case"bigint":return Re.bigint;case"symbol":return Re.symbol;case"object":return Array.isArray(e)?Re.array:e===null?Re.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Re.promise:typeof Map<"u"&&e instanceof Map?Re.map:typeof Set<"u"&&e instanceof Set?Re.set:typeof Date<"u"&&e instanceof Date?Re.date:Re.object;default:return Re.unknown}},be=Ct.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"]),sue=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Sr 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,Ct.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()}}Sr.create=e=>new Sr(e);const Xl=(e,t)=>{let n;switch(e.code){case be.invalid_type:e.received===Re.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case be.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Ct.jsonStringifyReplacer)}`;break;case be.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ct.joinValues(e.keys,", ")}`;break;case be.invalid_union:n="Invalid input";break;case be.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ct.joinValues(e.options)}`;break;case be.invalid_enum_value:n=`Invalid enum value. Expected ${Ct.joinValues(e.options)}, received '${e.received}'`;break;case be.invalid_arguments:n="Invalid function arguments";break;case be.invalid_return_type:n="Invalid function return type";break;case be.invalid_date:n="Invalid date";break;case be.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}"`:Ct.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case be.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 be.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 be.custom:n="Invalid input";break;case be.invalid_intersection_types:n="Intersection results could not be merged";break;case be.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case be.not_finite:n="Number must be finite";break;default:n=t.defaultError,Ct.assertNever(e)}return{message:n}};let NA=Xl;function lue(e){NA=e}function qf(){return NA}const Hf=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}},cue=[];function Ne(e,t){const n=Hf({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,qf(),Xl].filter(r=>!!r)});e.common.issues.push(n)}class $n{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 st;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 $n.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 st;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 st=Object.freeze({status:"aborted"}),DA=e=>({status:"dirty",value:e}),Fn=e=>({status:"valid",value:e}),Gy=e=>e.status==="aborted",Yy=e=>e.status==="dirty",Ql=e=>e.status==="valid",Wf=e=>typeof Promise<"u"&&e instanceof Promise;var He;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(He||(He={}));class Gr{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 jA=(e,t)=>{if(Ql(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 Sr(e.common.issues);return this._error=n,this._error}}};function ct(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 dt{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 Qi(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Qi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new $n,ctx:{common:t.parent.common,data:t.data,parsedType:Qi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Wf(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:Qi(t)},o=this._parseSync({data:t,path:i.path,parent:i});return jA(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:Qi(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(Wf(i)?i:Promise.resolve(i));return jA(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:be.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 Tr({schema:this,typeName:Je.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Si.create(this,this._def)}nullable(){return Go.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Cr.create(this,this._def)}promise(){return ms.create(this,this._def)}or(t){return rc.create([this,t],this._def)}and(t){return ic.create(this,t,this._def)}transform(t){return new Tr({...ct(this._def),schema:this,typeName:Je.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new cc({...ct(this._def),innerType:this,defaultValue:n,typeName:Je.ZodDefault})}brand(){return new FA({typeName:Je.ZodBranded,type:this,...ct(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Xf({...ct(this._def),innerType:this,catchValue:n,typeName:Je.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return uc.create(this,t)}readonly(){return ep.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const uue=/^c[^\s-]{8,}$/i,due=/^[a-z][a-z0-9]*$/,fue=/^[0-9A-HJKMNP-TV-Z]{26}$/,pue=/^[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,hue=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,mue="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Jy;const gue=/^(((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}))$/,yue=/^(([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})))$/,vue=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 bue(e,t){return!!((t==="v4"||!t)&&gue.test(e)||(t==="v6"||!t)&&yue.test(e))}class Er extends dt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Re.string){const o=this._getOrReturnCtx(t);return Ne(o,{code:be.invalid_type,expected:Re.string,received:o.parsedType}),st}const r=new $n;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(i=this._getOrReturnCtx(t,i),Ne(i,{code:be.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),Ne(i,{code:be.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?Ne(i,{code:be.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&Ne(i,{code:be.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")hue.test(t.data)||(i=this._getOrReturnCtx(t,i),Ne(i,{validation:"email",code:be.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")Jy||(Jy=new RegExp(mue,"u")),Jy.test(t.data)||(i=this._getOrReturnCtx(t,i),Ne(i,{validation:"emoji",code:be.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")pue.test(t.data)||(i=this._getOrReturnCtx(t,i),Ne(i,{validation:"uuid",code:be.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")uue.test(t.data)||(i=this._getOrReturnCtx(t,i),Ne(i,{validation:"cuid",code:be.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")due.test(t.data)||(i=this._getOrReturnCtx(t,i),Ne(i,{validation:"cuid2",code:be.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")fue.test(t.data)||(i=this._getOrReturnCtx(t,i),Ne(i,{validation:"ulid",code:be.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),Ne(i,{validation:"url",code:be.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),Ne(i,{validation:"regex",code:be.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),Ne(i,{code:be.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),Ne(i,{code:be.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(i=this._getOrReturnCtx(t,i),Ne(i,{code:be.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?vue(o).test(t.data)||(i=this._getOrReturnCtx(t,i),Ne(i,{code:be.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="ip"?bue(t.data,o.version)||(i=this._getOrReturnCtx(t,i),Ne(i,{validation:"ip",code:be.invalid_string,message:o.message}),r.dirty()):Ct.assertNever(o);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:be.invalid_string,...He.errToObj(r)})}_addCheck(t){return new Er({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...He.errToObj(t)})}url(t){return this._addCheck({kind:"url",...He.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...He.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...He.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...He.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...He.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...He.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...He.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,...He.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...He.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...He.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...He.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...He.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...He.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...He.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...He.errToObj(n)})}nonempty(t){return this.min(1,He.errToObj(t))}trim(){return new Er({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Er({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Er({...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}}Er.create=e=>{var t;return new Er({checks:[],typeName:Je.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ct(e)})};function wue(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 eo extends dt{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)!==Re.number){const o=this._getOrReturnCtx(t);return Ne(o,{code:be.invalid_type,expected:Re.number,received:o.parsedType}),st}let r;const i=new $n;for(const o of this._def.checks)o.kind==="int"?Ct.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),Ne(r,{code:be.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),Ne(r,{code:be.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),Ne(r,{code:be.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?wue(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),Ne(r,{code:be.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),Ne(r,{code:be.not_finite,message:o.message}),i.dirty()):Ct.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,He.toString(n))}gt(t,n){return this.setLimit("min",t,!1,He.toString(n))}lte(t,n){return this.setLimit("max",t,!0,He.toString(n))}lt(t,n){return this.setLimit("max",t,!1,He.toString(n))}setLimit(t,n,r,i){return new eo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:He.toString(i)}]})}_addCheck(t){return new eo({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:He.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:He.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:He.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:He.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:He.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:He.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:He.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:He.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:He.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"&&Ct.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)}}eo.create=e=>new eo({checks:[],typeName:Je.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ct(e)});class to extends dt{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)!==Re.bigint){const o=this._getOrReturnCtx(t);return Ne(o,{code:be.invalid_type,expected:Re.bigint,received:o.parsedType}),st}let r;const i=new $n;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),Ne(r,{code:be.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),Ne(r,{code:be.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),Ne(r,{code:be.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):Ct.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,He.toString(n))}gt(t,n){return this.setLimit("min",t,!1,He.toString(n))}lte(t,n){return this.setLimit("max",t,!0,He.toString(n))}lt(t,n){return this.setLimit("max",t,!1,He.toString(n))}setLimit(t,n,r,i){return new to({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:He.toString(i)}]})}_addCheck(t){return new to({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:He.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:He.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:He.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:He.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:He.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}}to.create=e=>{var t;return new to({checks:[],typeName:Je.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ct(e)})};class ec extends dt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Re.boolean){const r=this._getOrReturnCtx(t);return Ne(r,{code:be.invalid_type,expected:Re.boolean,received:r.parsedType}),st}return Fn(t.data)}}ec.create=e=>new ec({typeName:Je.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ct(e)});class Wo extends dt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Re.date){const o=this._getOrReturnCtx(t);return Ne(o,{code:be.invalid_type,expected:Re.date,received:o.parsedType}),st}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return Ne(o,{code:be.invalid_date}),st}const r=new $n;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(i=this._getOrReturnCtx(t,i),Ne(i,{code:be.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),Ne(i,{code:be.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):Ct.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Wo({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:He.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:He.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}}Wo.create=e=>new Wo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Je.ZodDate,...ct(e)});class Vf extends dt{_parse(t){if(this._getType(t)!==Re.symbol){const r=this._getOrReturnCtx(t);return Ne(r,{code:be.invalid_type,expected:Re.symbol,received:r.parsedType}),st}return Fn(t.data)}}Vf.create=e=>new Vf({typeName:Je.ZodSymbol,...ct(e)});class tc extends dt{_parse(t){if(this._getType(t)!==Re.undefined){const r=this._getOrReturnCtx(t);return Ne(r,{code:be.invalid_type,expected:Re.undefined,received:r.parsedType}),st}return Fn(t.data)}}tc.create=e=>new tc({typeName:Je.ZodUndefined,...ct(e)});class nc extends dt{_parse(t){if(this._getType(t)!==Re.null){const r=this._getOrReturnCtx(t);return Ne(r,{code:be.invalid_type,expected:Re.null,received:r.parsedType}),st}return Fn(t.data)}}nc.create=e=>new nc({typeName:Je.ZodNull,...ct(e)});class fs extends dt{constructor(){super(...arguments),this._any=!0}_parse(t){return Fn(t.data)}}fs.create=e=>new fs({typeName:Je.ZodAny,...ct(e)});class Vo extends dt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Fn(t.data)}}Vo.create=e=>new Vo({typeName:Je.ZodUnknown,...ct(e)});class xi extends dt{_parse(t){const n=this._getOrReturnCtx(t);return Ne(n,{code:be.invalid_type,expected:Re.never,received:n.parsedType}),st}}xi.create=e=>new xi({typeName:Je.ZodNever,...ct(e)});class Kf extends dt{_parse(t){if(this._getType(t)!==Re.undefined){const r=this._getOrReturnCtx(t);return Ne(r,{code:be.invalid_type,expected:Re.void,received:r.parsedType}),st}return Fn(t.data)}}Kf.create=e=>new Kf({typeName:Je.ZodVoid,...ct(e)});class Cr extends dt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==Re.array)return Ne(n,{code:be.invalid_type,expected:Re.array,received:n.parsedType}),st;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(a||s)&&(Ne(n,{code:a?be.too_big:be.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&&(Ne(n,{code:be.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&&(Ne(n,{code:be.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 Gr(n,a,n.path,s)))).then(a=>$n.mergeArray(r,a));const o=[...n.data].map((a,s)=>i.type._parseSync(new Gr(n,a,n.path,s)));return $n.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Cr({...this._def,minLength:{value:t,message:He.toString(n)}})}max(t,n){return new Cr({...this._def,maxLength:{value:t,message:He.toString(n)}})}length(t,n){return new Cr({...this._def,exactLength:{value:t,message:He.toString(n)}})}nonempty(t){return this.min(1,t)}}Cr.create=(e,t)=>new Cr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Je.ZodArray,...ct(t)});function ps(e){if(e instanceof Bt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Si.create(ps(r))}return new Bt({...e._def,shape:()=>t})}else return e instanceof Cr?new Cr({...e._def,type:ps(e.element)}):e instanceof Si?Si.create(ps(e.unwrap())):e instanceof Go?Go.create(ps(e.unwrap())):e instanceof Yr?Yr.create(e.items.map(t=>ps(t))):e}class Bt extends dt{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=Ct.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==Re.object){const c=this._getOrReturnCtx(t);return Ne(c,{code:be.invalid_type,expected:Re.object,received:c.parsedType}),st}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof xi&&this._def.unknownKeys==="strip"))for(const c in i.data)a.includes(c)||s.push(c);const l=[];for(const c of a){const u=o[c],d=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Gr(i,d,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof xi){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(c==="strict")s.length>0&&(Ne(i,{code:be.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 u of s){const d=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Gr(i,d,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key;c.push({key:d,value:await u.value,alwaysSet:u.alwaysSet})}return c}).then(c=>$n.mergeObjectSync(r,c)):$n.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return He.errToObj,new Bt({...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=He.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new Bt({...this._def,unknownKeys:"strip"})}passthrough(){return new Bt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Bt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Bt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Je.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Bt({...this._def,catchall:t})}pick(t){const n={};return Ct.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Bt({...this._def,shape:()=>n})}omit(t){const n={};return Ct.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Bt({...this._def,shape:()=>n})}deepPartial(){return ps(this)}partial(t){const n={};return Ct.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new Bt({...this._def,shape:()=>n})}required(t){const n={};return Ct.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Si;)o=o._def.innerType;n[r]=o}}),new Bt({...this._def,shape:()=>n})}keyof(){return LA(Ct.objectKeys(this.shape))}}Bt.create=(e,t)=>new Bt({shape:()=>e,unknownKeys:"strip",catchall:xi.create(),typeName:Je.ZodObject,...ct(t)}),Bt.strictCreate=(e,t)=>new Bt({shape:()=>e,unknownKeys:"strict",catchall:xi.create(),typeName:Je.ZodObject,...ct(t)}),Bt.lazycreate=(e,t)=>new Bt({shape:e,unknownKeys:"strip",catchall:xi.create(),typeName:Je.ZodObject,...ct(t)});class rc extends dt{_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 Sr(s.ctx.common.issues));return Ne(n,{code:be.invalid_union,unionErrors:a}),st}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},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!o&&(o={result:u,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 Sr(l));return Ne(n,{code:be.invalid_union,unionErrors:s}),st}}get options(){return this._def.options}}rc.create=(e,t)=>new rc({options:e,typeName:Je.ZodUnion,...ct(t)});const Gf=e=>e instanceof ac?Gf(e.schema):e instanceof Tr?Gf(e.innerType()):e instanceof sc?[e.value]:e instanceof no?e.options:e instanceof lc?Object.keys(e.enum):e instanceof cc?Gf(e._def.innerType):e instanceof tc?[void 0]:e instanceof nc?[null]:null;class Yf extends dt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Re.object)return Ne(n,{code:be.invalid_type,expected:Re.object,received:n.parsedType}),st;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}):(Ne(n,{code:be.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),st)}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=Gf(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 Yf({typeName:Je.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...ct(r)})}}function Xy(e,t){const n=Qi(e),r=Qi(t);if(e===t)return{valid:!0,data:e};if(n===Re.object&&r===Re.object){const i=Ct.objectKeys(t),o=Ct.objectKeys(e).filter(s=>i.indexOf(s)!==-1),a={...e,...t};for(const s of o){const l=Xy(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===Re.array&&r===Re.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=Xy(a,s);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===Re.date&&r===Re.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class ic extends dt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(o,a)=>{if(Gy(o)||Gy(a))return st;const s=Xy(o.value,a.value);return s.valid?((Yy(o)||Yy(a))&&n.dirty(),{status:n.value,value:s.data}):(Ne(r,{code:be.invalid_intersection_types}),st)};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}))}}ic.create=(e,t,n)=>new ic({left:e,right:t,typeName:Je.ZodIntersection,...ct(n)});class Yr extends dt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Re.array)return Ne(r,{code:be.invalid_type,expected:Re.array,received:r.parsedType}),st;if(r.data.length<this._def.items.length)return Ne(r,{code:be.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),st;!this._def.rest&&r.data.length>this._def.items.length&&(Ne(r,{code:be.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 Gr(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>$n.mergeArray(n,a)):$n.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Yr({...this._def,rest:t})}}Yr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Yr({items:e,typeName:Je.ZodTuple,rest:null,...ct(t)})};class oc extends dt{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!==Re.object)return Ne(r,{code:be.invalid_type,expected:Re.object,received:r.parsedType}),st;const i=[],o=this._def.keyType,a=this._def.valueType;for(const s in r.data)i.push({key:o._parse(new Gr(r,s,r.path,s)),value:a._parse(new Gr(r,r.data[s],r.path,s))});return r.common.async?$n.mergeObjectAsync(n,i):$n.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof dt?new oc({keyType:t,valueType:n,typeName:Je.ZodRecord,...ct(r)}):new oc({keyType:Er.create(),valueType:t,typeName:Je.ZodRecord,...ct(n)})}}class Jf extends dt{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!==Re.map)return Ne(r,{code:be.invalid_type,expected:Re.map,received:r.parsedType}),st;const i=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:i._parse(new Gr(r,s,r.path,[c,"key"])),value:o._parse(new Gr(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,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return st;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of a){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return st;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}Jf.create=(e,t,n)=>new Jf({valueType:t,keyType:e,typeName:Je.ZodMap,...ct(n)});class Ko extends dt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Re.set)return Ne(r,{code:be.invalid_type,expected:Re.set,received:r.parsedType}),st;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(Ne(r,{code:be.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&&(Ne(r,{code:be.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 u of l){if(u.status==="aborted")return st;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const s=[...r.data.values()].map((l,c)=>o._parse(new Gr(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new Ko({...this._def,minSize:{value:t,message:He.toString(n)}})}max(t,n){return new Ko({...this._def,maxSize:{value:t,message:He.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Ko.create=(e,t)=>new Ko({valueType:e,minSize:null,maxSize:null,typeName:Je.ZodSet,...ct(t)});class hs extends dt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Re.function)return Ne(n,{code:be.invalid_type,expected:Re.function,received:n.parsedType}),st;function r(s,l){return Hf({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,qf(),Xl].filter(c=>!!c),issueData:{code:be.invalid_arguments,argumentsError:l}})}function i(s,l){return Hf({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,qf(),Xl].filter(c=>!!c),issueData:{code:be.invalid_return_type,returnTypeError:l}})}const o={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof ms){const s=this;return Fn(async function(...l){const c=new Sr([]),u=await s._def.args.parseAsync(l,o).catch(f=>{throw c.addIssue(r(l,f)),c}),d=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(d,o).catch(f=>{throw c.addIssue(i(d,f)),c})})}else{const s=this;return Fn(function(...l){const c=s._def.args.safeParse(l,o);if(!c.success)throw new Sr([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=s._def.returns.safeParse(u,o);if(!d.success)throw new Sr([i(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new hs({...this._def,args:Yr.create(t).rest(Vo.create())})}returns(t){return new hs({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new hs({args:t||Yr.create([]).rest(Vo.create()),returns:n||Vo.create(),typeName:Je.ZodFunction,...ct(r)})}}class ac extends dt{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})}}ac.create=(e,t)=>new ac({getter:e,typeName:Je.ZodLazy,...ct(t)});class sc extends dt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Ne(n,{received:n.data,code:be.invalid_literal,expected:this._def.value}),st}return{status:"valid",value:t.data}}get value(){return this._def.value}}sc.create=(e,t)=>new sc({value:e,typeName:Je.ZodLiteral,...ct(t)});function LA(e,t){return new no({values:e,typeName:Je.ZodEnum,...ct(t)})}class no extends dt{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Ne(n,{expected:Ct.joinValues(r),received:n.parsedType,code:be.invalid_type}),st}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return Ne(n,{received:n.data,code:be.invalid_enum_value,options:r}),st}return Fn(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 no.create(t)}exclude(t){return no.create(this.options.filter(n=>!t.includes(n)))}}no.create=LA;class lc extends dt{_parse(t){const n=Ct.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Re.string&&r.parsedType!==Re.number){const i=Ct.objectValues(n);return Ne(r,{expected:Ct.joinValues(i),received:r.parsedType,code:be.invalid_type}),st}if(n.indexOf(t.data)===-1){const i=Ct.objectValues(n);return Ne(r,{received:r.data,code:be.invalid_enum_value,options:i}),st}return Fn(t.data)}get enum(){return this._def.values}}lc.create=(e,t)=>new lc({values:e,typeName:Je.ZodNativeEnum,...ct(t)});class ms extends dt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Re.promise&&n.common.async===!1)return Ne(n,{code:be.invalid_type,expected:Re.promise,received:n.parsedType}),st;const r=n.parsedType===Re.promise?n.data:Promise.resolve(n.data);return Fn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}ms.create=(e,t)=>new ms({type:e,typeName:Je.ZodPromise,...ct(t)});class Tr extends dt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Je.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=>{Ne(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"?st:(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"?st:(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(!Ql(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=>Ql(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:n.value,value:s})):a);Ct.assertNever(i)}}Tr.create=(e,t,n)=>new Tr({schema:e,typeName:Je.ZodEffects,effect:t,...ct(n)}),Tr.createWithPreprocess=(e,t,n)=>new Tr({schema:t,effect:{type:"preprocess",transform:e},typeName:Je.ZodEffects,...ct(n)});class Si extends dt{_parse(t){return this._getType(t)===Re.undefined?Fn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Si.create=(e,t)=>new Si({innerType:e,typeName:Je.ZodOptional,...ct(t)});class Go extends dt{_parse(t){return this._getType(t)===Re.null?Fn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Go.create=(e,t)=>new Go({innerType:e,typeName:Je.ZodNullable,...ct(t)});class cc extends dt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Re.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}cc.create=(e,t)=>new cc({innerType:e,typeName:Je.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ct(t)});class Xf extends dt{_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 Wf(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Sr(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Sr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Xf.create=(e,t)=>new Xf({innerType:e,typeName:Je.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ct(t)});class Qf extends dt{_parse(t){if(this._getType(t)!==Re.nan){const r=this._getOrReturnCtx(t);return Ne(r,{code:be.invalid_type,expected:Re.nan,received:r.parsedType}),st}return{status:"valid",value:t.data}}}Qf.create=e=>new Qf({typeName:Je.ZodNaN,...ct(e)});const _ue=Symbol("zod_brand");class FA extends dt{_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 uc extends dt{_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"?st:o.status==="dirty"?(n.dirty(),DA(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"?st: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 uc({in:t,out:n,typeName:Je.ZodPipeline})}}class ep extends dt{_parse(t){const n=this._def.innerType._parse(t);return Ql(n)&&(n.value=Object.freeze(n.value)),n}}ep.create=(e,t)=>new ep({innerType:e,typeName:Je.ZodReadonly,...ct(t)});const UA=(e,t={},n)=>e?fs.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})}}):fs.create(),xue={object:Bt.lazycreate};var Je;(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"})(Je||(Je={}));const Sue=(e,t={message:`Input not instance of ${e.name}`})=>UA(n=>n instanceof e,t),BA=Er.create,zA=eo.create,Eue=Qf.create,Cue=to.create,ZA=ec.create,Tue=Wo.create,kue=Vf.create,Oue=tc.create,Aue=nc.create,$ue=fs.create,Pue=Vo.create,Iue=xi.create,Rue=Kf.create,Mue=Cr.create,Nue=Bt.create,Due=Bt.strictCreate,jue=rc.create,Lue=Yf.create,Fue=ic.create,Uue=Yr.create,Bue=oc.create,zue=Jf.create,Zue=Ko.create,que=hs.create,Hue=ac.create,Wue=sc.create,Vue=no.create,Kue=lc.create,Gue=ms.create,qA=Tr.create,Yue=Si.create,Jue=Go.create,Xue=Tr.createWithPreprocess,Que=uc.create;var H=Object.freeze({__proto__:null,defaultErrorMap:Xl,setErrorMap:lue,getErrorMap:qf,makeIssue:Hf,EMPTY_PATH:cue,addIssueToContext:Ne,ParseStatus:$n,INVALID:st,DIRTY:DA,OK:Fn,isAborted:Gy,isDirty:Yy,isValid:Ql,isAsync:Wf,get util(){return Ct},get objectUtil(){return Ky},ZodParsedType:Re,getParsedType:Qi,ZodType:dt,ZodString:Er,ZodNumber:eo,ZodBigInt:to,ZodBoolean:ec,ZodDate:Wo,ZodSymbol:Vf,ZodUndefined:tc,ZodNull:nc,ZodAny:fs,ZodUnknown:Vo,ZodNever:xi,ZodVoid:Kf,ZodArray:Cr,ZodObject:Bt,ZodUnion:rc,ZodDiscriminatedUnion:Yf,ZodIntersection:ic,ZodTuple:Yr,ZodRecord:oc,ZodMap:Jf,ZodSet:Ko,ZodFunction:hs,ZodLazy:ac,ZodLiteral:sc,ZodEnum:no,ZodNativeEnum:lc,ZodPromise:ms,ZodEffects:Tr,ZodTransformer:Tr,ZodOptional:Si,ZodNullable:Go,ZodDefault:cc,ZodCatch:Xf,ZodNaN:Qf,BRAND:_ue,ZodBranded:FA,ZodPipeline:uc,ZodReadonly:ep,custom:UA,Schema:dt,ZodSchema:dt,late:xue,get ZodFirstPartyTypeKind(){return Je},coerce:{string:e=>Er.create({...e,coerce:!0}),number:e=>eo.create({...e,coerce:!0}),boolean:e=>ec.create({...e,coerce:!0}),bigint:e=>to.create({...e,coerce:!0}),date:e=>Wo.create({...e,coerce:!0})},any:$ue,array:Mue,bigint:Cue,boolean:ZA,date:Tue,discriminatedUnion:Lue,effect:qA,enum:Vue,function:que,instanceof:Sue,intersection:Fue,lazy:Hue,literal:Wue,map:zue,nan:Eue,nativeEnum:Kue,never:Iue,null:Aue,nullable:Jue,number:zA,object:Nue,oboolean:()=>ZA().optional(),onumber:()=>zA().optional(),optional:Yue,ostring:()=>BA().optional(),pipeline:Que,preprocess:Xue,promise:Gue,record:Bue,set:Zue,strictObject:Due,string:BA,symbol:kue,transformer:qA,tuple:Uue,undefined:Oue,union:jue,unknown:Pue,void:Rue,NEVER:st,ZodIssueCode:be,quotelessJson:sue,ZodError:Sr});const ede=H.object({type:H.literal("message_created"),data:H.object({id:H.string(),createdAt:H.string().datetime(),payload:H.union([H.object({audioUrl:H.string().min(1),className:H.string().describe("CSS className to apply to the message").optional(),type:H.literal("audio")}),H.object({title:H.string().min(1),subtitle:H.string().optional(),imageUrl:H.string().optional(),actions:H.array(H.object({action:H.enum(["postback","url","say"]),label:H.string().min(1),value:H.string().min(1)})),type:H.literal("card"),className:H.string().describe("CSS className to apply to the message").optional()}),H.object({items:H.array(H.object({title:H.string().min(1),subtitle:H.string().optional(),imageUrl:H.string().optional(),actions:H.array(H.object({action:H.enum(["postback","url","say"]),label:H.string().min(1),value:H.string().min(1)})),className:H.string().describe("CSS className to apply to the message").optional()})),className:H.string().describe("CSS className to apply to the message").optional(),type:H.literal("carousel")}),H.object({text:H.string(),options:H.array(H.object({label:H.string().min(1),value:H.string().min(1)})),className:H.string().describe("CSS className to apply to the message").optional(),type:H.literal("choice"),disableFreeText:H.boolean().optional()}),H.object({text:H.string(),options:H.array(H.object({label:H.string().min(1),value:H.string().min(1)})),className:H.string().describe("CSS className to apply to the message").optional(),type:H.literal("dropdown")}),H.object({fileUrl:H.string().min(1),title:H.string().min(1).optional(),className:H.string().describe("CSS className to apply to the message").optional(),type:H.literal("file")}),H.object({imageUrl:H.string().min(1),className:H.string().describe("CSS className to apply to the message").optional(),type:H.literal("image")}),H.object({latitude:H.number(),longitude:H.number(),address:H.string().optional(),title:H.string().optional(),className:H.string().describe("CSS className to apply to the message").optional(),type:H.literal("location")}),H.object({markdown:H.string().min(1),className:H.string().describe("CSS className to apply to the message").optional(),type:H.literal("markdown")}),H.object({text:H.string().min(1),className:H.string().describe("CSS className to apply to the message").optional(),type:H.literal("text")}),H.object({videoUrl:H.string().min(1),className:H.string().describe("CSS className to apply to the message").optional(),type:H.literal("video")})]),userId:H.string(),conversationId:H.string()})}),tde=H.object({type:H.literal("webchat_visibility"),data:H.object({visibility:H.enum(["show","hide","toggle"])})}),nde=H.object({type:H.literal("webchat_config"),data:H.object({config:H.record(H.any())})}),rde=H.object({type:H.literal("custom"),data:H.object({event:H.record(H.any())})}),ide={messageCreated:ede,webchatVisibility:tde,webchatConfig:nde,custom:rde},HA="unknown error",Dp=class Dp extends MA{constructor(n){super();T(this,"_state",{status:"disconnected"});T(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});T(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)});T(this,"_connect",async()=>{const n=await aue(`${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});T(this,"_disconnectSync",n=>{n.close(),this._state={status:"disconnected"}});T(this,"_handleMessage",n=>{const r=this._parseSignal(n.data);this.emit(r.type,r.data)});T(this,"_handleError",n=>r=>{this._disconnectSync(n);const i=this._toError(r);this.emit("error",i)});T(this,"_parseSignal",n=>{for(const r of Object.values(ide)){const i=this._safeJsonParse(n),o=r.safeParse(i);if(o.success)return o.data}return{type:"unknown",data:n}});T(this,"_safeJsonParse",n=>{try{return JSON.parse(n)}catch{return n}});T(this,"_toError",n=>{if(n instanceof Error)return n;if(typeof n=="string")return new Error(n);if(n===null)return new Error(HA);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(HA)}});this._props=n}get status(){return this._state.status}};T(Dp,"listen",async n=>{const r=new Dp(n);return await r.connect(),r});let Qy=Dp;const WA=100*1024*1024,ode=WA,ade=WA,sde=6e4;class lde{constructor(t){T(this,"_auto");T(this,"createConversation",t=>this._auto.createConversation(t));T(this,"getConversation",t=>this._auto.getConversation(t));T(this,"deleteConversation",t=>this._auto.deleteConversation(t));T(this,"listConversations",t=>this._auto.listConversations(t));T(this,"listConversationMessages",t=>this._auto.listConversationMessages(t));T(this,"addParticipant",t=>this._auto.addParticipant(t));T(this,"removeParticipant",t=>this._auto.removeParticipant(t));T(this,"getParticipant",t=>this._auto.getParticipant(t));T(this,"listParticipants",t=>this._auto.listParticipants(t));T(this,"createMessage",t=>this._auto.createMessage(t));T(this,"getMessage",t=>this._auto.getMessage(t));T(this,"deleteMessage",t=>this._auto.deleteMessage(t));T(this,"createUser",t=>this._auto.createUser(t));T(this,"getUser",t=>this._auto.getUser(t));T(this,"updateUser",t=>this._auto.updateUser(t));T(this,"deleteUser",t=>this._auto.deleteUser(t));T(this,"createEvent",t=>this._auto.createEvent(t));T(this,"getEvent",t=>this._auto.getEvent(t));T(this,"listenConversation",async({id:t,"x-user-key":n})=>await Qy.listen({url:this.props.apiUrl,conversationId:t,userKey:n}));this.props=t;const{apiUrl:n}=t,r={...t.headers},i=t.timeout??sde,o=XO.create({baseURL:n,headers:r,withCredentials:!0,timeout:i,maxBodyLength:ode,maxContentLength:ade});this._auto=new tue(o)}}const tp={disconnected:0,user_creating:1,user_created:2,conversation_creating:3,conversation_created:4},fr=(e,t)=>e.status===t,Yo=(e,t)=>tp[e.status]<tp[t],VA=(e,t)=>tp[e.status]>=tp[t];class gs extends Error{constructor(t){super(`Unexpected state: ${t.status}`),this.state=t}}class KA extends zp{constructor(n){super();T(this,"_client");T(this,"_webhookId");T(this,"_state",{status:"disconnected"});T(this,"mode","pushpin");T(this,"_initialConnect",async n=>{if(VA(this._state,"user_created"))throw new Error("Client is already connected. Please disconnect first.");if(fr(this._state,"user_creating"))return;this._state={status:"user_creating"},console.log("createUser");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}});T(this,"_reConnect",async(n,r)=>{if(VA(this._state,"user_created")){if(this._state.userId!==n.userId)throw new Error("Client is already connected. Please disconnect first.");return n}return fr(this._state,"user_creating")||(this._state={status:"user_created",userId:n.userId,userKey:n.userToken},console.log("updateUser"),await this._client.updateUser({"x-user-key":n.userToken,name:void 0,pictureUrl:void 0,userData:r})),n});T(this,"_mapMessage",n=>{const{payload:r,disableInput:i}=sae(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._client=new lde({apiUrl:r})}get clientId(){return this._webhookId}get userId(){if(!Yo(this._state,"user_created"))return this._state.userId}get conversationId(){if(!Yo(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(){fr(this._state,"conversation_created")?this._state.signalEmitter.cleanup():fr(this._state,"conversation_creating")&&console.warn("zombie conversation..."),this._state={status:"disconnected"}}async sendMessage(n){if(Yo(this._state,"user_created"))throw new gs(this._state);if(fr(this._state,"conversation_creating"))throw new gs(this._state);let r;fr(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)),console.log("createMessage"),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(Yo(this._state,"user_created"))throw new gs(this._state);if(fr(this._state,"conversation_creating"))throw new gs(this._state);let r;fr(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)),console.log("createEvent"),await this._client.createEvent({"x-user-key":r.userKey,conversationId:r.conversationId,payload:{type:"custom",data:n}})}async switchConversation(n){if(Yo(this._state,"user_created"))throw new gs(this._state);fr(this._state,"conversation_created")&&this._state.conversationId===n||fr(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(Yo(this._state,"user_created"))return!1;try{return await this._client.getConversation({"x-user-key":this._state.userKey,id:n}),!0}catch(r){if(Wy(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(Wy(r)&&i(r))return!1;throw r}}async newConversation(){if(Yo(this._state,"user_created"))throw new gs(this._state);fr(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){console.log("createConversation");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(!fr(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=>console.log("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 cde=({clientId:e,apiUrl:t="https://webchat.botpress.cloud",mode:n="pushpin"})=>{const[r,i]=w.useState();return w.useEffect(()=>{const o=n==="messaging"?new xO({url:t,clientId:e}):new KA({apiUrl:t,clientId:e});i(o)},[e,t,n]),r},ude=(e,t,n=120)=>{w.useEffect(()=>{if(e){e.style.height="0px";const r=Math.min(e.scrollHeight,n);e.style.height=r+"px"}},[e,t])},GA=w.memo(w.forwardRef((e,t)=>{const{state:n,theme:{composer:r},client:i}=$t(),[o,a]=w.useState(""),[s,l]=w.useState(-1);if(n.isReadOnly||!i)return null;const c=()=>{o&&(i.sendMessage(o),a(""),l(-1))};return U.jsx(xw.Provider,{value:{value:o,setValue:a,historyIndex:s,setHistoryIndex:l,sendMessage:c},children:U.jsx("div",{"data-disabled":n.disableComposer,...e,...r==null?void 0:r.container,ref:t})})})),YA=w.memo(e=>{const{state:t,theme:{composer:n},configuration:r}=$t(),{value:i,setValue:o,historyIndex:a,setHistoryIndex:s,sendMessage:l}=Sw(),c=w.useRef(null),u=Bi(v=>v.user),d=Bi(v=>v.messageHistory),[p,f]=w.useState(!1);ude(c.current,i),w.useEffect(()=>{c.current&&(c.current.selectionStart=c.current.value.length,c.current.selectionEnd=c.current.value.length)},[i]);function h({key:v}){v==="Shift"&&f(!0)}function m({key:v}){v==="Shift"&&f(!1)}return w.useEffect(()=>(window.addEventListener("keydown",h),window.addEventListener("keyup",m),()=>{window.removeEventListener("keydown",h),window.removeEventListener("keyup",m)}),[]),U.jsx("textarea",{...n==null?void 0:n.input,placeholder:(r==null?void 0:r.composerPlaceholder)??"Type your message...",disabled:t.disableComposer,ref:c,value:i,"data-has-value":!!i,onChange:v=>o(v.target.value),onKeyDown:v=>{if(!t.disableComposer){if(v.key==="Enter"&&(v.preventDefault(),p?(o(i+`
381
+ `),setTimeout(()=>{var g;return(g=c.current)==null?void 0:g.scroll({behavior:"instant",top:c.current.scrollHeight})},0)):l()),v.key==="ArrowUp"){v.preventDefault();const g=d[(u==null?void 0:u.userId)??""]??[];a<g.length-1&&o(g[a+1]),s(()=>Math.min(a+1,g.length-1))}if(v.key==="ArrowDown"){v.preventDefault();const g=d[(u==null?void 0:u.userId)??""]??[];o(a===0?"":g[a-1]),s(()=>Math.max(a-1,-1))}}},...e})}),JA=w.memo(w.forwardRef(({icon:e=wU,...t},n)=>{var a,s;const{value:r,sendMessage:i}=Sw(),{theme:{composer:o}}=$t();return U.jsx("button",{ref:n,...t,...(a=o==null?void 0:o.button)==null?void 0:a.container,disabled:!r,onClick:i,children:U.jsx(e,{...(s=o==null?void 0:o.button)==null?void 0:s.icon})})})),XA=({children:e})=>{const[t,n]=w.useState(!1),[r,i]=w.useState(""),[o,a]=w.useState(null),s=({title:c,content:u})=>{i(c),a(u),n(!0)},l=()=>{n(!1)};return U.jsxs(Cw.Provider,{value:{hideModal:l,showModal:s,title:r,content:o,open:t},children:[U.jsx(oo,{open:t,onOpenChange:n,children:U.jsx(oo.Content,{title:r,children:o})}),e]})},dde=({theme:e={},renderers:t,client:n,children:r,configuration:i={},userData:o,closeWindow:a,...s})=>{const[l,c]=w.useState(0),[u,d]=w.useState([]),[p,f]=w.useState({disableComposer:!1,...s.defaultState,connected:!0}),[h,m]=w.useState(i),[v,g]=w.useState(e),y=Bi(k=>k.addMessageToHistory),b=Bi(k=>k.setConversationId),x=Bi(k=>k.user),_=Bi(k=>k.conversationId),S=Bi(k=>k.setUser),R=Bi(k=>k.setClientMode),M=w.useRef(null),j={...s,value:{theme:v,renderers:{...fm,...t},messages:u,messageContainerRef:M,setMessages:d,eventEmitter:hR,configuration:i,setConfiguration:m,state:p,closeWindow:a,setState:k=>f({...p,...k}),setTheme:g,client:n?{...n,sendMessage:async k=>{await n.sendMessage(k),d(N=>[...N,{direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:"bubble",block:{type:"text",text:k}}}]),n.userId&&y({message:k,userId:n.userId})},on:n.on,restartConversation:async()=>{await n.newConversation(),d([])}}:void 0}};return _o(()=>{n&&R(n.mode)}),_o(()=>{if(n)return n.on("message",k=>{try{const{payload:N,disableInput:z}=k;d(B=>[...B,{direction:"incoming",sender:{name:h.botName??"Bot",avatar:h.botAvatar},timestamp:new Date(k.sentOn),block:N,disableInput:z}])}catch{console.error("Invalid message payload")}})}),wm(async()=>{if(n)return n.on("error",()=>{console.log("client disconnected"),c(k=>k+1)})}),_o(()=>{if(n)return n.on("conversation",k=>{b(k)})}),wm(async()=>{if(!n)return;let k;try{k=await n.connect(x,o),f(z=>({...z,connected:!0}))}catch{f(B=>({...B,connected:!1}));return}S(k),_&&await n.conversationExists(_)?await n.switchConversation(_):await n.newConversation();const N=[];for(const z of await n.listMessages())try{const{payload:B,authorId:Z,sentOn:L,disableInput:F}=z,V=Z===n.userId?"outgoing":"incoming";N.push({direction:V,sender:V==="outgoing"?{name:"You"}:{name:h.botName??"Bot",avatar:h.botAvatar},timestamp:new Date(L),block:B,disableInput:F})}catch{console.error("Invalid message payload")}return d(N.reverse()),()=>{n.disconnect()}},[l]),U.jsx(kw.Provider,{...j,children:typeof r=="function"?r(h):r})};function Pn(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 fde=$["useId".toString()]||(()=>{});let pde=0;function np(e){const[t,n]=$.useState(fde());return na(()=>{e||n(r=>r??String(pde++))},[e]),e||(t?`radix-${t}`:"")}function QA({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=hde({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Nn(n),l=w.useCallback(c=>{if(o){const d=typeof c=="function"?c(e):c;d!==e&&s(d)}else i(c)},[o,e,i,s]);return[a,l]}function hde({defaultProp:e,onChange:t}){const n=w.useState(e),[r]=n,i=w.useRef(r),o=Nn(t);return w.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function mde(e,t=globalThis==null?void 0:globalThis.document){const n=Nn(e);w.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const ev="dismissableLayer.update",gde="dismissableLayer.pointerDownOutside",yde="dismissableLayer.focusOutside";let e$;const vde=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),bde=w.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...c}=e,u=w.useContext(vde),[d,p]=w.useState(null),f=(n=d==null?void 0:d.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,h]=w.useState({}),m=Jn(t,M=>p(M)),v=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf(g),b=d?v.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,_=b>=y,S=wde(M=>{const j=M.target,k=[...u.branches].some(N=>N.contains(j));!_||k||(o==null||o(M),s==null||s(M),M.defaultPrevented||l==null||l())},f),R=_de(M=>{const j=M.target;[...u.branches].some(N=>N.contains(j))||(a==null||a(M),s==null||s(M),M.defaultPrevented||l==null||l())},f);return mde(M=>{b===u.layers.size-1&&(i==null||i(M),!M.defaultPrevented&&l&&(M.preventDefault(),l()))},f),w.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(e$=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),t$(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=e$)}},[d,f,r,u]),w.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),t$())},[d,u]),w.useEffect(()=>{const M=()=>h({});return document.addEventListener(ev,M),()=>document.removeEventListener(ev,M)},[]),w.createElement(gn.div,lt({},c,{ref:m,style:{pointerEvents:x?_?"auto":"none":void 0,...e.style},onFocusCapture:Pn(e.onFocusCapture,R.onFocusCapture),onBlurCapture:Pn(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:Pn(e.onPointerDownCapture,S.onPointerDownCapture)}))});function wde(e,t=globalThis==null?void 0:globalThis.document){const n=Nn(e),r=w.useRef(!1),i=w.useRef(()=>{});return w.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let c=function(){n$(gde,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 _de(e,t=globalThis==null?void 0:globalThis.document){const n=Nn(e),r=w.useRef(!1);return w.useEffect(()=>{const i=o=>{o.target&&!r.current&&n$(yde,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 t$(){const e=new CustomEvent(ev);document.dispatchEvent(e)}function n$(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?lR(i,o):i.dispatchEvent(o)}const tv="focusScope.autoFocusOnMount",nv="focusScope.autoFocusOnUnmount",r$={bubbles:!1,cancelable:!0},xde=w.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=w.useState(null),c=Nn(i),u=Nn(o),d=w.useRef(null),p=Jn(t,m=>l(m)),f=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(r){let m=function(b){if(f.paused||!s)return;const x=b.target;s.contains(x)?d.current=x:ro(d.current,{select:!0})},v=function(b){if(f.paused||!s)return;const x=b.relatedTarget;x!==null&&(s.contains(x)||ro(d.current,{select:!0}))},g=function(b){const x=document.activeElement;for(const _ of b)_.removedNodes.length>0&&(s!=null&&s.contains(x)||ro(s))};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const y=new MutationObserver(g);return s&&y.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),y.disconnect()}}},[r,s,f.paused]),w.useEffect(()=>{if(s){a$.add(f);const m=document.activeElement;if(!s.contains(m)){const g=new CustomEvent(tv,r$);s.addEventListener(tv,c),s.dispatchEvent(g),g.defaultPrevented||(Sde(Ode(i$(s)),{select:!0}),document.activeElement===m&&ro(s))}return()=>{s.removeEventListener(tv,c),setTimeout(()=>{const g=new CustomEvent(nv,r$);s.addEventListener(nv,u),s.dispatchEvent(g),g.defaultPrevented||ro(m??document.body,{select:!0}),s.removeEventListener(nv,u),a$.remove(f)},0)}}},[s,c,u,f]);const h=w.useCallback(m=>{if(!n&&!r||f.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,g=document.activeElement;if(v&&g){const y=m.currentTarget,[b,x]=Ede(y);b&&x?!m.shiftKey&&g===x?(m.preventDefault(),n&&ro(b,{select:!0})):m.shiftKey&&g===b&&(m.preventDefault(),n&&ro(x,{select:!0})):g===y&&m.preventDefault()}},[n,r,f.paused]);return w.createElement(gn.div,lt({tabIndex:-1},a,{ref:p,onKeyDown:h}))});function Sde(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ro(r,{select:t}),document.activeElement!==n)return}function Ede(e){const t=i$(e),n=o$(t,e),r=o$(t.reverse(),e);return[n,r]}function i$(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 o$(e,t){for(const n of e)if(!Cde(n,{upTo:t}))return n}function Cde(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 Tde(e){return e instanceof HTMLInputElement&&"select"in e}function ro(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Tde(e)&&t&&e.select()}}const a$=kde();function kde(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=s$(e,t),e.unshift(t)},remove(t){var n;e=s$(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function s$(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Ode(e){return e.filter(t=>t.tagName!=="A")}function Ade(e,t){return w.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const io=e=>{const{present:t,children:n}=e,r=$de(t),i=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),o=Jn(r.ref,i.ref);return typeof n=="function"||r.isPresent?w.cloneElement(i,{ref:o}):null};io.displayName="Presence";function $de(e){const[t,n]=w.useState(),r=w.useRef({}),i=w.useRef(e),o=w.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Ade(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const c=rp(r.current);o.current=s==="mounted"?c:"none"},[s]),na(()=>{const c=r.current,u=i.current;if(u!==e){const p=o.current,f=rp(c);e?l("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&p!==f?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),na(()=>{if(t){const c=d=>{const f=rp(r.current).includes(d.animationName);d.target===t&&f&&$r.flushSync(()=>l("ANIMATION_END"))},u=d=>{d.target===t&&(o.current=rp(r.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:w.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function rp(e){return(e==null?void 0:e.animationName)||"none"}let rv=0;function Pde(){w.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:l$()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:l$()),rv++,()=>{rv===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),rv--}},[])}function l$(){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 ip="right-scroll-bar-position",op="width-before-scroll-bar",Ide="with-scroll-bars-hidden",Rde="--removed-body-scroll-bar-size";function Mde(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Nde(e,t){var n=w.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 Dde(e,t){return Nde(t||null,function(n){return e.forEach(function(r){return Mde(r,n)})})}function jde(e){return e}function Lde(e,t){t===void 0&&(t=jde);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 u=a;a=[],u.forEach(o)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){a.push(u),c()},filter:function(u){return a=a.filter(u),n}}}};return i}function Fde(e){e===void 0&&(e={});var t=Lde(null);return t.options=lr({async:!0,ssr:!1},e),t}var c$=function(e){var t=e.sideCar,n=tx(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 $.createElement(r,lr({},n))};c$.isSideCarExport=!0;function Ude(e,t){return e.useMedium(t),c$}var u$=Fde(),iv=function(){},ap=$.forwardRef(function(e,t){var n=$.useRef(null),r=$.useState({onScrollCapture:iv,onWheelCapture:iv,onTouchMoveCapture:iv}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,p=e.sideCar,f=e.noIsolation,h=e.inert,m=e.allowPinchZoom,v=e.as,g=v===void 0?"div":v,y=tx(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),b=p,x=Dde([n,t]),_=lr(lr({},y),i);return $.createElement($.Fragment,null,u&&$.createElement(b,{sideCar:u$,removeScrollBar:c,shards:d,noIsolation:f,inert:h,setCallbacks:o,allowPinchZoom:!!m,lockRef:n}),a?$.cloneElement($.Children.only(s),lr(lr({},_),{ref:x})):$.createElement(g,lr({},_,{className:l,ref:x}),s))});ap.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ap.classNames={fullWidth:op,zeroRight:ip};var d$,Bde=function(){if(d$)return d$;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function zde(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Bde();return t&&e.setAttribute("nonce",t),e}function Zde(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function qde(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Hde=function(){var e=0,t=null;return{add:function(n){e==0&&(t=zde())&&(Zde(t,n),qde(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Wde=function(){var e=Hde();return function(t,n){$.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},f$=function(){var e=Wde(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Vde={left:0,top:0,right:0,gap:0},ov=function(e){return parseInt(e||"",10)||0},Kde=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[ov(n),ov(r),ov(i)]},Gde=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Vde;var t=Kde(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])}},Yde=f$(),Jde=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
382
382
  .`.concat(Ide,` {
383
383
  overflow: hidden `).concat(r,`;
384
384
  padding-right: `).concat(s,"px ").concat(r,`;
@@ -418,7 +418,7 @@ ${u}`:u,{ast:c,isPatternProperty:!1,isRequired:(0,wg.default)(e.required||[],l),
418
418
  `)},Xde=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=$.useMemo(function(){return Gde(i)},[i]);return $.createElement(Yde,{styles:Jde(o,!t,i,n?"":"!important")})},av=!1;if(typeof window<"u")try{var sp=Object.defineProperty({},"passive",{get:function(){return av=!0,!0}});window.addEventListener("test",sp,sp),window.removeEventListener("test",sp,sp)}catch{av=!1}var ys=av?{passive:!1}:!1,Qde=function(e){return e.tagName==="TEXTAREA"},p$=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Qde(e)&&n[t]==="visible")},efe=function(e){return p$(e,"overflowY")},tfe=function(e){return p$(e,"overflowX")},h$=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=m$(e,n);if(r){var i=g$(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},nfe=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},rfe=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},m$=function(e,t){return e==="v"?efe(t):tfe(t)},g$=function(e,t){return e==="v"?nfe(t):rfe(t)},ife=function(e,t){return e==="h"&&t==="rtl"?-1:1},ofe=function(e,t,n,r,i){var o=ife(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),c=!1,u=a>0,d=0,p=0;do{var f=g$(e,s),h=f[0],m=f[1],v=f[2],g=m-v-o*h;(h||g)&&m$(e,s)&&(d+=g,p+=h),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(u&&(i&&d===0||!i&&a>d)||!u&&(i&&p===0||!i&&-a>p))&&(c=!0),c},lp=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},y$=function(e){return[e.deltaX,e.deltaY]},v$=function(e){return e&&"current"in e?e.current:e},afe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},sfe=function(e){return`
419
419
  .block-interactivity-`.concat(e,` {pointer-events: none;}
420
420
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
421
- `)},lfe=0,vs=[];function cfe(e){var t=$.useRef([]),n=$.useRef([0,0]),r=$.useRef(),i=$.useState(lfe++)[0],o=$.useState(function(){return f$()})[0],a=$.useRef(e);$.useEffect(function(){a.current=e},[e]),$.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=h5([e.lockRef.current],(e.shards||[]).map(v$),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=$.useCallback(function(m,v){if("touches"in m&&m.touches.length===2)return!a.current.allowPinchZoom;var g=lp(m),y=n.current,b="deltaX"in m?m.deltaX:y[0]-g[0],x="deltaY"in m?m.deltaY:y[1]-g[1],_,S=m.target,R=Math.abs(b)>Math.abs(x)?"h":"v";if("touches"in m&&R==="h"&&S.type==="range")return!1;var M=h$(R,S);if(!M)return!0;if(M?_=R:(_=R==="v"?"h":"v",M=h$(R,S)),!M)return!1;if(!r.current&&"changedTouches"in m&&(b||x)&&(r.current=_),!_)return!0;var j=r.current||_;return ofe(j,v,m,j==="h"?b:x,!0)},[]),l=$.useCallback(function(m){var v=m;if(!(!vs.length||vs[vs.length-1]!==o)){var g="deltaY"in v?y$(v):lp(v),y=t.current.filter(function(_){return _.name===v.type&&_.target===v.target&&afe(_.delta,g)})[0];if(y&&y.should){v.cancelable&&v.preventDefault();return}if(!y){var b=(a.current.shards||[]).map(v$).filter(Boolean).filter(function(_){return _.contains(v.target)}),x=b.length>0?s(v,b[0]):!a.current.noIsolation;x&&v.cancelable&&v.preventDefault()}}},[]),c=$.useCallback(function(m,v,g,y){var b={name:m,delta:v,target:g,should:y};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(x){return x!==b})},1)},[]),u=$.useCallback(function(m){n.current=lp(m),r.current=void 0},[]),d=$.useCallback(function(m){c(m.type,y$(m),m.target,s(m,e.lockRef.current))},[]),p=$.useCallback(function(m){c(m.type,lp(m),m.target,s(m,e.lockRef.current))},[]);$.useEffect(function(){return vs.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",l,ys),document.addEventListener("touchmove",l,ys),document.addEventListener("touchstart",u,ys),function(){vs=vs.filter(function(m){return m!==o}),document.removeEventListener("wheel",l,ys),document.removeEventListener("touchmove",l,ys),document.removeEventListener("touchstart",u,ys)}},[]);var f=e.removeScrollBar,h=e.inert;return $.createElement($.Fragment,null,h?$.createElement(o,{styles:sfe(i)}):null,f?$.createElement(Xde,{gapMode:"margin"}):null)}const ufe=Ude(u$,cfe);var b$=$.forwardRef(function(e,t){return $.createElement(ap,lr({},e,{ref:t,sideCar:ufe}))});b$.classNames=ap.classNames;const dfe=b$;var ffe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},bs=new WeakMap,cp=new WeakMap,up={},sv=0,w$=function(e){return e&&(e.host||w$(e.parentNode))},pfe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=w$(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})},hfe=function(e,t,n,r){var i=pfe(t,Array.isArray(e)?e:[e]);up[n]||(up[n]=new WeakMap);var o=up[n],a=[],s=new Set,l=new Set(i),c=function(d){!d||s.has(d)||(s.add(d),c(d.parentNode))};i.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(p){if(s.has(p))u(p);else{var f=p.getAttribute(r),h=f!==null&&f!=="false",m=(bs.get(p)||0)+1,v=(o.get(p)||0)+1;bs.set(p,m),o.set(p,v),a.push(p),m===1&&h&&cp.set(p,!0),v===1&&p.setAttribute(n,"true"),h||p.setAttribute(r,"true")}})};return u(t),s.clear(),sv++,function(){a.forEach(function(d){var p=bs.get(d)-1,f=o.get(d)-1;bs.set(d,p),o.set(d,f),p||(cp.has(d)||d.removeAttribute(r),cp.delete(d)),f||d.removeAttribute(n)}),sv--,sv||(bs=new WeakMap,bs=new WeakMap,cp=new WeakMap,up={})}},mfe=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||ffe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),hfe(r,i,n,"aria-hidden")):function(){return null}};const _$="Dialog",[x$,dbe]=kc(_$),[gfe,Ei]=x$(_$),yfe=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,s=w.useRef(null),l=w.useRef(null),[c=!1,u]=QA({prop:r,defaultProp:i,onChange:o});return w.createElement(gfe,{scope:t,triggerRef:s,contentRef:l,contentId:np(),titleId:np(),descriptionId:np(),open:c,onOpenChange:u,onOpenToggle:w.useCallback(()=>u(d=>!d),[u]),modal:a},n)},vfe="DialogTrigger",bfe=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ei(vfe,n),o=Jn(t,i.triggerRef);return w.createElement(gn.button,lt({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":cv(i.open)},r,{ref:o,onClick:Pn(e.onClick,i.onOpenToggle)}))}),wfe="DialogPortal",[fbe,S$]=x$(wfe,{forceMount:void 0}),lv="DialogOverlay",_fe=w.forwardRef((e,t)=>{const n=S$(lv,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Ei(lv,e.__scopeDialog);return o.modal?w.createElement(io,{present:r||o.open},w.createElement(xfe,lt({},i,{ref:t}))):null}),xfe=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ei(lv,n);return w.createElement(dfe,{as:Up,allowPinchZoom:!0,shards:[i.contentRef]},w.createElement(gn.div,lt({"data-state":cv(i.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),dc="DialogContent",Sfe=w.forwardRef((e,t)=>{const n=S$(dc,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Ei(dc,e.__scopeDialog);return w.createElement(io,{present:r||o.open},o.modal?w.createElement(Efe,lt({},i,{ref:t})):w.createElement(Cfe,lt({},i,{ref:t})))}),Efe=w.forwardRef((e,t)=>{const n=Ei(dc,e.__scopeDialog),r=w.useRef(null),i=Jn(t,n.contentRef,r);return w.useEffect(()=>{const o=r.current;if(o)return mfe(o)},[]),w.createElement(E$,lt({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Pn(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Pn(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:Pn(e.onFocusOutside,o=>o.preventDefault())}))}),Cfe=w.forwardRef((e,t)=>{const n=Ei(dc,e.__scopeDialog),r=w.useRef(!1),i=w.useRef(!1);return w.createElement(E$,lt({},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()}}))}),E$=w.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,s=Ei(dc,n),l=w.useRef(null),c=Jn(t,l);return Pde(),w.createElement(w.Fragment,null,w.createElement(xde,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},w.createElement(bde,lt({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":cv(s.open)},a,{ref:c,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),Tfe="DialogTitle",kfe=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ei(Tfe,n);return w.createElement(gn.h2,lt({id:i.titleId},r,{ref:t}))}),Ofe="DialogClose",Afe=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ei(Ofe,n);return w.createElement(gn.button,lt({type:"button"},r,{ref:t,onClick:Pn(e.onClick,()=>i.onOpenChange(!1))}))});function cv(e){return e?"open":"closed"}const $fe=yfe,Pfe=bfe,Ife=_fe,Rfe=Sfe,Mfe=kfe,C$=Afe;function Nfe({title:e,titleId:t,...n},r){return $.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?$.createElement("title",{id:t},e):null,$.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))}const T$=$.forwardRef(Nfe);function oo({open:e,onOpenChange:t,children:n}){return B.jsx($fe,{open:e,onOpenChange:t,children:n})}function Dfe({title:e,children:t}){var r,i,o,a,s,l,c,u;const{theme:{modal:n}}=$t();return B.jsxs(B.Fragment,{children:[B.jsx(Ife,{...n==null?void 0:n.overlay}),B.jsx("div",{...n==null?void 0:n.container,children:B.jsxs(Rfe,{...(r=n==null?void 0:n.dialog)==null?void 0:r.container,children:[B.jsxs("div",{...(o=(i=n==null?void 0:n.dialog)==null?void 0:i.title)==null?void 0:o.container,children:[B.jsx(Mfe,{...(s=(a=n==null?void 0:n.dialog)==null?void 0:a.title)==null?void 0:s.text,children:e}),B.jsx(C$,{children:B.jsx(T$,{role:"button",tabIndex:0,...(c=(l=n==null?void 0:n.dialog)==null?void 0:l.title)==null?void 0:c.closeIcon})})]}),B.jsx("div",{...(u=n==null?void 0:n.dialog)==null?void 0:u.content,children:t})]})})]})}oo.Button=Pfe,oo.Close=C$,oo.Content=Dfe;const k$=w.forwardRef(({children:e,...t},n)=>{const{theme:{container:r}}=$t();return B.jsxs("div",{...t,...r,ref:n,children:[B.jsx(DF,{}),B.jsxs(XA,{children:[B.jsx(jfe,{}),e]})]})}),jfe=()=>{const{theme:{modal:e},state:{connected:t}}=$t(),{showModal:n}=Tw();return w.useEffect(()=>{var r,i,o,a;t||n({title:"Connection Error",content:B.jsxs(B.Fragment,{children:[B.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."}),B.jsx(oo.Close,{asChild:!0,children:B.jsx("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]),B.jsx(B.Fragment,{})},Lfe=w.forwardRef(({children:e,onClick:t,...n},r)=>{const{theme:{fab:i}}=$t(),{container:o,icon:a}=i??{};return B.jsx("div",{...n,...o,ref:r,onClick:t,children:B.jsx("div",{...a})})}),O$="Collapsible",[Ffe,hbe]=kc(O$),[Ufe,uv]=Ffe(O$),Bfe=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:a,...s}=e,[l=!1,c]=QA({prop:r,defaultProp:i,onChange:a});return w.createElement(Ufe,{scope:n,disabled:o,contentId:np(),open:l,onOpenToggle:w.useCallback(()=>c(u=>!u),[c])},w.createElement(gn.div,lt({"data-state":dv(l),"data-disabled":o?"":void 0},s,{ref:t})))}),zfe="CollapsibleTrigger",Zfe=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=uv(zfe,n);return w.createElement(gn.button,lt({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":dv(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},r,{ref:t,onClick:Pn(e.onClick,i.onOpenToggle)}))}),A$="CollapsibleContent",qfe=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=uv(A$,e.__scopeCollapsible);return w.createElement(io,{present:n||i.open},({present:o})=>w.createElement(Hfe,lt({},r,{ref:t,present:o})))}),Hfe=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,a=uv(A$,n),[s,l]=w.useState(r),c=w.useRef(null),u=Jn(t,c),d=w.useRef(0),p=d.current,f=w.useRef(0),h=f.current,m=a.open||s,v=w.useRef(m),g=w.useRef();return w.useEffect(()=>{const y=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(y)},[]),na(()=>{const y=c.current;if(y){g.current=g.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const b=y.getBoundingClientRect();d.current=b.height,f.current=b.width,v.current||(y.style.transitionDuration=g.current.transitionDuration,y.style.animationName=g.current.animationName),l(r)}},[a.open,r]),w.createElement(gn.div,lt({"data-state":dv(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!m},o,{ref:u,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style}}),m&&i)});function dv(e){return e?"open":"closed"}const Wfe=Bfe,Vfe=Zfe,Kfe=qfe,Gfe=e=>$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e},$.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"})),$$=({...e})=>{var a,s;const{theme:{header:t,modal:n},client:r}=$t(),{showModal:i}=Tw(),o=l=>{var c,u,d,p;l.stopPropagation(),i({title:"Restart Conversation",content:B.jsxs(B.Fragment,{children:[B.jsx("p",{...(u=(c=n==null?void 0:n.dialog)==null?void 0:c.newConversation)==null?void 0:u.text,children:"Are you sure you want to restart a new conversation?"}),B.jsx(oo.Close,{asChild:!0,children:B.jsx("button",{...(p=(d=n==null?void 0:n.dialog)==null?void 0:d.newConversation)==null?void 0:p.button,onClick:r==null?void 0:r.restartConversation,children:"Restart"})})]})})};return B.jsx(vU,{...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)}})},Yfe=({...e})=>{var i,o;const{theme:{header:t},closeWindow:n}=$t(),r=a=>{a.stopPropagation(),n==null||n()};return B.jsx(T$,{...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)}})},Jfe=w.memo(w.forwardRef(({defaultOpen:e,...t},n)=>{const{theme:{header:r}}=$t(),[i,o]=w.useState(!!e);return B.jsx(Wfe,{open:i,onOpenChange:o,...t,...r==null?void 0:r.container,ref:n})})),Xfe=w.forwardRef((e,t)=>{var r;const{theme:{header:n}}=$t();return B.jsx(Vfe,{...e,...(r=n==null?void 0:n.content)==null?void 0:r.container,ref:t})}),Qfe=w.forwardRef((e,t)=>{var r;const{theme:{header:n}}=$t();return B.jsx(Kfe,{...e,...(r=n==null?void 0:n.expandedContent)==null?void 0:r.container,ref:t})}),epe=w.forwardRef(({src:e,children:t},n)=>{var o;const{theme:{header:r},client:i}=$t();return B.jsx(Zp,{ref:n,userId:i==null?void 0:i.clientId,children:t,src:e,...(o=r==null?void 0:r.content)==null?void 0:o.avatar})}),tpe=w.forwardRef((e,t)=>{var r;const{theme:{header:n}}=$t();return B.jsx("h2",{...e,...(r=n==null?void 0:n.content)==null?void 0:r.title,ref:t})}),npe=w.forwardRef((e,t)=>{var r;const{theme:{header:n}}=$t();return B.jsx("p",{...e,...(r=n==null?void 0:n.content)==null?void 0:r.description,ref:t})}),rpe=w.forwardRef((e,t)=>{var r,i;const{theme:{header:n}}=$t();return B.jsx("div",{...e,...(i=(r=n==null?void 0:n.content)==null?void 0:r.actions)==null?void 0:i.container,ref:t})}),or=Object.assign(Jfe,{Content:Xfe,ExpandedContent:Qfe,Avatar:epe,Description:npe,Title:tpe,Actions:rpe,DescriptionItem:({icon:e,title:t,link:n,...r})=>{var s,l,c,u,d,p,f,h,m,v,g,y;const{theme:{header:i}}=$t(),o=e??Gfe,a=b=>{b&&HL(b)};return!n&&!t?null:n?B.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:"noopener",children:[B.jsx(o,{...(u=(c=i==null?void 0:i.expandedContent)==null?void 0:c.descriptionItems)==null?void 0:u.icon}),B.jsx("p",{...(p=(d=i==null?void 0:i.expandedContent)==null?void 0:d.descriptionItems)==null?void 0:p.link,children:t})]}):B.jsxs("div",{...r,...(h=(f=i==null?void 0:i.expandedContent)==null?void 0:f.descriptionItems)==null?void 0:h.container,onClick:b=>{a(b.currentTarget.textContent)},children:[B.jsx(o,{...(v=(m=i==null?void 0:i.expandedContent)==null?void 0:m.descriptionItems)==null?void 0:v.icon}),B.jsx("p",{...(y=(g=i==null?void 0:i.expandedContent)==null?void 0:g.descriptionItems)==null?void 0:y.text,children:t})]})}}),P$=()=>{var i,o,a,s,l,c,u,d,p,f,h,m,v,g,y,b,x;const{configuration:e,closeWindow:t,theme:{header:n}}=$t(),r=!!((i=e.email)!=null&&i.title)||!!((o=e.phone)!=null&&o.title)||!!((a=e.website)!=null&&a.title)||!!((s=e.termsOfService)!=null&&s.link)||!!((l=e.privacyPolicy)!=null&&l.link);return B.jsxs(or,{open:r?void 0:!1,"data-disabled":r?void 0:"",children:[B.jsxs(or.Content,{children:[B.jsx(or.Avatar,{src:e.botAvatar,children:e.botName||"Bot"}),B.jsx(or.Title,{children:e.botName||"Bot"}),B.jsx(or.Description,{children:e.botDescription}),B.jsxs(or.Actions,{children:[B.jsx($$,{}),t&&B.jsx(Yfe,{})]})]}),B.jsxs(or.ExpandedContent,{children:[B.jsx(or.DescriptionItem,{"data-email":"",icon:hB,title:(c=e.email)==null?void 0:c.title,link:(u=e.email)==null?void 0:u.link}),B.jsx(or.DescriptionItem,{"data-phone":"",icon:wB,title:(d=e.phone)==null?void 0:d.title,link:(p=e.phone)==null?void 0:p.link}),B.jsx(or.DescriptionItem,{"data-website":"",link:(f=e.website)==null?void 0:f.link,icon:gB,title:(h=e.website)==null?void 0:h.title}),B.jsx(or.DescriptionItem,{"data-terms":"",link:(m=e.termsOfService)==null?void 0:m.link,icon:fB,title:(v=e.termsOfService)==null?void 0:v.title}),B.jsx(or.DescriptionItem,{"data-privacy":"",link:(g=e.privacyPolicy)==null?void 0:g.link,icon:vB,title:(y=e.privacyPolicy)==null?void 0:y.title}),B.jsx("div",{...(x=(b=n==null?void 0:n.expandedContent)==null?void 0:b.descriptionItems)==null?void 0:x.poweredBy,children:"⚡ by Botpress"})]})]})},ipe=or,I$=w.memo(({...e})=>{const{theme:{loadingIndicator:t}}=$t();return B.jsx("div",{...e,...t==null?void 0:t.container,children:B.jsx("div",{...t==null?void 0:t.loader})})}),fv=w.forwardRef(({direction:e,block:t,scroll:n,disableInput:r,children:i,sender:o,...a},s)=>{var m,v,g,y;const[l,c]=w.useState([]),{theme:{message:u},configuration:{botAvatar:d,botName:p},client:f}=$t();_5(()=>{n()}),w.useEffect(()=>{l.length===0&&n()},[l.length]);const h=bb((f==null?void 0:f.clientId)??"",15);return B.jsx(Ew.Provider,{value:{isLoading:l,setIsLoading:c},children:B.jsxs("div",{...a,...u==null?void 0:u.container,"data-loaded":l.length===0,"data-disable-input":!!r,"data-direction":e,ref:s,children:[B.jsxs(gb,{"data-color":h,...(m=u==null?void 0:u.avatar)==null?void 0:m.container,children:[B.jsx(yb,{...(v=u==null?void 0:u.avatar)==null?void 0:v.image,src:(o==null?void 0:o.avatar)??d}),B.jsx(vb,{...(g=u==null?void 0:u.avatar)==null?void 0:g.fallback,children:(o==null?void 0:o.name[0])??((y=p??"Bot")==null?void 0:y[0])})]}),t&&B.jsx(ga,{block:t,styles:u==null?void 0:u.blocks}),i]})})}),ope=w.createContext(void 0);function ape(e){const t=w.useContext(ope);return e||t||"ltr"}function spe(e,[t,n]){return Math.min(n,Math.max(t,e))}function lpe(e,t){return w.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const R$="ScrollArea",[M$,gbe]=kc(R$),[cpe,pr]=M$(R$),upe=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=600,...a}=e,[s,l]=w.useState(null),[c,u]=w.useState(null),[d,p]=w.useState(null),[f,h]=w.useState(null),[m,v]=w.useState(null),[g,y]=w.useState(0),[b,x]=w.useState(0),[_,S]=w.useState(!1),[R,M]=w.useState(!1),j=Jn(t,N=>l(N)),k=ape(i);return w.createElement(cpe,{scope:n,type:r,dir:k,scrollHideDelay:o,scrollArea:s,viewport:c,onViewportChange:u,content:d,onContentChange:p,scrollbarX:f,onScrollbarXChange:h,scrollbarXEnabled:_,onScrollbarXEnabledChange:S,scrollbarY:m,onScrollbarYChange:v,scrollbarYEnabled:R,onScrollbarYEnabledChange:M,onCornerWidthChange:y,onCornerHeightChange:x},w.createElement(gn.div,lt({dir:k},a,{ref:j,style:{position:"relative","--radix-scroll-area-corner-width":g+"px","--radix-scroll-area-corner-height":b+"px",...e.style}})))}),dpe="ScrollAreaViewport",fpe=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,...i}=e,o=pr(dpe,n),a=w.useRef(null),s=Jn(t,a,o.onViewportChange);return w.createElement(w.Fragment,null,w.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}"}}),w.createElement(gn.div,lt({"data-radix-scroll-area-viewport":""},i,{ref:s,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style}}),w.createElement("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"}},r)))}),Ci="ScrollAreaScrollbar",ppe=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=pr(Ci,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:a}=i,s=e.orientation==="horizontal";return w.useEffect(()=>(s?o(!0):a(!0),()=>{s?o(!1):a(!1)}),[s,o,a]),i.type==="hover"?w.createElement(hpe,lt({},r,{ref:t,forceMount:n})):i.type==="scroll"?w.createElement(mpe,lt({},r,{ref:t,forceMount:n})):i.type==="auto"?w.createElement(N$,lt({},r,{ref:t,forceMount:n})):i.type==="always"?w.createElement(pv,lt({},r,{ref:t})):null}),hpe=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=pr(Ci,e.__scopeScrollArea),[o,a]=w.useState(!1);return w.useEffect(()=>{const s=i.scrollArea;let l=0;if(s){const c=()=>{window.clearTimeout(l),a(!0)},u=()=>{l=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return s.addEventListener("pointerenter",c),s.addEventListener("pointerleave",u),()=>{window.clearTimeout(l),s.removeEventListener("pointerenter",c),s.removeEventListener("pointerleave",u)}}},[i.scrollArea,i.scrollHideDelay]),w.createElement(io,{present:n||o},w.createElement(N$,lt({"data-state":o?"visible":"hidden"},r,{ref:t})))}),mpe=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=pr(Ci,e.__scopeScrollArea),o=e.orientation==="horizontal",a=pp(()=>l("SCROLL_END"),100),[s,l]=lpe("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 w.useEffect(()=>{if(s==="idle"){const c=window.setTimeout(()=>l("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(c)}},[s,i.scrollHideDelay,l]),w.useEffect(()=>{const c=i.viewport,u=o?"scrollLeft":"scrollTop";if(c){let d=c[u];const p=()=>{const f=c[u];d!==f&&(l("SCROLL"),a()),d=f};return c.addEventListener("scroll",p),()=>c.removeEventListener("scroll",p)}},[i.viewport,o,l,a]),w.createElement(io,{present:n||s!=="hidden"},w.createElement(pv,lt({"data-state":s==="hidden"?"hidden":"visible"},r,{ref:t,onPointerEnter:Pn(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Pn(e.onPointerLeave,()=>l("POINTER_LEAVE"))})))}),N$=w.forwardRef((e,t)=>{const n=pr(Ci,e.__scopeScrollArea),{forceMount:r,...i}=e,[o,a]=w.useState(!1),s=e.orientation==="horizontal",l=pp(()=>{if(n.viewport){const c=n.viewport.offsetWidth<n.viewport.scrollWidth,u=n.viewport.offsetHeight<n.viewport.scrollHeight;a(s?c:u)}},10);return ws(n.viewport,l),ws(n.content,l),w.createElement(io,{present:r||o},w.createElement(pv,lt({"data-state":o?"visible":"hidden"},i,{ref:t})))}),pv=w.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,i=pr(Ci,e.__scopeScrollArea),o=w.useRef(null),a=w.useRef(0),[s,l]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=F$(s.viewport,s.content),u={...r,sizes:s,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:p=>o.current=p,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:p=>a.current=p};function d(p,f){return Spe(p,a.current,s,f)}return n==="horizontal"?w.createElement(gpe,lt({},u,{ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const p=i.viewport.scrollLeft,f=U$(p,s,i.dir);o.current.style.transform=`translate3d(${f}px, 0, 0)`}},onWheelScroll:p=>{i.viewport&&(i.viewport.scrollLeft=p)},onDragScroll:p=>{i.viewport&&(i.viewport.scrollLeft=d(p,i.dir))}})):n==="vertical"?w.createElement(ype,lt({},u,{ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const p=i.viewport.scrollTop,f=U$(p,s);o.current.style.transform=`translate3d(0, ${f}px, 0)`}},onWheelScroll:p=>{i.viewport&&(i.viewport.scrollTop=p)},onDragScroll:p=>{i.viewport&&(i.viewport.scrollTop=d(p))}})):null}),gpe=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=pr(Ci,e.__scopeScrollArea),[a,s]=w.useState(),l=w.useRef(null),c=Jn(t,l,o.onScrollbarXChange);return w.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),w.createElement(j$,lt({"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":fp(n)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,d)=>{if(o.viewport){const p=o.viewport.scrollLeft+u.deltaX;e.onWheelScroll(p),z$(p,d)&&u.preventDefault()}},onResize:()=>{l.current&&o.viewport&&a&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:dp(a.paddingLeft),paddingEnd:dp(a.paddingRight)}})}}))}),ype=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=pr(Ci,e.__scopeScrollArea),[a,s]=w.useState(),l=w.useRef(null),c=Jn(t,l,o.onScrollbarYChange);return w.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),w.createElement(j$,lt({"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":fp(n)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,d)=>{if(o.viewport){const p=o.viewport.scrollTop+u.deltaY;e.onWheelScroll(p),z$(p,d)&&u.preventDefault()}},onResize:()=>{l.current&&o.viewport&&a&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:dp(a.paddingTop),paddingEnd:dp(a.paddingBottom)}})}}))}),[vpe,D$]=M$(Ci),j$=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:a,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:d,...p}=e,f=pr(Ci,n),[h,m]=w.useState(null),v=Jn(t,j=>m(j)),g=w.useRef(null),y=w.useRef(""),b=f.viewport,x=r.content-r.viewport,_=Nn(u),S=Nn(l),R=pp(d,10);function M(j){if(g.current){const k=j.clientX-g.current.left,N=j.clientY-g.current.top;c({x:k,y:N})}}return w.useEffect(()=>{const j=k=>{const N=k.target;(h==null?void 0:h.contains(N))&&_(k,x)};return document.addEventListener("wheel",j,{passive:!1}),()=>document.removeEventListener("wheel",j,{passive:!1})},[b,h,x,_]),w.useEffect(S,[r,S]),ws(h,R),ws(f.content,R),w.createElement(vpe,{scope:n,scrollbar:h,hasThumb:i,onThumbChange:Nn(o),onThumbPointerUp:Nn(a),onThumbPositionChange:S,onThumbPointerDown:Nn(s)},w.createElement(gn.div,lt({},p,{ref:v,style:{position:"absolute",...p.style},onPointerDown:Pn(e.onPointerDown,j=>{j.button===0&&(j.target.setPointerCapture(j.pointerId),g.current=h.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",f.viewport&&(f.viewport.style.scrollBehavior="auto"),M(j))}),onPointerMove:Pn(e.onPointerMove,M),onPointerUp:Pn(e.onPointerUp,j=>{const k=j.target;k.hasPointerCapture(j.pointerId)&&k.releasePointerCapture(j.pointerId),document.body.style.webkitUserSelect=y.current,f.viewport&&(f.viewport.style.scrollBehavior=""),g.current=null})})))}),hv="ScrollAreaThumb",bpe=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=D$(hv,e.__scopeScrollArea);return w.createElement(io,{present:n||i.hasThumb},w.createElement(wpe,lt({ref:t},r)))}),wpe=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,o=pr(hv,n),a=D$(hv,n),{onThumbPositionChange:s}=a,l=Jn(t,d=>a.onThumbChange(d)),c=w.useRef(),u=pp(()=>{c.current&&(c.current(),c.current=void 0)},100);return w.useEffect(()=>{const d=o.viewport;if(d){const p=()=>{if(u(),!c.current){const f=Epe(d,s);c.current=f,s()}};return s(),d.addEventListener("scroll",p),()=>d.removeEventListener("scroll",p)}},[o.viewport,u,s]),w.createElement(gn.div,lt({"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:Pn(e.onPointerDownCapture,d=>{const f=d.target.getBoundingClientRect(),h=d.clientX-f.left,m=d.clientY-f.top;a.onThumbPointerDown({x:h,y:m})}),onPointerUp:Pn(e.onPointerUp,a.onThumbPointerUp)}))}),L$="ScrollAreaCorner",_pe=w.forwardRef((e,t)=>{const n=pr(L$,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?w.createElement(xpe,lt({},e,{ref:t})):null}),xpe=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=pr(L$,n),[o,a]=w.useState(0),[s,l]=w.useState(0),c=!!(o&&s);return ws(i.scrollbarX,()=>{var u;const d=((u=i.scrollbarX)===null||u===void 0?void 0:u.offsetHeight)||0;i.onCornerHeightChange(d),l(d)}),ws(i.scrollbarY,()=>{var u;const d=((u=i.scrollbarY)===null||u===void 0?void 0:u.offsetWidth)||0;i.onCornerWidthChange(d),a(d)}),c?w.createElement(gn.div,lt({},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 dp(e){return e?parseInt(e,10):0}function F$(e,t){const n=e/t;return isNaN(n)?0:n}function fp(e){const t=F$(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Spe(e,t,n,r="ltr"){const i=fp(n),o=i/2,a=t||o,s=i-a,l=n.scrollbar.paddingStart+a,c=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r==="ltr"?[0,u]:[u*-1,0];return B$([l,c],d)(e)}function U$(e,t,n="ltr"){const r=fp(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=spe(e,l);return B$([0,a],[0,s])(c)}function B$(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 z$(e,t){return e>0&&e<t}const Epe=(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 pp(e,t){const n=Nn(e),r=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),w.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function ws(e,t){const n=Nn(t);na(()=>{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 Cpe=upe,Tpe=fpe,kpe=ppe,Ope=bpe,Ape=_pe;var Z$={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(K,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",l="hour",c="day",u="week",d="month",p="quarter",f="year",h="date",m="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|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,y={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(Z){var L=["th","st","nd","rd"],F=Z%100;return"["+Z+(L[(F-20)%10]||L[F]||L[0])+"]"}},b=function(Z,L,F){var V=String(Z);return!V||V.length>=L?Z:""+Array(L+1-V.length).join(F)+Z},x={s:b,z:function(Z){var L=-Z.utcOffset(),F=Math.abs(L),V=Math.floor(F/60),W=F%60;return(L<=0?"+":"-")+b(V,2,"0")+":"+b(W,2,"0")},m:function Z(L,F){if(L.date()<F.date())return-Z(F,L);var V=12*(F.year()-L.year())+(F.month()-L.month()),W=L.clone().add(V,d),pe=F-W<0,C=L.clone().add(V+(pe?-1:1),d);return+(-(V+(F-W)/(pe?W-C:C-W))||0)},a:function(Z){return Z<0?Math.ceil(Z)||0:Math.floor(Z)},p:function(Z){return{M:d,y:f,w:u,d:c,D:h,h:l,m:s,s:a,ms:o,Q:p}[Z]||String(Z||"").toLowerCase().replace(/s$/,"")},u:function(Z){return Z===void 0}},_="en",S={};S[_]=y;var R="$isDayjsObject",M=function(Z){return Z instanceof z||!(!Z||!Z[R])},j=function Z(L,F,V){var W;if(!L)return _;if(typeof L=="string"){var pe=L.toLowerCase();S[pe]&&(W=pe),F&&(S[pe]=F,W=pe);var C=L.split("-");if(!W&&C.length>1)return Z(C[0])}else{var se=L.name;S[se]=L,W=se}return!V&&W&&(_=W),W||!V&&_},k=function(Z,L){if(M(Z))return Z.clone();var F=typeof L=="object"?L:{};return F.date=Z,F.args=arguments,new z(F)},N=x;N.l=j,N.i=M,N.w=function(Z,L){return k(Z,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var z=function(){function Z(F){this.$L=j(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[R]=!0}var L=Z.prototype;return L.parse=function(F){this.$d=function(V){var W=V.date,pe=V.utc;if(W===null)return new Date(NaN);if(N.u(W))return new Date;if(W instanceof Date)return new Date(W);if(typeof W=="string"&&!/Z$/i.test(W)){var C=W.match(v);if(C){var se=C[2]-1||0,we=(C[7]||"0").substring(0,3);return pe?new Date(Date.UTC(C[1],se,C[3]||1,C[4]||0,C[5]||0,C[6]||0,we)):new Date(C[1],se,C[3]||1,C[4]||0,C[5]||0,C[6]||0,we)}}return new Date(W)}(F),this.init()},L.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()},L.$utils=function(){return N},L.isValid=function(){return this.$d.toString()!==m},L.isSame=function(F,V){var W=k(F);return this.startOf(V)<=W&&W<=this.endOf(V)},L.isAfter=function(F,V){return k(F)<this.startOf(V)},L.isBefore=function(F,V){return this.endOf(V)<k(F)},L.$g=function(F,V,W){return N.u(F)?this[V]:this.set(W,F)},L.unix=function(){return Math.floor(this.valueOf()/1e3)},L.valueOf=function(){return this.$d.getTime()},L.startOf=function(F,V){var W=this,pe=!!N.u(V)||V,C=N.p(F),se=function(We,_e){var ye=N.w(W.$u?Date.UTC(W.$y,_e,We):new Date(W.$y,_e,We),W);return pe?ye:ye.endOf(c)},we=function(We,_e){return N.w(W.toDate()[We].apply(W.toDate("s"),(pe?[0,0,0,0]:[23,59,59,999]).slice(_e)),W)},O=this.$W,Oe=this.$M,Be=this.$D,Me="set"+(this.$u?"UTC":"");switch(C){case f:return pe?se(1,0):se(31,11);case d:return pe?se(1,Oe):se(0,Oe+1);case u:var Ze=this.$locale().weekStart||0,nt=(O<Ze?O+7:O)-Ze;return se(pe?Be-nt:Be+(6-nt),Oe);case c:case h:return we(Me+"Hours",0);case l:return we(Me+"Minutes",1);case s:return we(Me+"Seconds",2);case a:return we(Me+"Milliseconds",3);default:return this.clone()}},L.endOf=function(F){return this.startOf(F,!1)},L.$set=function(F,V){var W,pe=N.p(F),C="set"+(this.$u?"UTC":""),se=(W={},W[c]=C+"Date",W[h]=C+"Date",W[d]=C+"Month",W[f]=C+"FullYear",W[l]=C+"Hours",W[s]=C+"Minutes",W[a]=C+"Seconds",W[o]=C+"Milliseconds",W)[pe],we=pe===c?this.$D+(V-this.$W):V;if(pe===d||pe===f){var O=this.clone().set(h,1);O.$d[se](we),O.init(),this.$d=O.set(h,Math.min(this.$D,O.daysInMonth())).$d}else se&&this.$d[se](we);return this.init(),this},L.set=function(F,V){return this.clone().$set(F,V)},L.get=function(F){return this[N.p(F)]()},L.add=function(F,V){var W,pe=this;F=Number(F);var C=N.p(V),se=function(Oe){var Be=k(pe);return N.w(Be.date(Be.date()+Math.round(Oe*F)),pe)};if(C===d)return this.set(d,this.$M+F);if(C===f)return this.set(f,this.$y+F);if(C===c)return se(1);if(C===u)return se(7);var we=(W={},W[s]=r,W[l]=i,W[a]=n,W)[C]||1,O=this.$d.getTime()+F*we;return N.w(O,this)},L.subtract=function(F,V){return this.add(-1*F,V)},L.format=function(F){var V=this,W=this.$locale();if(!this.isValid())return W.invalidDate||m;var pe=F||"YYYY-MM-DDTHH:mm:ssZ",C=N.z(this),se=this.$H,we=this.$m,O=this.$M,Oe=W.weekdays,Be=W.months,Me=W.meridiem,Ze=function(_e,ye,$e,xe){return _e&&(_e[ye]||_e(V,pe))||$e[ye].slice(0,xe)},nt=function(_e){return N.s(se%12||12,_e,"0")},We=Me||function(_e,ye,$e){var xe=_e<12?"AM":"PM";return $e?xe.toLowerCase():xe};return pe.replace(g,function(_e,ye){return ye||function($e){switch($e){case"YY":return String(V.$y).slice(-2);case"YYYY":return N.s(V.$y,4,"0");case"M":return O+1;case"MM":return N.s(O+1,2,"0");case"MMM":return Ze(W.monthsShort,O,Be,3);case"MMMM":return Ze(Be,O);case"D":return V.$D;case"DD":return N.s(V.$D,2,"0");case"d":return String(V.$W);case"dd":return Ze(W.weekdaysMin,V.$W,Oe,2);case"ddd":return Ze(W.weekdaysShort,V.$W,Oe,3);case"dddd":return Oe[V.$W];case"H":return String(se);case"HH":return N.s(se,2,"0");case"h":return nt(1);case"hh":return nt(2);case"a":return We(se,we,!0);case"A":return We(se,we,!1);case"m":return String(we);case"mm":return N.s(we,2,"0");case"s":return String(V.$s);case"ss":return N.s(V.$s,2,"0");case"SSS":return N.s(V.$ms,3,"0");case"Z":return C}return null}(_e)||C.replace(":","")})},L.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},L.diff=function(F,V,W){var pe,C=this,se=N.p(V),we=k(F),O=(we.utcOffset()-this.utcOffset())*r,Oe=this-we,Be=function(){return N.m(C,we)};switch(se){case f:pe=Be()/12;break;case d:pe=Be();break;case p:pe=Be()/3;break;case u:pe=(Oe-O)/6048e5;break;case c:pe=(Oe-O)/864e5;break;case l:pe=Oe/i;break;case s:pe=Oe/r;break;case a:pe=Oe/n;break;default:pe=Oe}return W?pe:N.a(pe)},L.daysInMonth=function(){return this.endOf(d).$D},L.$locale=function(){return S[this.$L]},L.locale=function(F,V){if(!F)return this.$L;var W=this.clone(),pe=j(F,V,!0);return pe&&(W.$L=pe),W},L.clone=function(){return N.w(this.$d,this)},L.toDate=function(){return new Date(this.valueOf())},L.toJSON=function(){return this.isValid()?this.toISOString():null},L.toISOString=function(){return this.$d.toISOString()},L.toString=function(){return this.$d.toUTCString()},Z}(),U=z.prototype;return k.prototype=U,[["$ms",o],["$s",a],["$m",s],["$H",l],["$W",c],["$M",d],["$y",f],["$D",h]].forEach(function(Z){U[Z[1]]=function(L){return this.$g(L,Z[0],Z[1])}}),k.extend=function(Z,L){return Z.$i||(Z(L,z,k),Z.$i=!0),k},k.locale=j,k.isDayjs=M,k.unix=function(Z){return k(1e3*Z)},k.en=S[_],k.Ls=S,k.p={},k})})(Z$);var $pe=Z$.exports;const hp=ti($pe);var q$={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(K,function(){return function(n,r,i){r.prototype.isToday=function(){var o="YYYY-MM-DD",a=i();return this.format(o)===a.format(o)}}})})(q$);var Ppe=q$.exports;const Ipe=ti(Ppe);var H$={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(K,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)}}})})(H$);var Rpe=H$.exports;const Mpe=ti(Rpe);hp.extend(Ipe),hp.extend(Mpe);function Npe(e,t="day"){if(!e||e.length===0)return[];const n=[];n.push(W$(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;hp(i).isSame(o,t)||n.push(W$(o))}return n}function W$(e){return{direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:Dpe(e)}}}function Dpe(e,t=!1){const n=hp(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 V$=10*1e3,K$=w.memo(({scrollDownButton:e,...t})=>{var y,b,x,_,S,R,M,j,k,N,z,U,Z;const{messages:n,setState:r,client:i,configuration:o,messageContainerRef:a,theme:{messageList:s}}=$t(),l=w.useMemo(()=>Npe(n),[n]),[c,u]=w.useState(!0),{y:d}=k5(a),[p,f]=w.useState(!1),[h,m]=A5(),v=()=>{if(!a.current)return;const{scrollHeight:L}=a.current;c&&a.current.scrollTo({top:L})};w.useEffect(()=>{const L=new Date(Date.now()-V$+2e3);n.length>0&&n[n.length-1].timestamp<L&&f(!1)},[h]),_o(()=>i==null?void 0:i.on("messageSent",()=>{f(!0),m(new Date(Date.now()+V$))})),_o(()=>i==null?void 0:i.on("message",()=>{f(!1)})),w.useEffect(()=>{const L=n[n.length-1];r({disableComposer:!!(L!=null&&L.disableInput)})},[n.length]),w.useEffect(()=>{if(!a.current)return;const{offsetHeight:L,scrollHeight:F,scrollTop:V}=a.current;u(F<=V+L+100)},[d]);const g=e!=null&&e.icon?e==null?void 0:e.icon:gU;return B.jsxs(Cpe,{...(y=s==null?void 0:s.scrollbar)==null?void 0:y.container,scrollHideDelay:300,type:"hover",children:[B.jsx(Tpe,{...(b=s==null?void 0:s.scrollbar)==null?void 0:b.viewport,ref:a,children:B.jsxs("ul",{...t,...s==null?void 0:s.container,children:[B.jsxs("li",{...(x=s==null?void 0:s.marquee)==null?void 0:x.container,children:[B.jsx(Zp,{userId:i==null?void 0:i.clientId,src:o.botAvatar,...(_=s==null?void 0:s.marquee)==null?void 0:_.avatar,children:(o.botName||"Bot").slice(0,1)}),B.jsxs("div",{...(S=s==null?void 0:s.marquee)==null?void 0:S.content,children:[B.jsx("h1",{...(R=s==null?void 0:s.marquee)==null?void 0:R.title,children:o.botName||"Bot"}),B.jsx("p",{...(M=s==null?void 0:s.marquee)==null?void 0:M.description,children:o.botDescription})]})]}),l.map((L,F)=>B.jsx(fv,{scroll:v,...L},F)),p&&B.jsx(fv,{scroll:v,direction:"incoming",children:B.jsx(I$,{})}),B.jsx("li",{...(j=s==null?void 0:s.scrollDownButton)==null?void 0:j.container,children:!!n.length&&B.jsxs("button",{"data-is-at-bottom":c,...(k=s==null?void 0:s.scrollDownButton)==null?void 0:k.button,onClick:()=>{var L,F;return(F=a.current)==null?void 0:F.scrollBy({top:(L=a.current)==null?void 0:L.scrollHeight})},children:[(e==null?void 0:e.text)??"Back"," ",B.jsx(g,{...(N=s==null?void 0:s.scrollDownButton)==null?void 0:N.icon})]})})]})}),B.jsx(kpe,{orientation:"vertical",...(z=s==null?void 0:s.scrollbar)==null?void 0:z.background,children:B.jsx(Ope,{...(U=s==null?void 0:s.scrollbar)==null?void 0:U.thumb})}),B.jsx(Ape,{...(Z=s==null?void 0:s.scrollbar)==null?void 0:Z.corner})]})}),jpe=()=>B.jsxs(k$,{children:[B.jsx(P$,{}),B.jsx(K$,{}),B.jsxs(GA,{children:[B.jsx(YA,{}),B.jsx(JA,{})]})]}),_s=H.object({title:H.string(),link:H.string().optional()}),G$=H.object({composerPlaceholder:H.string().optional(),botName:H.string().optional(),botAvatar:H.string().optional(),botDescription:H.string().optional(),website:_s.optional(),email:_s.optional(),phone:_s.optional(),privacyPolicy:_s.optional(),termsOfService:_s.optional()}),Y$=H.enum(["heading1","heading2","heading3","text","horizontalRule","link","italic","bold","orderedList","unorderedList","listItem","lineBreak","pre"]),J$=H.object({}).passthrough().transform(e=>e),Se=H.object({className:H.string().optional(),style:J$.optional()}),mp=H.object({container:Se.optional(),image:Se.optional(),fallback:Se.optional()}),X$=H.object({button:Se.optional(),text:H.record(Y$,Se.optional()),image:H.object({image:Se.optional(),placeholder:Se.optional()}).optional(),audio:Se.optional(),video:Se.optional(),file:H.object({container:Se.optional(),title:Se.optional(),icon:Se.optional()}).optional(),location:H.object({container:Se.optional(),title:Se.optional(),icon:Se.optional()}).optional(),column:Se.optional(),row:Se.optional(),bubble:Se.optional(),carousel:H.object({container:Se.optional(),slidesContainer:Se.optional(),backButton:Se.optional(),nextButton:Se.optional()}).optional(),dropdown:H.object({button:H.object({container:Se.optional(),icon:Se.optional(),text:Se.optional()}).optional(),content:H.object({container:Se.optional(),item:Se.optional()}).optional()}).optional()}),Q$=H.object({container:Se.optional(),modal:H.object({overlay:Se.optional(),container:Se.optional(),dialog:H.object({container:Se.optional(),title:H.object({container:Se.optional(),text:Se.optional(),closeIcon:Se.optional()}).optional(),content:Se.optional(),newConversation:H.object({text:Se.optional(),button:Se.optional()}).optional()}).optional()}).optional(),notification:H.object({container:Se.optional(),title:Se.optional(),description:Se.optional(),icon:Se.optional(),closeIcon:Se.optional()}).optional(),header:H.object({container:Se.optional(),content:H.object({container:Se.optional(),title:Se.optional(),description:Se.optional(),avatar:mp.optional(),actions:H.object({container:Se.optional(),icons:Se.optional()}).optional()}),expandedContent:H.object({container:Se.optional(),descriptionItems:H.object({container:Se.optional(),icon:Se.optional(),text:Se.optional(),link:Se.optional(),poweredBy:Se.optional()}).optional()}).optional(),description:H.object({container:Se.optional(),title:Se.optional(),subtitle:Se.optional()}).optional(),newConversationIcon:Se.optional()}).optional(),composer:H.object({container:Se.optional(),input:Se.optional(),button:H.object({container:Se.optional(),icon:Se.optional()}).optional()}).optional(),fab:H.object({icon:Se.optional(),container:Se.optional()}).optional(),messageList:H.object({scrollbar:H.object({container:Se.optional(),viewport:Se.optional(),thumb:Se.optional(),corner:Se.optional(),background:Se.optional()}).optional(),container:Se.optional(),marquee:H.object({content:Se.optional(),title:Se.optional(),description:Se.optional(),avatar:mp.optional(),container:Se.optional()}).optional(),scrollDownButton:H.object({container:Se.optional(),button:Se.optional(),icon:Se.optional()}).optional()}).optional(),message:H.object({container:Se.optional(),avatar:mp.optional(),blocks:X$.optional()}).optional(),loadingIndicator:H.object({container:Se.optional(),loader:Se.optional()}).optional()}),eP=H.enum(["opened","closed","initial"]),tP=H.object({data:H.record(H.string()).optional()}),nP=H.enum(["messaging","pushpin"]),rP=H.object({configuration:G$.optional().catch(void 0),theme:Q$.optional().catch(void 0),style:H.string().optional().catch(void 0),user:tP.optional().catch(void 0)}),Lpe=rP.extend({clientId:H.string(),botId:H.string(),selector:H.string().optional().catch(void 0),webchatScriptUrl:H.string().optional().catch(void 0),fabScriptUrl:H.string().optional().catch(void 0),messagingUrl:H.string().optional().catch(void 0),pushpinUrl:H.string().optional().catch(void 0),clientMode:nP.optional().catch(void 0),defaultState:eP.optional().catch(void 0)}),Fpe=({clientId:e,apiUrl:t="https://webchat.botpress.cloud",mode:n="pushpin"})=>n==="messaging"?new xO({url:t,clientId:e}):new KA({apiUrl:t,clientId:e});var mv={},gv={};const Upe=!1,Bpe=/\r?\n/,zpe=/\bono[ @]/;function Zpe(e){return!!(e&&e.configurable&&typeof e.get=="function")}function qpe(e){return!!(!e||e.writable||typeof e.set=="function")}function iP(e,t){let n=oP(e.stack),r=t?t.stack:void 0;return n&&r?n+`
421
+ `)},lfe=0,vs=[];function cfe(e){var t=$.useRef([]),n=$.useRef([0,0]),r=$.useRef(),i=$.useState(lfe++)[0],o=$.useState(function(){return f$()})[0],a=$.useRef(e);$.useEffect(function(){a.current=e},[e]),$.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=h5([e.lockRef.current],(e.shards||[]).map(v$),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=$.useCallback(function(m,v){if("touches"in m&&m.touches.length===2)return!a.current.allowPinchZoom;var g=lp(m),y=n.current,b="deltaX"in m?m.deltaX:y[0]-g[0],x="deltaY"in m?m.deltaY:y[1]-g[1],_,S=m.target,R=Math.abs(b)>Math.abs(x)?"h":"v";if("touches"in m&&R==="h"&&S.type==="range")return!1;var M=h$(R,S);if(!M)return!0;if(M?_=R:(_=R==="v"?"h":"v",M=h$(R,S)),!M)return!1;if(!r.current&&"changedTouches"in m&&(b||x)&&(r.current=_),!_)return!0;var j=r.current||_;return ofe(j,v,m,j==="h"?b:x,!0)},[]),l=$.useCallback(function(m){var v=m;if(!(!vs.length||vs[vs.length-1]!==o)){var g="deltaY"in v?y$(v):lp(v),y=t.current.filter(function(_){return _.name===v.type&&_.target===v.target&&afe(_.delta,g)})[0];if(y&&y.should){v.cancelable&&v.preventDefault();return}if(!y){var b=(a.current.shards||[]).map(v$).filter(Boolean).filter(function(_){return _.contains(v.target)}),x=b.length>0?s(v,b[0]):!a.current.noIsolation;x&&v.cancelable&&v.preventDefault()}}},[]),c=$.useCallback(function(m,v,g,y){var b={name:m,delta:v,target:g,should:y};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(x){return x!==b})},1)},[]),u=$.useCallback(function(m){n.current=lp(m),r.current=void 0},[]),d=$.useCallback(function(m){c(m.type,y$(m),m.target,s(m,e.lockRef.current))},[]),p=$.useCallback(function(m){c(m.type,lp(m),m.target,s(m,e.lockRef.current))},[]);$.useEffect(function(){return vs.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",l,ys),document.addEventListener("touchmove",l,ys),document.addEventListener("touchstart",u,ys),function(){vs=vs.filter(function(m){return m!==o}),document.removeEventListener("wheel",l,ys),document.removeEventListener("touchmove",l,ys),document.removeEventListener("touchstart",u,ys)}},[]);var f=e.removeScrollBar,h=e.inert;return $.createElement($.Fragment,null,h?$.createElement(o,{styles:sfe(i)}):null,f?$.createElement(Xde,{gapMode:"margin"}):null)}const ufe=Ude(u$,cfe);var b$=$.forwardRef(function(e,t){return $.createElement(ap,lr({},e,{ref:t,sideCar:ufe}))});b$.classNames=ap.classNames;const dfe=b$;var ffe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},bs=new WeakMap,cp=new WeakMap,up={},sv=0,w$=function(e){return e&&(e.host||w$(e.parentNode))},pfe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=w$(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})},hfe=function(e,t,n,r){var i=pfe(t,Array.isArray(e)?e:[e]);up[n]||(up[n]=new WeakMap);var o=up[n],a=[],s=new Set,l=new Set(i),c=function(d){!d||s.has(d)||(s.add(d),c(d.parentNode))};i.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(p){if(s.has(p))u(p);else{var f=p.getAttribute(r),h=f!==null&&f!=="false",m=(bs.get(p)||0)+1,v=(o.get(p)||0)+1;bs.set(p,m),o.set(p,v),a.push(p),m===1&&h&&cp.set(p,!0),v===1&&p.setAttribute(n,"true"),h||p.setAttribute(r,"true")}})};return u(t),s.clear(),sv++,function(){a.forEach(function(d){var p=bs.get(d)-1,f=o.get(d)-1;bs.set(d,p),o.set(d,f),p||(cp.has(d)||d.removeAttribute(r),cp.delete(d)),f||d.removeAttribute(n)}),sv--,sv||(bs=new WeakMap,bs=new WeakMap,cp=new WeakMap,up={})}},mfe=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||ffe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),hfe(r,i,n,"aria-hidden")):function(){return null}};const _$="Dialog",[x$,dbe]=kc(_$),[gfe,Ei]=x$(_$),yfe=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,s=w.useRef(null),l=w.useRef(null),[c=!1,u]=QA({prop:r,defaultProp:i,onChange:o});return w.createElement(gfe,{scope:t,triggerRef:s,contentRef:l,contentId:np(),titleId:np(),descriptionId:np(),open:c,onOpenChange:u,onOpenToggle:w.useCallback(()=>u(d=>!d),[u]),modal:a},n)},vfe="DialogTrigger",bfe=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ei(vfe,n),o=Jn(t,i.triggerRef);return w.createElement(gn.button,lt({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":cv(i.open)},r,{ref:o,onClick:Pn(e.onClick,i.onOpenToggle)}))}),wfe="DialogPortal",[fbe,S$]=x$(wfe,{forceMount:void 0}),lv="DialogOverlay",_fe=w.forwardRef((e,t)=>{const n=S$(lv,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Ei(lv,e.__scopeDialog);return o.modal?w.createElement(io,{present:r||o.open},w.createElement(xfe,lt({},i,{ref:t}))):null}),xfe=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ei(lv,n);return w.createElement(dfe,{as:Up,allowPinchZoom:!0,shards:[i.contentRef]},w.createElement(gn.div,lt({"data-state":cv(i.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),dc="DialogContent",Sfe=w.forwardRef((e,t)=>{const n=S$(dc,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Ei(dc,e.__scopeDialog);return w.createElement(io,{present:r||o.open},o.modal?w.createElement(Efe,lt({},i,{ref:t})):w.createElement(Cfe,lt({},i,{ref:t})))}),Efe=w.forwardRef((e,t)=>{const n=Ei(dc,e.__scopeDialog),r=w.useRef(null),i=Jn(t,n.contentRef,r);return w.useEffect(()=>{const o=r.current;if(o)return mfe(o)},[]),w.createElement(E$,lt({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Pn(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Pn(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:Pn(e.onFocusOutside,o=>o.preventDefault())}))}),Cfe=w.forwardRef((e,t)=>{const n=Ei(dc,e.__scopeDialog),r=w.useRef(!1),i=w.useRef(!1);return w.createElement(E$,lt({},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()}}))}),E$=w.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,s=Ei(dc,n),l=w.useRef(null),c=Jn(t,l);return Pde(),w.createElement(w.Fragment,null,w.createElement(xde,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},w.createElement(bde,lt({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":cv(s.open)},a,{ref:c,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),Tfe="DialogTitle",kfe=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ei(Tfe,n);return w.createElement(gn.h2,lt({id:i.titleId},r,{ref:t}))}),Ofe="DialogClose",Afe=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ei(Ofe,n);return w.createElement(gn.button,lt({type:"button"},r,{ref:t,onClick:Pn(e.onClick,()=>i.onOpenChange(!1))}))});function cv(e){return e?"open":"closed"}const $fe=yfe,Pfe=bfe,Ife=_fe,Rfe=Sfe,Mfe=kfe,C$=Afe;function Nfe({title:e,titleId:t,...n},r){return $.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?$.createElement("title",{id:t},e):null,$.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))}const T$=$.forwardRef(Nfe);function oo({open:e,onOpenChange:t,children:n}){return U.jsx($fe,{open:e,onOpenChange:t,children:n})}function Dfe({title:e,children:t}){var r,i,o,a,s,l,c,u;const{theme:{modal:n}}=$t();return U.jsxs(U.Fragment,{children:[U.jsx(Ife,{...n==null?void 0:n.overlay}),U.jsx("div",{...n==null?void 0:n.container,children:U.jsxs(Rfe,{...(r=n==null?void 0:n.dialog)==null?void 0:r.container,children:[U.jsxs("div",{...(o=(i=n==null?void 0:n.dialog)==null?void 0:i.title)==null?void 0:o.container,children:[U.jsx(Mfe,{...(s=(a=n==null?void 0:n.dialog)==null?void 0:a.title)==null?void 0:s.text,children:e}),U.jsx(C$,{children:U.jsx(T$,{role:"button",tabIndex:0,...(c=(l=n==null?void 0:n.dialog)==null?void 0:l.title)==null?void 0:c.closeIcon})})]}),U.jsx("div",{...(u=n==null?void 0:n.dialog)==null?void 0:u.content,children:t})]})})]})}oo.Button=Pfe,oo.Close=C$,oo.Content=Dfe;const k$=w.forwardRef(({children:e,...t},n)=>{const{theme:{container:r}}=$t();return U.jsxs("div",{...t,...r,ref:n,children:[U.jsx(DF,{}),U.jsxs(XA,{children:[U.jsx(jfe,{}),e]})]})}),jfe=()=>{const{theme:{modal:e},state:{connected:t}}=$t(),{showModal:n}=Tw();return w.useEffect(()=>{var r,i,o,a;t||n({title:"Connection Error",content:U.jsxs(U.Fragment,{children:[U.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."}),U.jsx(oo.Close,{asChild:!0,children:U.jsx("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]),U.jsx(U.Fragment,{})},Lfe=w.forwardRef(({children:e,onClick:t,...n},r)=>{const{theme:{fab:i}}=$t(),{container:o,icon:a}=i??{};return U.jsx("div",{...n,...o,ref:r,onClick:t,children:U.jsx("div",{...a})})}),O$="Collapsible",[Ffe,hbe]=kc(O$),[Ufe,uv]=Ffe(O$),Bfe=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:a,...s}=e,[l=!1,c]=QA({prop:r,defaultProp:i,onChange:a});return w.createElement(Ufe,{scope:n,disabled:o,contentId:np(),open:l,onOpenToggle:w.useCallback(()=>c(u=>!u),[c])},w.createElement(gn.div,lt({"data-state":dv(l),"data-disabled":o?"":void 0},s,{ref:t})))}),zfe="CollapsibleTrigger",Zfe=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=uv(zfe,n);return w.createElement(gn.button,lt({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":dv(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},r,{ref:t,onClick:Pn(e.onClick,i.onOpenToggle)}))}),A$="CollapsibleContent",qfe=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=uv(A$,e.__scopeCollapsible);return w.createElement(io,{present:n||i.open},({present:o})=>w.createElement(Hfe,lt({},r,{ref:t,present:o})))}),Hfe=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,a=uv(A$,n),[s,l]=w.useState(r),c=w.useRef(null),u=Jn(t,c),d=w.useRef(0),p=d.current,f=w.useRef(0),h=f.current,m=a.open||s,v=w.useRef(m),g=w.useRef();return w.useEffect(()=>{const y=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(y)},[]),na(()=>{const y=c.current;if(y){g.current=g.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const b=y.getBoundingClientRect();d.current=b.height,f.current=b.width,v.current||(y.style.transitionDuration=g.current.transitionDuration,y.style.animationName=g.current.animationName),l(r)}},[a.open,r]),w.createElement(gn.div,lt({"data-state":dv(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!m},o,{ref:u,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style}}),m&&i)});function dv(e){return e?"open":"closed"}const Wfe=Bfe,Vfe=Zfe,Kfe=qfe,Gfe=e=>$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e},$.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"})),$$=({...e})=>{var a,s;const{theme:{header:t,modal:n},client:r}=$t(),{showModal:i}=Tw(),o=l=>{var c,u,d,p;l.stopPropagation(),i({title:"Restart Conversation",content:U.jsxs(U.Fragment,{children:[U.jsx("p",{...(u=(c=n==null?void 0:n.dialog)==null?void 0:c.newConversation)==null?void 0:u.text,children:"Are you sure you want to restart a new conversation?"}),U.jsx(oo.Close,{asChild:!0,children:U.jsx("button",{...(p=(d=n==null?void 0:n.dialog)==null?void 0:d.newConversation)==null?void 0:p.button,onClick:r==null?void 0:r.restartConversation,children:"Restart"})})]})})};return U.jsx(vU,{...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)}})},Yfe=({...e})=>{var i,o;const{theme:{header:t},closeWindow:n}=$t(),r=a=>{a.stopPropagation(),n==null||n()};return U.jsx(T$,{...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)}})},Jfe=w.memo(w.forwardRef(({defaultOpen:e,...t},n)=>{const{theme:{header:r}}=$t(),[i,o]=w.useState(!!e);return U.jsx(Wfe,{open:i,onOpenChange:o,...t,...r==null?void 0:r.container,ref:n})})),Xfe=w.forwardRef((e,t)=>{var r;const{theme:{header:n}}=$t();return U.jsx(Vfe,{...e,...(r=n==null?void 0:n.content)==null?void 0:r.container,ref:t})}),Qfe=w.forwardRef((e,t)=>{var r;const{theme:{header:n}}=$t();return U.jsx(Kfe,{...e,...(r=n==null?void 0:n.expandedContent)==null?void 0:r.container,ref:t})}),epe=w.forwardRef(({src:e,children:t},n)=>{var o;const{theme:{header:r},client:i}=$t();return U.jsx(Zp,{ref:n,userId:i==null?void 0:i.clientId,children:t,src:e,...(o=r==null?void 0:r.content)==null?void 0:o.avatar})}),tpe=w.forwardRef((e,t)=>{var r;const{theme:{header:n}}=$t();return U.jsx("h2",{...e,...(r=n==null?void 0:n.content)==null?void 0:r.title,ref:t})}),npe=w.forwardRef((e,t)=>{var r;const{theme:{header:n}}=$t();return U.jsx("p",{...e,...(r=n==null?void 0:n.content)==null?void 0:r.description,ref:t})}),rpe=w.forwardRef((e,t)=>{var r,i;const{theme:{header:n}}=$t();return U.jsx("div",{...e,...(i=(r=n==null?void 0:n.content)==null?void 0:r.actions)==null?void 0:i.container,ref:t})}),or=Object.assign(Jfe,{Content:Xfe,ExpandedContent:Qfe,Avatar:epe,Description:npe,Title:tpe,Actions:rpe,DescriptionItem:({icon:e,title:t,link:n,...r})=>{var s,l,c,u,d,p,f,h,m,v,g,y;const{theme:{header:i}}=$t(),o=e??Gfe,a=b=>{b&&HL(b)};return!n&&!t?null:n?U.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:"noopener",children:[U.jsx(o,{...(u=(c=i==null?void 0:i.expandedContent)==null?void 0:c.descriptionItems)==null?void 0:u.icon}),U.jsx("p",{...(p=(d=i==null?void 0:i.expandedContent)==null?void 0:d.descriptionItems)==null?void 0:p.link,children:t})]}):U.jsxs("div",{...r,...(h=(f=i==null?void 0:i.expandedContent)==null?void 0:f.descriptionItems)==null?void 0:h.container,onClick:b=>{a(b.currentTarget.textContent)},children:[U.jsx(o,{...(v=(m=i==null?void 0:i.expandedContent)==null?void 0:m.descriptionItems)==null?void 0:v.icon}),U.jsx("p",{...(y=(g=i==null?void 0:i.expandedContent)==null?void 0:g.descriptionItems)==null?void 0:y.text,children:t})]})}}),P$=()=>{var i,o,a,s,l,c,u,d,p,f,h,m,v,g,y,b,x,_,S;const{configuration:e,closeWindow:t,theme:{header:n}}=$t(),r=!!((i=e.email)!=null&&i.title)||!!((o=e.phone)!=null&&o.title)||!!((a=e.website)!=null&&a.title)||!!((s=e.termsOfService)!=null&&s.link)||!!((l=e.privacyPolicy)!=null&&l.link);return U.jsxs(or,{open:r?void 0:!1,"data-disabled":r?void 0:"",children:[U.jsxs(or.Content,{children:[U.jsx(or.Avatar,{src:e.botAvatar,children:e.botName||"Bot"}),U.jsx(or.Title,{children:e.botName||"Bot"}),e.botDescription&&U.jsx(or.Description,{children:e.botDescription}),U.jsxs(or.Actions,{children:[U.jsx($$,{}),t&&U.jsx(Yfe,{})]})]}),U.jsxs(or.ExpandedContent,{children:[U.jsxs("div",{"data-links":"",...(c=n==null?void 0:n.expandedContent)==null?void 0:c.group,children:[U.jsx(or.DescriptionItem,{"data-email":"",icon:hB,title:(u=e.email)==null?void 0:u.title,link:(d=e.email)==null?void 0:d.link}),U.jsx(or.DescriptionItem,{"data-phone":"",icon:wB,title:(p=e.phone)==null?void 0:p.title,link:(f=e.phone)==null?void 0:f.link}),U.jsx(or.DescriptionItem,{"data-website":"",link:(h=e.website)==null?void 0:h.link,icon:gB,title:(m=e.website)==null?void 0:m.title})]}),U.jsxs("div",{"data-legal":"",...(v=n==null?void 0:n.expandedContent)==null?void 0:v.group,children:[U.jsx(or.DescriptionItem,{"data-terms":"",link:(g=e.termsOfService)==null?void 0:g.link,icon:fB,title:(y=e.termsOfService)==null?void 0:y.title}),U.jsx(or.DescriptionItem,{"data-privacy":"",link:(b=e.privacyPolicy)==null?void 0:b.link,icon:vB,title:(x=e.privacyPolicy)==null?void 0:x.title})]}),U.jsx("div",{...(S=(_=n==null?void 0:n.expandedContent)==null?void 0:_.descriptionItems)==null?void 0:S.poweredBy,children:"⚡ by Botpress"})]})]})},ipe=or,I$=w.memo(({...e})=>{const{theme:{loadingIndicator:t}}=$t();return U.jsx("div",{...e,...t==null?void 0:t.container,children:U.jsx("div",{...t==null?void 0:t.loader})})}),fv=w.forwardRef(({direction:e,block:t,scroll:n,disableInput:r,children:i,sender:o,...a},s)=>{var m,v,g,y;const[l,c]=w.useState([]),{theme:{message:u},configuration:{botAvatar:d,botName:p},client:f}=$t();_5(()=>{n()}),w.useEffect(()=>{l.length===0&&n()},[l.length]);const h=bb((f==null?void 0:f.clientId)??"",15);return U.jsx(Ew.Provider,{value:{isLoading:l,setIsLoading:c},children:U.jsxs("div",{...a,...u==null?void 0:u.container,"data-loaded":l.length===0,"data-disable-input":!!r,"data-direction":e,ref:s,children:[U.jsxs(gb,{"data-color":h,...(m=u==null?void 0:u.avatar)==null?void 0:m.container,children:[U.jsx(yb,{...(v=u==null?void 0:u.avatar)==null?void 0:v.image,src:(o==null?void 0:o.avatar)??d}),U.jsx(vb,{...(g=u==null?void 0:u.avatar)==null?void 0:g.fallback,children:(o==null?void 0:o.name[0])??((y=p??"Bot")==null?void 0:y[0])})]}),t&&U.jsx(ga,{block:t,styles:u==null?void 0:u.blocks}),i]})})}),ope=w.createContext(void 0);function ape(e){const t=w.useContext(ope);return e||t||"ltr"}function spe(e,[t,n]){return Math.min(n,Math.max(t,e))}function lpe(e,t){return w.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const R$="ScrollArea",[M$,gbe]=kc(R$),[cpe,pr]=M$(R$),upe=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=600,...a}=e,[s,l]=w.useState(null),[c,u]=w.useState(null),[d,p]=w.useState(null),[f,h]=w.useState(null),[m,v]=w.useState(null),[g,y]=w.useState(0),[b,x]=w.useState(0),[_,S]=w.useState(!1),[R,M]=w.useState(!1),j=Jn(t,N=>l(N)),k=ape(i);return w.createElement(cpe,{scope:n,type:r,dir:k,scrollHideDelay:o,scrollArea:s,viewport:c,onViewportChange:u,content:d,onContentChange:p,scrollbarX:f,onScrollbarXChange:h,scrollbarXEnabled:_,onScrollbarXEnabledChange:S,scrollbarY:m,onScrollbarYChange:v,scrollbarYEnabled:R,onScrollbarYEnabledChange:M,onCornerWidthChange:y,onCornerHeightChange:x},w.createElement(gn.div,lt({dir:k},a,{ref:j,style:{position:"relative","--radix-scroll-area-corner-width":g+"px","--radix-scroll-area-corner-height":b+"px",...e.style}})))}),dpe="ScrollAreaViewport",fpe=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,...i}=e,o=pr(dpe,n),a=w.useRef(null),s=Jn(t,a,o.onViewportChange);return w.createElement(w.Fragment,null,w.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}"}}),w.createElement(gn.div,lt({"data-radix-scroll-area-viewport":""},i,{ref:s,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style}}),w.createElement("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"}},r)))}),Ci="ScrollAreaScrollbar",ppe=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=pr(Ci,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:a}=i,s=e.orientation==="horizontal";return w.useEffect(()=>(s?o(!0):a(!0),()=>{s?o(!1):a(!1)}),[s,o,a]),i.type==="hover"?w.createElement(hpe,lt({},r,{ref:t,forceMount:n})):i.type==="scroll"?w.createElement(mpe,lt({},r,{ref:t,forceMount:n})):i.type==="auto"?w.createElement(N$,lt({},r,{ref:t,forceMount:n})):i.type==="always"?w.createElement(pv,lt({},r,{ref:t})):null}),hpe=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=pr(Ci,e.__scopeScrollArea),[o,a]=w.useState(!1);return w.useEffect(()=>{const s=i.scrollArea;let l=0;if(s){const c=()=>{window.clearTimeout(l),a(!0)},u=()=>{l=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return s.addEventListener("pointerenter",c),s.addEventListener("pointerleave",u),()=>{window.clearTimeout(l),s.removeEventListener("pointerenter",c),s.removeEventListener("pointerleave",u)}}},[i.scrollArea,i.scrollHideDelay]),w.createElement(io,{present:n||o},w.createElement(N$,lt({"data-state":o?"visible":"hidden"},r,{ref:t})))}),mpe=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=pr(Ci,e.__scopeScrollArea),o=e.orientation==="horizontal",a=pp(()=>l("SCROLL_END"),100),[s,l]=lpe("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 w.useEffect(()=>{if(s==="idle"){const c=window.setTimeout(()=>l("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(c)}},[s,i.scrollHideDelay,l]),w.useEffect(()=>{const c=i.viewport,u=o?"scrollLeft":"scrollTop";if(c){let d=c[u];const p=()=>{const f=c[u];d!==f&&(l("SCROLL"),a()),d=f};return c.addEventListener("scroll",p),()=>c.removeEventListener("scroll",p)}},[i.viewport,o,l,a]),w.createElement(io,{present:n||s!=="hidden"},w.createElement(pv,lt({"data-state":s==="hidden"?"hidden":"visible"},r,{ref:t,onPointerEnter:Pn(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Pn(e.onPointerLeave,()=>l("POINTER_LEAVE"))})))}),N$=w.forwardRef((e,t)=>{const n=pr(Ci,e.__scopeScrollArea),{forceMount:r,...i}=e,[o,a]=w.useState(!1),s=e.orientation==="horizontal",l=pp(()=>{if(n.viewport){const c=n.viewport.offsetWidth<n.viewport.scrollWidth,u=n.viewport.offsetHeight<n.viewport.scrollHeight;a(s?c:u)}},10);return ws(n.viewport,l),ws(n.content,l),w.createElement(io,{present:r||o},w.createElement(pv,lt({"data-state":o?"visible":"hidden"},i,{ref:t})))}),pv=w.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,i=pr(Ci,e.__scopeScrollArea),o=w.useRef(null),a=w.useRef(0),[s,l]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=F$(s.viewport,s.content),u={...r,sizes:s,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:p=>o.current=p,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:p=>a.current=p};function d(p,f){return Spe(p,a.current,s,f)}return n==="horizontal"?w.createElement(gpe,lt({},u,{ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const p=i.viewport.scrollLeft,f=U$(p,s,i.dir);o.current.style.transform=`translate3d(${f}px, 0, 0)`}},onWheelScroll:p=>{i.viewport&&(i.viewport.scrollLeft=p)},onDragScroll:p=>{i.viewport&&(i.viewport.scrollLeft=d(p,i.dir))}})):n==="vertical"?w.createElement(ype,lt({},u,{ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const p=i.viewport.scrollTop,f=U$(p,s);o.current.style.transform=`translate3d(0, ${f}px, 0)`}},onWheelScroll:p=>{i.viewport&&(i.viewport.scrollTop=p)},onDragScroll:p=>{i.viewport&&(i.viewport.scrollTop=d(p))}})):null}),gpe=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=pr(Ci,e.__scopeScrollArea),[a,s]=w.useState(),l=w.useRef(null),c=Jn(t,l,o.onScrollbarXChange);return w.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),w.createElement(j$,lt({"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":fp(n)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,d)=>{if(o.viewport){const p=o.viewport.scrollLeft+u.deltaX;e.onWheelScroll(p),z$(p,d)&&u.preventDefault()}},onResize:()=>{l.current&&o.viewport&&a&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:dp(a.paddingLeft),paddingEnd:dp(a.paddingRight)}})}}))}),ype=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=pr(Ci,e.__scopeScrollArea),[a,s]=w.useState(),l=w.useRef(null),c=Jn(t,l,o.onScrollbarYChange);return w.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),w.createElement(j$,lt({"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":fp(n)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,d)=>{if(o.viewport){const p=o.viewport.scrollTop+u.deltaY;e.onWheelScroll(p),z$(p,d)&&u.preventDefault()}},onResize:()=>{l.current&&o.viewport&&a&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:dp(a.paddingTop),paddingEnd:dp(a.paddingBottom)}})}}))}),[vpe,D$]=M$(Ci),j$=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:a,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:d,...p}=e,f=pr(Ci,n),[h,m]=w.useState(null),v=Jn(t,j=>m(j)),g=w.useRef(null),y=w.useRef(""),b=f.viewport,x=r.content-r.viewport,_=Nn(u),S=Nn(l),R=pp(d,10);function M(j){if(g.current){const k=j.clientX-g.current.left,N=j.clientY-g.current.top;c({x:k,y:N})}}return w.useEffect(()=>{const j=k=>{const N=k.target;(h==null?void 0:h.contains(N))&&_(k,x)};return document.addEventListener("wheel",j,{passive:!1}),()=>document.removeEventListener("wheel",j,{passive:!1})},[b,h,x,_]),w.useEffect(S,[r,S]),ws(h,R),ws(f.content,R),w.createElement(vpe,{scope:n,scrollbar:h,hasThumb:i,onThumbChange:Nn(o),onThumbPointerUp:Nn(a),onThumbPositionChange:S,onThumbPointerDown:Nn(s)},w.createElement(gn.div,lt({},p,{ref:v,style:{position:"absolute",...p.style},onPointerDown:Pn(e.onPointerDown,j=>{j.button===0&&(j.target.setPointerCapture(j.pointerId),g.current=h.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",f.viewport&&(f.viewport.style.scrollBehavior="auto"),M(j))}),onPointerMove:Pn(e.onPointerMove,M),onPointerUp:Pn(e.onPointerUp,j=>{const k=j.target;k.hasPointerCapture(j.pointerId)&&k.releasePointerCapture(j.pointerId),document.body.style.webkitUserSelect=y.current,f.viewport&&(f.viewport.style.scrollBehavior=""),g.current=null})})))}),hv="ScrollAreaThumb",bpe=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=D$(hv,e.__scopeScrollArea);return w.createElement(io,{present:n||i.hasThumb},w.createElement(wpe,lt({ref:t},r)))}),wpe=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,o=pr(hv,n),a=D$(hv,n),{onThumbPositionChange:s}=a,l=Jn(t,d=>a.onThumbChange(d)),c=w.useRef(),u=pp(()=>{c.current&&(c.current(),c.current=void 0)},100);return w.useEffect(()=>{const d=o.viewport;if(d){const p=()=>{if(u(),!c.current){const f=Epe(d,s);c.current=f,s()}};return s(),d.addEventListener("scroll",p),()=>d.removeEventListener("scroll",p)}},[o.viewport,u,s]),w.createElement(gn.div,lt({"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:Pn(e.onPointerDownCapture,d=>{const f=d.target.getBoundingClientRect(),h=d.clientX-f.left,m=d.clientY-f.top;a.onThumbPointerDown({x:h,y:m})}),onPointerUp:Pn(e.onPointerUp,a.onThumbPointerUp)}))}),L$="ScrollAreaCorner",_pe=w.forwardRef((e,t)=>{const n=pr(L$,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?w.createElement(xpe,lt({},e,{ref:t})):null}),xpe=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=pr(L$,n),[o,a]=w.useState(0),[s,l]=w.useState(0),c=!!(o&&s);return ws(i.scrollbarX,()=>{var u;const d=((u=i.scrollbarX)===null||u===void 0?void 0:u.offsetHeight)||0;i.onCornerHeightChange(d),l(d)}),ws(i.scrollbarY,()=>{var u;const d=((u=i.scrollbarY)===null||u===void 0?void 0:u.offsetWidth)||0;i.onCornerWidthChange(d),a(d)}),c?w.createElement(gn.div,lt({},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 dp(e){return e?parseInt(e,10):0}function F$(e,t){const n=e/t;return isNaN(n)?0:n}function fp(e){const t=F$(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Spe(e,t,n,r="ltr"){const i=fp(n),o=i/2,a=t||o,s=i-a,l=n.scrollbar.paddingStart+a,c=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r==="ltr"?[0,u]:[u*-1,0];return B$([l,c],d)(e)}function U$(e,t,n="ltr"){const r=fp(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=spe(e,l);return B$([0,a],[0,s])(c)}function B$(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 z$(e,t){return e>0&&e<t}const Epe=(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 pp(e,t){const n=Nn(e),r=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),w.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function ws(e,t){const n=Nn(t);na(()=>{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 Cpe=upe,Tpe=fpe,kpe=ppe,Ope=bpe,Ape=_pe;var Z$={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(K,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",l="hour",c="day",u="week",d="month",p="quarter",f="year",h="date",m="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|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,y={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(Z){var L=["th","st","nd","rd"],F=Z%100;return"["+Z+(L[(F-20)%10]||L[F]||L[0])+"]"}},b=function(Z,L,F){var V=String(Z);return!V||V.length>=L?Z:""+Array(L+1-V.length).join(F)+Z},x={s:b,z:function(Z){var L=-Z.utcOffset(),F=Math.abs(L),V=Math.floor(F/60),W=F%60;return(L<=0?"+":"-")+b(V,2,"0")+":"+b(W,2,"0")},m:function Z(L,F){if(L.date()<F.date())return-Z(F,L);var V=12*(F.year()-L.year())+(F.month()-L.month()),W=L.clone().add(V,d),pe=F-W<0,C=L.clone().add(V+(pe?-1:1),d);return+(-(V+(F-W)/(pe?W-C:C-W))||0)},a:function(Z){return Z<0?Math.ceil(Z)||0:Math.floor(Z)},p:function(Z){return{M:d,y:f,w:u,d:c,D:h,h:l,m:s,s:a,ms:o,Q:p}[Z]||String(Z||"").toLowerCase().replace(/s$/,"")},u:function(Z){return Z===void 0}},_="en",S={};S[_]=y;var R="$isDayjsObject",M=function(Z){return Z instanceof z||!(!Z||!Z[R])},j=function Z(L,F,V){var W;if(!L)return _;if(typeof L=="string"){var pe=L.toLowerCase();S[pe]&&(W=pe),F&&(S[pe]=F,W=pe);var C=L.split("-");if(!W&&C.length>1)return Z(C[0])}else{var se=L.name;S[se]=L,W=se}return!V&&W&&(_=W),W||!V&&_},k=function(Z,L){if(M(Z))return Z.clone();var F=typeof L=="object"?L:{};return F.date=Z,F.args=arguments,new z(F)},N=x;N.l=j,N.i=M,N.w=function(Z,L){return k(Z,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var z=function(){function Z(F){this.$L=j(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[R]=!0}var L=Z.prototype;return L.parse=function(F){this.$d=function(V){var W=V.date,pe=V.utc;if(W===null)return new Date(NaN);if(N.u(W))return new Date;if(W instanceof Date)return new Date(W);if(typeof W=="string"&&!/Z$/i.test(W)){var C=W.match(v);if(C){var se=C[2]-1||0,we=(C[7]||"0").substring(0,3);return pe?new Date(Date.UTC(C[1],se,C[3]||1,C[4]||0,C[5]||0,C[6]||0,we)):new Date(C[1],se,C[3]||1,C[4]||0,C[5]||0,C[6]||0,we)}}return new Date(W)}(F),this.init()},L.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()},L.$utils=function(){return N},L.isValid=function(){return this.$d.toString()!==m},L.isSame=function(F,V){var W=k(F);return this.startOf(V)<=W&&W<=this.endOf(V)},L.isAfter=function(F,V){return k(F)<this.startOf(V)},L.isBefore=function(F,V){return this.endOf(V)<k(F)},L.$g=function(F,V,W){return N.u(F)?this[V]:this.set(W,F)},L.unix=function(){return Math.floor(this.valueOf()/1e3)},L.valueOf=function(){return this.$d.getTime()},L.startOf=function(F,V){var W=this,pe=!!N.u(V)||V,C=N.p(F),se=function(We,_e){var ye=N.w(W.$u?Date.UTC(W.$y,_e,We):new Date(W.$y,_e,We),W);return pe?ye:ye.endOf(c)},we=function(We,_e){return N.w(W.toDate()[We].apply(W.toDate("s"),(pe?[0,0,0,0]:[23,59,59,999]).slice(_e)),W)},O=this.$W,Oe=this.$M,Be=this.$D,Me="set"+(this.$u?"UTC":"");switch(C){case f:return pe?se(1,0):se(31,11);case d:return pe?se(1,Oe):se(0,Oe+1);case u:var Ze=this.$locale().weekStart||0,nt=(O<Ze?O+7:O)-Ze;return se(pe?Be-nt:Be+(6-nt),Oe);case c:case h:return we(Me+"Hours",0);case l:return we(Me+"Minutes",1);case s:return we(Me+"Seconds",2);case a:return we(Me+"Milliseconds",3);default:return this.clone()}},L.endOf=function(F){return this.startOf(F,!1)},L.$set=function(F,V){var W,pe=N.p(F),C="set"+(this.$u?"UTC":""),se=(W={},W[c]=C+"Date",W[h]=C+"Date",W[d]=C+"Month",W[f]=C+"FullYear",W[l]=C+"Hours",W[s]=C+"Minutes",W[a]=C+"Seconds",W[o]=C+"Milliseconds",W)[pe],we=pe===c?this.$D+(V-this.$W):V;if(pe===d||pe===f){var O=this.clone().set(h,1);O.$d[se](we),O.init(),this.$d=O.set(h,Math.min(this.$D,O.daysInMonth())).$d}else se&&this.$d[se](we);return this.init(),this},L.set=function(F,V){return this.clone().$set(F,V)},L.get=function(F){return this[N.p(F)]()},L.add=function(F,V){var W,pe=this;F=Number(F);var C=N.p(V),se=function(Oe){var Be=k(pe);return N.w(Be.date(Be.date()+Math.round(Oe*F)),pe)};if(C===d)return this.set(d,this.$M+F);if(C===f)return this.set(f,this.$y+F);if(C===c)return se(1);if(C===u)return se(7);var we=(W={},W[s]=r,W[l]=i,W[a]=n,W)[C]||1,O=this.$d.getTime()+F*we;return N.w(O,this)},L.subtract=function(F,V){return this.add(-1*F,V)},L.format=function(F){var V=this,W=this.$locale();if(!this.isValid())return W.invalidDate||m;var pe=F||"YYYY-MM-DDTHH:mm:ssZ",C=N.z(this),se=this.$H,we=this.$m,O=this.$M,Oe=W.weekdays,Be=W.months,Me=W.meridiem,Ze=function(_e,ye,$e,Se){return _e&&(_e[ye]||_e(V,pe))||$e[ye].slice(0,Se)},nt=function(_e){return N.s(se%12||12,_e,"0")},We=Me||function(_e,ye,$e){var Se=_e<12?"AM":"PM";return $e?Se.toLowerCase():Se};return pe.replace(g,function(_e,ye){return ye||function($e){switch($e){case"YY":return String(V.$y).slice(-2);case"YYYY":return N.s(V.$y,4,"0");case"M":return O+1;case"MM":return N.s(O+1,2,"0");case"MMM":return Ze(W.monthsShort,O,Be,3);case"MMMM":return Ze(Be,O);case"D":return V.$D;case"DD":return N.s(V.$D,2,"0");case"d":return String(V.$W);case"dd":return Ze(W.weekdaysMin,V.$W,Oe,2);case"ddd":return Ze(W.weekdaysShort,V.$W,Oe,3);case"dddd":return Oe[V.$W];case"H":return String(se);case"HH":return N.s(se,2,"0");case"h":return nt(1);case"hh":return nt(2);case"a":return We(se,we,!0);case"A":return We(se,we,!1);case"m":return String(we);case"mm":return N.s(we,2,"0");case"s":return String(V.$s);case"ss":return N.s(V.$s,2,"0");case"SSS":return N.s(V.$ms,3,"0");case"Z":return C}return null}(_e)||C.replace(":","")})},L.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},L.diff=function(F,V,W){var pe,C=this,se=N.p(V),we=k(F),O=(we.utcOffset()-this.utcOffset())*r,Oe=this-we,Be=function(){return N.m(C,we)};switch(se){case f:pe=Be()/12;break;case d:pe=Be();break;case p:pe=Be()/3;break;case u:pe=(Oe-O)/6048e5;break;case c:pe=(Oe-O)/864e5;break;case l:pe=Oe/i;break;case s:pe=Oe/r;break;case a:pe=Oe/n;break;default:pe=Oe}return W?pe:N.a(pe)},L.daysInMonth=function(){return this.endOf(d).$D},L.$locale=function(){return S[this.$L]},L.locale=function(F,V){if(!F)return this.$L;var W=this.clone(),pe=j(F,V,!0);return pe&&(W.$L=pe),W},L.clone=function(){return N.w(this.$d,this)},L.toDate=function(){return new Date(this.valueOf())},L.toJSON=function(){return this.isValid()?this.toISOString():null},L.toISOString=function(){return this.$d.toISOString()},L.toString=function(){return this.$d.toUTCString()},Z}(),B=z.prototype;return k.prototype=B,[["$ms",o],["$s",a],["$m",s],["$H",l],["$W",c],["$M",d],["$y",f],["$D",h]].forEach(function(Z){B[Z[1]]=function(L){return this.$g(L,Z[0],Z[1])}}),k.extend=function(Z,L){return Z.$i||(Z(L,z,k),Z.$i=!0),k},k.locale=j,k.isDayjs=M,k.unix=function(Z){return k(1e3*Z)},k.en=S[_],k.Ls=S,k.p={},k})})(Z$);var $pe=Z$.exports;const hp=ti($pe);var q$={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(K,function(){return function(n,r,i){r.prototype.isToday=function(){var o="YYYY-MM-DD",a=i();return this.format(o)===a.format(o)}}})})(q$);var Ppe=q$.exports;const Ipe=ti(Ppe);var H$={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(K,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)}}})})(H$);var Rpe=H$.exports;const Mpe=ti(Rpe);hp.extend(Ipe),hp.extend(Mpe);function Npe(e,t="day"){if(!e||e.length===0)return[];const n=[];n.push(W$(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;hp(i).isSame(o,t)||n.push(W$(o))}return n}function W$(e){return{direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:Dpe(e)}}}function Dpe(e,t=!1){const n=hp(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 V$=10*1e3,K$=w.memo(({scrollDownButton:e,...t})=>{var y,b,x,_,S,R,M,j,k,N,z,B,Z;const{messages:n,setState:r,client:i,configuration:o,messageContainerRef:a,theme:{messageList:s}}=$t(),l=w.useMemo(()=>Npe(n),[n]),[c,u]=w.useState(!0),{y:d}=k5(a),[p,f]=w.useState(!1),[h,m]=A5(),v=()=>{if(!a.current)return;const{scrollHeight:L}=a.current;c&&a.current.scrollTo({top:L})};w.useEffect(()=>{const L=new Date(Date.now()-V$+2e3);n.length>0&&n[n.length-1].timestamp<L&&f(!1)},[h]),_o(()=>i==null?void 0:i.on("messageSent",()=>{f(!0),m(new Date(Date.now()+V$))})),_o(()=>i==null?void 0:i.on("message",()=>{f(!1)})),w.useEffect(()=>{const L=n[n.length-1];r({disableComposer:!!(L!=null&&L.disableInput)})},[n.length]),w.useEffect(()=>{if(!a.current)return;const{offsetHeight:L,scrollHeight:F,scrollTop:V}=a.current;u(F<=V+L+100)},[d]);const g=e!=null&&e.icon?e==null?void 0:e.icon:gU;return U.jsxs(Cpe,{...(y=s==null?void 0:s.scrollbar)==null?void 0:y.container,scrollHideDelay:300,type:"hover",children:[U.jsx(Tpe,{...(b=s==null?void 0:s.scrollbar)==null?void 0:b.viewport,ref:a,children:U.jsxs("ul",{...t,...s==null?void 0:s.container,children:[U.jsxs("li",{...(x=s==null?void 0:s.marquee)==null?void 0:x.container,children:[U.jsx(Zp,{userId:i==null?void 0:i.clientId,src:o.botAvatar,...(_=s==null?void 0:s.marquee)==null?void 0:_.avatar,children:(o.botName||"Bot").slice(0,1)}),U.jsxs("div",{...(S=s==null?void 0:s.marquee)==null?void 0:S.content,children:[U.jsx("h1",{...(R=s==null?void 0:s.marquee)==null?void 0:R.title,children:o.botName||"Bot"}),U.jsx("p",{...(M=s==null?void 0:s.marquee)==null?void 0:M.description,children:o.botDescription})]})]}),l.map((L,F)=>U.jsx(fv,{scroll:v,...L},F)),p&&U.jsx(fv,{scroll:v,direction:"incoming",children:U.jsx(I$,{})}),U.jsx("li",{...(j=s==null?void 0:s.scrollDownButton)==null?void 0:j.container,children:!!n.length&&U.jsxs("button",{"data-is-at-bottom":c,...(k=s==null?void 0:s.scrollDownButton)==null?void 0:k.button,onClick:()=>{var L,F;return(F=a.current)==null?void 0:F.scrollBy({top:(L=a.current)==null?void 0:L.scrollHeight})},children:[(e==null?void 0:e.text)??"Back"," ",U.jsx(g,{...(N=s==null?void 0:s.scrollDownButton)==null?void 0:N.icon})]})})]})}),U.jsx(kpe,{orientation:"vertical",...(z=s==null?void 0:s.scrollbar)==null?void 0:z.background,children:U.jsx(Ope,{...(B=s==null?void 0:s.scrollbar)==null?void 0:B.thumb})}),U.jsx(Ape,{...(Z=s==null?void 0:s.scrollbar)==null?void 0:Z.corner})]})}),jpe=()=>U.jsxs(k$,{children:[U.jsx(P$,{}),U.jsx(K$,{}),U.jsxs(GA,{children:[U.jsx(YA,{}),U.jsx(JA,{})]})]}),_s=H.object({title:H.string(),link:H.string().optional()}),G$=H.object({composerPlaceholder:H.string().optional(),botName:H.string().optional(),botAvatar:H.string().optional(),botDescription:H.string().optional(),website:_s.optional(),email:_s.optional(),phone:_s.optional(),privacyPolicy:_s.optional(),termsOfService:_s.optional()}),Y$=H.enum(["heading1","heading2","heading3","text","horizontalRule","link","italic","bold","orderedList","unorderedList","listItem","lineBreak","pre"]),J$=H.object({}).passthrough().transform(e=>e),xe=H.object({className:H.string().optional(),style:J$.optional()}),mp=H.object({container:xe.optional(),image:xe.optional(),fallback:xe.optional()}),X$=H.object({button:xe.optional(),text:H.record(Y$,xe.optional()),image:H.object({image:xe.optional(),placeholder:xe.optional()}).optional(),audio:xe.optional(),video:xe.optional(),file:H.object({container:xe.optional(),title:xe.optional(),icon:xe.optional()}).optional(),location:H.object({container:xe.optional(),title:xe.optional(),icon:xe.optional()}).optional(),column:xe.optional(),row:xe.optional(),bubble:xe.optional(),carousel:H.object({container:xe.optional(),slidesContainer:xe.optional(),backButton:xe.optional(),nextButton:xe.optional()}).optional(),dropdown:H.object({button:H.object({container:xe.optional(),icon:xe.optional(),text:xe.optional()}).optional(),content:H.object({container:xe.optional(),item:xe.optional()}).optional()}).optional()}),Q$=H.object({container:xe.optional(),modal:H.object({overlay:xe.optional(),container:xe.optional(),dialog:H.object({container:xe.optional(),title:H.object({container:xe.optional(),text:xe.optional(),closeIcon:xe.optional()}).optional(),content:xe.optional(),newConversation:H.object({text:xe.optional(),button:xe.optional()}).optional()}).optional()}).optional(),notification:H.object({container:xe.optional(),title:xe.optional(),description:xe.optional(),icon:xe.optional(),closeIcon:xe.optional()}).optional(),header:H.object({container:xe.optional(),content:H.object({container:xe.optional(),title:xe.optional(),description:xe.optional(),avatar:mp.optional(),actions:H.object({container:xe.optional(),icons:xe.optional()}).optional()}),expandedContent:H.object({container:xe.optional(),group:xe.optional(),descriptionItems:H.object({container:xe.optional(),icon:xe.optional(),text:xe.optional(),link:xe.optional(),poweredBy:xe.optional()}).optional()}).optional(),description:H.object({container:xe.optional(),title:xe.optional(),subtitle:xe.optional()}).optional(),newConversationIcon:xe.optional()}).optional(),composer:H.object({container:xe.optional(),input:xe.optional(),button:H.object({container:xe.optional(),icon:xe.optional()}).optional()}).optional(),fab:H.object({icon:xe.optional(),container:xe.optional()}).optional(),messageList:H.object({scrollbar:H.object({container:xe.optional(),viewport:xe.optional(),thumb:xe.optional(),corner:xe.optional(),background:xe.optional()}).optional(),container:xe.optional(),marquee:H.object({content:xe.optional(),title:xe.optional(),description:xe.optional(),avatar:mp.optional(),container:xe.optional()}).optional(),scrollDownButton:H.object({container:xe.optional(),button:xe.optional(),icon:xe.optional()}).optional()}).optional(),message:H.object({container:xe.optional(),avatar:mp.optional(),blocks:X$.optional()}).optional(),loadingIndicator:H.object({container:xe.optional(),loader:xe.optional()}).optional()}),eP=H.enum(["opened","closed","initial"]),tP=H.object({data:H.record(H.string()).optional()}),nP=H.enum(["messaging","pushpin"]),rP=H.object({configuration:G$.optional().catch(void 0),theme:Q$.optional().catch(void 0),style:H.string().optional().catch(void 0),user:tP.optional().catch(void 0)}),Lpe=rP.extend({clientId:H.string(),botId:H.string(),selector:H.string().optional().catch(void 0),webchatScriptUrl:H.string().optional().catch(void 0),fabScriptUrl:H.string().optional().catch(void 0),messagingUrl:H.string().optional().catch(void 0),pushpinUrl:H.string().optional().catch(void 0),clientMode:nP.optional().catch(void 0),defaultState:eP.optional().catch(void 0)}),Fpe=({clientId:e,apiUrl:t="https://webchat.botpress.cloud",mode:n="pushpin"})=>n==="messaging"?new xO({url:t,clientId:e}):new KA({apiUrl:t,clientId:e});var mv={},gv={};const Upe=!1,Bpe=/\r?\n/,zpe=/\bono[ @]/;function Zpe(e){return!!(e&&e.configurable&&typeof e.get=="function")}function qpe(e){return!!(!e||e.writable||typeof e.set=="function")}function iP(e,t){let n=oP(e.stack),r=t?t.stack:void 0;return n&&r?n+`
422
422
 
423
423
  `+r:n||r}function Hpe(e,t,n){n?Object.defineProperty(t,"stack",{get:()=>{let r=e.get.apply(t);return iP({stack:r},n)},enumerable:!1,configurable:!0}):Wpe(t,e)}function oP(e){if(e){let t=e.split(Bpe),n;for(let r=0;r<t.length;r++){let i=t[r];if(zpe.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(`
424
424
  `)}return e}function Wpe(e,t){Object.defineProperty(e,"stack",{get:()=>oP(t.get.apply(e)),enumerable:!1,configurable:!0})}const Vpe=["function","symbol","undefined"],Kpe=["constructor","prototype","__proto__"],Gpe=Object.getPrototypeOf({});function aP(){let e={},t=this;for(let n of sP(t))if(typeof n=="string"){let r=t[n],i=typeof r;Vpe.includes(i)||(e[n]=r)}return e}function sP(e,t=[]){let n=[];for(;e&&e!==Gpe;)n=n.concat(Object.getOwnPropertyNames(e),Object.getOwnPropertySymbols(e)),e=Object.getPrototypeOf(e);let r=new Set(n);for(let i of t.concat(Kpe))r.delete(i);return r}const Ype=["name","message","stack"];function gp(e,t,n){let r=e;return Jpe(r,t),t&&typeof t=="object"&&Xpe(r,t),r.toJSON=aP,n&&typeof n=="object"&&Object.assign(r,n),r}function Jpe(e,t){let n=Object.getOwnPropertyDescriptor(e,"stack");Zpe(n)?Hpe(n,e,t):qpe(n)&&(e.stack=iP(e,t))}function Xpe(e,t){let n=sP(t,Ype),r=e,i=t;for(let o of n)if(r[o]===void 0)try{r[o]=i[o]}catch{}}function Qpe(e){return e=e||{},{concatMessages:e.concatMessages===void 0?!0:!!e.concatMessages,format:e.format===void 0?Upe:typeof e.format=="function"?e.format:!1}}function ehe(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?`
@@ -460,4 +460,4 @@ Parsed value is empty`);return a}catch(a){throw!a&&t.continueOnError?new Xo.Unma
460
460
  `:""}uI.dump=aye;var $I=kv,sye=uI;function zv(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.")}}In.Type=Un,In.Schema=AP,In.FAILSAFE_SCHEMA=RP,In.JSON_SCHEMA=FP,In.CORE_SCHEMA=UP,In.DEFAULT_SCHEMA=Rv,In.load=$I.load,In.loadAll=$I.loadAll,In.dump=sye.dump,In.YAMLException=mc,In.types={binary:HP,float:LP,map:IP,null:MP,pairs:VP,set:KP,timestamp:ZP,bool:NP,int:DP,merge:qP,omap:WP,seq:PP,str:$P},In.safeLoad=zv("safeLoad","load"),In.safeLoadAll=zv("safeLoadAll","loadAll"),In.safeDump=zv("safeDump","dump");var lye=K&&K.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Tv,"__esModule",{value:!0});const cye=_t,uye=lye(In),dye=In;Tv.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 uye.default.load(t,{schema:dye.JSON_SCHEMA})}catch(n){throw new cye.ParserError((n==null?void 0:n.message)||"Parser Error",e.url)}else return t}};var Zv={};Object.defineProperty(Zv,"__esModule",{value:!0});const fye=_t,pye=/\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i;Zv.default={order:300,allowEmpty:!0,encoding:"utf8",canParse(e){return(typeof e.data=="string"||Buffer.isBuffer(e.data))&&pye.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 fye.ParserError("data is not text",e.url)}};var qv={};Object.defineProperty(qv,"__esModule",{value:!0});const hye=/\.(jpeg|jpg|gif|png|bmp|ico)$/i;qv.default={order:400,allowEmpty:!0,canParse(e){return Buffer.isBuffer(e.data)&&hye.test(e.url)},parse(e){return Buffer.isBuffer(e.data)?e.data:Buffer.from(e.data)}};var Hv={},mye=K&&K.__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]}),gye=K&&K.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),yye=K&&K.__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)&&mye(t,e,n);return gye(t,e),t},vye=K&&K.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hv,"__esModule",{value:!0});const bye=vye(Bo),PI=Jo,II=yye(ft),RI=_t;Hv.default={order:100,canRead(e){return II.isFileSystemPath(e.url)},async read(e){let t;try{t=II.toFileSystemPath(e.url)}catch(n){throw new RI.ResolverError(PI.ono.uri(n,`Malformed URI: ${e.url}`),e.url)}try{return await bye.default.promises.readFile(t)}catch(n){throw new RI.ResolverError((0,PI.ono)(n,`Error opening file "${t}"`),t)}}};var Wv={},wye=K&&K.__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]}),_ye=K&&K.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),xye=K&&K.__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)&&wye(t,e,n);return _ye(t,e),t};Object.defineProperty(Wv,"__esModule",{value:!0});const Rp=Jo,Sc=xye(ft),MI=_t;Wv.default={order:200,headers:null,timeout:5e3,redirects:5,withCredentials:!1,canRead(e){return Sc.isHttp(e.url)},read(e){const t=Sc.parse(e.url);return typeof window<"u"&&!t.protocol&&(t.protocol=Sc.parse(location.href).protocol),NI(t,this)}};async function NI(e,t,n){e=Sc.parse(e);const r=n||[];r.push(e.href);try{const i=await Sye(e,t);if(i.status>=400)throw(0,Rp.ono)({status:i.status},`HTTP ERROR ${i.status}`);if(i.status>=300){if(!Number.isNaN(t.redirects)&&r.length>t.redirects)throw new MI.ResolverError((0,Rp.ono)({status:i.status},`Error downloading ${r[0]}.
461
461
  Too many redirects:
462
462
  ${r.join(`
463
- `)}`));if(!("location"in i.headers)||!i.headers.location)throw(0,Rp.ono)({status:i.status},`HTTP ${i.status} redirect with no location header`);{const o=Sc.resolve(e.href,i.headers.location);return NI(o,t,r)}}else{if(i.body){const o=await i.arrayBuffer();return Buffer.from(o)}return Buffer.alloc(0)}}catch(i){throw new MI.ResolverError((0,Rp.ono)(i,`Error downloading ${e.href}`),e.href)}}async function Sye(e,t){let n,r;t.timeout&&(n=new AbortController,r=setTimeout(()=>n.abort(),t.timeout));const i=await fetch(e,{method:"GET",headers:t.headers||{},credentials:t.withCredentials?"include":"same-origin",signal:n?n.signal:null});return r&&clearTimeout(r),i}(function(e){var t=K&&K.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0}),e.getNewOptions=e.getJsonSchemaRefParserDefaultOptions=void 0;const n=t(Cv),r=t(Tv),i=t(Zv),o=t(qv),a=t(Hv),s=t(Wv),l=()=>({parse:{json:{...n.default},yaml:{...r.default},text:{...i.default},binary:{...o.default}},resolve:{file:{...a.default},http:{...s.default},external:!0},continueOnError:!1,dereference:{circular:!0,excludedPathMatcher:()=>!1,referenceResolution:"relative"},mutateInputSchema:!0});e.getJsonSchemaRefParserDefaultOptions=l;const c=p=>{const f=(0,e.getJsonSchemaRefParserDefaultOptions)();return p&&u(f,p),f};e.getNewOptions=c;function u(p,f){if(d(f)){const h=Object.keys(f).filter(m=>!["__proto__","constructor","prototype"].includes(m));for(let m=0;m<h.length;m++){const v=h[m],g=f[v],y=p[v];d(g)?p[v]=u(y||{},g):g!==void 0&&(p[v]=g)}}return p}function d(p){return p&&typeof p=="object"&&!Array.isArray(p)&&!(p instanceof RegExp)&&!(p instanceof Date)}})(SP),Object.defineProperty(pc,"__esModule",{value:!0}),pc.normalizeArgs=void 0;const Eye=SP;function DI(e){let t,n,r,i;const o=Array.prototype.slice.call(e);typeof o[o.length-1]=="function"&&(i=o.pop()),typeof o[0]=="string"?(t=o[0],typeof o[2]=="object"?(n=o[1],r=o[2]):(n=void 0,r=o[1])):(t="",n=o[0],r=o[1]);try{r=(0,Eye.getNewOptions)(r)}catch(a){console.error(`JSON Schema Ref Parser: Error normalizing options: ${a}`)}return!r.mutateInputSchema&&typeof n=="object"&&(n=JSON.parse(JSON.stringify(n))),{path:t,schema:n,options:r,callback:i}}pc.normalizeArgs=DI,pc.default=DI;var Vv={},Cye=K&&K.__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]}),Tye=K&&K.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),kye=K&&K.__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)&&Cye(t,e,n);return Tye(t,e),t},Kv=K&&K.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vv,"__esModule",{value:!0});const Oye=Kv(fc()),Aye=Kv(Ep()),$ye=Kv(Cp),ks=kye(ft),Pye=_t;function Iye(e,t){var n;if(!((n=t.resolve)!=null&&n.external))return Promise.resolve();try{const r=Gv(e.schema,e.$refs._root$Ref.path+"#",e.$refs,t);return Promise.all(r)}catch(r){return Promise.reject(r)}}function Gv(e,t,n,r,i,o){i||(i=new Set);let a=[];if(e&&typeof e=="object"&&!ArrayBuffer.isView(e)&&!i.has(e)){i.add(e),Oye.default.isExternal$Ref(e)&&a.push(Rye(e,t,n,r));const s=Object.keys(e);for(const l of s){const c=Aye.default.join(t,l),u=e[l];a=a.concat(Gv(u,c,n,r,i))}}return a}async function Rye(e,t,n,r){var l;const i=((l=r.dereference)==null?void 0:l.externalReferenceResolution)==="root",o=ks.resolve(i?ks.cwd():t,e.$ref),a=ks.stripHash(o),s=n._$refs[a];if(s)return Promise.resolve(s.value);try{const c=await(0,$ye.default)(o,n,r),u=Gv(c,a+"#",n,r,new Set,!0);return Promise.all(u)}catch(c){if(!(r!=null&&r.continueOnError)||!(0,Pye.isHandledError)(c))throw c;return n._$refs[a]&&(c.source=decodeURI(ks.stripHash(t)),c.path=ks.safePointerToPath(ks.getHash(t))),[]}}Vv.default=Iye;var Yv={},Mye=K&&K.__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]}),Nye=K&&K.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Dye=K&&K.__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)&&Mye(t,e,n);return Nye(t,e),t},jI=K&&K.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yv,"__esModule",{value:!0});const Mp=jI(fc()),Ec=jI(Ep()),Jv=Dye(ft);function jye(e,t){const n=[];Xv(e,"schema",e.$refs._root$Ref.path+"#","#",0,n,e.$refs,t),Lye(n)}function Xv(e,t,n,r,i,o,a,s){const l=t===null?e:e[t];if(l&&typeof l=="object"&&!ArrayBuffer.isView(l))if(Mp.default.isAllowed$Ref(l))LI(e,t,n,r,i,o,a,s);else{const c=Object.keys(l).sort((u,d)=>u==="definitions"?-1:d==="definitions"?1:u.length-d.length);for(const u of c){const d=Ec.default.join(n,u),p=Ec.default.join(r,u),f=l[u];Mp.default.isAllowed$Ref(f)?LI(l,u,n,p,i,o,a,s):Xv(l,u,d,p,i,o,a,s)}}}function LI(e,t,n,r,i,o,a,s){const l=t===null?e:e[t],c=Jv.resolve(n,l.$ref),u=a._resolve(c,r,s);if(u===null)return;const p=Ec.default.parse(r).length,f=Jv.stripHash(u.path),h=Jv.getHash(u.path),m=f!==a._root$Ref.path,v=Mp.default.isExtended$Ref(l);i+=u.indirections;const g=Fye(o,e,t);if(g)if(p<g.depth||i<g.indirections)Uye(o,g);else return;o.push({$ref:l,parent:e,key:t,pathFromRoot:r,depth:p,file:f,hash:h,value:u.value,circular:u.circular,extended:v,external:m,indirections:i}),(!g||m)&&Xv(u.value,null,u.path,r,i+1,o,a,s)}function Lye(e){e.sort((i,o)=>{if(i.file!==o.file)return i.file<o.file?-1:1;if(i.hash!==o.hash)return i.hash<o.hash?-1:1;if(i.circular!==o.circular)return i.circular?-1:1;if(i.extended!==o.extended)return i.extended?1:-1;if(i.indirections!==o.indirections)return i.indirections-o.indirections;if(i.depth!==o.depth)return i.depth-o.depth;{const a=i.pathFromRoot.lastIndexOf("/definitions"),s=o.pathFromRoot.lastIndexOf("/definitions");return a!==s?s-a:i.pathFromRoot.length-o.pathFromRoot.length}});let t,n,r;for(const i of e)i.external?i.file===t&&i.hash===n?i.$ref.$ref=r:i.file===t&&i.hash.indexOf(n+"/")===0?i.$ref.$ref=Ec.default.join(r,Ec.default.parse(i.hash.replace(n,"#"))):(t=i.file,n=i.hash,r=i.pathFromRoot,i.$ref=i.parent[i.key]=Mp.default.dereference(i.$ref,i.value),i.circular&&(i.$ref.$ref=i.pathFromRoot)):i.$ref.$ref=i.hash}function Fye(e,t,n){for(const r of e)if(r&&r.parent===t&&r.key===n)return r}function Uye(e,t){const n=e.indexOf(t);e.splice(n,1)}Yv.default=jye;var Qv={},Bye=K&&K.__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]}),zye=K&&K.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Zye=K&&K.__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)&&Bye(t,e,n);return zye(t,e),t},FI=K&&K.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qv,"__esModule",{value:!0});const Np=FI(fc()),UI=FI(Ep()),qye=Jo,BI=Zye(ft),Hye=_t;Qv.default=Wye;function Wye(e,t){const n=Date.now(),r=eb(e.schema,e.$refs._root$Ref.path,"#",new Set,new Set,new Map,e.$refs,t,n);e.$refs.circular=r.circular,e.schema=r.value}function eb(e,t,n,r,i,o,a,s,l){var f;let c;const u={value:e,circular:!1};if(s&&s.timeoutMs&&Date.now()-l>s.timeoutMs)throw new Hye.TimeoutError(s.timeoutMs);const d=s.dereference||{},p=d.excludedPathMatcher||(()=>!1);if(((d==null?void 0:d.circular)==="ignore"||!i.has(e))&&e&&typeof e=="object"&&!ArrayBuffer.isView(e)&&!p(n)){if(r.add(e),i.add(e),Np.default.isAllowed$Ref(e,s))c=zI(e,t,n,r,i,o,a,s,l),u.circular=c.circular,u.value=c.value;else for(const h of Object.keys(e)){const m=UI.default.join(t,h),v=UI.default.join(n,h);if(p(v))continue;const g=e[h];let y=!1;Np.default.isAllowed$Ref(g,s)?(c=zI(g,m,v,r,i,o,a,s,l),y=c.circular,e[h]!==c.value&&(e[h]=c.value,(f=d==null?void 0:d.onDereference)==null||f.call(d,g.$ref,e[h],e,h))):r.has(g)?y=ZI(m,a,s):(c=eb(g,m,v,r,i,o,a,s,l),y=c.circular,e[h]!==c.value&&(e[h]=c.value)),u.circular=u.circular||y}r.delete(e)}return u}function zI(e,t,n,r,i,o,a,s,l){var y,b;const u=Np.default.isExternal$Ref(e)&&((y=s==null?void 0:s.dereference)==null?void 0:y.externalReferenceResolution)==="root",d=BI.resolve(u?BI.cwd():t,e.$ref),p=o.get(d);if(p){const x=Object.keys(e);if(x.length>1){const _={};for(const S of x)S!=="$ref"&&!(S in p.value)&&(_[S]=e[S]);return{circular:p.circular,value:Object.assign({},p.value,_)}}return p}const f=a._resolve(d,t,s);if(f===null)return{circular:!1,value:null};const h=f.circular;let m=h||r.has(f.value);m&&ZI(t,a,s);let v=Np.default.dereference(e,f.value);if(!m){const x=eb(v,f.path,n,r,i,o,a,s,l);m=x.circular,v=x.value}m&&!h&&((b=s.dereference)==null?void 0:b.circular)==="ignore"&&(v=e),h&&(v.$ref=n);const g={circular:m,value:v};return Object.keys(e).length===1&&o.set(d,g),g}function ZI(e,t,n){if(t.circular=!0,!n.dereference.circular)throw qye.ono.reference(`Circular $ref pointer found at ${e}`);return!0}var tb={},nb={};Object.defineProperty(nb,"__esModule",{value:!0});function Vye(){return typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:typeof setImmediate=="function"?setImmediate:function(t){setTimeout(t,0)}}nb.default=Vye();var Kye=K&&K.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tb,"__esModule",{value:!0});const qI=Kye(nb);function Gye(e,t){if(e){t.then(function(n){(0,qI.default)(function(){e(null,n)})},function(n){(0,qI.default)(function(){e(n)})});return}else return t}tb.default=Gye,function(e){var t=K&&K.__createBinding||(Object.create?function(g,y,b,x){x===void 0&&(x=b);var _=Object.getOwnPropertyDescriptor(y,b);(!_||("get"in _?!y.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return y[b]}}),Object.defineProperty(g,x,_)}:function(g,y,b,x){x===void 0&&(x=b),g[x]=y[b]}),n=K&&K.__setModuleDefault||(Object.create?function(g,y){Object.defineProperty(g,"default",{enumerable:!0,value:y})}:function(g,y){g.default=y}),r=K&&K.__importStar||function(g){if(g&&g.__esModule)return g;var y={};if(g!=null)for(var b in g)b!=="default"&&Object.prototype.hasOwnProperty.call(g,b)&&t(y,g,b);return n(y,g),y},i=K&&K.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(e,"__esModule",{value:!0}),e.JSONParserErrorGroup=e.isHandledError=e.UnmatchedParserError=e.ParserError=e.ResolverError=e.MissingPointerError=e.InvalidPointerError=e.JSONParserError=e.UnmatchedResolverError=e.dereference=e.bundle=e.resolve=e.parse=e.$RefParser=void 0;const o=i(gv),a=i(Cp),s=i(pc),l=i(Vv),c=i(Yv),u=i(Qv),d=r(ft),p=_t;Object.defineProperty(e,"JSONParserError",{enumerable:!0,get:function(){return p.JSONParserError}}),Object.defineProperty(e,"InvalidPointerError",{enumerable:!0,get:function(){return p.InvalidPointerError}}),Object.defineProperty(e,"MissingPointerError",{enumerable:!0,get:function(){return p.MissingPointerError}}),Object.defineProperty(e,"ResolverError",{enumerable:!0,get:function(){return p.ResolverError}}),Object.defineProperty(e,"ParserError",{enumerable:!0,get:function(){return p.ParserError}}),Object.defineProperty(e,"UnmatchedParserError",{enumerable:!0,get:function(){return p.UnmatchedParserError}}),Object.defineProperty(e,"UnmatchedResolverError",{enumerable:!0,get:function(){return p.UnmatchedResolverError}}),Object.defineProperty(e,"isHandledError",{enumerable:!0,get:function(){return p.isHandledError}}),Object.defineProperty(e,"JSONParserErrorGroup",{enumerable:!0,get:function(){return p.JSONParserErrorGroup}});const f=Jo,h=i(tb);class m{constructor(){this.schema=null,this.$refs=new o.default}async parse(){const y=(0,s.default)(arguments);let b;if(!y.path&&!y.schema){const _=(0,f.ono)(`Expected a file path, URL, or object. Got ${y.path||y.schema}`);return(0,h.default)(y.callback,Promise.reject(_))}this.schema=null,this.$refs=new o.default;let x="http";if(d.isFileSystemPath(y.path))y.path=d.fromFileSystemPath(y.path),x="file";else if(!y.path&&y.schema&&"$id"in y.schema&&y.schema.$id){const _=d.parse(y.schema.$id),S=_.protocol==="https:"?443:80;y.path=`${_.protocol}//${_.hostname}:${S}`}if(y.path=d.resolve(d.cwd(),y.path),y.schema&&typeof y.schema=="object"){const _=this.$refs._add(y.path);_.value=y.schema,_.pathType=x,b=Promise.resolve(y.schema)}else b=(0,a.default)(y.path,this.$refs,y.options);try{const _=await b;if(_!==null&&typeof _=="object"&&!Buffer.isBuffer(_))return this.schema=_,(0,h.default)(y.callback,Promise.resolve(this.schema));if(y.options.continueOnError)return this.schema=null,(0,h.default)(y.callback,Promise.resolve(this.schema));throw f.ono.syntax(`"${this.$refs._root$Ref.path||_}" is not a valid JSON Schema`)}catch(_){return!y.options.continueOnError||!(0,p.isHandledError)(_)?(0,h.default)(y.callback,Promise.reject(_)):(this.$refs._$refs[d.stripHash(y.path)]&&this.$refs._$refs[d.stripHash(y.path)].addError(_),(0,h.default)(y.callback,Promise.resolve(null)))}}static parse(){const y=new m;return y.parse.apply(y,arguments)}async resolve(){const y=(0,s.default)(arguments);try{return await this.parse(y.path,y.schema,y.options),await(0,l.default)(this,y.options),v(this),(0,h.default)(y.callback,Promise.resolve(this.$refs))}catch(b){return(0,h.default)(y.callback,Promise.reject(b))}}static resolve(){const y=new m;return y.resolve.apply(y,arguments)}static bundle(){const y=new m;return y.bundle.apply(y,arguments)}async bundle(){const y=(0,s.default)(arguments);try{return await this.resolve(y.path,y.schema,y.options),(0,c.default)(this,y.options),v(this),(0,h.default)(y.callback,Promise.resolve(this.schema))}catch(b){return(0,h.default)(y.callback,Promise.reject(b))}}static dereference(){const y=new m;return y.dereference.apply(y,arguments)}async dereference(){const y=(0,s.default)(arguments);try{return await this.resolve(y.path,y.schema,y.options),(0,u.default)(this,y.options),v(this),(0,h.default)(y.callback,Promise.resolve(this.schema))}catch(b){return(0,h.default)(y.callback,Promise.reject(b))}}}e.$RefParser=m,e.default=m;function v(g){if(p.JSONParserErrorGroup.getParserErrors(g).length>0)throw new p.JSONParserErrorGroup(g)}e.parse=m.parse,e.resolve=m.resolve,e.bundle=m.bundle,e.dereference=m.dereference}(mv);const Yye=QI({__proto__:null,default:ti(mv)},[mv]);Qe.Avatar=Zp,Qe.Block=ga,Qe.Composer=GA,Qe.ComposerButton=JA,Qe.ComposerInput=YA,Qe.Container=k$,Qe.Fab=Lfe,Qe.Header=P$,Qe.HeaderRoot=ipe,Qe.LoadingIndicator=I$,Qe.Message=fv,Qe.MessageList=K$,Qe.Modal=oo,Qe.ModalProvider=XA,Qe.RestartConversation=$$,Qe.Webchat=jpe,Qe.WebchatProvider=dde,Qe.avatarThemeSchema=mp,Qe.blockThemeSchema=X$,Qe.clientModePropsSchema=nP,Qe.configPropsSchema=rP,Qe.configurationSchema=G$,Qe.cssStyleSchema=J$,Qe.descriptionItemSchema=_s,Qe.getClient=Fpe,Qe.initPropsSchema=Lpe,Qe.markdownTypeSchema=Y$,Qe.renderers=fm,Qe.statePropsSchema=eP,Qe.styleOptionSchema=Se,Qe.themeSchema=Q$,Qe.useClient=cde,Qe.useWebchatContext=$t,Qe.userPropsSchema=tP,Object.defineProperty(Qe,Symbol.toStringTag,{value:"Module"})});
463
+ `)}`));if(!("location"in i.headers)||!i.headers.location)throw(0,Rp.ono)({status:i.status},`HTTP ${i.status} redirect with no location header`);{const o=Sc.resolve(e.href,i.headers.location);return NI(o,t,r)}}else{if(i.body){const o=await i.arrayBuffer();return Buffer.from(o)}return Buffer.alloc(0)}}catch(i){throw new MI.ResolverError((0,Rp.ono)(i,`Error downloading ${e.href}`),e.href)}}async function Sye(e,t){let n,r;t.timeout&&(n=new AbortController,r=setTimeout(()=>n.abort(),t.timeout));const i=await fetch(e,{method:"GET",headers:t.headers||{},credentials:t.withCredentials?"include":"same-origin",signal:n?n.signal:null});return r&&clearTimeout(r),i}(function(e){var t=K&&K.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0}),e.getNewOptions=e.getJsonSchemaRefParserDefaultOptions=void 0;const n=t(Cv),r=t(Tv),i=t(Zv),o=t(qv),a=t(Hv),s=t(Wv),l=()=>({parse:{json:{...n.default},yaml:{...r.default},text:{...i.default},binary:{...o.default}},resolve:{file:{...a.default},http:{...s.default},external:!0},continueOnError:!1,dereference:{circular:!0,excludedPathMatcher:()=>!1,referenceResolution:"relative"},mutateInputSchema:!0});e.getJsonSchemaRefParserDefaultOptions=l;const c=p=>{const f=(0,e.getJsonSchemaRefParserDefaultOptions)();return p&&u(f,p),f};e.getNewOptions=c;function u(p,f){if(d(f)){const h=Object.keys(f).filter(m=>!["__proto__","constructor","prototype"].includes(m));for(let m=0;m<h.length;m++){const v=h[m],g=f[v],y=p[v];d(g)?p[v]=u(y||{},g):g!==void 0&&(p[v]=g)}}return p}function d(p){return p&&typeof p=="object"&&!Array.isArray(p)&&!(p instanceof RegExp)&&!(p instanceof Date)}})(SP),Object.defineProperty(pc,"__esModule",{value:!0}),pc.normalizeArgs=void 0;const Eye=SP;function DI(e){let t,n,r,i;const o=Array.prototype.slice.call(e);typeof o[o.length-1]=="function"&&(i=o.pop()),typeof o[0]=="string"?(t=o[0],typeof o[2]=="object"?(n=o[1],r=o[2]):(n=void 0,r=o[1])):(t="",n=o[0],r=o[1]);try{r=(0,Eye.getNewOptions)(r)}catch(a){console.error(`JSON Schema Ref Parser: Error normalizing options: ${a}`)}return!r.mutateInputSchema&&typeof n=="object"&&(n=JSON.parse(JSON.stringify(n))),{path:t,schema:n,options:r,callback:i}}pc.normalizeArgs=DI,pc.default=DI;var Vv={},Cye=K&&K.__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]}),Tye=K&&K.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),kye=K&&K.__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)&&Cye(t,e,n);return Tye(t,e),t},Kv=K&&K.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vv,"__esModule",{value:!0});const Oye=Kv(fc()),Aye=Kv(Ep()),$ye=Kv(Cp),ks=kye(ft),Pye=_t;function Iye(e,t){var n;if(!((n=t.resolve)!=null&&n.external))return Promise.resolve();try{const r=Gv(e.schema,e.$refs._root$Ref.path+"#",e.$refs,t);return Promise.all(r)}catch(r){return Promise.reject(r)}}function Gv(e,t,n,r,i,o){i||(i=new Set);let a=[];if(e&&typeof e=="object"&&!ArrayBuffer.isView(e)&&!i.has(e)){i.add(e),Oye.default.isExternal$Ref(e)&&a.push(Rye(e,t,n,r));const s=Object.keys(e);for(const l of s){const c=Aye.default.join(t,l),u=e[l];a=a.concat(Gv(u,c,n,r,i))}}return a}async function Rye(e,t,n,r){var l;const i=((l=r.dereference)==null?void 0:l.externalReferenceResolution)==="root",o=ks.resolve(i?ks.cwd():t,e.$ref),a=ks.stripHash(o),s=n._$refs[a];if(s)return Promise.resolve(s.value);try{const c=await(0,$ye.default)(o,n,r),u=Gv(c,a+"#",n,r,new Set,!0);return Promise.all(u)}catch(c){if(!(r!=null&&r.continueOnError)||!(0,Pye.isHandledError)(c))throw c;return n._$refs[a]&&(c.source=decodeURI(ks.stripHash(t)),c.path=ks.safePointerToPath(ks.getHash(t))),[]}}Vv.default=Iye;var Yv={},Mye=K&&K.__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]}),Nye=K&&K.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Dye=K&&K.__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)&&Mye(t,e,n);return Nye(t,e),t},jI=K&&K.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yv,"__esModule",{value:!0});const Mp=jI(fc()),Ec=jI(Ep()),Jv=Dye(ft);function jye(e,t){const n=[];Xv(e,"schema",e.$refs._root$Ref.path+"#","#",0,n,e.$refs,t),Lye(n)}function Xv(e,t,n,r,i,o,a,s){const l=t===null?e:e[t];if(l&&typeof l=="object"&&!ArrayBuffer.isView(l))if(Mp.default.isAllowed$Ref(l))LI(e,t,n,r,i,o,a,s);else{const c=Object.keys(l).sort((u,d)=>u==="definitions"?-1:d==="definitions"?1:u.length-d.length);for(const u of c){const d=Ec.default.join(n,u),p=Ec.default.join(r,u),f=l[u];Mp.default.isAllowed$Ref(f)?LI(l,u,n,p,i,o,a,s):Xv(l,u,d,p,i,o,a,s)}}}function LI(e,t,n,r,i,o,a,s){const l=t===null?e:e[t],c=Jv.resolve(n,l.$ref),u=a._resolve(c,r,s);if(u===null)return;const p=Ec.default.parse(r).length,f=Jv.stripHash(u.path),h=Jv.getHash(u.path),m=f!==a._root$Ref.path,v=Mp.default.isExtended$Ref(l);i+=u.indirections;const g=Fye(o,e,t);if(g)if(p<g.depth||i<g.indirections)Uye(o,g);else return;o.push({$ref:l,parent:e,key:t,pathFromRoot:r,depth:p,file:f,hash:h,value:u.value,circular:u.circular,extended:v,external:m,indirections:i}),(!g||m)&&Xv(u.value,null,u.path,r,i+1,o,a,s)}function Lye(e){e.sort((i,o)=>{if(i.file!==o.file)return i.file<o.file?-1:1;if(i.hash!==o.hash)return i.hash<o.hash?-1:1;if(i.circular!==o.circular)return i.circular?-1:1;if(i.extended!==o.extended)return i.extended?1:-1;if(i.indirections!==o.indirections)return i.indirections-o.indirections;if(i.depth!==o.depth)return i.depth-o.depth;{const a=i.pathFromRoot.lastIndexOf("/definitions"),s=o.pathFromRoot.lastIndexOf("/definitions");return a!==s?s-a:i.pathFromRoot.length-o.pathFromRoot.length}});let t,n,r;for(const i of e)i.external?i.file===t&&i.hash===n?i.$ref.$ref=r:i.file===t&&i.hash.indexOf(n+"/")===0?i.$ref.$ref=Ec.default.join(r,Ec.default.parse(i.hash.replace(n,"#"))):(t=i.file,n=i.hash,r=i.pathFromRoot,i.$ref=i.parent[i.key]=Mp.default.dereference(i.$ref,i.value),i.circular&&(i.$ref.$ref=i.pathFromRoot)):i.$ref.$ref=i.hash}function Fye(e,t,n){for(const r of e)if(r&&r.parent===t&&r.key===n)return r}function Uye(e,t){const n=e.indexOf(t);e.splice(n,1)}Yv.default=jye;var Qv={},Bye=K&&K.__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]}),zye=K&&K.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Zye=K&&K.__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)&&Bye(t,e,n);return zye(t,e),t},FI=K&&K.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qv,"__esModule",{value:!0});const Np=FI(fc()),UI=FI(Ep()),qye=Jo,BI=Zye(ft),Hye=_t;Qv.default=Wye;function Wye(e,t){const n=Date.now(),r=eb(e.schema,e.$refs._root$Ref.path,"#",new Set,new Set,new Map,e.$refs,t,n);e.$refs.circular=r.circular,e.schema=r.value}function eb(e,t,n,r,i,o,a,s,l){var f;let c;const u={value:e,circular:!1};if(s&&s.timeoutMs&&Date.now()-l>s.timeoutMs)throw new Hye.TimeoutError(s.timeoutMs);const d=s.dereference||{},p=d.excludedPathMatcher||(()=>!1);if(((d==null?void 0:d.circular)==="ignore"||!i.has(e))&&e&&typeof e=="object"&&!ArrayBuffer.isView(e)&&!p(n)){if(r.add(e),i.add(e),Np.default.isAllowed$Ref(e,s))c=zI(e,t,n,r,i,o,a,s,l),u.circular=c.circular,u.value=c.value;else for(const h of Object.keys(e)){const m=UI.default.join(t,h),v=UI.default.join(n,h);if(p(v))continue;const g=e[h];let y=!1;Np.default.isAllowed$Ref(g,s)?(c=zI(g,m,v,r,i,o,a,s,l),y=c.circular,e[h]!==c.value&&(e[h]=c.value,(f=d==null?void 0:d.onDereference)==null||f.call(d,g.$ref,e[h],e,h))):r.has(g)?y=ZI(m,a,s):(c=eb(g,m,v,r,i,o,a,s,l),y=c.circular,e[h]!==c.value&&(e[h]=c.value)),u.circular=u.circular||y}r.delete(e)}return u}function zI(e,t,n,r,i,o,a,s,l){var y,b;const u=Np.default.isExternal$Ref(e)&&((y=s==null?void 0:s.dereference)==null?void 0:y.externalReferenceResolution)==="root",d=BI.resolve(u?BI.cwd():t,e.$ref),p=o.get(d);if(p){const x=Object.keys(e);if(x.length>1){const _={};for(const S of x)S!=="$ref"&&!(S in p.value)&&(_[S]=e[S]);return{circular:p.circular,value:Object.assign({},p.value,_)}}return p}const f=a._resolve(d,t,s);if(f===null)return{circular:!1,value:null};const h=f.circular;let m=h||r.has(f.value);m&&ZI(t,a,s);let v=Np.default.dereference(e,f.value);if(!m){const x=eb(v,f.path,n,r,i,o,a,s,l);m=x.circular,v=x.value}m&&!h&&((b=s.dereference)==null?void 0:b.circular)==="ignore"&&(v=e),h&&(v.$ref=n);const g={circular:m,value:v};return Object.keys(e).length===1&&o.set(d,g),g}function ZI(e,t,n){if(t.circular=!0,!n.dereference.circular)throw qye.ono.reference(`Circular $ref pointer found at ${e}`);return!0}var tb={},nb={};Object.defineProperty(nb,"__esModule",{value:!0});function Vye(){return typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:typeof setImmediate=="function"?setImmediate:function(t){setTimeout(t,0)}}nb.default=Vye();var Kye=K&&K.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tb,"__esModule",{value:!0});const qI=Kye(nb);function Gye(e,t){if(e){t.then(function(n){(0,qI.default)(function(){e(null,n)})},function(n){(0,qI.default)(function(){e(n)})});return}else return t}tb.default=Gye,function(e){var t=K&&K.__createBinding||(Object.create?function(g,y,b,x){x===void 0&&(x=b);var _=Object.getOwnPropertyDescriptor(y,b);(!_||("get"in _?!y.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return y[b]}}),Object.defineProperty(g,x,_)}:function(g,y,b,x){x===void 0&&(x=b),g[x]=y[b]}),n=K&&K.__setModuleDefault||(Object.create?function(g,y){Object.defineProperty(g,"default",{enumerable:!0,value:y})}:function(g,y){g.default=y}),r=K&&K.__importStar||function(g){if(g&&g.__esModule)return g;var y={};if(g!=null)for(var b in g)b!=="default"&&Object.prototype.hasOwnProperty.call(g,b)&&t(y,g,b);return n(y,g),y},i=K&&K.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(e,"__esModule",{value:!0}),e.JSONParserErrorGroup=e.isHandledError=e.UnmatchedParserError=e.ParserError=e.ResolverError=e.MissingPointerError=e.InvalidPointerError=e.JSONParserError=e.UnmatchedResolverError=e.dereference=e.bundle=e.resolve=e.parse=e.$RefParser=void 0;const o=i(gv),a=i(Cp),s=i(pc),l=i(Vv),c=i(Yv),u=i(Qv),d=r(ft),p=_t;Object.defineProperty(e,"JSONParserError",{enumerable:!0,get:function(){return p.JSONParserError}}),Object.defineProperty(e,"InvalidPointerError",{enumerable:!0,get:function(){return p.InvalidPointerError}}),Object.defineProperty(e,"MissingPointerError",{enumerable:!0,get:function(){return p.MissingPointerError}}),Object.defineProperty(e,"ResolverError",{enumerable:!0,get:function(){return p.ResolverError}}),Object.defineProperty(e,"ParserError",{enumerable:!0,get:function(){return p.ParserError}}),Object.defineProperty(e,"UnmatchedParserError",{enumerable:!0,get:function(){return p.UnmatchedParserError}}),Object.defineProperty(e,"UnmatchedResolverError",{enumerable:!0,get:function(){return p.UnmatchedResolverError}}),Object.defineProperty(e,"isHandledError",{enumerable:!0,get:function(){return p.isHandledError}}),Object.defineProperty(e,"JSONParserErrorGroup",{enumerable:!0,get:function(){return p.JSONParserErrorGroup}});const f=Jo,h=i(tb);class m{constructor(){this.schema=null,this.$refs=new o.default}async parse(){const y=(0,s.default)(arguments);let b;if(!y.path&&!y.schema){const _=(0,f.ono)(`Expected a file path, URL, or object. Got ${y.path||y.schema}`);return(0,h.default)(y.callback,Promise.reject(_))}this.schema=null,this.$refs=new o.default;let x="http";if(d.isFileSystemPath(y.path))y.path=d.fromFileSystemPath(y.path),x="file";else if(!y.path&&y.schema&&"$id"in y.schema&&y.schema.$id){const _=d.parse(y.schema.$id),S=_.protocol==="https:"?443:80;y.path=`${_.protocol}//${_.hostname}:${S}`}if(y.path=d.resolve(d.cwd(),y.path),y.schema&&typeof y.schema=="object"){const _=this.$refs._add(y.path);_.value=y.schema,_.pathType=x,b=Promise.resolve(y.schema)}else b=(0,a.default)(y.path,this.$refs,y.options);try{const _=await b;if(_!==null&&typeof _=="object"&&!Buffer.isBuffer(_))return this.schema=_,(0,h.default)(y.callback,Promise.resolve(this.schema));if(y.options.continueOnError)return this.schema=null,(0,h.default)(y.callback,Promise.resolve(this.schema));throw f.ono.syntax(`"${this.$refs._root$Ref.path||_}" is not a valid JSON Schema`)}catch(_){return!y.options.continueOnError||!(0,p.isHandledError)(_)?(0,h.default)(y.callback,Promise.reject(_)):(this.$refs._$refs[d.stripHash(y.path)]&&this.$refs._$refs[d.stripHash(y.path)].addError(_),(0,h.default)(y.callback,Promise.resolve(null)))}}static parse(){const y=new m;return y.parse.apply(y,arguments)}async resolve(){const y=(0,s.default)(arguments);try{return await this.parse(y.path,y.schema,y.options),await(0,l.default)(this,y.options),v(this),(0,h.default)(y.callback,Promise.resolve(this.$refs))}catch(b){return(0,h.default)(y.callback,Promise.reject(b))}}static resolve(){const y=new m;return y.resolve.apply(y,arguments)}static bundle(){const y=new m;return y.bundle.apply(y,arguments)}async bundle(){const y=(0,s.default)(arguments);try{return await this.resolve(y.path,y.schema,y.options),(0,c.default)(this,y.options),v(this),(0,h.default)(y.callback,Promise.resolve(this.schema))}catch(b){return(0,h.default)(y.callback,Promise.reject(b))}}static dereference(){const y=new m;return y.dereference.apply(y,arguments)}async dereference(){const y=(0,s.default)(arguments);try{return await this.resolve(y.path,y.schema,y.options),(0,u.default)(this,y.options),v(this),(0,h.default)(y.callback,Promise.resolve(this.schema))}catch(b){return(0,h.default)(y.callback,Promise.reject(b))}}}e.$RefParser=m,e.default=m;function v(g){if(p.JSONParserErrorGroup.getParserErrors(g).length>0)throw new p.JSONParserErrorGroup(g)}e.parse=m.parse,e.resolve=m.resolve,e.bundle=m.bundle,e.dereference=m.dereference}(mv);const Yye=QI({__proto__:null,default:ti(mv)},[mv]);Qe.Avatar=Zp,Qe.Block=ga,Qe.Composer=GA,Qe.ComposerButton=JA,Qe.ComposerInput=YA,Qe.Container=k$,Qe.Fab=Lfe,Qe.Header=P$,Qe.HeaderRoot=ipe,Qe.LoadingIndicator=I$,Qe.Message=fv,Qe.MessageList=K$,Qe.Modal=oo,Qe.ModalProvider=XA,Qe.RestartConversation=$$,Qe.Webchat=jpe,Qe.WebchatProvider=dde,Qe.avatarThemeSchema=mp,Qe.blockThemeSchema=X$,Qe.clientModePropsSchema=nP,Qe.configPropsSchema=rP,Qe.configurationSchema=G$,Qe.cssStyleSchema=J$,Qe.descriptionItemSchema=_s,Qe.getClient=Fpe,Qe.initPropsSchema=Lpe,Qe.markdownTypeSchema=Y$,Qe.renderers=fm,Qe.statePropsSchema=eP,Qe.styleOptionSchema=xe,Qe.themeSchema=Q$,Qe.useClient=cde,Qe.useWebchatContext=$t,Qe.userPropsSchema=tP,Object.defineProperty(Qe,Symbol.toStringTag,{value:"Module"})});