@botpress/webchat 2.4.0-beta.6 → 2.4.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +8 -8
- package/dist/hooks/useWebchatClient.d.ts +3 -1
- package/dist/index.js +7112 -7023
- package/dist/index.umd.cjs +77 -77
- package/dist/schemas/configuration.d.ts +3 -0
- package/dist/schemas/init.d.ts +8 -0
- package/dist/stores/userStore.d.ts +5 -4
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(Ie,
|
|
1
|
+
(function(Ie,M){typeof exports=="object"&&typeof module<"u"?M(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],M):(Ie=typeof globalThis<"u"?globalThis:Ie||self,M(Ie.Webchat={},Ie.React,Ie.ReactDOM))})(this,function(Ie,M,Ti){"use strict";var Zse=Object.defineProperty;var Kse=(Ie,M,Ti)=>M in Ie?Zse(Ie,M,{enumerable:!0,configurable:!0,writable:!0,value:Ti}):Ie[M]=Ti;var _e=(Ie,M,Ti)=>Kse(Ie,typeof M!="symbol"?M+"":M,Ti);function Ey(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const w=Ey(M),ky=Ey(Ti),UC=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));let ul;const zC=new Uint8Array(16);function qC(){if(!ul&&(ul=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ul))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ul(zC)}const Kt=[];for(let e=0;e<256;++e)Kt.push((e+256).toString(16).slice(1));function VC(e,t=0){return Kt[e[t+0]]+Kt[e[t+1]]+Kt[e[t+2]]+Kt[e[t+3]]+"-"+Kt[e[t+4]]+Kt[e[t+5]]+"-"+Kt[e[t+6]]+Kt[e[t+7]]+"-"+Kt[e[t+8]]+Kt[e[t+9]]+"-"+Kt[e[t+10]]+Kt[e[t+11]]+Kt[e[t+12]]+Kt[e[t+13]]+Kt[e[t+14]]+Kt[e[t+15]]}const Ty={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Oy(e,t,n){if(Ty.randomUUID&&!t&&!e)return Ty.randomUUID();e=e||{};const r=e.random||(e.rng||qC)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,VC(r)}const uo=e=>({block:e,type:"bubble"}),Cy=e=>{const t=e.title,n=e.subtitle,r=e.imageUrl,i=e.actions.map(o=>{switch(o.action){case"postback":return{type:"button",variant:"action",text:o.label,buttonValue:o.value,reusable:!0};case"url":return{type:"button",variant:"link",text:o.label,buttonValue:o.value,reusable:!0};case"say":return{type:"button",variant:"action",text:o.label,buttonValue:o.value,reusable:!0};default:throw new Error(`Unknown action type ${o.action}`)}}),a=[];return r&&a.push({type:"image",url:r}),t&&a.push({type:"text",text:`## ${t}`}),n&&a.push({type:"text",text:n}),i.length>0&&a.push({type:"row",blocks:i}),{type:"column",horizontalAlignment:"center",blocks:[...a]}},$y=e=>({payload:{type:"audio",url:e.audioUrl}}),HC=e=>({payload:uo(Cy(e))}),WC=e=>({payload:{type:"carousel",blocks:e.items.map(t=>Cy(t))}}),ZC=e=>{const t=e.options.map(a=>({title:a.label,value:a.value})),n=e.text,r=Oy(),i=uo({type:"text",text:n});return t.length===0?{disableInput:e.disableFreeText,payload:i}:{disableInput:e.disableFreeText,payload:{type:"column",horizontalAlignment:"left",blocks:[i,{type:"row",blocks:t.map(({title:a,value:o})=>({type:"button",variant:"action",text:a,buttonValue:o,groupId:r}))}]}}},KC=e=>{const t=e.options.map(i=>({label:i.label,value:i.value})),n=e.text,r=[{type:"dropdown",label:n??"Select an option",options:t}];return n&&r.unshift({type:"text",text:n}),{disableInput:!0,payload:uo({type:"column",blocks:r})}},Iy=e=>({payload:{type:"file",url:e.fileUrl,title:e.title}}),Ry=e=>({payload:{type:"image",url:e.imageUrl}}),Py=e=>({payload:{type:"location",latitude:e.latitude,longitude:e.longitude,title:e.title??e.address??"View on map"}}),Ay=e=>({payload:uo({type:"text",text:e.markdown})}),Ny=e=>({payload:uo({type:"text",text:e.text,value:e.value})}),Dy=e=>({payload:{type:"video",url:e.videoUrl}}),GC=e=>({payload:{type:"column",blocks:e.items.map(n=>{switch(n.type){case"audio":return $y({...n.payload,type:n.type}).payload;case"file":return Iy({...n.payload,type:n.type}).payload;case"image":return Ry({...n.payload,type:n.type}).payload;case"location":return Py({...n.payload,type:n.type}).payload;case"markdown":return Ay({...n.payload,type:n.type}).payload;case"text":return Ny({...n.payload,type:n.type}).payload;case"video":return Dy({...n.payload,type:n.type}).payload;default:throw new Error("Unsuported message type")}})}}),mf=e=>{switch(e.type){case"audio":return $y(e);case"card":return HC(e);case"carousel":return WC(e);case"choice":return ZC(e);case"dropdown":return KC(e);case"file":return Iy(e);case"image":return Ry(e);case"location":return Py(e);case"markdown":return Ay(e);case"text":return Ny(e);case"video":return Dy(e);case"bloc":return GC(e);case"custom":return{payload:e};default:throw new Error("Unsuported message type")}},YC=Object.freeze(Object.defineProperty({__proto__:null,target:UC,webchatToTarget:Object.freeze(Object.defineProperty({__proto__:null,messageAdapter:mf},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));var ht=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ke(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function JC(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var vf={exports:{}},co={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var My;function XC(){if(My)return co;My=1;var e=M,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(s,u,l){var c,f={},d=null,p=null;l!==void 0&&(d=""+l),u.key!==void 0&&(d=""+u.key),u.ref!==void 0&&(p=u.ref);for(c in u)r.call(u,c)&&!a.hasOwnProperty(c)&&(f[c]=u[c]);if(s&&s.defaultProps)for(c in u=s.defaultProps,u)f[c]===void 0&&(f[c]=u[c]);return{$$typeof:t,type:s,key:d,ref:p,props:f,_owner:i.current}}return co.Fragment=n,co.jsx=o,co.jsxs=o,co}var fo={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,47 +14,47 @@
|
|
|
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
|
|
18
|
-
`+le+C}}var he=!1,ue;{var Q=typeof WeakMap=="function"?WeakMap:Map;ue=new Q}function Z(C,te){if(!C||he)return"";{var ye=ue.get(C);if(ye!==void 0)return ye}var je;he=!0;var ft=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var gt;gt=
|
|
17
|
+
*/var jy;function QC(){return jy||(jy=1,process.env.NODE_ENV!=="production"&&function(){var e=M,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),h=Symbol.iterator,m="@@iterator";function y(C){if(C===null||typeof C!="object")return null;var te=h&&C[h]||C[m];return typeof te=="function"?te:null}var v=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(C){{for(var te=arguments.length,ye=new Array(te>1?te-1:0),je=1;je<te;je++)ye[je-1]=arguments[je];b("error",C,ye)}}function b(C,te,ye){{var je=v.ReactDebugCurrentFrame,ft=je.getStackAddendum();ft!==""&&(te+="%s",ye=ye.concat([ft]));var gt=ye.map(function(nt){return String(nt)});gt.unshift("Warning: "+te),Function.prototype.apply.call(console[C],console,gt)}}var k=!1,S=!1,E=!1,O=!1,j=!1,q;q=Symbol.for("react.module.reference");function T(C){return!!(typeof C=="string"||typeof C=="function"||C===r||C===a||j||C===i||C===l||C===c||O||C===p||k||S||E||typeof C=="object"&&C!==null&&(C.$$typeof===d||C.$$typeof===f||C.$$typeof===o||C.$$typeof===s||C.$$typeof===u||C.$$typeof===q||C.getModuleId!==void 0))}function I(C,te,ye){var je=C.displayName;if(je)return je;var ft=te.displayName||te.name||"";return ft!==""?ye+"("+ft+")":ye}function U(C){return C.displayName||"Context"}function R(C){if(C==null)return null;if(typeof C.tag=="number"&&g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof C=="function")return C.displayName||C.name||null;if(typeof C=="string")return C;switch(C){case r:return"Fragment";case n:return"Portal";case a:return"Profiler";case i:return"StrictMode";case l:return"Suspense";case c:return"SuspenseList"}if(typeof C=="object")switch(C.$$typeof){case s:var te=C;return U(te)+".Consumer";case o:var ye=C;return U(ye._context)+".Provider";case u:return I(C,C.render,"ForwardRef");case f:var je=C.displayName||null;return je!==null?je:R(C.type)||"Memo";case d:{var ft=C,gt=ft._payload,nt=ft._init;try{return R(nt(gt))}catch{return null}}}return null}var F=Object.assign,N=0,L,W,z,A,x,V,K;function _(){}_.__reactDisabledLog=!0;function J(){{if(N===0){L=console.log,W=console.info,z=console.warn,A=console.error,x=console.group,V=console.groupCollapsed,K=console.groupEnd;var C={configurable:!0,enumerable:!0,value:_,writable:!0};Object.defineProperties(console,{info:C,log:C,warn:C,error:C,group:C,groupCollapsed:C,groupEnd:C})}N++}}function ne(){{if(N--,N===0){var C={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:F({},C,{value:L}),info:F({},C,{value:W}),warn:F({},C,{value:z}),error:F({},C,{value:A}),group:F({},C,{value:x}),groupCollapsed:F({},C,{value:V}),groupEnd:F({},C,{value:K})})}N<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var re=v.ReactCurrentDispatcher,le;function pe(C,te,ye){{if(le===void 0)try{throw Error()}catch(ft){var je=ft.stack.trim().match(/\n( *(at )?)/);le=je&&je[1]||""}return`
|
|
18
|
+
`+le+C}}var he=!1,ue;{var Q=typeof WeakMap=="function"?WeakMap:Map;ue=new Q}function Z(C,te){if(!C||he)return"";{var ye=ue.get(C);if(ye!==void 0)return ye}var je;he=!0;var ft=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var gt;gt=re.current,re.current=null,J();try{if(te){var nt=function(){throw Error()};if(Object.defineProperty(nt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(nt,[])}catch(xn){je=xn}Reflect.construct(C,[],nt)}else{try{nt.call()}catch(xn){je=xn}C.call(nt.prototype)}}else{try{throw Error()}catch(xn){je=xn}C()}}catch(xn){if(xn&&je&&typeof xn.stack=="string"){for(var Ye=xn.stack.split(`
|
|
19
19
|
`),fn=je.stack.split(`
|
|
20
|
-
`),$t=Ye.length-1,Mt=fn.length-1;$t>=1&&Mt>=0&&Ye[$t]!==fn[Mt];)Mt--;for(;$t>=1&&Mt>=0;$t--,Mt--)if(Ye[$t]!==fn[Mt]){if($t!==1||Mt!==1)do if($t--,Mt--,Mt<0||Ye[$t]!==fn[Mt]){var
|
|
21
|
-
`+Ye[$t].replace(" at new "," at ");return C.displayName&&
|
|
20
|
+
`),$t=Ye.length-1,Mt=fn.length-1;$t>=1&&Mt>=0&&Ye[$t]!==fn[Mt];)Mt--;for(;$t>=1&&Mt>=0;$t--,Mt--)if(Ye[$t]!==fn[Mt]){if($t!==1||Mt!==1)do if($t--,Mt--,Mt<0||Ye[$t]!==fn[Mt]){var Bn=`
|
|
21
|
+
`+Ye[$t].replace(" at new "," at ");return C.displayName&&Bn.includes("<anonymous>")&&(Bn=Bn.replace("<anonymous>",C.displayName)),typeof C=="function"&&ue.set(C,Bn),Bn}while($t>=1&&Mt>=0);break}}}finally{he=!1,re.current=gt,ne(),Error.prepareStackTrace=ft}var lo=C?C.displayName||C.name:"",Xi=lo?pe(lo):"";return typeof C=="function"&&ue.set(C,Xi),Xi}function de(C,te,ye){return Z(C,!1)}function ve(C){var te=C.prototype;return!!(te&&te.isReactComponent)}function $e(C,te,ye){if(C==null)return"";if(typeof C=="function")return Z(C,ve(C));if(typeof C=="string")return pe(C);switch(C){case l:return pe("Suspense");case c:return pe("SuspenseList")}if(typeof C=="object")switch(C.$$typeof){case u:return de(C.render);case f:return $e(C.type,te,ye);case d:{var je=C,ft=je._payload,gt=je._init;try{return $e(gt(ft),te,ye)}catch{}}}return""}var P=Object.prototype.hasOwnProperty,Y={},oe=v.ReactDebugCurrentFrame;function ee(C){if(C){var te=C._owner,ye=$e(C.type,C._source,te?te.type:null);oe.setExtraStackFrame(ye)}else oe.setExtraStackFrame(null)}function ke(C,te,ye,je,ft){{var gt=Function.call.bind(P);for(var nt in C)if(gt(C,nt)){var Ye=void 0;try{if(typeof C[nt]!="function"){var fn=Error((je||"React class")+": "+ye+" type `"+nt+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof C[nt]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw fn.name="Invariant Violation",fn}Ye=C[nt](te,nt,je,ye,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch($t){Ye=$t}Ye&&!(Ye instanceof Error)&&(ee(ft),g("%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).",je||"React class",ye,nt,typeof Ye),ee(null)),Ye instanceof Error&&!(Ye.message in Y)&&(Y[Ye.message]=!0,ee(ft),g("Failed %s type: %s",ye,Ye.message),ee(null))}}}var Se=Array.isArray;function Pe(C){return Se(C)}function He(C){{var te=typeof Symbol=="function"&&Symbol.toStringTag,ye=te&&C[Symbol.toStringTag]||C.constructor.name||"Object";return ye}}function Ae(C){try{return Fe(C),!1}catch{return!0}}function Fe(C){return""+C}function B(C){if(Ae(C))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",He(C)),Fe(C)}var D=v.ReactCurrentOwner,X={key:!0,ref:!0,__self:!0,__source:!0},ce,Ee,Oe;Oe={};function Je(C){if(P.call(C,"ref")){var te=Object.getOwnPropertyDescriptor(C,"ref").get;if(te&&te.isReactWarning)return!1}return C.ref!==void 0}function lt(C){if(P.call(C,"key")){var te=Object.getOwnPropertyDescriptor(C,"key").get;if(te&&te.isReactWarning)return!1}return C.key!==void 0}function Ut(C,te){if(typeof C.ref=="string"&&D.current&&te&&D.current.stateNode!==te){var ye=R(D.current.type);Oe[ye]||(g('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',R(D.current.type),C.ref),Oe[ye]=!0)}}function Ot(C,te){{var ye=function(){ce||(ce=!0,g("%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)",te))};ye.isReactWarning=!0,Object.defineProperty(C,"key",{get:ye,configurable:!0})}}function Ze(C,te){{var ye=function(){Ee||(Ee=!0,g("%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)",te))};ye.isReactWarning=!0,Object.defineProperty(C,"ref",{get:ye,configurable:!0})}}var Ct=function(C,te,ye,je,ft,gt,nt){var Ye={$$typeof:t,type:C,key:te,ref:ye,props:nt,_owner:gt};return Ye._store={},Object.defineProperty(Ye._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Ye,"_self",{configurable:!1,enumerable:!1,writable:!1,value:je}),Object.defineProperty(Ye,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ft}),Object.freeze&&(Object.freeze(Ye.props),Object.freeze(Ye)),Ye};function tt(C,te,ye,je,ft){{var gt,nt={},Ye=null,fn=null;ye!==void 0&&(B(ye),Ye=""+ye),lt(te)&&(B(te.key),Ye=""+te.key),Je(te)&&(fn=te.ref,Ut(te,ft));for(gt in te)P.call(te,gt)&&!X.hasOwnProperty(gt)&&(nt[gt]=te[gt]);if(C&&C.defaultProps){var $t=C.defaultProps;for(gt in $t)nt[gt]===void 0&&(nt[gt]=$t[gt])}if(Ye||fn){var Mt=typeof C=="function"?C.displayName||C.name||"Unknown":C;Ye&&Ot(nt,Mt),fn&&Ze(nt,Mt)}return Ct(C,Ye,fn,ft,je,D.current,nt)}}var bn=v.ReactCurrentOwner,Cn=v.ReactDebugCurrentFrame;function rr(C){if(C){var te=C._owner,ye=$e(C.type,C._source,te?te.type:null);Cn.setExtraStackFrame(ye)}else Cn.setExtraStackFrame(null)}var Hr;Hr=!1;function $r(C){return typeof C=="object"&&C!==null&&C.$$typeof===t}function ir(){{if(bn.current){var C=R(bn.current.type);if(C)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+C+"`."}return""}}function Wr(C){return""}var pt={};function wt(C){{var te=ir();if(!te){var ye=typeof C=="string"?C:C.displayName||C.name;ye&&(te=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+ye+">.")}return te}}function zt(C,te){{if(!C._store||C._store.validated||C.key!=null)return;C._store.validated=!0;var ye=wt(te);if(pt[ye])return;pt[ye]=!0;var je="";C&&C._owner&&C._owner!==
|
|
25
|
+
Check the top-level render call using <`+ye+">.")}return te}}function zt(C,te){{if(!C._store||C._store.validated||C.key!=null)return;C._store.validated=!0;var ye=wt(te);if(pt[ye])return;pt[ye]=!0;var je="";C&&C._owner&&C._owner!==bn.current&&(je=" It was passed a child from "+R(C._owner.type)+"."),rr(C),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ye,je),rr(null)}}function qt(C,te){{if(typeof C!="object")return;if(Pe(C))for(var ye=0;ye<C.length;ye++){var je=C[ye];$r(je)&&zt(je,te)}else if($r(C))C._store&&(C._store.validated=!0);else if(C){var ft=y(C);if(typeof ft=="function"&&ft!==C.entries)for(var gt=ft.call(C),nt;!(nt=gt.next()).done;)$r(nt.value)&&zt(nt.value,te)}}}function Xt(C){{var te=C.type;if(te==null||typeof te=="string")return;var ye;if(typeof te=="function")ye=te.propTypes;else if(typeof te=="object"&&(te.$$typeof===u||te.$$typeof===f))ye=te.propTypes;else return;if(ye){var je=R(te);ke(ye,C.props,"prop",je,C)}else if(te.PropTypes!==void 0&&!Hr){Hr=!0;var ft=R(te);g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ft||"Unknown")}typeof te.getDefaultProps=="function"&&!te.getDefaultProps.isReactClassApproved&&g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Vt(C){{for(var te=Object.keys(C.props),ye=0;ye<te.length;ye++){var je=te[ye];if(je!=="children"&&je!=="key"){rr(C),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",je),rr(null);break}}C.ref!==null&&(rr(C),g("Invalid attribute `ref` supplied to `React.Fragment`."),rr(null))}}var Ln={};function Fn(C,te,ye,je,ft,gt){{var nt=T(C);if(!nt){var Ye="";(C===void 0||typeof C=="object"&&C!==null&&Object.keys(C).length===0)&&(Ye+=" 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 fn=Wr();fn?Ye+=fn:Ye+=ir();var $t;C===null?$t="null":Pe(C)?$t="array":C!==void 0&&C.$$typeof===t?($t="<"+(R(C.type)||"Unknown")+" />",Ye=" Did you accidentally export a JSX literal instead of a component?"):$t=typeof C,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",$t,Ye)}var Mt=tt(C,te,ye,ft,gt);if(Mt==null)return Mt;if(nt){var Bn=te.children;if(Bn!==void 0)if(je)if(Pe(Bn)){for(var lo=0;lo<Bn.length;lo++)qt(Bn[lo],C);Object.freeze&&Object.freeze(Bn)}else g("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 qt(Bn,C)}if(P.call(te,"key")){var Xi=R(C),xn=Object.keys(te).filter(function(Wse){return Wse!=="key"}),gy=xn.length>0?"{key: someKey, "+xn.join(": ..., ")+": ...}":"{key: someKey}";if(!Ln[Xi+gy]){var Hse=xn.length>0?"{"+xn.join(": ..., ")+": ...}":"{}";g(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,vy,Xi,Dse,Xi),Fn[Xi+vy]=!0}}return C===r?Vt(Mt):Xt(Mt),Mt}}function ki(C,te,ye){return Bn(C,te,ye,!0)}function Pse(C,te,ye){return Bn(C,te,ye,!1)}var Ase=Pse,Nse=ki;fo.Fragment=r,fo.jsx=Ase,fo.jsxs=Nse}()),fo}process.env.NODE_ENV==="production"?vf.exports=ZC():vf.exports=KC();var I=vf.exports;function GC(e,t=[]){let n=[];function r(a,o){const s=w.createContext(o),u=n.length;n=[...n,o];function l(f){const{scope:d,children:p,...m}=f,h=(d==null?void 0:d[e][u])||s,y=w.useMemo(()=>m,Object.values(m));return I.jsx(h.Provider,{value:y,children:p})}function c(f,d){const p=(d==null?void 0:d[e][u])||s,m=w.useContext(p);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return l.displayName=a+"Provider",[l,c]}const i=()=>{const a=n.map(o=>w.createContext(o));return function(s){const u=(s==null?void 0:s[e])||a;return w.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,YC(i,...t)]}function YC(...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(a){const o=r.reduce((s,{useScope:u,scopeName:l})=>{const f=u(a)[`__scope${l}`];return{...s,...f}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function Zr(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var Qi=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{};function JC(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function My(...e){return t=>e.forEach(n=>JC(n,t))}function Kr(...e){return w.useCallback(My(...e),e)}var yf=w.forwardRef((e,t)=>{const{children:n,...r}=e,i=w.Children.toArray(n),a=i.find(QC);if(a){const o=a.props.children,s=i.map(u=>u===a?w.Children.count(o)>1?w.Children.only(null):w.isValidElement(o)?o.props.children:null:u);return I.jsx(gf,{...r,ref:t,children:w.isValidElement(o)?w.cloneElement(o,void 0,s):null})}return I.jsx(gf,{...r,ref:t,children:n})});yf.displayName="Slot";var gf=w.forwardRef((e,t)=>{const{children:n,...r}=e;if(w.isValidElement(n)){const i=t$(n);return w.cloneElement(n,{...e$(r,n.props),ref:t?My(t,i):i})}return w.Children.count(n)>1?w.Children.only(null):null});gf.displayName="SlotClone";var XC=({children:e})=>I.jsx(I.Fragment,{children:e});function QC(e){return w.isValidElement(e)&&e.type===XC}function e$(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{a(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function t$(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var n$=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],dn=n$.reduce((e,t)=>{const n=w.forwardRef((r,i)=>{const{asChild:a,...o}=r,s=a?yf:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),I.jsx(s,{...o,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function r$(e,t){e&&_y.flushSync(()=>e.dispatchEvent(t))}var bf="Avatar",[i$,Use]=GC(bf),[a$,jy]=i$(bf),xf=w.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,a]=w.useState("idle");return I.jsx(a$,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:I.jsx(dn.span,{...r,ref:t})})});xf.displayName=bf;var Ly="AvatarImage",wf=w.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...a}=e,o=jy(Ly,n),s=o$(r),u=Zr(l=>{i(l),o.onImageLoadingStatusChange(l)});return Qi(()=>{s!=="idle"&&u(s)},[s,u]),s==="loaded"?I.jsx(dn.img,{...a,ref:t,src:r}):null});wf.displayName=Ly;var Fy="AvatarFallback",Sf=w.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,a=jy(Fy,n),[o,s]=w.useState(r===void 0);return w.useEffect(()=>{if(r!==void 0){const u=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(u)}},[r]),o&&a.imageLoadingStatus!=="loaded"?I.jsx(dn.span,{...i,ref:t}):null});Sf.displayName=Fy;function o$(e){const[t,n]=w.useState("idle");return Qi(()=>{if(!e){n("error");return}let r=!0;const i=new window.Image,a=o=>()=>{r&&n(o)};return n("loading"),i.onload=a("loaded"),i.onerror=a("error"),i.src=e,()=>{r=!1}},[e]),t}function _f(e){if(!/^#?([a-fA-F\d]{6}|[a-fA-F\d]{3})$/.test(e))return{r:0,g:0,b:0};const n=e.replace(/^#/,"");let r=n;n.length===3&&(r=n.split("").map(u=>u+u).join(""));const i=parseInt(r,16),a=i>>16&255,o=i>>8&255,s=i&255;return{r:a,g:o,b:s}}function s$(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const l$=(e,t=30)=>{const n=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b,n+1);return{r:Math.floor((e.r-n)/(r-n)*t*(1-.299)+120-t/2),g:Math.floor((e.g-n)/(r-n)*t*(1-.587)+120-t/2),b:Math.floor((e.b-n)/(r-n)*t*(1-.114)+120-t/2)}};function By(e){return Object.entries(e).reduce((t,[n,r])=>{const i=n.replace(/(\d+)/,a=>(1e3-parseInt(a)).toString());return{...t,[i]:r}},{})}const u$=2.4,c$=.2126729,f$=.7151522,d$=.072175,p$=.56,h$=.57,m$=.62,v$=.65,cl=.022,Uy=1.414,y$=1.14,g$=1.14,b$=.035991,x$=.035991,w$=27.7847239587675,S$=27.7847239587675,zy=.027,qy=.027,Vy=.001,_$=5e-4;function Hy(e){const{r:t,g:n,b:r}=e,i=a=>(a/255)**u$;return c$*i(t)+f$*i(n)+d$*i(r)}function Wy(e,t){if(!e||!t)return 0;let n=Hy(_f(e)),r=Hy(_f(t)),i=0,a=0;return n=n>cl?n:n+(cl-n)**Uy,r=r>cl?r:r+(cl-r)**Uy,Math.abs(r-n)<_$?0:(r>n?(i=(r**p$-n**h$)*y$,a=i<Vy?0:i<b$?i-i*w$*zy:i-zy):(i=(r**v$-n**m$)*g$,a=i>-Vy?0:i>-x$?i-i*S$*qy:i+qy),Math.abs(a*100))}let Ef=class{constructor(){_e(this,"eventMap");this.eventMap={}}on(t,n){var r;return this.eventMap[t]||(this.eventMap[t]=new Set),(r=this.eventMap[t])==null||r.add(n),()=>{var i;(i=this.eventMap[t])==null||i.delete(n)}}emit(t,n){var r,i;(r=this.eventMap[t])==null||r.forEach(a=>{a(n)}),(i=this.eventMap["*"])==null||i.forEach(a=>{a({type:t,payload:n})})}};const E$=new Ef;function Zy(e,t){let n=`${e} {`;for(const[r,i]of Object.entries(t))n+=`${r}: ${i}; `;return n+="}",n}function Ky(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}var Gy={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ht,function(){var n=1e3,r=6e4,i=36e5,a="millisecond",o="second",s="minute",u="hour",l="day",c="week",f="month",d="quarter",p="year",m="date",h="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|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,g={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(F){var M=["th","st","nd","rd"],B=F%100;return"["+F+(M[(B-20)%10]||M[B]||M[0])+"]"}},b=function(F,M,B){var W=String(F);return!W||W.length>=M?F:""+Array(M+1-W.length).join(B)+F},k={s:b,z:function(F){var M=-F.utcOffset(),B=Math.abs(M),W=Math.floor(B/60),U=B%60;return(M<=0?"+":"-")+b(W,2,"0")+":"+b(U,2,"0")},m:function F(M,B){if(M.date()<B.date())return-F(B,M);var W=12*(B.year()-M.year())+(B.month()-M.month()),U=M.clone().add(W,f),N=B-U<0,x=M.clone().add(W+(N?-1:1),f);return+(-(W+(B-U)/(N?U-x:x-U))||0)},a:function(F){return F<0?Math.ceil(F)||0:Math.floor(F)},p:function(F){return{M:f,y:p,w:c,d:l,D:m,h:u,m:s,s:o,ms:a,Q:d}[F]||String(F||"").toLowerCase().replace(/s$/,"")},u:function(F){return F===void 0}},S="en",E={};E[S]=g;var O="$isDayjsObject",L=function(F){return F instanceof V||!(!F||!F[O])},D=function F(M,B,W){var U;if(!M)return S;if(typeof M=="string"){var N=M.toLowerCase();E[N]&&(U=N),B&&(E[N]=B,U=N);var x=M.split("-");if(!U&&x.length>1)return F(x[0])}else{var q=M.name;E[q]=M,U=q}return!W&&U&&(S=U),U||!W&&S},T=function(F,M){if(L(F))return F.clone();var B=typeof M=="object"?M:{};return B.date=F,B.args=arguments,new V(B)},P=k;P.l=D,P.i=L,P.w=function(F,M){return T(F,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var V=function(){function F(B){this.$L=D(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[O]=!0}var M=F.prototype;return M.parse=function(B){this.$d=function(W){var U=W.date,N=W.utc;if(U===null)return new Date(NaN);if(P.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var x=U.match(y);if(x){var q=x[2]-1||0,K=(x[7]||"0").substring(0,3);return N?new Date(Date.UTC(x[1],q,x[3]||1,x[4]||0,x[5]||0,x[6]||0,K)):new Date(x[1],q,x[3]||1,x[4]||0,x[5]||0,x[6]||0,K)}}return new Date(U)}(B),this.init()},M.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},M.$utils=function(){return P},M.isValid=function(){return this.$d.toString()!==h},M.isSame=function(B,W){var U=T(B);return this.startOf(W)<=U&&U<=this.endOf(W)},M.isAfter=function(B,W){return T(B)<this.startOf(W)},M.isBefore=function(B,W){return this.endOf(W)<T(B)},M.$g=function(B,W,U){return P.u(B)?this[W]:this.set(U,B)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(B,W){var U=this,N=!!P.u(W)||W,x=P.p(B),q=function(he,ue){var Q=P.w(U.$u?Date.UTC(U.$y,ue,he):new Date(U.$y,ue,he),U);return N?Q:Q.endOf(l)},K=function(he,ue){return P.w(U.toDate()[he].apply(U.toDate("s"),(N?[0,0,0,0]:[23,59,59,999]).slice(ue)),U)},_=this.$W,Y=this.$M,oe=this.$D,ne="set"+(this.$u?"UTC":"");switch(x){case p:return N?q(1,0):q(31,11);case f:return N?q(1,Y):q(0,Y+1);case c:var le=this.$locale().weekStart||0,pe=(_<le?_+7:_)-le;return q(N?oe-pe:oe+(6-pe),Y);case l:case m:return K(ne+"Hours",0);case u:return K(ne+"Minutes",1);case s:return K(ne+"Seconds",2);case o:return K(ne+"Milliseconds",3);default:return this.clone()}},M.endOf=function(B){return this.startOf(B,!1)},M.$set=function(B,W){var U,N=P.p(B),x="set"+(this.$u?"UTC":""),q=(U={},U[l]=x+"Date",U[m]=x+"Date",U[f]=x+"Month",U[p]=x+"FullYear",U[u]=x+"Hours",U[s]=x+"Minutes",U[o]=x+"Seconds",U[a]=x+"Milliseconds",U)[N],K=N===l?this.$D+(W-this.$W):W;if(N===f||N===p){var _=this.clone().set(m,1);_.$d[q](K),_.init(),this.$d=_.set(m,Math.min(this.$D,_.daysInMonth())).$d}else q&&this.$d[q](K);return this.init(),this},M.set=function(B,W){return this.clone().$set(B,W)},M.get=function(B){return this[P.p(B)]()},M.add=function(B,W){var U,N=this;B=Number(B);var x=P.p(W),q=function(Y){var oe=T(N);return P.w(oe.date(oe.date()+Math.round(Y*B)),N)};if(x===f)return this.set(f,this.$M+B);if(x===p)return this.set(p,this.$y+B);if(x===l)return q(1);if(x===c)return q(7);var K=(U={},U[s]=r,U[u]=i,U[o]=n,U)[x]||1,_=this.$d.getTime()+B*K;return P.w(_,this)},M.subtract=function(B,W){return this.add(-1*B,W)},M.format=function(B){var W=this,U=this.$locale();if(!this.isValid())return U.invalidDate||h;var N=B||"YYYY-MM-DDTHH:mm:ssZ",x=P.z(this),q=this.$H,K=this.$m,_=this.$M,Y=U.weekdays,oe=U.months,ne=U.meridiem,le=function(ue,Q,Z,de){return ue&&(ue[Q]||ue(W,N))||Z[Q].slice(0,de)},pe=function(ue){return P.s(q%12||12,ue,"0")},he=ne||function(ue,Q,Z){var de=ue<12?"AM":"PM";return Z?de.toLowerCase():de};return N.replace(v,function(ue,Q){return Q||function(Z){switch(Z){case"YY":return String(W.$y).slice(-2);case"YYYY":return P.s(W.$y,4,"0");case"M":return _+1;case"MM":return P.s(_+1,2,"0");case"MMM":return le(U.monthsShort,_,oe,3);case"MMMM":return le(oe,_);case"D":return W.$D;case"DD":return P.s(W.$D,2,"0");case"d":return String(W.$W);case"dd":return le(U.weekdaysMin,W.$W,Y,2);case"ddd":return le(U.weekdaysShort,W.$W,Y,3);case"dddd":return Y[W.$W];case"H":return String(q);case"HH":return P.s(q,2,"0");case"h":return pe(1);case"hh":return pe(2);case"a":return he(q,K,!0);case"A":return he(q,K,!1);case"m":return String(K);case"mm":return P.s(K,2,"0");case"s":return String(W.$s);case"ss":return P.s(W.$s,2,"0");case"SSS":return P.s(W.$ms,3,"0");case"Z":return x}return null}(ue)||x.replace(":","")})},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(B,W,U){var N,x=this,q=P.p(W),K=T(B),_=(K.utcOffset()-this.utcOffset())*r,Y=this-K,oe=function(){return P.m(x,K)};switch(q){case p:N=oe()/12;break;case f:N=oe();break;case d:N=oe()/3;break;case c:N=(Y-_)/6048e5;break;case l:N=(Y-_)/864e5;break;case u:N=Y/i;break;case s:N=Y/r;break;case o:N=Y/n;break;default:N=Y}return U?N:P.a(N)},M.daysInMonth=function(){return this.endOf(f).$D},M.$locale=function(){return E[this.$L]},M.locale=function(B,W){if(!B)return this.$L;var U=this.clone(),N=D(B,W,!0);return N&&(U.$L=N),U},M.clone=function(){return P.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},F}(),$=V.prototype;return T.prototype=$,[["$ms",a],["$s",o],["$m",s],["$H",u],["$W",l],["$M",f],["$y",p],["$D",m]].forEach(function(F){$[F[1]]=function(M){return this.$g(M,F[0],F[1])}}),T.extend=function(F,M){return F.$i||(F(M,V,T),F.$i=!0),T},T.locale=D,T.isDayjs=L,T.unix=function(F){return T(1e3*F)},T.en=E[S],T.Ls=E,T.p={},T})})(Gy);var k$=Gy.exports;const fl=Ke(k$);var Yy={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ht,function(){return function(n,r,i){r.prototype.isToday=function(){var a="YYYY-MM-DD",o=i();return this.format(a)===o.format(a)}}})})(Yy);var T$=Yy.exports;const O$=Ke(T$);var Jy={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ht,function(){return function(n,r,i){r.prototype.isYesterday=function(){var a="YYYY-MM-DD",o=i().subtract(1,"day");return this.format(a)===o.format(a)}}})})(Jy);var C$=Jy.exports;const $$=Ke(C$);fl.extend(O$),fl.extend($$);function I$(e,t="day"){var r,i,a;if(!e||e.length===0)return[];const n=[];(r=e[0])!=null&&r.timestamp&&n.push(Xy(e[0].timestamp));for(let o=0;o<e.length;o++)if(e[o]&&n.push(e[o]),o+1<e.length){const s=(i=e[o])==null?void 0:i.timestamp,u=(a=e[o+1])==null?void 0:a.timestamp;!fl(s).isSame(u,t)&&u&&n.push(Xy(u))}return n}function Xy(e){return{id:ky(),direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:R$(e)}}}function R$(e,t=!1){const n=fl(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")}function P$(e=""){if(typeof e!="string")throw new TypeError("Color should be string!");const t=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(e);if(t)return t.splice(1).map(r=>Number.parseInt(r,16));const n=/^#?([\da-f])([\da-f])([\da-f])$/i.exec(e);if(n)return n.splice(1).map(r=>Number.parseInt(r+r,16));if(e.includes(","))return e.split(",").map(r=>Number.parseInt(r));throw new Error("Invalid color format! Use #ABC or #AABBCC or r,g,b")}function A$(e){return"#"+e.map(t=>`0${t.toString(16).toUpperCase()}`.slice(-2)).join("")}function N$(e,t){return e.map(n=>Math.round(n+(255-n)*t))}function D$(e,t){return e.map(n=>Math.round(n*t))}const po=e=>t=>N$(t,e),ho=e=>t=>D$(t,e),M$={50:po(.95),100:po(.9),200:po(.75),300:po(.6),400:po(.3),500:e=>e,600:ho(.9),700:ho(.6),800:ho(.45),900:ho(.3),950:ho(.2)};function Qy(e,t=M$){const n={},r=P$(e);for(const[i,a]of Object.entries(t))n[i]=A$(a(r));return n}var at;(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 a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(at||(at={}));var kf;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(kf||(kf={}));const ge=at.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Gr=e=>{switch(typeof e){case"undefined":return ge.undefined;case"string":return ge.string;case"number":return isNaN(e)?ge.nan:ge.number;case"boolean":return ge.boolean;case"function":return ge.function;case"bigint":return ge.bigint;case"symbol":return ge.symbol;case"object":return Array.isArray(e)?ge.array:e===null?ge.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ge.promise:typeof Map<"u"&&e instanceof Map?ge.map:typeof Set<"u"&&e instanceof Set?ge.set:typeof Date<"u"&&e instanceof Date?ge.date:ge.object;default:return ge.unknown}},se=at.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"]),j$=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");let zn=class 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(a){return a.message},r={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let s=r,u=0;for(;u<o.path.length;){const l=o.path[u];u===o.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(o))):s[l]=s[l]||{_errors:[]},s=s[l],u++}}};return i(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,at.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()}};zn.create=e=>new zn(e);const mo=(e,t)=>{let n;switch(e.code){case se.invalid_type:e.received===ge.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case se.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,at.jsonStringifyReplacer)}`;break;case se.unrecognized_keys:n=`Unrecognized key(s) in object: ${at.joinValues(e.keys,", ")}`;break;case se.invalid_union:n="Invalid input";break;case se.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${at.joinValues(e.options)}`;break;case se.invalid_enum_value:n=`Invalid enum value. Expected ${at.joinValues(e.options)}, received '${e.received}'`;break;case se.invalid_arguments:n="Invalid function arguments";break;case se.invalid_return_type:n="Invalid function return type";break;case se.invalid_date:n="Invalid date";break;case se.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}"`:at.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case se.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 se.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 se.custom:n="Invalid input";break;case se.invalid_intersection_types:n="Intersection results could not be merged";break;case se.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case se.not_finite:n="Number must be finite";break;default:n=t.defaultError,at.assertNever(e)}return{message:n}};let eg=mo;function L$(e){eg=e}function dl(){return eg}const pl=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};let s="";const u=r.filter(l=>!!l).slice().reverse();for(const l of u)s=l(o,{data:t,defaultError:s}).message;return{...i,path:a,message:i.message||s}},F$=[];function xe(e,t){const n=pl({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,dl(),mo].filter(r=>!!r)});e.common.issues.push(n)}let pn=class RC{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 Le;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 RC.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Le;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[a.value]=o.value)}return{status:t.value,value:r}}};const Le=Object.freeze({status:"aborted"}),tg=e=>({status:"dirty",value:e}),sn=e=>({status:"valid",value:e}),Tf=e=>e.status==="aborted",Of=e=>e.status==="dirty",vo=e=>e.status==="valid",hl=e=>typeof Promise<"u"&&e instanceof Promise;var Ce;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ce||(Ce={}));let or=class{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}};const ng=(e,t)=>{if(vo(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 zn(e.common.issues);return this._error=n,this._error}}};function Be(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:(o,s)=>o.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:r??s.defaultError}:{message:n??s.defaultError},description:i}}let qe=class{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Gr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Gr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new pn,ctx:{common:t.parent.common,data:t.data,parsedType:Gr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(hl(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:Gr(t)},a=this._parseSync({data:t,path:i.path,parent:i});return ng(i,a)}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:Gr(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(hl(i)?i:Promise.resolve(i));return ng(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:se.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(u=>u?!0:(s(),!1)):o?!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 qn({schema:this,typeName:Ne.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Rr.create(this,this._def)}nullable(){return $i.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ci.create(this,this._def)}promise(){return ra.create(this,this._def)}or(t){return _o.create([this,t],this._def)}and(t){return Eo.create(this,t,this._def)}transform(t){return new qn({...Be(this._def),schema:this,typeName:Ne.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new $o({...Be(this._def),innerType:this,defaultValue:n,typeName:Ne.ZodDefault})}brand(){return new sg({typeName:Ne.ZodBranded,type:this,...Be(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new xl({...Be(this._def),innerType:this,catchValue:n,typeName:Ne.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return If.create(this,t)}readonly(){return Sl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const B$=/^c[^\s-]{8,}$/i,U$=/^[a-z][a-z0-9]*$/,z$=/^[0-9A-HJKMNP-TV-Z]{26}$/,q$=/^[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,V$=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,H$="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Cf;const W$=/^(((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}))$/,Z$=/^(([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})))$/,K$=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function G$(e,t){return!!((t==="v4"||!t)&&W$.test(e)||(t==="v6"||!t)&&Z$.test(e))}let ea=class ll extends qe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ge.string){const a=this._getOrReturnCtx(t);return xe(a,{code:se.invalid_type,expected:ge.string,received:a.parsedType}),Le}const r=new pn;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),xe(i,{code:se.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),xe(i,{code:se.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,s=t.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(t,i),o?xe(i,{code:se.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&xe(i,{code:se.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")V$.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"email",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")Cf||(Cf=new RegExp(H$,"u")),Cf.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"emoji",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")q$.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"uuid",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")B$.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"cuid",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")U$.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"cuid2",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")z$.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"ulid",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),xe(i,{validation:"url",code:se.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"regex",code:se.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),xe(i,{code:se.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),xe(i,{code:se.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),xe(i,{code:se.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?K$(a).test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{code:se.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="ip"?G$(t.data,a.version)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"ip",code:se.invalid_string,message:a.message}),r.dirty()):at.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:se.invalid_string,...Ce.errToObj(r)})}_addCheck(t){return new ll({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ce.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ce.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ce.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ce.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ce.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ce.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ce.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ce.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,...Ce.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ce.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Ce.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ce.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ce.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ce.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ce.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ce.errToObj(n)})}nonempty(t){return this.min(1,Ce.errToObj(t))}trim(){return new ll({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ll({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ll({...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}};ea.create=e=>{var t;return new ea({checks:[],typeName:Ne.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Be(e)})};function Y$(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}let yo=class yy extends qe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ge.number){const a=this._getOrReturnCtx(t);return xe(a,{code:se.invalid_type,expected:ge.number,received:a.parsedType}),Le}let r;const i=new pn;for(const a of this._def.checks)a.kind==="int"?at.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),xe(r,{code:se.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:se.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:se.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?Y$(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),xe(r,{code:se.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),xe(r,{code:se.not_finite,message:a.message}),i.dirty()):at.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ce.toString(n))}setLimit(t,n,r,i){return new yy({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ce.toString(i)}]})}_addCheck(t){return new yy({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ce.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ce.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ce.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ce.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ce.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"&&at.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)}};yo.create=e=>new yo({checks:[],typeName:Ne.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Be(e)});let go=class gy extends qe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==ge.bigint){const a=this._getOrReturnCtx(t);return xe(a,{code:se.invalid_type,expected:ge.bigint,received:a.parsedType}),Le}let r;const i=new pn;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:se.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:se.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:se.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):at.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ce.toString(n))}setLimit(t,n,r,i){return new gy({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ce.toString(i)}]})}_addCheck(t){return new gy({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ce.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}};go.create=e=>{var t;return new go({checks:[],typeName:Ne.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Be(e)})};let bo=class extends qe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ge.boolean){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ge.boolean,received:r.parsedType}),Le}return sn(t.data)}};bo.create=e=>new bo({typeName:Ne.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Be(e)});let xo=class PC extends qe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ge.date){const a=this._getOrReturnCtx(t);return xe(a,{code:se.invalid_type,expected:ge.date,received:a.parsedType}),Le}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return xe(a,{code:se.invalid_date}),Le}const r=new pn;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),xe(i,{code:se.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),xe(i,{code:se.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):at.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new PC({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ce.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ce.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}};xo.create=e=>new xo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ne.ZodDate,...Be(e)});let ml=class extends qe{_parse(t){if(this._getType(t)!==ge.symbol){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ge.symbol,received:r.parsedType}),Le}return sn(t.data)}};ml.create=e=>new ml({typeName:Ne.ZodSymbol,...Be(e)});let wo=class extends qe{_parse(t){if(this._getType(t)!==ge.undefined){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ge.undefined,received:r.parsedType}),Le}return sn(t.data)}};wo.create=e=>new wo({typeName:Ne.ZodUndefined,...Be(e)});let So=class extends qe{_parse(t){if(this._getType(t)!==ge.null){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ge.null,received:r.parsedType}),Le}return sn(t.data)}};So.create=e=>new So({typeName:Ne.ZodNull,...Be(e)});let ta=class extends qe{constructor(){super(...arguments),this._any=!0}_parse(t){return sn(t.data)}};ta.create=e=>new ta({typeName:Ne.ZodAny,...Be(e)});let Oi=class extends qe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return sn(t.data)}};Oi.create=e=>new Oi({typeName:Ne.ZodUnknown,...Be(e)});let Ir=class extends qe{_parse(t){const n=this._getOrReturnCtx(t);return xe(n,{code:se.invalid_type,expected:ge.never,received:n.parsedType}),Le}};Ir.create=e=>new Ir({typeName:Ne.ZodNever,...Be(e)});let vl=class extends qe{_parse(t){if(this._getType(t)!==ge.undefined){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ge.void,received:r.parsedType}),Le}return sn(t.data)}};vl.create=e=>new vl({typeName:Ne.ZodVoid,...Be(e)});let Ci=class pf extends qe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==ge.array)return xe(n,{code:se.invalid_type,expected:ge.array,received:n.parsedType}),Le;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(o||s)&&(xe(n,{code:o?se.too_big:se.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?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&&(xe(n,{code:se.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&&(xe(n,{code:se.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((o,s)=>i.type._parseAsync(new or(n,o,n.path,s)))).then(o=>pn.mergeArray(r,o));const a=[...n.data].map((o,s)=>i.type._parseSync(new or(n,o,n.path,s)));return pn.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new pf({...this._def,minLength:{value:t,message:Ce.toString(n)}})}max(t,n){return new pf({...this._def,maxLength:{value:t,message:Ce.toString(n)}})}length(t,n){return new pf({...this._def,exactLength:{value:t,message:Ce.toString(n)}})}nonempty(t){return this.min(1,t)}};Ci.create=(e,t)=>new Ci({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ne.ZodArray,...Be(t)});function na(e){if(e instanceof In){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Rr.create(na(r))}return new In({...e._def,shape:()=>t})}else return e instanceof Ci?new Ci({...e._def,type:na(e.element)}):e instanceof Rr?Rr.create(na(e.unwrap())):e instanceof $i?$i.create(na(e.unwrap())):e instanceof Yr?Yr.create(e.items.map(t=>na(t))):e}let In=class ar extends qe{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=at.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ge.object){const l=this._getOrReturnCtx(t);return xe(l,{code:se.invalid_type,expected:ge.object,received:l.parsedType}),Le}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Ir&&this._def.unknownKeys==="strip"))for(const l in i.data)o.includes(l)||s.push(l);const u=[];for(const l of o){const c=a[l],f=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new or(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Ir){const l=this._def.unknownKeys;if(l==="passthrough")for(const c of s)u.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")s.length>0&&(xe(i,{code:se.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const c of s){const f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new or(i,f,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const c of u){const f=await c.key;l.push({key:f,value:await c.value,alwaysSet:c.alwaysSet})}return l}).then(l=>pn.mergeObjectSync(r,l)):pn.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(t){return Ce.errToObj,new ar({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,a,o,s;const u=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=Ce.errToObj(t).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new ar({...this._def,unknownKeys:"strip"})}passthrough(){return new ar({...this._def,unknownKeys:"passthrough"})}extend(t){return new ar({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ar({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ne.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new ar({...this._def,catchall:t})}pick(t){const n={};return at.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new ar({...this._def,shape:()=>n})}omit(t){const n={};return at.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new ar({...this._def,shape:()=>n})}deepPartial(){return na(this)}partial(t){const n={};return at.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new ar({...this._def,shape:()=>n})}required(t){const n={};return at.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof Rr;)a=a._def.innerType;n[r]=a}}),new ar({...this._def,shape:()=>n})}keyof(){return og(at.objectKeys(this.shape))}};In.create=(e,t)=>new In({shape:()=>e,unknownKeys:"strip",catchall:Ir.create(),typeName:Ne.ZodObject,...Be(t)}),In.strictCreate=(e,t)=>new In({shape:()=>e,unknownKeys:"strict",catchall:Ir.create(),typeName:Ne.ZodObject,...Be(t)}),In.lazycreate=(e,t)=>new In({shape:e,unknownKeys:"strip",catchall:Ir.create(),typeName:Ne.ZodObject,...Be(t)});let _o=class extends qe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new zn(s.ctx.common.issues));return xe(n,{code:se.invalid_union,unionErrors:o}),Le}if(n.common.async)return Promise.all(r.map(async a=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const u of r){const l={...n,common:{...n.common,issues:[]},parent:null},c=u._parseSync({data:n.data,path:n.path,parent:l});if(c.status==="valid")return c;c.status==="dirty"&&!a&&(a={result:c,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(u=>new zn(u));return xe(n,{code:se.invalid_union,unionErrors:s}),Le}}get options(){return this._def.options}};_o.create=(e,t)=>new _o({options:e,typeName:Ne.ZodUnion,...Be(t)});const yl=e=>e instanceof ko?yl(e.schema):e instanceof qn?yl(e.innerType()):e instanceof To?[e.value]:e instanceof Oo?e.options:e instanceof Co?Object.keys(e.enum):e instanceof $o?yl(e._def.innerType):e instanceof wo?[void 0]:e instanceof So?[null]:null;let rg=class AC extends qe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.object)return xe(n,{code:se.invalid_type,expected:ge.object,received:n.parsedType}),Le;const r=this.discriminator,i=n.data[r],a=this.optionsMap.get(i);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(xe(n,{code:se.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Le)}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 a of n){const o=yl(a.shape[t]);if(!o)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of o){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,a)}}return new AC({typeName:Ne.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Be(r)})}};function $f(e,t){const n=Gr(e),r=Gr(t);if(e===t)return{valid:!0,data:e};if(n===ge.object&&r===ge.object){const i=at.objectKeys(t),a=at.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(const s of a){const u=$f(e[s],t[s]);if(!u.valid)return{valid:!1};o[s]=u.data}return{valid:!0,data:o}}else if(n===ge.array&&r===ge.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const o=e[a],s=t[a],u=$f(o,s);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return n===ge.date&&r===ge.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}let Eo=class extends qe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(Tf(a)||Tf(o))return Le;const s=$f(a.value,o.value);return s.valid?((Of(a)||Of(o))&&n.dirty(),{status:n.value,value:s.data}):(xe(r,{code:se.invalid_intersection_types}),Le)};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(([a,o])=>i(a,o)):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}))}};Eo.create=(e,t,n)=>new Eo({left:e,right:t,typeName:Ne.ZodIntersection,...Be(n)});let Yr=class NC extends qe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.array)return xe(r,{code:se.invalid_type,expected:ge.array,received:r.parsedType}),Le;if(r.data.length<this._def.items.length)return xe(r,{code:se.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Le;!this._def.rest&&r.data.length>this._def.items.length&&(xe(r,{code:se.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,s)=>{const u=this._def.items[s]||this._def.rest;return u?u._parse(new or(r,o,r.path,s)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>pn.mergeArray(n,o)):pn.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new NC({...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:Ne.ZodTuple,rest:null,...Be(t)})};let ig=class by extends qe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.object)return xe(r,{code:se.invalid_type,expected:ge.object,received:r.parsedType}),Le;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in r.data)i.push({key:a._parse(new or(r,s,r.path,s)),value:o._parse(new or(r,r.data[s],r.path,s))});return r.common.async?pn.mergeObjectAsync(n,i):pn.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof qe?new by({keyType:t,valueType:n,typeName:Ne.ZodRecord,...Be(r)}):new by({keyType:ea.create(),valueType:t,typeName:Ne.ZodRecord,...Be(n)})}},gl=class extends qe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.map)return xe(r,{code:se.invalid_type,expected:ge.map,received:r.parsedType}),Le;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([s,u],l)=>({key:i._parse(new or(r,s,r.path,[l,"key"])),value:a._parse(new or(r,u,r.path,[l,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const u of o){const l=await u.key,c=await u.value;if(l.status==="aborted"||c.status==="aborted")return Le;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const u of o){const l=u.key,c=u.value;if(l.status==="aborted"||c.status==="aborted")return Le;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}}}};gl.create=(e,t,n)=>new gl({valueType:t,keyType:e,typeName:Ne.ZodMap,...Be(n)});let bl=class xy extends qe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.set)return xe(r,{code:se.invalid_type,expected:ge.set,received:r.parsedType}),Le;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(xe(r,{code:se.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&&(xe(r,{code:se.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function o(u){const l=new Set;for(const c of u){if(c.status==="aborted")return Le;c.status==="dirty"&&n.dirty(),l.add(c.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((u,l)=>a._parse(new or(r,u,r.path,l)));return r.common.async?Promise.all(s).then(u=>o(u)):o(s)}min(t,n){return new xy({...this._def,minSize:{value:t,message:Ce.toString(n)}})}max(t,n){return new xy({...this._def,maxSize:{value:t,message:Ce.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};bl.create=(e,t)=>new bl({valueType:e,minSize:null,maxSize:null,typeName:Ne.ZodSet,...Be(t)});let ag=class hf extends qe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.function)return xe(n,{code:se.invalid_type,expected:ge.function,received:n.parsedType}),Le;function r(s,u){return pl({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,dl(),mo].filter(l=>!!l),issueData:{code:se.invalid_arguments,argumentsError:u}})}function i(s,u){return pl({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,dl(),mo].filter(l=>!!l),issueData:{code:se.invalid_return_type,returnTypeError:u}})}const a={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof ra){const s=this;return sn(async function(...u){const l=new zn([]),c=await s._def.args.parseAsync(u,a).catch(p=>{throw l.addIssue(r(u,p)),l}),f=await Reflect.apply(o,this,c);return await s._def.returns._def.type.parseAsync(f,a).catch(p=>{throw l.addIssue(i(f,p)),l})})}else{const s=this;return sn(function(...u){const l=s._def.args.safeParse(u,a);if(!l.success)throw new zn([r(u,l.error)]);const c=Reflect.apply(o,this,l.data),f=s._def.returns.safeParse(c,a);if(!f.success)throw new zn([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new hf({...this._def,args:Yr.create(t).rest(Oi.create())})}returns(t){return new hf({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new hf({args:t||Yr.create([]).rest(Oi.create()),returns:n||Oi.create(),typeName:Ne.ZodFunction,...Be(r)})}},ko=class extends qe{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})}};ko.create=(e,t)=>new ko({getter:e,typeName:Ne.ZodLazy,...Be(t)});let To=class extends qe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return xe(n,{received:n.data,code:se.invalid_literal,expected:this._def.value}),Le}return{status:"valid",value:t.data}}get value(){return this._def.value}};To.create=(e,t)=>new To({value:e,typeName:Ne.ZodLiteral,...Be(t)});function og(e,t){return new Oo({values:e,typeName:Ne.ZodEnum,...Be(t)})}let Oo=class wy extends qe{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return xe(n,{expected:at.joinValues(r),received:n.parsedType,code:se.invalid_type}),Le}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return xe(n,{received:n.data,code:se.invalid_enum_value,options:r}),Le}return sn(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 wy.create(t)}exclude(t){return wy.create(this.options.filter(n=>!t.includes(n)))}};Oo.create=og;let Co=class extends qe{_parse(t){const n=at.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ge.string&&r.parsedType!==ge.number){const i=at.objectValues(n);return xe(r,{expected:at.joinValues(i),received:r.parsedType,code:se.invalid_type}),Le}if(n.indexOf(t.data)===-1){const i=at.objectValues(n);return xe(r,{received:r.data,code:se.invalid_enum_value,options:i}),Le}return sn(t.data)}get enum(){return this._def.values}};Co.create=(e,t)=>new Co({values:e,typeName:Ne.ZodNativeEnum,...Be(t)});let ra=class extends qe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.promise&&n.common.async===!1)return xe(n,{code:se.invalid_type,expected:ge.promise,received:n.parsedType}),Le;const r=n.parsedType===ge.promise?n.data:Promise.resolve(n.data);return sn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}};ra.create=(e,t)=>new ra({type:e,typeName:Ne.ZodPromise,...Be(t)});let qn=class extends qe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ne.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{xe(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(r.data,a);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(o).then(s=>this._def.schema._parseAsync({data:s,path:r.path,parent:r})):this._def.schema._parseSync({data:o,path:r.path,parent:r})}if(i.type==="refinement"){const o=s=>{const u=i.refinement(s,a);if(r.common.async)return Promise.resolve(u);if(u 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"?Le:(s.status==="dirty"&&n.dirty(),o(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"?Le:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!vo(o))return o;const s=i.transform(o.value,a);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(o=>vo(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:n.value,value:s})):o);at.assertNever(i)}};qn.create=(e,t,n)=>new qn({schema:e,typeName:Ne.ZodEffects,effect:t,...Be(n)}),qn.createWithPreprocess=(e,t,n)=>new qn({schema:t,effect:{type:"preprocess",transform:e},typeName:Ne.ZodEffects,...Be(n)});let Rr=class extends qe{_parse(t){return this._getType(t)===ge.undefined?sn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Rr.create=(e,t)=>new Rr({innerType:e,typeName:Ne.ZodOptional,...Be(t)});let $i=class extends qe{_parse(t){return this._getType(t)===ge.null?sn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};$i.create=(e,t)=>new $i({innerType:e,typeName:Ne.ZodNullable,...Be(t)});let $o=class extends qe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ge.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};$o.create=(e,t)=>new $o({innerType:e,typeName:Ne.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Be(t)});let xl=class extends qe{_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 hl(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new zn(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new zn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};xl.create=(e,t)=>new xl({innerType:e,typeName:Ne.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Be(t)});let wl=class extends qe{_parse(t){if(this._getType(t)!==ge.nan){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ge.nan,received:r.parsedType}),Le}return{status:"valid",value:t.data}}};wl.create=e=>new wl({typeName:Ne.ZodNaN,...Be(e)});const J$=Symbol("zod_brand");let sg=class extends qe{_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}},If=class DC extends qe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Le:a.status==="dirty"?(n.dirty(),tg(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Le: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 DC({in:t,out:n,typeName:Ne.ZodPipeline})}},Sl=class extends qe{_parse(t){const n=this._def.innerType._parse(t);return vo(n)&&(n.value=Object.freeze(n.value)),n}};Sl.create=(e,t)=>new Sl({innerType:e,typeName:Ne.ZodReadonly,...Be(t)});const lg=(e,t={},n)=>e?ta.create().superRefine((r,i)=>{var a,o;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,u=(o=(a=s.fatal)!==null&&a!==void 0?a:n)!==null&&o!==void 0?o:!0,l=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...l,fatal:u})}}):ta.create(),X$={object:In.lazycreate};var Ne;(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"})(Ne||(Ne={}));const Q$=(e,t={message:`Input not instance of ${e.name}`})=>lg(n=>n instanceof e,t),ug=ea.create,cg=yo.create,eI=wl.create,tI=go.create,fg=bo.create,nI=xo.create,rI=ml.create,iI=wo.create,aI=So.create,oI=ta.create,sI=Oi.create,lI=Ir.create,uI=vl.create,cI=Ci.create,fI=In.create,dI=In.strictCreate,pI=_o.create,hI=rg.create,mI=Eo.create,vI=Yr.create,yI=ig.create,gI=gl.create,bI=bl.create,xI=ag.create,wI=ko.create,SI=To.create,_I=Oo.create,EI=Co.create,kI=ra.create,dg=qn.create,TI=Rr.create,OI=$i.create,CI=qn.createWithPreprocess,$I=If.create;var we=Object.freeze({__proto__:null,defaultErrorMap:mo,setErrorMap:L$,getErrorMap:dl,makeIssue:pl,EMPTY_PATH:F$,addIssueToContext:xe,ParseStatus:pn,INVALID:Le,DIRTY:tg,OK:sn,isAborted:Tf,isDirty:Of,isValid:vo,isAsync:hl,get util(){return at},get objectUtil(){return kf},ZodParsedType:ge,getParsedType:Gr,ZodType:qe,ZodString:ea,ZodNumber:yo,ZodBigInt:go,ZodBoolean:bo,ZodDate:xo,ZodSymbol:ml,ZodUndefined:wo,ZodNull:So,ZodAny:ta,ZodUnknown:Oi,ZodNever:Ir,ZodVoid:vl,ZodArray:Ci,ZodObject:In,ZodUnion:_o,ZodDiscriminatedUnion:rg,ZodIntersection:Eo,ZodTuple:Yr,ZodRecord:ig,ZodMap:gl,ZodSet:bl,ZodFunction:ag,ZodLazy:ko,ZodLiteral:To,ZodEnum:Oo,ZodNativeEnum:Co,ZodPromise:ra,ZodEffects:qn,ZodTransformer:qn,ZodOptional:Rr,ZodNullable:$i,ZodDefault:$o,ZodCatch:xl,ZodNaN:wl,BRAND:J$,ZodBranded:sg,ZodPipeline:If,ZodReadonly:Sl,custom:lg,Schema:qe,ZodSchema:qe,late:X$,get ZodFirstPartyTypeKind(){return Ne},coerce:{string:e=>ea.create({...e,coerce:!0}),number:e=>yo.create({...e,coerce:!0}),boolean:e=>bo.create({...e,coerce:!0}),bigint:e=>go.create({...e,coerce:!0}),date:e=>xo.create({...e,coerce:!0})},any:oI,array:cI,bigint:tI,boolean:fg,date:nI,discriminatedUnion:hI,effect:dg,enum:_I,function:xI,instanceof:Q$,intersection:mI,lazy:wI,literal:SI,map:gI,nan:eI,nativeEnum:EI,never:lI,null:aI,nullable:OI,number:cg,object:fI,oboolean:()=>fg().optional(),onumber:()=>cg().optional(),optional:TI,ostring:()=>ug().optional(),pipeline:$I,preprocess:CI,promise:kI,record:yI,set:bI,strictObject:dI,string:ug,symbol:rI,transformer:dg,tuple:vI,undefined:iI,union:pI,unknown:sI,void:uI,NEVER:Le,ZodIssueCode:se,quotelessJson:j$,ZodError:zn});const ia=we.object({title:we.string().optional(),link:we.string().optional()}),Rf=we.object({color:we.string().optional(),variant:we.enum(["soft","solid"]).optional(),themeMode:we.enum(["light","dark"]).optional(),fontFamily:we.enum(["rubik","inter","ibm","fira"]).optional(),radius:we.number().min(.5).max(4).optional()}),pg=we.object({composerPlaceholder:we.string().optional(),botName:we.string().optional(),botAvatar:we.string().optional(),botDescription:we.string().optional(),website:ia.optional(),email:ia.optional(),phone:ia.optional(),privacyPolicy:ia.optional(),termsOfService:ia.optional(),showPoweredBy:we.boolean().optional()}).merge(Rf),hg=we.enum(["heading1","heading2","heading3","text","horizontalRule","link","italic","bold","orderedList","unorderedList","listItem","lineBreak","pre"]),mg=we.object({}).passthrough().transform(e=>e),fe=we.object({className:we.string().optional(),style:mg.optional()}),_l=we.object({container:fe.optional(),image:fe.optional(),fallback:fe.optional()}),vg=we.object({button:fe.optional(),text:we.record(hg,fe.optional()),image:we.object({image:fe.optional(),placeholder:fe.optional()}).optional(),audio:fe.optional(),video:fe.optional(),file:we.object({container:fe.optional(),title:fe.optional(),icon:fe.optional()}).optional(),location:we.object({container:fe.optional(),title:fe.optional(),icon:fe.optional()}).optional(),column:fe.optional(),row:fe.optional(),bubble:fe.optional(),carousel:we.object({container:fe.optional(),slidesContainer:fe.optional(),backButton:fe.optional(),nextButton:fe.optional()}).optional(),dropdown:we.object({button:we.object({container:fe.optional(),icon:fe.optional(),text:fe.optional()}).optional(),content:we.object({container:fe.optional(),item:fe.optional()}).optional()}).optional()}),yg=we.object({container:fe.optional(),modal:we.object({overlay:fe.optional(),container:fe.optional(),dialog:we.object({container:fe.optional(),title:we.object({container:fe.optional(),text:fe.optional(),closeIcon:fe.optional()}).optional(),content:fe.optional(),newConversation:we.object({text:fe.optional(),button:fe.optional()}).optional()}).optional()}).optional(),notification:we.object({container:fe.optional(),title:fe.optional(),description:fe.optional(),icon:fe.optional(),closeIcon:fe.optional()}).optional(),header:we.object({container:fe.optional(),content:we.object({container:fe.optional(),title:fe.optional(),description:fe.optional(),avatar:_l.optional(),actions:we.object({container:fe.optional(),icons:fe.optional()}).optional()}),expandedContent:we.object({container:fe.optional(),group:fe.optional(),descriptionItems:we.object({container:fe.optional(),icon:fe.optional(),text:fe.optional(),link:fe.optional(),poweredBy:fe.optional()}).optional()}).optional(),description:we.object({container:fe.optional(),title:fe.optional(),subtitle:fe.optional()}).optional(),newConversationIcon:fe.optional()}).optional(),composer:we.object({container:fe.optional(),input:fe.optional(),uploadButton:we.object({container:fe.optional(),icon:fe.optional()}).optional(),button:we.object({container:fe.optional(),icon:fe.optional()}).optional()}).optional(),fab:we.object({icon:fe.optional(),container:fe.optional()}).optional(),messageList:we.object({scrollbar:we.object({container:fe.optional(),viewport:fe.optional(),thumb:fe.optional(),corner:fe.optional(),background:fe.optional()}).optional(),container:fe.optional(),marquee:we.object({content:fe.optional(),title:fe.optional(),description:fe.optional(),avatar:_l.optional(),container:fe.optional()}).optional(),scrollDownButton:we.object({container:fe.optional(),button:fe.optional(),icon:fe.optional()}).optional()}).optional(),message:we.object({container:fe.optional(),avatar:_l.optional(),blocks:vg.optional()}).optional(),loadingIndicator:we.object({container:fe.optional(),loader:fe.optional()}).optional()}),gg=we.enum(["opened","closed","initial"]),bg=we.object({name:we.string().optional(),pictureUrl:we.string().optional(),data:we.record(we.unknown()).optional(),userKey:we.string().optional()}),xg=we.object({configuration:pg.optional().catch(void 0),theme:yg.optional().catch(void 0),style:we.string().optional().catch(void 0),user:bg.optional().catch(void 0)}),II=xg.extend({clientId:we.string(),botId:we.string(),selector:we.string().optional().catch(void 0),webchatScriptUrl:we.string().optional().catch(void 0),fabScriptUrl:we.string().optional().catch(void 0),pushpinUrl:we.string().optional().catch(void 0),defaultState:gg.optional().catch(void 0)});function wg(e){const{fontFamily:t,radius:n,themeMode:r,variant:i,color:a}=Rf.parse(e);let o={},s={};if(a){const c=Qy(a),f=r==="dark"?By(c):c,d=Qy(s$(l$(_f(a)))),p=r==="dark"?By(d):d,m=r==="dark"?"#101010":"#fdfdfd";s=Object.entries({...f,1:m}).reduce((y,[v,g])=>({...y,[`--bpPrimary-${v}`]:g}),{});const h=Object.entries({...p,1:m}).reduce((y,[v,g])=>({...y,[`--bpGray-${v}`]:g}),{});o={...s,...h}}n&&(o={...o,"--bpRadius-scale":n.toString()});const u=s?Wy(s["--bpPrimary-600"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)",l=i==="solid"?{"--header-bg":"var(--bpPrimary-600)","--header-bg-hover":"var(--bpPrimary-700)","--header-hover-dark":"var(--bpPrimary-800)","--header-title":u,"--header-description":u,"--header-description-icon":u,"--header-description-link":u,"--header-avatar-bg":"var(--bpPrimary-300)","--header-avatar-text":"var(--bpPrimary-700)","--message-bg":"var(--bpPrimary-600)","--message-bg-hover":"var(--bpPrimary-700)","--message-text":u,"--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-50)","--button-bg-hover":"var(--bpPrimary-100)","--button-text":"var(--bpPrimary-800)","--fab-bg":"var(--bpPrimary-600)","--fab-bg-hover":"var(--bpPrimary-700)","--fab-icon":u}:{"--header-bg":"var(--bpGray-50)","--header-bg-hover":"var(--bpGray-100)","--header-hover-dark":"var(--bpGray-200)","--header-title":"var(--bpGray-900)","--header-description":"var(--bpGray-800)","--header-description-icon":"var(--bpPrimary-700)","--header-description-link":"var(--bpPrimary-800)","--header-avatar-bg":"var(--bpPrimary-600)","--header-avatar-text":"var(--bpPrimary-50)","--message-bg":"var(--bpPrimary-100)","--message-bg-hover":"var(--bpPrimary-200)","--message-text":"var(--bpPrimary-900)","--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-500)","--button-bg-hover":"var(--bpPrimary-600)","--button-text":s?Wy(s["--bpPrimary-500"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)","--fab-bg":"var(--bpPrimary-100)","--fab-bg-hover":"var(--bpPrimary-200)","--fab-icon":"var(--bpPrimary-700)"};return o={...o,...l},Zy(":root",o)+(t?Zy(".bpFont",{"font-family":`var(--${t}-font)`}):"")}const El=j.forwardRef(({userId:e,src:t,container:n,image:r,fallback:i,...a},o)=>{const s=Ky(e??"",15);return I.jsxs(xf,{ref:o,"data-color":s,...n,...a,children:[I.jsx(wf,{src:t,...r}),I.jsx(Sf,{...i,children:typeof a.children=="string"?a.children[0]:a.children})]})});El.displayName="Avatar";function Zse(){}function Kse(){}function RI(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const PI=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,AI=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,NI={};function Sg(e,t){return(NI.jsx?AI:PI).test(e)}const DI=/[ \t\n\f\r]/g;function MI(e){return typeof e=="object"?e.type==="text"?_g(e.value):!1:_g(e)}function _g(e){return e.replace(DI,"")===""}class Io{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Io.prototype.property={},Io.prototype.normal={},Io.prototype.space=null;function Eg(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 Io(n,r,t)}function Pf(e){return e.toLowerCase()}class Rn{constructor(t,n){this.property=t,this.attribute=n}}Rn.prototype.space=null,Rn.prototype.boolean=!1,Rn.prototype.booleanish=!1,Rn.prototype.overloadedBoolean=!1,Rn.prototype.number=!1,Rn.prototype.commaSeparated=!1,Rn.prototype.spaceSeparated=!1,Rn.prototype.commaOrSpaceSeparated=!1,Rn.prototype.mustUseProperty=!1,Rn.prototype.defined=!1;let jI=0;const Ue=Ii(),It=Ii(),kg=Ii(),ie=Ii(),bt=Ii(),aa=Ii(),Sn=Ii();function Ii(){return 2**++jI}const Af=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ue,booleanish:It,commaOrSpaceSeparated:Sn,commaSeparated:aa,number:ie,overloadedBoolean:kg,spaceSeparated:bt},Symbol.toStringTag,{value:"Module"})),Nf=Object.keys(Af);class Df extends Rn{constructor(t,n,r,i){let a=-1;if(super(t,n),Tg(this,"space",i),typeof r=="number")for(;++a<Nf.length;){const o=Nf[a];Tg(this,Nf[a],(r&Af[o])===Af[o])}}}Df.prototype.defined=!0;function Tg(e,t,n){n&&(e[t]=n)}const LI={}.hasOwnProperty;function oa(e){const t={},n={};let r;for(r in e.properties)if(LI.call(e.properties,r)){const i=e.properties[r],a=new Df(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Pf(r)]=r,n[Pf(a.attribute)]=r}return new Io(t,n,e.space)}const Og=oa({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}}),Cg=oa({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function $g(e,t){return t in e?e[t]:t}function Ig(e,t){return $g(e,t.toLowerCase())}const Rg=oa({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Ig,properties:{xmlns:null,xmlnsXLink:null}}),Pg=oa({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:It,ariaAutoComplete:null,ariaBusy:It,ariaChecked:It,ariaColCount:ie,ariaColIndex:ie,ariaColSpan:ie,ariaControls:bt,ariaCurrent:null,ariaDescribedBy:bt,ariaDetails:null,ariaDisabled:It,ariaDropEffect:bt,ariaErrorMessage:null,ariaExpanded:It,ariaFlowTo:bt,ariaGrabbed:It,ariaHasPopup:null,ariaHidden:It,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:bt,ariaLevel:ie,ariaLive:null,ariaModal:It,ariaMultiLine:It,ariaMultiSelectable:It,ariaOrientation:null,ariaOwns:bt,ariaPlaceholder:null,ariaPosInSet:ie,ariaPressed:It,ariaReadOnly:It,ariaRelevant:null,ariaRequired:It,ariaRoleDescription:bt,ariaRowCount:ie,ariaRowIndex:ie,ariaRowSpan:ie,ariaSelected:It,ariaSetSize:ie,ariaSort:null,ariaValueMax:ie,ariaValueMin:ie,ariaValueNow:ie,ariaValueText:null,role:null}}),FI=oa({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Ig,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:aa,acceptCharset:bt,accessKey:bt,action:null,allow:null,allowFullScreen:Ue,allowPaymentRequest:Ue,allowUserMedia:Ue,alt:null,as:null,async:Ue,autoCapitalize:null,autoComplete:bt,autoFocus:Ue,autoPlay:Ue,blocking:bt,capture:null,charSet:null,checked:Ue,cite:null,className:bt,cols:ie,colSpan:null,content:null,contentEditable:It,controls:Ue,controlsList:bt,coords:ie|aa,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ue,defer:Ue,dir:null,dirName:null,disabled:Ue,download:kg,draggable:It,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ue,formTarget:null,headers:bt,height:ie,hidden:Ue,high:ie,href:null,hrefLang:null,htmlFor:bt,httpEquiv:bt,id:null,imageSizes:null,imageSrcSet:null,inert:Ue,inputMode:null,integrity:null,is:null,isMap:Ue,itemId:null,itemProp:bt,itemRef:bt,itemScope:Ue,itemType:bt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ue,low:ie,manifest:null,max:null,maxLength:ie,media:null,method:null,min:null,minLength:ie,multiple:Ue,muted:Ue,name:null,nonce:null,noModule:Ue,noValidate:Ue,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle: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:Ue,optimum:ie,pattern:null,ping:bt,placeholder:null,playsInline:Ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ue,referrerPolicy:null,rel:bt,required:Ue,reversed:Ue,rows:ie,rowSpan:ie,sandbox:bt,scope:null,scoped:Ue,seamless:Ue,selected:Ue,shadowRootClonable:Ue,shadowRootDelegatesFocus:Ue,shadowRootMode:null,shape:null,size:ie,sizes:null,slot:null,span:ie,spellCheck:It,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ie,step:null,style:null,tabIndex:ie,target:null,title:null,translate:null,type:null,typeMustMatch:Ue,useMap:null,value:It,width:ie,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:bt,axis:null,background:null,bgColor:null,border:ie,borderColor:null,bottomMargin:ie,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ue,declare:Ue,event:null,face:null,frame:null,frameBorder:null,hSpace:ie,leftMargin:ie,link:null,longDesc:null,lowSrc:null,marginHeight:ie,marginWidth:ie,noResize:Ue,noHref:Ue,noShade:Ue,noWrap:Ue,object:null,profile:null,prompt:null,rev:null,rightMargin:ie,rules:null,scheme:null,scrolling:It,standby:null,summary:null,text:null,topMargin:ie,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ie,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ue,disableRemotePlayback:Ue,prefix:null,property:null,results:ie,security:null,unselectable:null}}),BI=oa({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",transformOrigin:"transform-origin",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:$g,properties:{about:Sn,accentHeight:ie,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ie,amplitude:ie,arabicForm:null,ascent:ie,attributeName:null,attributeType:null,azimuth:ie,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ie,by:null,calcMode:null,capHeight:ie,className:bt,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:ie,diffuseConstant:ie,direction:null,display:null,dur:null,divisor:ie,dominantBaseline:null,download:Ue,dx:null,dy:null,edgeMode:null,editable:null,elevation:ie,enableBackground:null,end:null,event:null,exponent:ie,externalResourcesRequired:null,fill:null,fillOpacity:ie,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:aa,g2:aa,glyphName:aa,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ie,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ie,horizOriginX:ie,horizOriginY:ie,id:null,ideographic:ie,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ie,k:ie,k1:ie,k2:ie,k3:ie,k4:ie,kernelMatrix:Sn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ie,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:ie,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:ie,overlineThickness:ie,paintOrder:null,panose1:null,path:null,pathLength:ie,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:bt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ie,pointsAtY:ie,pointsAtZ:ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Sn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Sn,rev:Sn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Sn,requiredFeatures:Sn,requiredFonts:Sn,requiredFormats:Sn,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:ie,specularExponent:ie,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ie,strikethroughThickness:ie,string:null,stroke:null,strokeDashArray:Sn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ie,strokeOpacity:ie,strokeWidth:null,style:null,surfaceScale:ie,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Sn,tabIndex:ie,tableValues:null,target:null,targetX:ie,targetY:ie,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Sn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ie,underlineThickness:ie,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ie,values:null,vAlphabetic:ie,vMathematical:ie,vectorEffect:null,vHanging:ie,vIdeographic:ie,version:null,vertAdvY:ie,vertOriginX:ie,vertOriginY:ie,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ie,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),UI=/^data[-\w.:]+$/i,Ag=/-[a-z]/g,zI=/[A-Z]/g;function qI(e,t){const n=Pf(t);let r=t,i=Rn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&UI.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Ag,HI);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Ag.test(a)){let o=a.replace(zI,VI);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=Df}return new i(r,t)}function VI(e){return"-"+e.toLowerCase()}function HI(e){return e.charAt(1).toUpperCase()}const WI={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"},ZI=Eg([Cg,Og,Rg,Pg,FI],"html"),Mf=Eg([Cg,Og,Rg,Pg,BI],"svg");function KI(e){return e.join(" ").trim()}var Ng={},Dg=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,GI=/\n/g,YI=/^\s*/,JI=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,XI=/^:\s*/,QI=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,eR=/^[;\s]*/,tR=/^\s+|\s+$/g,nR=`
|
|
31
|
-
`,Mg="/",jg="*",Ri="",rR="comment",iR="declaration",aR=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(m){var h=m.match(GI);h&&(n+=h.length);var y=m.lastIndexOf(nR);r=~y?m.length-y:r+m.length}function a(){var m={line:n,column:r};return function(h){return h.position=new o(m),l(),h}}function o(m){this.start=m,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(m){var h=new Error(t.source+":"+n+":"+r+": "+m);if(h.reason=m,h.filename=t.source,h.line=n,h.column=r,h.source=e,!t.silent)throw h}function u(m){var h=m.exec(e);if(h){var y=h[0];return i(y),e=e.slice(y.length),h}}function l(){u(YI)}function c(m){var h;for(m=m||[];h=f();)h!==!1&&m.push(h);return m}function f(){var m=a();if(!(Mg!=e.charAt(0)||jg!=e.charAt(1))){for(var h=2;Ri!=e.charAt(h)&&(jg!=e.charAt(h)||Mg!=e.charAt(h+1));)++h;if(h+=2,Ri===e.charAt(h-1))return s("End of comment missing");var y=e.slice(2,h-2);return r+=2,i(y),e=e.slice(h),r+=2,m({type:rR,comment:y})}}function d(){var m=a(),h=u(JI);if(h){if(f(),!u(XI))return s("property missing ':'");var y=u(QI),v=m({type:iR,property:Lg(h[0].replace(Dg,Ri)),value:y?Lg(y[0].replace(Dg,Ri)):Ri});return u(eR),v}}function p(){var m=[];c(m);for(var h;h=d();)h!==!1&&(m.push(h),c(m));return m}return l(),p()};function Lg(e){return e?e.replace(tR,Ri):Ri}var oR=ht&&ht.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ng,"__esModule",{value:!0});var Fg=Ng.default=lR,sR=oR(aR);function lR(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,sR.default)(e),i=typeof t=="function";return r.forEach(function(a){if(a.type==="declaration"){var o=a.property,s=a.value;i?t(o,s,a):s&&(n=n||{},n[o]=s)}}),n}const uR=Fg.default||Fg,Bg=Ug("end"),jf=Ug("start");function Ug(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 cR(e){const t=jf(e),n=Bg(e);if(t&&n)return{start:t,end:n}}function Ro(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?zg(e.position):"start"in e||"end"in e?zg(e):"line"in e||"column"in e?Lf(e):""}function Lf(e){return qg(e&&e.line)+":"+qg(e&&e.column)}function zg(e){return Lf(e&&e.start)+"-"+Lf(e&&e.end)}function qg(e){return e&&typeof e=="number"?e:1}class Qt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},o=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(o=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?a.ruleId=r:(a.source=r.slice(0,u),a.ruleId=r.slice(u+1))}if(!a.place&&a.ancestors&&a.ancestors){const u=a.ancestors[a.ancestors.length-1];u&&(a.place=u.position)}const s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.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=Ro(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}Qt.prototype.file="",Qt.prototype.name="",Qt.prototype.reason="",Qt.prototype.message="",Qt.prototype.stack="",Qt.prototype.column=void 0,Qt.prototype.line=void 0,Qt.prototype.ancestors=void 0,Qt.prototype.cause=void 0,Qt.prototype.fatal=void 0,Qt.prototype.place=void 0,Qt.prototype.ruleId=void 0,Qt.prototype.source=void 0;const Ff={}.hasOwnProperty,fR=new Map,dR=/[A-Z]/g,pR=/-([a-z])/g,hR=new Set(["table","tbody","thead","tfoot","tr"]),mR=new Set(["td","th"]),Vg="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function vR(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=ER(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=_R(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"?Mf:ZI,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Hg(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Hg(e,t,n){if(t.type==="element")return yR(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return gR(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return xR(e,t,n);if(t.type==="mdxjsEsm")return bR(e,t);if(t.type==="root")return wR(e,t,n);if(t.type==="text")return SR(e,t)}function yR(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Mf,e.schema=i),e.ancestors.push(t);const a=Zg(e,t.tagName,!1),o=kR(e,t);let s=Uf(e,t);return hR.has(t.tagName)&&(s=s.filter(function(u){return typeof u=="string"?!MI(u):!0})),Wg(e,o,a,t),Bf(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function gR(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)}Po(e,t.position)}function bR(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Po(e,t.position)}function xR(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Mf,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Zg(e,t.name,!0),o=TR(e,t),s=Uf(e,t);return Wg(e,o,a,t),Bf(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function wR(e,t,n){const r={};return Bf(r,Uf(e,t)),e.create(t,e.Fragment,r,n)}function SR(e,t){return t.value}function Wg(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Bf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function _R(e,t,n){return r;function r(i,a,o,s){const l=Array.isArray(o.children)?n:t;return s?l(a,o,s):l(a,o)}}function ER(e,t){return n;function n(r,i,a,o){const s=Array.isArray(a.children),u=jf(r);return t(i,a,o,s,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function kR(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Ff.call(t.properties,i)){const a=OR(e,i,t.properties[i]);if(a){const[o,s]=a;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&mR.has(t.tagName)?r=s:n[o]=s}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function TR(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const o=a.expression;o.type;const s=o.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else Po(e,t.position);else{const i=r.name;let a;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,a=e.evaluater.evaluateExpression(s.expression)}else Po(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Uf(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:fR;for(;++r<t.children.length;){const a=t.children[r];let o;if(e.passKeys){const u=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(u){const l=i.get(u)||0;o=u+"-"+l,i.set(u,l+1)}}const s=Hg(e,a,o);s!==void 0&&n.push(s)}return n}function OR(e,t,n){const r=qI(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?RI(n):KI(n)),r.property==="style"){let i=typeof n=="object"?n:CR(e,String(n));return e.stylePropertyNameCase==="css"&&(i=$R(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?WI[r.property]||r.property:r.attribute,n]}}function CR(e,t){const n={};try{uR(t,r)}catch(i){if(!e.ignoreInvalidStyle){const a=i,o=new Qt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=Vg+"#cannot-parse-style-attribute",o}}return n;function r(i,a){let o=i;o.slice(0,2)!=="--"&&(o.slice(0,4)==="-ms-"&&(o="ms-"+o.slice(4)),o=o.replace(pR,RR)),n[o]=a}}function Zg(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,o;for(;++a<i.length;){const s=Sg(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};o=o?{type:"MemberExpression",object:o,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}r=o}else r=Sg(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Ff.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Po(e)}function Po(e,t){const n=new Qt("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=Vg+"#cannot-handle-mdx-estrees-without-createevaluater",n}function $R(e){const t={};let n;for(n in e)Ff.call(e,n)&&(t[IR(n)]=e[n]);return t}function IR(e){let t=e.replace(dR,PR);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function RR(e,t){return t.toUpperCase()}function PR(e){return"-"+e.toLowerCase()}const zf={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"]},AR={};function qf(e,t){const n=AR,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Kg(e,r,i)}function Kg(e,t,n){if(NR(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 Gg(e.children,t,n)}return Array.isArray(e)?Gg(e,t,n):""}function Gg(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Kg(e[i],t,n);return r.join("")}function NR(e){return!!(e&&typeof e=="object")}const Yg=document.createElement("i");function Vf(e){const t="&"+e+";";Yg.innerHTML=t;const n=Yg.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Pn(e,t,n,r){const i=e.length;let a=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function An(e,t){return e.length>0?(Pn(e,e.length,0,t),e):t}const Jg={}.hasOwnProperty;function Xg(e){const t={};let n=-1;for(;++n<e.length;)DR(t,e[n]);return t}function DR(e,t){let n;for(n in t){const i=(Jg.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){Jg.call(i,o)||(i[o]=[]);const s=a[o];MR(i[o],Array.isArray(s)?s:s?[s]:[])}}}function MR(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Pn(e,0,0,r)}function Qg(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 Vn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ln=Jr(/[A-Za-z]/),en=Jr(/[\dA-Za-z]/),jR=Jr(/[#-'*+\--9=?A-Z^-~]/);function kl(e){return e!==null&&(e<32||e===127)}const Hf=Jr(/\d/),LR=Jr(/[\dA-Fa-f]/),FR=Jr(/[!-/:-@[-`{-~]/);function Re(e){return e!==null&&e<-2}function vt(e){return e!==null&&(e<0||e===32)}function We(e){return e===-2||e===-1||e===32}const Tl=Jr(new RegExp("\\p{P}|\\p{S}","u")),Pi=Jr(/\s/);function Jr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function sa(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let o="";if(a===37&&en(e.charCodeAt(n+1))&&en(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const s=e.charCodeAt(n+1);a<56320&&s>56319&&s<57344?(o=String.fromCharCode(a,s),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Xe(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(u){return We(u)?(e.enter(n),s(u)):t(u)}function s(u){return We(u)&&a++<i?(e.consume(u),s):(e.exit(n),t(u))}}const BR={tokenize:UR};function UR(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"),Xe(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),a(s)}function a(s){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,o(s)}function o(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return Re(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),o)}}const zR={tokenize:qR},eb={tokenize:VR};function qR(e){const t=this,n=[];let r=0,i,a,o;return s;function s(b){if(r<n.length){const k=n[r];return t.containerState=k[1],e.attempt(k[0].continuation,u,l)(b)}return l(b)}function u(b){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&g();const k=t.events.length;let S=k,E;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){E=t.events[S][1].end;break}v(r);let O=k;for(;O<t.events.length;)t.events[O][1].end=Object.assign({},E),O++;return Pn(t.events,S+1,0,t.events.slice(k)),t.events.length=O,l(b)}return s(b)}function l(b){if(r===n.length){if(!i)return d(b);if(i.currentConstruct&&i.currentConstruct.concrete)return m(b);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(eb,c,f)(b)}function c(b){return i&&g(),v(r),d(b)}function f(b){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(b)}function d(b){return t.containerState={},e.attempt(eb,p,m)(b)}function p(b){return r++,n.push([t.currentConstruct,t.containerState]),d(b)}function m(b){if(b===null){i&&g(),v(0),e.consume(b);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:a,_tokenizer:i}),h(b)}function h(b){if(b===null){y(e.exit("chunkFlow"),!0),v(0),e.consume(b);return}return Re(b)?(e.consume(b),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(b),h)}function y(b,k){const S=t.sliceStream(b);if(k&&S.push(null),b.previous=a,a&&(a.next=b),a=b,i.defineSkip(b.start),i.write(S),t.parser.lazy[b.start.line]){let E=i.events.length;for(;E--;)if(i.events[E][1].start.offset<o&&(!i.events[E][1].end||i.events[E][1].end.offset>o))return;const O=t.events.length;let L=O,D,T;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){if(D){T=t.events[L][1].end;break}D=!0}for(v(r),E=O;E<t.events.length;)t.events[E][1].end=Object.assign({},T),E++;Pn(t.events,L+1,0,t.events.slice(O)),t.events.length=E}}function v(b){let k=n.length;for(;k-- >b;){const S=n[k];t.containerState=S[1],S[0].exit.call(t,e)}n.length=b}function g(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function VR(e,t,n){return Xe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ol(e){if(e===null||vt(e)||Pi(e))return 1;if(Tl(e))return 2}function Cl(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Wf={name:"attention",tokenize:WR,resolveAll:HR};function HR(e,t){let n=-1,r,i,a,o,s,u,l,c;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;u=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 f=Object.assign({},e[r][1].end),d=Object.assign({},e[n][1].start);tb(f,-u),tb(d,u),o={type:u>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},s={type:u>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:d},a={type:u>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:u>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},o.start),e[n][1].start=Object.assign({},s.end),l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=An(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=An(l,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",a,t]]),l=An(l,Cl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=An(l,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,l=An(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,Pn(e,r-1,n-r+3,l),n=r+l.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function WR(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ol(r);let a;return o;function o(u){return a=u,e.enter("attentionSequence"),s(u)}function s(u){if(u===a)return e.consume(u),s;const l=e.exit("attentionSequence"),c=Ol(u),f=!c||c===2&&i||n.includes(u),d=!i||i===2&&c||n.includes(r);return l._open=!!(a===42?f:f&&(i||!d)),l._close=!!(a===42?d:d&&(c||!f)),t(u)}}function tb(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const ZR={name:"autolink",tokenize:KR};function KR(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(p){return ln(p)?(e.consume(p),o):p===64?n(p):l(p)}function o(p){return p===43||p===45||p===46||en(p)?(r=1,s(p)):l(p)}function s(p){return p===58?(e.consume(p),r=0,u):(p===43||p===45||p===46||en(p))&&r++<32?(e.consume(p),s):(r=0,l(p))}function u(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||kl(p)?n(p):(e.consume(p),u)}function l(p){return p===64?(e.consume(p),c):jR(p)?(e.consume(p),l):n(p)}function c(p){return en(p)?f(p):n(p)}function f(p){return p===46?(e.consume(p),r=0,c):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):d(p)}function d(p){if((p===45||en(p))&&r++<63){const m=p===45?d:f;return e.consume(p),m}return n(p)}}const Ao={tokenize:GR,partial:!0};function GR(e,t,n){return r;function r(a){return We(a)?Xe(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||Re(a)?t(a):n(a)}}const nb={name:"blockQuote",tokenize:YR,continuation:{tokenize:JR},exit:XR};function YR(e,t,n){const r=this;return i;function i(o){if(o===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),a}return n(o)}function a(o){return We(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function JR(e,t,n){const r=this;return i;function i(o){return We(o)?Xe(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(nb,t,n)(o)}}function XR(e){e.exit("blockQuote")}const rb={name:"characterEscape",tokenize:QR};function QR(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return FR(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const ib={name:"characterReference",tokenize:eP};function eP(e,t,n){const r=this;let i=0,a,o;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),u}function u(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),a=31,o=en,c(f))}function l(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=LR,c):(e.enter("characterReferenceValue"),a=7,o=Hf,c(f))}function c(f){if(f===59&&i){const d=e.exit("characterReferenceValue");return o===en&&!Vf(r.sliceSerialize(d))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(f)&&i++<a?(e.consume(f),c):n(f)}}const ab={tokenize:nP,partial:!0},ob={name:"codeFenced",tokenize:tP,concrete:!0};function tP(e,t,n){const r=this,i={tokenize:S,partial:!0};let a=0,o=0,s;return u;function u(E){return l(E)}function l(E){const O=r.events[r.events.length-1];return a=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,s=E,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(E)}function c(E){return E===s?(o++,e.consume(E),c):o<3?n(E):(e.exit("codeFencedFenceSequence"),We(E)?Xe(e,f,"whitespace")(E):f(E))}function f(E){return E===null||Re(E)?(e.exit("codeFencedFence"),r.interrupt?t(E):e.check(ab,h,k)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(E))}function d(E){return E===null||Re(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(E)):We(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Xe(e,p,"whitespace")(E)):E===96&&E===s?n(E):(e.consume(E),d)}function p(E){return E===null||Re(E)?f(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(E))}function m(E){return E===null||Re(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(E)):E===96&&E===s?n(E):(e.consume(E),m)}function h(E){return e.attempt(i,k,y)(E)}function y(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),v}function v(E){return a>0&&We(E)?Xe(e,g,"linePrefix",a+1)(E):g(E)}function g(E){return E===null||Re(E)?e.check(ab,h,k)(E):(e.enter("codeFlowValue"),b(E))}function b(E){return E===null||Re(E)?(e.exit("codeFlowValue"),g(E)):(e.consume(E),b)}function k(E){return e.exit("codeFenced"),t(E)}function S(E,O,L){let D=0;return T;function T(M){return E.enter("lineEnding"),E.consume(M),E.exit("lineEnding"),P}function P(M){return E.enter("codeFencedFence"),We(M)?Xe(E,V,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):V(M)}function V(M){return M===s?(E.enter("codeFencedFenceSequence"),$(M)):L(M)}function $(M){return M===s?(D++,E.consume(M),$):D>=o?(E.exit("codeFencedFenceSequence"),We(M)?Xe(E,F,"whitespace")(M):F(M)):L(M)}function F(M){return M===null||Re(M)?(E.exit("codeFencedFence"),O(M)):L(M)}}}function nP(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const Zf={name:"codeIndented",tokenize:iP},rP={tokenize:aP,partial:!0};function iP(e,t,n){const r=this;return i;function i(l){return e.enter("codeIndented"),Xe(e,a,"linePrefix",5)(l)}function a(l){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(l):n(l)}function o(l){return l===null?u(l):Re(l)?e.attempt(rP,o,u)(l):(e.enter("codeFlowValue"),s(l))}function s(l){return l===null||Re(l)?(e.exit("codeFlowValue"),o(l)):(e.consume(l),s)}function u(l){return e.exit("codeIndented"),t(l)}}function aP(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):Re(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):Xe(e,a,"linePrefix",5)(o)}function a(o){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):Re(o)?i(o):n(o)}}const oP={name:"codeText",tokenize:uP,resolve:sP,previous:lP};function sP(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 lP(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function uP(e,t,n){let r=0,i,a;return o;function o(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),r++,s):(e.exit("codeTextSequence"),u(f))}function u(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),u):f===96?(a=e.enter("codeTextSequence"),i=0,c(f)):Re(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("codeTextData"),l(f))}function l(f){return f===null||f===32||f===96||Re(f)?(e.exit("codeTextData"),u(f)):(e.consume(f),l)}function c(f){return f===96?(e.consume(f),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",l(f))}}class cP{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&No(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),No(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),No(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);No(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);No(this.left,n.reverse())}}}function No(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function sb(e){const t={};let n=-1,r,i,a,o,s,u,l;const c=new cP(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,a=0,a<u.length&&u[a][1].type==="lineEndingBlank"&&(a+=2),a<u.length&&u[a][1].type==="content"))for(;++a<u.length&&u[a][1].type!=="content";)u[a][1].type==="chunkText"&&(u[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,fP(c,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--&&(o=c.get(a),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank");)o[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=a);i&&(r[1].end=Object.assign({},c.get(i)[1].start),s=c.slice(i,n),s.unshift(r),c.splice(i,n-i+1,s))}}return Pn(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function fP(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[],o=n._tokenizer||r.parser[n.contentType](n.start),s=o.events,u=[],l={};let c,f,d=-1,p=n,m=0,h=0;const y=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(null),f&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(c),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=n;++d<s.length;)s[d][0]==="exit"&&s[d-1][0]==="enter"&&s[d][1].type===s[d-1][1].type&&s[d][1].start.line!==s[d][1].end.line&&(h=d+1,y.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):y.pop(),d=y.length;d--;){const v=s.slice(y[d],y[d+1]),g=a.pop();u.push([g,g+v.length-1]),e.splice(g,2,v)}for(u.reverse(),d=-1;++d<u.length;)l[m+u[d][0]]=m+u[d][1],m+=u[d][1]-u[d][0]-1;return l}const dP={tokenize:mP,resolve:hP},pP={tokenize:vP,partial:!0};function hP(e){return sb(e),e}function mP(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?a(s):Re(s)?e.check(pP,o,a)(s):(e.consume(s),i)}function a(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function o(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function vP(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Xe(e,a,"linePrefix")}function a(o){if(o===null||Re(o))return n(o);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(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function lb(e,t,n,r,i,a,o,s,u){const l=u||Number.POSITIVE_INFINITY;let c=0;return f;function f(v){return v===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(v),e.exit(a),d):v===null||v===32||v===41||kl(v)?n(v):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(v))}function d(v){return v===62?(e.enter(a),e.consume(v),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===62?(e.exit("chunkString"),e.exit(s),d(v)):v===null||v===60||Re(v)?n(v):(e.consume(v),v===92?m:p)}function m(v){return v===60||v===62||v===92?(e.consume(v),p):p(v)}function h(v){return!c&&(v===null||v===41||vt(v))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(v)):c<l&&v===40?(e.consume(v),c++,h):v===41?(e.consume(v),c--,h):v===null||v===32||v===40||kl(v)?n(v):(e.consume(v),v===92?y:h)}function y(v){return v===40||v===41||v===92?(e.consume(v),h):h(v)}}function ub(e,t,n,r,i,a){const o=this;let s=0,u;return l;function l(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(a),c}function c(p){return s>999||p===null||p===91||p===93&&!u||p===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?n(p):p===93?(e.exit(a),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):Re(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||Re(p)||s++>999?(e.exit("chunkString"),c(p)):(e.consume(p),u||(u=!We(p)),p===92?d:f)}function d(p){return p===91||p===92||p===93?(e.consume(p),s++,f):f(p)}}function cb(e,t,n,r,i,a){let o;return s;function s(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),o=d===40?41:d,u):n(d)}function u(d){return d===o?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):(e.enter(a),l(d))}function l(d){return d===o?(e.exit(a),u(o)):d===null?n(d):Re(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Xe(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===o||d===null||Re(d)?(e.exit("chunkString"),l(d)):(e.consume(d),d===92?f:c)}function f(d){return d===o||d===92?(e.consume(d),c):c(d)}}function Do(e,t){let n;return r;function r(i){return Re(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):We(i)?Xe(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const yP={name:"definition",tokenize:bP},gP={tokenize:xP,partial:!0};function bP(e,t,n){const r=this;let i;return a;function a(p){return e.enter("definition"),o(p)}function o(p){return ub.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return i=Vn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),u):n(p)}function u(p){return vt(p)?Do(e,l)(p):l(p)}function l(p){return lb(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt(gP,f,f)(p)}function f(p){return We(p)?Xe(e,d,"whitespace")(p):d(p)}function d(p){return p===null||Re(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function xP(e,t,n){return r;function r(s){return vt(s)?Do(e,i)(s):n(s)}function i(s){return cb(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return We(s)?Xe(e,o,"whitespace")(s):o(s)}function o(s){return s===null||Re(s)?t(s):n(s)}}const wP={name:"hardBreakEscape",tokenize:SP};function SP(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return Re(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const _P={name:"headingAtx",tokenize:kP,resolve:EP};function EP(e,t){let n=e.length-2,r=3,i,a;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},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Pn(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function kP(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),a(c)}function a(c){return e.enter("atxHeadingSequence"),o(c)}function o(c){return c===35&&r++<6?(e.consume(c),o):c===null||vt(c)?(e.exit("atxHeadingSequence"),s(c)):n(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),u(c)):c===null||Re(c)?(e.exit("atxHeading"),t(c)):We(c)?Xe(e,s,"whitespace")(c):(e.enter("atxHeadingText"),l(c))}function u(c){return c===35?(e.consume(c),u):(e.exit("atxHeadingSequence"),s(c))}function l(c){return c===null||c===35||vt(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),l)}}const TP=["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"],fb=["pre","script","style","textarea"],OP={name:"htmlFlow",tokenize:RP,resolveTo:IP,concrete:!0},CP={tokenize:AP,partial:!0},$P={tokenize:PP,partial:!0};function IP(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 RP(e,t,n){const r=this;let i,a,o,s,u;return l;function l(_){return c(_)}function c(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),f}function f(_){return _===33?(e.consume(_),d):_===47?(e.consume(_),a=!0,h):_===63?(e.consume(_),i=3,r.interrupt?t:x):ln(_)?(e.consume(_),o=String.fromCharCode(_),y):n(_)}function d(_){return _===45?(e.consume(_),i=2,p):_===91?(e.consume(_),i=5,s=0,m):ln(_)?(e.consume(_),i=4,r.interrupt?t:x):n(_)}function p(_){return _===45?(e.consume(_),r.interrupt?t:x):n(_)}function m(_){const Y="CDATA[";return _===Y.charCodeAt(s++)?(e.consume(_),s===Y.length?r.interrupt?t:V:m):n(_)}function h(_){return ln(_)?(e.consume(_),o=String.fromCharCode(_),y):n(_)}function y(_){if(_===null||_===47||_===62||vt(_)){const Y=_===47,oe=o.toLowerCase();return!Y&&!a&&fb.includes(oe)?(i=1,r.interrupt?t(_):V(_)):TP.includes(o.toLowerCase())?(i=6,Y?(e.consume(_),v):r.interrupt?t(_):V(_)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(_):a?g(_):b(_))}return _===45||en(_)?(e.consume(_),o+=String.fromCharCode(_),y):n(_)}function v(_){return _===62?(e.consume(_),r.interrupt?t:V):n(_)}function g(_){return We(_)?(e.consume(_),g):T(_)}function b(_){return _===47?(e.consume(_),T):_===58||_===95||ln(_)?(e.consume(_),k):We(_)?(e.consume(_),b):T(_)}function k(_){return _===45||_===46||_===58||_===95||en(_)?(e.consume(_),k):S(_)}function S(_){return _===61?(e.consume(_),E):We(_)?(e.consume(_),S):b(_)}function E(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),u=_,O):We(_)?(e.consume(_),E):L(_)}function O(_){return _===u?(e.consume(_),u=null,D):_===null||Re(_)?n(_):(e.consume(_),O)}function L(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||vt(_)?S(_):(e.consume(_),L)}function D(_){return _===47||_===62||We(_)?b(_):n(_)}function T(_){return _===62?(e.consume(_),P):n(_)}function P(_){return _===null||Re(_)?V(_):We(_)?(e.consume(_),P):n(_)}function V(_){return _===45&&i===2?(e.consume(_),B):_===60&&i===1?(e.consume(_),W):_===62&&i===4?(e.consume(_),q):_===63&&i===3?(e.consume(_),x):_===93&&i===5?(e.consume(_),N):Re(_)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(CP,K,$)(_)):_===null||Re(_)?(e.exit("htmlFlowData"),$(_)):(e.consume(_),V)}function $(_){return e.check($P,F,K)(_)}function F(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),M}function M(_){return _===null||Re(_)?$(_):(e.enter("htmlFlowData"),V(_))}function B(_){return _===45?(e.consume(_),x):V(_)}function W(_){return _===47?(e.consume(_),o="",U):V(_)}function U(_){if(_===62){const Y=o.toLowerCase();return fb.includes(Y)?(e.consume(_),q):V(_)}return ln(_)&&o.length<8?(e.consume(_),o+=String.fromCharCode(_),U):V(_)}function N(_){return _===93?(e.consume(_),x):V(_)}function x(_){return _===62?(e.consume(_),q):_===45&&i===2?(e.consume(_),x):V(_)}function q(_){return _===null||Re(_)?(e.exit("htmlFlowData"),K(_)):(e.consume(_),q)}function K(_){return e.exit("htmlFlow"),t(_)}}function PP(e,t,n){const r=this;return i;function i(o){return Re(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):n(o)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function AP(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ao,t,n)}}const NP={name:"htmlText",tokenize:DP};function DP(e,t,n){const r=this;let i,a,o;return s;function s(x){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(x),u}function u(x){return x===33?(e.consume(x),l):x===47?(e.consume(x),S):x===63?(e.consume(x),b):ln(x)?(e.consume(x),L):n(x)}function l(x){return x===45?(e.consume(x),c):x===91?(e.consume(x),a=0,m):ln(x)?(e.consume(x),g):n(x)}function c(x){return x===45?(e.consume(x),p):n(x)}function f(x){return x===null?n(x):x===45?(e.consume(x),d):Re(x)?(o=f,W(x)):(e.consume(x),f)}function d(x){return x===45?(e.consume(x),p):f(x)}function p(x){return x===62?B(x):x===45?d(x):f(x)}function m(x){const q="CDATA[";return x===q.charCodeAt(a++)?(e.consume(x),a===q.length?h:m):n(x)}function h(x){return x===null?n(x):x===93?(e.consume(x),y):Re(x)?(o=h,W(x)):(e.consume(x),h)}function y(x){return x===93?(e.consume(x),v):h(x)}function v(x){return x===62?B(x):x===93?(e.consume(x),v):h(x)}function g(x){return x===null||x===62?B(x):Re(x)?(o=g,W(x)):(e.consume(x),g)}function b(x){return x===null?n(x):x===63?(e.consume(x),k):Re(x)?(o=b,W(x)):(e.consume(x),b)}function k(x){return x===62?B(x):b(x)}function S(x){return ln(x)?(e.consume(x),E):n(x)}function E(x){return x===45||en(x)?(e.consume(x),E):O(x)}function O(x){return Re(x)?(o=O,W(x)):We(x)?(e.consume(x),O):B(x)}function L(x){return x===45||en(x)?(e.consume(x),L):x===47||x===62||vt(x)?D(x):n(x)}function D(x){return x===47?(e.consume(x),B):x===58||x===95||ln(x)?(e.consume(x),T):Re(x)?(o=D,W(x)):We(x)?(e.consume(x),D):B(x)}function T(x){return x===45||x===46||x===58||x===95||en(x)?(e.consume(x),T):P(x)}function P(x){return x===61?(e.consume(x),V):Re(x)?(o=P,W(x)):We(x)?(e.consume(x),P):D(x)}function V(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),i=x,$):Re(x)?(o=V,W(x)):We(x)?(e.consume(x),V):(e.consume(x),F)}function $(x){return x===i?(e.consume(x),i=void 0,M):x===null?n(x):Re(x)?(o=$,W(x)):(e.consume(x),$)}function F(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===47||x===62||vt(x)?D(x):(e.consume(x),F)}function M(x){return x===47||x===62||vt(x)?D(x):n(x)}function B(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),t):n(x)}function W(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),U}function U(x){return We(x)?Xe(e,N,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):N(x)}function N(x){return e.enter("htmlTextData"),o(x)}}const Kf={name:"labelEnd",tokenize:UP,resolveTo:BP,resolveAll:FP},MP={tokenize:zP},jP={tokenize:qP},LP={tokenize:VP};function FP(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 BP(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const u={type:e[a][1].type==="labelLink"?"link":"image",start:Object.assign({},e[a][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"label",start:Object.assign({},e[a][1].start),end:Object.assign({},e[o][1].end)},c={type:"labelText",start:Object.assign({},e[a+r+2][1].end),end:Object.assign({},e[o-2][1].start)};return s=[["enter",u,t],["enter",l,t]],s=An(s,e.slice(a+1,a+r+3)),s=An(s,[["enter",c,t]]),s=An(s,Cl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=An(s,[["exit",c,t],e[o-2],e[o-1],["exit",l,t]]),s=An(s,e.slice(o+1)),s=An(s,[["exit",u,t]]),Pn(e,a,e.length,s),e}function UP(e,t,n){const r=this;let i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(d){return a?a._inactive?f(d):(o=r.parser.defined.includes(Vn(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),u):n(d)}function u(d){return d===40?e.attempt(MP,c,o?c:f)(d):d===91?e.attempt(jP,c,o?l:f)(d):o?c(d):f(d)}function l(d){return e.attempt(LP,c,f)(d)}function c(d){return t(d)}function f(d){return a._balanced=!0,n(d)}}function zP(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return vt(f)?Do(e,a)(f):a(f)}function a(f){return f===41?c(f):lb(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function o(f){return vt(f)?Do(e,u)(f):c(f)}function s(f){return n(f)}function u(f){return f===34||f===39||f===40?cb(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function l(f){return vt(f)?Do(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function qP(e,t,n){const r=this;return i;function i(s){return ub.call(r,e,a,o,"reference","referenceMarker","referenceString")(s)}function a(s){return r.parser.defined.includes(Vn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function o(s){return n(s)}}function VP(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const HP={name:"labelStartImage",tokenize:WP,resolveAll:Kf.resolveAll};function WP(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),a}function a(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),o):n(s)}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const ZP={name:"labelStartLink",tokenize:KP,resolveAll:Kf.resolveAll};function KP(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),a}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const Gf={name:"lineEnding",tokenize:GP};function GP(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Xe(e,t,"linePrefix")}}const $l={name:"thematicBreak",tokenize:YP};function YP(e,t,n){let r=0,i;return a;function a(l){return e.enter("thematicBreak"),o(l)}function o(l){return i=l,s(l)}function s(l){return l===i?(e.enter("thematicBreakSequence"),u(l)):r>=3&&(l===null||Re(l))?(e.exit("thematicBreak"),t(l)):n(l)}function u(l){return l===i?(e.consume(l),r++,u):(e.exit("thematicBreakSequence"),We(l)?Xe(e,s,"whitespace")(l):s(l))}}const hn={name:"list",tokenize:QP,continuation:{tokenize:eA},exit:nA},JP={tokenize:rA,partial:!0},XP={tokenize:tA,partial:!0};function QP(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Hf(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check($l,n,l)(p):l(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(p)}return n(p)}function u(p){return Hf(p)&&++o<10?(e.consume(p),u):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),l(p)):n(p)}function l(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Ao,r.interrupt?n:c,e.attempt(JP,d,f))}function c(p){return r.containerState.initialBlankLine=!0,a++,d(p)}function f(p){return We(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),d):n(p)}function d(p){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function eA(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ao,i,a);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Xe(e,t,"listItemIndent",r.containerState.size+1)(s)}function a(s){return r.containerState.furtherBlankLines||!We(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(XP,t,o)(s))}function o(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,Xe(e,e.attempt(hn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function tA(e,t,n){const r=this;return Xe(e,i,"listItemIndent",r.containerState.size+1);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(a):n(a)}}function nA(e){e.exit(this.containerState.type)}function rA(e,t,n){const r=this;return Xe(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const o=r.events[r.events.length-1];return!We(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const db={name:"setextUnderline",tokenize:aA,resolveTo:iA};function iA(e,t){let n=e.length,r,i,a;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),!a&&e[n][1].type==="definition"&&(a=n);const o={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",o,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[a][1].end)):e[r][1]=o,e.push(["exit",o,t]),e}function aA(e,t,n){const r=this;let i;return a;function a(l){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=l,o(l)):n(l)}function o(l){return e.enter("setextHeadingLineSequence"),s(l)}function s(l){return l===i?(e.consume(l),s):(e.exit("setextHeadingLineSequence"),We(l)?Xe(e,u,"lineSuffix")(l):u(l))}function u(l){return l===null||Re(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const oA={tokenize:sA};function sA(e){const t=this,n=e.attempt(Ao,r,e.attempt(this.parser.constructs.flowInitial,i,Xe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(dP,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const lA={resolveAll:hb()},uA=pb("string"),cA=pb("text");function pb(e){return{tokenize:t,resolveAll:hb(e==="text"?fA:void 0)};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,o,s);return o;function o(c){return l(c)?a(c):s(c)}function s(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),u}function u(c){return l(c)?(n.exit("data"),a(c)):(n.consume(c),u)}function l(c){if(c===null)return!0;const f=i[c];let d=-1;if(f)for(;++d<f.length;){const p=f[d];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function hb(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function fA(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 a=i.length,o=-1,s=0,u;for(;a--;){const l=i[a];if(typeof l=="string"){for(o=l.length;l.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(l===-2)u=!0,s++;else if(l!==-1){a++;break}}if(s){const l={type:n===e.length||u||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+a,_bufferIndex:a?o:r.start._bufferIndex+o},end:Object.assign({},r.end)};r.end=Object.assign({},l.start),r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}function dA(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},a=[];let o=[],s=[];const u={consume:g,enter:b,exit:k,attempt:O(S),check:O(E),interrupt:O(E,{interrupt:!0})},l={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:p,sliceSerialize:d,now:m,defineSkip:h,write:f};let c=t.tokenize.call(l,u);return t.resolveAll&&a.push(t),l;function f(P){return o=An(o,P),y(),o[o.length-1]!==null?[]:(L(t,0),l.events=Cl(a,l.events,l),l.events)}function d(P,V){return hA(p(P),V)}function p(P){return pA(o,P)}function m(){const{line:P,column:V,offset:$,_index:F,_bufferIndex:M}=r;return{line:P,column:V,offset:$,_index:F,_bufferIndex:M}}function h(P){i[P.line]=P.column,T()}function y(){let P;for(;r._index<o.length;){const V=o[r._index];if(typeof V=="string")for(P=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===P&&r._bufferIndex<V.length;)v(V.charCodeAt(r._bufferIndex));else v(V)}}function v(P){c=c(P)}function g(P){Re(P)?(r.line++,r.column=1,r.offset+=P===-3?2:1,T()):P!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=P}function b(P,V){const $=V||{};return $.type=P,$.start=m(),l.events.push(["enter",$,l]),s.push($),$}function k(P){const V=s.pop();return V.end=m(),l.events.push(["exit",V,l]),V}function S(P,V){L(P,V.from)}function E(P,V){V.restore()}function O(P,V){return $;function $(F,M,B){let W,U,N,x;return Array.isArray(F)?K(F):"tokenize"in F?K([F]):q(F);function q(ne){return le;function le(pe){const he=pe!==null&&ne[pe],ue=pe!==null&&ne.null,Q=[...Array.isArray(he)?he:he?[he]:[],...Array.isArray(ue)?ue:ue?[ue]:[]];return K(Q)(pe)}}function K(ne){return W=ne,U=0,ne.length===0?B:_(ne[U])}function _(ne){return le;function le(pe){return x=D(),N=ne,ne.partial||(l.currentConstruct=ne),ne.name&&l.parser.constructs.disable.null.includes(ne.name)?oe():ne.tokenize.call(V?Object.assign(Object.create(l),V):l,u,Y,oe)(pe)}}function Y(ne){return P(N,x),M}function oe(ne){return x.restore(),++U<W.length?_(W[U]):B}}}function L(P,V){P.resolveAll&&!a.includes(P)&&a.push(P),P.resolve&&Pn(l.events,V,l.events.length-V,P.resolve(l.events.slice(V),l)),P.resolveTo&&(l.events=P.resolveTo(l.events,l))}function D(){const P=m(),V=l.previous,$=l.currentConstruct,F=l.events.length,M=Array.from(s);return{restore:B,from:F};function B(){r=P,l.previous=V,l.currentConstruct=$,l.events.length=F,s=M,T()}}function T(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function pA(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){const s=o[0];typeof s=="string"?o[0]=s.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function hA(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let o;if(typeof a=="string")o=a;else switch(a){case-5:{o="\r";break}case-4:{o=`
|
|
30
|
+
<%s key={someKey} {...props} />`,gy,Xi,Hse,Xi),Ln[Xi+gy]=!0}}return C===r?Vt(Mt):Xt(Mt),Mt}}function ki(C,te,ye){return Fn(C,te,ye,!0)}function zse(C,te,ye){return Fn(C,te,ye,!1)}var qse=zse,Vse=ki;fo.Fragment=r,fo.jsx=qse,fo.jsxs=Vse}()),fo}process.env.NODE_ENV==="production"?vf.exports=XC():vf.exports=QC();var $=vf.exports;function e$(e,t=[]){let n=[];function r(a,o){const s=w.createContext(o),u=n.length;n=[...n,o];function l(f){const{scope:d,children:p,...h}=f,m=(d==null?void 0:d[e][u])||s,y=w.useMemo(()=>h,Object.values(h));return $.jsx(m.Provider,{value:y,children:p})}function c(f,d){const p=(d==null?void 0:d[e][u])||s,h=w.useContext(p);if(h)return h;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return l.displayName=a+"Provider",[l,c]}const i=()=>{const a=n.map(o=>w.createContext(o));return function(s){const u=(s==null?void 0:s[e])||a;return w.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,t$(i,...t)]}function t$(...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(a){const o=r.reduce((s,{useScope:u,scopeName:l})=>{const f=u(a)[`__scope${l}`];return{...s,...f}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function Zr(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var Qi=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{};function n$(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function r$(...e){return t=>e.forEach(n=>n$(n,t))}var Ly=w.forwardRef((e,t)=>{const{children:n,...r}=e,i=w.Children.toArray(n),a=i.find(a$);if(a){const o=a.props.children,s=i.map(u=>u===a?w.Children.count(o)>1?w.Children.only(null):w.isValidElement(o)?o.props.children:null:u);return $.jsx(yf,{...r,ref:t,children:w.isValidElement(o)?w.cloneElement(o,void 0,s):null})}return $.jsx(yf,{...r,ref:t,children:n})});Ly.displayName="Slot";var yf=w.forwardRef((e,t)=>{const{children:n,...r}=e;if(w.isValidElement(n)){const i=s$(n);return w.cloneElement(n,{...o$(r,n.props),ref:t?r$(t,i):i})}return w.Children.count(n)>1?w.Children.only(null):null});yf.displayName="SlotClone";var i$=({children:e})=>$.jsx($.Fragment,{children:e});function a$(e){return w.isValidElement(e)&&e.type===i$}function o$(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{a(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function s$(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var l$=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],gf=l$.reduce((e,t)=>{const n=w.forwardRef((r,i)=>{const{asChild:a,...o}=r,s=a?Ly:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),$.jsx(s,{...o,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),bf="Avatar",[u$,Jse]=e$(bf),[c$,Fy]=u$(bf),xf=w.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,a]=w.useState("idle");return $.jsx(c$,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:$.jsx(gf.span,{...r,ref:t})})});xf.displayName=bf;var By="AvatarImage",wf=w.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...a}=e,o=Fy(By,n),s=f$(r),u=Zr(l=>{i(l),o.onImageLoadingStatusChange(l)});return Qi(()=>{s!=="idle"&&u(s)},[s,u]),s==="loaded"?$.jsx(gf.img,{...a,ref:t,src:r}):null});wf.displayName=By;var Uy="AvatarFallback",Sf=w.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,a=Fy(Uy,n),[o,s]=w.useState(r===void 0);return w.useEffect(()=>{if(r!==void 0){const u=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(u)}},[r]),o&&a.imageLoadingStatus!=="loaded"?$.jsx(gf.span,{...i,ref:t}):null});Sf.displayName=Uy;function f$(e){const[t,n]=w.useState("idle");return Qi(()=>{if(!e){n("error");return}let r=!0;const i=new window.Image,a=o=>()=>{r&&n(o)};return n("loading"),i.onload=a("loaded"),i.onerror=a("error"),i.src=e,()=>{r=!1}},[e]),t}function _f(e){if(!/^#?([a-fA-F\d]{6}|[a-fA-F\d]{3})$/.test(e))return{r:0,g:0,b:0};const n=e.replace(/^#/,"");let r=n;n.length===3&&(r=n.split("").map(u=>u+u).join(""));const i=parseInt(r,16),a=i>>16&255,o=i>>8&255,s=i&255;return{r:a,g:o,b:s}}function d$(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const p$=(e,t=30)=>{const n=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b,n+1);return{r:Math.floor((e.r-n)/(r-n)*t*(1-.299)+120-t/2),g:Math.floor((e.g-n)/(r-n)*t*(1-.587)+120-t/2),b:Math.floor((e.b-n)/(r-n)*t*(1-.114)+120-t/2)}};function zy(e){return Object.entries(e).reduce((t,[n,r])=>{const i=n.replace(/(\d+)/,a=>(1e3-parseInt(a)).toString());return{...t,[i]:r}},{})}const h$=2.4,m$=.2126729,v$=.7151522,y$=.072175,g$=.56,b$=.57,x$=.62,w$=.65,cl=.022,qy=1.414,S$=1.14,_$=1.14,E$=.035991,k$=.035991,T$=27.7847239587675,O$=27.7847239587675,Vy=.027,Hy=.027,Wy=.001,C$=5e-4;function Zy(e){const{r:t,g:n,b:r}=e,i=a=>(a/255)**h$;return m$*i(t)+v$*i(n)+y$*i(r)}function Ky(e,t){if(!e||!t)return 0;let n=Zy(_f(e)),r=Zy(_f(t)),i=0,a=0;return n=n>cl?n:n+(cl-n)**qy,r=r>cl?r:r+(cl-r)**qy,Math.abs(r-n)<C$?0:(r>n?(i=(r**g$-n**b$)*S$,a=i<Wy?0:i<E$?i-i*T$*Vy:i-Vy):(i=(r**w$-n**x$)*_$,a=i>-Wy?0:i>-k$?i-i*O$*Hy:i+Hy),Math.abs(a*100))}let Ef=class{constructor(){_e(this,"eventMap");this.eventMap={}}on(t,n){var r;return this.eventMap[t]||(this.eventMap[t]=new Set),(r=this.eventMap[t])==null||r.add(n),()=>{var i;(i=this.eventMap[t])==null||i.delete(n)}}emit(t,n){var r,i;(r=this.eventMap[t])==null||r.forEach(a=>{a(n)}),(i=this.eventMap["*"])==null||i.forEach(a=>{a({type:t,payload:n})})}};const $$=new Ef;function Gy(e,t){let n=`${e} {`;for(const[r,i]of Object.entries(t))n+=`${r}: ${i}; `;return n+="}",n}function Yy(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}var Jy={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ht,function(){var n=1e3,r=6e4,i=36e5,a="millisecond",o="second",s="minute",u="hour",l="day",c="week",f="month",d="quarter",p="year",h="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|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,g={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(F){var N=["th","st","nd","rd"],L=F%100;return"["+F+(N[(L-20)%10]||N[L]||N[0])+"]"}},b=function(F,N,L){var W=String(F);return!W||W.length>=N?F:""+Array(N+1-W.length).join(L)+F},k={s:b,z:function(F){var N=-F.utcOffset(),L=Math.abs(N),W=Math.floor(L/60),z=L%60;return(N<=0?"+":"-")+b(W,2,"0")+":"+b(z,2,"0")},m:function F(N,L){if(N.date()<L.date())return-F(L,N);var W=12*(L.year()-N.year())+(L.month()-N.month()),z=N.clone().add(W,f),A=L-z<0,x=N.clone().add(W+(A?-1:1),f);return+(-(W+(L-z)/(A?z-x:x-z))||0)},a:function(F){return F<0?Math.ceil(F)||0:Math.floor(F)},p:function(F){return{M:f,y:p,w:c,d:l,D:h,h:u,m:s,s:o,ms:a,Q:d}[F]||String(F||"").toLowerCase().replace(/s$/,"")},u:function(F){return F===void 0}},S="en",E={};E[S]=g;var O="$isDayjsObject",j=function(F){return F instanceof U||!(!F||!F[O])},q=function F(N,L,W){var z;if(!N)return S;if(typeof N=="string"){var A=N.toLowerCase();E[A]&&(z=A),L&&(E[A]=L,z=A);var x=N.split("-");if(!z&&x.length>1)return F(x[0])}else{var V=N.name;E[V]=N,z=V}return!W&&z&&(S=z),z||!W&&S},T=function(F,N){if(j(F))return F.clone();var L=typeof N=="object"?N:{};return L.date=F,L.args=arguments,new U(L)},I=k;I.l=q,I.i=j,I.w=function(F,N){return T(F,{locale:N.$L,utc:N.$u,x:N.$x,$offset:N.$offset})};var U=function(){function F(L){this.$L=q(L.locale,null,!0),this.parse(L),this.$x=this.$x||L.x||{},this[O]=!0}var N=F.prototype;return N.parse=function(L){this.$d=function(W){var z=W.date,A=W.utc;if(z===null)return new Date(NaN);if(I.u(z))return new Date;if(z instanceof Date)return new Date(z);if(typeof z=="string"&&!/Z$/i.test(z)){var x=z.match(y);if(x){var V=x[2]-1||0,K=(x[7]||"0").substring(0,3);return A?new Date(Date.UTC(x[1],V,x[3]||1,x[4]||0,x[5]||0,x[6]||0,K)):new Date(x[1],V,x[3]||1,x[4]||0,x[5]||0,x[6]||0,K)}}return new Date(z)}(L),this.init()},N.init=function(){var L=this.$d;this.$y=L.getFullYear(),this.$M=L.getMonth(),this.$D=L.getDate(),this.$W=L.getDay(),this.$H=L.getHours(),this.$m=L.getMinutes(),this.$s=L.getSeconds(),this.$ms=L.getMilliseconds()},N.$utils=function(){return I},N.isValid=function(){return this.$d.toString()!==m},N.isSame=function(L,W){var z=T(L);return this.startOf(W)<=z&&z<=this.endOf(W)},N.isAfter=function(L,W){return T(L)<this.startOf(W)},N.isBefore=function(L,W){return this.endOf(W)<T(L)},N.$g=function(L,W,z){return I.u(L)?this[W]:this.set(z,L)},N.unix=function(){return Math.floor(this.valueOf()/1e3)},N.valueOf=function(){return this.$d.getTime()},N.startOf=function(L,W){var z=this,A=!!I.u(W)||W,x=I.p(L),V=function(he,ue){var Q=I.w(z.$u?Date.UTC(z.$y,ue,he):new Date(z.$y,ue,he),z);return A?Q:Q.endOf(l)},K=function(he,ue){return I.w(z.toDate()[he].apply(z.toDate("s"),(A?[0,0,0,0]:[23,59,59,999]).slice(ue)),z)},_=this.$W,J=this.$M,ne=this.$D,re="set"+(this.$u?"UTC":"");switch(x){case p:return A?V(1,0):V(31,11);case f:return A?V(1,J):V(0,J+1);case c:var le=this.$locale().weekStart||0,pe=(_<le?_+7:_)-le;return V(A?ne-pe:ne+(6-pe),J);case l:case h:return K(re+"Hours",0);case u:return K(re+"Minutes",1);case s:return K(re+"Seconds",2);case o:return K(re+"Milliseconds",3);default:return this.clone()}},N.endOf=function(L){return this.startOf(L,!1)},N.$set=function(L,W){var z,A=I.p(L),x="set"+(this.$u?"UTC":""),V=(z={},z[l]=x+"Date",z[h]=x+"Date",z[f]=x+"Month",z[p]=x+"FullYear",z[u]=x+"Hours",z[s]=x+"Minutes",z[o]=x+"Seconds",z[a]=x+"Milliseconds",z)[A],K=A===l?this.$D+(W-this.$W):W;if(A===f||A===p){var _=this.clone().set(h,1);_.$d[V](K),_.init(),this.$d=_.set(h,Math.min(this.$D,_.daysInMonth())).$d}else V&&this.$d[V](K);return this.init(),this},N.set=function(L,W){return this.clone().$set(L,W)},N.get=function(L){return this[I.p(L)]()},N.add=function(L,W){var z,A=this;L=Number(L);var x=I.p(W),V=function(J){var ne=T(A);return I.w(ne.date(ne.date()+Math.round(J*L)),A)};if(x===f)return this.set(f,this.$M+L);if(x===p)return this.set(p,this.$y+L);if(x===l)return V(1);if(x===c)return V(7);var K=(z={},z[s]=r,z[u]=i,z[o]=n,z)[x]||1,_=this.$d.getTime()+L*K;return I.w(_,this)},N.subtract=function(L,W){return this.add(-1*L,W)},N.format=function(L){var W=this,z=this.$locale();if(!this.isValid())return z.invalidDate||m;var A=L||"YYYY-MM-DDTHH:mm:ssZ",x=I.z(this),V=this.$H,K=this.$m,_=this.$M,J=z.weekdays,ne=z.months,re=z.meridiem,le=function(ue,Q,Z,de){return ue&&(ue[Q]||ue(W,A))||Z[Q].slice(0,de)},pe=function(ue){return I.s(V%12||12,ue,"0")},he=re||function(ue,Q,Z){var de=ue<12?"AM":"PM";return Z?de.toLowerCase():de};return A.replace(v,function(ue,Q){return Q||function(Z){switch(Z){case"YY":return String(W.$y).slice(-2);case"YYYY":return I.s(W.$y,4,"0");case"M":return _+1;case"MM":return I.s(_+1,2,"0");case"MMM":return le(z.monthsShort,_,ne,3);case"MMMM":return le(ne,_);case"D":return W.$D;case"DD":return I.s(W.$D,2,"0");case"d":return String(W.$W);case"dd":return le(z.weekdaysMin,W.$W,J,2);case"ddd":return le(z.weekdaysShort,W.$W,J,3);case"dddd":return J[W.$W];case"H":return String(V);case"HH":return I.s(V,2,"0");case"h":return pe(1);case"hh":return pe(2);case"a":return he(V,K,!0);case"A":return he(V,K,!1);case"m":return String(K);case"mm":return I.s(K,2,"0");case"s":return String(W.$s);case"ss":return I.s(W.$s,2,"0");case"SSS":return I.s(W.$ms,3,"0");case"Z":return x}return null}(ue)||x.replace(":","")})},N.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},N.diff=function(L,W,z){var A,x=this,V=I.p(W),K=T(L),_=(K.utcOffset()-this.utcOffset())*r,J=this-K,ne=function(){return I.m(x,K)};switch(V){case p:A=ne()/12;break;case f:A=ne();break;case d:A=ne()/3;break;case c:A=(J-_)/6048e5;break;case l:A=(J-_)/864e5;break;case u:A=J/i;break;case s:A=J/r;break;case o:A=J/n;break;default:A=J}return z?A:I.a(A)},N.daysInMonth=function(){return this.endOf(f).$D},N.$locale=function(){return E[this.$L]},N.locale=function(L,W){if(!L)return this.$L;var z=this.clone(),A=q(L,W,!0);return A&&(z.$L=A),z},N.clone=function(){return I.w(this.$d,this)},N.toDate=function(){return new Date(this.valueOf())},N.toJSON=function(){return this.isValid()?this.toISOString():null},N.toISOString=function(){return this.$d.toISOString()},N.toString=function(){return this.$d.toUTCString()},F}(),R=U.prototype;return T.prototype=R,[["$ms",a],["$s",o],["$m",s],["$H",u],["$W",l],["$M",f],["$y",p],["$D",h]].forEach(function(F){R[F[1]]=function(N){return this.$g(N,F[0],F[1])}}),T.extend=function(F,N){return F.$i||(F(N,U,T),F.$i=!0),T},T.locale=q,T.isDayjs=j,T.unix=function(F){return T(1e3*F)},T.en=E[S],T.Ls=E,T.p={},T})})(Jy);var I$=Jy.exports;const fl=Ke(I$);var Xy={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ht,function(){return function(n,r,i){r.prototype.isToday=function(){var a="YYYY-MM-DD",o=i();return this.format(a)===o.format(a)}}})})(Xy);var R$=Xy.exports;const P$=Ke(R$);var Qy={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ht,function(){return function(n,r,i){r.prototype.isYesterday=function(){var a="YYYY-MM-DD",o=i().subtract(1,"day");return this.format(a)===o.format(a)}}})})(Qy);var A$=Qy.exports;const N$=Ke(A$);fl.extend(P$),fl.extend(N$);function D$(e,t="day"){var r,i,a;if(!e||e.length===0)return[];const n=[];(r=e[0])!=null&&r.timestamp&&n.push(eg(e[0].timestamp));for(let o=0;o<e.length;o++)if(e[o]&&n.push(e[o]),o+1<e.length){const s=(i=e[o])==null?void 0:i.timestamp,u=(a=e[o+1])==null?void 0:a.timestamp;!fl(s).isSame(u,t)&&u&&n.push(eg(u))}return n}function eg(e){return{id:Oy(),direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:M$(e)}}}function M$(e,t=!1){const n=fl(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")}function j$(e=""){if(typeof e!="string")throw new TypeError("Color should be string!");const t=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(e);if(t)return t.splice(1).map(r=>Number.parseInt(r,16));const n=/^#?([\da-f])([\da-f])([\da-f])$/i.exec(e);if(n)return n.splice(1).map(r=>Number.parseInt(r+r,16));if(e.includes(","))return e.split(",").map(r=>Number.parseInt(r));throw new Error("Invalid color format! Use #ABC or #AABBCC or r,g,b")}function L$(e){return"#"+e.map(t=>`0${t.toString(16).toUpperCase()}`.slice(-2)).join("")}function F$(e,t){return e.map(n=>Math.round(n+(255-n)*t))}function B$(e,t){return e.map(n=>Math.round(n*t))}const po=e=>t=>F$(t,e),ho=e=>t=>B$(t,e),U$={50:po(.95),100:po(.9),200:po(.75),300:po(.6),400:po(.3),500:e=>e,600:ho(.9),700:ho(.6),800:ho(.45),900:ho(.3),950:ho(.2)};function tg(e,t=U$){const n={},r=j$(e);for(const[i,a]of Object.entries(t))n[i]=L$(a(r));return n}var at;(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 a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(at||(at={}));var kf;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(kf||(kf={}));const ge=at.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Kr=e=>{switch(typeof e){case"undefined":return ge.undefined;case"string":return ge.string;case"number":return isNaN(e)?ge.nan:ge.number;case"boolean":return ge.boolean;case"function":return ge.function;case"bigint":return ge.bigint;case"symbol":return ge.symbol;case"object":return Array.isArray(e)?ge.array:e===null?ge.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ge.promise:typeof Map<"u"&&e instanceof Map?ge.map:typeof Set<"u"&&e instanceof Set?ge.set:typeof Date<"u"&&e instanceof Date?ge.date:ge.object;default:return ge.unknown}},se=at.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"]),z$=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");let Un=class 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(a){return a.message},r={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let s=r,u=0;for(;u<o.path.length;){const l=o.path[u];u===o.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(o))):s[l]=s[l]||{_errors:[]},s=s[l],u++}}};return i(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,at.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()}};Un.create=e=>new Un(e);const mo=(e,t)=>{let n;switch(e.code){case se.invalid_type:e.received===ge.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case se.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,at.jsonStringifyReplacer)}`;break;case se.unrecognized_keys:n=`Unrecognized key(s) in object: ${at.joinValues(e.keys,", ")}`;break;case se.invalid_union:n="Invalid input";break;case se.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${at.joinValues(e.options)}`;break;case se.invalid_enum_value:n=`Invalid enum value. Expected ${at.joinValues(e.options)}, received '${e.received}'`;break;case se.invalid_arguments:n="Invalid function arguments";break;case se.invalid_return_type:n="Invalid function return type";break;case se.invalid_date:n="Invalid date";break;case se.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}"`:at.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case se.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 se.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 se.custom:n="Invalid input";break;case se.invalid_intersection_types:n="Intersection results could not be merged";break;case se.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case se.not_finite:n="Number must be finite";break;default:n=t.defaultError,at.assertNever(e)}return{message:n}};let ng=mo;function q$(e){ng=e}function dl(){return ng}const pl=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};let s="";const u=r.filter(l=>!!l).slice().reverse();for(const l of u)s=l(o,{data:t,defaultError:s}).message;return{...i,path:a,message:i.message||s}},V$=[];function xe(e,t){const n=pl({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,dl(),mo].filter(r=>!!r)});e.common.issues.push(n)}let dn=class MC{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 Le;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 MC.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Le;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[a.value]=o.value)}return{status:t.value,value:r}}};const Le=Object.freeze({status:"aborted"}),rg=e=>({status:"dirty",value:e}),sn=e=>({status:"valid",value:e}),Tf=e=>e.status==="aborted",Of=e=>e.status==="dirty",vo=e=>e.status==="valid",hl=e=>typeof Promise<"u"&&e instanceof Promise;var Ce;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ce||(Ce={}));let or=class{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}};const ig=(e,t)=>{if(vo(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 Un(e.common.issues);return this._error=n,this._error}}};function Be(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:(o,s)=>o.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:r??s.defaultError}:{message:n??s.defaultError},description:i}}let qe=class{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Kr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Kr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new dn,ctx:{common:t.parent.common,data:t.data,parsedType:Kr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(hl(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:Kr(t)},a=this._parseSync({data:t,path:i.path,parent:i});return ig(i,a)}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:Kr(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(hl(i)?i:Promise.resolve(i));return ig(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:se.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(u=>u?!0:(s(),!1)):o?!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 zn({schema:this,typeName:Ne.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Rr.create(this,this._def)}nullable(){return $i.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ci.create(this,this._def)}promise(){return ra.create(this,this._def)}or(t){return _o.create([this,t],this._def)}and(t){return Eo.create(this,t,this._def)}transform(t){return new zn({...Be(this._def),schema:this,typeName:Ne.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new $o({...Be(this._def),innerType:this,defaultValue:n,typeName:Ne.ZodDefault})}brand(){return new ug({typeName:Ne.ZodBranded,type:this,...Be(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new xl({...Be(this._def),innerType:this,catchValue:n,typeName:Ne.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return If.create(this,t)}readonly(){return Sl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const H$=/^c[^\s-]{8,}$/i,W$=/^[a-z][a-z0-9]*$/,Z$=/^[0-9A-HJKMNP-TV-Z]{26}$/,K$=/^[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,G$=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Y$="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Cf;const J$=/^(((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}))$/,X$=/^(([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})))$/,Q$=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 eI(e,t){return!!((t==="v4"||!t)&&J$.test(e)||(t==="v6"||!t)&&X$.test(e))}let ea=class ll extends qe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ge.string){const a=this._getOrReturnCtx(t);return xe(a,{code:se.invalid_type,expected:ge.string,received:a.parsedType}),Le}const r=new dn;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),xe(i,{code:se.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),xe(i,{code:se.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,s=t.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(t,i),o?xe(i,{code:se.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&xe(i,{code:se.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")G$.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"email",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")Cf||(Cf=new RegExp(Y$,"u")),Cf.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"emoji",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")K$.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"uuid",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")H$.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"cuid",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")W$.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"cuid2",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")Z$.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"ulid",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),xe(i,{validation:"url",code:se.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"regex",code:se.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),xe(i,{code:se.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),xe(i,{code:se.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),xe(i,{code:se.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?Q$(a).test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{code:se.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="ip"?eI(t.data,a.version)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"ip",code:se.invalid_string,message:a.message}),r.dirty()):at.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:se.invalid_string,...Ce.errToObj(r)})}_addCheck(t){return new ll({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ce.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ce.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ce.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ce.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ce.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ce.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ce.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ce.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,...Ce.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ce.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Ce.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ce.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ce.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ce.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ce.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ce.errToObj(n)})}nonempty(t){return this.min(1,Ce.errToObj(t))}trim(){return new ll({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ll({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ll({...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}};ea.create=e=>{var t;return new ea({checks:[],typeName:Ne.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Be(e)})};function tI(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}let yo=class by extends qe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ge.number){const a=this._getOrReturnCtx(t);return xe(a,{code:se.invalid_type,expected:ge.number,received:a.parsedType}),Le}let r;const i=new dn;for(const a of this._def.checks)a.kind==="int"?at.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),xe(r,{code:se.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:se.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:se.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?tI(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),xe(r,{code:se.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),xe(r,{code:se.not_finite,message:a.message}),i.dirty()):at.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ce.toString(n))}setLimit(t,n,r,i){return new by({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ce.toString(i)}]})}_addCheck(t){return new by({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ce.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ce.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ce.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ce.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ce.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"&&at.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)}};yo.create=e=>new yo({checks:[],typeName:Ne.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Be(e)});let go=class xy extends qe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==ge.bigint){const a=this._getOrReturnCtx(t);return xe(a,{code:se.invalid_type,expected:ge.bigint,received:a.parsedType}),Le}let r;const i=new dn;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:se.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:se.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:se.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):at.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ce.toString(n))}setLimit(t,n,r,i){return new xy({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ce.toString(i)}]})}_addCheck(t){return new xy({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ce.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}};go.create=e=>{var t;return new go({checks:[],typeName:Ne.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Be(e)})};let bo=class extends qe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ge.boolean){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ge.boolean,received:r.parsedType}),Le}return sn(t.data)}};bo.create=e=>new bo({typeName:Ne.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Be(e)});let xo=class jC extends qe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ge.date){const a=this._getOrReturnCtx(t);return xe(a,{code:se.invalid_type,expected:ge.date,received:a.parsedType}),Le}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return xe(a,{code:se.invalid_date}),Le}const r=new dn;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),xe(i,{code:se.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),xe(i,{code:se.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):at.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new jC({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ce.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ce.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}};xo.create=e=>new xo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ne.ZodDate,...Be(e)});let ml=class extends qe{_parse(t){if(this._getType(t)!==ge.symbol){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ge.symbol,received:r.parsedType}),Le}return sn(t.data)}};ml.create=e=>new ml({typeName:Ne.ZodSymbol,...Be(e)});let wo=class extends qe{_parse(t){if(this._getType(t)!==ge.undefined){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ge.undefined,received:r.parsedType}),Le}return sn(t.data)}};wo.create=e=>new wo({typeName:Ne.ZodUndefined,...Be(e)});let So=class extends qe{_parse(t){if(this._getType(t)!==ge.null){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ge.null,received:r.parsedType}),Le}return sn(t.data)}};So.create=e=>new So({typeName:Ne.ZodNull,...Be(e)});let ta=class extends qe{constructor(){super(...arguments),this._any=!0}_parse(t){return sn(t.data)}};ta.create=e=>new ta({typeName:Ne.ZodAny,...Be(e)});let Oi=class extends qe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return sn(t.data)}};Oi.create=e=>new Oi({typeName:Ne.ZodUnknown,...Be(e)});let Ir=class extends qe{_parse(t){const n=this._getOrReturnCtx(t);return xe(n,{code:se.invalid_type,expected:ge.never,received:n.parsedType}),Le}};Ir.create=e=>new Ir({typeName:Ne.ZodNever,...Be(e)});let vl=class extends qe{_parse(t){if(this._getType(t)!==ge.undefined){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ge.void,received:r.parsedType}),Le}return sn(t.data)}};vl.create=e=>new vl({typeName:Ne.ZodVoid,...Be(e)});let Ci=class pf extends qe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==ge.array)return xe(n,{code:se.invalid_type,expected:ge.array,received:n.parsedType}),Le;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(o||s)&&(xe(n,{code:o?se.too_big:se.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?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&&(xe(n,{code:se.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&&(xe(n,{code:se.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((o,s)=>i.type._parseAsync(new or(n,o,n.path,s)))).then(o=>dn.mergeArray(r,o));const a=[...n.data].map((o,s)=>i.type._parseSync(new or(n,o,n.path,s)));return dn.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new pf({...this._def,minLength:{value:t,message:Ce.toString(n)}})}max(t,n){return new pf({...this._def,maxLength:{value:t,message:Ce.toString(n)}})}length(t,n){return new pf({...this._def,exactLength:{value:t,message:Ce.toString(n)}})}nonempty(t){return this.min(1,t)}};Ci.create=(e,t)=>new Ci({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ne.ZodArray,...Be(t)});function na(e){if(e instanceof $n){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Rr.create(na(r))}return new $n({...e._def,shape:()=>t})}else return e instanceof Ci?new Ci({...e._def,type:na(e.element)}):e instanceof Rr?Rr.create(na(e.unwrap())):e instanceof $i?$i.create(na(e.unwrap())):e instanceof Gr?Gr.create(e.items.map(t=>na(t))):e}let $n=class ar extends qe{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=at.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ge.object){const l=this._getOrReturnCtx(t);return xe(l,{code:se.invalid_type,expected:ge.object,received:l.parsedType}),Le}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Ir&&this._def.unknownKeys==="strip"))for(const l in i.data)o.includes(l)||s.push(l);const u=[];for(const l of o){const c=a[l],f=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new or(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Ir){const l=this._def.unknownKeys;if(l==="passthrough")for(const c of s)u.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")s.length>0&&(xe(i,{code:se.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const c of s){const f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new or(i,f,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const c of u){const f=await c.key;l.push({key:f,value:await c.value,alwaysSet:c.alwaysSet})}return l}).then(l=>dn.mergeObjectSync(r,l)):dn.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(t){return Ce.errToObj,new ar({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,a,o,s;const u=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=Ce.errToObj(t).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new ar({...this._def,unknownKeys:"strip"})}passthrough(){return new ar({...this._def,unknownKeys:"passthrough"})}extend(t){return new ar({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ar({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ne.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new ar({...this._def,catchall:t})}pick(t){const n={};return at.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new ar({...this._def,shape:()=>n})}omit(t){const n={};return at.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new ar({...this._def,shape:()=>n})}deepPartial(){return na(this)}partial(t){const n={};return at.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new ar({...this._def,shape:()=>n})}required(t){const n={};return at.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof Rr;)a=a._def.innerType;n[r]=a}}),new ar({...this._def,shape:()=>n})}keyof(){return lg(at.objectKeys(this.shape))}};$n.create=(e,t)=>new $n({shape:()=>e,unknownKeys:"strip",catchall:Ir.create(),typeName:Ne.ZodObject,...Be(t)}),$n.strictCreate=(e,t)=>new $n({shape:()=>e,unknownKeys:"strict",catchall:Ir.create(),typeName:Ne.ZodObject,...Be(t)}),$n.lazycreate=(e,t)=>new $n({shape:e,unknownKeys:"strip",catchall:Ir.create(),typeName:Ne.ZodObject,...Be(t)});let _o=class extends qe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new Un(s.ctx.common.issues));return xe(n,{code:se.invalid_union,unionErrors:o}),Le}if(n.common.async)return Promise.all(r.map(async a=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const u of r){const l={...n,common:{...n.common,issues:[]},parent:null},c=u._parseSync({data:n.data,path:n.path,parent:l});if(c.status==="valid")return c;c.status==="dirty"&&!a&&(a={result:c,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(u=>new Un(u));return xe(n,{code:se.invalid_union,unionErrors:s}),Le}}get options(){return this._def.options}};_o.create=(e,t)=>new _o({options:e,typeName:Ne.ZodUnion,...Be(t)});const yl=e=>e instanceof ko?yl(e.schema):e instanceof zn?yl(e.innerType()):e instanceof To?[e.value]:e instanceof Oo?e.options:e instanceof Co?Object.keys(e.enum):e instanceof $o?yl(e._def.innerType):e instanceof wo?[void 0]:e instanceof So?[null]:null;let ag=class LC extends qe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.object)return xe(n,{code:se.invalid_type,expected:ge.object,received:n.parsedType}),Le;const r=this.discriminator,i=n.data[r],a=this.optionsMap.get(i);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(xe(n,{code:se.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Le)}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 a of n){const o=yl(a.shape[t]);if(!o)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of o){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,a)}}return new LC({typeName:Ne.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Be(r)})}};function $f(e,t){const n=Kr(e),r=Kr(t);if(e===t)return{valid:!0,data:e};if(n===ge.object&&r===ge.object){const i=at.objectKeys(t),a=at.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(const s of a){const u=$f(e[s],t[s]);if(!u.valid)return{valid:!1};o[s]=u.data}return{valid:!0,data:o}}else if(n===ge.array&&r===ge.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const o=e[a],s=t[a],u=$f(o,s);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return n===ge.date&&r===ge.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}let Eo=class extends qe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(Tf(a)||Tf(o))return Le;const s=$f(a.value,o.value);return s.valid?((Of(a)||Of(o))&&n.dirty(),{status:n.value,value:s.data}):(xe(r,{code:se.invalid_intersection_types}),Le)};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(([a,o])=>i(a,o)):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}))}};Eo.create=(e,t,n)=>new Eo({left:e,right:t,typeName:Ne.ZodIntersection,...Be(n)});let Gr=class FC extends qe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.array)return xe(r,{code:se.invalid_type,expected:ge.array,received:r.parsedType}),Le;if(r.data.length<this._def.items.length)return xe(r,{code:se.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Le;!this._def.rest&&r.data.length>this._def.items.length&&(xe(r,{code:se.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,s)=>{const u=this._def.items[s]||this._def.rest;return u?u._parse(new or(r,o,r.path,s)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>dn.mergeArray(n,o)):dn.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new FC({...this._def,rest:t})}};Gr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Gr({items:e,typeName:Ne.ZodTuple,rest:null,...Be(t)})};let og=class wy extends qe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.object)return xe(r,{code:se.invalid_type,expected:ge.object,received:r.parsedType}),Le;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in r.data)i.push({key:a._parse(new or(r,s,r.path,s)),value:o._parse(new or(r,r.data[s],r.path,s))});return r.common.async?dn.mergeObjectAsync(n,i):dn.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof qe?new wy({keyType:t,valueType:n,typeName:Ne.ZodRecord,...Be(r)}):new wy({keyType:ea.create(),valueType:t,typeName:Ne.ZodRecord,...Be(n)})}},gl=class extends qe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.map)return xe(r,{code:se.invalid_type,expected:ge.map,received:r.parsedType}),Le;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([s,u],l)=>({key:i._parse(new or(r,s,r.path,[l,"key"])),value:a._parse(new or(r,u,r.path,[l,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const u of o){const l=await u.key,c=await u.value;if(l.status==="aborted"||c.status==="aborted")return Le;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const u of o){const l=u.key,c=u.value;if(l.status==="aborted"||c.status==="aborted")return Le;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}}}};gl.create=(e,t,n)=>new gl({valueType:t,keyType:e,typeName:Ne.ZodMap,...Be(n)});let bl=class Sy extends qe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.set)return xe(r,{code:se.invalid_type,expected:ge.set,received:r.parsedType}),Le;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(xe(r,{code:se.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&&(xe(r,{code:se.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function o(u){const l=new Set;for(const c of u){if(c.status==="aborted")return Le;c.status==="dirty"&&n.dirty(),l.add(c.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((u,l)=>a._parse(new or(r,u,r.path,l)));return r.common.async?Promise.all(s).then(u=>o(u)):o(s)}min(t,n){return new Sy({...this._def,minSize:{value:t,message:Ce.toString(n)}})}max(t,n){return new Sy({...this._def,maxSize:{value:t,message:Ce.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};bl.create=(e,t)=>new bl({valueType:e,minSize:null,maxSize:null,typeName:Ne.ZodSet,...Be(t)});let sg=class hf extends qe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.function)return xe(n,{code:se.invalid_type,expected:ge.function,received:n.parsedType}),Le;function r(s,u){return pl({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,dl(),mo].filter(l=>!!l),issueData:{code:se.invalid_arguments,argumentsError:u}})}function i(s,u){return pl({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,dl(),mo].filter(l=>!!l),issueData:{code:se.invalid_return_type,returnTypeError:u}})}const a={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof ra){const s=this;return sn(async function(...u){const l=new Un([]),c=await s._def.args.parseAsync(u,a).catch(p=>{throw l.addIssue(r(u,p)),l}),f=await Reflect.apply(o,this,c);return await s._def.returns._def.type.parseAsync(f,a).catch(p=>{throw l.addIssue(i(f,p)),l})})}else{const s=this;return sn(function(...u){const l=s._def.args.safeParse(u,a);if(!l.success)throw new Un([r(u,l.error)]);const c=Reflect.apply(o,this,l.data),f=s._def.returns.safeParse(c,a);if(!f.success)throw new Un([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new hf({...this._def,args:Gr.create(t).rest(Oi.create())})}returns(t){return new hf({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new hf({args:t||Gr.create([]).rest(Oi.create()),returns:n||Oi.create(),typeName:Ne.ZodFunction,...Be(r)})}},ko=class extends qe{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})}};ko.create=(e,t)=>new ko({getter:e,typeName:Ne.ZodLazy,...Be(t)});let To=class extends qe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return xe(n,{received:n.data,code:se.invalid_literal,expected:this._def.value}),Le}return{status:"valid",value:t.data}}get value(){return this._def.value}};To.create=(e,t)=>new To({value:e,typeName:Ne.ZodLiteral,...Be(t)});function lg(e,t){return new Oo({values:e,typeName:Ne.ZodEnum,...Be(t)})}let Oo=class _y extends qe{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return xe(n,{expected:at.joinValues(r),received:n.parsedType,code:se.invalid_type}),Le}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return xe(n,{received:n.data,code:se.invalid_enum_value,options:r}),Le}return sn(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 _y.create(t)}exclude(t){return _y.create(this.options.filter(n=>!t.includes(n)))}};Oo.create=lg;let Co=class extends qe{_parse(t){const n=at.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ge.string&&r.parsedType!==ge.number){const i=at.objectValues(n);return xe(r,{expected:at.joinValues(i),received:r.parsedType,code:se.invalid_type}),Le}if(n.indexOf(t.data)===-1){const i=at.objectValues(n);return xe(r,{received:r.data,code:se.invalid_enum_value,options:i}),Le}return sn(t.data)}get enum(){return this._def.values}};Co.create=(e,t)=>new Co({values:e,typeName:Ne.ZodNativeEnum,...Be(t)});let ra=class extends qe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.promise&&n.common.async===!1)return xe(n,{code:se.invalid_type,expected:ge.promise,received:n.parsedType}),Le;const r=n.parsedType===ge.promise?n.data:Promise.resolve(n.data);return sn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}};ra.create=(e,t)=>new ra({type:e,typeName:Ne.ZodPromise,...Be(t)});let zn=class extends qe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ne.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{xe(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(r.data,a);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(o).then(s=>this._def.schema._parseAsync({data:s,path:r.path,parent:r})):this._def.schema._parseSync({data:o,path:r.path,parent:r})}if(i.type==="refinement"){const o=s=>{const u=i.refinement(s,a);if(r.common.async)return Promise.resolve(u);if(u 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"?Le:(s.status==="dirty"&&n.dirty(),o(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"?Le:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!vo(o))return o;const s=i.transform(o.value,a);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(o=>vo(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:n.value,value:s})):o);at.assertNever(i)}};zn.create=(e,t,n)=>new zn({schema:e,typeName:Ne.ZodEffects,effect:t,...Be(n)}),zn.createWithPreprocess=(e,t,n)=>new zn({schema:t,effect:{type:"preprocess",transform:e},typeName:Ne.ZodEffects,...Be(n)});let Rr=class extends qe{_parse(t){return this._getType(t)===ge.undefined?sn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Rr.create=(e,t)=>new Rr({innerType:e,typeName:Ne.ZodOptional,...Be(t)});let $i=class extends qe{_parse(t){return this._getType(t)===ge.null?sn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};$i.create=(e,t)=>new $i({innerType:e,typeName:Ne.ZodNullable,...Be(t)});let $o=class extends qe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ge.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};$o.create=(e,t)=>new $o({innerType:e,typeName:Ne.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Be(t)});let xl=class extends qe{_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 hl(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Un(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Un(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};xl.create=(e,t)=>new xl({innerType:e,typeName:Ne.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Be(t)});let wl=class extends qe{_parse(t){if(this._getType(t)!==ge.nan){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ge.nan,received:r.parsedType}),Le}return{status:"valid",value:t.data}}};wl.create=e=>new wl({typeName:Ne.ZodNaN,...Be(e)});const nI=Symbol("zod_brand");let ug=class extends qe{_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}},If=class BC extends qe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Le:a.status==="dirty"?(n.dirty(),rg(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Le: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 BC({in:t,out:n,typeName:Ne.ZodPipeline})}},Sl=class extends qe{_parse(t){const n=this._def.innerType._parse(t);return vo(n)&&(n.value=Object.freeze(n.value)),n}};Sl.create=(e,t)=>new Sl({innerType:e,typeName:Ne.ZodReadonly,...Be(t)});const cg=(e,t={},n)=>e?ta.create().superRefine((r,i)=>{var a,o;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,u=(o=(a=s.fatal)!==null&&a!==void 0?a:n)!==null&&o!==void 0?o:!0,l=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...l,fatal:u})}}):ta.create(),rI={object:$n.lazycreate};var Ne;(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"})(Ne||(Ne={}));const iI=(e,t={message:`Input not instance of ${e.name}`})=>cg(n=>n instanceof e,t),fg=ea.create,dg=yo.create,aI=wl.create,oI=go.create,pg=bo.create,sI=xo.create,lI=ml.create,uI=wo.create,cI=So.create,fI=ta.create,dI=Oi.create,pI=Ir.create,hI=vl.create,mI=Ci.create,vI=$n.create,yI=$n.strictCreate,gI=_o.create,bI=ag.create,xI=Eo.create,wI=Gr.create,SI=og.create,_I=gl.create,EI=bl.create,kI=sg.create,TI=ko.create,OI=To.create,CI=Oo.create,$I=Co.create,II=ra.create,hg=zn.create,RI=Rr.create,PI=$i.create,AI=zn.createWithPreprocess,NI=If.create;var we=Object.freeze({__proto__:null,defaultErrorMap:mo,setErrorMap:q$,getErrorMap:dl,makeIssue:pl,EMPTY_PATH:V$,addIssueToContext:xe,ParseStatus:dn,INVALID:Le,DIRTY:rg,OK:sn,isAborted:Tf,isDirty:Of,isValid:vo,isAsync:hl,get util(){return at},get objectUtil(){return kf},ZodParsedType:ge,getParsedType:Kr,ZodType:qe,ZodString:ea,ZodNumber:yo,ZodBigInt:go,ZodBoolean:bo,ZodDate:xo,ZodSymbol:ml,ZodUndefined:wo,ZodNull:So,ZodAny:ta,ZodUnknown:Oi,ZodNever:Ir,ZodVoid:vl,ZodArray:Ci,ZodObject:$n,ZodUnion:_o,ZodDiscriminatedUnion:ag,ZodIntersection:Eo,ZodTuple:Gr,ZodRecord:og,ZodMap:gl,ZodSet:bl,ZodFunction:sg,ZodLazy:ko,ZodLiteral:To,ZodEnum:Oo,ZodNativeEnum:Co,ZodPromise:ra,ZodEffects:zn,ZodTransformer:zn,ZodOptional:Rr,ZodNullable:$i,ZodDefault:$o,ZodCatch:xl,ZodNaN:wl,BRAND:nI,ZodBranded:ug,ZodPipeline:If,ZodReadonly:Sl,custom:cg,Schema:qe,ZodSchema:qe,late:rI,get ZodFirstPartyTypeKind(){return Ne},coerce:{string:e=>ea.create({...e,coerce:!0}),number:e=>yo.create({...e,coerce:!0}),boolean:e=>bo.create({...e,coerce:!0}),bigint:e=>go.create({...e,coerce:!0}),date:e=>xo.create({...e,coerce:!0})},any:fI,array:mI,bigint:oI,boolean:pg,date:sI,discriminatedUnion:bI,effect:hg,enum:CI,function:kI,instanceof:iI,intersection:xI,lazy:TI,literal:OI,map:_I,nan:aI,nativeEnum:$I,never:pI,null:cI,nullable:PI,number:dg,object:vI,oboolean:()=>pg().optional(),onumber:()=>dg().optional(),optional:RI,ostring:()=>fg().optional(),pipeline:NI,preprocess:AI,promise:II,record:SI,set:EI,strictObject:yI,string:fg,symbol:lI,transformer:hg,tuple:wI,undefined:uI,union:gI,unknown:dI,void:hI,NEVER:Le,ZodIssueCode:se,quotelessJson:z$,ZodError:Un});const ia=we.object({title:we.string().optional(),link:we.string().optional()}),Rf=we.object({color:we.string().optional(),variant:we.enum(["soft","solid"]).optional(),themeMode:we.enum(["light","dark"]).optional(),fontFamily:we.enum(["rubik","inter","ibm","fira"]).optional(),radius:we.number().min(.5).max(4).optional()}),mg=we.object({composerPlaceholder:we.string().optional(),botName:we.string().optional(),botAvatar:we.string().optional(),botDescription:we.string().optional(),website:ia.optional(),email:ia.optional(),phone:ia.optional(),privacyPolicy:ia.optional(),termsOfService:ia.optional(),showPoweredBy:we.boolean().optional(),storageLocation:we.enum(["localStorage","sessionStorage"]).optional()}).merge(Rf),vg=we.enum(["heading1","heading2","heading3","text","horizontalRule","link","italic","bold","orderedList","unorderedList","listItem","lineBreak","pre"]),yg=we.object({}).passthrough().transform(e=>e),fe=we.object({className:we.string().optional(),style:yg.optional()}),_l=we.object({container:fe.optional(),image:fe.optional(),fallback:fe.optional()}),gg=we.object({button:fe.optional(),text:we.record(vg,fe.optional()),image:we.object({image:fe.optional(),placeholder:fe.optional()}).optional(),audio:fe.optional(),video:fe.optional(),file:we.object({container:fe.optional(),title:fe.optional(),icon:fe.optional()}).optional(),location:we.object({container:fe.optional(),title:fe.optional(),icon:fe.optional()}).optional(),column:fe.optional(),row:fe.optional(),bubble:fe.optional(),carousel:we.object({container:fe.optional(),slidesContainer:fe.optional(),backButton:fe.optional(),nextButton:fe.optional()}).optional(),dropdown:we.object({button:we.object({container:fe.optional(),icon:fe.optional(),text:fe.optional()}).optional(),content:we.object({container:fe.optional(),item:fe.optional()}).optional()}).optional()}),bg=we.object({container:fe.optional(),modal:we.object({overlay:fe.optional(),container:fe.optional(),dialog:we.object({container:fe.optional(),title:we.object({container:fe.optional(),text:fe.optional(),closeIcon:fe.optional()}).optional(),content:fe.optional(),newConversation:we.object({text:fe.optional(),button:fe.optional()}).optional()}).optional()}).optional(),notification:we.object({container:fe.optional(),title:fe.optional(),description:fe.optional(),icon:fe.optional(),closeIcon:fe.optional()}).optional(),header:we.object({container:fe.optional(),content:we.object({container:fe.optional(),title:fe.optional(),description:fe.optional(),avatar:_l.optional(),actions:we.object({container:fe.optional(),icons:fe.optional()}).optional()}),expandedContent:we.object({container:fe.optional(),group:fe.optional(),descriptionItems:we.object({container:fe.optional(),icon:fe.optional(),text:fe.optional(),link:fe.optional(),poweredBy:fe.optional()}).optional()}).optional(),description:we.object({container:fe.optional(),title:fe.optional(),subtitle:fe.optional()}).optional(),newConversationIcon:fe.optional()}).optional(),composer:we.object({container:fe.optional(),input:fe.optional(),uploadButton:we.object({container:fe.optional(),icon:fe.optional()}).optional(),button:we.object({container:fe.optional(),icon:fe.optional()}).optional()}).optional(),fab:we.object({icon:fe.optional(),container:fe.optional()}).optional(),messageList:we.object({scrollbar:we.object({container:fe.optional(),viewport:fe.optional(),thumb:fe.optional(),corner:fe.optional(),background:fe.optional()}).optional(),container:fe.optional(),marquee:we.object({content:fe.optional(),title:fe.optional(),description:fe.optional(),avatar:_l.optional(),container:fe.optional()}).optional(),scrollDownButton:we.object({container:fe.optional(),button:fe.optional(),icon:fe.optional()}).optional()}).optional(),message:we.object({container:fe.optional(),avatar:_l.optional(),blocks:gg.optional()}).optional(),loadingIndicator:we.object({container:fe.optional(),loader:fe.optional()}).optional()}),xg=we.enum(["opened","closed","initial"]),wg=we.object({name:we.string().optional(),pictureUrl:we.string().optional(),data:we.record(we.unknown()).optional(),userKey:we.string().optional()}),Sg=we.object({configuration:mg.optional().catch(void 0),theme:bg.optional().catch(void 0),style:we.string().optional().catch(void 0),user:wg.optional().catch(void 0)}),DI=Sg.extend({clientId:we.string(),botId:we.string(),selector:we.string().optional().catch(void 0),webchatScriptUrl:we.string().optional().catch(void 0),fabScriptUrl:we.string().optional().catch(void 0),pushpinUrl:we.string().optional().catch(void 0),defaultState:xg.optional().catch(void 0)});function _g(e){const{fontFamily:t,radius:n,themeMode:r,variant:i,color:a}=Rf.parse(e);let o={},s={};if(a){const c=tg(a),f=r==="dark"?zy(c):c,d=tg(d$(p$(_f(a)))),p=r==="dark"?zy(d):d,h=r==="dark"?"#101010":"#fdfdfd";s=Object.entries({...f,1:h}).reduce((y,[v,g])=>({...y,[`--bpPrimary-${v}`]:g}),{});const m=Object.entries({...p,1:h}).reduce((y,[v,g])=>({...y,[`--bpGray-${v}`]:g}),{});o={...s,...m}}n&&(o={...o,"--bpRadius-scale":n.toString()});const u=s?Ky(s["--bpPrimary-600"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)",l=i==="solid"?{"--header-bg":"var(--bpPrimary-600)","--header-bg-hover":"var(--bpPrimary-700)","--header-hover-dark":"var(--bpPrimary-800)","--header-title":u,"--header-description":u,"--header-description-icon":u,"--header-description-link":u,"--header-avatar-bg":"var(--bpPrimary-300)","--header-avatar-text":"var(--bpPrimary-700)","--message-bg":"var(--bpPrimary-600)","--message-bg-hover":"var(--bpPrimary-700)","--message-text":u,"--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-50)","--button-bg-hover":"var(--bpPrimary-100)","--button-text":"var(--bpPrimary-800)","--fab-bg":"var(--bpPrimary-600)","--fab-bg-hover":"var(--bpPrimary-700)","--fab-icon":u}:{"--header-bg":"var(--bpGray-50)","--header-bg-hover":"var(--bpGray-100)","--header-hover-dark":"var(--bpGray-200)","--header-title":"var(--bpGray-900)","--header-description":"var(--bpGray-800)","--header-description-icon":"var(--bpPrimary-700)","--header-description-link":"var(--bpPrimary-800)","--header-avatar-bg":"var(--bpPrimary-600)","--header-avatar-text":"var(--bpPrimary-50)","--message-bg":"var(--bpPrimary-100)","--message-bg-hover":"var(--bpPrimary-200)","--message-text":"var(--bpPrimary-900)","--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-500)","--button-bg-hover":"var(--bpPrimary-600)","--button-text":s?Ky(s["--bpPrimary-500"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)","--fab-bg":"var(--bpPrimary-100)","--fab-bg-hover":"var(--bpPrimary-200)","--fab-icon":"var(--bpPrimary-700)"};return o={...o,...l},Gy(":root",o)+(t?Gy(".bpFont",{"font-family":`var(--${t}-font)`}):"")}const El=M.forwardRef(({userId:e,src:t,container:n,image:r,fallback:i,...a},o)=>{const s=Yy(e??"",15);return $.jsxs(xf,{ref:o,"data-color":s,...n,...a,children:[$.jsx(wf,{src:t,...r}),$.jsx(Sf,{...i,children:typeof a.children=="string"?a.children[0]:a.children})]})});El.displayName="Avatar";function rle(){}function ile(){}function MI(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const jI=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,LI=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,FI={};function Eg(e,t){return(FI.jsx?LI:jI).test(e)}const BI=/[ \t\n\f\r]/g;function UI(e){return typeof e=="object"?e.type==="text"?kg(e.value):!1:kg(e)}function kg(e){return e.replace(BI,"")===""}class Io{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Io.prototype.property={},Io.prototype.normal={},Io.prototype.space=null;function Tg(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 Io(n,r,t)}function Pf(e){return e.toLowerCase()}class In{constructor(t,n){this.property=t,this.attribute=n}}In.prototype.space=null,In.prototype.boolean=!1,In.prototype.booleanish=!1,In.prototype.overloadedBoolean=!1,In.prototype.number=!1,In.prototype.commaSeparated=!1,In.prototype.spaceSeparated=!1,In.prototype.commaOrSpaceSeparated=!1,In.prototype.mustUseProperty=!1,In.prototype.defined=!1;let zI=0;const Ue=Ii(),It=Ii(),Og=Ii(),ae=Ii(),bt=Ii(),aa=Ii(),wn=Ii();function Ii(){return 2**++zI}const Af=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ue,booleanish:It,commaOrSpaceSeparated:wn,commaSeparated:aa,number:ae,overloadedBoolean:Og,spaceSeparated:bt},Symbol.toStringTag,{value:"Module"})),Nf=Object.keys(Af);class Df extends In{constructor(t,n,r,i){let a=-1;if(super(t,n),Cg(this,"space",i),typeof r=="number")for(;++a<Nf.length;){const o=Nf[a];Cg(this,Nf[a],(r&Af[o])===Af[o])}}}Df.prototype.defined=!0;function Cg(e,t,n){n&&(e[t]=n)}const qI={}.hasOwnProperty;function oa(e){const t={},n={};let r;for(r in e.properties)if(qI.call(e.properties,r)){const i=e.properties[r],a=new Df(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Pf(r)]=r,n[Pf(a.attribute)]=r}return new Io(t,n,e.space)}const $g=oa({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}}),Ig=oa({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Rg(e,t){return t in e?e[t]:t}function Pg(e,t){return Rg(e,t.toLowerCase())}const Ag=oa({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Pg,properties:{xmlns:null,xmlnsXLink:null}}),Ng=oa({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:It,ariaAutoComplete:null,ariaBusy:It,ariaChecked:It,ariaColCount:ae,ariaColIndex:ae,ariaColSpan:ae,ariaControls:bt,ariaCurrent:null,ariaDescribedBy:bt,ariaDetails:null,ariaDisabled:It,ariaDropEffect:bt,ariaErrorMessage:null,ariaExpanded:It,ariaFlowTo:bt,ariaGrabbed:It,ariaHasPopup:null,ariaHidden:It,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:bt,ariaLevel:ae,ariaLive:null,ariaModal:It,ariaMultiLine:It,ariaMultiSelectable:It,ariaOrientation:null,ariaOwns:bt,ariaPlaceholder:null,ariaPosInSet:ae,ariaPressed:It,ariaReadOnly:It,ariaRelevant:null,ariaRequired:It,ariaRoleDescription:bt,ariaRowCount:ae,ariaRowIndex:ae,ariaRowSpan:ae,ariaSelected:It,ariaSetSize:ae,ariaSort:null,ariaValueMax:ae,ariaValueMin:ae,ariaValueNow:ae,ariaValueText:null,role:null}}),VI=oa({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Pg,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:aa,acceptCharset:bt,accessKey:bt,action:null,allow:null,allowFullScreen:Ue,allowPaymentRequest:Ue,allowUserMedia:Ue,alt:null,as:null,async:Ue,autoCapitalize:null,autoComplete:bt,autoFocus:Ue,autoPlay:Ue,blocking:bt,capture:null,charSet:null,checked:Ue,cite:null,className:bt,cols:ae,colSpan:null,content:null,contentEditable:It,controls:Ue,controlsList:bt,coords:ae|aa,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ue,defer:Ue,dir:null,dirName:null,disabled:Ue,download:Og,draggable:It,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ue,formTarget:null,headers:bt,height:ae,hidden:Ue,high:ae,href:null,hrefLang:null,htmlFor:bt,httpEquiv:bt,id:null,imageSizes:null,imageSrcSet:null,inert:Ue,inputMode:null,integrity:null,is:null,isMap:Ue,itemId:null,itemProp:bt,itemRef:bt,itemScope:Ue,itemType:bt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ue,low:ae,manifest:null,max:null,maxLength:ae,media:null,method:null,min:null,minLength:ae,multiple:Ue,muted:Ue,name:null,nonce:null,noModule:Ue,noValidate:Ue,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle: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:Ue,optimum:ae,pattern:null,ping:bt,placeholder:null,playsInline:Ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ue,referrerPolicy:null,rel:bt,required:Ue,reversed:Ue,rows:ae,rowSpan:ae,sandbox:bt,scope:null,scoped:Ue,seamless:Ue,selected:Ue,shadowRootClonable:Ue,shadowRootDelegatesFocus:Ue,shadowRootMode:null,shape:null,size:ae,sizes:null,slot:null,span:ae,spellCheck:It,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ae,step:null,style:null,tabIndex:ae,target:null,title:null,translate:null,type:null,typeMustMatch:Ue,useMap:null,value:It,width:ae,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:bt,axis:null,background:null,bgColor:null,border:ae,borderColor:null,bottomMargin:ae,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ue,declare:Ue,event:null,face:null,frame:null,frameBorder:null,hSpace:ae,leftMargin:ae,link:null,longDesc:null,lowSrc:null,marginHeight:ae,marginWidth:ae,noResize:Ue,noHref:Ue,noShade:Ue,noWrap:Ue,object:null,profile:null,prompt:null,rev:null,rightMargin:ae,rules:null,scheme:null,scrolling:It,standby:null,summary:null,text:null,topMargin:ae,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ae,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ue,disableRemotePlayback:Ue,prefix:null,property:null,results:ae,security:null,unselectable:null}}),HI=oa({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",transformOrigin:"transform-origin",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:Rg,properties:{about:wn,accentHeight:ae,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ae,amplitude:ae,arabicForm:null,ascent:ae,attributeName:null,attributeType:null,azimuth:ae,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ae,by:null,calcMode:null,capHeight:ae,className:bt,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:ae,diffuseConstant:ae,direction:null,display:null,dur:null,divisor:ae,dominantBaseline:null,download:Ue,dx:null,dy:null,edgeMode:null,editable:null,elevation:ae,enableBackground:null,end:null,event:null,exponent:ae,externalResourcesRequired:null,fill:null,fillOpacity:ae,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:aa,g2:aa,glyphName:aa,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ae,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ae,horizOriginX:ae,horizOriginY:ae,id:null,ideographic:ae,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ae,k:ae,k1:ae,k2:ae,k3:ae,k4:ae,kernelMatrix:wn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ae,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:ae,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:ae,overlineThickness:ae,paintOrder:null,panose1:null,path:null,pathLength:ae,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:bt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ae,pointsAtY:ae,pointsAtZ:ae,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:wn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:wn,rev:wn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:wn,requiredFeatures:wn,requiredFonts:wn,requiredFormats:wn,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:ae,specularExponent:ae,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ae,strikethroughThickness:ae,string:null,stroke:null,strokeDashArray:wn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ae,strokeOpacity:ae,strokeWidth:null,style:null,surfaceScale:ae,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:wn,tabIndex:ae,tableValues:null,target:null,targetX:ae,targetY:ae,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:wn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ae,underlineThickness:ae,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ae,values:null,vAlphabetic:ae,vMathematical:ae,vectorEffect:null,vHanging:ae,vIdeographic:ae,version:null,vertAdvY:ae,vertOriginX:ae,vertOriginY:ae,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ae,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),WI=/^data[-\w.:]+$/i,Dg=/-[a-z]/g,ZI=/[A-Z]/g;function KI(e,t){const n=Pf(t);let r=t,i=In;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&WI.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Dg,YI);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Dg.test(a)){let o=a.replace(ZI,GI);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=Df}return new i(r,t)}function GI(e){return"-"+e.toLowerCase()}function YI(e){return e.charAt(1).toUpperCase()}const JI={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"},XI=Tg([Ig,$g,Ag,Ng,VI],"html"),Mf=Tg([Ig,$g,Ag,Ng,HI],"svg");function QI(e){return e.join(" ").trim()}var Mg={},jg=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,eR=/\n/g,tR=/^\s*/,nR=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,rR=/^:\s*/,iR=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,aR=/^[;\s]*/,oR=/^\s+|\s+$/g,sR=`
|
|
31
|
+
`,Lg="/",Fg="*",Ri="",lR="comment",uR="declaration",cR=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(eR);m&&(n+=m.length);var y=h.lastIndexOf(sR);r=~y?h.length-y:r+h.length}function a(){var h={line:n,column:r};return function(m){return m.position=new o(h),l(),m}}function o(h){this.start=h,this.end={line:n,column:r},this.source=t.source}o.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 u(h){var m=h.exec(e);if(m){var y=m[0];return i(y),e=e.slice(y.length),m}}function l(){u(tR)}function c(h){var m;for(h=h||[];m=f();)m!==!1&&h.push(m);return h}function f(){var h=a();if(!(Lg!=e.charAt(0)||Fg!=e.charAt(1))){for(var m=2;Ri!=e.charAt(m)&&(Fg!=e.charAt(m)||Lg!=e.charAt(m+1));)++m;if(m+=2,Ri===e.charAt(m-1))return s("End of comment missing");var y=e.slice(2,m-2);return r+=2,i(y),e=e.slice(m),r+=2,h({type:lR,comment:y})}}function d(){var h=a(),m=u(nR);if(m){if(f(),!u(rR))return s("property missing ':'");var y=u(iR),v=h({type:uR,property:Bg(m[0].replace(jg,Ri)),value:y?Bg(y[0].replace(jg,Ri)):Ri});return u(aR),v}}function p(){var h=[];c(h);for(var m;m=d();)m!==!1&&(h.push(m),c(h));return h}return l(),p()};function Bg(e){return e?e.replace(oR,Ri):Ri}var fR=ht&&ht.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Mg,"__esModule",{value:!0});var Ug=Mg.default=pR,dR=fR(cR);function pR(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,dR.default)(e),i=typeof t=="function";return r.forEach(function(a){if(a.type==="declaration"){var o=a.property,s=a.value;i?t(o,s,a):s&&(n=n||{},n[o]=s)}}),n}const hR=Ug.default||Ug,zg=qg("end"),jf=qg("start");function qg(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 mR(e){const t=jf(e),n=zg(e);if(t&&n)return{start:t,end:n}}function Ro(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Vg(e.position):"start"in e||"end"in e?Vg(e):"line"in e||"column"in e?Lf(e):""}function Lf(e){return Hg(e&&e.line)+":"+Hg(e&&e.column)}function Vg(e){return Lf(e&&e.start)+"-"+Lf(e&&e.end)}function Hg(e){return e&&typeof e=="number"?e:1}class Qt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},o=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(o=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?a.ruleId=r:(a.source=r.slice(0,u),a.ruleId=r.slice(u+1))}if(!a.place&&a.ancestors&&a.ancestors){const u=a.ancestors[a.ancestors.length-1];u&&(a.place=u.position)}const s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.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=Ro(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}Qt.prototype.file="",Qt.prototype.name="",Qt.prototype.reason="",Qt.prototype.message="",Qt.prototype.stack="",Qt.prototype.column=void 0,Qt.prototype.line=void 0,Qt.prototype.ancestors=void 0,Qt.prototype.cause=void 0,Qt.prototype.fatal=void 0,Qt.prototype.place=void 0,Qt.prototype.ruleId=void 0,Qt.prototype.source=void 0;const Ff={}.hasOwnProperty,vR=new Map,yR=/[A-Z]/g,gR=/-([a-z])/g,bR=new Set(["table","tbody","thead","tfoot","tr"]),xR=new Set(["td","th"]),Wg="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function wR(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=$R(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=CR(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"?Mf:XI,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Zg(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Zg(e,t,n){if(t.type==="element")return SR(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return _R(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return kR(e,t,n);if(t.type==="mdxjsEsm")return ER(e,t);if(t.type==="root")return TR(e,t,n);if(t.type==="text")return OR(e,t)}function SR(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Mf,e.schema=i),e.ancestors.push(t);const a=Gg(e,t.tagName,!1),o=IR(e,t);let s=Uf(e,t);return bR.has(t.tagName)&&(s=s.filter(function(u){return typeof u=="string"?!UI(u):!0})),Kg(e,o,a,t),Bf(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function _R(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)}Po(e,t.position)}function ER(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Po(e,t.position)}function kR(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Mf,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Gg(e,t.name,!0),o=RR(e,t),s=Uf(e,t);return Kg(e,o,a,t),Bf(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function TR(e,t,n){const r={};return Bf(r,Uf(e,t)),e.create(t,e.Fragment,r,n)}function OR(e,t){return t.value}function Kg(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Bf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function CR(e,t,n){return r;function r(i,a,o,s){const l=Array.isArray(o.children)?n:t;return s?l(a,o,s):l(a,o)}}function $R(e,t){return n;function n(r,i,a,o){const s=Array.isArray(a.children),u=jf(r);return t(i,a,o,s,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function IR(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Ff.call(t.properties,i)){const a=PR(e,i,t.properties[i]);if(a){const[o,s]=a;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&xR.has(t.tagName)?r=s:n[o]=s}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function RR(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const o=a.expression;o.type;const s=o.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else Po(e,t.position);else{const i=r.name;let a;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,a=e.evaluater.evaluateExpression(s.expression)}else Po(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Uf(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:vR;for(;++r<t.children.length;){const a=t.children[r];let o;if(e.passKeys){const u=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(u){const l=i.get(u)||0;o=u+"-"+l,i.set(u,l+1)}}const s=Zg(e,a,o);s!==void 0&&n.push(s)}return n}function PR(e,t,n){const r=KI(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?MI(n):QI(n)),r.property==="style"){let i=typeof n=="object"?n:AR(e,String(n));return e.stylePropertyNameCase==="css"&&(i=NR(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?JI[r.property]||r.property:r.attribute,n]}}function AR(e,t){const n={};try{hR(t,r)}catch(i){if(!e.ignoreInvalidStyle){const a=i,o=new Qt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=Wg+"#cannot-parse-style-attribute",o}}return n;function r(i,a){let o=i;o.slice(0,2)!=="--"&&(o.slice(0,4)==="-ms-"&&(o="ms-"+o.slice(4)),o=o.replace(gR,MR)),n[o]=a}}function Gg(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,o;for(;++a<i.length;){const s=Eg(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};o=o?{type:"MemberExpression",object:o,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}r=o}else r=Eg(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Ff.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Po(e)}function Po(e,t){const n=new Qt("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=Wg+"#cannot-handle-mdx-estrees-without-createevaluater",n}function NR(e){const t={};let n;for(n in e)Ff.call(e,n)&&(t[DR(n)]=e[n]);return t}function DR(e){let t=e.replace(yR,jR);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function MR(e,t){return t.toUpperCase()}function jR(e){return"-"+e.toLowerCase()}const zf={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"]},LR={};function qf(e,t){const n=LR,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Yg(e,r,i)}function Yg(e,t,n){if(FR(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 Jg(e.children,t,n)}return Array.isArray(e)?Jg(e,t,n):""}function Jg(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Yg(e[i],t,n);return r.join("")}function FR(e){return!!(e&&typeof e=="object")}const Xg=document.createElement("i");function Vf(e){const t="&"+e+";";Xg.innerHTML=t;const n=Xg.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Rn(e,t,n,r){const i=e.length;let a=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Pn(e,t){return e.length>0?(Rn(e,e.length,0,t),e):t}const Qg={}.hasOwnProperty;function eb(e){const t={};let n=-1;for(;++n<e.length;)BR(t,e[n]);return t}function BR(e,t){let n;for(n in t){const i=(Qg.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){Qg.call(i,o)||(i[o]=[]);const s=a[o];UR(i[o],Array.isArray(s)?s:s?[s]:[])}}}function UR(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Rn(e,0,0,r)}function tb(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 qn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ln=Yr(/[A-Za-z]/),en=Yr(/[\dA-Za-z]/),zR=Yr(/[#-'*+\--9=?A-Z^-~]/);function kl(e){return e!==null&&(e<32||e===127)}const Hf=Yr(/\d/),qR=Yr(/[\dA-Fa-f]/),VR=Yr(/[!-/:-@[-`{-~]/);function Re(e){return e!==null&&e<-2}function vt(e){return e!==null&&(e<0||e===32)}function We(e){return e===-2||e===-1||e===32}const Tl=Yr(new RegExp("\\p{P}|\\p{S}","u")),Pi=Yr(/\s/);function Yr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function sa(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let o="";if(a===37&&en(e.charCodeAt(n+1))&&en(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const s=e.charCodeAt(n+1);a<56320&&s>56319&&s<57344?(o=String.fromCharCode(a,s),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Xe(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(u){return We(u)?(e.enter(n),s(u)):t(u)}function s(u){return We(u)&&a++<i?(e.consume(u),s):(e.exit(n),t(u))}}const HR={tokenize:WR};function WR(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"),Xe(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),a(s)}function a(s){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,o(s)}function o(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return Re(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),o)}}const ZR={tokenize:KR},nb={tokenize:GR};function KR(e){const t=this,n=[];let r=0,i,a,o;return s;function s(b){if(r<n.length){const k=n[r];return t.containerState=k[1],e.attempt(k[0].continuation,u,l)(b)}return l(b)}function u(b){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&g();const k=t.events.length;let S=k,E;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){E=t.events[S][1].end;break}v(r);let O=k;for(;O<t.events.length;)t.events[O][1].end=Object.assign({},E),O++;return Rn(t.events,S+1,0,t.events.slice(k)),t.events.length=O,l(b)}return s(b)}function l(b){if(r===n.length){if(!i)return d(b);if(i.currentConstruct&&i.currentConstruct.concrete)return h(b);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(nb,c,f)(b)}function c(b){return i&&g(),v(r),d(b)}function f(b){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,h(b)}function d(b){return t.containerState={},e.attempt(nb,p,h)(b)}function p(b){return r++,n.push([t.currentConstruct,t.containerState]),d(b)}function h(b){if(b===null){i&&g(),v(0),e.consume(b);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:a,_tokenizer:i}),m(b)}function m(b){if(b===null){y(e.exit("chunkFlow"),!0),v(0),e.consume(b);return}return Re(b)?(e.consume(b),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(b),m)}function y(b,k){const S=t.sliceStream(b);if(k&&S.push(null),b.previous=a,a&&(a.next=b),a=b,i.defineSkip(b.start),i.write(S),t.parser.lazy[b.start.line]){let E=i.events.length;for(;E--;)if(i.events[E][1].start.offset<o&&(!i.events[E][1].end||i.events[E][1].end.offset>o))return;const O=t.events.length;let j=O,q,T;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){if(q){T=t.events[j][1].end;break}q=!0}for(v(r),E=O;E<t.events.length;)t.events[E][1].end=Object.assign({},T),E++;Rn(t.events,j+1,0,t.events.slice(O)),t.events.length=E}}function v(b){let k=n.length;for(;k-- >b;){const S=n[k];t.containerState=S[1],S[0].exit.call(t,e)}n.length=b}function g(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function GR(e,t,n){return Xe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ol(e){if(e===null||vt(e)||Pi(e))return 1;if(Tl(e))return 2}function Cl(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Wf={name:"attention",tokenize:JR,resolveAll:YR};function YR(e,t){let n=-1,r,i,a,o,s,u,l,c;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;u=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 f=Object.assign({},e[r][1].end),d=Object.assign({},e[n][1].start);rb(f,-u),rb(d,u),o={type:u>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},s={type:u>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:d},a={type:u>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:u>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},o.start),e[n][1].start=Object.assign({},s.end),l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Pn(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=Pn(l,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",a,t]]),l=Pn(l,Cl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Pn(l,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,l=Pn(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,Rn(e,r-1,n-r+3,l),n=r+l.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function JR(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ol(r);let a;return o;function o(u){return a=u,e.enter("attentionSequence"),s(u)}function s(u){if(u===a)return e.consume(u),s;const l=e.exit("attentionSequence"),c=Ol(u),f=!c||c===2&&i||n.includes(u),d=!i||i===2&&c||n.includes(r);return l._open=!!(a===42?f:f&&(i||!d)),l._close=!!(a===42?d:d&&(c||!f)),t(u)}}function rb(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const XR={name:"autolink",tokenize:QR};function QR(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(p){return ln(p)?(e.consume(p),o):p===64?n(p):l(p)}function o(p){return p===43||p===45||p===46||en(p)?(r=1,s(p)):l(p)}function s(p){return p===58?(e.consume(p),r=0,u):(p===43||p===45||p===46||en(p))&&r++<32?(e.consume(p),s):(r=0,l(p))}function u(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||kl(p)?n(p):(e.consume(p),u)}function l(p){return p===64?(e.consume(p),c):zR(p)?(e.consume(p),l):n(p)}function c(p){return en(p)?f(p):n(p)}function f(p){return p===46?(e.consume(p),r=0,c):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):d(p)}function d(p){if((p===45||en(p))&&r++<63){const h=p===45?d:f;return e.consume(p),h}return n(p)}}const Ao={tokenize:eP,partial:!0};function eP(e,t,n){return r;function r(a){return We(a)?Xe(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||Re(a)?t(a):n(a)}}const ib={name:"blockQuote",tokenize:tP,continuation:{tokenize:nP},exit:rP};function tP(e,t,n){const r=this;return i;function i(o){if(o===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),a}return n(o)}function a(o){return We(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function nP(e,t,n){const r=this;return i;function i(o){return We(o)?Xe(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(ib,t,n)(o)}}function rP(e){e.exit("blockQuote")}const ab={name:"characterEscape",tokenize:iP};function iP(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return VR(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const ob={name:"characterReference",tokenize:aP};function aP(e,t,n){const r=this;let i=0,a,o;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),u}function u(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),a=31,o=en,c(f))}function l(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=qR,c):(e.enter("characterReferenceValue"),a=7,o=Hf,c(f))}function c(f){if(f===59&&i){const d=e.exit("characterReferenceValue");return o===en&&!Vf(r.sliceSerialize(d))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(f)&&i++<a?(e.consume(f),c):n(f)}}const sb={tokenize:sP,partial:!0},lb={name:"codeFenced",tokenize:oP,concrete:!0};function oP(e,t,n){const r=this,i={tokenize:S,partial:!0};let a=0,o=0,s;return u;function u(E){return l(E)}function l(E){const O=r.events[r.events.length-1];return a=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,s=E,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(E)}function c(E){return E===s?(o++,e.consume(E),c):o<3?n(E):(e.exit("codeFencedFenceSequence"),We(E)?Xe(e,f,"whitespace")(E):f(E))}function f(E){return E===null||Re(E)?(e.exit("codeFencedFence"),r.interrupt?t(E):e.check(sb,m,k)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(E))}function d(E){return E===null||Re(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(E)):We(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Xe(e,p,"whitespace")(E)):E===96&&E===s?n(E):(e.consume(E),d)}function p(E){return E===null||Re(E)?f(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(E))}function h(E){return E===null||Re(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(E)):E===96&&E===s?n(E):(e.consume(E),h)}function m(E){return e.attempt(i,k,y)(E)}function y(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),v}function v(E){return a>0&&We(E)?Xe(e,g,"linePrefix",a+1)(E):g(E)}function g(E){return E===null||Re(E)?e.check(sb,m,k)(E):(e.enter("codeFlowValue"),b(E))}function b(E){return E===null||Re(E)?(e.exit("codeFlowValue"),g(E)):(e.consume(E),b)}function k(E){return e.exit("codeFenced"),t(E)}function S(E,O,j){let q=0;return T;function T(N){return E.enter("lineEnding"),E.consume(N),E.exit("lineEnding"),I}function I(N){return E.enter("codeFencedFence"),We(N)?Xe(E,U,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):U(N)}function U(N){return N===s?(E.enter("codeFencedFenceSequence"),R(N)):j(N)}function R(N){return N===s?(q++,E.consume(N),R):q>=o?(E.exit("codeFencedFenceSequence"),We(N)?Xe(E,F,"whitespace")(N):F(N)):j(N)}function F(N){return N===null||Re(N)?(E.exit("codeFencedFence"),O(N)):j(N)}}}function sP(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const Zf={name:"codeIndented",tokenize:uP},lP={tokenize:cP,partial:!0};function uP(e,t,n){const r=this;return i;function i(l){return e.enter("codeIndented"),Xe(e,a,"linePrefix",5)(l)}function a(l){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(l):n(l)}function o(l){return l===null?u(l):Re(l)?e.attempt(lP,o,u)(l):(e.enter("codeFlowValue"),s(l))}function s(l){return l===null||Re(l)?(e.exit("codeFlowValue"),o(l)):(e.consume(l),s)}function u(l){return e.exit("codeIndented"),t(l)}}function cP(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):Re(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):Xe(e,a,"linePrefix",5)(o)}function a(o){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):Re(o)?i(o):n(o)}}const fP={name:"codeText",tokenize:hP,resolve:dP,previous:pP};function dP(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 pP(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function hP(e,t,n){let r=0,i,a;return o;function o(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),r++,s):(e.exit("codeTextSequence"),u(f))}function u(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),u):f===96?(a=e.enter("codeTextSequence"),i=0,c(f)):Re(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("codeTextData"),l(f))}function l(f){return f===null||f===32||f===96||Re(f)?(e.exit("codeTextData"),u(f)):(e.consume(f),l)}function c(f){return f===96?(e.consume(f),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",l(f))}}class mP{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&No(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),No(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),No(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);No(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);No(this.left,n.reverse())}}}function No(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function ub(e){const t={};let n=-1,r,i,a,o,s,u,l;const c=new mP(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,a=0,a<u.length&&u[a][1].type==="lineEndingBlank"&&(a+=2),a<u.length&&u[a][1].type==="content"))for(;++a<u.length&&u[a][1].type!=="content";)u[a][1].type==="chunkText"&&(u[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,vP(c,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--&&(o=c.get(a),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank");)o[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=a);i&&(r[1].end=Object.assign({},c.get(i)[1].start),s=c.slice(i,n),s.unshift(r),c.splice(i,n-i+1,s))}}return Rn(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function vP(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[],o=n._tokenizer||r.parser[n.contentType](n.start),s=o.events,u=[],l={};let c,f,d=-1,p=n,h=0,m=0;const y=[m];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(null),f&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(c),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=n;++d<s.length;)s[d][0]==="exit"&&s[d-1][0]==="enter"&&s[d][1].type===s[d-1][1].type&&s[d][1].start.line!==s[d][1].end.line&&(m=d+1,y.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):y.pop(),d=y.length;d--;){const v=s.slice(y[d],y[d+1]),g=a.pop();u.push([g,g+v.length-1]),e.splice(g,2,v)}for(u.reverse(),d=-1;++d<u.length;)l[h+u[d][0]]=h+u[d][1],h+=u[d][1]-u[d][0]-1;return l}const yP={tokenize:xP,resolve:bP},gP={tokenize:wP,partial:!0};function bP(e){return ub(e),e}function xP(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?a(s):Re(s)?e.check(gP,o,a)(s):(e.consume(s),i)}function a(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function o(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function wP(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Xe(e,a,"linePrefix")}function a(o){if(o===null||Re(o))return n(o);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(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function cb(e,t,n,r,i,a,o,s,u){const l=u||Number.POSITIVE_INFINITY;let c=0;return f;function f(v){return v===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(v),e.exit(a),d):v===null||v===32||v===41||kl(v)?n(v):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),m(v))}function d(v){return v===62?(e.enter(a),e.consume(v),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===62?(e.exit("chunkString"),e.exit(s),d(v)):v===null||v===60||Re(v)?n(v):(e.consume(v),v===92?h:p)}function h(v){return v===60||v===62||v===92?(e.consume(v),p):p(v)}function m(v){return!c&&(v===null||v===41||vt(v))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(v)):c<l&&v===40?(e.consume(v),c++,m):v===41?(e.consume(v),c--,m):v===null||v===32||v===40||kl(v)?n(v):(e.consume(v),v===92?y:m)}function y(v){return v===40||v===41||v===92?(e.consume(v),m):m(v)}}function fb(e,t,n,r,i,a){const o=this;let s=0,u;return l;function l(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(a),c}function c(p){return s>999||p===null||p===91||p===93&&!u||p===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?n(p):p===93?(e.exit(a),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):Re(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||Re(p)||s++>999?(e.exit("chunkString"),c(p)):(e.consume(p),u||(u=!We(p)),p===92?d:f)}function d(p){return p===91||p===92||p===93?(e.consume(p),s++,f):f(p)}}function db(e,t,n,r,i,a){let o;return s;function s(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),o=d===40?41:d,u):n(d)}function u(d){return d===o?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):(e.enter(a),l(d))}function l(d){return d===o?(e.exit(a),u(o)):d===null?n(d):Re(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Xe(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===o||d===null||Re(d)?(e.exit("chunkString"),l(d)):(e.consume(d),d===92?f:c)}function f(d){return d===o||d===92?(e.consume(d),c):c(d)}}function Do(e,t){let n;return r;function r(i){return Re(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):We(i)?Xe(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const SP={name:"definition",tokenize:EP},_P={tokenize:kP,partial:!0};function EP(e,t,n){const r=this;let i;return a;function a(p){return e.enter("definition"),o(p)}function o(p){return fb.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return i=qn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),u):n(p)}function u(p){return vt(p)?Do(e,l)(p):l(p)}function l(p){return cb(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt(_P,f,f)(p)}function f(p){return We(p)?Xe(e,d,"whitespace")(p):d(p)}function d(p){return p===null||Re(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function kP(e,t,n){return r;function r(s){return vt(s)?Do(e,i)(s):n(s)}function i(s){return db(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return We(s)?Xe(e,o,"whitespace")(s):o(s)}function o(s){return s===null||Re(s)?t(s):n(s)}}const TP={name:"hardBreakEscape",tokenize:OP};function OP(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return Re(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const CP={name:"headingAtx",tokenize:IP,resolve:$P};function $P(e,t){let n=e.length-2,r=3,i,a;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},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Rn(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function IP(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),a(c)}function a(c){return e.enter("atxHeadingSequence"),o(c)}function o(c){return c===35&&r++<6?(e.consume(c),o):c===null||vt(c)?(e.exit("atxHeadingSequence"),s(c)):n(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),u(c)):c===null||Re(c)?(e.exit("atxHeading"),t(c)):We(c)?Xe(e,s,"whitespace")(c):(e.enter("atxHeadingText"),l(c))}function u(c){return c===35?(e.consume(c),u):(e.exit("atxHeadingSequence"),s(c))}function l(c){return c===null||c===35||vt(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),l)}}const RP=["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"],pb=["pre","script","style","textarea"],PP={name:"htmlFlow",tokenize:MP,resolveTo:DP,concrete:!0},AP={tokenize:LP,partial:!0},NP={tokenize:jP,partial:!0};function DP(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 MP(e,t,n){const r=this;let i,a,o,s,u;return l;function l(_){return c(_)}function c(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),f}function f(_){return _===33?(e.consume(_),d):_===47?(e.consume(_),a=!0,m):_===63?(e.consume(_),i=3,r.interrupt?t:x):ln(_)?(e.consume(_),o=String.fromCharCode(_),y):n(_)}function d(_){return _===45?(e.consume(_),i=2,p):_===91?(e.consume(_),i=5,s=0,h):ln(_)?(e.consume(_),i=4,r.interrupt?t:x):n(_)}function p(_){return _===45?(e.consume(_),r.interrupt?t:x):n(_)}function h(_){const J="CDATA[";return _===J.charCodeAt(s++)?(e.consume(_),s===J.length?r.interrupt?t:U:h):n(_)}function m(_){return ln(_)?(e.consume(_),o=String.fromCharCode(_),y):n(_)}function y(_){if(_===null||_===47||_===62||vt(_)){const J=_===47,ne=o.toLowerCase();return!J&&!a&&pb.includes(ne)?(i=1,r.interrupt?t(_):U(_)):RP.includes(o.toLowerCase())?(i=6,J?(e.consume(_),v):r.interrupt?t(_):U(_)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(_):a?g(_):b(_))}return _===45||en(_)?(e.consume(_),o+=String.fromCharCode(_),y):n(_)}function v(_){return _===62?(e.consume(_),r.interrupt?t:U):n(_)}function g(_){return We(_)?(e.consume(_),g):T(_)}function b(_){return _===47?(e.consume(_),T):_===58||_===95||ln(_)?(e.consume(_),k):We(_)?(e.consume(_),b):T(_)}function k(_){return _===45||_===46||_===58||_===95||en(_)?(e.consume(_),k):S(_)}function S(_){return _===61?(e.consume(_),E):We(_)?(e.consume(_),S):b(_)}function E(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),u=_,O):We(_)?(e.consume(_),E):j(_)}function O(_){return _===u?(e.consume(_),u=null,q):_===null||Re(_)?n(_):(e.consume(_),O)}function j(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||vt(_)?S(_):(e.consume(_),j)}function q(_){return _===47||_===62||We(_)?b(_):n(_)}function T(_){return _===62?(e.consume(_),I):n(_)}function I(_){return _===null||Re(_)?U(_):We(_)?(e.consume(_),I):n(_)}function U(_){return _===45&&i===2?(e.consume(_),L):_===60&&i===1?(e.consume(_),W):_===62&&i===4?(e.consume(_),V):_===63&&i===3?(e.consume(_),x):_===93&&i===5?(e.consume(_),A):Re(_)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(AP,K,R)(_)):_===null||Re(_)?(e.exit("htmlFlowData"),R(_)):(e.consume(_),U)}function R(_){return e.check(NP,F,K)(_)}function F(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),N}function N(_){return _===null||Re(_)?R(_):(e.enter("htmlFlowData"),U(_))}function L(_){return _===45?(e.consume(_),x):U(_)}function W(_){return _===47?(e.consume(_),o="",z):U(_)}function z(_){if(_===62){const J=o.toLowerCase();return pb.includes(J)?(e.consume(_),V):U(_)}return ln(_)&&o.length<8?(e.consume(_),o+=String.fromCharCode(_),z):U(_)}function A(_){return _===93?(e.consume(_),x):U(_)}function x(_){return _===62?(e.consume(_),V):_===45&&i===2?(e.consume(_),x):U(_)}function V(_){return _===null||Re(_)?(e.exit("htmlFlowData"),K(_)):(e.consume(_),V)}function K(_){return e.exit("htmlFlow"),t(_)}}function jP(e,t,n){const r=this;return i;function i(o){return Re(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):n(o)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function LP(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ao,t,n)}}const FP={name:"htmlText",tokenize:BP};function BP(e,t,n){const r=this;let i,a,o;return s;function s(x){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(x),u}function u(x){return x===33?(e.consume(x),l):x===47?(e.consume(x),S):x===63?(e.consume(x),b):ln(x)?(e.consume(x),j):n(x)}function l(x){return x===45?(e.consume(x),c):x===91?(e.consume(x),a=0,h):ln(x)?(e.consume(x),g):n(x)}function c(x){return x===45?(e.consume(x),p):n(x)}function f(x){return x===null?n(x):x===45?(e.consume(x),d):Re(x)?(o=f,W(x)):(e.consume(x),f)}function d(x){return x===45?(e.consume(x),p):f(x)}function p(x){return x===62?L(x):x===45?d(x):f(x)}function h(x){const V="CDATA[";return x===V.charCodeAt(a++)?(e.consume(x),a===V.length?m:h):n(x)}function m(x){return x===null?n(x):x===93?(e.consume(x),y):Re(x)?(o=m,W(x)):(e.consume(x),m)}function y(x){return x===93?(e.consume(x),v):m(x)}function v(x){return x===62?L(x):x===93?(e.consume(x),v):m(x)}function g(x){return x===null||x===62?L(x):Re(x)?(o=g,W(x)):(e.consume(x),g)}function b(x){return x===null?n(x):x===63?(e.consume(x),k):Re(x)?(o=b,W(x)):(e.consume(x),b)}function k(x){return x===62?L(x):b(x)}function S(x){return ln(x)?(e.consume(x),E):n(x)}function E(x){return x===45||en(x)?(e.consume(x),E):O(x)}function O(x){return Re(x)?(o=O,W(x)):We(x)?(e.consume(x),O):L(x)}function j(x){return x===45||en(x)?(e.consume(x),j):x===47||x===62||vt(x)?q(x):n(x)}function q(x){return x===47?(e.consume(x),L):x===58||x===95||ln(x)?(e.consume(x),T):Re(x)?(o=q,W(x)):We(x)?(e.consume(x),q):L(x)}function T(x){return x===45||x===46||x===58||x===95||en(x)?(e.consume(x),T):I(x)}function I(x){return x===61?(e.consume(x),U):Re(x)?(o=I,W(x)):We(x)?(e.consume(x),I):q(x)}function U(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),i=x,R):Re(x)?(o=U,W(x)):We(x)?(e.consume(x),U):(e.consume(x),F)}function R(x){return x===i?(e.consume(x),i=void 0,N):x===null?n(x):Re(x)?(o=R,W(x)):(e.consume(x),R)}function F(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===47||x===62||vt(x)?q(x):(e.consume(x),F)}function N(x){return x===47||x===62||vt(x)?q(x):n(x)}function L(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),t):n(x)}function W(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),z}function z(x){return We(x)?Xe(e,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):A(x)}function A(x){return e.enter("htmlTextData"),o(x)}}const Kf={name:"labelEnd",tokenize:WP,resolveTo:HP,resolveAll:VP},UP={tokenize:ZP},zP={tokenize:KP},qP={tokenize:GP};function VP(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 HP(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const u={type:e[a][1].type==="labelLink"?"link":"image",start:Object.assign({},e[a][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"label",start:Object.assign({},e[a][1].start),end:Object.assign({},e[o][1].end)},c={type:"labelText",start:Object.assign({},e[a+r+2][1].end),end:Object.assign({},e[o-2][1].start)};return s=[["enter",u,t],["enter",l,t]],s=Pn(s,e.slice(a+1,a+r+3)),s=Pn(s,[["enter",c,t]]),s=Pn(s,Cl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=Pn(s,[["exit",c,t],e[o-2],e[o-1],["exit",l,t]]),s=Pn(s,e.slice(o+1)),s=Pn(s,[["exit",u,t]]),Rn(e,a,e.length,s),e}function WP(e,t,n){const r=this;let i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(d){return a?a._inactive?f(d):(o=r.parser.defined.includes(qn(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),u):n(d)}function u(d){return d===40?e.attempt(UP,c,o?c:f)(d):d===91?e.attempt(zP,c,o?l:f)(d):o?c(d):f(d)}function l(d){return e.attempt(qP,c,f)(d)}function c(d){return t(d)}function f(d){return a._balanced=!0,n(d)}}function ZP(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return vt(f)?Do(e,a)(f):a(f)}function a(f){return f===41?c(f):cb(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function o(f){return vt(f)?Do(e,u)(f):c(f)}function s(f){return n(f)}function u(f){return f===34||f===39||f===40?db(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function l(f){return vt(f)?Do(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function KP(e,t,n){const r=this;return i;function i(s){return fb.call(r,e,a,o,"reference","referenceMarker","referenceString")(s)}function a(s){return r.parser.defined.includes(qn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function o(s){return n(s)}}function GP(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const YP={name:"labelStartImage",tokenize:JP,resolveAll:Kf.resolveAll};function JP(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),a}function a(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),o):n(s)}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const XP={name:"labelStartLink",tokenize:QP,resolveAll:Kf.resolveAll};function QP(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),a}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const Gf={name:"lineEnding",tokenize:eA};function eA(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Xe(e,t,"linePrefix")}}const $l={name:"thematicBreak",tokenize:tA};function tA(e,t,n){let r=0,i;return a;function a(l){return e.enter("thematicBreak"),o(l)}function o(l){return i=l,s(l)}function s(l){return l===i?(e.enter("thematicBreakSequence"),u(l)):r>=3&&(l===null||Re(l))?(e.exit("thematicBreak"),t(l)):n(l)}function u(l){return l===i?(e.consume(l),r++,u):(e.exit("thematicBreakSequence"),We(l)?Xe(e,s,"whitespace")(l):s(l))}}const pn={name:"list",tokenize:iA,continuation:{tokenize:aA},exit:sA},nA={tokenize:lA,partial:!0},rA={tokenize:oA,partial:!0};function iA(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(p){const h=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Hf(p)){if(r.containerState.type||(r.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check($l,n,l)(p):l(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(p)}return n(p)}function u(p){return Hf(p)&&++o<10?(e.consume(p),u):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),l(p)):n(p)}function l(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Ao,r.interrupt?n:c,e.attempt(nA,d,f))}function c(p){return r.containerState.initialBlankLine=!0,a++,d(p)}function f(p){return We(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),d):n(p)}function d(p){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function aA(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ao,i,a);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Xe(e,t,"listItemIndent",r.containerState.size+1)(s)}function a(s){return r.containerState.furtherBlankLines||!We(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(rA,t,o)(s))}function o(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,Xe(e,e.attempt(pn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function oA(e,t,n){const r=this;return Xe(e,i,"listItemIndent",r.containerState.size+1);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(a):n(a)}}function sA(e){e.exit(this.containerState.type)}function lA(e,t,n){const r=this;return Xe(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const o=r.events[r.events.length-1];return!We(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const hb={name:"setextUnderline",tokenize:cA,resolveTo:uA};function uA(e,t){let n=e.length,r,i,a;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),!a&&e[n][1].type==="definition"&&(a=n);const o={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",o,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[a][1].end)):e[r][1]=o,e.push(["exit",o,t]),e}function cA(e,t,n){const r=this;let i;return a;function a(l){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=l,o(l)):n(l)}function o(l){return e.enter("setextHeadingLineSequence"),s(l)}function s(l){return l===i?(e.consume(l),s):(e.exit("setextHeadingLineSequence"),We(l)?Xe(e,u,"lineSuffix")(l):u(l))}function u(l){return l===null||Re(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const fA={tokenize:dA};function dA(e){const t=this,n=e.attempt(Ao,r,e.attempt(this.parser.constructs.flowInitial,i,Xe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(yP,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const pA={resolveAll:vb()},hA=mb("string"),mA=mb("text");function mb(e){return{tokenize:t,resolveAll:vb(e==="text"?vA:void 0)};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,o,s);return o;function o(c){return l(c)?a(c):s(c)}function s(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),u}function u(c){return l(c)?(n.exit("data"),a(c)):(n.consume(c),u)}function l(c){if(c===null)return!0;const f=i[c];let d=-1;if(f)for(;++d<f.length;){const p=f[d];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function vb(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function vA(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 a=i.length,o=-1,s=0,u;for(;a--;){const l=i[a];if(typeof l=="string"){for(o=l.length;l.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(l===-2)u=!0,s++;else if(l!==-1){a++;break}}if(s){const l={type:n===e.length||u||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+a,_bufferIndex:a?o:r.start._bufferIndex+o},end:Object.assign({},r.end)};r.end=Object.assign({},l.start),r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}function yA(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},a=[];let o=[],s=[];const u={consume:g,enter:b,exit:k,attempt:O(S),check:O(E),interrupt:O(E,{interrupt:!0})},l={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:p,sliceSerialize:d,now:h,defineSkip:m,write:f};let c=t.tokenize.call(l,u);return t.resolveAll&&a.push(t),l;function f(I){return o=Pn(o,I),y(),o[o.length-1]!==null?[]:(j(t,0),l.events=Cl(a,l.events,l),l.events)}function d(I,U){return bA(p(I),U)}function p(I){return gA(o,I)}function h(){const{line:I,column:U,offset:R,_index:F,_bufferIndex:N}=r;return{line:I,column:U,offset:R,_index:F,_bufferIndex:N}}function m(I){i[I.line]=I.column,T()}function y(){let I;for(;r._index<o.length;){const U=o[r._index];if(typeof U=="string")for(I=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===I&&r._bufferIndex<U.length;)v(U.charCodeAt(r._bufferIndex));else v(U)}}function v(I){c=c(I)}function g(I){Re(I)?(r.line++,r.column=1,r.offset+=I===-3?2:1,T()):I!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=I}function b(I,U){const R=U||{};return R.type=I,R.start=h(),l.events.push(["enter",R,l]),s.push(R),R}function k(I){const U=s.pop();return U.end=h(),l.events.push(["exit",U,l]),U}function S(I,U){j(I,U.from)}function E(I,U){U.restore()}function O(I,U){return R;function R(F,N,L){let W,z,A,x;return Array.isArray(F)?K(F):"tokenize"in F?K([F]):V(F);function V(re){return le;function le(pe){const he=pe!==null&&re[pe],ue=pe!==null&&re.null,Q=[...Array.isArray(he)?he:he?[he]:[],...Array.isArray(ue)?ue:ue?[ue]:[]];return K(Q)(pe)}}function K(re){return W=re,z=0,re.length===0?L:_(re[z])}function _(re){return le;function le(pe){return x=q(),A=re,re.partial||(l.currentConstruct=re),re.name&&l.parser.constructs.disable.null.includes(re.name)?ne():re.tokenize.call(U?Object.assign(Object.create(l),U):l,u,J,ne)(pe)}}function J(re){return I(A,x),N}function ne(re){return x.restore(),++z<W.length?_(W[z]):L}}}function j(I,U){I.resolveAll&&!a.includes(I)&&a.push(I),I.resolve&&Rn(l.events,U,l.events.length-U,I.resolve(l.events.slice(U),l)),I.resolveTo&&(l.events=I.resolveTo(l.events,l))}function q(){const I=h(),U=l.previous,R=l.currentConstruct,F=l.events.length,N=Array.from(s);return{restore:L,from:F};function L(){r=I,l.previous=U,l.currentConstruct=R,l.events.length=F,s=N,T()}}function T(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function gA(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){const s=o[0];typeof s=="string"?o[0]=s.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function bA(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let o;if(typeof a=="string")o=a;else switch(a){case-5:{o="\r";break}case-4:{o=`
|
|
32
32
|
`;break}case-3:{o=`\r
|
|
33
|
-
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join("")}const mA=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:yP},disable:{null:[]},document:{42:hn,43:hn,45:hn,48:hn,49:hn,50:hn,51:hn,52:hn,53:hn,54:hn,55:hn,56:hn,57:hn,62:nb},flow:{35:_P,42:$l,45:[db,$l],60:OP,61:db,95:$l,96:ob,126:ob},flowInitial:{[-2]:Zf,[-1]:Zf,32:Zf},insideSpan:{null:[Wf,lA]},string:{38:ib,92:rb},text:{[-5]:Gf,[-4]:Gf,[-3]:Gf,33:HP,38:ib,42:Wf,60:[ZR,NP],91:ZP,92:[wP,rb],93:Kf,95:Wf,96:oP}},Symbol.toStringTag,{value:"Module"}));function vA(e){const n=Xg([mA,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(BR),document:i(zR),flow:i(oA),string:i(uA),text:i(cA)};return r;function i(a){return o;function o(s){return dA(r,a,s)}}}function yA(e){for(;!sb(e););return e}const mb=/[\0\t\n\r]/g;function gA(){let e=1,t="",n=!0,r;return i;function i(a,o,s){const u=[];let l,c,f,d,p;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a)),f=0,t="",n&&(a.charCodeAt(0)===65279&&f++,n=void 0);f<a.length;){if(mb.lastIndex=f,l=mb.exec(a),d=l&&l.index!==void 0?l.index:a.length,p=a.charCodeAt(d),!l){t=a.slice(f);break}if(p===10&&f===d&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),f<d&&(u.push(a.slice(f,d)),e+=d-f),p){case 0:{u.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,u.push(-2);e++<c;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}f=d+1}return s&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const bA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function xA(e){return e.replace(bA,wA)}function wA(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return Qg(n.slice(a?2:1),a?16:10)}return Vf(n)||e}const vb={}.hasOwnProperty;function SA(e,t,n){return typeof t!="string"&&(n=t,t=void 0),_A(n)(yA(vA(n).document().write(gA()(e,t,!0))))}function _A(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(ee),autolinkProtocol:D,autolinkEmail:D,atxHeading:a($e),blockQuote:a(ue),characterEscape:D,characterReference:D,codeFenced:a(Q),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(Q,o),codeText:a(Z,o),codeTextData:D,data:D,codeFlowValue:D,definition:a(de),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(ve),hardBreakEscape:a(R),hardBreakTrailing:a(R),htmlFlow:a(J,o),htmlFlowData:D,htmlText:a(J,o),htmlTextData:D,image:a(ae),label:o,link:a(ee),listItem:a(Se),listItemValue:d,listOrdered:a(ke,f),listUnordered:a(ke),paragraph:a(Pe),reference:_,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a($e),strong:a(He),thematicBreak:a(Fe)},exit:{atxHeading:u(),atxHeadingSequence:S,autolink:u(),autolinkEmail:he,autolinkProtocol:pe,blockQuote:u(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:oe,characterReferenceMarkerNumeric:oe,characterReferenceValue:ne,characterReference:le,codeFenced:u(y),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:T,codeIndented:u(v),codeText:u(M),codeTextData:T,data:T,definition:u(),definitionDestinationString:k,definitionLabelString:g,definitionTitleString:b,emphasis:u(),hardBreakEscape:u(V),hardBreakTrailing:u(V),htmlFlow:u($),htmlFlowData:T,htmlText:u(F),htmlTextData:T,image:u(W),label:N,labelText:U,lineEnding:P,link:u(B),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:Y,resourceDestinationString:x,resourceTitleString:q,resource:K,setextHeading:u(L),setextHeadingLineSequence:O,setextHeadingText:E,strong:u(),thematicBreak:u()}};yb(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(z){let A={type:"root",children:[]};const X={stack:[A],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:c,data:n},ce=[];let Ee=-1;for(;++Ee<z.length;)if(z[Ee][1].type==="listOrdered"||z[Ee][1].type==="listUnordered")if(z[Ee][0]==="enter")ce.push(Ee);else{const Oe=ce.pop();Ee=i(z,Oe,Ee)}for(Ee=-1;++Ee<z.length;){const Oe=t[z[Ee][0]];vb.call(Oe,z[Ee][1].type)&&Oe[z[Ee][1].type].call(Object.assign({sliceSerialize:z[Ee][2].sliceSerialize},X),z[Ee][1])}if(X.tokenStack.length>0){const Oe=X.tokenStack[X.tokenStack.length-1];(Oe[1]||gb).call(X,void 0,Oe[0])}for(A.position={start:Xr(z.length>0?z[0][1].start:{line:1,column:1,offset:0}),end:Xr(z.length>0?z[z.length-2][1].end:{line:1,column:1,offset:0})},Ee=-1;++Ee<t.transforms.length;)A=t.transforms[Ee](A)||A;return A}function i(z,A,X){let ce=A-1,Ee=-1,Oe=!1,Je,lt,Ut,Ot;for(;++ce<=X;){const Ze=z[ce];switch(Ze[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ze[0]==="enter"?Ee++:Ee--,Ot=void 0;break}case"lineEndingBlank":{Ze[0]==="enter"&&(Je&&!Ot&&!Ee&&!Ut&&(Ut=ce),Ot=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ot=void 0}if(!Ee&&Ze[0]==="enter"&&Ze[1].type==="listItemPrefix"||Ee===-1&&Ze[0]==="exit"&&(Ze[1].type==="listUnordered"||Ze[1].type==="listOrdered")){if(Je){let Ct=ce;for(lt=void 0;Ct--;){const tt=z[Ct];if(tt[1].type==="lineEnding"||tt[1].type==="lineEndingBlank"){if(tt[0]==="exit")continue;lt&&(z[lt][1].type="lineEndingBlank",Oe=!0),tt[1].type="lineEnding",lt=Ct}else if(!(tt[1].type==="linePrefix"||tt[1].type==="blockQuotePrefix"||tt[1].type==="blockQuotePrefixWhitespace"||tt[1].type==="blockQuoteMarker"||tt[1].type==="listItemIndent"))break}Ut&&(!lt||Ut<lt)&&(Je._spread=!0),Je.end=Object.assign({},lt?z[lt][1].start:Ze[1].end),z.splice(lt||ce,0,["exit",Je,Ze[2]]),ce++,X++}if(Ze[1].type==="listItemPrefix"){const Ct={type:"listItem",_spread:!1,start:Object.assign({},Ze[1].start),end:void 0};Je=Ct,z.splice(ce,0,["enter",Ct,Ze[2]]),ce++,X++,Ut=void 0,Ot=!0}}}return z[A][1]._spread=Oe,X}function a(z,A){return X;function X(ce){s.call(this,z(ce),ce),A&&A.call(this,ce)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(z,A,X){this.stack[this.stack.length-1].children.push(z),this.stack.push(z),this.tokenStack.push([A,X]),z.position={start:Xr(A.start),end:void 0}}function u(z){return A;function A(X){z&&z.call(this,X),l.call(this,X)}}function l(z,A){const X=this.stack.pop(),ce=this.tokenStack.pop();if(ce)ce[0].type!==z.type&&(A?A.call(this,z,ce[0]):(ce[1]||gb).call(this,z,ce[0]));else throw new Error("Cannot close `"+z.type+"` ("+Ro({start:z.start,end:z.end})+"): it’s not open");X.position.end=Xr(z.end)}function c(){return qf(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function d(z){if(this.data.expectingFirstListItemValue){const A=this.stack[this.stack.length-2];A.start=Number.parseInt(this.sliceSerialize(z),10),this.data.expectingFirstListItemValue=void 0}}function p(){const z=this.resume(),A=this.stack[this.stack.length-1];A.lang=z}function m(){const z=this.resume(),A=this.stack[this.stack.length-1];A.meta=z}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const z=this.resume(),A=this.stack[this.stack.length-1];A.value=z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const z=this.resume(),A=this.stack[this.stack.length-1];A.value=z.replace(/(\r?\n|\r)$/g,"")}function g(z){const A=this.resume(),X=this.stack[this.stack.length-1];X.label=A,X.identifier=Vn(this.sliceSerialize(z)).toLowerCase()}function b(){const z=this.resume(),A=this.stack[this.stack.length-1];A.title=z}function k(){const z=this.resume(),A=this.stack[this.stack.length-1];A.url=z}function S(z){const A=this.stack[this.stack.length-1];if(!A.depth){const X=this.sliceSerialize(z).length;A.depth=X}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function O(z){const A=this.stack[this.stack.length-1];A.depth=this.sliceSerialize(z).codePointAt(0)===61?1:2}function L(){this.data.setextHeadingSlurpLineEnding=void 0}function D(z){const X=this.stack[this.stack.length-1].children;let ce=X[X.length-1];(!ce||ce.type!=="text")&&(ce=Ae(),ce.position={start:Xr(z.start),end:void 0},X.push(ce)),this.stack.push(ce)}function T(z){const A=this.stack.pop();A.value+=this.sliceSerialize(z),A.position.end=Xr(z.end)}function P(z){const A=this.stack[this.stack.length-1];if(this.data.atHardBreak){const X=A.children[A.children.length-1];X.position.end=Xr(z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(A.type)&&(D.call(this,z),T.call(this,z))}function V(){this.data.atHardBreak=!0}function $(){const z=this.resume(),A=this.stack[this.stack.length-1];A.value=z}function F(){const z=this.resume(),A=this.stack[this.stack.length-1];A.value=z}function M(){const z=this.resume(),A=this.stack[this.stack.length-1];A.value=z}function B(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const A=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=A,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function W(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const A=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=A,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function U(z){const A=this.sliceSerialize(z),X=this.stack[this.stack.length-2];X.label=xA(A),X.identifier=Vn(A).toLowerCase()}function N(){const z=this.stack[this.stack.length-1],A=this.resume(),X=this.stack[this.stack.length-1];if(this.data.inReference=!0,X.type==="link"){const ce=z.children;X.children=ce}else X.alt=A}function x(){const z=this.resume(),A=this.stack[this.stack.length-1];A.url=z}function q(){const z=this.resume(),A=this.stack[this.stack.length-1];A.title=z}function K(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function Y(z){const A=this.resume(),X=this.stack[this.stack.length-1];X.label=A,X.identifier=Vn(this.sliceSerialize(z)).toLowerCase(),this.data.referenceType="full"}function oe(z){this.data.characterReferenceType=z.type}function ne(z){const A=this.sliceSerialize(z),X=this.data.characterReferenceType;let ce;X?(ce=Qg(A,X==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ce=Vf(A);const Ee=this.stack[this.stack.length-1];Ee.value+=ce}function le(z){const A=this.stack.pop();A.position.end=Xr(z.end)}function pe(z){T.call(this,z);const A=this.stack[this.stack.length-1];A.url=this.sliceSerialize(z)}function he(z){T.call(this,z);const A=this.stack[this.stack.length-1];A.url="mailto:"+this.sliceSerialize(z)}function ue(){return{type:"blockquote",children:[]}}function Q(){return{type:"code",lang:null,meta:null,value:""}}function Z(){return{type:"inlineCode",value:""}}function de(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ve(){return{type:"emphasis",children:[]}}function $e(){return{type:"heading",depth:0,children:[]}}function R(){return{type:"break"}}function J(){return{type:"html",value:""}}function ae(){return{type:"image",title:null,url:"",alt:null}}function ee(){return{type:"link",title:null,url:"",children:[]}}function ke(z){return{type:"list",ordered:z.type==="listOrdered",start:null,spread:z._spread,children:[]}}function Se(z){return{type:"listItem",spread:z._spread,checked:null,children:[]}}function Pe(){return{type:"paragraph",children:[]}}function He(){return{type:"strong",children:[]}}function Ae(){return{type:"text",value:""}}function Fe(){return{type:"thematicBreak"}}}function Xr(e){return{line:e.line,column:e.column,offset:e.offset}}function yb(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?yb(e,r):EA(e,r)}}function EA(e,t){let n;for(n in t)if(vb.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 gb(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ro({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ro({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ro({start:t.start,end:t.end})+") is still open")}function kA(e){const t=this;t.parser=n;function n(r){return SA(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function TA(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 OA(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
34
|
-
`}]}function
|
|
35
|
-
`:"",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
|
|
33
|
+
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join("")}const xA=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:SP},disable:{null:[]},document:{42:pn,43:pn,45:pn,48:pn,49:pn,50:pn,51:pn,52:pn,53:pn,54:pn,55:pn,56:pn,57:pn,62:ib},flow:{35:CP,42:$l,45:[hb,$l],60:PP,61:hb,95:$l,96:lb,126:lb},flowInitial:{[-2]:Zf,[-1]:Zf,32:Zf},insideSpan:{null:[Wf,pA]},string:{38:ob,92:ab},text:{[-5]:Gf,[-4]:Gf,[-3]:Gf,33:YP,38:ob,42:Wf,60:[XR,FP],91:XP,92:[TP,ab],93:Kf,95:Wf,96:fP}},Symbol.toStringTag,{value:"Module"}));function wA(e){const n=eb([xA,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(HR),document:i(ZR),flow:i(fA),string:i(hA),text:i(mA)};return r;function i(a){return o;function o(s){return yA(r,a,s)}}}function SA(e){for(;!ub(e););return e}const yb=/[\0\t\n\r]/g;function _A(){let e=1,t="",n=!0,r;return i;function i(a,o,s){const u=[];let l,c,f,d,p;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a)),f=0,t="",n&&(a.charCodeAt(0)===65279&&f++,n=void 0);f<a.length;){if(yb.lastIndex=f,l=yb.exec(a),d=l&&l.index!==void 0?l.index:a.length,p=a.charCodeAt(d),!l){t=a.slice(f);break}if(p===10&&f===d&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),f<d&&(u.push(a.slice(f,d)),e+=d-f),p){case 0:{u.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,u.push(-2);e++<c;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}f=d+1}return s&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const EA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function kA(e){return e.replace(EA,TA)}function TA(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return tb(n.slice(a?2:1),a?16:10)}return Vf(n)||e}const gb={}.hasOwnProperty;function OA(e,t,n){return typeof t!="string"&&(n=t,t=void 0),CA(n)(SA(wA(n).document().write(_A()(e,t,!0))))}function CA(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(ee),autolinkProtocol:q,autolinkEmail:q,atxHeading:a($e),blockQuote:a(ue),characterEscape:q,characterReference:q,codeFenced:a(Q),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(Q,o),codeText:a(Z,o),codeTextData:q,data:q,codeFlowValue:q,definition:a(de),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(ve),hardBreakEscape:a(P),hardBreakTrailing:a(P),htmlFlow:a(Y,o),htmlFlowData:q,htmlText:a(Y,o),htmlTextData:q,image:a(oe),label:o,link:a(ee),listItem:a(Se),listItemValue:d,listOrdered:a(ke,f),listUnordered:a(ke),paragraph:a(Pe),reference:_,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a($e),strong:a(He),thematicBreak:a(Fe)},exit:{atxHeading:u(),atxHeadingSequence:S,autolink:u(),autolinkEmail:he,autolinkProtocol:pe,blockQuote:u(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:ne,characterReferenceMarkerNumeric:ne,characterReferenceValue:re,characterReference:le,codeFenced:u(y),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:T,codeIndented:u(v),codeText:u(N),codeTextData:T,data:T,definition:u(),definitionDestinationString:k,definitionLabelString:g,definitionTitleString:b,emphasis:u(),hardBreakEscape:u(U),hardBreakTrailing:u(U),htmlFlow:u(R),htmlFlowData:T,htmlText:u(F),htmlTextData:T,image:u(W),label:A,labelText:z,lineEnding:I,link:u(L),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:J,resourceDestinationString:x,resourceTitleString:V,resource:K,setextHeading:u(j),setextHeadingLineSequence:O,setextHeadingText:E,strong:u(),thematicBreak:u()}};bb(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(B){let D={type:"root",children:[]};const X={stack:[D],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:c,data:n},ce=[];let Ee=-1;for(;++Ee<B.length;)if(B[Ee][1].type==="listOrdered"||B[Ee][1].type==="listUnordered")if(B[Ee][0]==="enter")ce.push(Ee);else{const Oe=ce.pop();Ee=i(B,Oe,Ee)}for(Ee=-1;++Ee<B.length;){const Oe=t[B[Ee][0]];gb.call(Oe,B[Ee][1].type)&&Oe[B[Ee][1].type].call(Object.assign({sliceSerialize:B[Ee][2].sliceSerialize},X),B[Ee][1])}if(X.tokenStack.length>0){const Oe=X.tokenStack[X.tokenStack.length-1];(Oe[1]||xb).call(X,void 0,Oe[0])}for(D.position={start:Jr(B.length>0?B[0][1].start:{line:1,column:1,offset:0}),end:Jr(B.length>0?B[B.length-2][1].end:{line:1,column:1,offset:0})},Ee=-1;++Ee<t.transforms.length;)D=t.transforms[Ee](D)||D;return D}function i(B,D,X){let ce=D-1,Ee=-1,Oe=!1,Je,lt,Ut,Ot;for(;++ce<=X;){const Ze=B[ce];switch(Ze[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ze[0]==="enter"?Ee++:Ee--,Ot=void 0;break}case"lineEndingBlank":{Ze[0]==="enter"&&(Je&&!Ot&&!Ee&&!Ut&&(Ut=ce),Ot=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ot=void 0}if(!Ee&&Ze[0]==="enter"&&Ze[1].type==="listItemPrefix"||Ee===-1&&Ze[0]==="exit"&&(Ze[1].type==="listUnordered"||Ze[1].type==="listOrdered")){if(Je){let Ct=ce;for(lt=void 0;Ct--;){const tt=B[Ct];if(tt[1].type==="lineEnding"||tt[1].type==="lineEndingBlank"){if(tt[0]==="exit")continue;lt&&(B[lt][1].type="lineEndingBlank",Oe=!0),tt[1].type="lineEnding",lt=Ct}else if(!(tt[1].type==="linePrefix"||tt[1].type==="blockQuotePrefix"||tt[1].type==="blockQuotePrefixWhitespace"||tt[1].type==="blockQuoteMarker"||tt[1].type==="listItemIndent"))break}Ut&&(!lt||Ut<lt)&&(Je._spread=!0),Je.end=Object.assign({},lt?B[lt][1].start:Ze[1].end),B.splice(lt||ce,0,["exit",Je,Ze[2]]),ce++,X++}if(Ze[1].type==="listItemPrefix"){const Ct={type:"listItem",_spread:!1,start:Object.assign({},Ze[1].start),end:void 0};Je=Ct,B.splice(ce,0,["enter",Ct,Ze[2]]),ce++,X++,Ut=void 0,Ot=!0}}}return B[D][1]._spread=Oe,X}function a(B,D){return X;function X(ce){s.call(this,B(ce),ce),D&&D.call(this,ce)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(B,D,X){this.stack[this.stack.length-1].children.push(B),this.stack.push(B),this.tokenStack.push([D,X]),B.position={start:Jr(D.start),end:void 0}}function u(B){return D;function D(X){B&&B.call(this,X),l.call(this,X)}}function l(B,D){const X=this.stack.pop(),ce=this.tokenStack.pop();if(ce)ce[0].type!==B.type&&(D?D.call(this,B,ce[0]):(ce[1]||xb).call(this,B,ce[0]));else throw new Error("Cannot close `"+B.type+"` ("+Ro({start:B.start,end:B.end})+"): it’s not open");X.position.end=Jr(B.end)}function c(){return qf(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function d(B){if(this.data.expectingFirstListItemValue){const D=this.stack[this.stack.length-2];D.start=Number.parseInt(this.sliceSerialize(B),10),this.data.expectingFirstListItemValue=void 0}}function p(){const B=this.resume(),D=this.stack[this.stack.length-1];D.lang=B}function h(){const B=this.resume(),D=this.stack[this.stack.length-1];D.meta=B}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const B=this.resume(),D=this.stack[this.stack.length-1];D.value=B.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const B=this.resume(),D=this.stack[this.stack.length-1];D.value=B.replace(/(\r?\n|\r)$/g,"")}function g(B){const D=this.resume(),X=this.stack[this.stack.length-1];X.label=D,X.identifier=qn(this.sliceSerialize(B)).toLowerCase()}function b(){const B=this.resume(),D=this.stack[this.stack.length-1];D.title=B}function k(){const B=this.resume(),D=this.stack[this.stack.length-1];D.url=B}function S(B){const D=this.stack[this.stack.length-1];if(!D.depth){const X=this.sliceSerialize(B).length;D.depth=X}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function O(B){const D=this.stack[this.stack.length-1];D.depth=this.sliceSerialize(B).codePointAt(0)===61?1:2}function j(){this.data.setextHeadingSlurpLineEnding=void 0}function q(B){const X=this.stack[this.stack.length-1].children;let ce=X[X.length-1];(!ce||ce.type!=="text")&&(ce=Ae(),ce.position={start:Jr(B.start),end:void 0},X.push(ce)),this.stack.push(ce)}function T(B){const D=this.stack.pop();D.value+=this.sliceSerialize(B),D.position.end=Jr(B.end)}function I(B){const D=this.stack[this.stack.length-1];if(this.data.atHardBreak){const X=D.children[D.children.length-1];X.position.end=Jr(B.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(D.type)&&(q.call(this,B),T.call(this,B))}function U(){this.data.atHardBreak=!0}function R(){const B=this.resume(),D=this.stack[this.stack.length-1];D.value=B}function F(){const B=this.resume(),D=this.stack[this.stack.length-1];D.value=B}function N(){const B=this.resume(),D=this.stack[this.stack.length-1];D.value=B}function L(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const D=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=D,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function W(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const D=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=D,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function z(B){const D=this.sliceSerialize(B),X=this.stack[this.stack.length-2];X.label=kA(D),X.identifier=qn(D).toLowerCase()}function A(){const B=this.stack[this.stack.length-1],D=this.resume(),X=this.stack[this.stack.length-1];if(this.data.inReference=!0,X.type==="link"){const ce=B.children;X.children=ce}else X.alt=D}function x(){const B=this.resume(),D=this.stack[this.stack.length-1];D.url=B}function V(){const B=this.resume(),D=this.stack[this.stack.length-1];D.title=B}function K(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function J(B){const D=this.resume(),X=this.stack[this.stack.length-1];X.label=D,X.identifier=qn(this.sliceSerialize(B)).toLowerCase(),this.data.referenceType="full"}function ne(B){this.data.characterReferenceType=B.type}function re(B){const D=this.sliceSerialize(B),X=this.data.characterReferenceType;let ce;X?(ce=tb(D,X==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ce=Vf(D);const Ee=this.stack[this.stack.length-1];Ee.value+=ce}function le(B){const D=this.stack.pop();D.position.end=Jr(B.end)}function pe(B){T.call(this,B);const D=this.stack[this.stack.length-1];D.url=this.sliceSerialize(B)}function he(B){T.call(this,B);const D=this.stack[this.stack.length-1];D.url="mailto:"+this.sliceSerialize(B)}function ue(){return{type:"blockquote",children:[]}}function Q(){return{type:"code",lang:null,meta:null,value:""}}function Z(){return{type:"inlineCode",value:""}}function de(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ve(){return{type:"emphasis",children:[]}}function $e(){return{type:"heading",depth:0,children:[]}}function P(){return{type:"break"}}function Y(){return{type:"html",value:""}}function oe(){return{type:"image",title:null,url:"",alt:null}}function ee(){return{type:"link",title:null,url:"",children:[]}}function ke(B){return{type:"list",ordered:B.type==="listOrdered",start:null,spread:B._spread,children:[]}}function Se(B){return{type:"listItem",spread:B._spread,checked:null,children:[]}}function Pe(){return{type:"paragraph",children:[]}}function He(){return{type:"strong",children:[]}}function Ae(){return{type:"text",value:""}}function Fe(){return{type:"thematicBreak"}}}function Jr(e){return{line:e.line,column:e.column,offset:e.offset}}function bb(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?bb(e,r):$A(e,r)}}function $A(e,t){let n;for(n in t)if(gb.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 xb(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ro({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ro({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ro({start:t.start,end:t.end})+") is still open")}function IA(e){const t=this;t.parser=n;function n(r){return OA(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function RA(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 PA(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
34
|
+
`}]}function AA(e,t){const n=t.value?t.value+`
|
|
35
|
+
`:"",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 NA(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function DA(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function MA(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=sa(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);const u={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(o)}]};e.patch(t,u);const l={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,l),e.applyData(t,l)}function jA(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 LA(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function wb(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),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function FA(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return wb(e,t);const i={src:sa(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function BA(e,t){const n={src:sa(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 UA(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 zA(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return wb(e,t);const i={href:sa(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function qA(e,t){const n={href:sa(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 VA(e,t,n){const r=e.all(t),i=n?HA(n):Sb(t),a={},o=[];if(typeof t.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const c=r[s];(i||s!==0||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
|
|
36
36
|
`}),c.type==="element"&&c.tagName==="p"&&!i?o.push(...c.children):o.push(c)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&o.push({type:"text",value:`
|
|
37
|
-
`});const l={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function
|
|
37
|
+
`});const l={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function HA(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Sb(n[r])}return t}function Sb(e){const t=e.spread;return t??e.children.length>1}function WA(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function ZA(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function KA(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function GA(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function YA(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=jf(t.children[1]),u=zg(t.children[t.children.length-1]);s&&u&&(o.position={start:s,end:u}),i.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function JA(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,s=o?o.length:t.children.length;let u=-1;const l=[];for(;++u<s;){const f=t.children[u],d={},p=o?o[u]:void 0;p&&(d.align=p);let h={type:"element",tagName:a,properties:d,children:[]};f&&(h.children=e.all(f),e.patch(f,h),h=e.applyData(f,h)),l.push(h)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)}function XA(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const _b=9,Eb=32;function QA(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(kb(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(kb(t.slice(i),i>0,!1)),a.join("")}function kb(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===_b||a===Eb;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===_b||a===Eb;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function eN(e,t){const n={type:"text",value:QA(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function tN(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const nN={blockquote:RA,break:PA,code:AA,delete:NA,emphasis:DA,footnoteReference:MA,heading:jA,html:LA,imageReference:FA,image:BA,inlineCode:UA,linkReference:zA,link:qA,listItem:VA,list:WA,paragraph:ZA,root:KA,strong:GA,table:YA,tableCell:XA,tableRow:JA,text:eN,thematicBreak:tN,toml:Il,yaml:Il,definition:Il,footnoteDefinition:Il};function Il(){}const Tb=-1,Rl=0,Pl=1,Al=2,Yf=3,Jf=4,Xf=5,Qf=6,Ob=7,Cb=8,$b=typeof self=="object"?self:globalThis,rN=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case Rl:case Tb:return n(o,i);case Pl:{const s=n([],i);for(const u of o)s.push(r(u));return s}case Al:{const s=n({},i);for(const[u,l]of o)s[r(u)]=r(l);return s}case Yf:return n(new Date(o),i);case Jf:{const{source:s,flags:u}=o;return n(new RegExp(s,u),i)}case Xf:{const s=n(new Map,i);for(const[u,l]of o)s.set(r(u),r(l));return s}case Qf:{const s=n(new Set,i);for(const u of o)s.add(r(u));return s}case Ob:{const{name:s,message:u}=o;return n(new $b[s](u),i)}case Cb:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i)}return n(new $b[a](o),i)};return r},Ib=e=>rN(new Map,e)(0),la="",{toString:iN}={},{keys:aN}=Object,Mo=e=>{const t=typeof e;if(t!=="object"||!e)return[Rl,t];const n=iN.call(e).slice(8,-1);switch(n){case"Array":return[Pl,la];case"Object":return[Al,la];case"Date":return[Yf,la];case"RegExp":return[Jf,la];case"Map":return[Xf,la];case"Set":return[Qf,la]}return n.includes("Array")?[Pl,n]:n.includes("Error")?[Ob,n]:[Al,n]},Nl=([e,t])=>e===Rl&&(t==="function"||t==="symbol"),oN=(e,t,n,r)=>{const i=(o,s)=>{const u=r.push(o)-1;return n.set(s,u),u},a=o=>{if(n.has(o))return n.get(o);let[s,u]=Mo(o);switch(s){case Rl:{let c=o;switch(u){case"bigint":s=Cb,c=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);c=null;break;case"undefined":return i([Tb],o)}return i([s,c],o)}case Pl:{if(u)return i([u,[...o]],o);const c=[],f=i([s,c],o);for(const d of o)c.push(a(d));return f}case Al:{if(u)switch(u){case"BigInt":return i([u,o.toString()],o);case"Boolean":case"Number":case"String":return i([u,o.valueOf()],o)}if(t&&"toJSON"in o)return a(o.toJSON());const c=[],f=i([s,c],o);for(const d of aN(o))(e||!Nl(Mo(o[d])))&&c.push([a(d),a(o[d])]);return f}case Yf:return i([s,o.toISOString()],o);case Jf:{const{source:c,flags:f}=o;return i([s,{source:c,flags:f}],o)}case Xf:{const c=[],f=i([s,c],o);for(const[d,p]of o)(e||!(Nl(Mo(d))||Nl(Mo(p))))&&c.push([a(d),a(p)]);return f}case Qf:{const c=[],f=i([s,c],o);for(const d of o)(e||!Nl(Mo(d)))&&c.push(a(d));return f}}const{message:l}=o;return i([s,{name:u,message:l}],o)};return a},Rb=(e,{json:t,lossy:n}={})=>{const r=[];return oN(!(t||n),!!t,new Map,r)(e),r},Dl=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Ib(Rb(e,t)):structuredClone(e):(e,t)=>Ib(Rb(e,t));function sN(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function lN(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function uN(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||sN,r=e.options.footnoteBackLabel||lN,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let u=-1;for(;++u<e.footnoteOrder.length;){const l=e.footnoteById.get(e.footnoteOrder[u]);if(!l)continue;const c=e.all(l),f=String(l.identifier).toUpperCase(),d=sa(f.toLowerCase());let p=0;const h=[],m=e.footnoteCounts.get(f);for(;m!==void 0&&++p<=m;){h.length>0&&h.push({type:"text",value:" "});let g=typeof n=="string"?n:n(u,p);typeof g=="string"&&(g={type:"text",value:g}),h.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+d+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,p),className:["data-footnote-backref"]},children:Array.isArray(g)?g:[g]})}const y=c[c.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const g=y.children[y.children.length-1];g&&g.type==="text"?g.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...h)}else c.push(...h);const v={type:"element",tagName:"li",properties:{id:t+"fn-"+d},children:e.wrap(c,!0)};e.patch(l,v),s.push(v)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Dl(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
38
38
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
|
|
39
|
-
`}]}}const Ml=function(e){if(e==null)return
|
|
39
|
+
`}]}}const Ml=function(e){if(e==null)return pN;if(typeof e=="function")return jl(e);if(typeof e=="object")return Array.isArray(e)?cN(e):fN(e);if(typeof e=="string")return dN(e);throw new Error("Expected function, string, or object as test")};function cN(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ml(e[n]);return jl(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function fN(e){const t=e;return jl(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function dN(e){return jl(t);function t(n){return n&&n.type===e}}function jl(e){return t;function t(n,r,i){return!!(hN(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function pN(){return!0}function hN(e){return e!==null&&typeof e=="object"&&"type"in e}function hle(e){return e}const Pb=[],mN=!0,ed=!1,vN="skip";function Ab(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=Ml(i),o=r?-1:1;s(e,void 0,[])();function s(u,l,c){const f=u&&typeof u=="object"?u:{};if(typeof f.type=="string"){const p=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(d,"name",{value:"node ("+(u.type+(p?"<"+p+">":""))+")"})}return d;function d(){let p=Pb,h,m,y;if((!t||a(u,l,c[c.length-1]||void 0))&&(p=yN(n(u,c)),p[0]===ed))return p;if("children"in u&&u.children){const v=u;if(v.children&&p[0]!==vN)for(m=(r?v.children.length:-1)+o,y=c.concat(v);m>-1&&m<v.children.length;){const g=v.children[m];if(h=s(g,m,y)(),h[0]===ed)return h;m=typeof h[1]=="number"?h[1]:m+o}}return p}}}function yN(e){return Array.isArray(e)?e:typeof e=="number"?[mN,e]:e==null?Pb:[e]}function td(e,t,n,r){let i,a,o;typeof t=="function"&&typeof n!="function"?(a=void 0,o=t,i=n):(a=t,o=n,i=r),Ab(e,a,s,i);function s(u,l){const c=l[l.length-1],f=c?c.children.indexOf(u):void 0;return o(u,f,c)}}const nd={}.hasOwnProperty,gN={};function bN(e,t){const n=t||gN,r=new Map,i=new Map,a=new Map,o={...nN,...n.handlers},s={all:l,applyData:wN,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:o,one:u,options:n,patch:xN,wrap:_N};return td(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const f=c.type==="definition"?r:i,d=String(c.identifier).toUpperCase();f.has(d)||f.set(d,c)}}),s;function u(c,f){const d=c.type,p=s.handlers[d];if(nd.call(s.handlers,d)&&p)return p(s,c,f);if(s.options.passThrough&&s.options.passThrough.includes(d)){if("children"in c){const{children:m,...y}=c,v=Dl(y);return v.children=s.all(c),v}return Dl(c)}return(s.options.unknownHandler||SN)(s,c,f)}function l(c){const f=[];if("children"in c){const d=c.children;let p=-1;for(;++p<d.length;){const h=s.one(d[p],c);if(h){if(p&&d[p-1].type==="break"&&(!Array.isArray(h)&&h.type==="text"&&(h.value=Nb(h.value)),!Array.isArray(h)&&h.type==="element")){const m=h.children[0];m&&m.type==="text"&&(m.value=Nb(m.value))}Array.isArray(h)?f.push(...h):f.push(h)}}}return f}}function xN(e,t){e.position&&(t.position=mR(e))}function wN(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&a&&Object.assign(n.properties,Dl(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function SN(e,t){const n=t.data||{},r="value"in t&&!(nd.call(n,"hProperties")||nd.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function _N(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
40
40
|
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
41
41
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
42
|
-
`}),n}function
|
|
43
|
-
`},i),a}function bN(e,t){return e&&"run"in e?async function(n,r){const i=Ab(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Ab(n,{file:r,...e||t})}}function Nb(e){if(e)throw e}var Ll=Object.prototype.hasOwnProperty,Db=Object.prototype.toString,Mb=Object.defineProperty,jb=Object.getOwnPropertyDescriptor,Lb=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Db.call(t)==="[object Array]"},Fb=function(t){if(!t||Db.call(t)!=="[object Object]")return!1;var n=Ll.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Ll.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Ll.call(t,i)},Bb=function(t,n){Mb&&n.name==="__proto__"?Mb(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Ub=function(t,n){if(n==="__proto__")if(Ll.call(t,n)){if(jb)return jb(t,n).value}else return;return t[n]},xN=function e(){var t,n,r,i,a,o,s=arguments[0],u=1,l=arguments.length,c=!1;for(typeof s=="boolean"&&(c=s,s=arguments[1]||{},u=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});u<l;++u)if(t=arguments[u],t!=null)for(n in t)r=Ub(s,n),i=Ub(t,n),s!==i&&(c&&i&&(Fb(i)||(a=Lb(i)))?(a?(a=!1,o=r&&Lb(r)?r:[]):o=r&&Fb(r)?r:{},Bb(s,{name:n,newValue:e(c,o,i)})):typeof i<"u"&&Bb(s,{name:n,newValue:i}));return s};const rd=Ke(xN);function id(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 wN(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);s(null,...i);function s(u,...l){const c=e[++a];let f=-1;if(u){o(u);return}for(;++f<i.length;)(l[f]===null||l[f]===void 0)&&(l[f]=i[f]);i=l,c?SN(c,s)(...l):o(null,...l)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function SN(e,t){let n;return r;function r(...o){const s=e.length>o.length;let u;s&&o.push(i);try{u=e.apply(this,o)}catch(l){const c=l;if(s&&n)throw c;return i(c)}s||(u&&u.then&&typeof u.then=="function"?u.then(a,i):u instanceof Error?i(u):a(u))}function i(o,...s){n||(n=!0,t(o,...s))}function a(o){i(null,o)}}const sr={basename:_N,dirname:EN,extname:kN,join:TN,sep:"/"};function _N(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');jo(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function EN(e){if(jo(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 kN(e){jo(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function TN(...e){let t=-1,n;for(;++t<e.length;)jo(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":ON(n)}function ON(e){jo(e);const t=e.codePointAt(0)===47;let n=CN(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function CN(e,t){let n="",r=0,i=-1,a=0,o=-1,s,u;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else{if(s===47)break;s=47}if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=o,a=0;continue}}else if(n.length>0){n="",r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function jo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const $N={cwd:IN};function IN(){return"/"}function ad(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function RN(e){if(typeof e=="string")e=new URL(e);else if(!ad(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 PN(e)}function PN(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 od=["history","path","basename","stem","extname","dirname"];class zb{constructor(t){let n;t?ad(t)?n={path:t}:typeof t=="string"||AN(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":$N.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<od.length;){const a=od[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)od.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?sr.basename(this.path):void 0}set basename(t){ld(t,"basename"),sd(t,"basename"),this.path=sr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?sr.dirname(this.path):void 0}set dirname(t){qb(this.basename,"dirname"),this.path=sr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?sr.extname(this.path):void 0}set extname(t){if(sd(t,"extname"),qb(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=sr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ad(t)&&(t=RN(t)),ld(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?sr.basename(this.path,this.extname):void 0}set stem(t){ld(t,"stem"),sd(t,"stem"),this.path=sr.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 Qt(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 sd(e,t){if(e&&e.includes(sr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+sr.sep+"`")}function ld(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function qb(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function AN(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const NN=function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a},DN={}.hasOwnProperty;class ud extends NN{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=wN()}copy(){const t=new ud;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(rd(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(dd("data",this.frozen),this.namespace[t]=n,this):DN.call(this.namespace,t)&&this.namespace[t]||void 0:t?(dd("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=Fl(t),r=this.parser||this.Parser;return cd("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),cd("process",this.parser||this.Parser),fd("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,o){const s=Fl(t),u=r.parse(s);r.run(u,s,function(c,f,d){if(c||!f||!d)return l(c);const p=f,m=r.stringify(p,d);LN(m)?d.value=m:d.result=m,l(c,d)});function l(c,f){c||!f?o(c):a?a(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),cd("processSync",this.parser||this.Parser),fd("processSync",this.compiler||this.Compiler),this.process(t,i),Hb("processSync","process",n),r;function i(a,o){n=!0,Nb(a),r=o}}run(t,n,r){Vb(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(o,s){const u=Fl(n);i.run(t,u,l);function l(c,f,d){const p=f||t;c?s(c):o?o(p):r(void 0,p,d)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),Hb("runSync","run",r),i;function a(o,s){Nb(o),i=s,r=!0}}stringify(t,n){this.freeze();const r=Fl(n),i=this.compiler||this.Compiler;return fd("stringify",i),Vb(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(dd("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(l){if(typeof l=="function")u(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[c,...f]=l;u(c,f)}else o(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function o(l){if(!("plugins"in l)&&!("settings"in l))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(l.plugins),l.settings&&(i.settings=rd(!0,i.settings,l.settings))}function s(l){let c=-1;if(l!=null)if(Array.isArray(l))for(;++c<l.length;){const f=l[c];a(f)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function u(l,c){let f=-1,d=-1;for(;++f<r.length;)if(r[f][0]===l){d=f;break}if(d===-1)r.push([l,...c]);else if(c.length>0){let[p,...m]=c;const h=r[d][1];id(h)&&id(p)&&(p=rd(!0,h,p)),r[d]=[l,p,...m]}}}}const MN=new ud().freeze();function cd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function fd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function dd(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 Vb(e){if(!id(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Hb(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Fl(e){return jN(e)?e:new zb(e)}function jN(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function LN(e){return typeof e=="string"||FN(e)}function FN(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const BN="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Wb=[],Zb={allowDangerousHtml:!0},UN=/^(https?|ircs?|mailto|xmpp)$/i,zN=[{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 qN(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,a=e.components,o=e.disallowedElements,s=e.rehypePlugins||Wb,u=e.remarkPlugins||Wb,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Zb}:Zb,c=e.skipHtml,f=e.unwrapDisallowed,d=e.urlTransform||VN,p=MN().use(kA).use(u).use(bN,l).use(s),m=new zb;typeof r=="string"&&(m.value=r);for(const g of zN)Object.hasOwn(e,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+BN+g.id,void 0);const h=p.parse(m);let y=p.runSync(h,m);return i&&(y={type:"element",tagName:"div",properties:{className:i},children:y.type==="root"?y.children:[y]}),td(y,v),vR(y,{Fragment:I.Fragment,components:a,ignoreInvalidStyle:!0,jsx:I.jsx,jsxs:I.jsxs,passKeys:!0,passNode:!0});function v(g,b,k){if(g.type==="raw"&&k&&typeof b=="number")return c?k.children.splice(b,1):k.children[b]={type:"text",value:g.value},b;if(g.type==="element"){let S;for(S in zf)if(Object.hasOwn(zf,S)&&Object.hasOwn(g.properties,S)){const E=g.properties[S],O=zf[S];(O===null||O.includes(g.tagName))&&(g.properties[S]=d(String(E||""),S,g))}}if(g.type==="element"){let S=t?!t.includes(g.tagName):o?o.includes(g.tagName):!1;if(!S&&n&&typeof b=="number"&&(S=!n(g,b,k)),S&&k&&typeof b=="number")return f&&g.children?k.children.splice(b,1,...g.children):k.children.splice(b,1),b}}}function VN(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||UN.test(e.slice(0,t))?e:""}function HN(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Kb(e,t,n){const i=Ml((n||{}).ignore||[]),a=WN(t);let o=-1;for(;++o<a.length;)Rb(e,"text",s);function s(l,c){let f=-1,d;for(;++f<c.length;){const p=c[f],m=d?d.children:void 0;if(i(p,m?m.indexOf(p):void 0,d))return;d=p}if(d)return u(l,c)}function u(l,c){const f=c[c.length-1],d=a[o][0],p=a[o][1];let m=0;const y=f.children.indexOf(l);let v=!1,g=[];d.lastIndex=0;let b=d.exec(l.value);for(;b;){const k=b.index,S={index:b.index,input:b.input,stack:[...c,l]};let E=p(...b,S);if(typeof E=="string"&&(E=E.length>0?{type:"text",value:E}:void 0),E===!1?d.lastIndex=k+1:(m!==k&&g.push({type:"text",value:l.value.slice(m,k)}),Array.isArray(E)?g.push(...E):E&&g.push(E),m=k+b[0].length,v=!0),!d.global)break;b=d.exec(l.value)}return v?(m<l.value.length&&g.push({type:"text",value:l.value.slice(m)}),f.children.splice(y,1,...g)):g=[l],y+g.length}}function WN(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([ZN(i[0]),KN(i[1])])}return t}function ZN(e){return typeof e=="string"?new RegExp(HN(e),"g"):e}function KN(e){return typeof e=="function"?e:function(){return e}}function GN(e){Kb(e,[/\r?\n|\r/g,YN])}function YN(){return{type:"break"}}function JN(){return function(e){GN(e)}}function Gb(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 pd="phrasing",hd=["autolink","link","image","label"];function XN(){return{transforms:[aD],enter:{literalAutolink:eD,literalAutolinkEmail:md,literalAutolinkHttp:md,literalAutolinkWww:md},exit:{literalAutolink:iD,literalAutolinkEmail:rD,literalAutolinkHttp:tD,literalAutolinkWww:nD}}}function QN(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:pd,notInConstruct:hd},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:pd,notInConstruct:hd},{character:":",before:"[ps]",after:"\\/",inConstruct:pd,notInConstruct:hd}]}}function eD(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function md(e){this.config.enter.autolinkProtocol.call(this,e)}function tD(e){this.config.exit.autolinkProtocol.call(this,e)}function nD(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 rD(e){this.config.exit.autolinkEmail.call(this,e)}function iD(e){this.exit(e)}function aD(e){Kb(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,oD],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),sD]],{ignore:["link","linkReference"]})}function oD(e,t,n,r,i){let a="";if(!Yb(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!lD(n)))return!1;const o=uD(n+r);if(!o[0])return!1;const s={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function sD(e,t,n,r){return!Yb(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function lD(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 uD(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=Gb(e,"(");let a=Gb(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Yb(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Pi(n)||Tl(n))&&(!t||n!==47)}Jb.peek=xD;function cD(){return{enter:{gfmFootnoteDefinition:dD,gfmFootnoteDefinitionLabelString:pD,gfmFootnoteCall:vD,gfmFootnoteCallString:yD},exit:{gfmFootnoteDefinition:mD,gfmFootnoteDefinitionLabelString:hD,gfmFootnoteCall:bD,gfmFootnoteCallString:gD}}}function fD(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:wD,footnoteReference:Jb}}}function dD(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function pD(){this.buffer()}function hD(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Vn(this.sliceSerialize(e)).toLowerCase()}function mD(e){this.exit(e)}function vD(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function yD(){this.buffer()}function gD(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Vn(this.sliceSerialize(e)).toLowerCase()}function bD(e){this.exit(e)}function Jb(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteReference"),s=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{...i.current(),before:a,after:"]"})),s(),o(),a+=i.move("]"),a}function xD(){return"["}function wD(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteDefinition"),s=n.enter("label");return a+=i.move(n.safe(n.associationId(e),{...i.current(),before:a,after:"]"})),s(),a+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),a+=i.move(n.indentLines(n.containerFlow(e,i.current()),SD)),o(),a}function SD(e,t,n){return t===0?e:(n?"":" ")+e}const _D=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Xb.peek=CD;function ED(){return{canContainEols:["delete"],enter:{strikethrough:TD},exit:{strikethrough:OD}}}function kD(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:_D}],handlers:{delete:Xb}}}function TD(e){this.enter({type:"delete",children:[]},e)}function OD(e){this.exit(e)}function Xb(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),a(),o}function CD(){return"~"}function $D(e){return e.length}function ID(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||$D,a=[],o=[],s=[],u=[];let l=0,c=-1;for(;++c<e.length;){const h=[],y=[];let v=-1;for(e[c].length>l&&(l=e[c].length);++v<e[c].length;){const g=RD(e[c][v]);if(n.alignDelimiters!==!1){const b=i(g);y[v]=b,(u[v]===void 0||b>u[v])&&(u[v]=b)}h.push(g)}o[c]=h,s[c]=y}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<l;)a[f]=Qb(r[f]);else{const h=Qb(r);for(;++f<l;)a[f]=h}f=-1;const d=[],p=[];for(;++f<l;){const h=a[f];let y="",v="";h===99?(y=":",v=":"):h===108?y=":":h===114&&(v=":");let g=n.alignDelimiters===!1?1:Math.max(1,u[f]-y.length-v.length);const b=y+"-".repeat(g)+v;n.alignDelimiters!==!1&&(g=y.length+g+v.length,g>u[f]&&(u[f]=g),p[f]=g),d[f]=b}o.splice(1,0,d),s.splice(1,0,p),c=-1;const m=[];for(;++c<o.length;){const h=o[c],y=s[c];f=-1;const v=[];for(;++f<l;){const g=h[f]||"";let b="",k="";if(n.alignDelimiters!==!1){const S=u[f]-(y[f]||0),E=a[f];E===114?b=" ".repeat(S):E===99?S%2?(b=" ".repeat(S/2+.5),k=" ".repeat(S/2-.5)):(b=" ".repeat(S/2),k=b):k=" ".repeat(S)}n.delimiterStart!==!1&&!f&&v.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&g==="")&&(n.delimiterStart!==!1||f)&&v.push(" "),n.alignDelimiters!==!1&&v.push(b),v.push(g),n.alignDelimiters!==!1&&v.push(k),n.padding!==!1&&v.push(" "),(n.delimiterEnd!==!1||f!==l-1)&&v.push("|")}m.push(n.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return m.join(`
|
|
44
|
-
`)}function
|
|
45
|
-
`&&
|
|
46
|
-
`}function
|
|
42
|
+
`}),n}function Nb(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Db(e,t){const n=bN(e,t),r=n.one(e,void 0),i=uN(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
|
|
43
|
+
`},i),a}function EN(e,t){return e&&"run"in e?async function(n,r){const i=Db(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Db(n,{file:r,...e||t})}}function Mb(e){if(e)throw e}var Ll=Object.prototype.hasOwnProperty,jb=Object.prototype.toString,Lb=Object.defineProperty,Fb=Object.getOwnPropertyDescriptor,Bb=function(t){return typeof Array.isArray=="function"?Array.isArray(t):jb.call(t)==="[object Array]"},Ub=function(t){if(!t||jb.call(t)!=="[object Object]")return!1;var n=Ll.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Ll.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Ll.call(t,i)},zb=function(t,n){Lb&&n.name==="__proto__"?Lb(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},qb=function(t,n){if(n==="__proto__")if(Ll.call(t,n)){if(Fb)return Fb(t,n).value}else return;return t[n]},kN=function e(){var t,n,r,i,a,o,s=arguments[0],u=1,l=arguments.length,c=!1;for(typeof s=="boolean"&&(c=s,s=arguments[1]||{},u=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});u<l;++u)if(t=arguments[u],t!=null)for(n in t)r=qb(s,n),i=qb(t,n),s!==i&&(c&&i&&(Ub(i)||(a=Bb(i)))?(a?(a=!1,o=r&&Bb(r)?r:[]):o=r&&Ub(r)?r:{},zb(s,{name:n,newValue:e(c,o,i)})):typeof i<"u"&&zb(s,{name:n,newValue:i}));return s};const rd=Ke(kN);function id(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 TN(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);s(null,...i);function s(u,...l){const c=e[++a];let f=-1;if(u){o(u);return}for(;++f<i.length;)(l[f]===null||l[f]===void 0)&&(l[f]=i[f]);i=l,c?ON(c,s)(...l):o(null,...l)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function ON(e,t){let n;return r;function r(...o){const s=e.length>o.length;let u;s&&o.push(i);try{u=e.apply(this,o)}catch(l){const c=l;if(s&&n)throw c;return i(c)}s||(u&&u.then&&typeof u.then=="function"?u.then(a,i):u instanceof Error?i(u):a(u))}function i(o,...s){n||(n=!0,t(o,...s))}function a(o){i(null,o)}}const sr={basename:CN,dirname:$N,extname:IN,join:RN,sep:"/"};function CN(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');jo(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function $N(e){if(jo(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 IN(e){jo(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function RN(...e){let t=-1,n;for(;++t<e.length;)jo(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":PN(n)}function PN(e){jo(e);const t=e.codePointAt(0)===47;let n=AN(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function AN(e,t){let n="",r=0,i=-1,a=0,o=-1,s,u;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else{if(s===47)break;s=47}if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=o,a=0;continue}}else if(n.length>0){n="",r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function jo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const NN={cwd:DN};function DN(){return"/"}function ad(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function MN(e){if(typeof e=="string")e=new URL(e);else if(!ad(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 jN(e)}function jN(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 od=["history","path","basename","stem","extname","dirname"];class Vb{constructor(t){let n;t?ad(t)?n={path:t}:typeof t=="string"||LN(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":NN.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<od.length;){const a=od[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)od.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?sr.basename(this.path):void 0}set basename(t){ld(t,"basename"),sd(t,"basename"),this.path=sr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?sr.dirname(this.path):void 0}set dirname(t){Hb(this.basename,"dirname"),this.path=sr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?sr.extname(this.path):void 0}set extname(t){if(sd(t,"extname"),Hb(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=sr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ad(t)&&(t=MN(t)),ld(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?sr.basename(this.path,this.extname):void 0}set stem(t){ld(t,"stem"),sd(t,"stem"),this.path=sr.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 Qt(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 sd(e,t){if(e&&e.includes(sr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+sr.sep+"`")}function ld(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Hb(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function LN(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const FN=function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a},BN={}.hasOwnProperty;class ud extends FN{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=TN()}copy(){const t=new ud;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(rd(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(dd("data",this.frozen),this.namespace[t]=n,this):BN.call(this.namespace,t)&&this.namespace[t]||void 0:t?(dd("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=Fl(t),r=this.parser||this.Parser;return cd("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),cd("process",this.parser||this.Parser),fd("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,o){const s=Fl(t),u=r.parse(s);r.run(u,s,function(c,f,d){if(c||!f||!d)return l(c);const p=f,h=r.stringify(p,d);qN(h)?d.value=h:d.result=h,l(c,d)});function l(c,f){c||!f?o(c):a?a(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),cd("processSync",this.parser||this.Parser),fd("processSync",this.compiler||this.Compiler),this.process(t,i),Zb("processSync","process",n),r;function i(a,o){n=!0,Mb(a),r=o}}run(t,n,r){Wb(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(o,s){const u=Fl(n);i.run(t,u,l);function l(c,f,d){const p=f||t;c?s(c):o?o(p):r(void 0,p,d)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),Zb("runSync","run",r),i;function a(o,s){Mb(o),i=s,r=!0}}stringify(t,n){this.freeze();const r=Fl(n),i=this.compiler||this.Compiler;return fd("stringify",i),Wb(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(dd("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(l){if(typeof l=="function")u(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[c,...f]=l;u(c,f)}else o(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function o(l){if(!("plugins"in l)&&!("settings"in l))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(l.plugins),l.settings&&(i.settings=rd(!0,i.settings,l.settings))}function s(l){let c=-1;if(l!=null)if(Array.isArray(l))for(;++c<l.length;){const f=l[c];a(f)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function u(l,c){let f=-1,d=-1;for(;++f<r.length;)if(r[f][0]===l){d=f;break}if(d===-1)r.push([l,...c]);else if(c.length>0){let[p,...h]=c;const m=r[d][1];id(m)&&id(p)&&(p=rd(!0,m,p)),r[d]=[l,p,...h]}}}}const UN=new ud().freeze();function cd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function fd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function dd(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 Wb(e){if(!id(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Zb(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Fl(e){return zN(e)?e:new Vb(e)}function zN(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function qN(e){return typeof e=="string"||VN(e)}function VN(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const HN="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Kb=[],Gb={allowDangerousHtml:!0},WN=/^(https?|ircs?|mailto|xmpp)$/i,ZN=[{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 KN(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,a=e.components,o=e.disallowedElements,s=e.rehypePlugins||Kb,u=e.remarkPlugins||Kb,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Gb}:Gb,c=e.skipHtml,f=e.unwrapDisallowed,d=e.urlTransform||GN,p=UN().use(IA).use(u).use(EN,l).use(s),h=new Vb;typeof r=="string"&&(h.value=r);for(const g of ZN)Object.hasOwn(e,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+HN+g.id,void 0);const m=p.parse(h);let y=p.runSync(m,h);return i&&(y={type:"element",tagName:"div",properties:{className:i},children:y.type==="root"?y.children:[y]}),td(y,v),wR(y,{Fragment:$.Fragment,components:a,ignoreInvalidStyle:!0,jsx:$.jsx,jsxs:$.jsxs,passKeys:!0,passNode:!0});function v(g,b,k){if(g.type==="raw"&&k&&typeof b=="number")return c?k.children.splice(b,1):k.children[b]={type:"text",value:g.value},b;if(g.type==="element"){let S;for(S in zf)if(Object.hasOwn(zf,S)&&Object.hasOwn(g.properties,S)){const E=g.properties[S],O=zf[S];(O===null||O.includes(g.tagName))&&(g.properties[S]=d(String(E||""),S,g))}}if(g.type==="element"){let S=t?!t.includes(g.tagName):o?o.includes(g.tagName):!1;if(!S&&n&&typeof b=="number"&&(S=!n(g,b,k)),S&&k&&typeof b=="number")return f&&g.children?k.children.splice(b,1,...g.children):k.children.splice(b,1),b}}}function GN(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||WN.test(e.slice(0,t))?e:""}function YN(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Yb(e,t,n){const i=Ml((n||{}).ignore||[]),a=JN(t);let o=-1;for(;++o<a.length;)Ab(e,"text",s);function s(l,c){let f=-1,d;for(;++f<c.length;){const p=c[f],h=d?d.children:void 0;if(i(p,h?h.indexOf(p):void 0,d))return;d=p}if(d)return u(l,c)}function u(l,c){const f=c[c.length-1],d=a[o][0],p=a[o][1];let h=0;const y=f.children.indexOf(l);let v=!1,g=[];d.lastIndex=0;let b=d.exec(l.value);for(;b;){const k=b.index,S={index:b.index,input:b.input,stack:[...c,l]};let E=p(...b,S);if(typeof E=="string"&&(E=E.length>0?{type:"text",value:E}:void 0),E===!1?d.lastIndex=k+1:(h!==k&&g.push({type:"text",value:l.value.slice(h,k)}),Array.isArray(E)?g.push(...E):E&&g.push(E),h=k+b[0].length,v=!0),!d.global)break;b=d.exec(l.value)}return v?(h<l.value.length&&g.push({type:"text",value:l.value.slice(h)}),f.children.splice(y,1,...g)):g=[l],y+g.length}}function JN(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([XN(i[0]),QN(i[1])])}return t}function XN(e){return typeof e=="string"?new RegExp(YN(e),"g"):e}function QN(e){return typeof e=="function"?e:function(){return e}}function eD(e){Yb(e,[/\r?\n|\r/g,tD])}function tD(){return{type:"break"}}function nD(){return function(e){eD(e)}}function Jb(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 pd="phrasing",hd=["autolink","link","image","label"];function rD(){return{transforms:[cD],enter:{literalAutolink:aD,literalAutolinkEmail:md,literalAutolinkHttp:md,literalAutolinkWww:md},exit:{literalAutolink:uD,literalAutolinkEmail:lD,literalAutolinkHttp:oD,literalAutolinkWww:sD}}}function iD(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:pd,notInConstruct:hd},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:pd,notInConstruct:hd},{character:":",before:"[ps]",after:"\\/",inConstruct:pd,notInConstruct:hd}]}}function aD(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function md(e){this.config.enter.autolinkProtocol.call(this,e)}function oD(e){this.config.exit.autolinkProtocol.call(this,e)}function sD(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 lD(e){this.config.exit.autolinkEmail.call(this,e)}function uD(e){this.exit(e)}function cD(e){Yb(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,fD],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),dD]],{ignore:["link","linkReference"]})}function fD(e,t,n,r,i){let a="";if(!Xb(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!pD(n)))return!1;const o=hD(n+r);if(!o[0])return!1;const s={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function dD(e,t,n,r){return!Xb(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function pD(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 hD(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=Jb(e,"(");let a=Jb(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Xb(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Pi(n)||Tl(n))&&(!t||n!==47)}Qb.peek=kD;function mD(){return{enter:{gfmFootnoteDefinition:yD,gfmFootnoteDefinitionLabelString:gD,gfmFootnoteCall:wD,gfmFootnoteCallString:SD},exit:{gfmFootnoteDefinition:xD,gfmFootnoteDefinitionLabelString:bD,gfmFootnoteCall:ED,gfmFootnoteCallString:_D}}}function vD(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:TD,footnoteReference:Qb}}}function yD(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function gD(){this.buffer()}function bD(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=qn(this.sliceSerialize(e)).toLowerCase()}function xD(e){this.exit(e)}function wD(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function SD(){this.buffer()}function _D(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=qn(this.sliceSerialize(e)).toLowerCase()}function ED(e){this.exit(e)}function Qb(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteReference"),s=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{...i.current(),before:a,after:"]"})),s(),o(),a+=i.move("]"),a}function kD(){return"["}function TD(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteDefinition"),s=n.enter("label");return a+=i.move(n.safe(n.associationId(e),{...i.current(),before:a,after:"]"})),s(),a+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),a+=i.move(n.indentLines(n.containerFlow(e,i.current()),OD)),o(),a}function OD(e,t,n){return t===0?e:(n?"":" ")+e}const CD=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ex.peek=AD;function $D(){return{canContainEols:["delete"],enter:{strikethrough:RD},exit:{strikethrough:PD}}}function ID(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:CD}],handlers:{delete:ex}}}function RD(e){this.enter({type:"delete",children:[]},e)}function PD(e){this.exit(e)}function ex(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),a(),o}function AD(){return"~"}function ND(e){return e.length}function DD(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||ND,a=[],o=[],s=[],u=[];let l=0,c=-1;for(;++c<e.length;){const m=[],y=[];let v=-1;for(e[c].length>l&&(l=e[c].length);++v<e[c].length;){const g=MD(e[c][v]);if(n.alignDelimiters!==!1){const b=i(g);y[v]=b,(u[v]===void 0||b>u[v])&&(u[v]=b)}m.push(g)}o[c]=m,s[c]=y}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<l;)a[f]=tx(r[f]);else{const m=tx(r);for(;++f<l;)a[f]=m}f=-1;const d=[],p=[];for(;++f<l;){const m=a[f];let y="",v="";m===99?(y=":",v=":"):m===108?y=":":m===114&&(v=":");let g=n.alignDelimiters===!1?1:Math.max(1,u[f]-y.length-v.length);const b=y+"-".repeat(g)+v;n.alignDelimiters!==!1&&(g=y.length+g+v.length,g>u[f]&&(u[f]=g),p[f]=g),d[f]=b}o.splice(1,0,d),s.splice(1,0,p),c=-1;const h=[];for(;++c<o.length;){const m=o[c],y=s[c];f=-1;const v=[];for(;++f<l;){const g=m[f]||"";let b="",k="";if(n.alignDelimiters!==!1){const S=u[f]-(y[f]||0),E=a[f];E===114?b=" ".repeat(S):E===99?S%2?(b=" ".repeat(S/2+.5),k=" ".repeat(S/2-.5)):(b=" ".repeat(S/2),k=b):k=" ".repeat(S)}n.delimiterStart!==!1&&!f&&v.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&g==="")&&(n.delimiterStart!==!1||f)&&v.push(" "),n.alignDelimiters!==!1&&v.push(b),v.push(g),n.alignDelimiters!==!1&&v.push(k),n.padding!==!1&&v.push(" "),(n.delimiterEnd!==!1||f!==l-1)&&v.push("|")}h.push(n.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return h.join(`
|
|
44
|
+
`)}function MD(e){return e==null?"":String(e)}function tx(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 jD(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const o=n.indentLines(n.containerFlow(e,a.current()),LD);return i(),o}function LD(e,t,n){return">"+(n?"":" ")+e}function FD(e,t){return nx(e,t.inConstruct,!0)&&!nx(e,t.notInConstruct,!1)}function nx(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 rx(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
45
|
+
`&&FD(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
46
|
+
`}function BD(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function UD(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 zD(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 qD(e,t,n,r){const i=zD(n),a=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(UD(e,n)){const f=n.enter("codeIndented"),d=n.indentLines(a,VD);return f(),d}const s=n.createTracker(r),u=i.repeat(Math.max(BD(a,i)+1,3)),l=n.enter("codeFenced");let c=s.move(u);if(e.lang){const f=n.enter(`codeFencedLang${o}`);c+=s.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...s.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${o}`);c+=s.move(" "),c+=s.move(n.safe(e.meta,{before:c,after:`
|
|
47
47
|
`,encode:["`"],...s.current()})),f()}return c+=s.move(`
|
|
48
48
|
`),a&&(c+=s.move(a+`
|
|
49
|
-
`)),c+=s.move(u),l(),c}function
|
|
50
|
-
`,...u.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=u.move(" "+i),l+=u.move(n.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),s()),o(),l}function
|
|
49
|
+
`)),c+=s.move(u),l(),c}function VD(e,t,n){return(n?"":" ")+e}function vd(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function HD(e,t,n,r){const i=vd(n),a=i==='"'?"Quote":"Apostrophe",o=n.enter("definition");let s=n.enter("label");const u=n.createTracker(r);let l=u.move("[");return l+=u.move(n.safe(n.associationId(e),{before:l,after:"]",...u.current()})),l+=u.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(n.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(s=n.enter("destinationRaw"),l+=u.move(n.safe(e.url,{before:l,after:e.title?" ":`
|
|
50
|
+
`,...u.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=u.move(" "+i),l+=u.move(n.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),s()),o(),l}function WD(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}ix.peek=ZD;function ix(e,t,n,r){const i=WD(n),a=n.enter("emphasis"),o=n.createTracker(r);let s=o.move(i);return s+=o.move(n.containerPhrasing(e,{before:s,after:i,...o.current()})),s+=o.move(i),a(),s}function ZD(e,t,n){return n.options.emphasis||"*"}function KD(e,t){let n=!1;return td(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,ed}),!!((!e.depth||e.depth<3)&&qf(e)&&(t.options.setext||n))}function GD(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(KD(e,n)){const c=n.enter("headingSetext"),f=n.enter("phrasing"),d=n.containerPhrasing(e,{...a.current(),before:`
|
|
51
51
|
`,after:`
|
|
52
52
|
`});return f(),c(),d+`
|
|
53
53
|
`+(i===1?"=":"-").repeat(d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf(`
|
|
54
54
|
`))+1))}const o="#".repeat(i),s=n.enter("headingAtx"),u=n.enter("phrasing");a.move(o+" ");let l=n.containerPhrasing(e,{before:"# ",after:`
|
|
55
|
-
`,...a.current()});return/^[\t ]/.test(l)&&(l="&#x"+l.charCodeAt(0).toString(16).toUpperCase()+";"+l.slice(1)),l=l?o+" "+l:o,n.options.closeAtx&&(l+=" "+o),u(),s(),l}
|
|
56
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:o,tableCell:u,tableRow:s}};function o(p,m,
|
|
57
|
-
`))}function u(p,m,h,y){const v=h.enter("tableCell"),g=h.enter("phrasing"),b=h.containerPhrasing(p,{...y,before:a,after:a});return g(),v(),b}function l(p,m){return ID(p,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function c(p,m,h){const y=p.children;let v=-1;const g=[],b=m.enter("table");for(;++v<y.length;)g[v]=f(y[v],m,h);return b(),g}function f(p,m,h){const y=p.children;let v=-1;const g=[],b=m.enter("tableRow");for(;++v<y.length;)g[v]=u(y[v],p,m,h);return b(),g}function d(p,m,h){let y=dx.inlineCode(p,m,h);return h.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function yM(){return{exit:{taskListCheckValueChecked:hx,taskListCheckValueUnchecked:hx,paragraph:bM}}}function gM(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:xM}}}function hx(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function bM(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 a=-1,o;for(;++a<i.length;){const s=i[a];if(s.type==="paragraph"){o=s;break}}o===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 xM(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);a&&s.move(o);let u=dx.listItem(e,t,n,{...r,...s.current()});return a&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),u;function l(c){return c+o}}function wM(){return[XN(),cD(),ED(),cM(),yM()]}function SM(e){return{extensions:[QN(),fD(),kD(),vM(e),gM()]}}const _M={tokenize:$M,partial:!0},mx={tokenize:IM,partial:!0},vx={tokenize:RM,partial:!0},yx={tokenize:PM,partial:!0},EM={tokenize:AM,partial:!0},gx={name:"wwwAutolink",tokenize:OM,previous:xx},bx={name:"protocolAutolink",tokenize:CM,previous:wx},Pr={name:"emailAutolink",tokenize:TM,previous:Sx},lr={};function kM(){return{text:lr}}let Ai=48;for(;Ai<123;)lr[Ai]=Pr,Ai++,Ai===58?Ai=65:Ai===91&&(Ai=97);lr[43]=Pr,lr[45]=Pr,lr[46]=Pr,lr[95]=Pr,lr[72]=[Pr,bx],lr[104]=[Pr,bx],lr[87]=[Pr,gx],lr[119]=[Pr,gx];function TM(e,t,n){const r=this;let i,a;return o;function o(f){return!bd(f)||!Sx.call(r,r.previous)||xd(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return bd(f)?(e.consume(f),s):f===64?(e.consume(f),u):n(f)}function u(f){return f===46?e.check(EM,c,l)(f):f===45||f===95||en(f)?(a=!0,e.consume(f),u):c(f)}function l(f){return e.consume(f),i=!0,u}function c(f){return a&&i&&ln(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function OM(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!xx.call(r,r.previous)||xd(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(_M,e.attempt(mx,e.attempt(vx,a),n),n)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function CM(e,t,n){const r=this;let i="",a=!1;return o;function o(f){return(f===72||f===104)&&wx.call(r,r.previous)&&!xd(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if(ln(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const d=i.toLowerCase();if(d==="http"||d==="https")return e.consume(f),u}return n(f)}function u(f){return f===47?(e.consume(f),a?l:(a=!0,u)):n(f)}function l(f){return f===null||kl(f)||vt(f)||Pi(f)||Tl(f)?n(f):e.attempt(mx,e.attempt(vx,c),n)(f)}function c(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function $M(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),a):n(o)}function a(o){return o===null?n(o):t(o)}}function IM(e,t,n){let r,i,a;return o;function o(l){return l===46||l===95?e.check(yx,u,s)(l):l===null||vt(l)||Pi(l)||l!==45&&Tl(l)?u(l):(a=!0,e.consume(l),o)}function s(l){return l===95?r=!0:(i=r,r=void 0),e.consume(l),o}function u(l){return i||r||!a?n(l):t(l)}}function RM(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(yx,t,a)(o):o===null||vt(o)||Pi(o)?t(o):(e.consume(o),i)}function a(o){return o===41&&r++,e.consume(o),i}}function PM(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),a):s===93?(e.consume(s),i):s===60||s===null||vt(s)||Pi(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||vt(s)||Pi(s)?t(s):r(s)}function a(s){return ln(s)?o(s):n(s)}function o(s){return s===59?(e.consume(s),r):ln(s)?(e.consume(s),o):n(s)}}function AM(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return en(a)?n(a):t(a)}}function xx(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||vt(e)}function wx(e){return!ln(e)}function Sx(e){return!(e===47||bd(e))}function bd(e){return e===43||e===45||e===46||e===95||en(e)}function xd(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 NM={tokenize:zM,partial:!0};function DM(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:FM,continuation:{tokenize:BM},exit:UM}},text:{91:{name:"gfmFootnoteCall",tokenize:LM},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:MM,resolveTo:jM}}}}function MM(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){o=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return s;function s(u){if(!o||!o._balanced)return n(u);const l=Vn(r.sliceSerialize({start:o.end,end:r.now()}));return l.codePointAt(0)!==94||!a.includes(l.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function jM(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 a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function LM(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,o;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),u}function u(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(f){if(a>999||f===93&&!o||f===null||f===91||vt(f))return n(f);if(f===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(Vn(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return vt(f)||(o=!0),a++,e.consume(f),f===92?c:l}function c(f){return f===91||f===92||f===93?(e.consume(f),a++,l):l(f)}}function FM(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o=0,s;return u;function u(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(m)}function c(m){if(o>999||m===93&&!s||m===null||m===91||vt(m))return n(m);if(m===93){e.exit("chunkString");const h=e.exit("gfmFootnoteDefinitionLabelString");return a=Vn(r.sliceSerialize(h)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return vt(m)||(s=!0),o++,e.consume(m),m===92?f:c}function f(m){return m===91||m===92||m===93?(e.consume(m),o++,c):c(m)}function d(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(a)||i.push(a),Xe(e,p,"gfmFootnoteDefinitionWhitespace")):n(m)}function p(m){return t(m)}}function BM(e,t,n){return e.check(Ao,t,e.attempt(NM,t,n))}function UM(e){e.exit("gfmFootnoteDefinition")}function zM(e,t,n){const r=this;return Xe(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(a):n(a)}}function qM(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,s){let u=-1;for(;++u<o.length;)if(o[u][0]==="enter"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._close){let l=u;for(;l--;)if(o[l][0]==="exit"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._open&&o[u][1].end.offset-o[u][1].start.offset===o[l][1].end.offset-o[l][1].start.offset){o[u][1].type="strikethroughSequence",o[l][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},o[l][1].start),end:Object.assign({},o[u][1].end)},f={type:"strikethroughText",start:Object.assign({},o[l][1].end),end:Object.assign({},o[u][1].start)},d=[["enter",c,s],["enter",o[l][1],s],["exit",o[l][1],s],["enter",f,s]],p=s.parser.constructs.insideSpan.null;p&&Pn(d,d.length,0,Cl(p,o.slice(l+1,u),s)),Pn(d,d.length,0,[["exit",f,s],["enter",o[u][1],s],["exit",o[u][1],s],["exit",c,s]]),Pn(o,l-1,u-l+3,d),u=l+d.length-2;break}}for(u=-1;++u<o.length;)o[u][1].type==="strikethroughSequenceTemporary"&&(o[u][1].type="data");return o}function a(o,s,u){const l=this.previous,c=this.events;let f=0;return d;function d(m){return l===126&&c[c.length-1][1].type!=="characterEscape"?u(m):(o.enter("strikethroughSequenceTemporary"),p(m))}function p(m){const h=Ol(l);if(m===126)return f>1?u(m):(o.consume(m),f++,p);if(f<2&&!n)return u(m);const y=o.exit("strikethroughSequenceTemporary"),v=Ol(m);return y._open=!v||v===2&&!!h,y._close=!h||h===2&&!!v,s(m)}}}class VM{constructor(){this.map=[]}add(t,n,r){HM(this,t,n,r)}consume(t){if(this.map.sort(function(a,o){return a[0]-o[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 HM(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 WM(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 a=r.length-1;r[a]=r[a]==="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 ZM(){return{flow:{null:{name:"table",tokenize:KM,resolveAll:GM}}}}function KM(e,t,n){const r=this;let i=0,a=0,o;return s;function s(T){let P=r.events.length-1;for(;P>-1;){const F=r.events[P][1].type;if(F==="lineEnding"||F==="linePrefix")P--;else break}const V=P>-1?r.events[P][1].type:null,$=V==="tableHead"||V==="tableRow"?E:u;return $===E&&r.parser.lazy[r.now().line]?n(T):$(T)}function u(T){return e.enter("tableHead"),e.enter("tableRow"),l(T)}function l(T){return T===124||(o=!0,a+=1),c(T)}function c(T){return T===null?n(T):Re(T)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),p):n(T):We(T)?Xe(e,c,"whitespace")(T):(a+=1,o&&(o=!1,i+=1),T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),o=!0,c):(e.enter("data"),f(T)))}function f(T){return T===null||T===124||vt(T)?(e.exit("data"),c(T)):(e.consume(T),T===92?d:f)}function d(T){return T===92||T===124?(e.consume(T),f):f(T)}function p(T){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(T):(e.enter("tableDelimiterRow"),o=!1,We(T)?Xe(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):m(T))}function m(T){return T===45||T===58?y(T):T===124?(o=!0,e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),h):S(T)}function h(T){return We(T)?Xe(e,y,"whitespace")(T):y(T)}function y(T){return T===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),v):T===45?(a+=1,v(T)):T===null||Re(T)?k(T):S(T)}function v(T){return T===45?(e.enter("tableDelimiterFiller"),g(T)):S(T)}function g(T){return T===45?(e.consume(T),g):T===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(T))}function b(T){return We(T)?Xe(e,k,"whitespace")(T):k(T)}function k(T){return T===124?m(T):T===null||Re(T)?!o||i!==a?S(T):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(T)):S(T)}function S(T){return n(T)}function E(T){return e.enter("tableRow"),O(T)}function O(T){return T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),O):T===null||Re(T)?(e.exit("tableRow"),t(T)):We(T)?Xe(e,O,"whitespace")(T):(e.enter("data"),L(T))}function L(T){return T===null||T===124||vt(T)?(e.exit("data"),O(T)):(e.consume(T),T===92?D:L)}function D(T){return T===92||T===124?(e.consume(T),L):L(T)}}function GM(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,u=0,l,c,f;const d=new VM;for(;++n<e.length;){const p=e[n],m=p[1];p[0]==="enter"?m.type==="tableHead"?(s=!1,u!==0&&(_x(d,t,u,l,c),c=void 0,u=0),l={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},d.add(n,0,[["enter",l,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,f=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,c={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},d.add(n,0,[["enter",c,t]])),i=m.type==="tableDelimiterRow"?2:c?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],f=Bl(d,t,a,i,void 0,f),a=[0,0,0,0]),o[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],f=Bl(d,t,a,i,void 0,f)),a=o,o=[a[1],n,0,0])):m.type==="tableHead"?(s=!0,u=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(u=n,a[1]!==0?(o[0]=o[1],f=Bl(d,t,a,i,n,f)):o[1]!==0&&(f=Bl(d,t,o,i,n,f)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(o[3]=n)}for(u!==0&&_x(d,t,u,l,c),d.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=WM(t.events,n))}return e}function Bl(e,t,n,r,i,a){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(a.end=Object.assign({},ua(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const u=ua(t.events,n[1]);if(a={type:o,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const l=ua(t.events,n[2]),c=ua(t.events,n[3]),f={type:s,start:Object.assign({},l),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const d=t.events[n[2]],p=t.events[n[3]];if(d[1].end=Object.assign({},p[1].end),d[1].type="chunkText",d[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,h=n[3]-n[2]-1;e.add(m,h,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(a.end=Object.assign({},ua(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function _x(e,t,n,r,i){const a=[],o=ua(t.events,n);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),r.end=Object.assign({},o),a.push(["exit",r,t]),e.add(n+1,0,a)}function ua(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const YM={name:"tasklistCheck",tokenize:XM};function JM(){return{text:{91:YM}}}function XM(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),a)}function a(u){return vt(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),o):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),o):n(u)}function o(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(u)}function s(u){return Re(u)?t(u):We(u)?e.check({tokenize:QM},t,n)(u):n(u)}}function QM(e,t,n){return Xe(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function ej(e){return Xg([kM(),DM(),qM(e),ZM(),JM()])}const tj={};function nj(e){const t=this,n=e||tj,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(ej(n)),a.push(wM()),o.push(SM(n))}const yt={container:{className:"bpReset bpContainer bpFont"},loader:{className:"bpReset bpLoader"},modal:{container:{className:"bpReset bpModalContainer"},overlay:{className:"bpModalOverlay"},dialog:{container:{className:"bpReset bpModalDialogContainer"},title:{container:{className:"bpReset bpModalDialogTitleContainer"},text:{className:"bpModalDialogTitleText"},closeIcon:{className:"bpModalDialogTitleCloseIcon"}},content:{className:"bpModalDialogContent"},newConversation:{button:{className:"bpModalDialogNewConversationButton"},text:{className:"bpModalDialogNewConversationText"}}}},fab:{container:{className:"bpReset bpFabContainer"},icon:{className:"bpFabIcon"}},notification:{container:{className:"bpReset bpNotificationContainer"},title:{className:"bpNotificationTitle"},description:{className:"bpNotificationDescription"},icon:{className:"bpNotificationIcon"},closeIcon:{className:"bpNotificationCloseIcon"}},header:{container:{className:"bpReset bpHeaderContainer"},content:{container:{className:"bpReset bpHeaderContentContainer"},title:{className:"bpHeaderContentTitle"},description:{className:"bpHeaderContentDescription"},avatar:{container:{className:"bpReset bpHeaderContentAvatarContainer"},image:{className:"bpHeaderContentAvatarImage"},fallback:{className:"bpHeaderContentAvatarFallback"}},actions:{container:{className:"bpReset bpHeaderContentActionsContainer"},icons:{className:"bpHeaderContentActionsIcons"}}},expandedContent:{container:{className:"bpReset bpHeaderExpandedContentContainer"},descriptionItems:{container:{className:"bpReset bpHeaderExpandedContentDescriptionItemsContainer"},icon:{className:"bpHeaderExpandedContentDescriptionItemsIcon"},text:{className:"bpHeaderExpandedContentDescriptionItemsText"},link:{className:"bpHeaderExpandedContentDescriptionItemsLink"}},group:{className:"bpHeaderExpandedContentGroup"}},newConversationIcon:{className:"bpHeaderNewConversationIcon"}},composer:{container:{className:"bpReset bpComposerContainer"},poweredBy:{className:"bpComposerPoweredBy"},input:{className:"bpComposerInput"},button:{container:{className:"bpReset bpComposerButtonContainer"},icon:{className:"bpComposerButtonIcon"}},uploadButton:{icon:{className:"bpComposerUploadButtonIcon"},container:{className:"bpReset bpComposerUploadButtonContainer"}},voiceButton:{icon:{className:"bpComposerVoiceButtonIcon"},container:{className:"bpReset bpComposerVoiceButtonContainer"}}},messageList:{scrollDownButton:{container:{className:"bpReset bpMessageListScrollDownButtonContainer"},button:{className:"bpMessageListScrollDownButtonButton"},icon:{className:"bpMessageListScrollDownButtonIcon"}},container:{className:"bpReset bpMessageListContainer"},viewPort:{className:"bpMessageListViewport"},marquee:{container:{className:"bpReset bpMessageListMarqueeContainer"},content:{className:"bpMessageListMarqueeContent"},title:{className:"bpMessageListMarqueeTitle"},description:{className:"bpMessageListMarqueeDescription"},avatar:{container:{className:"bpReset bpMessageListMarqueeAvatarContainer"},image:{className:"bpMessageListMarqueeAvatarImage"},fallback:{className:"bpMessageListMarqueeAvatarFallback"}}},headerMessage:{className:"bpMessageListHeaderMessage"}},message:{container:{className:"bpReset bpMessageContainer"},avatar:{container:{className:"bpReset bpMessageAvatarContainer"},image:{className:"bpMessageAvatarImage"},fallback:{className:"bpMessageAvatarFallback"}},blocks:{text:{heading1:{className:"bpMessageBlocksTextHeading1"},heading2:{className:"bpMessageBlocksTextHeading2"},heading3:{className:"bpMessageBlocksTextHeading3"},unorderedList:{className:"bpMessageBlocksTextUnorderedList"},orderedList:{className:"bpMessageBlocksTextOrderedList"},link:{className:"bpMessageBlocksTextLink"},italic:{className:"bpMessageBlocksTextItalic"},bold:{className:"bpMessageBlocksTextBold"},text:{className:"bpMessageBlocksTextText"},horizontalRule:{className:"bpMessageBlocksTextHorizontalRule"},listItem:{className:"bpMessageBlocksTextListItem"},lineBreak:{className:"bpMessageBlocksTextLineBreak"},pre:{className:"bpMessageBlocksTextPre"}},audio:{className:"bpMessageBlocksAudio"},image:{image:{className:"bpMessageBlocksImageImage"},placeholder:{className:"bpMessageBlocksImagePlaceholder"}},video:{className:"bpMessageBlocksVideo"},location:{container:{className:"bpMessageBlocksLocationContainer"},title:{className:"bpMessageBlocksLocationTitle"},icon:{className:"bpMessageBlocksLocationIcon"}},file:{container:{className:"bpMessageBlocksFileContainer"},title:{className:"bpMessageBlocksFileTitle"},icon:{className:"bpMessageBlocksFileIcon"}},row:{className:"bpMessageBlocksRow"},column:{className:"bpMessageBlocksColumn"},bubble:{className:"bpMessageBlocksBubble"},carousel:{container:{className:"bpMessageBlocksCarouselContainer"},slidesContainer:{className:"bpMessageBlocksCarouselSlidesContainer"},backButton:{className:"bpMessageBlocksCarouselBackButton"},nextButton:{className:"bpMessageBlocksCarouselNextButton"}},dropdown:{button:{container:{className:"bpMessageBlocksDropdownButtonContainer"},text:{className:"bpMessageBlocksDropdownButtonText"},icon:{className:"bpMessageBlocksDropdownButtonIcon"}},content:{container:{className:"bpMessageBlocksDropdownContentContainer"},item:{className:"bpMessageBlocksDropdownContentItem"}}},button:{className:"bpMessageBlocksButton"}}},typingIndicator:{container:{className:"bpTypingIndicatorContainer"},loader:{className:"bpTypingIndicatorLoader"}}},rj=({text:e})=>{const{message:{blocks:{text:t}}}=yt,n={h1:({node:r,...i})=>I.jsx("h1",{...i,...t==null?void 0:t.heading1}),h2:({node:r,...i})=>I.jsx("h2",{...i,...t==null?void 0:t.heading2}),h3:({node:r,...i})=>I.jsx("h3",{...i,...t==null?void 0:t.heading3}),h4:"h3",h5:"h3",h6:"h3",em:({node:r,...i})=>I.jsx("em",{...i,...t==null?void 0:t.italic}),strong:({node:r,...i})=>I.jsx("strong",{...i,...t==null?void 0:t.bold}),p:({node:r,...i})=>I.jsx("p",{...i,...t==null?void 0:t.text}),hr:({node:r,...i})=>I.jsx("hr",{...i,...t==null?void 0:t.horizontalRule}),a:({node:r,...i})=>I.jsx("a",{...i,...t==null?void 0:t.link,target:"_blank"}),ol:({node:r,...i})=>I.jsx("ol",{...i,...t==null?void 0:t.orderedList}),ul:({node:r,...i})=>I.jsx("ul",{...i,...t==null?void 0:t.unorderedList}),li:({node:r,...i})=>I.jsx("li",{...i,...t==null?void 0:t.listItem}),br:({node:r,...i})=>I.jsx("br",{...i,...t==null?void 0:t.lineBreak}),pre:({node:r,...i})=>I.jsx("pre",{...i,...t==null?void 0:t.pre})};return I.jsx(qN,{components:n,remarkPlugins:[nj,JN],children:e})},ij={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Ex=e=>{let t;const n=new Set,r=(c,f)=>{const d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){const p=t;t=f??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(m=>m(t,p))}},i=()=>t,u={setState:r,getState:i,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(ij?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},l=t=e(r,i,u);return u},aj=e=>e?Ex(e):Ex;var wd={exports:{}},Sd={},Ul={exports:{}},_d={};/**
|
|
55
|
+
`,...a.current()});return/^[\t ]/.test(l)&&(l="&#x"+l.charCodeAt(0).toString(16).toUpperCase()+";"+l.slice(1)),l=l?o+" "+l:o,n.options.closeAtx&&(l+=" "+o),u(),s(),l}ax.peek=YD;function ax(e){return e.value||""}function YD(){return"<"}ox.peek=JD;function ox(e,t,n,r){const i=vd(n),a=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let s=n.enter("label");const u=n.createTracker(r);let l=u.move("![");return l+=u.move(n.safe(e.alt,{before:l,after:"]",...u.current()})),l+=u.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(n.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(s=n.enter("destinationRaw"),l+=u.move(n.safe(e.url,{before:l,after:e.title?" ":")",...u.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=u.move(" "+i),l+=u.move(n.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),s()),l+=u.move(")"),o(),l}function JD(){return"!"}sx.peek=XD;function sx(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let o=n.enter("label");const s=n.createTracker(r);let u=s.move("![");const l=n.safe(e.alt,{before:u,after:"]",...s.current()});u+=s.move(l+"]["),o();const c=n.stack;n.stack=[],o=n.enter("reference");const f=n.safe(n.associationId(e),{before:u,after:"]",...s.current()});return o(),n.stack=c,a(),i==="full"||!l||l!==f?u+=s.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function XD(){return"!"}lx.peek=QD;function lx(e,t,n){let r=e.value||"",i="`",a=-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+" ");++a<n.unsafe.length;){const o=n.unsafe[a],s=n.compilePattern(o);let u;if(o.atBreak)for(;u=s.exec(r);){let l=u.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(u.index+1)}}return i+r+i}function QD(){return"`"}function ux(e,t){const n=qf(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))}cx.peek=eM;function cx(e,t,n,r){const i=vd(n),a=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let s,u;if(ux(e,n)){const c=n.stack;n.stack=[],s=n.enter("autolink");let f=o.move("<");return f+=o.move(n.containerPhrasing(e,{before:f,after:">",...o.current()})),f+=o.move(">"),s(),n.stack=c,f}s=n.enter("link"),u=n.enter("label");let l=o.move("[");return l+=o.move(n.containerPhrasing(e,{before:l,after:"](",...o.current()})),l+=o.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),l+=o.move("<"),l+=o.move(n.safe(e.url,{before:l,after:">",...o.current()})),l+=o.move(">")):(u=n.enter("destinationRaw"),l+=o.move(n.safe(e.url,{before:l,after:e.title?" ":")",...o.current()}))),u(),e.title&&(u=n.enter(`title${a}`),l+=o.move(" "+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),u()),l+=o.move(")"),s(),l}function eM(e,t,n){return ux(e,n)?"<":"["}fx.peek=tM;function fx(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let o=n.enter("label");const s=n.createTracker(r);let u=s.move("[");const l=n.containerPhrasing(e,{before:u,after:"]",...s.current()});u+=s.move(l+"]["),o();const c=n.stack;n.stack=[],o=n.enter("reference");const f=n.safe(n.associationId(e),{before:u,after:"]",...s.current()});return o(),n.stack=c,a(),i==="full"||!l||l!==f?u+=s.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function tM(){return"["}function yd(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 nM(e){const t=yd(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 rM(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 dx(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 iM(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let o=e.ordered?rM(n):yd(n);const s=e.ordered?o==="."?")":".":nM(n);let u=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&c&&(!c.children||!c.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&&(u=!0),dx(n)===o&&c){let f=-1;for(;++f<e.children.length;){const d=e.children[f];if(d&&d.type==="listItem"&&d.children&&d.children[0]&&d.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(o=s),n.bulletCurrent=o;const l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function aM(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 oM(e,t,n,r){const i=aM(n);let a=n.bulletCurrent||yd(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const s=n.createTracker(r);s.move(a+" ".repeat(o-a.length)),s.shift(o);const u=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,s.current()),c);return u(),l;function c(f,d,p){return d?(p?"":" ".repeat(o))+f:(p?a:a+" ".repeat(o-a.length))+f}}function sM(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),o=n.containerPhrasing(e,r);return a(),i(),o}const lM=Ml(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function uM(e,t,n,r){return(e.children.some(function(o){return lM(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function cM(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}px.peek=fM;function px(e,t,n,r){const i=cM(n),a=n.enter("strong"),o=n.createTracker(r);let s=o.move(i+i);return s+=o.move(n.containerPhrasing(e,{before:s,after:i,...o.current()})),s+=o.move(i+i),a(),s}function fM(e,t,n){return n.options.strong||"*"}function dM(e,t,n,r){return n.safe(e.value,r)}function pM(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 hM(e,t,n){const r=(dx(n)+(n.options.ruleSpaces?" ":"")).repeat(pM(n));return n.options.ruleSpaces?r.slice(0,-1):r}const hx={blockquote:jD,break:rx,code:qD,definition:HD,emphasis:ix,hardBreak:rx,heading:GD,html:ax,image:ox,imageReference:sx,inlineCode:lx,link:cx,linkReference:fx,list:iM,listItem:oM,paragraph:sM,root:uM,strong:px,text:dM,thematicBreak:hM};function mM(){return{enter:{table:vM,tableData:mx,tableHeader:mx,tableRow:gM},exit:{codeText:bM,table:yM,tableData:gd,tableHeader:gd,tableRow:gd}}}function vM(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 yM(e){this.exit(e),this.data.inTable=void 0}function gM(e){this.enter({type:"tableRow",children:[]},e)}function gd(e){this.exit(e)}function mx(e){this.enter({type:"tableCell",children:[]},e)}function bM(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,xM));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function xM(e,t){return t==="|"?t:e}function wM(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
56
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:o,tableCell:u,tableRow:s}};function o(p,h,m,y){return l(c(p,m,y),p.align)}function s(p,h,m,y){const v=f(p,m,y),g=l([v]);return g.slice(0,g.indexOf(`
|
|
57
|
+
`))}function u(p,h,m,y){const v=m.enter("tableCell"),g=m.enter("phrasing"),b=m.containerPhrasing(p,{...y,before:a,after:a});return g(),v(),b}function l(p,h){return DD(p,{align:h,alignDelimiters:r,padding:n,stringLength:i})}function c(p,h,m){const y=p.children;let v=-1;const g=[],b=h.enter("table");for(;++v<y.length;)g[v]=f(y[v],h,m);return b(),g}function f(p,h,m){const y=p.children;let v=-1;const g=[],b=h.enter("tableRow");for(;++v<y.length;)g[v]=u(y[v],p,h,m);return b(),g}function d(p,h,m){let y=hx.inlineCode(p,h,m);return m.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function SM(){return{exit:{taskListCheckValueChecked:vx,taskListCheckValueUnchecked:vx,paragraph:EM}}}function _M(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:kM}}}function vx(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function EM(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 a=-1,o;for(;++a<i.length;){const s=i[a];if(s.type==="paragraph"){o=s;break}}o===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 kM(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);a&&s.move(o);let u=hx.listItem(e,t,n,{...r,...s.current()});return a&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),u;function l(c){return c+o}}function TM(){return[rD(),mD(),$D(),mM(),SM()]}function OM(e){return{extensions:[iD(),vD(),ID(),wM(e),_M()]}}const CM={tokenize:NM,partial:!0},yx={tokenize:DM,partial:!0},gx={tokenize:MM,partial:!0},bx={tokenize:jM,partial:!0},$M={tokenize:LM,partial:!0},xx={name:"wwwAutolink",tokenize:PM,previous:Sx},wx={name:"protocolAutolink",tokenize:AM,previous:_x},Pr={name:"emailAutolink",tokenize:RM,previous:Ex},lr={};function IM(){return{text:lr}}let Ai=48;for(;Ai<123;)lr[Ai]=Pr,Ai++,Ai===58?Ai=65:Ai===91&&(Ai=97);lr[43]=Pr,lr[45]=Pr,lr[46]=Pr,lr[95]=Pr,lr[72]=[Pr,wx],lr[104]=[Pr,wx],lr[87]=[Pr,xx],lr[119]=[Pr,xx];function RM(e,t,n){const r=this;let i,a;return o;function o(f){return!bd(f)||!Ex.call(r,r.previous)||xd(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return bd(f)?(e.consume(f),s):f===64?(e.consume(f),u):n(f)}function u(f){return f===46?e.check($M,c,l)(f):f===45||f===95||en(f)?(a=!0,e.consume(f),u):c(f)}function l(f){return e.consume(f),i=!0,u}function c(f){return a&&i&&ln(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function PM(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!Sx.call(r,r.previous)||xd(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(CM,e.attempt(yx,e.attempt(gx,a),n),n)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function AM(e,t,n){const r=this;let i="",a=!1;return o;function o(f){return(f===72||f===104)&&_x.call(r,r.previous)&&!xd(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if(ln(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const d=i.toLowerCase();if(d==="http"||d==="https")return e.consume(f),u}return n(f)}function u(f){return f===47?(e.consume(f),a?l:(a=!0,u)):n(f)}function l(f){return f===null||kl(f)||vt(f)||Pi(f)||Tl(f)?n(f):e.attempt(yx,e.attempt(gx,c),n)(f)}function c(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function NM(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),a):n(o)}function a(o){return o===null?n(o):t(o)}}function DM(e,t,n){let r,i,a;return o;function o(l){return l===46||l===95?e.check(bx,u,s)(l):l===null||vt(l)||Pi(l)||l!==45&&Tl(l)?u(l):(a=!0,e.consume(l),o)}function s(l){return l===95?r=!0:(i=r,r=void 0),e.consume(l),o}function u(l){return i||r||!a?n(l):t(l)}}function MM(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(bx,t,a)(o):o===null||vt(o)||Pi(o)?t(o):(e.consume(o),i)}function a(o){return o===41&&r++,e.consume(o),i}}function jM(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),a):s===93?(e.consume(s),i):s===60||s===null||vt(s)||Pi(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||vt(s)||Pi(s)?t(s):r(s)}function a(s){return ln(s)?o(s):n(s)}function o(s){return s===59?(e.consume(s),r):ln(s)?(e.consume(s),o):n(s)}}function LM(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return en(a)?n(a):t(a)}}function Sx(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||vt(e)}function _x(e){return!ln(e)}function Ex(e){return!(e===47||bd(e))}function bd(e){return e===43||e===45||e===46||e===95||en(e)}function xd(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 FM={tokenize:ZM,partial:!0};function BM(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:VM,continuation:{tokenize:HM},exit:WM}},text:{91:{name:"gfmFootnoteCall",tokenize:qM},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:UM,resolveTo:zM}}}}function UM(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){o=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return s;function s(u){if(!o||!o._balanced)return n(u);const l=qn(r.sliceSerialize({start:o.end,end:r.now()}));return l.codePointAt(0)!==94||!a.includes(l.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function zM(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 a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function qM(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,o;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),u}function u(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(f){if(a>999||f===93&&!o||f===null||f===91||vt(f))return n(f);if(f===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(qn(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return vt(f)||(o=!0),a++,e.consume(f),f===92?c:l}function c(f){return f===91||f===92||f===93?(e.consume(f),a++,l):l(f)}}function VM(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o=0,s;return u;function u(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(h)}function c(h){if(o>999||h===93&&!s||h===null||h===91||vt(h))return n(h);if(h===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return a=qn(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return vt(h)||(s=!0),o++,e.consume(h),h===92?f:c}function f(h){return h===91||h===92||h===93?(e.consume(h),o++,c):c(h)}function d(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),i.includes(a)||i.push(a),Xe(e,p,"gfmFootnoteDefinitionWhitespace")):n(h)}function p(h){return t(h)}}function HM(e,t,n){return e.check(Ao,t,e.attempt(FM,t,n))}function WM(e){e.exit("gfmFootnoteDefinition")}function ZM(e,t,n){const r=this;return Xe(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(a):n(a)}}function KM(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,s){let u=-1;for(;++u<o.length;)if(o[u][0]==="enter"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._close){let l=u;for(;l--;)if(o[l][0]==="exit"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._open&&o[u][1].end.offset-o[u][1].start.offset===o[l][1].end.offset-o[l][1].start.offset){o[u][1].type="strikethroughSequence",o[l][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},o[l][1].start),end:Object.assign({},o[u][1].end)},f={type:"strikethroughText",start:Object.assign({},o[l][1].end),end:Object.assign({},o[u][1].start)},d=[["enter",c,s],["enter",o[l][1],s],["exit",o[l][1],s],["enter",f,s]],p=s.parser.constructs.insideSpan.null;p&&Rn(d,d.length,0,Cl(p,o.slice(l+1,u),s)),Rn(d,d.length,0,[["exit",f,s],["enter",o[u][1],s],["exit",o[u][1],s],["exit",c,s]]),Rn(o,l-1,u-l+3,d),u=l+d.length-2;break}}for(u=-1;++u<o.length;)o[u][1].type==="strikethroughSequenceTemporary"&&(o[u][1].type="data");return o}function a(o,s,u){const l=this.previous,c=this.events;let f=0;return d;function d(h){return l===126&&c[c.length-1][1].type!=="characterEscape"?u(h):(o.enter("strikethroughSequenceTemporary"),p(h))}function p(h){const m=Ol(l);if(h===126)return f>1?u(h):(o.consume(h),f++,p);if(f<2&&!n)return u(h);const y=o.exit("strikethroughSequenceTemporary"),v=Ol(h);return y._open=!v||v===2&&!!m,y._close=!m||m===2&&!!v,s(h)}}}class GM{constructor(){this.map=[]}add(t,n,r){YM(this,t,n,r)}consume(t){if(this.map.sort(function(a,o){return a[0]-o[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 YM(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 JM(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 a=r.length-1;r[a]=r[a]==="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 XM(){return{flow:{null:{name:"table",tokenize:QM,resolveAll:ej}}}}function QM(e,t,n){const r=this;let i=0,a=0,o;return s;function s(T){let I=r.events.length-1;for(;I>-1;){const F=r.events[I][1].type;if(F==="lineEnding"||F==="linePrefix")I--;else break}const U=I>-1?r.events[I][1].type:null,R=U==="tableHead"||U==="tableRow"?E:u;return R===E&&r.parser.lazy[r.now().line]?n(T):R(T)}function u(T){return e.enter("tableHead"),e.enter("tableRow"),l(T)}function l(T){return T===124||(o=!0,a+=1),c(T)}function c(T){return T===null?n(T):Re(T)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),p):n(T):We(T)?Xe(e,c,"whitespace")(T):(a+=1,o&&(o=!1,i+=1),T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),o=!0,c):(e.enter("data"),f(T)))}function f(T){return T===null||T===124||vt(T)?(e.exit("data"),c(T)):(e.consume(T),T===92?d:f)}function d(T){return T===92||T===124?(e.consume(T),f):f(T)}function p(T){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(T):(e.enter("tableDelimiterRow"),o=!1,We(T)?Xe(e,h,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):h(T))}function h(T){return T===45||T===58?y(T):T===124?(o=!0,e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),m):S(T)}function m(T){return We(T)?Xe(e,y,"whitespace")(T):y(T)}function y(T){return T===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),v):T===45?(a+=1,v(T)):T===null||Re(T)?k(T):S(T)}function v(T){return T===45?(e.enter("tableDelimiterFiller"),g(T)):S(T)}function g(T){return T===45?(e.consume(T),g):T===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(T))}function b(T){return We(T)?Xe(e,k,"whitespace")(T):k(T)}function k(T){return T===124?h(T):T===null||Re(T)?!o||i!==a?S(T):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(T)):S(T)}function S(T){return n(T)}function E(T){return e.enter("tableRow"),O(T)}function O(T){return T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),O):T===null||Re(T)?(e.exit("tableRow"),t(T)):We(T)?Xe(e,O,"whitespace")(T):(e.enter("data"),j(T))}function j(T){return T===null||T===124||vt(T)?(e.exit("data"),O(T)):(e.consume(T),T===92?q:j)}function q(T){return T===92||T===124?(e.consume(T),j):j(T)}}function ej(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,u=0,l,c,f;const d=new GM;for(;++n<e.length;){const p=e[n],h=p[1];p[0]==="enter"?h.type==="tableHead"?(s=!1,u!==0&&(kx(d,t,u,l,c),c=void 0,u=0),l={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},d.add(n,0,[["enter",l,t]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(r=!0,f=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,c={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},d.add(n,0,[["enter",c,t]])),i=h.type==="tableDelimiterRow"?2:c?3:1):i&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],f=Bl(d,t,a,i,void 0,f),a=[0,0,0,0]),o[2]=n)):h.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],f=Bl(d,t,a,i,void 0,f)),a=o,o=[a[1],n,0,0])):h.type==="tableHead"?(s=!0,u=n):h.type==="tableRow"||h.type==="tableDelimiterRow"?(u=n,a[1]!==0?(o[0]=o[1],f=Bl(d,t,a,i,n,f)):o[1]!==0&&(f=Bl(d,t,o,i,n,f)),i=0):i&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(o[3]=n)}for(u!==0&&kx(d,t,u,l,c),d.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=JM(t.events,n))}return e}function Bl(e,t,n,r,i,a){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(a.end=Object.assign({},ua(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const u=ua(t.events,n[1]);if(a={type:o,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const l=ua(t.events,n[2]),c=ua(t.events,n[3]),f={type:s,start:Object.assign({},l),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const d=t.events[n[2]],p=t.events[n[3]];if(d[1].end=Object.assign({},p[1].end),d[1].type="chunkText",d[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",f,t]])}return i!==void 0&&(a.end=Object.assign({},ua(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function kx(e,t,n,r,i){const a=[],o=ua(t.events,n);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),r.end=Object.assign({},o),a.push(["exit",r,t]),e.add(n+1,0,a)}function ua(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const tj={name:"tasklistCheck",tokenize:rj};function nj(){return{text:{91:tj}}}function rj(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),a)}function a(u){return vt(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),o):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),o):n(u)}function o(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(u)}function s(u){return Re(u)?t(u):We(u)?e.check({tokenize:ij},t,n)(u):n(u)}}function ij(e,t,n){return Xe(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function aj(e){return eb([IM(),BM(),KM(e),XM(),nj()])}const oj={};function sj(e){const t=this,n=e||oj,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(aj(n)),a.push(TM()),o.push(OM(n))}const yt={container:{className:"bpReset bpContainer bpFont"},loader:{className:"bpReset bpLoader"},modal:{container:{className:"bpReset bpModalContainer"},overlay:{className:"bpModalOverlay"},dialog:{container:{className:"bpReset bpModalDialogContainer"},title:{container:{className:"bpReset bpModalDialogTitleContainer"},text:{className:"bpModalDialogTitleText"},closeIcon:{className:"bpModalDialogTitleCloseIcon"}},content:{className:"bpModalDialogContent"},newConversation:{button:{className:"bpModalDialogNewConversationButton"},text:{className:"bpModalDialogNewConversationText"}}}},fab:{container:{className:"bpReset bpFabContainer"},icon:{className:"bpFabIcon"}},notification:{container:{className:"bpReset bpNotificationContainer"},title:{className:"bpNotificationTitle"},description:{className:"bpNotificationDescription"},icon:{className:"bpNotificationIcon"},closeIcon:{className:"bpNotificationCloseIcon"}},header:{container:{className:"bpReset bpHeaderContainer"},content:{container:{className:"bpReset bpHeaderContentContainer"},title:{className:"bpHeaderContentTitle"},description:{className:"bpHeaderContentDescription"},avatar:{container:{className:"bpReset bpHeaderContentAvatarContainer"},image:{className:"bpHeaderContentAvatarImage"},fallback:{className:"bpHeaderContentAvatarFallback"}},actions:{container:{className:"bpReset bpHeaderContentActionsContainer"},icons:{className:"bpHeaderContentActionsIcons"}}},expandedContent:{container:{className:"bpReset bpHeaderExpandedContentContainer"},descriptionItems:{container:{className:"bpReset bpHeaderExpandedContentDescriptionItemsContainer"},icon:{className:"bpHeaderExpandedContentDescriptionItemsIcon"},text:{className:"bpHeaderExpandedContentDescriptionItemsText"},link:{className:"bpHeaderExpandedContentDescriptionItemsLink"}},group:{className:"bpHeaderExpandedContentGroup"}},newConversationIcon:{className:"bpHeaderNewConversationIcon"}},composer:{container:{className:"bpReset bpComposerContainer"},poweredBy:{className:"bpComposerPoweredBy"},input:{className:"bpComposerInput"},button:{container:{className:"bpReset bpComposerButtonContainer"},icon:{className:"bpComposerButtonIcon"}},uploadButton:{icon:{className:"bpComposerUploadButtonIcon"},container:{className:"bpReset bpComposerUploadButtonContainer"}},voiceButton:{icon:{className:"bpComposerVoiceButtonIcon"},container:{className:"bpReset bpComposerVoiceButtonContainer"}}},messageList:{scrollDownButton:{container:{className:"bpReset bpMessageListScrollDownButtonContainer"},button:{className:"bpMessageListScrollDownButtonButton"},icon:{className:"bpMessageListScrollDownButtonIcon"}},container:{className:"bpReset bpMessageListContainer"},viewPort:{className:"bpMessageListViewport"},marquee:{container:{className:"bpReset bpMessageListMarqueeContainer"},content:{className:"bpMessageListMarqueeContent"},title:{className:"bpMessageListMarqueeTitle"},description:{className:"bpMessageListMarqueeDescription"},avatar:{container:{className:"bpReset bpMessageListMarqueeAvatarContainer"},image:{className:"bpMessageListMarqueeAvatarImage"},fallback:{className:"bpMessageListMarqueeAvatarFallback"}}},headerMessage:{className:"bpMessageListHeaderMessage"}},message:{container:{className:"bpReset bpMessageContainer"},avatar:{container:{className:"bpReset bpMessageAvatarContainer"},image:{className:"bpMessageAvatarImage"},fallback:{className:"bpMessageAvatarFallback"}},blocks:{text:{heading1:{className:"bpMessageBlocksTextHeading1"},heading2:{className:"bpMessageBlocksTextHeading2"},heading3:{className:"bpMessageBlocksTextHeading3"},unorderedList:{className:"bpMessageBlocksTextUnorderedList"},orderedList:{className:"bpMessageBlocksTextOrderedList"},link:{className:"bpMessageBlocksTextLink"},italic:{className:"bpMessageBlocksTextItalic"},bold:{className:"bpMessageBlocksTextBold"},text:{className:"bpMessageBlocksTextText"},horizontalRule:{className:"bpMessageBlocksTextHorizontalRule"},listItem:{className:"bpMessageBlocksTextListItem"},lineBreak:{className:"bpMessageBlocksTextLineBreak"},pre:{className:"bpMessageBlocksTextPre"}},audio:{className:"bpMessageBlocksAudio"},image:{image:{className:"bpMessageBlocksImageImage"},placeholder:{className:"bpMessageBlocksImagePlaceholder"}},video:{className:"bpMessageBlocksVideo"},location:{container:{className:"bpMessageBlocksLocationContainer"},title:{className:"bpMessageBlocksLocationTitle"},icon:{className:"bpMessageBlocksLocationIcon"}},file:{container:{className:"bpMessageBlocksFileContainer"},title:{className:"bpMessageBlocksFileTitle"},icon:{className:"bpMessageBlocksFileIcon"}},row:{className:"bpMessageBlocksRow"},column:{className:"bpMessageBlocksColumn"},bubble:{className:"bpMessageBlocksBubble"},carousel:{container:{className:"bpMessageBlocksCarouselContainer"},slidesContainer:{className:"bpMessageBlocksCarouselSlidesContainer"},backButton:{className:"bpMessageBlocksCarouselBackButton"},nextButton:{className:"bpMessageBlocksCarouselNextButton"}},dropdown:{button:{container:{className:"bpMessageBlocksDropdownButtonContainer"},text:{className:"bpMessageBlocksDropdownButtonText"},icon:{className:"bpMessageBlocksDropdownButtonIcon"}},content:{container:{className:"bpMessageBlocksDropdownContentContainer"},item:{className:"bpMessageBlocksDropdownContentItem"}}},button:{className:"bpMessageBlocksButton"}}},typingIndicator:{container:{className:"bpTypingIndicatorContainer"},loader:{className:"bpTypingIndicatorLoader"}}},lj=({text:e})=>{const{message:{blocks:{text:t}}}=yt,n={h1:({node:r,...i})=>$.jsx("h1",{...i,...t==null?void 0:t.heading1}),h2:({node:r,...i})=>$.jsx("h2",{...i,...t==null?void 0:t.heading2}),h3:({node:r,...i})=>$.jsx("h3",{...i,...t==null?void 0:t.heading3}),h4:"h3",h5:"h3",h6:"h3",em:({node:r,...i})=>$.jsx("em",{...i,...t==null?void 0:t.italic}),strong:({node:r,...i})=>$.jsx("strong",{...i,...t==null?void 0:t.bold}),p:({node:r,...i})=>$.jsx("p",{...i,...t==null?void 0:t.text}),hr:({node:r,...i})=>$.jsx("hr",{...i,...t==null?void 0:t.horizontalRule}),a:({node:r,...i})=>$.jsx("a",{...i,...t==null?void 0:t.link,target:"_blank"}),ol:({node:r,...i})=>$.jsx("ol",{...i,...t==null?void 0:t.orderedList}),ul:({node:r,...i})=>$.jsx("ul",{...i,...t==null?void 0:t.unorderedList}),li:({node:r,...i})=>$.jsx("li",{...i,...t==null?void 0:t.listItem}),br:({node:r,...i})=>$.jsx("br",{...i,...t==null?void 0:t.lineBreak}),pre:({node:r,...i})=>$.jsx("pre",{...i,...t==null?void 0:t.pre})};return $.jsx(KN,{components:n,remarkPlugins:[sj,nD],children:e})},uj={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Tx=e=>{let t;const n=new Set,r=(c,f)=>{const d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){const p=t;t=f??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(h=>h(t,p))}},i=()=>t,u={setState:r,getState:i,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(uj?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},l=t=e(r,i,u);return u},cj=e=>e?Tx(e):Tx;var wd={exports:{}},Sd={},Ul={exports:{}},_d={};/**
|
|
58
58
|
* @license React
|
|
59
59
|
* use-sync-external-store-shim.production.min.js
|
|
60
60
|
*
|
|
@@ -62,7 +62,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
62
62
|
*
|
|
63
63
|
* This source code is licensed under the MIT license found in the
|
|
64
64
|
* LICENSE file in the root directory of this source tree.
|
|
65
|
-
*/var
|
|
65
|
+
*/var Ox;function fj(){if(Ox)return _d;Ox=1;var e=M;function t(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,a=e.useLayoutEffect,o=e.useDebugValue;function s(f,d){var p=d(),h=r({inst:{value:p,getSnapshot:d}}),m=h[0].inst,y=h[1];return a(function(){m.value=p,m.getSnapshot=d,u(m)&&y({inst:m})},[f,p,d]),i(function(){return u(m)&&y({inst:m}),f(function(){u(m)&&y({inst:m})})},[f]),o(p),p}function u(f){var d=f.getSnapshot;f=f.value;try{var p=d();return!n(f,p)}catch{return!0}}function l(f,d){return d()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:s;return _d.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:c,_d}var Ed={};/**
|
|
66
66
|
* @license React
|
|
67
67
|
* use-sync-external-store-shim.development.js
|
|
68
68
|
*
|
|
@@ -70,7 +70,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
70
70
|
*
|
|
71
71
|
* This source code is licensed under the MIT license found in the
|
|
72
72
|
* LICENSE file in the root directory of this source tree.
|
|
73
|
-
*/var
|
|
73
|
+
*/var Cx;function dj(){return Cx||(Cx=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=M,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(b){{for(var k=arguments.length,S=new Array(k>1?k-1:0),E=1;E<k;E++)S[E-1]=arguments[E];r("error",b,S)}}function r(b,k,S){{var E=t.ReactDebugCurrentFrame,O=E.getStackAddendum();O!==""&&(k+="%s",S=S.concat([O]));var j=S.map(function(q){return String(q)});j.unshift("Warning: "+k),Function.prototype.apply.call(console[b],console,j)}}function i(b,k){return b===k&&(b!==0||1/b===1/k)||b!==b&&k!==k}var a=typeof Object.is=="function"?Object.is:i,o=e.useState,s=e.useEffect,u=e.useLayoutEffect,l=e.useDebugValue,c=!1,f=!1;function d(b,k,S){c||e.startTransition!==void 0&&(c=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var E=k();if(!f){var O=k();a(E,O)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var j=o({inst:{value:E,getSnapshot:k}}),q=j[0].inst,T=j[1];return u(function(){q.value=E,q.getSnapshot=k,p(q)&&T({inst:q})},[b,E,k]),s(function(){p(q)&&T({inst:q});var I=function(){p(q)&&T({inst:q})};return b(I)},[b]),l(E),E}function p(b){var k=b.getSnapshot,S=b.value;try{var E=k();return!a(S,E)}catch{return!0}}function h(b,k,S){return k()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",y=!m,v=y?h:d,g=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v;Ed.useSyncExternalStore=g,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Ed}var $x;function Ix(){return $x||($x=1,process.env.NODE_ENV==="production"?Ul.exports=fj():Ul.exports=dj()),Ul.exports}/**
|
|
74
74
|
* @license React
|
|
75
75
|
* use-sync-external-store-shim/with-selector.production.min.js
|
|
76
76
|
*
|
|
@@ -78,7 +78,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
78
78
|
*
|
|
79
79
|
* This source code is licensed under the MIT license found in the
|
|
80
80
|
* LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/var
|
|
81
|
+
*/var Rx;function pj(){if(Rx)return Sd;Rx=1;var e=M,t=Ix();function n(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,s=e.useMemo,u=e.useDebugValue;return Sd.useSyncExternalStoreWithSelector=function(l,c,f,d,p){var h=a(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=s(function(){function v(E){if(!g){if(g=!0,b=E,E=d(E),p!==void 0&&m.hasValue){var O=m.value;if(p(O,E))return k=O}return k=E}if(O=k,r(b,E))return O;var j=d(E);return p!==void 0&&p(O,j)?O:(b=E,k=j)}var g=!1,b,k,S=f===void 0?null:f;return[function(){return v(c())},S===null?void 0:function(){return v(S())}]},[c,f,d,p]);var y=i(l,h[0],h[1]);return o(function(){m.hasValue=!0,m.value=y},[y]),u(y),y},Sd}var kd={};/**
|
|
82
82
|
* @license React
|
|
83
83
|
* use-sync-external-store-shim/with-selector.development.js
|
|
84
84
|
*
|
|
@@ -86,11 +86,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
86
86
|
*
|
|
87
87
|
* This source code is licensed under the MIT license found in the
|
|
88
88
|
* LICENSE file in the root directory of this source tree.
|
|
89
|
-
*/var
|
|
89
|
+
*/var Px;function hj(){return Px||(Px=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=M,t=Ix();function n(c,f){return c===f&&(c!==0||1/c===1/f)||c!==c&&f!==f}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,s=e.useMemo,u=e.useDebugValue;function l(c,f,d,p,h){var m=a(null),y;m.current===null?(y={hasValue:!1,value:null},m.current=y):y=m.current;var v=s(function(){var S=!1,E,O,j=function(U){if(!S){S=!0,E=U;var R=p(U);if(h!==void 0&&y.hasValue){var F=y.value;if(h(F,R))return O=F,F}return O=R,R}var N=E,L=O;if(r(N,U))return L;var W=p(U);return h!==void 0&&h(L,W)?L:(E=U,O=W,W)},q=d===void 0?null:d,T=function(){return j(f())},I=q===null?void 0:function(){return j(q())};return[T,I]},[f,d,p,h]),g=v[0],b=v[1],k=i(c,g,b);return o(function(){y.hasValue=!0,y.value=k},[k]),u(k),k}kd.useSyncExternalStoreWithSelector=l,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),kd}process.env.NODE_ENV==="production"?wd.exports=pj():wd.exports=hj();var mj=wd.exports;const vj=Ke(mj),Ax={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:yj}=M,{useSyncExternalStoreWithSelector:gj}=vj;let Nx=!1;const bj=e=>e;function xj(e,t=bj,n){(Ax?"production":void 0)!=="production"&&n&&!Nx&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Nx=!0);const r=gj(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return yj(r),r}const wj=e=>{(Ax?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?cj(e):e,n=(r,i)=>xj(t,r,i);return Object.assign(n,t),n},Lo=e=>wj,zl={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Td=new Map,ql=e=>{const t=Td.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},Sj=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=Td.get(n.name);if(r)return{type:"tracked",store:e,...r};const i={connection:t.connect(n),stores:{}};return Td.set(n.name,i),{type:"tracked",store:e,...i}},Vl=(e,t={})=>(n,r,i)=>{const{enabled:a,anonymousActionType:o,store:s,...u}=t;let l;try{l=(a??(zl?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!l)return(zl?"production":void 0)!=="production"&&a&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(n,r,i);const{connection:c,...f}=Sj(s,l,u);let d=!0;i.setState=(m,y,v)=>{const g=n(m,y);if(!d)return g;const b=v===void 0?{type:o||"anonymous"}:typeof v=="string"?{type:v}:v;return s===void 0?(c==null||c.send(b,r()),g):(c==null||c.send({...b,type:`${s}/${b.type}`},{...ql(u.name),[s]:i.getState()}),g)};const p=(...m)=>{const y=d;d=!1,n(...m),d=y},h=e(i.setState,r,i);if(f.type==="untracked"?c==null||c.init(h):(f.stores[f.store]=i,c==null||c.init(Object.fromEntries(Object.entries(f.stores).map(([m,y])=>[m,m===f.store?h:y.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let m=!1;const y=i.dispatch;i.dispatch=(...v)=>{(zl?"production":void 0)!=="production"&&v[0].type==="__setState"&&!m&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),m=!0),y(...v)}}return c.subscribe(m=>{var y;switch(m.type){case"ACTION":if(typeof m.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Od(m.payload,v=>{if(v.type==="__setState"){if(s===void 0){p(v.state);return}Object.keys(v.state).length!==1&&console.error(`
|
|
90
90
|
[zustand devtools middleware] Unsupported __setState action format.
|
|
91
91
|
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
|
|
92
92
|
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|
|
93
|
-
`);const g=v.state[s];if(g==null)return;JSON.stringify(i.getState())!==JSON.stringify(g)&&p(g);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(v)});case"DISPATCH":switch(h.payload.type){case"RESET":return p(m),s===void 0?c==null?void 0:c.init(i.getState()):c==null?void 0:c.init(ql(u.name));case"COMMIT":if(s===void 0){c==null||c.init(i.getState());return}return c==null?void 0:c.init(ql(u.name));case"ROLLBACK":return Od(h.state,v=>{if(s===void 0){p(v),c==null||c.init(i.getState());return}p(v[s]),c==null||c.init(ql(u.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Od(h.state,v=>{if(s===void 0){p(v);return}JSON.stringify(i.getState())!==JSON.stringify(v[s])&&p(v[s])});case"IMPORT_STATE":{const{nextLiftedState:v}=h.payload,g=(y=v.computedStates.slice(-1)[0])==null?void 0:y.state;if(!g)return;p(s===void 0?g:g[s]),c==null||c.send(null,v);return}case"PAUSE_RECORDING":return d=!d}return}}),m},Od=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)};function gj(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var a;const o=u=>u===null?null:JSON.parse(u,void 0),s=(a=n.getItem(i))!=null?a:null;return s instanceof Promise?s.then(o):o(s)},setItem:(i,a)=>n.setItem(i,JSON.stringify(a,void 0)),removeItem:i=>n.removeItem(i)}}const Fo=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Fo(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Fo(r)(n)}}}},bj=(e,t)=>(n,r,i)=>{let a={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:y=>y,version:0,merge:(y,v)=>({...v,...y}),...t},o=!1;const s=new Set,u=new Set;let l;try{l=a.getStorage()}catch{}if(!l)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...y)},r,i);const c=Fo(a.serialize),f=()=>{const y=a.partialize({...r()});let v;const g=c({state:y,version:a.version}).then(b=>l.setItem(a.name,b)).catch(b=>{v=b});if(v)throw v;return g},d=i.setState;i.setState=(y,v)=>{d(y,v),f()};const p=e((...y)=>{n(...y),f()},r,i);let m;const h=()=>{var y;if(!l)return;o=!1,s.forEach(g=>g(r()));const v=((y=a.onRehydrateStorage)==null?void 0:y.call(a,r()))||void 0;return Fo(l.getItem.bind(l))(a.name).then(g=>{if(g)return a.deserialize(g)}).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==a.version){if(a.migrate)return a.migrate(g.state,g.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return g.state}).then(g=>{var b;return m=a.merge(g,(b=r())!=null?b:p),n(m,!0),f()}).then(()=>{v==null||v(m,void 0),o=!0,u.forEach(g=>g(m))}).catch(g=>{v==null||v(void 0,g)})};return i.persist={setOptions:y=>{a={...a,...y},y.getStorage&&(l=y.getStorage())},clearStorage:()=>{l==null||l.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>o,onHydrate:y=>(s.add(y),()=>{s.delete(y)}),onFinishHydration:y=>(u.add(y),()=>{u.delete(y)})},h(),m||p},xj=(e,t)=>(n,r,i)=>{let a={storage:gj(()=>localStorage),partialize:h=>h,version:0,merge:(h,y)=>({...y,...h}),...t},o=!1;const s=new Set,u=new Set;let l=a.storage;if(!l)return e((...h)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...h)},r,i);const c=()=>{const h=a.partialize({...r()});return l.setItem(a.name,{state:h,version:a.version})},f=i.setState;i.setState=(h,y)=>{f(h,y),c()};const d=e((...h)=>{n(...h),c()},r,i);i.getInitialState=()=>d;let p;const m=()=>{var h,y;if(!l)return;o=!1,s.forEach(g=>{var b;return g((b=r())!=null?b:d)});const v=((y=a.onRehydrateStorage)==null?void 0:y.call(a,(h=r())!=null?h:d))||void 0;return Fo(l.getItem.bind(l))(a.name).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==a.version){if(a.migrate)return[!0,a.migrate(g.state,g.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,g.state];return[!1,void 0]}).then(g=>{var b;const[k,S]=g;if(p=a.merge(S,(b=r())!=null?b:d),n(p,!0),k)return c()}).then(()=>{v==null||v(p,void 0),p=r(),o=!0,u.forEach(g=>g(p))}).catch(g=>{v==null||v(void 0,g)})};return i.persist={setOptions:h=>{a={...a,...h},h.storage&&(l=h.storage)},clearStorage:()=>{l==null||l.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>m(),hasHydrated:()=>o,onHydrate:h=>(s.add(h),()=>{s.delete(h)}),onFinishHydration:h=>(u.add(h),()=>{u.delete(h)})},a.skipHydration||m(),p||d},Ax=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((zl?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),bj(e,t)):xj(e,t),Nx=Lo()(Vl(Ax(e=>({messageHistory:[],addMessageToHistory:t=>e(n=>({...n,messageHistory:[t,...(n.messageHistory??[]).slice(0,100)]}))}),{name:"botpress-message-history"}))),Bo=Lo()(Vl(e=>({messages:[],isFetching:!1,setMessages:t=>e({messages:t}),addMessage:t=>e(({messages:n})=>{var i;const r=(i=t.metadata)==null?void 0:i.clientMessageId;if(r){const a=n.findIndex(o=>{var s;return((s=o.metadata)==null?void 0:s.clientMessageId)===r});if(a!==-1)return{messages:[...n.slice(0,a),t,...n.slice(a+1)]}}return{messages:[...n.filter(a=>a.id!==t.id),t]}}),updateMessage:(t,n)=>e(({messages:r})=>({messages:r.map(i=>i.id===t?{...i,...n}:i)})),clearMessages:()=>e({messages:[]}),fetchMessages:async({client:t,userKey:n,conversationId:r})=>{const i=[];e({isFetching:!0});let a;do{const o=await t.listConversationMessages({id:r,"x-user-key":n,nextToken:a});i.push(...o.messages),a=o.meta.nextToken}while(a);return e({isFetching:!1}),i.reverse()}}),{name:"messagesStore"})),wj=e=>Lo()(Vl(Ax(t=>({setUser:n=>t(r=>({...r,user:n})),setConversationId:n=>t(r=>({...r,conversationId:n})),clearAll:()=>{t(n=>({...n,messageHistory:{},user:void 0,conversationId:void 0}))}}),{name:e}))),so=class so{constructor(){}static getInstance(t="bp-webchat"){return so._instances[t]||(so._instances[t]=wj(t)),so._instances[t]}};_e(so,"_instances",{});let Cd=so;const Dx=Cd.getInstance,Hl=Lo()(Vl(e=>({eventEmitter:E$,messageContainerRef:{current:null},setMessageContainerRef:t=>e({messageContainerRef:t})}),{name:"webchatStore"})),Sj=({text:e,buttonValue:t,variant:n,groupId:r,reusable:i,sendMessage:a,isReadOnly:o,...s})=>{const u=Hl(v=>v.eventEmitter),[l,c]=j.useState(!1),[f,d]=j.useState(!1),[p,m]=j.useState(!1),{message:{blocks:{button:h}}}=yt;j.useEffect(()=>{if(r)return u.on(`button-group-${r}-click`,()=>{d(!0),i||m(!0)})},[u,r,i]);function y(){r&&u.emit(`button-group-${r}-click`),c(!0),i||m(!0),n!=="link"&&(a==null||a({type:"text",text:t}))}return I.jsx(_j,{...s,variant:n,onClick:y,disabled:p||o,"data-activated":l?"":void 0,"data-group-activated":f?"":void 0,"data-type":n,value:t,...h,children:e})},_j=e=>{if(e.variant==="link"){const{value:r,variant:i,...a}=e;return I.jsx("a",{...a,href:r,target:"_blank",rel:"noopener noreferrer"})}const{variant:t,...n}=e;return I.jsx("button",{type:"button",...n})},Mx=j.forwardRef(({block:e,direction:t,timestamp:n,sender:r,metadata:i,sendMessage:a,messageId:o,...s},u)=>{const{message:{blocks:{bubble:l}}}=yt;return I.jsx("div",{"data-direction":t,...s,...l,ref:u,children:I.jsx(ba,{block:{...e,direction:t,timestamp:n,sender:r,messageId:o,sendMessage:a},direction:t,timestamp:n,sender:r,metadata:i,sendMessage:a,messageId:o})})});Mx.displayName="Bubble";const jx=j.createContext(null);function Ej(){const e=j.useContext(jx);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const Lx=j.createContext(null);function Fx(){const e=j.useContext(Lx);if(!e)throw new Error("useModalContext must be used within a ModalProvider");return e}const kj=(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 a=new Image;a.addEventListener("load",()=>{i&&clearTimeout(i),n({width:a.naturalWidth,height:a.naturalHeight})}),a.addEventListener("error",o=>{i&&clearTimeout(i),r(`${o.type}: ${o.message}`)}),a.src=e,t.timeout&&(i=setTimeout(()=>r("Timeout"),t.timeout))});let Tj={data:""},Oj=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||Tj,Cj=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,$j=/\/\*[^]*?\*\/| +/g,Bx=/\n+/g,Qr=(e,t)=>{let n="",r="",i="";for(let a in e){let o=e[a];a[0]=="@"?a[1]=="i"?n=a+" "+o+";":r+=a[1]=="f"?Qr(o,a):a+"{"+Qr(o,a[1]=="k"?"":t)+"}":typeof o=="object"?r+=Qr(o,t?t.replace(/([^,])+/g,s=>a.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,u=>/&/.test(u)?u.replace(/&/g,s):s?s+" "+u:u)):a):o!=null&&(a=/^--/.test(a)?a:a.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=Qr.p?Qr.p(a,o):a+":"+o+";")}return n+(t&&i?t+"{"+i+"}":i)+r},Ar={},Ux=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Ux(e[n]);return t}return e},Ij=(e,t,n,r,i)=>{let a=Ux(e),o=Ar[a]||(Ar[a]=(u=>{let l=0,c=11;for(;l<u.length;)c=101*c+u.charCodeAt(l++)>>>0;return"go"+c})(a));if(!Ar[o]){let u=a!==e?e:(l=>{let c,f,d=[{}];for(;c=Cj.exec(l.replace($j,""));)c[4]?d.shift():c[3]?(f=c[3].replace(Bx," ").trim(),d.unshift(d[0][f]=d[0][f]||{})):d[0][c[1]]=c[2].replace(Bx," ").trim();return d[0]})(e);Ar[o]=Qr(i?{["@keyframes "+o]:u}:u,n?"":"."+o)}let s=n&&Ar.g?Ar.g:null;return n&&(Ar.g=Ar[o]),((u,l,c,f)=>{f?l.data=l.data.replace(f,u):l.data.indexOf(u)===-1&&(l.data=c?u+l.data:l.data+u)})(Ar[o],t,r,s),o},Rj=(e,t,n)=>e.reduce((r,i,a)=>{let o=t[a];if(o&&o.call){let s=o(n),u=s&&s.props&&s.props.className||/^go/.test(s)&&s;o=u?"."+u:s&&typeof s=="object"?s.props?"":Qr(s,""):s===!1?"":s}return r+i+(o??"")},"");function Wl(e){let t=this||{},n=e.call?e(t.p):e;return Ij(n.unshift?n.raw?Rj(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,Oj(t.target),t.g,t.o,t.k)}let zx,$d,Id;Wl.bind({g:1});let Nr=Wl.bind({k:1});function Pj(e,t,n,r){Qr.p=t,zx=e,$d=n,Id=r}function ei(e,t){let n=this||{};return function(){let r=arguments;function i(a,o){let s=Object.assign({},a),u=s.className||i.className;n.p=Object.assign({theme:$d&&$d()},s),n.o=/ *go\d+/.test(u),s.className=Wl.apply(n,r)+(u?" "+u:"");let l=e;return e[0]&&(l=s.as||e,delete s.as),Id&&l[0]&&Id(s),zx(l,s)}return i}}var Aj=e=>typeof e=="function",Zl=(e,t)=>Aj(e)?e(t):e,Nj=(()=>{let e=0;return()=>(++e).toString()})(),qx=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),Dj=20,Kl=new Map,Mj=1e3,Vx=e=>{if(Kl.has(e))return;let t=setTimeout(()=>{Kl.delete(e),Ni({type:4,toastId:e})},Mj);Kl.set(e,t)},jj=e=>{let t=Kl.get(e);t&&clearTimeout(t)},Rd=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,Dj)};case 1:return t.toast.id&&jj(t.toast.id),{...e,toasts:e.toasts.map(a=>a.id===t.toast.id?{...a,...t.toast}:a)};case 2:let{toast:n}=t;return e.toasts.find(a=>a.id===n.id)?Rd(e,{type:1,toast:n}):Rd(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?Vx(r):e.toasts.forEach(a=>{Vx(a.id)}),{...e,toasts:e.toasts.map(a=>a.id===r||r===void 0?{...a,visible:!1}:a)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(a=>a.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(a=>({...a,pauseDuration:a.pauseDuration+i}))}}},Gl=[],Yl={toasts:[],pausedAt:void 0},Ni=e=>{Yl=Rd(Yl,e),Gl.forEach(t=>{t(Yl)})},Lj={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Fj=(e={})=>{let[t,n]=j.useState(Yl);j.useEffect(()=>(Gl.push(n),()=>{let i=Gl.indexOf(n);i>-1&&Gl.splice(i,1)}),[t]);let r=t.toasts.map(i=>{var a,o;return{...e,...e[i.type],...i,duration:i.duration||((a=e[i.type])==null?void 0:a.duration)||(e==null?void 0:e.duration)||Lj[i.type],style:{...e.style,...(o=e[i.type])==null?void 0:o.style,...i.style}}});return{...t,toasts:r}},Bj=(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)||Nj()}),Uo=e=>(t,n)=>{let r=Bj(t,e,n);return Ni({type:2,toast:r}),r.id},Nn=(e,t)=>Uo("blank")(e,t);Nn.error=Uo("error"),Nn.success=Uo("success"),Nn.loading=Uo("loading"),Nn.custom=Uo("custom"),Nn.dismiss=e=>{Ni({type:3,toastId:e})},Nn.remove=e=>Ni({type:4,toastId:e}),Nn.promise=(e,t,n)=>{let r=Nn.loading(t.loading,{...n,...n==null?void 0:n.loading});return e.then(i=>(Nn.success(Zl(t.success,i),{id:r,...n,...n==null?void 0:n.success}),i)).catch(i=>{Nn.error(Zl(t.error,i),{id:r,...n,...n==null?void 0:n.error})}),e};var Uj=(e,t)=>{Ni({type:1,toast:{id:e,height:t}})},zj=()=>{Ni({type:5,time:Date.now()})},qj=e=>{let{toasts:t,pausedAt:n}=Fj(e);j.useEffect(()=>{if(n)return;let a=Date.now(),o=t.map(s=>{if(s.duration===1/0)return;let u=(s.duration||0)+s.pauseDuration-(a-s.createdAt);if(u<0){s.visible&&Nn.dismiss(s.id);return}return setTimeout(()=>Nn.dismiss(s.id),u)});return()=>{o.forEach(s=>s&&clearTimeout(s))}},[t,n]);let r=j.useCallback(()=>{n&&Ni({type:6,time:Date.now()})},[n]),i=j.useCallback((a,o)=>{let{reverseOrder:s=!1,gutter:u=8,defaultPosition:l}=o||{},c=t.filter(p=>(p.position||l)===(a.position||l)&&p.height),f=c.findIndex(p=>p.id===a.id),d=c.filter((p,m)=>m<f&&p.visible).length;return c.filter(p=>p.visible).slice(...s?[d+1]:[0,d]).reduce((p,m)=>p+(m.height||0)+u,0)},[t]);return{toasts:t,handlers:{updateHeight:Uj,startPause:zj,endPause:r,calculateOffset:i}}},Vj=Nr`
|
|
93
|
+
`);const g=v.state[s];if(g==null)return;JSON.stringify(i.getState())!==JSON.stringify(g)&&p(g);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(v)});case"DISPATCH":switch(m.payload.type){case"RESET":return p(h),s===void 0?c==null?void 0:c.init(i.getState()):c==null?void 0:c.init(ql(u.name));case"COMMIT":if(s===void 0){c==null||c.init(i.getState());return}return c==null?void 0:c.init(ql(u.name));case"ROLLBACK":return Od(m.state,v=>{if(s===void 0){p(v),c==null||c.init(i.getState());return}p(v[s]),c==null||c.init(ql(u.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Od(m.state,v=>{if(s===void 0){p(v);return}JSON.stringify(i.getState())!==JSON.stringify(v[s])&&p(v[s])});case"IMPORT_STATE":{const{nextLiftedState:v}=m.payload,g=(y=v.computedStates.slice(-1)[0])==null?void 0:y.state;if(!g)return;p(s===void 0?g:g[s]),c==null||c.send(null,v);return}case"PAUSE_RECORDING":return d=!d}return}}),h},Od=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)};function Dx(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var a;const o=u=>u===null?null:JSON.parse(u,void 0),s=(a=n.getItem(i))!=null?a:null;return s instanceof Promise?s.then(o):o(s)},setItem:(i,a)=>n.setItem(i,JSON.stringify(a,void 0)),removeItem:i=>n.removeItem(i)}}const Fo=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Fo(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Fo(r)(n)}}}},_j=(e,t)=>(n,r,i)=>{let a={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:y=>y,version:0,merge:(y,v)=>({...v,...y}),...t},o=!1;const s=new Set,u=new Set;let l;try{l=a.getStorage()}catch{}if(!l)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...y)},r,i);const c=Fo(a.serialize),f=()=>{const y=a.partialize({...r()});let v;const g=c({state:y,version:a.version}).then(b=>l.setItem(a.name,b)).catch(b=>{v=b});if(v)throw v;return g},d=i.setState;i.setState=(y,v)=>{d(y,v),f()};const p=e((...y)=>{n(...y),f()},r,i);let h;const m=()=>{var y;if(!l)return;o=!1,s.forEach(g=>g(r()));const v=((y=a.onRehydrateStorage)==null?void 0:y.call(a,r()))||void 0;return Fo(l.getItem.bind(l))(a.name).then(g=>{if(g)return a.deserialize(g)}).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==a.version){if(a.migrate)return a.migrate(g.state,g.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return g.state}).then(g=>{var b;return h=a.merge(g,(b=r())!=null?b:p),n(h,!0),f()}).then(()=>{v==null||v(h,void 0),o=!0,u.forEach(g=>g(h))}).catch(g=>{v==null||v(void 0,g)})};return i.persist={setOptions:y=>{a={...a,...y},y.getStorage&&(l=y.getStorage())},clearStorage:()=>{l==null||l.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>m(),hasHydrated:()=>o,onHydrate:y=>(s.add(y),()=>{s.delete(y)}),onFinishHydration:y=>(u.add(y),()=>{u.delete(y)})},m(),h||p},Ej=(e,t)=>(n,r,i)=>{let a={storage:Dx(()=>localStorage),partialize:m=>m,version:0,merge:(m,y)=>({...y,...m}),...t},o=!1;const s=new Set,u=new Set;let l=a.storage;if(!l)return e((...m)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...m)},r,i);const c=()=>{const m=a.partialize({...r()});return l.setItem(a.name,{state:m,version:a.version})},f=i.setState;i.setState=(m,y)=>{f(m,y),c()};const d=e((...m)=>{n(...m),c()},r,i);i.getInitialState=()=>d;let p;const h=()=>{var m,y;if(!l)return;o=!1,s.forEach(g=>{var b;return g((b=r())!=null?b:d)});const v=((y=a.onRehydrateStorage)==null?void 0:y.call(a,(m=r())!=null?m:d))||void 0;return Fo(l.getItem.bind(l))(a.name).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==a.version){if(a.migrate)return[!0,a.migrate(g.state,g.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,g.state];return[!1,void 0]}).then(g=>{var b;const[k,S]=g;if(p=a.merge(S,(b=r())!=null?b:d),n(p,!0),k)return c()}).then(()=>{v==null||v(p,void 0),p=r(),o=!0,u.forEach(g=>g(p))}).catch(g=>{v==null||v(void 0,g)})};return i.persist={setOptions:m=>{a={...a,...m},m.storage&&(l=m.storage)},clearStorage:()=>{l==null||l.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>o,onHydrate:m=>(s.add(m),()=>{s.delete(m)}),onFinishHydration:m=>(u.add(m),()=>{u.delete(m)})},a.skipHydration||h(),p||d},Mx=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((zl?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),_j(e,t)):Ej(e,t),jx=Lo()(Vl(Mx(e=>({messageHistory:[],addMessageToHistory:t=>e(n=>({...n,messageHistory:[t,...(n.messageHistory??[]).slice(0,100)]}))}),{name:"botpress-message-history"}))),Bo=Lo()(Vl(e=>({messages:[],isFetching:!1,setMessages:t=>e({messages:t}),addMessage:t=>e(({messages:n})=>{var i;const r=(i=t.metadata)==null?void 0:i.clientMessageId;if(r){const a=n.findIndex(o=>{var s;return((s=o.metadata)==null?void 0:s.clientMessageId)===r});if(a!==-1)return{messages:[...n.slice(0,a),t,...n.slice(a+1)]}}return{messages:[...n.filter(a=>a.id!==t.id),t]}}),updateMessage:(t,n)=>e(({messages:r})=>({messages:r.map(i=>i.id===t?{...i,...n}:i)})),clearMessages:()=>e({messages:[]}),fetchMessages:async({client:t,userKey:n,conversationId:r})=>{const i=[];e({isFetching:!0});let a;do{const o=await t.listConversationMessages({id:r,"x-user-key":n,nextToken:a});i.push(...o.messages),a=o.meta.nextToken}while(a);return e({isFetching:!1}),i.reverse()}}),{name:"messagesStore"})),kj=(e,t)=>Lo()(Vl(Mx(n=>({setUser:r=>n(i=>({...i,user:r})),setConversationId:r=>n(i=>({...i,conversationId:r})),clearAll:()=>{n(r=>({...r,messageHistory:{},user:void 0,conversationId:void 0}))}}),{name:e,storage:Dx(()=>t==="sessionStorage"?sessionStorage:localStorage)}))),so=class so{constructor(){}static getInstance(t="bp-webchat",n){return so._instances[t]||(so._instances[t]=kj(t,n)),so._instances[t]}};_e(so,"_instances",{});let Cd=so;const Lx=Cd.getInstance,Hl=Lo()(Vl(e=>({eventEmitter:$$,messageContainerRef:{current:null},setMessageContainerRef:t=>e({messageContainerRef:t})}),{name:"webchatStore"})),Tj=({text:e,buttonValue:t,variant:n,groupId:r,reusable:i,sendMessage:a,isReadOnly:o,...s})=>{const u=Hl(v=>v.eventEmitter),[l,c]=M.useState(!1),[f,d]=M.useState(!1),[p,h]=M.useState(!1),{message:{blocks:{button:m}}}=yt;M.useEffect(()=>{if(r)return u.on(`button-group-${r}-click`,()=>{d(!0),i||h(!0)})},[u,r,i]);function y(){r&&u.emit(`button-group-${r}-click`),c(!0),i||h(!0),n!=="link"&&(a==null||a({type:"text",text:t}))}return $.jsx(Oj,{...s,variant:n,onClick:y,disabled:p||o,"data-activated":l?"":void 0,"data-group-activated":f?"":void 0,"data-type":n,value:t,...m,children:e})},Oj=e=>{if(e.variant==="link"){const{value:r,variant:i,...a}=e;return $.jsx("a",{...a,href:r,target:"_blank",rel:"noopener noreferrer"})}const{variant:t,...n}=e;return $.jsx("button",{type:"button",...n})},Fx=M.forwardRef(({block:e,direction:t,timestamp:n,sender:r,metadata:i,sendMessage:a,messageId:o,...s},u)=>{const{message:{blocks:{bubble:l}}}=yt;return $.jsx("div",{"data-direction":t,...s,...l,ref:u,children:$.jsx(ba,{block:{...e,direction:t,timestamp:n,sender:r,messageId:o,sendMessage:a},direction:t,timestamp:n,sender:r,metadata:i,sendMessage:a,messageId:o})})});Fx.displayName="Bubble";const Bx=M.createContext(null);function Cj(){const e=M.useContext(Bx);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const Ux=M.createContext(null);function zx(){const e=M.useContext(Ux);if(!e)throw new Error("useModalContext must be used within a ModalProvider");return e}const $j=(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 a=new Image;a.addEventListener("load",()=>{i&&clearTimeout(i),n({width:a.naturalWidth,height:a.naturalHeight})}),a.addEventListener("error",o=>{i&&clearTimeout(i),r(`${o.type}: ${o.message}`)}),a.src=e,t.timeout&&(i=setTimeout(()=>r("Timeout"),t.timeout))});let Ij={data:""},Rj=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||Ij,Pj=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Aj=/\/\*[^]*?\*\/| +/g,qx=/\n+/g,Xr=(e,t)=>{let n="",r="",i="";for(let a in e){let o=e[a];a[0]=="@"?a[1]=="i"?n=a+" "+o+";":r+=a[1]=="f"?Xr(o,a):a+"{"+Xr(o,a[1]=="k"?"":t)+"}":typeof o=="object"?r+=Xr(o,t?t.replace(/([^,])+/g,s=>a.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,u=>/&/.test(u)?u.replace(/&/g,s):s?s+" "+u:u)):a):o!=null&&(a=/^--/.test(a)?a:a.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=Xr.p?Xr.p(a,o):a+":"+o+";")}return n+(t&&i?t+"{"+i+"}":i)+r},Ar={},Vx=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Vx(e[n]);return t}return e},Nj=(e,t,n,r,i)=>{let a=Vx(e),o=Ar[a]||(Ar[a]=(u=>{let l=0,c=11;for(;l<u.length;)c=101*c+u.charCodeAt(l++)>>>0;return"go"+c})(a));if(!Ar[o]){let u=a!==e?e:(l=>{let c,f,d=[{}];for(;c=Pj.exec(l.replace(Aj,""));)c[4]?d.shift():c[3]?(f=c[3].replace(qx," ").trim(),d.unshift(d[0][f]=d[0][f]||{})):d[0][c[1]]=c[2].replace(qx," ").trim();return d[0]})(e);Ar[o]=Xr(i?{["@keyframes "+o]:u}:u,n?"":"."+o)}let s=n&&Ar.g?Ar.g:null;return n&&(Ar.g=Ar[o]),((u,l,c,f)=>{f?l.data=l.data.replace(f,u):l.data.indexOf(u)===-1&&(l.data=c?u+l.data:l.data+u)})(Ar[o],t,r,s),o},Dj=(e,t,n)=>e.reduce((r,i,a)=>{let o=t[a];if(o&&o.call){let s=o(n),u=s&&s.props&&s.props.className||/^go/.test(s)&&s;o=u?"."+u:s&&typeof s=="object"?s.props?"":Xr(s,""):s===!1?"":s}return r+i+(o??"")},"");function Wl(e){let t=this||{},n=e.call?e(t.p):e;return Nj(n.unshift?n.raw?Dj(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,Rj(t.target),t.g,t.o,t.k)}let Hx,$d,Id;Wl.bind({g:1});let Nr=Wl.bind({k:1});function Mj(e,t,n,r){Xr.p=t,Hx=e,$d=n,Id=r}function Qr(e,t){let n=this||{};return function(){let r=arguments;function i(a,o){let s=Object.assign({},a),u=s.className||i.className;n.p=Object.assign({theme:$d&&$d()},s),n.o=/ *go\d+/.test(u),s.className=Wl.apply(n,r)+(u?" "+u:"");let l=e;return e[0]&&(l=s.as||e,delete s.as),Id&&l[0]&&Id(s),Hx(l,s)}return i}}var jj=e=>typeof e=="function",Zl=(e,t)=>jj(e)?e(t):e,Lj=(()=>{let e=0;return()=>(++e).toString()})(),Wx=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),Fj=20,Kl=new Map,Bj=1e3,Zx=e=>{if(Kl.has(e))return;let t=setTimeout(()=>{Kl.delete(e),Ni({type:4,toastId:e})},Bj);Kl.set(e,t)},Uj=e=>{let t=Kl.get(e);t&&clearTimeout(t)},Rd=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,Fj)};case 1:return t.toast.id&&Uj(t.toast.id),{...e,toasts:e.toasts.map(a=>a.id===t.toast.id?{...a,...t.toast}:a)};case 2:let{toast:n}=t;return e.toasts.find(a=>a.id===n.id)?Rd(e,{type:1,toast:n}):Rd(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?Zx(r):e.toasts.forEach(a=>{Zx(a.id)}),{...e,toasts:e.toasts.map(a=>a.id===r||r===void 0?{...a,visible:!1}:a)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(a=>a.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(a=>({...a,pauseDuration:a.pauseDuration+i}))}}},Gl=[],Yl={toasts:[],pausedAt:void 0},Ni=e=>{Yl=Rd(Yl,e),Gl.forEach(t=>{t(Yl)})},zj={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},qj=(e={})=>{let[t,n]=M.useState(Yl);M.useEffect(()=>(Gl.push(n),()=>{let i=Gl.indexOf(n);i>-1&&Gl.splice(i,1)}),[t]);let r=t.toasts.map(i=>{var a,o;return{...e,...e[i.type],...i,duration:i.duration||((a=e[i.type])==null?void 0:a.duration)||(e==null?void 0:e.duration)||zj[i.type],style:{...e.style,...(o=e[i.type])==null?void 0:o.style,...i.style}}});return{...t,toasts:r}},Vj=(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)||Lj()}),Uo=e=>(t,n)=>{let r=Vj(t,e,n);return Ni({type:2,toast:r}),r.id},An=(e,t)=>Uo("blank")(e,t);An.error=Uo("error"),An.success=Uo("success"),An.loading=Uo("loading"),An.custom=Uo("custom"),An.dismiss=e=>{Ni({type:3,toastId:e})},An.remove=e=>Ni({type:4,toastId:e}),An.promise=(e,t,n)=>{let r=An.loading(t.loading,{...n,...n==null?void 0:n.loading});return e.then(i=>(An.success(Zl(t.success,i),{id:r,...n,...n==null?void 0:n.success}),i)).catch(i=>{An.error(Zl(t.error,i),{id:r,...n,...n==null?void 0:n.error})}),e};var Hj=(e,t)=>{Ni({type:1,toast:{id:e,height:t}})},Wj=()=>{Ni({type:5,time:Date.now()})},Zj=e=>{let{toasts:t,pausedAt:n}=qj(e);M.useEffect(()=>{if(n)return;let a=Date.now(),o=t.map(s=>{if(s.duration===1/0)return;let u=(s.duration||0)+s.pauseDuration-(a-s.createdAt);if(u<0){s.visible&&An.dismiss(s.id);return}return setTimeout(()=>An.dismiss(s.id),u)});return()=>{o.forEach(s=>s&&clearTimeout(s))}},[t,n]);let r=M.useCallback(()=>{n&&Ni({type:6,time:Date.now()})},[n]),i=M.useCallback((a,o)=>{let{reverseOrder:s=!1,gutter:u=8,defaultPosition:l}=o||{},c=t.filter(p=>(p.position||l)===(a.position||l)&&p.height),f=c.findIndex(p=>p.id===a.id),d=c.filter((p,h)=>h<f&&p.visible).length;return c.filter(p=>p.visible).slice(...s?[d+1]:[0,d]).reduce((p,h)=>p+(h.height||0)+u,0)},[t]);return{toasts:t,handlers:{updateHeight:Hj,startPause:Wj,endPause:r,calculateOffset:i}}},Kj=Nr`
|
|
94
94
|
from {
|
|
95
95
|
transform: scale(0) rotate(45deg);
|
|
96
96
|
opacity: 0;
|
|
@@ -98,7 +98,7 @@ from {
|
|
|
98
98
|
to {
|
|
99
99
|
transform: scale(1) rotate(45deg);
|
|
100
100
|
opacity: 1;
|
|
101
|
-
}`,
|
|
101
|
+
}`,Gj=Nr`
|
|
102
102
|
from {
|
|
103
103
|
transform: scale(0);
|
|
104
104
|
opacity: 0;
|
|
@@ -106,7 +106,7 @@ from {
|
|
|
106
106
|
to {
|
|
107
107
|
transform: scale(1);
|
|
108
108
|
opacity: 1;
|
|
109
|
-
}`,
|
|
109
|
+
}`,Yj=Nr`
|
|
110
110
|
from {
|
|
111
111
|
transform: scale(0) rotate(90deg);
|
|
112
112
|
opacity: 0;
|
|
@@ -114,7 +114,7 @@ from {
|
|
|
114
114
|
to {
|
|
115
115
|
transform: scale(1) rotate(90deg);
|
|
116
116
|
opacity: 1;
|
|
117
|
-
}`,
|
|
117
|
+
}`,Jj=Qr("div")`
|
|
118
118
|
width: 20px;
|
|
119
119
|
opacity: 0;
|
|
120
120
|
height: 20px;
|
|
@@ -123,14 +123,14 @@ to {
|
|
|
123
123
|
position: relative;
|
|
124
124
|
transform: rotate(45deg);
|
|
125
125
|
|
|
126
|
-
animation: ${
|
|
126
|
+
animation: ${Kj} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
127
127
|
forwards;
|
|
128
128
|
animation-delay: 100ms;
|
|
129
129
|
|
|
130
130
|
&:after,
|
|
131
131
|
&:before {
|
|
132
132
|
content: '';
|
|
133
|
-
animation: ${
|
|
133
|
+
animation: ${Gj} 0.15s ease-out forwards;
|
|
134
134
|
animation-delay: 150ms;
|
|
135
135
|
position: absolute;
|
|
136
136
|
border-radius: 3px;
|
|
@@ -143,18 +143,18 @@ to {
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
&:before {
|
|
146
|
-
animation: ${
|
|
146
|
+
animation: ${Yj} 0.15s ease-out forwards;
|
|
147
147
|
animation-delay: 180ms;
|
|
148
148
|
transform: rotate(90deg);
|
|
149
149
|
}
|
|
150
|
-
`,
|
|
150
|
+
`,Xj=Nr`
|
|
151
151
|
from {
|
|
152
152
|
transform: rotate(0deg);
|
|
153
153
|
}
|
|
154
154
|
to {
|
|
155
155
|
transform: rotate(360deg);
|
|
156
156
|
}
|
|
157
|
-
`,
|
|
157
|
+
`,Qj=Qr("div")`
|
|
158
158
|
width: 12px;
|
|
159
159
|
height: 12px;
|
|
160
160
|
box-sizing: border-box;
|
|
@@ -162,8 +162,8 @@ to {
|
|
|
162
162
|
border-radius: 100%;
|
|
163
163
|
border-color: ${e=>e.secondary||"#e0e0e0"};
|
|
164
164
|
border-right-color: ${e=>e.primary||"#616161"};
|
|
165
|
-
animation: ${
|
|
166
|
-
`,
|
|
165
|
+
animation: ${Xj} 1s linear infinite;
|
|
166
|
+
`,e2=Nr`
|
|
167
167
|
from {
|
|
168
168
|
transform: scale(0) rotate(45deg);
|
|
169
169
|
opacity: 0;
|
|
@@ -171,7 +171,7 @@ from {
|
|
|
171
171
|
to {
|
|
172
172
|
transform: scale(1) rotate(45deg);
|
|
173
173
|
opacity: 1;
|
|
174
|
-
}`,
|
|
174
|
+
}`,t2=Nr`
|
|
175
175
|
0% {
|
|
176
176
|
height: 0;
|
|
177
177
|
width: 0;
|
|
@@ -185,7 +185,7 @@ to {
|
|
|
185
185
|
100% {
|
|
186
186
|
opacity: 1;
|
|
187
187
|
height: 10px;
|
|
188
|
-
}`,
|
|
188
|
+
}`,n2=Qr("div")`
|
|
189
189
|
width: 20px;
|
|
190
190
|
opacity: 0;
|
|
191
191
|
height: 20px;
|
|
@@ -194,13 +194,13 @@ to {
|
|
|
194
194
|
position: relative;
|
|
195
195
|
transform: rotate(45deg);
|
|
196
196
|
|
|
197
|
-
animation: ${
|
|
197
|
+
animation: ${e2} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
198
198
|
forwards;
|
|
199
199
|
animation-delay: 100ms;
|
|
200
200
|
&:after {
|
|
201
201
|
content: '';
|
|
202
202
|
box-sizing: border-box;
|
|
203
|
-
animation: ${
|
|
203
|
+
animation: ${t2} 0.2s ease-out forwards;
|
|
204
204
|
opacity: 0;
|
|
205
205
|
animation-delay: 200ms;
|
|
206
206
|
position: absolute;
|
|
@@ -212,16 +212,16 @@ to {
|
|
|
212
212
|
height: 10px;
|
|
213
213
|
width: 6px;
|
|
214
214
|
}
|
|
215
|
-
`,
|
|
215
|
+
`,r2=Qr("div")`
|
|
216
216
|
position: absolute;
|
|
217
|
-
`,
|
|
217
|
+
`,i2=Qr("div")`
|
|
218
218
|
position: relative;
|
|
219
219
|
display: flex;
|
|
220
220
|
justify-content: center;
|
|
221
221
|
align-items: center;
|
|
222
222
|
min-width: 20px;
|
|
223
223
|
min-height: 20px;
|
|
224
|
-
`,
|
|
224
|
+
`,a2=Nr`
|
|
225
225
|
from {
|
|
226
226
|
transform: scale(0.6);
|
|
227
227
|
opacity: 0.4;
|
|
@@ -229,20 +229,20 @@ from {
|
|
|
229
229
|
to {
|
|
230
230
|
transform: scale(1);
|
|
231
231
|
opacity: 1;
|
|
232
|
-
}`,
|
|
232
|
+
}`,o2=Qr("div")`
|
|
233
233
|
position: relative;
|
|
234
234
|
transform: scale(0.6);
|
|
235
235
|
opacity: 0.4;
|
|
236
236
|
min-width: 20px;
|
|
237
|
-
animation: ${
|
|
237
|
+
animation: ${a2} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
238
238
|
forwards;
|
|
239
|
-
`,
|
|
239
|
+
`,s2=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?w.createElement(o2,null,t):t:n==="blank"?null:w.createElement(i2,null,w.createElement(Qj,{...r}),n!=="loading"&&w.createElement(r2,null,n==="error"?w.createElement(Jj,{...r}):w.createElement(n2,{...r})))},l2=e=>`
|
|
240
240
|
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
|
|
241
241
|
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
|
|
242
|
-
`,
|
|
242
|
+
`,u2=e=>`
|
|
243
243
|
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
|
|
244
244
|
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
|
|
245
|
-
`,
|
|
245
|
+
`,c2="0%{opacity:0;} 100%{opacity:1;}",f2="0%{opacity:1;} 100%{opacity:0;}",d2=Qr("div")`
|
|
246
246
|
display: flex;
|
|
247
247
|
align-items: center;
|
|
248
248
|
background: #fff;
|
|
@@ -254,24 +254,24 @@ to {
|
|
|
254
254
|
pointer-events: auto;
|
|
255
255
|
padding: 8px 10px;
|
|
256
256
|
border-radius: 8px;
|
|
257
|
-
`,
|
|
257
|
+
`,p2=Qr("div")`
|
|
258
258
|
display: flex;
|
|
259
259
|
justify-content: center;
|
|
260
260
|
margin: 4px 10px;
|
|
261
261
|
color: inherit;
|
|
262
262
|
flex: 1 1 auto;
|
|
263
263
|
white-space: pre-line;
|
|
264
|
-
`,
|
|
264
|
+
`,h2=(e,t)=>{let n=e.includes("top")?1:-1,[r,i]=Wx()?[c2,f2]:[l2(n),u2(n)];return{animation:t?`${Nr(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Nr(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},m2=w.memo(({toast:e,position:t,style:n,children:r})=>{let i=e.height?h2(e.position||t||"top-center",e.visible):{opacity:0},a=w.createElement(s2,{toast:e}),o=w.createElement(p2,{...e.ariaProps},Zl(e.message,e));return w.createElement(d2,{className:e.className,style:{...i,...n,...e.style}},typeof r=="function"?r({icon:a,message:o}):w.createElement(w.Fragment,null,a,o))});Mj(w.createElement);var v2=({id:e,className:t,style:n,onHeightUpdate:r,children:i})=>{let a=w.useCallback(o=>{if(o){let s=()=>{let u=o.getBoundingClientRect().height;r(e,u)};s(),new MutationObserver(s).observe(o,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return w.createElement("div",{ref:a,className:t,style:n},i)},y2=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},i=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Wx()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...i}},g2=Wl`
|
|
265
265
|
z-index: 9999;
|
|
266
266
|
> * {
|
|
267
267
|
pointer-events: auto;
|
|
268
268
|
}
|
|
269
|
-
`,Jl=16,
|
|
269
|
+
`,Jl=16,b2=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:i,containerStyle:a,containerClassName:o})=>{let{toasts:s,handlers:u}=Zj(n);return w.createElement("div",{style:{position:"fixed",zIndex:9999,top:Jl,left:Jl,right:Jl,bottom:Jl,pointerEvents:"none",...a},className:o,onMouseEnter:u.startPause,onMouseLeave:u.endPause},s.map(l=>{let c=l.position||t,f=u.calculateOffset(l,{reverseOrder:e,gutter:r,defaultPosition:t}),d=y2(c,f);return w.createElement(v2,{id:l.id,key:l.id,onHeightUpdate:u.updateHeight,className:l.visible?g2:"",style:d},l.type==="custom"?Zl(l.message,l):i?i(l):w.createElement(m2,{toast:l,position:c}))}))};function Kx(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Kx(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Xl(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Kx(e))&&(r&&(r+=" "),r+=t);return r}function Ql(){return typeof window<"u"}function ca(e){return Gx(e)?(e.nodeName||"").toLowerCase():"#document"}function Sn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ur(e){var t;return(t=(Gx(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Gx(e){return Ql()?e instanceof Node||e instanceof Sn(e).Node:!1}function Vn(e){return Ql()?e instanceof Element||e instanceof Sn(e).Element:!1}function cr(e){return Ql()?e instanceof HTMLElement||e instanceof Sn(e).HTMLElement:!1}function Yx(e){return!Ql()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Sn(e).ShadowRoot}function zo(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Hn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function x2(e){return["table","td","th"].includes(ca(e))}function eu(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Pd(e){const t=Ad(),n=Vn(e)?Hn(e):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 w2(e){let t=ei(e);for(;cr(t)&&!fa(t);){if(Pd(t))return t;if(eu(t))return null;t=ei(t)}return null}function Ad(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function fa(e){return["html","body","#document"].includes(ca(e))}function Hn(e){return Sn(e).getComputedStyle(e)}function tu(e){return Vn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ei(e){if(ca(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Yx(e)&&e.host||ur(e);return Yx(t)?t.host:t}function Jx(e){const t=ei(e);return fa(t)?e.ownerDocument?e.ownerDocument.body:e.body:cr(t)&&zo(t)?t:Jx(t)}function ti(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Jx(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=Sn(i);if(a){const s=Nd(o);return t.concat(o,o.visualViewport||[],zo(i)?i:[],s&&n?ti(s):[])}return t.concat(i,ti(i,[],n))}function Nd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const da=Math.min,_n=Math.max,nu=Math.round,ru=Math.floor,ni=e=>({x:e,y:e});function Xx(e,t,n){return _n(e,da(t,n))}function iu(e,t){return typeof e=="function"?e(t):e}function qo(e){return e.split("-")[0]}function Dd(e){return e.split("-")[1]}function Qx(e){return e==="x"?"y":"x"}function S2(e){return e==="y"?"height":"width"}function Vo(e){return["top","bottom"].includes(qo(e))?"y":"x"}function _2(e){return Qx(Vo(e))}function E2(e){return{top:0,right:0,bottom:0,left:0,...e}}function k2(e){return typeof e!="number"?E2(e):{top:e,right:e,bottom:e,left:e}}function au(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}/*!
|
|
270
270
|
* tabbable 6.2.0
|
|
271
271
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
272
|
-
*/var S2=["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])"],Md=S2.join(","),Jx=typeof Element>"u",Ho=Jx?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ou=!Jx&&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},su=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"),a=i===""||i==="true",o=a||n&&t&&e(t.parentNode);return o},_2=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},E2=function(t,n,r){if(su(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Md));return n&&Ho.call(t,Md)&&i.unshift(t),i=i.filter(r),i},k2=function e(t,n,r){for(var i=[],a=Array.from(t);a.length;){var o=a.shift();if(!su(o,!1))if(o.tagName==="SLOT"){var s=o.assignedElements(),u=s.length?s:o.children,l=e(u,!0,r);r.flatten?i.push.apply(i,l):i.push({scopeParent:o,candidates:l})}else{var c=Ho.call(o,Md);c&&r.filter(o)&&(n||!t.includes(o))&&i.push(o);var f=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),d=!su(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(f&&d){var p=e(f===!0?o.children:f.children,!0,r);r.flatten?i.push.apply(i,p):i.push({scopeParent:o,candidates:p})}else a.unshift.apply(a,o.children)}}return i},Xx=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Qx=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||_2(t))&&!Xx(t)?0:t.tabIndex},T2=function(t,n){var r=Qx(t);return r<0&&n&&!Xx(t)?0:r},O2=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},ew=function(t){return t.tagName==="INPUT"},C2=function(t){return ew(t)&&t.type==="hidden"},$2=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},I2=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},R2=function(t){if(!t.name)return!0;var n=t.form||ou(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(o){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",o.message),!1}var a=I2(i,t.form);return!a||a===t},P2=function(t){return ew(t)&&t.type==="radio"},A2=function(t){return P2(t)&&!R2(t)},N2=function(t){var n,r=t&&ou(t),i=(n=r)===null||n===void 0?void 0:n.host,a=!1;if(r&&r!==t){var o,s,u;for(a=!!((o=i)!==null&&o!==void 0&&(s=o.ownerDocument)!==null&&s!==void 0&&s.contains(i)||t!=null&&(u=t.ownerDocument)!==null&&u!==void 0&&u.contains(t));!a&&i;){var l,c,f;r=ou(i),i=(l=r)===null||l===void 0?void 0:l.host,a=!!((c=i)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(i))}}return a},tw=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},D2=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var a=Ho.call(t,"details>summary:first-of-type"),o=a?t.parentElement:t;if(Ho.call(o,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var s=t;t;){var u=t.parentElement,l=ou(t);if(u&&!u.shadowRoot&&i(u)===!0)return tw(t);t.assignedSlot?t=t.assignedSlot:!u&&l!==t.ownerDocument?t=l.host:t=u}t=s}if(N2(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return tw(t);return!1},M2=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 Ho.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},j2=function(t,n){return!(n.disabled||su(n)||C2(n)||D2(n,t)||$2(n)||M2(n))},nw=function(t,n){return!(A2(n)||Qx(n)<0||!j2(t,n))},L2=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},F2=function e(t){var n=[],r=[];return t.forEach(function(i,a){var o=!!i.scopeParent,s=o?i.scopeParent:i,u=T2(s,o),l=o?e(i.candidates):s;u===0?o?n.push.apply(n,l):n.push(s):r.push({documentOrder:a,tabIndex:u,item:i,isScope:o,content:l})}),r.sort(O2).reduce(function(i,a){return a.isScope?i.push.apply(i,a.content):i.push(a.content),i},[]).concat(n)},jd=function(t,n){n=n||{};var r;return n.getShadowRoot?r=k2([t],n.includeContainer,{filter:nw.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:L2}):r=E2(t,n.includeContainer,nw.bind(null,n)),F2(r)};function rw(e,t,n){let{reference:r,floating:i}=e;const a=Vo(t),o=b2(t),s=g2(o),u=qo(t),l=a==="y",c=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,d=r[s]/2-i[s]/2;let p;switch(u){case"top":p={x:c,y:r.y-i.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-i.width,y:f};break;default:p={x:r.x,y:r.y}}switch(Dd(t)){case"start":p[o]-=d*(n&&l?-1:1);break;case"end":p[o]+=d*(n&&l?-1:1);break}return p}const B2=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,s=a.filter(Boolean),u=await(o.isRTL==null?void 0:o.isRTL(t));let l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:f}=rw(l,r,u),d=r,p={},m=0;for(let h=0;h<s.length;h++){const{name:y,fn:v}=s[h],{x:g,y:b,data:k,reset:S}=await v({x:c,y:f,initialPlacement:r,placement:d,strategy:i,middlewareData:p,rects:l,platform:o,elements:{reference:e,floating:t}});c=g??c,f=b??f,p={...p,[y]:{...p[y],...k}},S&&m<=50&&(m++,typeof S=="object"&&(S.placement&&(d=S.placement),S.rects&&(l=S.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:c,y:f}=rw(l,d,u)),h=-1)}return{x:c,y:f,placement:d,strategy:i,middlewareData:p}};async function iw(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:s,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=iu(t,e),m=w2(p),y=s[d?f==="floating"?"reference":"floating":f],v=au(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(y)))==null||n?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:c,strategy:u})),g=f==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,b=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),k=await(a.isElement==null?void 0:a.isElement(b))?await(a.getScale==null?void 0:a.getScale(b))||{x:1,y:1}:{x:1,y:1},S=au(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:b,strategy:u}):g);return{top:(v.top-S.top+m.top)/k.y,bottom:(S.bottom-v.bottom+m.bottom)/k.y,left:(v.left-S.left+m.left)/k.x,right:(S.right-v.right+m.right)/k.x}}async function U2(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=qo(n),s=Dd(n),u=Vo(n)==="y",l=["left","top"].includes(o)?-1:1,c=a&&u?-1:1,f=iu(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof m=="number"&&(p=s==="end"?m*-1:m),u?{x:p*c,y:d*l}:{x:d*l,y:p*c}}const z2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:s}=t,u=await U2(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:a+u.y,data:{...u,placement:o}}}}},q2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:y=>{let{x:v,y:g}=y;return{x:v,y:g}}},...u}=iu(e,t),l={x:n,y:r},c=await iw(t,u),f=Vo(qo(i)),d=Yx(f);let p=l[d],m=l[f];if(a){const y=d==="y"?"top":"left",v=d==="y"?"bottom":"right",g=p+c[y],b=p-c[v];p=Gx(g,p,b)}if(o){const y=f==="y"?"top":"left",v=f==="y"?"bottom":"right",g=m+c[y],b=m-c[v];m=Gx(g,m,b)}const h=s.fn({...t,[d]:p,[f]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[d]:a,[f]:o}}}}}},V2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:o,elements:s}=t,{apply:u=()=>{},...l}=iu(e,t),c=await iw(t,l),f=qo(i),d=Dd(i),p=Vo(i)==="y",{width:m,height:h}=a.floating;let y,v;f==="top"||f==="bottom"?(y=f,v=d===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(v=f,y=d==="end"?"top":"bottom");const g=h-c.top-c.bottom,b=m-c.left-c.right,k=da(h-c[y],g),S=da(m-c[v],b),E=!t.middlewareData.shift;let O=k,L=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(L=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=g),E&&!d){const T=En(c.left,0),P=En(c.right,0),V=En(c.top,0),$=En(c.bottom,0);p?L=m-2*(T!==0||P!==0?T+P:En(c.left,c.right)):O=h-2*(V!==0||$!==0?V+$:En(c.top,c.bottom))}await u({...t,availableWidth:L,availableHeight:O});const D=await o.getDimensions(s.floating);return m!==D.width||h!==D.height?{reset:{rects:!0}}:{}}}};function aw(e){const t=Wn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=cr(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=nu(n)!==a||nu(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ld(e){return Hn(e)?e:e.contextElement}function pa(e){const t=Ld(e);if(!cr(t))return ri(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=aw(t);let o=(a?nu(n.width):n.width)/r,s=(a?nu(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const H2=ri(0);function ow(e){const t=_n(e);return!Ad()||!t.visualViewport?H2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function W2(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==_n(e)?!1:t}function Di(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=Ld(e);let o=ri(1);t&&(r?Hn(r)&&(o=pa(r)):o=pa(e));const s=W2(a,n,r)?ow(a):ri(0);let u=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,c=i.width/o.x,f=i.height/o.y;if(a){const d=_n(a),p=r&&Hn(r)?_n(r):r;let m=d,h=Nd(m);for(;h&&r&&p!==m;){const y=pa(h),v=h.getBoundingClientRect(),g=Wn(h),b=v.left+(h.clientLeft+parseFloat(g.paddingLeft))*y.x,k=v.top+(h.clientTop+parseFloat(g.paddingTop))*y.y;u*=y.x,l*=y.y,c*=y.x,f*=y.y,u+=b,l+=k,m=_n(h),h=Nd(m)}}return au({width:c,height:f,x:u,y:l})}function Z2(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=ur(r),s=t?eu(t.floating):!1;if(r===o||s&&a)return n;let u={scrollLeft:0,scrollTop:0},l=ri(1);const c=ri(0),f=cr(r);if((f||!f&&!a)&&((ca(r)!=="body"||zo(o))&&(u=tu(r)),cr(r))){const d=Di(r);l=pa(r),c.x=d.x+r.clientLeft,c.y=d.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+c.x,y:n.y*l.y-u.scrollTop*l.y+c.y}}function K2(e){return Array.from(e.getClientRects())}function Fd(e,t){const n=tu(e).scrollLeft;return t?t.left+n:Di(ur(e)).left+n}function G2(e){const t=ur(e),n=tu(e),r=e.ownerDocument.body,i=En(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=En(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Fd(e);const s=-n.scrollTop;return Wn(r).direction==="rtl"&&(o+=En(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function Y2(e,t){const n=_n(e),r=ur(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,s=0,u=0;if(i){a=i.width,o=i.height;const l=Ad();(!l||l&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}return{width:a,height:o,x:s,y:u}}function J2(e,t){const n=Di(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=cr(e)?pa(e):ri(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,u=i*a.x,l=r*a.y;return{width:o,height:s,x:u,y:l}}function sw(e,t,n){let r;if(t==="viewport")r=Y2(e,n);else if(t==="document")r=G2(ur(e));else if(Hn(t))r=J2(t,n);else{const i=ow(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return au(r)}function lw(e,t){const n=ti(e);return n===t||!Hn(n)||fa(n)?!1:Wn(n).position==="fixed"||lw(n,t)}function X2(e,t){const n=t.get(e);if(n)return n;let r=ni(e,[],!1).filter(s=>Hn(s)&&ca(s)!=="body"),i=null;const a=Wn(e).position==="fixed";let o=a?ti(e):e;for(;Hn(o)&&!fa(o);){const s=Wn(o),u=Pd(o);!u&&s.position==="fixed"&&(i=null),(a?!u&&!i:!u&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||zo(o)&&!u&&lw(e,o))?r=r.filter(c=>c!==o):i=s,o=ti(o)}return t.set(e,r),r}function Q2(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?eu(t)?[]:X2(t,this._c):[].concat(n),r],s=o[0],u=o.reduce((l,c)=>{const f=sw(t,c,i);return l.top=En(f.top,l.top),l.right=da(f.right,l.right),l.bottom=da(f.bottom,l.bottom),l.left=En(f.left,l.left),l},sw(t,s,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function eL(e){const{width:t,height:n}=aw(e);return{width:t,height:n}}function tL(e,t,n){const r=cr(t),i=ur(t),a=n==="fixed",o=Di(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const u=ri(0);if(r||!r&&!a)if((ca(t)!=="body"||zo(i))&&(s=tu(t)),r){const p=Di(t,!0,a,t);u.x=p.x+t.clientLeft,u.y=p.y+t.clientTop}else i&&(u.x=Fd(i));let l=0,c=0;if(i&&!r&&!a){const p=i.getBoundingClientRect();c=p.top+s.scrollTop,l=p.left+s.scrollLeft-Fd(i,p)}const f=o.left+s.scrollLeft-u.x-l,d=o.top+s.scrollTop-u.y-c;return{x:f,y:d,width:o.width,height:o.height}}function Bd(e){return Wn(e).position==="static"}function uw(e,t){if(!cr(e)||Wn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ur(e)===n&&(n=n.ownerDocument.body),n}function cw(e,t){const n=_n(e);if(eu(e))return n;if(!cr(e)){let i=ti(e);for(;i&&!fa(i);){if(Hn(i)&&!Bd(i))return i;i=ti(i)}return n}let r=uw(e,t);for(;r&&v2(r)&&Bd(r);)r=uw(r,t);return r&&fa(r)&&Bd(r)&&!Pd(r)?n:r||y2(e)||n}const nL=async function(e){const t=this.getOffsetParent||cw,n=this.getDimensions,r=await n(e.floating);return{reference:tL(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function rL(e){return Wn(e).direction==="rtl"}const iL={convertOffsetParentRelativeRectToViewportRelativeRect:Z2,getDocumentElement:ur,getClippingRect:Q2,getOffsetParent:cw,getElementRects:nL,getClientRects:K2,getDimensions:eL,getScale:pa,isElement:Hn,isRTL:rL};function aL(e,t){let n=null,r;const i=ur(e);function a(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function o(s,u){s===void 0&&(s=!1),u===void 0&&(u=1),a();const{left:l,top:c,width:f,height:d}=e.getBoundingClientRect();if(s||t(),!f||!d)return;const p=ru(c),m=ru(i.clientWidth-(l+f)),h=ru(i.clientHeight-(c+d)),y=ru(l),g={rootMargin:-p+"px "+-m+"px "+-h+"px "+-y+"px",threshold:En(0,da(1,u))||1};let b=!0;function k(S){const E=S[0].intersectionRatio;if(E!==u){if(!b)return o();E?o(!1,E):r=setTimeout(()=>{o(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(k,{...g,root:i.ownerDocument})}catch{n=new IntersectionObserver(k,g)}n.observe(e)}return o(!0),a}function oL(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=Ld(e),c=i||a?[...l?ni(l):[],...ni(t)]:[];c.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),a&&v.addEventListener("resize",n)});const f=l&&s?aL(l,n):null;let d=-1,p=null;o&&(p=new ResizeObserver(v=>{let[g]=v;g&&g.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),n()}),l&&!u&&p.observe(l),p.observe(t));let m,h=u?Di(e):null;u&&y();function y(){const v=Di(e);h&&(v.x!==h.x||v.y!==h.y||v.width!==h.width||v.height!==h.height)&&n(),h=v,m=requestAnimationFrame(y)}return n(),()=>{var v;c.forEach(g=>{i&&g.removeEventListener("scroll",n),a&&g.removeEventListener("resize",n)}),f==null||f(),(v=p)==null||v.disconnect(),p=null,u&&cancelAnimationFrame(m)}}const sL=z2,lL=q2,uL=V2,cL=(e,t,n)=>{const r=new Map,i={platform:iL,...n},a={...i.platform,_c:r};return B2(e,t,{...i,platform:a})};var lu=typeof document<"u"?j.useLayoutEffect:j.useEffect;function uu(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(!uu(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 a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!uu(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function fw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function dw(e,t){const n=fw(e);return Math.round(t*n)/n}function Ud(e){const t=w.useRef(e);return lu(()=>{t.current=e}),t}function fL(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:u,open:l}=e,[c,f]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,p]=w.useState(r);uu(d,r)||p(r);const[m,h]=w.useState(null),[y,v]=w.useState(null),g=w.useCallback(U=>{U!==E.current&&(E.current=U,h(U))},[]),b=w.useCallback(U=>{U!==O.current&&(O.current=U,v(U))},[]),k=a||m,S=o||y,E=w.useRef(null),O=w.useRef(null),L=w.useRef(c),D=u!=null,T=Ud(u),P=Ud(i),V=Ud(l),$=w.useCallback(()=>{if(!E.current||!O.current)return;const U={placement:t,strategy:n,middleware:d};P.current&&(U.platform=P.current),cL(E.current,O.current,U).then(N=>{const x={...N,isPositioned:V.current!==!1};F.current&&!uu(L.current,x)&&(L.current=x,_y.flushSync(()=>{f(x)}))})},[d,t,n,P,V]);lu(()=>{l===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,f(U=>({...U,isPositioned:!1})))},[l]);const F=w.useRef(!1);lu(()=>(F.current=!0,()=>{F.current=!1}),[]),lu(()=>{if(k&&(E.current=k),S&&(O.current=S),k&&S){if(T.current)return T.current(k,S,$);$()}},[k,S,$,T,D]);const M=w.useMemo(()=>({reference:E,floating:O,setReference:g,setFloating:b}),[g,b]),B=w.useMemo(()=>({reference:k,floating:S}),[k,S]),W=w.useMemo(()=>{const U={position:n,left:0,top:0};if(!B.floating)return U;const N=dw(B.floating,c.x),x=dw(B.floating,c.y);return s?{...U,transform:"translate("+N+"px, "+x+"px)",...fw(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:N,top:x}},[n,s,B.floating,c.x,c.y]);return w.useMemo(()=>({...c,update:$,refs:M,elements:B,floatingStyles:W}),[c,$,M,B,W])}const dL=(e,t)=>({...sL(e),options:[e,t]}),pL=(e,t)=>({...lL(e),options:[e,t]}),hL=(e,t)=>({...uL(e),options:[e,t]});var Dn=function(){return Dn=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Dn.apply(this,arguments)};function pw(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function mL(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;function vL(){var e=j.useRef(!1),t=j.useCallback(function(){return e.current},[]);return j.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),t}function yL(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={loading:!1});var r=j.useRef(0),i=vL(),a=j.useState(n),o=a[0],s=a[1],u=j.useCallback(function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];var f=++r.current;return o.loading||s(function(d){return Dn(Dn({},d),{loading:!0})}),e.apply(void 0,l).then(function(d){return i()&&f===r.current&&s({value:d,loading:!1}),d},function(d){return i()&&f===r.current&&s({error:d,loading:!1}),d})},t);return[o,u]}function gL(e,t){t===void 0&&(t=[]);var n=yL(e,t,{loading:!0}),r=n[0],i=n[1];return j.useEffect(function(){i()},[i]),r}const hw=j.forwardRef(({url:e,type:t,orientation:n="auto",...r},i)=>{const a=j.useId(),{setIsLoading:o}=Ej(),[s,u]=j.useState(n),[l,c]=j.useState(!1),{message:{blocks:{image:f}}}=yt;return j.useLayoutEffect(()=>{o(d=>[...d,a])},[]),gL(async()=>{if(e){try{const{width:d,height:p}=await kj(e);s==="auto"&&u(bL(d,p))}catch(d){u("square"),console.error(d)}o(d=>d.filter(p=>p!==a))}},[e]),I.jsxs(I.Fragment,{children:[l?null:I.jsx("div",{"data-orientation":s,...f.placeholder}),I.jsx("img",{"data-orientation":s,"data-loaded":l,...r,...f.image,src:e,alt:"",ref:i,loading:"lazy",onLoad:()=>{c(!0)}})]})});hw.displayName="Image";function bL(e,t){const n={square:1,portrait:.75,landscape:1.3333333333333333},r=e/t;return Object.keys(n).reduce((a,o)=>Math.abs(n[o]-r)<Math.abs(n[a]-r)?o:a)}const xL=j.forwardRef(({url:e,type:t,...n},r)=>{const{message:{blocks:{video:i}}}=yt;return I.jsx("div",{children:I.jsx("video",{...n,"data-chromatic":"ignore",controls:!0,src:e,...i,ref:r})})}),wL=j.forwardRef(({url:e,type:t,...n},r)=>{const{message:{blocks:{audio:i}}}=yt;return I.jsx("div",{children:I.jsx("audio",{...n,controls:!0,src:e,...i,ref:r})})});function SL({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M15.312 11.424a5.5 5.5 0 0 1-9.201 2.466l-.312-.311h2.433a.75.75 0 0 0 0-1.5H3.989a.75.75 0 0 0-.75.75v4.242a.75.75 0 0 0 1.5 0v-2.43l.31.31a7 7 0 0 0 11.712-3.138.75.75 0 0 0-1.449-.39Zm1.23-3.723a.75.75 0 0 0 .219-.53V2.929a.75.75 0 0 0-1.5 0V5.36l-.31-.31A7 7 0 0 0 3.239 8.188a.75.75 0 1 0 1.448.389A5.5 5.5 0 0 1 13.89 6.11l.311.31h-2.432a.75.75 0 0 0 0 1.5h4.243a.75.75 0 0 0 .53-.219Z",clipRule:"evenodd"}))}const _L=w.forwardRef(SL);function EL({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const kL=w.forwardRef(EL);function TL({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M4.5 2A1.5 1.5 0 0 0 3 3.5v13A1.5 1.5 0 0 0 4.5 18h11a1.5 1.5 0 0 0 1.5-1.5V7.621a1.5 1.5 0 0 0-.44-1.06l-4.12-4.122A1.5 1.5 0 0 0 11.378 2H4.5Zm4.75 6.75a.75.75 0 0 1 1.5 0v2.546l.943-1.048a.75.75 0 0 1 1.114 1.004l-2.25 2.5a.75.75 0 0 1-1.114 0l-2.25-2.5a.75.75 0 1 1 1.114-1.004l.943 1.048V8.75Z",clipRule:"evenodd"}))}const OL=w.forwardRef(TL);function CL({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"m9.69 18.933.003.001C9.89 19.02 10 19 10 19s.11.02.308-.066l.002-.001.006-.003.018-.008a5.741 5.741 0 0 0 .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 1 0 3 9c0 3.492 1.698 5.988 3.355 7.584a13.731 13.731 0 0 0 2.273 1.765 11.842 11.842 0 0 0 .976.544l.062.029.018.008.006.003ZM10 11.25a2.25 2.25 0 1 0 0-4.5 2.25 2.25 0 0 0 0 4.5Z",clipRule:"evenodd"}))}const $L=w.forwardRef(CL),IL=j.forwardRef(({type:e,latitude:t,longitude:n,title:r,...i},a)=>{const o=`https://www.google.com/maps/search/?api=1&query=${t},${n}`,{message:{blocks:{location:s}}}=yt;return I.jsxs("a",{...i,...s.container,href:o,type:"_blank",rel:"noopener",ref:a,children:[I.jsx("p",{...s.title,children:r}),I.jsx($L,{...s.icon})]})}),mw=j.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:i,timestamp:a,metadata:o,messageId:s,sendMessage:u,...l},c)=>{const{message:{blocks:{column:f}}}=yt;return I.jsx("div",{"data-horizontal":t,"data-vertical":n,...l,...f,ref:c,children:e.map((d,p)=>I.jsx(ba,{block:{...d,direction:r,timestamp:a,sender:i,messageId:s,sendMessage:u},direction:r,sender:i,timestamp:a,metadata:o,sendMessage:u,messageId:s},p))})});mw.displayName="Column";const vw=j.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:i,timestamp:a,metadata:o,sendMessage:s,messageId:u,...l},c)=>{const{message:{blocks:{row:f}}}=yt;return I.jsx("div",{"data-horizontal":t,"data-vertical":n,...l,...f,ref:c,children:e.map((d,p)=>I.jsx(ba,{block:{...d,direction:r,timestamp:a,sender:i,messageId:u,sendMessage:s},direction:r,sender:i,timestamp:a,metadata:o,sendMessage:s,messageId:u},p))})});vw.displayName="Row";function RL(e){return Object.prototype.toString.call(e)==="[object Object]"}function yw(e){return RL(e)||Array.isArray(e)}function PL(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function zd(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||{})),a=JSON.stringify(Object.keys(t.breakpoints||{}));return i!==a?!1:n.every(o=>{const s=e[o],u=t[o];return typeof s=="function"?`${s}`==`${u}`:!yw(s)||!yw(u)?s===u:zd(s,u)})}function gw(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function AL(e,t){if(e.length!==t.length)return!1;const n=gw(e),r=gw(t);return n.every((i,a)=>{const o=r[a];return zd(i,o)})}function qd(e){return typeof e=="number"}function bw(e){return typeof e=="string"}function Vd(e){return typeof e=="boolean"}function xw(e){return Object.prototype.toString.call(e)==="[object Object]"}function kt(e){return Math.abs(e)}function Hd(e){return Math.sign(e)}function cu(e,t){return kt(e-t)}function NL(e,t){if(e===0||t===0||kt(e)<=kt(t))return 0;const n=cu(kt(e),kt(t));return kt(n/e)}function Wo(e){return du(e).map(Number)}function Dr(e){return e[fu(e)]}function fu(e){return Math.max(0,e.length-1)}function du(e){return Object.keys(e)}function ww(e,t){return[e,t].reduce((n,r)=>(du(r).forEach(i=>{const a=n[i],o=r[i],s=xw(a)&&xw(o);n[i]=s?ww(a,o):o}),n),{})}function Sw(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function DL(e,t){const n={start:r,center:i,end:a};function r(){return 0}function i(l){return a(l)/2}function a(l){return t-l}function o(){return t*Number(e)}function s(l){return qd(e)?o():n[e](l)}return{measure:s}}function ML(e,t){const n=e==="y"?"y":"x",r=e==="y"?"x":"y",i=s(),a=u();function o(c){const{width:f,height:d}=c;return n==="x"?f:d}function s(){return n==="y"?"top":t==="rtl"?"right":"left"}function u(){return n==="y"?"bottom":t==="rtl"?"left":"right"}return{scroll:n,cross:r,startEdge:i,endEdge:a,measureSize:o}}function ii(e,t){const n=kt(e-t);function r(l){return l<e}function i(l){return l>t}function a(l){return r(l)||i(l)}function o(l){return a(l)?r(l)?e:t:l}function s(l){return n?l-n*Math.ceil((l-t)/n):l}return{length:n,max:t,min:e,constrain:o,reachedAny:a,reachedMax:i,reachedMin:r,removeOffset:s}}function _w(e,t,n){const{constrain:r}=ii(0,e),i=e+1;let a=o(t);function o(d){return n?kt((i+d)%i):r(d)}function s(){return a}function u(d){return a=o(d),f}function l(d){return c().set(s()+d)}function c(){return _w(e,s(),n)}const f={get:s,set:u,add:l,clone:c};return f}function jL(e){const t=e==="rtl"?-1:1;function n(i){return i*t}return{apply:n}}function Zo(){let e=[];function t(i,a,o,s={passive:!0}){return i.addEventListener(a,o,s),e.push(()=>i.removeEventListener(a,o,s)),r}function n(){e=e.filter(i=>i())}const r={add:t,clear:n};return r}function LL(e,t,n,r,i,a,o,s,u,l,c,f,d,p,m,h,y,v,g){const{cross:b}=e,k=["INPUT","SELECT","TEXTAREA"],S={passive:!1},E=Zo(),O=Zo(),L=ii(50,225).constrain(m.measure(20)),D={mouse:300,touch:400},T={mouse:500,touch:600},P=h?43:25;let V=!1,$=0,F=0,M=!1,B=!1,W=!1,U=!1;function N(Q,Z){if(!Z)return;function de($e){(Vd(Z)||Z(Q,$e))&&oe($e)}const ve=n;E.add(ve,"dragstart",$e=>$e.preventDefault(),S).add(ve,"touchmove",()=>{},S).add(ve,"touchend",()=>{}).add(ve,"touchstart",de).add(ve,"mousedown",de).add(ve,"touchcancel",le).add(ve,"contextmenu",le).add(ve,"click",pe,!0)}function x(){E.clear(),O.clear()}function q(){const Q=U?r:n;O.add(Q,"touchmove",ne,S).add(Q,"touchend",le).add(Q,"mousemove",ne,S).add(Q,"mouseup",le)}function K(Q){const Z=Q.nodeName||"";return k.includes(Z)}function _(){return(h?T:D)[U?"mouse":"touch"]}function Y(Q,Z){const de=d.add(Hd(Q)*-1),ve=f.byDistance(Q,!h).distance;return h||kt(Q)<L?ve:v&&Z?ve*.5:f.byIndex(de.get(),0).distance}function oe(Q){const Z=Sw(Q,i);U=Z,!(Z&&Q.button!==0)&&(K(Q.target)||(W=h&&Z&&!Q.buttons&&V,V=cu(a.get(),s.get())>=2,M=!0,o.pointerDown(Q),c.useFriction(0).useDuration(0),a.set(s),q(),$=o.readPoint(Q),F=o.readPoint(Q,b),p.emit("pointerDown")))}function ne(Q){const Z=o.readPoint(Q),de=o.readPoint(Q,b),ve=cu(Z,$),$e=cu(de,F);if(!B&&!U&&(!Q.cancelable||(B=ve>$e,!B)))return le(Q);const R=o.pointerMove(Q);ve>y&&(W=!0),c.useFriction(.3).useDuration(1),u.start(),a.add(t.apply(R)),Q.preventDefault()}function le(Q){const de=f.byDistance(0,!1).index!==d.get(),ve=o.pointerUp(Q)*_(),$e=Y(t.apply(ve),de),R=NL(ve,$e),J=P-10*R,ae=g+R/50;B=!1,M=!1,O.clear(),c.useDuration(J).useFriction(ae),l.distance($e,!h),U=!1,p.emit("pointerUp")}function pe(Q){W&&(Q.stopPropagation(),Q.preventDefault())}function he(){return M}return{init:N,pointerDown:he,destroy:x}}function FL(e,t){let r,i;function a(f){return f.timeStamp}function o(f,d){const m=`client${(d||e.scroll)==="x"?"X":"Y"}`;return(Sw(f,t)?f:f.touches[0])[m]}function s(f){return r=f,i=f,o(f)}function u(f){const d=o(f)-o(i),p=a(f)-a(r)>170;return i=f,p&&(r=f),d}function l(f){if(!r||!i)return 0;const d=o(i)-o(r),p=a(f)-a(r),m=a(f)-a(i)>170,h=d/p;return p&&!m&&kt(h)>.1?h:0}return{pointerDown:s,pointerMove:u,pointerUp:l,readPoint:o}}function BL(e){function t(r){return e*(r/100)}return{measure:t}}function UL(e,t,n,r,i){let a,o,s=[],u=!1;function l(p){return i.measureSize(p.getBoundingClientRect())}function c(p,m){if(!m)return;o=l(e),s=r.map(l);function h(v){for(const g of v){const b=g.target===e,k=r.indexOf(g.target),S=b?o:s[k],E=l(b?e:r[k]);if(S!==E){n.requestAnimationFrame(()=>{p.reInit(),t.emit("resize")});break}}}a=new ResizeObserver(v=>{u||(Vd(m)||m(p,v))&&h(v)}),[e].concat(r).forEach(v=>a.observe(v))}function f(){a&&a.disconnect(),u=!0}return{init:c,destroy:f}}function zL(e,t,n,r){let i=!0,a=0,o=0,s=n,u=r,l=e.get(),c=0;function f(){const S=t.get()-e.get(),E=!s;let O=0;return E?(a=0,e.set(t),O=S):(a+=S/s,a*=u,l+=a,e.add(a),O=l-c),o=Hd(O),c=l,i=kt(S)<.001,k}function d(){return i}function p(){return s}function m(){return o}function h(){return a}function y(){return g(n)}function v(){return b(r)}function g(S){return s=S,k}function b(S){return u=S,k}const k={direction:m,duration:p,velocity:h,seek:f,settled:d,useBaseFriction:v,useBaseDuration:y,useFriction:b,useDuration:g};return k}function qL(e,t,n,r,i){const a=i.measure(10),o=i.measure(50),s=ii(.1,.99);let u=!1;function l(){return!(u||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function c(p){if(!l())return;const m=e.reachedMin(t.get())?"min":"max",h=kt(e[m]-t.get()),y=n.get()-t.get(),v=s.constrain(h/o);n.subtract(y*v),!p&&kt(y)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function f(p){u=!p}return{constrain:c,toggleActive:f}}function VL(e,t,n,r){const i=ii(-t+e,n[0]),a=u(),o=l();function s(){const f=a[0],d=Dr(a),p=a.lastIndexOf(f),m=a.indexOf(d)+1;return ii(p,m)}function u(){return n.map(i.constrain).map(f=>parseFloat(f.toFixed(3)))}function l(){if(t<=e)return[i.max];if(r==="keepSnaps")return a;const{min:f,max:d}=s();return a.slice(f,d)}return{snapsContained:o}}function HL(e,t,n){const r=t[0],i=n?r-e:Dr(t);return{limit:ii(i,r)}}function WL(e,t,n,r){const a=t.min+.1,o=t.max+.1,{reachedMin:s,reachedMax:u}=ii(a,o);function l(d){return d===1?u(n.get()):d===-1?s(n.get()):!1}function c(d){if(!l(d))return;const p=e*(d*-1);r.forEach(m=>m.add(p))}return{loop:c}}function ZL(e){const{max:t,length:n}=e;function r(a){return(a-t)/-n}return{get:r}}function KL(e,t,n,r,i,a,o){const{startEdge:s,endEdge:u}=e,{groupSlides:l}=a,c=p().map(t.measure),f=m(),d=h();function p(){return l(r).map(v=>Dr(v)[u]-v[0][s]).map(kt)}function m(){return r.map(v=>n[s]-v[s]).map(v=>-kt(v))}function h(){const g=Dr(f)-Dr(i);return l(f).map(b=>b[0]).map((b,k,S)=>{const E=!k,O=k===fu(S);return o&&E?0:o&&O?g:b+c[k]})}return{snaps:f,snapsAligned:d}}function GL(e,t,n,r,i){const{reachedAny:a,removeOffset:o,constrain:s}=r;function u(m){return m.concat().sort((h,y)=>kt(h)-kt(y))[0]}function l(m){const h=e?o(m):s(m),y=t.map(g=>g-h).map(g=>c(g,0)).map((g,b)=>({diff:g,index:b})).sort((g,b)=>kt(g.diff)-kt(b.diff)),{index:v}=y[0];return{index:v,distance:h}}function c(m,h){const y=[m,m+n,m-n];if(!e)return y[0];if(!h)return u(y);const v=y.filter(g=>Hd(g)===h);return u(v)}function f(m,h){const y=t[m]-i.get(),v=c(y,h);return{index:m,distance:v}}function d(m,h){const y=i.get()+m,{index:v,distance:g}=l(y),b=!e&&a(y);if(!h||b)return{index:v,distance:m};const k=t[v]-g,S=m+c(k,0);return{index:v,distance:S}}return{byDistance:d,byIndex:f,shortcut:c}}function YL(e,t,n,r,i,a,o){function s(f){const d=f.distance,p=f.index!==t.get();a.add(d),d&&(i.duration()?e.start():(e.update(),e.render(1),e.update())),p&&(n.set(t.get()),t.set(f.index),o.emit("select"))}function u(f,d){const p=r.byDistance(f,d);s(p)}function l(f,d){const p=t.clone().set(f),m=r.byIndex(p.get(),d);s(m)}return{distance:u,index:l}}function pu(e){let t=e;function n(){return t}function r(u){t=o(u)}function i(u){t+=o(u)}function a(u){t-=o(u)}function o(u){return qd(u)?u:u.get()}return{get:n,set:r,add:i,subtract:a}}function Ew(e,t,n){const r=e.scroll==="x"?o:s,i=n.style;let a=!1;function o(d){return`translate3d(${d}px,0px,0px)`}function s(d){return`translate3d(0px,${d}px,0px)`}function u(d){a||(i.transform=r(t.apply(d)))}function l(d){a=!d}function c(){a||(i.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:c,to:u,toggleActive:l}}function JL(e,t,n,r,i,a,o,s,u){const l=Wo(i),c=Wo(i).reverse(),f=h().concat(y());function d(S,E){return S.reduce((O,L)=>O-i[L],E)}function p(S,E){return S.reduce((O,L)=>d(O,E)>0?O.concat([L]):O,[])}function m(S,E){const O=E==="start",L=O?-r:r,D=o.findSlideBounds([L]);return S.map(T=>{const P=O?0:-r,V=O?r:0,F=D.filter(M=>M.index===T)[0][O?"end":"start"];return{index:T,slideLocation:pu(-1),translate:Ew(e,t,u[T]),target:()=>s.get()>F?P:V}})}function h(){const S=a[0]-1,E=p(c,S);return m(E,"end")}function y(){const S=n-a[0]-1,E=p(l,S);return m(E,"start")}function v(){return f.every(({index:S})=>{const E=l.filter(O=>O!==S);return d(E,n)<=.1})}function g(){f.forEach(S=>{const{target:E,translate:O,slideLocation:L}=S,D=E();D!==L.get()&&(O.to(D),L.set(D))})}function b(){f.forEach(S=>S.translate.clear())}return{canLoop:v,clear:b,loop:g,loopPoints:f}}function XL(e,t){let n,r=!1;function i(s,u){if(!u)return;function l(c){for(const f of c)if(f.type==="childList"){s.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(c=>{r||(Vd(u)||u(s,c))&&l(c)}),n.observe(e,{childList:!0})}function a(){n&&n.disconnect(),r=!0}return{init:i,destroy:a}}function QL(e,t,n,r,i,a,o){const{removeOffset:s,constrain:u}=i,l=.5,c=a?[0,t,-t]:[0],f=p(c,o);function d(y){const v=y||0;return n.map(g=>ii(l,g-l).constrain(g*v))}function p(y,v){const g=y||c,b=d(v);return g.reduce((k,S)=>{const E=r.map((O,L)=>({start:O-n[L]+b[L]+S,end:O+e-b[L]+S,index:L}));return k.concat(E)},[])}function m(y,v){const g=a?s(y):u(y);return(v||f).reduce((k,S)=>{const{index:E,start:O,end:L}=S,D=k.includes(E),T=O<g&&L>g;return!D&&T?k.concat([E]):k},[])}return{check:m,findSlideBounds:p}}function eF(e,t,n,r,i,a){const{measureSize:o,startEdge:s,endEdge:u}=e,l=n[0]&&i,c=m(),f=h(),d=n.map(o),p=y();function m(){if(!l)return 0;const g=n[0];return kt(t[s]-g[s])}function h(){if(!l)return 0;const g=a.getComputedStyle(Dr(r));return parseFloat(g.getPropertyValue(`margin-${u}`))}function y(){return n.map((g,b,k)=>{const S=!b,E=b===fu(k);return S?d[b]+c:E?d[b]+f:k[b+1][s]-g[s]}).map(kt)}return{slideSizes:d,slideSizesWithGaps:p}}function tF(e,t,n){const r=qd(n);function i(u,l){return Wo(u).filter(c=>c%l===0).map(c=>u.slice(c,c+l))}function a(u){return Wo(u).reduce((l,c)=>{const d=t.slice(Dr(l),c+1).reduce((p,m)=>p+m,0);return!c||d>e?l.concat(c):l},[]).map((l,c,f)=>u.slice(l,f[c+1]))}function o(u){return r?i(u,n):a(u)}return{groupSlides:o}}function nF(e,t,n,r,i,a,o,s){const{align:u,axis:l,direction:c,startIndex:f,inViewThreshold:d,loop:p,duration:m,dragFree:h,dragThreshold:y,slidesToScroll:v,skipSnaps:g,containScroll:b}=a,k=t.getBoundingClientRect(),S=n.map(ae=>ae.getBoundingClientRect()),E=jL(c),O=ML(l,c),L=O.measureSize(k),D=BL(L),T=DL(u,L),P=!p&&!!b,V=p||!!b,{slideSizes:$,slideSizesWithGaps:F}=eF(O,k,S,n,V,i),M=tF(L,F,v),{snaps:B,snapsAligned:W}=KL(O,T,k,S,F,M,P),U=-Dr(B)+Dr(F),{snapsContained:N}=VL(L,U,W,b),x=P?N:W,{limit:q}=HL(U,x,p),K=_w(fu(x),f,p),_=K.clone(),Y=Wo(n),oe=({dragHandler:ae,scrollBody:ee,scrollBounds:ke,eventHandler:Se,animation:Pe,options:{loop:He}})=>{const Ae=ae.pointerDown();He||ke.constrain(Ae);const Fe=ee.seek().settled();Fe&&!Ae&&(Pe.stop(),Se.emit("settle")),Fe||Se.emit("scroll")},ne=({scrollBody:ae,translate:ee,location:ke,offsetLocation:Se,scrollLooper:Pe,slideLooper:He,options:{loop:Ae}},Fe)=>{const z=ae.velocity();Se.set(ke.get()-z+z*Fe),Ae&&(Pe.loop(ae.direction()),He.loop()),ee.to(Se.get())},le={start:()=>s.start(J),stop:()=>s.stop(J),update:()=>oe(J),render:ae=>ne(J,ae)},pe=.68,he=x[K.get()],ue=pu(he),Q=pu(he),Z=pu(he),de=zL(ue,Z,m,pe),ve=GL(p,x,U,q,Z),$e=YL(le,K,_,ve,de,Z,o),R=QL(L,U,$,B,q,p,d),J={ownerDocument:r,ownerWindow:i,eventHandler:o,containerRect:k,slideRects:S,animation:le,axis:O,direction:E,dragHandler:LL(O,E,e,r,i,Z,FL(O,i),ue,le,$e,de,ve,K,o,D,h,y,g,pe),eventStore:Zo(),percentOfView:D,index:K,indexPrevious:_,limit:q,location:ue,offsetLocation:Q,options:a,resizeHandler:UL(t,o,i,n,O),scrollBody:de,scrollBounds:qL(q,ue,Z,de,D),scrollLooper:WL(U,q,Q,[ue,Q,Z]),scrollProgress:ZL(q),scrollSnaps:x,scrollTarget:ve,scrollTo:$e,slideLooper:JL(O,E,L,U,F,x,R,Q,n),slidesHandler:XL(t,o),slidesInView:R,slideIndexes:Y,slidesToScroll:M,target:Z,translate:Ew(O,E,t)};return J}function rF(e){const t=16.666666666666668;let n=[],r=null,i=0,a=0;function o(f){r||(r=f);const d=f-r;for(r=f,i+=d;i>=t;)n.forEach(({animation:m})=>m.update()),i-=t;const p=kt(i/t);n.forEach(({animation:m})=>m.render(p)),a&&e.requestAnimationFrame(o)}function s(f){n.includes(f)||n.push(f),!a&&(a=e.requestAnimationFrame(o))}function u(f){n=n.filter(d=>d!==f),!n.length&&(e.cancelAnimationFrame(a),r=null,i=0,a=0)}function l(){r=null,i=0}return{start:s,stop:u,reset:l,window:e}}function iF(){const e={};let t;function n(u){t=u}function r(u){return e[u]||[]}function i(u){return r(u).forEach(l=>l(t,u)),s}function a(u,l){return e[u]=r(u).concat([l]),s}function o(u,l){return e[u]=r(u).filter(c=>c!==l),s}const s={init:n,emit:i,off:o,on:a};return s}const aF={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 oF(e){function t(a,o){return ww(a,o||{})}function n(a){const o=a.breakpoints||{},s=du(o).filter(u=>e.matchMedia(u).matches).map(u=>o[u]).reduce((u,l)=>t(u,l),{});return t(a,s)}function r(a){return a.map(o=>du(o.breakpoints||{})).reduce((o,s)=>o.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function sF(e){let t=[];function n(a,o){return t=a.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(o,e)),a.reduce((s,u)=>Object.assign(s,{[u.name]:u}),{})}function r(){t=t.filter(a=>a.destroy())}return{init:n,destroy:r}}function ha(e,t,n){const r=e.ownerDocument,i=r.defaultView,a=oF(i),o=sF(a),s=Zo(),u=Zo(),l=iF(),{animationRealms:c}=ha,{mergeOptions:f,optionsAtMedia:d,optionsMediaQueries:p}=a,{on:m,off:h,emit:y}=l,v=$;let g=!1,b,k=f(aF,ha.globalOptions),S=f(k),E=[],O,L,D;function T(){const{container:de,slides:ve}=S;L=(bw(de)?e.querySelector(de):de)||e.children[0];const R=bw(ve)?L.querySelectorAll(ve):ve;D=[].slice.call(R||L.children)}function P(de,ve){const $e=nF(e,L,D,r,i,de,l,ve);if(de.loop&&!$e.slideLooper.canLoop()){const R=Object.assign({},de,{loop:!1});return P(R,ve)}return $e}function V(de,ve){if(g)return;const $e=c.find(J=>J.window===i),R=$e||rF(i);$e||c.push(R),k=f(k,de),S=d(k),E=ve||E,T(),b=P(S,R),p([k,...E.map(({options:J})=>J)]).forEach(J=>s.add(J,"change",$)),S.active&&(b.translate.to(b.location.get()),b.eventHandler.init(Z),b.resizeHandler.init(Z,S.watchResize),b.slidesHandler.init(Z,S.watchSlides),u.add(r,"visibilitychange",()=>{r.hidden&&R.reset()}),b.options.loop&&b.slideLooper.loop(),L.offsetParent&&D.length&&b.dragHandler.init(Z,S.watchDrag),O=o.init(E,Z))}function $(de,ve){const $e=oe();F(),V(f({startIndex:$e},de),ve),l.emit("reInit")}function F(){b.dragHandler.destroy(),b.animation.stop(),b.eventStore.clear(),b.translate.clear(),b.slideLooper.clear(),b.resizeHandler.destroy(),b.slidesHandler.destroy(),o.destroy(),s.clear(),u.clear()}function M(){g||(g=!0,s.clear(),F(),l.emit("destroy"))}function B(de){const ve=b[de?"target":"location"].get(),$e=S.loop?"removeOffset":"constrain";return b.slidesInView.check(b.limit[$e](ve))}function W(de){const ve=B(de);return b.slideIndexes.filter($e=>!ve.includes($e))}function U(de,ve,$e){!S.active||g||(b.scrollBody.useBaseFriction().useDuration(ve?0:S.duration),b.scrollTo.index(de,$e||0))}function N(de){const ve=b.index.add(1).get();U(ve,de===!0,-1)}function x(de){const ve=b.index.add(-1).get();U(ve,de===!0,1)}function q(){return b.index.add(1).get()!==oe()}function K(){return b.index.add(-1).get()!==oe()}function _(){return b.scrollSnaps.map(b.scrollProgress.get)}function Y(){return b.scrollProgress.get(b.location.get())}function oe(){return b.index.get()}function ne(){return b.indexPrevious.get()}function le(){return O}function pe(){return b}function he(){return e}function ue(){return L}function Q(){return D}const Z={canScrollNext:q,canScrollPrev:K,containerNode:ue,internalEngine:pe,destroy:M,off:h,on:m,emit:y,plugins:le,previousScrollSnap:ne,reInit:v,rootNode:he,scrollNext:N,scrollPrev:x,scrollProgress:Y,scrollSnapList:_,scrollTo:U,selectedScrollSnap:oe,slideNodes:Q,slidesInView:B,slidesNotInView:W};return V(t,n),setTimeout(()=>l.emit("init"),0),Z}ha.animationRealms=[],ha.globalOptions=void 0;function Wd(e={},t=[]){const n=j.useRef(e),r=j.useRef(t),[i,a]=j.useState(),[o,s]=j.useState(),u=j.useCallback(()=>{i&&i.reInit(n.current,r.current)},[i]);return j.useEffect(()=>{if(PL()&&o){ha.globalOptions=Wd.globalOptions;const l=ha(o,n.current,r.current);return a(l),()=>l.destroy()}else a(void 0)},[o,a]),j.useEffect(()=>{zd(n.current,e)||(n.current=e,u())},[e,u]),j.useEffect(()=>{AL(r.current,t)||(r.current=t,u())},[t,u]),[s,i]}Wd.globalOptions=void 0;function lF({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M15.75 2.25H21a.75.75 0 0 1 .75.75v5.25a.75.75 0 0 1-1.5 0V4.81L8.03 17.03a.75.75 0 0 1-1.06-1.06L19.19 3.75h-3.44a.75.75 0 0 1 0-1.5Zm-10.5 4.5a1.5 1.5 0 0 0-1.5 1.5v10.5a1.5 1.5 0 0 0 1.5 1.5h10.5a1.5 1.5 0 0 0 1.5-1.5V10.5a.75.75 0 0 1 1.5 0v8.25a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3V8.25a3 3 0 0 1 3-3h8.25a.75.75 0 0 1 0 1.5H5.25Z",clipRule:"evenodd"}))}const uF=w.forwardRef(lF);function cF({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))}const fF=w.forwardRef(cF);function dF({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",clipRule:"evenodd"}))}const pF=w.forwardRef(dF);function hF({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.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 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5H5.625ZM7.5 15a.75.75 0 0 1 .75-.75h7.5a.75.75 0 0 1 0 1.5h-7.5A.75.75 0 0 1 7.5 15Zm.75 2.25a.75.75 0 0 0 0 1.5H12a.75.75 0 0 0 0-1.5H8.25Z",clipRule:"evenodd"}),w.createElement("path",{d:"M12.971 1.816A5.23 5.23 0 0 1 14.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 0 1 3.434 1.279 9.768 9.768 0 0 0-6.963-6.963Z"}))}const mF=w.forwardRef(hF);function vF({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{d:"M1.5 8.67v8.58a3 3 0 0 0 3 3h15a3 3 0 0 0 3-3V8.67l-8.928 5.493a3 3 0 0 1-3.144 0L1.5 8.67Z"}),w.createElement("path",{d:"M22.5 6.908V6.75a3 3 0 0 0-3-3h-15a3 3 0 0 0-3 3v.158l9.714 5.978a1.5 1.5 0 0 0 1.572 0L22.5 6.908Z"}))}const yF=w.forwardRef(vF);function gF({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{d:"M21.721 12.752a9.711 9.711 0 0 0-.945-5.003 12.754 12.754 0 0 1-4.339 2.708 18.991 18.991 0 0 1-.214 4.772 17.165 17.165 0 0 0 5.498-2.477ZM14.634 15.55a17.324 17.324 0 0 0 .332-4.647c-.952.227-1.945.347-2.966.347-1.021 0-2.014-.12-2.966-.347a17.515 17.515 0 0 0 .332 4.647 17.385 17.385 0 0 0 5.268 0ZM9.772 17.119a18.963 18.963 0 0 0 4.456 0A17.182 17.182 0 0 1 12 21.724a17.18 17.18 0 0 1-2.228-4.605ZM7.777 15.23a18.87 18.87 0 0 1-.214-4.774 12.753 12.753 0 0 1-4.34-2.708 9.711 9.711 0 0 0-.944 5.004 17.165 17.165 0 0 0 5.498 2.477ZM21.356 14.752a9.765 9.765 0 0 1-7.478 6.817 18.64 18.64 0 0 0 1.988-4.718 18.627 18.627 0 0 0 5.49-2.098ZM2.644 14.752c1.682.971 3.53 1.688 5.49 2.099a18.64 18.64 0 0 0 1.988 4.718 9.765 9.765 0 0 1-7.478-6.816ZM13.878 2.43a9.755 9.755 0 0 1 6.116 3.986 11.267 11.267 0 0 1-3.746 2.504 18.63 18.63 0 0 0-2.37-6.49ZM12 2.276a17.152 17.152 0 0 1 2.805 7.121c-.897.23-1.837.353-2.805.353-.968 0-1.908-.122-2.805-.353A17.151 17.151 0 0 1 12 2.276ZM10.122 2.43a18.629 18.629 0 0 0-2.37 6.49 11.266 11.266 0 0 1-3.746-2.504 9.754 9.754 0 0 1 6.116-3.985Z"}))}const bF=w.forwardRef(gF);function xF({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M12 1.5a5.25 5.25 0 0 0-5.25 5.25v3a3 3 0 0 0-3 3v6.75a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3v-6.75a3 3 0 0 0-3-3v-3c0-2.9-2.35-5.25-5.25-5.25Zm3.75 8.25v-3a3.75 3.75 0 1 0-7.5 0v3h7.5Z",clipRule:"evenodd"}))}const wF=w.forwardRef(xF);function SF({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M1.5 4.5a3 3 0 0 1 3-3h1.372c.86 0 1.61.586 1.819 1.42l1.105 4.423a1.875 1.875 0 0 1-.694 1.955l-1.293.97c-.135.101-.164.249-.126.352a11.285 11.285 0 0 0 6.697 6.697c.103.038.25.009.352-.126l.97-1.293a1.875 1.875 0 0 1 1.955-.694l4.423 1.105c.834.209 1.42.959 1.42 1.82V19.5a3 3 0 0 1-3 3h-2.25C8.552 22.5 1.5 15.448 1.5 6.75V4.5Z",clipRule:"evenodd"}))}const _F=w.forwardRef(SF),kw=j.forwardRef(({blocks:e,direction:t,sender:n,timestamp:r,metadata:i,sendMessage:a,messageId:o},s)=>{const[u,l]=Wd({skipSnaps:!0,loop:!0}),[c,f]=j.useState(!0),[d,p]=j.useState(!0),m=j.useCallback(()=>l==null?void 0:l.scrollPrev(),[l]),h=j.useCallback(()=>l==null?void 0:l.scrollNext(),[l]),{message:{blocks:{carousel:y}}}=yt,v=j.useCallback(g=>{f(!g.canScrollPrev()),p(!g.canScrollNext())},[]);return j.useEffect(()=>{l&&(v(l),l.on("reInit",v),l.on("select",v))},[l,v]),I.jsxs("div",{...y==null?void 0:y.container,"data-container":"carousel",ref:u,children:[I.jsx("div",{ref:s,...y==null?void 0:y.slidesContainer,children:e.map((g,b)=>I.jsx(ba,{block:{...g,direction:t,timestamp:r,sender:n,messageId:o,sendMessage:a},direction:t,sender:n,timestamp:r,metadata:i,sendMessage:a,messageId:o},b))}),e.length>1&&I.jsxs(I.Fragment,{children:[I.jsx(fF,{...y==null?void 0:y.backButton,"data-disabled":c?"":void 0,onClick:m}),I.jsx(pF,{...y==null?void 0:y.nextButton,"data-disabled":d?"":void 0,onClick:h})]})]})});kw.displayName="Carousel";const Tw=Math.floor;function Ow(e){return Cw(e)?(e.nodeName||"").toLowerCase():"#document"}function Ko(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function EF(e){var t;return(t=(Cw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Cw(e){return e instanceof Node||e instanceof Ko(e).Node}function Mn(e){return e instanceof Element||e instanceof Ko(e).Element}function ma(e){return e instanceof HTMLElement||e instanceof Ko(e).HTMLElement}function Zd(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ko(e).ShadowRoot}function kF(e){return["html","body","#document"].includes(Ow(e))}function TF(e){return Ko(e).getComputedStyle(e)}function OF(e){if(Ow(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Zd(e)&&e.host||EF(e);return Zd(t)?t.host:t}function ai(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 mn(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Zd(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function $w(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function CF(){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 Iw(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test($w())||t.test(CF()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Rw(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 Pw(){return/apple/i.test(navigator.vendor)}function $F(){return $w().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Aw(e,t){return["mouse","pen"].includes(e)}function IF(e){return"nativeEvent"in e}function RF(e){return e.matches("html,body")}function Zn(e){return(e==null?void 0:e.ownerDocument)||document}function Kd(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 Nw(e){return"composedPath"in e?e.composedPath()[0]:e.target}const PF="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Dw(e){return ma(e)&&e.matches(PF)}function Gt(e){e.preventDefault(),e.stopPropagation()}const Gd="ArrowUp",hu="ArrowDown",va="ArrowLeft",Go="ArrowRight";function mu(e,t,n){return Math.floor(e/t)!==n}function Yo(e,t){return t<0||t>=e.current.length}function Yd(e,t){return tn(e,{disabledIndices:t})}function Mw(e,t){return tn(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function tn(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:a=1}=t===void 0?{}:t;const o=e.current;let s=n;do{var u,l;s=s+(r?-a:a)}while(s>=0&&s<=o.length-1&&(i?i.includes(s):o[s]==null||(u=o[s])!=null&&u.hasAttribute("disabled")||((l=o[s])==null?void 0:l.getAttribute("aria-disabled"))==="true"));return s}function AF(e,t){let{event:n,orientation:r,loop:i,cols:a,disabledIndices:o,minIndex:s,maxIndex:u,prevIndex:l,stopEvent:c=!1}=t,f=l;if(n.key===Gd){if(c&&Gt(n),l===-1)f=u;else if(f=tn(e,{startingIndex:f,amount:a,decrement:!0,disabledIndices:o}),i&&(l-a<s||f<0)){const d=l%a,p=u%a,m=u-(p-d);p===d?f=u:f=p>d?m:m-a}Yo(e,f)&&(f=l)}if(n.key===hu&&(c&&Gt(n),l===-1?f=s:(f=tn(e,{startingIndex:l,amount:a,disabledIndices:o}),i&&l+a>u&&(f=tn(e,{startingIndex:l%a-a,amount:a,disabledIndices:o}))),Yo(e,f)&&(f=l)),r==="both"){const d=Tw(l/a);n.key===Go&&(c&&Gt(n),l%a!==a-1?(f=tn(e,{startingIndex:l,disabledIndices:o}),i&&mu(f,a,d)&&(f=tn(e,{startingIndex:l-l%a-1,disabledIndices:o}))):i&&(f=tn(e,{startingIndex:l-l%a-1,disabledIndices:o})),mu(f,a,d)&&(f=l)),n.key===va&&(c&&Gt(n),l%a!==0?(f=tn(e,{startingIndex:l,disabledIndices:o,decrement:!0}),i&&mu(f,a,d)&&(f=tn(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:o}))):i&&(f=tn(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:o})),mu(f,a,d)&&(f=l));const p=Tw(u/a)===d;Yo(e,f)&&(i&&p?f=n.key===va?u:tn(e,{startingIndex:l-l%a-1,disabledIndices:o}):f=l)}return f}let jw=0;function Mr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(jw);const a=()=>e==null?void 0:e.focus({preventScroll:n});i?a():jw=requestAnimationFrame(a)}var jt=typeof document<"u"?j.useLayoutEffect:j.useEffect;function vu(){return vu=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},vu.apply(this,arguments)}let Jd=!1,NF=0;const Lw=()=>"floating-ui-"+NF++;function DF(){const[e,t]=w.useState(()=>Jd?Lw():void 0);return jt(()=>{e==null&&t(Lw())},[]),w.useEffect(()=>{Jd||(Jd=!0)},[]),e}const Xd=w.useId||DF;function MF(){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 jF=w.createContext(null),LF=w.createContext(null),Fw=()=>{var e;return((e=w.useContext(jF))==null?void 0:e.id)||null},yu=()=>w.useContext(LF);function Jo(e){return"data-floating-ui-"+e}function oi(e){const t=j.useRef(e);return jt(()=>{t.current=e}),t}function FF(e,t){var n;let r=[],i=(n=e.find(a=>a.id===t))==null?void 0:n.parentId;for(;i;){const a=e.find(o=>o.id===i);i=a==null?void 0:a.parentId,a&&(r=r.concat(a))}return r}function ya(e,t){let n=e.filter(i=>{var a;return i.parentId===t&&((a=i.context)==null?void 0:a.open)}),r=n;for(;r.length;)r=e.filter(i=>{var a;return(a=r)==null?void 0:a.some(o=>{var s;return i.parentId===o.id&&((s=i.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function BF(e,t){let n,r=-1;function i(a,o){o>r&&(n=a,r=o),ya(e,a).forEach(u=>{i(u.id,o+1)})}return i(t,0),e.find(a=>a.id===n)}let ga=new WeakMap,gu=new WeakSet,bu={},Qd=0;const UF=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Bw=e=>e&&(e.host||Bw(e.parentNode)),zF=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Bw(n);return e.contains(r)?r:null}).filter(n=>n!=null);function qF(e,t,n,r){const i="data-floating-ui-inert",a=r?"inert":n?"aria-hidden":null,o=zF(t,e),s=new Set,u=new Set(o),l=[];bu[i]||(bu[i]=new WeakMap);const c=bu[i];o.forEach(f),d(t),s.clear();function f(p){!p||s.has(p)||(s.add(p),p.parentNode&&f(p.parentNode))}function d(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,m=>{if(s.has(m))d(m);else{const h=a?m.getAttribute(a):null,y=h!==null&&h!=="false",v=(ga.get(m)||0)+1,g=(c.get(m)||0)+1;ga.set(m,v),c.set(m,g),l.push(m),v===1&&y&&gu.add(m),g===1&&m.setAttribute(i,""),!y&&a&&m.setAttribute(a,"true")}})}return Qd++,()=>{l.forEach(p=>{const m=(ga.get(p)||0)-1,h=(c.get(p)||0)-1;ga.set(p,m),c.set(p,h),m||(!gu.has(p)&&a&&p.removeAttribute(a),gu.delete(p)),h||p.removeAttribute(i)}),Qd--,Qd||(ga=new WeakMap,ga=new WeakMap,gu=new WeakSet,bu={})}}function Uw(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Zn(e[0]).body;return qF(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const ep=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function zw(e,t){const n=jd(e,ep());t==="prev"&&n.reverse();const r=n.indexOf(ai(Zn(e)));return n.slice(r+1)[0]}function qw(){return zw(document.body,"next")}function Vw(){return zw(document.body,"prev")}function Xo(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!mn(n,r)}function VF(e){jd(e,ep()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function HF(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 tp={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 WF;function Hw(e){e.key==="Tab"&&(e.target,clearTimeout(WF))}const xu=w.forwardRef(function(t,n){const[r,i]=w.useState();jt(()=>(Pw()&&i("button"),document.addEventListener("keydown",Hw),()=>{document.removeEventListener("keydown",Hw)}),[]);const a={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Jo("focus-guard")]:"",style:tp};return w.createElement("span",vu({},t,a))}),Ww=w.createContext(null);function ZF(e){let{id:t,root:n}=e===void 0?{}:e;const[r,i]=w.useState(null),a=Xd(),o=Zw(),s=w.useMemo(()=>({id:t,root:n,portalContext:o,uniqueId:a}),[t,n,o,a]),u=w.useRef();return jt(()=>()=>{r==null||r.remove()},[r,s]),jt(()=>{if(u.current===s)return;u.current=s;const{id:l,root:c,portalContext:f,uniqueId:d}=s,p=l?document.getElementById(l):null,m=Jo("portal");if(p){const h=document.createElement("div");h.id=d,h.setAttribute(m,""),p.appendChild(h),i(h)}else{let h=c||(f==null?void 0:f.portalNode);h&&!Mn(h)&&(h=h.current),h=h||document.body;let y=null;l&&(y=document.createElement("div"),y.id=l,h.appendChild(y));const v=document.createElement("div");v.id=d,v.setAttribute(m,""),h=y||h,h.appendChild(v),i(v)}},[s]),r}function KF(e){let{children:t,id:n,root:r=null,preserveTabOrder:i=!0}=e;const a=ZF({id:n,root:r}),[o,s]=w.useState(null),u=w.useRef(null),l=w.useRef(null),c=w.useRef(null),f=w.useRef(null),d=!!o&&!o.modal&&o.open&&i&&!!(r||a);return w.useEffect(()=>{if(!a||!i||o!=null&&o.modal)return;function p(m){a&&Xo(m)&&(m.type==="focusin"?HF:VF)(a)}return a.addEventListener("focusin",p,!0),a.addEventListener("focusout",p,!0),()=>{a.removeEventListener("focusin",p,!0),a.removeEventListener("focusout",p,!0)}},[a,i,o==null?void 0:o.modal]),w.createElement(Ww.Provider,{value:w.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:u,afterOutsideRef:l,beforeInsideRef:c,afterInsideRef:f,portalNode:a,setFocusManagerState:s}),[i,a])},d&&a&&w.createElement(xu,{"data-type":"outside",ref:u,onFocus:p=>{if(Xo(p,a)){var m;(m=c.current)==null||m.focus()}else{const h=Vw()||(o==null?void 0:o.refs.domReference.current);h==null||h.focus()}}}),d&&a&&w.createElement("span",{"aria-owns":a.id,style:tp}),a&&Ti.createPortal(t,a),d&&a&&w.createElement(xu,{"data-type":"outside",ref:l,onFocus:p=>{if(Xo(p,a)){var m;(m=f.current)==null||m.focus()}else{const h=qw()||(o==null?void 0:o.refs.domReference.current);h==null||h.focus(),o!=null&&o.closeOnFocusOut&&(o==null||o.onOpenChange(!1,p.nativeEvent))}}}))}const Zw=()=>w.useContext(Ww),GF=w.forwardRef(function(t,n){return w.createElement("button",vu({},t,{type:"button",ref:n,tabIndex:-1,style:tp}))});function YF(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],guards:a=!0,initialFocus:o=0,returnFocus:s=!0,modal:u=!0,visuallyHiddenDismiss:l=!1,closeOnFocusOut:c=!0}=e,{open:f,refs:d,nodeId:p,onOpenChange:m,events:h,dataRef:y,elements:{domReference:v,floating:g}}=t,b=UF()?a:!0,k=oi(i),S=oi(o),E=oi(s),O=yu(),L=Zw(),D=typeof o=="number"&&o<0,T=w.useRef(null),P=w.useRef(null),V=w.useRef(!1),$=w.useRef(null),F=w.useRef(!1),M=L!=null,B=v&&v.getAttribute("role")==="combobox"&&Dw(v)&&D,W=w.useCallback(function(q){return q===void 0&&(q=g),q?jd(q,ep()):[]},[g]),U=w.useCallback(q=>{const K=W(q);return k.current.map(_=>v&&_==="reference"?v:g&&_==="floating"?g:K).filter(Boolean).flat()},[v,g,k,W]);w.useEffect(()=>{if(r||!u)return;function q(_){if(_.key==="Tab"){mn(g,ai(Zn(g)))&&W().length===0&&!B&&Gt(_);const Y=U(),oe=Nw(_);k.current[0]==="reference"&&oe===v&&(Gt(_),_.shiftKey?Mr(Y[Y.length-1]):Mr(Y[1])),k.current[1]==="floating"&&oe===g&&_.shiftKey&&(Gt(_),Mr(Y[0]))}}const K=Zn(g);return K.addEventListener("keydown",q),()=>{K.removeEventListener("keydown",q)}},[r,v,g,u,k,d,B,W,U]),w.useEffect(()=>{if(r||!c)return;function q(){F.current=!0,setTimeout(()=>{F.current=!1})}function K(_){const Y=_.relatedTarget;queueMicrotask(()=>{const oe=!(mn(v,Y)||mn(g,Y)||mn(Y,g)||mn(L==null?void 0:L.portalNode,Y)||Y!=null&&Y.hasAttribute(Jo("focus-guard"))||O&&(ya(O.nodesRef.current,p).find(ne=>{var le,pe;return mn((le=ne.context)==null?void 0:le.elements.floating,Y)||mn((pe=ne.context)==null?void 0:pe.elements.domReference,Y)})||FF(O.nodesRef.current,p).find(ne=>{var le,pe;return((le=ne.context)==null?void 0:le.elements.floating)===Y||((pe=ne.context)==null?void 0:pe.elements.domReference)===Y})));Y&&oe&&!F.current&&Y!==$.current&&(V.current=!0,m(!1,_))})}if(g&&ma(v))return v.addEventListener("focusout",K),v.addEventListener("pointerdown",q),!u&&g.addEventListener("focusout",K),()=>{v.removeEventListener("focusout",K),v.removeEventListener("pointerdown",q),!u&&g.removeEventListener("focusout",K)}},[r,v,g,u,p,O,L,m,c]),w.useEffect(()=>{var q;if(r)return;const K=Array.from((L==null||(q=L.portalNode)==null?void 0:q.querySelectorAll("["+Jo("portal")+"]"))||[]);if(g){const _=[g,...K,T.current,P.current,k.current.includes("reference")||B?v:null].filter(oe=>oe!=null),Y=u?Uw(_,b,!b):Uw(_);return()=>{Y()}}},[r,v,g,u,k,L,B,b]),jt(()=>{if(r||!g)return;const q=Zn(g),K=ai(q);queueMicrotask(()=>{const _=U(g),Y=S.current,oe=(typeof Y=="number"?_[Y]:Y.current)||g,ne=mn(g,K);!D&&!ne&&f&&Mr(oe,{preventScroll:oe===g})})},[r,f,g,D,U,S]),jt(()=>{if(r||!g)return;let q=!1;const K=Zn(g),_=ai(K),Y=y.current;$.current=_;function oe(ne){if(ne.type==="escapeKey"&&d.domReference.current&&($.current=d.domReference.current),["referencePress","escapeKey"].includes(ne.type))return;const le=ne.data.returnFocus;typeof le=="object"?(V.current=!1,q=le.preventScroll):V.current=!le}return h.on("dismiss",oe),()=>{h.off("dismiss",oe);const ne=ai(K);(mn(g,ne)||O&&ya(O.nodesRef.current,p).some(pe=>{var he;return mn((he=pe.context)==null?void 0:he.elements.floating,ne)})||Y.openEvent&&["click","mousedown"].includes(Y.openEvent.type))&&d.domReference.current&&($.current=d.domReference.current),E.current&&ma($.current)&&!V.current&&Mr($.current,{cancelPrevious:!1,preventScroll:q})}},[r,g,E,y,d,h,O,p]),jt(()=>{if(!(r||!L))return L.setFocusManagerState({modal:u,closeOnFocusOut:c,open:f,onOpenChange:m,refs:d}),()=>{L.setFocusManagerState(null)}},[r,L,u,f,m,d,c]),jt(()=>{if(!r&&g&&typeof MutationObserver=="function"&&!D){const q=()=>{const _=g.getAttribute("tabindex");k.current.includes("floating")||ai(Zn(g))!==d.domReference.current&&W().length===0?_!=="0"&&g.setAttribute("tabindex","0"):_!=="-1"&&g.setAttribute("tabindex","-1")};q();const K=new MutationObserver(q);return K.observe(g,{childList:!0,subtree:!0,attributes:!0}),()=>{K.disconnect()}}},[r,g,d,k,W,D]);function N(q){return r||!l||!u?null:w.createElement(GF,{ref:q==="start"?T:P,onClick:K=>m(!1,K.nativeEvent)},typeof l=="string"?l:"Dismiss")}const x=!r&&b&&!B&&(M||u);return w.createElement(w.Fragment,null,x&&w.createElement(xu,{"data-type":"inside",ref:L==null?void 0:L.beforeInsideRef,onFocus:q=>{if(u){const _=U();Mr(i[0]==="reference"?_[0]:_[_.length-1])}else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(V.current=!1,Xo(q,L.portalNode)){const _=qw()||v;_==null||_.focus()}else{var K;(K=L.beforeOutsideRef.current)==null||K.focus()}}}),!B&&N("start"),n,N("end"),x&&w.createElement(xu,{"data-type":"inside",ref:L==null?void 0:L.afterInsideRef,onFocus:q=>{if(u)Mr(U()[0]);else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(c&&(V.current=!0),Xo(q,L.portalNode)){const _=Vw()||v;_==null||_.focus()}else{var K;(K=L.afterOutsideRef.current)==null||K.focus()}}}))}function Kw(e){return ma(e.target)&&e.target.tagName==="BUTTON"}function Gw(e){return Dw(e)}function JF(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:a}}=e,{enabled:o=!0,event:s="click",toggle:u=!0,ignoreMouse:l=!1,keyboardHandlers:c=!0}=t,f=w.useRef(),d=w.useRef(!1);return w.useMemo(()=>o?{reference:{onPointerDown(p){f.current=p.pointerType},onMouseDown(p){p.button===0&&(Aw(f.current)&&l||s!=="click"&&(n&&u&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")?r(!1,p.nativeEvent):(p.preventDefault(),r(!0,p.nativeEvent))))},onClick(p){if(s==="mousedown"&&f.current){f.current=void 0;return}Aw(f.current)&&l||(n&&u&&(!i.current.openEvent||i.current.openEvent.type==="click")?r(!1,p.nativeEvent):r(!0,p.nativeEvent))},onKeyDown(p){f.current=void 0,!(p.defaultPrevented||!c||Kw(p))&&(p.key===" "&&!Gw(a)&&(p.preventDefault(),d.current=!0),p.key==="Enter"&&r(!(n&&u),p.nativeEvent))},onKeyUp(p){p.defaultPrevented||!c||Kw(p)||Gw(a)||p.key===" "&&d.current&&(d.current=!1,r(!(n&&u),p.nativeEvent))}}}:{},[o,i,s,l,c,a,u,n,r])}const XF=w.useInsertionEffect||(e=>e());function si(e){const t=w.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return XF(()=>{t.current=e}),w.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 QF={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},e5={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},t5=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 n5(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:i,nodeId:a,elements:{reference:o,domReference:s,floating:u},dataRef:l}=e,{enabled:c=!0,escapeKey:f=!0,outsidePress:d=!0,outsidePressEvent:p="pointerdown",referencePress:m=!1,referencePressEvent:h="pointerdown",ancestorScroll:y=!1,bubbles:v}=t,g=yu(),b=Fw()!=null,k=si(typeof d=="function"?d:()=>!1),S=typeof d=="function"?k:d,E=w.useRef(!1),{escapeKeyBubbles:O,outsidePressBubbles:L}=t5(v),D=si(P=>{if(!n||!c||!f||P.key!=="Escape")return;const V=g?ya(g.nodesRef.current,a):[];if(!O&&(P.stopPropagation(),V.length>0)){let $=!0;if(V.forEach(F=>{var M;if((M=F.context)!=null&&M.open&&!F.context.dataRef.current.__escapeKeyBubbles){$=!1;return}}),!$)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,IF(P)?P.nativeEvent:P)}),T=si(P=>{const V=E.current;if(E.current=!1,V||typeof S=="function"&&!S(P))return;const $=Nw(P),F="["+Jo("inert")+"]",M=Zn(u).querySelectorAll(F);let B=Mn($)?$:null;for(;B&&!kF(B);){const N=OF(B);if(N===Zn(u).body||!Mn(N))break;B=N}if(M.length&&Mn($)&&!RF($)&&!mn($,u)&&Array.from(M).every(N=>!mn(B,N)))return;if(ma($)&&u){const N=$.clientWidth>0&&$.scrollWidth>$.clientWidth,x=$.clientHeight>0&&$.scrollHeight>$.clientHeight;let q=x&&P.offsetX>$.clientWidth;if(x&&TF($).direction==="rtl"&&(q=P.offsetX<=$.offsetWidth-$.clientWidth),q||N&&P.offsetY>$.clientHeight)return}const W=g&&ya(g.nodesRef.current,a).some(N=>{var x;return Kd(P,(x=N.context)==null?void 0:x.elements.floating)});if(Kd(P,u)||Kd(P,s)||W)return;const U=g?ya(g.nodesRef.current,a):[];if(U.length>0){let N=!0;if(U.forEach(x=>{var q;if((q=x.context)!=null&&q.open&&!x.context.dataRef.current.__outsidePressBubbles){N=!1;return}}),!N)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:b?{preventScroll:!0}:Iw(P)||Rw(P)}}),r(!1,P)});return w.useEffect(()=>{if(!n||!c)return;l.current.__escapeKeyBubbles=O,l.current.__outsidePressBubbles=L;function P(F){r(!1,F)}const V=Zn(u);f&&V.addEventListener("keydown",D),S&&V.addEventListener(p,T);let $=[];return y&&(Mn(s)&&($=ni(s)),Mn(u)&&($=$.concat(ni(u))),!Mn(o)&&o&&o.contextElement&&($=$.concat(ni(o.contextElement)))),$=$.filter(F=>{var M;return F!==((M=V.defaultView)==null?void 0:M.visualViewport)}),$.forEach(F=>{F.addEventListener("scroll",P,{passive:!0})}),()=>{f&&V.removeEventListener("keydown",D),S&&V.removeEventListener(p,T),$.forEach(F=>{F.removeEventListener("scroll",P)})}},[l,u,s,o,f,S,p,n,r,y,c,O,L,D,T]),w.useEffect(()=>{E.current=!1},[S,p]),w.useMemo(()=>c?{reference:{onKeyDown:D,[QF[h]]:P=>{m&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,P.nativeEvent))}},floating:{onKeyDown:D,[e5[p]]:()=>{E.current=!0}}}:{},[c,i,m,p,h,r,D])}let np;process.env.NODE_ENV!=="production"&&(np=new Set);function r5(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:i}=e;if(process.env.NODE_ENV!=="production"){var a;const O="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((a=e.elements)!=null&&a.reference&&!Mn(e.elements.reference)){var o;if(!((o=np)!=null&&o.has(O))){var s;(s=np)==null||s.add(O),console.error(O)}}}const[u,l]=w.useState(null),c=((t=e.elements)==null?void 0:t.reference)||u,f=fL(e),d=yu(),p=si((O,L)=>{O&&(h.current.openEvent=L),r==null||r(O,L)}),m=w.useRef(null),h=w.useRef({}),y=w.useState(()=>MF())[0],v=Xd(),g=w.useCallback(O=>{const L=Mn(O)?{getBoundingClientRect:()=>O.getBoundingClientRect(),contextElement:O}:O;f.refs.setReference(L)},[f.refs]),b=w.useCallback(O=>{(Mn(O)||O===null)&&(m.current=O,l(O)),(Mn(f.refs.reference.current)||f.refs.reference.current===null||O!==null&&!Mn(O))&&f.refs.setReference(O)},[f.refs]),k=w.useMemo(()=>({...f.refs,setReference:b,setPositionReference:g,domReference:m}),[f.refs,b,g]),S=w.useMemo(()=>({...f.elements,domReference:c}),[f.elements,c]),E=w.useMemo(()=>({...f,refs:k,elements:S,dataRef:h,nodeId:i,floatingId:v,events:y,open:n,onOpenChange:p}),[f,i,v,y,n,p,k,S]);return jt(()=>{const O=d==null?void 0:d.nodesRef.current.find(L=>L.id===i);O&&(O.context=E)}),w.useMemo(()=>({...f,context:E,refs:k,elements:S}),[f,k,S,E])}function rp(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(i=>i?i[n]:null).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(o=>{let[s,u]=o;if(s.indexOf("on")===0){if(r.has(s)||r.set(s,[]),typeof u=="function"){var l;(l=r.get(s))==null||l.push(u),i[s]=function(){for(var c,f=arguments.length,d=new Array(f),p=0;p<f;p++)d[p]=arguments[p];return(c=r.get(s))==null?void 0:c.map(m=>m(...d)).find(m=>m!==void 0)}}}else i[s]=u}),i),{})}}function i5(e){e===void 0&&(e=[]);const t=e,n=w.useCallback(a=>rp(a,e,"reference"),t),r=w.useCallback(a=>rp(a,e,"floating"),t),i=w.useCallback(a=>rp(a,e,"item"),e.map(a=>a==null?void 0:a.item));return w.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])}let Yw=!1;function wu(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Jw(e,t){return wu(t,e===Gd||e===hu,e===va||e===Go)}function ip(e,t,n){return wu(t,e===hu,n?e===va:e===Go)||e==="Enter"||e==" "||e===""}function a5(e,t,n){return wu(t,n?e===va:e===Go,e===hu)}function Xw(e,t,n){return wu(t,n?e===Go:e===va,e===Gd)}function o5(e,t){const{open:n,onOpenChange:r,refs:i,elements:{domReference:a,floating:o}}=e,{listRef:s,activeIndex:u,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:f=null,allowEscape:d=!1,loop:p=!1,nested:m=!1,rtl:h=!1,virtual:y=!1,focusItemOnOpen:v="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:b=!0,disabledIndices:k=void 0,orientation:S="vertical",cols:E=1,scrollItemIntoView:O=!0,virtualItemRef:L}=t;process.env.NODE_ENV!=="production"&&(d&&(p||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),y||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),S==="vertical"&&E>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const D=Fw(),T=yu(),P=si(l),V=w.useRef(v),$=w.useRef(f??-1),F=w.useRef(null),M=w.useRef(!0),B=w.useRef(P),W=w.useRef(!!o),U=w.useRef(!1),N=w.useRef(!1),x=oi(k),q=oi(n),K=oi(O),[_,Y]=w.useState(),[oe,ne]=w.useState(),le=si(function(ue,Q,Z){Z===void 0&&(Z=!1);const de=ue.current[Q.current];de&&(y?(Y(de.id),T==null||T.events.emit("virtualfocus",de),L&&(L.current=de)):Mr(de,{preventScroll:!0,sync:$F()&&Pw()?Yw||U.current:!1}),requestAnimationFrame(()=>{const ve=K.current;ve&&de&&(Z||!M.current)&&(de.scrollIntoView==null||de.scrollIntoView(typeof ve=="boolean"?{block:"nearest",inline:"nearest"}:ve))}))});jt(()=>{document.createElement("div").focus({get preventScroll(){return Yw=!0,!1}})},[]),jt(()=>{c&&(n&&o?V.current&&f!=null&&(N.current=!0,P(f)):W.current&&($.current=-1,B.current(null)))},[c,n,o,f,P]),jt(()=>{if(c&&n&&o)if(u==null){if(U.current=!1,f!=null)return;if(W.current&&($.current=-1,le(s,$)),!W.current&&V.current&&(F.current!=null||V.current===!0&&F.current==null)){let ue=0;const Q=()=>{s.current[0]==null?(ue<2&&(ue?requestAnimationFrame:queueMicrotask)(Q),ue++):($.current=F.current==null||ip(F.current,S,h)||m?Yd(s,x.current):Mw(s,x.current),F.current=null,P($.current))};Q()}}else Yo(s,u)||($.current=u,le(s,$,N.current),N.current=!1)},[c,n,o,u,f,m,s,S,h,P,le,x]),jt(()=>{var ue,Q;if(!c||o||!T||y||!W.current)return;const Z=T.nodesRef.current,de=(ue=Z.find(R=>R.id===D))==null||(Q=ue.context)==null?void 0:Q.elements.floating,ve=ai(Zn(o)),$e=Z.some(R=>R.context&&mn(R.context.elements.floating,ve));de&&!$e&&M.current&&de.focus({preventScroll:!0})},[c,o,T,D,y]),jt(()=>{if(!c||!T||!y||D)return;function ue(Q){ne(Q.id),L&&(L.current=Q)}return T.events.on("virtualfocus",ue),()=>{T.events.off("virtualfocus",ue)}},[c,T,y,D,L]),jt(()=>{B.current=P,W.current=!!o}),jt(()=>{n||(F.current=null)},[n]);const pe=u!=null,he=w.useMemo(()=>{function ue(Z){if(!n)return;const de=s.current.indexOf(Z);de!==-1&&P(de)}return{onFocus(Z){let{currentTarget:de}=Z;ue(de)},onClick:Z=>{let{currentTarget:de}=Z;return de.focus({preventScroll:!0})},...g&&{onMouseMove(Z){let{currentTarget:de}=Z;ue(de)},onPointerLeave(Z){let{pointerType:de}=Z;!M.current||de==="touch"||($.current=-1,le(s,$),P(null),y||Mr(i.floating.current,{preventScroll:!0}))}}}},[n,i,le,g,s,P,y]);return w.useMemo(()=>{if(!c)return{};const ue=x.current;function Q(R){if(M.current=!1,U.current=!0,!q.current&&R.currentTarget===i.floating.current)return;if(m&&Xw(R.key,S,h)){Gt(R),r(!1,R.nativeEvent),ma(a)&&!y&&a.focus();return}const J=$.current,ae=Yd(s,ue),ee=Mw(s,ue);if(R.key==="Home"&&(Gt(R),$.current=ae,P($.current)),R.key==="End"&&(Gt(R),$.current=ee,P($.current)),!(E>1&&($.current=AF(s,{event:R,orientation:S,loop:p,cols:E,disabledIndices:ue,minIndex:ae,maxIndex:ee,prevIndex:$.current,stopEvent:!0}),P($.current),S==="both"))&&Jw(R.key,S)){if(Gt(R),n&&!y&&ai(R.currentTarget.ownerDocument)===R.currentTarget){$.current=ip(R.key,S,h)?ae:ee,P($.current);return}ip(R.key,S,h)?p?$.current=J>=ee?d&&J!==s.current.length?-1:ae:tn(s,{startingIndex:J,disabledIndices:ue}):$.current=Math.min(ee,tn(s,{startingIndex:J,disabledIndices:ue})):p?$.current=J<=ae?d&&J!==-1?s.current.length:ee:tn(s,{startingIndex:J,decrement:!0,disabledIndices:ue}):$.current=Math.max(ae,tn(s,{startingIndex:J,decrement:!0,disabledIndices:ue})),Yo(s,$.current)?P(null):P($.current)}}function Z(R){v==="auto"&&Iw(R.nativeEvent)&&(V.current=!0)}function de(R){V.current=v,v==="auto"&&Rw(R.nativeEvent)&&(V.current=!0)}const ve=y&&n&&pe&&{"aria-activedescendant":oe||_},$e=s.current.find(R=>(R==null?void 0:R.id)===_);return{reference:{...ve,onKeyDown(R){M.current=!1;const J=R.key.indexOf("Arrow")===0,ae=a5(R.key,S,h),ee=Xw(R.key,S,h),ke=Jw(R.key,S),Se=(m?ae:ke)||R.key==="Enter"||R.key.trim()==="";if(y&&n){const Fe=T==null?void 0:T.nodesRef.current.find(A=>A.parentId==null),z=T&&Fe?BF(T.nodesRef.current,Fe.id):null;if(J&&z&&L){const A=new KeyboardEvent("keydown",{key:R.key,bubbles:!0});if(ae||ee){var Pe,He;const X=((Pe=z.context)==null?void 0:Pe.elements.domReference)===R.currentTarget,ce=ee&&!X?(He=z.context)==null?void 0:He.elements.domReference:ae?$e:null;ce&&(Gt(R),ce.dispatchEvent(A),ne(void 0))}if(ke&&z.context&&z.context.open&&z.parentId&&R.currentTarget!==z.context.elements.domReference){var Ae;Gt(R),(Ae=z.context.elements.domReference)==null||Ae.dispatchEvent(A);return}}return Q(R)}if(!(!n&&!b&&J)){if(Se&&(F.current=m&&ke?null:R.key),m){ae&&(Gt(R),n?($.current=Yd(s,ue),P($.current)):r(!0,R.nativeEvent));return}ke&&(f!=null&&($.current=f),Gt(R),!n&&b?r(!0,R.nativeEvent):Q(R),n&&P($.current))}},onFocus(){n&&P(null)},onPointerDown:de,onMouseDown:Z,onClick:Z},floating:{"aria-orientation":S==="both"?void 0:S,...ve,onKeyDown:Q,onPointerMove(){M.current=!0}},item:he}},[a,i,_,oe,x,q,s,c,S,h,y,n,pe,m,f,b,d,E,p,v,P,r,he,T,L])}function s5(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:i=!0,role:a="dialog"}=t,o=Xd();return w.useMemo(()=>{const s={id:r,role:a};return i?a==="tooltip"?{reference:{"aria-describedby":n?r:void 0},floating:s}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":n?r:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:o}},floating:{...s,...a==="menu"&&{"aria-labelledby":o}}}:{}},[i,a,n,r,o])}function l5(e,t){var n;const{open:r,dataRef:i}=e,{listRef:a,activeIndex:o,onMatch:s,onTypingChange:u,enabled:l=!0,findMatch:c=null,resetMs:f=750,ignoreKeys:d=[],selectedIndex:p=null}=t,m=w.useRef(),h=w.useRef(""),y=w.useRef((n=p??o)!=null?n:-1),v=w.useRef(null),g=si(s),b=si(u),k=oi(c),S=oi(d);return jt(()=>{r&&(clearTimeout(m.current),v.current=null,h.current="")},[r]),jt(()=>{if(r&&h.current===""){var E;y.current=(E=p??o)!=null?E:-1}},[r,p,o]),w.useMemo(()=>{if(!l)return{};function E(D){D?i.current.typing||(i.current.typing=D,b(D)):i.current.typing&&(i.current.typing=D,b(D))}function O(D,T,P){const V=k.current?k.current(T,P):T.find($=>($==null?void 0:$.toLocaleLowerCase().indexOf(P.toLocaleLowerCase()))===0);return V?D.indexOf(V):-1}function L(D){const T=a.current;if(h.current.length>0&&h.current[0]!==" "&&(O(T,T,h.current)===-1?E(!1):D.key===" "&&Gt(D)),T==null||S.current.includes(D.key)||D.key.length!==1||D.ctrlKey||D.metaKey||D.altKey)return;r&&D.key!==" "&&(Gt(D),E(!0)),T.every(F=>{var M,B;return F?((M=F[0])==null?void 0:M.toLocaleLowerCase())!==((B=F[1])==null?void 0:B.toLocaleLowerCase()):!0})&&h.current===D.key&&(h.current="",y.current=v.current),h.current+=D.key,clearTimeout(m.current),m.current=setTimeout(()=>{h.current="",y.current=v.current,E(!1)},f);const V=y.current,$=O(T,[...T.slice((V||0)+1),...T.slice(0,(V||0)+1)],h.current);$!==-1?(g($),v.current=$):D.key!==" "&&(h.current="",E(!1))}return{reference:{onKeyDown:L},floating:{onKeyDown:L,onKeyUp(D){D.key===" "&&E(!1)}}}},[l,r,i,a,f,S,k,g,b])}const u5=({options:e,label:t,reusable:n,sendMessage:r,isReadOnly:i})=>{var M,B,W,U,N;const a=Hl(x=>x.messageContainerRef),[o,s]=w.useState(!1),[u,l]=w.useState(null),[c,f]=w.useState(null),{message:{blocks:{dropdown:d}}}=yt,p=e.reduce((x,q)=>(x[q.label]=q.value,x),{}),m=p?Object.keys(p):[],h=x=>{s(c!==null&&!n?!1:x)},{refs:y,floatingStyles:v,context:g}=r5({placement:"bottom-start",open:o,onOpenChange:h,whileElementsMounted:oL,middleware:[dL(5),pL({padding:10,boundary:(a==null?void 0:a.current)??void 0,crossAxis:!0}),hL({apply({rects:x,elements:q,availableHeight:K}){Object.assign(q.floating.style,{maxHeight:`${K}px`,minWidth:`${x.reference.width}px`})},padding:10})]}),b=w.useRef([]),k=w.useRef(m),S=w.useRef(!1),E=JF(g,{event:"mousedown"}),O=n5(g),L=s5(g,{role:"listbox"}),D=o5(g,{listRef:b,activeIndex:u,selectedIndex:c,onNavigate:l,loop:!0}),T=l5(g,{listRef:k,activeIndex:u,selectedIndex:c,onMatch:o?l:f,onTypingChange(x){S.current=x}}),{getReferenceProps:P,getFloatingProps:V,getItemProps:$}=i5([O,L,D,T,E]),F=x=>{f(x),m[x]!==void 0&&(r==null||r({type:"text",text:p[m[x]]??""})),s(!1)};return c!==null&&m[c],I.jsxs(I.Fragment,{children:[I.jsxs("div",{tabIndex:0,ref:y.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":c!==null&&!n?"":void 0,...(M=d.button)==null?void 0:M.container,...P(),children:[I.jsx("span",{...(B=d.button)==null?void 0:B.text,children:"Select..."}),I.jsx(kL,{...(W=d.button)==null?void 0:W.icon})]}),o&&I.jsx(KF,{children:I.jsx(YF,{context:g,modal:!1,children:I.jsx("div",{ref:y.setFloating,className:(N=(U=d.content)==null?void 0:U.container)==null?void 0:N.className,style:{...v},...V(),children:m.map((x,q)=>{var K;return I.jsx("div",{ref:_=>{b.current[q]=_},role:"option",tabIndex:q===u?0:-1,"aria-selected":q===c&&q===u,"data-active":q===u?"":void 0,...(K=d.content)==null?void 0:K.item,...$({onClick(){i||F(q)},onKeyDown(_){i||(_.key==="Enter"&&(_.preventDefault(),F(q)),_.key===" "&&!S.current&&(_.preventDefault(),F(q)))}}),children:x},x)})})})})]})},c5=j.forwardRef(({type:e,title:t,url:n,...r},i)=>{const{message:{blocks:{file:a}}}=yt;return I.jsxs("a",{...r,...a.container,href:n,download:!0,ref:i,target:"_blank",rel:"noreferrer",children:[I.jsx("p",{...a.title,children:t||n}),I.jsx(OL,{...a.icon})]})}),f5=Lo()((e,t)=>({components:{},getCustomComponent:async n=>{const r=t().components[n];if(r)return r;const i=await fetch(n).then(l=>l.text()),a=new Blob([i],{type:"application/javascript"}),s=await import(URL.createObjectURL(a)),u=()=>s.default;return e(l=>({components:{...l.components,[n]:u}})),u}}));globalThis.React=j;const Qw={audio:wL,bubble:Mx,button:Sj,carousel:kw,column:mw,dropdown:u5,file:c5,image:hw,location:IL,row:vw,text:rj,video:xL,custom:({url:e,name:t,data:n,...r})=>{const i=f5(l=>l.getCustomComponent),[a,o]=j.useState(null),[s,u]=j.useState(null);return j.useEffect(()=>{i(e).then(o).catch(l=>{u(l.message)})},[e]),s?I.jsx("div",{style:{color:"red"},children:s}):a?I.jsx(a,{...n,...r}):null}},ba=({block:e,renderers:t,...n})=>{const r=(t==null?void 0:t[e.type])??Qw[e.type],i={...n,...e};return I.jsx(r,{...i})};function d5({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M8 14a.75.75 0 0 1-.75-.75V4.56L4.03 7.78a.75.75 0 0 1-1.06-1.06l4.5-4.5a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1-1.06 1.06L8.75 4.56v8.69A.75.75 0 0 1 8 14Z",clipRule:"evenodd"}))}const p5=w.forwardRef(d5);function h5({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{d:"M8 1a2 2 0 0 0-2 2v4a2 2 0 1 0 4 0V3a2 2 0 0 0-2-2Z"}),w.createElement("path",{d:"M4.5 7A.75.75 0 0 0 3 7a5.001 5.001 0 0 0 4.25 4.944V13.5h-1.5a.75.75 0 0 0 0 1.5h4.5a.75.75 0 0 0 0-1.5h-1.5v-1.556A5.001 5.001 0 0 0 13 7a.75.75 0 0 0-1.5 0 3.5 3.5 0 1 1-7 0Z"}))}const m5=w.forwardRef(h5);function v5({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{d:"M8.75 3.75a.75.75 0 0 0-1.5 0v3.5h-3.5a.75.75 0 0 0 0 1.5h3.5v3.5a.75.75 0 0 0 1.5 0v-3.5h3.5a.75.75 0 0 0 0-1.5h-3.5v-3.5Z"}))}const y5=w.forwardRef(v5);function ap(){return ap=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ap.apply(null,arguments)}function g5(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}var b5=j.useLayoutEffect,x5=function(t){var n=w.useRef(t);return b5(function(){n.current=t}),n},e0=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},w5=function(t,n){var r=j.useRef();return j.useCallback(function(i){t.current=i,r.current&&e0(r.current,null),r.current=n,n&&e0(n,i)},[n])},t0={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},S5=function(t){Object.keys(t0).forEach(function(n){t.style.setProperty(n,t0[n],"important")})},n0=S5,un=null,r0=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function _5(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),un||(un=document.createElement("textarea"),un.setAttribute("tabindex","-1"),un.setAttribute("aria-hidden","true"),n0(un)),un.parentNode===null&&document.body.appendChild(un);var i=e.paddingSize,a=e.borderSize,o=e.sizingStyle,s=o.boxSizing;Object.keys(o).forEach(function(d){var p=d;un.style[p]=o[p]}),n0(un),un.value=t;var u=r0(un,e);un.value=t,u=r0(un,e),un.value="x";var l=un.scrollHeight-i,c=l*n;s==="border-box"&&(c=c+i+a),u=Math.max(c,u);var f=l*r;return s==="border-box"&&(f=f+i+a),u=Math.min(f,u),[u,l]}var i0=function(){},E5=function(t,n){return t.reduce(function(r,i){return r[i]=n[i],r},{})},k5=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],T5=!!document.documentElement.currentStyle,O5=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=E5(k5,n),i=r.boxSizing;if(i==="")return null;T5&&i==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var a=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),o=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:a,borderSize:o}},C5=O5;function a0(e,t,n){var r=x5(n);w.useLayoutEffect(function(){var i=function(o){return r.current(o)};if(e)return e.addEventListener(t,i),function(){return e.removeEventListener(t,i)}},[])}var $5=function(t){a0(window,"resize",t)},I5=function(t){a0(document.fonts,"loadingdone",t)},R5=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],P5=function(t,n){var r=t.cacheMeasurements,i=t.maxRows,a=t.minRows,o=t.onChange,s=o===void 0?i0:o,u=t.onHeightChange,l=u===void 0?i0:u,c=g5(t,R5),f=c.value!==void 0,d=w.useRef(null),p=w5(d,n),m=w.useRef(0),h=w.useRef(),y=function(){var b=d.current,k=r&&h.current?h.current:C5(b);if(k){h.current=k;var S=_5(k,b.value||b.placeholder||"x",a,i),E=S[0],O=S[1];m.current!==E&&(m.current=E,b.style.setProperty("height",E+"px","important"),l(E,{rowHeight:O}))}},v=function(b){f||y(),s(b)};return w.useLayoutEffect(y),$5(y),I5(y),w.createElement("textarea",ap({},c,{onChange:v,ref:p}))},A5=w.forwardRef(P5);const o0=j.memo(j.forwardRef(({className:e,inputRef:t,disableComposer:n,isReadOnly:r,allowFileUpload:i,connected:a,composerPlaceholder:o,showPoweredBy:s,sendMessage:u,uploadFile:l,...c},f)=>{const{composer:d}=yt,[p,m]=j.useState(""),[h,y]=j.useState(-1),[v,g]=j.useState(!1),b=j.useRef(null),k=j.useRef(null),S=Nx($=>$.messageHistory),E=Nx($=>$.addMessageToHistory);if(r)return null;const O=()=>{var $;b.current&&(($=b.current)==null||$.click())},L=n||r||!a,D=async $=>{var M;if(!l)return;const F=(M=$.target.files)==null?void 0:M[0];if(F)try{const{fileUrl:B,type:W}=await l(F),U=W==="image"?{type:W,imageUrl:B}:W==="audio"?{type:W,audioUrl:B}:W==="video"?{type:W,videoUrl:B}:{type:W,fileUrl:B};await(u==null?void 0:u(U))}catch(B){console.error("Error sending file:",B)}},T=window.SpeechRecognition||window.webkitSpeechRecognition,P=()=>{k.current||(k.current=new T);const $=k.current;$&&($.continuous=!0,$.onresult=F=>{var B,W,U;const M=((U=(W=(B=F.results)==null?void 0:B[0])==null?void 0:W[0])==null?void 0:U.transcript)??"";m(M??""),$.stop(),g(!1)},v?($.stop(),g(!1)):($.start(),g(!0)))},V=()=>{p&&(u==null||u({type:"text",text:p}),m(""),E(p),y(-1))};return I.jsxs(I.Fragment,{children:[I.jsxs("div",{"data-disabled":L,...c,className:Xl(d.container.className,e),ref:f,children:[i&&I.jsxs(I.Fragment,{children:[I.jsx("button",{type:"button",disabled:L,...d.uploadButton.container,onClick:O,children:I.jsx(y5,{...d.uploadButton.icon})}),I.jsx("input",{type:"file",ref:b,style:{display:"none"},onChange:D})]}),I.jsx(A5,{...d==null?void 0:d.input,ref:t,placeholder:o??"Type your message...",disabled:L,value:p,"data-has-value":!!p,onChange:$=>m($.target.value),maxRows:5,onKeyDown:$=>{L||($.key==="Enter"&&$.shiftKey?($.preventDefault(),m(`${p}
|
|
273
|
-
`)):$.key==="Enter"&&($.preventDefault(),V()),$.key==="ArrowUp"&&($.preventDefault(),h<S.length-1&&m(S[h+1]??""),y(()=>Math.min(h+1,S.length-1))),$.key==="ArrowDown"&&($.preventDefault(),m(h===0?"":S[h-1]??""),y(()=>Math.max(h-1,-1))))}}),p&&I.jsx("button",{type:"button","aria-label":"Send message",...d.button.container,disabled:!p||L,onClick:V,children:I.jsx(p5,{...d.button.icon})}),!p&&T&&I.jsx("button",{type:"button","aria-label":"Activate voice input",...d.voiceButton.container,disabled:!!p,onClick:P,"data-listens":!!v,children:I.jsx(m5,{...d.voiceButton.icon})})]}),I.jsx("a",{...d.poweredBy,"data-hidden":s===!1,hidden:s===!1,href:"https://botpress.com/?from=webchat",target:"_blank",rel:"noopener noreferrer",children:"⚡ by Botpress"})]})})),s0=({children:e})=>{const[t,n]=j.useState(!1),[r,i]=j.useState(""),[a,o]=j.useState(null),s=({title:l,content:c})=>{i(l),o(c),n(!0)},u=()=>{n(!1)};return I.jsxs(Lx.Provider,{value:{hideModal:u,showModal:s,title:r,content:a,open:t},children:[I.jsx(ui,{open:t,onOpenChange:n,children:I.jsx(ui.Content,{title:r,children:a})}),e]})},l0=({color:e,fontFamily:t,radius:n,themeMode:r,variant:i})=>{const a=j.useMemo(()=>wg({color:e,fontFamily:t,radius:n,themeMode:r,variant:i}),[e,t,n,r,i]);return I.jsx("style",{children:a})};function jr(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function N5(e,t){const n=w.createContext(t),r=a=>{const{children:o,...s}=a,u=w.useMemo(()=>s,Object.values(s));return I.jsx(n.Provider,{value:u,children:o})};r.displayName=e+"Provider";function i(a){const o=w.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function u0(e,t=[]){let n=[];function r(a,o){const s=w.createContext(o),u=n.length;n=[...n,o];const l=f=>{var v;const{scope:d,children:p,...m}=f,h=((v=d==null?void 0:d[e])==null?void 0:v[u])||s,y=w.useMemo(()=>m,Object.values(m));return I.jsx(h.Provider,{value:y,children:p})};l.displayName=a+"Provider";function c(f,d){var h;const p=((h=d==null?void 0:d[e])==null?void 0:h[u])||s,m=w.useContext(p);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[l,c]}const i=()=>{const a=n.map(o=>w.createContext(o));return function(s){const u=(s==null?void 0:s[e])||a;return w.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,D5(i,...t)]}function D5(...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(a){const o=r.reduce((s,{useScope:u,scopeName:l})=>{const f=u(a)[`__scope${l}`];return{...s,...f}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var M5=w.useId||(()=>{}),j5=0;function Su(e){const[t,n]=w.useState(M5());return Qi(()=>{e||n(r=>r??String(j5++))},[e]),e||(t?`radix-${t}`:"")}function c0({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=L5({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=Zr(n),u=w.useCallback(l=>{if(a){const f=typeof l=="function"?l(e):l;f!==e&&s(f)}else i(l)},[a,e,i,s]);return[o,u]}function L5({defaultProp:e,onChange:t}){const n=w.useState(e),[r]=n,i=w.useRef(r),a=Zr(t);return w.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}function F5(e,t=globalThis==null?void 0:globalThis.document){const n=Zr(e);w.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var B5="DismissableLayer",op="dismissableLayer.update",U5="dismissableLayer.pointerDownOutside",z5="dismissableLayer.focusOutside",f0,d0=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),p0=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...u}=e,l=w.useContext(d0),[c,f]=w.useState(null),d=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=w.useState({}),m=Kr(t,O=>f(O)),h=Array.from(l.layers),[y]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),v=h.indexOf(y),g=c?h.indexOf(c):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,k=g>=v,S=H5(O=>{const L=O.target,D=[...l.branches].some(T=>T.contains(L));!k||D||(i==null||i(O),o==null||o(O),O.defaultPrevented||s==null||s())},d),E=W5(O=>{const L=O.target;[...l.branches].some(T=>T.contains(L))||(a==null||a(O),o==null||o(O),O.defaultPrevented||s==null||s())},d);return F5(O=>{g===l.layers.size-1&&(r==null||r(O),!O.defaultPrevented&&s&&(O.preventDefault(),s()))},d),w.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(f0=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),h0(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=f0)}},[c,d,n,l]),w.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),h0())},[c,l]),w.useEffect(()=>{const O=()=>p({});return document.addEventListener(op,O),()=>document.removeEventListener(op,O)},[]),I.jsx(dn.div,{...u,ref:m,style:{pointerEvents:b?k?"auto":"none":void 0,...e.style},onFocusCapture:jr(e.onFocusCapture,E.onFocusCapture),onBlurCapture:jr(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:jr(e.onPointerDownCapture,S.onPointerDownCapture)})});p0.displayName=B5;var q5="DismissableLayerBranch",V5=w.forwardRef((e,t)=>{const n=w.useContext(d0),r=w.useRef(null),i=Kr(t,r);return w.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),I.jsx(dn.div,{...e,ref:i})});V5.displayName=q5;function H5(e,t=globalThis==null?void 0:globalThis.document){const n=Zr(e),r=w.useRef(!1),i=w.useRef(()=>{});return w.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let u=function(){m0(U5,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function W5(e,t=globalThis==null?void 0:globalThis.document){const n=Zr(e),r=w.useRef(!1);return w.useEffect(()=>{const i=a=>{a.target&&!r.current&&m0(z5,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function h0(){const e=new CustomEvent(op);document.dispatchEvent(e)}function m0(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?r$(i,a):i.dispatchEvent(a)}var sp="focusScope.autoFocusOnMount",lp="focusScope.autoFocusOnUnmount",v0={bubbles:!1,cancelable:!0},Z5="FocusScope",y0=w.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,u]=w.useState(null),l=Zr(i),c=Zr(a),f=w.useRef(null),d=Kr(t,h=>u(h)),p=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(r){let h=function(b){if(p.paused||!s)return;const k=b.target;s.contains(k)?f.current=k:li(f.current,{select:!0})},y=function(b){if(p.paused||!s)return;const k=b.relatedTarget;k!==null&&(s.contains(k)||li(f.current,{select:!0}))},v=function(b){if(document.activeElement===document.body)for(const S of b)S.removedNodes.length>0&&li(s)};document.addEventListener("focusin",h),document.addEventListener("focusout",y);const g=new MutationObserver(v);return s&&g.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",y),g.disconnect()}}},[r,s,p.paused]),w.useEffect(()=>{if(s){x0.add(p);const h=document.activeElement;if(!s.contains(h)){const v=new CustomEvent(sp,v0);s.addEventListener(sp,l),s.dispatchEvent(v),v.defaultPrevented||(K5(Q5(g0(s)),{select:!0}),document.activeElement===h&&li(s))}return()=>{s.removeEventListener(sp,l),setTimeout(()=>{const v=new CustomEvent(lp,v0);s.addEventListener(lp,c),s.dispatchEvent(v),v.defaultPrevented||li(h??document.body,{select:!0}),s.removeEventListener(lp,c),x0.remove(p)},0)}}},[s,l,c,p]);const m=w.useCallback(h=>{if(!n&&!r||p.paused)return;const y=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,v=document.activeElement;if(y&&v){const g=h.currentTarget,[b,k]=G5(g);b&&k?!h.shiftKey&&v===k?(h.preventDefault(),n&&li(b,{select:!0})):h.shiftKey&&v===b&&(h.preventDefault(),n&&li(k,{select:!0})):v===g&&h.preventDefault()}},[n,r,p.paused]);return I.jsx(dn.div,{tabIndex:-1,...o,ref:d,onKeyDown:m})});y0.displayName=Z5;function K5(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(li(r,{select:t}),document.activeElement!==n)return}function G5(e){const t=g0(e),n=b0(t,e),r=b0(t.reverse(),e);return[n,r]}function g0(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 b0(e,t){for(const n of e)if(!Y5(n,{upTo:t}))return n}function Y5(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 J5(e){return e instanceof HTMLInputElement&&"select"in e}function li(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&J5(e)&&t&&e.select()}}var x0=X5();function X5(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=w0(e,t),e.unshift(t)},remove(t){var n;e=w0(e,t),(n=e[0])==null||n.resume()}}}function w0(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Q5(e){return e.filter(t=>t.tagName!=="A")}function eB(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var _u=e=>{const{present:t,children:n}=e,r=tB(t),i=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),a=Kr(r.ref,nB(i));return typeof n=="function"||r.isPresent?w.cloneElement(i,{ref:a}):null};_u.displayName="Presence";function tB(e){const[t,n]=w.useState(),r=w.useRef({}),i=w.useRef(e),a=w.useRef("none"),o=e?"mounted":"unmounted",[s,u]=eB(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const l=Eu(r.current);a.current=s==="mounted"?l:"none"},[s]),Qi(()=>{const l=r.current,c=i.current;if(c!==e){const d=a.current,p=Eu(l);e?u("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(c&&d!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),Qi(()=>{if(t){let l;const c=t.ownerDocument.defaultView??window,f=p=>{const h=Eu(r.current).includes(p.animationName);if(p.target===t&&h&&(u("ANIMATION_END"),!i.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},d=p=>{p.target===t&&(a.current=Eu(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:w.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Eu(e){return(e==null?void 0:e.animationName)||"none"}function nB(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var up=0;function rB(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??S0()),document.body.insertAdjacentElement("beforeend",e[1]??S0()),up++,()=>{up===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),up--}},[])}function S0(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ku="right-scroll-bar-position",Tu="width-before-scroll-bar",iB="with-scroll-bars-hidden",aB="--removed-body-scroll-bar-size";function cp(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function oB(e,t){var n=j.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}var sB=typeof window<"u"?w.useLayoutEffect:w.useEffect,_0=new WeakMap;function lB(e,t){var n=oB(null,function(r){return e.forEach(function(i){return cp(i,r)})});return sB(function(){var r=_0.get(n);if(r){var i=new Set(r),a=new Set(e),o=n.current;i.forEach(function(s){a.has(s)||cp(s,null)}),a.forEach(function(s){i.has(s)||cp(s,o)})}_0.set(n,e)},[e]),n}function uB(e){return e}function cB(e,t){t===void 0&&(t=uB);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(a){var o=t(a,r);return n.push(o),function(){n=n.filter(function(s){return s!==o})}},assignSyncMedium:function(a){for(r=!0;n.length;){var o=n;n=[],o.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){r=!0;var o=[];if(n.length){var s=n;n=[],s.forEach(a),o=n}var u=function(){var c=o;o=[],c.forEach(a)},l=function(){return Promise.resolve().then(u)};l(),n={push:function(c){o.push(c),l()},filter:function(c){return o=o.filter(c),n}}}};return i}function fB(e){e===void 0&&(e={});var t=cB(null);return t.options=Dn({async:!0,ssr:!1},e),t}var E0=function(e){var t=e.sideCar,n=pw(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 w.createElement(r,Dn({},n))};E0.isSideCarExport=!0;function dB(e,t){return e.useMedium(t),E0}var k0=fB(),fp=function(){},Ou=w.forwardRef(function(e,t){var n=w.useRef(null),r=w.useState({onScrollCapture:fp,onWheelCapture:fp,onTouchMoveCapture:fp}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,u=e.className,l=e.removeScrollBar,c=e.enabled,f=e.shards,d=e.sideCar,p=e.noIsolation,m=e.inert,h=e.allowPinchZoom,y=e.as,v=y===void 0?"div":y,g=e.gapMode,b=pw(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=d,S=lB([n,t]),E=Dn(Dn({},b),i);return w.createElement(w.Fragment,null,c&&w.createElement(k,{sideCar:k0,removeScrollBar:l,shards:f,noIsolation:p,inert:m,setCallbacks:a,allowPinchZoom:!!h,lockRef:n,gapMode:g}),o?w.cloneElement(w.Children.only(s),Dn(Dn({},E),{ref:S})):w.createElement(v,Dn({},E,{className:u,ref:S}),s))});Ou.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ou.classNames={fullWidth:Tu,zeroRight:ku};var pB=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function hB(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=pB();return t&&e.setAttribute("nonce",t),e}function mB(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function vB(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var yB=function(){var e=0,t=null;return{add:function(n){e==0&&(t=hB())&&(mB(t,n),vB(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},gB=function(){var e=yB();return function(t,n){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},T0=function(){var e=gB(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},bB={left:0,top:0,right:0,gap:0},dp=function(e){return parseInt(e||"",10)||0},xB=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[dp(n),dp(r),dp(i)]},wB=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return bB;var t=xB(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])}},SB=T0(),xa="data-scroll-locked",_B=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
274
|
-
.`.concat(
|
|
272
|
+
*/var T2=["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])"],Md=T2.join(","),ew=typeof Element>"u",Ho=ew?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ou=!ew&&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},su=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"),a=i===""||i==="true",o=a||n&&t&&e(t.parentNode);return o},O2=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},C2=function(t,n,r){if(su(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Md));return n&&Ho.call(t,Md)&&i.unshift(t),i=i.filter(r),i},$2=function e(t,n,r){for(var i=[],a=Array.from(t);a.length;){var o=a.shift();if(!su(o,!1))if(o.tagName==="SLOT"){var s=o.assignedElements(),u=s.length?s:o.children,l=e(u,!0,r);r.flatten?i.push.apply(i,l):i.push({scopeParent:o,candidates:l})}else{var c=Ho.call(o,Md);c&&r.filter(o)&&(n||!t.includes(o))&&i.push(o);var f=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),d=!su(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(f&&d){var p=e(f===!0?o.children:f.children,!0,r);r.flatten?i.push.apply(i,p):i.push({scopeParent:o,candidates:p})}else a.unshift.apply(a,o.children)}}return i},tw=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},nw=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||O2(t))&&!tw(t)?0:t.tabIndex},I2=function(t,n){var r=nw(t);return r<0&&n&&!tw(t)?0:r},R2=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},rw=function(t){return t.tagName==="INPUT"},P2=function(t){return rw(t)&&t.type==="hidden"},A2=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},N2=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},D2=function(t){if(!t.name)return!0;var n=t.form||ou(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(o){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",o.message),!1}var a=N2(i,t.form);return!a||a===t},M2=function(t){return rw(t)&&t.type==="radio"},j2=function(t){return M2(t)&&!D2(t)},L2=function(t){var n,r=t&&ou(t),i=(n=r)===null||n===void 0?void 0:n.host,a=!1;if(r&&r!==t){var o,s,u;for(a=!!((o=i)!==null&&o!==void 0&&(s=o.ownerDocument)!==null&&s!==void 0&&s.contains(i)||t!=null&&(u=t.ownerDocument)!==null&&u!==void 0&&u.contains(t));!a&&i;){var l,c,f;r=ou(i),i=(l=r)===null||l===void 0?void 0:l.host,a=!!((c=i)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(i))}}return a},iw=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},F2=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var a=Ho.call(t,"details>summary:first-of-type"),o=a?t.parentElement:t;if(Ho.call(o,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var s=t;t;){var u=t.parentElement,l=ou(t);if(u&&!u.shadowRoot&&i(u)===!0)return iw(t);t.assignedSlot?t=t.assignedSlot:!u&&l!==t.ownerDocument?t=l.host:t=u}t=s}if(L2(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return iw(t);return!1},B2=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 Ho.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},U2=function(t,n){return!(n.disabled||su(n)||P2(n)||F2(n,t)||A2(n)||B2(n))},aw=function(t,n){return!(j2(n)||nw(n)<0||!U2(t,n))},z2=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},q2=function e(t){var n=[],r=[];return t.forEach(function(i,a){var o=!!i.scopeParent,s=o?i.scopeParent:i,u=I2(s,o),l=o?e(i.candidates):s;u===0?o?n.push.apply(n,l):n.push(s):r.push({documentOrder:a,tabIndex:u,item:i,isScope:o,content:l})}),r.sort(R2).reduce(function(i,a){return a.isScope?i.push.apply(i,a.content):i.push(a.content),i},[]).concat(n)},jd=function(t,n){n=n||{};var r;return n.getShadowRoot?r=$2([t],n.includeContainer,{filter:aw.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:z2}):r=C2(t,n.includeContainer,aw.bind(null,n)),q2(r)};function ow(e,t,n){let{reference:r,floating:i}=e;const a=Vo(t),o=_2(t),s=S2(o),u=qo(t),l=a==="y",c=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,d=r[s]/2-i[s]/2;let p;switch(u){case"top":p={x:c,y:r.y-i.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-i.width,y:f};break;default:p={x:r.x,y:r.y}}switch(Dd(t)){case"start":p[o]-=d*(n&&l?-1:1);break;case"end":p[o]+=d*(n&&l?-1:1);break}return p}const V2=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,s=a.filter(Boolean),u=await(o.isRTL==null?void 0:o.isRTL(t));let l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:f}=ow(l,r,u),d=r,p={},h=0;for(let m=0;m<s.length;m++){const{name:y,fn:v}=s[m],{x:g,y:b,data:k,reset:S}=await v({x:c,y:f,initialPlacement:r,placement:d,strategy:i,middlewareData:p,rects:l,platform:o,elements:{reference:e,floating:t}});c=g??c,f=b??f,p={...p,[y]:{...p[y],...k}},S&&h<=50&&(h++,typeof S=="object"&&(S.placement&&(d=S.placement),S.rects&&(l=S.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:c,y:f}=ow(l,d,u)),m=-1)}return{x:c,y:f,placement:d,strategy:i,middlewareData:p}};async function sw(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:s,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=iu(t,e),h=k2(p),y=s[d?f==="floating"?"reference":"floating":f],v=au(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(y)))==null||n?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:c,strategy:u})),g=f==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,b=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),k=await(a.isElement==null?void 0:a.isElement(b))?await(a.getScale==null?void 0:a.getScale(b))||{x:1,y:1}:{x:1,y:1},S=au(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:b,strategy:u}):g);return{top:(v.top-S.top+h.top)/k.y,bottom:(S.bottom-v.bottom+h.bottom)/k.y,left:(v.left-S.left+h.left)/k.x,right:(S.right-v.right+h.right)/k.x}}async function H2(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=qo(n),s=Dd(n),u=Vo(n)==="y",l=["left","top"].includes(o)?-1:1,c=a&&u?-1:1,f=iu(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof h=="number"&&(p=s==="end"?h*-1:h),u?{x:p*c,y:d*l}:{x:d*l,y:p*c}}const W2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:s}=t,u=await H2(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:a+u.y,data:{...u,placement:o}}}}},Z2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:y=>{let{x:v,y:g}=y;return{x:v,y:g}}},...u}=iu(e,t),l={x:n,y:r},c=await sw(t,u),f=Vo(qo(i)),d=Qx(f);let p=l[d],h=l[f];if(a){const y=d==="y"?"top":"left",v=d==="y"?"bottom":"right",g=p+c[y],b=p-c[v];p=Xx(g,p,b)}if(o){const y=f==="y"?"top":"left",v=f==="y"?"bottom":"right",g=h+c[y],b=h-c[v];h=Xx(g,h,b)}const m=s.fn({...t,[d]:p,[f]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[d]:a,[f]:o}}}}}},K2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:o,elements:s}=t,{apply:u=()=>{},...l}=iu(e,t),c=await sw(t,l),f=qo(i),d=Dd(i),p=Vo(i)==="y",{width:h,height:m}=a.floating;let y,v;f==="top"||f==="bottom"?(y=f,v=d===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(v=f,y=d==="end"?"top":"bottom");const g=m-c.top-c.bottom,b=h-c.left-c.right,k=da(m-c[y],g),S=da(h-c[v],b),E=!t.middlewareData.shift;let O=k,j=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(j=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=g),E&&!d){const T=_n(c.left,0),I=_n(c.right,0),U=_n(c.top,0),R=_n(c.bottom,0);p?j=h-2*(T!==0||I!==0?T+I:_n(c.left,c.right)):O=m-2*(U!==0||R!==0?U+R:_n(c.top,c.bottom))}await u({...t,availableWidth:j,availableHeight:O});const q=await o.getDimensions(s.floating);return h!==q.width||m!==q.height?{reset:{rects:!0}}:{}}}};function lw(e){const t=Hn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=cr(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=nu(n)!==a||nu(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ld(e){return Vn(e)?e:e.contextElement}function pa(e){const t=Ld(e);if(!cr(t))return ni(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=lw(t);let o=(a?nu(n.width):n.width)/r,s=(a?nu(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const G2=ni(0);function uw(e){const t=Sn(e);return!Ad()||!t.visualViewport?G2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Y2(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Sn(e)?!1:t}function Di(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=Ld(e);let o=ni(1);t&&(r?Vn(r)&&(o=pa(r)):o=pa(e));const s=Y2(a,n,r)?uw(a):ni(0);let u=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,c=i.width/o.x,f=i.height/o.y;if(a){const d=Sn(a),p=r&&Vn(r)?Sn(r):r;let h=d,m=Nd(h);for(;m&&r&&p!==h;){const y=pa(m),v=m.getBoundingClientRect(),g=Hn(m),b=v.left+(m.clientLeft+parseFloat(g.paddingLeft))*y.x,k=v.top+(m.clientTop+parseFloat(g.paddingTop))*y.y;u*=y.x,l*=y.y,c*=y.x,f*=y.y,u+=b,l+=k,h=Sn(m),m=Nd(h)}}return au({width:c,height:f,x:u,y:l})}function J2(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=ur(r),s=t?eu(t.floating):!1;if(r===o||s&&a)return n;let u={scrollLeft:0,scrollTop:0},l=ni(1);const c=ni(0),f=cr(r);if((f||!f&&!a)&&((ca(r)!=="body"||zo(o))&&(u=tu(r)),cr(r))){const d=Di(r);l=pa(r),c.x=d.x+r.clientLeft,c.y=d.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+c.x,y:n.y*l.y-u.scrollTop*l.y+c.y}}function X2(e){return Array.from(e.getClientRects())}function Fd(e,t){const n=tu(e).scrollLeft;return t?t.left+n:Di(ur(e)).left+n}function Q2(e){const t=ur(e),n=tu(e),r=e.ownerDocument.body,i=_n(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=_n(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Fd(e);const s=-n.scrollTop;return Hn(r).direction==="rtl"&&(o+=_n(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function eL(e,t){const n=Sn(e),r=ur(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,s=0,u=0;if(i){a=i.width,o=i.height;const l=Ad();(!l||l&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}return{width:a,height:o,x:s,y:u}}function tL(e,t){const n=Di(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=cr(e)?pa(e):ni(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,u=i*a.x,l=r*a.y;return{width:o,height:s,x:u,y:l}}function cw(e,t,n){let r;if(t==="viewport")r=eL(e,n);else if(t==="document")r=Q2(ur(e));else if(Vn(t))r=tL(t,n);else{const i=uw(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return au(r)}function fw(e,t){const n=ei(e);return n===t||!Vn(n)||fa(n)?!1:Hn(n).position==="fixed"||fw(n,t)}function nL(e,t){const n=t.get(e);if(n)return n;let r=ti(e,[],!1).filter(s=>Vn(s)&&ca(s)!=="body"),i=null;const a=Hn(e).position==="fixed";let o=a?ei(e):e;for(;Vn(o)&&!fa(o);){const s=Hn(o),u=Pd(o);!u&&s.position==="fixed"&&(i=null),(a?!u&&!i:!u&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||zo(o)&&!u&&fw(e,o))?r=r.filter(c=>c!==o):i=s,o=ei(o)}return t.set(e,r),r}function rL(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?eu(t)?[]:nL(t,this._c):[].concat(n),r],s=o[0],u=o.reduce((l,c)=>{const f=cw(t,c,i);return l.top=_n(f.top,l.top),l.right=da(f.right,l.right),l.bottom=da(f.bottom,l.bottom),l.left=_n(f.left,l.left),l},cw(t,s,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function iL(e){const{width:t,height:n}=lw(e);return{width:t,height:n}}function aL(e,t,n){const r=cr(t),i=ur(t),a=n==="fixed",o=Di(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const u=ni(0);if(r||!r&&!a)if((ca(t)!=="body"||zo(i))&&(s=tu(t)),r){const p=Di(t,!0,a,t);u.x=p.x+t.clientLeft,u.y=p.y+t.clientTop}else i&&(u.x=Fd(i));let l=0,c=0;if(i&&!r&&!a){const p=i.getBoundingClientRect();c=p.top+s.scrollTop,l=p.left+s.scrollLeft-Fd(i,p)}const f=o.left+s.scrollLeft-u.x-l,d=o.top+s.scrollTop-u.y-c;return{x:f,y:d,width:o.width,height:o.height}}function Bd(e){return Hn(e).position==="static"}function dw(e,t){if(!cr(e)||Hn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ur(e)===n&&(n=n.ownerDocument.body),n}function pw(e,t){const n=Sn(e);if(eu(e))return n;if(!cr(e)){let i=ei(e);for(;i&&!fa(i);){if(Vn(i)&&!Bd(i))return i;i=ei(i)}return n}let r=dw(e,t);for(;r&&x2(r)&&Bd(r);)r=dw(r,t);return r&&fa(r)&&Bd(r)&&!Pd(r)?n:r||w2(e)||n}const oL=async function(e){const t=this.getOffsetParent||pw,n=this.getDimensions,r=await n(e.floating);return{reference:aL(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function sL(e){return Hn(e).direction==="rtl"}const lL={convertOffsetParentRelativeRectToViewportRelativeRect:J2,getDocumentElement:ur,getClippingRect:rL,getOffsetParent:pw,getElementRects:oL,getClientRects:X2,getDimensions:iL,getScale:pa,isElement:Vn,isRTL:sL};function uL(e,t){let n=null,r;const i=ur(e);function a(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function o(s,u){s===void 0&&(s=!1),u===void 0&&(u=1),a();const{left:l,top:c,width:f,height:d}=e.getBoundingClientRect();if(s||t(),!f||!d)return;const p=ru(c),h=ru(i.clientWidth-(l+f)),m=ru(i.clientHeight-(c+d)),y=ru(l),g={rootMargin:-p+"px "+-h+"px "+-m+"px "+-y+"px",threshold:_n(0,da(1,u))||1};let b=!0;function k(S){const E=S[0].intersectionRatio;if(E!==u){if(!b)return o();E?o(!1,E):r=setTimeout(()=>{o(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(k,{...g,root:i.ownerDocument})}catch{n=new IntersectionObserver(k,g)}n.observe(e)}return o(!0),a}function cL(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=Ld(e),c=i||a?[...l?ti(l):[],...ti(t)]:[];c.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),a&&v.addEventListener("resize",n)});const f=l&&s?uL(l,n):null;let d=-1,p=null;o&&(p=new ResizeObserver(v=>{let[g]=v;g&&g.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),n()}),l&&!u&&p.observe(l),p.observe(t));let h,m=u?Di(e):null;u&&y();function y(){const v=Di(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&n(),m=v,h=requestAnimationFrame(y)}return n(),()=>{var v;c.forEach(g=>{i&&g.removeEventListener("scroll",n),a&&g.removeEventListener("resize",n)}),f==null||f(),(v=p)==null||v.disconnect(),p=null,u&&cancelAnimationFrame(h)}}const fL=W2,dL=Z2,pL=K2,hL=(e,t,n)=>{const r=new Map,i={platform:lL,...n},a={...i.platform,_c:r};return V2(e,t,{...i,platform:a})};var lu=typeof document<"u"?M.useLayoutEffect:M.useEffect;function uu(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(!uu(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 a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!uu(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function hw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function mw(e,t){const n=hw(e);return Math.round(t*n)/n}function Ud(e){const t=w.useRef(e);return lu(()=>{t.current=e}),t}function mL(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:u,open:l}=e,[c,f]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,p]=w.useState(r);uu(d,r)||p(r);const[h,m]=w.useState(null),[y,v]=w.useState(null),g=w.useCallback(z=>{z!==E.current&&(E.current=z,m(z))},[]),b=w.useCallback(z=>{z!==O.current&&(O.current=z,v(z))},[]),k=a||h,S=o||y,E=w.useRef(null),O=w.useRef(null),j=w.useRef(c),q=u!=null,T=Ud(u),I=Ud(i),U=Ud(l),R=w.useCallback(()=>{if(!E.current||!O.current)return;const z={placement:t,strategy:n,middleware:d};I.current&&(z.platform=I.current),hL(E.current,O.current,z).then(A=>{const x={...A,isPositioned:U.current!==!1};F.current&&!uu(j.current,x)&&(j.current=x,ky.flushSync(()=>{f(x)}))})},[d,t,n,I,U]);lu(()=>{l===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,f(z=>({...z,isPositioned:!1})))},[l]);const F=w.useRef(!1);lu(()=>(F.current=!0,()=>{F.current=!1}),[]),lu(()=>{if(k&&(E.current=k),S&&(O.current=S),k&&S){if(T.current)return T.current(k,S,R);R()}},[k,S,R,T,q]);const N=w.useMemo(()=>({reference:E,floating:O,setReference:g,setFloating:b}),[g,b]),L=w.useMemo(()=>({reference:k,floating:S}),[k,S]),W=w.useMemo(()=>{const z={position:n,left:0,top:0};if(!L.floating)return z;const A=mw(L.floating,c.x),x=mw(L.floating,c.y);return s?{...z,transform:"translate("+A+"px, "+x+"px)",...hw(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:A,top:x}},[n,s,L.floating,c.x,c.y]);return w.useMemo(()=>({...c,update:R,refs:N,elements:L,floatingStyles:W}),[c,R,N,L,W])}const vL=(e,t)=>({...fL(e),options:[e,t]}),yL=(e,t)=>({...dL(e),options:[e,t]}),gL=(e,t)=>({...pL(e),options:[e,t]});var Nn=function(){return Nn=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Nn.apply(this,arguments)};function vw(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function bL(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;function xL(){var e=M.useRef(!1),t=M.useCallback(function(){return e.current},[]);return M.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),t}function wL(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={loading:!1});var r=M.useRef(0),i=xL(),a=M.useState(n),o=a[0],s=a[1],u=M.useCallback(function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];var f=++r.current;return o.loading||s(function(d){return Nn(Nn({},d),{loading:!0})}),e.apply(void 0,l).then(function(d){return i()&&f===r.current&&s({value:d,loading:!1}),d},function(d){return i()&&f===r.current&&s({error:d,loading:!1}),d})},t);return[o,u]}function SL(e,t){t===void 0&&(t=[]);var n=wL(e,t,{loading:!0}),r=n[0],i=n[1];return M.useEffect(function(){i()},[i]),r}const yw=M.forwardRef(({url:e,type:t,orientation:n="auto",...r},i)=>{const a=M.useId(),{setIsLoading:o}=Cj(),[s,u]=M.useState(n),[l,c]=M.useState(!1),{message:{blocks:{image:f}}}=yt;return M.useLayoutEffect(()=>{o(d=>[...d,a])},[]),SL(async()=>{if(e){try{const{width:d,height:p}=await $j(e);s==="auto"&&u(_L(d,p))}catch(d){u("square"),console.error(d)}o(d=>d.filter(p=>p!==a))}},[e]),$.jsxs($.Fragment,{children:[l?null:$.jsx("div",{"data-orientation":s,...f.placeholder}),$.jsx("img",{"data-orientation":s,"data-loaded":l,...r,...f.image,src:e,alt:"",ref:i,loading:"lazy",onLoad:()=>{c(!0)}})]})});yw.displayName="Image";function _L(e,t){const n={square:1,portrait:.75,landscape:1.3333333333333333},r=e/t;return Object.keys(n).reduce((a,o)=>Math.abs(n[o]-r)<Math.abs(n[a]-r)?o:a)}const EL=M.forwardRef(({url:e,type:t,...n},r)=>{const{message:{blocks:{video:i}}}=yt;return $.jsx("div",{children:$.jsx("video",{...n,"data-chromatic":"ignore",controls:!0,src:e,...i,ref:r})})}),kL=M.forwardRef(({url:e,type:t,...n},r)=>{const{message:{blocks:{audio:i}}}=yt;return $.jsx("div",{children:$.jsx("audio",{...n,controls:!0,src:e,...i,ref:r})})});function TL({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M15.312 11.424a5.5 5.5 0 0 1-9.201 2.466l-.312-.311h2.433a.75.75 0 0 0 0-1.5H3.989a.75.75 0 0 0-.75.75v4.242a.75.75 0 0 0 1.5 0v-2.43l.31.31a7 7 0 0 0 11.712-3.138.75.75 0 0 0-1.449-.39Zm1.23-3.723a.75.75 0 0 0 .219-.53V2.929a.75.75 0 0 0-1.5 0V5.36l-.31-.31A7 7 0 0 0 3.239 8.188a.75.75 0 1 0 1.448.389A5.5 5.5 0 0 1 13.89 6.11l.311.31h-2.432a.75.75 0 0 0 0 1.5h4.243a.75.75 0 0 0 .53-.219Z",clipRule:"evenodd"}))}const OL=w.forwardRef(TL);function CL({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const $L=w.forwardRef(CL);function IL({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M4.5 2A1.5 1.5 0 0 0 3 3.5v13A1.5 1.5 0 0 0 4.5 18h11a1.5 1.5 0 0 0 1.5-1.5V7.621a1.5 1.5 0 0 0-.44-1.06l-4.12-4.122A1.5 1.5 0 0 0 11.378 2H4.5Zm4.75 6.75a.75.75 0 0 1 1.5 0v2.546l.943-1.048a.75.75 0 0 1 1.114 1.004l-2.25 2.5a.75.75 0 0 1-1.114 0l-2.25-2.5a.75.75 0 1 1 1.114-1.004l.943 1.048V8.75Z",clipRule:"evenodd"}))}const RL=w.forwardRef(IL);function PL({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"m9.69 18.933.003.001C9.89 19.02 10 19 10 19s.11.02.308-.066l.002-.001.006-.003.018-.008a5.741 5.741 0 0 0 .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 1 0 3 9c0 3.492 1.698 5.988 3.355 7.584a13.731 13.731 0 0 0 2.273 1.765 11.842 11.842 0 0 0 .976.544l.062.029.018.008.006.003ZM10 11.25a2.25 2.25 0 1 0 0-4.5 2.25 2.25 0 0 0 0 4.5Z",clipRule:"evenodd"}))}const AL=w.forwardRef(PL),NL=M.forwardRef(({type:e,latitude:t,longitude:n,title:r,...i},a)=>{const o=`https://www.google.com/maps/search/?api=1&query=${t},${n}`,{message:{blocks:{location:s}}}=yt;return $.jsxs("a",{...i,...s.container,href:o,type:"_blank",rel:"noopener",ref:a,children:[$.jsx("p",{...s.title,children:r}),$.jsx(AL,{...s.icon})]})}),gw=M.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:i,timestamp:a,metadata:o,messageId:s,sendMessage:u,...l},c)=>{const{message:{blocks:{column:f}}}=yt;return $.jsx("div",{"data-horizontal":t,"data-vertical":n,...l,...f,ref:c,children:e.map((d,p)=>$.jsx(ba,{block:{...d,direction:r,timestamp:a,sender:i,messageId:s,sendMessage:u},direction:r,sender:i,timestamp:a,metadata:o,sendMessage:u,messageId:s},p))})});gw.displayName="Column";const bw=M.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:i,timestamp:a,metadata:o,sendMessage:s,messageId:u,...l},c)=>{const{message:{blocks:{row:f}}}=yt;return $.jsx("div",{"data-horizontal":t,"data-vertical":n,...l,...f,ref:c,children:e.map((d,p)=>$.jsx(ba,{block:{...d,direction:r,timestamp:a,sender:i,messageId:u,sendMessage:s},direction:r,sender:i,timestamp:a,metadata:o,sendMessage:s,messageId:u},p))})});bw.displayName="Row";function DL(e){return Object.prototype.toString.call(e)==="[object Object]"}function xw(e){return DL(e)||Array.isArray(e)}function ML(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function zd(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||{})),a=JSON.stringify(Object.keys(t.breakpoints||{}));return i!==a?!1:n.every(o=>{const s=e[o],u=t[o];return typeof s=="function"?`${s}`==`${u}`:!xw(s)||!xw(u)?s===u:zd(s,u)})}function ww(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function jL(e,t){if(e.length!==t.length)return!1;const n=ww(e),r=ww(t);return n.every((i,a)=>{const o=r[a];return zd(i,o)})}function qd(e){return typeof e=="number"}function Sw(e){return typeof e=="string"}function Vd(e){return typeof e=="boolean"}function _w(e){return Object.prototype.toString.call(e)==="[object Object]"}function kt(e){return Math.abs(e)}function Hd(e){return Math.sign(e)}function cu(e,t){return kt(e-t)}function LL(e,t){if(e===0||t===0||kt(e)<=kt(t))return 0;const n=cu(kt(e),kt(t));return kt(n/e)}function Wo(e){return du(e).map(Number)}function Dr(e){return e[fu(e)]}function fu(e){return Math.max(0,e.length-1)}function du(e){return Object.keys(e)}function Ew(e,t){return[e,t].reduce((n,r)=>(du(r).forEach(i=>{const a=n[i],o=r[i],s=_w(a)&&_w(o);n[i]=s?Ew(a,o):o}),n),{})}function kw(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function FL(e,t){const n={start:r,center:i,end:a};function r(){return 0}function i(l){return a(l)/2}function a(l){return t-l}function o(){return t*Number(e)}function s(l){return qd(e)?o():n[e](l)}return{measure:s}}function BL(e,t){const n=e==="y"?"y":"x",r=e==="y"?"x":"y",i=s(),a=u();function o(c){const{width:f,height:d}=c;return n==="x"?f:d}function s(){return n==="y"?"top":t==="rtl"?"right":"left"}function u(){return n==="y"?"bottom":t==="rtl"?"left":"right"}return{scroll:n,cross:r,startEdge:i,endEdge:a,measureSize:o}}function ri(e,t){const n=kt(e-t);function r(l){return l<e}function i(l){return l>t}function a(l){return r(l)||i(l)}function o(l){return a(l)?r(l)?e:t:l}function s(l){return n?l-n*Math.ceil((l-t)/n):l}return{length:n,max:t,min:e,constrain:o,reachedAny:a,reachedMax:i,reachedMin:r,removeOffset:s}}function Tw(e,t,n){const{constrain:r}=ri(0,e),i=e+1;let a=o(t);function o(d){return n?kt((i+d)%i):r(d)}function s(){return a}function u(d){return a=o(d),f}function l(d){return c().set(s()+d)}function c(){return Tw(e,s(),n)}const f={get:s,set:u,add:l,clone:c};return f}function UL(e){const t=e==="rtl"?-1:1;function n(i){return i*t}return{apply:n}}function Zo(){let e=[];function t(i,a,o,s={passive:!0}){return i.addEventListener(a,o,s),e.push(()=>i.removeEventListener(a,o,s)),r}function n(){e=e.filter(i=>i())}const r={add:t,clear:n};return r}function zL(e,t,n,r,i,a,o,s,u,l,c,f,d,p,h,m,y,v,g){const{cross:b}=e,k=["INPUT","SELECT","TEXTAREA"],S={passive:!1},E=Zo(),O=Zo(),j=ri(50,225).constrain(h.measure(20)),q={mouse:300,touch:400},T={mouse:500,touch:600},I=m?43:25;let U=!1,R=0,F=0,N=!1,L=!1,W=!1,z=!1;function A(Q,Z){if(!Z)return;function de($e){(Vd(Z)||Z(Q,$e))&&ne($e)}const ve=n;E.add(ve,"dragstart",$e=>$e.preventDefault(),S).add(ve,"touchmove",()=>{},S).add(ve,"touchend",()=>{}).add(ve,"touchstart",de).add(ve,"mousedown",de).add(ve,"touchcancel",le).add(ve,"contextmenu",le).add(ve,"click",pe,!0)}function x(){E.clear(),O.clear()}function V(){const Q=z?r:n;O.add(Q,"touchmove",re,S).add(Q,"touchend",le).add(Q,"mousemove",re,S).add(Q,"mouseup",le)}function K(Q){const Z=Q.nodeName||"";return k.includes(Z)}function _(){return(m?T:q)[z?"mouse":"touch"]}function J(Q,Z){const de=d.add(Hd(Q)*-1),ve=f.byDistance(Q,!m).distance;return m||kt(Q)<j?ve:v&&Z?ve*.5:f.byIndex(de.get(),0).distance}function ne(Q){const Z=kw(Q,i);z=Z,!(Z&&Q.button!==0)&&(K(Q.target)||(W=m&&Z&&!Q.buttons&&U,U=cu(a.get(),s.get())>=2,N=!0,o.pointerDown(Q),c.useFriction(0).useDuration(0),a.set(s),V(),R=o.readPoint(Q),F=o.readPoint(Q,b),p.emit("pointerDown")))}function re(Q){const Z=o.readPoint(Q),de=o.readPoint(Q,b),ve=cu(Z,R),$e=cu(de,F);if(!L&&!z&&(!Q.cancelable||(L=ve>$e,!L)))return le(Q);const P=o.pointerMove(Q);ve>y&&(W=!0),c.useFriction(.3).useDuration(1),u.start(),a.add(t.apply(P)),Q.preventDefault()}function le(Q){const de=f.byDistance(0,!1).index!==d.get(),ve=o.pointerUp(Q)*_(),$e=J(t.apply(ve),de),P=LL(ve,$e),Y=I-10*P,oe=g+P/50;L=!1,N=!1,O.clear(),c.useDuration(Y).useFriction(oe),l.distance($e,!m),z=!1,p.emit("pointerUp")}function pe(Q){W&&(Q.stopPropagation(),Q.preventDefault())}function he(){return N}return{init:A,pointerDown:he,destroy:x}}function qL(e,t){let r,i;function a(f){return f.timeStamp}function o(f,d){const h=`client${(d||e.scroll)==="x"?"X":"Y"}`;return(kw(f,t)?f:f.touches[0])[h]}function s(f){return r=f,i=f,o(f)}function u(f){const d=o(f)-o(i),p=a(f)-a(r)>170;return i=f,p&&(r=f),d}function l(f){if(!r||!i)return 0;const d=o(i)-o(r),p=a(f)-a(r),h=a(f)-a(i)>170,m=d/p;return p&&!h&&kt(m)>.1?m:0}return{pointerDown:s,pointerMove:u,pointerUp:l,readPoint:o}}function VL(e){function t(r){return e*(r/100)}return{measure:t}}function HL(e,t,n,r,i){let a,o,s=[],u=!1;function l(p){return i.measureSize(p.getBoundingClientRect())}function c(p,h){if(!h)return;o=l(e),s=r.map(l);function m(v){for(const g of v){const b=g.target===e,k=r.indexOf(g.target),S=b?o:s[k],E=l(b?e:r[k]);if(S!==E){n.requestAnimationFrame(()=>{p.reInit(),t.emit("resize")});break}}}a=new ResizeObserver(v=>{u||(Vd(h)||h(p,v))&&m(v)}),[e].concat(r).forEach(v=>a.observe(v))}function f(){a&&a.disconnect(),u=!0}return{init:c,destroy:f}}function WL(e,t,n,r){let i=!0,a=0,o=0,s=n,u=r,l=e.get(),c=0;function f(){const S=t.get()-e.get(),E=!s;let O=0;return E?(a=0,e.set(t),O=S):(a+=S/s,a*=u,l+=a,e.add(a),O=l-c),o=Hd(O),c=l,i=kt(S)<.001,k}function d(){return i}function p(){return s}function h(){return o}function m(){return a}function y(){return g(n)}function v(){return b(r)}function g(S){return s=S,k}function b(S){return u=S,k}const k={direction:h,duration:p,velocity:m,seek:f,settled:d,useBaseFriction:v,useBaseDuration:y,useFriction:b,useDuration:g};return k}function ZL(e,t,n,r,i){const a=i.measure(10),o=i.measure(50),s=ri(.1,.99);let u=!1;function l(){return!(u||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function c(p){if(!l())return;const h=e.reachedMin(t.get())?"min":"max",m=kt(e[h]-t.get()),y=n.get()-t.get(),v=s.constrain(m/o);n.subtract(y*v),!p&&kt(y)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function f(p){u=!p}return{constrain:c,toggleActive:f}}function KL(e,t,n,r){const i=ri(-t+e,n[0]),a=u(),o=l();function s(){const f=a[0],d=Dr(a),p=a.lastIndexOf(f),h=a.indexOf(d)+1;return ri(p,h)}function u(){return n.map(i.constrain).map(f=>parseFloat(f.toFixed(3)))}function l(){if(t<=e)return[i.max];if(r==="keepSnaps")return a;const{min:f,max:d}=s();return a.slice(f,d)}return{snapsContained:o}}function GL(e,t,n){const r=t[0],i=n?r-e:Dr(t);return{limit:ri(i,r)}}function YL(e,t,n,r){const a=t.min+.1,o=t.max+.1,{reachedMin:s,reachedMax:u}=ri(a,o);function l(d){return d===1?u(n.get()):d===-1?s(n.get()):!1}function c(d){if(!l(d))return;const p=e*(d*-1);r.forEach(h=>h.add(p))}return{loop:c}}function JL(e){const{max:t,length:n}=e;function r(a){return(a-t)/-n}return{get:r}}function XL(e,t,n,r,i,a,o){const{startEdge:s,endEdge:u}=e,{groupSlides:l}=a,c=p().map(t.measure),f=h(),d=m();function p(){return l(r).map(v=>Dr(v)[u]-v[0][s]).map(kt)}function h(){return r.map(v=>n[s]-v[s]).map(v=>-kt(v))}function m(){const g=Dr(f)-Dr(i);return l(f).map(b=>b[0]).map((b,k,S)=>{const E=!k,O=k===fu(S);return o&&E?0:o&&O?g:b+c[k]})}return{snaps:f,snapsAligned:d}}function QL(e,t,n,r,i){const{reachedAny:a,removeOffset:o,constrain:s}=r;function u(h){return h.concat().sort((m,y)=>kt(m)-kt(y))[0]}function l(h){const m=e?o(h):s(h),y=t.map(g=>g-m).map(g=>c(g,0)).map((g,b)=>({diff:g,index:b})).sort((g,b)=>kt(g.diff)-kt(b.diff)),{index:v}=y[0];return{index:v,distance:m}}function c(h,m){const y=[h,h+n,h-n];if(!e)return y[0];if(!m)return u(y);const v=y.filter(g=>Hd(g)===m);return u(v)}function f(h,m){const y=t[h]-i.get(),v=c(y,m);return{index:h,distance:v}}function d(h,m){const y=i.get()+h,{index:v,distance:g}=l(y),b=!e&&a(y);if(!m||b)return{index:v,distance:h};const k=t[v]-g,S=h+c(k,0);return{index:v,distance:S}}return{byDistance:d,byIndex:f,shortcut:c}}function eF(e,t,n,r,i,a,o){function s(f){const d=f.distance,p=f.index!==t.get();a.add(d),d&&(i.duration()?e.start():(e.update(),e.render(1),e.update())),p&&(n.set(t.get()),t.set(f.index),o.emit("select"))}function u(f,d){const p=r.byDistance(f,d);s(p)}function l(f,d){const p=t.clone().set(f),h=r.byIndex(p.get(),d);s(h)}return{distance:u,index:l}}function pu(e){let t=e;function n(){return t}function r(u){t=o(u)}function i(u){t+=o(u)}function a(u){t-=o(u)}function o(u){return qd(u)?u:u.get()}return{get:n,set:r,add:i,subtract:a}}function Ow(e,t,n){const r=e.scroll==="x"?o:s,i=n.style;let a=!1;function o(d){return`translate3d(${d}px,0px,0px)`}function s(d){return`translate3d(0px,${d}px,0px)`}function u(d){a||(i.transform=r(t.apply(d)))}function l(d){a=!d}function c(){a||(i.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:c,to:u,toggleActive:l}}function tF(e,t,n,r,i,a,o,s,u){const l=Wo(i),c=Wo(i).reverse(),f=m().concat(y());function d(S,E){return S.reduce((O,j)=>O-i[j],E)}function p(S,E){return S.reduce((O,j)=>d(O,E)>0?O.concat([j]):O,[])}function h(S,E){const O=E==="start",j=O?-r:r,q=o.findSlideBounds([j]);return S.map(T=>{const I=O?0:-r,U=O?r:0,F=q.filter(N=>N.index===T)[0][O?"end":"start"];return{index:T,slideLocation:pu(-1),translate:Ow(e,t,u[T]),target:()=>s.get()>F?I:U}})}function m(){const S=a[0]-1,E=p(c,S);return h(E,"end")}function y(){const S=n-a[0]-1,E=p(l,S);return h(E,"start")}function v(){return f.every(({index:S})=>{const E=l.filter(O=>O!==S);return d(E,n)<=.1})}function g(){f.forEach(S=>{const{target:E,translate:O,slideLocation:j}=S,q=E();q!==j.get()&&(O.to(q),j.set(q))})}function b(){f.forEach(S=>S.translate.clear())}return{canLoop:v,clear:b,loop:g,loopPoints:f}}function nF(e,t){let n,r=!1;function i(s,u){if(!u)return;function l(c){for(const f of c)if(f.type==="childList"){s.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(c=>{r||(Vd(u)||u(s,c))&&l(c)}),n.observe(e,{childList:!0})}function a(){n&&n.disconnect(),r=!0}return{init:i,destroy:a}}function rF(e,t,n,r,i,a,o){const{removeOffset:s,constrain:u}=i,l=.5,c=a?[0,t,-t]:[0],f=p(c,o);function d(y){const v=y||0;return n.map(g=>ri(l,g-l).constrain(g*v))}function p(y,v){const g=y||c,b=d(v);return g.reduce((k,S)=>{const E=r.map((O,j)=>({start:O-n[j]+b[j]+S,end:O+e-b[j]+S,index:j}));return k.concat(E)},[])}function h(y,v){const g=a?s(y):u(y);return(v||f).reduce((k,S)=>{const{index:E,start:O,end:j}=S,q=k.includes(E),T=O<g&&j>g;return!q&&T?k.concat([E]):k},[])}return{check:h,findSlideBounds:p}}function iF(e,t,n,r,i,a){const{measureSize:o,startEdge:s,endEdge:u}=e,l=n[0]&&i,c=h(),f=m(),d=n.map(o),p=y();function h(){if(!l)return 0;const g=n[0];return kt(t[s]-g[s])}function m(){if(!l)return 0;const g=a.getComputedStyle(Dr(r));return parseFloat(g.getPropertyValue(`margin-${u}`))}function y(){return n.map((g,b,k)=>{const S=!b,E=b===fu(k);return S?d[b]+c:E?d[b]+f:k[b+1][s]-g[s]}).map(kt)}return{slideSizes:d,slideSizesWithGaps:p}}function aF(e,t,n){const r=qd(n);function i(u,l){return Wo(u).filter(c=>c%l===0).map(c=>u.slice(c,c+l))}function a(u){return Wo(u).reduce((l,c)=>{const d=t.slice(Dr(l),c+1).reduce((p,h)=>p+h,0);return!c||d>e?l.concat(c):l},[]).map((l,c,f)=>u.slice(l,f[c+1]))}function o(u){return r?i(u,n):a(u)}return{groupSlides:o}}function oF(e,t,n,r,i,a,o,s){const{align:u,axis:l,direction:c,startIndex:f,inViewThreshold:d,loop:p,duration:h,dragFree:m,dragThreshold:y,slidesToScroll:v,skipSnaps:g,containScroll:b}=a,k=t.getBoundingClientRect(),S=n.map(oe=>oe.getBoundingClientRect()),E=UL(c),O=BL(l,c),j=O.measureSize(k),q=VL(j),T=FL(u,j),I=!p&&!!b,U=p||!!b,{slideSizes:R,slideSizesWithGaps:F}=iF(O,k,S,n,U,i),N=aF(j,F,v),{snaps:L,snapsAligned:W}=XL(O,T,k,S,F,N,I),z=-Dr(L)+Dr(F),{snapsContained:A}=KL(j,z,W,b),x=I?A:W,{limit:V}=GL(z,x,p),K=Tw(fu(x),f,p),_=K.clone(),J=Wo(n),ne=({dragHandler:oe,scrollBody:ee,scrollBounds:ke,eventHandler:Se,animation:Pe,options:{loop:He}})=>{const Ae=oe.pointerDown();He||ke.constrain(Ae);const Fe=ee.seek().settled();Fe&&!Ae&&(Pe.stop(),Se.emit("settle")),Fe||Se.emit("scroll")},re=({scrollBody:oe,translate:ee,location:ke,offsetLocation:Se,scrollLooper:Pe,slideLooper:He,options:{loop:Ae}},Fe)=>{const B=oe.velocity();Se.set(ke.get()-B+B*Fe),Ae&&(Pe.loop(oe.direction()),He.loop()),ee.to(Se.get())},le={start:()=>s.start(Y),stop:()=>s.stop(Y),update:()=>ne(Y),render:oe=>re(Y,oe)},pe=.68,he=x[K.get()],ue=pu(he),Q=pu(he),Z=pu(he),de=WL(ue,Z,h,pe),ve=QL(p,x,z,V,Z),$e=eF(le,K,_,ve,de,Z,o),P=rF(j,z,R,L,V,p,d),Y={ownerDocument:r,ownerWindow:i,eventHandler:o,containerRect:k,slideRects:S,animation:le,axis:O,direction:E,dragHandler:zL(O,E,e,r,i,Z,qL(O,i),ue,le,$e,de,ve,K,o,q,m,y,g,pe),eventStore:Zo(),percentOfView:q,index:K,indexPrevious:_,limit:V,location:ue,offsetLocation:Q,options:a,resizeHandler:HL(t,o,i,n,O),scrollBody:de,scrollBounds:ZL(V,ue,Z,de,q),scrollLooper:YL(z,V,Q,[ue,Q,Z]),scrollProgress:JL(V),scrollSnaps:x,scrollTarget:ve,scrollTo:$e,slideLooper:tF(O,E,j,z,F,x,P,Q,n),slidesHandler:nF(t,o),slidesInView:P,slideIndexes:J,slidesToScroll:N,target:Z,translate:Ow(O,E,t)};return Y}function sF(e){const t=16.666666666666668;let n=[],r=null,i=0,a=0;function o(f){r||(r=f);const d=f-r;for(r=f,i+=d;i>=t;)n.forEach(({animation:h})=>h.update()),i-=t;const p=kt(i/t);n.forEach(({animation:h})=>h.render(p)),a&&e.requestAnimationFrame(o)}function s(f){n.includes(f)||n.push(f),!a&&(a=e.requestAnimationFrame(o))}function u(f){n=n.filter(d=>d!==f),!n.length&&(e.cancelAnimationFrame(a),r=null,i=0,a=0)}function l(){r=null,i=0}return{start:s,stop:u,reset:l,window:e}}function lF(){const e={};let t;function n(u){t=u}function r(u){return e[u]||[]}function i(u){return r(u).forEach(l=>l(t,u)),s}function a(u,l){return e[u]=r(u).concat([l]),s}function o(u,l){return e[u]=r(u).filter(c=>c!==l),s}const s={init:n,emit:i,off:o,on:a};return s}const uF={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 cF(e){function t(a,o){return Ew(a,o||{})}function n(a){const o=a.breakpoints||{},s=du(o).filter(u=>e.matchMedia(u).matches).map(u=>o[u]).reduce((u,l)=>t(u,l),{});return t(a,s)}function r(a){return a.map(o=>du(o.breakpoints||{})).reduce((o,s)=>o.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function fF(e){let t=[];function n(a,o){return t=a.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(o,e)),a.reduce((s,u)=>Object.assign(s,{[u.name]:u}),{})}function r(){t=t.filter(a=>a.destroy())}return{init:n,destroy:r}}function ha(e,t,n){const r=e.ownerDocument,i=r.defaultView,a=cF(i),o=fF(a),s=Zo(),u=Zo(),l=lF(),{animationRealms:c}=ha,{mergeOptions:f,optionsAtMedia:d,optionsMediaQueries:p}=a,{on:h,off:m,emit:y}=l,v=R;let g=!1,b,k=f(uF,ha.globalOptions),S=f(k),E=[],O,j,q;function T(){const{container:de,slides:ve}=S;j=(Sw(de)?e.querySelector(de):de)||e.children[0];const P=Sw(ve)?j.querySelectorAll(ve):ve;q=[].slice.call(P||j.children)}function I(de,ve){const $e=oF(e,j,q,r,i,de,l,ve);if(de.loop&&!$e.slideLooper.canLoop()){const P=Object.assign({},de,{loop:!1});return I(P,ve)}return $e}function U(de,ve){if(g)return;const $e=c.find(Y=>Y.window===i),P=$e||sF(i);$e||c.push(P),k=f(k,de),S=d(k),E=ve||E,T(),b=I(S,P),p([k,...E.map(({options:Y})=>Y)]).forEach(Y=>s.add(Y,"change",R)),S.active&&(b.translate.to(b.location.get()),b.eventHandler.init(Z),b.resizeHandler.init(Z,S.watchResize),b.slidesHandler.init(Z,S.watchSlides),u.add(r,"visibilitychange",()=>{r.hidden&&P.reset()}),b.options.loop&&b.slideLooper.loop(),j.offsetParent&&q.length&&b.dragHandler.init(Z,S.watchDrag),O=o.init(E,Z))}function R(de,ve){const $e=ne();F(),U(f({startIndex:$e},de),ve),l.emit("reInit")}function F(){b.dragHandler.destroy(),b.animation.stop(),b.eventStore.clear(),b.translate.clear(),b.slideLooper.clear(),b.resizeHandler.destroy(),b.slidesHandler.destroy(),o.destroy(),s.clear(),u.clear()}function N(){g||(g=!0,s.clear(),F(),l.emit("destroy"))}function L(de){const ve=b[de?"target":"location"].get(),$e=S.loop?"removeOffset":"constrain";return b.slidesInView.check(b.limit[$e](ve))}function W(de){const ve=L(de);return b.slideIndexes.filter($e=>!ve.includes($e))}function z(de,ve,$e){!S.active||g||(b.scrollBody.useBaseFriction().useDuration(ve?0:S.duration),b.scrollTo.index(de,$e||0))}function A(de){const ve=b.index.add(1).get();z(ve,de===!0,-1)}function x(de){const ve=b.index.add(-1).get();z(ve,de===!0,1)}function V(){return b.index.add(1).get()!==ne()}function K(){return b.index.add(-1).get()!==ne()}function _(){return b.scrollSnaps.map(b.scrollProgress.get)}function J(){return b.scrollProgress.get(b.location.get())}function ne(){return b.index.get()}function re(){return b.indexPrevious.get()}function le(){return O}function pe(){return b}function he(){return e}function ue(){return j}function Q(){return q}const Z={canScrollNext:V,canScrollPrev:K,containerNode:ue,internalEngine:pe,destroy:N,off:m,on:h,emit:y,plugins:le,previousScrollSnap:re,reInit:v,rootNode:he,scrollNext:A,scrollPrev:x,scrollProgress:J,scrollSnapList:_,scrollTo:z,selectedScrollSnap:ne,slideNodes:Q,slidesInView:L,slidesNotInView:W};return U(t,n),setTimeout(()=>l.emit("init"),0),Z}ha.animationRealms=[],ha.globalOptions=void 0;function Wd(e={},t=[]){const n=M.useRef(e),r=M.useRef(t),[i,a]=M.useState(),[o,s]=M.useState(),u=M.useCallback(()=>{i&&i.reInit(n.current,r.current)},[i]);return M.useEffect(()=>{if(ML()&&o){ha.globalOptions=Wd.globalOptions;const l=ha(o,n.current,r.current);return a(l),()=>l.destroy()}else a(void 0)},[o,a]),M.useEffect(()=>{zd(n.current,e)||(n.current=e,u())},[e,u]),M.useEffect(()=>{jL(r.current,t)||(r.current=t,u())},[t,u]),[s,i]}Wd.globalOptions=void 0;function dF({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M15.75 2.25H21a.75.75 0 0 1 .75.75v5.25a.75.75 0 0 1-1.5 0V4.81L8.03 17.03a.75.75 0 0 1-1.06-1.06L19.19 3.75h-3.44a.75.75 0 0 1 0-1.5Zm-10.5 4.5a1.5 1.5 0 0 0-1.5 1.5v10.5a1.5 1.5 0 0 0 1.5 1.5h10.5a1.5 1.5 0 0 0 1.5-1.5V10.5a.75.75 0 0 1 1.5 0v8.25a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3V8.25a3 3 0 0 1 3-3h8.25a.75.75 0 0 1 0 1.5H5.25Z",clipRule:"evenodd"}))}const pF=w.forwardRef(dF);function hF({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))}const mF=w.forwardRef(hF);function vF({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",clipRule:"evenodd"}))}const yF=w.forwardRef(vF);function gF({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.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 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5H5.625ZM7.5 15a.75.75 0 0 1 .75-.75h7.5a.75.75 0 0 1 0 1.5h-7.5A.75.75 0 0 1 7.5 15Zm.75 2.25a.75.75 0 0 0 0 1.5H12a.75.75 0 0 0 0-1.5H8.25Z",clipRule:"evenodd"}),w.createElement("path",{d:"M12.971 1.816A5.23 5.23 0 0 1 14.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 0 1 3.434 1.279 9.768 9.768 0 0 0-6.963-6.963Z"}))}const bF=w.forwardRef(gF);function xF({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{d:"M1.5 8.67v8.58a3 3 0 0 0 3 3h15a3 3 0 0 0 3-3V8.67l-8.928 5.493a3 3 0 0 1-3.144 0L1.5 8.67Z"}),w.createElement("path",{d:"M22.5 6.908V6.75a3 3 0 0 0-3-3h-15a3 3 0 0 0-3 3v.158l9.714 5.978a1.5 1.5 0 0 0 1.572 0L22.5 6.908Z"}))}const wF=w.forwardRef(xF);function SF({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{d:"M21.721 12.752a9.711 9.711 0 0 0-.945-5.003 12.754 12.754 0 0 1-4.339 2.708 18.991 18.991 0 0 1-.214 4.772 17.165 17.165 0 0 0 5.498-2.477ZM14.634 15.55a17.324 17.324 0 0 0 .332-4.647c-.952.227-1.945.347-2.966.347-1.021 0-2.014-.12-2.966-.347a17.515 17.515 0 0 0 .332 4.647 17.385 17.385 0 0 0 5.268 0ZM9.772 17.119a18.963 18.963 0 0 0 4.456 0A17.182 17.182 0 0 1 12 21.724a17.18 17.18 0 0 1-2.228-4.605ZM7.777 15.23a18.87 18.87 0 0 1-.214-4.774 12.753 12.753 0 0 1-4.34-2.708 9.711 9.711 0 0 0-.944 5.004 17.165 17.165 0 0 0 5.498 2.477ZM21.356 14.752a9.765 9.765 0 0 1-7.478 6.817 18.64 18.64 0 0 0 1.988-4.718 18.627 18.627 0 0 0 5.49-2.098ZM2.644 14.752c1.682.971 3.53 1.688 5.49 2.099a18.64 18.64 0 0 0 1.988 4.718 9.765 9.765 0 0 1-7.478-6.816ZM13.878 2.43a9.755 9.755 0 0 1 6.116 3.986 11.267 11.267 0 0 1-3.746 2.504 18.63 18.63 0 0 0-2.37-6.49ZM12 2.276a17.152 17.152 0 0 1 2.805 7.121c-.897.23-1.837.353-2.805.353-.968 0-1.908-.122-2.805-.353A17.151 17.151 0 0 1 12 2.276ZM10.122 2.43a18.629 18.629 0 0 0-2.37 6.49 11.266 11.266 0 0 1-3.746-2.504 9.754 9.754 0 0 1 6.116-3.985Z"}))}const _F=w.forwardRef(SF);function EF({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M12 1.5a5.25 5.25 0 0 0-5.25 5.25v3a3 3 0 0 0-3 3v6.75a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3v-6.75a3 3 0 0 0-3-3v-3c0-2.9-2.35-5.25-5.25-5.25Zm3.75 8.25v-3a3.75 3.75 0 1 0-7.5 0v3h7.5Z",clipRule:"evenodd"}))}const kF=w.forwardRef(EF);function TF({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M1.5 4.5a3 3 0 0 1 3-3h1.372c.86 0 1.61.586 1.819 1.42l1.105 4.423a1.875 1.875 0 0 1-.694 1.955l-1.293.97c-.135.101-.164.249-.126.352a11.285 11.285 0 0 0 6.697 6.697c.103.038.25.009.352-.126l.97-1.293a1.875 1.875 0 0 1 1.955-.694l4.423 1.105c.834.209 1.42.959 1.42 1.82V19.5a3 3 0 0 1-3 3h-2.25C8.552 22.5 1.5 15.448 1.5 6.75V4.5Z",clipRule:"evenodd"}))}const OF=w.forwardRef(TF),Cw=M.forwardRef(({blocks:e,direction:t,sender:n,timestamp:r,metadata:i,sendMessage:a,messageId:o},s)=>{const[u,l]=Wd({skipSnaps:!0,loop:!0}),[c,f]=M.useState(!0),[d,p]=M.useState(!0),h=M.useCallback(()=>l==null?void 0:l.scrollPrev(),[l]),m=M.useCallback(()=>l==null?void 0:l.scrollNext(),[l]),{message:{blocks:{carousel:y}}}=yt,v=M.useCallback(g=>{f(!g.canScrollPrev()),p(!g.canScrollNext())},[]);return M.useEffect(()=>{l&&(v(l),l.on("reInit",v),l.on("select",v))},[l,v]),$.jsxs("div",{...y==null?void 0:y.container,"data-container":"carousel",ref:u,children:[$.jsx("div",{ref:s,...y==null?void 0:y.slidesContainer,children:e.map((g,b)=>$.jsx(ba,{block:{...g,direction:t,timestamp:r,sender:n,messageId:o,sendMessage:a},direction:t,sender:n,timestamp:r,metadata:i,sendMessage:a,messageId:o},b))}),e.length>1&&$.jsxs($.Fragment,{children:[$.jsx(mF,{...y==null?void 0:y.backButton,"data-disabled":c?"":void 0,onClick:h}),$.jsx(yF,{...y==null?void 0:y.nextButton,"data-disabled":d?"":void 0,onClick:m})]})]})});Cw.displayName="Carousel";const $w=Math.floor;function Iw(e){return Rw(e)?(e.nodeName||"").toLowerCase():"#document"}function Ko(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function CF(e){var t;return(t=(Rw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Rw(e){return e instanceof Node||e instanceof Ko(e).Node}function Dn(e){return e instanceof Element||e instanceof Ko(e).Element}function ma(e){return e instanceof HTMLElement||e instanceof Ko(e).HTMLElement}function Zd(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ko(e).ShadowRoot}function $F(e){return["html","body","#document"].includes(Iw(e))}function IF(e){return Ko(e).getComputedStyle(e)}function RF(e){if(Iw(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Zd(e)&&e.host||CF(e);return Zd(t)?t.host:t}function ii(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 hn(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Zd(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Pw(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function PF(){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 Aw(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(Pw())||t.test(PF()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Nw(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 Dw(){return/apple/i.test(navigator.vendor)}function AF(){return Pw().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Mw(e,t){return["mouse","pen"].includes(e)}function NF(e){return"nativeEvent"in e}function DF(e){return e.matches("html,body")}function Wn(e){return(e==null?void 0:e.ownerDocument)||document}function Kd(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 jw(e){return"composedPath"in e?e.composedPath()[0]:e.target}const MF="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Lw(e){return ma(e)&&e.matches(MF)}function Gt(e){e.preventDefault(),e.stopPropagation()}const Gd="ArrowUp",hu="ArrowDown",va="ArrowLeft",Go="ArrowRight";function mu(e,t,n){return Math.floor(e/t)!==n}function Yo(e,t){return t<0||t>=e.current.length}function Yd(e,t){return tn(e,{disabledIndices:t})}function Fw(e,t){return tn(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function tn(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:a=1}=t===void 0?{}:t;const o=e.current;let s=n;do{var u,l;s=s+(r?-a:a)}while(s>=0&&s<=o.length-1&&(i?i.includes(s):o[s]==null||(u=o[s])!=null&&u.hasAttribute("disabled")||((l=o[s])==null?void 0:l.getAttribute("aria-disabled"))==="true"));return s}function jF(e,t){let{event:n,orientation:r,loop:i,cols:a,disabledIndices:o,minIndex:s,maxIndex:u,prevIndex:l,stopEvent:c=!1}=t,f=l;if(n.key===Gd){if(c&&Gt(n),l===-1)f=u;else if(f=tn(e,{startingIndex:f,amount:a,decrement:!0,disabledIndices:o}),i&&(l-a<s||f<0)){const d=l%a,p=u%a,h=u-(p-d);p===d?f=u:f=p>d?h:h-a}Yo(e,f)&&(f=l)}if(n.key===hu&&(c&&Gt(n),l===-1?f=s:(f=tn(e,{startingIndex:l,amount:a,disabledIndices:o}),i&&l+a>u&&(f=tn(e,{startingIndex:l%a-a,amount:a,disabledIndices:o}))),Yo(e,f)&&(f=l)),r==="both"){const d=$w(l/a);n.key===Go&&(c&&Gt(n),l%a!==a-1?(f=tn(e,{startingIndex:l,disabledIndices:o}),i&&mu(f,a,d)&&(f=tn(e,{startingIndex:l-l%a-1,disabledIndices:o}))):i&&(f=tn(e,{startingIndex:l-l%a-1,disabledIndices:o})),mu(f,a,d)&&(f=l)),n.key===va&&(c&&Gt(n),l%a!==0?(f=tn(e,{startingIndex:l,disabledIndices:o,decrement:!0}),i&&mu(f,a,d)&&(f=tn(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:o}))):i&&(f=tn(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:o})),mu(f,a,d)&&(f=l));const p=$w(u/a)===d;Yo(e,f)&&(i&&p?f=n.key===va?u:tn(e,{startingIndex:l-l%a-1,disabledIndices:o}):f=l)}return f}let Bw=0;function Mr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(Bw);const a=()=>e==null?void 0:e.focus({preventScroll:n});i?a():Bw=requestAnimationFrame(a)}var jt=typeof document<"u"?M.useLayoutEffect:M.useEffect;function vu(){return vu=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},vu.apply(this,arguments)}let Jd=!1,LF=0;const Uw=()=>"floating-ui-"+LF++;function FF(){const[e,t]=w.useState(()=>Jd?Uw():void 0);return jt(()=>{e==null&&t(Uw())},[]),w.useEffect(()=>{Jd||(Jd=!0)},[]),e}const Xd=w.useId||FF;function BF(){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 UF=w.createContext(null),zF=w.createContext(null),zw=()=>{var e;return((e=w.useContext(UF))==null?void 0:e.id)||null},yu=()=>w.useContext(zF);function Jo(e){return"data-floating-ui-"+e}function ai(e){const t=M.useRef(e);return jt(()=>{t.current=e}),t}function qF(e,t){var n;let r=[],i=(n=e.find(a=>a.id===t))==null?void 0:n.parentId;for(;i;){const a=e.find(o=>o.id===i);i=a==null?void 0:a.parentId,a&&(r=r.concat(a))}return r}function ya(e,t){let n=e.filter(i=>{var a;return i.parentId===t&&((a=i.context)==null?void 0:a.open)}),r=n;for(;r.length;)r=e.filter(i=>{var a;return(a=r)==null?void 0:a.some(o=>{var s;return i.parentId===o.id&&((s=i.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function VF(e,t){let n,r=-1;function i(a,o){o>r&&(n=a,r=o),ya(e,a).forEach(u=>{i(u.id,o+1)})}return i(t,0),e.find(a=>a.id===n)}let ga=new WeakMap,gu=new WeakSet,bu={},Qd=0;const HF=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,qw=e=>e&&(e.host||qw(e.parentNode)),WF=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=qw(n);return e.contains(r)?r:null}).filter(n=>n!=null);function ZF(e,t,n,r){const i="data-floating-ui-inert",a=r?"inert":n?"aria-hidden":null,o=WF(t,e),s=new Set,u=new Set(o),l=[];bu[i]||(bu[i]=new WeakMap);const c=bu[i];o.forEach(f),d(t),s.clear();function f(p){!p||s.has(p)||(s.add(p),p.parentNode&&f(p.parentNode))}function d(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,h=>{if(s.has(h))d(h);else{const m=a?h.getAttribute(a):null,y=m!==null&&m!=="false",v=(ga.get(h)||0)+1,g=(c.get(h)||0)+1;ga.set(h,v),c.set(h,g),l.push(h),v===1&&y&&gu.add(h),g===1&&h.setAttribute(i,""),!y&&a&&h.setAttribute(a,"true")}})}return Qd++,()=>{l.forEach(p=>{const h=(ga.get(p)||0)-1,m=(c.get(p)||0)-1;ga.set(p,h),c.set(p,m),h||(!gu.has(p)&&a&&p.removeAttribute(a),gu.delete(p)),m||p.removeAttribute(i)}),Qd--,Qd||(ga=new WeakMap,ga=new WeakMap,gu=new WeakSet,bu={})}}function Vw(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Wn(e[0]).body;return ZF(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const ep=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Hw(e,t){const n=jd(e,ep());t==="prev"&&n.reverse();const r=n.indexOf(ii(Wn(e)));return n.slice(r+1)[0]}function Ww(){return Hw(document.body,"next")}function Zw(){return Hw(document.body,"prev")}function Xo(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!hn(n,r)}function KF(e){jd(e,ep()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function GF(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 tp={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 YF;function Kw(e){e.key==="Tab"&&(e.target,clearTimeout(YF))}const xu=w.forwardRef(function(t,n){const[r,i]=w.useState();jt(()=>(Dw()&&i("button"),document.addEventListener("keydown",Kw),()=>{document.removeEventListener("keydown",Kw)}),[]);const a={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Jo("focus-guard")]:"",style:tp};return w.createElement("span",vu({},t,a))}),Gw=w.createContext(null);function JF(e){let{id:t,root:n}=e===void 0?{}:e;const[r,i]=w.useState(null),a=Xd(),o=Yw(),s=w.useMemo(()=>({id:t,root:n,portalContext:o,uniqueId:a}),[t,n,o,a]),u=w.useRef();return jt(()=>()=>{r==null||r.remove()},[r,s]),jt(()=>{if(u.current===s)return;u.current=s;const{id:l,root:c,portalContext:f,uniqueId:d}=s,p=l?document.getElementById(l):null,h=Jo("portal");if(p){const m=document.createElement("div");m.id=d,m.setAttribute(h,""),p.appendChild(m),i(m)}else{let m=c||(f==null?void 0:f.portalNode);m&&!Dn(m)&&(m=m.current),m=m||document.body;let y=null;l&&(y=document.createElement("div"),y.id=l,m.appendChild(y));const v=document.createElement("div");v.id=d,v.setAttribute(h,""),m=y||m,m.appendChild(v),i(v)}},[s]),r}function XF(e){let{children:t,id:n,root:r=null,preserveTabOrder:i=!0}=e;const a=JF({id:n,root:r}),[o,s]=w.useState(null),u=w.useRef(null),l=w.useRef(null),c=w.useRef(null),f=w.useRef(null),d=!!o&&!o.modal&&o.open&&i&&!!(r||a);return w.useEffect(()=>{if(!a||!i||o!=null&&o.modal)return;function p(h){a&&Xo(h)&&(h.type==="focusin"?GF:KF)(a)}return a.addEventListener("focusin",p,!0),a.addEventListener("focusout",p,!0),()=>{a.removeEventListener("focusin",p,!0),a.removeEventListener("focusout",p,!0)}},[a,i,o==null?void 0:o.modal]),w.createElement(Gw.Provider,{value:w.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:u,afterOutsideRef:l,beforeInsideRef:c,afterInsideRef:f,portalNode:a,setFocusManagerState:s}),[i,a])},d&&a&&w.createElement(xu,{"data-type":"outside",ref:u,onFocus:p=>{if(Xo(p,a)){var h;(h=c.current)==null||h.focus()}else{const m=Zw()||(o==null?void 0:o.refs.domReference.current);m==null||m.focus()}}}),d&&a&&w.createElement("span",{"aria-owns":a.id,style:tp}),a&&Ti.createPortal(t,a),d&&a&&w.createElement(xu,{"data-type":"outside",ref:l,onFocus:p=>{if(Xo(p,a)){var h;(h=f.current)==null||h.focus()}else{const m=Ww()||(o==null?void 0:o.refs.domReference.current);m==null||m.focus(),o!=null&&o.closeOnFocusOut&&(o==null||o.onOpenChange(!1,p.nativeEvent))}}}))}const Yw=()=>w.useContext(Gw),QF=w.forwardRef(function(t,n){return w.createElement("button",vu({},t,{type:"button",ref:n,tabIndex:-1,style:tp}))});function e5(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],guards:a=!0,initialFocus:o=0,returnFocus:s=!0,modal:u=!0,visuallyHiddenDismiss:l=!1,closeOnFocusOut:c=!0}=e,{open:f,refs:d,nodeId:p,onOpenChange:h,events:m,dataRef:y,elements:{domReference:v,floating:g}}=t,b=HF()?a:!0,k=ai(i),S=ai(o),E=ai(s),O=yu(),j=Yw(),q=typeof o=="number"&&o<0,T=w.useRef(null),I=w.useRef(null),U=w.useRef(!1),R=w.useRef(null),F=w.useRef(!1),N=j!=null,L=v&&v.getAttribute("role")==="combobox"&&Lw(v)&&q,W=w.useCallback(function(V){return V===void 0&&(V=g),V?jd(V,ep()):[]},[g]),z=w.useCallback(V=>{const K=W(V);return k.current.map(_=>v&&_==="reference"?v:g&&_==="floating"?g:K).filter(Boolean).flat()},[v,g,k,W]);w.useEffect(()=>{if(r||!u)return;function V(_){if(_.key==="Tab"){hn(g,ii(Wn(g)))&&W().length===0&&!L&&Gt(_);const J=z(),ne=jw(_);k.current[0]==="reference"&&ne===v&&(Gt(_),_.shiftKey?Mr(J[J.length-1]):Mr(J[1])),k.current[1]==="floating"&&ne===g&&_.shiftKey&&(Gt(_),Mr(J[0]))}}const K=Wn(g);return K.addEventListener("keydown",V),()=>{K.removeEventListener("keydown",V)}},[r,v,g,u,k,d,L,W,z]),w.useEffect(()=>{if(r||!c)return;function V(){F.current=!0,setTimeout(()=>{F.current=!1})}function K(_){const J=_.relatedTarget;queueMicrotask(()=>{const ne=!(hn(v,J)||hn(g,J)||hn(J,g)||hn(j==null?void 0:j.portalNode,J)||J!=null&&J.hasAttribute(Jo("focus-guard"))||O&&(ya(O.nodesRef.current,p).find(re=>{var le,pe;return hn((le=re.context)==null?void 0:le.elements.floating,J)||hn((pe=re.context)==null?void 0:pe.elements.domReference,J)})||qF(O.nodesRef.current,p).find(re=>{var le,pe;return((le=re.context)==null?void 0:le.elements.floating)===J||((pe=re.context)==null?void 0:pe.elements.domReference)===J})));J&&ne&&!F.current&&J!==R.current&&(U.current=!0,h(!1,_))})}if(g&&ma(v))return v.addEventListener("focusout",K),v.addEventListener("pointerdown",V),!u&&g.addEventListener("focusout",K),()=>{v.removeEventListener("focusout",K),v.removeEventListener("pointerdown",V),!u&&g.removeEventListener("focusout",K)}},[r,v,g,u,p,O,j,h,c]),w.useEffect(()=>{var V;if(r)return;const K=Array.from((j==null||(V=j.portalNode)==null?void 0:V.querySelectorAll("["+Jo("portal")+"]"))||[]);if(g){const _=[g,...K,T.current,I.current,k.current.includes("reference")||L?v:null].filter(ne=>ne!=null),J=u?Vw(_,b,!b):Vw(_);return()=>{J()}}},[r,v,g,u,k,j,L,b]),jt(()=>{if(r||!g)return;const V=Wn(g),K=ii(V);queueMicrotask(()=>{const _=z(g),J=S.current,ne=(typeof J=="number"?_[J]:J.current)||g,re=hn(g,K);!q&&!re&&f&&Mr(ne,{preventScroll:ne===g})})},[r,f,g,q,z,S]),jt(()=>{if(r||!g)return;let V=!1;const K=Wn(g),_=ii(K),J=y.current;R.current=_;function ne(re){if(re.type==="escapeKey"&&d.domReference.current&&(R.current=d.domReference.current),["referencePress","escapeKey"].includes(re.type))return;const le=re.data.returnFocus;typeof le=="object"?(U.current=!1,V=le.preventScroll):U.current=!le}return m.on("dismiss",ne),()=>{m.off("dismiss",ne);const re=ii(K);(hn(g,re)||O&&ya(O.nodesRef.current,p).some(pe=>{var he;return hn((he=pe.context)==null?void 0:he.elements.floating,re)})||J.openEvent&&["click","mousedown"].includes(J.openEvent.type))&&d.domReference.current&&(R.current=d.domReference.current),E.current&&ma(R.current)&&!U.current&&Mr(R.current,{cancelPrevious:!1,preventScroll:V})}},[r,g,E,y,d,m,O,p]),jt(()=>{if(!(r||!j))return j.setFocusManagerState({modal:u,closeOnFocusOut:c,open:f,onOpenChange:h,refs:d}),()=>{j.setFocusManagerState(null)}},[r,j,u,f,h,d,c]),jt(()=>{if(!r&&g&&typeof MutationObserver=="function"&&!q){const V=()=>{const _=g.getAttribute("tabindex");k.current.includes("floating")||ii(Wn(g))!==d.domReference.current&&W().length===0?_!=="0"&&g.setAttribute("tabindex","0"):_!=="-1"&&g.setAttribute("tabindex","-1")};V();const K=new MutationObserver(V);return K.observe(g,{childList:!0,subtree:!0,attributes:!0}),()=>{K.disconnect()}}},[r,g,d,k,W,q]);function A(V){return r||!l||!u?null:w.createElement(QF,{ref:V==="start"?T:I,onClick:K=>h(!1,K.nativeEvent)},typeof l=="string"?l:"Dismiss")}const x=!r&&b&&!L&&(N||u);return w.createElement(w.Fragment,null,x&&w.createElement(xu,{"data-type":"inside",ref:j==null?void 0:j.beforeInsideRef,onFocus:V=>{if(u){const _=z();Mr(i[0]==="reference"?_[0]:_[_.length-1])}else if(j!=null&&j.preserveTabOrder&&j.portalNode)if(U.current=!1,Xo(V,j.portalNode)){const _=Ww()||v;_==null||_.focus()}else{var K;(K=j.beforeOutsideRef.current)==null||K.focus()}}}),!L&&A("start"),n,A("end"),x&&w.createElement(xu,{"data-type":"inside",ref:j==null?void 0:j.afterInsideRef,onFocus:V=>{if(u)Mr(z()[0]);else if(j!=null&&j.preserveTabOrder&&j.portalNode)if(c&&(U.current=!0),Xo(V,j.portalNode)){const _=Zw()||v;_==null||_.focus()}else{var K;(K=j.afterOutsideRef.current)==null||K.focus()}}}))}function Jw(e){return ma(e.target)&&e.target.tagName==="BUTTON"}function Xw(e){return Lw(e)}function t5(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:a}}=e,{enabled:o=!0,event:s="click",toggle:u=!0,ignoreMouse:l=!1,keyboardHandlers:c=!0}=t,f=w.useRef(),d=w.useRef(!1);return w.useMemo(()=>o?{reference:{onPointerDown(p){f.current=p.pointerType},onMouseDown(p){p.button===0&&(Mw(f.current)&&l||s!=="click"&&(n&&u&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")?r(!1,p.nativeEvent):(p.preventDefault(),r(!0,p.nativeEvent))))},onClick(p){if(s==="mousedown"&&f.current){f.current=void 0;return}Mw(f.current)&&l||(n&&u&&(!i.current.openEvent||i.current.openEvent.type==="click")?r(!1,p.nativeEvent):r(!0,p.nativeEvent))},onKeyDown(p){f.current=void 0,!(p.defaultPrevented||!c||Jw(p))&&(p.key===" "&&!Xw(a)&&(p.preventDefault(),d.current=!0),p.key==="Enter"&&r(!(n&&u),p.nativeEvent))},onKeyUp(p){p.defaultPrevented||!c||Jw(p)||Xw(a)||p.key===" "&&d.current&&(d.current=!1,r(!(n&&u),p.nativeEvent))}}}:{},[o,i,s,l,c,a,u,n,r])}const n5=w.useInsertionEffect||(e=>e());function oi(e){const t=w.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return n5(()=>{t.current=e}),w.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 r5={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},i5={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},a5=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 o5(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:i,nodeId:a,elements:{reference:o,domReference:s,floating:u},dataRef:l}=e,{enabled:c=!0,escapeKey:f=!0,outsidePress:d=!0,outsidePressEvent:p="pointerdown",referencePress:h=!1,referencePressEvent:m="pointerdown",ancestorScroll:y=!1,bubbles:v}=t,g=yu(),b=zw()!=null,k=oi(typeof d=="function"?d:()=>!1),S=typeof d=="function"?k:d,E=w.useRef(!1),{escapeKeyBubbles:O,outsidePressBubbles:j}=a5(v),q=oi(I=>{if(!n||!c||!f||I.key!=="Escape")return;const U=g?ya(g.nodesRef.current,a):[];if(!O&&(I.stopPropagation(),U.length>0)){let R=!0;if(U.forEach(F=>{var N;if((N=F.context)!=null&&N.open&&!F.context.dataRef.current.__escapeKeyBubbles){R=!1;return}}),!R)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,NF(I)?I.nativeEvent:I)}),T=oi(I=>{const U=E.current;if(E.current=!1,U||typeof S=="function"&&!S(I))return;const R=jw(I),F="["+Jo("inert")+"]",N=Wn(u).querySelectorAll(F);let L=Dn(R)?R:null;for(;L&&!$F(L);){const A=RF(L);if(A===Wn(u).body||!Dn(A))break;L=A}if(N.length&&Dn(R)&&!DF(R)&&!hn(R,u)&&Array.from(N).every(A=>!hn(L,A)))return;if(ma(R)&&u){const A=R.clientWidth>0&&R.scrollWidth>R.clientWidth,x=R.clientHeight>0&&R.scrollHeight>R.clientHeight;let V=x&&I.offsetX>R.clientWidth;if(x&&IF(R).direction==="rtl"&&(V=I.offsetX<=R.offsetWidth-R.clientWidth),V||A&&I.offsetY>R.clientHeight)return}const W=g&&ya(g.nodesRef.current,a).some(A=>{var x;return Kd(I,(x=A.context)==null?void 0:x.elements.floating)});if(Kd(I,u)||Kd(I,s)||W)return;const z=g?ya(g.nodesRef.current,a):[];if(z.length>0){let A=!0;if(z.forEach(x=>{var V;if((V=x.context)!=null&&V.open&&!x.context.dataRef.current.__outsidePressBubbles){A=!1;return}}),!A)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:b?{preventScroll:!0}:Aw(I)||Nw(I)}}),r(!1,I)});return w.useEffect(()=>{if(!n||!c)return;l.current.__escapeKeyBubbles=O,l.current.__outsidePressBubbles=j;function I(F){r(!1,F)}const U=Wn(u);f&&U.addEventListener("keydown",q),S&&U.addEventListener(p,T);let R=[];return y&&(Dn(s)&&(R=ti(s)),Dn(u)&&(R=R.concat(ti(u))),!Dn(o)&&o&&o.contextElement&&(R=R.concat(ti(o.contextElement)))),R=R.filter(F=>{var N;return F!==((N=U.defaultView)==null?void 0:N.visualViewport)}),R.forEach(F=>{F.addEventListener("scroll",I,{passive:!0})}),()=>{f&&U.removeEventListener("keydown",q),S&&U.removeEventListener(p,T),R.forEach(F=>{F.removeEventListener("scroll",I)})}},[l,u,s,o,f,S,p,n,r,y,c,O,j,q,T]),w.useEffect(()=>{E.current=!1},[S,p]),w.useMemo(()=>c?{reference:{onKeyDown:q,[r5[m]]:I=>{h&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,I.nativeEvent))}},floating:{onKeyDown:q,[i5[p]]:()=>{E.current=!0}}}:{},[c,i,h,p,m,r,q])}let np;process.env.NODE_ENV!=="production"&&(np=new Set);function s5(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:i}=e;if(process.env.NODE_ENV!=="production"){var a;const O="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((a=e.elements)!=null&&a.reference&&!Dn(e.elements.reference)){var o;if(!((o=np)!=null&&o.has(O))){var s;(s=np)==null||s.add(O),console.error(O)}}}const[u,l]=w.useState(null),c=((t=e.elements)==null?void 0:t.reference)||u,f=mL(e),d=yu(),p=oi((O,j)=>{O&&(m.current.openEvent=j),r==null||r(O,j)}),h=w.useRef(null),m=w.useRef({}),y=w.useState(()=>BF())[0],v=Xd(),g=w.useCallback(O=>{const j=Dn(O)?{getBoundingClientRect:()=>O.getBoundingClientRect(),contextElement:O}:O;f.refs.setReference(j)},[f.refs]),b=w.useCallback(O=>{(Dn(O)||O===null)&&(h.current=O,l(O)),(Dn(f.refs.reference.current)||f.refs.reference.current===null||O!==null&&!Dn(O))&&f.refs.setReference(O)},[f.refs]),k=w.useMemo(()=>({...f.refs,setReference:b,setPositionReference:g,domReference:h}),[f.refs,b,g]),S=w.useMemo(()=>({...f.elements,domReference:c}),[f.elements,c]),E=w.useMemo(()=>({...f,refs:k,elements:S,dataRef:m,nodeId:i,floatingId:v,events:y,open:n,onOpenChange:p}),[f,i,v,y,n,p,k,S]);return jt(()=>{const O=d==null?void 0:d.nodesRef.current.find(j=>j.id===i);O&&(O.context=E)}),w.useMemo(()=>({...f,context:E,refs:k,elements:S}),[f,k,S,E])}function rp(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(i=>i?i[n]:null).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(o=>{let[s,u]=o;if(s.indexOf("on")===0){if(r.has(s)||r.set(s,[]),typeof u=="function"){var l;(l=r.get(s))==null||l.push(u),i[s]=function(){for(var c,f=arguments.length,d=new Array(f),p=0;p<f;p++)d[p]=arguments[p];return(c=r.get(s))==null?void 0:c.map(h=>h(...d)).find(h=>h!==void 0)}}}else i[s]=u}),i),{})}}function l5(e){e===void 0&&(e=[]);const t=e,n=w.useCallback(a=>rp(a,e,"reference"),t),r=w.useCallback(a=>rp(a,e,"floating"),t),i=w.useCallback(a=>rp(a,e,"item"),e.map(a=>a==null?void 0:a.item));return w.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])}let Qw=!1;function wu(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function e0(e,t){return wu(t,e===Gd||e===hu,e===va||e===Go)}function ip(e,t,n){return wu(t,e===hu,n?e===va:e===Go)||e==="Enter"||e==" "||e===""}function u5(e,t,n){return wu(t,n?e===va:e===Go,e===hu)}function t0(e,t,n){return wu(t,n?e===Go:e===va,e===Gd)}function c5(e,t){const{open:n,onOpenChange:r,refs:i,elements:{domReference:a,floating:o}}=e,{listRef:s,activeIndex:u,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:f=null,allowEscape:d=!1,loop:p=!1,nested:h=!1,rtl:m=!1,virtual:y=!1,focusItemOnOpen:v="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:b=!0,disabledIndices:k=void 0,orientation:S="vertical",cols:E=1,scrollItemIntoView:O=!0,virtualItemRef:j}=t;process.env.NODE_ENV!=="production"&&(d&&(p||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),y||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),S==="vertical"&&E>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const q=zw(),T=yu(),I=oi(l),U=w.useRef(v),R=w.useRef(f??-1),F=w.useRef(null),N=w.useRef(!0),L=w.useRef(I),W=w.useRef(!!o),z=w.useRef(!1),A=w.useRef(!1),x=ai(k),V=ai(n),K=ai(O),[_,J]=w.useState(),[ne,re]=w.useState(),le=oi(function(ue,Q,Z){Z===void 0&&(Z=!1);const de=ue.current[Q.current];de&&(y?(J(de.id),T==null||T.events.emit("virtualfocus",de),j&&(j.current=de)):Mr(de,{preventScroll:!0,sync:AF()&&Dw()?Qw||z.current:!1}),requestAnimationFrame(()=>{const ve=K.current;ve&&de&&(Z||!N.current)&&(de.scrollIntoView==null||de.scrollIntoView(typeof ve=="boolean"?{block:"nearest",inline:"nearest"}:ve))}))});jt(()=>{document.createElement("div").focus({get preventScroll(){return Qw=!0,!1}})},[]),jt(()=>{c&&(n&&o?U.current&&f!=null&&(A.current=!0,I(f)):W.current&&(R.current=-1,L.current(null)))},[c,n,o,f,I]),jt(()=>{if(c&&n&&o)if(u==null){if(z.current=!1,f!=null)return;if(W.current&&(R.current=-1,le(s,R)),!W.current&&U.current&&(F.current!=null||U.current===!0&&F.current==null)){let ue=0;const Q=()=>{s.current[0]==null?(ue<2&&(ue?requestAnimationFrame:queueMicrotask)(Q),ue++):(R.current=F.current==null||ip(F.current,S,m)||h?Yd(s,x.current):Fw(s,x.current),F.current=null,I(R.current))};Q()}}else Yo(s,u)||(R.current=u,le(s,R,A.current),A.current=!1)},[c,n,o,u,f,h,s,S,m,I,le,x]),jt(()=>{var ue,Q;if(!c||o||!T||y||!W.current)return;const Z=T.nodesRef.current,de=(ue=Z.find(P=>P.id===q))==null||(Q=ue.context)==null?void 0:Q.elements.floating,ve=ii(Wn(o)),$e=Z.some(P=>P.context&&hn(P.context.elements.floating,ve));de&&!$e&&N.current&&de.focus({preventScroll:!0})},[c,o,T,q,y]),jt(()=>{if(!c||!T||!y||q)return;function ue(Q){re(Q.id),j&&(j.current=Q)}return T.events.on("virtualfocus",ue),()=>{T.events.off("virtualfocus",ue)}},[c,T,y,q,j]),jt(()=>{L.current=I,W.current=!!o}),jt(()=>{n||(F.current=null)},[n]);const pe=u!=null,he=w.useMemo(()=>{function ue(Z){if(!n)return;const de=s.current.indexOf(Z);de!==-1&&I(de)}return{onFocus(Z){let{currentTarget:de}=Z;ue(de)},onClick:Z=>{let{currentTarget:de}=Z;return de.focus({preventScroll:!0})},...g&&{onMouseMove(Z){let{currentTarget:de}=Z;ue(de)},onPointerLeave(Z){let{pointerType:de}=Z;!N.current||de==="touch"||(R.current=-1,le(s,R),I(null),y||Mr(i.floating.current,{preventScroll:!0}))}}}},[n,i,le,g,s,I,y]);return w.useMemo(()=>{if(!c)return{};const ue=x.current;function Q(P){if(N.current=!1,z.current=!0,!V.current&&P.currentTarget===i.floating.current)return;if(h&&t0(P.key,S,m)){Gt(P),r(!1,P.nativeEvent),ma(a)&&!y&&a.focus();return}const Y=R.current,oe=Yd(s,ue),ee=Fw(s,ue);if(P.key==="Home"&&(Gt(P),R.current=oe,I(R.current)),P.key==="End"&&(Gt(P),R.current=ee,I(R.current)),!(E>1&&(R.current=jF(s,{event:P,orientation:S,loop:p,cols:E,disabledIndices:ue,minIndex:oe,maxIndex:ee,prevIndex:R.current,stopEvent:!0}),I(R.current),S==="both"))&&e0(P.key,S)){if(Gt(P),n&&!y&&ii(P.currentTarget.ownerDocument)===P.currentTarget){R.current=ip(P.key,S,m)?oe:ee,I(R.current);return}ip(P.key,S,m)?p?R.current=Y>=ee?d&&Y!==s.current.length?-1:oe:tn(s,{startingIndex:Y,disabledIndices:ue}):R.current=Math.min(ee,tn(s,{startingIndex:Y,disabledIndices:ue})):p?R.current=Y<=oe?d&&Y!==-1?s.current.length:ee:tn(s,{startingIndex:Y,decrement:!0,disabledIndices:ue}):R.current=Math.max(oe,tn(s,{startingIndex:Y,decrement:!0,disabledIndices:ue})),Yo(s,R.current)?I(null):I(R.current)}}function Z(P){v==="auto"&&Aw(P.nativeEvent)&&(U.current=!0)}function de(P){U.current=v,v==="auto"&&Nw(P.nativeEvent)&&(U.current=!0)}const ve=y&&n&&pe&&{"aria-activedescendant":ne||_},$e=s.current.find(P=>(P==null?void 0:P.id)===_);return{reference:{...ve,onKeyDown(P){N.current=!1;const Y=P.key.indexOf("Arrow")===0,oe=u5(P.key,S,m),ee=t0(P.key,S,m),ke=e0(P.key,S),Se=(h?oe:ke)||P.key==="Enter"||P.key.trim()==="";if(y&&n){const Fe=T==null?void 0:T.nodesRef.current.find(D=>D.parentId==null),B=T&&Fe?VF(T.nodesRef.current,Fe.id):null;if(Y&&B&&j){const D=new KeyboardEvent("keydown",{key:P.key,bubbles:!0});if(oe||ee){var Pe,He;const X=((Pe=B.context)==null?void 0:Pe.elements.domReference)===P.currentTarget,ce=ee&&!X?(He=B.context)==null?void 0:He.elements.domReference:oe?$e:null;ce&&(Gt(P),ce.dispatchEvent(D),re(void 0))}if(ke&&B.context&&B.context.open&&B.parentId&&P.currentTarget!==B.context.elements.domReference){var Ae;Gt(P),(Ae=B.context.elements.domReference)==null||Ae.dispatchEvent(D);return}}return Q(P)}if(!(!n&&!b&&Y)){if(Se&&(F.current=h&&ke?null:P.key),h){oe&&(Gt(P),n?(R.current=Yd(s,ue),I(R.current)):r(!0,P.nativeEvent));return}ke&&(f!=null&&(R.current=f),Gt(P),!n&&b?r(!0,P.nativeEvent):Q(P),n&&I(R.current))}},onFocus(){n&&I(null)},onPointerDown:de,onMouseDown:Z,onClick:Z},floating:{"aria-orientation":S==="both"?void 0:S,...ve,onKeyDown:Q,onPointerMove(){N.current=!0}},item:he}},[a,i,_,ne,x,V,s,c,S,m,y,n,pe,h,f,b,d,E,p,v,I,r,he,T,j])}function f5(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:i=!0,role:a="dialog"}=t,o=Xd();return w.useMemo(()=>{const s={id:r,role:a};return i?a==="tooltip"?{reference:{"aria-describedby":n?r:void 0},floating:s}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":n?r:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:o}},floating:{...s,...a==="menu"&&{"aria-labelledby":o}}}:{}},[i,a,n,r,o])}function d5(e,t){var n;const{open:r,dataRef:i}=e,{listRef:a,activeIndex:o,onMatch:s,onTypingChange:u,enabled:l=!0,findMatch:c=null,resetMs:f=750,ignoreKeys:d=[],selectedIndex:p=null}=t,h=w.useRef(),m=w.useRef(""),y=w.useRef((n=p??o)!=null?n:-1),v=w.useRef(null),g=oi(s),b=oi(u),k=ai(c),S=ai(d);return jt(()=>{r&&(clearTimeout(h.current),v.current=null,m.current="")},[r]),jt(()=>{if(r&&m.current===""){var E;y.current=(E=p??o)!=null?E:-1}},[r,p,o]),w.useMemo(()=>{if(!l)return{};function E(q){q?i.current.typing||(i.current.typing=q,b(q)):i.current.typing&&(i.current.typing=q,b(q))}function O(q,T,I){const U=k.current?k.current(T,I):T.find(R=>(R==null?void 0:R.toLocaleLowerCase().indexOf(I.toLocaleLowerCase()))===0);return U?q.indexOf(U):-1}function j(q){const T=a.current;if(m.current.length>0&&m.current[0]!==" "&&(O(T,T,m.current)===-1?E(!1):q.key===" "&&Gt(q)),T==null||S.current.includes(q.key)||q.key.length!==1||q.ctrlKey||q.metaKey||q.altKey)return;r&&q.key!==" "&&(Gt(q),E(!0)),T.every(F=>{var N,L;return F?((N=F[0])==null?void 0:N.toLocaleLowerCase())!==((L=F[1])==null?void 0:L.toLocaleLowerCase()):!0})&&m.current===q.key&&(m.current="",y.current=v.current),m.current+=q.key,clearTimeout(h.current),h.current=setTimeout(()=>{m.current="",y.current=v.current,E(!1)},f);const U=y.current,R=O(T,[...T.slice((U||0)+1),...T.slice(0,(U||0)+1)],m.current);R!==-1?(g(R),v.current=R):q.key!==" "&&(m.current="",E(!1))}return{reference:{onKeyDown:j},floating:{onKeyDown:j,onKeyUp(q){q.key===" "&&E(!1)}}}},[l,r,i,a,f,S,k,g,b])}const p5=({options:e,label:t,reusable:n,sendMessage:r,isReadOnly:i})=>{var N,L,W,z,A;const a=Hl(x=>x.messageContainerRef),[o,s]=w.useState(!1),[u,l]=w.useState(null),[c,f]=w.useState(null),{message:{blocks:{dropdown:d}}}=yt,p=e.reduce((x,V)=>(x[V.label]=V.value,x),{}),h=p?Object.keys(p):[],m=x=>{s(c!==null&&!n?!1:x)},{refs:y,floatingStyles:v,context:g}=s5({placement:"bottom-start",open:o,onOpenChange:m,whileElementsMounted:cL,middleware:[vL(5),yL({padding:10,boundary:(a==null?void 0:a.current)??void 0,crossAxis:!0}),gL({apply({rects:x,elements:V,availableHeight:K}){Object.assign(V.floating.style,{maxHeight:`${K}px`,minWidth:`${x.reference.width}px`})},padding:10})]}),b=w.useRef([]),k=w.useRef(h),S=w.useRef(!1),E=t5(g,{event:"mousedown"}),O=o5(g),j=f5(g,{role:"listbox"}),q=c5(g,{listRef:b,activeIndex:u,selectedIndex:c,onNavigate:l,loop:!0}),T=d5(g,{listRef:k,activeIndex:u,selectedIndex:c,onMatch:o?l:f,onTypingChange(x){S.current=x}}),{getReferenceProps:I,getFloatingProps:U,getItemProps:R}=l5([O,j,q,T,E]),F=x=>{f(x),h[x]!==void 0&&(r==null||r({type:"text",text:p[h[x]]??""})),s(!1)};return c!==null&&h[c],$.jsxs($.Fragment,{children:[$.jsxs("div",{tabIndex:0,ref:y.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":c!==null&&!n?"":void 0,...(N=d.button)==null?void 0:N.container,...I(),children:[$.jsx("span",{...(L=d.button)==null?void 0:L.text,children:"Select..."}),$.jsx($L,{...(W=d.button)==null?void 0:W.icon})]}),o&&$.jsx(XF,{children:$.jsx(e5,{context:g,modal:!1,children:$.jsx("div",{ref:y.setFloating,className:(A=(z=d.content)==null?void 0:z.container)==null?void 0:A.className,style:{...v},...U(),children:h.map((x,V)=>{var K;return $.jsx("div",{ref:_=>{b.current[V]=_},role:"option",tabIndex:V===u?0:-1,"aria-selected":V===c&&V===u,"data-active":V===u?"":void 0,...(K=d.content)==null?void 0:K.item,...R({onClick(){i||F(V)},onKeyDown(_){i||(_.key==="Enter"&&(_.preventDefault(),F(V)),_.key===" "&&!S.current&&(_.preventDefault(),F(V)))}}),children:x},x)})})})})]})},h5=M.forwardRef(({type:e,title:t,url:n,...r},i)=>{const{message:{blocks:{file:a}}}=yt;return $.jsxs("a",{...r,...a.container,href:n,download:!0,ref:i,target:"_blank",rel:"noreferrer",children:[$.jsx("p",{...a.title,children:t||n}),$.jsx(RL,{...a.icon})]})}),m5=Lo()((e,t)=>({components:{},getCustomComponent:async n=>{const r=t().components[n];if(r)return r;const i=await fetch(n).then(l=>l.text()),a=new Blob([i],{type:"application/javascript"}),s=await import(URL.createObjectURL(a)),u=()=>s.default;return e(l=>({components:{...l.components,[n]:u}})),u}}));globalThis.React=M;const n0={audio:kL,bubble:Fx,button:Tj,carousel:Cw,column:gw,dropdown:p5,file:h5,image:yw,location:NL,row:bw,text:lj,video:EL,custom:({url:e,name:t,data:n,...r})=>{const i=m5(l=>l.getCustomComponent),[a,o]=M.useState(null),[s,u]=M.useState(null);return M.useEffect(()=>{i(e).then(o).catch(l=>{u(l.message)})},[e]),s?$.jsx("div",{style:{color:"red"},children:s}):a?$.jsx(a,{...n,...r}):null}},ba=({block:e,renderers:t,...n})=>{const r=(t==null?void 0:t[e.type])??n0[e.type],i={...n,...e};return $.jsx(r,{...i})};function v5({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M8 14a.75.75 0 0 1-.75-.75V4.56L4.03 7.78a.75.75 0 0 1-1.06-1.06l4.5-4.5a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1-1.06 1.06L8.75 4.56v8.69A.75.75 0 0 1 8 14Z",clipRule:"evenodd"}))}const y5=w.forwardRef(v5);function g5({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{d:"M8 1a2 2 0 0 0-2 2v4a2 2 0 1 0 4 0V3a2 2 0 0 0-2-2Z"}),w.createElement("path",{d:"M4.5 7A.75.75 0 0 0 3 7a5.001 5.001 0 0 0 4.25 4.944V13.5h-1.5a.75.75 0 0 0 0 1.5h4.5a.75.75 0 0 0 0-1.5h-1.5v-1.556A5.001 5.001 0 0 0 13 7a.75.75 0 0 0-1.5 0 3.5 3.5 0 1 1-7 0Z"}))}const b5=w.forwardRef(g5);function x5({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{d:"M8.75 3.75a.75.75 0 0 0-1.5 0v3.5h-3.5a.75.75 0 0 0 0 1.5h3.5v3.5a.75.75 0 0 0 1.5 0v-3.5h3.5a.75.75 0 0 0 0-1.5h-3.5v-3.5Z"}))}const w5=w.forwardRef(x5);function ap(){return ap=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ap.apply(null,arguments)}function S5(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}var _5=M.useLayoutEffect,E5=function(t){var n=w.useRef(t);return _5(function(){n.current=t}),n},r0=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},k5=function(t,n){var r=M.useRef();return M.useCallback(function(i){t.current=i,r.current&&r0(r.current,null),r.current=n,n&&r0(n,i)},[n])},i0={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},T5=function(t){Object.keys(i0).forEach(function(n){t.style.setProperty(n,i0[n],"important")})},a0=T5,un=null,o0=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function O5(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),un||(un=document.createElement("textarea"),un.setAttribute("tabindex","-1"),un.setAttribute("aria-hidden","true"),a0(un)),un.parentNode===null&&document.body.appendChild(un);var i=e.paddingSize,a=e.borderSize,o=e.sizingStyle,s=o.boxSizing;Object.keys(o).forEach(function(d){var p=d;un.style[p]=o[p]}),a0(un),un.value=t;var u=o0(un,e);un.value=t,u=o0(un,e),un.value="x";var l=un.scrollHeight-i,c=l*n;s==="border-box"&&(c=c+i+a),u=Math.max(c,u);var f=l*r;return s==="border-box"&&(f=f+i+a),u=Math.min(f,u),[u,l]}var s0=function(){},C5=function(t,n){return t.reduce(function(r,i){return r[i]=n[i],r},{})},$5=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],I5=!!document.documentElement.currentStyle,R5=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=C5($5,n),i=r.boxSizing;if(i==="")return null;I5&&i==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var a=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),o=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:a,borderSize:o}},P5=R5;function l0(e,t,n){var r=E5(n);w.useLayoutEffect(function(){var i=function(o){return r.current(o)};if(e)return e.addEventListener(t,i),function(){return e.removeEventListener(t,i)}},[])}var A5=function(t){l0(window,"resize",t)},N5=function(t){l0(document.fonts,"loadingdone",t)},D5=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],M5=function(t,n){var r=t.cacheMeasurements,i=t.maxRows,a=t.minRows,o=t.onChange,s=o===void 0?s0:o,u=t.onHeightChange,l=u===void 0?s0:u,c=S5(t,D5),f=c.value!==void 0,d=w.useRef(null),p=k5(d,n),h=w.useRef(0),m=w.useRef(),y=function(){var b=d.current,k=r&&m.current?m.current:P5(b);if(k){m.current=k;var S=O5(k,b.value||b.placeholder||"x",a,i),E=S[0],O=S[1];h.current!==E&&(h.current=E,b.style.setProperty("height",E+"px","important"),l(E,{rowHeight:O}))}},v=function(b){f||y(),s(b)};return w.useLayoutEffect(y),A5(y),N5(y),w.createElement("textarea",ap({},c,{onChange:v,ref:p}))},j5=w.forwardRef(M5);const u0=M.memo(M.forwardRef(({className:e,inputRef:t,disableComposer:n,isReadOnly:r,allowFileUpload:i,connected:a,composerPlaceholder:o,showPoweredBy:s,sendMessage:u,uploadFile:l,...c},f)=>{const{composer:d}=yt,[p,h]=M.useState(""),[m,y]=M.useState(-1),[v,g]=M.useState(!1),b=M.useRef(null),k=M.useRef(null),S=jx(R=>R.messageHistory),E=jx(R=>R.addMessageToHistory);if(r)return null;const O=()=>{var R;b.current&&((R=b.current)==null||R.click())},j=n||r||!a,q=async R=>{var N;if(!l)return;const F=(N=R.target.files)==null?void 0:N[0];if(F)try{const{fileUrl:L,type:W}=await l(F),z=W==="image"?{type:W,imageUrl:L}:W==="audio"?{type:W,audioUrl:L}:W==="video"?{type:W,videoUrl:L}:{type:W,fileUrl:L};await(u==null?void 0:u(z))}catch(L){console.error("Error sending file:",L)}},T=window.SpeechRecognition||window.webkitSpeechRecognition,I=()=>{k.current||(k.current=new T);const R=k.current;R&&(R.continuous=!0,R.onresult=F=>{var L,W,z;const N=((z=(W=(L=F.results)==null?void 0:L[0])==null?void 0:W[0])==null?void 0:z.transcript)??"";h(N??""),R.stop(),g(!1)},v?(R.stop(),g(!1)):(R.start(),g(!0)))},U=()=>{p&&(u==null||u({type:"text",text:p}),h(""),E(p),y(-1))};return $.jsxs($.Fragment,{children:[$.jsxs("div",{"data-disabled":j,...c,className:Xl(d.container.className,e),ref:f,children:[i&&$.jsxs($.Fragment,{children:[$.jsx("button",{type:"button",disabled:j,...d.uploadButton.container,onClick:O,children:$.jsx(w5,{...d.uploadButton.icon})}),$.jsx("input",{type:"file",ref:b,style:{display:"none"},onChange:q})]}),$.jsx(j5,{...d==null?void 0:d.input,ref:t,placeholder:o??"Type your message...",disabled:j,value:p,"data-has-value":!!p,onChange:R=>h(R.target.value),maxRows:5,onKeyDown:R=>{j||(R.key==="Enter"&&R.shiftKey?(R.preventDefault(),h(`${p}
|
|
273
|
+
`)):R.key==="Enter"&&(R.preventDefault(),U()),R.key==="ArrowUp"&&(R.preventDefault(),m<S.length-1&&h(S[m+1]??""),y(()=>Math.min(m+1,S.length-1))),R.key==="ArrowDown"&&(R.preventDefault(),h(m===0?"":S[m-1]??""),y(()=>Math.max(m-1,-1))))}}),p&&$.jsx("button",{type:"button","aria-label":"Send message",...d.button.container,disabled:!p||j,onClick:U,children:$.jsx(y5,{...d.button.icon})}),!p&&T&&$.jsx("button",{type:"button","aria-label":"Activate voice input",...d.voiceButton.container,disabled:!!p,onClick:I,"data-listens":!!v,children:$.jsx(b5,{...d.voiceButton.icon})})]}),$.jsx("a",{...d.poweredBy,"data-hidden":s===!1,hidden:s===!1,href:"https://botpress.com/?from=webchat",target:"_blank",rel:"noopener noreferrer",children:"⚡ by Botpress"})]})})),c0=({children:e})=>{const[t,n]=M.useState(!1),[r,i]=M.useState(""),[a,o]=M.useState(null),s=({title:l,content:c})=>{i(l),o(c),n(!0)},u=()=>{n(!1)};return $.jsxs(Ux.Provider,{value:{hideModal:u,showModal:s,title:r,content:a,open:t},children:[$.jsx(ui,{open:t,onOpenChange:n,children:$.jsx(ui.Content,{title:r,children:a})}),e]})},f0=({color:e,fontFamily:t,radius:n,themeMode:r,variant:i})=>{const a=M.useMemo(()=>_g({color:e,fontFamily:t,radius:n,themeMode:r,variant:i}),[e,t,n,r,i]);return $.jsx("style",{children:a})};function jr(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function d0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function p0(...e){return t=>{let n=!1;const r=e.map(i=>{const a=d0(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():d0(e[i],null)}}}}function si(...e){return w.useCallback(p0(...e),e)}function L5(e,t){const n=w.createContext(t),r=a=>{const{children:o,...s}=a,u=w.useMemo(()=>s,Object.values(s));return $.jsx(n.Provider,{value:u,children:o})};r.displayName=e+"Provider";function i(a){const o=w.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function h0(e,t=[]){let n=[];function r(a,o){const s=w.createContext(o),u=n.length;n=[...n,o];const l=f=>{var v;const{scope:d,children:p,...h}=f,m=((v=d==null?void 0:d[e])==null?void 0:v[u])||s,y=w.useMemo(()=>h,Object.values(h));return $.jsx(m.Provider,{value:y,children:p})};l.displayName=a+"Provider";function c(f,d){var m;const p=((m=d==null?void 0:d[e])==null?void 0:m[u])||s,h=w.useContext(p);if(h)return h;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[l,c]}const i=()=>{const a=n.map(o=>w.createContext(o));return function(s){const u=(s==null?void 0:s[e])||a;return w.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,F5(i,...t)]}function F5(...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(a){const o=r.reduce((s,{useScope:u,scopeName:l})=>{const f=u(a)[`__scope${l}`];return{...s,...f}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var B5=w.useId||(()=>{}),U5=0;function Su(e){const[t,n]=w.useState(B5());return Qi(()=>{e||n(r=>r??String(U5++))},[e]),e||(t?`radix-${t}`:"")}function m0({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=z5({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=Zr(n),u=w.useCallback(l=>{if(a){const f=typeof l=="function"?l(e):l;f!==e&&s(f)}else i(l)},[a,e,i,s]);return[o,u]}function z5({defaultProp:e,onChange:t}){const n=w.useState(e),[r]=n,i=w.useRef(r),a=Zr(t);return w.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}var op=w.forwardRef((e,t)=>{const{children:n,...r}=e,i=w.Children.toArray(n),a=i.find(V5);if(a){const o=a.props.children,s=i.map(u=>u===a?w.Children.count(o)>1?w.Children.only(null):w.isValidElement(o)?o.props.children:null:u);return $.jsx(sp,{...r,ref:t,children:w.isValidElement(o)?w.cloneElement(o,void 0,s):null})}return $.jsx(sp,{...r,ref:t,children:n})});op.displayName="Slot";var sp=w.forwardRef((e,t)=>{const{children:n,...r}=e;if(w.isValidElement(n)){const i=W5(n);return w.cloneElement(n,{...H5(r,n.props),ref:t?p0(t,i):i})}return w.Children.count(n)>1?w.Children.only(null):null});sp.displayName="SlotClone";var q5=({children:e})=>$.jsx($.Fragment,{children:e});function V5(e){return w.isValidElement(e)&&e.type===q5}function H5(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{a(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function W5(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Z5=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Zn=Z5.reduce((e,t)=>{const n=w.forwardRef((r,i)=>{const{asChild:a,...o}=r,s=a?op:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),$.jsx(s,{...o,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function K5(e,t){e&&ky.flushSync(()=>e.dispatchEvent(t))}function G5(e,t=globalThis==null?void 0:globalThis.document){const n=Zr(e);w.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Y5="DismissableLayer",lp="dismissableLayer.update",J5="dismissableLayer.pointerDownOutside",X5="dismissableLayer.focusOutside",v0,y0=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),g0=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...u}=e,l=w.useContext(y0),[c,f]=w.useState(null),d=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=w.useState({}),h=si(t,O=>f(O)),m=Array.from(l.layers),[y]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(y),g=c?m.indexOf(c):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,k=g>=v,S=tB(O=>{const j=O.target,q=[...l.branches].some(T=>T.contains(j));!k||q||(i==null||i(O),o==null||o(O),O.defaultPrevented||s==null||s())},d),E=nB(O=>{const j=O.target;[...l.branches].some(T=>T.contains(j))||(a==null||a(O),o==null||o(O),O.defaultPrevented||s==null||s())},d);return G5(O=>{g===l.layers.size-1&&(r==null||r(O),!O.defaultPrevented&&s&&(O.preventDefault(),s()))},d),w.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(v0=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),b0(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=v0)}},[c,d,n,l]),w.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),b0())},[c,l]),w.useEffect(()=>{const O=()=>p({});return document.addEventListener(lp,O),()=>document.removeEventListener(lp,O)},[]),$.jsx(Zn.div,{...u,ref:h,style:{pointerEvents:b?k?"auto":"none":void 0,...e.style},onFocusCapture:jr(e.onFocusCapture,E.onFocusCapture),onBlurCapture:jr(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:jr(e.onPointerDownCapture,S.onPointerDownCapture)})});g0.displayName=Y5;var Q5="DismissableLayerBranch",eB=w.forwardRef((e,t)=>{const n=w.useContext(y0),r=w.useRef(null),i=si(t,r);return w.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),$.jsx(Zn.div,{...e,ref:i})});eB.displayName=Q5;function tB(e,t=globalThis==null?void 0:globalThis.document){const n=Zr(e),r=w.useRef(!1),i=w.useRef(()=>{});return w.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let u=function(){x0(J5,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function nB(e,t=globalThis==null?void 0:globalThis.document){const n=Zr(e),r=w.useRef(!1);return w.useEffect(()=>{const i=a=>{a.target&&!r.current&&x0(X5,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function b0(){const e=new CustomEvent(lp);document.dispatchEvent(e)}function x0(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?K5(i,a):i.dispatchEvent(a)}var up="focusScope.autoFocusOnMount",cp="focusScope.autoFocusOnUnmount",w0={bubbles:!1,cancelable:!0},rB="FocusScope",S0=w.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,u]=w.useState(null),l=Zr(i),c=Zr(a),f=w.useRef(null),d=si(t,m=>u(m)),p=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(r){let m=function(b){if(p.paused||!s)return;const k=b.target;s.contains(k)?f.current=k:li(f.current,{select:!0})},y=function(b){if(p.paused||!s)return;const k=b.relatedTarget;k!==null&&(s.contains(k)||li(f.current,{select:!0}))},v=function(b){if(document.activeElement===document.body)for(const S of b)S.removedNodes.length>0&&li(s)};document.addEventListener("focusin",m),document.addEventListener("focusout",y);const g=new MutationObserver(v);return s&&g.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",y),g.disconnect()}}},[r,s,p.paused]),w.useEffect(()=>{if(s){k0.add(p);const m=document.activeElement;if(!s.contains(m)){const v=new CustomEvent(up,w0);s.addEventListener(up,l),s.dispatchEvent(v),v.defaultPrevented||(iB(uB(_0(s)),{select:!0}),document.activeElement===m&&li(s))}return()=>{s.removeEventListener(up,l),setTimeout(()=>{const v=new CustomEvent(cp,w0);s.addEventListener(cp,c),s.dispatchEvent(v),v.defaultPrevented||li(m??document.body,{select:!0}),s.removeEventListener(cp,c),k0.remove(p)},0)}}},[s,l,c,p]);const h=w.useCallback(m=>{if(!n&&!r||p.paused)return;const y=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(y&&v){const g=m.currentTarget,[b,k]=aB(g);b&&k?!m.shiftKey&&v===k?(m.preventDefault(),n&&li(b,{select:!0})):m.shiftKey&&v===b&&(m.preventDefault(),n&&li(k,{select:!0})):v===g&&m.preventDefault()}},[n,r,p.paused]);return $.jsx(Zn.div,{tabIndex:-1,...o,ref:d,onKeyDown:h})});S0.displayName=rB;function iB(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(li(r,{select:t}),document.activeElement!==n)return}function aB(e){const t=_0(e),n=E0(t,e),r=E0(t.reverse(),e);return[n,r]}function _0(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 E0(e,t){for(const n of e)if(!oB(n,{upTo:t}))return n}function oB(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 sB(e){return e instanceof HTMLInputElement&&"select"in e}function li(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&sB(e)&&t&&e.select()}}var k0=lB();function lB(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=T0(e,t),e.unshift(t)},remove(t){var n;e=T0(e,t),(n=e[0])==null||n.resume()}}}function T0(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function uB(e){return e.filter(t=>t.tagName!=="A")}function cB(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var _u=e=>{const{present:t,children:n}=e,r=fB(t),i=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),a=si(r.ref,dB(i));return typeof n=="function"||r.isPresent?w.cloneElement(i,{ref:a}):null};_u.displayName="Presence";function fB(e){const[t,n]=w.useState(),r=w.useRef({}),i=w.useRef(e),a=w.useRef("none"),o=e?"mounted":"unmounted",[s,u]=cB(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const l=Eu(r.current);a.current=s==="mounted"?l:"none"},[s]),Qi(()=>{const l=r.current,c=i.current;if(c!==e){const d=a.current,p=Eu(l);e?u("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(c&&d!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),Qi(()=>{if(t){let l;const c=t.ownerDocument.defaultView??window,f=p=>{const m=Eu(r.current).includes(p.animationName);if(p.target===t&&m&&(u("ANIMATION_END"),!i.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},d=p=>{p.target===t&&(a.current=Eu(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:w.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Eu(e){return(e==null?void 0:e.animationName)||"none"}function dB(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var fp=0;function pB(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??O0()),document.body.insertAdjacentElement("beforeend",e[1]??O0()),fp++,()=>{fp===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),fp--}},[])}function O0(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ku="right-scroll-bar-position",Tu="width-before-scroll-bar",hB="with-scroll-bars-hidden",mB="--removed-body-scroll-bar-size";function dp(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function vB(e,t){var n=M.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}var yB=typeof window<"u"?w.useLayoutEffect:w.useEffect,C0=new WeakMap;function gB(e,t){var n=vB(null,function(r){return e.forEach(function(i){return dp(i,r)})});return yB(function(){var r=C0.get(n);if(r){var i=new Set(r),a=new Set(e),o=n.current;i.forEach(function(s){a.has(s)||dp(s,null)}),a.forEach(function(s){i.has(s)||dp(s,o)})}C0.set(n,e)},[e]),n}function bB(e){return e}function xB(e,t){t===void 0&&(t=bB);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(a){var o=t(a,r);return n.push(o),function(){n=n.filter(function(s){return s!==o})}},assignSyncMedium:function(a){for(r=!0;n.length;){var o=n;n=[],o.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){r=!0;var o=[];if(n.length){var s=n;n=[],s.forEach(a),o=n}var u=function(){var c=o;o=[],c.forEach(a)},l=function(){return Promise.resolve().then(u)};l(),n={push:function(c){o.push(c),l()},filter:function(c){return o=o.filter(c),n}}}};return i}function wB(e){e===void 0&&(e={});var t=xB(null);return t.options=Nn({async:!0,ssr:!1},e),t}var $0=function(e){var t=e.sideCar,n=vw(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 w.createElement(r,Nn({},n))};$0.isSideCarExport=!0;function SB(e,t){return e.useMedium(t),$0}var I0=wB(),pp=function(){},Ou=w.forwardRef(function(e,t){var n=w.useRef(null),r=w.useState({onScrollCapture:pp,onWheelCapture:pp,onTouchMoveCapture:pp}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,u=e.className,l=e.removeScrollBar,c=e.enabled,f=e.shards,d=e.sideCar,p=e.noIsolation,h=e.inert,m=e.allowPinchZoom,y=e.as,v=y===void 0?"div":y,g=e.gapMode,b=vw(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=d,S=gB([n,t]),E=Nn(Nn({},b),i);return w.createElement(w.Fragment,null,c&&w.createElement(k,{sideCar:I0,removeScrollBar:l,shards:f,noIsolation:p,inert:h,setCallbacks:a,allowPinchZoom:!!m,lockRef:n,gapMode:g}),o?w.cloneElement(w.Children.only(s),Nn(Nn({},E),{ref:S})):w.createElement(v,Nn({},E,{className:u,ref:S}),s))});Ou.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ou.classNames={fullWidth:Tu,zeroRight:ku};var _B=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function EB(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=_B();return t&&e.setAttribute("nonce",t),e}function kB(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function TB(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var OB=function(){var e=0,t=null;return{add:function(n){e==0&&(t=EB())&&(kB(t,n),TB(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},CB=function(){var e=OB();return function(t,n){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},R0=function(){var e=CB(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},$B={left:0,top:0,right:0,gap:0},hp=function(e){return parseInt(e||"",10)||0},IB=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[hp(n),hp(r),hp(i)]},RB=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return $B;var t=IB(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])}},PB=R0(),xa="data-scroll-locked",AB=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
274
|
+
.`.concat(hB,` {
|
|
275
275
|
overflow: hidden `).concat(r,`;
|
|
276
276
|
padding-right: `).concat(s,"px ").concat(r,`;
|
|
277
277
|
}
|
|
@@ -305,51 +305,51 @@ to {
|
|
|
305
305
|
}
|
|
306
306
|
|
|
307
307
|
body[`).concat(xa,`] {
|
|
308
|
-
`).concat(
|
|
308
|
+
`).concat(mB,": ").concat(s,`px;
|
|
309
309
|
}
|
|
310
|
-
`)},
|
|
310
|
+
`)},P0=function(){var e=parseInt(document.body.getAttribute(xa)||"0",10);return isFinite(e)?e:0},NB=function(){w.useEffect(function(){return document.body.setAttribute(xa,(P0()+1).toString()),function(){var e=P0()-1;e<=0?document.body.removeAttribute(xa):document.body.setAttribute(xa,e.toString())}},[])},DB=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;NB();var a=w.useMemo(function(){return RB(i)},[i]);return w.createElement(PB,{styles:AB(a,!t,i,n?"":"!important")})},mp=!1;if(typeof window<"u")try{var Cu=Object.defineProperty({},"passive",{get:function(){return mp=!0,!0}});window.addEventListener("test",Cu,Cu),window.removeEventListener("test",Cu,Cu)}catch{mp=!1}var wa=mp?{passive:!1}:!1,MB=function(e){return e.tagName==="TEXTAREA"},A0=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!MB(e)&&n[t]==="visible")},jB=function(e){return A0(e,"overflowY")},LB=function(e){return A0(e,"overflowX")},N0=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=D0(e,r);if(i){var a=M0(e,r),o=a[1],s=a[2];if(o>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},FB=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},BB=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},D0=function(e,t){return e==="v"?jB(t):LB(t)},M0=function(e,t){return e==="v"?FB(t):BB(t)},UB=function(e,t){return e==="h"&&t==="rtl"?-1:1},zB=function(e,t,n,r,i){var a=UB(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,u=t.contains(s),l=!1,c=o>0,f=0,d=0;do{var p=M0(e,s),h=p[0],m=p[1],y=p[2],v=m-y-a*h;(h||v)&&D0(e,s)&&(f+=v,d+=h),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(c&&(Math.abs(f)<1||!i)||!c&&(Math.abs(d)<1||!i))&&(l=!0),l},$u=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},j0=function(e){return[e.deltaX,e.deltaY]},L0=function(e){return e&&"current"in e?e.current:e},qB=function(e,t){return e[0]===t[0]&&e[1]===t[1]},VB=function(e){return`
|
|
311
311
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
312
312
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
313
|
-
`)},
|
|
313
|
+
`)},HB=0,Sa=[];function WB(e){var t=w.useRef([]),n=w.useRef([0,0]),r=w.useRef(),i=w.useState(HB++)[0],a=w.useState(R0)[0],o=w.useRef(e);w.useEffect(function(){o.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=bL([e.lockRef.current],(e.shards||[]).map(L0),!0).filter(Boolean);return m.forEach(function(y){return y.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=w.useCallback(function(m,y){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var v=$u(m),g=n.current,b="deltaX"in m?m.deltaX:g[0]-v[0],k="deltaY"in m?m.deltaY:g[1]-v[1],S,E=m.target,O=Math.abs(b)>Math.abs(k)?"h":"v";if("touches"in m&&O==="h"&&E.type==="range")return!1;var j=N0(O,E);if(!j)return!0;if(j?S=O:(S=O==="v"?"h":"v",j=N0(O,E)),!j)return!1;if(!r.current&&"changedTouches"in m&&(b||k)&&(r.current=S),!S)return!0;var q=r.current||S;return zB(q,y,m,q==="h"?b:k,!0)},[]),u=w.useCallback(function(m){var y=m;if(!(!Sa.length||Sa[Sa.length-1]!==a)){var v="deltaY"in y?j0(y):$u(y),g=t.current.filter(function(S){return S.name===y.type&&(S.target===y.target||y.target===S.shadowParent)&&qB(S.delta,v)})[0];if(g&&g.should){y.cancelable&&y.preventDefault();return}if(!g){var b=(o.current.shards||[]).map(L0).filter(Boolean).filter(function(S){return S.contains(y.target)}),k=b.length>0?s(y,b[0]):!o.current.noIsolation;k&&y.cancelable&&y.preventDefault()}}},[]),l=w.useCallback(function(m,y,v,g){var b={name:m,delta:y,target:v,should:g,shadowParent:ZB(v)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(k){return k!==b})},1)},[]),c=w.useCallback(function(m){n.current=$u(m),r.current=void 0},[]),f=w.useCallback(function(m){l(m.type,j0(m),m.target,s(m,e.lockRef.current))},[]),d=w.useCallback(function(m){l(m.type,$u(m),m.target,s(m,e.lockRef.current))},[]);w.useEffect(function(){return Sa.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",u,wa),document.addEventListener("touchmove",u,wa),document.addEventListener("touchstart",c,wa),function(){Sa=Sa.filter(function(m){return m!==a}),document.removeEventListener("wheel",u,wa),document.removeEventListener("touchmove",u,wa),document.removeEventListener("touchstart",c,wa)}},[]);var p=e.removeScrollBar,h=e.inert;return w.createElement(w.Fragment,null,h?w.createElement(a,{styles:VB(i)}):null,p?w.createElement(DB,{gapMode:e.gapMode}):null)}function ZB(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const KB=SB(I0,WB);var F0=w.forwardRef(function(e,t){return w.createElement(Ou,Nn({},e,{ref:t,sideCar:KB}))});F0.classNames=Ou.classNames;var GB=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},_a=new WeakMap,Iu=new WeakMap,Ru={},vp=0,B0=function(e){return e&&(e.host||B0(e.parentNode))},YB=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=B0(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})},JB=function(e,t,n,r){var i=YB(t,Array.isArray(e)?e:[e]);Ru[n]||(Ru[n]=new WeakMap);var a=Ru[n],o=[],s=new Set,u=new Set(i),l=function(f){!f||s.has(f)||(s.add(f),l(f.parentNode))};i.forEach(l);var c=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(d){if(s.has(d))c(d);else try{var p=d.getAttribute(r),h=p!==null&&p!=="false",m=(_a.get(d)||0)+1,y=(a.get(d)||0)+1;_a.set(d,m),a.set(d,y),o.push(d),m===1&&h&&Iu.set(d,!0),y===1&&d.setAttribute(n,"true"),h||d.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",d,v)}})};return c(t),s.clear(),vp++,function(){o.forEach(function(f){var d=_a.get(f)-1,p=a.get(f)-1;_a.set(f,d),a.set(f,p),d||(Iu.has(f)||f.removeAttribute(r),Iu.delete(f)),p||f.removeAttribute(n)}),vp--,vp||(_a=new WeakMap,_a=new WeakMap,Iu=new WeakMap,Ru={})}},XB=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=GB(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),JB(r,i,n,"aria-hidden")):function(){return null}},yp="Dialog",[U0,xle]=h0(yp),[QB,fr]=U0(yp),z0=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=w.useRef(null),u=w.useRef(null),[l=!1,c]=m0({prop:r,defaultProp:i,onChange:a});return $.jsx(QB,{scope:t,triggerRef:s,contentRef:u,contentId:Su(),titleId:Su(),descriptionId:Su(),open:l,onOpenChange:c,onOpenToggle:w.useCallback(()=>c(f=>!f),[c]),modal:o,children:n})};z0.displayName=yp;var q0="DialogTrigger",V0=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=fr(q0,n),a=si(t,i.triggerRef);return $.jsx(Zn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":bp(i.open),...r,ref:a,onClick:jr(e.onClick,i.onOpenToggle)})});V0.displayName=q0;var e3="DialogPortal",[wle,H0]=U0(e3,{forceMount:void 0}),Pu="DialogOverlay",W0=w.forwardRef((e,t)=>{const n=H0(Pu,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=fr(Pu,e.__scopeDialog);return a.modal?$.jsx(_u,{present:r||a.open,children:$.jsx(t3,{...i,ref:t})}):null});W0.displayName=Pu;var t3=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=fr(Pu,n);return $.jsx(F0,{as:op,allowPinchZoom:!0,shards:[i.contentRef],children:$.jsx(Zn.div,{"data-state":bp(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Mi="DialogContent",Z0=w.forwardRef((e,t)=>{const n=H0(Mi,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=fr(Mi,e.__scopeDialog);return $.jsx(_u,{present:r||a.open,children:a.modal?$.jsx(n3,{...i,ref:t}):$.jsx(r3,{...i,ref:t})})});Z0.displayName=Mi;var n3=w.forwardRef((e,t)=>{const n=fr(Mi,e.__scopeDialog),r=w.useRef(null),i=si(t,n.contentRef,r);return w.useEffect(()=>{const a=r.current;if(a)return XB(a)},[]),$.jsx(K0,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:jr(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:jr(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:jr(e.onFocusOutside,a=>a.preventDefault())})}),r3=w.forwardRef((e,t)=>{const n=fr(Mi,e.__scopeDialog),r=w.useRef(!1),i=w.useRef(!1);return $.jsx(K0,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var u,l;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((l=n.triggerRef.current)==null?void 0:l.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),K0=w.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=fr(Mi,n),u=w.useRef(null),l=si(t,u);return pB(),$.jsxs($.Fragment,{children:[$.jsx(S0,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:$.jsx(g0,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":bp(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),$.jsxs($.Fragment,{children:[$.jsx(a3,{titleId:s.titleId}),$.jsx(s3,{contentRef:u,descriptionId:s.descriptionId})]})]})}),gp="DialogTitle",G0=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=fr(gp,n);return $.jsx(Zn.h2,{id:i.titleId,...r,ref:t})});G0.displayName=gp;var Y0="DialogDescription",i3=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=fr(Y0,n);return $.jsx(Zn.p,{id:i.descriptionId,...r,ref:t})});i3.displayName=Y0;var J0="DialogClose",X0=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=fr(J0,n);return $.jsx(Zn.button,{type:"button",...r,ref:t,onClick:jr(e.onClick,()=>i.onOpenChange(!1))})});X0.displayName=J0;function bp(e){return e?"open":"closed"}var Q0="DialogTitleWarning",[Sle,e1]=L5(Q0,{contentName:Mi,titleName:gp,docsSlug:"dialog"}),a3=({titleId:e})=>{const t=e1(Q0),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
314
314
|
|
|
315
315
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
316
316
|
|
|
317
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},YB="DialogDescriptionWarning",JB=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${G0(YB).contentName}}.`;return w.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},XB=j0,QB=F0,e3=U0,t3=z0,n3=V0,Y0=Z0;function r3({title:e,titleId:t,...n},r){return w.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","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const J0=w.forwardRef(r3);function ui({open:e,onOpenChange:t,children:n}){return I.jsx(XB,{open:e,onOpenChange:t,children:n})}function i3({title:e,children:t}){var r,i,a,o,s,u,l,c;const{modal:n}=yt;return I.jsxs(I.Fragment,{children:[I.jsx(e3,{...n==null?void 0:n.overlay}),I.jsx("div",{...n==null?void 0:n.container,children:I.jsxs(t3,{...(r=n==null?void 0:n.dialog)==null?void 0:r.container,children:[I.jsxs("div",{...(a=(i=n==null?void 0:n.dialog)==null?void 0:i.title)==null?void 0:a.container,children:[I.jsx(n3,{...(s=(o=n==null?void 0:n.dialog)==null?void 0:o.title)==null?void 0:s.text,children:e}),I.jsx(Y0,{children:I.jsx(J0,{role:"button",tabIndex:0,...(l=(u=n==null?void 0:n.dialog)==null?void 0:u.title)==null?void 0:l.closeIcon})})]}),I.jsx("div",{...(c=n==null?void 0:n.dialog)==null?void 0:c.content,children:t})]})})]})}ui.Button=QB,ui.Close=Y0,ui.Content=i3;const gp=({children:e,className:t,connected:n,...r})=>{const{container:{className:i}}=yt,a=Hl(s=>s.setMessageContainerRef),o=j.useRef(null);return j.useEffect(()=>{a(o)},[o]),I.jsxs("div",{...r,className:Xl(i,t),ref:o,children:[I.jsx(m2,{}),I.jsxs(s0,{children:[I.jsx(a3,{connected:n}),e]})]})},a3=({connected:e})=>{const{modal:t}=yt,{showModal:n}=Fx();return j.useEffect(()=>{var r,i,a,o;e===!1&&n({title:"Connection Error",content:I.jsxs(I.Fragment,{children:[I.jsx("p",{...(i=(r=t==null?void 0:t.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."}),I.jsx(ui.Close,{asChild:!0,children:I.jsx("button",{type:"button",...(o=(a=t==null?void 0:t.dialog)==null?void 0:a.newConversation)==null?void 0:o.button,onClick:()=>window.location.reload(),children:"Restart"})})]})})},[e]),I.jsx(I.Fragment,{})};gp.displayName="Container";const X0=j.forwardRef(({children:e,onClick:t,...n},r)=>{const{fab:i}=yt,{container:a,icon:o}=i??{};return I.jsx("div",{...n,...a,ref:r,onClick:t,children:I.jsx("div",{...o})})});X0.displayName="Fab";var bp="Collapsible",[o3,ple]=u0(bp),[s3,xp]=o3(bp),Q0=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[u=!1,l]=c0({prop:r,defaultProp:i,onChange:o});return I.jsx(s3,{scope:n,disabled:a,contentId:Su(),open:u,onOpenToggle:w.useCallback(()=>l(c=>!c),[l]),children:I.jsx(dn.div,{"data-state":Sp(u),"data-disabled":a?"":void 0,...s,ref:t})})});Q0.displayName=bp;var e1="CollapsibleTrigger",t1=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=xp(e1,n);return I.jsx(dn.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Sp(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:jr(e.onClick,i.onOpenToggle)})});t1.displayName=e1;var wp="CollapsibleContent",n1=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=xp(wp,e.__scopeCollapsible);return I.jsx(_u,{present:n||i.open,children:({present:a})=>I.jsx(l3,{...r,ref:t,present:a})})});n1.displayName=wp;var l3=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...a}=e,o=xp(wp,n),[s,u]=w.useState(r),l=w.useRef(null),c=Kr(t,l),f=w.useRef(0),d=f.current,p=w.useRef(0),m=p.current,h=o.open||s,y=w.useRef(h),v=w.useRef();return w.useEffect(()=>{const g=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(g)},[]),Qi(()=>{const g=l.current;if(g){v.current=v.current||{transitionDuration:g.style.transitionDuration,animationName:g.style.animationName},g.style.transitionDuration="0s",g.style.animationName="none";const b=g.getBoundingClientRect();f.current=b.height,p.current=b.width,y.current||(g.style.transitionDuration=v.current.transitionDuration,g.style.animationName=v.current.animationName),u(r)}},[o.open,r]),I.jsx(dn.div,{"data-state":Sp(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!h,...a,ref:c,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})});function Sp(e){return e?"open":"closed"}var u3=Q0,c3=n1;const r1=({onClick:e,...t})=>{var o,s;const{header:n,modal:r}=yt,{showModal:i}=Fx(),a=u=>{var l,c,f,d;u.stopPropagation(),i({title:"Restart Conversation",content:I.jsxs(I.Fragment,{children:[I.jsx("p",{...(c=(l=r==null?void 0:r.dialog)==null?void 0:l.newConversation)==null?void 0:c.text,children:"Are you sure you want to restart a new conversation?"}),I.jsx(ui.Close,{asChild:!0,children:I.jsx("button",{type:"button",...(d=(f=r==null?void 0:r.dialog)==null?void 0:f.newConversation)==null?void 0:d.button,onClick:e,children:"Restart"})})]})})};return I.jsx(_L,{...t,...(s=(o=n==null?void 0:n.content)==null?void 0:o.actions)==null?void 0:s.icons,role:"button",tabIndex:0,onClick:a,onKeyDown:u=>{u.key==="Enter"&&a(u)}})},f3=({onClick:e,...t})=>{const{header:n}=yt,r=i=>{i.stopPropagation(),e==null||e()};return I.jsx(J0,{...t,...n.content.actions.icons,role:"button",tabIndex:0,onClick:r,onKeyDown:i=>{i.key==="Enter"&&r(i)}})},Qo=({icon:e,title:t,link:n,...r})=>{var o,s,u,l,c,f,d,p,m,h,y,v;const{header:i}=yt,a=e??uF;return t?n?I.jsxs("a",{...r,...(s=(o=i.expandedContent)==null?void 0:o.descriptionItems)==null?void 0:s.container,href:n,target:"_blank",rel:"noreferrer noopener",children:[I.jsx(a,{...(l=(u=i.expandedContent)==null?void 0:u.descriptionItems)==null?void 0:l.icon}),I.jsx("p",{...(f=(c=i.expandedContent)==null?void 0:c.descriptionItems)==null?void 0:f.link,children:t})]}):I.jsxs("div",{...r,...(p=(d=i.expandedContent)==null?void 0:d.descriptionItems)==null?void 0:p.container,children:[I.jsx(a,{...(h=(m=i.expandedContent)==null?void 0:m.descriptionItems)==null?void 0:h.icon}),I.jsx("p",{...(v=(y=i.expandedContent)==null?void 0:y.descriptionItems)==null?void 0:v.text,children:t})]}):null},i1=({defaultOpen:e,closeWindow:t,configuration:n,restartConversation:r,...i})=>{var l,c,f,d,p,m,h,y,v,g,b,k,S,E,O,L,D,T,P,V,$,F;const{header:a}=yt,[o,s]=j.useState(!!e),u=!!((l=n.email)!=null&&l.title)||!!((c=n.phone)!=null&&c.title)||!!((f=n.website)!=null&&f.title)||!!((d=n.termsOfService)!=null&&d.link)||!!((p=n.privacyPolicy)!=null&&p.link);return I.jsxs(u3,{open:u?o:!1,onOpenChange:s,"data-disabled":u?void 0:"",...a.container,...i,children:[I.jsxs(t1,{...a.content.container,children:[I.jsx(El,{...i,src:n.botAvatar,...a.content.avatar,children:n.botName||"Bot"}),I.jsx("h2",{...a.content.title,children:n.botName||"Bot"}),n.botDescription&&I.jsx("p",{...a.content.description,children:n.botDescription}),I.jsxs("div",{...a.content.actions.container,children:[I.jsx(r1,{onClick:r}),t&&I.jsx(f3,{onClick:t})]})]}),I.jsxs(c3,{...a.expandedContent.container,children:[I.jsxs("div",{"data-links":"",...a.expandedContent.group,children:[I.jsx(Qo,{"data-email":"",icon:yF,title:(m=n.email)==null?void 0:m.title,link:(y=(h=n.email)==null?void 0:h.link)!=null&&y.startsWith("mailto:")?(v=n.email)==null?void 0:v.link:`mailto:${(g=n.email)==null?void 0:g.link}`}),I.jsx(Qo,{"data-phone":"",icon:_F,title:(b=n.phone)==null?void 0:b.title,link:(S=(k=n.phone)==null?void 0:k.link)!=null&&S.startsWith("tel:")?(E=n.phone)==null?void 0:E.link:`tel:${(O=n.phone)==null?void 0:O.link}`}),I.jsx(Qo,{"data-website":"",link:(L=n.website)==null?void 0:L.link,icon:bF,title:(D=n.website)==null?void 0:D.title})]}),I.jsxs("div",{"data-legal":"",...(T=a.expandedContent)==null?void 0:T.group,children:[I.jsx(Qo,{"data-terms":"",link:(P=n.termsOfService)==null?void 0:P.link,icon:mF,title:(V=n.termsOfService)==null?void 0:V.title}),I.jsx(Qo,{"data-privacy":"",link:($=n.privacyPolicy)==null?void 0:$.link,icon:wF,title:(F=n.privacyPolicy)==null?void 0:F.title})]})]})]})},a1=j.memo(({...e})=>{const{typingIndicator:t}=yt;return I.jsx("div",{...e,...t==null?void 0:t.container,children:I.jsx("div",{...t==null?void 0:t.loader})})}),_p=j.memo(j.forwardRef(({direction:e,block:t,disableInput:n,children:r,sender:i,id:a,metadata:o,authorId:s,renderers:u,sendMessage:l,isReadOnly:c,...f},d)=>{var v,g,b;const[p,m]=j.useState([]),{message:h}=yt,y=Ky(s??"",15);return I.jsx(jx.Provider,{value:{isLoading:p,setIsLoading:m},children:I.jsxs("div",{...f,...h==null?void 0:h.container,"data-loaded":p.length===0,"data-disable-input":!!n,"data-direction":e,ref:d,children:[I.jsxs(xf,{"data-color":y,...(v=h==null?void 0:h.avatar)==null?void 0:v.container,children:[I.jsx(wf,{...(g=h==null?void 0:h.avatar)==null?void 0:g.image,src:i==null?void 0:i.avatar}),I.jsx(Sf,{...(b=h==null?void 0:h.avatar)==null?void 0:b.fallback,children:i==null?void 0:i.name[0]})]}),t&&I.jsx(ba,{block:{...t,direction:e,timestamp:f.timestamp,sender:i,messageId:a,sendMessage:l},direction:e,sendMessage:l,isReadOnly:c,sender:i,timestamp:f.timestamp,messageId:a,metadata:o,renderers:u}),r]})})}));function d3({botAvatar:e,botDescription:t,botName:n}){const{messageList:{marquee:r}}=yt;return I.jsxs("li",{...r.container,children:[I.jsx(El,{src:e,...r.avatar,children:(n||"Bot").slice(0,1)}),I.jsxs("div",{...r.content,children:[I.jsx("h1",{...r.title,children:n||"Bot"}),I.jsx("p",{...r.description,children:t})]})]})}function p3(e,t){try{var n=global,r=n.document;if(typeof r<"u"&&r.createElement&&r.head&&r.head.appendChild){var i=r.querySelector('html meta[name="'.concat(encodeURI(e),'"]'))||r.createElement("meta");i.setAttribute("name",e),i.setAttribute("content",t),r.head.appendChild(i)}}catch{}}function h3(){p3("react-scroll-to-bottom:version","4.2.0")}var es=function(e){return e&&e.Math===Math&&e},Lt=es(typeof globalThis=="object"&&globalThis)||es(typeof window=="object"&&window)||es(typeof self=="object"&&self)||es(typeof ht=="object"&&ht)||es(typeof ht=="object"&&ht)||function(){return this}()||Function("return this")(),Ft=function(e){try{return!!e()}catch{return!0}},m3=Ft,Au=!m3(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),v3=Au,o1=Function.prototype,s1=o1.apply,l1=o1.call,Ep=typeof Reflect=="object"&&Reflect.apply||(v3?l1.bind(s1):function(){return l1.apply(s1,arguments)}),u1=Au,c1=Function.prototype,kp=c1.call,y3=u1&&c1.bind.bind(kp,kp),Rt=u1?y3:function(e){return function(){return kp.apply(e,arguments)}},f1=Rt,g3=f1({}.toString),b3=f1("".slice),ji=function(e){return b3(g3(e),8,-1)},x3=ji,w3=Rt,Tp=function(e){if(x3(e)==="Function")return w3(e)},Op=typeof document=="object"&&document.all,nn=typeof Op>"u"&&Op!==void 0?function(e){return typeof e=="function"||e===Op}:function(e){return typeof e=="function"},ts={},S3=Ft,vn=!S3(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),_3=Au,Nu=Function.prototype.call,dr=_3?Nu.bind(Nu):function(){return Nu.apply(Nu,arguments)},Cp={},d1={}.propertyIsEnumerable,p1=Object.getOwnPropertyDescriptor,E3=p1&&!d1.call({1:2},1);Cp.f=E3?function(t){var n=p1(this,t);return!!n&&n.enumerable}:d1;var ns=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},k3=Rt,T3=Ft,O3=ji,$p=Object,C3=k3("".split),h1=T3(function(){return!$p("z").propertyIsEnumerable(0)})?function(e){return O3(e)==="String"?C3(e,""):$p(e)}:$p,Ip=function(e){return e==null},$3=Ip,I3=TypeError,Du=function(e){if($3(e))throw new I3("Can't call method on "+e);return e},R3=h1,P3=Du,pr=function(e){return R3(P3(e))},A3=nn,Kn=function(e){return typeof e=="object"?e!==null:A3(e)},Yt={},Rp=Yt,Pp=Lt,N3=nn,m1=function(e){return N3(e)?e:void 0},hr=function(e,t){return arguments.length<2?m1(Rp[e])||m1(Pp[e]):Rp[e]&&Rp[e][t]||Pp[e]&&Pp[e][t]},D3=Rt,Lr=D3({}.isPrototypeOf),M3=Lt,v1=M3.navigator,y1=v1&&v1.userAgent,Ap=y1?String(y1):"",g1=Lt,Np=Ap,b1=g1.process,x1=g1.Deno,w1=b1&&b1.versions||x1&&x1.version,S1=w1&&w1.v8,Gn,Mu;S1&&(Gn=S1.split("."),Mu=Gn[0]>0&&Gn[0]<4?1:+(Gn[0]+Gn[1])),!Mu&&Np&&(Gn=Np.match(/Edge\/(\d+)/),(!Gn||Gn[1]>=74)&&(Gn=Np.match(/Chrome\/(\d+)/),Gn&&(Mu=+Gn[1])));var Dp=Mu,_1=Dp,j3=Ft,L3=Lt,F3=L3.String,Ea=!!Object.getOwnPropertySymbols&&!j3(function(){var e=Symbol("symbol detection");return!F3(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&_1&&_1<41}),B3=Ea,E1=B3&&!Symbol.sham&&typeof Symbol.iterator=="symbol",U3=hr,z3=nn,q3=Lr,V3=E1,H3=Object,rs=V3?function(e){return typeof e=="symbol"}:function(e){var t=U3("Symbol");return z3(t)&&q3(t.prototype,H3(e))},W3=String,ju=function(e){try{return W3(e)}catch{return"Object"}},Z3=nn,K3=ju,G3=TypeError,Lu=function(e){if(Z3(e))return e;throw new G3(K3(e)+" is not a function")},Y3=Lu,J3=Ip,Mp=function(e,t){var n=e[t];return J3(n)?void 0:Y3(n)},jp=dr,Lp=nn,Fp=Kn,X3=TypeError,Q3=function(e,t){var n,r;if(t==="string"&&Lp(n=e.toString)&&!Fp(r=jp(n,e))||Lp(n=e.valueOf)&&!Fp(r=jp(n,e))||t!=="string"&&Lp(n=e.toString)&&!Fp(r=jp(n,e)))return r;throw new X3("Can't convert object to primitive value")},k1={exports:{}},T1=Lt,e4=Object.defineProperty,t4=function(e,t){try{e4(T1,e,{value:t,configurable:!0,writable:!0})}catch{T1[e]=t}return t},n4=Lt,r4=t4,O1="__core-js_shared__",C1=k1.exports=n4[O1]||r4(O1,{});(C1.versions||(C1.versions=[])).push({version:"3.38.1",mode:"pure",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Bp=k1.exports,$1=Bp,ka=function(e,t){return $1[e]||($1[e]=t||{})},i4=Du,a4=Object,Fr=function(e){return a4(i4(e))},o4=Rt,s4=Fr,l4=o4({}.hasOwnProperty),kn=Object.hasOwn||function(t,n){return l4(s4(t),n)},u4=Rt,c4=0,f4=Math.random(),d4=u4(1 .toString),Up=function(e){return"Symbol("+(e===void 0?"":e)+")_"+d4(++c4+f4,36)},p4=Lt,h4=ka,I1=kn,m4=Up,v4=Ea,y4=E1,Ta=p4.Symbol,zp=h4("wks"),g4=y4?Ta.for||Ta:Ta&&Ta.withoutSetter||m4,Ht=function(e){return I1(zp,e)||(zp[e]=v4&&I1(Ta,e)?Ta[e]:g4("Symbol."+e)),zp[e]},b4=dr,R1=Kn,P1=rs,x4=Mp,w4=Q3,S4=Ht,_4=TypeError,E4=S4("toPrimitive"),k4=function(e,t){if(!R1(e)||P1(e))return e;var n=x4(e,E4),r;if(n){if(t===void 0&&(t="default"),r=b4(n,e,t),!R1(r)||P1(r))return r;throw new _4("Can't convert object to primitive value")}return t===void 0&&(t="number"),w4(e,t)},T4=k4,O4=rs,qp=function(e){var t=T4(e,"string");return O4(t)?t:t+""},C4=Lt,A1=Kn,Vp=C4.document,$4=A1(Vp)&&A1(Vp.createElement),N1=function(e){return $4?Vp.createElement(e):{}},I4=vn,R4=Ft,P4=N1,D1=!I4&&!R4(function(){return Object.defineProperty(P4("div"),"a",{get:function(){return 7}}).a!==7}),A4=vn,N4=dr,D4=Cp,M4=ns,j4=pr,L4=qp,F4=kn,B4=D1,M1=Object.getOwnPropertyDescriptor;ts.f=A4?M1:function(t,n){if(t=j4(t),n=L4(n),B4)try{return M1(t,n)}catch{}if(F4(t,n))return M4(!N4(D4.f,t,n),t[n])};var U4=Ft,z4=nn,q4=/#|\.prototype\./,is=function(e,t){var n=H4[V4(e)];return n===Z4?!0:n===W4?!1:z4(t)?U4(t):!!t},V4=is.normalize=function(e){return String(e).replace(q4,".").toLowerCase()},H4=is.data={},W4=is.NATIVE="N",Z4=is.POLYFILL="P",K4=is,j1=Tp,G4=Lu,Y4=Au,J4=j1(j1.bind),Hp=function(e,t){return G4(e),t===void 0?e:Y4?J4(e,t):function(){return e.apply(t,arguments)}},Yn={},X4=vn,Q4=Ft,L1=X4&&Q4(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),eU=Kn,tU=String,nU=TypeError,ci=function(e){if(eU(e))return e;throw new nU(tU(e)+" is not an object")},rU=vn,iU=D1,aU=L1,Fu=ci,F1=qp,oU=TypeError,Wp=Object.defineProperty,sU=Object.getOwnPropertyDescriptor,Zp="enumerable",Kp="configurable",Gp="writable";Yn.f=rU?aU?function(t,n,r){if(Fu(t),n=F1(n),Fu(r),typeof t=="function"&&n==="prototype"&&"value"in r&&Gp in r&&!r[Gp]){var i=sU(t,n);i&&i[Gp]&&(t[n]=r.value,r={configurable:Kp in r?r[Kp]:i[Kp],enumerable:Zp in r?r[Zp]:i[Zp],writable:!1})}return Wp(t,n,r)}:Wp:function(t,n,r){if(Fu(t),n=F1(n),Fu(r),iU)try{return Wp(t,n,r)}catch{}if("get"in r||"set"in r)throw new oU("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var lU=vn,uU=Yn,cU=ns,Bu=lU?function(e,t,n){return uU.f(e,t,cU(1,n))}:function(e,t,n){return e[t]=n,e},as=Lt,fU=Ep,dU=Tp,pU=nn,hU=ts.f,mU=K4,Oa=Yt,vU=Hp,Ca=Bu,B1=kn,yU=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return fU(e,this,arguments)};return t.prototype=e.prototype,t},mt=function(e,t){var n=e.target,r=e.global,i=e.stat,a=e.proto,o=r?as:i?as[n]:as[n]&&as[n].prototype,s=r?Oa:Oa[n]||Ca(Oa,n,{})[n],u=s.prototype,l,c,f,d,p,m,h,y,v;for(d in t)l=mU(r?d:n+(i?".":"#")+d,e.forced),c=!l&&o&&B1(o,d),m=s[d],c&&(e.dontCallGetSet?(v=hU(o,d),h=v&&v.value):h=o[d]),p=c&&h?h:t[d],!(!l&&!a&&typeof m==typeof p)&&(e.bind&&c?y=vU(p,as):e.wrap&&c?y=yU(p):a&&pU(p)?y=dU(p):y=p,(e.sham||p&&p.sham||m&&m.sham)&&Ca(y,"sham",!0),Ca(s,d,y),a&&(f=n+"Prototype",B1(Oa,f)||Ca(Oa,f,{}),Ca(Oa[f],d,p),e.real&&u&&(l||!u[d])&&Ca(u,d,p)))},gU=ji,$a=Array.isArray||function(t){return gU(t)==="Array"},bU=mt,xU=$a;bU({target:"Array",stat:!0},{isArray:xU});var wU=Yt,SU=wU.Array.isArray,_U=SU,U1=_U,EU=U1,kU=EU,TU=kU,OU=TU,CU=OU;const z1=Ke(CU);function $U(e){if(z1(e))return e}var IU=Math.ceil,RU=Math.floor,PU=Math.trunc||function(t){var n=+t;return(n>0?RU:IU)(n)},AU=PU,Uu=function(e){var t=+e;return t!==t||t===0?0:AU(t)},NU=Uu,DU=Math.min,MU=function(e){var t=NU(e);return t>0?DU(t,9007199254740991):0},jU=MU,Li=function(e){return jU(e.length)},LU=TypeError,FU=9007199254740991,Yp=function(e){if(e>FU)throw LU("Maximum allowed index exceeded");return e},BU=vn,UU=Yn,zU=ns,os=function(e,t,n){BU?UU.f(e,t,zU(0,n)):e[t]=n},qU=Ht,VU=qU("toStringTag"),q1={};q1[VU]="z";var Jp=String(q1)==="[object z]",HU=Jp,WU=nn,zu=ji,ZU=Ht,KU=ZU("toStringTag"),GU=Object,YU=zu(function(){return arguments}())==="Arguments",JU=function(e,t){try{return e[t]}catch{}},ss=HU?zu:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=JU(t=GU(e),KU))=="string"?n:YU?zu(t):(r=zu(t))==="Object"&&WU(t.callee)?"Arguments":r},XU=Rt,QU=nn,Xp=Bp,ez=XU(Function.toString);QU(Xp.inspectSource)||(Xp.inspectSource=function(e){return ez(e)});var tz=Xp.inspectSource,nz=Rt,rz=Ft,V1=nn,iz=ss,az=hr,oz=tz,H1=function(){},W1=az("Reflect","construct"),Qp=/^\s*(?:class|function)\b/,sz=nz(Qp.exec),lz=!Qp.test(H1),ls=function(t){if(!V1(t))return!1;try{return W1(H1,[],t),!0}catch{return!1}},Z1=function(t){if(!V1(t))return!1;switch(iz(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return lz||!!sz(Qp,oz(t))}catch{return!0}};Z1.sham=!0;var eh=!W1||rz(function(){var e;return ls(ls.call)||!ls(Object)||!ls(function(){e=!0})||e})?Z1:ls,K1=$a,uz=eh,cz=Kn,fz=Ht,dz=fz("species"),G1=Array,pz=function(e){var t;return K1(e)&&(t=e.constructor,uz(t)&&(t===G1||K1(t.prototype))?t=void 0:cz(t)&&(t=t[dz],t===null&&(t=void 0))),t===void 0?G1:t},hz=pz,th=function(e,t){return new(hz(e))(t===0?0:t)},mz=Ft,vz=Ht,yz=Dp,gz=vz("species"),qu=function(e){return yz>=51||!mz(function(){var t=[],n=t.constructor={};return n[gz]=function(){return{foo:1}},t[e](Boolean).foo!==1})},bz=mt,xz=Ft,wz=$a,Sz=Kn,_z=Fr,Ez=Li,Y1=Yp,J1=os,kz=th,Tz=qu,Oz=Ht,Cz=Dp,X1=Oz("isConcatSpreadable"),$z=Cz>=51||!xz(function(){var e=[];return e[X1]=!1,e.concat()[0]!==e}),Iz=function(e){if(!Sz(e))return!1;var t=e[X1];return t!==void 0?!!t:wz(e)},Rz=!$z||!Tz("concat");bz({target:"Array",proto:!0,arity:1,forced:Rz},{concat:function(t){var n=_z(this),r=kz(n,0),i=0,a,o,s,u,l;for(a=-1,s=arguments.length;a<s;a++)if(l=a===-1?n:arguments[a],Iz(l))for(u=Ez(l),Y1(i+u),o=0;o<u;o++,i++)o in l&&J1(r,i,l[o]);else Y1(i+1),J1(r,i++,l);return r.length=i,r}});var Pz=ss,Az=String,us=function(e){if(Pz(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return Az(e)},Vu={},Nz=Uu,Dz=Math.max,Mz=Math.min,nh=function(e,t){var n=Nz(e);return n<0?Dz(n+t,0):Mz(n,t)},jz=pr,Lz=nh,Fz=Li,Q1=function(e){return function(t,n,r){var i=jz(t),a=Fz(i);if(a===0)return!e&&-1;var o=Lz(r,a),s;if(e&&n!==n){for(;a>o;)if(s=i[o++],s!==s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},eS={includes:Q1(!0),indexOf:Q1(!1)},Hu={},Bz=Rt,rh=kn,Uz=pr,zz=eS.indexOf,qz=Hu,tS=Bz([].push),nS=function(e,t){var n=Uz(e),r=0,i=[],a;for(a in n)!rh(qz,a)&&rh(n,a)&&tS(i,a);for(;t.length>r;)rh(n,a=t[r++])&&(~zz(i,a)||tS(i,a));return i},ih=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Vz=nS,Hz=ih,ah=Object.keys||function(t){return Vz(t,Hz)},Wz=vn,Zz=L1,Kz=Yn,Gz=ci,Yz=pr,Jz=ah;Vu.f=Wz&&!Zz?Object.defineProperties:function(t,n){Gz(t);for(var r=Yz(n),i=Jz(n),a=i.length,o=0,s;a>o;)Kz.f(t,s=i[o++],r[s]);return t};var Xz=hr,Qz=Xz("document","documentElement"),e6=ka,t6=Up,rS=e6("keys"),Wu=function(e){return rS[e]||(rS[e]=t6(e))},n6=ci,r6=Vu,iS=ih,i6=Hu,a6=Qz,o6=N1,s6=Wu,aS=">",oS="<",oh="prototype",sh="script",sS=s6("IE_PROTO"),lh=function(){},lS=function(e){return oS+sh+aS+e+oS+"/"+sh+aS},uS=function(e){e.write(lS("")),e.close();var t=e.parentWindow.Object;return e=null,t},l6=function(){var e=o6("iframe"),t="java"+sh+":",n;return e.style.display="none",a6.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(lS("document.F=Object")),n.close(),n.F},Zu,Ku=function(){try{Zu=new ActiveXObject("htmlfile")}catch{}Ku=typeof document<"u"?document.domain&&Zu?uS(Zu):l6():uS(Zu);for(var e=iS.length;e--;)delete Ku[oh][iS[e]];return Ku()};i6[sS]=!0;var uh=Object.create||function(t,n){var r;return t!==null?(lh[oh]=n6(t),r=new lh,lh[oh]=null,r[sS]=t):r=Ku(),n===void 0?r:r6.f(r,n)},Gu={},u6=nS,c6=ih,f6=c6.concat("length","prototype");Gu.f=Object.getOwnPropertyNames||function(t){return u6(t,f6)};var cS={},d6=Rt,Yu=d6([].slice),p6=ji,h6=pr,fS=Gu.f,m6=Yu,dS=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],v6=function(e){try{return fS(e)}catch{return m6(dS)}};cS.f=function(t){return dS&&p6(t)==="Window"?v6(t):fS(h6(t))};var Ju={};Ju.f=Object.getOwnPropertySymbols;var y6=Bu,Xu=function(e,t,n,r){return r&&r.enumerable?e[t]=n:y6(e,t,n),e},g6=Yn,b6=function(e,t,n){return g6.f(e,t,n)},cs={},x6=Ht;cs.f=x6;var pS=Yt,w6=kn,S6=cs,_6=Yn.f,St=function(e){var t=pS.Symbol||(pS.Symbol={});w6(t,e)||_6(t,e,{value:S6.f(e)})},E6=dr,k6=hr,T6=Ht,O6=Xu,hS=function(){var e=k6("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=T6("toPrimitive");t&&!t[r]&&O6(t,r,function(i){return E6(n,this)},{arity:1})},C6=Jp,$6=ss,I6=C6?{}.toString:function(){return"[object "+$6(this)+"]"},R6=Jp,P6=Yn.f,A6=Bu,N6=kn,D6=I6,M6=Ht,mS=M6("toStringTag"),Ia=function(e,t,n,r){var i=n?e:e&&e.prototype;i&&(N6(i,mS)||P6(i,mS,{configurable:!0,value:t}),r&&!R6&&A6(i,"toString",D6))},j6=Lt,L6=nn,vS=j6.WeakMap,F6=L6(vS)&&/native code/.test(String(vS)),B6=F6,yS=Lt,U6=Kn,z6=Bu,ch=kn,fh=Bp,q6=Wu,V6=Hu,gS="Object already initialized",dh=yS.TypeError,H6=yS.WeakMap,Qu,fs,ec,W6=function(e){return ec(e)?fs(e):Qu(e,{})},Z6=function(e){return function(t){var n;if(!U6(t)||(n=fs(t)).type!==e)throw new dh("Incompatible receiver, "+e+" required");return n}};if(B6||fh.state){var mr=fh.state||(fh.state=new H6);mr.get=mr.get,mr.has=mr.has,mr.set=mr.set,Qu=function(e,t){if(mr.has(e))throw new dh(gS);return t.facade=e,mr.set(e,t),t},fs=function(e){return mr.get(e)||{}},ec=function(e){return mr.has(e)}}else{var Ra=q6("state");V6[Ra]=!0,Qu=function(e,t){if(ch(e,Ra))throw new dh(gS);return t.facade=e,z6(e,Ra,t),t},fs=function(e){return ch(e,Ra)?e[Ra]:{}},ec=function(e){return ch(e,Ra)}}var ph={set:Qu,get:fs,has:ec,enforce:W6,getterFor:Z6},K6=Hp,G6=Rt,Y6=h1,J6=Fr,X6=Li,Q6=th,bS=G6([].push),fi=function(e){var t=e===1,n=e===2,r=e===3,i=e===4,a=e===6,o=e===7,s=e===5||a;return function(u,l,c,f){for(var d=J6(u),p=Y6(d),m=X6(p),h=K6(l,c),y=0,v=f||Q6,g=t?v(u,m):n||o?v(u,0):void 0,b,k;m>y;y++)if((s||y in p)&&(b=p[y],k=h(b,y,d),e))if(t)g[y]=k;else if(k)switch(e){case 3:return!0;case 5:return b;case 6:return y;case 2:bS(g,b)}else switch(e){case 4:return!1;case 7:bS(g,b)}return a?-1:r||i?i:g}},hh={forEach:fi(0),map:fi(1),filter:fi(2),some:fi(3),every:fi(4),find:fi(5),findIndex:fi(6),filterReject:fi(7)},tc=mt,ds=Lt,mh=dr,e7=Rt,Pa=vn,Aa=Ea,t7=Ft,Wt=kn,n7=Lr,vh=ci,nc=pr,yh=qp,r7=us,gh=ns,Na=uh,xS=ah,i7=Gu,wS=cS,a7=Ju,SS=ts,_S=Yn,o7=Vu,ES=Cp,kS=Xu,s7=b6,bh=ka,l7=Wu,TS=Hu,OS=Up,u7=Ht,c7=cs,f7=St,d7=hS,p7=Ia,CS=ph,rc=hh.forEach,yn=l7("hidden"),ic="Symbol",ps="prototype",h7=CS.set,$S=CS.getterFor(ic),Jn=Object[ps],Fi=ds.Symbol,hs=Fi&&Fi[ps],m7=ds.RangeError,v7=ds.TypeError,xh=ds.QObject,IS=SS.f,Bi=_S.f,RS=wS.f,y7=ES.f,PS=e7([].push),Br=bh("symbols"),ms=bh("op-symbols"),g7=bh("wks"),wh=!xh||!xh[ps]||!xh[ps].findChild,AS=function(e,t,n){var r=IS(Jn,t);r&&delete Jn[t],Bi(e,t,n),r&&e!==Jn&&Bi(Jn,t,r)},Sh=Pa&&t7(function(){return Na(Bi({},"a",{get:function(){return Bi(this,"a",{value:7}).a}})).a!==7})?AS:Bi,_h=function(e,t){var n=Br[e]=Na(hs);return h7(n,{type:ic,tag:e,description:t}),Pa||(n.description=t),n},ac=function(t,n,r){t===Jn&&ac(ms,n,r),vh(t);var i=yh(n);return vh(r),Wt(Br,i)?(r.enumerable?(Wt(t,yn)&&t[yn][i]&&(t[yn][i]=!1),r=Na(r,{enumerable:gh(0,!1)})):(Wt(t,yn)||Bi(t,yn,gh(1,Na(null))),t[yn][i]=!0),Sh(t,i,r)):Bi(t,i,r)},Eh=function(t,n){vh(t);var r=nc(n),i=xS(r).concat(jS(r));return rc(i,function(a){(!Pa||mh(NS,r,a))&&ac(t,a,r[a])}),t},b7=function(t,n){return n===void 0?Na(t):Eh(Na(t),n)},NS=function(t){var n=yh(t),r=mh(y7,this,n);return this===Jn&&Wt(Br,n)&&!Wt(ms,n)?!1:r||!Wt(this,n)||!Wt(Br,n)||Wt(this,yn)&&this[yn][n]?r:!0},DS=function(t,n){var r=nc(t),i=yh(n);if(!(r===Jn&&Wt(Br,i)&&!Wt(ms,i))){var a=IS(r,i);return a&&Wt(Br,i)&&!(Wt(r,yn)&&r[yn][i])&&(a.enumerable=!0),a}},MS=function(t){var n=RS(nc(t)),r=[];return rc(n,function(i){!Wt(Br,i)&&!Wt(TS,i)&&PS(r,i)}),r},jS=function(e){var t=e===Jn,n=RS(t?ms:nc(e)),r=[];return rc(n,function(i){Wt(Br,i)&&(!t||Wt(Jn,i))&&PS(r,Br[i])}),r};Aa||(Fi=function(){if(n7(hs,this))throw new v7("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:r7(arguments[0]),n=OS(t),r=function(i){var a=this===void 0?ds:this;a===Jn&&mh(r,ms,i),Wt(a,yn)&&Wt(a[yn],n)&&(a[yn][n]=!1);var o=gh(1,i);try{Sh(a,n,o)}catch(s){if(!(s instanceof m7))throw s;AS(a,n,o)}};return Pa&&wh&&Sh(Jn,n,{configurable:!0,set:r}),_h(n,t)},hs=Fi[ps],kS(hs,"toString",function(){return $S(this).tag}),kS(Fi,"withoutSetter",function(e){return _h(OS(e),e)}),ES.f=NS,_S.f=ac,o7.f=Eh,SS.f=DS,i7.f=wS.f=MS,a7.f=jS,c7.f=function(e){return _h(u7(e),e)},Pa&&s7(hs,"description",{configurable:!0,get:function(){return $S(this).description}})),tc({global:!0,constructor:!0,wrap:!0,forced:!Aa,sham:!Aa},{Symbol:Fi}),rc(xS(g7),function(e){f7(e)}),tc({target:ic,stat:!0,forced:!Aa},{useSetter:function(){wh=!0},useSimple:function(){wh=!1}}),tc({target:"Object",stat:!0,forced:!Aa,sham:!Pa},{create:b7,defineProperty:ac,defineProperties:Eh,getOwnPropertyDescriptor:DS}),tc({target:"Object",stat:!0,forced:!Aa},{getOwnPropertyNames:MS}),d7(),p7(Fi,ic),TS[yn]=!0;var x7=Ea,LS=x7&&!!Symbol.for&&!!Symbol.keyFor,w7=mt,S7=hr,_7=kn,E7=us,FS=ka,k7=LS,kh=FS("string-to-symbol-registry"),T7=FS("symbol-to-string-registry");w7({target:"Symbol",stat:!0,forced:!k7},{for:function(e){var t=E7(e);if(_7(kh,t))return kh[t];var n=S7("Symbol")(t);return kh[t]=n,T7[n]=t,n}});var O7=mt,C7=kn,$7=rs,I7=ju,R7=ka,P7=LS,BS=R7("symbol-to-string-registry");O7({target:"Symbol",stat:!0,forced:!P7},{keyFor:function(t){if(!$7(t))throw new TypeError(I7(t)+" is not a symbol");if(C7(BS,t))return BS[t]}});var A7=Rt,US=$a,N7=nn,zS=ji,D7=us,qS=A7([].push),M7=function(e){if(N7(e))return e;if(US(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];typeof i=="string"?qS(n,i):(typeof i=="number"||zS(i)==="Number"||zS(i)==="String")&&qS(n,D7(i))}var a=n.length,o=!0;return function(s,u){if(o)return o=!1,u;if(US(this))return u;for(var l=0;l<a;l++)if(n[l]===s)return u}}},j7=mt,VS=hr,HS=Ep,L7=dr,vs=Rt,WS=Ft,ZS=nn,KS=rs,GS=Yu,F7=M7,B7=Ea,U7=String,di=VS("JSON","stringify"),oc=vs(/./.exec),YS=vs("".charAt),z7=vs("".charCodeAt),q7=vs("".replace),V7=vs(1 .toString),H7=/[\uD800-\uDFFF]/g,JS=/^[\uD800-\uDBFF]$/,XS=/^[\uDC00-\uDFFF]$/,QS=!B7||WS(function(){var e=VS("Symbol")("stringify detection");return di([e])!=="[null]"||di({a:e})!=="{}"||di(Object(e))!=="{}"}),e_=WS(function(){return di("\uDF06\uD834")!=='"\\udf06\\ud834"'||di("\uDEAD")!=='"\\udead"'}),W7=function(e,t){var n=GS(arguments),r=F7(t);if(!(!ZS(r)&&(e===void 0||KS(e))))return n[1]=function(i,a){if(ZS(r)&&(a=L7(r,this,U7(i),a)),!KS(a))return a},HS(di,null,n)},Z7=function(e,t,n){var r=YS(n,t-1),i=YS(n,t+1);return oc(JS,e)&&!oc(XS,i)||oc(XS,e)&&!oc(JS,r)?"\\u"+V7(z7(e,0),16):e};di&&j7({target:"JSON",stat:!0,arity:3,forced:QS||e_},{stringify:function(t,n,r){var i=GS(arguments),a=HS(QS?W7:di,null,i);return e_&&typeof a=="string"?q7(a,H7,Z7):a}});var K7=mt,G7=Ea,Y7=Ft,t_=Ju,J7=Fr,X7=!G7||Y7(function(){t_.f(1)});K7({target:"Object",stat:!0,forced:X7},{getOwnPropertySymbols:function(t){var n=t_.f;return n?n(J7(t)):[]}});var Q7=St;Q7("asyncIterator");var e9=St;e9("hasInstance");var t9=St;t9("isConcatSpreadable");var n9=St;n9("iterator");var r9=St;r9("match");var i9=St;i9("matchAll");var a9=St;a9("replace");var o9=St;o9("search");var s9=St;s9("species");var l9=St;l9("split");var u9=St,c9=hS;u9("toPrimitive"),c9();var f9=hr,d9=St,p9=Ia;d9("toStringTag"),p9(f9("Symbol"),"Symbol");var h9=St;h9("unscopables");var m9=Lt,v9=Ia;v9(m9.JSON,"JSON",!0);var y9=Yt,g9=y9.Symbol,Da={},Th=vn,b9=kn,n_=Function.prototype,x9=Th&&Object.getOwnPropertyDescriptor,Oh=b9(n_,"name"),w9=Oh&&(function(){}).name==="something",S9=Oh&&(!Th||Th&&x9(n_,"name").configurable),_9={EXISTS:Oh,PROPER:w9,CONFIGURABLE:S9},E9=Ft,k9=!E9(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),T9=kn,O9=nn,C9=Fr,$9=Wu,I9=k9,r_=$9("IE_PROTO"),Ch=Object,R9=Ch.prototype,i_=I9?Ch.getPrototypeOf:function(e){var t=C9(e);if(T9(t,r_))return t[r_];var n=t.constructor;return O9(n)&&t instanceof n?n.prototype:t instanceof Ch?R9:null},P9=Ft,A9=nn,N9=Kn,D9=uh,a_=i_,M9=Xu,j9=Ht,$h=j9("iterator"),o_=!1,Ur,Ih,Rh;[].keys&&(Rh=[].keys(),"next"in Rh?(Ih=a_(a_(Rh)),Ih!==Object.prototype&&(Ur=Ih)):o_=!0);var L9=!N9(Ur)||P9(function(){var e={};return Ur[$h].call(e)!==e});L9?Ur={}:Ur=D9(Ur),A9(Ur[$h])||M9(Ur,$h,function(){return this});var s_={IteratorPrototype:Ur,BUGGY_SAFARI_ITERATORS:o_},F9=s_.IteratorPrototype,B9=uh,U9=ns,z9=Ia,q9=Da,V9=function(){return this},H9=function(e,t,n,r){var i=t+" Iterator";return e.prototype=B9(F9,{next:U9(+!r,n)}),z9(e,i,!1,!0),q9[i]=V9,e},W9=Rt,Z9=Lu,K9=function(e,t,n){try{return W9(Z9(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},G9=Kn,Y9=function(e){return G9(e)||e===null},J9=Y9,X9=String,Q9=TypeError,eq=function(e){if(J9(e))return e;throw new Q9("Can't set "+X9(e)+" as a prototype")},tq=K9,nq=Kn,rq=Du,iq=eq;Object.setPrototypeOf||"__proto__"in{}&&function(){var e=!1,t={},n;try{n=tq(Object.prototype,"__proto__","set"),n(t,[]),e=t instanceof Array}catch{}return function(i,a){return rq(i),iq(a),nq(i)&&(e?n(i,a):i.__proto__=a),i}}();var aq=mt,oq=dr,l_=_9,sq=H9,lq=i_,uq=Ia,u_=Xu,cq=Ht,c_=Da,f_=s_,fq=l_.PROPER;l_.CONFIGURABLE,f_.IteratorPrototype;var sc=f_.BUGGY_SAFARI_ITERATORS,Ph=cq("iterator"),d_="keys",lc="values",p_="entries",dq=function(){return this},h_=function(e,t,n,r,i,a,o){sq(n,t,r);var s=function(v){if(v===i&&d)return d;if(!sc&&v&&v in c)return c[v];switch(v){case d_:return function(){return new n(this,v)};case lc:return function(){return new n(this,v)};case p_:return function(){return new n(this,v)}}return function(){return new n(this)}},u=t+" Iterator",l=!1,c=e.prototype,f=c[Ph]||c["@@iterator"]||i&&c[i],d=!sc&&f||s(i),p=t==="Array"&&c.entries||f,m,h,y;if(p&&(m=lq(p.call(new e)),m!==Object.prototype&&m.next&&(uq(m,u,!0,!0),c_[u]=dq)),fq&&i===lc&&f&&f.name!==lc&&(l=!0,d=function(){return oq(f,this)}),i)if(h={values:s(lc),keys:a?d:s(d_),entries:s(p_)},o)for(y in h)(sc||l||!(y in c))&&u_(c,y,h[y]);else aq({target:t,proto:!0,forced:sc||l},h);return o&&c[Ph]!==d&&u_(c,Ph,d,{name:i}),c_[t]=d,h},m_=function(e,t){return{value:e,done:t}},pq=pr,v_=Da,y_=ph;Yn.f;var hq=h_,uc=m_,g_="Array Iterator",mq=y_.set,vq=y_.getterFor(g_);hq(Array,"Array",function(e,t){mq(this,{type:g_,target:pq(e),index:0,kind:t})},function(){var e=vq(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,uc(void 0,!0);switch(e.kind){case"keys":return uc(n,!1);case"values":return uc(t[n],!1)}return uc([n,t[n]],!1)},"values"),v_.Arguments=v_.Array;var yq={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},gq=yq,bq=Lt,xq=Ia,b_=Da;for(var Ah in gq)xq(bq[Ah],Ah),b_[Ah]=b_.Array;var wq=g9,Sq=wq,_q=Ht,Eq=Yn.f,x_=_q("metadata"),w_=Function.prototype;w_[x_]===void 0&&Eq(w_,x_,{value:null});var kq=St;kq("asyncDispose");var Tq=St;Tq("dispose");var Oq=St;Oq("metadata");var Cq=Sq,$q=Cq,Iq=hr,Rq=Rt,Nh=Iq("Symbol"),Pq=Nh.keyFor,Aq=Rq(Nh.prototype.valueOf),S_=Nh.isRegisteredSymbol||function(t){try{return Pq(Aq(t))!==void 0}catch{return!1}},Nq=mt,Dq=S_;Nq({target:"Symbol",stat:!0},{isRegisteredSymbol:Dq});for(var Mq=ka,__=hr,jq=Rt,Lq=rs,Fq=Ht,cc=__("Symbol"),E_=cc.isWellKnownSymbol,k_=__("Object","getOwnPropertyNames"),Bq=jq(cc.prototype.valueOf),T_=Mq("wks"),Dh=0,O_=k_(cc),Uq=O_.length;Dh<Uq;Dh++)try{var C_=O_[Dh];Lq(cc[C_])&&Fq(C_)}catch{}var $_=function(t){if(E_&&E_(t))return!0;try{for(var n=Bq(t),r=0,i=k_(T_),a=i.length;r<a;r++)if(T_[i[r]]==n)return!0}catch{}return!1},zq=mt,qq=$_;zq({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:qq});var Vq=St;Vq("customMatcher");var Hq=St;Hq("observable");var Wq=mt,Zq=S_;Wq({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:Zq});var Kq=mt,Gq=$_;Kq({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:Gq});var Yq=St;Yq("matcher");var Jq=St;Jq("metadataKey");var Xq=St;Xq("patternMatch");var Qq=St;Qq("replaceAll");var eV=$q,tV=eV,nV=tV;const Ma=Ke(nV);var Mh=Rt,rV=Uu,iV=us,aV=Du,oV=Mh("".charAt),I_=Mh("".charCodeAt),sV=Mh("".slice),R_=function(e){return function(t,n){var r=iV(aV(t)),i=rV(n),a=r.length,o,s;return i<0||i>=a?e?"":void 0:(o=I_(r,i),o<55296||o>56319||i+1===a||(s=I_(r,i+1))<56320||s>57343?e?oV(r,i):o:e?sV(r,i,i+2):(o-55296<<10)+(s-56320)+65536)}},lV={codeAt:R_(!1),charAt:R_(!0)},uV=lV.charAt,cV=us,P_=ph,fV=h_,A_=m_,N_="String Iterator",dV=P_.set,pV=P_.getterFor(N_);fV(String,"String",function(e){dV(this,{type:N_,string:cV(e),index:0})},function(){var t=pV(this),n=t.string,r=t.index,i;return r>=n.length?A_(void 0,!0):(i=uV(n,r),t.index+=i.length,A_(i,!1))});var hV=ss,D_=Mp,mV=Ip,vV=Da,yV=Ht,gV=yV("iterator"),jh=function(e){if(!mV(e))return D_(e,gV)||D_(e,"@@iterator")||vV[hV(e)]},bV=jh,xV=bV,wV=xV,SV=wV,_V=SV,EV=_V,kV=EV,TV=kV,OV=TV;const M_=Ke(OV);var CV=vn,$V=$a,IV=TypeError,RV=Object.getOwnPropertyDescriptor,PV=CV&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),j_=PV?function(e,t){if($V(e)&&!RV(e,"length").writable)throw new IV("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},AV=mt,NV=Fr,DV=Li,MV=j_,jV=Yp,LV=Ft,FV=LV(function(){return[].push.call({length:4294967296},1)!==4294967297}),BV=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},UV=FV||!BV();AV({target:"Array",proto:!0,arity:1,forced:UV},{push:function(t){var n=NV(this),r=DV(n),i=arguments.length;jV(r+i);for(var a=0;a<i;a++)n[r]=arguments[a],r++;return MV(n,r),r}});var zV=Lt,qV=Yt,Ui=function(e,t){var n=qV[e+"Prototype"],r=n&&n[t];if(r)return r;var i=zV[e],a=i&&i.prototype;return a&&a[t]},VV=Ui,HV=VV("Array","push"),WV=Lr,ZV=HV,Lh=Array.prototype,KV=function(e){var t=e.push;return e===Lh||WV(Lh,e)&&t===Lh.push?ZV:t},GV=KV,YV=GV,JV=YV,XV=JV,QV=XV,eH=QV,tH=eH;const nH=Ke(tH);function rH(e,t){var n=e==null?null:typeof Ma<"u"&&M_(e)||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(nH(s).call(s,r.value),s.length!==t);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}var iH=mt,L_=$a,aH=eh,oH=Kn,F_=nh,sH=Li,lH=pr,uH=os,cH=Ht,fH=qu,dH=Yu,pH=fH("slice"),hH=cH("species"),Fh=Array,mH=Math.max;iH({target:"Array",proto:!0,forced:!pH},{slice:function(t,n){var r=lH(this),i=sH(r),a=F_(t,i),o=F_(n===void 0?i:n,i),s,u,l;if(L_(r)&&(s=r.constructor,aH(s)&&(s===Fh||L_(s.prototype))?s=void 0:oH(s)&&(s=s[hH],s===null&&(s=void 0)),s===Fh||s===void 0))return dH(r,a,o);for(u=new(s===void 0?Fh:s)(mH(o-a,0)),l=0;a<o;a++,l++)a in r&&uH(u,l,r[a]);return u.length=l,u}});var vH=Ui,yH=vH("Array","slice"),gH=Lr,bH=yH,Bh=Array.prototype,xH=function(e){var t=e.slice;return e===Bh||gH(Bh,e)&&t===Bh.slice?bH:t},wH=xH,SH=wH,_H=SH,EH=_H,kH=EH,TH=kH,OH=TH;const CH=Ke(OH);var $H=dr,B_=ci,IH=Mp,RH=function(e,t,n){var r,i;B_(e);try{if(r=IH(e,"return"),!r){if(t==="throw")throw n;return n}r=$H(r,e)}catch(a){i=!0,r=a}if(t==="throw")throw n;if(i)throw r;return B_(r),n},PH=ci,AH=RH,NH=function(e,t,n,r){try{return r?t(PH(n)[0],n[1]):t(n)}catch(i){AH(e,"throw",i)}},DH=Ht,MH=Da,jH=DH("iterator"),LH=Array.prototype,FH=function(e){return e!==void 0&&(MH.Array===e||LH[jH]===e)},BH=dr,UH=Lu,zH=ci,qH=ju,VH=jh,HH=TypeError,WH=function(e,t){var n=arguments.length<2?VH(e):t;if(UH(n))return zH(BH(n,e));throw new HH(qH(e)+" is not iterable")},ZH=Hp,KH=dr,GH=Fr,YH=NH,JH=FH,XH=eh,QH=Li,U_=os,eW=WH,tW=jh,z_=Array,nW=function(t){var n=GH(t),r=XH(this),i=arguments.length,a=i>1?arguments[1]:void 0,o=a!==void 0;o&&(a=ZH(a,i>2?arguments[2]:void 0));var s=tW(n),u=0,l,c,f,d,p,m;if(s&&!(this===z_&&JH(s)))for(c=r?new this:[],d=eW(n,s),p=d.next;!(f=KH(p,d)).done;u++)m=o?YH(d,a,[f.value,u],!0):f.value,U_(c,u,m);else for(l=QH(n),c=r?new this(l):z_(l);l>u;u++)m=o?a(n[u],u):n[u],U_(c,u,m);return c.length=u,c},rW=Ht,q_=rW("iterator"),V_=!1;try{var iW=0,H_={next:function(){return{done:!!iW++}},return:function(){V_=!0}};H_[q_]=function(){return this},Array.from(H_,function(){throw 2})}catch{}var aW=function(e,t){try{if(!t&&!V_)return!1}catch{return!1}var n=!1;try{var r={};r[q_]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},oW=mt,sW=nW,lW=aW,uW=!lW(function(e){Array.from(e)});oW({target:"Array",stat:!0,forced:uW},{from:sW});var cW=Yt,fW=cW.Array.from,dW=fW,pW=dW,hW=pW,mW=hW,vW=mW,yW=vW,gW=yW;const W_=Ke(gW);function Uh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Z_(e,t){if(e){var n;if(typeof e=="string")return Uh(e,t);var r=CH(n={}.toString.call(e)).call(n,8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?W_(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Uh(e,t):void 0}}function bW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
318
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vr(e,t){return
|
|
317
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},o3="DialogDescriptionWarning",s3=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${e1(o3).contentName}}.`;return w.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},l3=z0,u3=V0,c3=W0,f3=Z0,d3=G0,t1=X0;function p3({title:e,titleId:t,...n},r){return w.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","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const n1=w.forwardRef(p3);function ui({open:e,onOpenChange:t,children:n}){return $.jsx(l3,{open:e,onOpenChange:t,children:n})}function h3({title:e,children:t}){var r,i,a,o,s,u,l,c;const{modal:n}=yt;return $.jsxs($.Fragment,{children:[$.jsx(c3,{...n==null?void 0:n.overlay}),$.jsx("div",{...n==null?void 0:n.container,children:$.jsxs(f3,{...(r=n==null?void 0:n.dialog)==null?void 0:r.container,children:[$.jsxs("div",{...(a=(i=n==null?void 0:n.dialog)==null?void 0:i.title)==null?void 0:a.container,children:[$.jsx(d3,{...(s=(o=n==null?void 0:n.dialog)==null?void 0:o.title)==null?void 0:s.text,children:e}),$.jsx(t1,{children:$.jsx(n1,{role:"button",tabIndex:0,...(l=(u=n==null?void 0:n.dialog)==null?void 0:u.title)==null?void 0:l.closeIcon})})]}),$.jsx("div",{...(c=n==null?void 0:n.dialog)==null?void 0:c.content,children:t})]})})]})}ui.Button=u3,ui.Close=t1,ui.Content=h3;const xp=({children:e,className:t,connected:n,...r})=>{const{container:{className:i}}=yt,a=Hl(s=>s.setMessageContainerRef),o=M.useRef(null);return M.useEffect(()=>{a(o)},[o]),$.jsxs("div",{...r,className:Xl(i,t),ref:o,children:[$.jsx(b2,{}),$.jsxs(c0,{children:[$.jsx(m3,{connected:n}),e]})]})},m3=({connected:e})=>{const{modal:t}=yt,{showModal:n}=zx();return M.useEffect(()=>{var r,i,a,o;e===!1&&n({title:"Connection Error",content:$.jsxs($.Fragment,{children:[$.jsx("p",{...(i=(r=t==null?void 0:t.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."}),$.jsx(ui.Close,{asChild:!0,children:$.jsx("button",{type:"button",...(o=(a=t==null?void 0:t.dialog)==null?void 0:a.newConversation)==null?void 0:o.button,onClick:()=>window.location.reload(),children:"Restart"})})]})})},[e]),$.jsx($.Fragment,{})};xp.displayName="Container";const r1=M.forwardRef(({children:e,onClick:t,...n},r)=>{const{fab:i}=yt,{container:a,icon:o}=i??{};return $.jsx("div",{...n,...a,ref:r,onClick:t,children:$.jsx("div",{...o})})});r1.displayName="Fab";var wp="Collapsible",[v3,_le]=h0(wp),[y3,Sp]=v3(wp),i1=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[u=!1,l]=m0({prop:r,defaultProp:i,onChange:o});return $.jsx(y3,{scope:n,disabled:a,contentId:Su(),open:u,onOpenToggle:w.useCallback(()=>l(c=>!c),[l]),children:$.jsx(Zn.div,{"data-state":Ep(u),"data-disabled":a?"":void 0,...s,ref:t})})});i1.displayName=wp;var a1="CollapsibleTrigger",o1=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=Sp(a1,n);return $.jsx(Zn.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Ep(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:jr(e.onClick,i.onOpenToggle)})});o1.displayName=a1;var _p="CollapsibleContent",s1=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Sp(_p,e.__scopeCollapsible);return $.jsx(_u,{present:n||i.open,children:({present:a})=>$.jsx(g3,{...r,ref:t,present:a})})});s1.displayName=_p;var g3=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...a}=e,o=Sp(_p,n),[s,u]=w.useState(r),l=w.useRef(null),c=si(t,l),f=w.useRef(0),d=f.current,p=w.useRef(0),h=p.current,m=o.open||s,y=w.useRef(m),v=w.useRef(void 0);return w.useEffect(()=>{const g=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(g)},[]),Qi(()=>{const g=l.current;if(g){v.current=v.current||{transitionDuration:g.style.transitionDuration,animationName:g.style.animationName},g.style.transitionDuration="0s",g.style.animationName="none";const b=g.getBoundingClientRect();f.current=b.height,p.current=b.width,y.current||(g.style.transitionDuration=v.current.transitionDuration,g.style.animationName=v.current.animationName),u(r)}},[o.open,r]),$.jsx(Zn.div,{"data-state":Ep(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!m,...a,ref:c,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style},children:m&&i})});function Ep(e){return e?"open":"closed"}var b3=i1,x3=s1;const l1=({onClick:e,...t})=>{var o,s;const{header:n,modal:r}=yt,{showModal:i}=zx(),a=u=>{var l,c,f,d;u.stopPropagation(),i({title:"Restart Conversation",content:$.jsxs($.Fragment,{children:[$.jsx("p",{...(c=(l=r==null?void 0:r.dialog)==null?void 0:l.newConversation)==null?void 0:c.text,children:"Are you sure you want to restart a new conversation?"}),$.jsx(ui.Close,{asChild:!0,children:$.jsx("button",{type:"button",...(d=(f=r==null?void 0:r.dialog)==null?void 0:f.newConversation)==null?void 0:d.button,onClick:e,children:"Restart"})})]})})};return $.jsx(OL,{...t,...(s=(o=n==null?void 0:n.content)==null?void 0:o.actions)==null?void 0:s.icons,role:"button",tabIndex:0,onClick:a,onKeyDown:u=>{u.key==="Enter"&&a(u)}})},w3=({onClick:e,...t})=>{const{header:n}=yt,r=i=>{i.stopPropagation(),e==null||e()};return $.jsx(n1,{...t,...n.content.actions.icons,role:"button",tabIndex:0,onClick:r,onKeyDown:i=>{i.key==="Enter"&&r(i)}})},Qo=({icon:e,title:t,link:n,...r})=>{var o,s,u,l,c,f,d,p,h,m,y,v;const{header:i}=yt,a=e??pF;return t?n?$.jsxs("a",{...r,...(s=(o=i.expandedContent)==null?void 0:o.descriptionItems)==null?void 0:s.container,href:n,target:"_blank",rel:"noreferrer noopener",children:[$.jsx(a,{...(l=(u=i.expandedContent)==null?void 0:u.descriptionItems)==null?void 0:l.icon}),$.jsx("p",{...(f=(c=i.expandedContent)==null?void 0:c.descriptionItems)==null?void 0:f.link,children:t})]}):$.jsxs("div",{...r,...(p=(d=i.expandedContent)==null?void 0:d.descriptionItems)==null?void 0:p.container,children:[$.jsx(a,{...(m=(h=i.expandedContent)==null?void 0:h.descriptionItems)==null?void 0:m.icon}),$.jsx("p",{...(v=(y=i.expandedContent)==null?void 0:y.descriptionItems)==null?void 0:v.text,children:t})]}):null},u1=({defaultOpen:e,closeWindow:t,configuration:n,restartConversation:r,...i})=>{var l,c,f,d,p,h,m,y,v,g,b,k,S,E,O,j,q,T,I,U,R,F;const{header:a}=yt,[o,s]=M.useState(!!e),u=!!((l=n.email)!=null&&l.title)||!!((c=n.phone)!=null&&c.title)||!!((f=n.website)!=null&&f.title)||!!((d=n.termsOfService)!=null&&d.link)||!!((p=n.privacyPolicy)!=null&&p.link);return $.jsxs(b3,{open:u?o:!1,onOpenChange:s,"data-disabled":u?void 0:"",...a.container,...i,children:[$.jsxs(o1,{...a.content.container,children:[$.jsx(El,{...i,src:n.botAvatar,...a.content.avatar,children:n.botName||"Bot"}),$.jsx("h2",{...a.content.title,children:n.botName||"Bot"}),n.botDescription&&$.jsx("p",{...a.content.description,children:n.botDescription}),$.jsxs("div",{...a.content.actions.container,children:[$.jsx(l1,{onClick:r}),t&&$.jsx(w3,{onClick:t})]})]}),$.jsxs(x3,{...a.expandedContent.container,children:[$.jsxs("div",{"data-links":"",...a.expandedContent.group,children:[$.jsx(Qo,{"data-email":"",icon:wF,title:(h=n.email)==null?void 0:h.title,link:(y=(m=n.email)==null?void 0:m.link)!=null&&y.startsWith("mailto:")?(v=n.email)==null?void 0:v.link:`mailto:${(g=n.email)==null?void 0:g.link}`}),$.jsx(Qo,{"data-phone":"",icon:OF,title:(b=n.phone)==null?void 0:b.title,link:(S=(k=n.phone)==null?void 0:k.link)!=null&&S.startsWith("tel:")?(E=n.phone)==null?void 0:E.link:`tel:${(O=n.phone)==null?void 0:O.link}`}),$.jsx(Qo,{"data-website":"",link:(j=n.website)==null?void 0:j.link,icon:_F,title:(q=n.website)==null?void 0:q.title})]}),$.jsxs("div",{"data-legal":"",...(T=a.expandedContent)==null?void 0:T.group,children:[$.jsx(Qo,{"data-terms":"",link:(I=n.termsOfService)==null?void 0:I.link,icon:bF,title:(U=n.termsOfService)==null?void 0:U.title}),$.jsx(Qo,{"data-privacy":"",link:(R=n.privacyPolicy)==null?void 0:R.link,icon:kF,title:(F=n.privacyPolicy)==null?void 0:F.title})]})]})]})},c1=M.memo(({...e})=>{const{typingIndicator:t}=yt;return $.jsx("div",{...e,...t==null?void 0:t.container,children:$.jsx("div",{...t==null?void 0:t.loader})})}),kp=M.memo(M.forwardRef(({direction:e,block:t,disableInput:n,children:r,sender:i,id:a,metadata:o,authorId:s,renderers:u,sendMessage:l,isReadOnly:c,...f},d)=>{var v,g,b;const[p,h]=M.useState([]),{message:m}=yt,y=Yy(s??"",15);return $.jsx(Bx.Provider,{value:{isLoading:p,setIsLoading:h},children:$.jsxs("div",{...f,...m==null?void 0:m.container,"data-loaded":p.length===0,"data-disable-input":!!n,"data-direction":e,ref:d,children:[$.jsxs(xf,{"data-color":y,...(v=m==null?void 0:m.avatar)==null?void 0:v.container,children:[$.jsx(wf,{...(g=m==null?void 0:m.avatar)==null?void 0:g.image,src:i==null?void 0:i.avatar}),$.jsx(Sf,{...(b=m==null?void 0:m.avatar)==null?void 0:b.fallback,children:i==null?void 0:i.name[0]})]}),t&&$.jsx(ba,{block:{...t,direction:e,timestamp:f.timestamp,sender:i,messageId:a,sendMessage:l},direction:e,sendMessage:l,isReadOnly:c,sender:i,timestamp:f.timestamp,messageId:a,metadata:o,renderers:u}),r]})})}));function S3({botAvatar:e,botDescription:t,botName:n}){const{messageList:{marquee:r}}=yt;return $.jsxs("li",{...r.container,children:[$.jsx(El,{src:e,...r.avatar,children:(n||"Bot").slice(0,1)}),$.jsxs("div",{...r.content,children:[$.jsx("h1",{...r.title,children:n||"Bot"}),$.jsx("p",{...r.description,children:t})]})]})}function _3(e,t){try{var n=global,r=n.document;if(typeof r<"u"&&r.createElement&&r.head&&r.head.appendChild){var i=r.querySelector('html meta[name="'.concat(encodeURI(e),'"]'))||r.createElement("meta");i.setAttribute("name",e),i.setAttribute("content",t),r.head.appendChild(i)}}catch{}}function E3(){_3("react-scroll-to-bottom:version","4.2.0")}var es=function(e){return e&&e.Math===Math&&e},Lt=es(typeof globalThis=="object"&&globalThis)||es(typeof window=="object"&&window)||es(typeof self=="object"&&self)||es(typeof ht=="object"&&ht)||es(typeof ht=="object"&&ht)||function(){return this}()||Function("return this")(),Ft=function(e){try{return!!e()}catch{return!0}},k3=Ft,Au=!k3(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),T3=Au,f1=Function.prototype,d1=f1.apply,p1=f1.call,Tp=typeof Reflect=="object"&&Reflect.apply||(T3?p1.bind(d1):function(){return p1.apply(d1,arguments)}),h1=Au,m1=Function.prototype,Op=m1.call,O3=h1&&m1.bind.bind(Op,Op),Rt=h1?O3:function(e){return function(){return Op.apply(e,arguments)}},v1=Rt,C3=v1({}.toString),$3=v1("".slice),ji=function(e){return $3(C3(e),8,-1)},I3=ji,R3=Rt,Cp=function(e){if(I3(e)==="Function")return R3(e)},$p=typeof document=="object"&&document.all,nn=typeof $p>"u"&&$p!==void 0?function(e){return typeof e=="function"||e===$p}:function(e){return typeof e=="function"},ts={},P3=Ft,mn=!P3(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),A3=Au,Nu=Function.prototype.call,dr=A3?Nu.bind(Nu):function(){return Nu.apply(Nu,arguments)},Ip={},y1={}.propertyIsEnumerable,g1=Object.getOwnPropertyDescriptor,N3=g1&&!y1.call({1:2},1);Ip.f=N3?function(t){var n=g1(this,t);return!!n&&n.enumerable}:y1;var ns=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},D3=Rt,M3=Ft,j3=ji,Rp=Object,L3=D3("".split),b1=M3(function(){return!Rp("z").propertyIsEnumerable(0)})?function(e){return j3(e)==="String"?L3(e,""):Rp(e)}:Rp,Pp=function(e){return e==null},F3=Pp,B3=TypeError,Du=function(e){if(F3(e))throw new B3("Can't call method on "+e);return e},U3=b1,z3=Du,pr=function(e){return U3(z3(e))},q3=nn,Kn=function(e){return typeof e=="object"?e!==null:q3(e)},Yt={},Ap=Yt,Np=Lt,V3=nn,x1=function(e){return V3(e)?e:void 0},hr=function(e,t){return arguments.length<2?x1(Ap[e])||x1(Np[e]):Ap[e]&&Ap[e][t]||Np[e]&&Np[e][t]},H3=Rt,Lr=H3({}.isPrototypeOf),W3=Lt,w1=W3.navigator,S1=w1&&w1.userAgent,Dp=S1?String(S1):"",_1=Lt,Mp=Dp,E1=_1.process,k1=_1.Deno,T1=E1&&E1.versions||k1&&k1.version,O1=T1&&T1.v8,Gn,Mu;O1&&(Gn=O1.split("."),Mu=Gn[0]>0&&Gn[0]<4?1:+(Gn[0]+Gn[1])),!Mu&&Mp&&(Gn=Mp.match(/Edge\/(\d+)/),(!Gn||Gn[1]>=74)&&(Gn=Mp.match(/Chrome\/(\d+)/),Gn&&(Mu=+Gn[1])));var jp=Mu,C1=jp,Z3=Ft,K3=Lt,G3=K3.String,Ea=!!Object.getOwnPropertySymbols&&!Z3(function(){var e=Symbol("symbol detection");return!G3(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&C1&&C1<41}),Y3=Ea,$1=Y3&&!Symbol.sham&&typeof Symbol.iterator=="symbol",J3=hr,X3=nn,Q3=Lr,e4=$1,t4=Object,rs=e4?function(e){return typeof e=="symbol"}:function(e){var t=J3("Symbol");return X3(t)&&Q3(t.prototype,t4(e))},n4=String,ju=function(e){try{return n4(e)}catch{return"Object"}},r4=nn,i4=ju,a4=TypeError,Lu=function(e){if(r4(e))return e;throw new a4(i4(e)+" is not a function")},o4=Lu,s4=Pp,Lp=function(e,t){var n=e[t];return s4(n)?void 0:o4(n)},Fp=dr,Bp=nn,Up=Kn,l4=TypeError,u4=function(e,t){var n,r;if(t==="string"&&Bp(n=e.toString)&&!Up(r=Fp(n,e))||Bp(n=e.valueOf)&&!Up(r=Fp(n,e))||t!=="string"&&Bp(n=e.toString)&&!Up(r=Fp(n,e)))return r;throw new l4("Can't convert object to primitive value")},I1={exports:{}},R1=Lt,c4=Object.defineProperty,f4=function(e,t){try{c4(R1,e,{value:t,configurable:!0,writable:!0})}catch{R1[e]=t}return t},d4=Lt,p4=f4,P1="__core-js_shared__",A1=I1.exports=d4[P1]||p4(P1,{});(A1.versions||(A1.versions=[])).push({version:"3.38.1",mode:"pure",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"});var zp=I1.exports,N1=zp,ka=function(e,t){return N1[e]||(N1[e]=t||{})},h4=Du,m4=Object,Fr=function(e){return m4(h4(e))},v4=Rt,y4=Fr,g4=v4({}.hasOwnProperty),En=Object.hasOwn||function(t,n){return g4(y4(t),n)},b4=Rt,x4=0,w4=Math.random(),S4=b4(1 .toString),qp=function(e){return"Symbol("+(e===void 0?"":e)+")_"+S4(++x4+w4,36)},_4=Lt,E4=ka,D1=En,k4=qp,T4=Ea,O4=$1,Ta=_4.Symbol,Vp=E4("wks"),C4=O4?Ta.for||Ta:Ta&&Ta.withoutSetter||k4,Ht=function(e){return D1(Vp,e)||(Vp[e]=T4&&D1(Ta,e)?Ta[e]:C4("Symbol."+e)),Vp[e]},$4=dr,M1=Kn,j1=rs,I4=Lp,R4=u4,P4=Ht,A4=TypeError,N4=P4("toPrimitive"),D4=function(e,t){if(!M1(e)||j1(e))return e;var n=I4(e,N4),r;if(n){if(t===void 0&&(t="default"),r=$4(n,e,t),!M1(r)||j1(r))return r;throw new A4("Can't convert object to primitive value")}return t===void 0&&(t="number"),R4(e,t)},M4=D4,j4=rs,Hp=function(e){var t=M4(e,"string");return j4(t)?t:t+""},L4=Lt,L1=Kn,Wp=L4.document,F4=L1(Wp)&&L1(Wp.createElement),F1=function(e){return F4?Wp.createElement(e):{}},B4=mn,U4=Ft,z4=F1,B1=!B4&&!U4(function(){return Object.defineProperty(z4("div"),"a",{get:function(){return 7}}).a!==7}),q4=mn,V4=dr,H4=Ip,W4=ns,Z4=pr,K4=Hp,G4=En,Y4=B1,U1=Object.getOwnPropertyDescriptor;ts.f=q4?U1:function(t,n){if(t=Z4(t),n=K4(n),Y4)try{return U1(t,n)}catch{}if(G4(t,n))return W4(!V4(H4.f,t,n),t[n])};var J4=Ft,X4=nn,Q4=/#|\.prototype\./,is=function(e,t){var n=tU[eU(e)];return n===rU?!0:n===nU?!1:X4(t)?J4(t):!!t},eU=is.normalize=function(e){return String(e).replace(Q4,".").toLowerCase()},tU=is.data={},nU=is.NATIVE="N",rU=is.POLYFILL="P",iU=is,z1=Cp,aU=Lu,oU=Au,sU=z1(z1.bind),Zp=function(e,t){return aU(e),t===void 0?e:oU?sU(e,t):function(){return e.apply(t,arguments)}},Yn={},lU=mn,uU=Ft,q1=lU&&uU(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),cU=Kn,fU=String,dU=TypeError,ci=function(e){if(cU(e))return e;throw new dU(fU(e)+" is not an object")},pU=mn,hU=B1,mU=q1,Fu=ci,V1=Hp,vU=TypeError,Kp=Object.defineProperty,yU=Object.getOwnPropertyDescriptor,Gp="enumerable",Yp="configurable",Jp="writable";Yn.f=pU?mU?function(t,n,r){if(Fu(t),n=V1(n),Fu(r),typeof t=="function"&&n==="prototype"&&"value"in r&&Jp in r&&!r[Jp]){var i=yU(t,n);i&&i[Jp]&&(t[n]=r.value,r={configurable:Yp in r?r[Yp]:i[Yp],enumerable:Gp in r?r[Gp]:i[Gp],writable:!1})}return Kp(t,n,r)}:Kp:function(t,n,r){if(Fu(t),n=V1(n),Fu(r),hU)try{return Kp(t,n,r)}catch{}if("get"in r||"set"in r)throw new vU("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var gU=mn,bU=Yn,xU=ns,Bu=gU?function(e,t,n){return bU.f(e,t,xU(1,n))}:function(e,t,n){return e[t]=n,e},as=Lt,wU=Tp,SU=Cp,_U=nn,EU=ts.f,kU=iU,Oa=Yt,TU=Zp,Ca=Bu,H1=En,OU=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return wU(e,this,arguments)};return t.prototype=e.prototype,t},mt=function(e,t){var n=e.target,r=e.global,i=e.stat,a=e.proto,o=r?as:i?as[n]:as[n]&&as[n].prototype,s=r?Oa:Oa[n]||Ca(Oa,n,{})[n],u=s.prototype,l,c,f,d,p,h,m,y,v;for(d in t)l=kU(r?d:n+(i?".":"#")+d,e.forced),c=!l&&o&&H1(o,d),h=s[d],c&&(e.dontCallGetSet?(v=EU(o,d),m=v&&v.value):m=o[d]),p=c&&m?m:t[d],!(!l&&!a&&typeof h==typeof p)&&(e.bind&&c?y=TU(p,as):e.wrap&&c?y=OU(p):a&&_U(p)?y=SU(p):y=p,(e.sham||p&&p.sham||h&&h.sham)&&Ca(y,"sham",!0),Ca(s,d,y),a&&(f=n+"Prototype",H1(Oa,f)||Ca(Oa,f,{}),Ca(Oa[f],d,p),e.real&&u&&(l||!u[d])&&Ca(u,d,p)))},CU=ji,$a=Array.isArray||function(t){return CU(t)==="Array"},$U=mt,IU=$a;$U({target:"Array",stat:!0},{isArray:IU});var RU=Yt,PU=RU.Array.isArray,AU=PU,W1=AU,NU=W1,DU=NU,MU=DU,jU=MU,LU=jU;const Z1=Ke(LU);function FU(e){if(Z1(e))return e}var BU=Math.ceil,UU=Math.floor,zU=Math.trunc||function(t){var n=+t;return(n>0?UU:BU)(n)},qU=zU,Uu=function(e){var t=+e;return t!==t||t===0?0:qU(t)},VU=Uu,HU=Math.min,WU=function(e){var t=VU(e);return t>0?HU(t,9007199254740991):0},ZU=WU,Li=function(e){return ZU(e.length)},KU=TypeError,GU=9007199254740991,Xp=function(e){if(e>GU)throw KU("Maximum allowed index exceeded");return e},YU=mn,JU=Yn,XU=ns,os=function(e,t,n){YU?JU.f(e,t,XU(0,n)):e[t]=n},QU=Ht,ez=QU("toStringTag"),K1={};K1[ez]="z";var Qp=String(K1)==="[object z]",tz=Qp,nz=nn,zu=ji,rz=Ht,iz=rz("toStringTag"),az=Object,oz=zu(function(){return arguments}())==="Arguments",sz=function(e,t){try{return e[t]}catch{}},ss=tz?zu:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=sz(t=az(e),iz))=="string"?n:oz?zu(t):(r=zu(t))==="Object"&&nz(t.callee)?"Arguments":r},lz=Rt,uz=nn,eh=zp,cz=lz(Function.toString);uz(eh.inspectSource)||(eh.inspectSource=function(e){return cz(e)});var fz=eh.inspectSource,dz=Rt,pz=Ft,G1=nn,hz=ss,mz=hr,vz=fz,Y1=function(){},J1=mz("Reflect","construct"),th=/^\s*(?:class|function)\b/,yz=dz(th.exec),gz=!th.test(Y1),ls=function(t){if(!G1(t))return!1;try{return J1(Y1,[],t),!0}catch{return!1}},X1=function(t){if(!G1(t))return!1;switch(hz(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return gz||!!yz(th,vz(t))}catch{return!0}};X1.sham=!0;var nh=!J1||pz(function(){var e;return ls(ls.call)||!ls(Object)||!ls(function(){e=!0})||e})?X1:ls,Q1=$a,bz=nh,xz=Kn,wz=Ht,Sz=wz("species"),eS=Array,_z=function(e){var t;return Q1(e)&&(t=e.constructor,bz(t)&&(t===eS||Q1(t.prototype))?t=void 0:xz(t)&&(t=t[Sz],t===null&&(t=void 0))),t===void 0?eS:t},Ez=_z,rh=function(e,t){return new(Ez(e))(t===0?0:t)},kz=Ft,Tz=Ht,Oz=jp,Cz=Tz("species"),qu=function(e){return Oz>=51||!kz(function(){var t=[],n=t.constructor={};return n[Cz]=function(){return{foo:1}},t[e](Boolean).foo!==1})},$z=mt,Iz=Ft,Rz=$a,Pz=Kn,Az=Fr,Nz=Li,tS=Xp,nS=os,Dz=rh,Mz=qu,jz=Ht,Lz=jp,rS=jz("isConcatSpreadable"),Fz=Lz>=51||!Iz(function(){var e=[];return e[rS]=!1,e.concat()[0]!==e}),Bz=function(e){if(!Pz(e))return!1;var t=e[rS];return t!==void 0?!!t:Rz(e)},Uz=!Fz||!Mz("concat");$z({target:"Array",proto:!0,arity:1,forced:Uz},{concat:function(t){var n=Az(this),r=Dz(n,0),i=0,a,o,s,u,l;for(a=-1,s=arguments.length;a<s;a++)if(l=a===-1?n:arguments[a],Bz(l))for(u=Nz(l),tS(i+u),o=0;o<u;o++,i++)o in l&&nS(r,i,l[o]);else tS(i+1),nS(r,i++,l);return r.length=i,r}});var zz=ss,qz=String,us=function(e){if(zz(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return qz(e)},Vu={},Vz=Uu,Hz=Math.max,Wz=Math.min,ih=function(e,t){var n=Vz(e);return n<0?Hz(n+t,0):Wz(n,t)},Zz=pr,Kz=ih,Gz=Li,iS=function(e){return function(t,n,r){var i=Zz(t),a=Gz(i);if(a===0)return!e&&-1;var o=Kz(r,a),s;if(e&&n!==n){for(;a>o;)if(s=i[o++],s!==s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},aS={includes:iS(!0),indexOf:iS(!1)},Hu={},Yz=Rt,ah=En,Jz=pr,Xz=aS.indexOf,Qz=Hu,oS=Yz([].push),sS=function(e,t){var n=Jz(e),r=0,i=[],a;for(a in n)!ah(Qz,a)&&ah(n,a)&&oS(i,a);for(;t.length>r;)ah(n,a=t[r++])&&(~Xz(i,a)||oS(i,a));return i},oh=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],e6=sS,t6=oh,sh=Object.keys||function(t){return e6(t,t6)},n6=mn,r6=q1,i6=Yn,a6=ci,o6=pr,s6=sh;Vu.f=n6&&!r6?Object.defineProperties:function(t,n){a6(t);for(var r=o6(n),i=s6(n),a=i.length,o=0,s;a>o;)i6.f(t,s=i[o++],r[s]);return t};var l6=hr,u6=l6("document","documentElement"),c6=ka,f6=qp,lS=c6("keys"),Wu=function(e){return lS[e]||(lS[e]=f6(e))},d6=ci,p6=Vu,uS=oh,h6=Hu,m6=u6,v6=F1,y6=Wu,cS=">",fS="<",lh="prototype",uh="script",dS=y6("IE_PROTO"),ch=function(){},pS=function(e){return fS+uh+cS+e+fS+"/"+uh+cS},hS=function(e){e.write(pS("")),e.close();var t=e.parentWindow.Object;return e=null,t},g6=function(){var e=v6("iframe"),t="java"+uh+":",n;return e.style.display="none",m6.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(pS("document.F=Object")),n.close(),n.F},Zu,Ku=function(){try{Zu=new ActiveXObject("htmlfile")}catch{}Ku=typeof document<"u"?document.domain&&Zu?hS(Zu):g6():hS(Zu);for(var e=uS.length;e--;)delete Ku[lh][uS[e]];return Ku()};h6[dS]=!0;var fh=Object.create||function(t,n){var r;return t!==null?(ch[lh]=d6(t),r=new ch,ch[lh]=null,r[dS]=t):r=Ku(),n===void 0?r:p6.f(r,n)},Gu={},b6=sS,x6=oh,w6=x6.concat("length","prototype");Gu.f=Object.getOwnPropertyNames||function(t){return b6(t,w6)};var mS={},S6=Rt,Yu=S6([].slice),_6=ji,E6=pr,vS=Gu.f,k6=Yu,yS=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],T6=function(e){try{return vS(e)}catch{return k6(yS)}};mS.f=function(t){return yS&&_6(t)==="Window"?T6(t):vS(E6(t))};var Ju={};Ju.f=Object.getOwnPropertySymbols;var O6=Bu,Xu=function(e,t,n,r){return r&&r.enumerable?e[t]=n:O6(e,t,n),e},C6=Yn,$6=function(e,t,n){return C6.f(e,t,n)},cs={},I6=Ht;cs.f=I6;var gS=Yt,R6=En,P6=cs,A6=Yn.f,St=function(e){var t=gS.Symbol||(gS.Symbol={});R6(t,e)||A6(t,e,{value:P6.f(e)})},N6=dr,D6=hr,M6=Ht,j6=Xu,bS=function(){var e=D6("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=M6("toPrimitive");t&&!t[r]&&j6(t,r,function(i){return N6(n,this)},{arity:1})},L6=Qp,F6=ss,B6=L6?{}.toString:function(){return"[object "+F6(this)+"]"},U6=Qp,z6=Yn.f,q6=Bu,V6=En,H6=B6,W6=Ht,xS=W6("toStringTag"),Ia=function(e,t,n,r){var i=n?e:e&&e.prototype;i&&(V6(i,xS)||z6(i,xS,{configurable:!0,value:t}),r&&!U6&&q6(i,"toString",H6))},Z6=Lt,K6=nn,wS=Z6.WeakMap,G6=K6(wS)&&/native code/.test(String(wS)),Y6=G6,SS=Lt,J6=Kn,X6=Bu,dh=En,ph=zp,Q6=Wu,e7=Hu,_S="Object already initialized",hh=SS.TypeError,t7=SS.WeakMap,Qu,fs,ec,n7=function(e){return ec(e)?fs(e):Qu(e,{})},r7=function(e){return function(t){var n;if(!J6(t)||(n=fs(t)).type!==e)throw new hh("Incompatible receiver, "+e+" required");return n}};if(Y6||ph.state){var mr=ph.state||(ph.state=new t7);mr.get=mr.get,mr.has=mr.has,mr.set=mr.set,Qu=function(e,t){if(mr.has(e))throw new hh(_S);return t.facade=e,mr.set(e,t),t},fs=function(e){return mr.get(e)||{}},ec=function(e){return mr.has(e)}}else{var Ra=Q6("state");e7[Ra]=!0,Qu=function(e,t){if(dh(e,Ra))throw new hh(_S);return t.facade=e,X6(e,Ra,t),t},fs=function(e){return dh(e,Ra)?e[Ra]:{}},ec=function(e){return dh(e,Ra)}}var mh={set:Qu,get:fs,has:ec,enforce:n7,getterFor:r7},i7=Zp,a7=Rt,o7=b1,s7=Fr,l7=Li,u7=rh,ES=a7([].push),fi=function(e){var t=e===1,n=e===2,r=e===3,i=e===4,a=e===6,o=e===7,s=e===5||a;return function(u,l,c,f){for(var d=s7(u),p=o7(d),h=l7(p),m=i7(l,c),y=0,v=f||u7,g=t?v(u,h):n||o?v(u,0):void 0,b,k;h>y;y++)if((s||y in p)&&(b=p[y],k=m(b,y,d),e))if(t)g[y]=k;else if(k)switch(e){case 3:return!0;case 5:return b;case 6:return y;case 2:ES(g,b)}else switch(e){case 4:return!1;case 7:ES(g,b)}return a?-1:r||i?i:g}},vh={forEach:fi(0),map:fi(1),filter:fi(2),some:fi(3),every:fi(4),find:fi(5),findIndex:fi(6),filterReject:fi(7)},tc=mt,ds=Lt,yh=dr,c7=Rt,Pa=mn,Aa=Ea,f7=Ft,Wt=En,d7=Lr,gh=ci,nc=pr,bh=Hp,p7=us,xh=ns,Na=fh,kS=sh,h7=Gu,TS=mS,m7=Ju,OS=ts,CS=Yn,v7=Vu,$S=Ip,IS=Xu,y7=$6,wh=ka,g7=Wu,RS=Hu,PS=qp,b7=Ht,x7=cs,w7=St,S7=bS,_7=Ia,AS=mh,rc=vh.forEach,vn=g7("hidden"),ic="Symbol",ps="prototype",E7=AS.set,NS=AS.getterFor(ic),Jn=Object[ps],Fi=ds.Symbol,hs=Fi&&Fi[ps],k7=ds.RangeError,T7=ds.TypeError,Sh=ds.QObject,DS=OS.f,Bi=CS.f,MS=TS.f,O7=$S.f,jS=c7([].push),Br=wh("symbols"),ms=wh("op-symbols"),C7=wh("wks"),_h=!Sh||!Sh[ps]||!Sh[ps].findChild,LS=function(e,t,n){var r=DS(Jn,t);r&&delete Jn[t],Bi(e,t,n),r&&e!==Jn&&Bi(Jn,t,r)},Eh=Pa&&f7(function(){return Na(Bi({},"a",{get:function(){return Bi(this,"a",{value:7}).a}})).a!==7})?LS:Bi,kh=function(e,t){var n=Br[e]=Na(hs);return E7(n,{type:ic,tag:e,description:t}),Pa||(n.description=t),n},ac=function(t,n,r){t===Jn&&ac(ms,n,r),gh(t);var i=bh(n);return gh(r),Wt(Br,i)?(r.enumerable?(Wt(t,vn)&&t[vn][i]&&(t[vn][i]=!1),r=Na(r,{enumerable:xh(0,!1)})):(Wt(t,vn)||Bi(t,vn,xh(1,Na(null))),t[vn][i]=!0),Eh(t,i,r)):Bi(t,i,r)},Th=function(t,n){gh(t);var r=nc(n),i=kS(r).concat(zS(r));return rc(i,function(a){(!Pa||yh(FS,r,a))&&ac(t,a,r[a])}),t},$7=function(t,n){return n===void 0?Na(t):Th(Na(t),n)},FS=function(t){var n=bh(t),r=yh(O7,this,n);return this===Jn&&Wt(Br,n)&&!Wt(ms,n)?!1:r||!Wt(this,n)||!Wt(Br,n)||Wt(this,vn)&&this[vn][n]?r:!0},BS=function(t,n){var r=nc(t),i=bh(n);if(!(r===Jn&&Wt(Br,i)&&!Wt(ms,i))){var a=DS(r,i);return a&&Wt(Br,i)&&!(Wt(r,vn)&&r[vn][i])&&(a.enumerable=!0),a}},US=function(t){var n=MS(nc(t)),r=[];return rc(n,function(i){!Wt(Br,i)&&!Wt(RS,i)&&jS(r,i)}),r},zS=function(e){var t=e===Jn,n=MS(t?ms:nc(e)),r=[];return rc(n,function(i){Wt(Br,i)&&(!t||Wt(Jn,i))&&jS(r,Br[i])}),r};Aa||(Fi=function(){if(d7(hs,this))throw new T7("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:p7(arguments[0]),n=PS(t),r=function(i){var a=this===void 0?ds:this;a===Jn&&yh(r,ms,i),Wt(a,vn)&&Wt(a[vn],n)&&(a[vn][n]=!1);var o=xh(1,i);try{Eh(a,n,o)}catch(s){if(!(s instanceof k7))throw s;LS(a,n,o)}};return Pa&&_h&&Eh(Jn,n,{configurable:!0,set:r}),kh(n,t)},hs=Fi[ps],IS(hs,"toString",function(){return NS(this).tag}),IS(Fi,"withoutSetter",function(e){return kh(PS(e),e)}),$S.f=FS,CS.f=ac,v7.f=Th,OS.f=BS,h7.f=TS.f=US,m7.f=zS,x7.f=function(e){return kh(b7(e),e)},Pa&&y7(hs,"description",{configurable:!0,get:function(){return NS(this).description}})),tc({global:!0,constructor:!0,wrap:!0,forced:!Aa,sham:!Aa},{Symbol:Fi}),rc(kS(C7),function(e){w7(e)}),tc({target:ic,stat:!0,forced:!Aa},{useSetter:function(){_h=!0},useSimple:function(){_h=!1}}),tc({target:"Object",stat:!0,forced:!Aa,sham:!Pa},{create:$7,defineProperty:ac,defineProperties:Th,getOwnPropertyDescriptor:BS}),tc({target:"Object",stat:!0,forced:!Aa},{getOwnPropertyNames:US}),S7(),_7(Fi,ic),RS[vn]=!0;var I7=Ea,qS=I7&&!!Symbol.for&&!!Symbol.keyFor,R7=mt,P7=hr,A7=En,N7=us,VS=ka,D7=qS,Oh=VS("string-to-symbol-registry"),M7=VS("symbol-to-string-registry");R7({target:"Symbol",stat:!0,forced:!D7},{for:function(e){var t=N7(e);if(A7(Oh,t))return Oh[t];var n=P7("Symbol")(t);return Oh[t]=n,M7[n]=t,n}});var j7=mt,L7=En,F7=rs,B7=ju,U7=ka,z7=qS,HS=U7("symbol-to-string-registry");j7({target:"Symbol",stat:!0,forced:!z7},{keyFor:function(t){if(!F7(t))throw new TypeError(B7(t)+" is not a symbol");if(L7(HS,t))return HS[t]}});var q7=Rt,WS=$a,V7=nn,ZS=ji,H7=us,KS=q7([].push),W7=function(e){if(V7(e))return e;if(WS(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];typeof i=="string"?KS(n,i):(typeof i=="number"||ZS(i)==="Number"||ZS(i)==="String")&&KS(n,H7(i))}var a=n.length,o=!0;return function(s,u){if(o)return o=!1,u;if(WS(this))return u;for(var l=0;l<a;l++)if(n[l]===s)return u}}},Z7=mt,GS=hr,YS=Tp,K7=dr,vs=Rt,JS=Ft,XS=nn,QS=rs,e_=Yu,G7=W7,Y7=Ea,J7=String,di=GS("JSON","stringify"),oc=vs(/./.exec),t_=vs("".charAt),X7=vs("".charCodeAt),Q7=vs("".replace),e9=vs(1 .toString),t9=/[\uD800-\uDFFF]/g,n_=/^[\uD800-\uDBFF]$/,r_=/^[\uDC00-\uDFFF]$/,i_=!Y7||JS(function(){var e=GS("Symbol")("stringify detection");return di([e])!=="[null]"||di({a:e})!=="{}"||di(Object(e))!=="{}"}),a_=JS(function(){return di("\uDF06\uD834")!=='"\\udf06\\ud834"'||di("\uDEAD")!=='"\\udead"'}),n9=function(e,t){var n=e_(arguments),r=G7(t);if(!(!XS(r)&&(e===void 0||QS(e))))return n[1]=function(i,a){if(XS(r)&&(a=K7(r,this,J7(i),a)),!QS(a))return a},YS(di,null,n)},r9=function(e,t,n){var r=t_(n,t-1),i=t_(n,t+1);return oc(n_,e)&&!oc(r_,i)||oc(r_,e)&&!oc(n_,r)?"\\u"+e9(X7(e,0),16):e};di&&Z7({target:"JSON",stat:!0,arity:3,forced:i_||a_},{stringify:function(t,n,r){var i=e_(arguments),a=YS(i_?n9:di,null,i);return a_&&typeof a=="string"?Q7(a,t9,r9):a}});var i9=mt,a9=Ea,o9=Ft,o_=Ju,s9=Fr,l9=!a9||o9(function(){o_.f(1)});i9({target:"Object",stat:!0,forced:l9},{getOwnPropertySymbols:function(t){var n=o_.f;return n?n(s9(t)):[]}});var u9=St;u9("asyncIterator");var c9=St;c9("hasInstance");var f9=St;f9("isConcatSpreadable");var d9=St;d9("iterator");var p9=St;p9("match");var h9=St;h9("matchAll");var m9=St;m9("replace");var v9=St;v9("search");var y9=St;y9("species");var g9=St;g9("split");var b9=St,x9=bS;b9("toPrimitive"),x9();var w9=hr,S9=St,_9=Ia;S9("toStringTag"),_9(w9("Symbol"),"Symbol");var E9=St;E9("unscopables");var k9=Lt,T9=Ia;T9(k9.JSON,"JSON",!0);var O9=Yt,C9=O9.Symbol,Da={},Ch=mn,$9=En,s_=Function.prototype,I9=Ch&&Object.getOwnPropertyDescriptor,$h=$9(s_,"name"),R9=$h&&(function(){}).name==="something",P9=$h&&(!Ch||Ch&&I9(s_,"name").configurable),A9={EXISTS:$h,PROPER:R9,CONFIGURABLE:P9},N9=Ft,D9=!N9(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),M9=En,j9=nn,L9=Fr,F9=Wu,B9=D9,l_=F9("IE_PROTO"),Ih=Object,U9=Ih.prototype,u_=B9?Ih.getPrototypeOf:function(e){var t=L9(e);if(M9(t,l_))return t[l_];var n=t.constructor;return j9(n)&&t instanceof n?n.prototype:t instanceof Ih?U9:null},z9=Ft,q9=nn,V9=Kn,H9=fh,c_=u_,W9=Xu,Z9=Ht,Rh=Z9("iterator"),f_=!1,Ur,Ph,Ah;[].keys&&(Ah=[].keys(),"next"in Ah?(Ph=c_(c_(Ah)),Ph!==Object.prototype&&(Ur=Ph)):f_=!0);var K9=!V9(Ur)||z9(function(){var e={};return Ur[Rh].call(e)!==e});K9?Ur={}:Ur=H9(Ur),q9(Ur[Rh])||W9(Ur,Rh,function(){return this});var d_={IteratorPrototype:Ur,BUGGY_SAFARI_ITERATORS:f_},G9=d_.IteratorPrototype,Y9=fh,J9=ns,X9=Ia,Q9=Da,eq=function(){return this},tq=function(e,t,n,r){var i=t+" Iterator";return e.prototype=Y9(G9,{next:J9(+!r,n)}),X9(e,i,!1,!0),Q9[i]=eq,e},nq=Rt,rq=Lu,iq=function(e,t,n){try{return nq(rq(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},aq=Kn,oq=function(e){return aq(e)||e===null},sq=oq,lq=String,uq=TypeError,cq=function(e){if(sq(e))return e;throw new uq("Can't set "+lq(e)+" as a prototype")},fq=iq,dq=Kn,pq=Du,hq=cq;Object.setPrototypeOf||"__proto__"in{}&&function(){var e=!1,t={},n;try{n=fq(Object.prototype,"__proto__","set"),n(t,[]),e=t instanceof Array}catch{}return function(i,a){return pq(i),hq(a),dq(i)&&(e?n(i,a):i.__proto__=a),i}}();var mq=mt,vq=dr,p_=A9,yq=tq,gq=u_,bq=Ia,h_=Xu,xq=Ht,m_=Da,v_=d_,wq=p_.PROPER;p_.CONFIGURABLE,v_.IteratorPrototype;var sc=v_.BUGGY_SAFARI_ITERATORS,Nh=xq("iterator"),y_="keys",lc="values",g_="entries",Sq=function(){return this},b_=function(e,t,n,r,i,a,o){yq(n,t,r);var s=function(v){if(v===i&&d)return d;if(!sc&&v&&v in c)return c[v];switch(v){case y_:return function(){return new n(this,v)};case lc:return function(){return new n(this,v)};case g_:return function(){return new n(this,v)}}return function(){return new n(this)}},u=t+" Iterator",l=!1,c=e.prototype,f=c[Nh]||c["@@iterator"]||i&&c[i],d=!sc&&f||s(i),p=t==="Array"&&c.entries||f,h,m,y;if(p&&(h=gq(p.call(new e)),h!==Object.prototype&&h.next&&(bq(h,u,!0,!0),m_[u]=Sq)),wq&&i===lc&&f&&f.name!==lc&&(l=!0,d=function(){return vq(f,this)}),i)if(m={values:s(lc),keys:a?d:s(y_),entries:s(g_)},o)for(y in m)(sc||l||!(y in c))&&h_(c,y,m[y]);else mq({target:t,proto:!0,forced:sc||l},m);return o&&c[Nh]!==d&&h_(c,Nh,d,{name:i}),m_[t]=d,m},x_=function(e,t){return{value:e,done:t}},_q=pr,w_=Da,S_=mh;Yn.f;var Eq=b_,uc=x_,__="Array Iterator",kq=S_.set,Tq=S_.getterFor(__);Eq(Array,"Array",function(e,t){kq(this,{type:__,target:_q(e),index:0,kind:t})},function(){var e=Tq(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,uc(void 0,!0);switch(e.kind){case"keys":return uc(n,!1);case"values":return uc(t[n],!1)}return uc([n,t[n]],!1)},"values"),w_.Arguments=w_.Array;var Oq={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Cq=Oq,$q=Lt,Iq=Ia,E_=Da;for(var Dh in Cq)Iq($q[Dh],Dh),E_[Dh]=E_.Array;var Rq=C9,Pq=Rq,Aq=Ht,Nq=Yn.f,k_=Aq("metadata"),T_=Function.prototype;T_[k_]===void 0&&Nq(T_,k_,{value:null});var Dq=St;Dq("asyncDispose");var Mq=St;Mq("dispose");var jq=St;jq("metadata");var Lq=Pq,Fq=Lq,Bq=hr,Uq=Rt,Mh=Bq("Symbol"),zq=Mh.keyFor,qq=Uq(Mh.prototype.valueOf),O_=Mh.isRegisteredSymbol||function(t){try{return zq(qq(t))!==void 0}catch{return!1}},Vq=mt,Hq=O_;Vq({target:"Symbol",stat:!0},{isRegisteredSymbol:Hq});for(var Wq=ka,C_=hr,Zq=Rt,Kq=rs,Gq=Ht,cc=C_("Symbol"),$_=cc.isWellKnownSymbol,I_=C_("Object","getOwnPropertyNames"),Yq=Zq(cc.prototype.valueOf),R_=Wq("wks"),jh=0,P_=I_(cc),Jq=P_.length;jh<Jq;jh++)try{var A_=P_[jh];Kq(cc[A_])&&Gq(A_)}catch{}var N_=function(t){if($_&&$_(t))return!0;try{for(var n=Yq(t),r=0,i=I_(R_),a=i.length;r<a;r++)if(R_[i[r]]==n)return!0}catch{}return!1},Xq=mt,Qq=N_;Xq({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:Qq});var eV=St;eV("customMatcher");var tV=St;tV("observable");var nV=mt,rV=O_;nV({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:rV});var iV=mt,aV=N_;iV({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:aV});var oV=St;oV("matcher");var sV=St;sV("metadataKey");var lV=St;lV("patternMatch");var uV=St;uV("replaceAll");var cV=Fq,fV=cV,dV=fV;const Ma=Ke(dV);var Lh=Rt,pV=Uu,hV=us,mV=Du,vV=Lh("".charAt),D_=Lh("".charCodeAt),yV=Lh("".slice),M_=function(e){return function(t,n){var r=hV(mV(t)),i=pV(n),a=r.length,o,s;return i<0||i>=a?e?"":void 0:(o=D_(r,i),o<55296||o>56319||i+1===a||(s=D_(r,i+1))<56320||s>57343?e?vV(r,i):o:e?yV(r,i,i+2):(o-55296<<10)+(s-56320)+65536)}},gV={codeAt:M_(!1),charAt:M_(!0)},bV=gV.charAt,xV=us,j_=mh,wV=b_,L_=x_,F_="String Iterator",SV=j_.set,_V=j_.getterFor(F_);wV(String,"String",function(e){SV(this,{type:F_,string:xV(e),index:0})},function(){var t=_V(this),n=t.string,r=t.index,i;return r>=n.length?L_(void 0,!0):(i=bV(n,r),t.index+=i.length,L_(i,!1))});var EV=ss,B_=Lp,kV=Pp,TV=Da,OV=Ht,CV=OV("iterator"),Fh=function(e){if(!kV(e))return B_(e,CV)||B_(e,"@@iterator")||TV[EV(e)]},$V=Fh,IV=$V,RV=IV,PV=RV,AV=PV,NV=AV,DV=NV,MV=DV,jV=MV;const U_=Ke(jV);var LV=mn,FV=$a,BV=TypeError,UV=Object.getOwnPropertyDescriptor,zV=LV&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),z_=zV?function(e,t){if(FV(e)&&!UV(e,"length").writable)throw new BV("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},qV=mt,VV=Fr,HV=Li,WV=z_,ZV=Xp,KV=Ft,GV=KV(function(){return[].push.call({length:4294967296},1)!==4294967297}),YV=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},JV=GV||!YV();qV({target:"Array",proto:!0,arity:1,forced:JV},{push:function(t){var n=VV(this),r=HV(n),i=arguments.length;ZV(r+i);for(var a=0;a<i;a++)n[r]=arguments[a],r++;return WV(n,r),r}});var XV=Lt,QV=Yt,Ui=function(e,t){var n=QV[e+"Prototype"],r=n&&n[t];if(r)return r;var i=XV[e],a=i&&i.prototype;return a&&a[t]},eH=Ui,tH=eH("Array","push"),nH=Lr,rH=tH,Bh=Array.prototype,iH=function(e){var t=e.push;return e===Bh||nH(Bh,e)&&t===Bh.push?rH:t},aH=iH,oH=aH,sH=oH,lH=sH,uH=lH,cH=uH,fH=cH;const dH=Ke(fH);function pH(e,t){var n=e==null?null:typeof Ma<"u"&&U_(e)||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(dH(s).call(s,r.value),s.length!==t);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}var hH=mt,q_=$a,mH=nh,vH=Kn,V_=ih,yH=Li,gH=pr,bH=os,xH=Ht,wH=qu,SH=Yu,_H=wH("slice"),EH=xH("species"),Uh=Array,kH=Math.max;hH({target:"Array",proto:!0,forced:!_H},{slice:function(t,n){var r=gH(this),i=yH(r),a=V_(t,i),o=V_(n===void 0?i:n,i),s,u,l;if(q_(r)&&(s=r.constructor,mH(s)&&(s===Uh||q_(s.prototype))?s=void 0:vH(s)&&(s=s[EH],s===null&&(s=void 0)),s===Uh||s===void 0))return SH(r,a,o);for(u=new(s===void 0?Uh:s)(kH(o-a,0)),l=0;a<o;a++,l++)a in r&&bH(u,l,r[a]);return u.length=l,u}});var TH=Ui,OH=TH("Array","slice"),CH=Lr,$H=OH,zh=Array.prototype,IH=function(e){var t=e.slice;return e===zh||CH(zh,e)&&t===zh.slice?$H:t},RH=IH,PH=RH,AH=PH,NH=AH,DH=NH,MH=DH,jH=MH;const LH=Ke(jH);var FH=dr,H_=ci,BH=Lp,UH=function(e,t,n){var r,i;H_(e);try{if(r=BH(e,"return"),!r){if(t==="throw")throw n;return n}r=FH(r,e)}catch(a){i=!0,r=a}if(t==="throw")throw n;if(i)throw r;return H_(r),n},zH=ci,qH=UH,VH=function(e,t,n,r){try{return r?t(zH(n)[0],n[1]):t(n)}catch(i){qH(e,"throw",i)}},HH=Ht,WH=Da,ZH=HH("iterator"),KH=Array.prototype,GH=function(e){return e!==void 0&&(WH.Array===e||KH[ZH]===e)},YH=dr,JH=Lu,XH=ci,QH=ju,eW=Fh,tW=TypeError,nW=function(e,t){var n=arguments.length<2?eW(e):t;if(JH(n))return XH(YH(n,e));throw new tW(QH(e)+" is not iterable")},rW=Zp,iW=dr,aW=Fr,oW=VH,sW=GH,lW=nh,uW=Li,W_=os,cW=nW,fW=Fh,Z_=Array,dW=function(t){var n=aW(t),r=lW(this),i=arguments.length,a=i>1?arguments[1]:void 0,o=a!==void 0;o&&(a=rW(a,i>2?arguments[2]:void 0));var s=fW(n),u=0,l,c,f,d,p,h;if(s&&!(this===Z_&&sW(s)))for(c=r?new this:[],d=cW(n,s),p=d.next;!(f=iW(p,d)).done;u++)h=o?oW(d,a,[f.value,u],!0):f.value,W_(c,u,h);else for(l=uW(n),c=r?new this(l):Z_(l);l>u;u++)h=o?a(n[u],u):n[u],W_(c,u,h);return c.length=u,c},pW=Ht,K_=pW("iterator"),G_=!1;try{var hW=0,Y_={next:function(){return{done:!!hW++}},return:function(){G_=!0}};Y_[K_]=function(){return this},Array.from(Y_,function(){throw 2})}catch{}var mW=function(e,t){try{if(!t&&!G_)return!1}catch{return!1}var n=!1;try{var r={};r[K_]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},vW=mt,yW=dW,gW=mW,bW=!gW(function(e){Array.from(e)});vW({target:"Array",stat:!0,forced:bW},{from:yW});var xW=Yt,wW=xW.Array.from,SW=wW,_W=SW,EW=_W,kW=EW,TW=kW,OW=TW,CW=OW;const J_=Ke(CW);function qh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function X_(e,t){if(e){var n;if(typeof e=="string")return qh(e,t);var r=LH(n={}.toString.call(e)).call(n,8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?J_(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?qh(e,t):void 0}}function $W(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
318
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vr(e,t){return FU(e)||pH(e,t)||X_(e,t)||$W()}var Q_={exports:{}};/*!
|
|
319
319
|
Copyright (c) 2018 Jed Watson.
|
|
320
320
|
Licensed under the MIT License (MIT), see
|
|
321
321
|
http://jedwatson.github.io/classnames
|
|
322
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var a=arguments[i];if(a){var o=typeof a;if(o==="string"||o==="number")r.push(a);else if(Array.isArray(a)){if(a.length){var s=n.apply(null,a);s&&r.push(s)}}else if(o==="object")if(a.toString===Object.prototype.toString)for(var u in a)t.call(a,u)&&a[u]&&r.push(u);else r.push(a.toString())}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(
|
|
322
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var a=arguments[i];if(a){var o=typeof a;if(o==="string"||o==="number")r.push(a);else if(Array.isArray(a)){if(a.length){var s=n.apply(null,a);s&&r.push(s)}}else if(o==="object")if(a.toString===Object.prototype.toString)for(var u in a)t.call(a,u)&&a[u]&&r.push(u);else r.push(a.toString())}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Q_);var IW=Q_.exports;const Vh=Ke(IW);var Hh={exports:{}},fc={exports:{}},ut={};/** @license React v16.13.1
|
|
323
323
|
* react-is.production.min.js
|
|
324
324
|
*
|
|
325
325
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
326
326
|
*
|
|
327
327
|
* This source code is licensed under the MIT license found in the
|
|
328
328
|
* LICENSE file in the root directory of this source tree.
|
|
329
|
-
*/var
|
|
329
|
+
*/var eE;function RW(){if(eE)return ut;eE=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function b(S){if(typeof S=="object"&&S!==null){var E=S.$$typeof;switch(E){case t:switch(S=S.type,S){case u:case l:case r:case a:case i:case f:return S;default:switch(S=S&&S.$$typeof,S){case s:case c:case h:case p:case o:return S;default:return E}}case n:return E}}}function k(S){return b(S)===l}return ut.AsyncMode=u,ut.ConcurrentMode=l,ut.ContextConsumer=s,ut.ContextProvider=o,ut.Element=t,ut.ForwardRef=c,ut.Fragment=r,ut.Lazy=h,ut.Memo=p,ut.Portal=n,ut.Profiler=a,ut.StrictMode=i,ut.Suspense=f,ut.isAsyncMode=function(S){return k(S)||b(S)===u},ut.isConcurrentMode=k,ut.isContextConsumer=function(S){return b(S)===s},ut.isContextProvider=function(S){return b(S)===o},ut.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},ut.isForwardRef=function(S){return b(S)===c},ut.isFragment=function(S){return b(S)===r},ut.isLazy=function(S){return b(S)===h},ut.isMemo=function(S){return b(S)===p},ut.isPortal=function(S){return b(S)===n},ut.isProfiler=function(S){return b(S)===a},ut.isStrictMode=function(S){return b(S)===i},ut.isSuspense=function(S){return b(S)===f},ut.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===l||S===a||S===i||S===f||S===d||typeof S=="object"&&S!==null&&(S.$$typeof===h||S.$$typeof===p||S.$$typeof===o||S.$$typeof===s||S.$$typeof===c||S.$$typeof===y||S.$$typeof===v||S.$$typeof===g||S.$$typeof===m)},ut.typeOf=b,ut}var ct={};/** @license React v16.13.1
|
|
330
330
|
* react-is.development.js
|
|
331
331
|
*
|
|
332
332
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
333
333
|
*
|
|
334
334
|
* This source code is licensed under the MIT license found in the
|
|
335
335
|
* LICENSE file in the root directory of this source tree.
|
|
336
|
-
*/var
|
|
336
|
+
*/var tE;function PW(){return tE||(tE=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function b(Z){return typeof Z=="string"||typeof Z=="function"||Z===r||Z===l||Z===a||Z===i||Z===f||Z===d||typeof Z=="object"&&Z!==null&&(Z.$$typeof===h||Z.$$typeof===p||Z.$$typeof===o||Z.$$typeof===s||Z.$$typeof===c||Z.$$typeof===y||Z.$$typeof===v||Z.$$typeof===g||Z.$$typeof===m)}function k(Z){if(typeof Z=="object"&&Z!==null){var de=Z.$$typeof;switch(de){case t:var ve=Z.type;switch(ve){case u:case l:case r:case a:case i:case f:return ve;default:var $e=ve&&ve.$$typeof;switch($e){case s:case c:case h:case p:case o:return $e;default:return de}}case n:return de}}}var S=u,E=l,O=s,j=o,q=t,T=c,I=r,U=h,R=p,F=n,N=a,L=i,W=f,z=!1;function A(Z){return z||(z=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),x(Z)||k(Z)===u}function x(Z){return k(Z)===l}function V(Z){return k(Z)===s}function K(Z){return k(Z)===o}function _(Z){return typeof Z=="object"&&Z!==null&&Z.$$typeof===t}function J(Z){return k(Z)===c}function ne(Z){return k(Z)===r}function re(Z){return k(Z)===h}function le(Z){return k(Z)===p}function pe(Z){return k(Z)===n}function he(Z){return k(Z)===a}function ue(Z){return k(Z)===i}function Q(Z){return k(Z)===f}ct.AsyncMode=S,ct.ConcurrentMode=E,ct.ContextConsumer=O,ct.ContextProvider=j,ct.Element=q,ct.ForwardRef=T,ct.Fragment=I,ct.Lazy=U,ct.Memo=R,ct.Portal=F,ct.Profiler=N,ct.StrictMode=L,ct.Suspense=W,ct.isAsyncMode=A,ct.isConcurrentMode=x,ct.isContextConsumer=V,ct.isContextProvider=K,ct.isElement=_,ct.isForwardRef=J,ct.isFragment=ne,ct.isLazy=re,ct.isMemo=le,ct.isPortal=pe,ct.isProfiler=he,ct.isStrictMode=ue,ct.isSuspense=Q,ct.isValidElementType=b,ct.typeOf=k}()),ct}var nE;function rE(){return nE||(nE=1,process.env.NODE_ENV==="production"?fc.exports=RW():fc.exports=PW()),fc.exports}/*
|
|
337
337
|
object-assign
|
|
338
338
|
(c) Sindre Sorhus
|
|
339
339
|
@license MIT
|
|
340
|
-
*/var
|
|
341
|
-
Valid keys: `+JSON.stringify(Object.keys(
|
|
342
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qe(e){return y8(e)||g8(e)||Z_(e)||b8()}var pc=function(e){return e&&e.Math==Math&&e},Tn=pc(typeof globalThis=="object"&&globalThis)||pc(typeof window=="object"&&window)||pc(typeof self=="object"&&self)||pc(typeof ht=="object"&&ht)||function(){return this}()||Function("return this")(),nm={},Xn=function(e){try{return!!e()}catch{return!0}},x8=Xn,zi=!x8(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),uE={},cE={}.propertyIsEnumerable,fE=Object.getOwnPropertyDescriptor,w8=fE&&!cE.call({1:2},1);uE.f=w8?function(t){var n=fE(this,t);return!!n&&n.enumerable}:cE;var dE=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},S8={}.toString,rm=function(e){return S8.call(e).slice(8,-1)},_8=Xn,E8=rm,k8="".split,T8=_8(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return E8(e)=="String"?k8.call(e,""):Object(e)}:Object,hc=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},O8=T8,C8=hc,im=function(e){return O8(C8(e))},jn=function(e){return typeof e=="function"},$8=jn,gs=function(e){return typeof e=="object"?e!==null:$8(e)},am=Tn,I8=jn,R8=function(e){return I8(e)?e:void 0},mc=function(e,t){return arguments.length<2?R8(am[e]):am[e]&&am[e][t]},P8=mc,A8=P8("navigator","userAgent")||"",pE=Tn,om=A8,hE=pE.process,mE=pE.Deno,vE=hE&&hE.versions||mE&&mE.version,yE=vE&&vE.v8,yr,vc;yE?(yr=yE.split("."),vc=yr[0]<4?1:yr[0]+yr[1]):om&&(yr=om.match(/Edge\/(\d+)/),(!yr||yr[1]>=74)&&(yr=om.match(/Chrome\/(\d+)/),yr&&(vc=yr[1])));var N8=vc&&+vc,gE=N8,D8=Xn,bE=!!Object.getOwnPropertySymbols&&!D8(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&gE&&gE<41}),M8=bE,xE=M8&&!Symbol.sham&&typeof Symbol.iterator=="symbol",j8=jn,L8=mc,F8=xE,wE=F8?function(e){return typeof e=="symbol"}:function(e){var t=L8("Symbol");return j8(t)&&Object(e)instanceof t},B8=function(e){try{return String(e)}catch{return"Object"}},U8=jn,z8=B8,q8=function(e){if(U8(e))return e;throw TypeError(z8(e)+" is not a function")},V8=q8,SE=function(e,t){var n=e[t];return n==null?void 0:V8(n)},sm=jn,lm=gs,H8=function(e,t){var n,r;if(t==="string"&&sm(n=e.toString)&&!lm(r=n.call(e))||sm(n=e.valueOf)&&!lm(r=n.call(e))||t!=="string"&&sm(n=e.toString)&&!lm(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},_E={exports:{}},EE=Tn,um=function(e,t){try{Object.defineProperty(EE,e,{value:t,configurable:!0,writable:!0})}catch{EE[e]=t}return t},W8=Tn,Z8=um,kE="__core-js_shared__",K8=W8[kE]||Z8(kE,{}),cm=K8,TE=cm;(_E.exports=function(e,t){return TE[e]||(TE[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var fm=_E.exports,G8=hc,OE=function(e){return Object(G8(e))},Y8=OE,J8={}.hasOwnProperty,qi=Object.hasOwn||function(t,n){return J8.call(Y8(t),n)},X8=0,Q8=Math.random(),CE=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++X8+Q8).toString(36)},eZ=Tn,tZ=fm,$E=qi,nZ=CE,IE=bE,rZ=xE,bs=tZ("wks"),xs=eZ.Symbol,iZ=rZ?xs:xs&&xs.withoutSetter||nZ,ws=function(e){return(!$E(bs,e)||!(IE||typeof bs[e]=="string"))&&(IE&&$E(xs,e)?bs[e]=xs[e]:bs[e]=iZ("Symbol."+e)),bs[e]},RE=gs,PE=wE,aZ=SE,oZ=H8,sZ=ws,lZ=sZ("toPrimitive"),uZ=function(e,t){if(!RE(e)||PE(e))return e;var n=aZ(e,lZ),r;if(n){if(t===void 0&&(t="default"),r=n.call(e,t),!RE(r)||PE(r))return r;throw TypeError("Can't convert object to primitive value")}return t===void 0&&(t="number"),oZ(e,t)},cZ=uZ,fZ=wE,AE=function(e){var t=cZ(e,"string");return fZ(t)?t:String(t)},dZ=Tn,NE=gs,dm=dZ.document,pZ=NE(dm)&&NE(dm.createElement),DE=function(e){return pZ?dm.createElement(e):{}},hZ=zi,mZ=Xn,vZ=DE,ME=!hZ&&!mZ(function(){return Object.defineProperty(vZ("div"),"a",{get:function(){return 7}}).a!=7}),yZ=zi,gZ=uE,bZ=dE,xZ=im,wZ=AE,SZ=qi,_Z=ME,jE=Object.getOwnPropertyDescriptor;nm.f=yZ?jE:function(t,n){if(t=xZ(t),n=wZ(n),_Z)try{return jE(t,n)}catch{}if(SZ(t,n))return bZ(!gZ.f.call(t,n),t[n])};var Ss={},EZ=gs,pi=function(e){if(EZ(e))return e;throw TypeError(String(e)+" is not an object")},kZ=zi,TZ=ME,LE=pi,OZ=AE,FE=Object.defineProperty;Ss.f=kZ?FE:function(t,n,r){if(LE(t),n=OZ(n),LE(r),TZ)try{return FE(t,n,r)}catch{}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var CZ=zi,$Z=Ss,IZ=dE,yc=CZ?function(e,t,n){return $Z.f(e,t,IZ(1,n))}:function(e,t,n){return e[t]=n,e},BE={exports:{}},RZ=jn,pm=cm,PZ=Function.toString;RZ(pm.inspectSource)||(pm.inspectSource=function(e){return PZ.call(e)});var UE=pm.inspectSource,AZ=Tn,NZ=jn,DZ=UE,zE=AZ.WeakMap,MZ=NZ(zE)&&/native code/.test(DZ(zE)),jZ=fm,LZ=CE,qE=jZ("keys"),VE=function(e){return qE[e]||(qE[e]=LZ(e))},hm={},FZ=MZ,BZ=Tn,UZ=gs,zZ=yc,mm=qi,vm=cm,qZ=VE,VZ=hm,HE="Object already initialized",HZ=BZ.WeakMap,gc,_s,bc,WZ=function(e){return bc(e)?_s(e):gc(e,{})},ZZ=function(e){return function(t){var n;if(!UZ(t)||(n=_s(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}};if(FZ||vm.state){var Vi=vm.state||(vm.state=new HZ),KZ=Vi.get,WE=Vi.has,GZ=Vi.set;gc=function(e,t){if(WE.call(Vi,e))throw new TypeError(HE);return t.facade=e,GZ.call(Vi,e,t),t},_s=function(e){return KZ.call(Vi,e)||{}},bc=function(e){return WE.call(Vi,e)}}else{var ja=qZ("state");VZ[ja]=!0,gc=function(e,t){if(mm(e,ja))throw new TypeError(HE);return t.facade=e,zZ(e,ja,t),t},_s=function(e){return mm(e,ja)?e[ja]:{}},bc=function(e){return mm(e,ja)}}var ZE={set:gc,get:_s,has:bc,enforce:WZ,getterFor:ZZ},ym=zi,YZ=qi,KE=Function.prototype,JZ=ym&&Object.getOwnPropertyDescriptor,gm=YZ(KE,"name"),XZ=gm&&(function(){}).name==="something",QZ=gm&&(!ym||ym&&JZ(KE,"name").configurable),bm={EXISTS:gm,PROPER:XZ,CONFIGURABLE:QZ},eK=Tn,GE=jn,tK=qi,YE=yc,nK=um,rK=UE,JE=ZE,iK=bm.CONFIGURABLE,aK=JE.get,oK=JE.enforce,sK=String(String).split("String");(BE.exports=function(e,t,n,r){var i=r?!!r.unsafe:!1,a=r?!!r.enumerable:!1,o=r?!!r.noTargetGet:!1,s=r&&r.name!==void 0?r.name:t,u;if(GE(n)&&(String(s).slice(0,7)==="Symbol("&&(s="["+String(s).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!tK(n,"name")||iK&&n.name!==s)&&YE(n,"name",s),u=oK(n),u.source||(u.source=sK.join(typeof s=="string"?s:""))),e===eK){a?e[t]=n:nK(t,n);return}else i?!o&&e[t]&&(a=!0):delete e[t];a?e[t]=n:YE(e,t,n)})(Function.prototype,"toString",function(){return GE(this)&&aK(this).source||rK(this)});var Es=BE.exports,XE={},lK=Math.ceil,uK=Math.floor,xc=function(e){var t=+e;return t!==t||t===0?0:(t>0?uK:lK)(t)},cK=xc,fK=Math.max,dK=Math.min,pK=function(e,t){var n=cK(e);return n<0?fK(n+t,0):dK(n,t)},hK=xc,mK=Math.min,QE=function(e){return e>0?mK(hK(e),9007199254740991):0},vK=QE,yK=function(e){return vK(e.length)},gK=im,bK=pK,xK=yK,ek=function(e){return function(t,n,r){var i=gK(t),a=xK(i),o=bK(r,a),s;if(e&&n!=n){for(;a>o;)if(s=i[o++],s!=s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},wK={includes:ek(!0),indexOf:ek(!1)},xm=qi,SK=im,_K=wK.indexOf,EK=hm,tk=function(e,t){var n=SK(e),r=0,i=[],a;for(a in n)!xm(EK,a)&&xm(n,a)&&i.push(a);for(;t.length>r;)xm(n,a=t[r++])&&(~_K(i,a)||i.push(a));return i},wm=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],kK=tk,TK=wm,OK=TK.concat("length","prototype");XE.f=Object.getOwnPropertyNames||function(t){return kK(t,OK)};var nk={};nk.f=Object.getOwnPropertySymbols;var CK=mc,$K=XE,IK=nk,RK=pi,PK=CK("Reflect","ownKeys")||function(t){var n=$K.f(RK(t)),r=IK.f;return r?n.concat(r(t)):n},AK=qi,NK=PK,DK=nm,MK=Ss,jK=function(e,t){for(var n=NK(t),r=MK.f,i=DK.f,a=0;a<n.length;a++){var o=n[a];AK(e,o)||r(e,o,i(t,o))}},LK=Xn,FK=jn,BK=/#|\.prototype\./,ks=function(e,t){var n=zK[UK(e)];return n==VK?!0:n==qK?!1:FK(t)?LK(t):!!t},UK=ks.normalize=function(e){return String(e).replace(BK,".").toLowerCase()},zK=ks.data={},qK=ks.NATIVE="N",VK=ks.POLYFILL="P",HK=ks,Sm=Tn,WK=nm.f,ZK=yc,KK=Es,GK=um,YK=jK,JK=HK,XK=function(e,t){var n=e.target,r=e.global,i=e.stat,a,o,s,u,l,c;if(r?o=Sm:i?o=Sm[n]||GK(n,{}):o=(Sm[n]||{}).prototype,o)for(s in t){if(l=t[s],e.noTargetGet?(c=WK(o,s),u=c&&c.value):u=o[s],a=JK(r?s:n+(i?".":"#")+s,e.forced),!a&&u!==void 0){if(typeof l==typeof u)continue;YK(l,u)}(e.sham||u&&u.sham)&&ZK(l,"sham",!0),KK(o,s,l,e)}},QK=ws,eG=QK("toStringTag"),rk={};rk[eG]="z";var _m=String(rk)==="[object z]",tG=_m,nG=jn,wc=rm,rG=ws,iG=rG("toStringTag"),aG=wc(function(){return arguments}())=="Arguments",oG=function(e,t){try{return e[t]}catch{}},ik=tG?wc:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=oG(t=Object(e),iG))=="string"?n:aG?wc(t):(r=wc(t))=="Object"&&nG(t.callee)?"Arguments":r},sG=ik,Sc=function(e){if(sG(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return String(e)},lG=pi,ak=function(){var e=lG(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},Em={},ok=Xn,uG=Tn,sk=uG.RegExp;Em.UNSUPPORTED_Y=ok(function(){var e=sk("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),Em.BROKEN_CARET=ok(function(){var e=sk("^r","gy");return e.lastIndex=2,e.exec("str")!=null});var cG=tk,fG=wm,dG=Object.keys||function(t){return cG(t,fG)},pG=zi,hG=Ss,mG=pi,vG=dG,yG=pG?Object.defineProperties:function(t,n){mG(t);for(var r=vG(n),i=r.length,a=0,o;i>a;)hG.f(t,o=r[a++],n[o]);return t},gG=mc,bG=gG("document","documentElement"),xG=pi,wG=yG,lk=wm,SG=hm,_G=bG,EG=DE,kG=VE,uk=">",ck="<",km="prototype",Tm="script",fk=kG("IE_PROTO"),Om=function(){},dk=function(e){return ck+Tm+uk+e+ck+"/"+Tm+uk},pk=function(e){e.write(dk("")),e.close();var t=e.parentWindow.Object;return e=null,t},TG=function(){var e=EG("iframe"),t="java"+Tm+":",n;return e.style.display="none",_G.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(dk("document.F=Object")),n.close(),n.F},_c,Ec=function(){try{_c=new ActiveXObject("htmlfile")}catch{}Ec=typeof document<"u"?document.domain&&_c?pk(_c):TG():pk(_c);for(var e=lk.length;e--;)delete Ec[km][lk[e]];return Ec()};SG[fk]=!0;var OG=Object.create||function(t,n){var r;return t!==null?(Om[km]=xG(t),r=new Om,Om[km]=null,r[fk]=t):r=Ec(),n===void 0?r:wG(r,n)},CG=Xn,$G=Tn,IG=$G.RegExp,RG=CG(function(){var e=IG(".","s");return!(e.dotAll&&e.exec(`
|
|
343
|
-
`)&&e.flags==="s")}),
|
|
344
|
-
`)&&(y="(?: "+y+")",g=" "+g,v++),s=new RegExp("^(?:"+y+")",h)),Im&&(s=new RegExp("^"+y+"$(?!\\s)",h)),$m&&(u=n.lastIndex),l=kc.call(m?s:n,g),m?l?(l.input=l.input.slice(v),l[0]=l[0].slice(v),l.index=n.lastIndex,n.lastIndex+=l[0].length):n.lastIndex=0:$m&&l&&(n.lastIndex=n.global?l.index+l[0].length:u),Im&&l&&l.length>1&&qG.call(l[0],s,function(){for(c=1;c<arguments.length-2;c++)arguments[c]===void 0&&(l[c]=void 0)}),l&&p)for(l.groups=f=FG(null),c=0;c<p.length;c++)d=p[c],f[d[0]]=l[d[1]];return l});var Rm=Cm,HG=XK,vk=Rm;HG({target:"RegExp",proto:!0,forced:/./.exec!==vk},{exec:vk});var yk=Es,WG=Rm,gk=Xn,bk=ws,ZG=yc,KG=bk("species"),Pm=RegExp.prototype,GG=function(e,t,n,r){var i=bk(e),a=!gk(function(){var l={};return l[i]=function(){return 7},""[e](l)!=7}),o=a&&!gk(function(){var l=!1,c=/a/;return e==="split"&&(c={},c.constructor={},c.constructor[KG]=function(){return c},c.flags="",c[i]=/./[i]),c.exec=function(){return l=!0,null},c[i](""),!l});if(!a||!o||n){var s=/./[i],u=t(i,""[e],function(l,c,f,d,p){var m=c.exec;return m===WG||m===Pm.exec?a&&!p?{done:!0,value:s.call(c,f,d)}:{done:!0,value:l.call(f,c,d)}:{done:!1}});yk(String.prototype,e,u[0]),yk(Pm,i,u[1])}r&&ZG(Pm[i],"sham",!0)},YG=xc,JG=Sc,XG=hc,xk=function(e){return function(t,n){var r=JG(XG(t)),i=YG(n),a=r.length,o,s;return i<0||i>=a?e?"":void 0:(o=r.charCodeAt(i),o<55296||o>56319||i+1===a||(s=r.charCodeAt(i+1))<56320||s>57343?e?r.charAt(i):o:e?r.slice(i,i+2):(o-55296<<10)+(s-56320)+65536)}},QG={codeAt:xk(!1),charAt:xk(!0)},eY=QG.charAt,tY=function(e,t,n){return t+(n?eY(e,t).length:1)},nY=OE,rY=Math.floor,iY="".replace,aY=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,oY=/\$([$&'`]|\d{1,2})/g,sY=function(e,t,n,r,i,a){var o=n+e.length,s=r.length,u=oY;return i!==void 0&&(i=nY(i),u=aY),iY.call(a,u,function(l,c){var f;switch(c.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(o);case"<":f=i[c.slice(1,-1)];break;default:var d=+c;if(d===0)return l;if(d>s){var p=rY(d/10);return p===0?l:p<=s?r[p-1]===void 0?c.charAt(1):r[p-1]+c.charAt(1):l}f=r[d-1]}return f===void 0?"":f})},lY=pi,uY=jn,cY=rm,fY=Rm,dY=function(e,t){var n=e.exec;if(uY(n)){var r=n.call(e,t);return r!==null&&lY(r),r}if(cY(e)==="RegExp")return fY.call(e,t);throw TypeError("RegExp#exec called on incompatible receiver")},pY=GG,hY=Xn,mY=pi,vY=jn,yY=xc,gY=QE,La=Sc,bY=hc,xY=tY,wY=SE,SY=sY,_Y=dY,EY=ws,Am=EY("replace"),kY=Math.max,TY=Math.min,OY=function(e){return e===void 0?e:String(e)},CY=function(){return"a".replace(/./,"$0")==="$0"}(),wk=function(){return/./[Am]?/./[Am]("a","$0")==="":!1}(),$Y=!hY(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});pY("replace",function(e,t,n){var r=wk?"$":"$0";return[function(a,o){var s=bY(this),u=a==null?void 0:wY(a,Am);return u?u.call(a,s,o):t.call(La(s),a,o)},function(i,a){var o=mY(this),s=La(i);if(typeof a=="string"&&a.indexOf(r)===-1&&a.indexOf("$<")===-1){var u=n(t,o,s,a);if(u.done)return u.value}var l=vY(a);l||(a=La(a));var c=o.global;if(c){var f=o.unicode;o.lastIndex=0}for(var d=[];;){var p=_Y(o,s);if(p===null||(d.push(p),!c))break;var m=La(p[0]);m===""&&(o.lastIndex=xY(s,gY(o.lastIndex),f))}for(var h="",y=0,v=0;v<d.length;v++){p=d[v];for(var g=La(p[0]),b=kY(TY(yY(p.index),s.length),0),k=[],S=1;S<p.length;S++)k.push(OY(p[S]));var E=p.groups;if(l){var O=[g].concat(k,b,s);E!==void 0&&O.push(E);var L=La(a.apply(void 0,O))}else L=SY(g,s,b,k,E,a);b>=y&&(h+=s.slice(y,b)+L,y=b+g.length)}return h+s.slice(y)}]},!$Y||!CY||wk);var Ts=Lt,IY=Ap,RY=ji,Tc=function(e){return IY.slice(0,e.length)===e},PY=function(){return Tc("Bun/")?"BUN":Tc("Cloudflare-Workers")?"CLOUDFLARE":Tc("Deno/")?"DENO":Tc("Node.js/")?"NODE":Ts.Bun&&typeof Bun.version=="string"?"BUN":Ts.Deno&&typeof Deno.version=="object"?"DENO":RY(Ts.process)==="process"?"NODE":Ts.window&&Ts.document?"BROWSER":"REST"}(),AY=TypeError,NY=function(e,t){if(e<t)throw new AY("Not enough arguments");return e},Sk=Lt,DY=Ep,MY=nn,jY=PY,LY=Ap,FY=Yu,BY=NY,UY=Sk.Function,zY=/MSIE .\./.test(LY)||jY==="BUN"&&function(){var e=Sk.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}(),_k=function(e,t){var n=t?2:1;return zY?function(r,i){var a=BY(arguments.length,1)>n,o=MY(r)?r:UY(r),s=a?FY(arguments,n):[],u=a?function(){DY(o,this,s)}:o;return t?e(u,i):e(u)}:e},qY=mt,Ek=Lt,VY=_k,kk=VY(Ek.setInterval,!0);qY({global:!0,bind:!0,forced:Ek.setInterval!==kk},{setInterval:kk});var HY=mt,Tk=Lt,WY=_k,Ok=WY(Tk.setTimeout,!0);HY({global:!0,bind:!0,forced:Tk.setTimeout!==Ok},{setTimeout:Ok});var ZY=Yt,KY=ZY.setInterval,GY=KY;const YY=Ke(GY);var JY=Ft,Ck=function(e,t){var n=[][e];return!!n&&JY(function(){n.call(null,t||function(){return 1},1)})},XY=mt,QY=Tp,eJ=eS.indexOf,tJ=Ck,Nm=QY([].indexOf),$k=!!Nm&&1/Nm([1],1,-0)<0,nJ=$k||!tJ("indexOf");XY({target:"Array",proto:!0,forced:nJ},{indexOf:function(t){var n=arguments.length>1?arguments[1]:void 0;return $k?Nm(this,t,n)||0:eJ(this,t,n)}});var rJ=Ui,iJ=rJ("Array","indexOf"),aJ=Lr,oJ=iJ,Dm=Array.prototype,sJ=function(e){var t=e.indexOf;return e===Dm||aJ(Dm,e)&&t===Dm.indexOf?oJ:t},lJ=sJ,uJ=lJ,cJ=uJ;const fJ=Ke(cJ);var Ik=ju,dJ=TypeError,pJ=function(e,t){if(!delete e[t])throw new dJ("Cannot delete property "+Ik(t)+" of "+Ik(e))},hJ=mt,mJ=Fr,vJ=nh,yJ=Uu,gJ=Li,bJ=j_,xJ=Yp,wJ=th,SJ=os,Mm=pJ,_J=qu,EJ=_J("splice"),kJ=Math.max,TJ=Math.min;hJ({target:"Array",proto:!0,forced:!EJ},{splice:function(t,n){var r=mJ(this),i=gJ(r),a=vJ(t,i),o=arguments.length,s,u,l,c,f,d;for(o===0?s=u=0:o===1?(s=0,u=i-a):(s=o-2,u=TJ(kJ(yJ(n),0),i-a)),xJ(i+s-u),l=wJ(r,u),c=0;c<u;c++)f=a+c,f in r&&SJ(l,c,r[f]);if(l.length=u,s<u){for(c=a;c<i-u;c++)f=c+u,d=c+s,f in r?r[d]=r[f]:Mm(r,d);for(c=i;c>i-u+s;c--)Mm(r,c-1)}else if(s>u)for(c=i-u;c>a;c--)f=c+u-1,d=c+s-1,f in r?r[d]=r[f]:Mm(r,d);for(c=0;c<s;c++)r[c+a]=arguments[c+2];return bJ(r,i-u+s),l}});var OJ=Ui,CJ=OJ("Array","splice"),$J=Lr,IJ=CJ,jm=Array.prototype,RJ=function(e){var t=e.splice;return e===jm||$J(jm,e)&&t===jm.splice?IJ:t},PJ=RJ,AJ=PJ,NJ=AJ;const DJ=Ke(NJ);var MJ=Ui,jJ=MJ("Array","concat"),LJ=Lr,FJ=jJ,Lm=Array.prototype,BJ=function(e){var t=e.concat;return e===Lm||LJ(Lm,e)&&t===Lm.concat?FJ:t},UJ=BJ,zJ=UJ,qJ=zJ;const _t=Ke(qJ);var VJ=mt,HJ=Rt,Rk=Date,WJ=HJ(Rk.prototype.getTime);VJ({target:"Date",stat:!0},{now:function(){return WJ(new Rk)}});var ZJ=Yt,KJ=ZJ.Date.now,GJ=KJ,YJ=GJ,JJ=YJ;const hi=Ke(JJ);var XJ=hh.forEach,QJ=Ck,eX=QJ("forEach"),tX=eX?[].forEach:function(t){return XJ(this,t,arguments.length>1?arguments[1]:void 0)},nX=mt,Pk=tX;nX({target:"Array",proto:!0,forced:[].forEach!==Pk},{forEach:Pk});var rX=Ui,iX=rX("Array","forEach"),aX=iX,oX=aX,sX=ss,lX=kn,uX=Lr,cX=oX,Fm=Array.prototype,fX={DOMTokenList:!0,NodeList:!0},dX=function(e){var t=e.forEach;return e===Fm||uX(Fm,e)&&t===Fm.forEach||lX(fX,sX(e))?cX:t},pX=dX;const Oc=Ke(pX);var hX=mt,mX=Fr,Ak=ah,vX=Ft,yX=vX(function(){Ak(1)});hX({target:"Object",stat:!0,forced:yX},{keys:function(t){return Ak(mX(t))}});var gX=Yt,bX=gX.Object.keys,xX=bX,wX=xX,SX=wX;const _X=Ke(SX);var EX=Yt,kX=EX.Object.getOwnPropertySymbols,TX=kX,OX=TX,CX=OX;const Nk=Ke(CX);var $X=mt,IX=hh.filter,RX=qu,PX=RX("filter");$X({target:"Array",proto:!0,forced:!PX},{filter:function(t){return IX(this,t,arguments.length>1?arguments[1]:void 0)}});var AX=Ui,NX=AX("Array","filter"),DX=Lr,MX=NX,Bm=Array.prototype,jX=function(e){var t=e.filter;return e===Bm||DX(Bm,e)&&t===Bm.filter?MX:t},LX=jX,FX=LX,BX=FX;const UX=Ke(BX);var Dk={exports:{}},zX=mt,qX=Ft,VX=pr,Mk=ts.f,jk=vn,HX=!jk||qX(function(){Mk(1)});zX({target:"Object",stat:!0,forced:HX,sham:!jk},{getOwnPropertyDescriptor:function(t,n){return Mk(VX(t),n)}});var WX=Yt,Lk=WX.Object,ZX=Dk.exports=function(t,n){return Lk.getOwnPropertyDescriptor(t,n)};Lk.getOwnPropertyDescriptor.sham&&(ZX.sham=!0);var KX=Dk.exports,GX=KX,YX=GX,JX=YX;const Fk=Ke(JX);var XX=hr,QX=Rt,eQ=Gu,tQ=Ju,nQ=ci,rQ=QX([].concat),iQ=XX("Reflect","ownKeys")||function(t){var n=eQ.f(nQ(t)),r=tQ.f;return r?rQ(n,r(t)):n},aQ=mt,oQ=vn,sQ=iQ,lQ=pr,uQ=ts,cQ=os;aQ({target:"Object",stat:!0,sham:!oQ},{getOwnPropertyDescriptors:function(t){for(var n=lQ(t),r=uQ.f,i=sQ(n),a={},o=0,s,u;i.length>o;)u=r(n,s=i[o++]),u!==void 0&&cQ(a,s,u);return a}});var fQ=Yt,dQ=fQ.Object.getOwnPropertyDescriptors,pQ=dQ,hQ=pQ,mQ=hQ;const Bk=Ke(mQ);var Uk={exports:{}},vQ=mt,yQ=vn,zk=Vu.f;vQ({target:"Object",stat:!0,forced:Object.defineProperties!==zk,sham:!yQ},{defineProperties:zk});var gQ=Yt,qk=gQ.Object,bQ=Uk.exports=function(t,n){return qk.defineProperties(t,n)};qk.defineProperties.sham&&(bQ.sham=!0);var xQ=Uk.exports,wQ=xQ,SQ=wQ,_Q=SQ;const EQ=Ke(_Q);var kQ=lE;const TQ=Ke(kQ);var OQ=!1;function CQ(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function $Q(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var IQ=function(){function e(n){var r=this;this._insertTag=function(i){var a;r.tags.length===0?r.insertionPoint?a=r.insertionPoint.nextSibling:r.prepend?a=r.container.firstChild:a=r.before:a=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,a),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!OQ:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag($Q(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var a=CQ(i);try{a.insertRule(r,a.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var i;return(i=r.parentNode)==null?void 0:i.removeChild(r)}),this.tags=[],this.ctr=0},e}(),rn="-ms-",Cc="-moz-",ot="-webkit-",Vk="comm",Um="rule",zm="decl",RQ="@import",Hk="@keyframes",PQ="@layer",AQ=Math.abs,$c=String.fromCharCode,NQ=Object.assign;function DQ(e,t){return Jt(e,0)^45?(((t<<2^Jt(e,0))<<2^Jt(e,1))<<2^Jt(e,2))<<2^Jt(e,3):0}function Wk(e){return e.trim()}function MQ(e,t){return(e=t.exec(e))?e[0]:e}function st(e,t,n){return e.replace(t,n)}function qm(e,t){return e.indexOf(t)}function Jt(e,t){return e.charCodeAt(t)|0}function Os(e,t,n){return e.slice(t,n)}function gr(e){return e.length}function Vm(e){return e.length}function Ic(e,t){return t.push(e),e}function jQ(e,t){return e.map(t).join("")}var Rc=1,Fa=1,Zk=0,gn=0,Pt=0,Ba="";function Pc(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:Rc,column:Fa,length:o,return:""}}function Cs(e,t){return NQ(Pc("",null,null,"",null,null,0),e,{length:-e.length},t)}function LQ(){return Pt}function FQ(){return Pt=gn>0?Jt(Ba,--gn):0,Fa--,Pt===10&&(Fa=1,Rc--),Pt}function On(){return Pt=gn<Zk?Jt(Ba,gn++):0,Fa++,Pt===10&&(Fa=1,Rc++),Pt}function br(){return Jt(Ba,gn)}function Ac(){return gn}function $s(e,t){return Os(Ba,e,t)}function Is(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Kk(e){return Rc=Fa=1,Zk=gr(Ba=e),gn=0,[]}function Gk(e){return Ba="",e}function Nc(e){return Wk($s(gn-1,Hm(e===91?e+2:e===40?e+1:e)))}function BQ(e){for(;(Pt=br())&&Pt<33;)On();return Is(e)>2||Is(Pt)>3?"":" "}function UQ(e,t){for(;--t&&On()&&!(Pt<48||Pt>102||Pt>57&&Pt<65||Pt>70&&Pt<97););return $s(e,Ac()+(t<6&&br()==32&&On()==32))}function Hm(e){for(;On();)switch(Pt){case e:return gn;case 34:case 39:e!==34&&e!==39&&Hm(Pt);break;case 40:e===41&&Hm(e);break;case 92:On();break}return gn}function zQ(e,t){for(;On()&&e+Pt!==57;)if(e+Pt===84&&br()===47)break;return"/*"+$s(t,gn-1)+"*"+$c(e===47?e:On())}function qQ(e){for(;!Is(br());)On();return $s(e,gn)}function VQ(e){return Gk(Dc("",null,null,null,[""],e=Kk(e),0,[0],e))}function Dc(e,t,n,r,i,a,o,s,u){for(var l=0,c=0,f=o,d=0,p=0,m=0,h=1,y=1,v=1,g=0,b="",k=i,S=a,E=r,O=b;y;)switch(m=g,g=On()){case 40:if(m!=108&&Jt(O,f-1)==58){qm(O+=st(Nc(g),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:O+=Nc(g);break;case 9:case 10:case 13:case 32:O+=BQ(m);break;case 92:O+=UQ(Ac()-1,7);continue;case 47:switch(br()){case 42:case 47:Ic(HQ(zQ(On(),Ac()),t,n),u);break;default:O+="/"}break;case 123*h:s[l++]=gr(O)*v;case 125*h:case 59:case 0:switch(g){case 0:case 125:y=0;case 59+c:v==-1&&(O=st(O,/\f/g,"")),p>0&&gr(O)-f&&Ic(p>32?Jk(O+";",r,n,f-1):Jk(st(O," ","")+";",r,n,f-2),u);break;case 59:O+=";";default:if(Ic(E=Yk(O,t,n,l,c,i,s,b,k=[],S=[],f),a),g===123)if(c===0)Dc(O,t,E,E,k,a,f,s,S);else switch(d===99&&Jt(O,3)===110?100:d){case 100:case 108:case 109:case 115:Dc(e,E,E,r&&Ic(Yk(e,E,E,0,0,i,s,b,i,k=[],f),S),i,S,f,s,r?k:S);break;default:Dc(O,E,E,E,[""],S,0,s,S)}}l=c=p=0,h=v=1,b=O="",f=o;break;case 58:f=1+gr(O),p=m;default:if(h<1){if(g==123)--h;else if(g==125&&h++==0&&FQ()==125)continue}switch(O+=$c(g),g*h){case 38:v=c>0?1:(O+="\f",-1);break;case 44:s[l++]=(gr(O)-1)*v,v=1;break;case 64:br()===45&&(O+=Nc(On())),d=br(),c=f=gr(b=O+=qQ(Ac())),g++;break;case 45:m===45&&gr(O)==2&&(h=0)}}return a}function Yk(e,t,n,r,i,a,o,s,u,l,c){for(var f=i-1,d=i===0?a:[""],p=Vm(d),m=0,h=0,y=0;m<r;++m)for(var v=0,g=Os(e,f+1,f=AQ(h=o[m])),b=e;v<p;++v)(b=Wk(h>0?d[v]+" "+g:st(g,/&\f/g,d[v])))&&(u[y++]=b);return Pc(e,t,n,i===0?Um:s,u,l,c)}function HQ(e,t,n){return Pc(e,t,n,Vk,$c(LQ()),Os(e,2,-2),0)}function Jk(e,t,n,r){return Pc(e,t,n,zm,Os(e,0,r),Os(e,r+1,-1),r)}function Ua(e,t){for(var n="",r=Vm(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function WQ(e,t,n,r){switch(e.type){case PQ:if(e.children.length)break;case RQ:case zm:return e.return=e.return||e.value;case Vk:return"";case Hk:return e.return=e.value+"{"+Ua(e.children,r)+"}";case Um:e.value=e.props.join(",")}return gr(n=Ua(e.children,r))?e.return=e.value+"{"+n+"}":""}function ZQ(e){var t=Vm(e);return function(n,r,i,a){for(var o="",s=0;s<t;s++)o+=e[s](n,r,i,a)||"";return o}}function KQ(e){return function(t){t.root||(t=t.return)&&e(t)}}function GQ(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var YQ=function(t,n,r){for(var i=0,a=0;i=a,a=br(),i===38&&a===12&&(n[r]=1),!Is(a);)On();return $s(t,gn)},JQ=function(t,n){var r=-1,i=44;do switch(Is(i)){case 0:i===38&&br()===12&&(n[r]=1),t[r]+=YQ(gn-1,n,r);break;case 2:t[r]+=Nc(i);break;case 4:if(i===44){t[++r]=br()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=$c(i)}while(i=On());return t},XQ=function(t,n){return Gk(JQ(Kk(t),n))},Xk=new WeakMap,QQ=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!Xk.get(r))&&!i){Xk.set(t,!0);for(var a=[],o=XQ(n,a),s=r.props,u=0,l=0;u<o.length;u++)for(var c=0;c<s.length;c++,l++)t.props[l]=a[u]?o[u].replace(/&\f/g,s[c]):s[c]+" "+o[u]}}},eee=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Qk(e,t){switch(DQ(e,t)){case 5103:return ot+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ot+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ot+e+Cc+e+rn+e+e;case 6828:case 4268:return ot+e+rn+e+e;case 6165:return ot+e+rn+"flex-"+e+e;case 5187:return ot+e+st(e,/(\w+).+(:[^]+)/,ot+"box-$1$2"+rn+"flex-$1$2")+e;case 5443:return ot+e+rn+"flex-item-"+st(e,/flex-|-self/,"")+e;case 4675:return ot+e+rn+"flex-line-pack"+st(e,/align-content|flex-|-self/,"")+e;case 5548:return ot+e+rn+st(e,"shrink","negative")+e;case 5292:return ot+e+rn+st(e,"basis","preferred-size")+e;case 6060:return ot+"box-"+st(e,"-grow","")+ot+e+rn+st(e,"grow","positive")+e;case 4554:return ot+st(e,/([^-])(transform)/g,"$1"+ot+"$2")+e;case 6187:return st(st(st(e,/(zoom-|grab)/,ot+"$1"),/(image-set)/,ot+"$1"),e,"")+e;case 5495:case 3959:return st(e,/(image-set\([^]*)/,ot+"$1$`$1");case 4968:return st(st(e,/(.+:)(flex-)?(.*)/,ot+"box-pack:$3"+rn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ot+e+e;case 4095:case 3583:case 4068:case 2532:return st(e,/(.+)-inline(.+)/,ot+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(gr(e)-1-t>6)switch(Jt(e,t+1)){case 109:if(Jt(e,t+4)!==45)break;case 102:return st(e,/(.+:)(.+)-([^]+)/,"$1"+ot+"$2-$3$1"+Cc+(Jt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~qm(e,"stretch")?Qk(st(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Jt(e,t+1)!==115)break;case 6444:switch(Jt(e,gr(e)-3-(~qm(e,"!important")&&10))){case 107:return st(e,":",":"+ot)+e;case 101:return st(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ot+(Jt(e,14)===45?"inline-":"")+"box$3$1"+ot+"$2$3$1"+rn+"$2box$3")+e}break;case 5936:switch(Jt(e,t+11)){case 114:return ot+e+rn+st(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ot+e+rn+st(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ot+e+rn+st(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ot+e+rn+e+e}return e}var tee=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case zm:t.return=Qk(t.value,t.length);break;case Hk:return Ua([Cs(t,{value:st(t.value,"@","@"+ot)})],i);case Um:if(t.length)return jQ(t.props,function(a){switch(MQ(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ua([Cs(t,{props:[st(a,/:(read-\w+)/,":"+Cc+"$1")]})],i);case"::placeholder":return Ua([Cs(t,{props:[st(a,/:(plac\w+)/,":"+ot+"input-$1")]}),Cs(t,{props:[st(a,/:(plac\w+)/,":"+Cc+"$1")]}),Cs(t,{props:[st(a,/:(plac\w+)/,rn+"input-$1")]})],i)}return""})}},nee=[tee],ree=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(h){var y=h.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var i=t.stylisPlugins||nee,a={},o,s=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(h){for(var y=h.getAttribute("data-emotion").split(" "),v=1;v<y.length;v++)a[y[v]]=!0;s.push(h)});var u,l=[QQ,eee];{var c,f=[WQ,KQ(function(h){c.insert(h)})],d=ZQ(l.concat(i,f)),p=function(y){return Ua(VQ(y),d)};u=function(y,v,g,b){c=g,p(y?y+"{"+v.styles+"}":v.styles),b&&(m.inserted[v.name]=!0)}}var m={key:n,sheet:new IQ({key:n,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:a,registered:{},insert:u};return m.sheet.hydrate(s),m};function iee(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var aee={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},oee=!1,see=/[A-Z]|^ms/g,lee=/_EMO_([^_]+?)_([^]*?)_EMO_/g,eT=function(t){return t.charCodeAt(1)===45},tT=function(t){return t!=null&&typeof t!="boolean"},Wm=GQ(function(e){return eT(e)?e:e.replace(see,"-$&").toLowerCase()}),nT=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(lee,function(r,i,a){return mi={name:i,styles:a,next:mi},i})}return aee[t]!==1&&!eT(t)&&typeof n=="number"&&n!==0?n+"px":n},uee="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Mc(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return mi={name:i.name,styles:i.styles,next:mi},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)mi={name:o.name,styles:o.styles,next:mi},o=o.next;var s=a.styles+";";return s}return cee(e,t,n)}}var u=n;if(t==null)return u;var l=t[u];return l!==void 0?l:u}function cee(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Mc(e,t,n[i])+";";else for(var a in n){var o=n[a];if(typeof o!="object"){var s=o;t!=null&&t[s]!==void 0?r+=a+"{"+t[s]+"}":tT(s)&&(r+=Wm(a)+":"+nT(a,s)+";")}else{if(a==="NO_COMPONENT_SELECTOR"&&oee)throw new Error(uee);if(Array.isArray(o)&&typeof o[0]=="string"&&(t==null||t[o[0]]===void 0))for(var u=0;u<o.length;u++)tT(o[u])&&(r+=Wm(a)+":"+nT(a,o[u])+";");else{var l=Mc(e,t,o);switch(a){case"animation":case"animationName":{r+=Wm(a)+":"+l+";";break}default:r+=a+"{"+l+"}"}}}}return r}var rT=/label:\s*([^\s;{]+)\s*(;|$)/g,mi;function Zm(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";mi=void 0;var a=e[0];if(a==null||a.raw===void 0)r=!1,i+=Mc(n,t,a);else{var o=a;i+=o[0]}for(var s=1;s<e.length;s++)if(i+=Mc(n,t,e[s]),r){var u=a;i+=u[s]}rT.lastIndex=0;for(var l="",c;(c=rT.exec(i))!==null;)l+="-"+c[1];var f=iee(i)+l;return{name:f,styles:i,next:mi}}function iT(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(r+=i+" ")}),r}var fee=function(t,n,r){var i=t.key+"-"+n.name;t.registered[i]===void 0&&(t.registered[i]=n.styles)},dee=function(t,n,r){fee(t,n);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var a=n;do t.insert(n===a?"."+i:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}};function aT(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function oT(e,t,n){var r=[],i=iT(e,r,n);return r.length<2?n:i+t(r)}var pee=function(t){var n=ree(t);n.sheet.speedy=function(s){if(process.env.NODE_ENV!=="production"&&this.ctr!==0)throw new Error("speedy must be changed before any rules are inserted");this.isSpeedy=s},n.compat=!0;var r=function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];var f=Zm(l,n.registered,void 0);return dee(n,f),n.key+"-"+f.name},i=function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];var f=Zm(l,n.registered),d="animation-"+f.name;return aT(n,{name:f.name,styles:"@keyframes "+d+"{"+f.styles+"}"}),d},a=function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];var f=Zm(l,n.registered);aT(n,f)},o=function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];return oT(n.registered,r,hee(l))};return{css:r,cx:o,injectGlobal:a,keyframes:i,hydrate:function(u){u.forEach(function(l){n.inserted[l]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:iT.bind(null,n.registered),merge:oT.bind(null,n.registered,r)}},hee=function e(t){for(var n="",r=0;r<t.length;r++){var i=t[r];if(i!=null){var a=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))a=e(i);else{a="";for(var o in i)i[o]&&o&&(a&&(a+=" "),a+=o)}break}default:a=i}a&&(n&&(n+=" "),n+=a)}}return n},mee=Es,Km=Date.prototype,sT="Invalid Date",lT="toString",vee=Km[lT],yee=Km.getTime;String(new Date(NaN))!=sT&&mee(Km,lT,function(){var t=yee.call(this);return t===t?vee.call(this):sT});var gee=_m,bee=ik,xee=gee?{}.toString:function(){return"[object "+bee(this)+"]"},wee=_m,See=Es,_ee=xee;wee||See(Object.prototype,"toString",_ee,{unsafe:!0});var Eee=bm.PROPER,kee=Es,Tee=pi,uT=Sc,Oee=Xn,Cee=ak,Gm="toString",cT=RegExp.prototype,fT=cT[Gm],$ee=Oee(function(){return fT.call({source:"a",flags:"b"})!="/a/b"}),Iee=Eee&&fT.name!=Gm;($ee||Iee)&&kee(RegExp.prototype,Gm,function(){var t=Tee(this),n=uT(t.source),r=t.flags,i=uT(r===void 0&&t instanceof RegExp&&!("flags"in cT)?Cee.call(t):r);return"/"+n+"/"+i},{unsafe:!0});var dT=typeof window<"u"?window:self,Ree=dT.crypto||dT.msCrypto,Pee=function(e){if(!e)return Math.random;var t=Math.pow(2,32),n=new Uint32Array(1);return function(){return e.getRandomValues(n)[0]/t}}(Ree);const Aee=Ke(Pee);function Nee(){return Aee().toString(26).substr(2,5).replace(/[0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65)})}var Dee=U1;const pT=Ke(Dee);function dt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"white",n="background-color: ".concat(e,"; border-radius: 4px; padding: 2px 4px;");return t&&(n+=" color: ".concat(t,";")),[n,""]}function hT(e,t){for(var n,r,i=arguments.length,a=new Array(i>2?i-2:0),o=2;o<i;o++)a[o-2]=arguments[o];return _t(n=[_t(r="%c".concat(e,"%c ")).call(r,t)]).call(n,Qe(dt("green","white")),a)}function Mee(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.force,r=n===void 0?!1:n;return r?function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];if(a.length){var s=a,u=vr(s,1),l=u[0];typeof l=="function"&&(a=l());var c=pT(a[0])?a:[a],f=c.length===1;Oc(c).call(c,function(d,p){if(f){var m,h;(m=console).log.apply(m,Qe(hT.apply(void 0,_t(h=[e]).call(h,Qe(d)))))}else if(p){var y;(y=console).log.apply(y,Qe(pT(d)?d:[d]))}else{var v,g;(v=console).groupCollapsed.apply(v,Qe(hT.apply(void 0,_t(g=[e]).call(g,Qe(d)))))}}),f||console.groupEnd()}}:function(){return 0}}var jee=zi,Lee=bm.EXISTS,Fee=Ss.f,mT=Function.prototype,Bee=mT.toString,Uee=/^\s*function ([^ (]*)/,zee="name";jee&&!Lee&&Fee(mT,zee,{configurable:!0,get:function(){try{return Bee.call(this).match(Uee)[1]}catch{return""}}});var qee=Yt,Vee=qee.setTimeout,Hee=Vee;const Wee=Ke(Hee);function Zee(e,t){if(!t)return e;var n=0,r=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s=hi();s-n>t?(e.apply(void 0,a),n=s):(clearTimeout(r),r=Wee(function(){e.apply(void 0,a),n=hi()},Math.max(0,t-s+n)))}}var vT=function(t){var n=t.debounce,r=t.name,i=t.onEvent,a=t.target,o=j.useRef();o.current=i;var s=j.useMemo(function(){return Zee(function(l){var c=o.current;c&&c(l)},n)},[n,o]),u=j.useCallback(function(l){l.timeStampLow=hi(),s(l)},[s]);return j.useLayoutEffect(function(){return a.addEventListener(r,u,{passive:!0}),u({target:a,type:r}),function(){return a.removeEventListener(r,u)}},[r,u,a]),!1};vT.defaultProps={debounce:200};var Kee=Math.sign||function(t){var n=+t;return n===0||n!==n?n:n<0?-1:1},Gee=mt,Yee=Kee;Gee({target:"Math",stat:!0},{sign:Yee});var Jee=Yt,Xee=Jee.Math.sign,Qee=Xee,ete=Qee,tte=ete;const nte=Ke(tte);function rte(e,t){var n=nte(t-e),r=Math.sqrt(Math.abs(t-e)),i=e+r*n;return n>0?Math.min(t,i):Math.max(t,i)}function ite(e,t,n,r){for(var i=e,a=0;a<r;a++)i=n(i,t);return i}var yT=function(t){var n=t.name,r=t.onEnd,i=t.target,a=t.value,o=j.useRef(),s=j.useCallback(function(l,c,f,d){var p=arguments.length>4&&arguments[4]!==void 0?arguments[4]:hi();(f==="100%"||typeof f=="number")&&(cancelAnimationFrame(o.current),o.current=requestAnimationFrame(function(){if(i){var m=f==="100%"?i.scrollHeight-i.offsetHeight:f,h=ite(c,m,rte,(hi()-p)/5);Math.abs(m-h)<1.5&&(h=m),i[l]=h,m===h?r&&r(!0):s(l,c,f,d+1,p)}}))},[o,r,i]),u=j.useCallback(function(){cancelAnimationFrame(o.current),r&&r(!1)},[r]);return j.useLayoutEffect(function(){return s(n,i[n],a,1),i?(i.addEventListener("pointerdown",u,{passive:!0}),i.addEventListener("wheel",u,{passive:!0}),function(){i.removeEventListener("pointerdown",u),i.removeEventListener("wheel",u),cancelAnimationFrame(o.current)}):function(){return cancelAnimationFrame(o.current)}},[s,o,u,n,i,a]),!1};yT.propTypes={name:rt.string.isRequired,onEnd:rt.func,target:rt.any.isRequired,value:rt.oneOfType([rt.number,rt.oneOf(["100%"])]).isRequired};function Ym(e){var t=j.useState(e),n=vr(t,2),r=n[0],i=n[1],a=j.useRef(),o=j.useCallback(function(s){typeof s=="function"?o(function(u){return s=s(u),a.current=s,s}):(a.current=s,o(s))},[a]);return a.current=r,[r,i,a]}function gT(e,t){var n=_X(e);if(Nk){var r=Nk(e);t&&(r=UX(r).call(r,function(i){return Fk(e,i).enumerable})),n.push.apply(n,r)}return n}function bT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};if(t%2){var r;Oc(r=gT(Object(n),!0)).call(r,function(a){v8(e,a,n[a])})}else if(Bk)EQ(e,Bk(n));else{var i;Oc(i=gT(Object(n))).call(i,function(a){TQ(e,a,Fk(n,a))})}}return e}var ate=function(){return 1/0},xT=17,ote="bottom",Qn="top",wT=1,ste=34,ST={};function lte(e,t){return e(),YY(e,t)}function _T(e){var t=e.mode,n=e.target,r=n.offsetHeight,i=n.scrollHeight,a=n.scrollTop,o=i-a-r<wT,s=a<wT,u=t===Qn?s:o,l=t!==Qn?s:o;return{atBottom:o,atEnd:u,atStart:l,atTop:s}}function Rs(e,t){return e===(t===Qn?0:"100%")}var Jm=function(t){var n=t.checkInterval,r=t.children,i=t.debounce,a=t.debug,o=t.initialScrollBehavior,s=t.mode,u=t.nonce,l=t.scroller,c=j.useMemo(function(){return Mee("<ScrollToBottom>",{force:a})},[a]);s=s===Qn?Qn:ote;var f=j.useRef(0),d=j.useRef(o),p=Ym(s===Qn?0:"100%"),m=vr(p,3),h=m[0],y=m[1],v=m[2],g=Ym(null),b=vr(g,3),k=b[0],S=b[1],E=b[2],O=j.useRef(0),L=j.useRef(0),D=j.useRef(0),T=j.useState(!0),P=vr(T,2),V=P[0],$=P[1],F=j.useState(!0),M=vr(F,2),B=M[0],W=M[1],U=j.useState(!0),N=vr(U,2),x=N[0],q=N[1],K=j.useState(!1),_=vr(K,2),Y=_[0],oe=_[1],ne=Ym(!0),le=vr(ne,3),pe=le[0],he=le[1],ue=le[2],Q=j.useRef([]),Z=j.useCallback(function(A){var X=E.current;return Q.current.push(A),X&&A({scrollTop:X.scrollTop}),function(){var ce=Q.current,Ee=fJ(ce).call(ce,A);~Ee&&DJ(ce).call(ce,Ee,1)}},[Q,E]),de=j.useCallback(function(){var A=v.current;c(function(){var X;return _t(X=["%cSpineTo%c: %conEnd%c is fired."]).call(X,Qe(dt("magenta")),Qe(dt("orange")),[{animateTo:A}])}),f.current=hi(),Rs(A,s)||he(!1),y(null)},[v,c,f,s,y,he]),ve=j.useCallback(function(A){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ce=X.behavior,Ee=E.current;if(typeof A!="number"&&A!=="100%")return console.warn('react-scroll-to-bottom: Arguments passed to scrollTo() must be either number or "100%".');c(function(){var Oe;return[_t(Oe=["%cscrollTo%c: Will scroll to %c".concat(typeof A=="number"?A+"px":A.replace(/%/g,"%%"),"%c")]).call(Oe,Qe(dt("lime","")),Qe(dt("purple"))),{behavior:ce,nextAnimateTo:A,target:Ee}]}),ce==="auto"?(de(),Ee&&(Ee.scrollTop=A==="100%"?Ee.scrollHeight-Ee.offsetHeight:A)):(ce!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollTo". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),y(A)),Rs(A,s)&&(c(function(){var Oe;return[_t(Oe=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call(Oe,Qe(dt("lime","")),Qe(dt("purple"))),[{mode:s,nextAnimateTo:A}]]}),he(!0))},[c,de,s,y,he,E]),$e=j.useCallback(function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=A.behavior;c(function(){var ce;return _t(ce=["%cscrollToBottom%c: Called"]).call(ce,Qe(dt("yellow","")))}),X!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToBottom". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),ve("100%",{behavior:X||"smooth"})},[c,ve]),R=j.useCallback(function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=A.behavior;c(function(){var ce;return _t(ce=["%cscrollToTop%c: Called"]).call(ce,Qe(dt("yellow","")))}),X!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToTop". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),ve(0,{behavior:X||"smooth"})},[c,ve]),J=j.useCallback(function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=A.behavior;c(function(){var Ee;return _t(Ee=["%cscrollToEnd%c: Called"]).call(Ee,Qe(dt("yellow","")))}),X!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToEnd". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var ce={behavior:X||"smooth"};s===Qn?R(ce):$e(ce)},[c,s,$e,R]),ae=j.useCallback(function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=A.behavior;c(function(){var Ee;return _t(Ee=["%cscrollToStart%c: Called"]).call(Ee,Qe(dt("yellow","")))}),X!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToStart". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var ce={behavior:X||"smooth"};s===Qn?$e(ce):R(ce)},[c,s,$e,R]),ee=j.useCallback(function(){var A=E.current;if(A){if(d.current==="auto"){c(function(){var Ct;return _t(Ct=["%ctarget changed%c: Initial scroll"]).call(Ct,Qe(dt("blue")))}),A.scrollTop=s===Qn?0:A.scrollHeight-A.offsetHeight,d.current=!1;return}var X=O.current,ce=A.offsetHeight,Ee=A.scrollHeight,Oe=A.scrollTop,Je=s===Qn?0:Math.max(0,Ee-ce-Oe),lt=Math.max(0,X-Oe),Ut=l({maxValue:Je,minValue:lt,offsetHeight:ce,scrollHeight:Ee,scrollTop:Oe}),Ot=Math.max(0,Math.min(Je,Ut)),Ze;s===Qn||Ot!==Je?Ze=Oe+Ot:Ze="100%",c(function(){var Ct,tt,xn;return[_t(Ct=[_t(tt=_t(xn="%cscrollToSticky%c: Will animate from %c".concat(X,"px%c to %c")).call(xn,typeof Ze=="number"?Ze+"px":Ze.replace(/%/g,"%%"),"%c (%c")).call(tt,(Ze==="100%"?Je:Ze)+X,"px%c)")]).call(Ct,Qe(dt("orange")),Qe(dt("purple")),Qe(dt("purple")),Qe(dt("purple"))),{animateFrom:X,maxValue:Je,minValue:lt,nextAnimateTo:Ze,nextValue:Ot,offsetHeight:ce,rawNextValue:Ut,scrollHeight:Ee,scrollTop:Oe}]}),ve(Ze,{behavior:"smooth"})}},[O,c,s,l,ve,E]),ke=j.useCallback(function(A){var X,ce=A.timeStampLow,Ee=v.current,Oe=E.current,Je=Ee!==null;if(!(ce<=f.current||!Oe)){var lt=_T({mode:s,target:Oe}),Ut=lt.atBottom,Ot=lt.atEnd,Ze=lt.atStart,Ct=lt.atTop;$(Ut),W(Ot),oe(Ze),q(Ct);var tt=Oe.offsetHeight,xn=Oe.scrollHeight,$n=L.current,rr=D.current,Hr=tt!==$n,$r=xn!==rr;if(Hr&&(L.current=tt),$r&&(D.current=xn),!Hr&&!$r){var ir=Je&&Rs(Ee,s)||Ot;ue.current!==ir&&(c(function(){var pt,wt,zt,qt;return[_t(pt=["%conScroll%c: %csetSticky%c(%c".concat(ir,"%c)")]).call(pt,Qe(dt("red")),Qe(dt("red")),Qe(dt("purple"))),_t(wt=[_t(zt=_t(qt="(animating = %c".concat(Je,"%c && isEnd = %c")).call(qt,Rs(Ee,s),"%c) || atEnd = %c")).call(zt,Ot,"%c")]).call(wt,Qe(dt("purple")),Qe(dt("purple")),Qe(dt("purple")),[{animating:Je,animateTo:Ee,atEnd:Ot,mode:s,offsetHeight:Oe.offsetHeight,scrollHeight:Oe.scrollHeight,sticky:ue.current,nextSticky:ir}])]}),he(ir))}else ue.current&&(c(function(){var pt;return[_t(pt=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(pt,Qe(dt("red")),Qe(dt("orange")),[{offsetHeightChanged:Hr,scrollHeightChanged:$r}]),{nextOffsetHeight:tt,prevOffsetHeight:$n,nextScrollHeight:xn,prevScrollHeight:rr}]}),ee());var Wr=Oe.scrollTop;Oc(X=Q.current).call(X,function(pt){return pt({scrollTop:Wr})})}},[v,c,f,s,L,D,Q,ee,$,W,oe,q,he,ue,E]);j.useEffect(function(){if(k){var A=!1,X=lte(function(){var ce=E.current,Ee=v.current!==null;ue.current?_T({mode:s,target:ce}).atEnd?A=!1:A?hi()-A>ste&&(Ee||(O.current=ce.scrollTop,c(function(){var Oe;return _t(Oe=["%cInterval check%c: Should sticky but not at end, calling %cscrollToSticky()%c to scroll"]).call(Oe,Qe(dt("navy")),Qe(dt("orange")))}),ee()),A=!1):A=hi():ce.scrollHeight<=ce.offsetHeight&&!ue.current&&(c(function(){var Oe;return[_t(Oe=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call(Oe,Qe(dt("navy")),Qe(dt("purple"))),[{offsetHeight:ce.offsetHeight,scrollHeight:ce.scrollHeight,sticky:ue.current}]]}),he(!0))},Math.max(xT,n)||xT);return function(){return clearInterval(X)}}},[v,n,c,s,ee,he,ue,k,E]);var Se=j.useMemo(function(){var A=ST[u]||(ST[u]=pee({key:"react-scroll-to-bottom--css-"+Nee(),nonce:u}));return function(X){return A.css(X)+""}},[u]),Pe=j.useMemo(function(){return{observeScrollPosition:Z,setTarget:S,styleToClassName:Se}},[Z,S,Se]),He=j.useMemo(function(){return{atBottom:V,atEnd:B,atStart:Y,atTop:x,mode:s}},[V,B,Y,x,s]),Ae=j.useMemo(function(){var A=h!==null;return{animating:A,animatingToEnd:A&&Rs(h,s),sticky:pe}},[h,s,pe]),Fe=j.useMemo(function(){return bT(bT({},He),Ae)},[He,Ae]),z=j.useMemo(function(){return{scrollTo:ve,scrollToBottom:$e,scrollToEnd:J,scrollToStart:ae,scrollToTop:R}},[ve,$e,J,ae,R]);return j.useEffect(function(){if(k){var A=function(){D.current=k.scrollHeight};return k.addEventListener("focus",A,{capture:!0,passive:!0}),function(){return k.removeEventListener("focus",A)}}},[k]),c(function(){var A;return[_t(A=["%cRender%c: Render"]).call(A,Qe(dt("cyan",""))),{animateTo:h,animating:h!==null,sticky:pe,target:k}]}),j.createElement(dc.Provider,{value:Pe},j.createElement(Yh.Provider,{value:z},j.createElement(Qh.Provider,{value:Fe},j.createElement(Jh.Provider,{value:He},j.createElement(Xh.Provider,{value:Ae},r,k&&j.createElement(vT,{debounce:i,name:"scroll",onEvent:ke,target:k}),k&&h!==null&&j.createElement(yT,{name:"scrollTop",onEnd:de,target:k,value:h}))))))};Jm.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:ate},Jm.propTypes={checkInterval:rt.number,children:rt.any,debounce:rt.number,debug:rt.bool,initialScrollBehavior:rt.oneOf(["auto","smooth"]),mode:rt.oneOf(["bottom","top"]),nonce:rt.string,scroller:rt.func};var ute={height:"100%",overflowY:"auto",width:"100%"},Xm=function(t){var n=t.children,r=t.className,i=j.useContext(dc),a=i.setTarget,o=em()(ute);return j.createElement("div",{className:zh(o,(r||"")+""),ref:a},n)};Xm.defaultProps={children:void 0,className:void 0},Xm.propTypes={children:rt.any,className:rt.string};var cte={position:"relative"},Qm=function(t){var n=t.children,r=t.className,i=t.followButtonClassName,a=t.scrollViewClassName,o=em()(cte);return j.createElement("div",{className:zh(o,(r||"")+"")},j.createElement(Xm,{className:(a||"")+""},n),j.createElement(tm,{className:(i||"")+""}))};Qm.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0},Qm.propTypes={children:rt.any,className:rt.string,followButtonClassName:rt.string,scrollViewClassName:rt.string};var ev=function(t){var n=t.checkInterval,r=t.children,i=t.className,a=t.debounce,o=t.debug,s=t.followButtonClassName,u=t.initialScrollBehavior,l=t.mode,c=t.nonce,f=t.scroller,d=t.scrollViewClassName;return j.createElement(Jm,{checkInterval:n,debounce:a,debug:o,initialScrollBehavior:u,mode:l,nonce:c,scroller:f},j.createElement(Qm,{className:i,followButtonClassName:s,scrollViewClassName:d},r))};ev.defaultProps={checkInterval:void 0,children:void 0,className:void 0,debounce:void 0,debug:void 0,followButtonClassName:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:void 0,scrollViewClassName:void 0},ev.propTypes={checkInterval:rt.number,children:rt.any,className:rt.string,debounce:rt.number,debug:rt.bool,followButtonClassName:rt.string,initialScrollBehavior:rt.oneOf(["auto","smooth"]),mode:rt.oneOf(["bottom","top"]),nonce:rt.string,scroller:rt.func,scrollViewClassName:rt.string},h3();let ET=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");const tv=j.memo(({className:e,messages:t=[],isTyping:n,headerMessage:r,renderers:i,botAvatar:a,botDescription:o,botName:s,sendMessage:u,showMarquee:l=!0,...c})=>{const{messageList:f}=yt,d=j.useMemo(()=>I$(t),[t]);return I.jsxs(ev,{...c,className:Xl(f.container.className,e),followButtonClassName:f.scrollDownButton.button.className,scrollViewClassName:f.viewPort.className,children:[r&&I.jsx("span",{...f.headerMessage,children:r}),l&&I.jsx(d3,{botAvatar:a,botDescription:o,botName:s}),d.map(p=>I.jsx(_p,{renderers:i,sendMessage:u,...p},p.id)),n&&I.jsx(_p,{id:ET(),renderers:i,sendMessage:u,direction:"incoming",timestamp:new Date,block:void 0,sender:{name:s??"",avatar:a},children:I.jsx(a1,{})})]})});tv.displayName="MessageList";const fte=({className:e,...t})=>{const{className:n}=yt.loader;return I.jsx("div",{...t,className:Xl(e,n)})},kT=({connected:e,configuration:t,closeWindow:n,isTyping:r,messages:i,user:a,sendMessage:o,uploadFile:s,isLoading:u,renderers:l,isReadOnly:c,disableComposer:f,restartConversation:d,allowFileUpload:p,...m})=>{const{color:h,fontFamily:y,radius:v,themeMode:g,variant:b,botAvatar:k,botDescription:S,botName:E,composerPlaceholder:O,showPoweredBy:L}=t,D={color:h,fontFamily:y,radius:v,themeMode:g,variant:b},T=j.useMemo(()=>i.map(P=>{const{authorId:V}=P,$=V===a.id?"outgoing":"incoming";return{...P,direction:$,sender:$==="outgoing"?{name:a.name??"You",avatar:a.pictureUrl}:{name:t.botName??"Bot",avatar:t.botAvatar}}}),[t.botAvatar,t.botName,i,a.id,a.name,a.pictureUrl]);return I.jsxs(I.Fragment,{children:[I.jsx(l0,{...D}),I.jsxs(gp,{connected:e,...m,children:[I.jsx(i1,{closeWindow:n,configuration:t,restartConversation:d}),u?I.jsx(fte,{}):I.jsx(I.Fragment,{children:I.jsx(tv,{botAvatar:k,botDescription:S,botName:E,renderers:l,isTyping:r,sendMessage:o,messages:T})}),I.jsx(o0,{sendMessage:o,uploadFile:s,connected:e,isReadOnly:c,disableComposer:f,showPoweredBy:L,composerPlaceholder:O,allowFileUpload:p})]})]})};function TT(e,t){return function(){return e.apply(t,arguments)}}const{toString:OT}=Object.prototype,{getPrototypeOf:nv}=Object,rv=(e=>t=>{const n=OT.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),zr=e=>(e=e.toLowerCase(),t=>rv(t)===e),jc=e=>t=>typeof t===e,{isArray:za}=Array,Ps=jc("undefined");function dte(e){return e!==null&&!Ps(e)&&e.constructor!==null&&!Ps(e.constructor)&&Hi(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const CT=zr("ArrayBuffer");function pte(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&CT(e.buffer),t}const hte=jc("string"),Hi=jc("function"),$T=jc("number"),iv=e=>e!==null&&typeof e=="object",mte=e=>e===!0||e===!1,Lc=e=>{if(rv(e)!=="object")return!1;const t=nv(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},vte=zr("Date"),yte=zr("File"),gte=zr("Blob"),bte=zr("FileList"),xte=e=>iv(e)&&Hi(e.pipe),wte=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||OT.call(e)===t||Hi(e.toString)&&e.toString()===t)},Ste=zr("URLSearchParams"),_te=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function As(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),za(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let s;for(r=0;r<o;r++)s=a[r],t.call(null,e[s],s,e)}}function IT(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 RT=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,PT=e=>!Ps(e)&&e!==RT;function av(){const{caseless:e}=PT(this)&&this||{},t={},n=(r,i)=>{const a=e&&IT(t,i)||i;Lc(t[a])&&Lc(r)?t[a]=av(t[a],r):Lc(r)?t[a]=av({},r):za(r)?t[a]=r.slice():t[a]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&As(arguments[r],n);return t}const Ete=(e,t,n,{allOwnKeys:r}={})=>(As(t,(i,a)=>{n&&Hi(i)?e[a]=TT(i,n):e[a]=i},{allOwnKeys:r}),e),kte=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Tte=(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)},Ote=(e,t,n,r)=>{let i,a,o;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&nv(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Cte=(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},$te=e=>{if(!e)return null;if(za(e))return e;let t=e.length;if(!$T(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Ite=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&nv(Uint8Array)),Rte=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},Pte=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Ate=zr("HTMLFormElement"),Nte=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),AT=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Dte=zr("RegExp"),NT=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};As(n,(i,a)=>{t(i,a,e)!==!1&&(r[a]=i)}),Object.defineProperties(e,r)},G={isArray:za,isArrayBuffer:CT,isBuffer:dte,isFormData:wte,isArrayBufferView:pte,isString:hte,isNumber:$T,isBoolean:mte,isObject:iv,isPlainObject:Lc,isUndefined:Ps,isDate:vte,isFile:yte,isBlob:gte,isRegExp:Dte,isFunction:Hi,isStream:xte,isURLSearchParams:Ste,isTypedArray:Ite,isFileList:bte,forEach:As,merge:av,extend:Ete,trim:_te,stripBOM:kte,inherits:Tte,toFlatObject:Ote,kindOf:rv,kindOfTest:zr,endsWith:Cte,toArray:$te,forEachEntry:Rte,matchAll:Pte,isHTMLForm:Ate,hasOwnProperty:AT,hasOwnProp:AT,reduceDescriptors:NT,freezeMethods:e=>{NT(e,(t,n)=>{if(Hi(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Hi(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(a=>{n[a]=!0})};return za(e)?r(e):r(String(e).split(t)),n},toCamelCase:Nte,noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:IT,global:RT,isContextDefined:PT,toJSONObject:e=>{const t=new Array(10),n=(r,i)=>{if(iv(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const a=za(r)?[]:{};return As(r,(o,s)=>{const u=n(o,i+1);!Ps(u)&&(a[s]=u)}),t[i]=void 0,a}}return r};return n(e,0)}};function it(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)}G.inherits(it,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:G.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const DT=it.prototype,MT={};["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=>{MT[e]={value:e}}),Object.defineProperties(it,MT),Object.defineProperty(DT,"isAxiosError",{value:!0}),it.from=(e,t,n,r,i,a)=>{const o=Object.create(DT);return G.toFlatObject(e,o,function(u){return u!==Error.prototype},s=>s!=="isAxiosError"),it.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};var Mte=typeof self=="object"?self.FormData:window.FormData;const jte=Ke(Mte);function ov(e){return G.isPlainObject(e)||G.isArray(e)}function jT(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function LT(e,t,n){return e?e.concat(t).map(function(i,a){return i=jT(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function Lte(e){return G.isArray(e)&&!e.some(ov)}const Fte=G.toFlatObject(G,{},null,function(t){return/^is[A-Z]/.test(t)});function Bte(e){return e&&G.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function Fc(e,t,n){if(!G.isObject(e))throw new TypeError("target must be an object");t=t||new(jte||FormData),n=G.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,y){return!G.isUndefined(y[h])});const r=n.metaTokens,i=n.visitor||c,a=n.dots,o=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&Bte(t);if(!G.isFunction(i))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(G.isDate(m))return m.toISOString();if(!u&&G.isBlob(m))throw new it("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(m)||G.isTypedArray(m)?u&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function c(m,h,y){let v=m;if(m&&!y&&typeof m=="object"){if(G.endsWith(h,"{}"))h=r?h:h.slice(0,-2),m=JSON.stringify(m);else if(G.isArray(m)&&Lte(m)||G.isFileList(m)||G.endsWith(h,"[]")&&(v=G.toArray(m)))return h=jT(h),v.forEach(function(b,k){!(G.isUndefined(b)||b===null)&&t.append(o===!0?LT([h],k,a):o===null?h:h+"[]",l(b))}),!1}return ov(m)?!0:(t.append(LT(y,h,a),l(m)),!1)}const f=[],d=Object.assign(Fte,{defaultVisitor:c,convertValue:l,isVisitable:ov});function p(m,h){if(!G.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+h.join("."));f.push(m),G.forEach(m,function(v,g){(!(G.isUndefined(v)||v===null)&&i.call(t,v,G.isString(g)?g.trim():g,h,d))===!0&&p(v,h?h.concat(g):[g])}),f.pop()}}if(!G.isObject(e))throw new TypeError("data must be an object");return p(e),t}function FT(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function sv(e,t){this._pairs=[],e&&Fc(e,this,t)}const BT=sv.prototype;BT.append=function(t,n){this._pairs.push([t,n])},BT.toString=function(t){const n=t?function(r){return t.call(this,r,FT)}:FT;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Ute(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function UT(e,t,n){if(!t)return e;const r=n&&n.encode||Ute,i=n&&n.serialize;let a;if(i?a=i(t,n):a=G.isURLSearchParams(t)?t.toString():new sv(t,n).toString(r),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class zT{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){G.forEach(this.handlers,function(r){r!==null&&t(r)})}}const qT={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},zte=typeof URLSearchParams<"u"?URLSearchParams:sv,qte=FormData,Vte=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),Hte=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",xr={isBrowser:!0,classes:{URLSearchParams:zte,FormData:qte,Blob},isStandardBrowserEnv:Vte,isStandardBrowserWebWorkerEnv:Hte,protocols:["http","https","file","blob","url","data"]};function Wte(e,t){return Fc(e,new xr.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,a){return xr.isNode&&G.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function Zte(e){return G.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Kte(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function VT(e){function t(n,r,i,a){let o=n[a++];const s=Number.isFinite(+o),u=a>=n.length;return o=!o&&G.isArray(i)?i.length:o,u?(G.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!s):((!i[o]||!G.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],a)&&G.isArray(i[o])&&(i[o]=Kte(i[o])),!s)}if(G.isFormData(e)&&G.isFunction(e.entries)){const n={};return G.forEachEntry(e,(r,i)=>{t(Zte(r),i,n,0)}),n}return null}const Gte={"Content-Type":void 0};function Yte(e,t,n){if(G.isString(e))try{return(t||JSON.parse)(e),G.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const qa={transitional:qT,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,a=G.isObject(t);if(a&&G.isHTMLForm(t)&&(t=new FormData(t)),G.isFormData(t))return i&&i?JSON.stringify(VT(t)):t;if(G.isArrayBuffer(t)||G.isBuffer(t)||G.isStream(t)||G.isFile(t)||G.isBlob(t))return t;if(G.isArrayBufferView(t))return t.buffer;if(G.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Wte(t,this.formSerializer).toString();if((s=G.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Fc(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}return a||i?(n.setContentType("application/json",!1),Yte(t)):t}],transformResponse:[function(t){const n=this.transitional||qa.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&G.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(o)throw s.name==="SyntaxError"?it.from(s,it.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:xr.classes.FormData,Blob:xr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};G.forEach(["delete","get","head"],function(t){qa.headers[t]={}}),G.forEach(["post","put","patch"],function(t){qa.headers[t]=G.merge(Gte)});const Jte=G.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"]),Xte=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
345
|
-
`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&
|
|
346
|
-
`)}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[HT]=this[HT]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=Ns(o);r[s]||(nne(i,o),r[s]=!0)}return G.isArray(t)?t.forEach(a):a(t),this}}Ln.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),G.freezeMethods(Ln.prototype),G.freezeMethods(Ln);function lv(e,t){const n=this||qa,r=t||n,i=Ln.from(r.headers);let a=r.data;return G.forEach(e,function(s){a=s.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function ZT(e){return!!(e&&e.__CANCEL__)}function Ds(e,t,n){it.call(this,e??"canceled",it.ERR_CANCELED,t,n),this.name="CanceledError"}G.inherits(Ds,it,{__CANCEL__:!0});const rne=null;function ine(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new it("Request failed with status code "+n.status,[it.ERR_BAD_REQUEST,it.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const ane=xr.isStandardBrowserEnv?function(){return{write:function(n,r,i,a,o,s){const u=[];u.push(n+"="+encodeURIComponent(r)),G.isNumber(i)&&u.push("expires="+new Date(i).toGMTString()),G.isString(a)&&u.push("path="+a),G.isString(o)&&u.push("domain="+o),s===!0&&u.push("secure"),document.cookie=u.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 one(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function sne(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function KT(e,t){return e&&!one(t)?sne(e,t):t}const lne=xr.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(a){let o=a;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{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(o){const s=G.isString(o)?i(o):o;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function une(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function cne(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(u){const l=Date.now(),c=r[a];o||(o=l),n[i]=u,r[i]=l;let f=a,d=0;for(;f!==i;)d+=n[f++],f=f%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),l-o<t)return;const p=c&&l-c;return p?Math.round(d*1e3/p):void 0}}function GT(e,t){let n=0;const r=cne(50,250);return i=>{const a=i.loaded,o=i.lengthComputable?i.total:void 0,s=a-n,u=r(s),l=a<=o;n=a;const c={loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:u||void 0,estimated:u&&o&&l?(o-a)/u:void 0,event:i};c[t?"download":"upload"]=!0,e(c)}}const Uc={http:rne,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let i=e.data;const a=Ln.from(e.headers).normalize(),o=e.responseType;let s;function u(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}G.isFormData(i)&&(xr.isStandardBrowserEnv||xr.isStandardBrowserWebWorkerEnv)&&a.setContentType(!1);let l=new XMLHttpRequest;if(e.auth){const p=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(p+":"+m))}const c=KT(e.baseURL,e.url);l.open(e.method.toUpperCase(),UT(c,e.params,e.paramsSerializer),!0),l.timeout=e.timeout;function f(){if(!l)return;const p=Ln.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),h={data:!o||o==="text"||o==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:p,config:e,request:l};ine(function(v){n(v),u()},function(v){r(v),u()},h),l=null}if("onloadend"in l?l.onloadend=f:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(f)},l.onabort=function(){l&&(r(new it("Request aborted",it.ECONNABORTED,e,l)),l=null)},l.onerror=function(){r(new it("Network Error",it.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let m=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const h=e.transitional||qT;e.timeoutErrorMessage&&(m=e.timeoutErrorMessage),r(new it(m,h.clarifyTimeoutError?it.ETIMEDOUT:it.ECONNABORTED,e,l)),l=null},xr.isStandardBrowserEnv){const p=(e.withCredentials||lne(c))&&e.xsrfCookieName&&ane.read(e.xsrfCookieName);p&&a.set(e.xsrfHeaderName,p)}i===void 0&&a.setContentType(null),"setRequestHeader"in l&&G.forEach(a.toJSON(),function(m,h){l.setRequestHeader(h,m)}),G.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),o&&o!=="json"&&(l.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&l.addEventListener("progress",GT(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",GT(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=p=>{l&&(r(!p||p.type?new Ds(null,e,l):p),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const d=une(c);if(d&&xr.protocols.indexOf(d)===-1){r(new it("Unsupported protocol "+d+":",it.ERR_BAD_REQUEST,e));return}l.send(i||null)})}};G.forEach(Uc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const fne={getAdapter:e=>{e=G.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let i=0;i<t&&(n=e[i],!(r=G.isString(n)?Uc[n.toLowerCase()]:n));i++);if(!r)throw r===!1?new it(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(G.hasOwnProp(Uc,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!G.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:Uc};function uv(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ds(null,e)}function YT(e){return uv(e),e.headers=Ln.from(e.headers),e.data=lv.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),fne.getAdapter(e.adapter||qa.adapter)(e).then(function(r){return uv(e),r.data=lv.call(e,e.transformResponse,r),r.headers=Ln.from(r.headers),r},function(r){return ZT(r)||(uv(e),r&&r.response&&(r.response.data=lv.call(e,e.transformResponse,r.response),r.response.headers=Ln.from(r.response.headers))),Promise.reject(r)})}const JT=e=>e instanceof Ln?e.toJSON():e;function Va(e,t){t=t||{};const n={};function r(l,c,f){return G.isPlainObject(l)&&G.isPlainObject(c)?G.merge.call({caseless:f},l,c):G.isPlainObject(c)?G.merge({},c):G.isArray(c)?c.slice():c}function i(l,c,f){if(G.isUndefined(c)){if(!G.isUndefined(l))return r(void 0,l,f)}else return r(l,c,f)}function a(l,c){if(!G.isUndefined(c))return r(void 0,c)}function o(l,c){if(G.isUndefined(c)){if(!G.isUndefined(l))return r(void 0,l)}else return r(void 0,c)}function s(l,c,f){if(f in t)return r(l,c);if(f in e)return r(void 0,l)}const u={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(l,c)=>i(JT(l),JT(c),!0)};return G.forEach(Object.keys(e).concat(Object.keys(t)),function(c){const f=u[c]||i,d=f(e[c],t[c],c);G.isUndefined(d)&&f!==s||(n[c]=d)}),n}const XT="1.2.5",cv={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{cv[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const QT={};cv.transitional=function(t,n,r){function i(a,o){return"[Axios v"+XT+"] Transitional option '"+a+"'"+o+(r?". "+r:"")}return(a,o,s)=>{if(t===!1)throw new it(i(o," has been removed"+(n?" in "+n:"")),it.ERR_DEPRECATED);return n&&!QT[o]&&(QT[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,o,s):!0}};function dne(e,t,n){if(typeof e!="object")throw new it("options must be an object",it.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const a=r[i],o=t[a];if(o){const s=e[a],u=s===void 0||o(s,a,e);if(u!==!0)throw new it("option "+a+" must be "+u,it.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new it("Unknown option "+a,it.ERR_BAD_OPTION)}}const fv={assertOptions:dne,validators:cv},vi=fv.validators;class Wi{constructor(t){this.defaults=t,this.interceptors={request:new zT,response:new zT}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Va(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:a}=n;r!==void 0&&fv.assertOptions(r,{silentJSONParsing:vi.transitional(vi.boolean),forcedJSONParsing:vi.transitional(vi.boolean),clarifyTimeoutError:vi.transitional(vi.boolean)},!1),i!==void 0&&fv.assertOptions(i,{encode:vi.function,serialize:vi.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o;o=a&&G.merge(a.common,a[n.method]),o&&G.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),n.headers=Ln.concat(o,a);const s=[];let u=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(u=u&&h.synchronous,s.unshift(h.fulfilled,h.rejected))});const l=[];this.interceptors.response.forEach(function(h){l.push(h.fulfilled,h.rejected)});let c,f=0,d;if(!u){const m=[YT.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,l),d=m.length,c=Promise.resolve(n);f<d;)c=c.then(m[f++],m[f++]);return c}d=s.length;let p=n;for(f=0;f<d;){const m=s[f++],h=s[f++];try{p=m(p)}catch(y){h.call(this,y);break}}try{c=YT.call(this,p)}catch(m){return Promise.reject(m)}for(f=0,d=l.length;f<d;)c=c.then(l[f++],l[f++]);return c}getUri(t){t=Va(this.defaults,t);const n=KT(t.baseURL,t.url);return UT(n,t.params,t.paramsSerializer)}}G.forEach(["delete","get","head","options"],function(t){Wi.prototype[t]=function(n,r){return this.request(Va(r||{},{method:t,url:n,data:(r||{}).data}))}}),G.forEach(["post","put","patch"],function(t){function n(r){return function(a,o,s){return this.request(Va(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}Wi.prototype[t]=n(),Wi.prototype[t+"Form"]=n(!0)});class dv{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(i=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](i);r._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{r.subscribe(s),a=s}).then(i);return o.cancel=function(){r.unsubscribe(a)},o},t(function(a,o,s){r.reason||(r.reason=new Ds(a,o,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 dv(function(i){t=i}),cancel:t}}}function pne(e){return function(n){return e.apply(null,n)}}function hne(e){return G.isObject(e)&&e.isAxiosError===!0}const pv={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(pv).forEach(([e,t])=>{pv[t]=e});function eO(e){const t=new Wi(e),n=TT(Wi.prototype.request,t);return G.extend(n,Wi.prototype,t,{allOwnKeys:!0}),G.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return eO(Va(e,i))},n}const At=eO(qa);At.Axios=Wi,At.CanceledError=Ds,At.CancelToken=dv,At.isCancel=ZT,At.VERSION=XT,At.toFormData=Fc,At.AxiosError=it,At.Cancel=At.CanceledError,At.all=function(t){return Promise.all(t)},At.spread=pne,At.isAxiosError=hne,At.mergeConfig=Va,At.AxiosHeaders=Ln,At.formToJSON=e=>VT(G.isHTMLForm(e)?new FormData(e):e),At.HttpStatusCode=pv,At.default=At;const tO={},mne=Object.freeze(Object.defineProperty({__proto__:null,default:tO},Symbol.toStringTag,{value:"Module"}));var nO=Object,vne=Error,yne=EvalError,gne=RangeError,bne=ReferenceError,rO=SyntaxError,Ha=TypeError,xne=URIError,wne=Math.abs,Sne=Math.floor,_ne=Math.max,Ene=Math.min,kne=Math.pow,Tne=Math.round,One=Number.isNaN||function(t){return t!==t},Cne=One,$ne=function(t){return Cne(t)||t===0?t:t<0?-1:1},Ine=Object.getOwnPropertyDescriptor,zc=Ine;if(zc)try{zc([],"length")}catch{zc=null}var qc=zc,Vc=Object.defineProperty||!1;if(Vc)try{Vc({},"a",{value:1})}catch{Vc=!1}var Hc=Vc,hv,iO;function Rne(){return iO||(iO=1,hv=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(var a 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 s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==i||s.enumerable!==!0)return!1}return!0}),hv}var mv,aO;function Pne(){if(aO)return mv;aO=1;var e=typeof Symbol<"u"&&Symbol,t=Rne();return mv=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},mv}var vv,oO;function sO(){return oO||(oO=1,vv=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),vv}var yv,lO;function uO(){if(lO)return yv;lO=1;var e=nO;return yv=e.getPrototypeOf||null,yv}var gv,cO;function Ane(){if(cO)return gv;cO=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",i=function(u,l){for(var c=[],f=0;f<u.length;f+=1)c[f]=u[f];for(var d=0;d<l.length;d+=1)c[d+u.length]=l[d];return c},a=function(u,l){for(var c=[],f=l,d=0;f<u.length;f+=1,d+=1)c[d]=u[f];return c},o=function(s,u){for(var l="",c=0;c<s.length;c+=1)l+=s[c],c+1<s.length&&(l+=u);return l};return gv=function(u){var l=this;if(typeof l!="function"||t.apply(l)!==r)throw new TypeError(e+l);for(var c=a(arguments,1),f,d=function(){if(this instanceof f){var v=l.apply(this,i(c,arguments));return Object(v)===v?v:this}return l.apply(u,i(c,arguments))},p=n(0,l.length-c.length),m=[],h=0;h<p;h++)m[h]="$"+h;if(f=Function("binder","return function ("+o(m,",")+"){ return binder.apply(this,arguments); }")(d),l.prototype){var y=function(){};y.prototype=l.prototype,f.prototype=new y,y.prototype=null}return f},gv}var bv,fO;function Ms(){if(fO)return bv;fO=1;var e=Ane();return bv=Function.prototype.bind||e,bv}var xv,dO;function wv(){return dO||(dO=1,xv=Function.prototype.call),xv}var Sv,pO;function hO(){return pO||(pO=1,Sv=Function.prototype.apply),Sv}var _v,mO;function Nne(){return mO||(mO=1,_v=typeof Reflect<"u"&&Reflect&&Reflect.apply),_v}var Ev,vO;function Dne(){if(vO)return Ev;vO=1;var e=Ms(),t=hO(),n=wv(),r=Nne();return Ev=r||e.call(n,t),Ev}var kv,yO;function Mne(){if(yO)return kv;yO=1;var e=Ms(),t=Ha,n=wv(),r=Dne();return kv=function(a){if(a.length<1||typeof a[0]!="function")throw new t("a function is required");return r(e,n,a)},kv}var Tv,gO;function jne(){if(gO)return Tv;gO=1;var e=Mne(),t=qc,n;try{n=[].__proto__===Array.prototype}catch(o){if(!o||typeof o!="object"||!("code"in o)||o.code!=="ERR_PROTO_ACCESS")throw o}var r=!!n&&t&&t(Object.prototype,"__proto__"),i=Object,a=i.getPrototypeOf;return Tv=r&&typeof r.get=="function"?e([r.get]):typeof a=="function"?function(s){return a(s==null?s:i(s))}:!1,Tv}var Ov,bO;function Lne(){if(bO)return Ov;bO=1;var e=sO(),t=uO(),n=jne();return Ov=e?function(i){return e(i)}:t?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return t(i)}:n?function(i){return n(i)}:null,Ov}var Cv,xO;function Fne(){if(xO)return Cv;xO=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Ms();return Cv=n.call(e,t),Cv}var Ge,Bne=nO,Une=vne,zne=yne,qne=gne,Vne=bne,Wa=rO,Za=Ha,Hne=xne,Wne=wne,Zne=Sne,Kne=_ne,Gne=Ene,Yne=kne,Jne=Tne,Xne=$ne,wO=Function,$v=function(e){try{return wO('"use strict"; return ('+e+").constructor;")()}catch{}},js=qc,Qne=Hc,Iv=function(){throw new Za},ere=js?function(){try{return arguments.callee,Iv}catch{try{return js(arguments,"callee").get}catch{return Iv}}}():Iv,Ka=Pne()(),Zt=Lne(),tre=uO(),nre=sO(),SO=hO(),Ls=wv(),Ga={},rre=typeof Uint8Array>"u"||!Zt?Ge:Zt(Uint8Array),Zi={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ge:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ge:ArrayBuffer,"%ArrayIteratorPrototype%":Ka&&Zt?Zt([][Symbol.iterator]()):Ge,"%AsyncFromSyncIteratorPrototype%":Ge,"%AsyncFunction%":Ga,"%AsyncGenerator%":Ga,"%AsyncGeneratorFunction%":Ga,"%AsyncIteratorPrototype%":Ga,"%Atomics%":typeof Atomics>"u"?Ge:Atomics,"%BigInt%":typeof BigInt>"u"?Ge:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ge:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ge:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ge:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Une,"%eval%":eval,"%EvalError%":zne,"%Float32Array%":typeof Float32Array>"u"?Ge:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ge:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ge:FinalizationRegistry,"%Function%":wO,"%GeneratorFunction%":Ga,"%Int8Array%":typeof Int8Array>"u"?Ge:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ge:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ge:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ka&&Zt?Zt(Zt([][Symbol.iterator]())):Ge,"%JSON%":typeof JSON=="object"?JSON:Ge,"%Map%":typeof Map>"u"?Ge:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ka||!Zt?Ge:Zt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Bne,"%Object.getOwnPropertyDescriptor%":js,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ge:Promise,"%Proxy%":typeof Proxy>"u"?Ge:Proxy,"%RangeError%":qne,"%ReferenceError%":Vne,"%Reflect%":typeof Reflect>"u"?Ge:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ge:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ka||!Zt?Ge:Zt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ge:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ka&&Zt?Zt(""[Symbol.iterator]()):Ge,"%Symbol%":Ka?Symbol:Ge,"%SyntaxError%":Wa,"%ThrowTypeError%":ere,"%TypedArray%":rre,"%TypeError%":Za,"%Uint8Array%":typeof Uint8Array>"u"?Ge:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ge:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ge:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ge:Uint32Array,"%URIError%":Hne,"%WeakMap%":typeof WeakMap>"u"?Ge:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ge:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ge:WeakSet,"%Function.prototype.call%":Ls,"%Function.prototype.apply%":SO,"%Object.defineProperty%":Qne,"%Object.getPrototypeOf%":tre,"%Math.abs%":Wne,"%Math.floor%":Zne,"%Math.max%":Kne,"%Math.min%":Gne,"%Math.pow%":Yne,"%Math.round%":Jne,"%Math.sign%":Xne,"%Reflect.getPrototypeOf%":nre};if(Zt)try{null.error}catch(e){var ire=Zt(Zt(e));Zi["%Error.prototype%"]=ire}var are=function e(t){var n;if(t==="%AsyncFunction%")n=$v("async function () {}");else if(t==="%GeneratorFunction%")n=$v("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=$v("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Zt&&(n=Zt(i.prototype))}return Zi[t]=n,n},_O={__proto__:null,"%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"]},Fs=Ms(),Wc=Fne(),ore=Fs.call(Ls,Array.prototype.concat),sre=Fs.call(SO,Array.prototype.splice),EO=Fs.call(Ls,String.prototype.replace),Zc=Fs.call(Ls,String.prototype.slice),lre=Fs.call(Ls,RegExp.prototype.exec),ure=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,cre=/\\(\\)?/g,fre=function(t){var n=Zc(t,0,1),r=Zc(t,-1);if(n==="%"&&r!=="%")throw new Wa("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Wa("invalid intrinsic syntax, expected opening `%`");var i=[];return EO(t,ure,function(a,o,s,u){i[i.length]=s?EO(u,cre,"$1"):o||a}),i},dre=function(t,n){var r=t,i;if(Wc(_O,r)&&(i=_O[r],r="%"+i[0]+"%"),Wc(Zi,r)){var a=Zi[r];if(a===Ga&&(a=are(r)),typeof a>"u"&&!n)throw new Za("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:a}}throw new Wa("intrinsic "+t+" does not exist!")},Kc=function(t,n){if(typeof t!="string"||t.length===0)throw new Za("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Za('"allowMissing" argument must be a boolean');if(lre(/^%?[^%]*%?$/,t)===null)throw new Wa("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=fre(t),i=r.length>0?r[0]:"",a=dre("%"+i+"%",n),o=a.name,s=a.value,u=!1,l=a.alias;l&&(i=l[0],sre(r,ore([0,1],l)));for(var c=1,f=!0;c<r.length;c+=1){var d=r[c],p=Zc(d,0,1),m=Zc(d,-1);if((p==='"'||p==="'"||p==="`"||m==='"'||m==="'"||m==="`")&&p!==m)throw new Wa("property names with quotes must have matching quotes");if((d==="constructor"||!f)&&(u=!0),i+="."+d,o="%"+i+"%",Wc(Zi,o))s=Zi[o];else if(s!=null){if(!(d in s)){if(!n)throw new Za("base intrinsic for "+t+" exists, but the property is not available.");return}if(js&&c+1>=r.length){var h=js(s,d);f=!!h,f&&"get"in h&&!("originalValue"in h.get)?s=h.get:s=s[d]}else f=Wc(s,d),s=s[d];f&&!u&&(Zi[o]=s)}}return s},kO={exports:{}},TO=Hc,pre=rO,Ya=Ha,OO=qc,hre=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Ya("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Ya("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Ya("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Ya("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Ya("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Ya("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,u=!!OO&&OO(t,n);if(TO)TO(t,n,{configurable:o===null&&u?u.configurable:!o,enumerable:i===null&&u?u.enumerable:!i,value:r,writable:a===null&&u?u.writable:!a});else if(s||!i&&!a&&!o)t[n]=r;else throw new pre("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Rv=Hc,CO=function(){return!!Rv};CO.hasArrayLengthDefineBug=function(){if(!Rv)return null;try{return Rv([],"length",{value:1}).length!==1}catch{return!0}};var mre=CO,vre=Kc,$O=hre,yre=mre(),IO=qc,RO=Ha,gre=vre("%Math.floor%"),bre=function(t,n){if(typeof t!="function")throw new RO("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||gre(n)!==n)throw new RO("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in t&&IO){var o=IO(t,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(a=!1)}return(i||a||!r)&&(yre?$O(t,"length",n,!0,!0):$O(t,"length",n)),t};(function(e){var t=Ms(),n=Kc,r=bre,i=Ha,a=n("%Function.prototype.apply%"),o=n("%Function.prototype.call%"),s=n("%Reflect.apply%",!0)||t.call(o,a),u=Hc,l=n("%Math.max%");e.exports=function(d){if(typeof d!="function")throw new i("a function is required");var p=s(t,o,arguments);return r(p,1+l(0,d.length-(arguments.length-1)),!0)};var c=function(){return s(t,a,arguments)};u?u(e.exports,"apply",{value:c}):e.exports.apply=c})(kO);var xre=kO.exports,PO=Kc,AO=xre,wre=AO(PO("String.prototype.indexOf")),Sre=function(t,n){var r=PO(t,!!n);return typeof r=="function"&&wre(t,".prototype.")>-1?AO(r):r};const _re=WC(mne);var Pv=typeof Map=="function"&&Map.prototype,Av=Object.getOwnPropertyDescriptor&&Pv?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Gc=Pv&&Av&&typeof Av.get=="function"?Av.get:null,NO=Pv&&Map.prototype.forEach,Nv=typeof Set=="function"&&Set.prototype,Dv=Object.getOwnPropertyDescriptor&&Nv?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Yc=Nv&&Dv&&typeof Dv.get=="function"?Dv.get:null,DO=Nv&&Set.prototype.forEach,Ere=typeof WeakMap=="function"&&WeakMap.prototype,Bs=Ere?WeakMap.prototype.has:null,kre=typeof WeakSet=="function"&&WeakSet.prototype,Us=kre?WeakSet.prototype.has:null,Tre=typeof WeakRef=="function"&&WeakRef.prototype,MO=Tre?WeakRef.prototype.deref:null,Ore=Boolean.prototype.valueOf,Cre=Object.prototype.toString,$re=Function.prototype.toString,Ire=String.prototype.match,Mv=String.prototype.slice,yi=String.prototype.replace,Rre=String.prototype.toUpperCase,jO=String.prototype.toLowerCase,LO=RegExp.prototype.test,FO=Array.prototype.concat,wr=Array.prototype.join,Pre=Array.prototype.slice,BO=Math.floor,jv=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Lv=Object.getOwnPropertySymbols,Fv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ja=typeof Symbol=="function"&&typeof Symbol.iterator=="object",an=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ja||!0)?Symbol.toStringTag:null,UO=Object.prototype.propertyIsEnumerable,zO=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function qO(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||LO.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-BO(-e):BO(e);if(r!==e){var i=String(r),a=Mv.call(t,i.length+1);return yi.call(i,n,"$&_")+"."+yi.call(yi.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return yi.call(t,n,"$&_")}var Bv=_re,VO=Bv.custom,HO=KO(VO)?VO:null,Are=function e(t,n,r,i){var a=n||{};if(gi(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(gi(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=gi(a,"customInspect")?a.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(gi(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(gi(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=a.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 YO(t,a);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var u=String(t);return s?qO(t,u):u}if(typeof t=="bigint"){var l=String(t)+"n";return s?qO(t,l):l}var c=typeof a.depth>"u"?5:a.depth;if(typeof r>"u"&&(r=0),r>=c&&c>0&&typeof t=="object")return Uv(t)?"[Array]":"[Object]";var f=Jre(a,r);if(typeof i>"u")i=[];else if(GO(i,t)>=0)return"[Circular]";function d($,F,M){if(F&&(i=Pre.call(i),i.push(F)),M){var B={depth:a.depth};return gi(a,"quoteStyle")&&(B.quoteStyle=a.quoteStyle),e($,B,r+1,i)}return e($,a,r+1,i)}if(typeof t=="function"&&!ZO(t)){var p=zre(t),m=Jc(t,d);return"[Function"+(p?": "+p:" (anonymous)")+"]"+(m.length>0?" { "+wr.call(m,", ")+" }":"")}if(KO(t)){var h=Ja?yi.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Fv.call(t);return typeof t=="object"&&!Ja?zs(h):h}if(Kre(t)){for(var y="<"+jO.call(String(t.nodeName)),v=t.attributes||[],g=0;g<v.length;g++)y+=" "+v[g].name+"="+WO(Nre(v[g].value),"double",a);return y+=">",t.childNodes&&t.childNodes.length&&(y+="..."),y+="</"+jO.call(String(t.nodeName))+">",y}if(Uv(t)){if(t.length===0)return"[]";var b=Jc(t,d);return f&&!Yre(b)?"["+qv(b,f)+"]":"[ "+wr.call(b,", ")+" ]"}if(Mre(t)){var k=Jc(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!UO.call(t,"cause")?"{ ["+String(t)+"] "+wr.call(FO.call("[cause]: "+d(t.cause),k),", ")+" }":k.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+wr.call(k,", ")+" }"}if(typeof t=="object"&&o){if(HO&&typeof t[HO]=="function"&&Bv)return Bv(t,{depth:c-r});if(o!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(qre(t)){var S=[];return NO&&NO.call(t,function($,F){S.push(d(F,t,!0)+" => "+d($,t))}),JO("Map",Gc.call(t),S,f)}if(Wre(t)){var E=[];return DO&&DO.call(t,function($){E.push(d($,t))}),JO("Set",Yc.call(t),E,f)}if(Vre(t))return zv("WeakMap");if(Zre(t))return zv("WeakSet");if(Hre(t))return zv("WeakRef");if(Lre(t))return zs(d(Number(t)));if(Bre(t))return zs(d(jv.call(t)));if(Fre(t))return zs(Ore.call(t));if(jre(t))return zs(d(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof ht<"u"&&t===ht)return"{ [object globalThis] }";if(!Dre(t)&&!ZO(t)){var O=Jc(t,d),L=zO?zO(t)===Object.prototype:t instanceof Object||t.constructor===Object,D=t instanceof Object?"":"null prototype",T=!L&&an&&Object(t)===t&&an in t?Mv.call(bi(t),8,-1):D?"Object":"",P=L||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",V=P+(T||D?"["+wr.call(FO.call([],T||[],D||[]),": ")+"] ":"");return O.length===0?V+"{}":f?V+"{"+qv(O,f)+"}":V+"{ "+wr.call(O,", ")+" }"}return String(t)};function WO(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function Nre(e){return yi.call(String(e),/"/g,""")}function Uv(e){return bi(e)==="[object Array]"&&(!an||!(typeof e=="object"&&an in e))}function Dre(e){return bi(e)==="[object Date]"&&(!an||!(typeof e=="object"&&an in e))}function ZO(e){return bi(e)==="[object RegExp]"&&(!an||!(typeof e=="object"&&an in e))}function Mre(e){return bi(e)==="[object Error]"&&(!an||!(typeof e=="object"&&an in e))}function jre(e){return bi(e)==="[object String]"&&(!an||!(typeof e=="object"&&an in e))}function Lre(e){return bi(e)==="[object Number]"&&(!an||!(typeof e=="object"&&an in e))}function Fre(e){return bi(e)==="[object Boolean]"&&(!an||!(typeof e=="object"&&an in e))}function KO(e){if(Ja)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Fv)return!1;try{return Fv.call(e),!0}catch{}return!1}function Bre(e){if(!e||typeof e!="object"||!jv)return!1;try{return jv.call(e),!0}catch{}return!1}var Ure=Object.prototype.hasOwnProperty||function(e){return e in this};function gi(e,t){return Ure.call(e,t)}function bi(e){return Cre.call(e)}function zre(e){if(e.name)return e.name;var t=Ire.call($re.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function GO(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 qre(e){if(!Gc||!e||typeof e!="object")return!1;try{Gc.call(e);try{Yc.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function Vre(e){if(!Bs||!e||typeof e!="object")return!1;try{Bs.call(e,Bs);try{Us.call(e,Us)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function Hre(e){if(!MO||!e||typeof e!="object")return!1;try{return MO.call(e),!0}catch{}return!1}function Wre(e){if(!Yc||!e||typeof e!="object")return!1;try{Yc.call(e);try{Gc.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function Zre(e){if(!Us||!e||typeof e!="object")return!1;try{Us.call(e,Us);try{Bs.call(e,Bs)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function Kre(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function YO(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return YO(Mv.call(e,0,t.maxStringLength),t)+r}var i=yi.call(yi.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Gre);return WO(i,"single",t)}function Gre(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":"")+Rre.call(t.toString(16))}function zs(e){return"Object("+e+")"}function zv(e){return e+" { ? }"}function JO(e,t,n,r){var i=r?qv(n,r):wr.call(n,", ");return e+" ("+t+") {"+i+"}"}function Yre(e){for(var t=0;t<e.length;t++)if(GO(e[t],`
|
|
347
|
-
`)>=0)return!1;return!0}function
|
|
340
|
+
*/var Wh,iE;function AW(){if(iE)return Wh;iE=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var u=Object.getOwnPropertyNames(o).map(function(c){return o[c]});if(u.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(c){l[c]=c}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Wh=i()?Object.assign:function(a,o){for(var s,u=r(a),l,c=1;c<arguments.length;c++){s=Object(arguments[c]);for(var f in s)t.call(s,f)&&(u[f]=s[f]);if(e){l=e(s);for(var d=0;d<l.length;d++)n.call(s,l[d])&&(u[l[d]]=s[l[d]])}}return u},Wh}var Zh,aE;function Kh(){if(aE)return Zh;aE=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Zh=e,Zh}var Gh,oE;function NW(){if(oE)return Gh;oE=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Kh(),n={},r=Function.call.bind(Object.prototype.hasOwnProperty);e=function(a){var o="Warning: "+a;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(a,o,s,u,l){if(process.env.NODE_ENV!=="production"){for(var c in a)if(r(a,c)){var f;try{if(typeof a[c]!="function"){var d=Error((u||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[c]+"`.");throw d.name="Invariant Violation",d}f=a[c](o,c,u,s,null,t)}catch(h){f=h}if(f&&!(f instanceof Error)&&e((u||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var p=l?l():"";e("Failed "+s+" type: "+f.message+(p??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Gh=i,Gh}var Yh,sE;function DW(){if(sE)return Yh;sE=1;var e=rE(),t=AW(),n=Kh(),r=NW(),i=Function.call.bind(Object.prototype.hasOwnProperty),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var u="Warning: "+s;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function o(){return null}return Yh=function(s,u){var l=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function f(A){var x=A&&(l&&A[l]||A[c]);if(typeof x=="function")return x}var d="<<anonymous>>",p={array:v("array"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:g(),arrayOf:b,element:k(),elementType:S(),instanceOf:E,node:T(),objectOf:j,oneOf:O,oneOfType:q,shape:I,exact:U};function h(A,x){return A===x?A!==0||1/A===1/x:A!==A&&x!==x}function m(A){this.message=A,this.stack=""}m.prototype=Error.prototype;function y(A){if(process.env.NODE_ENV!=="production")var x={},V=0;function K(J,ne,re,le,pe,he,ue){if(le=le||d,he=he||re,ue!==n){if(u){var Q=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw Q.name="Invariant Violation",Q}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Z=le+":"+re;!x[Z]&&V<3&&(a("You are manually calling a React.PropTypes validation function for the `"+he+"` prop on `"+le+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),x[Z]=!0,V++)}}return ne[re]==null?J?ne[re]===null?new m("The "+pe+" `"+he+"` is marked as required "+("in `"+le+"`, but its value is `null`.")):new m("The "+pe+" `"+he+"` is marked as required in "+("`"+le+"`, but its value is `undefined`.")):null:A(ne,re,le,pe,he)}var _=K.bind(null,!1);return _.isRequired=K.bind(null,!0),_}function v(A){function x(V,K,_,J,ne,re){var le=V[K],pe=N(le);if(pe!==A){var he=L(le);return new m("Invalid "+J+" `"+ne+"` of type "+("`"+he+"` supplied to `"+_+"`, expected ")+("`"+A+"`."))}return null}return y(x)}function g(){return y(o)}function b(A){function x(V,K,_,J,ne){if(typeof A!="function")return new m("Property `"+ne+"` of component `"+_+"` has invalid PropType notation inside arrayOf.");var re=V[K];if(!Array.isArray(re)){var le=N(re);return new m("Invalid "+J+" `"+ne+"` of type "+("`"+le+"` supplied to `"+_+"`, expected an array."))}for(var pe=0;pe<re.length;pe++){var he=A(re,pe,_,J,ne+"["+pe+"]",n);if(he instanceof Error)return he}return null}return y(x)}function k(){function A(x,V,K,_,J){var ne=x[V];if(!s(ne)){var re=N(ne);return new m("Invalid "+_+" `"+J+"` of type "+("`"+re+"` supplied to `"+K+"`, expected a single ReactElement."))}return null}return y(A)}function S(){function A(x,V,K,_,J){var ne=x[V];if(!e.isValidElementType(ne)){var re=N(ne);return new m("Invalid "+_+" `"+J+"` of type "+("`"+re+"` supplied to `"+K+"`, expected a single ReactElement type."))}return null}return y(A)}function E(A){function x(V,K,_,J,ne){if(!(V[K]instanceof A)){var re=A.name||d,le=z(V[K]);return new m("Invalid "+J+" `"+ne+"` of type "+("`"+le+"` supplied to `"+_+"`, expected ")+("instance of `"+re+"`."))}return null}return y(x)}function O(A){if(!Array.isArray(A))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),o;function x(V,K,_,J,ne){for(var re=V[K],le=0;le<A.length;le++)if(h(re,A[le]))return null;var pe=JSON.stringify(A,function(ue,Q){var Z=L(Q);return Z==="symbol"?String(Q):Q});return new m("Invalid "+J+" `"+ne+"` of value `"+String(re)+"` "+("supplied to `"+_+"`, expected one of "+pe+"."))}return y(x)}function j(A){function x(V,K,_,J,ne){if(typeof A!="function")return new m("Property `"+ne+"` of component `"+_+"` has invalid PropType notation inside objectOf.");var re=V[K],le=N(re);if(le!=="object")return new m("Invalid "+J+" `"+ne+"` of type "+("`"+le+"` supplied to `"+_+"`, expected an object."));for(var pe in re)if(i(re,pe)){var he=A(re,pe,_,J,ne+"."+pe,n);if(he instanceof Error)return he}return null}return y(x)}function q(A){if(!Array.isArray(A))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var x=0;x<A.length;x++){var V=A[x];if(typeof V!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+W(V)+" at index "+x+"."),o}function K(_,J,ne,re,le){for(var pe=0;pe<A.length;pe++){var he=A[pe];if(he(_,J,ne,re,le,n)==null)return null}return new m("Invalid "+re+" `"+le+"` supplied to "+("`"+ne+"`."))}return y(K)}function T(){function A(x,V,K,_,J){return R(x[V])?null:new m("Invalid "+_+" `"+J+"` supplied to "+("`"+K+"`, expected a ReactNode."))}return y(A)}function I(A){function x(V,K,_,J,ne){var re=V[K],le=N(re);if(le!=="object")return new m("Invalid "+J+" `"+ne+"` of type `"+le+"` "+("supplied to `"+_+"`, expected `object`."));for(var pe in A){var he=A[pe];if(he){var ue=he(re,pe,_,J,ne+"."+pe,n);if(ue)return ue}}return null}return y(x)}function U(A){function x(V,K,_,J,ne){var re=V[K],le=N(re);if(le!=="object")return new m("Invalid "+J+" `"+ne+"` of type `"+le+"` "+("supplied to `"+_+"`, expected `object`."));var pe=t({},V[K],A);for(var he in pe){var ue=A[he];if(!ue)return new m("Invalid "+J+" `"+ne+"` key `"+he+"` supplied to `"+_+"`.\nBad object: "+JSON.stringify(V[K],null," ")+`
|
|
341
|
+
Valid keys: `+JSON.stringify(Object.keys(A),null," "));var Q=ue(re,he,_,J,ne+"."+he,n);if(Q)return Q}return null}return y(x)}function R(A){switch(typeof A){case"number":case"string":case"undefined":return!0;case"boolean":return!A;case"object":if(Array.isArray(A))return A.every(R);if(A===null||s(A))return!0;var x=f(A);if(x){var V=x.call(A),K;if(x!==A.entries){for(;!(K=V.next()).done;)if(!R(K.value))return!1}else for(;!(K=V.next()).done;){var _=K.value;if(_&&!R(_[1]))return!1}}else return!1;return!0;default:return!1}}function F(A,x){return A==="symbol"?!0:x?x["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&x instanceof Symbol:!1}function N(A){var x=typeof A;return Array.isArray(A)?"array":A instanceof RegExp?"object":F(x,A)?"symbol":x}function L(A){if(typeof A>"u"||A===null)return""+A;var x=N(A);if(x==="object"){if(A instanceof Date)return"date";if(A instanceof RegExp)return"regexp"}return x}function W(A){var x=L(A);switch(x){case"array":case"object":return"an "+x;case"boolean":case"date":case"regexp":return"a "+x;default:return x}}function z(A){return!A.constructor||!A.constructor.name?d:A.constructor.name}return p.checkPropTypes=r,p.resetWarningCache=r.resetWarningCache,p.PropTypes=p,p},Yh}var Jh,lE;function MW(){if(lE)return Jh;lE=1;var e=Kh();function t(){}function n(){}return n.resetWarningCache=t,Jh=function(){function r(o,s,u,l,c,f){if(f!==e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}r.isRequired=r;function i(){return r}var a={array:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},Jh}if(process.env.NODE_ENV!=="production"){var jW=rE(),LW=!0;Hh.exports=DW()(jW.isElement,LW)}else Hh.exports=MW()();var FW=Hh.exports;const rt=Ke(FW);var Xh=M.createContext({scrollTo:function(){return 0},scrollToBottom:function(){return 0},scrollToEnd:function(){return 0},scrollToStart:function(){return 0},scrollToTop:function(){return 0}});Xh.displayName="ScrollToBottomFunctionContext";function BW(){return M.useContext(Xh)}function UW(){var e=BW(),t=e.scrollToEnd;return t}var Qh=M.createContext({atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom"});Qh.displayName="ScrollToBottomState1Context";var em=M.createContext({animating:!1,animatingToEnd:!1,sticky:!0});em.displayName="ScrollToBottomState2Context";var tm=M.createContext({animating:!1,animatingToEnd:!1,atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom",sticky:!0});tm.displayName="ScrollToBottomStateContext";var uE=[tm,Qh,em];function zW(e){return M.useContext(uE[e]||uE[0])}function qW(){var e=zW(2),t=e.sticky;return[t]}var dc=M.createContext({offsetHeight:0,scrollHeight:0,setTarget:function(){return 0},styleToClassName:function(){return""}});dc.displayName="ScrollToBottomInternalContext";function VW(){return M.useContext(dc)}function nm(){var e=VW(),t=e.styleToClassName;return t}var HW={backgroundColor:"rgba(0, 0, 0, .2)",borderRadius:10,borderWidth:0,bottom:5,cursor:"pointer",height:20,outline:0,position:"absolute",right:20,width:20,"&:hover":{backgroundColor:"rgba(0, 0, 0, .4)"},"&:active":{backgroundColor:"rgba(0, 0, 0, .6)"}},rm=function(t){var n=t.children,r=t.className,i=qW(),a=vr(i,1),o=a[0],s=nm()(HW),u=UW();return!o&&M.createElement("button",{className:Vh(s,(r||"")+""),onClick:u,type:"button"},n)};rm.defaultProps={children:void 0,className:""},rm.propTypes={children:rt.any,className:rt.string};var cE={exports:{}},WW=mt,ZW=mn,fE=Yn.f;WW({target:"Object",stat:!0,forced:Object.defineProperty!==fE,sham:!ZW},{defineProperty:fE});var KW=Yt,dE=KW.Object,GW=cE.exports=function(t,n,r){return dE.defineProperty(t,n,r)};dE.defineProperty.sham&&(GW.sham=!0);var YW=cE.exports,JW=YW,pE=JW,XW=pE,QW=XW,e8=QW,t8=e8,n8=t8;const r8=Ke(n8);var i8=cs,a8=i8.f("iterator"),o8=a8,s8=o8,l8=s8,u8=l8,c8=u8,f8=c8,d8=f8;const p8=Ke(d8);function ys(e){"@babel/helpers - typeof";return ys=typeof Ma=="function"&&typeof p8=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Ma=="function"&&t.constructor===Ma&&t!==Ma.prototype?"symbol":typeof t},ys(e)}var h8=cs,m8=h8.f("toPrimitive"),v8=m8,y8=v8,g8=y8,b8=g8,x8=b8,w8=x8,S8=w8;const _8=Ke(S8);function E8(e,t){if(ys(e)!="object"||!e)return e;var n=e[_8];if(n!==void 0){var r=n.call(e,t||"default");if(ys(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function k8(e){var t=E8(e,"string");return ys(t)=="symbol"?t:t+""}function T8(e,t,n){return(t=k8(t))in e?r8(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O8(e){if(Z1(e))return qh(e)}function C8(e){if(typeof Ma<"u"&&U_(e)!=null||e["@@iterator"]!=null)return J_(e)}function $8(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
342
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qe(e){return O8(e)||C8(e)||X_(e)||$8()}var pc=function(e){return e&&e.Math==Math&&e},kn=pc(typeof globalThis=="object"&&globalThis)||pc(typeof window=="object"&&window)||pc(typeof self=="object"&&self)||pc(typeof ht=="object"&&ht)||function(){return this}()||Function("return this")(),im={},Xn=function(e){try{return!!e()}catch{return!0}},I8=Xn,zi=!I8(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),hE={},mE={}.propertyIsEnumerable,vE=Object.getOwnPropertyDescriptor,R8=vE&&!mE.call({1:2},1);hE.f=R8?function(t){var n=vE(this,t);return!!n&&n.enumerable}:mE;var yE=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},P8={}.toString,am=function(e){return P8.call(e).slice(8,-1)},A8=Xn,N8=am,D8="".split,M8=A8(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return N8(e)=="String"?D8.call(e,""):Object(e)}:Object,hc=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},j8=M8,L8=hc,om=function(e){return j8(L8(e))},Mn=function(e){return typeof e=="function"},F8=Mn,gs=function(e){return typeof e=="object"?e!==null:F8(e)},sm=kn,B8=Mn,U8=function(e){return B8(e)?e:void 0},mc=function(e,t){return arguments.length<2?U8(sm[e]):sm[e]&&sm[e][t]},z8=mc,q8=z8("navigator","userAgent")||"",gE=kn,lm=q8,bE=gE.process,xE=gE.Deno,wE=bE&&bE.versions||xE&&xE.version,SE=wE&&wE.v8,yr,vc;SE?(yr=SE.split("."),vc=yr[0]<4?1:yr[0]+yr[1]):lm&&(yr=lm.match(/Edge\/(\d+)/),(!yr||yr[1]>=74)&&(yr=lm.match(/Chrome\/(\d+)/),yr&&(vc=yr[1])));var V8=vc&&+vc,_E=V8,H8=Xn,EE=!!Object.getOwnPropertySymbols&&!H8(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&_E&&_E<41}),W8=EE,kE=W8&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Z8=Mn,K8=mc,G8=kE,TE=G8?function(e){return typeof e=="symbol"}:function(e){var t=K8("Symbol");return Z8(t)&&Object(e)instanceof t},Y8=function(e){try{return String(e)}catch{return"Object"}},J8=Mn,X8=Y8,Q8=function(e){if(J8(e))return e;throw TypeError(X8(e)+" is not a function")},eZ=Q8,OE=function(e,t){var n=e[t];return n==null?void 0:eZ(n)},um=Mn,cm=gs,tZ=function(e,t){var n,r;if(t==="string"&&um(n=e.toString)&&!cm(r=n.call(e))||um(n=e.valueOf)&&!cm(r=n.call(e))||t!=="string"&&um(n=e.toString)&&!cm(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},CE={exports:{}},$E=kn,fm=function(e,t){try{Object.defineProperty($E,e,{value:t,configurable:!0,writable:!0})}catch{$E[e]=t}return t},nZ=kn,rZ=fm,IE="__core-js_shared__",iZ=nZ[IE]||rZ(IE,{}),dm=iZ,RE=dm;(CE.exports=function(e,t){return RE[e]||(RE[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var pm=CE.exports,aZ=hc,PE=function(e){return Object(aZ(e))},oZ=PE,sZ={}.hasOwnProperty,qi=Object.hasOwn||function(t,n){return sZ.call(oZ(t),n)},lZ=0,uZ=Math.random(),AE=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++lZ+uZ).toString(36)},cZ=kn,fZ=pm,NE=qi,dZ=AE,DE=EE,pZ=kE,bs=fZ("wks"),xs=cZ.Symbol,hZ=pZ?xs:xs&&xs.withoutSetter||dZ,ws=function(e){return(!NE(bs,e)||!(DE||typeof bs[e]=="string"))&&(DE&&NE(xs,e)?bs[e]=xs[e]:bs[e]=hZ("Symbol."+e)),bs[e]},ME=gs,jE=TE,mZ=OE,vZ=tZ,yZ=ws,gZ=yZ("toPrimitive"),bZ=function(e,t){if(!ME(e)||jE(e))return e;var n=mZ(e,gZ),r;if(n){if(t===void 0&&(t="default"),r=n.call(e,t),!ME(r)||jE(r))return r;throw TypeError("Can't convert object to primitive value")}return t===void 0&&(t="number"),vZ(e,t)},xZ=bZ,wZ=TE,LE=function(e){var t=xZ(e,"string");return wZ(t)?t:String(t)},SZ=kn,FE=gs,hm=SZ.document,_Z=FE(hm)&&FE(hm.createElement),BE=function(e){return _Z?hm.createElement(e):{}},EZ=zi,kZ=Xn,TZ=BE,UE=!EZ&&!kZ(function(){return Object.defineProperty(TZ("div"),"a",{get:function(){return 7}}).a!=7}),OZ=zi,CZ=hE,$Z=yE,IZ=om,RZ=LE,PZ=qi,AZ=UE,zE=Object.getOwnPropertyDescriptor;im.f=OZ?zE:function(t,n){if(t=IZ(t),n=RZ(n),AZ)try{return zE(t,n)}catch{}if(PZ(t,n))return $Z(!CZ.f.call(t,n),t[n])};var Ss={},NZ=gs,pi=function(e){if(NZ(e))return e;throw TypeError(String(e)+" is not an object")},DZ=zi,MZ=UE,qE=pi,jZ=LE,VE=Object.defineProperty;Ss.f=DZ?VE:function(t,n,r){if(qE(t),n=jZ(n),qE(r),MZ)try{return VE(t,n,r)}catch{}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var LZ=zi,FZ=Ss,BZ=yE,yc=LZ?function(e,t,n){return FZ.f(e,t,BZ(1,n))}:function(e,t,n){return e[t]=n,e},HE={exports:{}},UZ=Mn,mm=dm,zZ=Function.toString;UZ(mm.inspectSource)||(mm.inspectSource=function(e){return zZ.call(e)});var WE=mm.inspectSource,qZ=kn,VZ=Mn,HZ=WE,ZE=qZ.WeakMap,WZ=VZ(ZE)&&/native code/.test(HZ(ZE)),ZZ=pm,KZ=AE,KE=ZZ("keys"),GE=function(e){return KE[e]||(KE[e]=KZ(e))},vm={},GZ=WZ,YZ=kn,JZ=gs,XZ=yc,ym=qi,gm=dm,QZ=GE,eK=vm,YE="Object already initialized",tK=YZ.WeakMap,gc,_s,bc,nK=function(e){return bc(e)?_s(e):gc(e,{})},rK=function(e){return function(t){var n;if(!JZ(t)||(n=_s(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}};if(GZ||gm.state){var Vi=gm.state||(gm.state=new tK),iK=Vi.get,JE=Vi.has,aK=Vi.set;gc=function(e,t){if(JE.call(Vi,e))throw new TypeError(YE);return t.facade=e,aK.call(Vi,e,t),t},_s=function(e){return iK.call(Vi,e)||{}},bc=function(e){return JE.call(Vi,e)}}else{var ja=QZ("state");eK[ja]=!0,gc=function(e,t){if(ym(e,ja))throw new TypeError(YE);return t.facade=e,XZ(e,ja,t),t},_s=function(e){return ym(e,ja)?e[ja]:{}},bc=function(e){return ym(e,ja)}}var XE={set:gc,get:_s,has:bc,enforce:nK,getterFor:rK},bm=zi,oK=qi,QE=Function.prototype,sK=bm&&Object.getOwnPropertyDescriptor,xm=oK(QE,"name"),lK=xm&&(function(){}).name==="something",uK=xm&&(!bm||bm&&sK(QE,"name").configurable),wm={EXISTS:xm,PROPER:lK,CONFIGURABLE:uK},cK=kn,ek=Mn,fK=qi,tk=yc,dK=fm,pK=WE,nk=XE,hK=wm.CONFIGURABLE,mK=nk.get,vK=nk.enforce,yK=String(String).split("String");(HE.exports=function(e,t,n,r){var i=r?!!r.unsafe:!1,a=r?!!r.enumerable:!1,o=r?!!r.noTargetGet:!1,s=r&&r.name!==void 0?r.name:t,u;if(ek(n)&&(String(s).slice(0,7)==="Symbol("&&(s="["+String(s).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!fK(n,"name")||hK&&n.name!==s)&&tk(n,"name",s),u=vK(n),u.source||(u.source=yK.join(typeof s=="string"?s:""))),e===cK){a?e[t]=n:dK(t,n);return}else i?!o&&e[t]&&(a=!0):delete e[t];a?e[t]=n:tk(e,t,n)})(Function.prototype,"toString",function(){return ek(this)&&mK(this).source||pK(this)});var Es=HE.exports,rk={},gK=Math.ceil,bK=Math.floor,xc=function(e){var t=+e;return t!==t||t===0?0:(t>0?bK:gK)(t)},xK=xc,wK=Math.max,SK=Math.min,_K=function(e,t){var n=xK(e);return n<0?wK(n+t,0):SK(n,t)},EK=xc,kK=Math.min,ik=function(e){return e>0?kK(EK(e),9007199254740991):0},TK=ik,OK=function(e){return TK(e.length)},CK=om,$K=_K,IK=OK,ak=function(e){return function(t,n,r){var i=CK(t),a=IK(i),o=$K(r,a),s;if(e&&n!=n){for(;a>o;)if(s=i[o++],s!=s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},RK={includes:ak(!0),indexOf:ak(!1)},Sm=qi,PK=om,AK=RK.indexOf,NK=vm,ok=function(e,t){var n=PK(e),r=0,i=[],a;for(a in n)!Sm(NK,a)&&Sm(n,a)&&i.push(a);for(;t.length>r;)Sm(n,a=t[r++])&&(~AK(i,a)||i.push(a));return i},_m=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],DK=ok,MK=_m,jK=MK.concat("length","prototype");rk.f=Object.getOwnPropertyNames||function(t){return DK(t,jK)};var sk={};sk.f=Object.getOwnPropertySymbols;var LK=mc,FK=rk,BK=sk,UK=pi,zK=LK("Reflect","ownKeys")||function(t){var n=FK.f(UK(t)),r=BK.f;return r?n.concat(r(t)):n},qK=qi,VK=zK,HK=im,WK=Ss,ZK=function(e,t){for(var n=VK(t),r=WK.f,i=HK.f,a=0;a<n.length;a++){var o=n[a];qK(e,o)||r(e,o,i(t,o))}},KK=Xn,GK=Mn,YK=/#|\.prototype\./,ks=function(e,t){var n=XK[JK(e)];return n==eG?!0:n==QK?!1:GK(t)?KK(t):!!t},JK=ks.normalize=function(e){return String(e).replace(YK,".").toLowerCase()},XK=ks.data={},QK=ks.NATIVE="N",eG=ks.POLYFILL="P",tG=ks,Em=kn,nG=im.f,rG=yc,iG=Es,aG=fm,oG=ZK,sG=tG,lG=function(e,t){var n=e.target,r=e.global,i=e.stat,a,o,s,u,l,c;if(r?o=Em:i?o=Em[n]||aG(n,{}):o=(Em[n]||{}).prototype,o)for(s in t){if(l=t[s],e.noTargetGet?(c=nG(o,s),u=c&&c.value):u=o[s],a=sG(r?s:n+(i?".":"#")+s,e.forced),!a&&u!==void 0){if(typeof l==typeof u)continue;oG(l,u)}(e.sham||u&&u.sham)&&rG(l,"sham",!0),iG(o,s,l,e)}},uG=ws,cG=uG("toStringTag"),lk={};lk[cG]="z";var km=String(lk)==="[object z]",fG=km,dG=Mn,wc=am,pG=ws,hG=pG("toStringTag"),mG=wc(function(){return arguments}())=="Arguments",vG=function(e,t){try{return e[t]}catch{}},uk=fG?wc:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=vG(t=Object(e),hG))=="string"?n:mG?wc(t):(r=wc(t))=="Object"&&dG(t.callee)?"Arguments":r},yG=uk,Sc=function(e){if(yG(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return String(e)},gG=pi,ck=function(){var e=gG(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},Tm={},fk=Xn,bG=kn,dk=bG.RegExp;Tm.UNSUPPORTED_Y=fk(function(){var e=dk("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),Tm.BROKEN_CARET=fk(function(){var e=dk("^r","gy");return e.lastIndex=2,e.exec("str")!=null});var xG=ok,wG=_m,SG=Object.keys||function(t){return xG(t,wG)},_G=zi,EG=Ss,kG=pi,TG=SG,OG=_G?Object.defineProperties:function(t,n){kG(t);for(var r=TG(n),i=r.length,a=0,o;i>a;)EG.f(t,o=r[a++],n[o]);return t},CG=mc,$G=CG("document","documentElement"),IG=pi,RG=OG,pk=_m,PG=vm,AG=$G,NG=BE,DG=GE,hk=">",mk="<",Om="prototype",Cm="script",vk=DG("IE_PROTO"),$m=function(){},yk=function(e){return mk+Cm+hk+e+mk+"/"+Cm+hk},gk=function(e){e.write(yk("")),e.close();var t=e.parentWindow.Object;return e=null,t},MG=function(){var e=NG("iframe"),t="java"+Cm+":",n;return e.style.display="none",AG.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(yk("document.F=Object")),n.close(),n.F},_c,Ec=function(){try{_c=new ActiveXObject("htmlfile")}catch{}Ec=typeof document<"u"?document.domain&&_c?gk(_c):MG():gk(_c);for(var e=pk.length;e--;)delete Ec[Om][pk[e]];return Ec()};PG[vk]=!0;var jG=Object.create||function(t,n){var r;return t!==null?($m[Om]=IG(t),r=new $m,$m[Om]=null,r[vk]=t):r=Ec(),n===void 0?r:RG(r,n)},LG=Xn,FG=kn,BG=FG.RegExp,UG=LG(function(){var e=BG(".","s");return!(e.dotAll&&e.exec(`
|
|
343
|
+
`)&&e.flags==="s")}),zG=Xn,qG=kn,VG=qG.RegExp,HG=zG(function(){var e=VG("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),WG=Sc,ZG=ck,bk=Tm,KG=pm,GG=jG,YG=XE.get,JG=UG,XG=HG,kc=RegExp.prototype.exec,QG=KG("native-string-replace",String.prototype.replace),Im=kc,Rm=function(){var e=/a/,t=/b*/g;return kc.call(e,"a"),kc.call(t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),xk=bk.UNSUPPORTED_Y||bk.BROKEN_CARET,Pm=/()??/.exec("")[1]!==void 0,eY=Rm||Pm||xk||JG||XG;eY&&(Im=function(t){var n=this,r=YG(n),i=WG(t),a=r.raw,o,s,u,l,c,f,d;if(a)return a.lastIndex=n.lastIndex,o=Im.call(a,i),n.lastIndex=a.lastIndex,o;var p=r.groups,h=xk&&n.sticky,m=ZG.call(n),y=n.source,v=0,g=i;if(h&&(m=m.replace("y",""),m.indexOf("g")===-1&&(m+="g"),g=i.slice(n.lastIndex),n.lastIndex>0&&(!n.multiline||n.multiline&&i.charAt(n.lastIndex-1)!==`
|
|
344
|
+
`)&&(y="(?: "+y+")",g=" "+g,v++),s=new RegExp("^(?:"+y+")",m)),Pm&&(s=new RegExp("^"+y+"$(?!\\s)",m)),Rm&&(u=n.lastIndex),l=kc.call(h?s:n,g),h?l?(l.input=l.input.slice(v),l[0]=l[0].slice(v),l.index=n.lastIndex,n.lastIndex+=l[0].length):n.lastIndex=0:Rm&&l&&(n.lastIndex=n.global?l.index+l[0].length:u),Pm&&l&&l.length>1&&QG.call(l[0],s,function(){for(c=1;c<arguments.length-2;c++)arguments[c]===void 0&&(l[c]=void 0)}),l&&p)for(l.groups=f=GG(null),c=0;c<p.length;c++)d=p[c],f[d[0]]=l[d[1]];return l});var Am=Im,tY=lG,wk=Am;tY({target:"RegExp",proto:!0,forced:/./.exec!==wk},{exec:wk});var Sk=Es,nY=Am,_k=Xn,Ek=ws,rY=yc,iY=Ek("species"),Nm=RegExp.prototype,aY=function(e,t,n,r){var i=Ek(e),a=!_k(function(){var l={};return l[i]=function(){return 7},""[e](l)!=7}),o=a&&!_k(function(){var l=!1,c=/a/;return e==="split"&&(c={},c.constructor={},c.constructor[iY]=function(){return c},c.flags="",c[i]=/./[i]),c.exec=function(){return l=!0,null},c[i](""),!l});if(!a||!o||n){var s=/./[i],u=t(i,""[e],function(l,c,f,d,p){var h=c.exec;return h===nY||h===Nm.exec?a&&!p?{done:!0,value:s.call(c,f,d)}:{done:!0,value:l.call(f,c,d)}:{done:!1}});Sk(String.prototype,e,u[0]),Sk(Nm,i,u[1])}r&&rY(Nm[i],"sham",!0)},oY=xc,sY=Sc,lY=hc,kk=function(e){return function(t,n){var r=sY(lY(t)),i=oY(n),a=r.length,o,s;return i<0||i>=a?e?"":void 0:(o=r.charCodeAt(i),o<55296||o>56319||i+1===a||(s=r.charCodeAt(i+1))<56320||s>57343?e?r.charAt(i):o:e?r.slice(i,i+2):(o-55296<<10)+(s-56320)+65536)}},uY={codeAt:kk(!1),charAt:kk(!0)},cY=uY.charAt,fY=function(e,t,n){return t+(n?cY(e,t).length:1)},dY=PE,pY=Math.floor,hY="".replace,mY=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,vY=/\$([$&'`]|\d{1,2})/g,yY=function(e,t,n,r,i,a){var o=n+e.length,s=r.length,u=vY;return i!==void 0&&(i=dY(i),u=mY),hY.call(a,u,function(l,c){var f;switch(c.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(o);case"<":f=i[c.slice(1,-1)];break;default:var d=+c;if(d===0)return l;if(d>s){var p=pY(d/10);return p===0?l:p<=s?r[p-1]===void 0?c.charAt(1):r[p-1]+c.charAt(1):l}f=r[d-1]}return f===void 0?"":f})},gY=pi,bY=Mn,xY=am,wY=Am,SY=function(e,t){var n=e.exec;if(bY(n)){var r=n.call(e,t);return r!==null&&gY(r),r}if(xY(e)==="RegExp")return wY.call(e,t);throw TypeError("RegExp#exec called on incompatible receiver")},_Y=aY,EY=Xn,kY=pi,TY=Mn,OY=xc,CY=ik,La=Sc,$Y=hc,IY=fY,RY=OE,PY=yY,AY=SY,NY=ws,Dm=NY("replace"),DY=Math.max,MY=Math.min,jY=function(e){return e===void 0?e:String(e)},LY=function(){return"a".replace(/./,"$0")==="$0"}(),Tk=function(){return/./[Dm]?/./[Dm]("a","$0")==="":!1}(),FY=!EY(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});_Y("replace",function(e,t,n){var r=Tk?"$":"$0";return[function(a,o){var s=$Y(this),u=a==null?void 0:RY(a,Dm);return u?u.call(a,s,o):t.call(La(s),a,o)},function(i,a){var o=kY(this),s=La(i);if(typeof a=="string"&&a.indexOf(r)===-1&&a.indexOf("$<")===-1){var u=n(t,o,s,a);if(u.done)return u.value}var l=TY(a);l||(a=La(a));var c=o.global;if(c){var f=o.unicode;o.lastIndex=0}for(var d=[];;){var p=AY(o,s);if(p===null||(d.push(p),!c))break;var h=La(p[0]);h===""&&(o.lastIndex=IY(s,CY(o.lastIndex),f))}for(var m="",y=0,v=0;v<d.length;v++){p=d[v];for(var g=La(p[0]),b=DY(MY(OY(p.index),s.length),0),k=[],S=1;S<p.length;S++)k.push(jY(p[S]));var E=p.groups;if(l){var O=[g].concat(k,b,s);E!==void 0&&O.push(E);var j=La(a.apply(void 0,O))}else j=PY(g,s,b,k,E,a);b>=y&&(m+=s.slice(y,b)+j,y=b+g.length)}return m+s.slice(y)}]},!FY||!LY||Tk);var Ts=Lt,BY=Dp,UY=ji,Tc=function(e){return BY.slice(0,e.length)===e},zY=function(){return Tc("Bun/")?"BUN":Tc("Cloudflare-Workers")?"CLOUDFLARE":Tc("Deno/")?"DENO":Tc("Node.js/")?"NODE":Ts.Bun&&typeof Bun.version=="string"?"BUN":Ts.Deno&&typeof Deno.version=="object"?"DENO":UY(Ts.process)==="process"?"NODE":Ts.window&&Ts.document?"BROWSER":"REST"}(),qY=TypeError,VY=function(e,t){if(e<t)throw new qY("Not enough arguments");return e},Ok=Lt,HY=Tp,WY=nn,ZY=zY,KY=Dp,GY=Yu,YY=VY,JY=Ok.Function,XY=/MSIE .\./.test(KY)||ZY==="BUN"&&function(){var e=Ok.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}(),Ck=function(e,t){var n=t?2:1;return XY?function(r,i){var a=YY(arguments.length,1)>n,o=WY(r)?r:JY(r),s=a?GY(arguments,n):[],u=a?function(){HY(o,this,s)}:o;return t?e(u,i):e(u)}:e},QY=mt,$k=Lt,eJ=Ck,Ik=eJ($k.setInterval,!0);QY({global:!0,bind:!0,forced:$k.setInterval!==Ik},{setInterval:Ik});var tJ=mt,Rk=Lt,nJ=Ck,Pk=nJ(Rk.setTimeout,!0);tJ({global:!0,bind:!0,forced:Rk.setTimeout!==Pk},{setTimeout:Pk});var rJ=Yt,iJ=rJ.setInterval,aJ=iJ;const oJ=Ke(aJ);var sJ=Ft,Ak=function(e,t){var n=[][e];return!!n&&sJ(function(){n.call(null,t||function(){return 1},1)})},lJ=mt,uJ=Cp,cJ=aS.indexOf,fJ=Ak,Mm=uJ([].indexOf),Nk=!!Mm&&1/Mm([1],1,-0)<0,dJ=Nk||!fJ("indexOf");lJ({target:"Array",proto:!0,forced:dJ},{indexOf:function(t){var n=arguments.length>1?arguments[1]:void 0;return Nk?Mm(this,t,n)||0:cJ(this,t,n)}});var pJ=Ui,hJ=pJ("Array","indexOf"),mJ=Lr,vJ=hJ,jm=Array.prototype,yJ=function(e){var t=e.indexOf;return e===jm||mJ(jm,e)&&t===jm.indexOf?vJ:t},gJ=yJ,bJ=gJ,xJ=bJ;const wJ=Ke(xJ);var Dk=ju,SJ=TypeError,_J=function(e,t){if(!delete e[t])throw new SJ("Cannot delete property "+Dk(t)+" of "+Dk(e))},EJ=mt,kJ=Fr,TJ=ih,OJ=Uu,CJ=Li,$J=z_,IJ=Xp,RJ=rh,PJ=os,Lm=_J,AJ=qu,NJ=AJ("splice"),DJ=Math.max,MJ=Math.min;EJ({target:"Array",proto:!0,forced:!NJ},{splice:function(t,n){var r=kJ(this),i=CJ(r),a=TJ(t,i),o=arguments.length,s,u,l,c,f,d;for(o===0?s=u=0:o===1?(s=0,u=i-a):(s=o-2,u=MJ(DJ(OJ(n),0),i-a)),IJ(i+s-u),l=RJ(r,u),c=0;c<u;c++)f=a+c,f in r&&PJ(l,c,r[f]);if(l.length=u,s<u){for(c=a;c<i-u;c++)f=c+u,d=c+s,f in r?r[d]=r[f]:Lm(r,d);for(c=i;c>i-u+s;c--)Lm(r,c-1)}else if(s>u)for(c=i-u;c>a;c--)f=c+u-1,d=c+s-1,f in r?r[d]=r[f]:Lm(r,d);for(c=0;c<s;c++)r[c+a]=arguments[c+2];return $J(r,i-u+s),l}});var jJ=Ui,LJ=jJ("Array","splice"),FJ=Lr,BJ=LJ,Fm=Array.prototype,UJ=function(e){var t=e.splice;return e===Fm||FJ(Fm,e)&&t===Fm.splice?BJ:t},zJ=UJ,qJ=zJ,VJ=qJ;const HJ=Ke(VJ);var WJ=Ui,ZJ=WJ("Array","concat"),KJ=Lr,GJ=ZJ,Bm=Array.prototype,YJ=function(e){var t=e.concat;return e===Bm||KJ(Bm,e)&&t===Bm.concat?GJ:t},JJ=YJ,XJ=JJ,QJ=XJ;const _t=Ke(QJ);var eX=mt,tX=Rt,Mk=Date,nX=tX(Mk.prototype.getTime);eX({target:"Date",stat:!0},{now:function(){return nX(new Mk)}});var rX=Yt,iX=rX.Date.now,aX=iX,oX=aX,sX=oX;const hi=Ke(sX);var lX=vh.forEach,uX=Ak,cX=uX("forEach"),fX=cX?[].forEach:function(t){return lX(this,t,arguments.length>1?arguments[1]:void 0)},dX=mt,jk=fX;dX({target:"Array",proto:!0,forced:[].forEach!==jk},{forEach:jk});var pX=Ui,hX=pX("Array","forEach"),mX=hX,vX=mX,yX=ss,gX=En,bX=Lr,xX=vX,Um=Array.prototype,wX={DOMTokenList:!0,NodeList:!0},SX=function(e){var t=e.forEach;return e===Um||bX(Um,e)&&t===Um.forEach||gX(wX,yX(e))?xX:t},_X=SX;const Oc=Ke(_X);var EX=mt,kX=Fr,Lk=sh,TX=Ft,OX=TX(function(){Lk(1)});EX({target:"Object",stat:!0,forced:OX},{keys:function(t){return Lk(kX(t))}});var CX=Yt,$X=CX.Object.keys,IX=$X,RX=IX,PX=RX;const AX=Ke(PX);var NX=Yt,DX=NX.Object.getOwnPropertySymbols,MX=DX,jX=MX,LX=jX;const Fk=Ke(LX);var FX=mt,BX=vh.filter,UX=qu,zX=UX("filter");FX({target:"Array",proto:!0,forced:!zX},{filter:function(t){return BX(this,t,arguments.length>1?arguments[1]:void 0)}});var qX=Ui,VX=qX("Array","filter"),HX=Lr,WX=VX,zm=Array.prototype,ZX=function(e){var t=e.filter;return e===zm||HX(zm,e)&&t===zm.filter?WX:t},KX=ZX,GX=KX,YX=GX;const JX=Ke(YX);var Bk={exports:{}},XX=mt,QX=Ft,eQ=pr,Uk=ts.f,zk=mn,tQ=!zk||QX(function(){Uk(1)});XX({target:"Object",stat:!0,forced:tQ,sham:!zk},{getOwnPropertyDescriptor:function(t,n){return Uk(eQ(t),n)}});var nQ=Yt,qk=nQ.Object,rQ=Bk.exports=function(t,n){return qk.getOwnPropertyDescriptor(t,n)};qk.getOwnPropertyDescriptor.sham&&(rQ.sham=!0);var iQ=Bk.exports,aQ=iQ,oQ=aQ,sQ=oQ;const Vk=Ke(sQ);var lQ=hr,uQ=Rt,cQ=Gu,fQ=Ju,dQ=ci,pQ=uQ([].concat),hQ=lQ("Reflect","ownKeys")||function(t){var n=cQ.f(dQ(t)),r=fQ.f;return r?pQ(n,r(t)):n},mQ=mt,vQ=mn,yQ=hQ,gQ=pr,bQ=ts,xQ=os;mQ({target:"Object",stat:!0,sham:!vQ},{getOwnPropertyDescriptors:function(t){for(var n=gQ(t),r=bQ.f,i=yQ(n),a={},o=0,s,u;i.length>o;)u=r(n,s=i[o++]),u!==void 0&&xQ(a,s,u);return a}});var wQ=Yt,SQ=wQ.Object.getOwnPropertyDescriptors,_Q=SQ,EQ=_Q,kQ=EQ;const Hk=Ke(kQ);var Wk={exports:{}},TQ=mt,OQ=mn,Zk=Vu.f;TQ({target:"Object",stat:!0,forced:Object.defineProperties!==Zk,sham:!OQ},{defineProperties:Zk});var CQ=Yt,Kk=CQ.Object,$Q=Wk.exports=function(t,n){return Kk.defineProperties(t,n)};Kk.defineProperties.sham&&($Q.sham=!0);var IQ=Wk.exports,RQ=IQ,PQ=RQ,AQ=PQ;const NQ=Ke(AQ);var DQ=pE;const MQ=Ke(DQ);var jQ=!1;function LQ(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function FQ(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var BQ=function(){function e(n){var r=this;this._insertTag=function(i){var a;r.tags.length===0?r.insertionPoint?a=r.insertionPoint.nextSibling:r.prepend?a=r.container.firstChild:a=r.before:a=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,a),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!jQ:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(FQ(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var a=LQ(i);try{a.insertRule(r,a.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var i;return(i=r.parentNode)==null?void 0:i.removeChild(r)}),this.tags=[],this.ctr=0},e}(),rn="-ms-",Cc="-moz-",ot="-webkit-",Gk="comm",qm="rule",Vm="decl",UQ="@import",Yk="@keyframes",zQ="@layer",qQ=Math.abs,$c=String.fromCharCode,VQ=Object.assign;function HQ(e,t){return Jt(e,0)^45?(((t<<2^Jt(e,0))<<2^Jt(e,1))<<2^Jt(e,2))<<2^Jt(e,3):0}function Jk(e){return e.trim()}function WQ(e,t){return(e=t.exec(e))?e[0]:e}function st(e,t,n){return e.replace(t,n)}function Hm(e,t){return e.indexOf(t)}function Jt(e,t){return e.charCodeAt(t)|0}function Os(e,t,n){return e.slice(t,n)}function gr(e){return e.length}function Wm(e){return e.length}function Ic(e,t){return t.push(e),e}function ZQ(e,t){return e.map(t).join("")}var Rc=1,Fa=1,Xk=0,yn=0,Pt=0,Ba="";function Pc(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:Rc,column:Fa,length:o,return:""}}function Cs(e,t){return VQ(Pc("",null,null,"",null,null,0),e,{length:-e.length},t)}function KQ(){return Pt}function GQ(){return Pt=yn>0?Jt(Ba,--yn):0,Fa--,Pt===10&&(Fa=1,Rc--),Pt}function Tn(){return Pt=yn<Xk?Jt(Ba,yn++):0,Fa++,Pt===10&&(Fa=1,Rc++),Pt}function br(){return Jt(Ba,yn)}function Ac(){return yn}function $s(e,t){return Os(Ba,e,t)}function Is(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Qk(e){return Rc=Fa=1,Xk=gr(Ba=e),yn=0,[]}function eT(e){return Ba="",e}function Nc(e){return Jk($s(yn-1,Zm(e===91?e+2:e===40?e+1:e)))}function YQ(e){for(;(Pt=br())&&Pt<33;)Tn();return Is(e)>2||Is(Pt)>3?"":" "}function JQ(e,t){for(;--t&&Tn()&&!(Pt<48||Pt>102||Pt>57&&Pt<65||Pt>70&&Pt<97););return $s(e,Ac()+(t<6&&br()==32&&Tn()==32))}function Zm(e){for(;Tn();)switch(Pt){case e:return yn;case 34:case 39:e!==34&&e!==39&&Zm(Pt);break;case 40:e===41&&Zm(e);break;case 92:Tn();break}return yn}function XQ(e,t){for(;Tn()&&e+Pt!==57;)if(e+Pt===84&&br()===47)break;return"/*"+$s(t,yn-1)+"*"+$c(e===47?e:Tn())}function QQ(e){for(;!Is(br());)Tn();return $s(e,yn)}function eee(e){return eT(Dc("",null,null,null,[""],e=Qk(e),0,[0],e))}function Dc(e,t,n,r,i,a,o,s,u){for(var l=0,c=0,f=o,d=0,p=0,h=0,m=1,y=1,v=1,g=0,b="",k=i,S=a,E=r,O=b;y;)switch(h=g,g=Tn()){case 40:if(h!=108&&Jt(O,f-1)==58){Hm(O+=st(Nc(g),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:O+=Nc(g);break;case 9:case 10:case 13:case 32:O+=YQ(h);break;case 92:O+=JQ(Ac()-1,7);continue;case 47:switch(br()){case 42:case 47:Ic(tee(XQ(Tn(),Ac()),t,n),u);break;default:O+="/"}break;case 123*m:s[l++]=gr(O)*v;case 125*m:case 59:case 0:switch(g){case 0:case 125:y=0;case 59+c:v==-1&&(O=st(O,/\f/g,"")),p>0&&gr(O)-f&&Ic(p>32?nT(O+";",r,n,f-1):nT(st(O," ","")+";",r,n,f-2),u);break;case 59:O+=";";default:if(Ic(E=tT(O,t,n,l,c,i,s,b,k=[],S=[],f),a),g===123)if(c===0)Dc(O,t,E,E,k,a,f,s,S);else switch(d===99&&Jt(O,3)===110?100:d){case 100:case 108:case 109:case 115:Dc(e,E,E,r&&Ic(tT(e,E,E,0,0,i,s,b,i,k=[],f),S),i,S,f,s,r?k:S);break;default:Dc(O,E,E,E,[""],S,0,s,S)}}l=c=p=0,m=v=1,b=O="",f=o;break;case 58:f=1+gr(O),p=h;default:if(m<1){if(g==123)--m;else if(g==125&&m++==0&&GQ()==125)continue}switch(O+=$c(g),g*m){case 38:v=c>0?1:(O+="\f",-1);break;case 44:s[l++]=(gr(O)-1)*v,v=1;break;case 64:br()===45&&(O+=Nc(Tn())),d=br(),c=f=gr(b=O+=QQ(Ac())),g++;break;case 45:h===45&&gr(O)==2&&(m=0)}}return a}function tT(e,t,n,r,i,a,o,s,u,l,c){for(var f=i-1,d=i===0?a:[""],p=Wm(d),h=0,m=0,y=0;h<r;++h)for(var v=0,g=Os(e,f+1,f=qQ(m=o[h])),b=e;v<p;++v)(b=Jk(m>0?d[v]+" "+g:st(g,/&\f/g,d[v])))&&(u[y++]=b);return Pc(e,t,n,i===0?qm:s,u,l,c)}function tee(e,t,n){return Pc(e,t,n,Gk,$c(KQ()),Os(e,2,-2),0)}function nT(e,t,n,r){return Pc(e,t,n,Vm,Os(e,0,r),Os(e,r+1,-1),r)}function Ua(e,t){for(var n="",r=Wm(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function nee(e,t,n,r){switch(e.type){case zQ:if(e.children.length)break;case UQ:case Vm:return e.return=e.return||e.value;case Gk:return"";case Yk:return e.return=e.value+"{"+Ua(e.children,r)+"}";case qm:e.value=e.props.join(",")}return gr(n=Ua(e.children,r))?e.return=e.value+"{"+n+"}":""}function ree(e){var t=Wm(e);return function(n,r,i,a){for(var o="",s=0;s<t;s++)o+=e[s](n,r,i,a)||"";return o}}function iee(e){return function(t){t.root||(t=t.return)&&e(t)}}function aee(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var oee=function(t,n,r){for(var i=0,a=0;i=a,a=br(),i===38&&a===12&&(n[r]=1),!Is(a);)Tn();return $s(t,yn)},see=function(t,n){var r=-1,i=44;do switch(Is(i)){case 0:i===38&&br()===12&&(n[r]=1),t[r]+=oee(yn-1,n,r);break;case 2:t[r]+=Nc(i);break;case 4:if(i===44){t[++r]=br()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=$c(i)}while(i=Tn());return t},lee=function(t,n){return eT(see(Qk(t),n))},rT=new WeakMap,uee=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!rT.get(r))&&!i){rT.set(t,!0);for(var a=[],o=lee(n,a),s=r.props,u=0,l=0;u<o.length;u++)for(var c=0;c<s.length;c++,l++)t.props[l]=a[u]?o[u].replace(/&\f/g,s[c]):s[c]+" "+o[u]}}},cee=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function iT(e,t){switch(HQ(e,t)){case 5103:return ot+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ot+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ot+e+Cc+e+rn+e+e;case 6828:case 4268:return ot+e+rn+e+e;case 6165:return ot+e+rn+"flex-"+e+e;case 5187:return ot+e+st(e,/(\w+).+(:[^]+)/,ot+"box-$1$2"+rn+"flex-$1$2")+e;case 5443:return ot+e+rn+"flex-item-"+st(e,/flex-|-self/,"")+e;case 4675:return ot+e+rn+"flex-line-pack"+st(e,/align-content|flex-|-self/,"")+e;case 5548:return ot+e+rn+st(e,"shrink","negative")+e;case 5292:return ot+e+rn+st(e,"basis","preferred-size")+e;case 6060:return ot+"box-"+st(e,"-grow","")+ot+e+rn+st(e,"grow","positive")+e;case 4554:return ot+st(e,/([^-])(transform)/g,"$1"+ot+"$2")+e;case 6187:return st(st(st(e,/(zoom-|grab)/,ot+"$1"),/(image-set)/,ot+"$1"),e,"")+e;case 5495:case 3959:return st(e,/(image-set\([^]*)/,ot+"$1$`$1");case 4968:return st(st(e,/(.+:)(flex-)?(.*)/,ot+"box-pack:$3"+rn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ot+e+e;case 4095:case 3583:case 4068:case 2532:return st(e,/(.+)-inline(.+)/,ot+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(gr(e)-1-t>6)switch(Jt(e,t+1)){case 109:if(Jt(e,t+4)!==45)break;case 102:return st(e,/(.+:)(.+)-([^]+)/,"$1"+ot+"$2-$3$1"+Cc+(Jt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Hm(e,"stretch")?iT(st(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Jt(e,t+1)!==115)break;case 6444:switch(Jt(e,gr(e)-3-(~Hm(e,"!important")&&10))){case 107:return st(e,":",":"+ot)+e;case 101:return st(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ot+(Jt(e,14)===45?"inline-":"")+"box$3$1"+ot+"$2$3$1"+rn+"$2box$3")+e}break;case 5936:switch(Jt(e,t+11)){case 114:return ot+e+rn+st(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ot+e+rn+st(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ot+e+rn+st(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ot+e+rn+e+e}return e}var fee=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case Vm:t.return=iT(t.value,t.length);break;case Yk:return Ua([Cs(t,{value:st(t.value,"@","@"+ot)})],i);case qm:if(t.length)return ZQ(t.props,function(a){switch(WQ(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ua([Cs(t,{props:[st(a,/:(read-\w+)/,":"+Cc+"$1")]})],i);case"::placeholder":return Ua([Cs(t,{props:[st(a,/:(plac\w+)/,":"+ot+"input-$1")]}),Cs(t,{props:[st(a,/:(plac\w+)/,":"+Cc+"$1")]}),Cs(t,{props:[st(a,/:(plac\w+)/,rn+"input-$1")]})],i)}return""})}},dee=[fee],pee=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(m){var y=m.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var i=t.stylisPlugins||dee,a={},o,s=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(m){for(var y=m.getAttribute("data-emotion").split(" "),v=1;v<y.length;v++)a[y[v]]=!0;s.push(m)});var u,l=[uee,cee];{var c,f=[nee,iee(function(m){c.insert(m)})],d=ree(l.concat(i,f)),p=function(y){return Ua(eee(y),d)};u=function(y,v,g,b){c=g,p(y?y+"{"+v.styles+"}":v.styles),b&&(h.inserted[v.name]=!0)}}var h={key:n,sheet:new BQ({key:n,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:a,registered:{},insert:u};return h.sheet.hydrate(s),h};function hee(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var mee={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},vee=!1,yee=/[A-Z]|^ms/g,gee=/_EMO_([^_]+?)_([^]*?)_EMO_/g,aT=function(t){return t.charCodeAt(1)===45},oT=function(t){return t!=null&&typeof t!="boolean"},Km=aee(function(e){return aT(e)?e:e.replace(yee,"-$&").toLowerCase()}),sT=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(gee,function(r,i,a){return mi={name:i,styles:a,next:mi},i})}return mee[t]!==1&&!aT(t)&&typeof n=="number"&&n!==0?n+"px":n},bee="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Mc(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return mi={name:i.name,styles:i.styles,next:mi},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)mi={name:o.name,styles:o.styles,next:mi},o=o.next;var s=a.styles+";";return s}return xee(e,t,n)}}var u=n;if(t==null)return u;var l=t[u];return l!==void 0?l:u}function xee(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Mc(e,t,n[i])+";";else for(var a in n){var o=n[a];if(typeof o!="object"){var s=o;t!=null&&t[s]!==void 0?r+=a+"{"+t[s]+"}":oT(s)&&(r+=Km(a)+":"+sT(a,s)+";")}else{if(a==="NO_COMPONENT_SELECTOR"&&vee)throw new Error(bee);if(Array.isArray(o)&&typeof o[0]=="string"&&(t==null||t[o[0]]===void 0))for(var u=0;u<o.length;u++)oT(o[u])&&(r+=Km(a)+":"+sT(a,o[u])+";");else{var l=Mc(e,t,o);switch(a){case"animation":case"animationName":{r+=Km(a)+":"+l+";";break}default:r+=a+"{"+l+"}"}}}}return r}var lT=/label:\s*([^\s;{]+)\s*(;|$)/g,mi;function Gm(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";mi=void 0;var a=e[0];if(a==null||a.raw===void 0)r=!1,i+=Mc(n,t,a);else{var o=a;i+=o[0]}for(var s=1;s<e.length;s++)if(i+=Mc(n,t,e[s]),r){var u=a;i+=u[s]}lT.lastIndex=0;for(var l="",c;(c=lT.exec(i))!==null;)l+="-"+c[1];var f=hee(i)+l;return{name:f,styles:i,next:mi}}function uT(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(r+=i+" ")}),r}var wee=function(t,n,r){var i=t.key+"-"+n.name;t.registered[i]===void 0&&(t.registered[i]=n.styles)},See=function(t,n,r){wee(t,n);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var a=n;do t.insert(n===a?"."+i:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}};function cT(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function fT(e,t,n){var r=[],i=uT(e,r,n);return r.length<2?n:i+t(r)}var _ee=function(t){var n=pee(t);n.sheet.speedy=function(s){if(process.env.NODE_ENV!=="production"&&this.ctr!==0)throw new Error("speedy must be changed before any rules are inserted");this.isSpeedy=s},n.compat=!0;var r=function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];var f=Gm(l,n.registered,void 0);return See(n,f),n.key+"-"+f.name},i=function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];var f=Gm(l,n.registered),d="animation-"+f.name;return cT(n,{name:f.name,styles:"@keyframes "+d+"{"+f.styles+"}"}),d},a=function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];var f=Gm(l,n.registered);cT(n,f)},o=function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];return fT(n.registered,r,Eee(l))};return{css:r,cx:o,injectGlobal:a,keyframes:i,hydrate:function(u){u.forEach(function(l){n.inserted[l]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:uT.bind(null,n.registered),merge:fT.bind(null,n.registered,r)}},Eee=function e(t){for(var n="",r=0;r<t.length;r++){var i=t[r];if(i!=null){var a=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))a=e(i);else{a="";for(var o in i)i[o]&&o&&(a&&(a+=" "),a+=o)}break}default:a=i}a&&(n&&(n+=" "),n+=a)}}return n},kee=Es,Ym=Date.prototype,dT="Invalid Date",pT="toString",Tee=Ym[pT],Oee=Ym.getTime;String(new Date(NaN))!=dT&&kee(Ym,pT,function(){var t=Oee.call(this);return t===t?Tee.call(this):dT});var Cee=km,$ee=uk,Iee=Cee?{}.toString:function(){return"[object "+$ee(this)+"]"},Ree=km,Pee=Es,Aee=Iee;Ree||Pee(Object.prototype,"toString",Aee,{unsafe:!0});var Nee=wm.PROPER,Dee=Es,Mee=pi,hT=Sc,jee=Xn,Lee=ck,Jm="toString",mT=RegExp.prototype,vT=mT[Jm],Fee=jee(function(){return vT.call({source:"a",flags:"b"})!="/a/b"}),Bee=Nee&&vT.name!=Jm;(Fee||Bee)&&Dee(RegExp.prototype,Jm,function(){var t=Mee(this),n=hT(t.source),r=t.flags,i=hT(r===void 0&&t instanceof RegExp&&!("flags"in mT)?Lee.call(t):r);return"/"+n+"/"+i},{unsafe:!0});var yT=typeof window<"u"?window:self,Uee=yT.crypto||yT.msCrypto,zee=function(e){if(!e)return Math.random;var t=Math.pow(2,32),n=new Uint32Array(1);return function(){return e.getRandomValues(n)[0]/t}}(Uee);const qee=Ke(zee);function Vee(){return qee().toString(26).substr(2,5).replace(/[0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65)})}var Hee=W1;const gT=Ke(Hee);function dt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"white",n="background-color: ".concat(e,"; border-radius: 4px; padding: 2px 4px;");return t&&(n+=" color: ".concat(t,";")),[n,""]}function bT(e,t){for(var n,r,i=arguments.length,a=new Array(i>2?i-2:0),o=2;o<i;o++)a[o-2]=arguments[o];return _t(n=[_t(r="%c".concat(e,"%c ")).call(r,t)]).call(n,Qe(dt("green","white")),a)}function Wee(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.force,r=n===void 0?!1:n;return r?function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];if(a.length){var s=a,u=vr(s,1),l=u[0];typeof l=="function"&&(a=l());var c=gT(a[0])?a:[a],f=c.length===1;Oc(c).call(c,function(d,p){if(f){var h,m;(h=console).log.apply(h,Qe(bT.apply(void 0,_t(m=[e]).call(m,Qe(d)))))}else if(p){var y;(y=console).log.apply(y,Qe(gT(d)?d:[d]))}else{var v,g;(v=console).groupCollapsed.apply(v,Qe(bT.apply(void 0,_t(g=[e]).call(g,Qe(d)))))}}),f||console.groupEnd()}}:function(){return 0}}var Zee=zi,Kee=wm.EXISTS,Gee=Ss.f,xT=Function.prototype,Yee=xT.toString,Jee=/^\s*function ([^ (]*)/,Xee="name";Zee&&!Kee&&Gee(xT,Xee,{configurable:!0,get:function(){try{return Yee.call(this).match(Jee)[1]}catch{return""}}});var Qee=Yt,ete=Qee.setTimeout,tte=ete;const nte=Ke(tte);function rte(e,t){if(!t)return e;var n=0,r=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s=hi();s-n>t?(e.apply(void 0,a),n=s):(clearTimeout(r),r=nte(function(){e.apply(void 0,a),n=hi()},Math.max(0,t-s+n)))}}var wT=function(t){var n=t.debounce,r=t.name,i=t.onEvent,a=t.target,o=M.useRef();o.current=i;var s=M.useMemo(function(){return rte(function(l){var c=o.current;c&&c(l)},n)},[n,o]),u=M.useCallback(function(l){l.timeStampLow=hi(),s(l)},[s]);return M.useLayoutEffect(function(){return a.addEventListener(r,u,{passive:!0}),u({target:a,type:r}),function(){return a.removeEventListener(r,u)}},[r,u,a]),!1};wT.defaultProps={debounce:200};var ite=Math.sign||function(t){var n=+t;return n===0||n!==n?n:n<0?-1:1},ate=mt,ote=ite;ate({target:"Math",stat:!0},{sign:ote});var ste=Yt,lte=ste.Math.sign,ute=lte,cte=ute,fte=cte;const dte=Ke(fte);function pte(e,t){var n=dte(t-e),r=Math.sqrt(Math.abs(t-e)),i=e+r*n;return n>0?Math.min(t,i):Math.max(t,i)}function hte(e,t,n,r){for(var i=e,a=0;a<r;a++)i=n(i,t);return i}var ST=function(t){var n=t.name,r=t.onEnd,i=t.target,a=t.value,o=M.useRef(),s=M.useCallback(function(l,c,f,d){var p=arguments.length>4&&arguments[4]!==void 0?arguments[4]:hi();(f==="100%"||typeof f=="number")&&(cancelAnimationFrame(o.current),o.current=requestAnimationFrame(function(){if(i){var h=f==="100%"?i.scrollHeight-i.offsetHeight:f,m=hte(c,h,pte,(hi()-p)/5);Math.abs(h-m)<1.5&&(m=h),i[l]=m,h===m?r&&r(!0):s(l,c,f,d+1,p)}}))},[o,r,i]),u=M.useCallback(function(){cancelAnimationFrame(o.current),r&&r(!1)},[r]);return M.useLayoutEffect(function(){return s(n,i[n],a,1),i?(i.addEventListener("pointerdown",u,{passive:!0}),i.addEventListener("wheel",u,{passive:!0}),function(){i.removeEventListener("pointerdown",u),i.removeEventListener("wheel",u),cancelAnimationFrame(o.current)}):function(){return cancelAnimationFrame(o.current)}},[s,o,u,n,i,a]),!1};ST.propTypes={name:rt.string.isRequired,onEnd:rt.func,target:rt.any.isRequired,value:rt.oneOfType([rt.number,rt.oneOf(["100%"])]).isRequired};function Xm(e){var t=M.useState(e),n=vr(t,2),r=n[0],i=n[1],a=M.useRef(),o=M.useCallback(function(s){typeof s=="function"?o(function(u){return s=s(u),a.current=s,s}):(a.current=s,o(s))},[a]);return a.current=r,[r,i,a]}function _T(e,t){var n=AX(e);if(Fk){var r=Fk(e);t&&(r=JX(r).call(r,function(i){return Vk(e,i).enumerable})),n.push.apply(n,r)}return n}function ET(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};if(t%2){var r;Oc(r=_T(Object(n),!0)).call(r,function(a){T8(e,a,n[a])})}else if(Hk)NQ(e,Hk(n));else{var i;Oc(i=_T(Object(n))).call(i,function(a){MQ(e,a,Vk(n,a))})}}return e}var mte=function(){return 1/0},kT=17,vte="bottom",Qn="top",TT=1,yte=34,OT={};function gte(e,t){return e(),oJ(e,t)}function CT(e){var t=e.mode,n=e.target,r=n.offsetHeight,i=n.scrollHeight,a=n.scrollTop,o=i-a-r<TT,s=a<TT,u=t===Qn?s:o,l=t!==Qn?s:o;return{atBottom:o,atEnd:u,atStart:l,atTop:s}}function Rs(e,t){return e===(t===Qn?0:"100%")}var Qm=function(t){var n=t.checkInterval,r=t.children,i=t.debounce,a=t.debug,o=t.initialScrollBehavior,s=t.mode,u=t.nonce,l=t.scroller,c=M.useMemo(function(){return Wee("<ScrollToBottom>",{force:a})},[a]);s=s===Qn?Qn:vte;var f=M.useRef(0),d=M.useRef(o),p=Xm(s===Qn?0:"100%"),h=vr(p,3),m=h[0],y=h[1],v=h[2],g=Xm(null),b=vr(g,3),k=b[0],S=b[1],E=b[2],O=M.useRef(0),j=M.useRef(0),q=M.useRef(0),T=M.useState(!0),I=vr(T,2),U=I[0],R=I[1],F=M.useState(!0),N=vr(F,2),L=N[0],W=N[1],z=M.useState(!0),A=vr(z,2),x=A[0],V=A[1],K=M.useState(!1),_=vr(K,2),J=_[0],ne=_[1],re=Xm(!0),le=vr(re,3),pe=le[0],he=le[1],ue=le[2],Q=M.useRef([]),Z=M.useCallback(function(D){var X=E.current;return Q.current.push(D),X&&D({scrollTop:X.scrollTop}),function(){var ce=Q.current,Ee=wJ(ce).call(ce,D);~Ee&&HJ(ce).call(ce,Ee,1)}},[Q,E]),de=M.useCallback(function(){var D=v.current;c(function(){var X;return _t(X=["%cSpineTo%c: %conEnd%c is fired."]).call(X,Qe(dt("magenta")),Qe(dt("orange")),[{animateTo:D}])}),f.current=hi(),Rs(D,s)||he(!1),y(null)},[v,c,f,s,y,he]),ve=M.useCallback(function(D){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ce=X.behavior,Ee=E.current;if(typeof D!="number"&&D!=="100%")return console.warn('react-scroll-to-bottom: Arguments passed to scrollTo() must be either number or "100%".');c(function(){var Oe;return[_t(Oe=["%cscrollTo%c: Will scroll to %c".concat(typeof D=="number"?D+"px":D.replace(/%/g,"%%"),"%c")]).call(Oe,Qe(dt("lime","")),Qe(dt("purple"))),{behavior:ce,nextAnimateTo:D,target:Ee}]}),ce==="auto"?(de(),Ee&&(Ee.scrollTop=D==="100%"?Ee.scrollHeight-Ee.offsetHeight:D)):(ce!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollTo". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),y(D)),Rs(D,s)&&(c(function(){var Oe;return[_t(Oe=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call(Oe,Qe(dt("lime","")),Qe(dt("purple"))),[{mode:s,nextAnimateTo:D}]]}),he(!0))},[c,de,s,y,he,E]),$e=M.useCallback(function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=D.behavior;c(function(){var ce;return _t(ce=["%cscrollToBottom%c: Called"]).call(ce,Qe(dt("yellow","")))}),X!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToBottom". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),ve("100%",{behavior:X||"smooth"})},[c,ve]),P=M.useCallback(function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=D.behavior;c(function(){var ce;return _t(ce=["%cscrollToTop%c: Called"]).call(ce,Qe(dt("yellow","")))}),X!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToTop". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),ve(0,{behavior:X||"smooth"})},[c,ve]),Y=M.useCallback(function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=D.behavior;c(function(){var Ee;return _t(Ee=["%cscrollToEnd%c: Called"]).call(Ee,Qe(dt("yellow","")))}),X!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToEnd". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var ce={behavior:X||"smooth"};s===Qn?P(ce):$e(ce)},[c,s,$e,P]),oe=M.useCallback(function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=D.behavior;c(function(){var Ee;return _t(Ee=["%cscrollToStart%c: Called"]).call(Ee,Qe(dt("yellow","")))}),X!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToStart". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var ce={behavior:X||"smooth"};s===Qn?$e(ce):P(ce)},[c,s,$e,P]),ee=M.useCallback(function(){var D=E.current;if(D){if(d.current==="auto"){c(function(){var Ct;return _t(Ct=["%ctarget changed%c: Initial scroll"]).call(Ct,Qe(dt("blue")))}),D.scrollTop=s===Qn?0:D.scrollHeight-D.offsetHeight,d.current=!1;return}var X=O.current,ce=D.offsetHeight,Ee=D.scrollHeight,Oe=D.scrollTop,Je=s===Qn?0:Math.max(0,Ee-ce-Oe),lt=Math.max(0,X-Oe),Ut=l({maxValue:Je,minValue:lt,offsetHeight:ce,scrollHeight:Ee,scrollTop:Oe}),Ot=Math.max(0,Math.min(Je,Ut)),Ze;s===Qn||Ot!==Je?Ze=Oe+Ot:Ze="100%",c(function(){var Ct,tt,bn;return[_t(Ct=[_t(tt=_t(bn="%cscrollToSticky%c: Will animate from %c".concat(X,"px%c to %c")).call(bn,typeof Ze=="number"?Ze+"px":Ze.replace(/%/g,"%%"),"%c (%c")).call(tt,(Ze==="100%"?Je:Ze)+X,"px%c)")]).call(Ct,Qe(dt("orange")),Qe(dt("purple")),Qe(dt("purple")),Qe(dt("purple"))),{animateFrom:X,maxValue:Je,minValue:lt,nextAnimateTo:Ze,nextValue:Ot,offsetHeight:ce,rawNextValue:Ut,scrollHeight:Ee,scrollTop:Oe}]}),ve(Ze,{behavior:"smooth"})}},[O,c,s,l,ve,E]),ke=M.useCallback(function(D){var X,ce=D.timeStampLow,Ee=v.current,Oe=E.current,Je=Ee!==null;if(!(ce<=f.current||!Oe)){var lt=CT({mode:s,target:Oe}),Ut=lt.atBottom,Ot=lt.atEnd,Ze=lt.atStart,Ct=lt.atTop;R(Ut),W(Ot),ne(Ze),V(Ct);var tt=Oe.offsetHeight,bn=Oe.scrollHeight,Cn=j.current,rr=q.current,Hr=tt!==Cn,$r=bn!==rr;if(Hr&&(j.current=tt),$r&&(q.current=bn),!Hr&&!$r){var ir=Je&&Rs(Ee,s)||Ot;ue.current!==ir&&(c(function(){var pt,wt,zt,qt;return[_t(pt=["%conScroll%c: %csetSticky%c(%c".concat(ir,"%c)")]).call(pt,Qe(dt("red")),Qe(dt("red")),Qe(dt("purple"))),_t(wt=[_t(zt=_t(qt="(animating = %c".concat(Je,"%c && isEnd = %c")).call(qt,Rs(Ee,s),"%c) || atEnd = %c")).call(zt,Ot,"%c")]).call(wt,Qe(dt("purple")),Qe(dt("purple")),Qe(dt("purple")),[{animating:Je,animateTo:Ee,atEnd:Ot,mode:s,offsetHeight:Oe.offsetHeight,scrollHeight:Oe.scrollHeight,sticky:ue.current,nextSticky:ir}])]}),he(ir))}else ue.current&&(c(function(){var pt;return[_t(pt=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(pt,Qe(dt("red")),Qe(dt("orange")),[{offsetHeightChanged:Hr,scrollHeightChanged:$r}]),{nextOffsetHeight:tt,prevOffsetHeight:Cn,nextScrollHeight:bn,prevScrollHeight:rr}]}),ee());var Wr=Oe.scrollTop;Oc(X=Q.current).call(X,function(pt){return pt({scrollTop:Wr})})}},[v,c,f,s,j,q,Q,ee,R,W,ne,V,he,ue,E]);M.useEffect(function(){if(k){var D=!1,X=gte(function(){var ce=E.current,Ee=v.current!==null;ue.current?CT({mode:s,target:ce}).atEnd?D=!1:D?hi()-D>yte&&(Ee||(O.current=ce.scrollTop,c(function(){var Oe;return _t(Oe=["%cInterval check%c: Should sticky but not at end, calling %cscrollToSticky()%c to scroll"]).call(Oe,Qe(dt("navy")),Qe(dt("orange")))}),ee()),D=!1):D=hi():ce.scrollHeight<=ce.offsetHeight&&!ue.current&&(c(function(){var Oe;return[_t(Oe=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call(Oe,Qe(dt("navy")),Qe(dt("purple"))),[{offsetHeight:ce.offsetHeight,scrollHeight:ce.scrollHeight,sticky:ue.current}]]}),he(!0))},Math.max(kT,n)||kT);return function(){return clearInterval(X)}}},[v,n,c,s,ee,he,ue,k,E]);var Se=M.useMemo(function(){var D=OT[u]||(OT[u]=_ee({key:"react-scroll-to-bottom--css-"+Vee(),nonce:u}));return function(X){return D.css(X)+""}},[u]),Pe=M.useMemo(function(){return{observeScrollPosition:Z,setTarget:S,styleToClassName:Se}},[Z,S,Se]),He=M.useMemo(function(){return{atBottom:U,atEnd:L,atStart:J,atTop:x,mode:s}},[U,L,J,x,s]),Ae=M.useMemo(function(){var D=m!==null;return{animating:D,animatingToEnd:D&&Rs(m,s),sticky:pe}},[m,s,pe]),Fe=M.useMemo(function(){return ET(ET({},He),Ae)},[He,Ae]),B=M.useMemo(function(){return{scrollTo:ve,scrollToBottom:$e,scrollToEnd:Y,scrollToStart:oe,scrollToTop:P}},[ve,$e,Y,oe,P]);return M.useEffect(function(){if(k){var D=function(){q.current=k.scrollHeight};return k.addEventListener("focus",D,{capture:!0,passive:!0}),function(){return k.removeEventListener("focus",D)}}},[k]),c(function(){var D;return[_t(D=["%cRender%c: Render"]).call(D,Qe(dt("cyan",""))),{animateTo:m,animating:m!==null,sticky:pe,target:k}]}),M.createElement(dc.Provider,{value:Pe},M.createElement(Xh.Provider,{value:B},M.createElement(tm.Provider,{value:Fe},M.createElement(Qh.Provider,{value:He},M.createElement(em.Provider,{value:Ae},r,k&&M.createElement(wT,{debounce:i,name:"scroll",onEvent:ke,target:k}),k&&m!==null&&M.createElement(ST,{name:"scrollTop",onEnd:de,target:k,value:m}))))))};Qm.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:mte},Qm.propTypes={checkInterval:rt.number,children:rt.any,debounce:rt.number,debug:rt.bool,initialScrollBehavior:rt.oneOf(["auto","smooth"]),mode:rt.oneOf(["bottom","top"]),nonce:rt.string,scroller:rt.func};var bte={height:"100%",overflowY:"auto",width:"100%"},ev=function(t){var n=t.children,r=t.className,i=M.useContext(dc),a=i.setTarget,o=nm()(bte);return M.createElement("div",{className:Vh(o,(r||"")+""),ref:a},n)};ev.defaultProps={children:void 0,className:void 0},ev.propTypes={children:rt.any,className:rt.string};var xte={position:"relative"},tv=function(t){var n=t.children,r=t.className,i=t.followButtonClassName,a=t.scrollViewClassName,o=nm()(xte);return M.createElement("div",{className:Vh(o,(r||"")+"")},M.createElement(ev,{className:(a||"")+""},n),M.createElement(rm,{className:(i||"")+""}))};tv.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0},tv.propTypes={children:rt.any,className:rt.string,followButtonClassName:rt.string,scrollViewClassName:rt.string};var nv=function(t){var n=t.checkInterval,r=t.children,i=t.className,a=t.debounce,o=t.debug,s=t.followButtonClassName,u=t.initialScrollBehavior,l=t.mode,c=t.nonce,f=t.scroller,d=t.scrollViewClassName;return M.createElement(Qm,{checkInterval:n,debounce:a,debug:o,initialScrollBehavior:u,mode:l,nonce:c,scroller:f},M.createElement(tv,{className:i,followButtonClassName:s,scrollViewClassName:d},r))};nv.defaultProps={checkInterval:void 0,children:void 0,className:void 0,debounce:void 0,debug:void 0,followButtonClassName:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:void 0,scrollViewClassName:void 0},nv.propTypes={checkInterval:rt.number,children:rt.any,className:rt.string,debounce:rt.number,debug:rt.bool,followButtonClassName:rt.string,initialScrollBehavior:rt.oneOf(["auto","smooth"]),mode:rt.oneOf(["bottom","top"]),nonce:rt.string,scroller:rt.func,scrollViewClassName:rt.string},E3();let $T=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");const rv=M.memo(({className:e,messages:t=[],isTyping:n,headerMessage:r,renderers:i,botAvatar:a,botDescription:o,botName:s,sendMessage:u,showMarquee:l=!0,...c})=>{const{messageList:f}=yt,d=M.useMemo(()=>D$(t),[t]);return $.jsxs(nv,{...c,className:Xl(f.container.className,e),followButtonClassName:f.scrollDownButton.button.className,scrollViewClassName:f.viewPort.className,children:[r&&$.jsx("span",{...f.headerMessage,children:r}),l&&$.jsx(S3,{botAvatar:a,botDescription:o,botName:s}),d.map(p=>$.jsx(kp,{renderers:i,sendMessage:u,...p},p.id)),n&&$.jsx(kp,{id:$T(),renderers:i,sendMessage:u,direction:"incoming",timestamp:new Date,block:void 0,sender:{name:s??"",avatar:a},children:$.jsx(c1,{})})]})});rv.displayName="MessageList";const wte=({className:e,...t})=>{const{className:n}=yt.loader;return $.jsx("div",{...t,className:Xl(e,n)})},IT=({connected:e,configuration:t,closeWindow:n,isTyping:r,messages:i,user:a,sendMessage:o,uploadFile:s,isLoading:u,renderers:l,isReadOnly:c,disableComposer:f,restartConversation:d,allowFileUpload:p,...h})=>{const{color:m,fontFamily:y,radius:v,themeMode:g,variant:b,botAvatar:k,botDescription:S,botName:E,composerPlaceholder:O,showPoweredBy:j}=t,q={color:m,fontFamily:y,radius:v,themeMode:g,variant:b},T=M.useMemo(()=>i.map(I=>{const{authorId:U}=I,R=U===a.id?"outgoing":"incoming";return{...I,direction:R,sender:R==="outgoing"?{name:a.name??"You",avatar:a.pictureUrl}:{name:t.botName??"Bot",avatar:t.botAvatar}}}),[t.botAvatar,t.botName,i,a.id,a.name,a.pictureUrl]);return $.jsxs($.Fragment,{children:[$.jsx(f0,{...q}),$.jsxs(xp,{connected:e,...h,children:[$.jsx(u1,{closeWindow:n,configuration:t,restartConversation:d}),u?$.jsx(wte,{}):$.jsx($.Fragment,{children:$.jsx(rv,{botAvatar:k,botDescription:S,botName:E,renderers:l,isTyping:r,sendMessage:o,messages:T})}),$.jsx(u0,{sendMessage:o,uploadFile:s,connected:e,isReadOnly:c,disableComposer:f,showPoweredBy:j,composerPlaceholder:O,allowFileUpload:p})]})]})};function RT(e,t){return function(){return e.apply(t,arguments)}}const{toString:PT}=Object.prototype,{getPrototypeOf:iv}=Object,av=(e=>t=>{const n=PT.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),zr=e=>(e=e.toLowerCase(),t=>av(t)===e),jc=e=>t=>typeof t===e,{isArray:za}=Array,Ps=jc("undefined");function Ste(e){return e!==null&&!Ps(e)&&e.constructor!==null&&!Ps(e.constructor)&&Hi(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const AT=zr("ArrayBuffer");function _te(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&AT(e.buffer),t}const Ete=jc("string"),Hi=jc("function"),NT=jc("number"),ov=e=>e!==null&&typeof e=="object",kte=e=>e===!0||e===!1,Lc=e=>{if(av(e)!=="object")return!1;const t=iv(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Tte=zr("Date"),Ote=zr("File"),Cte=zr("Blob"),$te=zr("FileList"),Ite=e=>ov(e)&&Hi(e.pipe),Rte=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||PT.call(e)===t||Hi(e.toString)&&e.toString()===t)},Pte=zr("URLSearchParams"),Ate=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function As(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),za(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let s;for(r=0;r<o;r++)s=a[r],t.call(null,e[s],s,e)}}function DT(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 MT=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,jT=e=>!Ps(e)&&e!==MT;function sv(){const{caseless:e}=jT(this)&&this||{},t={},n=(r,i)=>{const a=e&&DT(t,i)||i;Lc(t[a])&&Lc(r)?t[a]=sv(t[a],r):Lc(r)?t[a]=sv({},r):za(r)?t[a]=r.slice():t[a]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&As(arguments[r],n);return t}const Nte=(e,t,n,{allOwnKeys:r}={})=>(As(t,(i,a)=>{n&&Hi(i)?e[a]=RT(i,n):e[a]=i},{allOwnKeys:r}),e),Dte=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Mte=(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)},jte=(e,t,n,r)=>{let i,a,o;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&iv(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Lte=(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},Fte=e=>{if(!e)return null;if(za(e))return e;let t=e.length;if(!NT(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Bte=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&iv(Uint8Array)),Ute=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},zte=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},qte=zr("HTMLFormElement"),Vte=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),LT=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Hte=zr("RegExp"),FT=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};As(n,(i,a)=>{t(i,a,e)!==!1&&(r[a]=i)}),Object.defineProperties(e,r)},G={isArray:za,isArrayBuffer:AT,isBuffer:Ste,isFormData:Rte,isArrayBufferView:_te,isString:Ete,isNumber:NT,isBoolean:kte,isObject:ov,isPlainObject:Lc,isUndefined:Ps,isDate:Tte,isFile:Ote,isBlob:Cte,isRegExp:Hte,isFunction:Hi,isStream:Ite,isURLSearchParams:Pte,isTypedArray:Bte,isFileList:$te,forEach:As,merge:sv,extend:Nte,trim:Ate,stripBOM:Dte,inherits:Mte,toFlatObject:jte,kindOf:av,kindOfTest:zr,endsWith:Lte,toArray:Fte,forEachEntry:Ute,matchAll:zte,isHTMLForm:qte,hasOwnProperty:LT,hasOwnProp:LT,reduceDescriptors:FT,freezeMethods:e=>{FT(e,(t,n)=>{if(Hi(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Hi(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(a=>{n[a]=!0})};return za(e)?r(e):r(String(e).split(t)),n},toCamelCase:Vte,noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:DT,global:MT,isContextDefined:jT,toJSONObject:e=>{const t=new Array(10),n=(r,i)=>{if(ov(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const a=za(r)?[]:{};return As(r,(o,s)=>{const u=n(o,i+1);!Ps(u)&&(a[s]=u)}),t[i]=void 0,a}}return r};return n(e,0)}};function it(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)}G.inherits(it,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:G.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const BT=it.prototype,UT={};["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=>{UT[e]={value:e}}),Object.defineProperties(it,UT),Object.defineProperty(BT,"isAxiosError",{value:!0}),it.from=(e,t,n,r,i,a)=>{const o=Object.create(BT);return G.toFlatObject(e,o,function(u){return u!==Error.prototype},s=>s!=="isAxiosError"),it.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};var Wte=typeof self=="object"?self.FormData:window.FormData;const Zte=Ke(Wte);function lv(e){return G.isPlainObject(e)||G.isArray(e)}function zT(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function qT(e,t,n){return e?e.concat(t).map(function(i,a){return i=zT(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function Kte(e){return G.isArray(e)&&!e.some(lv)}const Gte=G.toFlatObject(G,{},null,function(t){return/^is[A-Z]/.test(t)});function Yte(e){return e&&G.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function Fc(e,t,n){if(!G.isObject(e))throw new TypeError("target must be an object");t=t||new(Zte||FormData),n=G.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!G.isUndefined(y[m])});const r=n.metaTokens,i=n.visitor||c,a=n.dots,o=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&Yte(t);if(!G.isFunction(i))throw new TypeError("visitor must be a function");function l(h){if(h===null)return"";if(G.isDate(h))return h.toISOString();if(!u&&G.isBlob(h))throw new it("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(h)||G.isTypedArray(h)?u&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function c(h,m,y){let v=h;if(h&&!y&&typeof h=="object"){if(G.endsWith(m,"{}"))m=r?m:m.slice(0,-2),h=JSON.stringify(h);else if(G.isArray(h)&&Kte(h)||G.isFileList(h)||G.endsWith(m,"[]")&&(v=G.toArray(h)))return m=zT(m),v.forEach(function(b,k){!(G.isUndefined(b)||b===null)&&t.append(o===!0?qT([m],k,a):o===null?m:m+"[]",l(b))}),!1}return lv(h)?!0:(t.append(qT(y,m,a),l(h)),!1)}const f=[],d=Object.assign(Gte,{defaultVisitor:c,convertValue:l,isVisitable:lv});function p(h,m){if(!G.isUndefined(h)){if(f.indexOf(h)!==-1)throw Error("Circular reference detected in "+m.join("."));f.push(h),G.forEach(h,function(v,g){(!(G.isUndefined(v)||v===null)&&i.call(t,v,G.isString(g)?g.trim():g,m,d))===!0&&p(v,m?m.concat(g):[g])}),f.pop()}}if(!G.isObject(e))throw new TypeError("data must be an object");return p(e),t}function VT(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function uv(e,t){this._pairs=[],e&&Fc(e,this,t)}const HT=uv.prototype;HT.append=function(t,n){this._pairs.push([t,n])},HT.toString=function(t){const n=t?function(r){return t.call(this,r,VT)}:VT;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Jte(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function WT(e,t,n){if(!t)return e;const r=n&&n.encode||Jte,i=n&&n.serialize;let a;if(i?a=i(t,n):a=G.isURLSearchParams(t)?t.toString():new uv(t,n).toString(r),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class ZT{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){G.forEach(this.handlers,function(r){r!==null&&t(r)})}}const KT={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Xte=typeof URLSearchParams<"u"?URLSearchParams:uv,Qte=FormData,ene=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),tne=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",xr={isBrowser:!0,classes:{URLSearchParams:Xte,FormData:Qte,Blob},isStandardBrowserEnv:ene,isStandardBrowserWebWorkerEnv:tne,protocols:["http","https","file","blob","url","data"]};function nne(e,t){return Fc(e,new xr.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,a){return xr.isNode&&G.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function rne(e){return G.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function ine(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function GT(e){function t(n,r,i,a){let o=n[a++];const s=Number.isFinite(+o),u=a>=n.length;return o=!o&&G.isArray(i)?i.length:o,u?(G.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!s):((!i[o]||!G.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],a)&&G.isArray(i[o])&&(i[o]=ine(i[o])),!s)}if(G.isFormData(e)&&G.isFunction(e.entries)){const n={};return G.forEachEntry(e,(r,i)=>{t(rne(r),i,n,0)}),n}return null}const ane={"Content-Type":void 0};function one(e,t,n){if(G.isString(e))try{return(t||JSON.parse)(e),G.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const qa={transitional:KT,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,a=G.isObject(t);if(a&&G.isHTMLForm(t)&&(t=new FormData(t)),G.isFormData(t))return i&&i?JSON.stringify(GT(t)):t;if(G.isArrayBuffer(t)||G.isBuffer(t)||G.isStream(t)||G.isFile(t)||G.isBlob(t))return t;if(G.isArrayBufferView(t))return t.buffer;if(G.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return nne(t,this.formSerializer).toString();if((s=G.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Fc(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}return a||i?(n.setContentType("application/json",!1),one(t)):t}],transformResponse:[function(t){const n=this.transitional||qa.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&G.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(o)throw s.name==="SyntaxError"?it.from(s,it.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:xr.classes.FormData,Blob:xr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};G.forEach(["delete","get","head"],function(t){qa.headers[t]={}}),G.forEach(["post","put","patch"],function(t){qa.headers[t]=G.merge(ane)});const sne=G.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"]),lne=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
345
|
+
`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&sne[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},YT=Symbol("internals");function Ns(e){return e&&String(e).trim().toLowerCase()}function Bc(e){return e===!1||e==null?e:G.isArray(e)?e.map(Bc):String(e)}function une(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 cne(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function JT(e,t,n,r){if(G.isFunction(r))return r.call(this,t,n);if(G.isString(t)){if(G.isString(r))return t.indexOf(r)!==-1;if(G.isRegExp(r))return r.test(t)}}function fne(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function dne(e,t){const n=G.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,a,o){return this[r].call(this,t,i,a,o)},configurable:!0})})}class jn{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function a(s,u,l){const c=Ns(u);if(!c)throw new Error("header name must be a non-empty string");const f=G.findKey(i,c);(!f||i[f]===void 0||l===!0||l===void 0&&i[f]!==!1)&&(i[f||u]=Bc(s))}const o=(s,u)=>G.forEach(s,(l,c)=>a(l,c,u));return G.isPlainObject(t)||t instanceof this.constructor?o(t,n):G.isString(t)&&(t=t.trim())&&!cne(t)?o(lne(t),n):t!=null&&a(n,t,r),this}get(t,n){if(t=Ns(t),t){const r=G.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return une(i);if(G.isFunction(n))return n.call(this,i,r);if(G.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ns(t),t){const r=G.findKey(this,t);return!!(r&&(!n||JT(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function a(o){if(o=Ns(o),o){const s=G.findKey(r,o);s&&(!n||JT(r,r[s],s,n))&&(delete r[s],i=!0)}}return G.isArray(t)?t.forEach(a):a(t),i}clear(){return Object.keys(this).forEach(this.delete.bind(this))}normalize(t){const n=this,r={};return G.forEach(this,(i,a)=>{const o=G.findKey(r,a);if(o){n[o]=Bc(i),delete n[a];return}const s=t?fne(a):String(a).trim();s!==a&&delete n[a],n[s]=Bc(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return G.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&G.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(`
|
|
346
|
+
`)}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[YT]=this[YT]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=Ns(o);r[s]||(dne(i,o),r[s]=!0)}return G.isArray(t)?t.forEach(a):a(t),this}}jn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),G.freezeMethods(jn.prototype),G.freezeMethods(jn);function cv(e,t){const n=this||qa,r=t||n,i=jn.from(r.headers);let a=r.data;return G.forEach(e,function(s){a=s.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function XT(e){return!!(e&&e.__CANCEL__)}function Ds(e,t,n){it.call(this,e??"canceled",it.ERR_CANCELED,t,n),this.name="CanceledError"}G.inherits(Ds,it,{__CANCEL__:!0});const pne=null;function hne(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new it("Request failed with status code "+n.status,[it.ERR_BAD_REQUEST,it.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const mne=xr.isStandardBrowserEnv?function(){return{write:function(n,r,i,a,o,s){const u=[];u.push(n+"="+encodeURIComponent(r)),G.isNumber(i)&&u.push("expires="+new Date(i).toGMTString()),G.isString(a)&&u.push("path="+a),G.isString(o)&&u.push("domain="+o),s===!0&&u.push("secure"),document.cookie=u.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 vne(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function yne(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function QT(e,t){return e&&!vne(t)?yne(e,t):t}const gne=xr.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(a){let o=a;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{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(o){const s=G.isString(o)?i(o):o;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function bne(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function xne(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(u){const l=Date.now(),c=r[a];o||(o=l),n[i]=u,r[i]=l;let f=a,d=0;for(;f!==i;)d+=n[f++],f=f%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),l-o<t)return;const p=c&&l-c;return p?Math.round(d*1e3/p):void 0}}function eO(e,t){let n=0;const r=xne(50,250);return i=>{const a=i.loaded,o=i.lengthComputable?i.total:void 0,s=a-n,u=r(s),l=a<=o;n=a;const c={loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:u||void 0,estimated:u&&o&&l?(o-a)/u:void 0,event:i};c[t?"download":"upload"]=!0,e(c)}}const Uc={http:pne,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let i=e.data;const a=jn.from(e.headers).normalize(),o=e.responseType;let s;function u(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}G.isFormData(i)&&(xr.isStandardBrowserEnv||xr.isStandardBrowserWebWorkerEnv)&&a.setContentType(!1);let l=new XMLHttpRequest;if(e.auth){const p=e.auth.username||"",h=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(p+":"+h))}const c=QT(e.baseURL,e.url);l.open(e.method.toUpperCase(),WT(c,e.params,e.paramsSerializer),!0),l.timeout=e.timeout;function f(){if(!l)return;const p=jn.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),m={data:!o||o==="text"||o==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:p,config:e,request:l};hne(function(v){n(v),u()},function(v){r(v),u()},m),l=null}if("onloadend"in l?l.onloadend=f:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(f)},l.onabort=function(){l&&(r(new it("Request aborted",it.ECONNABORTED,e,l)),l=null)},l.onerror=function(){r(new it("Network Error",it.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let h=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const m=e.transitional||KT;e.timeoutErrorMessage&&(h=e.timeoutErrorMessage),r(new it(h,m.clarifyTimeoutError?it.ETIMEDOUT:it.ECONNABORTED,e,l)),l=null},xr.isStandardBrowserEnv){const p=(e.withCredentials||gne(c))&&e.xsrfCookieName&&mne.read(e.xsrfCookieName);p&&a.set(e.xsrfHeaderName,p)}i===void 0&&a.setContentType(null),"setRequestHeader"in l&&G.forEach(a.toJSON(),function(h,m){l.setRequestHeader(m,h)}),G.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),o&&o!=="json"&&(l.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&l.addEventListener("progress",eO(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",eO(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=p=>{l&&(r(!p||p.type?new Ds(null,e,l):p),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const d=bne(c);if(d&&xr.protocols.indexOf(d)===-1){r(new it("Unsupported protocol "+d+":",it.ERR_BAD_REQUEST,e));return}l.send(i||null)})}};G.forEach(Uc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const wne={getAdapter:e=>{e=G.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let i=0;i<t&&(n=e[i],!(r=G.isString(n)?Uc[n.toLowerCase()]:n));i++);if(!r)throw r===!1?new it(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(G.hasOwnProp(Uc,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!G.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:Uc};function fv(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ds(null,e)}function tO(e){return fv(e),e.headers=jn.from(e.headers),e.data=cv.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),wne.getAdapter(e.adapter||qa.adapter)(e).then(function(r){return fv(e),r.data=cv.call(e,e.transformResponse,r),r.headers=jn.from(r.headers),r},function(r){return XT(r)||(fv(e),r&&r.response&&(r.response.data=cv.call(e,e.transformResponse,r.response),r.response.headers=jn.from(r.response.headers))),Promise.reject(r)})}const nO=e=>e instanceof jn?e.toJSON():e;function Va(e,t){t=t||{};const n={};function r(l,c,f){return G.isPlainObject(l)&&G.isPlainObject(c)?G.merge.call({caseless:f},l,c):G.isPlainObject(c)?G.merge({},c):G.isArray(c)?c.slice():c}function i(l,c,f){if(G.isUndefined(c)){if(!G.isUndefined(l))return r(void 0,l,f)}else return r(l,c,f)}function a(l,c){if(!G.isUndefined(c))return r(void 0,c)}function o(l,c){if(G.isUndefined(c)){if(!G.isUndefined(l))return r(void 0,l)}else return r(void 0,c)}function s(l,c,f){if(f in t)return r(l,c);if(f in e)return r(void 0,l)}const u={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(l,c)=>i(nO(l),nO(c),!0)};return G.forEach(Object.keys(e).concat(Object.keys(t)),function(c){const f=u[c]||i,d=f(e[c],t[c],c);G.isUndefined(d)&&f!==s||(n[c]=d)}),n}const rO="1.2.5",dv={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{dv[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const iO={};dv.transitional=function(t,n,r){function i(a,o){return"[Axios v"+rO+"] Transitional option '"+a+"'"+o+(r?". "+r:"")}return(a,o,s)=>{if(t===!1)throw new it(i(o," has been removed"+(n?" in "+n:"")),it.ERR_DEPRECATED);return n&&!iO[o]&&(iO[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,o,s):!0}};function Sne(e,t,n){if(typeof e!="object")throw new it("options must be an object",it.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const a=r[i],o=t[a];if(o){const s=e[a],u=s===void 0||o(s,a,e);if(u!==!0)throw new it("option "+a+" must be "+u,it.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new it("Unknown option "+a,it.ERR_BAD_OPTION)}}const pv={assertOptions:Sne,validators:dv},vi=pv.validators;class Wi{constructor(t){this.defaults=t,this.interceptors={request:new ZT,response:new ZT}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Va(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:a}=n;r!==void 0&&pv.assertOptions(r,{silentJSONParsing:vi.transitional(vi.boolean),forcedJSONParsing:vi.transitional(vi.boolean),clarifyTimeoutError:vi.transitional(vi.boolean)},!1),i!==void 0&&pv.assertOptions(i,{encode:vi.function,serialize:vi.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o;o=a&&G.merge(a.common,a[n.method]),o&&G.forEach(["delete","get","head","post","put","patch","common"],h=>{delete a[h]}),n.headers=jn.concat(o,a);const s=[];let u=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(u=u&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const l=[];this.interceptors.response.forEach(function(m){l.push(m.fulfilled,m.rejected)});let c,f=0,d;if(!u){const h=[tO.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,l),d=h.length,c=Promise.resolve(n);f<d;)c=c.then(h[f++],h[f++]);return c}d=s.length;let p=n;for(f=0;f<d;){const h=s[f++],m=s[f++];try{p=h(p)}catch(y){m.call(this,y);break}}try{c=tO.call(this,p)}catch(h){return Promise.reject(h)}for(f=0,d=l.length;f<d;)c=c.then(l[f++],l[f++]);return c}getUri(t){t=Va(this.defaults,t);const n=QT(t.baseURL,t.url);return WT(n,t.params,t.paramsSerializer)}}G.forEach(["delete","get","head","options"],function(t){Wi.prototype[t]=function(n,r){return this.request(Va(r||{},{method:t,url:n,data:(r||{}).data}))}}),G.forEach(["post","put","patch"],function(t){function n(r){return function(a,o,s){return this.request(Va(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}Wi.prototype[t]=n(),Wi.prototype[t+"Form"]=n(!0)});class hv{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(i=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](i);r._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{r.subscribe(s),a=s}).then(i);return o.cancel=function(){r.unsubscribe(a)},o},t(function(a,o,s){r.reason||(r.reason=new Ds(a,o,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 hv(function(i){t=i}),cancel:t}}}function _ne(e){return function(n){return e.apply(null,n)}}function Ene(e){return G.isObject(e)&&e.isAxiosError===!0}const mv={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(mv).forEach(([e,t])=>{mv[t]=e});function aO(e){const t=new Wi(e),n=RT(Wi.prototype.request,t);return G.extend(n,Wi.prototype,t,{allOwnKeys:!0}),G.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return aO(Va(e,i))},n}const At=aO(qa);At.Axios=Wi,At.CanceledError=Ds,At.CancelToken=hv,At.isCancel=XT,At.VERSION=rO,At.toFormData=Fc,At.AxiosError=it,At.Cancel=At.CanceledError,At.all=function(t){return Promise.all(t)},At.spread=_ne,At.isAxiosError=Ene,At.mergeConfig=Va,At.AxiosHeaders=jn,At.formToJSON=e=>GT(G.isHTMLForm(e)?new FormData(e):e),At.HttpStatusCode=mv,At.default=At;const oO={},kne=Object.freeze(Object.defineProperty({__proto__:null,default:oO},Symbol.toStringTag,{value:"Module"}));var sO=Object,Tne=Error,One=EvalError,Cne=RangeError,$ne=ReferenceError,lO=SyntaxError,Ha=TypeError,Ine=URIError,Rne=Math.abs,Pne=Math.floor,Ane=Math.max,Nne=Math.min,Dne=Math.pow,Mne=Math.round,jne=Number.isNaN||function(t){return t!==t},Lne=jne,Fne=function(t){return Lne(t)||t===0?t:t<0?-1:1},Bne=Object.getOwnPropertyDescriptor,zc=Bne;if(zc)try{zc([],"length")}catch{zc=null}var qc=zc,Vc=Object.defineProperty||!1;if(Vc)try{Vc({},"a",{value:1})}catch{Vc=!1}var Hc=Vc,vv,uO;function Une(){return uO||(uO=1,vv=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(var a 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 s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==i||s.enumerable!==!0)return!1}return!0}),vv}var yv,cO;function zne(){if(cO)return yv;cO=1;var e=typeof Symbol<"u"&&Symbol,t=Une();return yv=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},yv}var gv,fO;function dO(){return fO||(fO=1,gv=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),gv}var bv,pO;function hO(){if(pO)return bv;pO=1;var e=sO;return bv=e.getPrototypeOf||null,bv}var xv,mO;function qne(){if(mO)return xv;mO=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",i=function(u,l){for(var c=[],f=0;f<u.length;f+=1)c[f]=u[f];for(var d=0;d<l.length;d+=1)c[d+u.length]=l[d];return c},a=function(u,l){for(var c=[],f=l,d=0;f<u.length;f+=1,d+=1)c[d]=u[f];return c},o=function(s,u){for(var l="",c=0;c<s.length;c+=1)l+=s[c],c+1<s.length&&(l+=u);return l};return xv=function(u){var l=this;if(typeof l!="function"||t.apply(l)!==r)throw new TypeError(e+l);for(var c=a(arguments,1),f,d=function(){if(this instanceof f){var v=l.apply(this,i(c,arguments));return Object(v)===v?v:this}return l.apply(u,i(c,arguments))},p=n(0,l.length-c.length),h=[],m=0;m<p;m++)h[m]="$"+m;if(f=Function("binder","return function ("+o(h,",")+"){ return binder.apply(this,arguments); }")(d),l.prototype){var y=function(){};y.prototype=l.prototype,f.prototype=new y,y.prototype=null}return f},xv}var wv,vO;function Ms(){if(vO)return wv;vO=1;var e=qne();return wv=Function.prototype.bind||e,wv}var Sv,yO;function _v(){return yO||(yO=1,Sv=Function.prototype.call),Sv}var Ev,gO;function bO(){return gO||(gO=1,Ev=Function.prototype.apply),Ev}var kv,xO;function Vne(){return xO||(xO=1,kv=typeof Reflect<"u"&&Reflect&&Reflect.apply),kv}var Tv,wO;function Hne(){if(wO)return Tv;wO=1;var e=Ms(),t=bO(),n=_v(),r=Vne();return Tv=r||e.call(n,t),Tv}var Ov,SO;function Wne(){if(SO)return Ov;SO=1;var e=Ms(),t=Ha,n=_v(),r=Hne();return Ov=function(a){if(a.length<1||typeof a[0]!="function")throw new t("a function is required");return r(e,n,a)},Ov}var Cv,_O;function Zne(){if(_O)return Cv;_O=1;var e=Wne(),t=qc,n;try{n=[].__proto__===Array.prototype}catch(o){if(!o||typeof o!="object"||!("code"in o)||o.code!=="ERR_PROTO_ACCESS")throw o}var r=!!n&&t&&t(Object.prototype,"__proto__"),i=Object,a=i.getPrototypeOf;return Cv=r&&typeof r.get=="function"?e([r.get]):typeof a=="function"?function(s){return a(s==null?s:i(s))}:!1,Cv}var $v,EO;function Kne(){if(EO)return $v;EO=1;var e=dO(),t=hO(),n=Zne();return $v=e?function(i){return e(i)}:t?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return t(i)}:n?function(i){return n(i)}:null,$v}var Iv,kO;function Gne(){if(kO)return Iv;kO=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Ms();return Iv=n.call(e,t),Iv}var Ge,Yne=sO,Jne=Tne,Xne=One,Qne=Cne,ere=$ne,Wa=lO,Za=Ha,tre=Ine,nre=Rne,rre=Pne,ire=Ane,are=Nne,ore=Dne,sre=Mne,lre=Fne,TO=Function,Rv=function(e){try{return TO('"use strict"; return ('+e+").constructor;")()}catch{}},js=qc,ure=Hc,Pv=function(){throw new Za},cre=js?function(){try{return arguments.callee,Pv}catch{try{return js(arguments,"callee").get}catch{return Pv}}}():Pv,Ka=zne()(),Zt=Kne(),fre=hO(),dre=dO(),OO=bO(),Ls=_v(),Ga={},pre=typeof Uint8Array>"u"||!Zt?Ge:Zt(Uint8Array),Zi={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ge:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ge:ArrayBuffer,"%ArrayIteratorPrototype%":Ka&&Zt?Zt([][Symbol.iterator]()):Ge,"%AsyncFromSyncIteratorPrototype%":Ge,"%AsyncFunction%":Ga,"%AsyncGenerator%":Ga,"%AsyncGeneratorFunction%":Ga,"%AsyncIteratorPrototype%":Ga,"%Atomics%":typeof Atomics>"u"?Ge:Atomics,"%BigInt%":typeof BigInt>"u"?Ge:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ge:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ge:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ge:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Jne,"%eval%":eval,"%EvalError%":Xne,"%Float32Array%":typeof Float32Array>"u"?Ge:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ge:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ge:FinalizationRegistry,"%Function%":TO,"%GeneratorFunction%":Ga,"%Int8Array%":typeof Int8Array>"u"?Ge:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ge:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ge:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ka&&Zt?Zt(Zt([][Symbol.iterator]())):Ge,"%JSON%":typeof JSON=="object"?JSON:Ge,"%Map%":typeof Map>"u"?Ge:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ka||!Zt?Ge:Zt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Yne,"%Object.getOwnPropertyDescriptor%":js,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ge:Promise,"%Proxy%":typeof Proxy>"u"?Ge:Proxy,"%RangeError%":Qne,"%ReferenceError%":ere,"%Reflect%":typeof Reflect>"u"?Ge:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ge:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ka||!Zt?Ge:Zt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ge:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ka&&Zt?Zt(""[Symbol.iterator]()):Ge,"%Symbol%":Ka?Symbol:Ge,"%SyntaxError%":Wa,"%ThrowTypeError%":cre,"%TypedArray%":pre,"%TypeError%":Za,"%Uint8Array%":typeof Uint8Array>"u"?Ge:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ge:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ge:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ge:Uint32Array,"%URIError%":tre,"%WeakMap%":typeof WeakMap>"u"?Ge:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ge:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ge:WeakSet,"%Function.prototype.call%":Ls,"%Function.prototype.apply%":OO,"%Object.defineProperty%":ure,"%Object.getPrototypeOf%":fre,"%Math.abs%":nre,"%Math.floor%":rre,"%Math.max%":ire,"%Math.min%":are,"%Math.pow%":ore,"%Math.round%":sre,"%Math.sign%":lre,"%Reflect.getPrototypeOf%":dre};if(Zt)try{null.error}catch(e){var hre=Zt(Zt(e));Zi["%Error.prototype%"]=hre}var mre=function e(t){var n;if(t==="%AsyncFunction%")n=Rv("async function () {}");else if(t==="%GeneratorFunction%")n=Rv("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Rv("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Zt&&(n=Zt(i.prototype))}return Zi[t]=n,n},CO={__proto__:null,"%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"]},Fs=Ms(),Wc=Gne(),vre=Fs.call(Ls,Array.prototype.concat),yre=Fs.call(OO,Array.prototype.splice),$O=Fs.call(Ls,String.prototype.replace),Zc=Fs.call(Ls,String.prototype.slice),gre=Fs.call(Ls,RegExp.prototype.exec),bre=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,xre=/\\(\\)?/g,wre=function(t){var n=Zc(t,0,1),r=Zc(t,-1);if(n==="%"&&r!=="%")throw new Wa("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Wa("invalid intrinsic syntax, expected opening `%`");var i=[];return $O(t,bre,function(a,o,s,u){i[i.length]=s?$O(u,xre,"$1"):o||a}),i},Sre=function(t,n){var r=t,i;if(Wc(CO,r)&&(i=CO[r],r="%"+i[0]+"%"),Wc(Zi,r)){var a=Zi[r];if(a===Ga&&(a=mre(r)),typeof a>"u"&&!n)throw new Za("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:a}}throw new Wa("intrinsic "+t+" does not exist!")},Kc=function(t,n){if(typeof t!="string"||t.length===0)throw new Za("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Za('"allowMissing" argument must be a boolean');if(gre(/^%?[^%]*%?$/,t)===null)throw new Wa("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=wre(t),i=r.length>0?r[0]:"",a=Sre("%"+i+"%",n),o=a.name,s=a.value,u=!1,l=a.alias;l&&(i=l[0],yre(r,vre([0,1],l)));for(var c=1,f=!0;c<r.length;c+=1){var d=r[c],p=Zc(d,0,1),h=Zc(d,-1);if((p==='"'||p==="'"||p==="`"||h==='"'||h==="'"||h==="`")&&p!==h)throw new Wa("property names with quotes must have matching quotes");if((d==="constructor"||!f)&&(u=!0),i+="."+d,o="%"+i+"%",Wc(Zi,o))s=Zi[o];else if(s!=null){if(!(d in s)){if(!n)throw new Za("base intrinsic for "+t+" exists, but the property is not available.");return}if(js&&c+1>=r.length){var m=js(s,d);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?s=m.get:s=s[d]}else f=Wc(s,d),s=s[d];f&&!u&&(Zi[o]=s)}}return s},IO={exports:{}},RO=Hc,_re=lO,Ya=Ha,PO=qc,Ere=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Ya("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Ya("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Ya("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Ya("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Ya("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Ya("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,u=!!PO&&PO(t,n);if(RO)RO(t,n,{configurable:o===null&&u?u.configurable:!o,enumerable:i===null&&u?u.enumerable:!i,value:r,writable:a===null&&u?u.writable:!a});else if(s||!i&&!a&&!o)t[n]=r;else throw new _re("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Av=Hc,AO=function(){return!!Av};AO.hasArrayLengthDefineBug=function(){if(!Av)return null;try{return Av([],"length",{value:1}).length!==1}catch{return!0}};var kre=AO,Tre=Kc,NO=Ere,Ore=kre(),DO=qc,MO=Ha,Cre=Tre("%Math.floor%"),$re=function(t,n){if(typeof t!="function")throw new MO("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||Cre(n)!==n)throw new MO("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in t&&DO){var o=DO(t,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(a=!1)}return(i||a||!r)&&(Ore?NO(t,"length",n,!0,!0):NO(t,"length",n)),t};(function(e){var t=Ms(),n=Kc,r=$re,i=Ha,a=n("%Function.prototype.apply%"),o=n("%Function.prototype.call%"),s=n("%Reflect.apply%",!0)||t.call(o,a),u=Hc,l=n("%Math.max%");e.exports=function(d){if(typeof d!="function")throw new i("a function is required");var p=s(t,o,arguments);return r(p,1+l(0,d.length-(arguments.length-1)),!0)};var c=function(){return s(t,a,arguments)};u?u(e.exports,"apply",{value:c}):e.exports.apply=c})(IO);var Ire=IO.exports,jO=Kc,LO=Ire,Rre=LO(jO("String.prototype.indexOf")),Pre=function(t,n){var r=jO(t,!!n);return typeof r=="function"&&Rre(t,".prototype.")>-1?LO(r):r};const Are=JC(kne);var Nv=typeof Map=="function"&&Map.prototype,Dv=Object.getOwnPropertyDescriptor&&Nv?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Gc=Nv&&Dv&&typeof Dv.get=="function"?Dv.get:null,FO=Nv&&Map.prototype.forEach,Mv=typeof Set=="function"&&Set.prototype,jv=Object.getOwnPropertyDescriptor&&Mv?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Yc=Mv&&jv&&typeof jv.get=="function"?jv.get:null,BO=Mv&&Set.prototype.forEach,Nre=typeof WeakMap=="function"&&WeakMap.prototype,Bs=Nre?WeakMap.prototype.has:null,Dre=typeof WeakSet=="function"&&WeakSet.prototype,Us=Dre?WeakSet.prototype.has:null,Mre=typeof WeakRef=="function"&&WeakRef.prototype,UO=Mre?WeakRef.prototype.deref:null,jre=Boolean.prototype.valueOf,Lre=Object.prototype.toString,Fre=Function.prototype.toString,Bre=String.prototype.match,Lv=String.prototype.slice,yi=String.prototype.replace,Ure=String.prototype.toUpperCase,zO=String.prototype.toLowerCase,qO=RegExp.prototype.test,VO=Array.prototype.concat,wr=Array.prototype.join,zre=Array.prototype.slice,HO=Math.floor,Fv=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Bv=Object.getOwnPropertySymbols,Uv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ja=typeof Symbol=="function"&&typeof Symbol.iterator=="object",an=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ja||!0)?Symbol.toStringTag:null,WO=Object.prototype.propertyIsEnumerable,ZO=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function KO(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||qO.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-HO(-e):HO(e);if(r!==e){var i=String(r),a=Lv.call(t,i.length+1);return yi.call(i,n,"$&_")+"."+yi.call(yi.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return yi.call(t,n,"$&_")}var zv=Are,GO=zv.custom,YO=QO(GO)?GO:null,qre=function e(t,n,r,i){var a=n||{};if(gi(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(gi(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=gi(a,"customInspect")?a.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(gi(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(gi(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=a.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 tC(t,a);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var u=String(t);return s?KO(t,u):u}if(typeof t=="bigint"){var l=String(t)+"n";return s?KO(t,l):l}var c=typeof a.depth>"u"?5:a.depth;if(typeof r>"u"&&(r=0),r>=c&&c>0&&typeof t=="object")return qv(t)?"[Array]":"[Object]";var f=sie(a,r);if(typeof i>"u")i=[];else if(eC(i,t)>=0)return"[Circular]";function d(R,F,N){if(F&&(i=zre.call(i),i.push(F)),N){var L={depth:a.depth};return gi(a,"quoteStyle")&&(L.quoteStyle=a.quoteStyle),e(R,L,r+1,i)}return e(R,a,r+1,i)}if(typeof t=="function"&&!XO(t)){var p=Xre(t),h=Jc(t,d);return"[Function"+(p?": "+p:" (anonymous)")+"]"+(h.length>0?" { "+wr.call(h,", ")+" }":"")}if(QO(t)){var m=Ja?yi.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Uv.call(t);return typeof t=="object"&&!Ja?zs(m):m}if(iie(t)){for(var y="<"+zO.call(String(t.nodeName)),v=t.attributes||[],g=0;g<v.length;g++)y+=" "+v[g].name+"="+JO(Vre(v[g].value),"double",a);return y+=">",t.childNodes&&t.childNodes.length&&(y+="..."),y+="</"+zO.call(String(t.nodeName))+">",y}if(qv(t)){if(t.length===0)return"[]";var b=Jc(t,d);return f&&!oie(b)?"["+Hv(b,f)+"]":"[ "+wr.call(b,", ")+" ]"}if(Wre(t)){var k=Jc(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!WO.call(t,"cause")?"{ ["+String(t)+"] "+wr.call(VO.call("[cause]: "+d(t.cause),k),", ")+" }":k.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+wr.call(k,", ")+" }"}if(typeof t=="object"&&o){if(YO&&typeof t[YO]=="function"&&zv)return zv(t,{depth:c-r});if(o!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(Qre(t)){var S=[];return FO&&FO.call(t,function(R,F){S.push(d(F,t,!0)+" => "+d(R,t))}),nC("Map",Gc.call(t),S,f)}if(nie(t)){var E=[];return BO&&BO.call(t,function(R){E.push(d(R,t))}),nC("Set",Yc.call(t),E,f)}if(eie(t))return Vv("WeakMap");if(rie(t))return Vv("WeakSet");if(tie(t))return Vv("WeakRef");if(Kre(t))return zs(d(Number(t)));if(Yre(t))return zs(d(Fv.call(t)));if(Gre(t))return zs(jre.call(t));if(Zre(t))return zs(d(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof ht<"u"&&t===ht)return"{ [object globalThis] }";if(!Hre(t)&&!XO(t)){var O=Jc(t,d),j=ZO?ZO(t)===Object.prototype:t instanceof Object||t.constructor===Object,q=t instanceof Object?"":"null prototype",T=!j&&an&&Object(t)===t&&an in t?Lv.call(bi(t),8,-1):q?"Object":"",I=j||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",U=I+(T||q?"["+wr.call(VO.call([],T||[],q||[]),": ")+"] ":"");return O.length===0?U+"{}":f?U+"{"+Hv(O,f)+"}":U+"{ "+wr.call(O,", ")+" }"}return String(t)};function JO(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function Vre(e){return yi.call(String(e),/"/g,""")}function qv(e){return bi(e)==="[object Array]"&&(!an||!(typeof e=="object"&&an in e))}function Hre(e){return bi(e)==="[object Date]"&&(!an||!(typeof e=="object"&&an in e))}function XO(e){return bi(e)==="[object RegExp]"&&(!an||!(typeof e=="object"&&an in e))}function Wre(e){return bi(e)==="[object Error]"&&(!an||!(typeof e=="object"&&an in e))}function Zre(e){return bi(e)==="[object String]"&&(!an||!(typeof e=="object"&&an in e))}function Kre(e){return bi(e)==="[object Number]"&&(!an||!(typeof e=="object"&&an in e))}function Gre(e){return bi(e)==="[object Boolean]"&&(!an||!(typeof e=="object"&&an in e))}function QO(e){if(Ja)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Uv)return!1;try{return Uv.call(e),!0}catch{}return!1}function Yre(e){if(!e||typeof e!="object"||!Fv)return!1;try{return Fv.call(e),!0}catch{}return!1}var Jre=Object.prototype.hasOwnProperty||function(e){return e in this};function gi(e,t){return Jre.call(e,t)}function bi(e){return Lre.call(e)}function Xre(e){if(e.name)return e.name;var t=Bre.call(Fre.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function eC(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 Qre(e){if(!Gc||!e||typeof e!="object")return!1;try{Gc.call(e);try{Yc.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function eie(e){if(!Bs||!e||typeof e!="object")return!1;try{Bs.call(e,Bs);try{Us.call(e,Us)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function tie(e){if(!UO||!e||typeof e!="object")return!1;try{return UO.call(e),!0}catch{}return!1}function nie(e){if(!Yc||!e||typeof e!="object")return!1;try{Yc.call(e);try{Gc.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function rie(e){if(!Us||!e||typeof e!="object")return!1;try{Us.call(e,Us);try{Bs.call(e,Bs)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function iie(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function tC(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return tC(Lv.call(e,0,t.maxStringLength),t)+r}var i=yi.call(yi.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,aie);return JO(i,"single",t)}function aie(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":"")+Ure.call(t.toString(16))}function zs(e){return"Object("+e+")"}function Vv(e){return e+" { ? }"}function nC(e,t,n,r){var i=r?Hv(n,r):wr.call(n,", ");return e+" ("+t+") {"+i+"}"}function oie(e){for(var t=0;t<e.length;t++)if(eC(e[t],`
|
|
347
|
+
`)>=0)return!1;return!0}function sie(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=wr.call(Array(e.indent+1)," ");else return null;return{base:n,prev:wr.call(Array(t+1),n)}}function Hv(e,t){if(e.length===0)return"";var n=`
|
|
348
348
|
`+t.prev+t.base;return n+wr.call(e,","+n)+`
|
|
349
|
-
`+t.prev}function Jc(e,t){var n=Uv(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=gi(e,i)?t(e[i],e):""}var a=typeof Lv=="function"?Lv(e):[],o;if(Ja){o={};for(var s=0;s<a.length;s++)o["$"+a[s]]=a[s]}for(var u in e)gi(e,u)&&(n&&String(Number(u))===u&&u<e.length||Ja&&o["$"+u]instanceof Symbol||(LO.call(/[^\w$]/,u)?r.push(t(u,e)+": "+t(e[u],e)):r.push(u+": "+t(e[u],e))));if(typeof Lv=="function")for(var l=0;l<a.length;l++)UO.call(e,a[l])&&r.push("["+t(a[l])+"]: "+t(e[a[l]],e));return r}var XO=Kc,Xa=Sre,Xre=Are,Qre=Ha,Xc=XO("%WeakMap%",!0),Qc=XO("%Map%",!0),eie=Xa("WeakMap.prototype.get",!0),tie=Xa("WeakMap.prototype.set",!0),nie=Xa("WeakMap.prototype.has",!0),rie=Xa("Map.prototype.get",!0),iie=Xa("Map.prototype.set",!0),aie=Xa("Map.prototype.has",!0),Vv=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},oie=function(e,t){var n=Vv(e,t);return n&&n.value},sie=function(e,t,n){var r=Vv(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},lie=function(e,t){return!!Vv(e,t)},uie=function(){var t,n,r,i={assert:function(a){if(!i.has(a))throw new Qre("Side channel does not contain "+Xre(a))},get:function(a){if(Xc&&a&&(typeof a=="object"||typeof a=="function")){if(t)return eie(t,a)}else if(Qc){if(n)return rie(n,a)}else if(r)return oie(r,a)},has:function(a){if(Xc&&a&&(typeof a=="object"||typeof a=="function")){if(t)return nie(t,a)}else if(Qc){if(n)return aie(n,a)}else if(r)return lie(r,a);return!1},set:function(a,o){Xc&&a&&(typeof a=="object"||typeof a=="function")?(t||(t=new Xc),tie(t,a,o)):Qc?(n||(n=new Qc),iie(n,a,o)):(r||(r={key:{},next:null}),sie(r,a,o))}};return i},cie=String.prototype.replace,fie=/%20/g,Hv={RFC1738:"RFC1738",RFC3986:"RFC3986"},Wv={default:Hv.RFC3986,formatters:{RFC1738:function(e){return cie.call(e,fie,"+")},RFC3986:function(e){return String(e)}},RFC1738:Hv.RFC1738,RFC3986:Hv.RFC3986},die=Wv,Zv=Object.prototype.hasOwnProperty,Ki=Array.isArray,Sr=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),pie=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Ki(r)){for(var i=[],a=0;a<r.length;++a)typeof r[a]<"u"&&i.push(r[a]);n.obj[n.prop]=i}}},QO=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},hie=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Ki(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Zv.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 Ki(t)&&!Ki(n)&&(i=QO(t,r)),Ki(t)&&Ki(n)?(n.forEach(function(a,o){if(Zv.call(t,o)){var s=t[o];s&&typeof s=="object"&&a&&typeof a=="object"?t[o]=e(s,a,r):t.push(a)}else t[o]=a}),t):Object.keys(n).reduce(function(a,o){var s=n[o];return Zv.call(a,o)?a[o]=e(a[o],s,r):a[o]=s,a},i)},mie=function(t,n){return Object.keys(n).reduce(function(r,i){return r[i]=n[i],r},t)},vie=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}},Kv=1024,yie=function(t,n,r,i,a){if(t.length===0)return t;var o=t;if(typeof t=="symbol"?o=Symbol.prototype.toString.call(t):typeof t!="string"&&(o=String(t)),r==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(p){return"%26%23"+parseInt(p.slice(2),16)+"%3B"});for(var s="",u=0;u<o.length;u+=Kv){for(var l=o.length>=Kv?o.slice(u,u+Kv):o,c=[],f=0;f<l.length;++f){var d=l.charCodeAt(f);if(d===45||d===46||d===95||d===126||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||a===die.RFC1738&&(d===40||d===41)){c[c.length]=l.charAt(f);continue}if(d<128){c[c.length]=Sr[d];continue}if(d<2048){c[c.length]=Sr[192|d>>6]+Sr[128|d&63];continue}if(d<55296||d>=57344){c[c.length]=Sr[224|d>>12]+Sr[128|d>>6&63]+Sr[128|d&63];continue}f+=1,d=65536+((d&1023)<<10|l.charCodeAt(f)&1023),c[c.length]=Sr[240|d>>18]+Sr[128|d>>12&63]+Sr[128|d>>6&63]+Sr[128|d&63]}s+=c.join("")}return s},gie=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],i=0;i<n.length;++i)for(var a=n[i],o=a.obj[a.prop],s=Object.keys(o),u=0;u<s.length;++u){var l=s[u],c=o[l];typeof c=="object"&&c!==null&&r.indexOf(c)===-1&&(n.push({obj:o,prop:l}),r.push(c))}return pie(n),t},bie=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},xie=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},wie=function(t,n){return[].concat(t,n)},Sie=function(t,n){if(Ki(t)){for(var r=[],i=0;i<t.length;i+=1)r.push(n(t[i]));return r}return n(t)},eC={arrayToObject:QO,assign:mie,combine:wie,compact:gie,decode:vie,encode:yie,isBuffer:xie,isRegExp:bie,maybeMap:Sie,merge:hie},tC=uie,ef=eC,qs=Wv,_ie=Object.prototype.hasOwnProperty,nC={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},_r=Array.isArray,Eie=Array.prototype.push,rC=function(e,t){Eie.apply(e,_r(t)?t:[t])},kie=Date.prototype.toISOString,iC=qs.default,Bt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:ef.encode,encodeValuesOnly:!1,format:iC,formatter:qs.formatters[iC],indices:!1,serializeDate:function(t){return kie.call(t)},skipNulls:!1,strictNullHandling:!1},Tie=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Gv={},Oie=function e(t,n,r,i,a,o,s,u,l,c,f,d,p,m,h,y,v,g){for(var b=t,k=g,S=0,E=!1;(k=k.get(Gv))!==void 0&&!E;){var O=k.get(t);if(S+=1,typeof O<"u"){if(O===S)throw new RangeError("Cyclic object value");E=!0}typeof k.get(Gv)>"u"&&(S=0)}if(typeof c=="function"?b=c(n,b):b instanceof Date?b=p(b):r==="comma"&&_r(b)&&(b=ef.maybeMap(b,function(x){return x instanceof Date?p(x):x})),b===null){if(o)return l&&!y?l(n,Bt.encoder,v,"key",m):n;b=""}if(Tie(b)||ef.isBuffer(b)){if(l){var L=y?n:l(n,Bt.encoder,v,"key",m);return[h(L)+"="+h(l(b,Bt.encoder,v,"value",m))]}return[h(n)+"="+h(String(b))]}var D=[];if(typeof b>"u")return D;var T;if(r==="comma"&&_r(b))y&&l&&(b=ef.maybeMap(b,l)),T=[{value:b.length>0?b.join(",")||null:void 0}];else if(_r(c))T=c;else{var P=Object.keys(b);T=f?P.sort(f):P}var V=u?n.replace(/\./g,"%2E"):n,$=i&&_r(b)&&b.length===1?V+"[]":V;if(a&&_r(b)&&b.length===0)return $+"[]";for(var F=0;F<T.length;++F){var M=T[F],B=typeof M=="object"&&typeof M.value<"u"?M.value:b[M];if(!(s&&B===null)){var W=d&&u?M.replace(/\./g,"%2E"):M,U=_r(b)?typeof r=="function"?r($,W):$:$+(d?"."+W:"["+W+"]");g.set(t,S);var N=tC();N.set(Gv,g),rC(D,e(B,U,r,i,a,o,s,u,r==="comma"&&y&&_r(b)?null:l,c,f,d,p,m,h,y,v,N))}}return D},Cie=function(t){if(!t)return Bt;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys<"u"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");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||Bt.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=qs.default;if(typeof t.format<"u"){if(!_ie.call(qs.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var i=qs.formatters[r],a=Bt.filter;(typeof t.filter=="function"||_r(t.filter))&&(a=t.filter);var o;if(t.arrayFormat in nC?o=t.arrayFormat:"indices"in t?o=t.indices?"indices":"repeat":o=Bt.arrayFormat,"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var s=typeof t.allowDots>"u"?t.encodeDotInKeys===!0?!0:Bt.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Bt.addQueryPrefix,allowDots:s,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Bt.allowEmptyArrays,arrayFormat:o,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Bt.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?Bt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Bt.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:Bt.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:Bt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Bt.encodeValuesOnly,filter:a,format:r,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Bt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Bt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Bt.strictNullHandling}},$ie=function(e,t){var n=e,r=Cie(t),i,a;typeof r.filter=="function"?(a=r.filter,n=a("",n)):_r(r.filter)&&(a=r.filter,i=a);var o=[];if(typeof n!="object"||n===null)return"";var s=nC[r.arrayFormat],u=s==="comma"&&r.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var l=tC(),c=0;c<i.length;++c){var f=i[c];r.skipNulls&&n[f]===null||rC(o,Oie(n[f],f,s,u,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,l))}var d=o.join(r.delimiter),p=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),d.length>0?p+d:""},Qa=eC,Yv=Object.prototype.hasOwnProperty,Iie=Array.isArray,Tt={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Qa.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},Rie=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},aC=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},Pie="utf8=%26%2310003%3B",Aie="utf8=%E2%9C%93",Nie=function(t,n){var r={__proto__:null},i=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;i=i.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=n.parameterLimit===1/0?void 0:n.parameterLimit,o=i.split(n.delimiter,a),s=-1,u,l=n.charset;if(n.charsetSentinel)for(u=0;u<o.length;++u)o[u].indexOf("utf8=")===0&&(o[u]===Aie?l="utf-8":o[u]===Pie&&(l="iso-8859-1"),s=u,u=o.length);for(u=0;u<o.length;++u)if(u!==s){var c=o[u],f=c.indexOf("]="),d=f===-1?c.indexOf("="):f+1,p,m;d===-1?(p=n.decoder(c,Tt.decoder,l,"key"),m=n.strictNullHandling?null:""):(p=n.decoder(c.slice(0,d),Tt.decoder,l,"key"),m=Qa.maybeMap(aC(c.slice(d+1),n),function(y){return n.decoder(y,Tt.decoder,l,"value")})),m&&n.interpretNumericEntities&&l==="iso-8859-1"&&(m=Rie(m)),c.indexOf("[]=")>-1&&(m=Iie(m)?[m]:m);var h=Yv.call(r,p);h&&n.duplicates==="combine"?r[p]=Qa.combine(r[p],m):(!h||n.duplicates==="last")&&(r[p]=m)}return r},Die=function(e,t,n,r){for(var i=r?t:aC(t,n),a=e.length-1;a>=0;--a){var o,s=e[a];if(s==="[]"&&n.parseArrays)o=n.allowEmptyArrays&&(i===""||n.strictNullHandling&&i===null)?[]:[].concat(i);else{o=n.plainObjects?Object.create(null):{};var u=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,l=n.decodeDotInKeys?u.replace(/%2E/g,"."):u,c=parseInt(l,10);!n.parseArrays&&l===""?o={0:i}:!isNaN(c)&&s!==l&&String(c)===l&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(o=[],o[c]=i):l!=="__proto__"&&(o[l]=i)}i=o}return i},Mie=function(t,n,r,i){if(t){var a=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,u=r.depth>0&&o.exec(a),l=u?a.slice(0,u.index):a,c=[];if(l){if(!r.plainObjects&&Yv.call(Object.prototype,l)&&!r.allowPrototypes)return;c.push(l)}for(var f=0;r.depth>0&&(u=s.exec(a))!==null&&f<r.depth;){if(f+=1,!r.plainObjects&&Yv.call(Object.prototype,u[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(u[1])}if(u){if(r.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");c.push("["+a.slice(u.index)+"]")}return Die(c,n,r,i)}},jie=function(t){if(!t)return Tt;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&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"?Tt.charset:t.charset,r=typeof t.duplicates>"u"?Tt.duplicates:t.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var i=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:Tt.allowDots:!!t.allowDots;return{allowDots:i,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Tt.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Tt.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Tt.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Tt.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Tt.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Tt.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:Tt.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:Tt.decoder,delimiter:typeof t.delimiter=="string"||Qa.isRegExp(t.delimiter)?t.delimiter:Tt.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Tt.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Tt.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Tt.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Tt.plainObjects,strictDepth:typeof t.strictDepth=="boolean"?!!t.strictDepth:Tt.strictDepth,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Tt.strictNullHandling}},Lie=function(e,t){var n=jie(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?Nie(e,n):e,i=n.plainObjects?Object.create(null):{},a=Object.keys(r),o=0;o<a.length;++o){var s=a[o],u=Mie(s,r[s],n,typeof e=="string");i=Qa.merge(i,u,n)}return n.allowSparse===!0?i:Qa.compact(i)},Fie=$ie,Bie=Lie,Uie=Wv,zie={formats:Uie,parse:Bie,stringify:Fie};const qie=Ke(zie);var Jv={exports:{}};/** @license
|
|
349
|
+
`+t.prev}function Jc(e,t){var n=qv(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=gi(e,i)?t(e[i],e):""}var a=typeof Bv=="function"?Bv(e):[],o;if(Ja){o={};for(var s=0;s<a.length;s++)o["$"+a[s]]=a[s]}for(var u in e)gi(e,u)&&(n&&String(Number(u))===u&&u<e.length||Ja&&o["$"+u]instanceof Symbol||(qO.call(/[^\w$]/,u)?r.push(t(u,e)+": "+t(e[u],e)):r.push(u+": "+t(e[u],e))));if(typeof Bv=="function")for(var l=0;l<a.length;l++)WO.call(e,a[l])&&r.push("["+t(a[l])+"]: "+t(e[a[l]],e));return r}var rC=Kc,Xa=Pre,lie=qre,uie=Ha,Xc=rC("%WeakMap%",!0),Qc=rC("%Map%",!0),cie=Xa("WeakMap.prototype.get",!0),fie=Xa("WeakMap.prototype.set",!0),die=Xa("WeakMap.prototype.has",!0),pie=Xa("Map.prototype.get",!0),hie=Xa("Map.prototype.set",!0),mie=Xa("Map.prototype.has",!0),Wv=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},vie=function(e,t){var n=Wv(e,t);return n&&n.value},yie=function(e,t,n){var r=Wv(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},gie=function(e,t){return!!Wv(e,t)},bie=function(){var t,n,r,i={assert:function(a){if(!i.has(a))throw new uie("Side channel does not contain "+lie(a))},get:function(a){if(Xc&&a&&(typeof a=="object"||typeof a=="function")){if(t)return cie(t,a)}else if(Qc){if(n)return pie(n,a)}else if(r)return vie(r,a)},has:function(a){if(Xc&&a&&(typeof a=="object"||typeof a=="function")){if(t)return die(t,a)}else if(Qc){if(n)return mie(n,a)}else if(r)return gie(r,a);return!1},set:function(a,o){Xc&&a&&(typeof a=="object"||typeof a=="function")?(t||(t=new Xc),fie(t,a,o)):Qc?(n||(n=new Qc),hie(n,a,o)):(r||(r={key:{},next:null}),yie(r,a,o))}};return i},xie=String.prototype.replace,wie=/%20/g,Zv={RFC1738:"RFC1738",RFC3986:"RFC3986"},Kv={default:Zv.RFC3986,formatters:{RFC1738:function(e){return xie.call(e,wie,"+")},RFC3986:function(e){return String(e)}},RFC1738:Zv.RFC1738,RFC3986:Zv.RFC3986},Sie=Kv,Gv=Object.prototype.hasOwnProperty,Ki=Array.isArray,Sr=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),_ie=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Ki(r)){for(var i=[],a=0;a<r.length;++a)typeof r[a]<"u"&&i.push(r[a]);n.obj[n.prop]=i}}},iC=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},Eie=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Ki(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Gv.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 Ki(t)&&!Ki(n)&&(i=iC(t,r)),Ki(t)&&Ki(n)?(n.forEach(function(a,o){if(Gv.call(t,o)){var s=t[o];s&&typeof s=="object"&&a&&typeof a=="object"?t[o]=e(s,a,r):t.push(a)}else t[o]=a}),t):Object.keys(n).reduce(function(a,o){var s=n[o];return Gv.call(a,o)?a[o]=e(a[o],s,r):a[o]=s,a},i)},kie=function(t,n){return Object.keys(n).reduce(function(r,i){return r[i]=n[i],r},t)},Tie=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}},Yv=1024,Oie=function(t,n,r,i,a){if(t.length===0)return t;var o=t;if(typeof t=="symbol"?o=Symbol.prototype.toString.call(t):typeof t!="string"&&(o=String(t)),r==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(p){return"%26%23"+parseInt(p.slice(2),16)+"%3B"});for(var s="",u=0;u<o.length;u+=Yv){for(var l=o.length>=Yv?o.slice(u,u+Yv):o,c=[],f=0;f<l.length;++f){var d=l.charCodeAt(f);if(d===45||d===46||d===95||d===126||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||a===Sie.RFC1738&&(d===40||d===41)){c[c.length]=l.charAt(f);continue}if(d<128){c[c.length]=Sr[d];continue}if(d<2048){c[c.length]=Sr[192|d>>6]+Sr[128|d&63];continue}if(d<55296||d>=57344){c[c.length]=Sr[224|d>>12]+Sr[128|d>>6&63]+Sr[128|d&63];continue}f+=1,d=65536+((d&1023)<<10|l.charCodeAt(f)&1023),c[c.length]=Sr[240|d>>18]+Sr[128|d>>12&63]+Sr[128|d>>6&63]+Sr[128|d&63]}s+=c.join("")}return s},Cie=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],i=0;i<n.length;++i)for(var a=n[i],o=a.obj[a.prop],s=Object.keys(o),u=0;u<s.length;++u){var l=s[u],c=o[l];typeof c=="object"&&c!==null&&r.indexOf(c)===-1&&(n.push({obj:o,prop:l}),r.push(c))}return _ie(n),t},$ie=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},Iie=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},Rie=function(t,n){return[].concat(t,n)},Pie=function(t,n){if(Ki(t)){for(var r=[],i=0;i<t.length;i+=1)r.push(n(t[i]));return r}return n(t)},aC={arrayToObject:iC,assign:kie,combine:Rie,compact:Cie,decode:Tie,encode:Oie,isBuffer:Iie,isRegExp:$ie,maybeMap:Pie,merge:Eie},oC=bie,ef=aC,qs=Kv,Aie=Object.prototype.hasOwnProperty,sC={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},_r=Array.isArray,Nie=Array.prototype.push,lC=function(e,t){Nie.apply(e,_r(t)?t:[t])},Die=Date.prototype.toISOString,uC=qs.default,Bt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:ef.encode,encodeValuesOnly:!1,format:uC,formatter:qs.formatters[uC],indices:!1,serializeDate:function(t){return Die.call(t)},skipNulls:!1,strictNullHandling:!1},Mie=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Jv={},jie=function e(t,n,r,i,a,o,s,u,l,c,f,d,p,h,m,y,v,g){for(var b=t,k=g,S=0,E=!1;(k=k.get(Jv))!==void 0&&!E;){var O=k.get(t);if(S+=1,typeof O<"u"){if(O===S)throw new RangeError("Cyclic object value");E=!0}typeof k.get(Jv)>"u"&&(S=0)}if(typeof c=="function"?b=c(n,b):b instanceof Date?b=p(b):r==="comma"&&_r(b)&&(b=ef.maybeMap(b,function(x){return x instanceof Date?p(x):x})),b===null){if(o)return l&&!y?l(n,Bt.encoder,v,"key",h):n;b=""}if(Mie(b)||ef.isBuffer(b)){if(l){var j=y?n:l(n,Bt.encoder,v,"key",h);return[m(j)+"="+m(l(b,Bt.encoder,v,"value",h))]}return[m(n)+"="+m(String(b))]}var q=[];if(typeof b>"u")return q;var T;if(r==="comma"&&_r(b))y&&l&&(b=ef.maybeMap(b,l)),T=[{value:b.length>0?b.join(",")||null:void 0}];else if(_r(c))T=c;else{var I=Object.keys(b);T=f?I.sort(f):I}var U=u?n.replace(/\./g,"%2E"):n,R=i&&_r(b)&&b.length===1?U+"[]":U;if(a&&_r(b)&&b.length===0)return R+"[]";for(var F=0;F<T.length;++F){var N=T[F],L=typeof N=="object"&&typeof N.value<"u"?N.value:b[N];if(!(s&&L===null)){var W=d&&u?N.replace(/\./g,"%2E"):N,z=_r(b)?typeof r=="function"?r(R,W):R:R+(d?"."+W:"["+W+"]");g.set(t,S);var A=oC();A.set(Jv,g),lC(q,e(L,z,r,i,a,o,s,u,r==="comma"&&y&&_r(b)?null:l,c,f,d,p,h,m,y,v,A))}}return q},Lie=function(t){if(!t)return Bt;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys<"u"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");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||Bt.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=qs.default;if(typeof t.format<"u"){if(!Aie.call(qs.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var i=qs.formatters[r],a=Bt.filter;(typeof t.filter=="function"||_r(t.filter))&&(a=t.filter);var o;if(t.arrayFormat in sC?o=t.arrayFormat:"indices"in t?o=t.indices?"indices":"repeat":o=Bt.arrayFormat,"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var s=typeof t.allowDots>"u"?t.encodeDotInKeys===!0?!0:Bt.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Bt.addQueryPrefix,allowDots:s,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Bt.allowEmptyArrays,arrayFormat:o,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Bt.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?Bt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Bt.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:Bt.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:Bt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Bt.encodeValuesOnly,filter:a,format:r,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Bt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Bt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Bt.strictNullHandling}},Fie=function(e,t){var n=e,r=Lie(t),i,a;typeof r.filter=="function"?(a=r.filter,n=a("",n)):_r(r.filter)&&(a=r.filter,i=a);var o=[];if(typeof n!="object"||n===null)return"";var s=sC[r.arrayFormat],u=s==="comma"&&r.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var l=oC(),c=0;c<i.length;++c){var f=i[c];r.skipNulls&&n[f]===null||lC(o,jie(n[f],f,s,u,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,l))}var d=o.join(r.delimiter),p=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),d.length>0?p+d:""},Qa=aC,Xv=Object.prototype.hasOwnProperty,Bie=Array.isArray,Tt={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Qa.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},Uie=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},cC=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},zie="utf8=%26%2310003%3B",qie="utf8=%E2%9C%93",Vie=function(t,n){var r={__proto__:null},i=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;i=i.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=n.parameterLimit===1/0?void 0:n.parameterLimit,o=i.split(n.delimiter,a),s=-1,u,l=n.charset;if(n.charsetSentinel)for(u=0;u<o.length;++u)o[u].indexOf("utf8=")===0&&(o[u]===qie?l="utf-8":o[u]===zie&&(l="iso-8859-1"),s=u,u=o.length);for(u=0;u<o.length;++u)if(u!==s){var c=o[u],f=c.indexOf("]="),d=f===-1?c.indexOf("="):f+1,p,h;d===-1?(p=n.decoder(c,Tt.decoder,l,"key"),h=n.strictNullHandling?null:""):(p=n.decoder(c.slice(0,d),Tt.decoder,l,"key"),h=Qa.maybeMap(cC(c.slice(d+1),n),function(y){return n.decoder(y,Tt.decoder,l,"value")})),h&&n.interpretNumericEntities&&l==="iso-8859-1"&&(h=Uie(h)),c.indexOf("[]=")>-1&&(h=Bie(h)?[h]:h);var m=Xv.call(r,p);m&&n.duplicates==="combine"?r[p]=Qa.combine(r[p],h):(!m||n.duplicates==="last")&&(r[p]=h)}return r},Hie=function(e,t,n,r){for(var i=r?t:cC(t,n),a=e.length-1;a>=0;--a){var o,s=e[a];if(s==="[]"&&n.parseArrays)o=n.allowEmptyArrays&&(i===""||n.strictNullHandling&&i===null)?[]:[].concat(i);else{o=n.plainObjects?Object.create(null):{};var u=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,l=n.decodeDotInKeys?u.replace(/%2E/g,"."):u,c=parseInt(l,10);!n.parseArrays&&l===""?o={0:i}:!isNaN(c)&&s!==l&&String(c)===l&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(o=[],o[c]=i):l!=="__proto__"&&(o[l]=i)}i=o}return i},Wie=function(t,n,r,i){if(t){var a=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,u=r.depth>0&&o.exec(a),l=u?a.slice(0,u.index):a,c=[];if(l){if(!r.plainObjects&&Xv.call(Object.prototype,l)&&!r.allowPrototypes)return;c.push(l)}for(var f=0;r.depth>0&&(u=s.exec(a))!==null&&f<r.depth;){if(f+=1,!r.plainObjects&&Xv.call(Object.prototype,u[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(u[1])}if(u){if(r.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");c.push("["+a.slice(u.index)+"]")}return Hie(c,n,r,i)}},Zie=function(t){if(!t)return Tt;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&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"?Tt.charset:t.charset,r=typeof t.duplicates>"u"?Tt.duplicates:t.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var i=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:Tt.allowDots:!!t.allowDots;return{allowDots:i,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Tt.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Tt.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Tt.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Tt.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Tt.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Tt.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:Tt.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:Tt.decoder,delimiter:typeof t.delimiter=="string"||Qa.isRegExp(t.delimiter)?t.delimiter:Tt.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Tt.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Tt.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Tt.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Tt.plainObjects,strictDepth:typeof t.strictDepth=="boolean"?!!t.strictDepth:Tt.strictDepth,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Tt.strictNullHandling}},Kie=function(e,t){var n=Zie(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?Vie(e,n):e,i=n.plainObjects?Object.create(null):{},a=Object.keys(r),o=0;o<a.length;++o){var s=a[o],u=Wie(s,r[s],n,typeof e=="string");i=Qa.merge(i,u,n)}return n.allowSparse===!0?i:Qa.compact(i)},Gie=Fie,Yie=Kie,Jie=Kv,Xie={formats:Jie,parse:Yie,stringify:Gie};const Qie=Ke(Xie);var Qv={exports:{}};/** @license
|
|
350
350
|
* eventsource.js
|
|
351
351
|
* Available under MIT License (MIT)
|
|
352
352
|
* https://github.com/Yaffle/EventSource/
|
|
353
|
-
*/(function(e,t){(function(n){var r=n.setTimeout,i=n.clearTimeout,a=n.XMLHttpRequest,o=n.XDomainRequest,s=n.ActiveXObject,u=n.EventSource,l=n.document,c=n.Promise,f=n.fetch,d=n.Response,p=n.TextDecoder,
|
|
354
|
-
`),ee=0;ee<
|
|
355
|
-
`,Ut+=Bn):Fn==="id"?Ot=Bn:Fn==="event"?Ze=Bn:Fn==="retry"?(Se=pe(Bn,Se),Ae=Se):Fn==="heartbeatTimeout"&&(Pe=pe(Bn,Pe),Je!==0&&(i(Je),Je=r(function(){Wr()},Pe)))}if(tt===q){if(Ut!==""){He=Ot,Ze===""&&(Ze="message");var ki=new $(Ze,{data:Ut.slice(1),lastEventId:Ot});if(R.dispatchEvent(ki),Ze==="open"?ue(R,R.onopen,ki):Ze==="message"?ue(R,R.onmessage,ki):Ze==="error"&&ue(R,R.onerror,ki),lt===N)return}Ut="",Ze=""}tt=qt===13?x:q}else tt===q&&(xn=Vt,tt=K),tt===K?qt===58&&($n=Vt+1,tt=_):tt===_&&(tt=Y)}}},$r=function(pt){if(lt===U||lt===W){lt=B,Je!==0&&(i(Je),Je=0),Je=r(function(){Wr()},Ae),Ae=he(Math.min(Se*16,Ae*2)),R.readyState=W;var wt=new M("error",{error:pt});R.dispatchEvent(wt),ue(R,R.onerror,wt),pt!=null&&console.error(pt)}},ir=function(){lt=N,Oe!=null&&(Oe.abort(),Oe=void 0),Je!==0&&(i(Je),Je=0),R.readyState=N},Wr=function(){if(Je=0,lt!==B){if(!Fe&&Oe!=null)$r(new Error("No activity within "+Pe+" milliseconds. "+(lt===W?"No response received.":z+" chars received.")+" Reconnecting.")),Oe!=null&&(Oe.abort(),Oe=void 0);else{var pt=Math.max((Fe||Date.now())+Pe-Date.now(),1);Fe=!1,Je=r(function(){Wr()},pt)}return}Fe=!1,z=0,Je=r(function(){Wr()},Pe),lt=W,Ut="",Ze="",Ot=He,Ct="",xn=0,$n=0,tt=q;var wt=J;if(J.slice(0,5)!=="data:"&&J.slice(0,5)!=="blob:"&&He!==""){var zt=J.indexOf("?");wt=zt===-1?J:J.slice(0,zt+1)+J.slice(zt+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Bn,ki){return ki===ke?"":Bn}),wt+=(J.indexOf("?")===-1?"?":"&")+ke+"="+encodeURIComponent(He)}var qt=R.withCredentials,Xt={};Xt.Accept="text/event-stream";var Vt=R.headers;if(Vt!=null)for(var Fn in Vt)Object.prototype.hasOwnProperty.call(Vt,Fn)&&(Xt[Fn]=Vt[Fn]);try{Oe=Ee.open(ce,rr,Hr,$r,wt,qt,Xt)}catch(Bn){throw ir(),Bn}};R.url=J,R.readyState=W,R.withCredentials=ee,R.headers=A,R._close=ir,Wr()}Q.prototype=Object.create(T.prototype),Q.prototype.CONNECTING=W,Q.prototype.OPEN=U,Q.prototype.CLOSED=N,Q.prototype.close=function(){this._close()},Q.CONNECTING=W,Q.OPEN=U,Q.CLOSED=N,Q.prototype.withCredentials=void 0;var $e=u;a!=null&&(u==null||!("withCredentials"in u.prototype))&&($e=Q),function(R){{var J=R(t);J!==void 0&&(e.exports=J)}}(function(R){R.EventSourcePolyfill=Q,R.NativeEventSource=u,R.EventSource=$e})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:ht:globalThis)})(Jv,Jv.exports);var Vie=Jv.exports;const Hie=Ke(Vie);var et;(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 a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(et||(et={}));var Xv;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Xv||(Xv={}));const be=et.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),xi=e=>{switch(typeof e){case"undefined":return be.undefined;case"string":return be.string;case"number":return isNaN(e)?be.nan:be.number;case"boolean":return be.boolean;case"function":return be.function;case"bigint":return be.bigint;case"symbol":return be.symbol;case"object":return Array.isArray(e)?be.array:e===null?be.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?be.promise:typeof Map<"u"&&e instanceof Map?be.map:typeof Set<"u"&&e instanceof Set?be.set:typeof Date<"u"&&e instanceof Date?be.date:be.object;default:return be.unknown}},re=et.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"]),Wie=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Cn 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(a){return a.message},r={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let s=r,u=0;for(;u<o.path.length;){const l=o.path[u];u===o.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(o))):s[l]=s[l]||{_errors:[]},s=s[l],u++}}};return i(this),r}static assert(t){if(!(t instanceof Cn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,et.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()}}Cn.create=e=>new Cn(e);const eo=(e,t)=>{let n;switch(e.code){case re.invalid_type:e.received===be.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case re.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,et.jsonStringifyReplacer)}`;break;case re.unrecognized_keys:n=`Unrecognized key(s) in object: ${et.joinValues(e.keys,", ")}`;break;case re.invalid_union:n="Invalid input";break;case re.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${et.joinValues(e.options)}`;break;case re.invalid_enum_value:n=`Invalid enum value. Expected ${et.joinValues(e.options)}, received '${e.received}'`;break;case re.invalid_arguments:n="Invalid function arguments";break;case re.invalid_return_type:n="Invalid function return type";break;case re.invalid_date:n="Invalid date";break;case re.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}"`:et.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case re.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 re.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 re.custom:n="Invalid input";break;case re.invalid_intersection_types:n="Intersection results could not be merged";break;case re.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case re.not_finite:n="Number must be finite";break;default:n=t.defaultError,et.assertNever(e)}return{message:n}};let oC=eo;function Zie(e){oC=e}function tf(){return oC}const nf=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s="";const u=r.filter(l=>!!l).slice().reverse();for(const l of u)s=l(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}},Kie=[];function me(e,t){const n=tf(),r=nf({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===eo?void 0:eo].filter(i=>!!i)});e.common.issues.push(r)}class on{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 Me;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){const a=await i.key,o=await i.value;r.push({key:a,value:o})}return on.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Me;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[a.value]=o.value)}return{status:t.value,value:r}}}const Me=Object.freeze({status:"aborted"}),to=e=>({status:"dirty",value:e}),cn=e=>({status:"valid",value:e}),Qv=e=>e.status==="aborted",ey=e=>e.status==="dirty",Vs=e=>e.status==="valid",Hs=e=>typeof Promise<"u"&&e instanceof Promise;function rf(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function sC(e,t,n,r,i){if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var Te;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Te||(Te={}));var Ws,Zs;class Er{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 lC=(e,t)=>{if(Vs(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 Cn(e.common.issues);return this._error=n,this._error}}};function ze(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:(o,s)=>{var u,l;const{message:c}=e;return o.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:(u=c??r)!==null&&u!==void 0?u:s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:(l=c??n)!==null&&l!==void 0?l:s.defaultError}},description:i}}class Ve{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 xi(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:xi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new on,ctx:{common:t.parent.common,data:t.data,parsedType:xi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Hs(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:xi(t)},a=this._parseSync({data:t,path:i.path,parent:i});return lC(i,a)}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:xi(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(Hs(i)?i:Promise.resolve(i));return lC(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:re.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(u=>u?!0:(s(),!1)):o?!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 nr({schema:this,typeName:De.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Tr.create(this,this._def)}nullable(){return Ei.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return tr.create(this,this._def)}promise(){return ao.create(this,this._def)}or(t){return Js.create([this,t],this._def)}and(t){return Xs.create(this,t,this._def)}transform(t){return new nr({...ze(this._def),schema:this,typeName:De.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new rl({...ze(this._def),innerType:this,defaultValue:n,typeName:De.ZodDefault})}brand(){return new ry({typeName:De.ZodBranded,type:this,...ze(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new il({...ze(this._def),innerType:this,catchValue:n,typeName:De.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return al.create(this,t)}readonly(){return ol.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Gie=/^c[^\s-]{8,}$/i,Yie=/^[0-9a-z]+$/,Jie=/^[0-9A-HJKMNP-TV-Z]{26}$/,Xie=/^[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,Qie=/^[a-z0-9_-]{21}$/i,eae=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,tae=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,nae="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ty;const rae=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,iae=/^(([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})))$/,aae=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,uC="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",oae=new RegExp(`^${uC}$`);function cC(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function sae(e){return new RegExp(`^${cC(e)}$`)}function fC(e){let t=`${uC}T${cC(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function lae(e,t){return!!((t==="v4"||!t)&&rae.test(e)||(t==="v6"||!t)&&iae.test(e))}class er extends Ve{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==be.string){const a=this._getOrReturnCtx(t);return me(a,{code:re.invalid_type,expected:be.string,received:a.parsedType}),Me}const r=new on;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:re.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:re.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,s=t.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(t,i),o?me(i,{code:re.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&me(i,{code:re.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")tae.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"email",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")ty||(ty=new RegExp(nae,"u")),ty.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"emoji",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")Xie.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"uuid",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")Qie.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"nanoid",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")Gie.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"cuid",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")Yie.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"cuid2",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")Jie.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"ulid",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),me(i,{validation:"url",code:re.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"regex",code:re.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),me(i,{code:re.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),me(i,{code:re.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),me(i,{code:re.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?fC(a).test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{code:re.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?oae.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{code:re.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?sae(a).test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{code:re.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?eae.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"duration",code:re.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?lae(t.data,a.version)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"ip",code:re.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?aae.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"base64",code:re.invalid_string,message:a.message}),r.dirty()):et.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:re.invalid_string,...Te.errToObj(r)})}_addCheck(t){return new er({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Te.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Te.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Te.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Te.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Te.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Te.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Te.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Te.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Te.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Te.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!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,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...Te.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Te.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Te.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Te.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Te.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Te.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Te.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Te.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Te.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Te.errToObj(n)})}nonempty(t){return this.min(1,Te.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 isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}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 isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}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 isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}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:De.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ze(e)})};function uae(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}class wi extends Ve{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)!==be.number){const a=this._getOrReturnCtx(t);return me(a,{code:re.invalid_type,expected:be.number,received:a.parsedType}),Me}let r;const i=new on;for(const a of this._def.checks)a.kind==="int"?et.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),me(r,{code:re.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),me(r,{code:re.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),me(r,{code:re.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?uae(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),me(r,{code:re.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),me(r,{code:re.not_finite,message:a.message}),i.dirty()):et.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Te.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Te.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Te.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Te.toString(n))}setLimit(t,n,r,i){return new wi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Te.toString(i)}]})}_addCheck(t){return new wi({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Te.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Te.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Te.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Te.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Te.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Te.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Te.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Te.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Te.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"&&et.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)}}wi.create=e=>new wi({checks:[],typeName:De.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ze(e)});class Si extends Ve{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)!==be.bigint){const a=this._getOrReturnCtx(t);return me(a,{code:re.invalid_type,expected:be.bigint,received:a.parsedType}),Me}let r;const i=new on;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),me(r,{code:re.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),me(r,{code:re.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),me(r,{code:re.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):et.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Te.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Te.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Te.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Te.toString(n))}setLimit(t,n,r,i){return new Si({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Te.toString(i)}]})}_addCheck(t){return new Si({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Te.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Te.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Te.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Te.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Te.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}}Si.create=e=>{var t;return new Si({checks:[],typeName:De.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ze(e)})};class Ks extends Ve{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==be.boolean){const r=this._getOrReturnCtx(t);return me(r,{code:re.invalid_type,expected:be.boolean,received:r.parsedType}),Me}return cn(t.data)}}Ks.create=e=>new Ks({typeName:De.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ze(e)});class Gi extends Ve{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==be.date){const a=this._getOrReturnCtx(t);return me(a,{code:re.invalid_type,expected:be.date,received:a.parsedType}),Me}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return me(a,{code:re.invalid_date}),Me}const r=new on;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:re.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:re.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):et.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Gi({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Te.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Te.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}}Gi.create=e=>new Gi({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:De.ZodDate,...ze(e)});class af extends Ve{_parse(t){if(this._getType(t)!==be.symbol){const r=this._getOrReturnCtx(t);return me(r,{code:re.invalid_type,expected:be.symbol,received:r.parsedType}),Me}return cn(t.data)}}af.create=e=>new af({typeName:De.ZodSymbol,...ze(e)});class Gs extends Ve{_parse(t){if(this._getType(t)!==be.undefined){const r=this._getOrReturnCtx(t);return me(r,{code:re.invalid_type,expected:be.undefined,received:r.parsedType}),Me}return cn(t.data)}}Gs.create=e=>new Gs({typeName:De.ZodUndefined,...ze(e)});class Ys extends Ve{_parse(t){if(this._getType(t)!==be.null){const r=this._getOrReturnCtx(t);return me(r,{code:re.invalid_type,expected:be.null,received:r.parsedType}),Me}return cn(t.data)}}Ys.create=e=>new Ys({typeName:De.ZodNull,...ze(e)});class no extends Ve{constructor(){super(...arguments),this._any=!0}_parse(t){return cn(t.data)}}no.create=e=>new no({typeName:De.ZodAny,...ze(e)});class Yi extends Ve{constructor(){super(...arguments),this._unknown=!0}_parse(t){return cn(t.data)}}Yi.create=e=>new Yi({typeName:De.ZodUnknown,...ze(e)});class qr extends Ve{_parse(t){const n=this._getOrReturnCtx(t);return me(n,{code:re.invalid_type,expected:be.never,received:n.parsedType}),Me}}qr.create=e=>new qr({typeName:De.ZodNever,...ze(e)});class of extends Ve{_parse(t){if(this._getType(t)!==be.undefined){const r=this._getOrReturnCtx(t);return me(r,{code:re.invalid_type,expected:be.void,received:r.parsedType}),Me}return cn(t.data)}}of.create=e=>new of({typeName:De.ZodVoid,...ze(e)});class tr extends Ve{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==be.array)return me(n,{code:re.invalid_type,expected:be.array,received:n.parsedType}),Me;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(o||s)&&(me(n,{code:o?re.too_big:re.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?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&&(me(n,{code:re.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&&(me(n,{code:re.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((o,s)=>i.type._parseAsync(new Er(n,o,n.path,s)))).then(o=>on.mergeArray(r,o));const a=[...n.data].map((o,s)=>i.type._parseSync(new Er(n,o,n.path,s)));return on.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new tr({...this._def,minLength:{value:t,message:Te.toString(n)}})}max(t,n){return new tr({...this._def,maxLength:{value:t,message:Te.toString(n)}})}length(t,n){return new tr({...this._def,exactLength:{value:t,message:Te.toString(n)}})}nonempty(t){return this.min(1,t)}}tr.create=(e,t)=>new tr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:De.ZodArray,...ze(t)});function ro(e){if(e instanceof Et){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Tr.create(ro(r))}return new Et({...e._def,shape:()=>t})}else return e instanceof tr?new tr({...e._def,type:ro(e.element)}):e instanceof Tr?Tr.create(ro(e.unwrap())):e instanceof Ei?Ei.create(ro(e.unwrap())):e instanceof kr?kr.create(e.items.map(t=>ro(t))):e}class Et extends Ve{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=et.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==be.object){const l=this._getOrReturnCtx(t);return me(l,{code:re.invalid_type,expected:be.object,received:l.parsedType}),Me}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof qr&&this._def.unknownKeys==="strip"))for(const l in i.data)o.includes(l)||s.push(l);const u=[];for(const l of o){const c=a[l],f=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new Er(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof qr){const l=this._def.unknownKeys;if(l==="passthrough")for(const c of s)u.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")s.length>0&&(me(i,{code:re.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const c of s){const f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new Er(i,f,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const c of u){const f=await c.key,d=await c.value;l.push({key:f,value:d,alwaysSet:c.alwaysSet})}return l}).then(l=>on.mergeObjectSync(r,l)):on.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(t){return Te.errToObj,new Et({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,a,o,s;const u=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=Te.errToObj(t).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new Et({...this._def,unknownKeys:"strip"})}passthrough(){return new Et({...this._def,unknownKeys:"passthrough"})}extend(t){return new Et({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Et({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:De.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Et({...this._def,catchall:t})}pick(t){const n={};return et.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Et({...this._def,shape:()=>n})}omit(t){const n={};return et.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Et({...this._def,shape:()=>n})}deepPartial(){return ro(this)}partial(t){const n={};return et.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new Et({...this._def,shape:()=>n})}required(t){const n={};return et.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof Tr;)a=a._def.innerType;n[r]=a}}),new Et({...this._def,shape:()=>n})}keyof(){return dC(et.objectKeys(this.shape))}}Et.create=(e,t)=>new Et({shape:()=>e,unknownKeys:"strip",catchall:qr.create(),typeName:De.ZodObject,...ze(t)}),Et.strictCreate=(e,t)=>new Et({shape:()=>e,unknownKeys:"strict",catchall:qr.create(),typeName:De.ZodObject,...ze(t)}),Et.lazycreate=(e,t)=>new Et({shape:e,unknownKeys:"strip",catchall:qr.create(),typeName:De.ZodObject,...ze(t)});class Js extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new Cn(s.ctx.common.issues));return me(n,{code:re.invalid_union,unionErrors:o}),Me}if(n.common.async)return Promise.all(r.map(async a=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const u of r){const l={...n,common:{...n.common,issues:[]},parent:null},c=u._parseSync({data:n.data,path:n.path,parent:l});if(c.status==="valid")return c;c.status==="dirty"&&!a&&(a={result:c,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(u=>new Cn(u));return me(n,{code:re.invalid_union,unionErrors:s}),Me}}get options(){return this._def.options}}Js.create=(e,t)=>new Js({options:e,typeName:De.ZodUnion,...ze(t)});const Vr=e=>e instanceof el?Vr(e.schema):e instanceof nr?Vr(e.innerType()):e instanceof tl?[e.value]:e instanceof _i?e.options:e instanceof nl?et.objectValues(e.enum):e instanceof rl?Vr(e._def.innerType):e instanceof Gs?[void 0]:e instanceof Ys?[null]:e instanceof Tr?[void 0,...Vr(e.unwrap())]:e instanceof Ei?[null,...Vr(e.unwrap())]:e instanceof ry||e instanceof ol?Vr(e.unwrap()):e instanceof il?Vr(e._def.innerType):[];class sf extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==be.object)return me(n,{code:re.invalid_type,expected:be.object,received:n.parsedType}),Me;const r=this.discriminator,i=n.data[r],a=this.optionsMap.get(i);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(me(n,{code:re.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Me)}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 a of n){const o=Vr(a.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of o){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,a)}}return new sf({typeName:De.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...ze(r)})}}function ny(e,t){const n=xi(e),r=xi(t);if(e===t)return{valid:!0,data:e};if(n===be.object&&r===be.object){const i=et.objectKeys(t),a=et.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(const s of a){const u=ny(e[s],t[s]);if(!u.valid)return{valid:!1};o[s]=u.data}return{valid:!0,data:o}}else if(n===be.array&&r===be.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const o=e[a],s=t[a],u=ny(o,s);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return n===be.date&&r===be.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Xs extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(Qv(a)||Qv(o))return Me;const s=ny(a.value,o.value);return s.valid?((ey(a)||ey(o))&&n.dirty(),{status:n.value,value:s.data}):(me(r,{code:re.invalid_intersection_types}),Me)};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(([a,o])=>i(a,o)):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}))}}Xs.create=(e,t,n)=>new Xs({left:e,right:t,typeName:De.ZodIntersection,...ze(n)});class kr extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==be.array)return me(r,{code:re.invalid_type,expected:be.array,received:r.parsedType}),Me;if(r.data.length<this._def.items.length)return me(r,{code:re.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Me;!this._def.rest&&r.data.length>this._def.items.length&&(me(r,{code:re.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,s)=>{const u=this._def.items[s]||this._def.rest;return u?u._parse(new Er(r,o,r.path,s)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>on.mergeArray(n,o)):on.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new kr({...this._def,rest:t})}}kr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new kr({items:e,typeName:De.ZodTuple,rest:null,...ze(t)})};class Qs extends Ve{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!==be.object)return me(r,{code:re.invalid_type,expected:be.object,received:r.parsedType}),Me;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in r.data)i.push({key:a._parse(new Er(r,s,r.path,s)),value:o._parse(new Er(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?on.mergeObjectAsync(n,i):on.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Ve?new Qs({keyType:t,valueType:n,typeName:De.ZodRecord,...ze(r)}):new Qs({keyType:er.create(),valueType:t,typeName:De.ZodRecord,...ze(n)})}}class lf extends Ve{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!==be.map)return me(r,{code:re.invalid_type,expected:be.map,received:r.parsedType}),Me;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([s,u],l)=>({key:i._parse(new Er(r,s,r.path,[l,"key"])),value:a._parse(new Er(r,u,r.path,[l,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const u of o){const l=await u.key,c=await u.value;if(l.status==="aborted"||c.status==="aborted")return Me;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const u of o){const l=u.key,c=u.value;if(l.status==="aborted"||c.status==="aborted")return Me;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}}}}lf.create=(e,t,n)=>new lf({valueType:t,keyType:e,typeName:De.ZodMap,...ze(n)});class Ji extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==be.set)return me(r,{code:re.invalid_type,expected:be.set,received:r.parsedType}),Me;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(me(r,{code:re.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&&(me(r,{code:re.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function o(u){const l=new Set;for(const c of u){if(c.status==="aborted")return Me;c.status==="dirty"&&n.dirty(),l.add(c.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((u,l)=>a._parse(new Er(r,u,r.path,l)));return r.common.async?Promise.all(s).then(u=>o(u)):o(s)}min(t,n){return new Ji({...this._def,minSize:{value:t,message:Te.toString(n)}})}max(t,n){return new Ji({...this._def,maxSize:{value:t,message:Te.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Ji.create=(e,t)=>new Ji({valueType:e,minSize:null,maxSize:null,typeName:De.ZodSet,...ze(t)});class io extends Ve{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==be.function)return me(n,{code:re.invalid_type,expected:be.function,received:n.parsedType}),Me;function r(s,u){return nf({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,tf(),eo].filter(l=>!!l),issueData:{code:re.invalid_arguments,argumentsError:u}})}function i(s,u){return nf({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,tf(),eo].filter(l=>!!l),issueData:{code:re.invalid_return_type,returnTypeError:u}})}const a={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof ao){const s=this;return cn(async function(...u){const l=new Cn([]),c=await s._def.args.parseAsync(u,a).catch(p=>{throw l.addIssue(r(u,p)),l}),f=await Reflect.apply(o,this,c);return await s._def.returns._def.type.parseAsync(f,a).catch(p=>{throw l.addIssue(i(f,p)),l})})}else{const s=this;return cn(function(...u){const l=s._def.args.safeParse(u,a);if(!l.success)throw new Cn([r(u,l.error)]);const c=Reflect.apply(o,this,l.data),f=s._def.returns.safeParse(c,a);if(!f.success)throw new Cn([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new io({...this._def,args:kr.create(t).rest(Yi.create())})}returns(t){return new io({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new io({args:t||kr.create([]).rest(Yi.create()),returns:n||Yi.create(),typeName:De.ZodFunction,...ze(r)})}}class el extends Ve{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})}}el.create=(e,t)=>new el({getter:e,typeName:De.ZodLazy,...ze(t)});class tl extends Ve{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return me(n,{received:n.data,code:re.invalid_literal,expected:this._def.value}),Me}return{status:"valid",value:t.data}}get value(){return this._def.value}}tl.create=(e,t)=>new tl({value:e,typeName:De.ZodLiteral,...ze(t)});function dC(e,t){return new _i({values:e,typeName:De.ZodEnum,...ze(t)})}class _i extends Ve{constructor(){super(...arguments),Ws.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return me(n,{expected:et.joinValues(r),received:n.parsedType,code:re.invalid_type}),Me}if(rf(this,Ws)||sC(this,Ws,new Set(this._def.values)),!rf(this,Ws).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return me(n,{received:n.data,code:re.invalid_enum_value,options:r}),Me}return cn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return _i.create(t,{...this._def,...n})}exclude(t,n=this._def){return _i.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ws=new WeakMap,_i.create=dC;class nl extends Ve{constructor(){super(...arguments),Zs.set(this,void 0)}_parse(t){const n=et.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==be.string&&r.parsedType!==be.number){const i=et.objectValues(n);return me(r,{expected:et.joinValues(i),received:r.parsedType,code:re.invalid_type}),Me}if(rf(this,Zs)||sC(this,Zs,new Set(et.getValidEnumValues(this._def.values))),!rf(this,Zs).has(t.data)){const i=et.objectValues(n);return me(r,{received:r.data,code:re.invalid_enum_value,options:i}),Me}return cn(t.data)}get enum(){return this._def.values}}Zs=new WeakMap,nl.create=(e,t)=>new nl({values:e,typeName:De.ZodNativeEnum,...ze(t)});class ao extends Ve{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==be.promise&&n.common.async===!1)return me(n,{code:re.invalid_type,expected:be.promise,received:n.parsedType}),Me;const r=n.parsedType===be.promise?n.data:Promise.resolve(n.data);return cn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}ao.create=(e,t)=>new ao({type:e,typeName:De.ZodPromise,...ze(t)});class nr extends Ve{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===De.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{me(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(r.data,a);if(r.common.async)return Promise.resolve(o).then(async s=>{if(n.value==="aborted")return Me;const u=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return u.status==="aborted"?Me:u.status==="dirty"||n.value==="dirty"?to(u.value):u});{if(n.value==="aborted")return Me;const s=this._def.schema._parseSync({data:o,path:r.path,parent:r});return s.status==="aborted"?Me:s.status==="dirty"||n.value==="dirty"?to(s.value):s}}if(i.type==="refinement"){const o=s=>{const u=i.refinement(s,a);if(r.common.async)return Promise.resolve(u);if(u 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"?Me:(s.status==="dirty"&&n.dirty(),o(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"?Me:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Vs(o))return o;const s=i.transform(o.value,a);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(o=>Vs(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:n.value,value:s})):o);et.assertNever(i)}}nr.create=(e,t,n)=>new nr({schema:e,typeName:De.ZodEffects,effect:t,...ze(n)}),nr.createWithPreprocess=(e,t,n)=>new nr({schema:t,effect:{type:"preprocess",transform:e},typeName:De.ZodEffects,...ze(n)});class Tr extends Ve{_parse(t){return this._getType(t)===be.undefined?cn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Tr.create=(e,t)=>new Tr({innerType:e,typeName:De.ZodOptional,...ze(t)});class Ei extends Ve{_parse(t){return this._getType(t)===be.null?cn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ei.create=(e,t)=>new Ei({innerType:e,typeName:De.ZodNullable,...ze(t)});class rl extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===be.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}rl.create=(e,t)=>new rl({innerType:e,typeName:De.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ze(t)});class il extends Ve{_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 Hs(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Cn(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Cn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}il.create=(e,t)=>new il({innerType:e,typeName:De.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ze(t)});class uf extends Ve{_parse(t){if(this._getType(t)!==be.nan){const r=this._getOrReturnCtx(t);return me(r,{code:re.invalid_type,expected:be.nan,received:r.parsedType}),Me}return{status:"valid",value:t.data}}}uf.create=e=>new uf({typeName:De.ZodNaN,...ze(e)});const cae=Symbol("zod_brand");class ry extends Ve{_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 al extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Me:a.status==="dirty"?(n.dirty(),to(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Me: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 al({in:t,out:n,typeName:De.ZodPipeline})}}class ol extends Ve{_parse(t){const n=this._def.innerType._parse(t),r=i=>(Vs(i)&&(i.value=Object.freeze(i.value)),i);return Hs(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}ol.create=(e,t)=>new ol({innerType:e,typeName:De.ZodReadonly,...ze(t)});function pC(e,t={},n){return e?no.create().superRefine((r,i)=>{var a,o;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,u=(o=(a=s.fatal)!==null&&a!==void 0?a:n)!==null&&o!==void 0?o:!0,l=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...l,fatal:u})}}):no.create()}const fae={object:Et.lazycreate};var De;(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"})(De||(De={}));const dae=(e,t={message:`Input not instance of ${e.name}`})=>pC(n=>n instanceof e,t),hC=er.create,mC=wi.create,pae=uf.create,hae=Si.create,vC=Ks.create,mae=Gi.create,vae=af.create,yae=Gs.create,gae=Ys.create,bae=no.create,xae=Yi.create,wae=qr.create,Sae=of.create,_ae=tr.create,Eae=Et.create,kae=Et.strictCreate,Tae=Js.create,Oae=sf.create,Cae=Xs.create,$ae=kr.create,Iae=Qs.create,Rae=lf.create,Pae=Ji.create,Aae=io.create,Nae=el.create,Dae=tl.create,Mae=_i.create,jae=nl.create,Lae=ao.create,yC=nr.create,Fae=Tr.create,Bae=Ei.create,Uae=nr.createWithPreprocess,zae=al.create;var H=Object.freeze({__proto__:null,defaultErrorMap:eo,setErrorMap:Zie,getErrorMap:tf,makeIssue:nf,EMPTY_PATH:Kie,addIssueToContext:me,ParseStatus:on,INVALID:Me,DIRTY:to,OK:cn,isAborted:Qv,isDirty:ey,isValid:Vs,isAsync:Hs,get util(){return et},get objectUtil(){return Xv},ZodParsedType:be,getParsedType:xi,ZodType:Ve,datetimeRegex:fC,ZodString:er,ZodNumber:wi,ZodBigInt:Si,ZodBoolean:Ks,ZodDate:Gi,ZodSymbol:af,ZodUndefined:Gs,ZodNull:Ys,ZodAny:no,ZodUnknown:Yi,ZodNever:qr,ZodVoid:of,ZodArray:tr,ZodObject:Et,ZodUnion:Js,ZodDiscriminatedUnion:sf,ZodIntersection:Xs,ZodTuple:kr,ZodRecord:Qs,ZodMap:lf,ZodSet:Ji,ZodFunction:io,ZodLazy:el,ZodLiteral:tl,ZodEnum:_i,ZodNativeEnum:nl,ZodPromise:ao,ZodEffects:nr,ZodTransformer:nr,ZodOptional:Tr,ZodNullable:Ei,ZodDefault:rl,ZodCatch:il,ZodNaN:uf,BRAND:cae,ZodBranded:ry,ZodPipeline:al,ZodReadonly:ol,custom:pC,Schema:Ve,ZodSchema:Ve,late:fae,get ZodFirstPartyTypeKind(){return De},coerce:{string:e=>er.create({...e,coerce:!0}),number:e=>wi.create({...e,coerce:!0}),boolean:e=>Ks.create({...e,coerce:!0}),bigint:e=>Si.create({...e,coerce:!0}),date:e=>Gi.create({...e,coerce:!0})},any:bae,array:_ae,bigint:hae,boolean:vC,date:mae,discriminatedUnion:Oae,effect:yC,enum:Mae,function:Aae,instanceof:dae,intersection:Cae,lazy:Nae,literal:Dae,map:Rae,nan:pae,nativeEnum:jae,never:wae,null:gae,nullable:Bae,number:mC,object:Eae,oboolean:()=>vC().optional(),onumber:()=>mC().optional(),optional:Fae,ostring:()=>hC().optional(),pipeline:zae,preprocess:Uae,promise:Lae,record:Iae,set:Pae,strictObject:kae,string:hC,symbol:vae,transformer:yC,tuple:$ae,undefined:yae,union:Tae,unknown:xae,void:Sae,NEVER:Me,ZodIssueCode:re,quotelessJson:Wie,ZodError:Cn}),qae=Object.defineProperty,Vae=(e,t,n)=>t in e?qae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hae=(e,t,n)=>(Vae(e,t+"",n),n),Wae={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},iy=typeof window<"u"&&typeof window.document<"u"?window.crypto:tO;iy.getRandomValues||(iy=Wae);var xt=class extends Error{constructor(t,n,r,i,a,o){super(i);_e(this,"isApiError",!0);this.code=t,this.description=n,this.type=r,this.message=i,this.error=a,this.id=o,this.id||(this.id=xt.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 t=this.getPrefix(),n=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],r=4,i=Array.from(iy.getRandomValues(new Uint8Array(r))).map(a=>a.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"}},Zae=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,ay=e=>e instanceof xt||Zae(e)&&e.isApiError===!0,sl=class extends xt{constructor(e,t,n){super(500,"An unknown error occurred","Unknown",e,t,n)}},Kae=class extends xt{constructor(e,t,n){super(500,"An internal error occurred","Internal",e,t,n)}},Gae=class extends xt{constructor(e,t,n){super(401,"The request requires to be authenticated.","Unauthorized",e,t,n)}},Yae=class extends xt{constructor(e,t,n){super(403,"The requested action can't be peform by this resource.","Forbidden",e,t,n)}},Jae=class extends xt{constructor(e,t,n){super(413,"The request payload is too large.","PayloadTooLarge",e,t,n)}},Xae=class extends xt{constructor(e,t,n){super(400,"The request payload is invalid.","InvalidPayload",e,t,n)}},Qae=class extends xt{constructor(e,t,n){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",e,t,n)}},eoe=class extends xt{constructor(e,t,n){super(405,"The requested method does not exist.","MethodNotFound",e,t,n)}},toe=class extends xt{constructor(e,t,n){super(404,"The requested resource does not exist.","ResourceNotFound",e,t,n)}},noe=class extends xt{constructor(e,t,n){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",e,t,n)}},roe=class extends xt{constructor(e,t,n){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",e,t,n)}},ioe=class extends xt{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)}},aoe=class extends xt{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)}},ooe=class extends xt{constructor(e,t,n){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",e,t,n)}},soe=class extends xt{constructor(e,t,n){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",e,t,n)}},loe=class extends xt{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)}},uoe=class extends xt{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)}},coe=class extends xt{constructor(e,t,n){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",e,t,n)}},foe=class extends xt{constructor(e,t,n){super(409,"The record attempted to be created already exists.","AlreadyExists",e,t,n)}},doe=class extends xt{constructor(e,t,n){super(429,"The request has been rate limited.","RateLimited",e,t,n)}},poe=class extends xt{constructor(e,t,n){super(402,"A payment is required to perform this request.","PaymentRequired",e,t,n)}},hoe=class extends xt{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)}},moe=class extends xt{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)}},voe=class extends xt{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)}},yoe={Unknown:sl,Internal:Kae,Unauthorized:Gae,Forbidden:Yae,PayloadTooLarge:Jae,InvalidPayload:Xae,UnsupportedMediaType:Qae,MethodNotFound:eoe,ResourceNotFound:toe,InvalidJsonSchema:noe,InvalidDataFormat:roe,InvalidIdentifier:ioe,RelationConflict:aoe,ReferenceConstraint:ooe,ResourceLockedConflict:soe,ReferenceNotFound:loe,InvalidQuery:uoe,Runtime:coe,AlreadyExists:foe,RateLimited:doe,PaymentRequired:poe,QuotaExceeded:hoe,LimitExceeded:moe,BreakingChanges:voe},gC=e=>ay(e)?e:e instanceof Error?new sl(e.message,e):typeof e=="string"?new sl(e):goe(e);function goe(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=yoe[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new sl(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new sl("An invalid error occurred: "+JSON.stringify(e))}var boe=e=>e[1]!==void 0,Nt=e=>{const{method:t,path:n,query:r,headers:i,body:a}=e,o=Object.entries(i).filter(boe),s=Object.fromEntries(o),u=qie.stringify(r,{encode:!0,arrayFormat:"repeat",allowDots:!0}),l=u?[n,u].join("?"):n;return{method:t,url:l,headers:s,data:a}},xoe=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),woe=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{_:e._}}),Soe=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),_oe=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{},body:{}}),Eoe=e=>({path:`/conversations/${encodeURIComponent(e.id)}/listen`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),koe=e=>({path:`/conversations/${encodeURIComponent(e.id)}/messages`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),Toe=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{userId:e.userId}}),Ooe=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:{}}),Coe=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:{}}),$oe=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),Ioe=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Roe=e=>({path:"/messages",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId,metadata:e.metadata}}),Poe=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Aoe=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),Noe=e=>({path:"/users",headers:{},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),Doe=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),Moe=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),joe=e=>({path:`/events/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Loe=e=>({path:"/events",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId,bindConversation:e.bindConversation,bindUser:e.bindUser}}),Foe=e=>({path:"/files",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{key:e.key,size:e.size,accessPolicies:e.accessPolicies,index:e.index,contentType:e.contentType,tags:e.tags}}),Boe=class{constructor(e,t={}){_e(this,"getConversation",async e=>{const{path:t,headers:n,query:r,body:i}=xoe(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"createConversation",async e=>{const{path:t,headers:n,query:r,body:i}=woe(e),o=(this.props.toAxiosRequest??Nt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"deleteConversation",async e=>{const{path:t,headers:n,query:r,body:i}=Soe(e),o=(this.props.toAxiosRequest??Nt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"listConversations",async e=>{const{path:t,headers:n,query:r,body:i}=_oe(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"listenConversation",async e=>{const{path:t,headers:n,query:r,body:i}=Eoe(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"listConversationMessages",async e=>{const{path:t,headers:n,query:r,body:i}=koe(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"addParticipant",async e=>{const{path:t,headers:n,query:r,body:i}=Toe(e),o=(this.props.toAxiosRequest??Nt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"removeParticipant",async e=>{const{path:t,headers:n,query:r,body:i}=Ooe(e),o=(this.props.toAxiosRequest??Nt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"getParticipant",async e=>{const{path:t,headers:n,query:r,body:i}=Coe(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"listParticipants",async e=>{const{path:t,headers:n,query:r,body:i}=$oe(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"getMessage",async e=>{const{path:t,headers:n,query:r,body:i}=Ioe(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"createMessage",async e=>{const{path:t,headers:n,query:r,body:i}=Roe(e),o=(this.props.toAxiosRequest??Nt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"deleteMessage",async e=>{const{path:t,headers:n,query:r,body:i}=Poe(e),o=(this.props.toAxiosRequest??Nt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"getUser",async e=>{const{path:t,headers:n,query:r,body:i}=Aoe(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"createUser",async e=>{const{path:t,headers:n,query:r,body:i}=Noe(e),o=(this.props.toAxiosRequest??Nt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"updateUser",async e=>{const{path:t,headers:n,query:r,body:i}=Doe(e),o=(this.props.toAxiosRequest??Nt)({method:"put",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"deleteUser",async e=>{const{path:t,headers:n,query:r,body:i}=Moe(e),o=(this.props.toAxiosRequest??Nt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"getEvent",async e=>{const{path:t,headers:n,query:r,body:i}=joe(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"createEvent",async e=>{const{path:t,headers:n,query:r,body:i}=Loe(e),o=(this.props.toAxiosRequest??Nt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"createFile",async e=>{const{path:t,headers:n,query:r,body:i}=Foe(e),o=(this.props.toAxiosRequest??Nt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});this.axiosInstance=e,this.props=t}};function Dt(e){var t;return At.isAxiosError(e)&&((t=e.response)!=null&&t.data)?gC(e.response.data):gC(e)}var bC=class{constructor(){_e(this,"listeners",{})}emit(e,t){const n=this.listeners[e];if(n)for(const r of[...n])r(t)}onceOrMore(e,t){const n=r=>{t(r)==="stop-listening"&&this.off(e,n)};this.on(e,n)}once(e,t){const n=r=>{this.off(e,n),t(r)};this.on(e,n)}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}off(e,t){const n=this.listeners[e];if(!n)return;const r=n.indexOf(t);r!==-1&&n.splice(r,1)}cleanup(){this.listeners={}}},Uoe=(e,t)=>{const n=new Hie.EventSourcePolyfill(e,{headers:t.headers,heartbeatTimeout:t.timeout}),r=new bC;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}},zoe=async(e,t={})=>{const{emitter:n,source:r}=Uoe(e,t);return await new Promise((i,a)=>{n.on("open",()=>{i()}),n.on("error",o=>{a(o)})}).finally(()=>n.cleanup()),{on:n.on.bind(n),close:()=>{n.cleanup(),r.close()}}},qoe=H.object({type:H.literal("message_created"),data:H.object({id:H.string().describe("Id of the [Message](#schema_message)"),createdAt:H.string().datetime().describe("Creation date of the [Message](#schema_message) in ISO 8601 format"),payload:H.union([H.object({audioUrl:H.string().min(1),type:H.literal("audio")}),H.object({title:H.string().min(1),subtitle:H.string().min(1).optional(),imageUrl:H.string().min(1).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")}),H.object({items:H.array(H.object({title:H.string().min(1),subtitle:H.string().min(1).optional(),imageUrl:H.string().min(1).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("carousel")}),H.object({text:H.string().min(1),options:H.array(H.object({label:H.string().min(1),value:H.string().min(1)})),type:H.literal("choice"),disableFreeText:H.boolean().optional()}),H.object({text:H.string().min(1),options:H.array(H.object({label:H.string().min(1),value:H.string().min(1)})),type:H.literal("dropdown")}),H.object({fileUrl:H.string().min(1),title:H.string().min(1).optional(),type:H.literal("file")}),H.object({imageUrl:H.string().min(1),type:H.literal("image")}),H.object({latitude:H.number(),longitude:H.number(),address:H.string().optional(),title:H.string().optional(),type:H.literal("location")}),H.object({text:H.string().min(1),type:H.literal("text"),value:H.string().optional()}),H.object({videoUrl:H.string().min(1),type:H.literal("video")}),H.object({items:H.array(H.union([H.object({type:H.literal("text"),payload:H.object({text:H.string().min(1)})}),H.object({type:H.literal("markdown"),payload:H.object({markdown:H.string().min(1)})}),H.object({type:H.literal("image"),payload:H.object({imageUrl:H.string().min(1)})}),H.object({type:H.literal("audio"),payload:H.object({audioUrl:H.string().min(1)})}),H.object({type:H.literal("video"),payload:H.object({videoUrl:H.string().min(1)})}),H.object({type:H.literal("file"),payload:H.object({fileUrl:H.string().min(1),title:H.string().min(1).optional()})}),H.object({type:H.literal("location"),payload:H.object({latitude:H.number(),longitude:H.number(),address:H.string().optional(),title:H.string().optional()})})])),type:H.literal("bloc")}),H.object({markdown:H.string().min(1),type:H.literal("markdown")}),H.object({type:H.literal("custom"),url:H.string(),name:H.string(),data:H.union([H.any(),H.null()]).optional()})]).describe("Payload is the content type of the message."),userId:H.string().describe("ID of the [User](#schema_user)"),conversationId:H.string().describe("ID of the [Conversation](#schema_conversation)"),metadata:H.record(H.union([H.any(),H.null()])).describe("Metadata of the message").optional()}).describe("The Message object represents a message in a [Conversation](#schema_conversation) for a specific [User](#schema_user).")}),Voe=H.object({type:H.literal("webchat_visibility"),data:H.object({visibility:H.union([H.literal("show"),H.literal("hide"),H.literal("toggle")])})}),Hoe=H.object({type:H.literal("webchat_config"),data:H.object({config:H.record(H.union([H.any(),H.null()]))})}),Woe=H.object({type:H.literal("custom"),data:H.object({event:H.record(H.union([H.any(),H.null()]))})}),Zoe=H.object({type:H.literal("typing_started"),data:H.object({timeout:H.number().optional()})}),Koe=H.object({type:H.literal("typing_stopped"),data:H.record(H.never())}),Goe={messageCreated:qoe,webchatVisibility:Voe,webchatConfig:Hoe,custom:Woe,typingStarted:Zoe,typingStopped:Koe},xC="unknown error",wC=class extends bC{constructor(t){super();_e(this,"_state",{status:"disconnected"});_e(this,"connect",async()=>{if(this._state.status==="connected")return;if(this._state.status==="connecting"){await this._state.connectionPromise;return}const t=this._connect();this._state={status:"connecting",connectionPromise:t},await t});_e(this,"disconnect",async()=>{if(this._state.status==="disconnected")return;let t;this._state.status==="connecting"?t=await this._state.connectionPromise:t=this._state.source,this._disconnectSync(t)});_e(this,"_connect",async()=>{const t=await zoe(`${this._props.url}/conversations/${this._props.conversationId}/listen`,{headers:{"x-user-key":this._props.userKey},timeout:this._props.timeout});return t.on("message",this._handleMessage),t.on("error",this._handleError(t)),this._state={status:"connected",source:t},t});_e(this,"_disconnectSync",t=>{t.close(),this._state={status:"disconnected"}});_e(this,"_handleMessage",t=>{const n=this._parseSignal(t.data);this.emit(n.type,n.data)});_e(this,"_handleError",t=>n=>{this._disconnectSync(t);const r=this._toError(n);this.emit("error",r)});_e(this,"_parseSignal",t=>{for(const n of Object.values(Goe)){const r=this._safeJsonParse(t),i=n.safeParse(r);if(i.success)return i.data}return{type:"unknown",data:t}});_e(this,"_safeJsonParse",t=>{try{return JSON.parse(t)}catch{return t}});_e(this,"_toError",t=>{if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t===null)return new Error(xC);if(typeof t=="object"&&"message"in t)return this._toError(t.message);try{const n=JSON.stringify(t);return new Error(n)}catch{return new Error(xC)}});this._props=t}get status(){return this._state.status}},SC=wC;Hae(SC,"listen",async e=>{const t=new wC(e);return await t.connect(),t});var _C=100*1024*1024,Yoe=_C,Joe=_C,Xoe=6e4,EC=class{constructor(e){_e(this,"_auto");_e(this,"createConversation",e=>this._auto.createConversation(e));_e(this,"getConversation",e=>this._auto.getConversation(e));_e(this,"deleteConversation",e=>this._auto.deleteConversation(e));_e(this,"listConversations",e=>this._auto.listConversations(e));_e(this,"listConversationMessages",e=>this._auto.listConversationMessages(e));_e(this,"addParticipant",e=>this._auto.addParticipant(e));_e(this,"removeParticipant",e=>this._auto.removeParticipant(e));_e(this,"getParticipant",e=>this._auto.getParticipant(e));_e(this,"listParticipants",e=>this._auto.listParticipants(e));_e(this,"createMessage",e=>this._auto.createMessage(e));_e(this,"getMessage",e=>this._auto.getMessage(e));_e(this,"deleteMessage",e=>this._auto.deleteMessage(e));_e(this,"createFile",e=>this._auto.createFile(e));_e(this,"createUser",e=>this._auto.createUser(e));_e(this,"getUser",e=>this._auto.getUser(e));_e(this,"updateUser",e=>this._auto.updateUser(e));_e(this,"deleteUser",e=>this._auto.deleteUser(e));_e(this,"createEvent",e=>this._auto.createEvent(e));_e(this,"getEvent",e=>this._auto.getEvent(e));_e(this,"listenConversation",async({id:e,"x-user-key":t})=>await SC.listen({url:this.props.apiUrl,conversationId:e,userKey:t,timeout:this.props.sseTimeout}));this.props=e;const{apiUrl:t}=e,n={...e.headers},r=this.props.timeout??Xoe,i=At.create({baseURL:t,headers:n,withCredentials:!0,timeout:r,maxBodyLength:Yoe,maxContentLength:Joe});this._auto=new Boe(i)}};const Qoe=6e4;function kC({apiUrl:e,clientId:t,sseTimeout:n=Qoe}){const r=new EC({apiUrl:`${e}/${t}`,sseTimeout:n});return{sendMessage:async i=>{const{message:a}=await r.createMessage(i);return oo(a)},getMessage:async i=>{const{message:a}=await r.getMessage(i);return oo(a)},listConversationMessages:async i=>{const{messages:a,meta:o}=await r.listConversationMessages(i);return{messages:a.map(oo),meta:o}},createMessage:async i=>{const{message:a}=await r.createMessage(i);return oo(a)},addParticipant:r.addParticipant.bind(r),createConversation:r.createConversation.bind(r),createEvent:r.createEvent.bind(r),createFile:r.createFile.bind(r),createUser:r.createUser.bind(r),deleteConversation:r.deleteConversation.bind(r),deleteMessage:r.deleteMessage.bind(r),deleteUser:r.deleteUser.bind(r),getConversation:r.getConversation.bind(r),getEvent:r.getEvent.bind(r),getParticipant:r.getParticipant.bind(r),getUser:r.getUser.bind(r),listConversations:r.listConversations.bind(r),removeParticipant:r.removeParticipant.bind(r),updateUser:r.updateUser.bind(r),listenConversation:r.listenConversation.bind(r)}}function oo(e){const{metadata:t,conversationId:n,userId:r}=e,{payload:i,disableInput:a}=mf(e.payload);return{id:e.id,conversationId:n,authorId:r,timestamp:new Date(e.createdAt),block:i,disableInput:a,metadata:t}}const cf={disconnected:0,user_creating:1,user_created:2,conversation_creating:3,conversation_created:4},bn=(e,t)=>e.status===t,Or=(e,t)=>cf[e.status]<cf[t],TC=(e,t)=>cf[e.status]>=cf[t];class Cr extends Error{constructor(t){super(`Unexpected state: ${t.status}`),this.state=t}}const OC=["audio","file","image","video"],oy=e=>OC.includes(e),ese=6e4;class tse extends Ef{constructor(n){super();_e(this,"_client");_e(this,"_webhookId");_e(this,"_apiUrl");_e(this,"_state",{status:"disconnected"});_e(this,"mode","pushpin");_e(this,"_initialConnect",async({data:n,name:r,pictureUrl:i})=>{if(TC(this._state,"user_created"))throw new Error("Client is already connected. Please disconnect first.");if(bn(this._state,"user_creating"))return;this._state={status:"user_creating"};const{user:{id:a},key:o}=await this._client.createUser({name:r,pictureUrl:i,userData:n});return this._state={status:"user_created",userId:a,userKey:o},{userId:a,userToken:o}});_e(this,"_reConnect",async(n,{data:r,name:i,pictureUrl:a})=>{if(TC(this._state,"user_created")){if(this._state.userId!==n.userId)throw new Error("Client is already connected. Please disconnect first.");return n}return bn(this._state,"user_creating")||(this._state={status:"user_created",userId:n.userId,userKey:n.userToken},await this._client.updateUser({"x-user-key":n.userToken,name:i,pictureUrl:a,userData:r})),n});_e(this,"_mapMessage",n=>{const{metadata:r}=n,{payload:i,disableInput:a}=mf(n.payload);return{id:n.id,conversationId:n.conversationId,authorId:n.userId,sentOn:new Date(n.createdAt),payload:i,disableInput:a,metadata:r}});const r=`${n.apiUrl}/${n.clientId}`;this._webhookId=n.clientId,this._apiUrl=r,this._client=new EC({apiUrl:r,sseTimeout:ese})}get apiUrl(){return this._apiUrl}get clientId(){return this._webhookId}get userId(){if(!Or(this._state,"user_created"))return this._state.userId}async getUser(){if(Or(this._state,"user_created"))throw new Cr(this._state);const{user:n}=await this._client.getUser({"x-user-key":this._state.userKey});return{data:n.data}}async updateUser(n){if(Or(this._state,"user_created"))throw new Cr(this._state);const{user:r}=await this._client.updateUser({"x-user-key":this._state.userKey,name:n.name,pictureUrl:n.pictureUrl,userData:n.data});return r}get conversationId(){if(!Or(this._state,"conversation_created"))return this._state.conversationId}async connect(n,r,i={}){const a={data:r,...i};return n?await this.userExists(n)?this._reConnect(n,a):this._initialConnect(a):this._initialConnect(a)}async disconnect(){bn(this._state,"conversation_created")?this._state.signalEmitter.cleanup():bn(this._state,"conversation_creating")&&console.warn("zombie conversation..."),this._state={status:"disconnected"}}async sendFile(n){if(Or(this._state,"user_created"))throw new Cr(this._state);if(bn(this._state,"conversation_creating"))throw new Cr(this._state);let r;bn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state));const{size:i,name:a}=n,s=await(m=>new Promise((h,y)=>{const v=new FileReader;v.onload=g=>{var b;return h((b=g.target)==null?void 0:b.result)},v.onerror=g=>{var b;return y((b=g.target)==null?void 0:b.error)},v.readAsArrayBuffer(m)}))(n),{file:{uploadUrl:u,contentType:l,url:c}}=await this._client.createFile({"x-user-key":r.userKey,size:i,key:a,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"}});await fetch(u,{method:"PUT",headers:{"x-amz-tagging":"public=true"},body:s});const f=l.split("/").shift()??"",d=oy(f)?f:"file",p=d==="image"?{type:d,imageUrl:c}:d==="audio"?{type:d,audioUrl:c}:d==="video"?{type:d,videoUrl:c}:{type:d,fileUrl:c};return await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:p}),this.emit("messageSent",p),{fileUrl:c,name:a,type:d}}async sendMessage(n){if(Or(this._state,"user_created"))throw new Cr(this._state);if(bn(this._state,"conversation_creating"))throw new Cr(this._state);let r;bn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:n}),this.emit("messageSent",n)}async sendEvent(n){if(Or(this._state,"user_created"))throw new Cr(this._state);if(bn(this._state,"conversation_creating"))throw new Cr(this._state);let r;bn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createEvent({"x-user-key":r.userKey,conversationId:r.conversationId,payload:{type:"custom",data:n}})}async switchConversation(n){if(Or(this._state,"user_created"))throw new Cr(this._state);bn(this._state,"conversation_created")&&this._state.conversationId===n||bn(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(Or(this._state,"user_created"))return!1;try{return await this._client.getConversation({"x-user-key":this._state.userKey,id:n}),!0}catch(r){if(ay(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=a=>a.code===404||a.code===401;if(ay(r)&&i(r))return!1;throw r}}async newConversation(){if(Or(this._state,"user_created"))throw new Cr(this._state);bn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._createNewConversation(this._state))}async _createNewConversation(n){const{conversation:{id:r}}=await this._client.createConversation({"x-user-key":n.userKey}),i=await this._connectConversation(n,r);return await this._client.createEvent({"x-user-key":n.userKey,conversationId:r,payload:{type:"conversation_started",data:{}}}),i}async listMessages(){if(!bn(this._state,"conversation_created"))return[];const{conversationId:n,userKey:r}=this._state,i=[];let a;do{const o=await this._client.listConversationMessages({id:n,"x-user-key":r,nextToken:a});i.push(...o.messages),a=o.meta.nextToken}while(a);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",a=>{typeof a=="string"&&a==="ping"||console.debug("unknown event",a)}),i.on("message_created",a=>{a.userId,n.userId}),i.on("error",a=>{this._state={status:"user_created",userId:n.userId,userKey:n.userKey},this.emit("error",new Error(`Connection to conversation lost: ${a.message}`))}),i.on("webchat_visibility",a=>{this.emit("webchatVisibility",a.visibility)}),i.on("webchat_config",a=>{this.emit("webchatConfig",a.config)}),i.on("typing_started",a=>{this.emit("isTyping",{isTyping:!0,timeout:a.timeout??5e3})}),i.on("typing_stopped",()=>{this.emit("isTyping",{isTyping:!1,timeout:0})}),i.on("custom",a=>{this.emit("customEvent",a.event)}),this.emit("conversation",r),this._state={status:"conversation_created",userId:n.userId,userKey:n.userKey,conversationId:r,signalEmitter:i},this._state}}const nse=({clientId:e,apiUrl:t="https://webchat.botpress.cloud"})=>new tse({apiUrl:t,clientId:e}),rse=({clientId:e,apiUrl:t="https://webchat.botpress.cloud"})=>{const[n]=j.useState(nse({clientId:e,apiUrl:t}));return n};function ise(){const[e,t]=j.useState(!1),n=j.useRef(null);return{isTyping:e,setIsTyping:(r,i)=>{if(t(r),!r)return()=>{};if(n.current=new Date,!i)return()=>{};const a=setTimeout(()=>{const o=n.current;o&&new Date().getTime()-o.getTime()>i&&t(!1)},i+100);return()=>clearTimeout(a)}}}var CC={},sy={},ff=ht&&ht.__assign||function(){return ff=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},ff.apply(this,arguments)};Object.defineProperty(sy,"__esModule",{value:!0});var ase={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function ose(e){var t=ff(ff({},ase),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}sy.getSanitizedOptions=ose;var ly={},uy={},df={},cy={},fy={};Object.defineProperty(fy,"__esModule",{value:!0});function sse(e){var t=Math.random()*e;return Math.round(t)}fy.fullJitter=sse;var dy={};Object.defineProperty(dy,"__esModule",{value:!0});function lse(e){return e}dy.noJitter=lse,Object.defineProperty(cy,"__esModule",{value:!0});var use=fy,cse=dy;function fse(e){switch(e.jitter){case"full":return use.fullJitter;case"none":default:return cse.noJitter}}cy.JitterFactory=fse,Object.defineProperty(df,"__esModule",{value:!0});var dse=cy,pse=function(){function e(t){this.options=t,this.attempt=0}return e.prototype.apply=function(){var t=this;return new Promise(function(n){return setTimeout(n,t.jitteredDelay)})},e.prototype.setAttemptNumber=function(t){this.attempt=t},Object.defineProperty(e.prototype,"jitteredDelay",{get:function(){var t=dse.JitterFactory(this.options);return t(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delay",{get:function(){var t=this.options.startingDelay,n=this.options.timeMultiple,r=this.numOfDelayedAttempts,i=t*Math.pow(n,r);return Math.min(i,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),e}();df.Delay=pse;var hse=ht&&ht.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),mse=ht&&ht.__awaiter||function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(c){try{l(r.next(c))}catch(f){o(f)}}function u(c){try{l(r.throw(c))}catch(f){o(f)}}function l(c){c.done?a(c.value):i(c.value).then(s,u)}l((r=r.apply(e,t||[])).next())})},vse=ht&&ht.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(c){l=[6,c],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(uy,"__esModule",{value:!0});var yse=df,gse=function(e){hse(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return mse(this,void 0,void 0,function(){return vse(this,function(n){return[2,this.isFirstAttempt?!0:e.prototype.apply.call(this)]})})},Object.defineProperty(t.prototype,"isFirstAttempt",{get:function(){return this.attempt===0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),t}(yse.Delay);uy.SkipFirstDelay=gse;var py={},bse=ht&&ht.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(py,"__esModule",{value:!0});var xse=df,wse=function(e){bse(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(xse.Delay);py.AlwaysDelay=wse,Object.defineProperty(ly,"__esModule",{value:!0});var Sse=uy,_se=py;function Ese(e,t){var n=kse(e);return n.setAttemptNumber(t),n}ly.DelayFactory=Ese;function kse(e){return e.delayFirstAttempt?new _se.AlwaysDelay(e):new Sse.SkipFirstDelay(e)}var hy=ht&&ht.__awaiter||function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(c){try{l(r.next(c))}catch(f){o(f)}}function u(c){try{l(r.throw(c))}catch(f){o(f)}}function l(c){c.done?a(c.value):i(c.value).then(s,u)}l((r=r.apply(e,t||[])).next())})},my=ht&&ht.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(c){l=[6,c],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(CC,"__esModule",{value:!0});var Tse=sy,Ose=ly;function Cse(e,t){return t===void 0&&(t={}),hy(this,void 0,void 0,function(){var n,r;return my(this,function(i){switch(i.label){case 0:return n=Tse.getSanitizedOptions(t),r=new Ise(e,n),[4,r.execute()];case 1:return[2,i.sent()]}})})}var $se=CC.backOff=Cse,Ise=function(){function e(t,n){this.request=t,this.options=n,this.attemptNumber=0}return e.prototype.execute=function(){return hy(this,void 0,void 0,function(){var t,n;return my(this,function(r){switch(r.label){case 0:if(this.attemptLimitReached)return[3,7];r.label=1;case 1:return r.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return r.sent(),[4,this.request()];case 3:return[2,r.sent()];case 4:return t=r.sent(),this.attemptNumber++,[4,this.options.retry(t,this.attemptNumber)];case 5:if(n=r.sent(),!n||this.attemptLimitReached)throw t;return[3,6];case 6:return[3,0];case 7:throw new Error("Something went wrong.")}})})},Object.defineProperty(e.prototype,"attemptLimitReached",{get:function(){return this.attemptNumber>=this.options.numOfAttempts},enumerable:!0,configurable:!0}),e.prototype.applyDelay=function(){return hy(this,void 0,void 0,function(){var t;return my(this,function(n){switch(n.label){case 0:return t=Ose.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return n.sent(),[2]}})})},e}();function $C({apiUrl:e="https://webchat.botpress.cloud",clientId:t,storageKey:n,...r}){const[i,a]=j.useState(),o=Bo(D=>D.messages),s=Bo(D=>D.addMessage),u=Bo(D=>D.fetchMessages),l=Bo(D=>D.setMessages),c=Bo(D=>D.isFetching),[f,d]=j.useState("connecting"),{isTyping:p,setIsTyping:m}=ise(),h=j.useMemo(()=>new Ef,[]),y=Dx(n),v=j.useMemo(()=>kC({apiUrl:e,clientId:t}),[e,t]),g=j.useRef(null),[b,k]=j.useState(r.userKey),[S,E]=j.useState(r.conversationId);async function O(D){const{conversation:T}=await v.createConversation({"x-user-key":D});return y.setState({conversationId:T.id}),await v.createEvent({"x-user-key":D,conversationId:T.id,payload:{type:"conversation_started",data:{}}}),T.id}if(j.useEffect(()=>{let D=!0;async function T({userKey:P,conversationId:V}){let $,F=r.userKey??P,M=r.conversationId??V;if(d("connecting"),!F){const U=y.getState().user;F=U==null?void 0:U.userToken}if(!F){const{key:U,user:N}=await v.createUser({});$=N,F=U,y.setState({user:{userId:N.id,userToken:F}})}if(!$){const{user:U}=await v.getUser({"x-user-key":F});$=U}M||(M=y.getState().conversationId),M||(M=await O(F));const[B,W]=[await v.listenConversation({"x-user-key":F,id:M}),await u({client:v,conversationId:M,userKey:F})];h.emit("conversation",M),IC({emitter:h,signalEmitter:B}),D&&(g.current=B,k(F),E(M),a($),l(W),d("connected"))}return T({userKey:b,conversationId:S}).catch(P=>{console.error(P)}),()=>{g.current&&(g.current.cleanup(),g.current=null),D=!1}},[b,S,v,h,r.conversationId,r.userKey]),j.useEffect(()=>{var T;if(!b||!S)return;async function D({userKey:P,conversationId:V}){const $=await v.listenConversation({"x-user-key":P,id:V});g.current=$,IC({emitter:h,signalEmitter:$})}f==="error"&&((T=g.current)==null||T.cleanup(),$se(()=>D({conversationId:S,userKey:b}),{startingDelay:2e3,maxDelay:1e4,numOfAttempts:1/0}),d("connected"))},[f,b,S]),j.useEffect(()=>{const D=[h.on("message",T=>((i==null?void 0:i.id)!==T.authorId&&h.emit("isTyping",{isTyping:!1,timeout:0}),s(T))),h.on("isTyping",({isTyping:T,timeout:P})=>{m(T,P)}),h.on("error",()=>{d("error")})];return()=>{D.forEach(T=>T())}},[]),f==="connecting"||!b||!S)return{clientState:"connecting",on:h.on.bind(h),client:void 0,messages:[],conversationId:void 0,newConversation:()=>{},user:void 0,isTyping:void 0,isFetchingMessages:c};const L={sendMessage:async D=>{const T=ET();s(oo({id:T,createdAt:new Date().toISOString(),userId:(i==null?void 0:i.id)??"",conversationId:S,payload:D,metadata:{clientMessageId:T,delivered:!1}})),await v.createMessage({"x-user-key":b,conversationId:S,payload:D,metadata:{clientMessageId:T}}).catch(P=>h.emit("error",P))},updateUser:async D=>{const{user:T}=await v.updateUser({"x-user-key":b,name:D.name,pictureUrl:D.pictureUrl,userData:D.data});return T},sendEvent:async D=>{await v.createEvent({"x-user-key":b,conversationId:S,payload:{type:"custom",data:D}})},uploadFile:async D=>{const{size:T,name:P}=D,$=await(N=>new Promise((x,q)=>{const K=new FileReader;K.onload=_=>{var Y;return x((Y=_.target)==null?void 0:Y.result)},K.onerror=_=>{var Y;return q((Y=_.target)==null?void 0:Y.error)},K.readAsArrayBuffer(N)}))(D),{file:{uploadUrl:F,contentType:M,url:B}}=await v.createFile({"x-user-key":b,size:T,key:P,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"}});await fetch(F,{method:"PUT",headers:{"x-amz-tagging":"public=true"},body:$});const W=M.split("/").shift()??"",U=oy(W)?W:"file";return{fileUrl:B,name:P,type:U}},getUser:async()=>{const{user:D}=await v.getUser({"x-user-key":b});return D}};return{clientState:f,on:h.on.bind(h),client:L,messages:o,conversationId:S,newConversation:()=>{l([]),O(b).then(E)},user:i,isTyping:p,isFetchingMessages:c}}function IC({emitter:e,signalEmitter:t}){t.on("unknown",n=>{}),t.on("message_created",n=>{e.emit("message",oo(n))}),t.on("error",n=>{e.emit("error",new Error(`Connection to conversation lost: ${n.message}`))}),t.on("webchat_visibility",n=>{e.emit("webchatVisibility",n.visibility)}),t.on("webchat_config",n=>{e.emit("webchatConfig",n.config)}),t.on("typing_started",n=>{e.emit("isTyping",{isTyping:!0,timeout:n.timeout??5e3})}),t.on("typing_stopped",()=>{e.emit("isTyping",{isTyping:!1,timeout:0})}),t.on("custom",n=>{e.emit("customEvent",n.event)})}const Rse=({clientId:e,storageKey:t,configuration:n,allowFileUpload:r,apiUrl:i,userKey:a,conversationId:o,...s})=>{const u=t||`bp-webchat-${e}`,{clientState:l,client:c,isFetchingMessages:f,isTyping:d,newConversation:p,messages:m,user:h}=$C({clientId:e,apiUrl:i,conversationId:o,userKey:a,storageKey:u}),{sendMessage:y,uploadFile:v}=c??{};return I.jsx(kT,{configuration:n??{},user:h??{id:""},isLoading:f||l==="connecting",isTyping:d,connected:l==="connected"?!0:l==="disconnected"?!1:void 0,messages:m,sendMessage:y,uploadFile:v,allowFileUpload:r,restartConversation:p,...s})};Ie.Avatar=El,Ie.Block=ba,Ie.Chat=kT,Ie.Composer=o0,Ie.Container=gp,Ie.Fab=X0,Ie.Header=i1,Ie.Message=_p,Ie.MessageList=tv,Ie.Modal=ui,Ie.ModalProvider=s0,Ie.RestartConversationButton=r1,Ie.StylesheetProvider=l0,Ie.TypingIndicator=a1,Ie.Webchat=Rse,Ie.WebchatThemeSchema=Rf,Ie.__adapters=HC,Ie.avatarThemeSchema=_l,Ie.blockThemeSchema=vg,Ie.configPropsSchema=xg,Ie.configurationSchema=pg,Ie.cssStyleSchema=mg,Ie.descriptionItemSchema=ia,Ie.fileTypes=OC,Ie.generateThemeStylesheet=wg,Ie.getClient=kC,Ie.getUseUserStore=Dx,Ie.initPropsSchema=II,Ie.isFileType=oy,Ie.markdownTypeSchema=hg,Ie.renderers=Qw,Ie.statePropsSchema=gg,Ie.styleOptionSchema=fe,Ie.themeSchema=yg,Ie.useClient=rse,Ie.useWebchatClient=$C,Ie.useWebchatStore=Hl,Ie.userPropsSchema=bg,Ie.webchatClasses=yt,Object.defineProperty(Ie,Symbol.toStringTag,{value:"Module"})});
|
|
353
|
+
*/(function(e,t){(function(n){var r=n.setTimeout,i=n.clearTimeout,a=n.XMLHttpRequest,o=n.XDomainRequest,s=n.ActiveXObject,u=n.EventSource,l=n.document,c=n.Promise,f=n.fetch,d=n.Response,p=n.TextDecoder,h=n.TextEncoder,m=n.AbortController;if(typeof window<"u"&&typeof l<"u"&&!("readyState"in l)&&l.body==null&&(l.readyState="loading",window.addEventListener("load",function(P){l.readyState="complete"},!1)),a==null&&s!=null&&(a=function(){return new s("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(P){function Y(){}return Y.prototype=P,new Y}),Date.now||(Date.now=function(){return new Date().getTime()}),m==null){var y=f;f=function(P,Y){var oe=Y.signal;return y(P,{headers:Y.headers,credentials:Y.credentials,cache:Y.cache}).then(function(ee){var ke=ee.body.getReader();return oe._reader=ke,oe._aborted&&oe._reader.cancel(),{status:ee.status,statusText:ee.statusText,headers:ee.headers,body:{getReader:function(){return ke}}}})},m=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function v(){this.bitsNeeded=0,this.codePoint=0}v.prototype.decode=function(P){function Y(Fe,B,D){if(D===1)return Fe>=128>>B&&Fe<<B<=2047;if(D===2)return Fe>=2048>>B&&Fe<<B<=55295||Fe>=57344>>B&&Fe<<B<=65535;if(D===3)return Fe>=65536>>B&&Fe<<B<=1114111;throw new Error}function oe(Fe,B){if(Fe===6*1)return B>>6>15?3:B>31?2:1;if(Fe===6*2)return B>15?3:2;if(Fe===6*3)return 3;throw new Error}for(var ee=65533,ke="",Se=this.bitsNeeded,Pe=this.codePoint,He=0;He<P.length;He+=1){var Ae=P[He];Se!==0&&(Ae<128||Ae>191||!Y(Pe<<6|Ae&63,Se-6,oe(Se,Pe)))&&(Se=0,Pe=ee,ke+=String.fromCharCode(Pe)),Se===0?(Ae>=0&&Ae<=127?(Se=0,Pe=Ae):Ae>=192&&Ae<=223?(Se=6*1,Pe=Ae&31):Ae>=224&&Ae<=239?(Se=6*2,Pe=Ae&15):Ae>=240&&Ae<=247?(Se=6*3,Pe=Ae&7):(Se=0,Pe=ee),Se!==0&&!Y(Pe,Se,oe(Se,Pe))&&(Se=0,Pe=ee)):(Se-=6,Pe=Pe<<6|Ae&63),Se===0&&(Pe<=65535?ke+=String.fromCharCode(Pe):(ke+=String.fromCharCode(55296+(Pe-65535-1>>10)),ke+=String.fromCharCode(56320+(Pe-65535-1&1023))))}return this.bitsNeeded=Se,this.codePoint=Pe,ke};var g=function(){try{return new p().decode(new h().encode("test"),{stream:!0})==="test"}catch(P){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+P)}return!1};(p==null||h==null||!g())&&(p=v);var b=function(){};function k(P){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=P,this._sendTimeout=0,this._abort=b}k.prototype.open=function(P,Y){this._abort(!0);var oe=this,ee=this._xhr,ke=1,Se=0;this._abort=function(D){oe._sendTimeout!==0&&(i(oe._sendTimeout),oe._sendTimeout=0),(ke===1||ke===2||ke===3)&&(ke=4,ee.onload=b,ee.onerror=b,ee.onabort=b,ee.onprogress=b,ee.onreadystatechange=b,ee.abort(),Se!==0&&(i(Se),Se=0),D||(oe.readyState=4,oe.onabort(null),oe.onreadystatechange())),ke=0};var Pe=function(){if(ke===1){var D=0,X="",ce=void 0;if("contentType"in ee)D=200,X="OK",ce=ee.contentType;else try{D=ee.status,X=ee.statusText,ce=ee.getResponseHeader("Content-Type")}catch{D=0,X="",ce=void 0}D!==0&&(ke=2,oe.readyState=2,oe.status=D,oe.statusText=X,oe._contentType=ce,oe.onreadystatechange())}},He=function(){if(Pe(),ke===2||ke===3){ke=3;var D="";try{D=ee.responseText}catch{}oe.readyState=3,oe.responseText=D,oe.onprogress()}},Ae=function(D,X){if((X==null||X.preventDefault==null)&&(X={preventDefault:b}),He(),ke===1||ke===2||ke===3){if(ke=4,Se!==0&&(i(Se),Se=0),oe.readyState=4,D==="load")oe.onload(X);else if(D==="error")oe.onerror(X);else if(D==="abort")oe.onabort(X);else throw new TypeError;oe.onreadystatechange()}},Fe=function(D){ee!=null&&(ee.readyState===4?(!("onload"in ee)||!("onerror"in ee)||!("onabort"in ee))&&Ae(ee.responseText===""?"error":"load",D):ee.readyState===3?"onprogress"in ee||He():ee.readyState===2&&Pe())},B=function(){Se=r(function(){B()},500),ee.readyState===3&&He()};"onload"in ee&&(ee.onload=function(D){Ae("load",D)}),"onerror"in ee&&(ee.onerror=function(D){Ae("error",D)}),"onabort"in ee&&(ee.onabort=function(D){Ae("abort",D)}),"onprogress"in ee&&(ee.onprogress=He),"onreadystatechange"in ee&&(ee.onreadystatechange=function(D){Fe(D)}),("contentType"in ee||!("ontimeout"in a.prototype))&&(Y+=(Y.indexOf("?")===-1?"?":"&")+"padding=true"),ee.open(P,Y,!0),"readyState"in ee&&(Se=r(function(){B()},0))},k.prototype.abort=function(){this._abort(!1)},k.prototype.getResponseHeader=function(P){return this._contentType},k.prototype.setRequestHeader=function(P,Y){var oe=this._xhr;"setRequestHeader"in oe&&oe.setRequestHeader(P,Y)},k.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},k.prototype.send=function(){if((!("ontimeout"in a.prototype)||!("sendAsBinary"in a.prototype)&&!("mozAnon"in a.prototype))&&l!=null&&l.readyState!=null&&l.readyState!=="complete"){var P=this;P._sendTimeout=r(function(){P._sendTimeout=0,P.send()},4);return}var Y=this._xhr;"withCredentials"in Y&&(Y.withCredentials=this.withCredentials);try{Y.send(void 0)}catch(oe){throw oe}};function S(P){return P.replace(/[A-Z]/g,function(Y){return String.fromCharCode(Y.charCodeAt(0)+32)})}function E(P){for(var Y=Object.create(null),oe=P.split(`\r
|
|
354
|
+
`),ee=0;ee<oe.length;ee+=1){var ke=oe[ee],Se=ke.split(": "),Pe=Se.shift(),He=Se.join(": ");Y[S(Pe)]=He}this._map=Y}E.prototype.get=function(P){return this._map[S(P)]},a!=null&&a.HEADERS_RECEIVED==null&&(a.HEADERS_RECEIVED=2);function O(){}O.prototype.open=function(P,Y,oe,ee,ke,Se,Pe){P.open("GET",ke);var He=0;P.onprogress=function(){var Fe=P.responseText,B=Fe.slice(He);He+=B.length,oe(B)},P.onerror=function(Fe){Fe.preventDefault(),ee(new Error("NetworkError"))},P.onload=function(){ee(null)},P.onabort=function(){ee(null)},P.onreadystatechange=function(){if(P.readyState===a.HEADERS_RECEIVED){var Fe=P.status,B=P.statusText,D=P.getResponseHeader("Content-Type"),X=P.getAllResponseHeaders();Y(Fe,B,D,new E(X))}},P.withCredentials=Se;for(var Ae in Pe)Object.prototype.hasOwnProperty.call(Pe,Ae)&&P.setRequestHeader(Ae,Pe[Ae]);return P.send(),P};function j(P){this._headers=P}j.prototype.get=function(P){return this._headers.get(P)};function q(){}q.prototype.open=function(P,Y,oe,ee,ke,Se,Pe){var He=null,Ae=new m,Fe=Ae.signal,B=new p;return f(ke,{headers:Pe,credentials:Se?"include":"same-origin",signal:Fe,cache:"no-store"}).then(function(D){return He=D.body.getReader(),Y(D.status,D.statusText,D.headers.get("Content-Type"),new j(D.headers)),new c(function(X,ce){var Ee=function(){He.read().then(function(Oe){if(Oe.done)X(void 0);else{var Je=B.decode(Oe.value,{stream:!0});oe(Je),Ee()}}).catch(function(Oe){ce(Oe)})};Ee()})}).catch(function(D){if(D.name!=="AbortError")return D}).then(function(D){ee(D)}),{abort:function(){He!=null&&He.cancel(),Ae.abort()}}};function T(){this._listeners=Object.create(null)}function I(P){r(function(){throw P},0)}T.prototype.dispatchEvent=function(P){P.target=this;var Y=this._listeners[P.type];if(Y!=null)for(var oe=Y.length,ee=0;ee<oe;ee+=1){var ke=Y[ee];try{typeof ke.handleEvent=="function"?ke.handleEvent(P):ke.call(this,P)}catch(Se){I(Se)}}},T.prototype.addEventListener=function(P,Y){P=String(P);var oe=this._listeners,ee=oe[P];ee==null&&(ee=[],oe[P]=ee);for(var ke=!1,Se=0;Se<ee.length;Se+=1)ee[Se]===Y&&(ke=!0);ke||ee.push(Y)},T.prototype.removeEventListener=function(P,Y){P=String(P);var oe=this._listeners,ee=oe[P];if(ee!=null){for(var ke=[],Se=0;Se<ee.length;Se+=1)ee[Se]!==Y&&ke.push(ee[Se]);ke.length===0?delete oe[P]:oe[P]=ke}};function U(P){this.type=P,this.target=void 0}function R(P,Y){U.call(this,P),this.data=Y.data,this.lastEventId=Y.lastEventId}R.prototype=Object.create(U.prototype);function F(P,Y){U.call(this,P),this.status=Y.status,this.statusText=Y.statusText,this.headers=Y.headers}F.prototype=Object.create(U.prototype);function N(P,Y){U.call(this,P),this.error=Y.error}N.prototype=Object.create(U.prototype);var L=-1,W=0,z=1,A=2,x=-1,V=0,K=1,_=2,J=3,ne=/^text\/event\-stream(;.*)?$/i,re=1e3,le=18e6,pe=function(P,Y){var oe=P==null?Y:parseInt(P,10);return oe!==oe&&(oe=Y),he(oe)},he=function(P){return Math.min(Math.max(P,re),le)},ue=function(P,Y,oe){try{typeof Y=="function"&&Y.call(P,oe)}catch(ee){I(ee)}};function Q(P,Y){T.call(this),Y=Y||{},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,ve(this,P,Y)}function Z(){return a!=null&&"withCredentials"in a.prototype||o==null?new a:new o}var de=f!=null&&d!=null&&"body"in d.prototype;function ve(P,Y,oe){Y=String(Y);var ee=!!oe.withCredentials,ke=oe.lastEventIdQueryParameterName||"lastEventId",Se=he(1e3),Pe=pe(oe.heartbeatTimeout,45e3),He="",Ae=Se,Fe=!1,B=0,D=oe.headers||{},X=oe.Transport,ce=de&&X==null?void 0:new k(X!=null?new X:Z()),Ee=X!=null&&typeof X!="string"?new X:ce==null?new q:new O,Oe=void 0,Je=0,lt=L,Ut="",Ot="",Ze="",Ct="",tt=V,bn=0,Cn=0,rr=function(pt,wt,zt,qt){if(lt===W)if(pt===200&&zt!=null&&ne.test(zt)){lt=z,Fe=Date.now(),Ae=Se,P.readyState=z;var Xt=new F("open",{status:pt,statusText:wt,headers:qt});P.dispatchEvent(Xt),ue(P,P.onopen,Xt)}else{var Vt="";pt!==200?(wt&&(wt=wt.replace(/\s+/g," ")),Vt="EventSource's response has a status "+pt+" "+wt+" that is not 200. Aborting the connection."):Vt="EventSource's response has a Content-Type specifying an unsupported type: "+(zt==null?"-":zt.replace(/\s+/g," "))+". Aborting the connection.",ir();var Xt=new F("error",{status:pt,statusText:wt,headers:qt});P.dispatchEvent(Xt),ue(P,P.onerror,Xt),console.error(Vt)}},Hr=function(pt){if(lt===z){for(var wt=-1,zt=0;zt<pt.length;zt+=1){var qt=pt.charCodeAt(zt);(qt===10||qt===13)&&(wt=zt)}var Xt=(wt!==-1?Ct:"")+pt.slice(0,wt+1);Ct=(wt===-1?Ct:"")+pt.slice(wt+1),pt!==""&&(Fe=Date.now(),B+=pt.length);for(var Vt=0;Vt<Xt.length;Vt+=1){var qt=Xt.charCodeAt(Vt);if(tt===x&&qt===10)tt=V;else if(tt===x&&(tt=V),qt===13||qt===10){if(tt!==V){tt===K&&(Cn=Vt+1);var Ln=Xt.slice(bn,Cn-1),Fn=Xt.slice(Cn+(Cn<Vt&&Xt.charCodeAt(Cn)===32?1:0),Vt);Ln==="data"?(Ut+=`
|
|
355
|
+
`,Ut+=Fn):Ln==="id"?Ot=Fn:Ln==="event"?Ze=Fn:Ln==="retry"?(Se=pe(Fn,Se),Ae=Se):Ln==="heartbeatTimeout"&&(Pe=pe(Fn,Pe),Je!==0&&(i(Je),Je=r(function(){Wr()},Pe)))}if(tt===V){if(Ut!==""){He=Ot,Ze===""&&(Ze="message");var ki=new R(Ze,{data:Ut.slice(1),lastEventId:Ot});if(P.dispatchEvent(ki),Ze==="open"?ue(P,P.onopen,ki):Ze==="message"?ue(P,P.onmessage,ki):Ze==="error"&&ue(P,P.onerror,ki),lt===A)return}Ut="",Ze=""}tt=qt===13?x:V}else tt===V&&(bn=Vt,tt=K),tt===K?qt===58&&(Cn=Vt+1,tt=_):tt===_&&(tt=J)}}},$r=function(pt){if(lt===z||lt===W){lt=L,Je!==0&&(i(Je),Je=0),Je=r(function(){Wr()},Ae),Ae=he(Math.min(Se*16,Ae*2)),P.readyState=W;var wt=new N("error",{error:pt});P.dispatchEvent(wt),ue(P,P.onerror,wt),pt!=null&&console.error(pt)}},ir=function(){lt=A,Oe!=null&&(Oe.abort(),Oe=void 0),Je!==0&&(i(Je),Je=0),P.readyState=A},Wr=function(){if(Je=0,lt!==L){if(!Fe&&Oe!=null)$r(new Error("No activity within "+Pe+" milliseconds. "+(lt===W?"No response received.":B+" chars received.")+" Reconnecting.")),Oe!=null&&(Oe.abort(),Oe=void 0);else{var pt=Math.max((Fe||Date.now())+Pe-Date.now(),1);Fe=!1,Je=r(function(){Wr()},pt)}return}Fe=!1,B=0,Je=r(function(){Wr()},Pe),lt=W,Ut="",Ze="",Ot=He,Ct="",bn=0,Cn=0,tt=V;var wt=Y;if(Y.slice(0,5)!=="data:"&&Y.slice(0,5)!=="blob:"&&He!==""){var zt=Y.indexOf("?");wt=zt===-1?Y:Y.slice(0,zt+1)+Y.slice(zt+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Fn,ki){return ki===ke?"":Fn}),wt+=(Y.indexOf("?")===-1?"?":"&")+ke+"="+encodeURIComponent(He)}var qt=P.withCredentials,Xt={};Xt.Accept="text/event-stream";var Vt=P.headers;if(Vt!=null)for(var Ln in Vt)Object.prototype.hasOwnProperty.call(Vt,Ln)&&(Xt[Ln]=Vt[Ln]);try{Oe=Ee.open(ce,rr,Hr,$r,wt,qt,Xt)}catch(Fn){throw ir(),Fn}};P.url=Y,P.readyState=W,P.withCredentials=ee,P.headers=D,P._close=ir,Wr()}Q.prototype=Object.create(T.prototype),Q.prototype.CONNECTING=W,Q.prototype.OPEN=z,Q.prototype.CLOSED=A,Q.prototype.close=function(){this._close()},Q.CONNECTING=W,Q.OPEN=z,Q.CLOSED=A,Q.prototype.withCredentials=void 0;var $e=u;a!=null&&(u==null||!("withCredentials"in u.prototype))&&($e=Q),function(P){{var Y=P(t);Y!==void 0&&(e.exports=Y)}}(function(P){P.EventSourcePolyfill=Q,P.NativeEventSource=u,P.EventSource=$e})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:ht:globalThis)})(Qv,Qv.exports);var eae=Qv.exports;const tae=Ke(eae);var et;(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 a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(et||(et={}));var ey;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(ey||(ey={}));const be=et.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),xi=e=>{switch(typeof e){case"undefined":return be.undefined;case"string":return be.string;case"number":return isNaN(e)?be.nan:be.number;case"boolean":return be.boolean;case"function":return be.function;case"bigint":return be.bigint;case"symbol":return be.symbol;case"object":return Array.isArray(e)?be.array:e===null?be.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?be.promise:typeof Map<"u"&&e instanceof Map?be.map:typeof Set<"u"&&e instanceof Set?be.set:typeof Date<"u"&&e instanceof Date?be.date:be.object;default:return be.unknown}},ie=et.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"]),nae=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class On 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(a){return a.message},r={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let s=r,u=0;for(;u<o.path.length;){const l=o.path[u];u===o.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(o))):s[l]=s[l]||{_errors:[]},s=s[l],u++}}};return i(this),r}static assert(t){if(!(t instanceof On))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,et.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()}}On.create=e=>new On(e);const eo=(e,t)=>{let n;switch(e.code){case ie.invalid_type:e.received===be.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ie.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,et.jsonStringifyReplacer)}`;break;case ie.unrecognized_keys:n=`Unrecognized key(s) in object: ${et.joinValues(e.keys,", ")}`;break;case ie.invalid_union:n="Invalid input";break;case ie.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${et.joinValues(e.options)}`;break;case ie.invalid_enum_value:n=`Invalid enum value. Expected ${et.joinValues(e.options)}, received '${e.received}'`;break;case ie.invalid_arguments:n="Invalid function arguments";break;case ie.invalid_return_type:n="Invalid function return type";break;case ie.invalid_date:n="Invalid date";break;case ie.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:et.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ie.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ie.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ie.custom:n="Invalid input";break;case ie.invalid_intersection_types:n="Intersection results could not be merged";break;case ie.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ie.not_finite:n="Number must be finite";break;default:n=t.defaultError,et.assertNever(e)}return{message:n}};let fC=eo;function rae(e){fC=e}function tf(){return fC}const nf=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s="";const u=r.filter(l=>!!l).slice().reverse();for(const l of u)s=l(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}},iae=[];function me(e,t){const n=tf(),r=nf({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===eo?void 0:eo].filter(i=>!!i)});e.common.issues.push(r)}class on{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 Me;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){const a=await i.key,o=await i.value;r.push({key:a,value:o})}return on.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Me;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[a.value]=o.value)}return{status:t.value,value:r}}}const Me=Object.freeze({status:"aborted"}),to=e=>({status:"dirty",value:e}),cn=e=>({status:"valid",value:e}),ty=e=>e.status==="aborted",ny=e=>e.status==="dirty",Vs=e=>e.status==="valid",Hs=e=>typeof Promise<"u"&&e instanceof Promise;function rf(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function dC(e,t,n,r,i){if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var Te;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Te||(Te={}));var Ws,Zs;class Er{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 pC=(e,t)=>{if(Vs(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 On(e.common.issues);return this._error=n,this._error}}};function ze(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:(o,s)=>{var u,l;const{message:c}=e;return o.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:(u=c??r)!==null&&u!==void 0?u:s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:(l=c??n)!==null&&l!==void 0?l:s.defaultError}},description:i}}class Ve{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 xi(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:xi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new on,ctx:{common:t.parent.common,data:t.data,parsedType:xi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Hs(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:xi(t)},a=this._parseSync({data:t,path:i.path,parent:i});return pC(i,a)}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:xi(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(Hs(i)?i:Promise.resolve(i));return pC(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:ie.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(u=>u?!0:(s(),!1)):o?!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 nr({schema:this,typeName:De.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Tr.create(this,this._def)}nullable(){return Ei.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return tr.create(this,this._def)}promise(){return ao.create(this,this._def)}or(t){return Js.create([this,t],this._def)}and(t){return Xs.create(this,t,this._def)}transform(t){return new nr({...ze(this._def),schema:this,typeName:De.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new rl({...ze(this._def),innerType:this,defaultValue:n,typeName:De.ZodDefault})}brand(){return new ay({typeName:De.ZodBranded,type:this,...ze(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new il({...ze(this._def),innerType:this,catchValue:n,typeName:De.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return al.create(this,t)}readonly(){return ol.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const aae=/^c[^\s-]{8,}$/i,oae=/^[0-9a-z]+$/,sae=/^[0-9A-HJKMNP-TV-Z]{26}$/,lae=/^[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,uae=/^[a-z0-9_-]{21}$/i,cae=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,fae=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,dae="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ry;const pae=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,hae=/^(([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})))$/,mae=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,hC="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",vae=new RegExp(`^${hC}$`);function mC(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function yae(e){return new RegExp(`^${mC(e)}$`)}function vC(e){let t=`${hC}T${mC(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function gae(e,t){return!!((t==="v4"||!t)&&pae.test(e)||(t==="v6"||!t)&&hae.test(e))}class er extends Ve{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==be.string){const a=this._getOrReturnCtx(t);return me(a,{code:ie.invalid_type,expected:be.string,received:a.parsedType}),Me}const r=new on;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:ie.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:ie.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,s=t.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(t,i),o?me(i,{code:ie.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&me(i,{code:ie.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")fae.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"email",code:ie.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")ry||(ry=new RegExp(dae,"u")),ry.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"emoji",code:ie.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")lae.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"uuid",code:ie.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")uae.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"nanoid",code:ie.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")aae.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"cuid",code:ie.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")oae.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"cuid2",code:ie.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")sae.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"ulid",code:ie.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),me(i,{validation:"url",code:ie.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"regex",code:ie.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),me(i,{code:ie.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),me(i,{code:ie.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),me(i,{code:ie.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?vC(a).test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{code:ie.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?vae.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{code:ie.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?yae(a).test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{code:ie.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?cae.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"duration",code:ie.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?gae(t.data,a.version)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"ip",code:ie.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?mae.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"base64",code:ie.invalid_string,message:a.message}),r.dirty()):et.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:ie.invalid_string,...Te.errToObj(r)})}_addCheck(t){return new er({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Te.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Te.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Te.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Te.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Te.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Te.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Te.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Te.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Te.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Te.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!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,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...Te.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Te.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Te.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Te.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Te.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Te.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Te.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Te.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Te.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Te.errToObj(n)})}nonempty(t){return this.min(1,Te.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 isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}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 isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}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 isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}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:De.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ze(e)})};function bae(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}class wi extends Ve{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)!==be.number){const a=this._getOrReturnCtx(t);return me(a,{code:ie.invalid_type,expected:be.number,received:a.parsedType}),Me}let r;const i=new on;for(const a of this._def.checks)a.kind==="int"?et.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),me(r,{code:ie.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),me(r,{code:ie.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),me(r,{code:ie.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?bae(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),me(r,{code:ie.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),me(r,{code:ie.not_finite,message:a.message}),i.dirty()):et.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Te.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Te.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Te.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Te.toString(n))}setLimit(t,n,r,i){return new wi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Te.toString(i)}]})}_addCheck(t){return new wi({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Te.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Te.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Te.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Te.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Te.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Te.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Te.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Te.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Te.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"&&et.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)}}wi.create=e=>new wi({checks:[],typeName:De.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ze(e)});class Si extends Ve{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)!==be.bigint){const a=this._getOrReturnCtx(t);return me(a,{code:ie.invalid_type,expected:be.bigint,received:a.parsedType}),Me}let r;const i=new on;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),me(r,{code:ie.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),me(r,{code:ie.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),me(r,{code:ie.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):et.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Te.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Te.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Te.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Te.toString(n))}setLimit(t,n,r,i){return new Si({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Te.toString(i)}]})}_addCheck(t){return new Si({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Te.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Te.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Te.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Te.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Te.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}}Si.create=e=>{var t;return new Si({checks:[],typeName:De.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ze(e)})};class Ks extends Ve{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==be.boolean){const r=this._getOrReturnCtx(t);return me(r,{code:ie.invalid_type,expected:be.boolean,received:r.parsedType}),Me}return cn(t.data)}}Ks.create=e=>new Ks({typeName:De.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ze(e)});class Gi extends Ve{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==be.date){const a=this._getOrReturnCtx(t);return me(a,{code:ie.invalid_type,expected:be.date,received:a.parsedType}),Me}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return me(a,{code:ie.invalid_date}),Me}const r=new on;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:ie.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:ie.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):et.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Gi({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Te.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Te.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}}Gi.create=e=>new Gi({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:De.ZodDate,...ze(e)});class af extends Ve{_parse(t){if(this._getType(t)!==be.symbol){const r=this._getOrReturnCtx(t);return me(r,{code:ie.invalid_type,expected:be.symbol,received:r.parsedType}),Me}return cn(t.data)}}af.create=e=>new af({typeName:De.ZodSymbol,...ze(e)});class Gs extends Ve{_parse(t){if(this._getType(t)!==be.undefined){const r=this._getOrReturnCtx(t);return me(r,{code:ie.invalid_type,expected:be.undefined,received:r.parsedType}),Me}return cn(t.data)}}Gs.create=e=>new Gs({typeName:De.ZodUndefined,...ze(e)});class Ys extends Ve{_parse(t){if(this._getType(t)!==be.null){const r=this._getOrReturnCtx(t);return me(r,{code:ie.invalid_type,expected:be.null,received:r.parsedType}),Me}return cn(t.data)}}Ys.create=e=>new Ys({typeName:De.ZodNull,...ze(e)});class no extends Ve{constructor(){super(...arguments),this._any=!0}_parse(t){return cn(t.data)}}no.create=e=>new no({typeName:De.ZodAny,...ze(e)});class Yi extends Ve{constructor(){super(...arguments),this._unknown=!0}_parse(t){return cn(t.data)}}Yi.create=e=>new Yi({typeName:De.ZodUnknown,...ze(e)});class qr extends Ve{_parse(t){const n=this._getOrReturnCtx(t);return me(n,{code:ie.invalid_type,expected:be.never,received:n.parsedType}),Me}}qr.create=e=>new qr({typeName:De.ZodNever,...ze(e)});class of extends Ve{_parse(t){if(this._getType(t)!==be.undefined){const r=this._getOrReturnCtx(t);return me(r,{code:ie.invalid_type,expected:be.void,received:r.parsedType}),Me}return cn(t.data)}}of.create=e=>new of({typeName:De.ZodVoid,...ze(e)});class tr extends Ve{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==be.array)return me(n,{code:ie.invalid_type,expected:be.array,received:n.parsedType}),Me;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(o||s)&&(me(n,{code:o?ie.too_big:ie.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?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&&(me(n,{code:ie.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(me(n,{code:ie.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,s)=>i.type._parseAsync(new Er(n,o,n.path,s)))).then(o=>on.mergeArray(r,o));const a=[...n.data].map((o,s)=>i.type._parseSync(new Er(n,o,n.path,s)));return on.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new tr({...this._def,minLength:{value:t,message:Te.toString(n)}})}max(t,n){return new tr({...this._def,maxLength:{value:t,message:Te.toString(n)}})}length(t,n){return new tr({...this._def,exactLength:{value:t,message:Te.toString(n)}})}nonempty(t){return this.min(1,t)}}tr.create=(e,t)=>new tr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:De.ZodArray,...ze(t)});function ro(e){if(e instanceof Et){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Tr.create(ro(r))}return new Et({...e._def,shape:()=>t})}else return e instanceof tr?new tr({...e._def,type:ro(e.element)}):e instanceof Tr?Tr.create(ro(e.unwrap())):e instanceof Ei?Ei.create(ro(e.unwrap())):e instanceof kr?kr.create(e.items.map(t=>ro(t))):e}class Et extends Ve{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=et.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==be.object){const l=this._getOrReturnCtx(t);return me(l,{code:ie.invalid_type,expected:be.object,received:l.parsedType}),Me}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof qr&&this._def.unknownKeys==="strip"))for(const l in i.data)o.includes(l)||s.push(l);const u=[];for(const l of o){const c=a[l],f=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new Er(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof qr){const l=this._def.unknownKeys;if(l==="passthrough")for(const c of s)u.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")s.length>0&&(me(i,{code:ie.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const c of s){const f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new Er(i,f,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const c of u){const f=await c.key,d=await c.value;l.push({key:f,value:d,alwaysSet:c.alwaysSet})}return l}).then(l=>on.mergeObjectSync(r,l)):on.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(t){return Te.errToObj,new Et({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,a,o,s;const u=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=Te.errToObj(t).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new Et({...this._def,unknownKeys:"strip"})}passthrough(){return new Et({...this._def,unknownKeys:"passthrough"})}extend(t){return new Et({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Et({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:De.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Et({...this._def,catchall:t})}pick(t){const n={};return et.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Et({...this._def,shape:()=>n})}omit(t){const n={};return et.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Et({...this._def,shape:()=>n})}deepPartial(){return ro(this)}partial(t){const n={};return et.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new Et({...this._def,shape:()=>n})}required(t){const n={};return et.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof Tr;)a=a._def.innerType;n[r]=a}}),new Et({...this._def,shape:()=>n})}keyof(){return yC(et.objectKeys(this.shape))}}Et.create=(e,t)=>new Et({shape:()=>e,unknownKeys:"strip",catchall:qr.create(),typeName:De.ZodObject,...ze(t)}),Et.strictCreate=(e,t)=>new Et({shape:()=>e,unknownKeys:"strict",catchall:qr.create(),typeName:De.ZodObject,...ze(t)}),Et.lazycreate=(e,t)=>new Et({shape:e,unknownKeys:"strip",catchall:qr.create(),typeName:De.ZodObject,...ze(t)});class Js extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new On(s.ctx.common.issues));return me(n,{code:ie.invalid_union,unionErrors:o}),Me}if(n.common.async)return Promise.all(r.map(async a=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const u of r){const l={...n,common:{...n.common,issues:[]},parent:null},c=u._parseSync({data:n.data,path:n.path,parent:l});if(c.status==="valid")return c;c.status==="dirty"&&!a&&(a={result:c,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(u=>new On(u));return me(n,{code:ie.invalid_union,unionErrors:s}),Me}}get options(){return this._def.options}}Js.create=(e,t)=>new Js({options:e,typeName:De.ZodUnion,...ze(t)});const Vr=e=>e instanceof el?Vr(e.schema):e instanceof nr?Vr(e.innerType()):e instanceof tl?[e.value]:e instanceof _i?e.options:e instanceof nl?et.objectValues(e.enum):e instanceof rl?Vr(e._def.innerType):e instanceof Gs?[void 0]:e instanceof Ys?[null]:e instanceof Tr?[void 0,...Vr(e.unwrap())]:e instanceof Ei?[null,...Vr(e.unwrap())]:e instanceof ay||e instanceof ol?Vr(e.unwrap()):e instanceof il?Vr(e._def.innerType):[];class sf extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==be.object)return me(n,{code:ie.invalid_type,expected:be.object,received:n.parsedType}),Me;const r=this.discriminator,i=n.data[r],a=this.optionsMap.get(i);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(me(n,{code:ie.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Me)}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 a of n){const o=Vr(a.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of o){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,a)}}return new sf({typeName:De.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...ze(r)})}}function iy(e,t){const n=xi(e),r=xi(t);if(e===t)return{valid:!0,data:e};if(n===be.object&&r===be.object){const i=et.objectKeys(t),a=et.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(const s of a){const u=iy(e[s],t[s]);if(!u.valid)return{valid:!1};o[s]=u.data}return{valid:!0,data:o}}else if(n===be.array&&r===be.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const o=e[a],s=t[a],u=iy(o,s);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return n===be.date&&r===be.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Xs extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(ty(a)||ty(o))return Me;const s=iy(a.value,o.value);return s.valid?((ny(a)||ny(o))&&n.dirty(),{status:n.value,value:s.data}):(me(r,{code:ie.invalid_intersection_types}),Me)};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(([a,o])=>i(a,o)):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}))}}Xs.create=(e,t,n)=>new Xs({left:e,right:t,typeName:De.ZodIntersection,...ze(n)});class kr extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==be.array)return me(r,{code:ie.invalid_type,expected:be.array,received:r.parsedType}),Me;if(r.data.length<this._def.items.length)return me(r,{code:ie.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Me;!this._def.rest&&r.data.length>this._def.items.length&&(me(r,{code:ie.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,s)=>{const u=this._def.items[s]||this._def.rest;return u?u._parse(new Er(r,o,r.path,s)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>on.mergeArray(n,o)):on.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new kr({...this._def,rest:t})}}kr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new kr({items:e,typeName:De.ZodTuple,rest:null,...ze(t)})};class Qs extends Ve{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!==be.object)return me(r,{code:ie.invalid_type,expected:be.object,received:r.parsedType}),Me;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in r.data)i.push({key:a._parse(new Er(r,s,r.path,s)),value:o._parse(new Er(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?on.mergeObjectAsync(n,i):on.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Ve?new Qs({keyType:t,valueType:n,typeName:De.ZodRecord,...ze(r)}):new Qs({keyType:er.create(),valueType:t,typeName:De.ZodRecord,...ze(n)})}}class lf extends Ve{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!==be.map)return me(r,{code:ie.invalid_type,expected:be.map,received:r.parsedType}),Me;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([s,u],l)=>({key:i._parse(new Er(r,s,r.path,[l,"key"])),value:a._parse(new Er(r,u,r.path,[l,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const u of o){const l=await u.key,c=await u.value;if(l.status==="aborted"||c.status==="aborted")return Me;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const u of o){const l=u.key,c=u.value;if(l.status==="aborted"||c.status==="aborted")return Me;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}}}}lf.create=(e,t,n)=>new lf({valueType:t,keyType:e,typeName:De.ZodMap,...ze(n)});class Ji extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==be.set)return me(r,{code:ie.invalid_type,expected:be.set,received:r.parsedType}),Me;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(me(r,{code:ie.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(me(r,{code:ie.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function o(u){const l=new Set;for(const c of u){if(c.status==="aborted")return Me;c.status==="dirty"&&n.dirty(),l.add(c.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((u,l)=>a._parse(new Er(r,u,r.path,l)));return r.common.async?Promise.all(s).then(u=>o(u)):o(s)}min(t,n){return new Ji({...this._def,minSize:{value:t,message:Te.toString(n)}})}max(t,n){return new Ji({...this._def,maxSize:{value:t,message:Te.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Ji.create=(e,t)=>new Ji({valueType:e,minSize:null,maxSize:null,typeName:De.ZodSet,...ze(t)});class io extends Ve{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==be.function)return me(n,{code:ie.invalid_type,expected:be.function,received:n.parsedType}),Me;function r(s,u){return nf({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,tf(),eo].filter(l=>!!l),issueData:{code:ie.invalid_arguments,argumentsError:u}})}function i(s,u){return nf({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,tf(),eo].filter(l=>!!l),issueData:{code:ie.invalid_return_type,returnTypeError:u}})}const a={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof ao){const s=this;return cn(async function(...u){const l=new On([]),c=await s._def.args.parseAsync(u,a).catch(p=>{throw l.addIssue(r(u,p)),l}),f=await Reflect.apply(o,this,c);return await s._def.returns._def.type.parseAsync(f,a).catch(p=>{throw l.addIssue(i(f,p)),l})})}else{const s=this;return cn(function(...u){const l=s._def.args.safeParse(u,a);if(!l.success)throw new On([r(u,l.error)]);const c=Reflect.apply(o,this,l.data),f=s._def.returns.safeParse(c,a);if(!f.success)throw new On([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new io({...this._def,args:kr.create(t).rest(Yi.create())})}returns(t){return new io({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new io({args:t||kr.create([]).rest(Yi.create()),returns:n||Yi.create(),typeName:De.ZodFunction,...ze(r)})}}class el extends Ve{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})}}el.create=(e,t)=>new el({getter:e,typeName:De.ZodLazy,...ze(t)});class tl extends Ve{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return me(n,{received:n.data,code:ie.invalid_literal,expected:this._def.value}),Me}return{status:"valid",value:t.data}}get value(){return this._def.value}}tl.create=(e,t)=>new tl({value:e,typeName:De.ZodLiteral,...ze(t)});function yC(e,t){return new _i({values:e,typeName:De.ZodEnum,...ze(t)})}class _i extends Ve{constructor(){super(...arguments),Ws.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return me(n,{expected:et.joinValues(r),received:n.parsedType,code:ie.invalid_type}),Me}if(rf(this,Ws)||dC(this,Ws,new Set(this._def.values)),!rf(this,Ws).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return me(n,{received:n.data,code:ie.invalid_enum_value,options:r}),Me}return cn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return _i.create(t,{...this._def,...n})}exclude(t,n=this._def){return _i.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ws=new WeakMap,_i.create=yC;class nl extends Ve{constructor(){super(...arguments),Zs.set(this,void 0)}_parse(t){const n=et.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==be.string&&r.parsedType!==be.number){const i=et.objectValues(n);return me(r,{expected:et.joinValues(i),received:r.parsedType,code:ie.invalid_type}),Me}if(rf(this,Zs)||dC(this,Zs,new Set(et.getValidEnumValues(this._def.values))),!rf(this,Zs).has(t.data)){const i=et.objectValues(n);return me(r,{received:r.data,code:ie.invalid_enum_value,options:i}),Me}return cn(t.data)}get enum(){return this._def.values}}Zs=new WeakMap,nl.create=(e,t)=>new nl({values:e,typeName:De.ZodNativeEnum,...ze(t)});class ao extends Ve{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==be.promise&&n.common.async===!1)return me(n,{code:ie.invalid_type,expected:be.promise,received:n.parsedType}),Me;const r=n.parsedType===be.promise?n.data:Promise.resolve(n.data);return cn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}ao.create=(e,t)=>new ao({type:e,typeName:De.ZodPromise,...ze(t)});class nr extends Ve{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===De.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{me(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(r.data,a);if(r.common.async)return Promise.resolve(o).then(async s=>{if(n.value==="aborted")return Me;const u=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return u.status==="aborted"?Me:u.status==="dirty"||n.value==="dirty"?to(u.value):u});{if(n.value==="aborted")return Me;const s=this._def.schema._parseSync({data:o,path:r.path,parent:r});return s.status==="aborted"?Me:s.status==="dirty"||n.value==="dirty"?to(s.value):s}}if(i.type==="refinement"){const o=s=>{const u=i.refinement(s,a);if(r.common.async)return Promise.resolve(u);if(u 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"?Me:(s.status==="dirty"&&n.dirty(),o(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"?Me:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Vs(o))return o;const s=i.transform(o.value,a);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(o=>Vs(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:n.value,value:s})):o);et.assertNever(i)}}nr.create=(e,t,n)=>new nr({schema:e,typeName:De.ZodEffects,effect:t,...ze(n)}),nr.createWithPreprocess=(e,t,n)=>new nr({schema:t,effect:{type:"preprocess",transform:e},typeName:De.ZodEffects,...ze(n)});class Tr extends Ve{_parse(t){return this._getType(t)===be.undefined?cn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Tr.create=(e,t)=>new Tr({innerType:e,typeName:De.ZodOptional,...ze(t)});class Ei extends Ve{_parse(t){return this._getType(t)===be.null?cn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ei.create=(e,t)=>new Ei({innerType:e,typeName:De.ZodNullable,...ze(t)});class rl extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===be.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}rl.create=(e,t)=>new rl({innerType:e,typeName:De.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ze(t)});class il extends Ve{_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 Hs(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new On(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new On(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}il.create=(e,t)=>new il({innerType:e,typeName:De.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ze(t)});class uf extends Ve{_parse(t){if(this._getType(t)!==be.nan){const r=this._getOrReturnCtx(t);return me(r,{code:ie.invalid_type,expected:be.nan,received:r.parsedType}),Me}return{status:"valid",value:t.data}}}uf.create=e=>new uf({typeName:De.ZodNaN,...ze(e)});const xae=Symbol("zod_brand");class ay extends Ve{_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 al extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Me:a.status==="dirty"?(n.dirty(),to(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Me: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 al({in:t,out:n,typeName:De.ZodPipeline})}}class ol extends Ve{_parse(t){const n=this._def.innerType._parse(t),r=i=>(Vs(i)&&(i.value=Object.freeze(i.value)),i);return Hs(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}ol.create=(e,t)=>new ol({innerType:e,typeName:De.ZodReadonly,...ze(t)});function gC(e,t={},n){return e?no.create().superRefine((r,i)=>{var a,o;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,u=(o=(a=s.fatal)!==null&&a!==void 0?a:n)!==null&&o!==void 0?o:!0,l=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...l,fatal:u})}}):no.create()}const wae={object:Et.lazycreate};var De;(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"})(De||(De={}));const Sae=(e,t={message:`Input not instance of ${e.name}`})=>gC(n=>n instanceof e,t),bC=er.create,xC=wi.create,_ae=uf.create,Eae=Si.create,wC=Ks.create,kae=Gi.create,Tae=af.create,Oae=Gs.create,Cae=Ys.create,$ae=no.create,Iae=Yi.create,Rae=qr.create,Pae=of.create,Aae=tr.create,Nae=Et.create,Dae=Et.strictCreate,Mae=Js.create,jae=sf.create,Lae=Xs.create,Fae=kr.create,Bae=Qs.create,Uae=lf.create,zae=Ji.create,qae=io.create,Vae=el.create,Hae=tl.create,Wae=_i.create,Zae=nl.create,Kae=ao.create,SC=nr.create,Gae=Tr.create,Yae=Ei.create,Jae=nr.createWithPreprocess,Xae=al.create;var H=Object.freeze({__proto__:null,defaultErrorMap:eo,setErrorMap:rae,getErrorMap:tf,makeIssue:nf,EMPTY_PATH:iae,addIssueToContext:me,ParseStatus:on,INVALID:Me,DIRTY:to,OK:cn,isAborted:ty,isDirty:ny,isValid:Vs,isAsync:Hs,get util(){return et},get objectUtil(){return ey},ZodParsedType:be,getParsedType:xi,ZodType:Ve,datetimeRegex:vC,ZodString:er,ZodNumber:wi,ZodBigInt:Si,ZodBoolean:Ks,ZodDate:Gi,ZodSymbol:af,ZodUndefined:Gs,ZodNull:Ys,ZodAny:no,ZodUnknown:Yi,ZodNever:qr,ZodVoid:of,ZodArray:tr,ZodObject:Et,ZodUnion:Js,ZodDiscriminatedUnion:sf,ZodIntersection:Xs,ZodTuple:kr,ZodRecord:Qs,ZodMap:lf,ZodSet:Ji,ZodFunction:io,ZodLazy:el,ZodLiteral:tl,ZodEnum:_i,ZodNativeEnum:nl,ZodPromise:ao,ZodEffects:nr,ZodTransformer:nr,ZodOptional:Tr,ZodNullable:Ei,ZodDefault:rl,ZodCatch:il,ZodNaN:uf,BRAND:xae,ZodBranded:ay,ZodPipeline:al,ZodReadonly:ol,custom:gC,Schema:Ve,ZodSchema:Ve,late:wae,get ZodFirstPartyTypeKind(){return De},coerce:{string:e=>er.create({...e,coerce:!0}),number:e=>wi.create({...e,coerce:!0}),boolean:e=>Ks.create({...e,coerce:!0}),bigint:e=>Si.create({...e,coerce:!0}),date:e=>Gi.create({...e,coerce:!0})},any:$ae,array:Aae,bigint:Eae,boolean:wC,date:kae,discriminatedUnion:jae,effect:SC,enum:Wae,function:qae,instanceof:Sae,intersection:Lae,lazy:Vae,literal:Hae,map:Uae,nan:_ae,nativeEnum:Zae,never:Rae,null:Cae,nullable:Yae,number:xC,object:Nae,oboolean:()=>wC().optional(),onumber:()=>xC().optional(),optional:Gae,ostring:()=>bC().optional(),pipeline:Xae,preprocess:Jae,promise:Kae,record:Bae,set:zae,strictObject:Dae,string:bC,symbol:Tae,transformer:SC,tuple:Fae,undefined:Oae,union:Mae,unknown:Iae,void:Pae,NEVER:Me,ZodIssueCode:ie,quotelessJson:nae,ZodError:On}),Qae=Object.defineProperty,eoe=(e,t,n)=>t in e?Qae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,toe=(e,t,n)=>(eoe(e,t+"",n),n),noe={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},oy=typeof window<"u"&&typeof window.document<"u"?window.crypto:oO;oy.getRandomValues||(oy=noe);var xt=class extends Error{constructor(t,n,r,i,a,o){super(i);_e(this,"isApiError",!0);this.code=t,this.description=n,this.type=r,this.message=i,this.error=a,this.id=o,this.id||(this.id=xt.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 t=this.getPrefix(),n=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],r=4,i=Array.from(oy.getRandomValues(new Uint8Array(r))).map(a=>a.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"}},roe=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,sy=e=>e instanceof xt||roe(e)&&e.isApiError===!0,sl=class extends xt{constructor(e,t,n){super(500,"An unknown error occurred","Unknown",e,t,n)}},ioe=class extends xt{constructor(e,t,n){super(500,"An internal error occurred","Internal",e,t,n)}},aoe=class extends xt{constructor(e,t,n){super(401,"The request requires to be authenticated.","Unauthorized",e,t,n)}},ooe=class extends xt{constructor(e,t,n){super(403,"The requested action can't be peform by this resource.","Forbidden",e,t,n)}},soe=class extends xt{constructor(e,t,n){super(413,"The request payload is too large.","PayloadTooLarge",e,t,n)}},loe=class extends xt{constructor(e,t,n){super(400,"The request payload is invalid.","InvalidPayload",e,t,n)}},uoe=class extends xt{constructor(e,t,n){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",e,t,n)}},coe=class extends xt{constructor(e,t,n){super(405,"The requested method does not exist.","MethodNotFound",e,t,n)}},foe=class extends xt{constructor(e,t,n){super(404,"The requested resource does not exist.","ResourceNotFound",e,t,n)}},doe=class extends xt{constructor(e,t,n){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",e,t,n)}},poe=class extends xt{constructor(e,t,n){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",e,t,n)}},hoe=class extends xt{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)}},moe=class extends xt{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)}},voe=class extends xt{constructor(e,t,n){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",e,t,n)}},yoe=class extends xt{constructor(e,t,n){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",e,t,n)}},goe=class extends xt{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)}},boe=class extends xt{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)}},xoe=class extends xt{constructor(e,t,n){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",e,t,n)}},woe=class extends xt{constructor(e,t,n){super(409,"The record attempted to be created already exists.","AlreadyExists",e,t,n)}},Soe=class extends xt{constructor(e,t,n){super(429,"The request has been rate limited.","RateLimited",e,t,n)}},_oe=class extends xt{constructor(e,t,n){super(402,"A payment is required to perform this request.","PaymentRequired",e,t,n)}},Eoe=class extends xt{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)}},koe=class extends xt{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)}},Toe=class extends xt{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)}},Ooe={Unknown:sl,Internal:ioe,Unauthorized:aoe,Forbidden:ooe,PayloadTooLarge:soe,InvalidPayload:loe,UnsupportedMediaType:uoe,MethodNotFound:coe,ResourceNotFound:foe,InvalidJsonSchema:doe,InvalidDataFormat:poe,InvalidIdentifier:hoe,RelationConflict:moe,ReferenceConstraint:voe,ResourceLockedConflict:yoe,ReferenceNotFound:goe,InvalidQuery:boe,Runtime:xoe,AlreadyExists:woe,RateLimited:Soe,PaymentRequired:_oe,QuotaExceeded:Eoe,LimitExceeded:koe,BreakingChanges:Toe},_C=e=>sy(e)?e:e instanceof Error?new sl(e.message,e):typeof e=="string"?new sl(e):Coe(e);function Coe(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=Ooe[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new sl(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new sl("An invalid error occurred: "+JSON.stringify(e))}var $oe=e=>e[1]!==void 0,Nt=e=>{const{method:t,path:n,query:r,headers:i,body:a}=e,o=Object.entries(i).filter($oe),s=Object.fromEntries(o),u=Qie.stringify(r,{encode:!0,arrayFormat:"repeat",allowDots:!0}),l=u?[n,u].join("?"):n;return{method:t,url:l,headers:s,data:a}},Ioe=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Roe=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{_:e._}}),Poe=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Aoe=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{},body:{}}),Noe=e=>({path:`/conversations/${encodeURIComponent(e.id)}/listen`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Doe=e=>({path:`/conversations/${encodeURIComponent(e.id)}/messages`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),Moe=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{userId:e.userId}}),joe=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:{}}),Loe=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:{}}),Foe=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),Boe=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Uoe=e=>({path:"/messages",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId,metadata:e.metadata}}),zoe=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),qoe=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),Voe=e=>({path:"/users",headers:{},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),Hoe=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),Woe=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),Zoe=e=>({path:`/events/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Koe=e=>({path:"/events",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId,bindConversation:e.bindConversation,bindUser:e.bindUser}}),Goe=e=>({path:"/files",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{key:e.key,size:e.size,accessPolicies:e.accessPolicies,index:e.index,contentType:e.contentType,tags:e.tags}}),Yoe=class{constructor(e,t={}){_e(this,"getConversation",async e=>{const{path:t,headers:n,query:r,body:i}=Ioe(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"createConversation",async e=>{const{path:t,headers:n,query:r,body:i}=Roe(e),o=(this.props.toAxiosRequest??Nt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"deleteConversation",async e=>{const{path:t,headers:n,query:r,body:i}=Poe(e),o=(this.props.toAxiosRequest??Nt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"listConversations",async e=>{const{path:t,headers:n,query:r,body:i}=Aoe(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"listenConversation",async e=>{const{path:t,headers:n,query:r,body:i}=Noe(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"listConversationMessages",async e=>{const{path:t,headers:n,query:r,body:i}=Doe(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"addParticipant",async e=>{const{path:t,headers:n,query:r,body:i}=Moe(e),o=(this.props.toAxiosRequest??Nt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"removeParticipant",async e=>{const{path:t,headers:n,query:r,body:i}=joe(e),o=(this.props.toAxiosRequest??Nt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"getParticipant",async e=>{const{path:t,headers:n,query:r,body:i}=Loe(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"listParticipants",async e=>{const{path:t,headers:n,query:r,body:i}=Foe(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"getMessage",async e=>{const{path:t,headers:n,query:r,body:i}=Boe(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"createMessage",async e=>{const{path:t,headers:n,query:r,body:i}=Uoe(e),o=(this.props.toAxiosRequest??Nt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"deleteMessage",async e=>{const{path:t,headers:n,query:r,body:i}=zoe(e),o=(this.props.toAxiosRequest??Nt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"getUser",async e=>{const{path:t,headers:n,query:r,body:i}=qoe(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"createUser",async e=>{const{path:t,headers:n,query:r,body:i}=Voe(e),o=(this.props.toAxiosRequest??Nt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"updateUser",async e=>{const{path:t,headers:n,query:r,body:i}=Hoe(e),o=(this.props.toAxiosRequest??Nt)({method:"put",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"deleteUser",async e=>{const{path:t,headers:n,query:r,body:i}=Woe(e),o=(this.props.toAxiosRequest??Nt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"getEvent",async e=>{const{path:t,headers:n,query:r,body:i}=Zoe(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"createEvent",async e=>{const{path:t,headers:n,query:r,body:i}=Koe(e),o=(this.props.toAxiosRequest??Nt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"createFile",async e=>{const{path:t,headers:n,query:r,body:i}=Goe(e),o=(this.props.toAxiosRequest??Nt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});this.axiosInstance=e,this.props=t}};function Dt(e){var t;return At.isAxiosError(e)&&((t=e.response)!=null&&t.data)?_C(e.response.data):_C(e)}var EC=class{constructor(){_e(this,"listeners",{})}emit(e,t){const n=this.listeners[e];if(n)for(const r of[...n])r(t)}onceOrMore(e,t){const n=r=>{t(r)==="stop-listening"&&this.off(e,n)};this.on(e,n)}once(e,t){const n=r=>{this.off(e,n),t(r)};this.on(e,n)}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}off(e,t){const n=this.listeners[e];if(!n)return;const r=n.indexOf(t);r!==-1&&n.splice(r,1)}cleanup(){this.listeners={}}},Joe=(e,t)=>{const n=new tae.EventSourcePolyfill(e,{headers:t.headers,heartbeatTimeout:t.timeout}),r=new EC;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}},Xoe=async(e,t={})=>{const{emitter:n,source:r}=Joe(e,t);return await new Promise((i,a)=>{n.on("open",()=>{i()}),n.on("error",o=>{a(o)})}).finally(()=>n.cleanup()),{on:n.on.bind(n),close:()=>{n.cleanup(),r.close()}}},Qoe=H.object({type:H.literal("message_created"),data:H.object({id:H.string().describe("Id of the [Message](#schema_message)"),createdAt:H.string().datetime().describe("Creation date of the [Message](#schema_message) in ISO 8601 format"),payload:H.union([H.object({audioUrl:H.string().min(1),type:H.literal("audio")}),H.object({title:H.string().min(1),subtitle:H.string().min(1).optional(),imageUrl:H.string().min(1).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")}),H.object({items:H.array(H.object({title:H.string().min(1),subtitle:H.string().min(1).optional(),imageUrl:H.string().min(1).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("carousel")}),H.object({text:H.string().min(1),options:H.array(H.object({label:H.string().min(1),value:H.string().min(1)})),type:H.literal("choice"),disableFreeText:H.boolean().optional()}),H.object({text:H.string().min(1),options:H.array(H.object({label:H.string().min(1),value:H.string().min(1)})),type:H.literal("dropdown")}),H.object({fileUrl:H.string().min(1),title:H.string().min(1).optional(),type:H.literal("file")}),H.object({imageUrl:H.string().min(1),type:H.literal("image")}),H.object({latitude:H.number(),longitude:H.number(),address:H.string().optional(),title:H.string().optional(),type:H.literal("location")}),H.object({text:H.string().min(1),type:H.literal("text"),value:H.string().optional()}),H.object({videoUrl:H.string().min(1),type:H.literal("video")}),H.object({items:H.array(H.union([H.object({type:H.literal("text"),payload:H.object({text:H.string().min(1)})}),H.object({type:H.literal("markdown"),payload:H.object({markdown:H.string().min(1)})}),H.object({type:H.literal("image"),payload:H.object({imageUrl:H.string().min(1)})}),H.object({type:H.literal("audio"),payload:H.object({audioUrl:H.string().min(1)})}),H.object({type:H.literal("video"),payload:H.object({videoUrl:H.string().min(1)})}),H.object({type:H.literal("file"),payload:H.object({fileUrl:H.string().min(1),title:H.string().min(1).optional()})}),H.object({type:H.literal("location"),payload:H.object({latitude:H.number(),longitude:H.number(),address:H.string().optional(),title:H.string().optional()})})])),type:H.literal("bloc")}),H.object({markdown:H.string().min(1),type:H.literal("markdown")}),H.object({type:H.literal("custom"),url:H.string(),name:H.string(),data:H.union([H.any(),H.null()]).optional()})]).describe("Payload is the content type of the message."),userId:H.string().describe("ID of the [User](#schema_user)"),conversationId:H.string().describe("ID of the [Conversation](#schema_conversation)"),metadata:H.record(H.union([H.any(),H.null()])).describe("Metadata of the message").optional()}).describe("The Message object represents a message in a [Conversation](#schema_conversation) for a specific [User](#schema_user).")}),ese=H.object({type:H.literal("webchat_visibility"),data:H.object({visibility:H.union([H.literal("show"),H.literal("hide"),H.literal("toggle")])})}),tse=H.object({type:H.literal("webchat_config"),data:H.object({config:H.record(H.union([H.any(),H.null()]))})}),nse=H.object({type:H.literal("custom"),data:H.object({event:H.record(H.union([H.any(),H.null()]))})}),rse=H.object({type:H.literal("typing_started"),data:H.object({timeout:H.number().optional()})}),ise=H.object({type:H.literal("typing_stopped"),data:H.record(H.never())}),ase={messageCreated:Qoe,webchatVisibility:ese,webchatConfig:tse,custom:nse,typingStarted:rse,typingStopped:ise},kC="unknown error",TC=class extends EC{constructor(t){super();_e(this,"_state",{status:"disconnected"});_e(this,"connect",async()=>{if(this._state.status==="connected")return;if(this._state.status==="connecting"){await this._state.connectionPromise;return}const t=this._connect();this._state={status:"connecting",connectionPromise:t},await t});_e(this,"disconnect",async()=>{if(this._state.status==="disconnected")return;let t;this._state.status==="connecting"?t=await this._state.connectionPromise:t=this._state.source,this._disconnectSync(t)});_e(this,"_connect",async()=>{const t=await Xoe(`${this._props.url}/conversations/${this._props.conversationId}/listen`,{headers:{"x-user-key":this._props.userKey},timeout:this._props.timeout});return t.on("message",this._handleMessage),t.on("error",this._handleError(t)),this._state={status:"connected",source:t},t});_e(this,"_disconnectSync",t=>{t.close(),this._state={status:"disconnected"}});_e(this,"_handleMessage",t=>{const n=this._parseSignal(t.data);this.emit(n.type,n.data)});_e(this,"_handleError",t=>n=>{this._disconnectSync(t);const r=this._toError(n);this.emit("error",r)});_e(this,"_parseSignal",t=>{for(const n of Object.values(ase)){const r=this._safeJsonParse(t),i=n.safeParse(r);if(i.success)return i.data}return{type:"unknown",data:t}});_e(this,"_safeJsonParse",t=>{try{return JSON.parse(t)}catch{return t}});_e(this,"_toError",t=>{if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t===null)return new Error(kC);if(typeof t=="object"&&"message"in t)return this._toError(t.message);try{const n=JSON.stringify(t);return new Error(n)}catch{return new Error(kC)}});this._props=t}get status(){return this._state.status}},OC=TC;toe(OC,"listen",async e=>{const t=new TC(e);return await t.connect(),t});var CC=100*1024*1024,ose=CC,sse=CC,lse=6e4,$C=class{constructor(e){_e(this,"_auto");_e(this,"createConversation",e=>this._auto.createConversation(e));_e(this,"getConversation",e=>this._auto.getConversation(e));_e(this,"deleteConversation",e=>this._auto.deleteConversation(e));_e(this,"listConversations",e=>this._auto.listConversations(e));_e(this,"listConversationMessages",e=>this._auto.listConversationMessages(e));_e(this,"addParticipant",e=>this._auto.addParticipant(e));_e(this,"removeParticipant",e=>this._auto.removeParticipant(e));_e(this,"getParticipant",e=>this._auto.getParticipant(e));_e(this,"listParticipants",e=>this._auto.listParticipants(e));_e(this,"createMessage",e=>this._auto.createMessage(e));_e(this,"getMessage",e=>this._auto.getMessage(e));_e(this,"deleteMessage",e=>this._auto.deleteMessage(e));_e(this,"createFile",e=>this._auto.createFile(e));_e(this,"createUser",e=>this._auto.createUser(e));_e(this,"getUser",e=>this._auto.getUser(e));_e(this,"updateUser",e=>this._auto.updateUser(e));_e(this,"deleteUser",e=>this._auto.deleteUser(e));_e(this,"createEvent",e=>this._auto.createEvent(e));_e(this,"getEvent",e=>this._auto.getEvent(e));_e(this,"listenConversation",async({id:e,"x-user-key":t})=>await OC.listen({url:this.props.apiUrl,conversationId:e,userKey:t,timeout:this.props.sseTimeout}));this.props=e;const{apiUrl:t}=e,n={...e.headers},r=this.props.timeout??lse,i=At.create({baseURL:t,headers:n,withCredentials:!0,timeout:r,maxBodyLength:ose,maxContentLength:sse});this._auto=new Yoe(i)}};const use=6e4;function IC({apiUrl:e,clientId:t,sseTimeout:n=use}){const r=new $C({apiUrl:`${e}/${t}`,sseTimeout:n});return{sendMessage:async i=>{const{message:a}=await r.createMessage(i);return oo(a)},getMessage:async i=>{const{message:a}=await r.getMessage(i);return oo(a)},listConversationMessages:async i=>{const{messages:a,meta:o}=await r.listConversationMessages(i);return{messages:a.map(oo),meta:o}},createMessage:async i=>{const{message:a}=await r.createMessage(i);return oo(a)},addParticipant:r.addParticipant.bind(r),createConversation:r.createConversation.bind(r),createEvent:r.createEvent.bind(r),createFile:r.createFile.bind(r),createUser:r.createUser.bind(r),deleteConversation:r.deleteConversation.bind(r),deleteMessage:r.deleteMessage.bind(r),deleteUser:r.deleteUser.bind(r),getConversation:r.getConversation.bind(r),getEvent:r.getEvent.bind(r),getParticipant:r.getParticipant.bind(r),getUser:r.getUser.bind(r),listConversations:r.listConversations.bind(r),removeParticipant:r.removeParticipant.bind(r),updateUser:r.updateUser.bind(r),listenConversation:r.listenConversation.bind(r)}}function oo(e){const{metadata:t,conversationId:n,userId:r}=e,{payload:i,disableInput:a}=mf(e.payload);return{id:e.id,conversationId:n,authorId:r,timestamp:new Date(e.createdAt),block:i,disableInput:a,metadata:t}}const cf={disconnected:0,user_creating:1,user_created:2,conversation_creating:3,conversation_created:4},gn=(e,t)=>e.status===t,Or=(e,t)=>cf[e.status]<cf[t],RC=(e,t)=>cf[e.status]>=cf[t];class Cr extends Error{constructor(t){super(`Unexpected state: ${t.status}`),this.state=t}}const PC=["audio","file","image","video"],ly=e=>PC.includes(e),cse=6e4;class fse extends Ef{constructor(n){super();_e(this,"_client");_e(this,"_webhookId");_e(this,"_apiUrl");_e(this,"_state",{status:"disconnected"});_e(this,"mode","pushpin");_e(this,"_initialConnect",async({data:n,name:r,pictureUrl:i})=>{if(RC(this._state,"user_created"))throw new Error("Client is already connected. Please disconnect first.");if(gn(this._state,"user_creating"))return;this._state={status:"user_creating"};const{user:{id:a},key:o}=await this._client.createUser({name:r,pictureUrl:i,userData:n});return this._state={status:"user_created",userId:a,userKey:o},{userId:a,userToken:o}});_e(this,"_reConnect",async(n,{data:r,name:i,pictureUrl:a})=>{if(RC(this._state,"user_created")){if(this._state.userId!==n.userId)throw new Error("Client is already connected. Please disconnect first.");return n}return gn(this._state,"user_creating")||(this._state={status:"user_created",userId:n.userId,userKey:n.userToken},await this._client.updateUser({"x-user-key":n.userToken,name:i,pictureUrl:a,userData:r})),n});_e(this,"_mapMessage",n=>{const{metadata:r}=n,{payload:i,disableInput:a}=mf(n.payload);return{id:n.id,conversationId:n.conversationId,authorId:n.userId,sentOn:new Date(n.createdAt),payload:i,disableInput:a,metadata:r}});const r=`${n.apiUrl}/${n.clientId}`;this._webhookId=n.clientId,this._apiUrl=r,this._client=new $C({apiUrl:r,sseTimeout:cse})}get apiUrl(){return this._apiUrl}get clientId(){return this._webhookId}get userId(){if(!Or(this._state,"user_created"))return this._state.userId}async getUser(){if(Or(this._state,"user_created"))throw new Cr(this._state);const{user:n}=await this._client.getUser({"x-user-key":this._state.userKey});return{data:n.data}}async updateUser(n){if(Or(this._state,"user_created"))throw new Cr(this._state);const{user:r}=await this._client.updateUser({"x-user-key":this._state.userKey,name:n.name,pictureUrl:n.pictureUrl,userData:n.data});return r}get conversationId(){if(!Or(this._state,"conversation_created"))return this._state.conversationId}async connect(n,r,i={}){const a={data:r,...i};return n?await this.userExists(n)?this._reConnect(n,a):this._initialConnect(a):this._initialConnect(a)}async disconnect(){gn(this._state,"conversation_created")?this._state.signalEmitter.cleanup():gn(this._state,"conversation_creating")&&console.warn("zombie conversation..."),this._state={status:"disconnected"}}async sendFile(n){if(Or(this._state,"user_created"))throw new Cr(this._state);if(gn(this._state,"conversation_creating"))throw new Cr(this._state);let r;gn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state));const{size:i,name:a}=n,s=await(h=>new Promise((m,y)=>{const v=new FileReader;v.onload=g=>{var b;return m((b=g.target)==null?void 0:b.result)},v.onerror=g=>{var b;return y((b=g.target)==null?void 0:b.error)},v.readAsArrayBuffer(h)}))(n),{file:{uploadUrl:u,contentType:l,url:c}}=await this._client.createFile({"x-user-key":r.userKey,size:i,key:a,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"}});await fetch(u,{method:"PUT",headers:{"x-amz-tagging":"public=true"},body:s});const f=l.split("/").shift()??"",d=ly(f)?f:"file",p=d==="image"?{type:d,imageUrl:c}:d==="audio"?{type:d,audioUrl:c}:d==="video"?{type:d,videoUrl:c}:{type:d,fileUrl:c};return await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:p}),this.emit("messageSent",p),{fileUrl:c,name:a,type:d}}async sendMessage(n){if(Or(this._state,"user_created"))throw new Cr(this._state);if(gn(this._state,"conversation_creating"))throw new Cr(this._state);let r;gn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:n}),this.emit("messageSent",n)}async sendEvent(n){if(Or(this._state,"user_created"))throw new Cr(this._state);if(gn(this._state,"conversation_creating"))throw new Cr(this._state);let r;gn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createEvent({"x-user-key":r.userKey,conversationId:r.conversationId,payload:{type:"custom",data:n}})}async switchConversation(n){if(Or(this._state,"user_created"))throw new Cr(this._state);gn(this._state,"conversation_created")&&this._state.conversationId===n||gn(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(Or(this._state,"user_created"))return!1;try{return await this._client.getConversation({"x-user-key":this._state.userKey,id:n}),!0}catch(r){if(sy(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=a=>a.code===404||a.code===401;if(sy(r)&&i(r))return!1;throw r}}async newConversation(){if(Or(this._state,"user_created"))throw new Cr(this._state);gn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._createNewConversation(this._state))}async _createNewConversation(n){const{conversation:{id:r}}=await this._client.createConversation({"x-user-key":n.userKey}),i=await this._connectConversation(n,r);return await this._client.createEvent({"x-user-key":n.userKey,conversationId:r,payload:{type:"conversation_started",data:{}}}),i}async listMessages(){if(!gn(this._state,"conversation_created"))return[];const{conversationId:n,userKey:r}=this._state,i=[];let a;do{const o=await this._client.listConversationMessages({id:n,"x-user-key":r,nextToken:a});i.push(...o.messages),a=o.meta.nextToken}while(a);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",a=>{typeof a=="string"&&a==="ping"||console.debug("unknown event",a)}),i.on("message_created",a=>{a.userId,n.userId}),i.on("error",a=>{this._state={status:"user_created",userId:n.userId,userKey:n.userKey},this.emit("error",new Error(`Connection to conversation lost: ${a.message}`))}),i.on("webchat_visibility",a=>{this.emit("webchatVisibility",a.visibility)}),i.on("webchat_config",a=>{this.emit("webchatConfig",a.config)}),i.on("typing_started",a=>{this.emit("isTyping",{isTyping:!0,timeout:a.timeout??5e3})}),i.on("typing_stopped",()=>{this.emit("isTyping",{isTyping:!1,timeout:0})}),i.on("custom",a=>{this.emit("customEvent",a.event)}),this.emit("conversation",r),this._state={status:"conversation_created",userId:n.userId,userKey:n.userKey,conversationId:r,signalEmitter:i},this._state}}const dse=({clientId:e,apiUrl:t="https://webchat.botpress.cloud"})=>new fse({apiUrl:t,clientId:e}),pse=({clientId:e,apiUrl:t="https://webchat.botpress.cloud"})=>{const[n]=M.useState(dse({clientId:e,apiUrl:t}));return n};function hse(){const[e,t]=M.useState(!1),n=M.useRef(null);return{isTyping:e,setIsTyping:(r,i)=>{if(t(r),!r)return()=>{};if(n.current=new Date,!i)return()=>{};const a=setTimeout(()=>{const o=n.current;o&&new Date().getTime()-o.getTime()>i&&t(!1)},i+100);return()=>clearTimeout(a)}}}var AC={},uy={},ff=ht&&ht.__assign||function(){return ff=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},ff.apply(this,arguments)};Object.defineProperty(uy,"__esModule",{value:!0});var mse={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function vse(e){var t=ff(ff({},mse),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}uy.getSanitizedOptions=vse;var cy={},fy={},df={},dy={},py={};Object.defineProperty(py,"__esModule",{value:!0});function yse(e){var t=Math.random()*e;return Math.round(t)}py.fullJitter=yse;var hy={};Object.defineProperty(hy,"__esModule",{value:!0});function gse(e){return e}hy.noJitter=gse,Object.defineProperty(dy,"__esModule",{value:!0});var bse=py,xse=hy;function wse(e){switch(e.jitter){case"full":return bse.fullJitter;case"none":default:return xse.noJitter}}dy.JitterFactory=wse,Object.defineProperty(df,"__esModule",{value:!0});var Sse=dy,_se=function(){function e(t){this.options=t,this.attempt=0}return e.prototype.apply=function(){var t=this;return new Promise(function(n){return setTimeout(n,t.jitteredDelay)})},e.prototype.setAttemptNumber=function(t){this.attempt=t},Object.defineProperty(e.prototype,"jitteredDelay",{get:function(){var t=Sse.JitterFactory(this.options);return t(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delay",{get:function(){var t=this.options.startingDelay,n=this.options.timeMultiple,r=this.numOfDelayedAttempts,i=t*Math.pow(n,r);return Math.min(i,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),e}();df.Delay=_se;var Ese=ht&&ht.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),kse=ht&&ht.__awaiter||function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(c){try{l(r.next(c))}catch(f){o(f)}}function u(c){try{l(r.throw(c))}catch(f){o(f)}}function l(c){c.done?a(c.value):i(c.value).then(s,u)}l((r=r.apply(e,t||[])).next())})},Tse=ht&&ht.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(c){l=[6,c],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(fy,"__esModule",{value:!0});var Ose=df,Cse=function(e){Ese(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return kse(this,void 0,void 0,function(){return Tse(this,function(n){return[2,this.isFirstAttempt?!0:e.prototype.apply.call(this)]})})},Object.defineProperty(t.prototype,"isFirstAttempt",{get:function(){return this.attempt===0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),t}(Ose.Delay);fy.SkipFirstDelay=Cse;var my={},$se=ht&&ht.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(my,"__esModule",{value:!0});var Ise=df,Rse=function(e){$se(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Ise.Delay);my.AlwaysDelay=Rse,Object.defineProperty(cy,"__esModule",{value:!0});var Pse=fy,Ase=my;function Nse(e,t){var n=Dse(e);return n.setAttemptNumber(t),n}cy.DelayFactory=Nse;function Dse(e){return e.delayFirstAttempt?new Ase.AlwaysDelay(e):new Pse.SkipFirstDelay(e)}var vy=ht&&ht.__awaiter||function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(c){try{l(r.next(c))}catch(f){o(f)}}function u(c){try{l(r.throw(c))}catch(f){o(f)}}function l(c){c.done?a(c.value):i(c.value).then(s,u)}l((r=r.apply(e,t||[])).next())})},yy=ht&&ht.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(c){l=[6,c],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(AC,"__esModule",{value:!0});var Mse=uy,jse=cy;function Lse(e,t){return t===void 0&&(t={}),vy(this,void 0,void 0,function(){var n,r;return yy(this,function(i){switch(i.label){case 0:return n=Mse.getSanitizedOptions(t),r=new Bse(e,n),[4,r.execute()];case 1:return[2,i.sent()]}})})}var Fse=AC.backOff=Lse,Bse=function(){function e(t,n){this.request=t,this.options=n,this.attemptNumber=0}return e.prototype.execute=function(){return vy(this,void 0,void 0,function(){var t,n;return yy(this,function(r){switch(r.label){case 0:if(this.attemptLimitReached)return[3,7];r.label=1;case 1:return r.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return r.sent(),[4,this.request()];case 3:return[2,r.sent()];case 4:return t=r.sent(),this.attemptNumber++,[4,this.options.retry(t,this.attemptNumber)];case 5:if(n=r.sent(),!n||this.attemptLimitReached)throw t;return[3,6];case 6:return[3,0];case 7:throw new Error("Something went wrong.")}})})},Object.defineProperty(e.prototype,"attemptLimitReached",{get:function(){return this.attemptNumber>=this.options.numOfAttempts},enumerable:!0,configurable:!0}),e.prototype.applyDelay=function(){return vy(this,void 0,void 0,function(){var t;return yy(this,function(n){switch(n.label){case 0:return t=jse.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return n.sent(),[2]}})})},e}();function NC({apiUrl:e="https://webchat.botpress.cloud",clientId:t,storageKey:n,storageLocation:r,...i}){const[a,o]=M.useState(),s=Bo(T=>T.messages),u=Bo(T=>T.addMessage),l=Bo(T=>T.fetchMessages),c=Bo(T=>T.setMessages),f=Bo(T=>T.isFetching),[d,p]=M.useState("connecting"),{isTyping:h,setIsTyping:m}=hse(),y=M.useMemo(()=>new Ef,[]),v=Lx(n,r),g=M.useMemo(()=>IC({apiUrl:e,clientId:t}),[e,t]),b=M.useRef(null),[k,S]=M.useState(i.userKey),[E,O]=M.useState(i.conversationId);async function j(T){const{conversation:I}=await g.createConversation({"x-user-key":T});return v.setState({conversationId:I.id}),await g.createEvent({"x-user-key":T,conversationId:I.id,payload:{type:"conversation_started",data:{}}}),I.id}if(M.useEffect(()=>{let T=!0;async function I({userKey:U,conversationId:R}){let F,N=i.userKey??U,L=i.conversationId??R;if(p("connecting"),!N){const A=v.getState().user;N=A==null?void 0:A.userToken}if(!N){const{key:A,user:x}=await g.createUser({});F=x,N=A,v.setState({user:{userId:x.id,userToken:N}})}if(!F){const{user:A}=await g.getUser({"x-user-key":N});F=A}L||(L=v.getState().conversationId),L||(L=await j(N));const[W,z]=[await g.listenConversation({"x-user-key":N,id:L}),await l({client:g,conversationId:L,userKey:N})];y.emit("conversation",L),DC({emitter:y,signalEmitter:W}),T&&(b.current=W,S(N),O(L),o(F),c(z),p("connected"))}return I({userKey:k,conversationId:E}).catch(U=>{console.error(U)}),()=>{b.current&&(b.current.cleanup(),b.current=null),T=!1}},[k,E,g,y,i.conversationId,i.userKey]),M.useEffect(()=>{var I;if(!k||!E)return;async function T({userKey:U,conversationId:R}){const F=await g.listenConversation({"x-user-key":U,id:R});b.current=F,DC({emitter:y,signalEmitter:F})}d==="error"&&((I=b.current)==null||I.cleanup(),Fse(()=>T({conversationId:E,userKey:k}),{startingDelay:2e3,maxDelay:1e4,numOfAttempts:1/0}),p("connected"))},[d,k,E]),M.useEffect(()=>{const T=[y.on("message",I=>((a==null?void 0:a.id)!==I.authorId&&y.emit("isTyping",{isTyping:!1,timeout:0}),u(I))),y.on("isTyping",({isTyping:I,timeout:U})=>{m(I,U)}),y.on("error",()=>{p("error")})];return()=>{T.forEach(I=>I())}},[]),d==="connecting"||!k||!E)return{clientState:"connecting",on:y.on.bind(y),client:void 0,messages:[],conversationId:void 0,newConversation:()=>{},user:void 0,isTyping:void 0,isFetchingMessages:f};const q={sendMessage:async T=>{const I=$T();u(oo({id:I,createdAt:new Date().toISOString(),userId:(a==null?void 0:a.id)??"",conversationId:E,payload:T,metadata:{clientMessageId:I,delivered:!1}})),await g.createMessage({"x-user-key":k,conversationId:E,payload:T,metadata:{clientMessageId:I}}).catch(U=>y.emit("error",U))},updateUser:async T=>{const{user:I}=await g.updateUser({"x-user-key":k,name:T.name,pictureUrl:T.pictureUrl,userData:T.data});return I},sendEvent:async T=>{await g.createEvent({"x-user-key":k,conversationId:E,payload:{type:"custom",data:T}})},uploadFile:async T=>{const{size:I,name:U}=T,F=await(x=>new Promise((V,K)=>{const _=new FileReader;_.onload=J=>{var ne;return V((ne=J.target)==null?void 0:ne.result)},_.onerror=J=>{var ne;return K((ne=J.target)==null?void 0:ne.error)},_.readAsArrayBuffer(x)}))(T),{file:{uploadUrl:N,contentType:L,url:W}}=await g.createFile({"x-user-key":k,size:I,key:U,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"}});await fetch(N,{method:"PUT",headers:{"x-amz-tagging":"public=true"},body:F});const z=L.split("/").shift()??"",A=ly(z)?z:"file";return{fileUrl:W,name:U,type:A}},getUser:async()=>{const{user:T}=await g.getUser({"x-user-key":k});return T}};return{clientState:d,on:y.on.bind(y),client:q,messages:s,conversationId:E,newConversation:()=>{c([]),j(k).then(O)},user:a,isTyping:h,isFetchingMessages:f}}function DC({emitter:e,signalEmitter:t}){t.on("unknown",n=>{}),t.on("message_created",n=>{e.emit("message",oo(n))}),t.on("error",n=>{e.emit("error",new Error(`Connection to conversation lost: ${n.message}`))}),t.on("webchat_visibility",n=>{e.emit("webchatVisibility",n.visibility)}),t.on("webchat_config",n=>{e.emit("webchatConfig",n.config)}),t.on("typing_started",n=>{e.emit("isTyping",{isTyping:!0,timeout:n.timeout??5e3})}),t.on("typing_stopped",()=>{e.emit("isTyping",{isTyping:!1,timeout:0})}),t.on("custom",n=>{e.emit("customEvent",n.event)})}const Use=({clientId:e,storageKey:t,configuration:n,allowFileUpload:r,apiUrl:i,userKey:a,conversationId:o,...s})=>{const u=t||`bp-webchat-${e}`,{clientState:l,client:c,isFetchingMessages:f,isTyping:d,newConversation:p,messages:h,user:m}=NC({clientId:e,apiUrl:i,conversationId:o,userKey:a,storageKey:u,storageLocation:n==null?void 0:n.storageLocation}),{sendMessage:y,uploadFile:v}=c??{};return $.jsx(IT,{configuration:n??{},user:m??{id:""},isLoading:f||l==="connecting",isTyping:d,connected:l==="connected"?!0:l==="disconnected"?!1:void 0,messages:h,sendMessage:y,uploadFile:v,allowFileUpload:r,restartConversation:p,...s})};Ie.Avatar=El,Ie.Block=ba,Ie.Chat=IT,Ie.Composer=u0,Ie.Container=xp,Ie.Fab=r1,Ie.Header=u1,Ie.Message=kp,Ie.MessageList=rv,Ie.Modal=ui,Ie.ModalProvider=c0,Ie.RestartConversationButton=l1,Ie.StylesheetProvider=f0,Ie.TypingIndicator=c1,Ie.Webchat=Use,Ie.WebchatThemeSchema=Rf,Ie.__adapters=YC,Ie.avatarThemeSchema=_l,Ie.blockThemeSchema=gg,Ie.configPropsSchema=Sg,Ie.configurationSchema=mg,Ie.cssStyleSchema=yg,Ie.descriptionItemSchema=ia,Ie.fileTypes=PC,Ie.generateThemeStylesheet=_g,Ie.getClient=IC,Ie.getUseUserStore=Lx,Ie.initPropsSchema=DI,Ie.isFileType=ly,Ie.markdownTypeSchema=vg,Ie.renderers=n0,Ie.statePropsSchema=xg,Ie.styleOptionSchema=fe,Ie.themeSchema=bg,Ie.useClient=pse,Ie.useWebchatClient=NC,Ie.useWebchatStore=Hl,Ie.userPropsSchema=wg,Ie.webchatClasses=yt,Object.defineProperty(Ie,Symbol.toStringTag,{value:"Module"})});
|