@botpress/webchat 4.2.0 → 4.2.1
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/.storybook/main.ts +5 -3
- package/.turbo/turbo-build.log +5 -5
- package/dist/index.d.ts +41 -52
- package/dist/index.js +5930 -6746
- package/dist/index.umd.cjs +101 -101
- package/package.json +1 -3
package/dist/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(re,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],S):(re=typeof globalThis<"u"?globalThis:re||self,S(re.Webchat={},re.ReactJsxRuntime,re.React,re.ReactDOM))})(this,function(re,S,
|
|
1
|
+
(function(re,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],S):(re=typeof globalThis<"u"?globalThis:re||self,S(re.Webchat={},re.ReactJsxRuntime,re.React,re.ReactDOM))})(this,function(re,S,_,Ps){"use strict";var FT=Object.defineProperty;var RT=(re,S,_)=>S in re?FT(re,S,{enumerable:!0,configurable:!0,writable:!0,value:_}):re[S]=_;var zi=(re,S,_)=>RT(re,typeof S!="symbol"?S+"":S,_);var Rh,Bh,zh;var $i=typeof document<"u"?document.currentScript:null;function Ns(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 E=Ns(_),Ls=Ns(Ps);function Vh(e,t=[]){let n=[];function r(o,a){const s=E.createContext(a);s.displayName=o+"Context";const l=n.length;n=[...n,a];const u=c=>{var y;const{scope:p,children:d,...m}=c,h=((y=p==null?void 0:p[e])==null?void 0:y[l])||s,g=E.useMemo(()=>m,Object.values(m));return S.jsx(h.Provider,{value:g,children:d})};u.displayName=o+"Provider";function f(c,p){var h;const d=((h=p==null?void 0:p[e])==null?void 0:h[l])||s,m=E.useContext(d);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${c}\` must be used within \`${o}\``)}return[u,f]}const i=()=>{const o=n.map(a=>E.createContext(a));return function(s){const l=(s==null?void 0:s[e])||o;return E.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,qh(i,...t)]}function qh(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const c=l(o)[`__scope${u}`];return{...s,...c}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Zt(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var Tt=globalThis!=null&&globalThis.document?E.useLayoutEffect:()=>{};function Fs(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ji(...e){return t=>{let n=!1;const r=e.map(i=>{const o=Fs(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():Fs(e[i],null)}}}}function Ot(...e){return E.useCallback(ji(...e),e)}var Kh=Symbol.for("react.lazy"),wr=E[" use ".trim().toString()];function Yh(e){return typeof e=="object"&&e!==null&&"then"in e}function Rs(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Kh&&"_payload"in e&&Yh(e._payload)}function Gh(e){const t=Qh(e),n=E.forwardRef((r,i)=>{let{children:o,...a}=r;Rs(o)&&typeof wr=="function"&&(o=wr(o._payload));const s=E.Children.toArray(o),l=s.find(Zh);if(l){const u=l.props.children,f=s.map(c=>c===l?E.Children.count(u)>1?E.Children.only(null):E.isValidElement(u)?u.props.children:null:c);return S.jsx(t,{...a,ref:i,children:E.isValidElement(u)?E.cloneElement(u,void 0,f):null})}return S.jsx(t,{...a,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function Qh(e){const t=E.forwardRef((n,r)=>{let{children:i,...o}=n;if(Rs(i)&&typeof wr=="function"&&(i=wr(i._payload)),E.isValidElement(i)){const a=em(i),s=Xh(o,i.props);return i.type!==E.Fragment&&(s.ref=r?ji(r,a):a),E.cloneElement(i,s)}return E.Children.count(i)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Jh=Symbol("radix.slottable");function Zh(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Jh}function Xh(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{const l=o(...s);return i(...s),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function em(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 tm=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ui=tm.reduce((e,t)=>{const n=Gh(`Primitive.${t}`),r=E.forwardRef((i,o)=>{const{asChild:a,...s}=i,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),S.jsx(l,{...s,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),$t=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function jt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Hi={exports:{}},Wi={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* use-sync-external-store-shim.production.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 Bs;function nm(){if(Bs)return Wi;Bs=1;var e=_;function t(c,p){return c===p&&(c!==0||1/c===1/p)||c!==c&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function s(c,p){var d=p(),m=r({inst:{value:d,getSnapshot:p}}),h=m[0].inst,g=m[1];return o(function(){h.value=d,h.getSnapshot=p,l(h)&&g({inst:h})},[c,d,p]),i(function(){return l(h)&&g({inst:h}),c(function(){l(h)&&g({inst:h})})},[c]),a(d),d}function l(c){var p=c.getSnapshot;c=c.value;try{var d=p();return!n(c,d)}catch{return!0}}function u(c,p){return p()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:s;return Wi.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,Wi}var Vi={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* use-sync-external-store-shim.development.js
|
|
12
12
|
*
|
|
@@ -14,229 +14,229 @@
|
|
|
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 $s;function rm(){return $s||($s=1,process.env.NODE_ENV!=="production"&&function(){function e(d,m){return d===m&&(d!==0||1/d===1/m)||d!==d&&m!==m}function t(d,m){f||i.startTransition===void 0||(f=!0,console.error("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 h=m();if(!c){var y=m();o(h,y)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),c=!0)}y=a({inst:{value:h,getSnapshot:m}});var g=y[0].inst,v=y[1];return l(function(){g.value=h,g.getSnapshot=m,n(g)&&v({inst:g})},[d,h,m]),s(function(){return n(g)&&v({inst:g}),d(function(){n(g)&&v({inst:g})})},[d]),u(h),h}function n(d){var m=d.getSnapshot;d=d.value;try{var h=m();return!o(d,h)}catch{return!0}}function r(d,m){return m()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=F,o=typeof Object.is=="function"?Object.is:e,a=i.useState,s=i.useEffect,l=i.useLayoutEffect,u=i.useDebugValue,f=!1,c=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;qi.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),qi}process.env.NODE_ENV==="production"?Wi.exports=nm():Wi.exports=rm();var im=Wi.exports;function om(){return im.useSyncExternalStore(am,()=>!0,()=>!1)}function am(){return()=>{}}var Ki="Avatar",[sm]=Vh(Ki),[lm,js]=sm(Ki),Yi=E.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,o]=E.useState("idle");return S.jsx(lm,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:o,children:S.jsx(Hi.span,{...r,ref:t})})});Yi.displayName=Ki;var Us="AvatarImage",Gi=E.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...o}=e,a=js(Us,n),s=um(r,o),l=Zt(u=>{i(u),a.onImageLoadingStatusChange(u)});return Tt(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?S.jsx(Hi.img,{...o,ref:t,src:r}):null});Gi.displayName=Us;var Hs="AvatarFallback",Qi=E.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,o=js(Hs,n),[a,s]=E.useState(r===void 0);return E.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(l)}},[r]),a&&o.imageLoadingStatus!=="loaded"?S.jsx(Hi.span,{...i,ref:t}):null});Qi.displayName=Hs;function Ws(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function um(e,{referrerPolicy:t,crossOrigin:n}){const r=om(),i=E.useRef(null),o=r?(i.current||(i.current=new window.Image),i.current):null,[a,s]=E.useState(()=>Ws(o,e));return Tt(()=>{s(Ws(o,e))},[o,e]),Tt(()=>{const l=c=>()=>{s(c)};if(!o)return;const u=l("loaded"),f=l("error");return o.addEventListener("load",u),o.addEventListener("error",f),t&&(o.referrerPolicy=t),typeof n=="string"&&(o.crossOrigin=n),()=>{o.removeEventListener("load",u),o.removeEventListener("error",f)}},[o,n,t]),a}function Vs(e,t){let n=`${e} {`;for(const[r,i]of Object.entries(t))n+=`${r}: ${i}; `;return n+="}",n}function qs(e,t){let n=0;if(e.length==0)return n;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);n=(n<<5)-n+i,n=n&n}return Math.abs(n)%t}const cm=(e,t={})=>new Promise((n,r)=>{if(typeof window>"u")return r("Window is not defined");if(!e)return r("Url is not defined");let i=null;const o=new Image;o.addEventListener("load",()=>{i&&clearTimeout(i),n({width:o.naturalWidth,height:o.naturalHeight})}),o.addEventListener("error",a=>{i&&clearTimeout(i),r(`${a.type}: ${a.message}`)}),o.src=e,t.timeout&&(i=setTimeout(()=>r("Timeout"),t.timeout))});var Ks={exports:{}};(function(e,t){(function(n,r){e.exports=r()})($t,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",l="hour",u="day",f="week",c="month",p="quarter",d="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+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={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(N){var D=["th","st","nd","rd"],z=N%100;return"["+N+(D[(z-20)%10]||D[z]||D[0])+"]"}},x=function(N,D,z){var U=String(N);return!U||U.length>=D?N:""+Array(D+1-U.length).join(z)+N},A={s:x,z:function(N){var D=-N.utcOffset(),z=Math.abs(D),U=Math.floor(z/60),$=z%60;return(D<=0?"+":"-")+x(U,2,"0")+":"+x($,2,"0")},m:function N(D,z){if(D.date()<z.date())return-N(z,D);var U=12*(z.year()-D.year())+(z.month()-D.month()),$=D.clone().add(U,c),V=z-$<0,b=D.clone().add(U+(V?-1:1),c);return+(-(U+(z-$)/(V?$-b:b-$))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:c,y:d,w:f,d:u,D:m,h:l,m:s,s:a,ms:o,Q:p}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},k="en",C={};C[k]=v;var T="$isDayjsObject",M=function(N){return N instanceof j||!(!N||!N[T])},R=function N(D,z,U){var $;if(!D)return k;if(typeof D=="string"){var V=D.toLowerCase();C[V]&&($=V),z&&(C[V]=z,$=V);var b=D.split("-");if(!$&&b.length>1)return N(b[0])}else{var P=D.name;C[P]=D,$=P}return!U&&$&&(k=$),$||!U&&k},I=function(N,D){if(M(N))return N.clone();var z=typeof D=="object"?D:{};return z.date=N,z.args=arguments,new j(z)},O=A;O.l=R,O.i=M,O.w=function(N,D){return I(N,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var j=function(){function N(z){this.$L=R(z.locale,null,!0),this.parse(z),this.$x=this.$x||z.x||{},this[T]=!0}var D=N.prototype;return D.parse=function(z){this.$d=function(U){var $=U.date,V=U.utc;if($===null)return new Date(NaN);if(O.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var b=$.match(y);if(b){var P=b[2]-1||0,H=(b[7]||"0").substring(0,3);return V?new Date(Date.UTC(b[1],P,b[3]||1,b[4]||0,b[5]||0,b[6]||0,H)):new Date(b[1],P,b[3]||1,b[4]||0,b[5]||0,b[6]||0,H)}}return new Date($)}(z),this.init()},D.init=function(){var z=this.$d;this.$y=z.getFullYear(),this.$M=z.getMonth(),this.$D=z.getDate(),this.$W=z.getDay(),this.$H=z.getHours(),this.$m=z.getMinutes(),this.$s=z.getSeconds(),this.$ms=z.getMilliseconds()},D.$utils=function(){return O},D.isValid=function(){return this.$d.toString()!==h},D.isSame=function(z,U){var $=I(z);return this.startOf(U)<=$&&$<=this.endOf(U)},D.isAfter=function(z,U){return I(z)<this.startOf(U)},D.isBefore=function(z,U){return this.endOf(U)<I(z)},D.$g=function(z,U,$){return O.u(z)?this[U]:this.set($,z)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(z,U){var $=this,V=!!O.u(U)||U,b=O.p(z),P=function(ie,K){var te=O.w($.$u?Date.UTC($.$y,K,ie):new Date($.$y,K,ie),$);return V?te:te.endOf(u)},H=function(ie,K){return O.w($.toDate()[ie].apply($.toDate("s"),(V?[0,0,0,0]:[23,59,59,999]).slice(K)),$)},w=this.$W,W=this.$M,X=this.$D,Y="set"+(this.$u?"UTC":"");switch(b){case d:return V?P(1,0):P(31,11);case c:return V?P(1,W):P(0,W+1);case f:var J=this.$locale().weekStart||0,ee=(w<J?w+7:w)-J;return P(V?X-ee:X+(6-ee),W);case u:case m:return H(Y+"Hours",0);case l:return H(Y+"Minutes",1);case s:return H(Y+"Seconds",2);case a:return H(Y+"Milliseconds",3);default:return this.clone()}},D.endOf=function(z){return this.startOf(z,!1)},D.$set=function(z,U){var $,V=O.p(z),b="set"+(this.$u?"UTC":""),P=($={},$[u]=b+"Date",$[m]=b+"Date",$[c]=b+"Month",$[d]=b+"FullYear",$[l]=b+"Hours",$[s]=b+"Minutes",$[a]=b+"Seconds",$[o]=b+"Milliseconds",$)[V],H=V===u?this.$D+(U-this.$W):U;if(V===c||V===d){var w=this.clone().set(m,1);w.$d[P](H),w.init(),this.$d=w.set(m,Math.min(this.$D,w.daysInMonth())).$d}else P&&this.$d[P](H);return this.init(),this},D.set=function(z,U){return this.clone().$set(z,U)},D.get=function(z){return this[O.p(z)]()},D.add=function(z,U){var $,V=this;z=Number(z);var b=O.p(U),P=function(W){var X=I(V);return O.w(X.date(X.date()+Math.round(W*z)),V)};if(b===c)return this.set(c,this.$M+z);if(b===d)return this.set(d,this.$y+z);if(b===u)return P(1);if(b===f)return P(7);var H=($={},$[s]=r,$[l]=i,$[a]=n,$)[b]||1,w=this.$d.getTime()+z*H;return O.w(w,this)},D.subtract=function(z,U){return this.add(-1*z,U)},D.format=function(z){var U=this,$=this.$locale();if(!this.isValid())return $.invalidDate||h;var V=z||"YYYY-MM-DDTHH:mm:ssZ",b=O.z(this),P=this.$H,H=this.$m,w=this.$M,W=$.weekdays,X=$.months,Y=$.meridiem,J=function(K,te,L,ne){return K&&(K[te]||K(U,V))||L[te].slice(0,ne)},ee=function(K){return O.s(P%12||12,K,"0")},ie=Y||function(K,te,L){var ne=K<12?"AM":"PM";return L?ne.toLowerCase():ne};return V.replace(g,function(K,te){return te||function(L){switch(L){case"YY":return String(U.$y).slice(-2);case"YYYY":return O.s(U.$y,4,"0");case"M":return w+1;case"MM":return O.s(w+1,2,"0");case"MMM":return J($.monthsShort,w,X,3);case"MMMM":return J(X,w);case"D":return U.$D;case"DD":return O.s(U.$D,2,"0");case"d":return String(U.$W);case"dd":return J($.weekdaysMin,U.$W,W,2);case"ddd":return J($.weekdaysShort,U.$W,W,3);case"dddd":return W[U.$W];case"H":return String(P);case"HH":return O.s(P,2,"0");case"h":return ee(1);case"hh":return ee(2);case"a":return ie(P,H,!0);case"A":return ie(P,H,!1);case"m":return String(H);case"mm":return O.s(H,2,"0");case"s":return String(U.$s);case"ss":return O.s(U.$s,2,"0");case"SSS":return O.s(U.$ms,3,"0");case"Z":return b}return null}(K)||b.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(z,U,$){var V,b=this,P=O.p(U),H=I(z),w=(H.utcOffset()-this.utcOffset())*r,W=this-H,X=function(){return O.m(b,H)};switch(P){case d:V=X()/12;break;case c:V=X();break;case p:V=X()/3;break;case f:V=(W-w)/6048e5;break;case u:V=(W-w)/864e5;break;case l:V=W/i;break;case s:V=W/r;break;case a:V=W/n;break;default:V=W}return $?V:O.a(V)},D.daysInMonth=function(){return this.endOf(c).$D},D.$locale=function(){return C[this.$L]},D.locale=function(z,U){if(!z)return this.$L;var $=this.clone(),V=R(z,U,!0);return V&&($.$L=V),$},D.clone=function(){return O.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},N}(),_=j.prototype;return I.prototype=_,[["$ms",o],["$s",a],["$m",s],["$H",l],["$W",u],["$M",c],["$y",d],["$D",m]].forEach(function(N){_[N[1]]=function(D){return this.$g(D,N[0],N[1])}}),I.extend=function(N,D){return N.$i||(N(D,j,I),N.$i=!0),I},I.locale=R,I.isDayjs=M,I.unix=function(N){return I(1e3*N)},I.en=C[k],I.Ls=C,I.p={},I})})(Ks);var fm=Ks.exports;const wr=jt(fm);var Ys={exports:{}};(function(e,t){(function(n,r){e.exports=r()})($t,function(){return function(n,r,i){r.prototype.isToday=function(){var o="YYYY-MM-DD",a=i();return this.format(o)===a.format(o)}}})})(Ys);var dm=Ys.exports;const pm=jt(dm);var Gs={exports:{}};(function(e,t){(function(n,r){e.exports=r()})($t,function(){return function(n,r,i){r.prototype.isYesterday=function(){var o="YYYY-MM-DD",a=i().subtract(1,"day");return this.format(o)===a.format(o)}}})})(Gs);var hm=Gs.exports;const mm=jt(hm);wr.extend(pm),wr.extend(mm);function Qs(e,t,n,r,i){return e.map(o=>{const{authorId:a}=o,s=a===n?"outgoing":"incoming",l=t.find(f=>f.id===a);let u;return l&&l.id===n?u={name:l.name||"You",avatar:l.pictureUrl}:l?u={name:l.name||"Agent",avatar:l.pictureUrl}:u={name:r||"Bot",avatar:i},{...o,direction:s,sender:u}})}function gm(e,t="day"){var r,i,o;if(!e||e.length===0)return[];const n=[];(r=e[0])!=null&&r.timestamp&&n.push(Js(e[0].timestamp));for(let a=0;a<e.length;a++)if(e[a]&&n.push(e[a]),a+1<e.length){const s=(i=e[a])==null?void 0:i.timestamp,l=(o=e[a+1])==null?void 0:o.timestamp;!wr(s).isSame(l,t)&&l&&n.push(Js(l))}return n}function Js(e){return{id:Zs(e),direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:Zs(e)}}}function Zs(e,t=!1){const n=wr(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 ym(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 vm(e){return"#"+e.map(t=>`0${t.toString(16).toUpperCase()}`.slice(-2)).join("")}function bm(e,t){return e.map(n=>Math.round(n+(255-n)*t))}function xm(e,t){return e.map(n=>Math.round(n*t))}const Mn=e=>t=>bm(t,e),_n=e=>t=>xm(t,e),wm={50:Mn(.95),100:Mn(.9),200:Mn(.75),300:Mn(.6),400:Mn(.3),500:e=>e,600:_n(.9),700:_n(.6),800:_n(.45),900:_n(.3),950:_n(.2)};function Xs(e,t=wm){const n={},r=ym(e);for(const[i,o]of Object.entries(t))n[i]=vm(o(r));return n}const el=()=>{const e={};return{on:(i,o)=>{var a;return e[i]||(e[i]=new Set),(a=e[i])==null||a.add(o),()=>{var s;return(s=e[i])==null?void 0:s.delete(o)}},emit:(i,o)=>{var a,s;(a=e[i])==null||a.forEach(l=>l(o)),(s=e["*"])==null||s.forEach(l=>l({type:i,payload:o}))},removeAllListeners:i=>{var o;i?(o=e[i])==null||o.clear():Object.keys(e).forEach(a=>{var s;(s=e[a])==null||s.clear()})}}};function Ji(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(l=>l+l).join(""));const i=parseInt(r,16),o=i>>16&255,a=i>>8&255,s=i&255;return{r:o,g:a,b:s}}function km(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const Sm=(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 tl(e){return Object.entries(e).reduce((t,[n,r])=>{const i=n.replace(/(\d+)/,o=>(1e3-parseInt(o)).toString());return{...t,[i]:r}},{})}const Em=2.4,Cm=.2126729,Am=.7151522,Im=.072175,Tm=.56,Om=.57,Dm=.62,Mm=.65,kr=.022,nl=1.414,_m=1.14,Pm=1.14,Nm=.035991,Lm=27.7847239587675,Fm=27.7847239587675,rl=.027,il=.027,ol=.001,Rm=5e-4;function al(e){const{r:t,g:n,b:r}=e,i=o=>(o/255)**Em;return Cm*i(t)+Am*i(n)+Im*i(r)}function sl(e,t){if(!e||!t)return 0;let n=al(Ji(e)),r=al(Ji(t)),i=0,o=0;return n=n>kr?n:n+(kr-n)**nl,r=r>kr?r:r+(kr-r)**nl,Math.abs(r-n)<Rm?0:(r>n?(i=(r**Tm-n**Om)*_m,o=i<ol?0:i<Nm?i-i*Lm*rl:i-rl):(i=(r**Mm-n**Dm)*Pm,o=i>-ol?0:i>-.035991?i-i*Fm*il:i+il),Math.abs(o*100))}const Bm=(e,t,n)=>{const r=e;let i=0;for(;t.some(o=>n(o)===e);)i+=1,e=`${r} (${i})`;return e};function ll(e){const{fontFamily:t,...n}=e,r=ul(n);return Vs(".bpReset",{...r,"font-family":`'${t}', sans-serif`})+Vs(":host, :root",{...r})}function ul(e){const{radius:t,themeMode:n,color:r,variant:i,headerVariant:o}=e;let a={},s={};if(r){const p=Xs(r),d=n==="dark"?tl(p):p,m=Xs(km(Sm(Ji(r)))),h=n==="dark"?tl(m):m,y=n==="dark"?"#101010":"#fdfdfd";s=Object.entries({...d,1:y}).reduce((v,[x,A])=>({...v,[`--bpPrimary-${x}`]:A}),{});const g=Object.entries({...h,1:y}).reduce((v,[x,A])=>({...v,[`--bpGray-${x}`]:A}),{});a={...s,...g}}t&&(a={...a,"--bpRadius-scale":t.toString()});const l=n==="dark"?{bg:"var(--transparent-dark)",bgHover:"var(--transparent-dark-hover)"}:{bg:"var(--transparent-light)",bgHover:"var(--transparent-light-hover)"},u=s?sl(s["--bpPrimary-600"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)",f=i==="solid"?{"--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-200)","--button-bg-hover":"var(--bpPrimary-300)","--button-text":"var(--bpPrimary-800)","--fab-bg":"var(--bpPrimary-600)","--fab-bg-hover":"var(--bpPrimary-700)","--fab-icon":u,"--modal-submit-bg":"var(--bpPrimary-600)","--modal-submit-bg-hover":"var(--bpPrimary-700)"}:{"--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?sl(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)","--scrollbar":"var(--bpGray-500)","--scrollbar-hover":"var(--bpGray-400)","--modal-submit-bg":"var(--bpPrimary-200)","--modal-submit-bg-hover":"var(--bpPrimary-300)"},c=o==="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)"}:{"--header-bg":l.bg,"--header-bg-hover":l.bgHover,"--header-hover-dark":"var(--bpGray-200)","--header-title":"var(--bpGray-900)","--header-description":"var(--bpGray-600)","--header-description-icon":"var(--bpPrimary-700)","--header-description-link":"var(--bpPrimary-800)","--header-avatar-bg":"var(--bpPrimary-600)","--header-avatar-text":"var(--bpPrimary-50)"};return{...a,...f,...c}}const zm=e=>{if(typeof URL.canParse=="function")return URL.canParse(e);try{return new URL(e),!0}catch{return!1}},cl=["audio","file","image","video"],fl=e=>cl.includes(e),dl="The Client ID is required to initialize the webchat.",$m="The API url is required to initialize the webchat.",jm="The Bot ID is required to initialize the webchat.",Um="No config URL provided.",pl=`Invalid API URL.
|
|
18
|
-
Please use a valid API URL.`,
|
|
19
|
-
Please use a valid Botpress Client ID.`,
|
|
17
|
+
*/var zs;function rm(){return zs||(zs=1,process.env.NODE_ENV!=="production"&&function(){function e(d,m){return d===m&&(d!==0||1/d===1/m)||d!==d&&m!==m}function t(d,m){f||i.startTransition===void 0||(f=!0,console.error("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 h=m();if(!c){var g=m();o(h,g)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),c=!0)}g=a({inst:{value:h,getSnapshot:m}});var y=g[0].inst,v=g[1];return l(function(){y.value=h,y.getSnapshot=m,n(y)&&v({inst:y})},[d,h,m]),s(function(){return n(y)&&v({inst:y}),d(function(){n(y)&&v({inst:y})})},[d]),u(h),h}function n(d){var m=d.getSnapshot;d=d.value;try{var h=m();return!o(d,h)}catch{return!0}}function r(d,m){return m()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=_,o=typeof Object.is=="function"?Object.is:e,a=i.useState,s=i.useEffect,l=i.useLayoutEffect,u=i.useDebugValue,f=!1,c=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Vi.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Vi}process.env.NODE_ENV==="production"?Hi.exports=nm():Hi.exports=rm();var im=Hi.exports;function om(){return im.useSyncExternalStore(am,()=>!0,()=>!1)}function am(){return()=>{}}var qi="Avatar",[sm]=Vh(qi),[lm,$s]=sm(qi),Ki=E.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,o]=E.useState("idle");return S.jsx(lm,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:o,children:S.jsx(Ui.span,{...r,ref:t})})});Ki.displayName=qi;var js="AvatarImage",Yi=E.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...o}=e,a=$s(js,n),s=um(r,o),l=Zt(u=>{i(u),a.onImageLoadingStatusChange(u)});return Tt(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?S.jsx(Ui.img,{...o,ref:t,src:r}):null});Yi.displayName=js;var Us="AvatarFallback",Gi=E.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,o=$s(Us,n),[a,s]=E.useState(r===void 0);return E.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(l)}},[r]),a&&o.imageLoadingStatus!=="loaded"?S.jsx(Ui.span,{...i,ref:t}):null});Gi.displayName=Us;function Hs(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function um(e,{referrerPolicy:t,crossOrigin:n}){const r=om(),i=E.useRef(null),o=r?(i.current||(i.current=new window.Image),i.current):null,[a,s]=E.useState(()=>Hs(o,e));return Tt(()=>{s(Hs(o,e))},[o,e]),Tt(()=>{const l=c=>()=>{s(c)};if(!o)return;const u=l("loaded"),f=l("error");return o.addEventListener("load",u),o.addEventListener("error",f),t&&(o.referrerPolicy=t),typeof n=="string"&&(o.crossOrigin=n),()=>{o.removeEventListener("load",u),o.removeEventListener("error",f)}},[o,n,t]),a}function Ws(e,t){let n=`${e} {`;for(const[r,i]of Object.entries(t))n+=`${r}: ${i}; `;return n+="}",n}function Vs(e,t){let n=0;if(e.length==0)return n;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);n=(n<<5)-n+i,n=n&n}return Math.abs(n)%t}const cm=(e,t={})=>new Promise((n,r)=>{if(typeof window>"u")return r("Window is not defined");if(!e)return r("Url is not defined");let i=null;const o=new Image;o.addEventListener("load",()=>{i&&clearTimeout(i),n({width:o.naturalWidth,height:o.naturalHeight})}),o.addEventListener("error",a=>{i&&clearTimeout(i),r(`${a.type}: ${a.message}`)}),o.src=e,t.timeout&&(i=setTimeout(()=>r("Timeout"),t.timeout))});var qs={exports:{}};(function(e,t){(function(n,r){e.exports=r()})($t,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",l="hour",u="day",f="week",c="month",p="quarter",d="year",m="date",h="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|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,v={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(L){var D=["th","st","nd","rd"],z=L%100;return"["+L+(D[(z-20)%10]||D[z]||D[0])+"]"}},w=function(L,D,z){var U=String(L);return!U||U.length>=D?L:""+Array(D+1-U.length).join(z)+L},A={s:w,z:function(L){var D=-L.utcOffset(),z=Math.abs(D),U=Math.floor(z/60),$=z%60;return(D<=0?"+":"-")+w(U,2,"0")+":"+w($,2,"0")},m:function L(D,z){if(D.date()<z.date())return-L(z,D);var U=12*(z.year()-D.year())+(z.month()-D.month()),$=D.clone().add(U,c),V=z-$<0,b=D.clone().add(U+(V?-1:1),c);return+(-(U+(z-$)/(V?$-b:b-$))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:c,y:d,w:f,d:u,D:m,h:l,m:s,s:a,ms:o,Q:p}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},k="en",C={};C[k]=v;var T="$isDayjsObject",P=function(L){return L instanceof j||!(!L||!L[T])},R=function L(D,z,U){var $;if(!D)return k;if(typeof D=="string"){var V=D.toLowerCase();C[V]&&($=V),z&&(C[V]=z,$=V);var b=D.split("-");if(!$&&b.length>1)return L(b[0])}else{var N=D.name;C[N]=D,$=N}return!U&&$&&(k=$),$||!U&&k},I=function(L,D){if(P(L))return L.clone();var z=typeof D=="object"?D:{};return z.date=L,z.args=arguments,new j(z)},O=A;O.l=R,O.i=P,O.w=function(L,D){return I(L,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var j=function(){function L(z){this.$L=R(z.locale,null,!0),this.parse(z),this.$x=this.$x||z.x||{},this[T]=!0}var D=L.prototype;return D.parse=function(z){this.$d=function(U){var $=U.date,V=U.utc;if($===null)return new Date(NaN);if(O.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var b=$.match(g);if(b){var N=b[2]-1||0,H=(b[7]||"0").substring(0,3);return V?new Date(Date.UTC(b[1],N,b[3]||1,b[4]||0,b[5]||0,b[6]||0,H)):new Date(b[1],N,b[3]||1,b[4]||0,b[5]||0,b[6]||0,H)}}return new Date($)}(z),this.init()},D.init=function(){var z=this.$d;this.$y=z.getFullYear(),this.$M=z.getMonth(),this.$D=z.getDate(),this.$W=z.getDay(),this.$H=z.getHours(),this.$m=z.getMinutes(),this.$s=z.getSeconds(),this.$ms=z.getMilliseconds()},D.$utils=function(){return O},D.isValid=function(){return this.$d.toString()!==h},D.isSame=function(z,U){var $=I(z);return this.startOf(U)<=$&&$<=this.endOf(U)},D.isAfter=function(z,U){return I(z)<this.startOf(U)},D.isBefore=function(z,U){return this.endOf(U)<I(z)},D.$g=function(z,U,$){return O.u(z)?this[U]:this.set($,z)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(z,U){var $=this,V=!!O.u(U)||U,b=O.p(z),N=function(ie,K){var te=O.w($.$u?Date.UTC($.$y,K,ie):new Date($.$y,K,ie),$);return V?te:te.endOf(u)},H=function(ie,K){return O.w($.toDate()[ie].apply($.toDate("s"),(V?[0,0,0,0]:[23,59,59,999]).slice(K)),$)},x=this.$W,W=this.$M,ee=this.$D,Y="set"+(this.$u?"UTC":"");switch(b){case d:return V?N(1,0):N(31,11);case c:return V?N(1,W):N(0,W+1);case f:var J=this.$locale().weekStart||0,X=(x<J?x+7:x)-J;return N(V?ee-X:ee+(6-X),W);case u:case m:return H(Y+"Hours",0);case l:return H(Y+"Minutes",1);case s:return H(Y+"Seconds",2);case a:return H(Y+"Milliseconds",3);default:return this.clone()}},D.endOf=function(z){return this.startOf(z,!1)},D.$set=function(z,U){var $,V=O.p(z),b="set"+(this.$u?"UTC":""),N=($={},$[u]=b+"Date",$[m]=b+"Date",$[c]=b+"Month",$[d]=b+"FullYear",$[l]=b+"Hours",$[s]=b+"Minutes",$[a]=b+"Seconds",$[o]=b+"Milliseconds",$)[V],H=V===u?this.$D+(U-this.$W):U;if(V===c||V===d){var x=this.clone().set(m,1);x.$d[N](H),x.init(),this.$d=x.set(m,Math.min(this.$D,x.daysInMonth())).$d}else N&&this.$d[N](H);return this.init(),this},D.set=function(z,U){return this.clone().$set(z,U)},D.get=function(z){return this[O.p(z)]()},D.add=function(z,U){var $,V=this;z=Number(z);var b=O.p(U),N=function(W){var ee=I(V);return O.w(ee.date(ee.date()+Math.round(W*z)),V)};if(b===c)return this.set(c,this.$M+z);if(b===d)return this.set(d,this.$y+z);if(b===u)return N(1);if(b===f)return N(7);var H=($={},$[s]=r,$[l]=i,$[a]=n,$)[b]||1,x=this.$d.getTime()+z*H;return O.w(x,this)},D.subtract=function(z,U){return this.add(-1*z,U)},D.format=function(z){var U=this,$=this.$locale();if(!this.isValid())return $.invalidDate||h;var V=z||"YYYY-MM-DDTHH:mm:ssZ",b=O.z(this),N=this.$H,H=this.$m,x=this.$M,W=$.weekdays,ee=$.months,Y=$.meridiem,J=function(K,te,F,ne){return K&&(K[te]||K(U,V))||F[te].slice(0,ne)},X=function(K){return O.s(N%12||12,K,"0")},ie=Y||function(K,te,F){var ne=K<12?"AM":"PM";return F?ne.toLowerCase():ne};return V.replace(y,function(K,te){return te||function(F){switch(F){case"YY":return String(U.$y).slice(-2);case"YYYY":return O.s(U.$y,4,"0");case"M":return x+1;case"MM":return O.s(x+1,2,"0");case"MMM":return J($.monthsShort,x,ee,3);case"MMMM":return J(ee,x);case"D":return U.$D;case"DD":return O.s(U.$D,2,"0");case"d":return String(U.$W);case"dd":return J($.weekdaysMin,U.$W,W,2);case"ddd":return J($.weekdaysShort,U.$W,W,3);case"dddd":return W[U.$W];case"H":return String(N);case"HH":return O.s(N,2,"0");case"h":return X(1);case"hh":return X(2);case"a":return ie(N,H,!0);case"A":return ie(N,H,!1);case"m":return String(H);case"mm":return O.s(H,2,"0");case"s":return String(U.$s);case"ss":return O.s(U.$s,2,"0");case"SSS":return O.s(U.$ms,3,"0");case"Z":return b}return null}(K)||b.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(z,U,$){var V,b=this,N=O.p(U),H=I(z),x=(H.utcOffset()-this.utcOffset())*r,W=this-H,ee=function(){return O.m(b,H)};switch(N){case d:V=ee()/12;break;case c:V=ee();break;case p:V=ee()/3;break;case f:V=(W-x)/6048e5;break;case u:V=(W-x)/864e5;break;case l:V=W/i;break;case s:V=W/r;break;case a:V=W/n;break;default:V=W}return $?V:O.a(V)},D.daysInMonth=function(){return this.endOf(c).$D},D.$locale=function(){return C[this.$L]},D.locale=function(z,U){if(!z)return this.$L;var $=this.clone(),V=R(z,U,!0);return V&&($.$L=V),$},D.clone=function(){return O.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},L}(),M=j.prototype;return I.prototype=M,[["$ms",o],["$s",a],["$m",s],["$H",l],["$W",u],["$M",c],["$y",d],["$D",m]].forEach(function(L){M[L[1]]=function(D){return this.$g(D,L[0],L[1])}}),I.extend=function(L,D){return L.$i||(L(D,j,I),L.$i=!0),I},I.locale=R,I.isDayjs=P,I.unix=function(L){return I(1e3*L)},I.en=C[k],I.Ls=C,I.p={},I})})(qs);var fm=qs.exports;const xr=jt(fm);var Ks={exports:{}};(function(e,t){(function(n,r){e.exports=r()})($t,function(){return function(n,r,i){r.prototype.isToday=function(){var o="YYYY-MM-DD",a=i();return this.format(o)===a.format(o)}}})})(Ks);var dm=Ks.exports;const pm=jt(dm);var Ys={exports:{}};(function(e,t){(function(n,r){e.exports=r()})($t,function(){return function(n,r,i){r.prototype.isYesterday=function(){var o="YYYY-MM-DD",a=i().subtract(1,"day");return this.format(o)===a.format(o)}}})})(Ys);var hm=Ys.exports;const mm=jt(hm);xr.extend(pm),xr.extend(mm);function Gs(e,t,n,r,i){return e.map(o=>{const{authorId:a}=o,s=a===n?"outgoing":"incoming",l=t.find(f=>f.id===a);let u;return l&&l.id===n?u={name:l.name||"You",avatar:l.pictureUrl}:l?u={name:l.name||"Agent",avatar:l.pictureUrl}:u={name:r||"Bot",avatar:i},{...o,direction:s,sender:u}})}function gm(e,t="day"){var r,i,o;if(!e||e.length===0)return[];const n=[];(r=e[0])!=null&&r.timestamp&&n.push(Qs(e[0].timestamp));for(let a=0;a<e.length;a++)if(e[a]&&n.push(e[a]),a+1<e.length){const s=(i=e[a])==null?void 0:i.timestamp,l=(o=e[a+1])==null?void 0:o.timestamp;!xr(s).isSame(l,t)&&l&&n.push(Qs(l))}return n}function Qs(e){return{id:Js(e),direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:Js(e)}}}function Js(e,t=!1){const n=xr(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 ym(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 vm(e){return"#"+e.map(t=>`0${t.toString(16).toUpperCase()}`.slice(-2)).join("")}function bm(e,t){return e.map(n=>Math.round(n+(255-n)*t))}function wm(e,t){return e.map(n=>Math.round(n*t))}const Mn=e=>t=>bm(t,e),_n=e=>t=>wm(t,e),xm={50:Mn(.95),100:Mn(.9),200:Mn(.75),300:Mn(.6),400:Mn(.3),500:e=>e,600:_n(.9),700:_n(.6),800:_n(.45),900:_n(.3),950:_n(.2)};function Zs(e,t=xm){const n={},r=ym(e);for(const[i,o]of Object.entries(t))n[i]=vm(o(r));return n}const Xs=()=>{const e={};return{on:(i,o)=>{var a;return e[i]||(e[i]=new Set),(a=e[i])==null||a.add(o),()=>{var s;return(s=e[i])==null?void 0:s.delete(o)}},emit:(i,o)=>{var a,s;(a=e[i])==null||a.forEach(l=>l(o)),(s=e["*"])==null||s.forEach(l=>l({type:i,payload:o}))},removeAllListeners:i=>{var o;i?(o=e[i])==null||o.clear():Object.keys(e).forEach(a=>{var s;(s=e[a])==null||s.clear()})}}};function Qi(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(l=>l+l).join(""));const i=parseInt(r,16),o=i>>16&255,a=i>>8&255,s=i&255;return{r:o,g:a,b:s}}function km(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const Sm=(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 el(e){return Object.entries(e).reduce((t,[n,r])=>{const i=n.replace(/(\d+)/,o=>(1e3-parseInt(o)).toString());return{...t,[i]:r}},{})}const Em=2.4,Cm=.2126729,Am=.7151522,Im=.072175,Tm=.56,Om=.57,Dm=.62,Mm=.65,kr=.022,tl=1.414,_m=1.14,Pm=1.14,Nm=.035991,Lm=27.7847239587675,Fm=27.7847239587675,nl=.027,rl=.027,il=.001,Rm=5e-4;function ol(e){const{r:t,g:n,b:r}=e,i=o=>(o/255)**Em;return Cm*i(t)+Am*i(n)+Im*i(r)}function al(e,t){if(!e||!t)return 0;let n=ol(Qi(e)),r=ol(Qi(t)),i=0,o=0;return n=n>kr?n:n+(kr-n)**tl,r=r>kr?r:r+(kr-r)**tl,Math.abs(r-n)<Rm?0:(r>n?(i=(r**Tm-n**Om)*_m,o=i<il?0:i<Nm?i-i*Lm*nl:i-nl):(i=(r**Mm-n**Dm)*Pm,o=i>-il?0:i>-.035991?i-i*Fm*rl:i+rl),Math.abs(o*100))}const Bm=(e,t,n)=>{const r=e;let i=0;for(;t.some(o=>n(o)===e);)i+=1,e=`${r} (${i})`;return e};function sl(e){const{fontFamily:t,...n}=e,r=ll(n);return Ws(".bpReset",{...r,"font-family":`'${t}', sans-serif`})+Ws(":host, :root",{...r})}function ll(e){const{radius:t,themeMode:n,color:r,variant:i,headerVariant:o}=e;let a={},s={};if(r){const p=Zs(r),d=n==="dark"?el(p):p,m=Zs(km(Sm(Qi(r)))),h=n==="dark"?el(m):m,g=n==="dark"?"#101010":"#fdfdfd";s=Object.entries({...d,1:g}).reduce((v,[w,A])=>({...v,[`--bpPrimary-${w}`]:A}),{});const y=Object.entries({...h,1:g}).reduce((v,[w,A])=>({...v,[`--bpGray-${w}`]:A}),{});a={...s,...y}}t&&(a={...a,"--bpRadius-scale":t.toString()});const l=n==="dark"?{bg:"var(--transparent-dark)",bgHover:"var(--transparent-dark-hover)"}:{bg:"var(--transparent-light)",bgHover:"var(--transparent-light-hover)"},u=s?al(s["--bpPrimary-600"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)",f=i==="solid"?{"--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-200)","--button-bg-hover":"var(--bpPrimary-300)","--button-text":"var(--bpPrimary-800)","--fab-bg":"var(--bpPrimary-600)","--fab-bg-hover":"var(--bpPrimary-700)","--fab-icon":u,"--modal-submit-bg":"var(--bpPrimary-600)","--modal-submit-bg-hover":"var(--bpPrimary-700)"}:{"--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?al(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)","--scrollbar":"var(--bpGray-500)","--scrollbar-hover":"var(--bpGray-400)","--modal-submit-bg":"var(--bpPrimary-200)","--modal-submit-bg-hover":"var(--bpPrimary-300)"},c=o==="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)"}:{"--header-bg":l.bg,"--header-bg-hover":l.bgHover,"--header-hover-dark":"var(--bpGray-200)","--header-title":"var(--bpGray-900)","--header-description":"var(--bpGray-600)","--header-description-icon":"var(--bpPrimary-700)","--header-description-link":"var(--bpPrimary-800)","--header-avatar-bg":"var(--bpPrimary-600)","--header-avatar-text":"var(--bpPrimary-50)"};return{...a,...f,...c}}const zm=e=>{if(typeof URL.canParse=="function")return URL.canParse(e);try{return new URL(e),!0}catch{return!1}},ul=["audio","file","image","video"],cl=e=>ul.includes(e),fl="The Client ID is required to initialize the webchat.",$m="The API url is required to initialize the webchat.",jm="The Bot ID is required to initialize the webchat.",Um="No config URL provided.",dl=`Invalid API URL.
|
|
18
|
+
Please use a valid API URL.`,pl=`Invalid Client ID.
|
|
19
|
+
Please use a valid Botpress Client ID.`,hl=`Invalid URL.
|
|
20
20
|
Please make sure your client ID and API URL are valid`,Hm=`Invalid config URL.
|
|
21
21
|
Please make sure your config URL is valid`,Wm=`Invalid webchat configuration.
|
|
22
|
-
Please make sure your config file is valid`,Vm="Access denied to configuration file. Please check your credentials or your configuration URL and try again.",
|
|
23
|
-
Please check back later.`,
|
|
24
|
-
Please check back later.`,
|
|
25
|
-
Please refresh the page.`,
|
|
26
|
-
Please start a new conversation.`,Xi={ResourceNotFound:{type:"configuration",message:hl},Forbidden:{type:"bot",message:gl}},eo={MethodNotFound:{type:"configuration",message:ml},QuotaExceeded:{type:"bot",message:yl},Forbidden:{type:"bot",message:Zi}};function xl(e){return e in Xi}function wl(e){return e in eo}function kl(e){return e!==null&&typeof e=="object"&&"id"in e&&"code"in e&&"type"in e}function Sl(e){return e!==null&&typeof e=="object"&&"type"in e&&e.type==="error"&&"message"in e&&typeof e.message=="string"}const El=async(e,t=3,n=1e3)=>{let r;for(let i=1;i<=t;i++)try{return await e()}catch(o){if(r=o,i===t)throw r;const a=n*Math.pow(2,i-1);await new Promise(s=>setTimeout(s,a))}throw new Error("Unreachable: retry loop should always return or throw")},qm=["networkerror","failedtofetch","errorininputstream"],Sr=e=>{var n;console.error("An error occurred:",e);let t={type:"unknown",message:"An unexpected error occurred"};if(kl(e))e.type==="network"?t={id:e.id,type:"network",message:Pn}:(n=e.message)!=null&&n.includes("[Webhook Handler]")&&xl(e.type)?t={id:e.id,...Xi[e.type]}:wl(e.type)?t={id:e.id,...eo[e.type]}:t={id:e.id,type:e.type,message:e.message||"An error occurred"};else if(Sl(e))Cl(e.message)?t={type:"disconnected",message:vl}:Al(e.message).includes("invalidcontenttype")?t={type:"bot",message:bl}:t={type:"event",message:e.message};else if(e instanceof Error&&Cl(e.message))t={type:"network",message:Pn};else if(e&&typeof e=="object"&&"type"in e&&"message"in e){const r=e;r.type==="network"?t={type:"network",message:Pn}:t={type:r.type,message:r.message}}return t};function Cl(e){return qm.some(t=>Al(e).includes(t))}function Al(e){return e.replaceAll(" ","").toLowerCase()}const Nn=({userId:e,src:t,container:n,image:r,fallback:i,...o})=>{const a=qs(e??"",15);return S.jsxs(Yi,{"data-color":a,...n,...o,children:[S.jsx(Gi,{src:t,...r}),S.jsx(Qi,{...i,children:typeof o.children=="string"?o.children[0]:o.children})]})};Nn.displayName="Avatar";/**
|
|
22
|
+
Please make sure your config file is valid`,Vm="Access denied to configuration file. Please check your credentials or your configuration URL and try again.",ml=`This bot has temporarily paused.
|
|
23
|
+
Please check back later.`,gl=`This bot has temporarily paused.
|
|
24
|
+
Please check back later.`,Ji="Something went wrong. To fix it, please clear your browser's local and session storage and then refresh the page",Pn="Please check your internet connection and refresh the page.",yl=`You've been disconnected from the conversation.
|
|
25
|
+
Please refresh the page.`,vl=`Unable to process the message.
|
|
26
|
+
Please start a new conversation.`,Zi={ResourceNotFound:{type:"configuration",message:pl},Forbidden:{type:"bot",message:ml}},Xi={MethodNotFound:{type:"configuration",message:hl},QuotaExceeded:{type:"bot",message:gl},Forbidden:{type:"bot",message:Ji}};function bl(e){return e in Zi}function wl(e){return e in Xi}function xl(e){return e!==null&&typeof e=="object"&&"id"in e&&"code"in e&&"type"in e}function kl(e){return e!==null&&typeof e=="object"&&"type"in e&&e.type==="error"&&"message"in e&&typeof e.message=="string"}const Sl=async(e,t=3,n=1e3)=>{let r;for(let i=1;i<=t;i++)try{return await e()}catch(o){if(r=o,i===t)throw r;const a=n*Math.pow(2,i-1);await new Promise(s=>setTimeout(s,a))}throw new Error("Unreachable: retry loop should always return or throw")},qm=["networkerror","failedtofetch","errorininputstream"],Sr=e=>{var n;console.error("An error occurred:",e);let t={type:"unknown",message:"An unexpected error occurred"};if(xl(e))e.type==="network"?t={id:e.id,type:"network",message:Pn}:(n=e.message)!=null&&n.includes("[Webhook Handler]")&&bl(e.type)?t={id:e.id,...Zi[e.type]}:wl(e.type)?t={id:e.id,...Xi[e.type]}:t={id:e.id,type:e.type,message:e.message||"An error occurred"};else if(kl(e))El(e.message)?t={type:"disconnected",message:yl}:Cl(e.message).includes("invalidcontenttype")?t={type:"bot",message:vl}:t={type:"event",message:e.message};else if(e instanceof Error&&El(e.message))t={type:"network",message:Pn};else if(e&&typeof e=="object"&&"type"in e&&"message"in e){const r=e;r.type==="network"?t={type:"network",message:Pn}:t={type:r.type,message:r.message}}return t};function El(e){return qm.some(t=>Cl(e).includes(t))}function Cl(e){return e.replaceAll(" ","").toLowerCase()}const Nn=_.forwardRef(({userId:e,src:t,container:n,image:r,fallback:i,...o},a)=>{const s=Vs(e??"",15);return S.jsxs(Ki,{ref:a,"data-color":s,...n,...o,children:[S.jsx(Yi,{src:t,...r}),S.jsx(Gi,{...i,children:typeof o.children=="string"?o.children[0]:o.children})]})});Nn.displayName="Avatar";function BT(){}function zT(){}function Km(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Ym=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Gm=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Qm={};function Al(e,t){return(Qm.jsx?Gm:Ym).test(e)}const Jm=/[ \t\n\f\r]/g;function Zm(e){return typeof e=="object"?e.type==="text"?Il(e.value):!1:Il(e)}function Il(e){return e.replace(Jm,"")===""}class Ln{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ln.prototype.normal={},Ln.prototype.property={},Ln.prototype.space=void 0;function Tl(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Ln(n,r,t)}function eo(e){return e.toLowerCase()}class Qe{constructor(t,n){this.attribute=n,this.property=t}}Qe.prototype.attribute="",Qe.prototype.booleanish=!1,Qe.prototype.boolean=!1,Qe.prototype.commaOrSpaceSeparated=!1,Qe.prototype.commaSeparated=!1,Qe.prototype.defined=!1,Qe.prototype.mustUseProperty=!1,Qe.prototype.number=!1,Qe.prototype.overloadedBoolean=!1,Qe.prototype.property="",Qe.prototype.spaceSeparated=!1,Qe.prototype.space=void 0;let Xm=0;const he=Ut(),Fe=Ut(),to=Ut(),Q=Ut(),De=Ut(),Xt=Ut(),et=Ut();function Ut(){return 2**++Xm}const no=Object.freeze(Object.defineProperty({__proto__:null,boolean:he,booleanish:Fe,commaOrSpaceSeparated:et,commaSeparated:Xt,number:Q,overloadedBoolean:to,spaceSeparated:De},Symbol.toStringTag,{value:"Module"})),ro=Object.keys(no);class io extends Qe{constructor(t,n,r,i){let o=-1;if(super(t,n),Ol(this,"space",i),typeof r=="number")for(;++o<ro.length;){const a=ro[o];Ol(this,ro[o],(r&no[a])===no[a])}}}io.prototype.defined=!0;function Ol(e,t,n){n&&(e[t]=n)}function en(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new io(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[eo(r)]=r,n[eo(o.attribute)]=r}return new Ln(t,n,e.space)}const Dl=en({properties:{ariaActiveDescendant:null,ariaAtomic:Fe,ariaAutoComplete:null,ariaBusy:Fe,ariaChecked:Fe,ariaColCount:Q,ariaColIndex:Q,ariaColSpan:Q,ariaControls:De,ariaCurrent:null,ariaDescribedBy:De,ariaDetails:null,ariaDisabled:Fe,ariaDropEffect:De,ariaErrorMessage:null,ariaExpanded:Fe,ariaFlowTo:De,ariaGrabbed:Fe,ariaHasPopup:null,ariaHidden:Fe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:De,ariaLevel:Q,ariaLive:null,ariaModal:Fe,ariaMultiLine:Fe,ariaMultiSelectable:Fe,ariaOrientation:null,ariaOwns:De,ariaPlaceholder:null,ariaPosInSet:Q,ariaPressed:Fe,ariaReadOnly:Fe,ariaRelevant:null,ariaRequired:Fe,ariaRoleDescription:De,ariaRowCount:Q,ariaRowIndex:Q,ariaRowSpan:Q,ariaSelected:Fe,ariaSetSize:Q,ariaSort:null,ariaValueMax:Q,ariaValueMin:Q,ariaValueNow:Q,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Ml(e,t){return t in e?e[t]:t}function _l(e,t){return Ml(e,t.toLowerCase())}const eg=en({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Xt,acceptCharset:De,accessKey:De,action:null,allow:null,allowFullScreen:he,allowPaymentRequest:he,allowUserMedia:he,alt:null,as:null,async:he,autoCapitalize:null,autoComplete:De,autoFocus:he,autoPlay:he,blocking:De,capture:null,charSet:null,checked:he,cite:null,className:De,cols:Q,colSpan:null,content:null,contentEditable:Fe,controls:he,controlsList:De,coords:Q|Xt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:he,defer:he,dir:null,dirName:null,disabled:he,download:to,draggable:Fe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:he,formTarget:null,headers:De,height:Q,hidden:to,high:Q,href:null,hrefLang:null,htmlFor:De,httpEquiv:De,id:null,imageSizes:null,imageSrcSet:null,inert:he,inputMode:null,integrity:null,is:null,isMap:he,itemId:null,itemProp:De,itemRef:De,itemScope:he,itemType:De,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:he,low:Q,manifest:null,max:null,maxLength:Q,media:null,method:null,min:null,minLength:Q,multiple:he,muted:he,name:null,nonce:null,noModule:he,noValidate:he,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:he,optimum:Q,pattern:null,ping:De,placeholder:null,playsInline:he,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:he,referrerPolicy:null,rel:De,required:he,reversed:he,rows:Q,rowSpan:Q,sandbox:De,scope:null,scoped:he,seamless:he,selected:he,shadowRootClonable:he,shadowRootDelegatesFocus:he,shadowRootMode:null,shape:null,size:Q,sizes:null,slot:null,span:Q,spellCheck:Fe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Q,step:null,style:null,tabIndex:Q,target:null,title:null,translate:null,type:null,typeMustMatch:he,useMap:null,value:Fe,width:Q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:De,axis:null,background:null,bgColor:null,border:Q,borderColor:null,bottomMargin:Q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:he,declare:he,event:null,face:null,frame:null,frameBorder:null,hSpace:Q,leftMargin:Q,link:null,longDesc:null,lowSrc:null,marginHeight:Q,marginWidth:Q,noResize:he,noHref:he,noShade:he,noWrap:he,object:null,profile:null,prompt:null,rev:null,rightMargin:Q,rules:null,scheme:null,scrolling:Fe,standby:null,summary:null,text:null,topMargin:Q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Q,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:he,disableRemotePlayback:he,prefix:null,property:null,results:Q,security:null,unselectable:null},space:"html",transform:_l}),tg=en({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"},properties:{about:et,accentHeight:Q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Q,amplitude:Q,arabicForm:null,ascent:Q,attributeName:null,attributeType:null,azimuth:Q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Q,by:null,calcMode:null,capHeight:Q,className:De,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:Q,diffuseConstant:Q,direction:null,display:null,dur:null,divisor:Q,dominantBaseline:null,download:he,dx:null,dy:null,edgeMode:null,editable:null,elevation:Q,enableBackground:null,end:null,event:null,exponent:Q,externalResourcesRequired:null,fill:null,fillOpacity:Q,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:Xt,g2:Xt,glyphName:Xt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Q,horizOriginX:Q,horizOriginY:Q,id:null,ideographic:Q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Q,k:Q,k1:Q,k2:Q,k3:Q,k4:Q,kernelMatrix:et,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Q,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:Q,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:Q,overlineThickness:Q,paintOrder:null,panose1:null,path:null,pathLength:Q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:De,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Q,pointsAtY:Q,pointsAtZ:Q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:et,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:et,rev:et,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:et,requiredFeatures:et,requiredFonts:et,requiredFormats:et,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:Q,specularExponent:Q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Q,strikethroughThickness:Q,string:null,stroke:null,strokeDashArray:et,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Q,strokeOpacity:Q,strokeWidth:null,style:null,surfaceScale:Q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:et,tabIndex:Q,tableValues:null,target:null,targetX:Q,targetY:Q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:et,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Q,underlineThickness:Q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Q,values:null,vAlphabetic:Q,vMathematical:Q,vectorEffect:null,vHanging:Q,vIdeographic:Q,version:null,vertAdvY:Q,vertOriginX:Q,vertOriginY:Q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ml}),Pl=en({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Nl=en({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:_l}),Ll=en({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),ng={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"},rg=/[A-Z]/g,Fl=/-[a-z]/g,ig=/^data[-\w.:]+$/i;function og(e,t){const n=eo(t);let r=t,i=Qe;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&ig.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Fl,sg);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Fl.test(o)){let a=o.replace(rg,ag);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=io}return new i(r,t)}function ag(e){return"-"+e.toLowerCase()}function sg(e){return e.charAt(1).toUpperCase()}const lg=Tl([Dl,eg,Pl,Nl,Ll],"html"),oo=Tl([Dl,tg,Pl,Nl,Ll],"svg");function ug(e){return e.join(" ").trim()}var ao={},Rl=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,cg=/\n/g,fg=/^\s*/,dg=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,pg=/^:\s*/,hg=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,mg=/^[;\s]*/,gg=/^\s+|\s+$/g,yg=`
|
|
27
|
+
`,Bl="/",zl="*",Ht="",vg="comment",bg="declaration";function wg(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(cg);h&&(n+=h.length);var g=m.lastIndexOf(yg);r=~g?m.length-g:r+m.length}function o(){var m={line:n,column:r};return function(h){return h.position=new a(m),u(),h}}function a(m){this.start=m,this.end={line:n,column:r},this.source=t.source}a.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 l(m){var h=m.exec(e);if(h){var g=h[0];return i(g),e=e.slice(g.length),h}}function u(){l(fg)}function f(m){var h;for(m=m||[];h=c();)h!==!1&&m.push(h);return m}function c(){var m=o();if(!(Bl!=e.charAt(0)||zl!=e.charAt(1))){for(var h=2;Ht!=e.charAt(h)&&(zl!=e.charAt(h)||Bl!=e.charAt(h+1));)++h;if(h+=2,Ht===e.charAt(h-1))return s("End of comment missing");var g=e.slice(2,h-2);return r+=2,i(g),e=e.slice(h),r+=2,m({type:vg,comment:g})}}function p(){var m=o(),h=l(dg);if(h){if(c(),!l(pg))return s("property missing ':'");var g=l(hg),y=m({type:bg,property:$l(h[0].replace(Rl,Ht)),value:g?$l(g[0].replace(Rl,Ht)):Ht});return l(mg),y}}function d(){var m=[];f(m);for(var h;h=p();)h!==!1&&(m.push(h),f(m));return m}return u(),d()}function $l(e){return e?e.replace(gg,Ht):Ht}var xg=wg,kg=$t&&$t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ao,"__esModule",{value:!0}),ao.default=Eg;const Sg=kg(xg);function Eg(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,Sg.default)(e),i=typeof t=="function";return r.forEach(o=>{if(o.type!=="declaration")return;const{property:a,value:s}=o;i?t(a,s,o):s&&(n=n||{},n[a]=s)}),n}var Er={};Object.defineProperty(Er,"__esModule",{value:!0}),Er.camelCase=void 0;var Cg=/^--[a-zA-Z0-9_-]+$/,Ag=/-([a-z])/g,Ig=/^[^-]+$/,Tg=/^-(webkit|moz|ms|o|khtml)-/,Og=/^-(ms)-/,Dg=function(e){return!e||Ig.test(e)||Cg.test(e)},Mg=function(e,t){return t.toUpperCase()},jl=function(e,t){return"".concat(t,"-")},_g=function(e,t){return t===void 0&&(t={}),Dg(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Og,jl):e=e.replace(Tg,jl),e.replace(Ag,Mg))};Er.camelCase=_g;var Pg=$t&&$t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ng=Pg(ao),Lg=Er;function so(e,t){var n={};return!e||typeof e!="string"||(0,Ng.default)(e,function(r,i){r&&i&&(n[(0,Lg.camelCase)(r,t)]=i)}),n}so.default=so;var Fg=so;const Rg=jt(Fg),Ul=Hl("end"),lo=Hl("start");function Hl(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 Bg(e){const t=lo(e),n=Ul(e);if(t&&n)return{start:t,end:n}}function Fn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Wl(e.position):"start"in e||"end"in e?Wl(e):"line"in e||"column"in e?uo(e):""}function uo(e){return Vl(e&&e.line)+":"+Vl(e&&e.column)}function Wl(e){return uo(e&&e.start)+"-"+uo(e&&e.end)}function Vl(e){return e&&typeof e=="number"?e:1}class He extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},a=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(a=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const s=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=Fn(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}He.prototype.file="",He.prototype.name="",He.prototype.reason="",He.prototype.message="",He.prototype.stack="",He.prototype.column=void 0,He.prototype.line=void 0,He.prototype.ancestors=void 0,He.prototype.cause=void 0,He.prototype.fatal=void 0,He.prototype.place=void 0,He.prototype.ruleId=void 0,He.prototype.source=void 0;const co={}.hasOwnProperty,zg=new Map,$g=/[A-Z]/g,jg=new Set(["table","tbody","thead","tfoot","tr"]),Ug=new Set(["td","th"]),ql="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Hg(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=Jg(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=Qg(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"?oo:lg,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Kl(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Kl(e,t,n){if(t.type==="element")return Wg(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Vg(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Kg(e,t,n);if(t.type==="mdxjsEsm")return qg(e,t);if(t.type==="root")return Yg(e,t,n);if(t.type==="text")return Gg(e,t)}function Wg(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=oo,e.schema=i),e.ancestors.push(t);const o=Gl(e,t.tagName,!1),a=Zg(e,t);let s=po(e,t);return jg.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!Zm(l):!0})),Yl(e,a,o,t),fo(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function Vg(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)}Rn(e,t.position)}function qg(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Rn(e,t.position)}function Kg(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=oo,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Gl(e,t.name,!0),a=Xg(e,t),s=po(e,t);return Yl(e,a,o,t),fo(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function Yg(e,t,n){const r={};return fo(r,po(e,t)),e.create(t,e.Fragment,r,n)}function Gg(e,t){return t.value}function Yl(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function fo(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Qg(e,t,n){return r;function r(i,o,a,s){const u=Array.isArray(a.children)?n:t;return s?u(o,a,s):u(o,a)}}function Jg(e,t){return n;function n(r,i,o,a){const s=Array.isArray(o.children),l=lo(r);return t(i,o,a,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function Zg(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&co.call(t.properties,i)){const o=ey(e,i,t.properties[i]);if(o){const[a,s]=o;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&Ug.has(t.tagName)?r=s:n[a]=s}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Xg(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const a=o.expression;a.type;const s=a.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else Rn(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,o=e.evaluater.evaluateExpression(s.expression)}else Rn(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function po(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:zg;for(;++r<t.children.length;){const o=t.children[r];let a;if(e.passKeys){const l=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(l){const u=i.get(l)||0;a=l+"-"+u,i.set(l,u+1)}}const s=Kl(e,o,a);s!==void 0&&n.push(s)}return n}function ey(e,t,n){const r=og(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Km(n):ug(n)),r.property==="style"){let i=typeof n=="object"?n:ty(e,String(n));return e.stylePropertyNameCase==="css"&&(i=ny(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?ng[r.property]||r.property:r.attribute,n]}}function ty(e,t){try{return Rg(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new He("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=ql+"#cannot-parse-style-attribute",i}}function Gl(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,a;for(;++o<i.length;){const s=Al(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(o&&s.type==="Literal"),optional:!1}:s}r=a}else r=Al(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return co.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Rn(e)}function Rn(e,t){const n=new He("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=ql+"#cannot-handle-mdx-estrees-without-createevaluater",n}function ny(e){const t={};let n;for(n in e)co.call(e,n)&&(t[ry(n)]=e[n]);return t}function ry(e){let t=e.replace($g,iy);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function iy(e){return"-"+e.toLowerCase()}const ho={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"]},oy={};function mo(e,t){const n=oy,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ql(e,r,i)}function Ql(e,t,n){if(ay(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 Jl(e.children,t,n)}return Array.isArray(e)?Jl(e,t,n):""}function Jl(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Ql(e[i],t,n);return r.join("")}function ay(e){return!!(e&&typeof e=="object")}const Zl=document.createElement("i");function go(e){const t="&"+e+";";Zl.innerHTML=t;const n=Zl.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function tt(e,t,n,r){const i=e.length;let o=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);o<r.length;)a=r.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function it(e,t){return e.length>0?(tt(e,e.length,0,t),e):t}const Xl={}.hasOwnProperty;function eu(e){const t={};let n=-1;for(;++n<e.length;)sy(t,e[n]);return t}function sy(e,t){let n;for(n in t){const i=(Xl.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let a;if(o)for(a in o){Xl.call(i,a)||(i[a]=[]);const s=o[a];ly(i[a],Array.isArray(s)?s:s?[s]:[])}}}function ly(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);tt(e,0,0,r)}function tu(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 ut(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const qe=Dt(/[A-Za-z]/),We=Dt(/[\dA-Za-z]/),uy=Dt(/[#-'*+\--9=?A-Z^-~]/);function Cr(e){return e!==null&&(e<32||e===127)}const yo=Dt(/\d/),cy=Dt(/[\dA-Fa-f]/),fy=Dt(/[!-/:-@[-`{-~]/);function ce(e){return e!==null&&e<-2}function Ie(e){return e!==null&&(e<0||e===32)}function ye(e){return e===-2||e===-1||e===32}const Ar=Dt(new RegExp("\\p{P}|\\p{S}","u")),Wt=Dt(/\s/);function Dt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function tn(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(o===37&&We(e.charCodeAt(n+1))&&We(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const s=e.charCodeAt(n+1);o<56320&&s>56319&&s<57344?(a=String.fromCharCode(o,s),i=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function be(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(l){return ye(l)?(e.enter(n),s(l)):t(l)}function s(l){return ye(l)&&o++<i?(e.consume(l),s):(e.exit(n),t(l))}}const dy={tokenize:py};function py(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"),be(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return ce(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),a)}}const hy={tokenize:my},nu={tokenize:gy};function my(e){const t=this,n=[];let r=0,i,o,a;return s;function s(w){if(r<n.length){const A=n[r];return t.containerState=A[1],e.attempt(A[0].continuation,l,u)(w)}return u(w)}function l(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();const A=t.events.length;let k=A,C;for(;k--;)if(t.events[k][0]==="exit"&&t.events[k][1].type==="chunkFlow"){C=t.events[k][1].end;break}y(r);let T=A;for(;T<t.events.length;)t.events[T][1].end={...C},T++;return tt(t.events,k+1,0,t.events.slice(A)),t.events.length=T,u(w)}return s(w)}function u(w){if(r===n.length){if(!i)return p(w);if(i.currentConstruct&&i.currentConstruct.concrete)return m(w);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(nu,f,c)(w)}function f(w){return i&&v(),y(r),p(w)}function c(w){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,m(w)}function p(w){return t.containerState={},e.attempt(nu,d,m)(w)}function d(w){return r++,n.push([t.currentConstruct,t.containerState]),p(w)}function m(w){if(w===null){i&&v(),y(0),e.consume(w);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),h(w)}function h(w){if(w===null){g(e.exit("chunkFlow"),!0),y(0),e.consume(w);return}return ce(w)?(e.consume(w),g(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(w),h)}function g(w,A){const k=t.sliceStream(w);if(A&&k.push(null),w.previous=o,o&&(o.next=w),o=w,i.defineSkip(w.start),i.write(k),t.parser.lazy[w.start.line]){let C=i.events.length;for(;C--;)if(i.events[C][1].start.offset<a&&(!i.events[C][1].end||i.events[C][1].end.offset>a))return;const T=t.events.length;let P=T,R,I;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){if(R){I=t.events[P][1].end;break}R=!0}for(y(r),C=T;C<t.events.length;)t.events[C][1].end={...I},C++;tt(t.events,P+1,0,t.events.slice(T)),t.events.length=C}}function y(w){let A=n.length;for(;A-- >w;){const k=n[A];t.containerState=k[1],k[0].exit.call(t,e)}n.length=w}function v(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function gy(e,t,n){return be(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function nn(e){if(e===null||Ie(e)||Wt(e))return 1;if(Ar(e))return 2}function Ir(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const vo={name:"attention",resolveAll:yy,tokenize:vy};function yy(e,t){let n=-1,r,i,o,a,s,l,u,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},p={...e[n][1].start};ru(c,-l),ru(p,l),a={type:l>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},o={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...a.start},end:{...s.end}},e[r][1].end={...a.start},e[n][1].start={...s.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=it(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=it(u,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),u=it(u,Ir(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=it(u,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,u=it(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,tt(e,r-1,n-r+3,u),n=r+u.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function vy(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=nn(r);let o;return a;function a(l){return o=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===o)return e.consume(l),s;const u=e.exit("attentionSequence"),f=nn(l),c=!f||f===2&&i||n.includes(l),p=!i||i===2&&f||n.includes(r);return u._open=!!(o===42?c:c&&(i||!p)),u._close=!!(o===42?p:p&&(f||!c)),t(l)}}function ru(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const by={name:"autolink",tokenize:wy};function wy(e,t,n){let r=0;return i;function i(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(d){return qe(d)?(e.consume(d),a):d===64?n(d):u(d)}function a(d){return d===43||d===45||d===46||We(d)?(r=1,s(d)):u(d)}function s(d){return d===58?(e.consume(d),r=0,l):(d===43||d===45||d===46||We(d))&&r++<32?(e.consume(d),s):(r=0,u(d))}function l(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||Cr(d)?n(d):(e.consume(d),l)}function u(d){return d===64?(e.consume(d),f):uy(d)?(e.consume(d),u):n(d)}function f(d){return We(d)?c(d):n(d)}function c(d){return d===46?(e.consume(d),r=0,f):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):p(d)}function p(d){if((d===45||We(d))&&r++<63){const m=d===45?p:c;return e.consume(d),m}return n(d)}}const Bn={partial:!0,tokenize:xy};function xy(e,t,n){return r;function r(o){return ye(o)?be(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||ce(o)?t(o):n(o)}}const iu={continuation:{tokenize:Sy},exit:Ey,name:"blockQuote",tokenize:ky};function ky(e,t,n){const r=this;return i;function i(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return n(a)}function o(a){return ye(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function Sy(e,t,n){const r=this;return i;function i(a){return ye(a)?be(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(iu,t,n)(a)}}function Ey(e){e.exit("blockQuote")}const ou={name:"characterEscape",tokenize:Cy};function Cy(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return fy(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const au={name:"characterReference",tokenize:Ay};function Ay(e,t,n){const r=this;let i=0,o,a;return s;function s(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),l}function l(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,a=We,f(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=cy,f):(e.enter("characterReferenceValue"),o=7,a=yo,f(c))}function f(c){if(c===59&&i){const p=e.exit("characterReferenceValue");return a===We&&!go(r.sliceSerialize(p))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(c)&&i++<o?(e.consume(c),f):n(c)}}const su={partial:!0,tokenize:Ty},lu={concrete:!0,name:"codeFenced",tokenize:Iy};function Iy(e,t,n){const r=this,i={partial:!0,tokenize:k};let o=0,a=0,s;return l;function l(C){return u(C)}function u(C){const T=r.events[r.events.length-1];return o=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,s=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(C)}function f(C){return C===s?(a++,e.consume(C),f):a<3?n(C):(e.exit("codeFencedFenceSequence"),ye(C)?be(e,c,"whitespace")(C):c(C))}function c(C){return C===null||ce(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check(su,h,A)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(C))}function p(C){return C===null||ce(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(C)):ye(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),be(e,d,"whitespace")(C)):C===96&&C===s?n(C):(e.consume(C),p)}function d(C){return C===null||ce(C)?c(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(C))}function m(C){return C===null||ce(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(C)):C===96&&C===s?n(C):(e.consume(C),m)}function h(C){return e.attempt(i,A,g)(C)}function g(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),y}function y(C){return o>0&&ye(C)?be(e,v,"linePrefix",o+1)(C):v(C)}function v(C){return C===null||ce(C)?e.check(su,h,A)(C):(e.enter("codeFlowValue"),w(C))}function w(C){return C===null||ce(C)?(e.exit("codeFlowValue"),v(C)):(e.consume(C),w)}function A(C){return e.exit("codeFenced"),t(C)}function k(C,T,P){let R=0;return I;function I(D){return C.enter("lineEnding"),C.consume(D),C.exit("lineEnding"),O}function O(D){return C.enter("codeFencedFence"),ye(D)?be(C,j,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):j(D)}function j(D){return D===s?(C.enter("codeFencedFenceSequence"),M(D)):P(D)}function M(D){return D===s?(R++,C.consume(D),M):R>=a?(C.exit("codeFencedFenceSequence"),ye(D)?be(C,L,"whitespace")(D):L(D)):P(D)}function L(D){return D===null||ce(D)?(C.exit("codeFencedFence"),T(D)):P(D)}}}function Ty(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const bo={name:"codeIndented",tokenize:Dy},Oy={partial:!0,tokenize:My};function Dy(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),be(e,o,"linePrefix",5)(u)}function o(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?l(u):ce(u)?e.attempt(Oy,a,l)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||ce(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),s)}function l(u){return e.exit("codeIndented"),t(u)}}function My(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):ce(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):be(e,o,"linePrefix",5)(a)}function o(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):ce(a)?i(a):n(a)}}const _y={name:"codeText",previous:Ny,resolve:Py,tokenize:Ly};function Py(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 Ny(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Ly(e,t,n){let r=0,i,o;return a;function a(c){return e.enter("codeText"),e.enter("codeTextSequence"),s(c)}function s(c){return c===96?(e.consume(c),r++,s):(e.exit("codeTextSequence"),l(c))}function l(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),l):c===96?(o=e.enter("codeTextSequence"),i=0,f(c)):ce(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(c))}function u(c){return c===null||c===32||c===96||ce(c)?(e.exit("codeTextData"),l(c)):(e.consume(c),u)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(o.type="codeTextData",u(c))}}class Fy{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 o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&zn(this.left,r),o.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),zn(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),zn(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);zn(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);zn(this.left,n.reverse())}}}function zn(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 uu(e){const t={};let n=-1,r,i,o,a,s,l,u;const f=new Fy(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type==="lineEndingBlank"&&(o+=2),o<l.length&&l[o][1].type==="content"))for(;++o<l.length&&l[o][1].type!=="content";)l[o][1].type==="chunkText"&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Ry(f,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(a=f.get(o),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},s=f.slice(i,n),s.unshift(r),f.splice(i,n-i+1,s))}}return tt(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function Ry(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const s=a.events,l=[],u={};let f,c,p=-1,d=n,m=0,h=0;const g=[h];for(;d;){for(;e.get(++i)[1]!==d;);o.push(i),d._tokenizer||(f=r.sliceStream(d),d.next||f.push(null),c&&a.defineSkip(d.start),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(f),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),c=d,d=d.next}for(d=n;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(h=p+1,g.push(h),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(a.events=[],d?(d._tokenizer=void 0,d.previous=void 0):g.pop(),p=g.length;p--;){const y=s.slice(g[p],g[p+1]),v=o.pop();l.push([v,v+y.length-1]),e.splice(v,2,y)}for(l.reverse(),p=-1;++p<l.length;)u[m+l[p][0]]=m+l[p][1],m+=l[p][1]-l[p][0]-1;return u}const By={resolve:$y,tokenize:jy},zy={partial:!0,tokenize:Uy};function $y(e){return uu(e),e}function jy(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):ce(s)?e.check(zy,a,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Uy(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),be(e,o,"linePrefix")}function o(a){if(a===null||ce(a))return n(a);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function cu(e,t,n,r,i,o,a,s,l){const u=l||Number.POSITIVE_INFINITY;let f=0;return c;function c(y){return y===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(y),e.exit(o),p):y===null||y===32||y===41||Cr(y)?n(y):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(y))}function p(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),d(y))}function d(y){return y===62?(e.exit("chunkString"),e.exit(s),p(y)):y===null||y===60||ce(y)?n(y):(e.consume(y),y===92?m:d)}function m(y){return y===60||y===62||y===92?(e.consume(y),d):d(y)}function h(y){return!f&&(y===null||y===41||Ie(y))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(y)):f<u&&y===40?(e.consume(y),f++,h):y===41?(e.consume(y),f--,h):y===null||y===32||y===40||Cr(y)?n(y):(e.consume(y),y===92?g:h)}function g(y){return y===40||y===41||y===92?(e.consume(y),h):h(y)}}function fu(e,t,n,r,i,o){const a=this;let s=0,l;return u;function u(d){return e.enter(r),e.enter(i),e.consume(d),e.exit(i),e.enter(o),f}function f(d){return s>999||d===null||d===91||d===93&&!l||d===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):d===93?(e.exit(o),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):ce(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===null||d===91||d===93||ce(d)||s++>999?(e.exit("chunkString"),f(d)):(e.consume(d),l||(l=!ye(d)),d===92?p:c)}function p(d){return d===91||d===92||d===93?(e.consume(d),s++,c):c(d)}}function du(e,t,n,r,i,o){let a;return s;function s(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),a=p===40?41:p,l):n(p)}function l(p){return p===a?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),u(p))}function u(p){return p===a?(e.exit(o),l(a)):p===null?n(p):ce(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),be(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===a||p===null||ce(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?c:f)}function c(p){return p===a||p===92?(e.consume(p),f):f(p)}}function $n(e,t){let n;return r;function r(i){return ce(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ye(i)?be(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Hy={name:"definition",tokenize:Vy},Wy={partial:!0,tokenize:qy};function Vy(e,t,n){const r=this;let i;return o;function o(d){return e.enter("definition"),a(d)}function a(d){return fu.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function s(d){return i=ut(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),l):n(d)}function l(d){return Ie(d)?$n(e,u)(d):u(d)}function u(d){return cu(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function f(d){return e.attempt(Wy,c,c)(d)}function c(d){return ye(d)?be(e,p,"whitespace")(d):p(d)}function p(d){return d===null||ce(d)?(e.exit("definition"),r.parser.defined.push(i),t(d)):n(d)}}function qy(e,t,n){return r;function r(s){return Ie(s)?$n(e,i)(s):n(s)}function i(s){return du(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return ye(s)?be(e,a,"whitespace")(s):a(s)}function a(s){return s===null||ce(s)?t(s):n(s)}}const Ky={name:"hardBreakEscape",tokenize:Yy};function Yy(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return ce(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Gy={name:"headingAtx",resolve:Qy,tokenize:Jy};function Qy(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},tt(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Jy(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),a(f)}function a(f){return f===35&&r++<6?(e.consume(f),a):f===null||Ie(f)?(e.exit("atxHeadingSequence"),s(f)):n(f)}function s(f){return f===35?(e.enter("atxHeadingSequence"),l(f)):f===null||ce(f)?(e.exit("atxHeading"),t(f)):ye(f)?be(e,s,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function l(f){return f===35?(e.consume(f),l):(e.exit("atxHeadingSequence"),s(f))}function u(f){return f===null||f===35||Ie(f)?(e.exit("atxHeadingText"),s(f)):(e.consume(f),u)}}const Zy=["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"],pu=["pre","script","style","textarea"],Xy={concrete:!0,name:"htmlFlow",resolveTo:nv,tokenize:rv},ev={partial:!0,tokenize:ov},tv={partial:!0,tokenize:iv};function nv(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 rv(e,t,n){const r=this;let i,o,a,s,l;return u;function u(x){return f(x)}function f(x){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(x),c}function c(x){return x===33?(e.consume(x),p):x===47?(e.consume(x),o=!0,h):x===63?(e.consume(x),i=3,r.interrupt?t:b):qe(x)?(e.consume(x),a=String.fromCharCode(x),g):n(x)}function p(x){return x===45?(e.consume(x),i=2,d):x===91?(e.consume(x),i=5,s=0,m):qe(x)?(e.consume(x),i=4,r.interrupt?t:b):n(x)}function d(x){return x===45?(e.consume(x),r.interrupt?t:b):n(x)}function m(x){const W="CDATA[";return x===W.charCodeAt(s++)?(e.consume(x),s===W.length?r.interrupt?t:j:m):n(x)}function h(x){return qe(x)?(e.consume(x),a=String.fromCharCode(x),g):n(x)}function g(x){if(x===null||x===47||x===62||Ie(x)){const W=x===47,ee=a.toLowerCase();return!W&&!o&&pu.includes(ee)?(i=1,r.interrupt?t(x):j(x)):Zy.includes(a.toLowerCase())?(i=6,W?(e.consume(x),y):r.interrupt?t(x):j(x)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(x):o?v(x):w(x))}return x===45||We(x)?(e.consume(x),a+=String.fromCharCode(x),g):n(x)}function y(x){return x===62?(e.consume(x),r.interrupt?t:j):n(x)}function v(x){return ye(x)?(e.consume(x),v):I(x)}function w(x){return x===47?(e.consume(x),I):x===58||x===95||qe(x)?(e.consume(x),A):ye(x)?(e.consume(x),w):I(x)}function A(x){return x===45||x===46||x===58||x===95||We(x)?(e.consume(x),A):k(x)}function k(x){return x===61?(e.consume(x),C):ye(x)?(e.consume(x),k):w(x)}function C(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),l=x,T):ye(x)?(e.consume(x),C):P(x)}function T(x){return x===l?(e.consume(x),l=null,R):x===null||ce(x)?n(x):(e.consume(x),T)}function P(x){return x===null||x===34||x===39||x===47||x===60||x===61||x===62||x===96||Ie(x)?k(x):(e.consume(x),P)}function R(x){return x===47||x===62||ye(x)?w(x):n(x)}function I(x){return x===62?(e.consume(x),O):n(x)}function O(x){return x===null||ce(x)?j(x):ye(x)?(e.consume(x),O):n(x)}function j(x){return x===45&&i===2?(e.consume(x),z):x===60&&i===1?(e.consume(x),U):x===62&&i===4?(e.consume(x),N):x===63&&i===3?(e.consume(x),b):x===93&&i===5?(e.consume(x),V):ce(x)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(ev,H,M)(x)):x===null||ce(x)?(e.exit("htmlFlowData"),M(x)):(e.consume(x),j)}function M(x){return e.check(tv,L,H)(x)}function L(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),D}function D(x){return x===null||ce(x)?M(x):(e.enter("htmlFlowData"),j(x))}function z(x){return x===45?(e.consume(x),b):j(x)}function U(x){return x===47?(e.consume(x),a="",$):j(x)}function $(x){if(x===62){const W=a.toLowerCase();return pu.includes(W)?(e.consume(x),N):j(x)}return qe(x)&&a.length<8?(e.consume(x),a+=String.fromCharCode(x),$):j(x)}function V(x){return x===93?(e.consume(x),b):j(x)}function b(x){return x===62?(e.consume(x),N):x===45&&i===2?(e.consume(x),b):j(x)}function N(x){return x===null||ce(x)?(e.exit("htmlFlowData"),H(x)):(e.consume(x),N)}function H(x){return e.exit("htmlFlow"),t(x)}}function iv(e,t,n){const r=this;return i;function i(a){return ce(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):n(a)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function ov(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Bn,t,n)}}const av={name:"htmlText",tokenize:sv};function sv(e,t,n){const r=this;let i,o,a;return s;function s(b){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(b),l}function l(b){return b===33?(e.consume(b),u):b===47?(e.consume(b),k):b===63?(e.consume(b),w):qe(b)?(e.consume(b),P):n(b)}function u(b){return b===45?(e.consume(b),f):b===91?(e.consume(b),o=0,m):qe(b)?(e.consume(b),v):n(b)}function f(b){return b===45?(e.consume(b),d):n(b)}function c(b){return b===null?n(b):b===45?(e.consume(b),p):ce(b)?(a=c,U(b)):(e.consume(b),c)}function p(b){return b===45?(e.consume(b),d):c(b)}function d(b){return b===62?z(b):b===45?p(b):c(b)}function m(b){const N="CDATA[";return b===N.charCodeAt(o++)?(e.consume(b),o===N.length?h:m):n(b)}function h(b){return b===null?n(b):b===93?(e.consume(b),g):ce(b)?(a=h,U(b)):(e.consume(b),h)}function g(b){return b===93?(e.consume(b),y):h(b)}function y(b){return b===62?z(b):b===93?(e.consume(b),y):h(b)}function v(b){return b===null||b===62?z(b):ce(b)?(a=v,U(b)):(e.consume(b),v)}function w(b){return b===null?n(b):b===63?(e.consume(b),A):ce(b)?(a=w,U(b)):(e.consume(b),w)}function A(b){return b===62?z(b):w(b)}function k(b){return qe(b)?(e.consume(b),C):n(b)}function C(b){return b===45||We(b)?(e.consume(b),C):T(b)}function T(b){return ce(b)?(a=T,U(b)):ye(b)?(e.consume(b),T):z(b)}function P(b){return b===45||We(b)?(e.consume(b),P):b===47||b===62||Ie(b)?R(b):n(b)}function R(b){return b===47?(e.consume(b),z):b===58||b===95||qe(b)?(e.consume(b),I):ce(b)?(a=R,U(b)):ye(b)?(e.consume(b),R):z(b)}function I(b){return b===45||b===46||b===58||b===95||We(b)?(e.consume(b),I):O(b)}function O(b){return b===61?(e.consume(b),j):ce(b)?(a=O,U(b)):ye(b)?(e.consume(b),O):R(b)}function j(b){return b===null||b===60||b===61||b===62||b===96?n(b):b===34||b===39?(e.consume(b),i=b,M):ce(b)?(a=j,U(b)):ye(b)?(e.consume(b),j):(e.consume(b),L)}function M(b){return b===i?(e.consume(b),i=void 0,D):b===null?n(b):ce(b)?(a=M,U(b)):(e.consume(b),M)}function L(b){return b===null||b===34||b===39||b===60||b===61||b===96?n(b):b===47||b===62||Ie(b)?R(b):(e.consume(b),L)}function D(b){return b===47||b===62||Ie(b)?R(b):n(b)}function z(b){return b===62?(e.consume(b),e.exit("htmlTextData"),e.exit("htmlText"),t):n(b)}function U(b){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),$}function $(b){return ye(b)?be(e,V,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):V(b)}function V(b){return e.enter("htmlTextData"),a(b)}}const wo={name:"labelEnd",resolveAll:fv,resolveTo:dv,tokenize:pv},lv={tokenize:hv},uv={tokenize:mv},cv={tokenize:gv};function fv(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&tt(e,0,e.length,n),e}function dv(e,t){let n=e.length,r=0,i,o,a,s;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const l={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[a][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[a-2][1].start}};return s=[["enter",l,t],["enter",u,t]],s=it(s,e.slice(o+1,o+r+3)),s=it(s,[["enter",f,t]]),s=it(s,Ir(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),s=it(s,[["exit",f,t],e[a-2],e[a-1],["exit",u,t]]),s=it(s,e.slice(a+1)),s=it(s,[["exit",l,t]]),tt(e,o,e.length,s),e}function pv(e,t,n){const r=this;let i=r.events.length,o,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return s;function s(p){return o?o._inactive?c(p):(a=r.parser.defined.includes(ut(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),l):n(p)}function l(p){return p===40?e.attempt(lv,f,a?f:c)(p):p===91?e.attempt(uv,f,a?u:c)(p):a?f(p):c(p)}function u(p){return e.attempt(cv,f,c)(p)}function f(p){return t(p)}function c(p){return o._balanced=!0,n(p)}}function hv(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return Ie(c)?$n(e,o)(c):o(c)}function o(c){return c===41?f(c):cu(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function a(c){return Ie(c)?$n(e,l)(c):f(c)}function s(c){return n(c)}function l(c){return c===34||c===39||c===40?du(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function u(c){return Ie(c)?$n(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function mv(e,t,n){const r=this;return i;function i(s){return fu.call(r,e,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(ut(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function gv(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const yv={name:"labelStartImage",resolveAll:wo.resolveAll,tokenize:vv};function vv(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const bv={name:"labelStartLink",resolveAll:wo.resolveAll,tokenize:wv};function wv(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const xo={name:"lineEnding",tokenize:xv};function xv(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),be(e,t,"linePrefix")}}const Tr={name:"thematicBreak",tokenize:kv};function kv(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),a(u)}function a(u){return i=u,s(u)}function s(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||ce(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),ye(u)?be(e,s,"whitespace")(u):s(u))}}const Je={continuation:{tokenize:Av},exit:Tv,name:"list",tokenize:Cv},Sv={partial:!0,tokenize:Ov},Ev={partial:!0,tokenize:Iv};function Cv(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return s;function s(d){const m=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:yo(d)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(Tr,n,u)(d):u(d);if(!r.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(d)}return n(d)}function l(d){return yo(d)&&++a<10?(e.consume(d),l):(!r.interrupt||a<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),u(d)):n(d)}function u(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,e.check(Bn,r.interrupt?n:f,e.attempt(Sv,p,c))}function f(d){return r.containerState.initialBlankLine=!0,o++,p(d)}function c(d){return ye(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),p):n(d)}function p(d){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function Av(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Bn,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,be(e,t,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!ye(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Ev,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,be(e,e.attempt(Je,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function Iv(e,t,n){const r=this;return be(e,i,"listItemIndent",r.containerState.size+1);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(o):n(o)}}function Tv(e){e.exit(this.containerState.type)}function Ov(e,t,n){const r=this;return be(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const a=r.events[r.events.length-1];return!ye(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const hu={name:"setextUnderline",resolveTo:Dv,tokenize:Mv};function Dv(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function Mv(e,t,n){const r=this;let i;return o;function o(u){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=u,a(u)):n(u)}function a(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),ye(u)?be(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||ce(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const _v={tokenize:Pv};function Pv(e){const t=this,n=e.attempt(Bn,r,e.attempt(this.parser.constructs.flowInitial,i,be(e,e.attempt(this.parser.constructs.flow,i,e.attempt(By,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Nv={resolveAll:gu()},Lv=mu("string"),Fv=mu("text");function mu(e){return{resolveAll:gu(e==="text"?Rv:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,a,s);return a;function a(f){return u(f)?o(f):s(f)}function s(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),l}function l(f){return u(f)?(n.exit("data"),o(f)):(n.consume(f),l)}function u(f){if(f===null)return!0;const c=i[f];let p=-1;if(c)for(;++p<c.length;){const d=c[p];if(!d.previous||d.previous.call(r,r.previous))return!0}return!1}}}function gu(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function Rv(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,a=-1,s=0,l;for(;o--;){const u=i[o];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(u===-2)l=!0,s++;else if(u!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const u={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?a:r.start._bufferIndex+a,_index:r.start._index+o,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const Bv=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:Hy},disable:{null:[]},document:{42:Je,43:Je,45:Je,48:Je,49:Je,50:Je,51:Je,52:Je,53:Je,54:Je,55:Je,56:Je,57:Je,62:iu},flow:{35:Gy,42:Tr,45:[hu,Tr],60:Xy,61:hu,95:Tr,96:lu,126:lu},flowInitial:{[-2]:bo,[-1]:bo,32:bo},insideSpan:{null:[vo,Nv]},string:{38:au,92:ou},text:{[-5]:xo,[-4]:xo,[-3]:xo,33:yv,38:au,42:vo,60:[by,av],91:bv,92:[Ky,ou],93:wo,95:vo,96:_y}},Symbol.toStringTag,{value:"Module"}));function zv(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let a=[],s=[];const l={attempt:T(k),check:T(C),consume:v,enter:w,exit:A,interrupt:T(C,{interrupt:!0})},u={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:p,sliceStream:d,write:c};let f=t.tokenize.call(u,l);return t.resolveAll&&o.push(t),u;function c(O){return a=it(a,O),g(),a[a.length-1]!==null?[]:(P(t,0),u.events=Ir(o,u.events,u),u.events)}function p(O,j){return jv(d(O),j)}function d(O){return $v(a,O)}function m(){const{_bufferIndex:O,_index:j,line:M,column:L,offset:D}=r;return{_bufferIndex:O,_index:j,line:M,column:L,offset:D}}function h(O){i[O.line]=O.column,I()}function g(){let O;for(;r._index<a.length;){const j=a[r._index];if(typeof j=="string")for(O=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===O&&r._bufferIndex<j.length;)y(j.charCodeAt(r._bufferIndex));else y(j)}}function y(O){f=f(O)}function v(O){ce(O)?(r.line++,r.column=1,r.offset+=O===-3?2:1,I()):O!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=O}function w(O,j){const M=j||{};return M.type=O,M.start=m(),u.events.push(["enter",M,u]),s.push(M),M}function A(O){const j=s.pop();return j.end=m(),u.events.push(["exit",j,u]),j}function k(O,j){P(O,j.from)}function C(O,j){j.restore()}function T(O,j){return M;function M(L,D,z){let U,$,V,b;return Array.isArray(L)?H(L):"tokenize"in L?H([L]):N(L);function N(Y){return J;function J(X){const ie=X!==null&&Y[X],K=X!==null&&Y.null,te=[...Array.isArray(ie)?ie:ie?[ie]:[],...Array.isArray(K)?K:K?[K]:[]];return H(te)(X)}}function H(Y){return U=Y,$=0,Y.length===0?z:x(Y[$])}function x(Y){return J;function J(X){return b=R(),V=Y,Y.partial||(u.currentConstruct=Y),Y.name&&u.parser.constructs.disable.null.includes(Y.name)?ee():Y.tokenize.call(j?Object.assign(Object.create(u),j):u,l,W,ee)(X)}}function W(Y){return O(V,b),D}function ee(Y){return b.restore(),++$<U.length?x(U[$]):z}}}function P(O,j){O.resolveAll&&!o.includes(O)&&o.push(O),O.resolve&&tt(u.events,j,u.events.length-j,O.resolve(u.events.slice(j),u)),O.resolveTo&&(u.events=O.resolveTo(u.events,u))}function R(){const O=m(),j=u.previous,M=u.currentConstruct,L=u.events.length,D=Array.from(s);return{from:L,restore:z};function z(){r=O,u.previous=j,u.currentConstruct=M,u.events.length=L,s=D,I()}}function I(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function $v(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,o)];else{if(a=e.slice(n,i),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function jv(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
|
|
28
|
+
`;break}case-3:{a=`\r
|
|
29
|
+
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,r.push(a)}return r.join("")}function Uv(e){const r={constructs:eu([Bv,...(e||{}).extensions||[]]),content:i(dy),defined:[],document:i(hy),flow:i(_v),lazy:{},string:i(Lv),text:i(Fv)};return r;function i(o){return a;function a(s){return zv(r,o,s)}}}function Hv(e){for(;!uu(e););return e}const yu=/[\0\t\n\r]/g;function Wv(){let e=1,t="",n=!0,r;return i;function i(o,a,s){const l=[];let u,f,c,p,d;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),c=0,t="",n&&(o.charCodeAt(0)===65279&&c++,n=void 0);c<o.length;){if(yu.lastIndex=c,u=yu.exec(o),p=u&&u.index!==void 0?u.index:o.length,d=o.charCodeAt(p),!u){t=o.slice(c);break}if(d===10&&c===p&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),c<p&&(l.push(o.slice(c,p)),e+=p-c),d){case 0:{l.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,l.push(-2);e++<f;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}c=p+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const Vv=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function qv(e){return e.replace(Vv,Kv)}function Kv(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return tu(n.slice(o?2:1),o?16:10)}return go(n)||e}const vu={}.hasOwnProperty;function Yv(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Gv(n)(Hv(Uv(n).document().write(Wv()(e,t,!0))))}function Gv(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(de),autolinkProtocol:R,autolinkEmail:R,atxHeading:o(ke),blockQuote:o(K),characterEscape:R,characterReference:R,codeFenced:o(te),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(te,a),codeText:o(F,a),codeTextData:R,data:R,codeFlowValue:R,definition:o(ne),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(me),hardBreakEscape:o(oe),hardBreakTrailing:o(oe),htmlFlow:o(G,a),htmlFlowData:R,htmlText:o(G,a),htmlTextData:R,image:o(ue),label:a,link:o(de),listItem:o(Se),listItemValue:p,listOrdered:o(we,c),listUnordered:o(we),paragraph:o(Ue),reference:x,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(ke),strong:o(Ye),thematicBreak:o(se)},exit:{atxHeading:l(),atxHeadingSequence:k,autolink:l(),autolinkEmail:ie,autolinkProtocol:X,blockQuote:l(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:ee,characterReferenceMarkerNumeric:ee,characterReferenceValue:Y,characterReference:J,codeFenced:l(g),codeFencedFence:h,codeFencedFenceInfo:d,codeFencedFenceMeta:m,codeFlowValue:I,codeIndented:l(y),codeText:l(D),codeTextData:I,data:I,definition:l(),definitionDestinationString:A,definitionLabelString:v,definitionTitleString:w,emphasis:l(),hardBreakEscape:l(j),hardBreakTrailing:l(j),htmlFlow:l(M),htmlFlowData:I,htmlText:l(L),htmlTextData:I,image:l(U),label:V,labelText:$,lineEnding:O,link:l(z),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:W,resourceDestinationString:b,resourceTitleString:N,resource:H,setextHeading:l(P),setextHeadingLineSequence:T,setextHeadingText:C,strong:l(),thematicBreak:l()}};bu(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(B){let q={type:"root",children:[]};const ae={stack:[q],tokenStack:[],config:t,enter:s,exit:u,buffer:a,resume:f,data:n},le=[];let pe=-1;for(;++pe<B.length;)if(B[pe][1].type==="listOrdered"||B[pe][1].type==="listUnordered")if(B[pe][0]==="enter")le.push(pe);else{const fe=le.pop();pe=i(B,fe,pe)}for(pe=-1;++pe<B.length;){const fe=t[B[pe][0]];vu.call(fe,B[pe][1].type)&&fe[B[pe][1].type].call(Object.assign({sliceSerialize:B[pe][2].sliceSerialize},ae),B[pe][1])}if(ae.tokenStack.length>0){const fe=ae.tokenStack[ae.tokenStack.length-1];(fe[1]||wu).call(ae,void 0,fe[0])}for(q.position={start:Mt(B.length>0?B[0][1].start:{line:1,column:1,offset:0}),end:Mt(B.length>0?B[B.length-2][1].end:{line:1,column:1,offset:0})},pe=-1;++pe<t.transforms.length;)q=t.transforms[pe](q)||q;return q}function i(B,q,ae){let le=q-1,pe=-1,fe=!1,Ee,Oe,st,gt;for(;++le<=ae;){const ze=B[le];switch(ze[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ze[0]==="enter"?pe++:pe--,gt=void 0;break}case"lineEndingBlank":{ze[0]==="enter"&&(Ee&&!gt&&!pe&&!st&&(st=le),gt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:gt=void 0}if(!pe&&ze[0]==="enter"&&ze[1].type==="listItemPrefix"||pe===-1&&ze[0]==="exit"&&(ze[1].type==="listUnordered"||ze[1].type==="listOrdered")){if(Ee){let lt=le;for(Oe=void 0;lt--;){const Ge=B[lt];if(Ge[1].type==="lineEnding"||Ge[1].type==="lineEndingBlank"){if(Ge[0]==="exit")continue;Oe&&(B[Oe][1].type="lineEndingBlank",fe=!0),Ge[1].type="lineEnding",Oe=lt}else if(!(Ge[1].type==="linePrefix"||Ge[1].type==="blockQuotePrefix"||Ge[1].type==="blockQuotePrefixWhitespace"||Ge[1].type==="blockQuoteMarker"||Ge[1].type==="listItemIndent"))break}st&&(!Oe||st<Oe)&&(Ee._spread=!0),Ee.end=Object.assign({},Oe?B[Oe][1].start:ze[1].end),B.splice(Oe||le,0,["exit",Ee,ze[2]]),le++,ae++}if(ze[1].type==="listItemPrefix"){const lt={type:"listItem",_spread:!1,start:Object.assign({},ze[1].start),end:void 0};Ee=lt,B.splice(le,0,["enter",lt,ze[2]]),le++,ae++,st=void 0,gt=!0}}}return B[q][1]._spread=fe,ae}function o(B,q){return ae;function ae(le){s.call(this,B(le),le),q&&q.call(this,le)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(B,q,ae){this.stack[this.stack.length-1].children.push(B),this.stack.push(B),this.tokenStack.push([q,ae||void 0]),B.position={start:Mt(q.start),end:void 0}}function l(B){return q;function q(ae){B&&B.call(this,ae),u.call(this,ae)}}function u(B,q){const ae=this.stack.pop(),le=this.tokenStack.pop();if(le)le[0].type!==B.type&&(q?q.call(this,B,le[0]):(le[1]||wu).call(this,B,le[0]));else throw new Error("Cannot close `"+B.type+"` ("+Fn({start:B.start,end:B.end})+"): it’s not open");ae.position.end=Mt(B.end)}function f(){return mo(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function p(B){if(this.data.expectingFirstListItemValue){const q=this.stack[this.stack.length-2];q.start=Number.parseInt(this.sliceSerialize(B),10),this.data.expectingFirstListItemValue=void 0}}function d(){const B=this.resume(),q=this.stack[this.stack.length-1];q.lang=B}function m(){const B=this.resume(),q=this.stack[this.stack.length-1];q.meta=B}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const B=this.resume(),q=this.stack[this.stack.length-1];q.value=B.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const B=this.resume(),q=this.stack[this.stack.length-1];q.value=B.replace(/(\r?\n|\r)$/g,"")}function v(B){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.label=q,ae.identifier=ut(this.sliceSerialize(B)).toLowerCase()}function w(){const B=this.resume(),q=this.stack[this.stack.length-1];q.title=B}function A(){const B=this.resume(),q=this.stack[this.stack.length-1];q.url=B}function k(B){const q=this.stack[this.stack.length-1];if(!q.depth){const ae=this.sliceSerialize(B).length;q.depth=ae}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function T(B){const q=this.stack[this.stack.length-1];q.depth=this.sliceSerialize(B).codePointAt(0)===61?1:2}function P(){this.data.setextHeadingSlurpLineEnding=void 0}function R(B){const ae=this.stack[this.stack.length-1].children;let le=ae[ae.length-1];(!le||le.type!=="text")&&(le=Z(),le.position={start:Mt(B.start),end:void 0},ae.push(le)),this.stack.push(le)}function I(B){const q=this.stack.pop();q.value+=this.sliceSerialize(B),q.position.end=Mt(B.end)}function O(B){const q=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ae=q.children[q.children.length-1];ae.position.end=Mt(B.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(q.type)&&(R.call(this,B),I.call(this,B))}function j(){this.data.atHardBreak=!0}function M(){const B=this.resume(),q=this.stack[this.stack.length-1];q.value=B}function L(){const B=this.resume(),q=this.stack[this.stack.length-1];q.value=B}function D(){const B=this.resume(),q=this.stack[this.stack.length-1];q.value=B}function z(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const q=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=q,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function U(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const q=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=q,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function $(B){const q=this.sliceSerialize(B),ae=this.stack[this.stack.length-2];ae.label=qv(q),ae.identifier=ut(q).toLowerCase()}function V(){const B=this.stack[this.stack.length-1],q=this.resume(),ae=this.stack[this.stack.length-1];if(this.data.inReference=!0,ae.type==="link"){const le=B.children;ae.children=le}else ae.alt=q}function b(){const B=this.resume(),q=this.stack[this.stack.length-1];q.url=B}function N(){const B=this.resume(),q=this.stack[this.stack.length-1];q.title=B}function H(){this.data.inReference=void 0}function x(){this.data.referenceType="collapsed"}function W(B){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.label=q,ae.identifier=ut(this.sliceSerialize(B)).toLowerCase(),this.data.referenceType="full"}function ee(B){this.data.characterReferenceType=B.type}function Y(B){const q=this.sliceSerialize(B),ae=this.data.characterReferenceType;let le;ae?(le=tu(q,ae==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):le=go(q);const pe=this.stack[this.stack.length-1];pe.value+=le}function J(B){const q=this.stack.pop();q.position.end=Mt(B.end)}function X(B){I.call(this,B);const q=this.stack[this.stack.length-1];q.url=this.sliceSerialize(B)}function ie(B){I.call(this,B);const q=this.stack[this.stack.length-1];q.url="mailto:"+this.sliceSerialize(B)}function K(){return{type:"blockquote",children:[]}}function te(){return{type:"code",lang:null,meta:null,value:""}}function F(){return{type:"inlineCode",value:""}}function ne(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function me(){return{type:"emphasis",children:[]}}function ke(){return{type:"heading",depth:0,children:[]}}function oe(){return{type:"break"}}function G(){return{type:"html",value:""}}function ue(){return{type:"image",title:null,url:"",alt:null}}function de(){return{type:"link",title:null,url:"",children:[]}}function we(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 Ue(){return{type:"paragraph",children:[]}}function Ye(){return{type:"strong",children:[]}}function Z(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}function Mt(e){return{line:e.line,column:e.column,offset:e.offset}}function bu(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?bu(e,r):Qv(e,r)}}function Qv(e,t){let n;for(n in t)if(vu.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 wu(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Fn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Fn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Fn({start:t.start,end:t.end})+") is still open")}function Jv(e){const t=this;t.parser=n;function n(r){return Yv(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Zv(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 Xv(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
30
|
+
`}]}function eb(e,t){const n=t.value?t.value+`
|
|
31
|
+
`:"",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 tb(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function nb(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function rb(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=tn(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=o+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function ib(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 ob(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function xu(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function ab(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return xu(e,t);const i={src:tn(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function sb(e,t){const n={src:tn(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 lb(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 ub(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return xu(e,t);const i={href:tn(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function cb(e,t){const n={href:tn(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 fb(e,t,n){const r=e.all(t),i=n?db(n):ku(t),o={},a=[];if(typeof t.checked=="boolean"){const f=r[0];let c;f&&f.type==="element"&&f.tagName==="p"?c=f:(c={type:"element",tagName:"p",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const f=r[s];(i||s!==0||f.type!=="element"||f.tagName!=="p")&&a.push({type:"text",value:`
|
|
32
|
+
`}),f.type==="element"&&f.tagName==="p"&&!i?a.push(...f.children):a.push(f)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
|
|
33
|
+
`});const u={type:"element",tagName:"li",properties:o,children:a};return e.patch(t,u),e.applyData(t,u)}function db(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=ku(n[r])}return t}function ku(e){const t=e.spread;return t??e.children.length>1}function pb(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 a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function hb(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mb(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function gb(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yb(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=lo(t.children[1]),l=Ul(t.children[t.children.length-1]);s&&l&&(a.position={start:s,end:l}),i.push(a)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function vb(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,s=a?a.length:t.children.length;let l=-1;const u=[];for(;++l<s;){const c=t.children[l],p={},d=a?a[l]:void 0;d&&(p.align=d);let m={type:"element",tagName:o,properties:p,children:[]};c&&(m.children=e.all(c),e.patch(c,m),m=e.applyData(c,m)),u.push(m)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,f),e.applyData(t,f)}function bb(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Su=9,Eu=32;function wb(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(Cu(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Cu(t.slice(i),i>0,!1)),o.join("")}function Cu(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===Su||o===Eu;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===Su||o===Eu;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function xb(e,t){const n={type:"text",value:wb(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function kb(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Sb={blockquote:Zv,break:Xv,code:eb,delete:tb,emphasis:nb,footnoteReference:rb,heading:ib,html:ob,imageReference:ab,image:sb,inlineCode:lb,linkReference:ub,link:cb,listItem:fb,list:pb,paragraph:hb,root:mb,strong:gb,table:yb,tableCell:bb,tableRow:vb,text:xb,thematicBreak:kb,toml:Or,yaml:Or,definition:Or,footnoteDefinition:Or};function Or(){}const Au=-1,Dr=0,jn=1,Mr=2,ko=3,So=4,Eo=5,Co=6,Iu=7,Tu=8,Ou=typeof self=="object"?self:globalThis,Eb=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,a]=t[i];switch(o){case Dr:case Au:return n(a,i);case jn:{const s=n([],i);for(const l of a)s.push(r(l));return s}case Mr:{const s=n({},i);for(const[l,u]of a)s[r(l)]=r(u);return s}case ko:return n(new Date(a),i);case So:{const{source:s,flags:l}=a;return n(new RegExp(s,l),i)}case Eo:{const s=n(new Map,i);for(const[l,u]of a)s.set(r(l),r(u));return s}case Co:{const s=n(new Set,i);for(const l of a)s.add(r(l));return s}case Iu:{const{name:s,message:l}=a;return n(new Ou[s](l),i)}case Tu:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:s}=new Uint8Array(a);return n(new DataView(s),a)}}return n(new Ou[o](a),i)};return r},Du=e=>Eb(new Map,e)(0),rn="",{toString:Cb}={},{keys:Ab}=Object,Un=e=>{const t=typeof e;if(t!=="object"||!e)return[Dr,t];const n=Cb.call(e).slice(8,-1);switch(n){case"Array":return[jn,rn];case"Object":return[Mr,rn];case"Date":return[ko,rn];case"RegExp":return[So,rn];case"Map":return[Eo,rn];case"Set":return[Co,rn];case"DataView":return[jn,n]}return n.includes("Array")?[jn,n]:n.includes("Error")?[Iu,n]:[Mr,n]},_r=([e,t])=>e===Dr&&(t==="function"||t==="symbol"),Ib=(e,t,n,r)=>{const i=(a,s)=>{const l=r.push(a)-1;return n.set(s,l),l},o=a=>{if(n.has(a))return n.get(a);let[s,l]=Un(a);switch(s){case Dr:{let f=a;switch(l){case"bigint":s=Tu,f=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);f=null;break;case"undefined":return i([Au],a)}return i([s,f],a)}case jn:{if(l){let p=a;return l==="DataView"?p=new Uint8Array(a.buffer):l==="ArrayBuffer"&&(p=new Uint8Array(a)),i([l,[...p]],a)}const f=[],c=i([s,f],a);for(const p of a)f.push(o(p));return c}case Mr:{if(l)switch(l){case"BigInt":return i([l,a.toString()],a);case"Boolean":case"Number":case"String":return i([l,a.valueOf()],a)}if(t&&"toJSON"in a)return o(a.toJSON());const f=[],c=i([s,f],a);for(const p of Ab(a))(e||!_r(Un(a[p])))&&f.push([o(p),o(a[p])]);return c}case ko:return i([s,a.toISOString()],a);case So:{const{source:f,flags:c}=a;return i([s,{source:f,flags:c}],a)}case Eo:{const f=[],c=i([s,f],a);for(const[p,d]of a)(e||!(_r(Un(p))||_r(Un(d))))&&f.push([o(p),o(d)]);return c}case Co:{const f=[],c=i([s,f],a);for(const p of a)(e||!_r(Un(p)))&&f.push(o(p));return c}}const{message:u}=a;return i([s,{name:l,message:u}],a)};return o},Mu=(e,{json:t,lossy:n}={})=>{const r=[];return Ib(!(t||n),!!t,new Map,r)(e),r},Pr=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Du(Mu(e,t)):structuredClone(e):(e,t)=>Du(Mu(e,t));function Tb(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 Ob(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Db(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Tb,r=e.options.footnoteBackLabel||Ob,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[l]);if(!u)continue;const f=e.all(u),c=String(u.identifier).toUpperCase(),p=tn(c.toLowerCase());let d=0;const m=[],h=e.footnoteCounts.get(c);for(;h!==void 0&&++d<=h;){m.length>0&&m.push({type:"text",value:" "});let v=typeof n=="string"?n:n(l,d);typeof v=="string"&&(v={type:"text",value:v}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(d>1?"-"+d:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,d),className:["data-footnote-backref"]},children:Array.isArray(v)?v:[v]})}const g=f[f.length-1];if(g&&g.type==="element"&&g.tagName==="p"){const v=g.children[g.children.length-1];v&&v.type==="text"?v.value+=" ":g.children.push({type:"text",value:" "}),g.children.push(...m)}else f.push(...m);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(f,!0)};e.patch(u,y),s.push(y)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Pr(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
34
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
|
|
35
|
+
`}]}}const Nr=function(e){if(e==null)return Nb;if(typeof e=="function")return Lr(e);if(typeof e=="object")return Array.isArray(e)?Mb(e):_b(e);if(typeof e=="string")return Pb(e);throw new Error("Expected function, string, or object as test")};function Mb(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Nr(e[n]);return Lr(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function _b(e){const t=e;return Lr(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function Pb(e){return Lr(t);function t(n){return n&&n.type===e}}function Lr(e){return t;function t(n,r,i){return!!(Lb(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Nb(){return!0}function Lb(e){return e!==null&&typeof e=="object"&&"type"in e}function GT(e){return e}const _u=[],Fb=!0,Ao=!1,Rb="skip";function Pu(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=Nr(i),a=r?-1:1;s(e,void 0,[])();function s(l,u,f){const c=l&&typeof l=="object"?l:{};if(typeof c.type=="string"){const d=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(l.type+(d?"<"+d+">":""))+")"})}return p;function p(){let d=_u,m,h,g;if((!t||o(l,u,f[f.length-1]||void 0))&&(d=Bb(n(l,f)),d[0]===Ao))return d;if("children"in l&&l.children){const y=l;if(y.children&&d[0]!==Rb)for(h=(r?y.children.length:-1)+a,g=f.concat(y);h>-1&&h<y.children.length;){const v=y.children[h];if(m=s(v,h,g)(),m[0]===Ao)return m;h=typeof m[1]=="number"?m[1]:h+a}}return d}}}function Bb(e){return Array.isArray(e)?e:typeof e=="number"?[Fb,e]:e==null?_u:[e]}function Io(e,t,n,r){let i,o,a;typeof t=="function"&&typeof n!="function"?(o=void 0,a=t,i=n):(o=t,a=n,i=r),Pu(e,o,s,i);function s(l,u){const f=u[u.length-1],c=f?f.children.indexOf(l):void 0;return a(l,c,f)}}const To={}.hasOwnProperty,zb={};function $b(e,t){const n=t||zb,r=new Map,i=new Map,o=new Map,a={...Sb,...n.handlers},s={all:u,applyData:Ub,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:a,one:l,options:n,patch:jb,wrap:Wb};return Io(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const c=f.type==="definition"?r:i,p=String(f.identifier).toUpperCase();c.has(p)||c.set(p,f)}}),s;function l(f,c){const p=f.type,d=s.handlers[p];if(To.call(s.handlers,p)&&d)return d(s,f,c);if(s.options.passThrough&&s.options.passThrough.includes(p)){if("children"in f){const{children:h,...g}=f,y=Pr(g);return y.children=s.all(f),y}return Pr(f)}return(s.options.unknownHandler||Hb)(s,f,c)}function u(f){const c=[];if("children"in f){const p=f.children;let d=-1;for(;++d<p.length;){const m=s.one(p[d],f);if(m){if(d&&p[d-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=Nu(m.value)),!Array.isArray(m)&&m.type==="element")){const h=m.children[0];h&&h.type==="text"&&(h.value=Nu(h.value))}Array.isArray(m)?c.push(...m):c.push(m)}}}return c}}function jb(e,t){e.position&&(t.position=Bg(e))}function Ub(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&o&&Object.assign(n.properties,Pr(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Hb(e,t){const n=t.data||{},r="value"in t&&!(To.call(n,"hProperties")||To.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 Wb(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
36
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
37
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
38
|
+
`}),n}function Nu(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Lu(e,t){const n=$b(e,t),r=n.one(e,void 0),i=Db(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
|
|
39
|
+
`},i),o}function Vb(e,t){return e&&"run"in e?async function(n,r){const i=Lu(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Lu(n,{file:r,...e||t})}}function Fu(e){if(e)throw e}var Fr=Object.prototype.hasOwnProperty,Ru=Object.prototype.toString,Bu=Object.defineProperty,zu=Object.getOwnPropertyDescriptor,$u=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Ru.call(t)==="[object Array]"},ju=function(t){if(!t||Ru.call(t)!=="[object Object]")return!1;var n=Fr.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Fr.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Fr.call(t,i)},Uu=function(t,n){Bu&&n.name==="__proto__"?Bu(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Hu=function(t,n){if(n==="__proto__")if(Fr.call(t,n)){if(zu)return zu(t,n).value}else return;return t[n]},qb=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,u=arguments.length,f=!1;for(typeof s=="boolean"&&(f=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<u;++l)if(t=arguments[l],t!=null)for(n in t)r=Hu(s,n),i=Hu(t,n),s!==i&&(f&&i&&(ju(i)||(o=$u(i)))?(o?(o=!1,a=r&&$u(r)?r:[]):a=r&&ju(r)?r:{},Uu(s,{name:n,newValue:e(f,a,i)})):typeof i<"u"&&Uu(s,{name:n,newValue:i}));return s};const Oo=jt(qb);function Do(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 Kb(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...i);function s(l,...u){const f=e[++o];let c=-1;if(l){a(l);return}for(;++c<i.length;)(u[c]===null||u[c]===void 0)&&(u[c]=i[c]);i=u,f?Yb(f,s)(...u):a(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Yb(e,t){let n;return r;function r(...a){const s=e.length>a.length;let l;s&&a.push(i);try{l=e.apply(this,a)}catch(u){const f=u;if(s&&n)throw f;return i(f)}s||(l&&l.then&&typeof l.then=="function"?l.then(o,i):l instanceof Error?i(l):o(l))}function i(a,...s){n||(n=!0,t(a,...s))}function o(a){i(null,a)}}const yt={basename:Gb,dirname:Qb,extname:Jb,join:Zb,sep:"/"};function Gb(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Hn(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function Qb(e){if(Hn(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 Jb(e){Hn(e);let t=e.length,n=-1,r=0,i=-1,o=0,a;for(;t--;){const s=e.codePointAt(t);if(s===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),s===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Zb(...e){let t=-1,n;for(;++t<e.length;)Hn(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Xb(n)}function Xb(e){Hn(e);const t=e.codePointAt(0)===47;let n=ew(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function ew(e,t){let n="",r=0,i=-1,o=0,a=-1,s,l;for(;++a<=e.length;){if(a<e.length)s=e.codePointAt(a);else{if(s===47)break;s=47}if(s===47){if(!(i===a-1||o===1))if(i!==a-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length>0){n="",r=0,i=a,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,o=0}else s===46&&o>-1?o++:o=-1}return n}function Hn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const tw={cwd:nw};function nw(){return"/"}function Mo(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function rw(e){if(typeof e=="string")e=new URL(e);else if(!Mo(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 iw(e)}function iw(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 _o=["history","path","basename","stem","extname","dirname"];class Wu{constructor(t){let n;t?Mo(t)?n={path:t}:typeof t=="string"||ow(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":tw.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<_o.length;){const o=_o[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)_o.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?yt.basename(this.path):void 0}set basename(t){No(t,"basename"),Po(t,"basename"),this.path=yt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?yt.dirname(this.path):void 0}set dirname(t){Vu(this.basename,"dirname"),this.path=yt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?yt.extname(this.path):void 0}set extname(t){if(Po(t,"extname"),Vu(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=yt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Mo(t)&&(t=rw(t)),No(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?yt.basename(this.path,this.extname):void 0}set stem(t){No(t,"stem"),Po(t,"stem"),this.path=yt.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 He(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 Po(e,t){if(e&&e.includes(yt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+yt.sep+"`")}function No(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Vu(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function ow(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const aw=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},sw={}.hasOwnProperty;class Lo extends aw{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=Kb()}copy(){const t=new Lo;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Oo(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Bo("data",this.frozen),this.namespace[t]=n,this):sw.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Bo("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=Rr(t),r=this.parser||this.Parser;return Fo("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Fo("process",this.parser||this.Parser),Ro("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,a){const s=Rr(t),l=r.parse(s);r.run(l,s,function(f,c,p){if(f||!c||!p)return u(f);const d=c,m=r.stringify(d,p);cw(m)?p.value=m:p.result=m,u(f,p)});function u(f,c){f||!c?a(f):o?o(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),Fo("processSync",this.parser||this.Parser),Ro("processSync",this.compiler||this.Compiler),this.process(t,i),Ku("processSync","process",n),r;function i(o,a){n=!0,Fu(o),r=a}}run(t,n,r){qu(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(a,s){const l=Rr(n);i.run(t,l,u);function u(f,c,p){const d=c||t;f?s(f):a?a(d):r(void 0,d,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),Ku("runSync","run",r),i;function o(a,s){Fu(a),i=s,r=!0}}stringify(t,n){this.freeze();const r=Rr(n),i=this.compiler||this.Compiler;return Ro("stringify",i),qu(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Bo("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[f,...c]=u;l(f,c)}else a(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function a(u){if(!("plugins"in u)&&!("settings"in u))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(u.plugins),u.settings&&(i.settings=Oo(!0,i.settings,u.settings))}function s(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){const c=u[f];o(c)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,f){let c=-1,p=-1;for(;++c<r.length;)if(r[c][0]===u){p=c;break}if(p===-1)r.push([u,...f]);else if(f.length>0){let[d,...m]=f;const h=r[p][1];Do(h)&&Do(d)&&(d=Oo(!0,h,d)),r[p]=[u,d,...m]}}}}const lw=new Lo().freeze();function Fo(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ro(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Bo(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 qu(e){if(!Do(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ku(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Rr(e){return uw(e)?e:new Wu(e)}function uw(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function cw(e){return typeof e=="string"||fw(e)}function fw(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const dw="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Yu=[],Gu={allowDangerousHtml:!0},pw=/^(https?|ircs?|mailto|xmpp)$/i,hw=[{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 Qu(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,o=e.components,a=e.disallowedElements,s=e.rehypePlugins||Yu,l=e.remarkPlugins||Yu,u=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Gu}:Gu,f=e.skipHtml,c=e.unwrapDisallowed,p=e.urlTransform||Ju,d=lw().use(Jv).use(l).use(Vb,u).use(s),m=new Wu;typeof r=="string"&&(m.value=r);for(const v of hw)Object.hasOwn(e,v.from)&&(""+v.from+(v.to?"use `"+v.to+"` instead":"remove it")+dw+v.id,void 0);const h=d.parse(m);let g=d.runSync(h,m);return i&&(g={type:"element",tagName:"div",properties:{className:i},children:g.type==="root"?g.children:[g]}),Io(g,y),Hg(g,{Fragment:S.Fragment,components:o,ignoreInvalidStyle:!0,jsx:S.jsx,jsxs:S.jsxs,passKeys:!0,passNode:!0});function y(v,w,A){if(v.type==="raw"&&A&&typeof w=="number")return f?A.children.splice(w,1):A.children[w]={type:"text",value:v.value},w;if(v.type==="element"){let k;for(k in ho)if(Object.hasOwn(ho,k)&&Object.hasOwn(v.properties,k)){const C=v.properties[k],T=ho[k];(T===null||T.includes(v.tagName))&&(v.properties[k]=p(String(C||""),k,v))}}if(v.type==="element"){let k=t?!t.includes(v.tagName):a?a.includes(v.tagName):!1;if(!k&&n&&typeof w=="number"&&(k=!n(v,w,A)),k&&A&&typeof w=="number")return c&&v.children?A.children.splice(w,1,...v.children):A.children.splice(w,1),w}}}function Ju(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||pw.test(e.slice(0,t))?e:""}function mw(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Zu(e,t,n){const i=Nr((n||{}).ignore||[]),o=gw(t);let a=-1;for(;++a<o.length;)Pu(e,"text",s);function s(u,f){let c=-1,p;for(;++c<f.length;){const d=f[c],m=p?p.children:void 0;if(i(d,m?m.indexOf(d):void 0,p))return;p=d}if(p)return l(u,f)}function l(u,f){const c=f[f.length-1],p=o[a][0],d=o[a][1];let m=0;const g=c.children.indexOf(u);let y=!1,v=[];p.lastIndex=0;let w=p.exec(u.value);for(;w;){const A=w.index,k={index:w.index,input:w.input,stack:[...f,u]};let C=d(...w,k);if(typeof C=="string"&&(C=C.length>0?{type:"text",value:C}:void 0),C===!1?p.lastIndex=A+1:(m!==A&&v.push({type:"text",value:u.value.slice(m,A)}),Array.isArray(C)?v.push(...C):C&&v.push(C),m=A+w[0].length,y=!0),!p.global)break;w=p.exec(u.value)}return y?(m<u.value.length&&v.push({type:"text",value:u.value.slice(m)}),c.children.splice(g,1,...v)):v=[u],g+v.length}}function gw(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([yw(i[0]),vw(i[1])])}return t}function yw(e){return typeof e=="string"?new RegExp(mw(e),"g"):e}function vw(e){return typeof e=="function"?e:function(){return e}}function bw(e){Zu(e,[/\r?\n|\r/g,ww])}function ww(){return{type:"break"}}function xw(){return function(e){bw(e)}}function Xu(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 zo="phrasing",$o=["autolink","link","image","label"];function kw(){return{transforms:[Ow],enter:{literalAutolink:Ew,literalAutolinkEmail:jo,literalAutolinkHttp:jo,literalAutolinkWww:jo},exit:{literalAutolink:Tw,literalAutolinkEmail:Iw,literalAutolinkHttp:Cw,literalAutolinkWww:Aw}}}function Sw(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:zo,notInConstruct:$o},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:zo,notInConstruct:$o},{character:":",before:"[ps]",after:"\\/",inConstruct:zo,notInConstruct:$o}]}}function Ew(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function jo(e){this.config.enter.autolinkProtocol.call(this,e)}function Cw(e){this.config.exit.autolinkProtocol.call(this,e)}function Aw(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 Iw(e){this.config.exit.autolinkEmail.call(this,e)}function Tw(e){this.exit(e)}function Ow(e){Zu(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Dw],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Mw]],{ignore:["link","linkReference"]})}function Dw(e,t,n,r,i){let o="";if(!ec(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!_w(n)))return!1;const a=Pw(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function Mw(e,t,n,r){return!ec(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function _w(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 Pw(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=Xu(e,"(");let o=Xu(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function ec(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Wt(n)||Ar(n))&&(!t||n!==47)}tc.peek=Uw;function Nw(){this.buffer()}function Lw(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Fw(){this.buffer()}function Rw(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Bw(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ut(this.sliceSerialize(e)).toLowerCase(),n.label=t}function zw(e){this.exit(e)}function $w(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ut(this.sliceSerialize(e)).toLowerCase(),n.label=t}function jw(e){this.exit(e)}function Uw(){return"["}function tc(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),s(),a(),o+=i.move("]"),o}function Hw(){return{enter:{gfmFootnoteCallString:Nw,gfmFootnoteCall:Lw,gfmFootnoteDefinitionLabelString:Fw,gfmFootnoteDefinition:Rw},exit:{gfmFootnoteCallString:Bw,gfmFootnoteCall:zw,gfmFootnoteDefinitionLabelString:$w,gfmFootnoteDefinition:jw}}}function Ww(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:tc},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,a){const s=o.createTracker(a);let l=s.move("[^");const u=o.enter("footnoteDefinition"),f=o.enter("label");return l+=s.move(o.safe(o.associationId(r),{before:l,after:"]"})),f(),l+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),l+=s.move((t?`
|
|
40
|
+
`:" ")+o.indentLines(o.containerFlow(r,s.current()),t?nc:Vw))),u(),l}}function Vw(e,t,n){return t===0?e:nc(e,t,n)}function nc(e,t,n){return(n?"":" ")+e}const qw=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];rc.peek=Jw;function Kw(){return{canContainEols:["delete"],enter:{strikethrough:Gw},exit:{strikethrough:Qw}}}function Yw(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:qw}],handlers:{delete:rc}}}function Gw(e){this.enter({type:"delete",children:[]},e)}function Qw(e){this.exit(e)}function rc(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function Jw(){return"~"}function Zw(e){return e.length}function Xw(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Zw,o=[],a=[],s=[],l=[];let u=0,f=-1;for(;++f<e.length;){const h=[],g=[];let y=-1;for(e[f].length>u&&(u=e[f].length);++y<e[f].length;){const v=ex(e[f][y]);if(n.alignDelimiters!==!1){const w=i(v);g[y]=w,(l[y]===void 0||w>l[y])&&(l[y]=w)}h.push(v)}a[f]=h,s[f]=g}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<u;)o[c]=ic(r[c]);else{const h=ic(r);for(;++c<u;)o[c]=h}c=-1;const p=[],d=[];for(;++c<u;){const h=o[c];let g="",y="";h===99?(g=":",y=":"):h===108?g=":":h===114&&(y=":");let v=n.alignDelimiters===!1?1:Math.max(1,l[c]-g.length-y.length);const w=g+"-".repeat(v)+y;n.alignDelimiters!==!1&&(v=g.length+v+y.length,v>l[c]&&(l[c]=v),d[c]=v),p[c]=w}a.splice(1,0,p),s.splice(1,0,d),f=-1;const m=[];for(;++f<a.length;){const h=a[f],g=s[f];c=-1;const y=[];for(;++c<u;){const v=h[c]||"";let w="",A="";if(n.alignDelimiters!==!1){const k=l[c]-(g[c]||0),C=o[c];C===114?w=" ".repeat(k):C===99?k%2?(w=" ".repeat(k/2+.5),A=" ".repeat(k/2-.5)):(w=" ".repeat(k/2),A=w):A=" ".repeat(k)}n.delimiterStart!==!1&&!c&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&v==="")&&(n.delimiterStart!==!1||c)&&y.push(" "),n.alignDelimiters!==!1&&y.push(w),y.push(v),n.alignDelimiters!==!1&&y.push(A),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||c!==u-1)&&y.push("|")}m.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return m.join(`
|
|
41
|
+
`)}function ex(e){return e==null?"":String(e)}function ic(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 tx(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const a=n.indentLines(n.containerFlow(e,o.current()),nx);return i(),a}function nx(e,t,n){return">"+(n?"":" ")+e}function rx(e,t){return oc(e,t.inConstruct,!0)&&!oc(e,t.notInConstruct,!1)}function oc(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 ac(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
42
|
+
`&&rx(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
43
|
+
`}function ix(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>a&&(a=o):o=1,i=r+t.length,r=n.indexOf(t,i);return a}function ox(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 ax(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 sx(e,t,n,r){const i=ax(n),o=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(ox(e,n)){const c=n.enter("codeIndented"),p=n.indentLines(o,lx);return c(),p}const s=n.createTracker(r),l=i.repeat(Math.max(ix(o,i)+1,3)),u=n.enter("codeFenced");let f=s.move(l);if(e.lang){const c=n.enter(`codeFencedLang${a}`);f+=s.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...s.current()})),c()}if(e.lang&&e.meta){const c=n.enter(`codeFencedMeta${a}`);f+=s.move(" "),f+=s.move(n.safe(e.meta,{before:f,after:`
|
|
44
|
+
`,encode:["`"],...s.current()})),c()}return f+=s.move(`
|
|
45
|
+
`),o&&(f+=s.move(o+`
|
|
46
|
+
`)),f+=s.move(l),u(),f}function lx(e,t,n){return(n?"":" ")+e}function Uo(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 ux(e,t,n,r){const i=Uo(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let u=l.move("[");return u+=l.move(n.safe(n.associationId(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":`
|
|
47
|
+
`,...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),a(),u}function cx(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Wn(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Br(e,t,n){const r=nn(e),i=nn(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}sc.peek=fx;function sc(e,t,n,r){const i=cx(n),o=n.enter("emphasis"),a=n.createTracker(r),s=a.move(i);let l=a.move(n.containerPhrasing(e,{after:i,before:s,...a.current()}));const u=l.charCodeAt(0),f=Br(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(l=Wn(u)+l.slice(1));const c=l.charCodeAt(l.length-1),p=Br(r.after.charCodeAt(0),c,i);p.inside&&(l=l.slice(0,-1)+Wn(c));const d=a.move(i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},s+l+d}function fx(e,t,n){return n.options.emphasis||"*"}function dx(e,t){let n=!1;return Io(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Ao}),!!((!e.depth||e.depth<3)&&mo(e)&&(t.options.setext||n))}function px(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(dx(e,n)){const f=n.enter("headingSetext"),c=n.enter("phrasing"),p=n.containerPhrasing(e,{...o.current(),before:`
|
|
48
|
+
`,after:`
|
|
49
|
+
`});return c(),f(),p+`
|
|
50
|
+
`+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
|
|
51
|
+
`))+1))}const a="#".repeat(i),s=n.enter("headingAtx"),l=n.enter("phrasing");o.move(a+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
|
|
52
|
+
`,...o.current()});return/^[\t ]/.test(u)&&(u=Wn(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,n.options.closeAtx&&(u+=" "+a),l(),s(),u}lc.peek=hx;function lc(e){return e.value||""}function hx(){return"<"}uc.peek=mx;function uc(e,t,n,r){const i=Uo(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let u=l.move("![");return u+=l.move(n.safe(e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),u+=l.move(")"),a(),u}function mx(){return"!"}cc.peek=gx;function cc(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const u=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),a();const f=n.stack;n.stack=[],a=n.enter("reference");const c=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=f,o(),i==="full"||!u||u!==c?l+=s.move(c+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function gx(){return"!"}fc.peek=yx;function fc(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const a=n.unsafe[o],s=n.compilePattern(a);let l;if(a.atBreak)for(;l=s.exec(r);){let u=l.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(l.index+1)}}return i+r+i}function yx(){return"`"}function dc(e,t){const n=mo(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))}pc.peek=vx;function pc(e,t,n,r){const i=Uo(n),o=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(dc(e,n)){const f=n.stack;n.stack=[],s=n.enter("autolink");let c=a.move("<");return c+=a.move(n.containerPhrasing(e,{before:c,after:">",...a.current()})),c+=a.move(">"),s(),n.stack=f,c}s=n.enter("link"),l=n.enter("label");let u=a.move("[");return u+=a.move(n.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),u+=a.move(")"),s(),u}function vx(e,t,n){return dc(e,n)?"<":"["}hc.peek=bx;function hc(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const u=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),a();const f=n.stack;n.stack=[],a=n.enter("reference");const c=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=f,o(),i==="full"||!u||u!==c?l+=s.move(c+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function bx(){return"["}function Ho(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 wx(e){const t=Ho(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 xx(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 mc(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 kx(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let a=e.ordered?xx(n):Ho(n);const s=e.ordered?a==="."?")":".":wx(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),mc(n)===a&&f){let c=-1;for(;++c<e.children.length;){const p=e.children[c];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const u=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=o,i(),u}function Sx(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 Ex(e,t,n,r){const i=Sx(n);let o=n.bulletCurrent||Ho(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let a=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const s=n.createTracker(r);s.move(o+" ".repeat(a-o.length)),s.shift(a);const l=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,s.current()),f);return l(),u;function f(c,p,d){return p?(d?"":" ".repeat(a))+c:(d?o:o+" ".repeat(a-o.length))+c}}function Cx(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),a=n.containerPhrasing(e,r);return o(),i(),a}const Ax=Nr(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Ix(e,t,n,r){return(e.children.some(function(a){return Ax(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Tx(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}gc.peek=Ox;function gc(e,t,n,r){const i=Tx(n),o=n.enter("strong"),a=n.createTracker(r),s=a.move(i+i);let l=a.move(n.containerPhrasing(e,{after:i,before:s,...a.current()}));const u=l.charCodeAt(0),f=Br(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(l=Wn(u)+l.slice(1));const c=l.charCodeAt(l.length-1),p=Br(r.after.charCodeAt(0),c,i);p.inside&&(l=l.slice(0,-1)+Wn(c));const d=a.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},s+l+d}function Ox(e,t,n){return n.options.strong||"*"}function Dx(e,t,n,r){return n.safe(e.value,r)}function Mx(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 _x(e,t,n){const r=(mc(n)+(n.options.ruleSpaces?" ":"")).repeat(Mx(n));return n.options.ruleSpaces?r.slice(0,-1):r}const yc={blockquote:tx,break:ac,code:sx,definition:ux,emphasis:sc,hardBreak:ac,heading:px,html:lc,image:uc,imageReference:cc,inlineCode:fc,link:pc,linkReference:hc,list:kx,listItem:Ex,paragraph:Cx,root:Ix,strong:gc,text:Dx,thematicBreak:_x};function Px(){return{enter:{table:Nx,tableData:vc,tableHeader:vc,tableRow:Fx},exit:{codeText:Rx,table:Lx,tableData:Wo,tableHeader:Wo,tableRow:Wo}}}function Nx(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 Lx(e){this.exit(e),this.data.inTable=void 0}function Fx(e){this.enter({type:"tableRow",children:[]},e)}function Wo(e){this.exit(e)}function vc(e){this.enter({type:"tableCell",children:[]},e)}function Rx(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Bx));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Bx(e,t){return t==="|"?t:e}function zx(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
53
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:a,tableCell:l,tableRow:s}};function a(d,m,h,g){return u(f(d,h,g),d.align)}function s(d,m,h,g){const y=c(d,h,g),v=u([y]);return v.slice(0,v.indexOf(`
|
|
54
|
+
`))}function l(d,m,h,g){const y=h.enter("tableCell"),v=h.enter("phrasing"),w=h.containerPhrasing(d,{...g,before:o,after:o});return v(),y(),w}function u(d,m){return Xw(d,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function f(d,m,h){const g=d.children;let y=-1;const v=[],w=m.enter("table");for(;++y<g.length;)v[y]=c(g[y],m,h);return w(),v}function c(d,m,h){const g=d.children;let y=-1;const v=[],w=m.enter("tableRow");for(;++y<g.length;)v[y]=l(g[y],d,m,h);return w(),v}function p(d,m,h){let g=yc.inlineCode(d,m,h);return h.stack.includes("tableCell")&&(g=g.replace(/\|/g,"\\$&")),g}}function $x(){return{exit:{taskListCheckValueChecked:bc,taskListCheckValueUnchecked:bc,paragraph:Ux}}}function jx(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Hx}}}function bc(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Ux(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,a;for(;++o<i.length;){const s=i[o];if(s.type==="paragraph"){a=s;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Hx(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);o&&s.move(a);let l=yc.listItem(e,t,n,{...r,...s.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(f){return f+a}}function Wx(){return[kw(),Hw(),Kw(),Px(),$x()]}function Vx(e){return{extensions:[Sw(),Ww(e),Yw(),zx(e),jx()]}}const qx={tokenize:Zx,partial:!0},wc={tokenize:Xx,partial:!0},xc={tokenize:e0,partial:!0},kc={tokenize:t0,partial:!0},Kx={tokenize:n0,partial:!0},Sc={name:"wwwAutolink",tokenize:Qx,previous:Cc},Ec={name:"protocolAutolink",tokenize:Jx,previous:Ac},Et={name:"emailAutolink",tokenize:Gx,previous:Ic},vt={};function Yx(){return{text:vt}}let Vt=48;for(;Vt<123;)vt[Vt]=Et,Vt++,Vt===58?Vt=65:Vt===91&&(Vt=97);vt[43]=Et,vt[45]=Et,vt[46]=Et,vt[95]=Et,vt[72]=[Et,Ec],vt[104]=[Et,Ec],vt[87]=[Et,Sc],vt[119]=[Et,Sc];function Gx(e,t,n){const r=this;let i,o;return a;function a(c){return!Vo(c)||!Ic.call(r,r.previous)||qo(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(c))}function s(c){return Vo(c)?(e.consume(c),s):c===64?(e.consume(c),l):n(c)}function l(c){return c===46?e.check(Kx,f,u)(c):c===45||c===95||We(c)?(o=!0,e.consume(c),l):f(c)}function u(c){return e.consume(c),i=!0,l}function f(c){return o&&i&&qe(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function Qx(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!Cc.call(r,r.previous)||qo(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(qx,e.attempt(wc,e.attempt(xc,o),n),n)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function Jx(e,t,n){const r=this;let i="",o=!1;return a;function a(c){return(c===72||c===104)&&Ac.call(r,r.previous)&&!qo(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),s):n(c)}function s(c){if(qe(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),s;if(c===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(c),l}return n(c)}function l(c){return c===47?(e.consume(c),o?u:(o=!0,l)):n(c)}function u(c){return c===null||Cr(c)||Ie(c)||Wt(c)||Ar(c)?n(c):e.attempt(wc,e.attempt(xc,f),n)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function Zx(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),o):n(a)}function o(a){return a===null?n(a):t(a)}}function Xx(e,t,n){let r,i,o;return a;function a(u){return u===46||u===95?e.check(kc,l,s)(u):u===null||Ie(u)||Wt(u)||u!==45&&Ar(u)?l(u):(o=!0,e.consume(u),a)}function s(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),a}function l(u){return i||r||!o?n(u):t(u)}}function e0(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?o(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(kc,t,o)(a):a===null||Ie(a)||Wt(a)?t(a):(e.consume(a),i)}function o(a){return a===41&&r++,e.consume(a),i}}function t0(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),o):s===93?(e.consume(s),i):s===60||s===null||Ie(s)||Wt(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||Ie(s)||Wt(s)?t(s):r(s)}function o(s){return qe(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):qe(s)?(e.consume(s),a):n(s)}}function n0(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return We(o)?n(o):t(o)}}function Cc(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ie(e)}function Ac(e){return!qe(e)}function Ic(e){return!(e===47||Vo(e))}function Vo(e){return e===43||e===45||e===46||e===95||We(e)}function qo(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 r0={tokenize:f0,partial:!0};function i0(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:l0,continuation:{tokenize:u0},exit:c0}},text:{91:{name:"gfmFootnoteCall",tokenize:s0},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:o0,resolveTo:a0}}}}function o0(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!a||!a._balanced)return n(l);const u=ut(r.sliceSerialize({start:a.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function a0(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function s0(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,a;return s;function s(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),l}function l(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(c){if(o>999||c===93&&!a||c===null||c===91||Ie(c))return n(c);if(c===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(ut(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return Ie(c)||(a=!0),o++,e.consume(c),c===92?f:u}function f(c){return c===91||c===92||c===93?(e.consume(c),o++,u):u(c)}}function l0(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,a=0,s;return l;function l(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(m)}function f(m){if(a>999||m===93&&!s||m===null||m===91||Ie(m))return n(m);if(m===93){e.exit("chunkString");const h=e.exit("gfmFootnoteDefinitionLabelString");return o=ut(r.sliceSerialize(h)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Ie(m)||(s=!0),a++,e.consume(m),m===92?c:f}function c(m){return m===91||m===92||m===93?(e.consume(m),a++,f):f(m)}function p(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(o)||i.push(o),be(e,d,"gfmFootnoteDefinitionWhitespace")):n(m)}function d(m){return t(m)}}function u0(e,t,n){return e.check(Bn,t,e.attempt(r0,t,n))}function c0(e){e.exit("gfmFootnoteDefinition")}function f0(e,t,n){const r=this;return be(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(o):n(o)}}function d0(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,s){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let u=l;for(;u--;)if(a[u][0]==="exit"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[u][1].end.offset-a[u][1].start.offset){a[l][1].type="strikethroughSequence",a[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},a[u][1].start),end:Object.assign({},a[l][1].end)},c={type:"strikethroughText",start:Object.assign({},a[u][1].end),end:Object.assign({},a[l][1].start)},p=[["enter",f,s],["enter",a[u][1],s],["exit",a[u][1],s],["enter",c,s]],d=s.parser.constructs.insideSpan.null;d&&tt(p,p.length,0,Ir(d,a.slice(u+1,l),s)),tt(p,p.length,0,[["exit",c,s],["enter",a[l][1],s],["exit",a[l][1],s],["exit",f,s]]),tt(a,u-1,l-u+3,p),l=u+p.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function o(a,s,l){const u=this.previous,f=this.events;let c=0;return p;function p(m){return u===126&&f[f.length-1][1].type!=="characterEscape"?l(m):(a.enter("strikethroughSequenceTemporary"),d(m))}function d(m){const h=nn(u);if(m===126)return c>1?l(m):(a.consume(m),c++,d);if(c<2&&!n)return l(m);const g=a.exit("strikethroughSequenceTemporary"),y=nn(m);return g._open=!y||y===2&&!!h,g._close=!h||h===2&&!!y,s(m)}}}class p0{constructor(){this.map=[]}add(t,n,r){h0(this,t,n,r)}consume(t){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function h0(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 m0(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function g0(){return{flow:{null:{name:"table",tokenize:y0,resolveAll:v0}}}}function y0(e,t,n){const r=this;let i=0,o=0,a;return s;function s(I){let O=r.events.length-1;for(;O>-1;){const L=r.events[O][1].type;if(L==="lineEnding"||L==="linePrefix")O--;else break}const j=O>-1?r.events[O][1].type:null,M=j==="tableHead"||j==="tableRow"?C:l;return M===C&&r.parser.lazy[r.now().line]?n(I):M(I)}function l(I){return e.enter("tableHead"),e.enter("tableRow"),u(I)}function u(I){return I===124||(a=!0,o+=1),f(I)}function f(I){return I===null?n(I):ce(I)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),d):n(I):ye(I)?be(e,f,"whitespace")(I):(o+=1,a&&(a=!1,i+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),a=!0,f):(e.enter("data"),c(I)))}function c(I){return I===null||I===124||Ie(I)?(e.exit("data"),f(I)):(e.consume(I),I===92?p:c)}function p(I){return I===92||I===124?(e.consume(I),c):c(I)}function d(I){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(I):(e.enter("tableDelimiterRow"),a=!1,ye(I)?be(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):m(I))}function m(I){return I===45||I===58?g(I):I===124?(a=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),h):k(I)}function h(I){return ye(I)?be(e,g,"whitespace")(I):g(I)}function g(I){return I===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),y):I===45?(o+=1,y(I)):I===null||ce(I)?A(I):k(I)}function y(I){return I===45?(e.enter("tableDelimiterFiller"),v(I)):k(I)}function v(I){return I===45?(e.consume(I),v):I===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(I))}function w(I){return ye(I)?be(e,A,"whitespace")(I):A(I)}function A(I){return I===124?m(I):I===null||ce(I)?!a||i!==o?k(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):k(I)}function k(I){return n(I)}function C(I){return e.enter("tableRow"),T(I)}function T(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),T):I===null||ce(I)?(e.exit("tableRow"),t(I)):ye(I)?be(e,T,"whitespace")(I):(e.enter("data"),P(I))}function P(I){return I===null||I===124||Ie(I)?(e.exit("data"),T(I)):(e.consume(I),I===92?R:P)}function R(I){return I===92||I===124?(e.consume(I),P):P(I)}}function v0(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],a=[0,0,0,0],s=!1,l=0,u,f,c;const p=new p0;for(;++n<e.length;){const d=e[n],m=d[1];d[0]==="enter"?m.type==="tableHead"?(s=!1,l!==0&&(Tc(p,t,l,u,f),f=void 0,l=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",u,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,c=void 0,o=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,f={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",f,t]])),i=m.type==="tableDelimiterRow"?2:f?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(o[1]!==0&&(a[0]=a[1],c=zr(p,t,o,i,void 0,c),o=[0,0,0,0]),a[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(a[0]=a[1],c=zr(p,t,o,i,void 0,c)),o=a,a=[o[1],n,0,0])):m.type==="tableHead"?(s=!0,l=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(l=n,o[1]!==0?(a[0]=a[1],c=zr(p,t,o,i,n,c)):a[1]!==0&&(c=zr(p,t,a,i,n,c)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&Tc(p,t,l,u,f),p.consume(t.events),n=-1;++n<t.events.length;){const d=t.events[n];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=m0(t.events,n))}return e}function zr(e,t,n,r,i,o){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(o.end=Object.assign({},on(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const l=on(t.events,n[1]);if(o={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const u=on(t.events,n[2]),f=on(t.events,n[3]),c={type:s,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",c,t]]),r!==2){const p=t.events[n[2]],d=t.events[n[3]];if(p[1].end=Object.assign({},d[1].end),p[1].type="chunkText",p[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",c,t]])}return i!==void 0&&(o.end=Object.assign({},on(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function Tc(e,t,n,r,i){const o=[],a=on(t.events,n);i&&(i.end=Object.assign({},a),o.push(["exit",i,t])),r.end=Object.assign({},a),o.push(["exit",r,t]),e.add(n+1,0,o)}function on(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const b0={name:"tasklistCheck",tokenize:x0};function w0(){return{text:{91:b0}}}function x0(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),o)}function o(l){return Ie(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return ce(l)?t(l):ye(l)?e.check({tokenize:k0},t,n)(l):n(l)}}function k0(e,t,n){return be(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function S0(e){return eu([Yx(),i0(),d0(e),g0(),w0()])}const E0={};function C0(e){const t=this,n=e||E0,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(S0(n)),o.push(Wx()),a.push(Vx(n))}const ge={container:{className:"bpReset bpContainer bpFont",dropzone:{overlay:{className:"bpDropzoneOverlay"}}},loader:{className:"bpReset bpLoader"},modal:{overlay:{className:"bpModalOverlay"},dialog:{container:{className:"bpReset bpModalContainer"},title:{className:"bpModalTitle"},description:{className:"bpModalDescription"},content:{container:{className:"bpModalContentContainer"},textarea:{className:"bpModalContentTextArea"}},button:{container:{className:"bpModalButtonContainer"},confirm:{className:"bpModalButtonConfirm"},cancel:{className:"bpModalButtonCancel"}}}},messagePreview:{container:{className:"bpMessagePreviewContainer"},message:{className:"bpMessagePreviewMessage"},description:{className:"bpMessagePreviewDescription"},closeButton:{className:"bpMessagePreviewCloseButton"},avatar:{container:{className:"bpMessagePreviewAvatarContainer"},image:{className:"bpMessagePreviewAvatarImage"},fallback:{className:"bpMessagePreviewAvatarFallback"}}},fab:{container:{className:"bpReset bpFabContainer"},icon:{className:"bpFabIcon"},image:{className:"bpFabImage"}},notification:{container:{className:"bpReset bpNotificationContainer"},title:{className:"bpNotificationTitle"},description:{className:"bpNotificationDescription"},icon:{className:"bpNotificationIcon"},closeIcon:{className:"bpNotificationCloseIcon"}},header:{container:{className:"bpReset bpHeaderContainer bpFont"},content:{container:{className:"bpReset bpHeaderContentContainer"},title:{className:"bpHeaderContentTitle"},description:{className:"bpHeaderContentDescription"},avatar:{container:{className:"bpReset bpHeaderContentAvatarContainer"},image:{className:"bpHeaderContentAvatarImage"},fallback:{className:"bpHeaderContentAvatarFallback"}},toggleSound:{className:"bpHeaderSoundToggleButton"},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:{wrapper:{className:"bpReset bpComposerWrapper"},container:{className:"bpReset bpComposerContainer bpFont"},footer:{className:"bpComposerFooter"},inputContainer:{className:"bpComposerInputContainer"},input:{className:"bpComposerInput"},inputLoader:{className:"bpComposerInputLoader"},sendbutton:{className:"bpComposerSendButton"},uploadButton:{className:"bpComposerUploadButton"},voiceButton:{className:"bpComposerVoiceButton"},fileContainer:{className:"bpComposerFileContainer"},fileWidget:{container:{className:"bpComposerFileAttachement"},loader:{className:"bpComposerFileLoader"},fileIcon:{container:{className:"bpComposerFileIconWrapper"},icon:{className:"bpComposerFileIcon"}},metadata:{container:{className:"bpComposerFileMetadata"},name:{className:"bpComposerFileName"},type:{className:"bpComposerFileExtension"}},removeIcon:{className:"bpComposerFileRemoveIcon"},errorIcon:{className:"bpComposerFileErrorIcon"},previewImage:{className:"bpComposerFilePreviewImage"}}},messageList:{scrollDownButton:{className:"bpMessageListScrollDownButton"},container:{className:"bpReset bpMessageListContainer bpFont"},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"}},deliveryStatus:{className:"bpMessageDeliveryStatus"},blocks:{text:{heading1:{className:"bpMessageBlocksTextHeading1"},heading2:{className:"bpMessageBlocksTextHeading2"},heading3:{className:"bpMessageBlocksTextHeading3"},heading4:{className:"bpMessageBlocksTextHeading4"},unorderedList:{className:"bpMessageBlocksTextUnorderedList"},orderedList:{className:"bpMessageBlocksTextOrderedList"},listItem:{className:"bpMessageBlocksTextListItem"},link:{className:"bpMessageBlocksTextLink"},italic:{className:"bpMessageBlocksTextItalic"},bold:{className:"bpMessageBlocksTextBold"},text:{className:"bpMessageBlocksTextText"},image:{className:"bpMessageBlocksTextImage"},imageError:{className:"bpMessageBlocksTextImageError"},horizontalRule:{className:"bpMessageBlocksTextHorizontalRule"},lineBreak:{className:"bpMessageBlocksTextLineBreak"},input:{className:"bpMessageBlocksTextInput"},codeBlockContainer:{className:"bpMessageBlocksTextCodeBlockContainer"},codeBlockTitle:{className:"bpMessageBlocksTextCodeBlockTitle"},codeBlockCopyIcon:{className:"bpMessageBlocksTextCodeBlockCopyIcon"},codeBlock:{className:"bpMessageBlocksTextCodeBlock"},code:{className:"bpMessageBlocksTextCode"},tableContainer:{className:"bpMessageBlocksTextTableContainer"},table:{className:"bpMessageBlocksTextTable"},tableHeader:{className:"bpMessageBlocksTextTableHeader"},tableData:{className:"bpMessageBlocksTextTableData"},tableRow:{className:"bpMessageBlocksTextTableRow"}},audio:{className:"bpMessageBlocksAudio"},image:{image:{className:"bpMessageBlocksImageImage"},placeholder:{className:"bpMessageBlocksImagePlaceholder"},skeleton:{className:"bpSkeleton"}},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:{container:{className:"bpMessageBlocksBubble"},feedbackContainer:{className:"bpMessageBlocksBubbleFeedbackContainer"},feedbackIcon:{className:"bpMessageBlocksBubbleFeedbackIcon"}},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"}}},error:{container:{className:"bpReset bpErrorContainer"},id:{className:"bpErrorId"},header:{container:{className:"bpErrorHeader"},actions:{className:"bpErrorHeaderActions"}},content:{className:"bpErrorContent"},errorTitle:{className:"bpErrorTitle"},errorMessage:{className:"bpErrorMessage"},icon:{className:"bpErrorIcon"}},typingIndicator:{container:{className:"bpTypingIndicatorContainer"},loader:{className:"bpTypingIndicatorLoader"}},proactiveBubble:{container:{className:"bpProactiveBubbleContainer"},content:{className:"bpProactiveBubbleContent"},layout:{className:"bpProactiveBubbleLayout"},icon:{className:"bpProactiveBubbleIcon"},message:{className:"bpProactiveBubbleMessage"},closeButton:{className:"bpProactiveBubbleCloseButton"},arrow:{className:"bpProactiveBubbleArrow"}}};/**
|
|
27
55
|
* @license lucide-react v0.554.0 - ISC
|
|
28
56
|
*
|
|
29
57
|
* This source code is licensed under the ISC license.
|
|
30
58
|
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const
|
|
59
|
+
*/const A0=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),I0=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Oc=e=>{const t=I0(e);return t.charAt(0).toUpperCase()+t.slice(1)},Dc=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),T0=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
32
60
|
* @license lucide-react v0.554.0 - ISC
|
|
33
61
|
*
|
|
34
62
|
* This source code is licensed under the ISC license.
|
|
35
63
|
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/var
|
|
64
|
+
*/var O0={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
37
65
|
* @license lucide-react v0.554.0 - ISC
|
|
38
66
|
*
|
|
39
67
|
* This source code is licensed under the ISC license.
|
|
40
68
|
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/const
|
|
69
|
+
*/const D0=_.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...s},l)=>_.createElement("svg",{ref:l,...O0,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Dc("lucide",i),...!o&&!T0(s)&&{"aria-hidden":"true"},...s},[...a.map(([u,f])=>_.createElement(u,f)),...Array.isArray(o)?o:[o]]));/**
|
|
42
70
|
* @license lucide-react v0.554.0 - ISC
|
|
43
71
|
*
|
|
44
72
|
* This source code is licensed under the ISC license.
|
|
45
73
|
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/const
|
|
74
|
+
*/const xe=(e,t)=>{const n=_.forwardRef(({className:r,...i},o)=>_.createElement(D0,{ref:o,iconNode:t,className:Dc(`lucide-${A0(Oc(e))}`,`lucide-${e}`,r),...i}));return n.displayName=Oc(e),n};/**
|
|
47
75
|
* @license lucide-react v0.554.0 - ISC
|
|
48
76
|
*
|
|
49
77
|
* This source code is licensed under the ISC license.
|
|
50
78
|
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/const
|
|
79
|
+
*/const M0=xe("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|
52
80
|
* @license lucide-react v0.554.0 - ISC
|
|
53
81
|
*
|
|
54
82
|
* This source code is licensed under the ISC license.
|
|
55
83
|
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const
|
|
84
|
+
*/const Mc=xe("bot-off",[["path",{d:"M13.67 8H18a2 2 0 0 1 2 2v4.33",key:"7az073"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M22 22 2 2",key:"1r8tn9"}],["path",{d:"M8 8H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 1.414-.586",key:"s09a7a"}],["path",{d:"M9 13v2",key:"rq6x2g"}],["path",{d:"M9.67 4H12v2.33",key:"110xot"}]]);/**
|
|
57
85
|
* @license lucide-react v0.554.0 - ISC
|
|
58
86
|
*
|
|
59
87
|
* This source code is licensed under the ISC license.
|
|
60
88
|
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/const
|
|
89
|
+
*/const _0=xe("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
62
90
|
* @license lucide-react v0.554.0 - ISC
|
|
63
91
|
*
|
|
64
92
|
* This source code is licensed under the ISC license.
|
|
65
93
|
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/const
|
|
94
|
+
*/const P0=xe("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
67
95
|
* @license lucide-react v0.554.0 - ISC
|
|
68
96
|
*
|
|
69
97
|
* This source code is licensed under the ISC license.
|
|
70
98
|
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const
|
|
99
|
+
*/const N0=xe("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
72
100
|
* @license lucide-react v0.554.0 - ISC
|
|
73
101
|
*
|
|
74
102
|
* This source code is licensed under the ISC license.
|
|
75
103
|
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/const
|
|
104
|
+
*/const L0=xe("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
77
105
|
* @license lucide-react v0.554.0 - ISC
|
|
78
106
|
*
|
|
79
107
|
* This source code is licensed under the ISC license.
|
|
80
108
|
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const
|
|
109
|
+
*/const F0=xe("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
82
110
|
* @license lucide-react v0.554.0 - ISC
|
|
83
111
|
*
|
|
84
112
|
* This source code is licensed under the ISC license.
|
|
85
113
|
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const
|
|
114
|
+
*/const _c=xe("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
87
115
|
* @license lucide-react v0.554.0 - ISC
|
|
88
116
|
*
|
|
89
117
|
* This source code is licensed under the ISC license.
|
|
90
118
|
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const
|
|
119
|
+
*/const R0=xe("cloud-upload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);/**
|
|
92
120
|
* @license lucide-react v0.554.0 - ISC
|
|
93
121
|
*
|
|
94
122
|
* This source code is licensed under the ISC license.
|
|
95
123
|
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const
|
|
124
|
+
*/const B0=xe("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
97
125
|
* @license lucide-react v0.554.0 - ISC
|
|
98
126
|
*
|
|
99
127
|
* This source code is licensed under the ISC license.
|
|
100
128
|
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const
|
|
129
|
+
*/const z0=xe("file-down",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]]);/**
|
|
102
130
|
* @license lucide-react v0.554.0 - ISC
|
|
103
131
|
*
|
|
104
132
|
* This source code is licensed under the ISC license.
|
|
105
133
|
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const
|
|
134
|
+
*/const Pc=xe("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
107
135
|
* @license lucide-react v0.554.0 - ISC
|
|
108
136
|
*
|
|
109
137
|
* This source code is licensed under the ISC license.
|
|
110
138
|
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const
|
|
139
|
+
*/const $0=xe("files",[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"14sh0y"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",key:"1970lx"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]]);/**
|
|
112
140
|
* @license lucide-react v0.554.0 - ISC
|
|
113
141
|
*
|
|
114
142
|
* This source code is licensed under the ISC license.
|
|
115
143
|
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const
|
|
144
|
+
*/const j0=xe("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
|
|
117
145
|
* @license lucide-react v0.554.0 - ISC
|
|
118
146
|
*
|
|
119
147
|
* This source code is licensed under the ISC license.
|
|
120
148
|
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const
|
|
149
|
+
*/const Nc=xe("image-off",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]]);/**
|
|
122
150
|
* @license lucide-react v0.554.0 - ISC
|
|
123
151
|
*
|
|
124
152
|
* This source code is licensed under the ISC license.
|
|
125
153
|
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const
|
|
154
|
+
*/const U0=xe("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
|
|
127
155
|
* @license lucide-react v0.554.0 - ISC
|
|
128
156
|
*
|
|
129
157
|
* This source code is licensed under the ISC license.
|
|
130
158
|
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const
|
|
159
|
+
*/const H0=xe("loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]);/**
|
|
132
160
|
* @license lucide-react v0.554.0 - ISC
|
|
133
161
|
*
|
|
134
162
|
* This source code is licensed under the ISC license.
|
|
135
163
|
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
-
*/const
|
|
164
|
+
*/const W0=xe("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
|
|
137
165
|
* @license lucide-react v0.554.0 - ISC
|
|
138
166
|
*
|
|
139
167
|
* This source code is licensed under the ISC license.
|
|
140
168
|
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
-
*/const
|
|
169
|
+
*/const V0=xe("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]);/**
|
|
142
170
|
* @license lucide-react v0.554.0 - ISC
|
|
143
171
|
*
|
|
144
172
|
* This source code is licensed under the ISC license.
|
|
145
173
|
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/const
|
|
174
|
+
*/const q0=xe("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
|
|
147
175
|
* @license lucide-react v0.554.0 - ISC
|
|
148
176
|
*
|
|
149
177
|
* This source code is licensed under the ISC license.
|
|
150
178
|
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
-
*/const
|
|
179
|
+
*/const K0=xe("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]]);/**
|
|
152
180
|
* @license lucide-react v0.554.0 - ISC
|
|
153
181
|
*
|
|
154
182
|
* This source code is licensed under the ISC license.
|
|
155
183
|
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/const
|
|
184
|
+
*/const Y0=xe("monitor-cog",[["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"m14.305 7.53.923-.382",key:"1mlnsw"}],["path",{d:"m15.228 4.852-.923-.383",key:"82mpwg"}],["path",{d:"m16.852 3.228-.383-.924",key:"ln4sir"}],["path",{d:"m16.852 8.772-.383.923",key:"1dejw0"}],["path",{d:"m19.148 3.228.383-.924",key:"192kgf"}],["path",{d:"m19.53 9.696-.382-.924",key:"fiavlr"}],["path",{d:"m20.772 4.852.924-.383",key:"1j8mgp"}],["path",{d:"m20.772 7.148.924.383",key:"zix9be"}],["path",{d:"M22 13v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7",key:"1tnzv8"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}]]);/**
|
|
157
185
|
* @license lucide-react v0.554.0 - ISC
|
|
158
186
|
*
|
|
159
187
|
* This source code is licensed under the ISC license.
|
|
160
188
|
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/const
|
|
189
|
+
*/const G0=xe("phone",[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);/**
|
|
162
190
|
* @license lucide-react v0.554.0 - ISC
|
|
163
191
|
*
|
|
164
192
|
* This source code is licensed under the ISC license.
|
|
165
193
|
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
-
*/const
|
|
194
|
+
*/const Q0=xe("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
167
195
|
* @license lucide-react v0.554.0 - ISC
|
|
168
196
|
*
|
|
169
197
|
* This source code is licensed under the ISC license.
|
|
170
198
|
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
-
*/const
|
|
199
|
+
*/const J0=xe("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
172
200
|
* @license lucide-react v0.554.0 - ISC
|
|
173
201
|
*
|
|
174
202
|
* This source code is licensed under the ISC license.
|
|
175
203
|
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
-
*/const
|
|
204
|
+
*/const Z0=xe("thumbs-down",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]]);/**
|
|
177
205
|
* @license lucide-react v0.554.0 - ISC
|
|
178
206
|
*
|
|
179
207
|
* This source code is licensed under the ISC license.
|
|
180
208
|
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
-
*/const
|
|
209
|
+
*/const X0=xe("thumbs-up",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);/**
|
|
182
210
|
* @license lucide-react v0.554.0 - ISC
|
|
183
211
|
*
|
|
184
212
|
* This source code is licensed under the ISC license.
|
|
185
213
|
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
-
*/const
|
|
214
|
+
*/const e1=xe("unplug",[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]]);/**
|
|
187
215
|
* @license lucide-react v0.554.0 - ISC
|
|
188
216
|
*
|
|
189
217
|
* This source code is licensed under the ISC license.
|
|
190
218
|
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
-
*/const
|
|
219
|
+
*/const t1=xe("video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/**
|
|
192
220
|
* @license lucide-react v0.554.0 - ISC
|
|
193
221
|
*
|
|
194
222
|
* This source code is licensed under the ISC license.
|
|
195
223
|
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
-
*/const
|
|
224
|
+
*/const Lc=xe("volume-2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]);/**
|
|
197
225
|
* @license lucide-react v0.554.0 - ISC
|
|
198
226
|
*
|
|
199
227
|
* This source code is licensed under the ISC license.
|
|
200
228
|
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
-
*/const
|
|
229
|
+
*/const n1=xe("volume-x",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]]);/**
|
|
202
230
|
* @license lucide-react v0.554.0 - ISC
|
|
203
231
|
*
|
|
204
232
|
* This source code is licensed under the ISC license.
|
|
205
233
|
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
-
*/const
|
|
234
|
+
*/const r1=xe("wifi-off",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
207
235
|
* @license lucide-react v0.554.0 - ISC
|
|
208
236
|
*
|
|
209
237
|
* This source code is licensed under the ISC license.
|
|
210
238
|
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
-
*/const Nl=we("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function yO(){}function vO(){}function Cg(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Ag=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ig=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Tg={};function Ll(e,t){return(Tg.jsx?Ig:Ag).test(e)}const Og=/[ \t\n\f\r]/g;function Dg(e){return typeof e=="object"?e.type==="text"?Fl(e.value):!1:Fl(e)}function Fl(e){return e.replace(Og,"")===""}class Ln{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ln.prototype.normal={},Ln.prototype.property={},Ln.prototype.space=void 0;function Rl(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Ln(n,r,t)}function to(e){return e.toLowerCase()}class Qe{constructor(t,n){this.attribute=n,this.property=t}}Qe.prototype.attribute="",Qe.prototype.booleanish=!1,Qe.prototype.boolean=!1,Qe.prototype.commaOrSpaceSeparated=!1,Qe.prototype.commaSeparated=!1,Qe.prototype.defined=!1,Qe.prototype.mustUseProperty=!1,Qe.prototype.number=!1,Qe.prototype.overloadedBoolean=!1,Qe.prototype.property="",Qe.prototype.spaceSeparated=!1,Qe.prototype.space=void 0;let Mg=0;const he=Ut(),Fe=Ut(),no=Ut(),Q=Ut(),De=Ut(),Xt=Ut(),et=Ut();function Ut(){return 2**++Mg}const ro=Object.freeze(Object.defineProperty({__proto__:null,boolean:he,booleanish:Fe,commaOrSpaceSeparated:et,commaSeparated:Xt,number:Q,overloadedBoolean:no,spaceSeparated:De},Symbol.toStringTag,{value:"Module"})),io=Object.keys(ro);class oo extends Qe{constructor(t,n,r,i){let o=-1;if(super(t,n),Bl(this,"space",i),typeof r=="number")for(;++o<io.length;){const a=io[o];Bl(this,io[o],(r&ro[a])===ro[a])}}}oo.prototype.defined=!0;function Bl(e,t,n){n&&(e[t]=n)}function en(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new oo(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[to(r)]=r,n[to(o.attribute)]=r}return new Ln(t,n,e.space)}const zl=en({properties:{ariaActiveDescendant:null,ariaAtomic:Fe,ariaAutoComplete:null,ariaBusy:Fe,ariaChecked:Fe,ariaColCount:Q,ariaColIndex:Q,ariaColSpan:Q,ariaControls:De,ariaCurrent:null,ariaDescribedBy:De,ariaDetails:null,ariaDisabled:Fe,ariaDropEffect:De,ariaErrorMessage:null,ariaExpanded:Fe,ariaFlowTo:De,ariaGrabbed:Fe,ariaHasPopup:null,ariaHidden:Fe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:De,ariaLevel:Q,ariaLive:null,ariaModal:Fe,ariaMultiLine:Fe,ariaMultiSelectable:Fe,ariaOrientation:null,ariaOwns:De,ariaPlaceholder:null,ariaPosInSet:Q,ariaPressed:Fe,ariaReadOnly:Fe,ariaRelevant:null,ariaRequired:Fe,ariaRoleDescription:De,ariaRowCount:Q,ariaRowIndex:Q,ariaRowSpan:Q,ariaSelected:Fe,ariaSetSize:Q,ariaSort:null,ariaValueMax:Q,ariaValueMin:Q,ariaValueNow:Q,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function $l(e,t){return t in e?e[t]:t}function jl(e,t){return $l(e,t.toLowerCase())}const _g=en({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Xt,acceptCharset:De,accessKey:De,action:null,allow:null,allowFullScreen:he,allowPaymentRequest:he,allowUserMedia:he,alt:null,as:null,async:he,autoCapitalize:null,autoComplete:De,autoFocus:he,autoPlay:he,blocking:De,capture:null,charSet:null,checked:he,cite:null,className:De,cols:Q,colSpan:null,content:null,contentEditable:Fe,controls:he,controlsList:De,coords:Q|Xt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:he,defer:he,dir:null,dirName:null,disabled:he,download:no,draggable:Fe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:he,formTarget:null,headers:De,height:Q,hidden:no,high:Q,href:null,hrefLang:null,htmlFor:De,httpEquiv:De,id:null,imageSizes:null,imageSrcSet:null,inert:he,inputMode:null,integrity:null,is:null,isMap:he,itemId:null,itemProp:De,itemRef:De,itemScope:he,itemType:De,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:he,low:Q,manifest:null,max:null,maxLength:Q,media:null,method:null,min:null,minLength:Q,multiple:he,muted:he,name:null,nonce:null,noModule:he,noValidate:he,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:he,optimum:Q,pattern:null,ping:De,placeholder:null,playsInline:he,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:he,referrerPolicy:null,rel:De,required:he,reversed:he,rows:Q,rowSpan:Q,sandbox:De,scope:null,scoped:he,seamless:he,selected:he,shadowRootClonable:he,shadowRootDelegatesFocus:he,shadowRootMode:null,shape:null,size:Q,sizes:null,slot:null,span:Q,spellCheck:Fe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Q,step:null,style:null,tabIndex:Q,target:null,title:null,translate:null,type:null,typeMustMatch:he,useMap:null,value:Fe,width:Q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:De,axis:null,background:null,bgColor:null,border:Q,borderColor:null,bottomMargin:Q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:he,declare:he,event:null,face:null,frame:null,frameBorder:null,hSpace:Q,leftMargin:Q,link:null,longDesc:null,lowSrc:null,marginHeight:Q,marginWidth:Q,noResize:he,noHref:he,noShade:he,noWrap:he,object:null,profile:null,prompt:null,rev:null,rightMargin:Q,rules:null,scheme:null,scrolling:Fe,standby:null,summary:null,text:null,topMargin:Q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Q,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:he,disableRemotePlayback:he,prefix:null,property:null,results:Q,security:null,unselectable:null},space:"html",transform:jl}),Pg=en({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"},properties:{about:et,accentHeight:Q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Q,amplitude:Q,arabicForm:null,ascent:Q,attributeName:null,attributeType:null,azimuth:Q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Q,by:null,calcMode:null,capHeight:Q,className:De,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:Q,diffuseConstant:Q,direction:null,display:null,dur:null,divisor:Q,dominantBaseline:null,download:he,dx:null,dy:null,edgeMode:null,editable:null,elevation:Q,enableBackground:null,end:null,event:null,exponent:Q,externalResourcesRequired:null,fill:null,fillOpacity:Q,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:Xt,g2:Xt,glyphName:Xt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Q,horizOriginX:Q,horizOriginY:Q,id:null,ideographic:Q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Q,k:Q,k1:Q,k2:Q,k3:Q,k4:Q,kernelMatrix:et,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Q,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:Q,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:Q,overlineThickness:Q,paintOrder:null,panose1:null,path:null,pathLength:Q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:De,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Q,pointsAtY:Q,pointsAtZ:Q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:et,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:et,rev:et,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:et,requiredFeatures:et,requiredFonts:et,requiredFormats:et,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:Q,specularExponent:Q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Q,strikethroughThickness:Q,string:null,stroke:null,strokeDashArray:et,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Q,strokeOpacity:Q,strokeWidth:null,style:null,surfaceScale:Q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:et,tabIndex:Q,tableValues:null,target:null,targetX:Q,targetY:Q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:et,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Q,underlineThickness:Q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Q,values:null,vAlphabetic:Q,vMathematical:Q,vectorEffect:null,vHanging:Q,vIdeographic:Q,version:null,vertAdvY:Q,vertOriginX:Q,vertOriginY:Q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:$l}),Ul=en({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Hl=en({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:jl}),Wl=en({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Ng={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"},Lg=/[A-Z]/g,Vl=/-[a-z]/g,Fg=/^data[-\w.:]+$/i;function Rg(e,t){const n=to(t);let r=t,i=Qe;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Fg.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Vl,zg);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Vl.test(o)){let a=o.replace(Lg,Bg);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=oo}return new i(r,t)}function Bg(e){return"-"+e.toLowerCase()}function zg(e){return e.charAt(1).toUpperCase()}const $g=Rl([zl,_g,Ul,Hl,Wl],"html"),ao=Rl([zl,Pg,Ul,Hl,Wl],"svg");function jg(e){return e.join(" ").trim()}var so={},ql=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ug=/\n/g,Hg=/^\s*/,Wg=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Vg=/^:\s*/,qg=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Kg=/^[;\s]*/,Yg=/^\s+|\s+$/g,Gg=`
|
|
212
|
-
`,Kl="/",Yl="*",Ht="",Qg="comment",Jg="declaration";function Zg(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(Ug);h&&(n+=h.length);var y=m.lastIndexOf(Gg);r=~y?m.length-y:r+m.length}function o(){var m={line:n,column:r};return function(h){return h.position=new a(m),u(),h}}function a(m){this.start=m,this.end={line:n,column:r},this.source=t.source}a.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 l(m){var h=m.exec(e);if(h){var y=h[0];return i(y),e=e.slice(y.length),h}}function u(){l(Hg)}function f(m){var h;for(m=m||[];h=c();)h!==!1&&m.push(h);return m}function c(){var m=o();if(!(Kl!=e.charAt(0)||Yl!=e.charAt(1))){for(var h=2;Ht!=e.charAt(h)&&(Yl!=e.charAt(h)||Kl!=e.charAt(h+1));)++h;if(h+=2,Ht===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:Qg,comment:y})}}function p(){var m=o(),h=l(Wg);if(h){if(c(),!l(Vg))return s("property missing ':'");var y=l(qg),g=m({type:Jg,property:Gl(h[0].replace(ql,Ht)),value:y?Gl(y[0].replace(ql,Ht)):Ht});return l(Kg),g}}function d(){var m=[];f(m);for(var h;h=p();)h!==!1&&(m.push(h),f(m));return m}return u(),d()}function Gl(e){return e?e.replace(Yg,Ht):Ht}var Xg=Zg,ey=$t&&$t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(so,"__esModule",{value:!0}),so.default=ny;const ty=ey(Xg);function ny(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,ty.default)(e),i=typeof t=="function";return r.forEach(o=>{if(o.type!=="declaration")return;const{property:a,value:s}=o;i?t(a,s,o):s&&(n=n||{},n[a]=s)}),n}var Er={};Object.defineProperty(Er,"__esModule",{value:!0}),Er.camelCase=void 0;var ry=/^--[a-zA-Z0-9_-]+$/,iy=/-([a-z])/g,oy=/^[^-]+$/,ay=/^-(webkit|moz|ms|o|khtml)-/,sy=/^-(ms)-/,ly=function(e){return!e||oy.test(e)||ry.test(e)},uy=function(e,t){return t.toUpperCase()},Ql=function(e,t){return"".concat(t,"-")},cy=function(e,t){return t===void 0&&(t={}),ly(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(sy,Ql):e=e.replace(ay,Ql),e.replace(iy,uy))};Er.camelCase=cy;var fy=$t&&$t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},dy=fy(so),py=Er;function lo(e,t){var n={};return!e||typeof e!="string"||(0,dy.default)(e,function(r,i){r&&i&&(n[(0,py.camelCase)(r,t)]=i)}),n}lo.default=lo;var hy=lo;const my=jt(hy),Jl=Zl("end"),uo=Zl("start");function Zl(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 gy(e){const t=uo(e),n=Jl(e);if(t&&n)return{start:t,end:n}}function Fn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Xl(e.position):"start"in e||"end"in e?Xl(e):"line"in e||"column"in e?co(e):""}function co(e){return eu(e&&e.line)+":"+eu(e&&e.column)}function Xl(e){return co(e&&e.start)+"-"+co(e&&e.end)}function eu(e){return e&&typeof e=="number"?e:1}class He extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},a=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(a=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const s=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=Fn(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}He.prototype.file="",He.prototype.name="",He.prototype.reason="",He.prototype.message="",He.prototype.stack="",He.prototype.column=void 0,He.prototype.line=void 0,He.prototype.ancestors=void 0,He.prototype.cause=void 0,He.prototype.fatal=void 0,He.prototype.place=void 0,He.prototype.ruleId=void 0,He.prototype.source=void 0;const fo={}.hasOwnProperty,yy=new Map,vy=/[A-Z]/g,by=new Set(["table","tbody","thead","tfoot","tr"]),xy=new Set(["td","th"]),tu="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function wy(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=Oy(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=Ty(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"?ao:$g,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=nu(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function nu(e,t,n){if(t.type==="element")return ky(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Sy(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Cy(e,t,n);if(t.type==="mdxjsEsm")return Ey(e,t);if(t.type==="root")return Ay(e,t,n);if(t.type==="text")return Iy(e,t)}function ky(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=ao,e.schema=i),e.ancestors.push(t);const o=iu(e,t.tagName,!1),a=Dy(e,t);let s=ho(e,t);return by.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!Dg(l):!0})),ru(e,a,o,t),po(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function Sy(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)}Rn(e,t.position)}function Ey(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Rn(e,t.position)}function Cy(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=ao,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:iu(e,t.name,!0),a=My(e,t),s=ho(e,t);return ru(e,a,o,t),po(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function Ay(e,t,n){const r={};return po(r,ho(e,t)),e.create(t,e.Fragment,r,n)}function Iy(e,t){return t.value}function ru(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function po(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Ty(e,t,n){return r;function r(i,o,a,s){const u=Array.isArray(a.children)?n:t;return s?u(o,a,s):u(o,a)}}function Oy(e,t){return n;function n(r,i,o,a){const s=Array.isArray(o.children),l=uo(r);return t(i,o,a,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function Dy(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&fo.call(t.properties,i)){const o=_y(e,i,t.properties[i]);if(o){const[a,s]=o;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&xy.has(t.tagName)?r=s:n[a]=s}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function My(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const a=o.expression;a.type;const s=a.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else Rn(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,o=e.evaluater.evaluateExpression(s.expression)}else Rn(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function ho(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:yy;for(;++r<t.children.length;){const o=t.children[r];let a;if(e.passKeys){const l=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(l){const u=i.get(l)||0;a=l+"-"+u,i.set(l,u+1)}}const s=nu(e,o,a);s!==void 0&&n.push(s)}return n}function _y(e,t,n){const r=Rg(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Cg(n):jg(n)),r.property==="style"){let i=typeof n=="object"?n:Py(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Ny(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Ng[r.property]||r.property:r.attribute,n]}}function Py(e,t){try{return my(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new He("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=tu+"#cannot-parse-style-attribute",i}}function iu(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,a;for(;++o<i.length;){const s=Ll(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(o&&s.type==="Literal"),optional:!1}:s}r=a}else r=Ll(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return fo.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Rn(e)}function Rn(e,t){const n=new He("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=tu+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Ny(e){const t={};let n;for(n in e)fo.call(e,n)&&(t[Ly(n)]=e[n]);return t}function Ly(e){let t=e.replace(vy,Fy);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Fy(e){return"-"+e.toLowerCase()}const mo={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"]},Ry={};function go(e,t){const n=Ry,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return ou(e,r,i)}function ou(e,t,n){if(By(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 au(e.children,t,n)}return Array.isArray(e)?au(e,t,n):""}function au(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=ou(e[i],t,n);return r.join("")}function By(e){return!!(e&&typeof e=="object")}const su=document.createElement("i");function yo(e){const t="&"+e+";";su.innerHTML=t;const n=su.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function tt(e,t,n,r){const i=e.length;let o=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);o<r.length;)a=r.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function it(e,t){return e.length>0?(tt(e,e.length,0,t),e):t}const lu={}.hasOwnProperty;function uu(e){const t={};let n=-1;for(;++n<e.length;)zy(t,e[n]);return t}function zy(e,t){let n;for(n in t){const i=(lu.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let a;if(o)for(a in o){lu.call(i,a)||(i[a]=[]);const s=o[a];$y(i[a],Array.isArray(s)?s:s?[s]:[])}}}function $y(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);tt(e,0,0,r)}function cu(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 ut(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const qe=Dt(/[A-Za-z]/),We=Dt(/[\dA-Za-z]/),jy=Dt(/[#-'*+\--9=?A-Z^-~]/);function Cr(e){return e!==null&&(e<32||e===127)}const vo=Dt(/\d/),Uy=Dt(/[\dA-Fa-f]/),Hy=Dt(/[!-/:-@[-`{-~]/);function ce(e){return e!==null&&e<-2}function Ie(e){return e!==null&&(e<0||e===32)}function ye(e){return e===-2||e===-1||e===32}const Ar=Dt(new RegExp("\\p{P}|\\p{S}","u")),Wt=Dt(/\s/);function Dt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function tn(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(o===37&&We(e.charCodeAt(n+1))&&We(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const s=e.charCodeAt(n+1);o<56320&&s>56319&&s<57344?(a=String.fromCharCode(o,s),i=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function be(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(l){return ye(l)?(e.enter(n),s(l)):t(l)}function s(l){return ye(l)&&o++<i?(e.consume(l),s):(e.exit(n),t(l))}}const Wy={tokenize:Vy};function Vy(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"),be(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return ce(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),a)}}const qy={tokenize:Ky},fu={tokenize:Yy};function Ky(e){const t=this,n=[];let r=0,i,o,a;return s;function s(x){if(r<n.length){const A=n[r];return t.containerState=A[1],e.attempt(A[0].continuation,l,u)(x)}return u(x)}function l(x){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();const A=t.events.length;let k=A,C;for(;k--;)if(t.events[k][0]==="exit"&&t.events[k][1].type==="chunkFlow"){C=t.events[k][1].end;break}g(r);let T=A;for(;T<t.events.length;)t.events[T][1].end={...C},T++;return tt(t.events,k+1,0,t.events.slice(A)),t.events.length=T,u(x)}return s(x)}function u(x){if(r===n.length){if(!i)return p(x);if(i.currentConstruct&&i.currentConstruct.concrete)return m(x);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(fu,f,c)(x)}function f(x){return i&&v(),g(r),p(x)}function c(x){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,m(x)}function p(x){return t.containerState={},e.attempt(fu,d,m)(x)}function d(x){return r++,n.push([t.currentConstruct,t.containerState]),p(x)}function m(x){if(x===null){i&&v(),g(0),e.consume(x);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),h(x)}function h(x){if(x===null){y(e.exit("chunkFlow"),!0),g(0),e.consume(x);return}return ce(x)?(e.consume(x),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(x),h)}function y(x,A){const k=t.sliceStream(x);if(A&&k.push(null),x.previous=o,o&&(o.next=x),o=x,i.defineSkip(x.start),i.write(k),t.parser.lazy[x.start.line]){let C=i.events.length;for(;C--;)if(i.events[C][1].start.offset<a&&(!i.events[C][1].end||i.events[C][1].end.offset>a))return;const T=t.events.length;let M=T,R,I;for(;M--;)if(t.events[M][0]==="exit"&&t.events[M][1].type==="chunkFlow"){if(R){I=t.events[M][1].end;break}R=!0}for(g(r),C=T;C<t.events.length;)t.events[C][1].end={...I},C++;tt(t.events,M+1,0,t.events.slice(T)),t.events.length=C}}function g(x){let A=n.length;for(;A-- >x;){const k=n[A];t.containerState=k[1],k[0].exit.call(t,e)}n.length=x}function v(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Yy(e,t,n){return be(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function nn(e){if(e===null||Ie(e)||Wt(e))return 1;if(Ar(e))return 2}function Ir(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const bo={name:"attention",resolveAll:Gy,tokenize:Qy};function Gy(e,t){let n=-1,r,i,o,a,s,l,u,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},p={...e[n][1].start};du(c,-l),du(p,l),a={type:l>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},o={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...a.start},end:{...s.end}},e[r][1].end={...a.start},e[n][1].start={...s.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=it(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=it(u,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),u=it(u,Ir(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=it(u,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,u=it(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,tt(e,r-1,n-r+3,u),n=r+u.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Qy(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=nn(r);let o;return a;function a(l){return o=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===o)return e.consume(l),s;const u=e.exit("attentionSequence"),f=nn(l),c=!f||f===2&&i||n.includes(l),p=!i||i===2&&f||n.includes(r);return u._open=!!(o===42?c:c&&(i||!p)),u._close=!!(o===42?p:p&&(f||!c)),t(l)}}function du(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Jy={name:"autolink",tokenize:Zy};function Zy(e,t,n){let r=0;return i;function i(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(d){return qe(d)?(e.consume(d),a):d===64?n(d):u(d)}function a(d){return d===43||d===45||d===46||We(d)?(r=1,s(d)):u(d)}function s(d){return d===58?(e.consume(d),r=0,l):(d===43||d===45||d===46||We(d))&&r++<32?(e.consume(d),s):(r=0,u(d))}function l(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||Cr(d)?n(d):(e.consume(d),l)}function u(d){return d===64?(e.consume(d),f):jy(d)?(e.consume(d),u):n(d)}function f(d){return We(d)?c(d):n(d)}function c(d){return d===46?(e.consume(d),r=0,f):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):p(d)}function p(d){if((d===45||We(d))&&r++<63){const m=d===45?p:c;return e.consume(d),m}return n(d)}}const Bn={partial:!0,tokenize:Xy};function Xy(e,t,n){return r;function r(o){return ye(o)?be(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||ce(o)?t(o):n(o)}}const pu={continuation:{tokenize:tv},exit:nv,name:"blockQuote",tokenize:ev};function ev(e,t,n){const r=this;return i;function i(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return n(a)}function o(a){return ye(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function tv(e,t,n){const r=this;return i;function i(a){return ye(a)?be(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(pu,t,n)(a)}}function nv(e){e.exit("blockQuote")}const hu={name:"characterEscape",tokenize:rv};function rv(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Hy(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const mu={name:"characterReference",tokenize:iv};function iv(e,t,n){const r=this;let i=0,o,a;return s;function s(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),l}function l(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,a=We,f(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=Uy,f):(e.enter("characterReferenceValue"),o=7,a=vo,f(c))}function f(c){if(c===59&&i){const p=e.exit("characterReferenceValue");return a===We&&!yo(r.sliceSerialize(p))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(c)&&i++<o?(e.consume(c),f):n(c)}}const gu={partial:!0,tokenize:av},yu={concrete:!0,name:"codeFenced",tokenize:ov};function ov(e,t,n){const r=this,i={partial:!0,tokenize:k};let o=0,a=0,s;return l;function l(C){return u(C)}function u(C){const T=r.events[r.events.length-1];return o=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,s=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(C)}function f(C){return C===s?(a++,e.consume(C),f):a<3?n(C):(e.exit("codeFencedFenceSequence"),ye(C)?be(e,c,"whitespace")(C):c(C))}function c(C){return C===null||ce(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check(gu,h,A)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(C))}function p(C){return C===null||ce(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(C)):ye(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),be(e,d,"whitespace")(C)):C===96&&C===s?n(C):(e.consume(C),p)}function d(C){return C===null||ce(C)?c(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(C))}function m(C){return C===null||ce(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(C)):C===96&&C===s?n(C):(e.consume(C),m)}function h(C){return e.attempt(i,A,y)(C)}function y(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),g}function g(C){return o>0&&ye(C)?be(e,v,"linePrefix",o+1)(C):v(C)}function v(C){return C===null||ce(C)?e.check(gu,h,A)(C):(e.enter("codeFlowValue"),x(C))}function x(C){return C===null||ce(C)?(e.exit("codeFlowValue"),v(C)):(e.consume(C),x)}function A(C){return e.exit("codeFenced"),t(C)}function k(C,T,M){let R=0;return I;function I(D){return C.enter("lineEnding"),C.consume(D),C.exit("lineEnding"),O}function O(D){return C.enter("codeFencedFence"),ye(D)?be(C,j,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):j(D)}function j(D){return D===s?(C.enter("codeFencedFenceSequence"),_(D)):M(D)}function _(D){return D===s?(R++,C.consume(D),_):R>=a?(C.exit("codeFencedFenceSequence"),ye(D)?be(C,N,"whitespace")(D):N(D)):M(D)}function N(D){return D===null||ce(D)?(C.exit("codeFencedFence"),T(D)):M(D)}}}function av(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const xo={name:"codeIndented",tokenize:lv},sv={partial:!0,tokenize:uv};function lv(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),be(e,o,"linePrefix",5)(u)}function o(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?l(u):ce(u)?e.attempt(sv,a,l)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||ce(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),s)}function l(u){return e.exit("codeIndented"),t(u)}}function uv(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):ce(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):be(e,o,"linePrefix",5)(a)}function o(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):ce(a)?i(a):n(a)}}const cv={name:"codeText",previous:dv,resolve:fv,tokenize:pv};function fv(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 dv(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function pv(e,t,n){let r=0,i,o;return a;function a(c){return e.enter("codeText"),e.enter("codeTextSequence"),s(c)}function s(c){return c===96?(e.consume(c),r++,s):(e.exit("codeTextSequence"),l(c))}function l(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),l):c===96?(o=e.enter("codeTextSequence"),i=0,f(c)):ce(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(c))}function u(c){return c===null||c===32||c===96||ce(c)?(e.exit("codeTextData"),l(c)):(e.consume(c),u)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(o.type="codeTextData",u(c))}}class hv{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 o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&zn(this.left,r),o.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),zn(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),zn(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);zn(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);zn(this.left,n.reverse())}}}function zn(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 vu(e){const t={};let n=-1,r,i,o,a,s,l,u;const f=new hv(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type==="lineEndingBlank"&&(o+=2),o<l.length&&l[o][1].type==="content"))for(;++o<l.length&&l[o][1].type!=="content";)l[o][1].type==="chunkText"&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,mv(f,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(a=f.get(o),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},s=f.slice(i,n),s.unshift(r),f.splice(i,n-i+1,s))}}return tt(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function mv(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const s=a.events,l=[],u={};let f,c,p=-1,d=n,m=0,h=0;const y=[h];for(;d;){for(;e.get(++i)[1]!==d;);o.push(i),d._tokenizer||(f=r.sliceStream(d),d.next||f.push(null),c&&a.defineSkip(d.start),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(f),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),c=d,d=d.next}for(d=n;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(h=p+1,y.push(h),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(a.events=[],d?(d._tokenizer=void 0,d.previous=void 0):y.pop(),p=y.length;p--;){const g=s.slice(y[p],y[p+1]),v=o.pop();l.push([v,v+g.length-1]),e.splice(v,2,g)}for(l.reverse(),p=-1;++p<l.length;)u[m+l[p][0]]=m+l[p][1],m+=l[p][1]-l[p][0]-1;return u}const gv={resolve:vv,tokenize:bv},yv={partial:!0,tokenize:xv};function vv(e){return vu(e),e}function bv(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):ce(s)?e.check(yv,a,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function xv(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),be(e,o,"linePrefix")}function o(a){if(a===null||ce(a))return n(a);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function bu(e,t,n,r,i,o,a,s,l){const u=l||Number.POSITIVE_INFINITY;let f=0;return c;function c(g){return g===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(g),e.exit(o),p):g===null||g===32||g===41||Cr(g)?n(g):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(g))}function p(g){return g===62?(e.enter(o),e.consume(g),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),d(g))}function d(g){return g===62?(e.exit("chunkString"),e.exit(s),p(g)):g===null||g===60||ce(g)?n(g):(e.consume(g),g===92?m:d)}function m(g){return g===60||g===62||g===92?(e.consume(g),d):d(g)}function h(g){return!f&&(g===null||g===41||Ie(g))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(g)):f<u&&g===40?(e.consume(g),f++,h):g===41?(e.consume(g),f--,h):g===null||g===32||g===40||Cr(g)?n(g):(e.consume(g),g===92?y:h)}function y(g){return g===40||g===41||g===92?(e.consume(g),h):h(g)}}function xu(e,t,n,r,i,o){const a=this;let s=0,l;return u;function u(d){return e.enter(r),e.enter(i),e.consume(d),e.exit(i),e.enter(o),f}function f(d){return s>999||d===null||d===91||d===93&&!l||d===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):d===93?(e.exit(o),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):ce(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===null||d===91||d===93||ce(d)||s++>999?(e.exit("chunkString"),f(d)):(e.consume(d),l||(l=!ye(d)),d===92?p:c)}function p(d){return d===91||d===92||d===93?(e.consume(d),s++,c):c(d)}}function wu(e,t,n,r,i,o){let a;return s;function s(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),a=p===40?41:p,l):n(p)}function l(p){return p===a?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),u(p))}function u(p){return p===a?(e.exit(o),l(a)):p===null?n(p):ce(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),be(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===a||p===null||ce(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?c:f)}function c(p){return p===a||p===92?(e.consume(p),f):f(p)}}function $n(e,t){let n;return r;function r(i){return ce(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ye(i)?be(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const wv={name:"definition",tokenize:Sv},kv={partial:!0,tokenize:Ev};function Sv(e,t,n){const r=this;let i;return o;function o(d){return e.enter("definition"),a(d)}function a(d){return xu.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function s(d){return i=ut(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),l):n(d)}function l(d){return Ie(d)?$n(e,u)(d):u(d)}function u(d){return bu(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function f(d){return e.attempt(kv,c,c)(d)}function c(d){return ye(d)?be(e,p,"whitespace")(d):p(d)}function p(d){return d===null||ce(d)?(e.exit("definition"),r.parser.defined.push(i),t(d)):n(d)}}function Ev(e,t,n){return r;function r(s){return Ie(s)?$n(e,i)(s):n(s)}function i(s){return wu(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return ye(s)?be(e,a,"whitespace")(s):a(s)}function a(s){return s===null||ce(s)?t(s):n(s)}}const Cv={name:"hardBreakEscape",tokenize:Av};function Av(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return ce(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Iv={name:"headingAtx",resolve:Tv,tokenize:Ov};function Tv(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},tt(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Ov(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),a(f)}function a(f){return f===35&&r++<6?(e.consume(f),a):f===null||Ie(f)?(e.exit("atxHeadingSequence"),s(f)):n(f)}function s(f){return f===35?(e.enter("atxHeadingSequence"),l(f)):f===null||ce(f)?(e.exit("atxHeading"),t(f)):ye(f)?be(e,s,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function l(f){return f===35?(e.consume(f),l):(e.exit("atxHeadingSequence"),s(f))}function u(f){return f===null||f===35||Ie(f)?(e.exit("atxHeadingText"),s(f)):(e.consume(f),u)}}const Dv=["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"],ku=["pre","script","style","textarea"],Mv={concrete:!0,name:"htmlFlow",resolveTo:Nv,tokenize:Lv},_v={partial:!0,tokenize:Rv},Pv={partial:!0,tokenize:Fv};function Nv(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 Lv(e,t,n){const r=this;let i,o,a,s,l;return u;function u(w){return f(w)}function f(w){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(w),c}function c(w){return w===33?(e.consume(w),p):w===47?(e.consume(w),o=!0,h):w===63?(e.consume(w),i=3,r.interrupt?t:b):qe(w)?(e.consume(w),a=String.fromCharCode(w),y):n(w)}function p(w){return w===45?(e.consume(w),i=2,d):w===91?(e.consume(w),i=5,s=0,m):qe(w)?(e.consume(w),i=4,r.interrupt?t:b):n(w)}function d(w){return w===45?(e.consume(w),r.interrupt?t:b):n(w)}function m(w){const W="CDATA[";return w===W.charCodeAt(s++)?(e.consume(w),s===W.length?r.interrupt?t:j:m):n(w)}function h(w){return qe(w)?(e.consume(w),a=String.fromCharCode(w),y):n(w)}function y(w){if(w===null||w===47||w===62||Ie(w)){const W=w===47,X=a.toLowerCase();return!W&&!o&&ku.includes(X)?(i=1,r.interrupt?t(w):j(w)):Dv.includes(a.toLowerCase())?(i=6,W?(e.consume(w),g):r.interrupt?t(w):j(w)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(w):o?v(w):x(w))}return w===45||We(w)?(e.consume(w),a+=String.fromCharCode(w),y):n(w)}function g(w){return w===62?(e.consume(w),r.interrupt?t:j):n(w)}function v(w){return ye(w)?(e.consume(w),v):I(w)}function x(w){return w===47?(e.consume(w),I):w===58||w===95||qe(w)?(e.consume(w),A):ye(w)?(e.consume(w),x):I(w)}function A(w){return w===45||w===46||w===58||w===95||We(w)?(e.consume(w),A):k(w)}function k(w){return w===61?(e.consume(w),C):ye(w)?(e.consume(w),k):x(w)}function C(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),l=w,T):ye(w)?(e.consume(w),C):M(w)}function T(w){return w===l?(e.consume(w),l=null,R):w===null||ce(w)?n(w):(e.consume(w),T)}function M(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||Ie(w)?k(w):(e.consume(w),M)}function R(w){return w===47||w===62||ye(w)?x(w):n(w)}function I(w){return w===62?(e.consume(w),O):n(w)}function O(w){return w===null||ce(w)?j(w):ye(w)?(e.consume(w),O):n(w)}function j(w){return w===45&&i===2?(e.consume(w),z):w===60&&i===1?(e.consume(w),U):w===62&&i===4?(e.consume(w),P):w===63&&i===3?(e.consume(w),b):w===93&&i===5?(e.consume(w),V):ce(w)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(_v,H,_)(w)):w===null||ce(w)?(e.exit("htmlFlowData"),_(w)):(e.consume(w),j)}function _(w){return e.check(Pv,N,H)(w)}function N(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),D}function D(w){return w===null||ce(w)?_(w):(e.enter("htmlFlowData"),j(w))}function z(w){return w===45?(e.consume(w),b):j(w)}function U(w){return w===47?(e.consume(w),a="",$):j(w)}function $(w){if(w===62){const W=a.toLowerCase();return ku.includes(W)?(e.consume(w),P):j(w)}return qe(w)&&a.length<8?(e.consume(w),a+=String.fromCharCode(w),$):j(w)}function V(w){return w===93?(e.consume(w),b):j(w)}function b(w){return w===62?(e.consume(w),P):w===45&&i===2?(e.consume(w),b):j(w)}function P(w){return w===null||ce(w)?(e.exit("htmlFlowData"),H(w)):(e.consume(w),P)}function H(w){return e.exit("htmlFlow"),t(w)}}function Fv(e,t,n){const r=this;return i;function i(a){return ce(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):n(a)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function Rv(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Bn,t,n)}}const Bv={name:"htmlText",tokenize:zv};function zv(e,t,n){const r=this;let i,o,a;return s;function s(b){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(b),l}function l(b){return b===33?(e.consume(b),u):b===47?(e.consume(b),k):b===63?(e.consume(b),x):qe(b)?(e.consume(b),M):n(b)}function u(b){return b===45?(e.consume(b),f):b===91?(e.consume(b),o=0,m):qe(b)?(e.consume(b),v):n(b)}function f(b){return b===45?(e.consume(b),d):n(b)}function c(b){return b===null?n(b):b===45?(e.consume(b),p):ce(b)?(a=c,U(b)):(e.consume(b),c)}function p(b){return b===45?(e.consume(b),d):c(b)}function d(b){return b===62?z(b):b===45?p(b):c(b)}function m(b){const P="CDATA[";return b===P.charCodeAt(o++)?(e.consume(b),o===P.length?h:m):n(b)}function h(b){return b===null?n(b):b===93?(e.consume(b),y):ce(b)?(a=h,U(b)):(e.consume(b),h)}function y(b){return b===93?(e.consume(b),g):h(b)}function g(b){return b===62?z(b):b===93?(e.consume(b),g):h(b)}function v(b){return b===null||b===62?z(b):ce(b)?(a=v,U(b)):(e.consume(b),v)}function x(b){return b===null?n(b):b===63?(e.consume(b),A):ce(b)?(a=x,U(b)):(e.consume(b),x)}function A(b){return b===62?z(b):x(b)}function k(b){return qe(b)?(e.consume(b),C):n(b)}function C(b){return b===45||We(b)?(e.consume(b),C):T(b)}function T(b){return ce(b)?(a=T,U(b)):ye(b)?(e.consume(b),T):z(b)}function M(b){return b===45||We(b)?(e.consume(b),M):b===47||b===62||Ie(b)?R(b):n(b)}function R(b){return b===47?(e.consume(b),z):b===58||b===95||qe(b)?(e.consume(b),I):ce(b)?(a=R,U(b)):ye(b)?(e.consume(b),R):z(b)}function I(b){return b===45||b===46||b===58||b===95||We(b)?(e.consume(b),I):O(b)}function O(b){return b===61?(e.consume(b),j):ce(b)?(a=O,U(b)):ye(b)?(e.consume(b),O):R(b)}function j(b){return b===null||b===60||b===61||b===62||b===96?n(b):b===34||b===39?(e.consume(b),i=b,_):ce(b)?(a=j,U(b)):ye(b)?(e.consume(b),j):(e.consume(b),N)}function _(b){return b===i?(e.consume(b),i=void 0,D):b===null?n(b):ce(b)?(a=_,U(b)):(e.consume(b),_)}function N(b){return b===null||b===34||b===39||b===60||b===61||b===96?n(b):b===47||b===62||Ie(b)?R(b):(e.consume(b),N)}function D(b){return b===47||b===62||Ie(b)?R(b):n(b)}function z(b){return b===62?(e.consume(b),e.exit("htmlTextData"),e.exit("htmlText"),t):n(b)}function U(b){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),$}function $(b){return ye(b)?be(e,V,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):V(b)}function V(b){return e.enter("htmlTextData"),a(b)}}const wo={name:"labelEnd",resolveAll:Hv,resolveTo:Wv,tokenize:Vv},$v={tokenize:qv},jv={tokenize:Kv},Uv={tokenize:Yv};function Hv(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&tt(e,0,e.length,n),e}function Wv(e,t){let n=e.length,r=0,i,o,a,s;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const l={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[a][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[a-2][1].start}};return s=[["enter",l,t],["enter",u,t]],s=it(s,e.slice(o+1,o+r+3)),s=it(s,[["enter",f,t]]),s=it(s,Ir(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),s=it(s,[["exit",f,t],e[a-2],e[a-1],["exit",u,t]]),s=it(s,e.slice(a+1)),s=it(s,[["exit",l,t]]),tt(e,o,e.length,s),e}function Vv(e,t,n){const r=this;let i=r.events.length,o,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return s;function s(p){return o?o._inactive?c(p):(a=r.parser.defined.includes(ut(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),l):n(p)}function l(p){return p===40?e.attempt($v,f,a?f:c)(p):p===91?e.attempt(jv,f,a?u:c)(p):a?f(p):c(p)}function u(p){return e.attempt(Uv,f,c)(p)}function f(p){return t(p)}function c(p){return o._balanced=!0,n(p)}}function qv(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return Ie(c)?$n(e,o)(c):o(c)}function o(c){return c===41?f(c):bu(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function a(c){return Ie(c)?$n(e,l)(c):f(c)}function s(c){return n(c)}function l(c){return c===34||c===39||c===40?wu(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function u(c){return Ie(c)?$n(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function Kv(e,t,n){const r=this;return i;function i(s){return xu.call(r,e,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(ut(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function Yv(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const Gv={name:"labelStartImage",resolveAll:wo.resolveAll,tokenize:Qv};function Qv(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Jv={name:"labelStartLink",resolveAll:wo.resolveAll,tokenize:Zv};function Zv(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const ko={name:"lineEnding",tokenize:Xv};function Xv(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),be(e,t,"linePrefix")}}const Tr={name:"thematicBreak",tokenize:eb};function eb(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),a(u)}function a(u){return i=u,s(u)}function s(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||ce(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),ye(u)?be(e,s,"whitespace")(u):s(u))}}const Je={continuation:{tokenize:ib},exit:ab,name:"list",tokenize:rb},tb={partial:!0,tokenize:sb},nb={partial:!0,tokenize:ob};function rb(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return s;function s(d){const m=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:vo(d)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(Tr,n,u)(d):u(d);if(!r.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(d)}return n(d)}function l(d){return vo(d)&&++a<10?(e.consume(d),l):(!r.interrupt||a<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),u(d)):n(d)}function u(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,e.check(Bn,r.interrupt?n:f,e.attempt(tb,p,c))}function f(d){return r.containerState.initialBlankLine=!0,o++,p(d)}function c(d){return ye(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),p):n(d)}function p(d){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function ib(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Bn,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,be(e,t,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!ye(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(nb,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,be(e,e.attempt(Je,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function ob(e,t,n){const r=this;return be(e,i,"listItemIndent",r.containerState.size+1);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(o):n(o)}}function ab(e){e.exit(this.containerState.type)}function sb(e,t,n){const r=this;return be(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const a=r.events[r.events.length-1];return!ye(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Su={name:"setextUnderline",resolveTo:lb,tokenize:ub};function lb(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function ub(e,t,n){const r=this;let i;return o;function o(u){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=u,a(u)):n(u)}function a(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),ye(u)?be(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||ce(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const cb={tokenize:fb};function fb(e){const t=this,n=e.attempt(Bn,r,e.attempt(this.parser.constructs.flowInitial,i,be(e,e.attempt(this.parser.constructs.flow,i,e.attempt(gv,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const db={resolveAll:Cu()},pb=Eu("string"),hb=Eu("text");function Eu(e){return{resolveAll:Cu(e==="text"?mb:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,a,s);return a;function a(f){return u(f)?o(f):s(f)}function s(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),l}function l(f){return u(f)?(n.exit("data"),o(f)):(n.consume(f),l)}function u(f){if(f===null)return!0;const c=i[f];let p=-1;if(c)for(;++p<c.length;){const d=c[p];if(!d.previous||d.previous.call(r,r.previous))return!0}return!1}}}function Cu(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function mb(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,a=-1,s=0,l;for(;o--;){const u=i[o];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(u===-2)l=!0,s++;else if(u!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const u={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?a:r.start._bufferIndex+a,_index:r.start._index+o,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const gb=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:wv},disable:{null:[]},document:{42:Je,43:Je,45:Je,48:Je,49:Je,50:Je,51:Je,52:Je,53:Je,54:Je,55:Je,56:Je,57:Je,62:pu},flow:{35:Iv,42:Tr,45:[Su,Tr],60:Mv,61:Su,95:Tr,96:yu,126:yu},flowInitial:{[-2]:xo,[-1]:xo,32:xo},insideSpan:{null:[bo,db]},string:{38:mu,92:hu},text:{[-5]:ko,[-4]:ko,[-3]:ko,33:Gv,38:mu,42:bo,60:[Jy,Bv],91:Jv,92:[Cv,hu],93:wo,95:bo,96:cv}},Symbol.toStringTag,{value:"Module"}));function yb(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let a=[],s=[];const l={attempt:T(k),check:T(C),consume:v,enter:x,exit:A,interrupt:T(C,{interrupt:!0})},u={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:p,sliceStream:d,write:c};let f=t.tokenize.call(u,l);return t.resolveAll&&o.push(t),u;function c(O){return a=it(a,O),y(),a[a.length-1]!==null?[]:(M(t,0),u.events=Ir(o,u.events,u),u.events)}function p(O,j){return bb(d(O),j)}function d(O){return vb(a,O)}function m(){const{_bufferIndex:O,_index:j,line:_,column:N,offset:D}=r;return{_bufferIndex:O,_index:j,line:_,column:N,offset:D}}function h(O){i[O.line]=O.column,I()}function y(){let O;for(;r._index<a.length;){const j=a[r._index];if(typeof j=="string")for(O=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===O&&r._bufferIndex<j.length;)g(j.charCodeAt(r._bufferIndex));else g(j)}}function g(O){f=f(O)}function v(O){ce(O)?(r.line++,r.column=1,r.offset+=O===-3?2:1,I()):O!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=O}function x(O,j){const _=j||{};return _.type=O,_.start=m(),u.events.push(["enter",_,u]),s.push(_),_}function A(O){const j=s.pop();return j.end=m(),u.events.push(["exit",j,u]),j}function k(O,j){M(O,j.from)}function C(O,j){j.restore()}function T(O,j){return _;function _(N,D,z){let U,$,V,b;return Array.isArray(N)?H(N):"tokenize"in N?H([N]):P(N);function P(Y){return J;function J(ee){const ie=ee!==null&&Y[ee],K=ee!==null&&Y.null,te=[...Array.isArray(ie)?ie:ie?[ie]:[],...Array.isArray(K)?K:K?[K]:[]];return H(te)(ee)}}function H(Y){return U=Y,$=0,Y.length===0?z:w(Y[$])}function w(Y){return J;function J(ee){return b=R(),V=Y,Y.partial||(u.currentConstruct=Y),Y.name&&u.parser.constructs.disable.null.includes(Y.name)?X():Y.tokenize.call(j?Object.assign(Object.create(u),j):u,l,W,X)(ee)}}function W(Y){return O(V,b),D}function X(Y){return b.restore(),++$<U.length?w(U[$]):z}}}function M(O,j){O.resolveAll&&!o.includes(O)&&o.push(O),O.resolve&&tt(u.events,j,u.events.length-j,O.resolve(u.events.slice(j),u)),O.resolveTo&&(u.events=O.resolveTo(u.events,u))}function R(){const O=m(),j=u.previous,_=u.currentConstruct,N=u.events.length,D=Array.from(s);return{from:N,restore:z};function z(){r=O,u.previous=j,u.currentConstruct=_,u.events.length=N,s=D,I()}}function I(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function vb(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,o)];else{if(a=e.slice(n,i),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function bb(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
|
|
213
|
-
`;break}case-3:{a=`\r
|
|
214
|
-
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,r.push(a)}return r.join("")}function xb(e){const r={constructs:uu([gb,...(e||{}).extensions||[]]),content:i(Wy),defined:[],document:i(qy),flow:i(cb),lazy:{},string:i(pb),text:i(hb)};return r;function i(o){return a;function a(s){return yb(r,o,s)}}}function wb(e){for(;!vu(e););return e}const Au=/[\0\t\n\r]/g;function kb(){let e=1,t="",n=!0,r;return i;function i(o,a,s){const l=[];let u,f,c,p,d;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),c=0,t="",n&&(o.charCodeAt(0)===65279&&c++,n=void 0);c<o.length;){if(Au.lastIndex=c,u=Au.exec(o),p=u&&u.index!==void 0?u.index:o.length,d=o.charCodeAt(p),!u){t=o.slice(c);break}if(d===10&&c===p&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),c<p&&(l.push(o.slice(c,p)),e+=p-c),d){case 0:{l.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,l.push(-2);e++<f;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}c=p+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const Sb=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Eb(e){return e.replace(Sb,Cb)}function Cb(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return cu(n.slice(o?2:1),o?16:10)}return yo(n)||e}const Iu={}.hasOwnProperty;function Ab(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Ib(n)(wb(xb(n).document().write(kb()(e,t,!0))))}function Ib(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(de),autolinkProtocol:R,autolinkEmail:R,atxHeading:o(ke),blockQuote:o(K),characterEscape:R,characterReference:R,codeFenced:o(te),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(te,a),codeText:o(L,a),codeTextData:R,data:R,codeFlowValue:R,definition:o(ne),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(me),hardBreakEscape:o(oe),hardBreakTrailing:o(oe),htmlFlow:o(G,a),htmlFlowData:R,htmlText:o(G,a),htmlTextData:R,image:o(ue),label:a,link:o(de),listItem:o(Se),listItemValue:p,listOrdered:o(xe,c),listUnordered:o(xe),paragraph:o(Ue),reference:w,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(ke),strong:o(Ye),thematicBreak:o(se)},exit:{atxHeading:l(),atxHeadingSequence:k,autolink:l(),autolinkEmail:ie,autolinkProtocol:ee,blockQuote:l(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:X,characterReferenceMarkerNumeric:X,characterReferenceValue:Y,characterReference:J,codeFenced:l(y),codeFencedFence:h,codeFencedFenceInfo:d,codeFencedFenceMeta:m,codeFlowValue:I,codeIndented:l(g),codeText:l(D),codeTextData:I,data:I,definition:l(),definitionDestinationString:A,definitionLabelString:v,definitionTitleString:x,emphasis:l(),hardBreakEscape:l(j),hardBreakTrailing:l(j),htmlFlow:l(_),htmlFlowData:I,htmlText:l(N),htmlTextData:I,image:l(U),label:V,labelText:$,lineEnding:O,link:l(z),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:W,resourceDestinationString:b,resourceTitleString:P,resource:H,setextHeading:l(M),setextHeadingLineSequence:T,setextHeadingText:C,strong:l(),thematicBreak:l()}};Tu(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(B){let q={type:"root",children:[]};const ae={stack:[q],tokenStack:[],config:t,enter:s,exit:u,buffer:a,resume:f,data:n},le=[];let pe=-1;for(;++pe<B.length;)if(B[pe][1].type==="listOrdered"||B[pe][1].type==="listUnordered")if(B[pe][0]==="enter")le.push(pe);else{const fe=le.pop();pe=i(B,fe,pe)}for(pe=-1;++pe<B.length;){const fe=t[B[pe][0]];Iu.call(fe,B[pe][1].type)&&fe[B[pe][1].type].call(Object.assign({sliceSerialize:B[pe][2].sliceSerialize},ae),B[pe][1])}if(ae.tokenStack.length>0){const fe=ae.tokenStack[ae.tokenStack.length-1];(fe[1]||Ou).call(ae,void 0,fe[0])}for(q.position={start:Mt(B.length>0?B[0][1].start:{line:1,column:1,offset:0}),end:Mt(B.length>0?B[B.length-2][1].end:{line:1,column:1,offset:0})},pe=-1;++pe<t.transforms.length;)q=t.transforms[pe](q)||q;return q}function i(B,q,ae){let le=q-1,pe=-1,fe=!1,Ee,Oe,st,gt;for(;++le<=ae;){const ze=B[le];switch(ze[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ze[0]==="enter"?pe++:pe--,gt=void 0;break}case"lineEndingBlank":{ze[0]==="enter"&&(Ee&&!gt&&!pe&&!st&&(st=le),gt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:gt=void 0}if(!pe&&ze[0]==="enter"&&ze[1].type==="listItemPrefix"||pe===-1&&ze[0]==="exit"&&(ze[1].type==="listUnordered"||ze[1].type==="listOrdered")){if(Ee){let lt=le;for(Oe=void 0;lt--;){const Ge=B[lt];if(Ge[1].type==="lineEnding"||Ge[1].type==="lineEndingBlank"){if(Ge[0]==="exit")continue;Oe&&(B[Oe][1].type="lineEndingBlank",fe=!0),Ge[1].type="lineEnding",Oe=lt}else if(!(Ge[1].type==="linePrefix"||Ge[1].type==="blockQuotePrefix"||Ge[1].type==="blockQuotePrefixWhitespace"||Ge[1].type==="blockQuoteMarker"||Ge[1].type==="listItemIndent"))break}st&&(!Oe||st<Oe)&&(Ee._spread=!0),Ee.end=Object.assign({},Oe?B[Oe][1].start:ze[1].end),B.splice(Oe||le,0,["exit",Ee,ze[2]]),le++,ae++}if(ze[1].type==="listItemPrefix"){const lt={type:"listItem",_spread:!1,start:Object.assign({},ze[1].start),end:void 0};Ee=lt,B.splice(le,0,["enter",lt,ze[2]]),le++,ae++,st=void 0,gt=!0}}}return B[q][1]._spread=fe,ae}function o(B,q){return ae;function ae(le){s.call(this,B(le),le),q&&q.call(this,le)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(B,q,ae){this.stack[this.stack.length-1].children.push(B),this.stack.push(B),this.tokenStack.push([q,ae||void 0]),B.position={start:Mt(q.start),end:void 0}}function l(B){return q;function q(ae){B&&B.call(this,ae),u.call(this,ae)}}function u(B,q){const ae=this.stack.pop(),le=this.tokenStack.pop();if(le)le[0].type!==B.type&&(q?q.call(this,B,le[0]):(le[1]||Ou).call(this,B,le[0]));else throw new Error("Cannot close `"+B.type+"` ("+Fn({start:B.start,end:B.end})+"): it’s not open");ae.position.end=Mt(B.end)}function f(){return go(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function p(B){if(this.data.expectingFirstListItemValue){const q=this.stack[this.stack.length-2];q.start=Number.parseInt(this.sliceSerialize(B),10),this.data.expectingFirstListItemValue=void 0}}function d(){const B=this.resume(),q=this.stack[this.stack.length-1];q.lang=B}function m(){const B=this.resume(),q=this.stack[this.stack.length-1];q.meta=B}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const B=this.resume(),q=this.stack[this.stack.length-1];q.value=B.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const B=this.resume(),q=this.stack[this.stack.length-1];q.value=B.replace(/(\r?\n|\r)$/g,"")}function v(B){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.label=q,ae.identifier=ut(this.sliceSerialize(B)).toLowerCase()}function x(){const B=this.resume(),q=this.stack[this.stack.length-1];q.title=B}function A(){const B=this.resume(),q=this.stack[this.stack.length-1];q.url=B}function k(B){const q=this.stack[this.stack.length-1];if(!q.depth){const ae=this.sliceSerialize(B).length;q.depth=ae}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function T(B){const q=this.stack[this.stack.length-1];q.depth=this.sliceSerialize(B).codePointAt(0)===61?1:2}function M(){this.data.setextHeadingSlurpLineEnding=void 0}function R(B){const ae=this.stack[this.stack.length-1].children;let le=ae[ae.length-1];(!le||le.type!=="text")&&(le=Z(),le.position={start:Mt(B.start),end:void 0},ae.push(le)),this.stack.push(le)}function I(B){const q=this.stack.pop();q.value+=this.sliceSerialize(B),q.position.end=Mt(B.end)}function O(B){const q=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ae=q.children[q.children.length-1];ae.position.end=Mt(B.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(q.type)&&(R.call(this,B),I.call(this,B))}function j(){this.data.atHardBreak=!0}function _(){const B=this.resume(),q=this.stack[this.stack.length-1];q.value=B}function N(){const B=this.resume(),q=this.stack[this.stack.length-1];q.value=B}function D(){const B=this.resume(),q=this.stack[this.stack.length-1];q.value=B}function z(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const q=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=q,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function U(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const q=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=q,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function $(B){const q=this.sliceSerialize(B),ae=this.stack[this.stack.length-2];ae.label=Eb(q),ae.identifier=ut(q).toLowerCase()}function V(){const B=this.stack[this.stack.length-1],q=this.resume(),ae=this.stack[this.stack.length-1];if(this.data.inReference=!0,ae.type==="link"){const le=B.children;ae.children=le}else ae.alt=q}function b(){const B=this.resume(),q=this.stack[this.stack.length-1];q.url=B}function P(){const B=this.resume(),q=this.stack[this.stack.length-1];q.title=B}function H(){this.data.inReference=void 0}function w(){this.data.referenceType="collapsed"}function W(B){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.label=q,ae.identifier=ut(this.sliceSerialize(B)).toLowerCase(),this.data.referenceType="full"}function X(B){this.data.characterReferenceType=B.type}function Y(B){const q=this.sliceSerialize(B),ae=this.data.characterReferenceType;let le;ae?(le=cu(q,ae==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):le=yo(q);const pe=this.stack[this.stack.length-1];pe.value+=le}function J(B){const q=this.stack.pop();q.position.end=Mt(B.end)}function ee(B){I.call(this,B);const q=this.stack[this.stack.length-1];q.url=this.sliceSerialize(B)}function ie(B){I.call(this,B);const q=this.stack[this.stack.length-1];q.url="mailto:"+this.sliceSerialize(B)}function K(){return{type:"blockquote",children:[]}}function te(){return{type:"code",lang:null,meta:null,value:""}}function L(){return{type:"inlineCode",value:""}}function ne(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function me(){return{type:"emphasis",children:[]}}function ke(){return{type:"heading",depth:0,children:[]}}function oe(){return{type:"break"}}function G(){return{type:"html",value:""}}function ue(){return{type:"image",title:null,url:"",alt:null}}function de(){return{type:"link",title:null,url:"",children:[]}}function xe(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 Ue(){return{type:"paragraph",children:[]}}function Ye(){return{type:"strong",children:[]}}function Z(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}function Mt(e){return{line:e.line,column:e.column,offset:e.offset}}function Tu(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Tu(e,r):Tb(e,r)}}function Tb(e,t){let n;for(n in t)if(Iu.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 Ou(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Fn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Fn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Fn({start:t.start,end:t.end})+") is still open")}function Ob(e){const t=this;t.parser=n;function n(r){return Ab(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Db(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 Mb(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
215
|
-
`}]}function _b(e,t){const n=t.value?t.value+`
|
|
216
|
-
`:"",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 Pb(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Nb(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Lb(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=tn(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=o+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function Fb(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 Rb(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Du(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function Bb(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Du(e,t);const i={src:tn(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function zb(e,t){const n={src:tn(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 $b(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 jb(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Du(e,t);const i={href:tn(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function Ub(e,t){const n={href:tn(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 Hb(e,t,n){const r=e.all(t),i=n?Wb(n):Mu(t),o={},a=[];if(typeof t.checked=="boolean"){const f=r[0];let c;f&&f.type==="element"&&f.tagName==="p"?c=f:(c={type:"element",tagName:"p",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const f=r[s];(i||s!==0||f.type!=="element"||f.tagName!=="p")&&a.push({type:"text",value:`
|
|
217
|
-
`}),f.type==="element"&&f.tagName==="p"&&!i?a.push(...f.children):a.push(f)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
|
|
218
|
-
`});const u={type:"element",tagName:"li",properties:o,children:a};return e.patch(t,u),e.applyData(t,u)}function Wb(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=Mu(n[r])}return t}function Mu(e){const t=e.spread;return t??e.children.length>1}function Vb(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 a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function qb(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Kb(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Yb(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Gb(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=uo(t.children[1]),l=Jl(t.children[t.children.length-1]);s&&l&&(a.position={start:s,end:l}),i.push(a)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function Qb(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,s=a?a.length:t.children.length;let l=-1;const u=[];for(;++l<s;){const c=t.children[l],p={},d=a?a[l]:void 0;d&&(p.align=d);let m={type:"element",tagName:o,properties:p,children:[]};c&&(m.children=e.all(c),e.patch(c,m),m=e.applyData(c,m)),u.push(m)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,f),e.applyData(t,f)}function Jb(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const _u=9,Pu=32;function Zb(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(Nu(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Nu(t.slice(i),i>0,!1)),o.join("")}function Nu(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===_u||o===Pu;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===_u||o===Pu;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Xb(e,t){const n={type:"text",value:Zb(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function ex(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const tx={blockquote:Db,break:Mb,code:_b,delete:Pb,emphasis:Nb,footnoteReference:Lb,heading:Fb,html:Rb,imageReference:Bb,image:zb,inlineCode:$b,linkReference:jb,link:Ub,listItem:Hb,list:Vb,paragraph:qb,root:Kb,strong:Yb,table:Gb,tableCell:Jb,tableRow:Qb,text:Xb,thematicBreak:ex,toml:Or,yaml:Or,definition:Or,footnoteDefinition:Or};function Or(){}const Lu=-1,Dr=0,jn=1,Mr=2,So=3,Eo=4,Co=5,Ao=6,Fu=7,Ru=8,Bu=typeof self=="object"?self:globalThis,nx=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,a]=t[i];switch(o){case Dr:case Lu:return n(a,i);case jn:{const s=n([],i);for(const l of a)s.push(r(l));return s}case Mr:{const s=n({},i);for(const[l,u]of a)s[r(l)]=r(u);return s}case So:return n(new Date(a),i);case Eo:{const{source:s,flags:l}=a;return n(new RegExp(s,l),i)}case Co:{const s=n(new Map,i);for(const[l,u]of a)s.set(r(l),r(u));return s}case Ao:{const s=n(new Set,i);for(const l of a)s.add(r(l));return s}case Fu:{const{name:s,message:l}=a;return n(new Bu[s](l),i)}case Ru:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:s}=new Uint8Array(a);return n(new DataView(s),a)}}return n(new Bu[o](a),i)};return r},zu=e=>nx(new Map,e)(0),rn="",{toString:rx}={},{keys:ix}=Object,Un=e=>{const t=typeof e;if(t!=="object"||!e)return[Dr,t];const n=rx.call(e).slice(8,-1);switch(n){case"Array":return[jn,rn];case"Object":return[Mr,rn];case"Date":return[So,rn];case"RegExp":return[Eo,rn];case"Map":return[Co,rn];case"Set":return[Ao,rn];case"DataView":return[jn,n]}return n.includes("Array")?[jn,n]:n.includes("Error")?[Fu,n]:[Mr,n]},_r=([e,t])=>e===Dr&&(t==="function"||t==="symbol"),ox=(e,t,n,r)=>{const i=(a,s)=>{const l=r.push(a)-1;return n.set(s,l),l},o=a=>{if(n.has(a))return n.get(a);let[s,l]=Un(a);switch(s){case Dr:{let f=a;switch(l){case"bigint":s=Ru,f=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);f=null;break;case"undefined":return i([Lu],a)}return i([s,f],a)}case jn:{if(l){let p=a;return l==="DataView"?p=new Uint8Array(a.buffer):l==="ArrayBuffer"&&(p=new Uint8Array(a)),i([l,[...p]],a)}const f=[],c=i([s,f],a);for(const p of a)f.push(o(p));return c}case Mr:{if(l)switch(l){case"BigInt":return i([l,a.toString()],a);case"Boolean":case"Number":case"String":return i([l,a.valueOf()],a)}if(t&&"toJSON"in a)return o(a.toJSON());const f=[],c=i([s,f],a);for(const p of ix(a))(e||!_r(Un(a[p])))&&f.push([o(p),o(a[p])]);return c}case So:return i([s,a.toISOString()],a);case Eo:{const{source:f,flags:c}=a;return i([s,{source:f,flags:c}],a)}case Co:{const f=[],c=i([s,f],a);for(const[p,d]of a)(e||!(_r(Un(p))||_r(Un(d))))&&f.push([o(p),o(d)]);return c}case Ao:{const f=[],c=i([s,f],a);for(const p of a)(e||!_r(Un(p)))&&f.push(o(p));return c}}const{message:u}=a;return i([s,{name:l,message:u}],a)};return o},$u=(e,{json:t,lossy:n}={})=>{const r=[];return ox(!(t||n),!!t,new Map,r)(e),r},Pr=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?zu($u(e,t)):structuredClone(e):(e,t)=>zu($u(e,t));function ax(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 sx(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function lx(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||ax,r=e.options.footnoteBackLabel||sx,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[l]);if(!u)continue;const f=e.all(u),c=String(u.identifier).toUpperCase(),p=tn(c.toLowerCase());let d=0;const m=[],h=e.footnoteCounts.get(c);for(;h!==void 0&&++d<=h;){m.length>0&&m.push({type:"text",value:" "});let v=typeof n=="string"?n:n(l,d);typeof v=="string"&&(v={type:"text",value:v}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(d>1?"-"+d:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,d),className:["data-footnote-backref"]},children:Array.isArray(v)?v:[v]})}const y=f[f.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const v=y.children[y.children.length-1];v&&v.type==="text"?v.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...m)}else f.push(...m);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(f,!0)};e.patch(u,g),s.push(g)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Pr(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
219
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
|
|
220
|
-
`}]}}const Nr=function(e){if(e==null)return dx;if(typeof e=="function")return Lr(e);if(typeof e=="object")return Array.isArray(e)?ux(e):cx(e);if(typeof e=="string")return fx(e);throw new Error("Expected function, string, or object as test")};function ux(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Nr(e[n]);return Lr(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function cx(e){const t=e;return Lr(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function fx(e){return Lr(t);function t(n){return n&&n.type===e}}function Lr(e){return t;function t(n,r,i){return!!(px(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function dx(){return!0}function px(e){return e!==null&&typeof e=="object"&&"type"in e}function TO(e){return e}const ju=[],hx=!0,Io=!1,mx="skip";function Uu(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=Nr(i),a=r?-1:1;s(e,void 0,[])();function s(l,u,f){const c=l&&typeof l=="object"?l:{};if(typeof c.type=="string"){const d=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(l.type+(d?"<"+d+">":""))+")"})}return p;function p(){let d=ju,m,h,y;if((!t||o(l,u,f[f.length-1]||void 0))&&(d=gx(n(l,f)),d[0]===Io))return d;if("children"in l&&l.children){const g=l;if(g.children&&d[0]!==mx)for(h=(r?g.children.length:-1)+a,y=f.concat(g);h>-1&&h<g.children.length;){const v=g.children[h];if(m=s(v,h,y)(),m[0]===Io)return m;h=typeof m[1]=="number"?m[1]:h+a}}return d}}}function gx(e){return Array.isArray(e)?e:typeof e=="number"?[hx,e]:e==null?ju:[e]}function To(e,t,n,r){let i,o,a;typeof t=="function"&&typeof n!="function"?(o=void 0,a=t,i=n):(o=t,a=n,i=r),Uu(e,o,s,i);function s(l,u){const f=u[u.length-1],c=f?f.children.indexOf(l):void 0;return a(l,c,f)}}const Oo={}.hasOwnProperty,yx={};function vx(e,t){const n=t||yx,r=new Map,i=new Map,o=new Map,a={...tx,...n.handlers},s={all:u,applyData:xx,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:a,one:l,options:n,patch:bx,wrap:kx};return To(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const c=f.type==="definition"?r:i,p=String(f.identifier).toUpperCase();c.has(p)||c.set(p,f)}}),s;function l(f,c){const p=f.type,d=s.handlers[p];if(Oo.call(s.handlers,p)&&d)return d(s,f,c);if(s.options.passThrough&&s.options.passThrough.includes(p)){if("children"in f){const{children:h,...y}=f,g=Pr(y);return g.children=s.all(f),g}return Pr(f)}return(s.options.unknownHandler||wx)(s,f,c)}function u(f){const c=[];if("children"in f){const p=f.children;let d=-1;for(;++d<p.length;){const m=s.one(p[d],f);if(m){if(d&&p[d-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=Hu(m.value)),!Array.isArray(m)&&m.type==="element")){const h=m.children[0];h&&h.type==="text"&&(h.value=Hu(h.value))}Array.isArray(m)?c.push(...m):c.push(m)}}}return c}}function bx(e,t){e.position&&(t.position=gy(e))}function xx(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&o&&Object.assign(n.properties,Pr(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function wx(e,t){const n=t.data||{},r="value"in t&&!(Oo.call(n,"hProperties")||Oo.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 kx(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
221
|
-
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
222
|
-
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
223
|
-
`}),n}function Hu(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Wu(e,t){const n=vx(e,t),r=n.one(e,void 0),i=lx(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
|
|
224
|
-
`},i),o}function Sx(e,t){return e&&"run"in e?async function(n,r){const i=Wu(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Wu(n,{file:r,...e||t})}}function Vu(e){if(e)throw e}var Fr=Object.prototype.hasOwnProperty,qu=Object.prototype.toString,Ku=Object.defineProperty,Yu=Object.getOwnPropertyDescriptor,Gu=function(t){return typeof Array.isArray=="function"?Array.isArray(t):qu.call(t)==="[object Array]"},Qu=function(t){if(!t||qu.call(t)!=="[object Object]")return!1;var n=Fr.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Fr.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Fr.call(t,i)},Ju=function(t,n){Ku&&n.name==="__proto__"?Ku(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Zu=function(t,n){if(n==="__proto__")if(Fr.call(t,n)){if(Yu)return Yu(t,n).value}else return;return t[n]},Ex=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,u=arguments.length,f=!1;for(typeof s=="boolean"&&(f=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<u;++l)if(t=arguments[l],t!=null)for(n in t)r=Zu(s,n),i=Zu(t,n),s!==i&&(f&&i&&(Qu(i)||(o=Gu(i)))?(o?(o=!1,a=r&&Gu(r)?r:[]):a=r&&Qu(r)?r:{},Ju(s,{name:n,newValue:e(f,a,i)})):typeof i<"u"&&Ju(s,{name:n,newValue:i}));return s};const Do=jt(Ex);function Mo(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 Cx(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...i);function s(l,...u){const f=e[++o];let c=-1;if(l){a(l);return}for(;++c<i.length;)(u[c]===null||u[c]===void 0)&&(u[c]=i[c]);i=u,f?Ax(f,s)(...u):a(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Ax(e,t){let n;return r;function r(...a){const s=e.length>a.length;let l;s&&a.push(i);try{l=e.apply(this,a)}catch(u){const f=u;if(s&&n)throw f;return i(f)}s||(l&&l.then&&typeof l.then=="function"?l.then(o,i):l instanceof Error?i(l):o(l))}function i(a,...s){n||(n=!0,t(a,...s))}function o(a){i(null,a)}}const yt={basename:Ix,dirname:Tx,extname:Ox,join:Dx,sep:"/"};function Ix(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Hn(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function Tx(e){if(Hn(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 Ox(e){Hn(e);let t=e.length,n=-1,r=0,i=-1,o=0,a;for(;t--;){const s=e.codePointAt(t);if(s===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),s===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Dx(...e){let t=-1,n;for(;++t<e.length;)Hn(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Mx(n)}function Mx(e){Hn(e);const t=e.codePointAt(0)===47;let n=_x(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function _x(e,t){let n="",r=0,i=-1,o=0,a=-1,s,l;for(;++a<=e.length;){if(a<e.length)s=e.codePointAt(a);else{if(s===47)break;s=47}if(s===47){if(!(i===a-1||o===1))if(i!==a-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length>0){n="",r=0,i=a,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,o=0}else s===46&&o>-1?o++:o=-1}return n}function Hn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Px={cwd:Nx};function Nx(){return"/"}function _o(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Lx(e){if(typeof e=="string")e=new URL(e);else if(!_o(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 Fx(e)}function Fx(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 Po=["history","path","basename","stem","extname","dirname"];class Xu{constructor(t){let n;t?_o(t)?n={path:t}:typeof t=="string"||Rx(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Px.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Po.length;){const o=Po[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Po.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?yt.basename(this.path):void 0}set basename(t){Lo(t,"basename"),No(t,"basename"),this.path=yt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?yt.dirname(this.path):void 0}set dirname(t){ec(this.basename,"dirname"),this.path=yt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?yt.extname(this.path):void 0}set extname(t){if(No(t,"extname"),ec(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=yt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){_o(t)&&(t=Lx(t)),Lo(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?yt.basename(this.path,this.extname):void 0}set stem(t){Lo(t,"stem"),No(t,"stem"),this.path=yt.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 He(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 No(e,t){if(e&&e.includes(yt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+yt.sep+"`")}function Lo(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ec(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Rx(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Bx=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},zx={}.hasOwnProperty;class Fo extends Bx{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=Cx()}copy(){const t=new Fo;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Do(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(zo("data",this.frozen),this.namespace[t]=n,this):zx.call(this.namespace,t)&&this.namespace[t]||void 0:t?(zo("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=Rr(t),r=this.parser||this.Parser;return Ro("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ro("process",this.parser||this.Parser),Bo("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,a){const s=Rr(t),l=r.parse(s);r.run(l,s,function(f,c,p){if(f||!c||!p)return u(f);const d=c,m=r.stringify(d,p);Ux(m)?p.value=m:p.result=m,u(f,p)});function u(f,c){f||!c?a(f):o?o(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),Ro("processSync",this.parser||this.Parser),Bo("processSync",this.compiler||this.Compiler),this.process(t,i),nc("processSync","process",n),r;function i(o,a){n=!0,Vu(o),r=a}}run(t,n,r){tc(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(a,s){const l=Rr(n);i.run(t,l,u);function u(f,c,p){const d=c||t;f?s(f):a?a(d):r(void 0,d,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),nc("runSync","run",r),i;function o(a,s){Vu(a),i=s,r=!0}}stringify(t,n){this.freeze();const r=Rr(n),i=this.compiler||this.Compiler;return Bo("stringify",i),tc(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(zo("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[f,...c]=u;l(f,c)}else a(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function a(u){if(!("plugins"in u)&&!("settings"in u))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(u.plugins),u.settings&&(i.settings=Do(!0,i.settings,u.settings))}function s(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){const c=u[f];o(c)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,f){let c=-1,p=-1;for(;++c<r.length;)if(r[c][0]===u){p=c;break}if(p===-1)r.push([u,...f]);else if(f.length>0){let[d,...m]=f;const h=r[p][1];Mo(h)&&Mo(d)&&(d=Do(!0,h,d)),r[p]=[u,d,...m]}}}}const $x=new Fo().freeze();function Ro(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Bo(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function zo(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 tc(e){if(!Mo(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function nc(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Rr(e){return jx(e)?e:new Xu(e)}function jx(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Ux(e){return typeof e=="string"||Hx(e)}function Hx(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Wx="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",rc=[],ic={allowDangerousHtml:!0},Vx=/^(https?|ircs?|mailto|xmpp)$/i,qx=[{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 oc(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,o=e.components,a=e.disallowedElements,s=e.rehypePlugins||rc,l=e.remarkPlugins||rc,u=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ic}:ic,f=e.skipHtml,c=e.unwrapDisallowed,p=e.urlTransform||ac,d=$x().use(Ob).use(l).use(Sx,u).use(s),m=new Xu;typeof r=="string"&&(m.value=r);for(const v of qx)Object.hasOwn(e,v.from)&&(""+v.from+(v.to?"use `"+v.to+"` instead":"remove it")+Wx+v.id,void 0);const h=d.parse(m);let y=d.runSync(h,m);return i&&(y={type:"element",tagName:"div",properties:{className:i},children:y.type==="root"?y.children:[y]}),To(y,g),wy(y,{Fragment:S.Fragment,components:o,ignoreInvalidStyle:!0,jsx:S.jsx,jsxs:S.jsxs,passKeys:!0,passNode:!0});function g(v,x,A){if(v.type==="raw"&&A&&typeof x=="number")return f?A.children.splice(x,1):A.children[x]={type:"text",value:v.value},x;if(v.type==="element"){let k;for(k in mo)if(Object.hasOwn(mo,k)&&Object.hasOwn(v.properties,k)){const C=v.properties[k],T=mo[k];(T===null||T.includes(v.tagName))&&(v.properties[k]=p(String(C||""),k,v))}}if(v.type==="element"){let k=t?!t.includes(v.tagName):a?a.includes(v.tagName):!1;if(!k&&n&&typeof x=="number"&&(k=!n(v,x,A)),k&&A&&typeof x=="number")return c&&v.children?A.children.splice(x,1,...v.children):A.children.splice(x,1),x}}}function ac(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||Vx.test(e.slice(0,t))?e:""}function Kx(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function sc(e,t,n){const i=Nr((n||{}).ignore||[]),o=Yx(t);let a=-1;for(;++a<o.length;)Uu(e,"text",s);function s(u,f){let c=-1,p;for(;++c<f.length;){const d=f[c],m=p?p.children:void 0;if(i(d,m?m.indexOf(d):void 0,p))return;p=d}if(p)return l(u,f)}function l(u,f){const c=f[f.length-1],p=o[a][0],d=o[a][1];let m=0;const y=c.children.indexOf(u);let g=!1,v=[];p.lastIndex=0;let x=p.exec(u.value);for(;x;){const A=x.index,k={index:x.index,input:x.input,stack:[...f,u]};let C=d(...x,k);if(typeof C=="string"&&(C=C.length>0?{type:"text",value:C}:void 0),C===!1?p.lastIndex=A+1:(m!==A&&v.push({type:"text",value:u.value.slice(m,A)}),Array.isArray(C)?v.push(...C):C&&v.push(C),m=A+x[0].length,g=!0),!p.global)break;x=p.exec(u.value)}return g?(m<u.value.length&&v.push({type:"text",value:u.value.slice(m)}),c.children.splice(y,1,...v)):v=[u],y+v.length}}function Yx(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([Gx(i[0]),Qx(i[1])])}return t}function Gx(e){return typeof e=="string"?new RegExp(Kx(e),"g"):e}function Qx(e){return typeof e=="function"?e:function(){return e}}function Jx(e){sc(e,[/\r?\n|\r/g,Zx])}function Zx(){return{type:"break"}}function Xx(){return function(e){Jx(e)}}function lc(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 $o="phrasing",jo=["autolink","link","image","label"];function ew(){return{transforms:[sw],enter:{literalAutolink:nw,literalAutolinkEmail:Uo,literalAutolinkHttp:Uo,literalAutolinkWww:Uo},exit:{literalAutolink:aw,literalAutolinkEmail:ow,literalAutolinkHttp:rw,literalAutolinkWww:iw}}}function tw(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:$o,notInConstruct:jo},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:$o,notInConstruct:jo},{character:":",before:"[ps]",after:"\\/",inConstruct:$o,notInConstruct:jo}]}}function nw(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Uo(e){this.config.enter.autolinkProtocol.call(this,e)}function rw(e){this.config.exit.autolinkProtocol.call(this,e)}function iw(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 ow(e){this.config.exit.autolinkEmail.call(this,e)}function aw(e){this.exit(e)}function sw(e){sc(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,lw],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),uw]],{ignore:["link","linkReference"]})}function lw(e,t,n,r,i){let o="";if(!uc(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!cw(n)))return!1;const a=fw(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function uw(e,t,n,r){return!uc(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function cw(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 fw(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=lc(e,"(");let o=lc(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function uc(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Wt(n)||Ar(n))&&(!t||n!==47)}cc.peek=xw;function dw(){this.buffer()}function pw(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function hw(){this.buffer()}function mw(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function gw(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ut(this.sliceSerialize(e)).toLowerCase(),n.label=t}function yw(e){this.exit(e)}function vw(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ut(this.sliceSerialize(e)).toLowerCase(),n.label=t}function bw(e){this.exit(e)}function xw(){return"["}function cc(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),s(),a(),o+=i.move("]"),o}function ww(){return{enter:{gfmFootnoteCallString:dw,gfmFootnoteCall:pw,gfmFootnoteDefinitionLabelString:hw,gfmFootnoteDefinition:mw},exit:{gfmFootnoteCallString:gw,gfmFootnoteCall:yw,gfmFootnoteDefinitionLabelString:vw,gfmFootnoteDefinition:bw}}}function kw(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:cc},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,a){const s=o.createTracker(a);let l=s.move("[^");const u=o.enter("footnoteDefinition"),f=o.enter("label");return l+=s.move(o.safe(o.associationId(r),{before:l,after:"]"})),f(),l+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),l+=s.move((t?`
|
|
225
|
-
`:" ")+o.indentLines(o.containerFlow(r,s.current()),t?fc:Sw))),u(),l}}function Sw(e,t,n){return t===0?e:fc(e,t,n)}function fc(e,t,n){return(n?"":" ")+e}const Ew=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];dc.peek=Ow;function Cw(){return{canContainEols:["delete"],enter:{strikethrough:Iw},exit:{strikethrough:Tw}}}function Aw(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Ew}],handlers:{delete:dc}}}function Iw(e){this.enter({type:"delete",children:[]},e)}function Tw(e){this.exit(e)}function dc(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function Ow(){return"~"}function Dw(e){return e.length}function Mw(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Dw,o=[],a=[],s=[],l=[];let u=0,f=-1;for(;++f<e.length;){const h=[],y=[];let g=-1;for(e[f].length>u&&(u=e[f].length);++g<e[f].length;){const v=_w(e[f][g]);if(n.alignDelimiters!==!1){const x=i(v);y[g]=x,(l[g]===void 0||x>l[g])&&(l[g]=x)}h.push(v)}a[f]=h,s[f]=y}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<u;)o[c]=pc(r[c]);else{const h=pc(r);for(;++c<u;)o[c]=h}c=-1;const p=[],d=[];for(;++c<u;){const h=o[c];let y="",g="";h===99?(y=":",g=":"):h===108?y=":":h===114&&(g=":");let v=n.alignDelimiters===!1?1:Math.max(1,l[c]-y.length-g.length);const x=y+"-".repeat(v)+g;n.alignDelimiters!==!1&&(v=y.length+v+g.length,v>l[c]&&(l[c]=v),d[c]=v),p[c]=x}a.splice(1,0,p),s.splice(1,0,d),f=-1;const m=[];for(;++f<a.length;){const h=a[f],y=s[f];c=-1;const g=[];for(;++c<u;){const v=h[c]||"";let x="",A="";if(n.alignDelimiters!==!1){const k=l[c]-(y[c]||0),C=o[c];C===114?x=" ".repeat(k):C===99?k%2?(x=" ".repeat(k/2+.5),A=" ".repeat(k/2-.5)):(x=" ".repeat(k/2),A=x):A=" ".repeat(k)}n.delimiterStart!==!1&&!c&&g.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&v==="")&&(n.delimiterStart!==!1||c)&&g.push(" "),n.alignDelimiters!==!1&&g.push(x),g.push(v),n.alignDelimiters!==!1&&g.push(A),n.padding!==!1&&g.push(" "),(n.delimiterEnd!==!1||c!==u-1)&&g.push("|")}m.push(n.delimiterEnd===!1?g.join("").replace(/ +$/,""):g.join(""))}return m.join(`
|
|
226
|
-
`)}function _w(e){return e==null?"":String(e)}function pc(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 Pw(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const a=n.indentLines(n.containerFlow(e,o.current()),Nw);return i(),a}function Nw(e,t,n){return">"+(n?"":" ")+e}function Lw(e,t){return hc(e,t.inConstruct,!0)&&!hc(e,t.notInConstruct,!1)}function hc(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 mc(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
227
|
-
`&&Lw(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
228
|
-
`}function Fw(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>a&&(a=o):o=1,i=r+t.length,r=n.indexOf(t,i);return a}function Rw(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 Bw(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 zw(e,t,n,r){const i=Bw(n),o=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(Rw(e,n)){const c=n.enter("codeIndented"),p=n.indentLines(o,$w);return c(),p}const s=n.createTracker(r),l=i.repeat(Math.max(Fw(o,i)+1,3)),u=n.enter("codeFenced");let f=s.move(l);if(e.lang){const c=n.enter(`codeFencedLang${a}`);f+=s.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...s.current()})),c()}if(e.lang&&e.meta){const c=n.enter(`codeFencedMeta${a}`);f+=s.move(" "),f+=s.move(n.safe(e.meta,{before:f,after:`
|
|
229
|
-
`,encode:["`"],...s.current()})),c()}return f+=s.move(`
|
|
230
|
-
`),o&&(f+=s.move(o+`
|
|
231
|
-
`)),f+=s.move(l),u(),f}function $w(e,t,n){return(n?"":" ")+e}function Ho(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 jw(e,t,n,r){const i=Ho(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let u=l.move("[");return u+=l.move(n.safe(n.associationId(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":`
|
|
232
|
-
`,...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),a(),u}function Uw(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Wn(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Br(e,t,n){const r=nn(e),i=nn(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}gc.peek=Hw;function gc(e,t,n,r){const i=Uw(n),o=n.enter("emphasis"),a=n.createTracker(r),s=a.move(i);let l=a.move(n.containerPhrasing(e,{after:i,before:s,...a.current()}));const u=l.charCodeAt(0),f=Br(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(l=Wn(u)+l.slice(1));const c=l.charCodeAt(l.length-1),p=Br(r.after.charCodeAt(0),c,i);p.inside&&(l=l.slice(0,-1)+Wn(c));const d=a.move(i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},s+l+d}function Hw(e,t,n){return n.options.emphasis||"*"}function Ww(e,t){let n=!1;return To(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Io}),!!((!e.depth||e.depth<3)&&go(e)&&(t.options.setext||n))}function Vw(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(Ww(e,n)){const f=n.enter("headingSetext"),c=n.enter("phrasing"),p=n.containerPhrasing(e,{...o.current(),before:`
|
|
233
|
-
`,after:`
|
|
234
|
-
`});return c(),f(),p+`
|
|
235
|
-
`+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
|
|
236
|
-
`))+1))}const a="#".repeat(i),s=n.enter("headingAtx"),l=n.enter("phrasing");o.move(a+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
|
|
237
|
-
`,...o.current()});return/^[\t ]/.test(u)&&(u=Wn(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,n.options.closeAtx&&(u+=" "+a),l(),s(),u}yc.peek=qw;function yc(e){return e.value||""}function qw(){return"<"}vc.peek=Kw;function vc(e,t,n,r){const i=Ho(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let u=l.move("![");return u+=l.move(n.safe(e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),u+=l.move(")"),a(),u}function Kw(){return"!"}bc.peek=Yw;function bc(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const u=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),a();const f=n.stack;n.stack=[],a=n.enter("reference");const c=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=f,o(),i==="full"||!u||u!==c?l+=s.move(c+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function Yw(){return"!"}xc.peek=Gw;function xc(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const a=n.unsafe[o],s=n.compilePattern(a);let l;if(a.atBreak)for(;l=s.exec(r);){let u=l.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(l.index+1)}}return i+r+i}function Gw(){return"`"}function wc(e,t){const n=go(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))}kc.peek=Qw;function kc(e,t,n,r){const i=Ho(n),o=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(wc(e,n)){const f=n.stack;n.stack=[],s=n.enter("autolink");let c=a.move("<");return c+=a.move(n.containerPhrasing(e,{before:c,after:">",...a.current()})),c+=a.move(">"),s(),n.stack=f,c}s=n.enter("link"),l=n.enter("label");let u=a.move("[");return u+=a.move(n.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),u+=a.move(")"),s(),u}function Qw(e,t,n){return wc(e,n)?"<":"["}Sc.peek=Jw;function Sc(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const u=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),a();const f=n.stack;n.stack=[],a=n.enter("reference");const c=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=f,o(),i==="full"||!u||u!==c?l+=s.move(c+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function Jw(){return"["}function Wo(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 Zw(e){const t=Wo(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 Xw(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 Ec(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 e0(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let a=e.ordered?Xw(n):Wo(n);const s=e.ordered?a==="."?")":".":Zw(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),Ec(n)===a&&f){let c=-1;for(;++c<e.children.length;){const p=e.children[c];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const u=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=o,i(),u}function t0(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 n0(e,t,n,r){const i=t0(n);let o=n.bulletCurrent||Wo(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let a=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const s=n.createTracker(r);s.move(o+" ".repeat(a-o.length)),s.shift(a);const l=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,s.current()),f);return l(),u;function f(c,p,d){return p?(d?"":" ".repeat(a))+c:(d?o:o+" ".repeat(a-o.length))+c}}function r0(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),a=n.containerPhrasing(e,r);return o(),i(),a}const i0=Nr(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function o0(e,t,n,r){return(e.children.some(function(a){return i0(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function a0(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Cc.peek=s0;function Cc(e,t,n,r){const i=a0(n),o=n.enter("strong"),a=n.createTracker(r),s=a.move(i+i);let l=a.move(n.containerPhrasing(e,{after:i,before:s,...a.current()}));const u=l.charCodeAt(0),f=Br(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(l=Wn(u)+l.slice(1));const c=l.charCodeAt(l.length-1),p=Br(r.after.charCodeAt(0),c,i);p.inside&&(l=l.slice(0,-1)+Wn(c));const d=a.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},s+l+d}function s0(e,t,n){return n.options.strong||"*"}function l0(e,t,n,r){return n.safe(e.value,r)}function u0(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 c0(e,t,n){const r=(Ec(n)+(n.options.ruleSpaces?" ":"")).repeat(u0(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Ac={blockquote:Pw,break:mc,code:zw,definition:jw,emphasis:gc,hardBreak:mc,heading:Vw,html:yc,image:vc,imageReference:bc,inlineCode:xc,link:kc,linkReference:Sc,list:e0,listItem:n0,paragraph:r0,root:o0,strong:Cc,text:l0,thematicBreak:c0};function f0(){return{enter:{table:d0,tableData:Ic,tableHeader:Ic,tableRow:h0},exit:{codeText:m0,table:p0,tableData:Vo,tableHeader:Vo,tableRow:Vo}}}function d0(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 p0(e){this.exit(e),this.data.inTable=void 0}function h0(e){this.enter({type:"tableRow",children:[]},e)}function Vo(e){this.exit(e)}function Ic(e){this.enter({type:"tableCell",children:[]},e)}function m0(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,g0));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function g0(e,t){return t==="|"?t:e}function y0(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
238
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:a,tableCell:l,tableRow:s}};function a(d,m,h,y){return u(f(d,h,y),d.align)}function s(d,m,h,y){const g=c(d,h,y),v=u([g]);return v.slice(0,v.indexOf(`
|
|
239
|
-
`))}function l(d,m,h,y){const g=h.enter("tableCell"),v=h.enter("phrasing"),x=h.containerPhrasing(d,{...y,before:o,after:o});return v(),g(),x}function u(d,m){return Mw(d,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function f(d,m,h){const y=d.children;let g=-1;const v=[],x=m.enter("table");for(;++g<y.length;)v[g]=c(y[g],m,h);return x(),v}function c(d,m,h){const y=d.children;let g=-1;const v=[],x=m.enter("tableRow");for(;++g<y.length;)v[g]=l(y[g],d,m,h);return x(),v}function p(d,m,h){let y=Ac.inlineCode(d,m,h);return h.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function v0(){return{exit:{taskListCheckValueChecked:Tc,taskListCheckValueUnchecked:Tc,paragraph:x0}}}function b0(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:w0}}}function Tc(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function x0(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,a;for(;++o<i.length;){const s=i[o];if(s.type==="paragraph"){a=s;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function w0(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);o&&s.move(a);let l=Ac.listItem(e,t,n,{...r,...s.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(f){return f+a}}function k0(){return[ew(),ww(),Cw(),f0(),v0()]}function S0(e){return{extensions:[tw(),kw(e),Aw(),y0(e),b0()]}}const E0={tokenize:D0,partial:!0},Oc={tokenize:M0,partial:!0},Dc={tokenize:_0,partial:!0},Mc={tokenize:P0,partial:!0},C0={tokenize:N0,partial:!0},_c={name:"wwwAutolink",tokenize:T0,previous:Nc},Pc={name:"protocolAutolink",tokenize:O0,previous:Lc},Et={name:"emailAutolink",tokenize:I0,previous:Fc},vt={};function A0(){return{text:vt}}let Vt=48;for(;Vt<123;)vt[Vt]=Et,Vt++,Vt===58?Vt=65:Vt===91&&(Vt=97);vt[43]=Et,vt[45]=Et,vt[46]=Et,vt[95]=Et,vt[72]=[Et,Pc],vt[104]=[Et,Pc],vt[87]=[Et,_c],vt[119]=[Et,_c];function I0(e,t,n){const r=this;let i,o;return a;function a(c){return!qo(c)||!Fc.call(r,r.previous)||Ko(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(c))}function s(c){return qo(c)?(e.consume(c),s):c===64?(e.consume(c),l):n(c)}function l(c){return c===46?e.check(C0,f,u)(c):c===45||c===95||We(c)?(o=!0,e.consume(c),l):f(c)}function u(c){return e.consume(c),i=!0,l}function f(c){return o&&i&&qe(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function T0(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!Nc.call(r,r.previous)||Ko(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(E0,e.attempt(Oc,e.attempt(Dc,o),n),n)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function O0(e,t,n){const r=this;let i="",o=!1;return a;function a(c){return(c===72||c===104)&&Lc.call(r,r.previous)&&!Ko(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),s):n(c)}function s(c){if(qe(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),s;if(c===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(c),l}return n(c)}function l(c){return c===47?(e.consume(c),o?u:(o=!0,l)):n(c)}function u(c){return c===null||Cr(c)||Ie(c)||Wt(c)||Ar(c)?n(c):e.attempt(Oc,e.attempt(Dc,f),n)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function D0(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),o):n(a)}function o(a){return a===null?n(a):t(a)}}function M0(e,t,n){let r,i,o;return a;function a(u){return u===46||u===95?e.check(Mc,l,s)(u):u===null||Ie(u)||Wt(u)||u!==45&&Ar(u)?l(u):(o=!0,e.consume(u),a)}function s(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),a}function l(u){return i||r||!o?n(u):t(u)}}function _0(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?o(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(Mc,t,o)(a):a===null||Ie(a)||Wt(a)?t(a):(e.consume(a),i)}function o(a){return a===41&&r++,e.consume(a),i}}function P0(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),o):s===93?(e.consume(s),i):s===60||s===null||Ie(s)||Wt(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||Ie(s)||Wt(s)?t(s):r(s)}function o(s){return qe(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):qe(s)?(e.consume(s),a):n(s)}}function N0(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return We(o)?n(o):t(o)}}function Nc(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ie(e)}function Lc(e){return!qe(e)}function Fc(e){return!(e===47||qo(e))}function qo(e){return e===43||e===45||e===46||e===95||We(e)}function Ko(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 L0={tokenize:H0,partial:!0};function F0(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:$0,continuation:{tokenize:j0},exit:U0}},text:{91:{name:"gfmFootnoteCall",tokenize:z0},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:R0,resolveTo:B0}}}}function R0(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!a||!a._balanced)return n(l);const u=ut(r.sliceSerialize({start:a.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function B0(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function z0(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,a;return s;function s(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),l}function l(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(c){if(o>999||c===93&&!a||c===null||c===91||Ie(c))return n(c);if(c===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(ut(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return Ie(c)||(a=!0),o++,e.consume(c),c===92?f:u}function f(c){return c===91||c===92||c===93?(e.consume(c),o++,u):u(c)}}function $0(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,a=0,s;return l;function l(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(m)}function f(m){if(a>999||m===93&&!s||m===null||m===91||Ie(m))return n(m);if(m===93){e.exit("chunkString");const h=e.exit("gfmFootnoteDefinitionLabelString");return o=ut(r.sliceSerialize(h)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Ie(m)||(s=!0),a++,e.consume(m),m===92?c:f}function c(m){return m===91||m===92||m===93?(e.consume(m),a++,f):f(m)}function p(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(o)||i.push(o),be(e,d,"gfmFootnoteDefinitionWhitespace")):n(m)}function d(m){return t(m)}}function j0(e,t,n){return e.check(Bn,t,e.attempt(L0,t,n))}function U0(e){e.exit("gfmFootnoteDefinition")}function H0(e,t,n){const r=this;return be(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(o):n(o)}}function W0(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,s){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let u=l;for(;u--;)if(a[u][0]==="exit"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[u][1].end.offset-a[u][1].start.offset){a[l][1].type="strikethroughSequence",a[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},a[u][1].start),end:Object.assign({},a[l][1].end)},c={type:"strikethroughText",start:Object.assign({},a[u][1].end),end:Object.assign({},a[l][1].start)},p=[["enter",f,s],["enter",a[u][1],s],["exit",a[u][1],s],["enter",c,s]],d=s.parser.constructs.insideSpan.null;d&&tt(p,p.length,0,Ir(d,a.slice(u+1,l),s)),tt(p,p.length,0,[["exit",c,s],["enter",a[l][1],s],["exit",a[l][1],s],["exit",f,s]]),tt(a,u-1,l-u+3,p),l=u+p.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function o(a,s,l){const u=this.previous,f=this.events;let c=0;return p;function p(m){return u===126&&f[f.length-1][1].type!=="characterEscape"?l(m):(a.enter("strikethroughSequenceTemporary"),d(m))}function d(m){const h=nn(u);if(m===126)return c>1?l(m):(a.consume(m),c++,d);if(c<2&&!n)return l(m);const y=a.exit("strikethroughSequenceTemporary"),g=nn(m);return y._open=!g||g===2&&!!h,y._close=!h||h===2&&!!g,s(m)}}}class V0{constructor(){this.map=[]}add(t,n,r){q0(this,t,n,r)}consume(t){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function q0(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 K0(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Y0(){return{flow:{null:{name:"table",tokenize:G0,resolveAll:Q0}}}}function G0(e,t,n){const r=this;let i=0,o=0,a;return s;function s(I){let O=r.events.length-1;for(;O>-1;){const N=r.events[O][1].type;if(N==="lineEnding"||N==="linePrefix")O--;else break}const j=O>-1?r.events[O][1].type:null,_=j==="tableHead"||j==="tableRow"?C:l;return _===C&&r.parser.lazy[r.now().line]?n(I):_(I)}function l(I){return e.enter("tableHead"),e.enter("tableRow"),u(I)}function u(I){return I===124||(a=!0,o+=1),f(I)}function f(I){return I===null?n(I):ce(I)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),d):n(I):ye(I)?be(e,f,"whitespace")(I):(o+=1,a&&(a=!1,i+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),a=!0,f):(e.enter("data"),c(I)))}function c(I){return I===null||I===124||Ie(I)?(e.exit("data"),f(I)):(e.consume(I),I===92?p:c)}function p(I){return I===92||I===124?(e.consume(I),c):c(I)}function d(I){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(I):(e.enter("tableDelimiterRow"),a=!1,ye(I)?be(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):m(I))}function m(I){return I===45||I===58?y(I):I===124?(a=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),h):k(I)}function h(I){return ye(I)?be(e,y,"whitespace")(I):y(I)}function y(I){return I===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),g):I===45?(o+=1,g(I)):I===null||ce(I)?A(I):k(I)}function g(I){return I===45?(e.enter("tableDelimiterFiller"),v(I)):k(I)}function v(I){return I===45?(e.consume(I),v):I===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),x):(e.exit("tableDelimiterFiller"),x(I))}function x(I){return ye(I)?be(e,A,"whitespace")(I):A(I)}function A(I){return I===124?m(I):I===null||ce(I)?!a||i!==o?k(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):k(I)}function k(I){return n(I)}function C(I){return e.enter("tableRow"),T(I)}function T(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),T):I===null||ce(I)?(e.exit("tableRow"),t(I)):ye(I)?be(e,T,"whitespace")(I):(e.enter("data"),M(I))}function M(I){return I===null||I===124||Ie(I)?(e.exit("data"),T(I)):(e.consume(I),I===92?R:M)}function R(I){return I===92||I===124?(e.consume(I),M):M(I)}}function Q0(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],a=[0,0,0,0],s=!1,l=0,u,f,c;const p=new V0;for(;++n<e.length;){const d=e[n],m=d[1];d[0]==="enter"?m.type==="tableHead"?(s=!1,l!==0&&(Rc(p,t,l,u,f),f=void 0,l=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",u,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,c=void 0,o=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,f={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",f,t]])),i=m.type==="tableDelimiterRow"?2:f?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(o[1]!==0&&(a[0]=a[1],c=zr(p,t,o,i,void 0,c),o=[0,0,0,0]),a[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(a[0]=a[1],c=zr(p,t,o,i,void 0,c)),o=a,a=[o[1],n,0,0])):m.type==="tableHead"?(s=!0,l=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(l=n,o[1]!==0?(a[0]=a[1],c=zr(p,t,o,i,n,c)):a[1]!==0&&(c=zr(p,t,a,i,n,c)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&Rc(p,t,l,u,f),p.consume(t.events),n=-1;++n<t.events.length;){const d=t.events[n];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=K0(t.events,n))}return e}function zr(e,t,n,r,i,o){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(o.end=Object.assign({},on(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const l=on(t.events,n[1]);if(o={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const u=on(t.events,n[2]),f=on(t.events,n[3]),c={type:s,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",c,t]]),r!==2){const p=t.events[n[2]],d=t.events[n[3]];if(p[1].end=Object.assign({},d[1].end),p[1].type="chunkText",p[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",c,t]])}return i!==void 0&&(o.end=Object.assign({},on(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function Rc(e,t,n,r,i){const o=[],a=on(t.events,n);i&&(i.end=Object.assign({},a),o.push(["exit",i,t])),r.end=Object.assign({},a),o.push(["exit",r,t]),e.add(n+1,0,o)}function on(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const J0={name:"tasklistCheck",tokenize:X0};function Z0(){return{text:{91:J0}}}function X0(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),o)}function o(l){return Ie(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return ce(l)?t(l):ye(l)?e.check({tokenize:e1},t,n)(l):n(l)}}function e1(e,t,n){return be(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function t1(e){return uu([A0(),F0(),W0(e),Y0(),Z0()])}const n1={};function r1(e){const t=this,n=e||n1,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(t1(n)),o.push(k0()),a.push(S0(n))}const ge={container:{className:"bpReset bpContainer bpFont",dropzone:{overlay:{className:"bpDropzoneOverlay"}}},loader:{className:"bpReset bpLoader"},modal:{overlay:{className:"bpModalOverlay"},dialog:{container:{className:"bpReset bpModalContainer"},title:{className:"bpModalTitle"},description:{className:"bpModalDescription"},content:{container:{className:"bpModalContentContainer"},textarea:{className:"bpModalContentTextArea"}},button:{container:{className:"bpModalButtonContainer"},confirm:{className:"bpModalButtonConfirm"},cancel:{className:"bpModalButtonCancel"}}}},messagePreview:{container:{className:"bpMessagePreviewContainer"},message:{className:"bpMessagePreviewMessage"},description:{className:"bpMessagePreviewDescription"},closeButton:{className:"bpMessagePreviewCloseButton"},avatar:{container:{className:"bpMessagePreviewAvatarContainer"},image:{className:"bpMessagePreviewAvatarImage"},fallback:{className:"bpMessagePreviewAvatarFallback"}}},fab:{container:{className:"bpReset bpFabContainer"},icon:{className:"bpFabIcon"},image:{className:"bpFabImage"}},notification:{container:{className:"bpReset bpNotificationContainer"},title:{className:"bpNotificationTitle"},description:{className:"bpNotificationDescription"},icon:{className:"bpNotificationIcon"},closeIcon:{className:"bpNotificationCloseIcon"}},header:{container:{className:"bpReset bpHeaderContainer bpFont"},content:{container:{className:"bpReset bpHeaderContentContainer"},title:{className:"bpHeaderContentTitle"},description:{className:"bpHeaderContentDescription"},avatar:{container:{className:"bpReset bpHeaderContentAvatarContainer"},image:{className:"bpHeaderContentAvatarImage"},fallback:{className:"bpHeaderContentAvatarFallback"}},toggleSound:{className:"bpHeaderSoundToggleButton"},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:{wrapper:{className:"bpReset bpComposerWrapper"},container:{className:"bpReset bpComposerContainer bpFont"},footer:{className:"bpComposerFooter"},inputContainer:{className:"bpComposerInputContainer"},input:{className:"bpComposerInput"},inputLoader:{className:"bpComposerInputLoader"},sendbutton:{className:"bpComposerSendButton"},uploadButton:{className:"bpComposerUploadButton"},voiceButton:{className:"bpComposerVoiceButton"},fileContainer:{className:"bpComposerFileContainer"},fileWidget:{container:{className:"bpComposerFileAttachement"},loader:{className:"bpComposerFileLoader"},fileIcon:{container:{className:"bpComposerFileIconWrapper"},icon:{className:"bpComposerFileIcon"}},metadata:{container:{className:"bpComposerFileMetadata"},name:{className:"bpComposerFileName"},type:{className:"bpComposerFileExtension"}},removeIcon:{className:"bpComposerFileRemoveIcon"},errorIcon:{className:"bpComposerFileErrorIcon"},previewImage:{className:"bpComposerFilePreviewImage"}}},messageList:{scrollDownButton:{className:"bpMessageListScrollDownButton"},container:{className:"bpReset bpMessageListContainer bpFont"},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"}},deliveryStatus:{className:"bpMessageDeliveryStatus"},blocks:{text:{heading1:{className:"bpMessageBlocksTextHeading1"},heading2:{className:"bpMessageBlocksTextHeading2"},heading3:{className:"bpMessageBlocksTextHeading3"},heading4:{className:"bpMessageBlocksTextHeading4"},unorderedList:{className:"bpMessageBlocksTextUnorderedList"},orderedList:{className:"bpMessageBlocksTextOrderedList"},listItem:{className:"bpMessageBlocksTextListItem"},link:{className:"bpMessageBlocksTextLink"},italic:{className:"bpMessageBlocksTextItalic"},bold:{className:"bpMessageBlocksTextBold"},text:{className:"bpMessageBlocksTextText"},image:{className:"bpMessageBlocksTextImage"},imageError:{className:"bpMessageBlocksTextImageError"},horizontalRule:{className:"bpMessageBlocksTextHorizontalRule"},lineBreak:{className:"bpMessageBlocksTextLineBreak"},input:{className:"bpMessageBlocksTextInput"},codeBlockContainer:{className:"bpMessageBlocksTextCodeBlockContainer"},codeBlockTitle:{className:"bpMessageBlocksTextCodeBlockTitle"},codeBlockCopyIcon:{className:"bpMessageBlocksTextCodeBlockCopyIcon"},codeBlock:{className:"bpMessageBlocksTextCodeBlock"},code:{className:"bpMessageBlocksTextCode"},tableContainer:{className:"bpMessageBlocksTextTableContainer"},table:{className:"bpMessageBlocksTextTable"},tableHeader:{className:"bpMessageBlocksTextTableHeader"},tableData:{className:"bpMessageBlocksTextTableData"},tableRow:{className:"bpMessageBlocksTextTableRow"}},audio:{className:"bpMessageBlocksAudio"},image:{image:{className:"bpMessageBlocksImageImage"},placeholder:{className:"bpMessageBlocksImagePlaceholder"},skeleton:{className:"bpSkeleton"}},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:{container:{className:"bpMessageBlocksBubble"},feedbackContainer:{className:"bpMessageBlocksBubbleFeedbackContainer"},feedbackIcon:{className:"bpMessageBlocksBubbleFeedbackIcon"}},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"}}},error:{container:{className:"bpReset bpErrorContainer"},id:{className:"bpErrorId"},header:{container:{className:"bpErrorHeader"},actions:{className:"bpErrorHeaderActions"}},content:{className:"bpErrorContent"},errorTitle:{className:"bpErrorTitle"},errorMessage:{className:"bpErrorMessage"},icon:{className:"bpErrorIcon"}},typingIndicator:{container:{className:"bpTypingIndicatorContainer"},loader:{className:"bpTypingIndicatorLoader"}},proactiveBubble:{container:{className:"bpProactiveBubbleContainer"},content:{className:"bpProactiveBubbleContent"},layout:{className:"bpProactiveBubbleLayout"},icon:{className:"bpProactiveBubbleIcon"},message:{className:"bpProactiveBubbleMessage"},closeButton:{className:"bpProactiveBubbleCloseButton"},arrow:{className:"bpProactiveBubbleArrow"}}},i1=({text:e})=>{const{message:{blocks:{text:t}}}=ge,[n,r]=F.useState(new Map);function i(a){if(n.has(a))return;const s=new Image;s.src=a,s.onerror=()=>{r(l=>new Map(l).set(a,!0))},s.onload=()=>{r(l=>new Map(l).set(a,!1))}}F.useEffect(()=>{const a=/!\[.*?\]\((.*?)\)/g,s=[];let l;for(;(l=a.exec(e))!==null;){const u=l[1];u&&!s.includes(u)&&s.push(u)}s.forEach(u=>{i(u)})},[e]);const o={h1:({node:a,...s})=>S.jsx("h1",{...s,...t.heading1}),h2:({node:a,...s})=>S.jsx("h2",{...s,...t.heading2}),h3:({node:a,...s})=>S.jsx("h3",{...s,...t.heading3}),h4:({node:a,...s})=>S.jsx("h4",{...s,...t.heading4}),h5:"h4",h6:"h4",em:({node:a,...s})=>S.jsx("em",{...s,...t.italic}),strong:({node:a,...s})=>S.jsx("strong",{...s,...t.bold}),p:({node:a,...s})=>S.jsx("p",{...s,...t.text}),hr:({node:a,...s})=>S.jsx("hr",{...s,...t.horizontalRule}),a:({node:a,href:s,children:l,...u})=>S.jsx("a",{...u,...t.link,onMouseUp:f=>{window.open(s,"_blank","noopener,noreferrer")},children:l}),img:({node:a,...s})=>{const l=s.src;return n.get(l)||!1?S.jsx("div",{"data-error":!0,...t.image,children:S.jsx(_l,{strokeWidth:"1"})}):S.jsx("img",{...s,...t.image})},ol:({node:a,...s})=>S.jsx("ol",{...s,...t.orderedList}),ul:({node:a,...s})=>S.jsx("ul",{...s,...t.unorderedList}),li:({node:a,...s})=>S.jsx("li",{...s,...t.listItem}),br:({node:a,...s})=>S.jsx("br",{...s,...t.lineBreak}),pre:({node:a,...s})=>{const l=a==null?void 0:a.children[0],u=o1((l==null?void 0:l.className)||""),[f,c]=F.useState(!1),p=F.useRef(null),d=()=>{if(!p.current)return;const m=p.current.textContent||"";navigator.clipboard.writeText(m).then(()=>{c(!0),setTimeout(()=>{c(!1)},1500)}).catch(h=>{console.error("Failed to copy code to clipboard:",h)})};return S.jsxs("div",{...t.codeBlockContainer,children:[S.jsxs("div",{...t.codeBlockTitle,children:[u?S.jsx("span",{children:u}):"Code",f?S.jsx(Xm,{...t.codeBlockCopyIcon}):S.jsx(sg,{...t.codeBlockCopyIcon,onClick:d})]}),S.jsx("pre",{ref:p,...s,...t.codeBlock})]})},input:({node:a,...s})=>S.jsx("input",{...s,...t.input,disabled:!1}),code:({node:a,...s})=>S.jsx("code",{...s,...t.code}),table:({node:a,...s})=>S.jsx("div",{...t.tableContainer,children:S.jsx("table",{...s,...t.table})}),th:({node:a,...s})=>S.jsx("th",{...s,...t.tableHeader}),tr:({node:a,...s})=>S.jsx("tr",{...s,...t.tableRow}),td:({node:a,...s})=>S.jsx("td",{...s,...t.tableData})};return S.jsx(oc,{urlTransform:a=>a.startsWith("tel:")?a:ac(a),components:o,remarkPlugins:[r1,Xx],children:e})},o1=e=>{if(!e)return"";const t=e.match(/language-(\w+)/);return t?t[1]:""},a1={},Bc=e=>{let t;const n=new Set,r=(l,u)=>{const f=typeof l=="function"?l(t):l;if(!Object.is(f,t)){const c=t;t=u??typeof f!="object"?f:Object.assign({},t,f),n.forEach(p=>p(t,c))}},i=()=>t,s={setState:r,getState:i,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{(a1?"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()}};return t=e(r,i,s),s},s1=e=>e?Bc(e):Bc;var Yo={exports:{}},Go={},$r={exports:{}},Qo={};/**
|
|
239
|
+
*/const Fc=xe("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),i1=({text:e})=>{const{message:{blocks:{text:t}}}=ge,[n,r]=_.useState(new Map);function i(a){if(n.has(a))return;const s=new Image;s.src=a,s.onerror=()=>{r(l=>new Map(l).set(a,!0))},s.onload=()=>{r(l=>new Map(l).set(a,!1))}}_.useEffect(()=>{const a=/!\[.*?\]\((.*?)\)/g,s=[];let l;for(;(l=a.exec(e))!==null;){const u=l[1];u&&!s.includes(u)&&s.push(u)}s.forEach(u=>{i(u)})},[e]);const o={h1:({node:a,...s})=>S.jsx("h1",{...s,...t.heading1}),h2:({node:a,...s})=>S.jsx("h2",{...s,...t.heading2}),h3:({node:a,...s})=>S.jsx("h3",{...s,...t.heading3}),h4:({node:a,...s})=>S.jsx("h4",{...s,...t.heading4}),h5:"h4",h6:"h4",em:({node:a,...s})=>S.jsx("em",{...s,...t.italic}),strong:({node:a,...s})=>S.jsx("strong",{...s,...t.bold}),p:({node:a,...s})=>S.jsx("p",{...s,...t.text}),hr:({node:a,...s})=>S.jsx("hr",{...s,...t.horizontalRule}),a:({node:a,href:s,children:l,...u})=>S.jsx("a",{...u,...t.link,onMouseUp:f=>{window.open(s,"_blank","noopener,noreferrer")},children:l}),img:({node:a,...s})=>{const l=s.src;return n.get(l)||!1?S.jsx("div",{"data-error":!0,...t.image,children:S.jsx(Nc,{strokeWidth:"1"})}):S.jsx("img",{...s,...t.image})},ol:({node:a,...s})=>S.jsx("ol",{...s,...t.orderedList}),ul:({node:a,...s})=>S.jsx("ul",{...s,...t.unorderedList}),li:({node:a,...s})=>S.jsx("li",{...s,...t.listItem}),br:({node:a,...s})=>S.jsx("br",{...s,...t.lineBreak}),pre:({node:a,...s})=>{var m,h;const l=a==null?void 0:a.children[0],u=o1(((h=(m=l==null?void 0:l.properties)==null?void 0:m.className)==null?void 0:h[0])||""),[f,c]=_.useState(!1),p=_.useRef(null),d=()=>{if(!p.current)return;const g=p.current.textContent||"";navigator.clipboard.writeText(g).then(()=>{c(!0),setTimeout(()=>{c(!1)},1500)}).catch(y=>{console.error("Failed to copy code to clipboard:",y)})};return S.jsxs("div",{...t.codeBlockContainer,children:[S.jsxs("div",{...t.codeBlockTitle,children:[u?S.jsx("span",{children:u}):"Code",f?S.jsx(_0,{...t.codeBlockCopyIcon}):S.jsx($0,{...t.codeBlockCopyIcon,onClick:d})]}),S.jsx("pre",{ref:p,...s,...t.codeBlock})]})},input:({node:a,...s})=>S.jsx("input",{...s,...t.input,disabled:!1}),code:({node:a,...s})=>S.jsx("code",{...s,...t.code}),table:({node:a,...s})=>S.jsx("div",{...t.tableContainer,children:S.jsx("table",{...s,...t.table})}),th:({node:a,...s})=>S.jsx("th",{...s,...t.tableHeader}),tr:({node:a,...s})=>S.jsx("tr",{...s,...t.tableRow}),td:({node:a,...s})=>S.jsx("td",{...s,...t.tableData})};return S.jsx(Qu,{urlTransform:a=>a.startsWith("tel:")?a:Ju(a),components:o,remarkPlugins:[C0,xw],children:e})},o1=e=>{if(!e)return"";const t=e.match(/language-(\w+)/);return t?t[1]:""},a1={},Rc=e=>{let t;const n=new Set,r=(l,u)=>{const f=typeof l=="function"?l(t):l;if(!Object.is(f,t)){const c=t;t=u??typeof f!="object"?f:Object.assign({},t,f),n.forEach(p=>p(t,c))}},i=()=>t,s={setState:r,getState:i,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{(a1?"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()}};return t=e(r,i,s),s},s1=e=>e?Rc(e):Rc;var Ko={exports:{}},Yo={},$r={exports:{}},Go={};/**
|
|
240
240
|
* @license React
|
|
241
241
|
* use-sync-external-store-shim.production.min.js
|
|
242
242
|
*
|
|
@@ -244,7 +244,7 @@ Please start a new conversation.`,Xi={ResourceNotFound:{type:"configuration",mes
|
|
|
244
244
|
*
|
|
245
245
|
* This source code is licensed under the MIT license found in the
|
|
246
246
|
* LICENSE file in the root directory of this source tree.
|
|
247
|
-
*/var
|
|
247
|
+
*/var Bc;function l1(){if(Bc)return Go;Bc=1;var e=_;function t(c,p){return c===p&&(c!==0||1/c===1/p)||c!==c&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function s(c,p){var d=p(),m=r({inst:{value:d,getSnapshot:p}}),h=m[0].inst,g=m[1];return o(function(){h.value=d,h.getSnapshot=p,l(h)&&g({inst:h})},[c,d,p]),i(function(){return l(h)&&g({inst:h}),c(function(){l(h)&&g({inst:h})})},[c]),a(d),d}function l(c){var p=c.getSnapshot;c=c.value;try{var d=p();return!n(c,d)}catch{return!0}}function u(c,p){return p()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:s;return Go.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,Go}var Qo={};/**
|
|
248
248
|
* @license React
|
|
249
249
|
* use-sync-external-store-shim.development.js
|
|
250
250
|
*
|
|
@@ -252,7 +252,7 @@ Please start a new conversation.`,Xi={ResourceNotFound:{type:"configuration",mes
|
|
|
252
252
|
*
|
|
253
253
|
* This source code is licensed under the MIT license found in the
|
|
254
254
|
* LICENSE file in the root directory of this source tree.
|
|
255
|
-
*/var
|
|
255
|
+
*/var zc;function u1(){return zc||(zc=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=_,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(w){{for(var A=arguments.length,k=new Array(A>1?A-1:0),C=1;C<A;C++)k[C-1]=arguments[C];r("error",w,k)}}function r(w,A,k){{var C=t.ReactDebugCurrentFrame,T=C.getStackAddendum();T!==""&&(A+="%s",k=k.concat([T]));var P=k.map(function(R){return String(R)});P.unshift("Warning: "+A),Function.prototype.apply.call(console[w],console,P)}}function i(w,A){return w===A&&(w!==0||1/w===1/A)||w!==w&&A!==A}var o=typeof Object.is=="function"?Object.is:i,a=e.useState,s=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue,f=!1,c=!1;function p(w,A,k){f||e.startTransition!==void 0&&(f=!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 C=A();if(!c){var T=A();o(C,T)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),c=!0)}var P=a({inst:{value:C,getSnapshot:A}}),R=P[0].inst,I=P[1];return l(function(){R.value=C,R.getSnapshot=A,d(R)&&I({inst:R})},[w,C,A]),s(function(){d(R)&&I({inst:R});var O=function(){d(R)&&I({inst:R})};return w(O)},[w]),u(C),C}function d(w){var A=w.getSnapshot,k=w.value;try{var C=A();return!o(k,C)}catch{return!0}}function m(w,A,k){return A()}var h=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",g=!h,y=g?m:p,v=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y;Qo.useSyncExternalStore=v,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Qo}var $c;function jc(){return $c||($c=1,process.env.NODE_ENV==="production"?$r.exports=l1():$r.exports=u1()),$r.exports}/**
|
|
256
256
|
* @license React
|
|
257
257
|
* use-sync-external-store-shim/with-selector.production.min.js
|
|
258
258
|
*
|
|
@@ -260,7 +260,7 @@ Please start a new conversation.`,Xi={ResourceNotFound:{type:"configuration",mes
|
|
|
260
260
|
*
|
|
261
261
|
* This source code is licensed under the MIT license found in the
|
|
262
262
|
* LICENSE file in the root directory of this source tree.
|
|
263
|
-
*/var
|
|
263
|
+
*/var Uc;function c1(){if(Uc)return Yo;Uc=1;var e=_,t=jc();function n(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return Yo.useSyncExternalStoreWithSelector=function(u,f,c,p,d){var m=o(null);if(m.current===null){var h={hasValue:!1,value:null};m.current=h}else h=m.current;m=s(function(){function y(C){if(!v){if(v=!0,w=C,C=p(C),d!==void 0&&h.hasValue){var T=h.value;if(d(T,C))return A=T}return A=C}if(T=A,r(w,C))return T;var P=p(C);return d!==void 0&&d(T,P)?T:(w=C,A=P)}var v=!1,w,A,k=c===void 0?null:c;return[function(){return y(f())},k===null?void 0:function(){return y(k())}]},[f,c,p,d]);var g=i(u,m[0],m[1]);return a(function(){h.hasValue=!0,h.value=g},[g]),l(g),g},Yo}var Jo={};/**
|
|
264
264
|
* @license React
|
|
265
265
|
* use-sync-external-store-shim/with-selector.development.js
|
|
266
266
|
*
|
|
@@ -268,53 +268,53 @@ Please start a new conversation.`,Xi={ResourceNotFound:{type:"configuration",mes
|
|
|
268
268
|
*
|
|
269
269
|
* This source code is licensed under the MIT license found in the
|
|
270
270
|
* LICENSE file in the root directory of this source tree.
|
|
271
|
-
*/var
|
|
271
|
+
*/var Hc;function f1(){return Hc||(Hc=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=_,t=jc();function n(f,c){return f===c&&(f!==0||1/f===1/c)||f!==f&&c!==c}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;function u(f,c,p,d,m){var h=o(null),g;h.current===null?(g={hasValue:!1,value:null},h.current=g):g=h.current;var y=s(function(){var k=!1,C,T,P=function(j){if(!k){k=!0,C=j;var M=d(j);if(m!==void 0&&g.hasValue){var L=g.value;if(m(L,M))return T=L,L}return T=M,M}var D=C,z=T;if(r(D,j))return z;var U=d(j);return m!==void 0&&m(z,U)?z:(C=j,T=U,U)},R=p===void 0?null:p,I=function(){return P(c())},O=R===null?void 0:function(){return P(R())};return[I,O]},[c,p,d,m]),v=y[0],w=y[1],A=i(f,v,w);return a(function(){g.hasValue=!0,g.value=A},[A]),l(A),A}Jo.useSyncExternalStoreWithSelector=u,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Jo}process.env.NODE_ENV==="production"?Ko.exports=c1():Ko.exports=f1();var d1=Ko.exports;const p1=jt(d1),Wc={},{useSyncExternalStoreWithSelector:h1}=p1;let Vc=!1;function m1(e,t=e.getState,n){(Wc?"production":void 0)!=="production"&&n&&!Vc&&(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"),Vc=!0);const r=h1(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return _.useDebugValue(r),r}const g1=e=>{(Wc?"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"?s1(e):e,n=(r,i)=>m1(t,r,i);return Object.assign(n,t),n},_t=e=>g1,jr={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Zo=new Map,Ur=e=>{const t=Zo.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},y1=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=Zo.get(n.name);if(r)return{type:"tracked",store:e,...r};const i={connection:t.connect(n),stores:{}};return Zo.set(n.name,i),{type:"tracked",store:e,...i}},Vn=(e,t={})=>(n,r,i)=>{const{enabled:o,anonymousActionType:a,store:s,...l}=t;let u;try{u=(o??(jr?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!u)return(jr?"production":void 0)!=="production"&&o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(n,r,i);const{connection:f,...c}=y1(s,u,l);let p=!0;i.setState=(h,g,y)=>{const v=n(h,g);if(!p)return v;const w=y===void 0?{type:a||"anonymous"}:typeof y=="string"?{type:y}:y;return s===void 0?(f==null||f.send(w,r()),v):(f==null||f.send({...w,type:`${s}/${w.type}`},{...Ur(l.name),[s]:i.getState()}),v)};const d=(...h)=>{const g=p;p=!1,n(...h),p=g},m=e(i.setState,r,i);if(c.type==="untracked"?f==null||f.init(m):(c.stores[c.store]=i,f==null||f.init(Object.fromEntries(Object.entries(c.stores).map(([h,g])=>[h,h===c.store?m:g.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let h=!1;const g=i.dispatch;i.dispatch=(...y)=>{(jr?"production":void 0)!=="production"&&y[0].type==="__setState"&&!h&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),h=!0),g(...y)}}return f.subscribe(h=>{var g;switch(h.type){case"ACTION":if(typeof h.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Xo(h.payload,y=>{if(y.type==="__setState"){if(s===void 0){d(y.state);return}Object.keys(y.state).length!==1&&console.error(`
|
|
272
272
|
[zustand devtools middleware] Unsupported __setState action format.
|
|
273
273
|
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
|
|
274
274
|
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|
|
275
|
-
`);const v=g.state[s];if(v==null)return;JSON.stringify(i.getState())!==JSON.stringify(v)&&d(v);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(g)});case"DISPATCH":switch(h.payload.type){case"RESET":return d(m),s===void 0?f==null?void 0:f.init(i.getState()):f==null?void 0:f.init(Ur(l.name));case"COMMIT":if(s===void 0){f==null||f.init(i.getState());return}return f==null?void 0:f.init(Ur(l.name));case"ROLLBACK":return ea(h.state,g=>{if(s===void 0){d(g),f==null||f.init(i.getState());return}d(g[s]),f==null||f.init(Ur(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return ea(h.state,g=>{if(s===void 0){d(g);return}JSON.stringify(i.getState())!==JSON.stringify(g[s])&&d(g[s])});case"IMPORT_STATE":{const{nextLiftedState:g}=h.payload,v=(y=g.computedStates.slice(-1)[0])==null?void 0:y.state;if(!v)return;d(s===void 0?v:v[s]),f==null||f.send(null,g);return}case"PAUSE_RECORDING":return p=!p}return}}),m},ea=(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 ta(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var o;const a=l=>l===null?null:JSON.parse(l,void 0),s=(o=n.getItem(i))!=null?o:null;return s instanceof Promise?s.then(a):a(s)},setItem:(i,o)=>n.setItem(i,JSON.stringify(o,void 0)),removeItem:i=>n.removeItem(i)}}const qn=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return qn(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return qn(r)(n)}}}},v1=(e,t)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:y=>y,version:0,merge:(y,g)=>({...g,...y}),...t},a=!1;const s=new Set,l=new Set;let u;try{u=o.getStorage()}catch{}if(!u)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...y)},r,i);const f=qn(o.serialize),c=()=>{const y=o.partialize({...r()});let g;const v=f({state:y,version:o.version}).then(x=>u.setItem(o.name,x)).catch(x=>{g=x});if(g)throw g;return v},p=i.setState;i.setState=(y,g)=>{p(y,g),c()};const d=e((...y)=>{n(...y),c()},r,i);let m;const h=()=>{var y;if(!u)return;a=!1,s.forEach(v=>v(r()));const g=((y=o.onRehydrateStorage)==null?void 0:y.call(o,r()))||void 0;return qn(u.getItem.bind(u))(o.name).then(v=>{if(v)return o.deserialize(v)}).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==o.version){if(o.migrate)return o.migrate(v.state,v.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return v.state}).then(v=>{var x;return m=o.merge(v,(x=r())!=null?x:d),n(m,!0),c()}).then(()=>{g==null||g(m,void 0),a=!0,l.forEach(v=>v(m))}).catch(v=>{g==null||g(void 0,v)})};return i.persist={setOptions:y=>{o={...o,...y},y.getStorage&&(u=y.getStorage())},clearStorage:()=>{u==null||u.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>h(),hasHydrated:()=>a,onHydrate:y=>(s.add(y),()=>{s.delete(y)}),onFinishHydration:y=>(l.add(y),()=>{l.delete(y)})},h(),m||d},b1=(e,t)=>(n,r,i)=>{let o={storage:ta(()=>localStorage),partialize:h=>h,version:0,merge:(h,y)=>({...y,...h}),...t},a=!1;const s=new Set,l=new Set;let u=o.storage;if(!u)return e((...h)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...h)},r,i);const f=()=>{const h=o.partialize({...r()});return u.setItem(o.name,{state:h,version:o.version})},c=i.setState;i.setState=(h,y)=>{c(h,y),f()};const p=e((...h)=>{n(...h),f()},r,i);let d;const m=()=>{var h,y;if(!u)return;a=!1,s.forEach(v=>{var x;return v((x=r())!=null?x:p)});const g=((y=o.onRehydrateStorage)==null?void 0:y.call(o,(h=r())!=null?h:p))||void 0;return qn(u.getItem.bind(u))(o.name).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==o.version){if(o.migrate)return o.migrate(v.state,v.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return v.state}).then(v=>{var x;return d=o.merge(v,(x=r())!=null?x:p),n(d,!0),f()}).then(()=>{g==null||g(d,void 0),d=r(),a=!0,l.forEach(v=>v(d))}).catch(v=>{g==null||g(void 0,v)})};return i.persist={setOptions:h=>{o={...o,...h},h.storage&&(u=h.storage)},clearStorage:()=>{u==null||u.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>m(),hasHydrated:()=>a,onHydrate:h=>(s.add(h),()=>{s.delete(h)}),onFinishHydration:h=>(l.add(h),()=>{l.delete(h)})},o.skipHydration||m(),d||p},Hr=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((jr?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),v1(e,t)):b1(e,t),Kc=_t()(Vn(Hr(e=>({messageHistory:[],addMessageToHistory:t=>e(n=>({...n,messageHistory:[t,...(n.messageHistory??[]).slice(0,100).filter(String)]}))}),{name:"botpress-message-history"})));let Wr;const x1=new Uint8Array(16);function w1(){if(!Wr&&(Wr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Wr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Wr(x1)}const $e=[];for(let e=0;e<256;++e)$e.push((e+256).toString(16).slice(1));function k1(e,t=0){return $e[e[t+0]]+$e[e[t+1]]+$e[e[t+2]]+$e[e[t+3]]+"-"+$e[e[t+4]]+$e[e[t+5]]+"-"+$e[e[t+6]]+$e[e[t+7]]+"-"+$e[e[t+8]]+$e[e[t+9]]+"-"+$e[e[t+10]]+$e[e[t+11]]+$e[e[t+12]]+$e[e[t+13]]+$e[e[t+14]]+$e[e[t+15]]}const Yc={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function S1(e,t,n){if(Yc.randomUUID&&!e)return Yc.randomUUID();e=e||{};const r=e.random||(e.rng||w1)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,k1(r)}function Kn(e){var a;const{metadata:t,conversationId:n,userId:r}=e,{payload:i,disableInput:o}=Gc(e.payload);return{id:e.id,conversationId:n,authorId:r,timestamp:new Date(e.createdAt),block:i,feedback:(a=e.feedback)==null?void 0:a.value,disableInput:o,metadata:t}}const Gc=e=>{switch(e.type){case"audio":return Qc(e);case"card":return E1(e);case"carousel":return C1(e);case"choice":return A1(e);case"dropdown":return I1(e);case"file":return Jc(e);case"image":return Zc(e);case"location":return Xc(e);case"markdown":return ef(e);case"text":return tf(e);case"video":return nf(e);case"bloc":return T1(e);case"custom":return{payload:e};default:{const t=e;throw new Error(`Unsuported message type ${t}`)}}},Yn=e=>({block:e,type:"bubble"}),Qc=e=>({payload:{type:"audio",url:e.audioUrl}}),E1=e=>({payload:Yn(rf(e))}),C1=e=>({payload:{type:"carousel",blocks:e.items.map(t=>rf({...t}))}}),A1=e=>{const t=e.options.map(o=>({title:o.label,value:o.value})),n=e.text,r=S1(),i=Yn({type:"text",text:n});return t.length===0?{disableInput:e.disableFreeText,payload:i}:{disableInput:e.disableFreeText,payload:{type:"column",blocks:[i,{type:"row",blocks:t.map(({title:o,value:a})=>({type:"button",variant:"action",text:o,buttonValue:a,groupId:r}))}]}}},I1=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:Yn({type:"column",blocks:r})}},Jc=e=>({payload:{type:"file",url:e.fileUrl,title:e.title}}),Zc=e=>({payload:{type:"image",url:e.imageUrl}}),Xc=e=>({payload:{type:"location",latitude:e.latitude,longitude:e.longitude,title:e.title??e.address??"View on map"}}),ef=e=>({payload:Yn({type:"text",text:e.markdown})}),tf=e=>({payload:Yn({type:"text",text:e.text,value:e.value})}),nf=e=>({payload:{type:"video",url:e.videoUrl}}),T1=e=>({payload:{type:"column",blocks:e.items.map(n=>{switch(n.type){case"audio":return Qc({...n.payload,type:n.type}).payload;case"file":return Jc({...n.payload,type:n.type}).payload;case"image":return Zc({...n.payload,type:n.type}).payload;case"location":return Xc({...n.payload,type:n.type}).payload;case"markdown":return ef({...n.payload,type:n.type}).payload;case"text":return tf({...n.payload,type:n.type}).payload;case"video":return nf({...n.payload,type:n.type}).payload;default:throw new Error("Unsuported message type")}})}}),rf=e=>{const t=e.title,n=e.subtitle,r=e.imageUrl,i=e.actions.map(a=>{switch(a.action){case"postback":return{type:"button",variant:"action",text:a.label,buttonValue:a.value,reusable:!0};case"url":return{type:"button",variant:"link",text:a.label,buttonValue:a.value,reusable:!0};case"say":return{type:"button",variant:"action",text:a.label,buttonValue:a.value,reusable:!0};default:throw new Error(`Unknown action type ${a.action}`)}}),o=[];return r&&o.push({type:"image",url:r}),t&&o.push({type:"text",text:`#### ${t}`}),n&&o.push({type:"text",text:n}),i.length>0&&o.push({type:"row",blocks:i}),{type:"column",horizontalAlignment:"center",blocks:[...o]}},an=_t()(Vn(e=>({messages:[],isFetching:!1,setMessages:t=>e({messages:t}),saveMessage:t=>e(({messages:n})=>{var i;const r=(i=t.metadata)==null?void 0:i.clientMessageId;if(r){const o=n.findIndex(s=>{var l;return((l=s.metadata)==null?void 0:l.clientMessageId)===r}),a=n[o];if(o!==-1)return{messages:[...n.slice(0,o),{...a,...t},...n.slice(o+1)]}}return{messages:[...n.filter(o=>o.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,conversationId:n})=>{const r=[];e({isFetching:!0});try{let i;do{const{messages:o,meta:a}=await t.listConversationMessages({conversationId:n,nextToken:i});r.push(...o),i=a.nextToken}while(i);return r.reverse().map(o=>Kn(o)).filter(Boolean)}finally{e({isFetching:!1})}}}),{name:"messagesStore"})),O1=(e,t)=>_t()(Vn(Hr(n=>({setUser:r=>n(i=>({...i,user:r})),setConversationId:r=>n(i=>({...i,conversationId:r})),clearConversationId:()=>n(r=>({...r,conversationId:void 0})),clearAll:()=>{n(r=>({...r,user:void 0,conversationId:void 0}))}}),{name:e,storage:ta(()=>t==="sessionStorage"?sessionStorage:localStorage)}))),Tn=class Tn{constructor(){}static getInstance(t="bp-webchat",n){return Tn._instances[t]||(Tn._instances[t]=O1(t,n)),Tn._instances[t]}};$i(Tn,"_instances",{});let na=Tn;const of=na.getInstance,sn=_t()(Vn(e=>({eventEmitter:el(),messageContainerRef:F.createRef(),setMessageContainerRef:t=>e({messageContainerRef:t}),portalContainer:null,setPortalContainer:t=>e({portalContainer:t})}),{name:"webchatStore"})),D1=8,M1=e=>_t()(Hr((t,n)=>({files:[],setFiles:r=>t({files:r}),upsertFile:r=>t(({files:i})=>({files:i.some(s=>s.name===r.name)?i.map(s=>s.name===r.name?{...s,...r}:s):[...i,{...r}]})),uploadFile:async(r,i)=>{if(n().files.length===D1)return;const o=r.name.lastIndexOf("."),a=o>0&&o<r.name.length-1,s=a?r.name.substring(0,o):r.name,l=a?r.name.substring(o):"",u=Bm(s,n().files,p=>p.name),f=u+l,c=new File([r],f,{type:r.type});n().upsertFile({name:u,type:"file",instance:c,status:"loading"});try{const{fileUrl:p,type:d}=await i(c);n().upsertFile({name:u,type:d,url:p,instance:c,status:"uploaded"})}catch{n().upsertFile({name:u,type:"file",instance:c,status:"error"})}},deleteFile:r=>t(({files:i})=>({files:i.filter(o=>o.name!=r)}))}),{name:e,storage:ta(()=>sessionStorage)})),On=class On{constructor(){}static getInstance(t="bp-composer-file-store"){return On._instances[t]||(On._instances[t]=M1(t)),On._instances[t]}};$i(On,"_instances",{});let ra=On;const af=ra.getInstance,Gn=_t()(e=>({participants:[],setParticipants:t=>e({participants:t}),addParticipant:t=>e(n=>({participants:[...n.participants,t]})),removeParticipant:t=>e(n=>({participants:n.participants.filter(r=>r.id!==t)})),clearParticipants:()=>e({participants:[]})})),_1=e=>_t()(Vn(Hr((t,n)=>({soundOn:!0,setSoundEnabled:r=>t({soundOn:r}),toggleSound:()=>t({soundOn:!n().soundOn})}),{name:e}))),Dn=class Dn{constructor(){}static getInstance(t="webchat:soundEnabled"){return Dn._instances[t]||(Dn._instances[t]=_1(t)),Dn._instances[t]}};$i(Dn,"_instances",{});let ia=Dn;const sf=ia.getInstance,P1=({text:e,buttonValue:t,variant:n,groupId:r,reusable:i,sendMessage:o,isReadOnly:a,...s})=>{const l=sn(x=>x.eventEmitter),[u,f]=F.useState(!1),[c,p]=F.useState(!1),[d,m]=F.useState(!1),{message:{blocks:{button:h}}}=ge;F.useEffect(()=>{if(r)return l.on(`button-group-${r}-click`,()=>{p(!0),i||m(!0)})},[l,r,i]);const g={...s,onClick:x=>{if((d||a)&&n==="link"){x.preventDefault();return}f(!0),i||m(!0),r&&l.emit(`button-group-${r}-click`),n!=="link"&&o&&(o==null||o({type:"text",text:e,value:t}))},"data-activated":u?"":void 0,"data-group-activated":c?"":void 0,"data-type":n,...h},v=d||a;return n==="link"?S.jsx("a",{...g,style:a?{pointerEvents:"none"}:void 0,href:t,target:"_blank",rel:"noopener noreferrer",children:e}):S.jsx("button",{...g,style:a?{pointerEvents:"none"}:void 0,disabled:v,children:e})},oa=F.createContext(null);function lf(){const e=F.use(oa);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const aa=F.createContext({showInputModal:void 0});function sa(){return F.use(aa)}const uf=({ref:e,block:t,direction:n,sender:r,timestamp:i,messageId:o,feedback:a,metadata:s,isReadOnly:l,sendMessage:u,addMessageFeedback:f,...c})=>{const{showInputModal:p}=sa(),{message:{blocks:{bubble:{container:d,feedbackContainer:m,feedbackIcon:h}}}}=ge;return n=="incoming"?S.jsxs("div",{"data-direction":"incoming","data-feedback":!!a,...c,...d,ref:e,children:[S.jsx(Yt,{block:{...t,direction:n,timestamp:i,sender:r,messageId:o,isReadOnly:l,metadata:s,sendMessage:u}}),f&&p&&t.type==="text"&&S.jsxs("div",{...m,children:[S.jsx(xg,{...h,"data-selected":a==="positive",onClick:()=>f(o,{value:"positive"})}),S.jsx(bg,{...h,"data-selected":a==="negative",onClick:async()=>{const y=await p({title:"Help us improve",description:"Please provide feedback to help us improve.",confirmButtonText:"Send feedback",cancelButtonText:"Cancel",Content:N1});f(o,{value:"negative",comment:y})}})]})]}):S.jsx("div",{"data-direction":"outgoing",...c,...d,ref:e,children:S.jsx(Yt,{block:{...t,direction:n,timestamp:i,sender:r,messageId:o,isReadOnly:l,metadata:s,sendMessage:u,addMessageFeedback:f}})})};uf.displayName="Bubble";const N1=({setValue:e})=>{const{modal:{dialog:{content:t}}}=ge;return S.jsx("textarea",{...t.textarea,placeholder:"Let us know what went wrong...",onChange:n=>e(n.target.value)})};var ot=function(){return ot=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},ot.apply(this,arguments)};function cf(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 ln(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(f){try{u(r.next(f))}catch(c){a(c)}}function l(f){try{u(r.throw(f))}catch(c){a(c)}}function u(f){f.done?o(f.value):i(f.value).then(s,l)}u((r=r.apply(e,t||[])).next())})}function un(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(f){return l([u,f])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(f){u=[6,f],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function ff(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function la(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;function L1(){var e=F.useRef(!1),t=F.useCallback(function(){return e.current},[]);return F.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),t}function F1(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={loading:!1});var r=F.useRef(0),i=L1(),o=F.useState(n),a=o[0],s=o[1],l=F.useCallback(function(){for(var u=[],f=0;f<arguments.length;f++)u[f]=arguments[f];var c=++r.current;return a.loading||s(function(p){return ot(ot({},p),{loading:!0})}),e.apply(void 0,u).then(function(p){return i()&&c===r.current&&s({value:p,loading:!1}),p},function(p){return i()&&c===r.current&&s({error:p,loading:!1}),p})},t);return[a,l]}function R1(e,t){t===void 0&&(t=[]);var n=F1(e,t,{loading:!0}),r=n[0],i=n[1];return F.useEffect(function(){i()},[i]),r}const df=({className:e,...t})=>S.jsx("div",{"data-slot":"skeleton",className:`bpSkeleton ${e||""}`,...t});df.displayName="Skeleton";const pf=({ref:e,url:t,orientation:n="auto",...r})=>{const i=F.useId(),{setIsLoading:o}=lf(),[a,s]=F.useState(n==="auto"?"square":n),[l,u]=F.useState("initial"),{message:{blocks:{image:f}}}=ge;return F.useLayoutEffect(()=>(o(c=>[...c,i]),()=>{o(c=>c.filter(p=>p!==i))}),[i,o]),R1(async()=>{if(!t)return;const c=new Image;try{const{width:p,height:d}=await cm(t);n==="auto"&&s(B1(p,d)),c.onload=()=>{u("loaded"),o(m=>m.filter(h=>h!==i))},c.onerror=()=>{u("error"),s("square"),o(m=>m.filter(h=>h!==i))},c.src=t,c.complete&&(c.naturalWidth>0?(u("loaded"),o(m=>m.filter(h=>h!==i))):(u("error"),s("square"),o(m=>m.filter(h=>h!==i))))}catch(p){console.error(p),u("error"),o(d=>d.filter(m=>m!==i))}return()=>{c.onload=null,c.onerror=null}},[t,i,o,n]),t?l==="error"?S.jsx("div",{"data-error":"true","data-orientation":a,...r,...f.image,ref:e,children:S.jsx(_l,{size:"25%",strokeWidth:"5%"})}):l==="initial"?S.jsx(df,{"data-orientation":a,...f.placeholder}):S.jsx("img",{"data-orientation":a,"data-loaded":l==="loaded",...r,...f.image,src:t,alt:"",ref:e}):null};pf.displayName="Image";function B1(e,t){const n={square:1,portrait:.75,landscape:1.3333333333333333},r=e/t;return Object.keys(n).reduce((o,a)=>Math.abs(n[a]-r)<Math.abs(n[o]-r)?a:o)}const hf=({ref:e,url:t,isReadOnly:n,...r})=>{const{message:{blocks:{video:i}}}=ge;return S.jsx("div",{children:S.jsx("video",{...r,"data-chromatic":"ignore",style:n?{pointerEvents:"none"}:void 0,controls:!0,src:t,...i,ref:e})})};hf.displayName="Video";const mf=({ref:e,url:t,isReadOnly:n,...r})=>{const{message:{blocks:{audio:i}}}=ge;return S.jsx("div",{children:S.jsx("audio",{...r,controls:!0,style:n?{pointerEvents:"none"}:void 0,src:t,...i,ref:e})})};mf.displayName="Audio";const gf=({ref:e,latitude:t,longitude:n,title:r,isReadOnly:i,...o})=>{const a=`https://www.google.com/maps/search/?api=1&query=${t},${n}`,{message:{blocks:{location:s}}}=ge;return S.jsxs("a",{...o,...s.container,style:i?{pointerEvents:"none"}:void 0,href:a,type:"_blank",rel:"noopener",ref:e,children:[S.jsx("p",{...s.title,children:r}),S.jsx(pg,{...s.icon})]})};gf.displayName="Location";const yf=({ref:e,blocks:t,horizontalAlignment:n,verticalAlignment:r,direction:i,sender:o,timestamp:a,messageId:s,isReadOnly:l,sendMessage:u,...f})=>{const{message:{blocks:{column:c}}}=ge;return S.jsx("div",{"data-horizontal":n,"data-vertical":r,...f,...c,ref:e,children:t.map((p,d)=>S.jsx(Yt,{block:{...p,direction:i,timestamp:a,sender:o,messageId:s,isReadOnly:l,sendMessage:u}},d))})};yf.displayName="Column";const vf=({ref:e,blocks:t,horizontalAlignment:n,verticalAlignment:r,direction:i,sender:o,timestamp:a,messageId:s,isReadOnly:l,sendMessage:u,...f})=>{const{message:{blocks:{row:c}}}=ge;return S.jsx("div",{"data-horizontal":n,"data-vertical":r,...f,...c,ref:e,children:t.map((p,d)=>S.jsx(Yt,{block:{...p,direction:i,timestamp:a,sender:o,messageId:s,isReadOnly:l,sendMessage:u}},d))})};vf.displayName="Row";function z1(e){return Object.prototype.toString.call(e)==="[object Object]"}function bf(e){return z1(e)||Array.isArray(e)}function $1(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function ua(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const i=JSON.stringify(Object.keys(e.breakpoints||{})),o=JSON.stringify(Object.keys(t.breakpoints||{}));return i!==o?!1:n.every(a=>{const s=e[a],l=t[a];return typeof s=="function"?`${s}`==`${l}`:!bf(s)||!bf(l)?s===l:ua(s,l)})}function xf(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function j1(e,t){if(e.length!==t.length)return!1;const n=xf(e),r=xf(t);return n.every((i,o)=>{const a=r[o];return ua(i,a)})}function ca(e){return typeof e=="number"}function fa(e){return typeof e=="string"}function Vr(e){return typeof e=="boolean"}function wf(e){return Object.prototype.toString.call(e)==="[object Object]"}function Pe(e){return Math.abs(e)}function da(e){return Math.sign(e)}function Qn(e,t){return Pe(e-t)}function U1(e,t){if(e===0||t===0||Pe(e)<=Pe(t))return 0;const n=Qn(Pe(e),Pe(t));return Pe(n/e)}function H1(e){return Math.round(e*100)/100}function Jn(e){return Xn(e).map(Number)}function ct(e){return e[Zn(e)]}function Zn(e){return Math.max(0,e.length-1)}function pa(e,t){return t===Zn(e)}function kf(e,t=0){return Array.from(Array(e),(n,r)=>t+r)}function Xn(e){return Object.keys(e)}function Sf(e,t){return[e,t].reduce((n,r)=>(Xn(r).forEach(i=>{const o=n[i],a=r[i],s=wf(o)&&wf(a);n[i]=s?Sf(o,a):a}),n),{})}function ha(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function W1(e,t){const n={start:r,center:i,end:o};function r(){return 0}function i(l){return o(l)/2}function o(l){return t-l}function a(l,u){return fa(e)?n[e](l):e(t,l,u)}return{measure:a}}function er(){let e=[];function t(i,o,a,s={passive:!0}){let l;if("addEventListener"in i)i.addEventListener(o,a,s),l=()=>i.removeEventListener(o,a,s);else{const u=i;u.addListener(a),l=()=>u.removeListener(a)}return e.push(l),r}function n(){e=e.filter(i=>i())}const r={add:t,clear:n};return r}function V1(e,t,n,r){const i=er(),o=1e3/60;let a=null,s=0,l=0;function u(){i.add(e,"visibilitychange",()=>{e.hidden&&m()})}function f(){d(),i.clear()}function c(y){if(!l)return;a||(a=y,n(),n());const g=y-a;for(a=y,s+=g;s>=o;)n(),s-=o;const v=s/o;r(v),l&&(l=t.requestAnimationFrame(c))}function p(){l||(l=t.requestAnimationFrame(c))}function d(){t.cancelAnimationFrame(l),a=null,s=0,l=0}function m(){a=null,s=0}return{init:u,destroy:f,start:p,stop:d,update:n,render:r}}function q1(e,t){const n=t==="rtl",r=e==="y",i=r?"y":"x",o=r?"x":"y",a=!r&&n?-1:1,s=f(),l=c();function u(m){const{height:h,width:y}=m;return r?h:y}function f(){return r?"top":n?"right":"left"}function c(){return r?"bottom":n?"left":"right"}function p(m){return m*a}return{scroll:i,cross:o,startEdge:s,endEdge:l,measureSize:u,direction:p}}function qt(e=0,t=0){const n=Pe(e-t);function r(u){return u<e}function i(u){return u>t}function o(u){return r(u)||i(u)}function a(u){return o(u)?r(u)?e:t:u}function s(u){return n?u-n*Math.ceil((u-t)/n):u}return{length:n,max:t,min:e,constrain:a,reachedAny:o,reachedMax:i,reachedMin:r,removeOffset:s}}function Ef(e,t,n){const{constrain:r}=qt(0,e),i=e+1;let o=a(t);function a(p){return n?Pe((i+p)%i):r(p)}function s(){return o}function l(p){return o=a(p),c}function u(p){return f().set(s()+p)}function f(){return Ef(e,s(),n)}const c={get:s,set:l,add:u,clone:f};return c}function K1(e,t,n,r,i,o,a,s,l,u,f,c,p,d,m,h,y,g,v){const{cross:x,direction:A}=e,k=["INPUT","SELECT","TEXTAREA"],C={passive:!1},T=er(),M=er(),R=qt(50,225).constrain(d.measure(20)),I={mouse:300,touch:400},O={mouse:500,touch:600},j=m?43:25;let _=!1,N=0,D=0,z=!1,U=!1,$=!1,V=!1;function b(L){if(!v)return;function ne(ke){(Vr(v)||v(L,ke))&&Y(ke)}const me=t;T.add(me,"dragstart",ke=>ke.preventDefault(),C).add(me,"touchmove",()=>{},C).add(me,"touchend",()=>{}).add(me,"touchstart",ne).add(me,"mousedown",ne).add(me,"touchcancel",ee).add(me,"contextmenu",ee).add(me,"click",ie,!0)}function P(){T.clear(),M.clear()}function H(){const L=V?n:t;M.add(L,"touchmove",J,C).add(L,"touchend",ee).add(L,"mousemove",J,C).add(L,"mouseup",ee)}function w(L){const ne=L.nodeName||"";return k.includes(ne)}function W(){return(m?O:I)[V?"mouse":"touch"]}function X(L,ne){const me=c.add(da(L)*-1),ke=f.byDistance(L,!m).distance;return m||Pe(L)<R?ke:y&&ne?ke*.5:f.byIndex(me.get(),0).distance}function Y(L){const ne=ha(L,r);V=ne,$=m&&ne&&!L.buttons&&_,_=Qn(i.get(),a.get())>=2,!(ne&&L.button!==0)&&(w(L.target)||(z=!0,o.pointerDown(L),u.useFriction(0).useDuration(0),i.set(a),H(),N=o.readPoint(L),D=o.readPoint(L,x),p.emit("pointerDown")))}function J(L){if(!ha(L,r)&&L.touches.length>=2)return ee(L);const me=o.readPoint(L),ke=o.readPoint(L,x),oe=Qn(me,N),G=Qn(ke,D);if(!U&&!V&&(!L.cancelable||(U=oe>G,!U)))return ee(L);const ue=o.pointerMove(L);oe>h&&($=!0),u.useFriction(.3).useDuration(.75),s.start(),i.add(A(ue)),L.preventDefault()}function ee(L){const me=f.byDistance(0,!1).index!==c.get(),ke=o.pointerUp(L)*W(),oe=X(A(ke),me),G=U1(ke,oe),ue=j-10*G,de=g+G/50;U=!1,z=!1,M.clear(),u.useDuration(ue).useFriction(de),l.distance(oe,!m),V=!1,p.emit("pointerUp")}function ie(L){$&&(L.stopPropagation(),L.preventDefault(),$=!1)}function K(){return z}return{init:b,destroy:P,pointerDown:K}}function Y1(e,t){let r,i;function o(c){return c.timeStamp}function a(c,p){const m=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(ha(c,t)?c:c.touches[0])[m]}function s(c){return r=c,i=c,a(c)}function l(c){const p=a(c)-a(i),d=o(c)-o(r)>170;return i=c,d&&(r=c),p}function u(c){if(!r||!i)return 0;const p=a(i)-a(r),d=o(c)-o(r),m=o(c)-o(i)>170,h=p/d;return d&&!m&&Pe(h)>.1?h:0}return{pointerDown:s,pointerMove:l,pointerUp:u,readPoint:a}}function G1(){function e(n){const{offsetTop:r,offsetLeft:i,offsetWidth:o,offsetHeight:a}=n;return{top:r,right:i+o,bottom:r+a,left:i,width:o,height:a}}return{measure:e}}function Q1(e){function t(r){return e*(r/100)}return{measure:t}}function J1(e,t,n,r,i,o,a){const s=[e].concat(r);let l,u,f=[],c=!1;function p(y){return i.measureSize(a.measure(y))}function d(y){if(!o)return;u=p(e),f=r.map(p);function g(v){for(const x of v){if(c)return;const A=x.target===e,k=r.indexOf(x.target),C=A?u:f[k],T=p(A?e:r[k]);if(Pe(T-C)>=.5){y.reInit(),t.emit("resize");break}}}l=new ResizeObserver(v=>{(Vr(o)||o(y,v))&&g(v)}),n.requestAnimationFrame(()=>{s.forEach(v=>l.observe(v))})}function m(){c=!0,l&&l.disconnect()}return{init:d,destroy:m}}function Z1(e,t,n,r,i,o){let a=0,s=0,l=i,u=o,f=e.get(),c=0;function p(){const C=r.get()-e.get(),T=!l;let M=0;return T?(a=0,n.set(r),e.set(r),M=C):(n.set(e),a+=C/l,a*=u,f+=a,e.add(a),M=f-c),s=da(M),c=f,k}function d(){const C=r.get()-t.get();return Pe(C)<.001}function m(){return l}function h(){return s}function y(){return a}function g(){return x(i)}function v(){return A(o)}function x(C){return l=C,k}function A(C){return u=C,k}const k={direction:h,duration:m,velocity:y,seek:p,settled:d,useBaseFriction:v,useBaseDuration:g,useFriction:A,useDuration:x};return k}function X1(e,t,n,r,i){const o=i.measure(10),a=i.measure(50),s=qt(.1,.99);let l=!1;function u(){return!(l||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function f(d){if(!u())return;const m=e.reachedMin(t.get())?"min":"max",h=Pe(e[m]-t.get()),y=n.get()-t.get(),g=s.constrain(h/a);n.subtract(y*g),!d&&Pe(y)<o&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function c(d){l=!d}return{shouldConstrain:u,constrain:f,toggleActive:c}}function ek(e,t,n,r,i){const o=qt(-t+e,0),a=c(),s=f(),l=p();function u(m,h){return Qn(m,h)<=1}function f(){const m=a[0],h=ct(a),y=a.lastIndexOf(m),g=a.indexOf(h)+1;return qt(y,g)}function c(){return n.map((m,h)=>{const{min:y,max:g}=o,v=o.constrain(m),x=!h,A=pa(n,h);return x?g:A||u(y,v)?y:u(g,v)?g:v}).map(m=>parseFloat(m.toFixed(3)))}function p(){if(t<=e+i)return[o.max];if(r==="keepSnaps")return a;const{min:m,max:h}=s;return a.slice(m,h)}return{snapsContained:l,scrollContainLimit:s}}function tk(e,t,n){const r=t[0],i=n?r-e:ct(t);return{limit:qt(i,r)}}function nk(e,t,n,r){const o=t.min+.1,a=t.max+.1,{reachedMin:s,reachedMax:l}=qt(o,a);function u(p){return p===1?l(n.get()):p===-1?s(n.get()):!1}function f(p){if(!u(p))return;const d=e*(p*-1);r.forEach(m=>m.add(d))}return{loop:f}}function rk(e){const{max:t,length:n}=e;function r(o){const a=o-t;return n?a/-n:0}return{get:r}}function ik(e,t,n,r,i){const{startEdge:o,endEdge:a}=e,{groupSlides:s}=i,l=c().map(t.measure),u=p(),f=d();function c(){return s(r).map(h=>ct(h)[a]-h[0][o]).map(Pe)}function p(){return r.map(h=>n[o]-h[o]).map(h=>-Pe(h))}function d(){return s(u).map(h=>h[0]).map((h,y)=>h+l[y])}return{snaps:u,snapsAligned:f}}function ok(e,t,n,r,i,o){const{groupSlides:a}=i,{min:s,max:l}=r,u=f();function f(){const p=a(o),d=!e||t==="keepSnaps";return n.length===1?[o]:d?p:p.slice(s,l).map((m,h,y)=>{const g=!h,v=pa(y,h);if(g){const x=ct(y[0])+1;return kf(x)}if(v){const x=Zn(o)-ct(y)[0]+1;return kf(x,ct(y)[0])}return m})}return{slideRegistry:u}}function ak(e,t,n,r,i){const{reachedAny:o,removeOffset:a,constrain:s}=r;function l(m){return m.concat().sort((h,y)=>Pe(h)-Pe(y))[0]}function u(m){const h=e?a(m):s(m),y=t.map((v,x)=>({diff:f(v-h,0),index:x})).sort((v,x)=>Pe(v.diff)-Pe(x.diff)),{index:g}=y[0];return{index:g,distance:h}}function f(m,h){const y=[m,m+n,m-n];if(!e)return m;if(!h)return l(y);const g=y.filter(v=>da(v)===h);return g.length?l(g):ct(y)-n}function c(m,h){const y=t[m]-i.get(),g=f(y,h);return{index:m,distance:g}}function p(m,h){const y=i.get()+m,{index:g,distance:v}=u(y),x=!e&&o(y);if(!h||x)return{index:g,distance:m};const A=t[g]-v,k=m+f(A,0);return{index:g,distance:k}}return{byDistance:p,byIndex:c,shortcut:f}}function sk(e,t,n,r,i,o,a){function s(c){const p=c.distance,d=c.index!==t.get();o.add(p),p&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),d&&(n.set(t.get()),t.set(c.index),a.emit("select"))}function l(c,p){const d=i.byDistance(c,p);s(d)}function u(c,p){const d=t.clone().set(c),m=i.byIndex(d.get(),p);s(m)}return{distance:l,index:u}}function lk(e,t,n,r,i,o,a,s){const l={passive:!0,capture:!0};let u=0;function f(d){if(!s)return;function m(h){if(new Date().getTime()-u>10)return;a.emit("slideFocusStart"),e.scrollLeft=0;const v=n.findIndex(x=>x.includes(h));ca(v)&&(i.useDuration(0),r.index(v,0),a.emit("slideFocus"))}o.add(document,"keydown",c,!1),t.forEach((h,y)=>{o.add(h,"focus",g=>{(Vr(s)||s(d,g))&&m(y)},l)})}function c(d){d.code==="Tab"&&(u=new Date().getTime())}return{init:f}}function tr(e){let t=e;function n(){return t}function r(l){t=a(l)}function i(l){t+=a(l)}function o(l){t-=a(l)}function a(l){return ca(l)?l:l.get()}return{get:n,set:r,add:i,subtract:o}}function Cf(e,t){const n=e.scroll==="x"?a:s,r=t.style;let i=null,o=!1;function a(p){return`translate3d(${p}px,0px,0px)`}function s(p){return`translate3d(0px,${p}px,0px)`}function l(p){if(o)return;const d=H1(e.direction(p));d!==i&&(r.transform=n(d),i=d)}function u(p){o=!p}function f(){o||(r.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:f,to:l,toggleActive:u}}function uk(e,t,n,r,i,o,a,s,l){const f=Jn(i),c=Jn(i).reverse(),p=g().concat(v());function d(T,M){return T.reduce((R,I)=>R-i[I],M)}function m(T,M){return T.reduce((R,I)=>d(R,M)>0?R.concat([I]):R,[])}function h(T){return o.map((M,R)=>({start:M-r[R]+.5+T,end:M+t-.5+T}))}function y(T,M,R){const I=h(M);return T.map(O=>{const j=R?0:-n,_=R?n:0,N=R?"end":"start",D=I[O][N];return{index:O,loopPoint:D,slideLocation:tr(-1),translate:Cf(e,l[O]),target:()=>s.get()>D?j:_}})}function g(){const T=a[0],M=m(c,T);return y(M,n,!1)}function v(){const T=t-a[0]-1,M=m(f,T);return y(M,-n,!0)}function x(){return p.every(({index:T})=>{const M=f.filter(R=>R!==T);return d(M,t)<=.1})}function A(){p.forEach(T=>{const{target:M,translate:R,slideLocation:I}=T,O=M();O!==I.get()&&(R.to(O),I.set(O))})}function k(){p.forEach(T=>T.translate.clear())}return{canLoop:x,clear:k,loop:A,loopPoints:p}}function ck(e,t,n){let r,i=!1;function o(l){if(!n)return;function u(f){for(const c of f)if(c.type==="childList"){l.reInit(),t.emit("slidesChanged");break}}r=new MutationObserver(f=>{i||(Vr(n)||n(l,f))&&u(f)}),r.observe(e,{childList:!0})}function a(){r&&r.disconnect(),i=!0}return{init:o,destroy:a}}function fk(e,t,n,r){const i={};let o=null,a=null,s,l=!1;function u(){s=new IntersectionObserver(m=>{l||(m.forEach(h=>{const y=t.indexOf(h.target);i[y]=h}),o=null,a=null,n.emit("slidesInView"))},{root:e.parentElement,threshold:r}),t.forEach(m=>s.observe(m))}function f(){s&&s.disconnect(),l=!0}function c(m){return Xn(i).reduce((h,y)=>{const g=parseInt(y),{isIntersecting:v}=i[g];return(m&&v||!m&&!v)&&h.push(g),h},[])}function p(m=!0){if(m&&o)return o;if(!m&&a)return a;const h=c(m);return m&&(o=h),m||(a=h),h}return{init:u,destroy:f,get:p}}function dk(e,t,n,r,i,o){const{measureSize:a,startEdge:s,endEdge:l}=e,u=n[0]&&i,f=m(),c=h(),p=n.map(a),d=y();function m(){if(!u)return 0;const v=n[0];return Pe(t[s]-v[s])}function h(){if(!u)return 0;const v=o.getComputedStyle(ct(r));return parseFloat(v.getPropertyValue(`margin-${l}`))}function y(){return n.map((v,x,A)=>{const k=!x,C=pa(A,x);return k?p[x]+f:C?p[x]+c:A[x+1][s]-v[s]}).map(Pe)}return{slideSizes:p,slideSizesWithGaps:d,startGap:f,endGap:c}}function pk(e,t,n,r,i,o,a,s,l){const{startEdge:u,endEdge:f,direction:c}=e,p=ca(n);function d(g,v){return Jn(g).filter(x=>x%v===0).map(x=>g.slice(x,x+v))}function m(g){return g.length?Jn(g).reduce((v,x,A)=>{const k=ct(v)||0,C=k===0,T=x===Zn(g),M=i[u]-o[k][u],R=i[u]-o[x][f],I=!r&&C?c(a):0,O=!r&&T?c(s):0,j=Pe(R-O-(M+I));return A&&j>t+l&&v.push(x),T&&v.push(g.length),v},[]).map((v,x,A)=>{const k=Math.max(A[x-1]||0);return g.slice(k,v)}):[]}function h(g){return p?d(g,n):m(g)}return{groupSlides:h}}function hk(e,t,n,r,i,o,a){const{align:s,axis:l,direction:u,startIndex:f,loop:c,duration:p,dragFree:d,dragThreshold:m,inViewThreshold:h,slidesToScroll:y,skipSnaps:g,containScroll:v,watchResize:x,watchSlides:A,watchDrag:k,watchFocus:C}=o,T=2,M=G1(),R=M.measure(t),I=n.map(M.measure),O=q1(l,u),j=O.measureSize(R),_=Q1(j),N=W1(s,j),D=!c&&!!v,z=c||!!v,{slideSizes:U,slideSizesWithGaps:$,startGap:V,endGap:b}=dk(O,R,I,n,z,i),P=pk(O,j,y,c,R,I,V,b,T),{snaps:H,snapsAligned:w}=ik(O,N,R,I,P),W=-ct(H)+ct($),{snapsContained:X,scrollContainLimit:Y}=ek(j,W,w,v,T),J=D?X:w,{limit:ee}=tk(W,J,c),ie=Ef(Zn(J),f,c),K=ie.clone(),te=Jn(n),L=({dragHandler:pe,scrollBody:fe,scrollBounds:Ee,options:{loop:Oe}})=>{Oe||Ee.constrain(pe.pointerDown()),fe.seek()},ne=({scrollBody:pe,translate:fe,location:Ee,offsetLocation:Oe,previousLocation:st,scrollLooper:gt,slideLooper:ze,dragHandler:lt,animation:Ge,eventHandler:zi,scrollBounds:PT,options:{loop:$h}},jh)=>{const Uh=pe.settled(),NT=!PT.shouldConstrain(),Hh=$h?Uh:Uh&&NT,Wh=Hh&&!lt.pointerDown();Wh&&Ge.stop();const LT=Ee.get()*jh+st.get()*(1-jh);Oe.set(LT),$h&&(gt.loop(pe.direction()),ze.loop()),fe.to(Oe.get()),Wh&&zi.emit("settle"),Hh||zi.emit("scroll")},me=V1(r,i,()=>L(le),pe=>ne(le,pe)),ke=.68,oe=J[ie.get()],G=tr(oe),ue=tr(oe),de=tr(oe),xe=tr(oe),Se=Z1(G,de,ue,xe,p,ke),Ue=ak(c,J,W,ee,xe),Ye=sk(me,ie,K,Se,Ue,xe,a),Z=rk(ee),se=er(),B=fk(t,n,a,h),{slideRegistry:q}=ok(D,v,J,Y,P,te),ae=lk(e,n,q,Ye,Se,se,a,C),le={ownerDocument:r,ownerWindow:i,eventHandler:a,containerRect:R,slideRects:I,animation:me,axis:O,dragHandler:K1(O,e,r,i,xe,Y1(O,i),G,me,Ye,Se,Ue,ie,a,_,d,m,g,ke,k),eventStore:se,percentOfView:_,index:ie,indexPrevious:K,limit:ee,location:G,offsetLocation:de,previousLocation:ue,options:o,resizeHandler:J1(t,a,i,n,O,x,M),scrollBody:Se,scrollBounds:X1(ee,de,xe,Se,_),scrollLooper:nk(W,ee,de,[G,de,ue,xe]),scrollProgress:Z,scrollSnapList:J.map(Z.get),scrollSnaps:J,scrollTarget:Ue,scrollTo:Ye,slideLooper:uk(O,j,W,U,$,H,J,de,n),slideFocus:ae,slidesHandler:ck(t,a,A),slidesInView:B,slideIndexes:te,slideRegistry:q,slidesToScroll:P,target:xe,translate:Cf(O,t)};return le}function mk(){let e={},t;function n(u){t=u}function r(u){return e[u]||[]}function i(u){return r(u).forEach(f=>f(t,u)),l}function o(u,f){return e[u]=r(u).concat([f]),l}function a(u,f){return e[u]=r(u).filter(c=>c!==f),l}function s(){e={}}const l={init:n,emit:i,off:a,on:o,clear:s};return l}const gk={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function yk(e){function t(o,a){return Sf(o,a||{})}function n(o){const a=o.breakpoints||{},s=Xn(a).filter(l=>e.matchMedia(l).matches).map(l=>a[l]).reduce((l,u)=>t(l,u),{});return t(o,s)}function r(o){return o.map(a=>Xn(a.breakpoints||{})).reduce((a,s)=>a.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function vk(e){let t=[];function n(o,a){return t=a.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(o,e)),a.reduce((s,l)=>Object.assign(s,{[l.name]:l}),{})}function r(){t=t.filter(o=>o.destroy())}return{init:n,destroy:r}}function qr(e,t,n){const r=e.ownerDocument,i=r.defaultView,o=yk(i),a=vk(o),s=er(),l=mk(),{mergeOptions:u,optionsAtMedia:f,optionsMediaQueries:c}=o,{on:p,off:d,emit:m}=l,h=O;let y=!1,g,v=u(gk,qr.globalOptions),x=u(v),A=[],k,C,T;function M(){const{container:te,slides:L}=x;C=(fa(te)?e.querySelector(te):te)||e.children[0];const me=fa(L)?C.querySelectorAll(L):L;T=[].slice.call(me||C.children)}function R(te){const L=hk(e,C,T,r,i,te,l);if(te.loop&&!L.slideLooper.canLoop()){const ne=Object.assign({},te,{loop:!1});return R(ne)}return L}function I(te,L){y||(v=u(v,te),x=f(v),A=L||A,M(),g=R(x),c([v,...A.map(({options:ne})=>ne)]).forEach(ne=>s.add(ne,"change",O)),x.active&&(g.translate.to(g.location.get()),g.animation.init(),g.slidesInView.init(),g.slideFocus.init(K),g.eventHandler.init(K),g.resizeHandler.init(K),g.slidesHandler.init(K),g.options.loop&&g.slideLooper.loop(),C.offsetParent&&T.length&&g.dragHandler.init(K),k=a.init(K,A)))}function O(te,L){const ne=P();j(),I(u({startIndex:ne},te),L),l.emit("reInit")}function j(){g.dragHandler.destroy(),g.eventStore.clear(),g.translate.clear(),g.slideLooper.clear(),g.resizeHandler.destroy(),g.slidesHandler.destroy(),g.slidesInView.destroy(),g.animation.destroy(),a.destroy(),s.clear()}function _(){y||(y=!0,s.clear(),j(),l.emit("destroy"),l.clear())}function N(te,L,ne){!x.active||y||(g.scrollBody.useBaseFriction().useDuration(L===!0?0:x.duration),g.scrollTo.index(te,ne||0))}function D(te){const L=g.index.add(1).get();N(L,te,-1)}function z(te){const L=g.index.add(-1).get();N(L,te,1)}function U(){return g.index.add(1).get()!==P()}function $(){return g.index.add(-1).get()!==P()}function V(){return g.scrollSnapList}function b(){return g.scrollProgress.get(g.offsetLocation.get())}function P(){return g.index.get()}function H(){return g.indexPrevious.get()}function w(){return g.slidesInView.get()}function W(){return g.slidesInView.get(!1)}function X(){return k}function Y(){return g}function J(){return e}function ee(){return C}function ie(){return T}const K={canScrollNext:U,canScrollPrev:$,containerNode:ee,internalEngine:Y,destroy:_,off:d,on:p,emit:m,plugins:X,previousScrollSnap:H,reInit:h,rootNode:J,scrollNext:D,scrollPrev:z,scrollProgress:b,scrollSnapList:V,scrollTo:N,selectedScrollSnap:P,slideNodes:ie,slidesInView:w,slidesNotInView:W};return I(t,n),setTimeout(()=>l.emit("init"),0),K}qr.globalOptions=void 0;function ma(e={},t=[]){const n=F.useRef(e),r=F.useRef(t),[i,o]=F.useState(),[a,s]=F.useState(),l=F.useCallback(()=>{i&&i.reInit(n.current,r.current)},[i]);return F.useEffect(()=>{ua(n.current,e)||(n.current=e,l())},[e,l]),F.useEffect(()=>{j1(r.current,t)||(r.current=t,l())},[t,l]),F.useEffect(()=>{if($1()&&a){qr.globalOptions=ma.globalOptions;const u=qr(a,n.current,r.current);return o(u),()=>u.destroy()}else o(void 0)},[a,o]),[s,i]}ma.globalOptions=void 0;const Af=({ref:e,blocks:t,direction:n,sender:r,timestamp:i,messageId:o,isReadOnly:a,sendMessage:s,addMessageFeedback:l})=>{const[u,f]=ma({skipSnaps:!0,loop:!0}),[c,p]=F.useState(!0),[d,m]=F.useState(!0),h=F.useCallback(()=>f==null?void 0:f.scrollPrev(),[f]),y=F.useCallback(()=>f==null?void 0:f.scrollNext(),[f]),{message:{blocks:{carousel:g}}}=ge,v=F.useCallback(x=>{p(!(x!=null&&x.canScrollPrev())||!1),m(!(x!=null&&x.canScrollNext())||!1)},[f]);return F.useEffect(()=>{f&&(v(f),f.on("reInit",v),f.on("select",v))},[f,v]),S.jsxs("div",{...g==null?void 0:g.container,"data-container":"carousel",ref:u,children:[S.jsx("div",{ref:e,...g==null?void 0:g.slidesContainer,children:t.map((x,A)=>S.jsx(Yt,{block:{...x,direction:n,timestamp:i,sender:r,messageId:o,sendMessage:s,isReadOnly:a}},A))}),t.length>1&&S.jsxs(S.Fragment,{children:[S.jsx(tg,{...g==null?void 0:g.backButton,"data-disabled":c?"":void 0,onClick:h}),S.jsx(ng,{...g==null?void 0:g.nextButton,"data-disabled":d?"":void 0,onClick:y})]})]})};Af.displayName="Carousel";const If=Math.floor;function Tf(e){return Of(e)?(e.nodeName||"").toLowerCase():"#document"}function nr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function bk(e){var t;return(t=(Of(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Of(e){return e instanceof Node||e instanceof nr(e).Node}function at(e){return e instanceof Element||e instanceof nr(e).Element}function cn(e){return e instanceof HTMLElement||e instanceof nr(e).HTMLElement}function ga(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof nr(e).ShadowRoot}function xk(e){return["html","body","#document"].includes(Tf(e))}function wk(e){return nr(e).getComputedStyle(e)}function kk(e){if(Tf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ga(e)&&e.host||bk(e);return ga(t)?t.host:t}function Pt(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 Ze(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&ga(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Df(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Sk(){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 Mf(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(Df())||t.test(Sk()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function _f(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 Pf(){return/apple/i.test(navigator.vendor)}function Ek(){return Df().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Nf(e,t){return["mouse","pen"].includes(e)}function Ck(e){return"nativeEvent"in e}function Ak(e){return e.matches("html,body")}function ft(e){return(e==null?void 0:e.ownerDocument)||document}function ya(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 Lf(e){return"composedPath"in e?e.composedPath()[0]:e.target}const Ik="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Ff(e){return cn(e)&&e.matches(Ik)}function je(e){e.preventDefault(),e.stopPropagation()}const fn=Math.min,nt=Math.max,Kr=Math.round,Yr=Math.floor,bt=e=>({x:e,y:e});function Rf(e,t,n){return nt(e,fn(t,n))}function Gr(e,t){return typeof e=="function"?e(t):e}function rr(e){return e.split("-")[0]}function va(e){return e.split("-")[1]}function Bf(e){return e==="x"?"y":"x"}function Tk(e){return e==="y"?"height":"width"}const Ok=new Set(["top","bottom"]);function ir(e){return Ok.has(rr(e))?"y":"x"}function Dk(e){return Bf(ir(e))}function Mk(e){return{top:0,right:0,bottom:0,left:0,...e}}function _k(e){return typeof e!="number"?Mk(e):{top:e,right:e,bottom:e,left:e}}function Qr(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}}function zf(e,t,n){let{reference:r,floating:i}=e;const o=ir(t),a=Dk(t),s=Tk(a),l=rr(t),u=o==="y",f=r.x+r.width/2-i.width/2,c=r.y+r.height/2-i.height/2,p=r[s]/2-i[s]/2;let d;switch(l){case"top":d={x:f,y:r.y-i.height};break;case"bottom":d={x:f,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:c};break;case"left":d={x:r.x-i.width,y:c};break;default:d={x:r.x,y:r.y}}switch(va(t)){case"start":d[a]-=p*(n&&u?-1:1);break;case"end":d[a]+=p*(n&&u?-1:1);break}return d}const Pk=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:c}=zf(u,r,l),p=r,d={},m=0;for(let h=0;h<s.length;h++){const{name:y,fn:g}=s[h],{x:v,y:x,data:A,reset:k}=await g({x:f,y:c,initialPlacement:r,placement:p,strategy:i,middlewareData:d,rects:u,platform:a,elements:{reference:e,floating:t}});f=v??f,c=x??c,d={...d,[y]:{...d[y],...A}},k&&m<=50&&(m++,typeof k=="object"&&(k.placement&&(p=k.placement),k.rects&&(u=k.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):k.rects),{x:f,y:c}=zf(u,p,l)),h=-1)}return{x:f,y:c,placement:p,strategy:i,middlewareData:d}};async function $f(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:c="floating",altBoundary:p=!1,padding:d=0}=Gr(t,e),m=_k(d),y=s[p?c==="floating"?"reference":"floating":c],g=Qr(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(y)))==null||n?y:y.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:f,strategy:l})),v=c==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,x=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),A=await(o.isElement==null?void 0:o.isElement(x))?await(o.getScale==null?void 0:o.getScale(x))||{x:1,y:1}:{x:1,y:1},k=Qr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:x,strategy:l}):v);return{top:(g.top-k.top+m.top)/A.y,bottom:(k.bottom-g.bottom+m.bottom)/A.y,left:(g.left-k.left+m.left)/A.x,right:(k.right-g.right+m.right)/A.x}}const Nk=new Set(["left","top"]);async function Lk(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=rr(n),s=va(n),l=ir(n)==="y",u=Nk.has(a)?-1:1,f=o&&l?-1:1,c=Gr(t,e);let{mainAxis:p,crossAxis:d,alignmentAxis:m}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return s&&typeof m=="number"&&(d=s==="end"?m*-1:m),l?{x:d*f,y:p*u}:{x:p*u,y:d*f}}const Fk=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:s}=t,l=await Lk(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},Rk=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:y=>{let{x:g,y:v}=y;return{x:g,y:v}}},...l}=Gr(e,t),u={x:n,y:r},f=await $f(t,l),c=ir(rr(i)),p=Bf(c);let d=u[p],m=u[c];if(o){const y=p==="y"?"top":"left",g=p==="y"?"bottom":"right",v=d+f[y],x=d-f[g];d=Rf(v,d,x)}if(a){const y=c==="y"?"top":"left",g=c==="y"?"bottom":"right",v=m+f[y],x=m-f[g];m=Rf(v,m,x)}const h=s.fn({...t,[p]:d,[c]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[p]:o,[c]:a}}}}}},Bk=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:a,elements:s}=t,{apply:l=()=>{},...u}=Gr(e,t),f=await $f(t,u),c=rr(i),p=va(i),d=ir(i)==="y",{width:m,height:h}=o.floating;let y,g;c==="top"||c==="bottom"?(y=c,g=p===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(g=c,y=p==="end"?"top":"bottom");const v=h-f.top-f.bottom,x=m-f.left-f.right,A=fn(h-f[y],v),k=fn(m-f[g],x),C=!t.middlewareData.shift;let T=A,M=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=v),C&&!p){const I=nt(f.left,0),O=nt(f.right,0),j=nt(f.top,0),_=nt(f.bottom,0);d?M=m-2*(I!==0||O!==0?I+O:nt(f.left,f.right)):T=h-2*(j!==0||_!==0?j+_:nt(f.top,f.bottom))}await l({...t,availableWidth:M,availableHeight:T});const R=await a.getDimensions(s.floating);return m!==R.width||h!==R.height?{reset:{rects:!0}}:{}}}};function Jr(){return typeof window<"u"}function dn(e){return jf(e)?(e.nodeName||"").toLowerCase():"#document"}function rt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function xt(e){var t;return(t=(jf(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function jf(e){return Jr()?e instanceof Node||e instanceof rt(e).Node:!1}function dt(e){return Jr()?e instanceof Element||e instanceof rt(e).Element:!1}function wt(e){return Jr()?e instanceof HTMLElement||e instanceof rt(e).HTMLElement:!1}function Uf(e){return!Jr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof rt(e).ShadowRoot}const zk=new Set(["inline","contents"]);function or(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=pt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!zk.has(i)}const $k=new Set(["table","td","th"]);function jk(e){return $k.has(dn(e))}const Uk=[":popover-open",":modal"];function Zr(e){return Uk.some(t=>{try{return e.matches(t)}catch{return!1}})}const Hk=["transform","translate","scale","rotate","perspective"],Wk=["transform","translate","scale","rotate","perspective","filter"],Vk=["paint","layout","strict","content"];function ba(e){const t=xa(),n=dt(e)?pt(e):e;return Hk.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Wk.some(r=>(n.willChange||"").includes(r))||Vk.some(r=>(n.contain||"").includes(r))}function qk(e){let t=Nt(e);for(;wt(t)&&!pn(t);){if(ba(t))return t;if(Zr(t))return null;t=Nt(t)}return null}function xa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Kk=new Set(["html","body","#document"]);function pn(e){return Kk.has(dn(e))}function pt(e){return rt(e).getComputedStyle(e)}function Xr(e){return dt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Nt(e){if(dn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Uf(e)&&e.host||xt(e);return Uf(t)?t.host:t}function Hf(e){const t=Nt(e);return pn(t)?e.ownerDocument?e.ownerDocument.body:e.body:wt(t)&&or(t)?t:Hf(t)}function Lt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Hf(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=rt(i);if(o){const s=wa(a);return t.concat(a,a.visualViewport||[],or(i)?i:[],s&&n?Lt(s):[])}return t.concat(i,Lt(i,[],n))}function wa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Wf(e){const t=pt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=wt(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=Kr(n)!==o||Kr(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function ka(e){return dt(e)?e:e.contextElement}function hn(e){const t=ka(e);if(!wt(t))return bt(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=Wf(t);let a=(o?Kr(n.width):n.width)/r,s=(o?Kr(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const Yk=bt(0);function Vf(e){const t=rt(e);return!xa()||!t.visualViewport?Yk:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Gk(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==rt(e)?!1:t}function Kt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=ka(e);let a=bt(1);t&&(r?dt(r)&&(a=hn(r)):a=hn(e));const s=Gk(o,n,r)?Vf(o):bt(0);let l=(i.left+s.x)/a.x,u=(i.top+s.y)/a.y,f=i.width/a.x,c=i.height/a.y;if(o){const p=rt(o),d=r&&dt(r)?rt(r):r;let m=p,h=wa(m);for(;h&&r&&d!==m;){const y=hn(h),g=h.getBoundingClientRect(),v=pt(h),x=g.left+(h.clientLeft+parseFloat(v.paddingLeft))*y.x,A=g.top+(h.clientTop+parseFloat(v.paddingTop))*y.y;l*=y.x,u*=y.y,f*=y.x,c*=y.y,l+=x,u+=A,m=rt(h),h=wa(m)}}return Qr({width:f,height:c,x:l,y:u})}function ei(e,t){const n=Xr(e).scrollLeft;return t?t.left+n:Kt(xt(e)).left+n}function qf(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-ei(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function Qk(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=xt(r),s=t?Zr(t.floating):!1;if(r===a||s&&o)return n;let l={scrollLeft:0,scrollTop:0},u=bt(1);const f=bt(0),c=wt(r);if((c||!c&&!o)&&((dn(r)!=="body"||or(a))&&(l=Xr(r)),wt(r))){const d=Kt(r);u=hn(r),f.x=d.x+r.clientLeft,f.y=d.y+r.clientTop}const p=a&&!c&&!o?qf(a,l):bt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+f.x+p.x,y:n.y*u.y-l.scrollTop*u.y+f.y+p.y}}function Jk(e){return Array.from(e.getClientRects())}function Zk(e){const t=xt(e),n=Xr(e),r=e.ownerDocument.body,i=nt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=nt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+ei(e);const s=-n.scrollTop;return pt(r).direction==="rtl"&&(a+=nt(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}const Kf=25;function Xk(e,t){const n=rt(e),r=xt(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const f=xa();(!f||f&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}const u=ei(r);if(u<=0){const f=r.ownerDocument,c=f.body,p=getComputedStyle(c),d=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,m=Math.abs(r.clientWidth-c.clientWidth-d);m<=Kf&&(o-=m)}else u<=Kf&&(o+=u);return{width:o,height:a,x:s,y:l}}const eS=new Set(["absolute","fixed"]);function tS(e,t){const n=Kt(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=wt(e)?hn(e):bt(1),a=e.clientWidth*o.x,s=e.clientHeight*o.y,l=i*o.x,u=r*o.y;return{width:a,height:s,x:l,y:u}}function Yf(e,t,n){let r;if(t==="viewport")r=Xk(e,n);else if(t==="document")r=Zk(xt(e));else if(dt(t))r=tS(t,n);else{const i=Vf(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Qr(r)}function Gf(e,t){const n=Nt(e);return n===t||!dt(n)||pn(n)?!1:pt(n).position==="fixed"||Gf(n,t)}function nS(e,t){const n=t.get(e);if(n)return n;let r=Lt(e,[],!1).filter(s=>dt(s)&&dn(s)!=="body"),i=null;const o=pt(e).position==="fixed";let a=o?Nt(e):e;for(;dt(a)&&!pn(a);){const s=pt(a),l=ba(a);!l&&s.position==="fixed"&&(i=null),(o?!l&&!i:!l&&s.position==="static"&&!!i&&eS.has(i.position)||or(a)&&!l&&Gf(e,a))?r=r.filter(f=>f!==a):i=s,a=Nt(a)}return t.set(e,r),r}function rS(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Zr(t)?[]:nS(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((u,f)=>{const c=Yf(t,f,i);return u.top=nt(c.top,u.top),u.right=fn(c.right,u.right),u.bottom=fn(c.bottom,u.bottom),u.left=nt(c.left,u.left),u},Yf(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function iS(e){const{width:t,height:n}=Wf(e);return{width:t,height:n}}function oS(e,t,n){const r=wt(t),i=xt(t),o=n==="fixed",a=Kt(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=bt(0);function u(){l.x=ei(i)}if(r||!r&&!o)if((dn(t)!=="body"||or(i))&&(s=Xr(t)),r){const d=Kt(t,!0,o,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else i&&u();o&&!r&&i&&u();const f=i&&!r&&!o?qf(i,s):bt(0),c=a.left+s.scrollLeft-l.x-f.x,p=a.top+s.scrollTop-l.y-f.y;return{x:c,y:p,width:a.width,height:a.height}}function Sa(e){return pt(e).position==="static"}function Qf(e,t){if(!wt(e)||pt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return xt(e)===n&&(n=n.ownerDocument.body),n}function Jf(e,t){const n=rt(e);if(Zr(e))return n;if(!wt(e)){let i=Nt(e);for(;i&&!pn(i);){if(dt(i)&&!Sa(i))return i;i=Nt(i)}return n}let r=Qf(e,t);for(;r&&jk(r)&&Sa(r);)r=Qf(r,t);return r&&pn(r)&&Sa(r)&&!ba(r)?n:r||qk(e)||n}const aS=async function(e){const t=this.getOffsetParent||Jf,n=this.getDimensions,r=await n(e.floating);return{reference:oS(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function sS(e){return pt(e).direction==="rtl"}const lS={convertOffsetParentRelativeRectToViewportRelativeRect:Qk,getDocumentElement:xt,getClippingRect:rS,getOffsetParent:Jf,getElementRects:aS,getClientRects:Jk,getDimensions:iS,getScale:hn,isElement:dt,isRTL:sS};function Zf(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function uS(e,t){let n=null,r;const i=xt(e);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();const u=e.getBoundingClientRect(),{left:f,top:c,width:p,height:d}=u;if(s||t(),!p||!d)return;const m=Yr(c),h=Yr(i.clientWidth-(f+p)),y=Yr(i.clientHeight-(c+d)),g=Yr(f),x={rootMargin:-m+"px "+-h+"px "+-y+"px "+-g+"px",threshold:nt(0,fn(1,l))||1};let A=!0;function k(C){const T=C[0].intersectionRatio;if(T!==l){if(!A)return a();T?a(!1,T):r=setTimeout(()=>{a(!1,1e-7)},1e3)}T===1&&!Zf(u,e.getBoundingClientRect())&&a(),A=!1}try{n=new IntersectionObserver(k,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(k,x)}n.observe(e)}return a(!0),o}function cS(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=ka(e),f=i||o?[...u?Lt(u):[],...Lt(t)]:[];f.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),o&&g.addEventListener("resize",n)});const c=u&&s?uS(u,n):null;let p=-1,d=null;a&&(d=new ResizeObserver(g=>{let[v]=g;v&&v.target===u&&d&&(d.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=d)==null||x.observe(t)})),n()}),u&&!l&&d.observe(u),d.observe(t));let m,h=l?Kt(e):null;l&&y();function y(){const g=Kt(e);h&&!Zf(h,g)&&n(),h=g,m=requestAnimationFrame(y)}return n(),()=>{var g;f.forEach(v=>{i&&v.removeEventListener("scroll",n),o&&v.removeEventListener("resize",n)}),c==null||c(),(g=d)==null||g.disconnect(),d=null,l&&cancelAnimationFrame(m)}}const fS=Fk,dS=Rk,pS=Bk,hS=(e,t,n)=>{const r=new Map,i={platform:lS,...n},o={...i.platform,_c:r};return Pk(e,t,{...i,platform:o})};var mS=typeof document<"u",gS=function(){},ti=mS?F.useLayoutEffect:gS;function ni(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(!ni(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!ni(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Xf(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ed(e,t){const n=Xf(e);return Math.round(t*n)/n}function Ea(e){const t=E.useRef(e);return ti(()=>{t.current=e}),t}function yS(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[f,c]=E.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,d]=E.useState(r);ni(p,r)||d(r);const[m,h]=E.useState(null),[y,g]=E.useState(null),v=E.useCallback($=>{$!==C.current&&(C.current=$,h($))},[]),x=E.useCallback($=>{$!==T.current&&(T.current=$,g($))},[]),A=o||m,k=a||y,C=E.useRef(null),T=E.useRef(null),M=E.useRef(f),R=l!=null,I=Ea(l),O=Ea(i),j=Ea(u),_=E.useCallback(()=>{if(!C.current||!T.current)return;const $={placement:t,strategy:n,middleware:p};O.current&&($.platform=O.current),hS(C.current,T.current,$).then(V=>{const b={...V,isPositioned:j.current!==!1};N.current&&!ni(M.current,b)&&(M.current=b,Fs.flushSync(()=>{c(b)}))})},[p,t,n,O,j]);ti(()=>{u===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,c($=>({...$,isPositioned:!1})))},[u]);const N=E.useRef(!1);ti(()=>(N.current=!0,()=>{N.current=!1}),[]),ti(()=>{if(A&&(C.current=A),k&&(T.current=k),A&&k){if(I.current)return I.current(A,k,_);_()}},[A,k,_,I,R]);const D=E.useMemo(()=>({reference:C,floating:T,setReference:v,setFloating:x}),[v,x]),z=E.useMemo(()=>({reference:A,floating:k}),[A,k]),U=E.useMemo(()=>{const $={position:n,left:0,top:0};if(!z.floating)return $;const V=ed(z.floating,f.x),b=ed(z.floating,f.y);return s?{...$,transform:"translate("+V+"px, "+b+"px)",...Xf(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:b}},[n,s,z.floating,f.x,f.y]);return E.useMemo(()=>({...f,update:_,refs:D,elements:z,floatingStyles:U}),[f,_,D,z,U])}const vS=(e,t)=>({...fS(e),options:[e,t]}),bS=(e,t)=>({...dS(e),options:[e,t]}),xS=(e,t)=>({...pS(e),options:[e,t]});/*!
|
|
275
|
+
`);const v=y.state[s];if(v==null)return;JSON.stringify(i.getState())!==JSON.stringify(v)&&d(v);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(y)});case"DISPATCH":switch(h.payload.type){case"RESET":return d(m),s===void 0?f==null?void 0:f.init(i.getState()):f==null?void 0:f.init(Ur(l.name));case"COMMIT":if(s===void 0){f==null||f.init(i.getState());return}return f==null?void 0:f.init(Ur(l.name));case"ROLLBACK":return Xo(h.state,y=>{if(s===void 0){d(y),f==null||f.init(i.getState());return}d(y[s]),f==null||f.init(Ur(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Xo(h.state,y=>{if(s===void 0){d(y);return}JSON.stringify(i.getState())!==JSON.stringify(y[s])&&d(y[s])});case"IMPORT_STATE":{const{nextLiftedState:y}=h.payload,v=(g=y.computedStates.slice(-1)[0])==null?void 0:g.state;if(!v)return;d(s===void 0?v:v[s]),f==null||f.send(null,y);return}case"PAUSE_RECORDING":return p=!p}return}}),m},Xo=(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 ea(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var o;const a=l=>l===null?null:JSON.parse(l,void 0),s=(o=n.getItem(i))!=null?o:null;return s instanceof Promise?s.then(a):a(s)},setItem:(i,o)=>n.setItem(i,JSON.stringify(o,void 0)),removeItem:i=>n.removeItem(i)}}const qn=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return qn(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return qn(r)(n)}}}},v1=(e,t)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:g=>g,version:0,merge:(g,y)=>({...y,...g}),...t},a=!1;const s=new Set,l=new Set;let u;try{u=o.getStorage()}catch{}if(!u)return e((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...g)},r,i);const f=qn(o.serialize),c=()=>{const g=o.partialize({...r()});let y;const v=f({state:g,version:o.version}).then(w=>u.setItem(o.name,w)).catch(w=>{y=w});if(y)throw y;return v},p=i.setState;i.setState=(g,y)=>{p(g,y),c()};const d=e((...g)=>{n(...g),c()},r,i);let m;const h=()=>{var g;if(!u)return;a=!1,s.forEach(v=>v(r()));const y=((g=o.onRehydrateStorage)==null?void 0:g.call(o,r()))||void 0;return qn(u.getItem.bind(u))(o.name).then(v=>{if(v)return o.deserialize(v)}).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==o.version){if(o.migrate)return o.migrate(v.state,v.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return v.state}).then(v=>{var w;return m=o.merge(v,(w=r())!=null?w:d),n(m,!0),c()}).then(()=>{y==null||y(m,void 0),a=!0,l.forEach(v=>v(m))}).catch(v=>{y==null||y(void 0,v)})};return i.persist={setOptions:g=>{o={...o,...g},g.getStorage&&(u=g.getStorage())},clearStorage:()=>{u==null||u.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>h(),hasHydrated:()=>a,onHydrate:g=>(s.add(g),()=>{s.delete(g)}),onFinishHydration:g=>(l.add(g),()=>{l.delete(g)})},h(),m||d},b1=(e,t)=>(n,r,i)=>{let o={storage:ea(()=>localStorage),partialize:h=>h,version:0,merge:(h,g)=>({...g,...h}),...t},a=!1;const s=new Set,l=new Set;let u=o.storage;if(!u)return e((...h)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...h)},r,i);const f=()=>{const h=o.partialize({...r()});return u.setItem(o.name,{state:h,version:o.version})},c=i.setState;i.setState=(h,g)=>{c(h,g),f()};const p=e((...h)=>{n(...h),f()},r,i);let d;const m=()=>{var h,g;if(!u)return;a=!1,s.forEach(v=>{var w;return v((w=r())!=null?w:p)});const y=((g=o.onRehydrateStorage)==null?void 0:g.call(o,(h=r())!=null?h:p))||void 0;return qn(u.getItem.bind(u))(o.name).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==o.version){if(o.migrate)return o.migrate(v.state,v.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return v.state}).then(v=>{var w;return d=o.merge(v,(w=r())!=null?w:p),n(d,!0),f()}).then(()=>{y==null||y(d,void 0),d=r(),a=!0,l.forEach(v=>v(d))}).catch(v=>{y==null||y(void 0,v)})};return i.persist={setOptions:h=>{o={...o,...h},h.storage&&(u=h.storage)},clearStorage:()=>{u==null||u.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>m(),hasHydrated:()=>a,onHydrate:h=>(s.add(h),()=>{s.delete(h)}),onFinishHydration:h=>(l.add(h),()=>{l.delete(h)})},o.skipHydration||m(),d||p},Hr=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((jr?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),v1(e,t)):b1(e,t),qc=_t()(Vn(Hr(e=>({messageHistory:[],addMessageToHistory:t=>e(n=>({...n,messageHistory:[t,...(n.messageHistory??[]).slice(0,100).filter(String)]}))}),{name:"botpress-message-history"})));let Wr;const w1=new Uint8Array(16);function x1(){if(!Wr&&(Wr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Wr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Wr(w1)}const $e=[];for(let e=0;e<256;++e)$e.push((e+256).toString(16).slice(1));function k1(e,t=0){return $e[e[t+0]]+$e[e[t+1]]+$e[e[t+2]]+$e[e[t+3]]+"-"+$e[e[t+4]]+$e[e[t+5]]+"-"+$e[e[t+6]]+$e[e[t+7]]+"-"+$e[e[t+8]]+$e[e[t+9]]+"-"+$e[e[t+10]]+$e[e[t+11]]+$e[e[t+12]]+$e[e[t+13]]+$e[e[t+14]]+$e[e[t+15]]}const Kc={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function S1(e,t,n){if(Kc.randomUUID&&!e)return Kc.randomUUID();e=e||{};const r=e.random||(e.rng||x1)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,k1(r)}function Kn(e){var a;const{metadata:t,conversationId:n,userId:r}=e,{payload:i,disableInput:o}=Yc(e.payload);return{id:e.id,conversationId:n,authorId:r,timestamp:new Date(e.createdAt),block:i,feedback:(a=e.feedback)==null?void 0:a.value,disableInput:o,metadata:t}}const Yc=e=>{switch(e.type){case"audio":return Gc(e);case"card":return E1(e);case"carousel":return C1(e);case"choice":return A1(e);case"dropdown":return I1(e);case"file":return Qc(e);case"image":return Jc(e);case"location":return Zc(e);case"markdown":return Xc(e);case"text":return ef(e);case"video":return tf(e);case"bloc":return T1(e);case"custom":return{payload:e};default:{const t=e;throw new Error(`Unsuported message type ${t}`)}}},Yn=e=>({block:e,type:"bubble"}),Gc=e=>({payload:{type:"audio",url:e.audioUrl}}),E1=e=>({payload:Yn(nf(e))}),C1=e=>({payload:{type:"carousel",blocks:e.items.map(t=>nf({...t}))}}),A1=e=>{const t=e.options.map(o=>({title:o.label,value:o.value})),n=e.text,r=S1(),i=Yn({type:"text",text:n});return t.length===0?{disableInput:e.disableFreeText,payload:i}:{disableInput:e.disableFreeText,payload:{type:"column",blocks:[i,{type:"row",blocks:t.map(({title:o,value:a})=>({type:"button",variant:"action",text:o,buttonValue:a,groupId:r}))}]}}},I1=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:Yn({type:"column",blocks:r})}},Qc=e=>({payload:{type:"file",url:e.fileUrl,title:e.title}}),Jc=e=>({payload:{type:"image",url:e.imageUrl}}),Zc=e=>({payload:{type:"location",latitude:e.latitude,longitude:e.longitude,title:e.title??e.address??"View on map"}}),Xc=e=>({payload:Yn({type:"text",text:e.markdown})}),ef=e=>({payload:Yn({type:"text",text:e.text,value:e.value})}),tf=e=>({payload:{type:"video",url:e.videoUrl}}),T1=e=>({payload:{type:"column",blocks:e.items.map(n=>{switch(n.type){case"audio":return Gc({...n.payload,type:n.type}).payload;case"file":return Qc({...n.payload,type:n.type}).payload;case"image":return Jc({...n.payload,type:n.type}).payload;case"location":return Zc({...n.payload,type:n.type}).payload;case"markdown":return Xc({...n.payload,type:n.type}).payload;case"text":return ef({...n.payload,type:n.type}).payload;case"video":return tf({...n.payload,type:n.type}).payload;default:throw new Error("Unsuported message type")}})}}),nf=e=>{const t=e.title,n=e.subtitle,r=e.imageUrl,i=e.actions.map(a=>{switch(a.action){case"postback":return{type:"button",variant:"action",text:a.label,buttonValue:a.value,reusable:!0};case"url":return{type:"button",variant:"link",text:a.label,buttonValue:a.value,reusable:!0};case"say":return{type:"button",variant:"action",text:a.label,buttonValue:a.value,reusable:!0};default:throw new Error(`Unknown action type ${a.action}`)}}),o=[];return r&&o.push({type:"image",url:r}),t&&o.push({type:"text",text:`#### ${t}`}),n&&o.push({type:"text",text:n}),i.length>0&&o.push({type:"row",blocks:i}),{type:"column",horizontalAlignment:"center",blocks:[...o]}},an=_t()(Vn(e=>({messages:[],isFetching:!1,setMessages:t=>e({messages:t}),saveMessage:t=>e(({messages:n})=>{var i;const r=(i=t.metadata)==null?void 0:i.clientMessageId;if(r){const o=n.findIndex(s=>{var l;return((l=s.metadata)==null?void 0:l.clientMessageId)===r}),a=n[o];if(o!==-1)return{messages:[...n.slice(0,o),{...a,...t},...n.slice(o+1)]}}return{messages:[...n.filter(o=>o.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,conversationId:n})=>{const r=[];e({isFetching:!0});try{let i;do{const{messages:o,meta:a}=await t.listConversationMessages({conversationId:n,nextToken:i});r.push(...o),i=a.nextToken}while(i);return r.reverse().map(o=>Kn(o)).filter(Boolean)}finally{e({isFetching:!1})}}}),{name:"messagesStore"})),O1=(e,t)=>_t()(Vn(Hr(n=>({setUser:r=>n(i=>({...i,user:r})),setConversationId:r=>n(i=>({...i,conversationId:r})),clearConversationId:()=>n(r=>({...r,conversationId:void 0})),clearAll:()=>{n(r=>({...r,user:void 0,conversationId:void 0}))}}),{name:e,storage:ea(()=>t==="sessionStorage"?sessionStorage:localStorage)}))),Tn=class Tn{constructor(){}static getInstance(t="bp-webchat",n){return Tn._instances[t]||(Tn._instances[t]=O1(t,n)),Tn._instances[t]}};zi(Tn,"_instances",{});let ta=Tn;const rf=ta.getInstance,sn=_t()(Vn(e=>({eventEmitter:Xs(),messageContainerRef:_.createRef(),setMessageContainerRef:t=>e({messageContainerRef:t}),portalContainer:null,setPortalContainer:t=>e({portalContainer:t})}),{name:"webchatStore"})),D1=8,M1=e=>_t()(Hr((t,n)=>({files:[],setFiles:r=>t({files:r}),upsertFile:r=>t(({files:i})=>({files:i.some(s=>s.name===r.name)?i.map(s=>s.name===r.name?{...s,...r}:s):[...i,{...r}]})),uploadFile:async(r,i)=>{if(n().files.length===D1)return;const o=r.name.lastIndexOf("."),a=o>0&&o<r.name.length-1,s=a?r.name.substring(0,o):r.name,l=a?r.name.substring(o):"",u=Bm(s,n().files,p=>p.name),f=u+l,c=new File([r],f,{type:r.type});n().upsertFile({name:u,type:"file",instance:c,status:"loading"});try{const{fileUrl:p,type:d}=await i(c);n().upsertFile({name:u,type:d,url:p,instance:c,status:"uploaded"})}catch{n().upsertFile({name:u,type:"file",instance:c,status:"error"})}},deleteFile:r=>t(({files:i})=>({files:i.filter(o=>o.name!=r)}))}),{name:e,storage:ea(()=>sessionStorage)})),On=class On{constructor(){}static getInstance(t="bp-composer-file-store"){return On._instances[t]||(On._instances[t]=M1(t)),On._instances[t]}};zi(On,"_instances",{});let na=On;const of=na.getInstance,Gn=_t()(e=>({participants:[],setParticipants:t=>e({participants:t}),addParticipant:t=>e(n=>({participants:[...n.participants,t]})),removeParticipant:t=>e(n=>({participants:n.participants.filter(r=>r.id!==t)})),clearParticipants:()=>e({participants:[]})})),_1=e=>_t()(Vn(Hr((t,n)=>({soundOn:!0,setSoundEnabled:r=>t({soundOn:r}),toggleSound:()=>t({soundOn:!n().soundOn})}),{name:e}))),Dn=class Dn{constructor(){}static getInstance(t="webchat:soundEnabled"){return Dn._instances[t]||(Dn._instances[t]=_1(t)),Dn._instances[t]}};zi(Dn,"_instances",{});let ra=Dn;const af=ra.getInstance,P1=({text:e,buttonValue:t,variant:n,groupId:r,reusable:i,sendMessage:o,isReadOnly:a,...s})=>{const l=sn(w=>w.eventEmitter),[u,f]=_.useState(!1),[c,p]=_.useState(!1),[d,m]=_.useState(!1),{message:{blocks:{button:h}}}=ge;_.useEffect(()=>{if(r)return l.on(`button-group-${r}-click`,()=>{p(!0),i||m(!0)})},[l,r,i]);const y={...s,onClick:w=>{if((d||a)&&n==="link"){w.preventDefault();return}f(!0),i||m(!0),r&&l.emit(`button-group-${r}-click`),n!=="link"&&o&&(o==null||o({type:"text",text:e,value:t}))},"data-activated":u?"":void 0,"data-group-activated":c?"":void 0,"data-type":n,...h},v=d||a;return n==="link"?S.jsx("a",{...y,style:a?{pointerEvents:"none"}:void 0,href:t,target:"_blank",rel:"noopener noreferrer",children:e}):S.jsx("button",{...y,style:a?{pointerEvents:"none"}:void 0,disabled:v,children:e})},ia=_.createContext(null);function sf(){const e=_.useContext(ia);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const oa=_.createContext({showInputModal:void 0});function aa(){return _.useContext(oa)}const lf=_.forwardRef(({block:e,direction:t,sender:n,timestamp:r,messageId:i,feedback:o,metadata:a,isReadOnly:s,sendMessage:l,addMessageFeedback:u,...f},c)=>{const{showInputModal:p}=aa(),{message:{blocks:{bubble:{container:d,feedbackContainer:m,feedbackIcon:h}}}}=ge;return t=="incoming"?S.jsxs("div",{"data-direction":"incoming","data-feedback":!!o,...f,...d,ref:c,children:[S.jsx(Yt,{block:{...e,direction:t,timestamp:r,sender:n,messageId:i,isReadOnly:s,metadata:a,sendMessage:l}}),u&&p&&e.type==="text"&&S.jsxs("div",{...m,children:[S.jsx(X0,{...h,"data-selected":o==="positive",onClick:()=>u(i,{value:"positive"})}),S.jsx(Z0,{...h,"data-selected":o==="negative",onClick:async()=>{const g=await p({title:"Help us improve",description:"Please provide feedback to help us improve.",confirmButtonText:"Send feedback",cancelButtonText:"Cancel",Content:N1});u(i,{value:"negative",comment:g})}})]})]}):S.jsx("div",{"data-direction":"outgoing",...f,...d,ref:c,children:S.jsx(Yt,{block:{...e,direction:t,timestamp:r,sender:n,messageId:i,isReadOnly:s,metadata:a,sendMessage:l,addMessageFeedback:u}})})});lf.displayName="Bubble";const N1=({setValue:e})=>{const{modal:{dialog:{content:t}}}=ge;return S.jsx("textarea",{...t.textarea,placeholder:"Let us know what went wrong...",onChange:n=>e(n.target.value)})},uf=({className:e,...t})=>S.jsx("div",{"data-slot":"skeleton",className:`bpSkeleton ${e||""}`,...t});uf.displayName="Skeleton";var ot=function(){return ot=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},ot.apply(this,arguments)};function cf(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 ln(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(f){try{u(r.next(f))}catch(c){a(c)}}function l(f){try{u(r.throw(f))}catch(c){a(c)}}function u(f){f.done?o(f.value):i(f.value).then(s,l)}u((r=r.apply(e,t||[])).next())})}function un(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(f){return l([u,f])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(f){u=[6,f],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function ff(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function sa(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;function L1(){var e=_.useRef(!1),t=_.useCallback(function(){return e.current},[]);return _.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),t}function F1(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={loading:!1});var r=_.useRef(0),i=L1(),o=_.useState(n),a=o[0],s=o[1],l=_.useCallback(function(){for(var u=[],f=0;f<arguments.length;f++)u[f]=arguments[f];var c=++r.current;return a.loading||s(function(p){return ot(ot({},p),{loading:!0})}),e.apply(void 0,u).then(function(p){return i()&&c===r.current&&s({value:p,loading:!1}),p},function(p){return i()&&c===r.current&&s({error:p,loading:!1}),p})},t);return[a,l]}function R1(e,t){t===void 0&&(t=[]);var n=F1(e,t,{loading:!0}),r=n[0],i=n[1];return _.useEffect(function(){i()},[i]),r}const df=_.forwardRef(({url:e,type:t,orientation:n="auto",...r},i)=>{const o=_.useId(),{setIsLoading:a}=sf(),[s,l]=_.useState(n==="auto"?"square":n),[u,f]=_.useState("initial"),{message:{blocks:{image:c}}}=ge;return _.useLayoutEffect(()=>(a(p=>[...p,o]),()=>{a(p=>p.filter(d=>d!==o))}),[o,a]),R1(async()=>{if(!e)return;const p=new Image;try{const{width:d,height:m}=await cm(e);n==="auto"&&l(B1(d,m)),p.onload=()=>{f("loaded"),a(h=>h.filter(g=>g!==o))},p.onerror=()=>{f("error"),l("square"),a(h=>h.filter(g=>g!==o))},p.src=e,p.complete&&(p.naturalWidth>0?(f("loaded"),a(h=>h.filter(g=>g!==o))):(f("error"),l("square"),a(h=>h.filter(g=>g!==o))))}catch(d){console.error(d),f("error"),a(m=>m.filter(h=>h!==o))}return()=>{p.onload=null,p.onerror=null}},[e,o,a,n]),e?u==="error"?S.jsx("div",{"data-error":"true","data-orientation":s,...r,...c.image,ref:i,children:S.jsx(Nc,{size:"25%",strokeWidth:"5%"})}):u==="initial"?S.jsx(uf,{"data-orientation":s,...c.placeholder}):S.jsx("img",{"data-orientation":s,"data-loaded":u==="loaded",...r,...c.image,src:e,alt:"",ref:i}):null});df.displayName="Image";function B1(e,t){const n={square:1,portrait:.75,landscape:1.3333333333333333},r=e/t;return Object.keys(n).reduce((o,a)=>Math.abs(n[a]-r)<Math.abs(n[o]-r)?a:o)}const pf=_.forwardRef(({url:e,isReadOnly:t,...n},r)=>{const{message:{blocks:{video:i}}}=ge;return S.jsx("div",{children:S.jsx("video",{...n,"data-chromatic":"ignore",style:t?{pointerEvents:"none"}:void 0,controls:!0,src:e,...i,ref:r})})});pf.displayName="Video";const hf=_.forwardRef(({url:e,isReadOnly:t,...n},r)=>{const{message:{blocks:{audio:i}}}=ge;return S.jsx("div",{children:S.jsx("audio",{...n,controls:!0,style:t?{pointerEvents:"none"}:void 0,src:e,...i,ref:r})})});hf.displayName="Audio";const mf=_.forwardRef(({latitude:e,longitude:t,title:n,isReadOnly:r,...i},o)=>{const a=`https://www.google.com/maps/search/?api=1&query=${e},${t}`,{message:{blocks:{location:s}}}=ge;return S.jsxs("a",{...i,...s.container,style:r?{pointerEvents:"none"}:void 0,href:a,type:"_blank",rel:"noopener",ref:o,children:[S.jsx("p",{...s.title,children:n}),S.jsx(q0,{...s.icon})]})});mf.displayName="Location";const gf=_.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:i,timestamp:o,messageId:a,isReadOnly:s,sendMessage:l,...u},f)=>{const{message:{blocks:{column:c}}}=ge;return S.jsx("div",{"data-horizontal":t,"data-vertical":n,...u,...c,ref:f,children:e.map((p,d)=>S.jsx(Yt,{block:{...p,direction:r,timestamp:o,sender:i,messageId:a,isReadOnly:s,sendMessage:l}},d))})});gf.displayName="Column";const yf=_.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:i,timestamp:o,metadata:a,messageId:s,isReadOnly:l,sendMessage:u,...f},c)=>{const{message:{blocks:{row:p}}}=ge;return S.jsx("div",{"data-horizontal":t,"data-vertical":n,...f,...p,ref:c,children:e.map((d,m)=>S.jsx(Yt,{block:{...d,direction:r,timestamp:o,sender:i,messageId:s,isReadOnly:l,sendMessage:u}},m))})});yf.displayName="Row";function z1(e){return Object.prototype.toString.call(e)==="[object Object]"}function vf(e){return z1(e)||Array.isArray(e)}function $1(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function la(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const i=JSON.stringify(Object.keys(e.breakpoints||{})),o=JSON.stringify(Object.keys(t.breakpoints||{}));return i!==o?!1:n.every(a=>{const s=e[a],l=t[a];return typeof s=="function"?`${s}`==`${l}`:!vf(s)||!vf(l)?s===l:la(s,l)})}function bf(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function j1(e,t){if(e.length!==t.length)return!1;const n=bf(e),r=bf(t);return n.every((i,o)=>{const a=r[o];return la(i,a)})}function ua(e){return typeof e=="number"}function ca(e){return typeof e=="string"}function Vr(e){return typeof e=="boolean"}function wf(e){return Object.prototype.toString.call(e)==="[object Object]"}function Pe(e){return Math.abs(e)}function fa(e){return Math.sign(e)}function Qn(e,t){return Pe(e-t)}function U1(e,t){if(e===0||t===0||Pe(e)<=Pe(t))return 0;const n=Qn(Pe(e),Pe(t));return Pe(n/e)}function H1(e){return Math.round(e*100)/100}function Jn(e){return Xn(e).map(Number)}function ct(e){return e[Zn(e)]}function Zn(e){return Math.max(0,e.length-1)}function da(e,t){return t===Zn(e)}function xf(e,t=0){return Array.from(Array(e),(n,r)=>t+r)}function Xn(e){return Object.keys(e)}function kf(e,t){return[e,t].reduce((n,r)=>(Xn(r).forEach(i=>{const o=n[i],a=r[i],s=wf(o)&&wf(a);n[i]=s?kf(o,a):a}),n),{})}function pa(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function W1(e,t){const n={start:r,center:i,end:o};function r(){return 0}function i(l){return o(l)/2}function o(l){return t-l}function a(l,u){return ca(e)?n[e](l):e(t,l,u)}return{measure:a}}function er(){let e=[];function t(i,o,a,s={passive:!0}){let l;if("addEventListener"in i)i.addEventListener(o,a,s),l=()=>i.removeEventListener(o,a,s);else{const u=i;u.addListener(a),l=()=>u.removeListener(a)}return e.push(l),r}function n(){e=e.filter(i=>i())}const r={add:t,clear:n};return r}function V1(e,t,n,r){const i=er(),o=1e3/60;let a=null,s=0,l=0;function u(){i.add(e,"visibilitychange",()=>{e.hidden&&m()})}function f(){d(),i.clear()}function c(g){if(!l)return;a||(a=g,n(),n());const y=g-a;for(a=g,s+=y;s>=o;)n(),s-=o;const v=s/o;r(v),l&&(l=t.requestAnimationFrame(c))}function p(){l||(l=t.requestAnimationFrame(c))}function d(){t.cancelAnimationFrame(l),a=null,s=0,l=0}function m(){a=null,s=0}return{init:u,destroy:f,start:p,stop:d,update:n,render:r}}function q1(e,t){const n=t==="rtl",r=e==="y",i=r?"y":"x",o=r?"x":"y",a=!r&&n?-1:1,s=f(),l=c();function u(m){const{height:h,width:g}=m;return r?h:g}function f(){return r?"top":n?"right":"left"}function c(){return r?"bottom":n?"left":"right"}function p(m){return m*a}return{scroll:i,cross:o,startEdge:s,endEdge:l,measureSize:u,direction:p}}function qt(e=0,t=0){const n=Pe(e-t);function r(u){return u<e}function i(u){return u>t}function o(u){return r(u)||i(u)}function a(u){return o(u)?r(u)?e:t:u}function s(u){return n?u-n*Math.ceil((u-t)/n):u}return{length:n,max:t,min:e,constrain:a,reachedAny:o,reachedMax:i,reachedMin:r,removeOffset:s}}function Sf(e,t,n){const{constrain:r}=qt(0,e),i=e+1;let o=a(t);function a(p){return n?Pe((i+p)%i):r(p)}function s(){return o}function l(p){return o=a(p),c}function u(p){return f().set(s()+p)}function f(){return Sf(e,s(),n)}const c={get:s,set:l,add:u,clone:f};return c}function K1(e,t,n,r,i,o,a,s,l,u,f,c,p,d,m,h,g,y,v){const{cross:w,direction:A}=e,k=["INPUT","SELECT","TEXTAREA"],C={passive:!1},T=er(),P=er(),R=qt(50,225).constrain(d.measure(20)),I={mouse:300,touch:400},O={mouse:500,touch:600},j=m?43:25;let M=!1,L=0,D=0,z=!1,U=!1,$=!1,V=!1;function b(F){if(!v)return;function ne(ke){(Vr(v)||v(F,ke))&&Y(ke)}const me=t;T.add(me,"dragstart",ke=>ke.preventDefault(),C).add(me,"touchmove",()=>{},C).add(me,"touchend",()=>{}).add(me,"touchstart",ne).add(me,"mousedown",ne).add(me,"touchcancel",X).add(me,"contextmenu",X).add(me,"click",ie,!0)}function N(){T.clear(),P.clear()}function H(){const F=V?n:t;P.add(F,"touchmove",J,C).add(F,"touchend",X).add(F,"mousemove",J,C).add(F,"mouseup",X)}function x(F){const ne=F.nodeName||"";return k.includes(ne)}function W(){return(m?O:I)[V?"mouse":"touch"]}function ee(F,ne){const me=c.add(fa(F)*-1),ke=f.byDistance(F,!m).distance;return m||Pe(F)<R?ke:g&&ne?ke*.5:f.byIndex(me.get(),0).distance}function Y(F){const ne=pa(F,r);V=ne,$=m&&ne&&!F.buttons&&M,M=Qn(i.get(),a.get())>=2,!(ne&&F.button!==0)&&(x(F.target)||(z=!0,o.pointerDown(F),u.useFriction(0).useDuration(0),i.set(a),H(),L=o.readPoint(F),D=o.readPoint(F,w),p.emit("pointerDown")))}function J(F){if(!pa(F,r)&&F.touches.length>=2)return X(F);const me=o.readPoint(F),ke=o.readPoint(F,w),oe=Qn(me,L),G=Qn(ke,D);if(!U&&!V&&(!F.cancelable||(U=oe>G,!U)))return X(F);const ue=o.pointerMove(F);oe>h&&($=!0),u.useFriction(.3).useDuration(.75),s.start(),i.add(A(ue)),F.preventDefault()}function X(F){const me=f.byDistance(0,!1).index!==c.get(),ke=o.pointerUp(F)*W(),oe=ee(A(ke),me),G=U1(ke,oe),ue=j-10*G,de=y+G/50;U=!1,z=!1,P.clear(),u.useDuration(ue).useFriction(de),l.distance(oe,!m),V=!1,p.emit("pointerUp")}function ie(F){$&&(F.stopPropagation(),F.preventDefault(),$=!1)}function K(){return z}return{init:b,destroy:N,pointerDown:K}}function Y1(e,t){let r,i;function o(c){return c.timeStamp}function a(c,p){const m=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(pa(c,t)?c:c.touches[0])[m]}function s(c){return r=c,i=c,a(c)}function l(c){const p=a(c)-a(i),d=o(c)-o(r)>170;return i=c,d&&(r=c),p}function u(c){if(!r||!i)return 0;const p=a(i)-a(r),d=o(c)-o(r),m=o(c)-o(i)>170,h=p/d;return d&&!m&&Pe(h)>.1?h:0}return{pointerDown:s,pointerMove:l,pointerUp:u,readPoint:a}}function G1(){function e(n){const{offsetTop:r,offsetLeft:i,offsetWidth:o,offsetHeight:a}=n;return{top:r,right:i+o,bottom:r+a,left:i,width:o,height:a}}return{measure:e}}function Q1(e){function t(r){return e*(r/100)}return{measure:t}}function J1(e,t,n,r,i,o,a){const s=[e].concat(r);let l,u,f=[],c=!1;function p(g){return i.measureSize(a.measure(g))}function d(g){if(!o)return;u=p(e),f=r.map(p);function y(v){for(const w of v){if(c)return;const A=w.target===e,k=r.indexOf(w.target),C=A?u:f[k],T=p(A?e:r[k]);if(Pe(T-C)>=.5){g.reInit(),t.emit("resize");break}}}l=new ResizeObserver(v=>{(Vr(o)||o(g,v))&&y(v)}),n.requestAnimationFrame(()=>{s.forEach(v=>l.observe(v))})}function m(){c=!0,l&&l.disconnect()}return{init:d,destroy:m}}function Z1(e,t,n,r,i,o){let a=0,s=0,l=i,u=o,f=e.get(),c=0;function p(){const C=r.get()-e.get(),T=!l;let P=0;return T?(a=0,n.set(r),e.set(r),P=C):(n.set(e),a+=C/l,a*=u,f+=a,e.add(a),P=f-c),s=fa(P),c=f,k}function d(){const C=r.get()-t.get();return Pe(C)<.001}function m(){return l}function h(){return s}function g(){return a}function y(){return w(i)}function v(){return A(o)}function w(C){return l=C,k}function A(C){return u=C,k}const k={direction:h,duration:m,velocity:g,seek:p,settled:d,useBaseFriction:v,useBaseDuration:y,useFriction:A,useDuration:w};return k}function X1(e,t,n,r,i){const o=i.measure(10),a=i.measure(50),s=qt(.1,.99);let l=!1;function u(){return!(l||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function f(d){if(!u())return;const m=e.reachedMin(t.get())?"min":"max",h=Pe(e[m]-t.get()),g=n.get()-t.get(),y=s.constrain(h/a);n.subtract(g*y),!d&&Pe(g)<o&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function c(d){l=!d}return{shouldConstrain:u,constrain:f,toggleActive:c}}function ek(e,t,n,r,i){const o=qt(-t+e,0),a=c(),s=f(),l=p();function u(m,h){return Qn(m,h)<=1}function f(){const m=a[0],h=ct(a),g=a.lastIndexOf(m),y=a.indexOf(h)+1;return qt(g,y)}function c(){return n.map((m,h)=>{const{min:g,max:y}=o,v=o.constrain(m),w=!h,A=da(n,h);return w?y:A||u(g,v)?g:u(y,v)?y:v}).map(m=>parseFloat(m.toFixed(3)))}function p(){if(t<=e+i)return[o.max];if(r==="keepSnaps")return a;const{min:m,max:h}=s;return a.slice(m,h)}return{snapsContained:l,scrollContainLimit:s}}function tk(e,t,n){const r=t[0],i=n?r-e:ct(t);return{limit:qt(i,r)}}function nk(e,t,n,r){const o=t.min+.1,a=t.max+.1,{reachedMin:s,reachedMax:l}=qt(o,a);function u(p){return p===1?l(n.get()):p===-1?s(n.get()):!1}function f(p){if(!u(p))return;const d=e*(p*-1);r.forEach(m=>m.add(d))}return{loop:f}}function rk(e){const{max:t,length:n}=e;function r(o){const a=o-t;return n?a/-n:0}return{get:r}}function ik(e,t,n,r,i){const{startEdge:o,endEdge:a}=e,{groupSlides:s}=i,l=c().map(t.measure),u=p(),f=d();function c(){return s(r).map(h=>ct(h)[a]-h[0][o]).map(Pe)}function p(){return r.map(h=>n[o]-h[o]).map(h=>-Pe(h))}function d(){return s(u).map(h=>h[0]).map((h,g)=>h+l[g])}return{snaps:u,snapsAligned:f}}function ok(e,t,n,r,i,o){const{groupSlides:a}=i,{min:s,max:l}=r,u=f();function f(){const p=a(o),d=!e||t==="keepSnaps";return n.length===1?[o]:d?p:p.slice(s,l).map((m,h,g)=>{const y=!h,v=da(g,h);if(y){const w=ct(g[0])+1;return xf(w)}if(v){const w=Zn(o)-ct(g)[0]+1;return xf(w,ct(g)[0])}return m})}return{slideRegistry:u}}function ak(e,t,n,r,i){const{reachedAny:o,removeOffset:a,constrain:s}=r;function l(m){return m.concat().sort((h,g)=>Pe(h)-Pe(g))[0]}function u(m){const h=e?a(m):s(m),g=t.map((v,w)=>({diff:f(v-h,0),index:w})).sort((v,w)=>Pe(v.diff)-Pe(w.diff)),{index:y}=g[0];return{index:y,distance:h}}function f(m,h){const g=[m,m+n,m-n];if(!e)return m;if(!h)return l(g);const y=g.filter(v=>fa(v)===h);return y.length?l(y):ct(g)-n}function c(m,h){const g=t[m]-i.get(),y=f(g,h);return{index:m,distance:y}}function p(m,h){const g=i.get()+m,{index:y,distance:v}=u(g),w=!e&&o(g);if(!h||w)return{index:y,distance:m};const A=t[y]-v,k=m+f(A,0);return{index:y,distance:k}}return{byDistance:p,byIndex:c,shortcut:f}}function sk(e,t,n,r,i,o,a){function s(c){const p=c.distance,d=c.index!==t.get();o.add(p),p&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),d&&(n.set(t.get()),t.set(c.index),a.emit("select"))}function l(c,p){const d=i.byDistance(c,p);s(d)}function u(c,p){const d=t.clone().set(c),m=i.byIndex(d.get(),p);s(m)}return{distance:l,index:u}}function lk(e,t,n,r,i,o,a,s){const l={passive:!0,capture:!0};let u=0;function f(d){if(!s)return;function m(h){if(new Date().getTime()-u>10)return;a.emit("slideFocusStart"),e.scrollLeft=0;const v=n.findIndex(w=>w.includes(h));ua(v)&&(i.useDuration(0),r.index(v,0),a.emit("slideFocus"))}o.add(document,"keydown",c,!1),t.forEach((h,g)=>{o.add(h,"focus",y=>{(Vr(s)||s(d,y))&&m(g)},l)})}function c(d){d.code==="Tab"&&(u=new Date().getTime())}return{init:f}}function tr(e){let t=e;function n(){return t}function r(l){t=a(l)}function i(l){t+=a(l)}function o(l){t-=a(l)}function a(l){return ua(l)?l:l.get()}return{get:n,set:r,add:i,subtract:o}}function Ef(e,t){const n=e.scroll==="x"?a:s,r=t.style;let i=null,o=!1;function a(p){return`translate3d(${p}px,0px,0px)`}function s(p){return`translate3d(0px,${p}px,0px)`}function l(p){if(o)return;const d=H1(e.direction(p));d!==i&&(r.transform=n(d),i=d)}function u(p){o=!p}function f(){o||(r.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:f,to:l,toggleActive:u}}function uk(e,t,n,r,i,o,a,s,l){const f=Jn(i),c=Jn(i).reverse(),p=y().concat(v());function d(T,P){return T.reduce((R,I)=>R-i[I],P)}function m(T,P){return T.reduce((R,I)=>d(R,P)>0?R.concat([I]):R,[])}function h(T){return o.map((P,R)=>({start:P-r[R]+.5+T,end:P+t-.5+T}))}function g(T,P,R){const I=h(P);return T.map(O=>{const j=R?0:-n,M=R?n:0,L=R?"end":"start",D=I[O][L];return{index:O,loopPoint:D,slideLocation:tr(-1),translate:Ef(e,l[O]),target:()=>s.get()>D?j:M}})}function y(){const T=a[0],P=m(c,T);return g(P,n,!1)}function v(){const T=t-a[0]-1,P=m(f,T);return g(P,-n,!0)}function w(){return p.every(({index:T})=>{const P=f.filter(R=>R!==T);return d(P,t)<=.1})}function A(){p.forEach(T=>{const{target:P,translate:R,slideLocation:I}=T,O=P();O!==I.get()&&(R.to(O),I.set(O))})}function k(){p.forEach(T=>T.translate.clear())}return{canLoop:w,clear:k,loop:A,loopPoints:p}}function ck(e,t,n){let r,i=!1;function o(l){if(!n)return;function u(f){for(const c of f)if(c.type==="childList"){l.reInit(),t.emit("slidesChanged");break}}r=new MutationObserver(f=>{i||(Vr(n)||n(l,f))&&u(f)}),r.observe(e,{childList:!0})}function a(){r&&r.disconnect(),i=!0}return{init:o,destroy:a}}function fk(e,t,n,r){const i={};let o=null,a=null,s,l=!1;function u(){s=new IntersectionObserver(m=>{l||(m.forEach(h=>{const g=t.indexOf(h.target);i[g]=h}),o=null,a=null,n.emit("slidesInView"))},{root:e.parentElement,threshold:r}),t.forEach(m=>s.observe(m))}function f(){s&&s.disconnect(),l=!0}function c(m){return Xn(i).reduce((h,g)=>{const y=parseInt(g),{isIntersecting:v}=i[y];return(m&&v||!m&&!v)&&h.push(y),h},[])}function p(m=!0){if(m&&o)return o;if(!m&&a)return a;const h=c(m);return m&&(o=h),m||(a=h),h}return{init:u,destroy:f,get:p}}function dk(e,t,n,r,i,o){const{measureSize:a,startEdge:s,endEdge:l}=e,u=n[0]&&i,f=m(),c=h(),p=n.map(a),d=g();function m(){if(!u)return 0;const v=n[0];return Pe(t[s]-v[s])}function h(){if(!u)return 0;const v=o.getComputedStyle(ct(r));return parseFloat(v.getPropertyValue(`margin-${l}`))}function g(){return n.map((v,w,A)=>{const k=!w,C=da(A,w);return k?p[w]+f:C?p[w]+c:A[w+1][s]-v[s]}).map(Pe)}return{slideSizes:p,slideSizesWithGaps:d,startGap:f,endGap:c}}function pk(e,t,n,r,i,o,a,s,l){const{startEdge:u,endEdge:f,direction:c}=e,p=ua(n);function d(y,v){return Jn(y).filter(w=>w%v===0).map(w=>y.slice(w,w+v))}function m(y){return y.length?Jn(y).reduce((v,w,A)=>{const k=ct(v)||0,C=k===0,T=w===Zn(y),P=i[u]-o[k][u],R=i[u]-o[w][f],I=!r&&C?c(a):0,O=!r&&T?c(s):0,j=Pe(R-O-(P+I));return A&&j>t+l&&v.push(w),T&&v.push(y.length),v},[]).map((v,w,A)=>{const k=Math.max(A[w-1]||0);return y.slice(k,v)}):[]}function h(y){return p?d(y,n):m(y)}return{groupSlides:h}}function hk(e,t,n,r,i,o,a){const{align:s,axis:l,direction:u,startIndex:f,loop:c,duration:p,dragFree:d,dragThreshold:m,inViewThreshold:h,slidesToScroll:g,skipSnaps:y,containScroll:v,watchResize:w,watchSlides:A,watchDrag:k,watchFocus:C}=o,T=2,P=G1(),R=P.measure(t),I=n.map(P.measure),O=q1(l,u),j=O.measureSize(R),M=Q1(j),L=W1(s,j),D=!c&&!!v,z=c||!!v,{slideSizes:U,slideSizesWithGaps:$,startGap:V,endGap:b}=dk(O,R,I,n,z,i),N=pk(O,j,g,c,R,I,V,b,T),{snaps:H,snapsAligned:x}=ik(O,L,R,I,N),W=-ct(H)+ct($),{snapsContained:ee,scrollContainLimit:Y}=ek(j,W,x,v,T),J=D?ee:x,{limit:X}=tk(W,J,c),ie=Sf(Zn(J),f,c),K=ie.clone(),te=Jn(n),F=({dragHandler:pe,scrollBody:fe,scrollBounds:Ee,options:{loop:Oe}})=>{Oe||Ee.constrain(pe.pointerDown()),fe.seek()},ne=({scrollBody:pe,translate:fe,location:Ee,offsetLocation:Oe,previousLocation:st,scrollLooper:gt,slideLooper:ze,dragHandler:lt,animation:Ge,eventHandler:Bi,scrollBounds:PT,options:{loop:$h}},jh)=>{const Uh=pe.settled(),NT=!PT.shouldConstrain(),Hh=$h?Uh:Uh&&NT,Wh=Hh&&!lt.pointerDown();Wh&&Ge.stop();const LT=Ee.get()*jh+st.get()*(1-jh);Oe.set(LT),$h&&(gt.loop(pe.direction()),ze.loop()),fe.to(Oe.get()),Wh&&Bi.emit("settle"),Hh||Bi.emit("scroll")},me=V1(r,i,()=>F(le),pe=>ne(le,pe)),ke=.68,oe=J[ie.get()],G=tr(oe),ue=tr(oe),de=tr(oe),we=tr(oe),Se=Z1(G,de,ue,we,p,ke),Ue=ak(c,J,W,X,we),Ye=sk(me,ie,K,Se,Ue,we,a),Z=rk(X),se=er(),B=fk(t,n,a,h),{slideRegistry:q}=ok(D,v,J,Y,N,te),ae=lk(e,n,q,Ye,Se,se,a,C),le={ownerDocument:r,ownerWindow:i,eventHandler:a,containerRect:R,slideRects:I,animation:me,axis:O,dragHandler:K1(O,e,r,i,we,Y1(O,i),G,me,Ye,Se,Ue,ie,a,M,d,m,y,ke,k),eventStore:se,percentOfView:M,index:ie,indexPrevious:K,limit:X,location:G,offsetLocation:de,previousLocation:ue,options:o,resizeHandler:J1(t,a,i,n,O,w,P),scrollBody:Se,scrollBounds:X1(X,de,we,Se,M),scrollLooper:nk(W,X,de,[G,de,ue,we]),scrollProgress:Z,scrollSnapList:J.map(Z.get),scrollSnaps:J,scrollTarget:Ue,scrollTo:Ye,slideLooper:uk(O,j,W,U,$,H,J,de,n),slideFocus:ae,slidesHandler:ck(t,a,A),slidesInView:B,slideIndexes:te,slideRegistry:q,slidesToScroll:N,target:we,translate:Ef(O,t)};return le}function mk(){let e={},t;function n(u){t=u}function r(u){return e[u]||[]}function i(u){return r(u).forEach(f=>f(t,u)),l}function o(u,f){return e[u]=r(u).concat([f]),l}function a(u,f){return e[u]=r(u).filter(c=>c!==f),l}function s(){e={}}const l={init:n,emit:i,off:a,on:o,clear:s};return l}const gk={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function yk(e){function t(o,a){return kf(o,a||{})}function n(o){const a=o.breakpoints||{},s=Xn(a).filter(l=>e.matchMedia(l).matches).map(l=>a[l]).reduce((l,u)=>t(l,u),{});return t(o,s)}function r(o){return o.map(a=>Xn(a.breakpoints||{})).reduce((a,s)=>a.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function vk(e){let t=[];function n(o,a){return t=a.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(o,e)),a.reduce((s,l)=>Object.assign(s,{[l.name]:l}),{})}function r(){t=t.filter(o=>o.destroy())}return{init:n,destroy:r}}function qr(e,t,n){const r=e.ownerDocument,i=r.defaultView,o=yk(i),a=vk(o),s=er(),l=mk(),{mergeOptions:u,optionsAtMedia:f,optionsMediaQueries:c}=o,{on:p,off:d,emit:m}=l,h=O;let g=!1,y,v=u(gk,qr.globalOptions),w=u(v),A=[],k,C,T;function P(){const{container:te,slides:F}=w;C=(ca(te)?e.querySelector(te):te)||e.children[0];const me=ca(F)?C.querySelectorAll(F):F;T=[].slice.call(me||C.children)}function R(te){const F=hk(e,C,T,r,i,te,l);if(te.loop&&!F.slideLooper.canLoop()){const ne=Object.assign({},te,{loop:!1});return R(ne)}return F}function I(te,F){g||(v=u(v,te),w=f(v),A=F||A,P(),y=R(w),c([v,...A.map(({options:ne})=>ne)]).forEach(ne=>s.add(ne,"change",O)),w.active&&(y.translate.to(y.location.get()),y.animation.init(),y.slidesInView.init(),y.slideFocus.init(K),y.eventHandler.init(K),y.resizeHandler.init(K),y.slidesHandler.init(K),y.options.loop&&y.slideLooper.loop(),C.offsetParent&&T.length&&y.dragHandler.init(K),k=a.init(K,A)))}function O(te,F){const ne=N();j(),I(u({startIndex:ne},te),F),l.emit("reInit")}function j(){y.dragHandler.destroy(),y.eventStore.clear(),y.translate.clear(),y.slideLooper.clear(),y.resizeHandler.destroy(),y.slidesHandler.destroy(),y.slidesInView.destroy(),y.animation.destroy(),a.destroy(),s.clear()}function M(){g||(g=!0,s.clear(),j(),l.emit("destroy"),l.clear())}function L(te,F,ne){!w.active||g||(y.scrollBody.useBaseFriction().useDuration(F===!0?0:w.duration),y.scrollTo.index(te,ne||0))}function D(te){const F=y.index.add(1).get();L(F,te,-1)}function z(te){const F=y.index.add(-1).get();L(F,te,1)}function U(){return y.index.add(1).get()!==N()}function $(){return y.index.add(-1).get()!==N()}function V(){return y.scrollSnapList}function b(){return y.scrollProgress.get(y.offsetLocation.get())}function N(){return y.index.get()}function H(){return y.indexPrevious.get()}function x(){return y.slidesInView.get()}function W(){return y.slidesInView.get(!1)}function ee(){return k}function Y(){return y}function J(){return e}function X(){return C}function ie(){return T}const K={canScrollNext:U,canScrollPrev:$,containerNode:X,internalEngine:Y,destroy:M,off:d,on:p,emit:m,plugins:ee,previousScrollSnap:H,reInit:h,rootNode:J,scrollNext:D,scrollPrev:z,scrollProgress:b,scrollSnapList:V,scrollTo:L,selectedScrollSnap:N,slideNodes:ie,slidesInView:x,slidesNotInView:W};return I(t,n),setTimeout(()=>l.emit("init"),0),K}qr.globalOptions=void 0;function ha(e={},t=[]){const n=_.useRef(e),r=_.useRef(t),[i,o]=_.useState(),[a,s]=_.useState(),l=_.useCallback(()=>{i&&i.reInit(n.current,r.current)},[i]);return _.useEffect(()=>{la(n.current,e)||(n.current=e,l())},[e,l]),_.useEffect(()=>{j1(r.current,t)||(r.current=t,l())},[t,l]),_.useEffect(()=>{if($1()&&a){qr.globalOptions=ha.globalOptions;const u=qr(a,n.current,r.current);return o(u),()=>u.destroy()}else o(void 0)},[a,o]),[s,i]}ha.globalOptions=void 0;const Cf=_.forwardRef(({blocks:e,direction:t,sender:n,timestamp:r,messageId:i,isReadOnly:o,sendMessage:a},s)=>{const[l,u]=ha({skipSnaps:!0,loop:!0}),[f,c]=_.useState(!0),[p,d]=_.useState(!0),m=_.useCallback(()=>u==null?void 0:u.scrollPrev(),[u]),h=_.useCallback(()=>u==null?void 0:u.scrollNext(),[u]),{message:{blocks:{carousel:g}}}=ge,y=_.useCallback(v=>{c(!(v!=null&&v.canScrollPrev())),d(!(v!=null&&v.canScrollNext()))},[]);return _.useEffect(()=>{u&&(y(u),u.on("reInit",y),u.on("select",y))},[u,y]),S.jsxs("div",{...g==null?void 0:g.container,"data-container":"carousel",ref:l,children:[S.jsx("div",{ref:s,...g==null?void 0:g.slidesContainer,children:e.map((v,w)=>S.jsx(Yt,{block:{...v,direction:t,timestamp:r,sender:n,messageId:i,sendMessage:a,isReadOnly:o}},w))}),e.length>1&&S.jsxs(S.Fragment,{children:[S.jsx(N0,{...g==null?void 0:g.backButton,"data-disabled":f?"":void 0,onClick:m}),S.jsx(L0,{...g==null?void 0:g.nextButton,"data-disabled":p?"":void 0,onClick:h})]})]})});Cf.displayName="Carousel";const Af=Math.floor;function If(e){return Tf(e)?(e.nodeName||"").toLowerCase():"#document"}function nr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function bk(e){var t;return(t=(Tf(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Tf(e){return e instanceof Node||e instanceof nr(e).Node}function at(e){return e instanceof Element||e instanceof nr(e).Element}function cn(e){return e instanceof HTMLElement||e instanceof nr(e).HTMLElement}function ma(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof nr(e).ShadowRoot}function wk(e){return["html","body","#document"].includes(If(e))}function xk(e){return nr(e).getComputedStyle(e)}function kk(e){if(If(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ma(e)&&e.host||bk(e);return ma(t)?t.host:t}function Pt(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 Ze(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&ma(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Of(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Sk(){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 Df(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(Of())||t.test(Sk()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Mf(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 _f(){return/apple/i.test(navigator.vendor)}function Ek(){return Of().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Pf(e,t){return["mouse","pen"].includes(e)}function Ck(e){return"nativeEvent"in e}function Ak(e){return e.matches("html,body")}function ft(e){return(e==null?void 0:e.ownerDocument)||document}function ga(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 Nf(e){return"composedPath"in e?e.composedPath()[0]:e.target}const Ik="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Lf(e){return cn(e)&&e.matches(Ik)}function je(e){e.preventDefault(),e.stopPropagation()}const fn=Math.min,nt=Math.max,Kr=Math.round,Yr=Math.floor,bt=e=>({x:e,y:e});function Ff(e,t,n){return nt(e,fn(t,n))}function Gr(e,t){return typeof e=="function"?e(t):e}function rr(e){return e.split("-")[0]}function ya(e){return e.split("-")[1]}function Rf(e){return e==="x"?"y":"x"}function Tk(e){return e==="y"?"height":"width"}const Ok=new Set(["top","bottom"]);function ir(e){return Ok.has(rr(e))?"y":"x"}function Dk(e){return Rf(ir(e))}function Mk(e){return{top:0,right:0,bottom:0,left:0,...e}}function _k(e){return typeof e!="number"?Mk(e):{top:e,right:e,bottom:e,left:e}}function Qr(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}}function Bf(e,t,n){let{reference:r,floating:i}=e;const o=ir(t),a=Dk(t),s=Tk(a),l=rr(t),u=o==="y",f=r.x+r.width/2-i.width/2,c=r.y+r.height/2-i.height/2,p=r[s]/2-i[s]/2;let d;switch(l){case"top":d={x:f,y:r.y-i.height};break;case"bottom":d={x:f,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:c};break;case"left":d={x:r.x-i.width,y:c};break;default:d={x:r.x,y:r.y}}switch(ya(t)){case"start":d[a]-=p*(n&&u?-1:1);break;case"end":d[a]+=p*(n&&u?-1:1);break}return d}const Pk=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:c}=Bf(u,r,l),p=r,d={},m=0;for(let h=0;h<s.length;h++){const{name:g,fn:y}=s[h],{x:v,y:w,data:A,reset:k}=await y({x:f,y:c,initialPlacement:r,placement:p,strategy:i,middlewareData:d,rects:u,platform:a,elements:{reference:e,floating:t}});f=v??f,c=w??c,d={...d,[g]:{...d[g],...A}},k&&m<=50&&(m++,typeof k=="object"&&(k.placement&&(p=k.placement),k.rects&&(u=k.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):k.rects),{x:f,y:c}=Bf(u,p,l)),h=-1)}return{x:f,y:c,placement:p,strategy:i,middlewareData:d}};async function zf(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:c="floating",altBoundary:p=!1,padding:d=0}=Gr(t,e),m=_k(d),g=s[p?c==="floating"?"reference":"floating":c],y=Qr(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(g)))==null||n?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:f,strategy:l})),v=c==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),A=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},k=Qr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:w,strategy:l}):v);return{top:(y.top-k.top+m.top)/A.y,bottom:(k.bottom-y.bottom+m.bottom)/A.y,left:(y.left-k.left+m.left)/A.x,right:(k.right-y.right+m.right)/A.x}}const Nk=new Set(["left","top"]);async function Lk(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=rr(n),s=ya(n),l=ir(n)==="y",u=Nk.has(a)?-1:1,f=o&&l?-1:1,c=Gr(t,e);let{mainAxis:p,crossAxis:d,alignmentAxis:m}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return s&&typeof m=="number"&&(d=s==="end"?m*-1:m),l?{x:d*f,y:p*u}:{x:p*u,y:d*f}}const Fk=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:s}=t,l=await Lk(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},Rk=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:g=>{let{x:y,y:v}=g;return{x:y,y:v}}},...l}=Gr(e,t),u={x:n,y:r},f=await zf(t,l),c=ir(rr(i)),p=Rf(c);let d=u[p],m=u[c];if(o){const g=p==="y"?"top":"left",y=p==="y"?"bottom":"right",v=d+f[g],w=d-f[y];d=Ff(v,d,w)}if(a){const g=c==="y"?"top":"left",y=c==="y"?"bottom":"right",v=m+f[g],w=m-f[y];m=Ff(v,m,w)}const h=s.fn({...t,[p]:d,[c]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[p]:o,[c]:a}}}}}},Bk=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:a,elements:s}=t,{apply:l=()=>{},...u}=Gr(e,t),f=await zf(t,u),c=rr(i),p=ya(i),d=ir(i)==="y",{width:m,height:h}=o.floating;let g,y;c==="top"||c==="bottom"?(g=c,y=p===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=c,g=p==="end"?"top":"bottom");const v=h-f.top-f.bottom,w=m-f.left-f.right,A=fn(h-f[g],v),k=fn(m-f[y],w),C=!t.middlewareData.shift;let T=A,P=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=v),C&&!p){const I=nt(f.left,0),O=nt(f.right,0),j=nt(f.top,0),M=nt(f.bottom,0);d?P=m-2*(I!==0||O!==0?I+O:nt(f.left,f.right)):T=h-2*(j!==0||M!==0?j+M:nt(f.top,f.bottom))}await l({...t,availableWidth:P,availableHeight:T});const R=await a.getDimensions(s.floating);return m!==R.width||h!==R.height?{reset:{rects:!0}}:{}}}};function Jr(){return typeof window<"u"}function dn(e){return $f(e)?(e.nodeName||"").toLowerCase():"#document"}function rt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function wt(e){var t;return(t=($f(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $f(e){return Jr()?e instanceof Node||e instanceof rt(e).Node:!1}function dt(e){return Jr()?e instanceof Element||e instanceof rt(e).Element:!1}function xt(e){return Jr()?e instanceof HTMLElement||e instanceof rt(e).HTMLElement:!1}function jf(e){return!Jr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof rt(e).ShadowRoot}const zk=new Set(["inline","contents"]);function or(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=pt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!zk.has(i)}const $k=new Set(["table","td","th"]);function jk(e){return $k.has(dn(e))}const Uk=[":popover-open",":modal"];function Zr(e){return Uk.some(t=>{try{return e.matches(t)}catch{return!1}})}const Hk=["transform","translate","scale","rotate","perspective"],Wk=["transform","translate","scale","rotate","perspective","filter"],Vk=["paint","layout","strict","content"];function va(e){const t=ba(),n=dt(e)?pt(e):e;return Hk.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Wk.some(r=>(n.willChange||"").includes(r))||Vk.some(r=>(n.contain||"").includes(r))}function qk(e){let t=Nt(e);for(;xt(t)&&!pn(t);){if(va(t))return t;if(Zr(t))return null;t=Nt(t)}return null}function ba(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Kk=new Set(["html","body","#document"]);function pn(e){return Kk.has(dn(e))}function pt(e){return rt(e).getComputedStyle(e)}function Xr(e){return dt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Nt(e){if(dn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||jf(e)&&e.host||wt(e);return jf(t)?t.host:t}function Uf(e){const t=Nt(e);return pn(t)?e.ownerDocument?e.ownerDocument.body:e.body:xt(t)&&or(t)?t:Uf(t)}function Lt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Uf(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=rt(i);if(o){const s=wa(a);return t.concat(a,a.visualViewport||[],or(i)?i:[],s&&n?Lt(s):[])}return t.concat(i,Lt(i,[],n))}function wa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Hf(e){const t=pt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=xt(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=Kr(n)!==o||Kr(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function xa(e){return dt(e)?e:e.contextElement}function hn(e){const t=xa(e);if(!xt(t))return bt(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=Hf(t);let a=(o?Kr(n.width):n.width)/r,s=(o?Kr(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const Yk=bt(0);function Wf(e){const t=rt(e);return!ba()||!t.visualViewport?Yk:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Gk(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==rt(e)?!1:t}function Kt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=xa(e);let a=bt(1);t&&(r?dt(r)&&(a=hn(r)):a=hn(e));const s=Gk(o,n,r)?Wf(o):bt(0);let l=(i.left+s.x)/a.x,u=(i.top+s.y)/a.y,f=i.width/a.x,c=i.height/a.y;if(o){const p=rt(o),d=r&&dt(r)?rt(r):r;let m=p,h=wa(m);for(;h&&r&&d!==m;){const g=hn(h),y=h.getBoundingClientRect(),v=pt(h),w=y.left+(h.clientLeft+parseFloat(v.paddingLeft))*g.x,A=y.top+(h.clientTop+parseFloat(v.paddingTop))*g.y;l*=g.x,u*=g.y,f*=g.x,c*=g.y,l+=w,u+=A,m=rt(h),h=wa(m)}}return Qr({width:f,height:c,x:l,y:u})}function ei(e,t){const n=Xr(e).scrollLeft;return t?t.left+n:Kt(wt(e)).left+n}function Vf(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-ei(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function Qk(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=wt(r),s=t?Zr(t.floating):!1;if(r===a||s&&o)return n;let l={scrollLeft:0,scrollTop:0},u=bt(1);const f=bt(0),c=xt(r);if((c||!c&&!o)&&((dn(r)!=="body"||or(a))&&(l=Xr(r)),xt(r))){const d=Kt(r);u=hn(r),f.x=d.x+r.clientLeft,f.y=d.y+r.clientTop}const p=a&&!c&&!o?Vf(a,l):bt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+f.x+p.x,y:n.y*u.y-l.scrollTop*u.y+f.y+p.y}}function Jk(e){return Array.from(e.getClientRects())}function Zk(e){const t=wt(e),n=Xr(e),r=e.ownerDocument.body,i=nt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=nt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+ei(e);const s=-n.scrollTop;return pt(r).direction==="rtl"&&(a+=nt(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}const qf=25;function Xk(e,t){const n=rt(e),r=wt(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const f=ba();(!f||f&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}const u=ei(r);if(u<=0){const f=r.ownerDocument,c=f.body,p=getComputedStyle(c),d=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,m=Math.abs(r.clientWidth-c.clientWidth-d);m<=qf&&(o-=m)}else u<=qf&&(o+=u);return{width:o,height:a,x:s,y:l}}const eS=new Set(["absolute","fixed"]);function tS(e,t){const n=Kt(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=xt(e)?hn(e):bt(1),a=e.clientWidth*o.x,s=e.clientHeight*o.y,l=i*o.x,u=r*o.y;return{width:a,height:s,x:l,y:u}}function Kf(e,t,n){let r;if(t==="viewport")r=Xk(e,n);else if(t==="document")r=Zk(wt(e));else if(dt(t))r=tS(t,n);else{const i=Wf(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Qr(r)}function Yf(e,t){const n=Nt(e);return n===t||!dt(n)||pn(n)?!1:pt(n).position==="fixed"||Yf(n,t)}function nS(e,t){const n=t.get(e);if(n)return n;let r=Lt(e,[],!1).filter(s=>dt(s)&&dn(s)!=="body"),i=null;const o=pt(e).position==="fixed";let a=o?Nt(e):e;for(;dt(a)&&!pn(a);){const s=pt(a),l=va(a);!l&&s.position==="fixed"&&(i=null),(o?!l&&!i:!l&&s.position==="static"&&!!i&&eS.has(i.position)||or(a)&&!l&&Yf(e,a))?r=r.filter(f=>f!==a):i=s,a=Nt(a)}return t.set(e,r),r}function rS(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Zr(t)?[]:nS(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((u,f)=>{const c=Kf(t,f,i);return u.top=nt(c.top,u.top),u.right=fn(c.right,u.right),u.bottom=fn(c.bottom,u.bottom),u.left=nt(c.left,u.left),u},Kf(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function iS(e){const{width:t,height:n}=Hf(e);return{width:t,height:n}}function oS(e,t,n){const r=xt(t),i=wt(t),o=n==="fixed",a=Kt(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=bt(0);function u(){l.x=ei(i)}if(r||!r&&!o)if((dn(t)!=="body"||or(i))&&(s=Xr(t)),r){const d=Kt(t,!0,o,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else i&&u();o&&!r&&i&&u();const f=i&&!r&&!o?Vf(i,s):bt(0),c=a.left+s.scrollLeft-l.x-f.x,p=a.top+s.scrollTop-l.y-f.y;return{x:c,y:p,width:a.width,height:a.height}}function ka(e){return pt(e).position==="static"}function Gf(e,t){if(!xt(e)||pt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return wt(e)===n&&(n=n.ownerDocument.body),n}function Qf(e,t){const n=rt(e);if(Zr(e))return n;if(!xt(e)){let i=Nt(e);for(;i&&!pn(i);){if(dt(i)&&!ka(i))return i;i=Nt(i)}return n}let r=Gf(e,t);for(;r&&jk(r)&&ka(r);)r=Gf(r,t);return r&&pn(r)&&ka(r)&&!va(r)?n:r||qk(e)||n}const aS=async function(e){const t=this.getOffsetParent||Qf,n=this.getDimensions,r=await n(e.floating);return{reference:oS(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function sS(e){return pt(e).direction==="rtl"}const lS={convertOffsetParentRelativeRectToViewportRelativeRect:Qk,getDocumentElement:wt,getClippingRect:rS,getOffsetParent:Qf,getElementRects:aS,getClientRects:Jk,getDimensions:iS,getScale:hn,isElement:dt,isRTL:sS};function Jf(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function uS(e,t){let n=null,r;const i=wt(e);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();const u=e.getBoundingClientRect(),{left:f,top:c,width:p,height:d}=u;if(s||t(),!p||!d)return;const m=Yr(c),h=Yr(i.clientWidth-(f+p)),g=Yr(i.clientHeight-(c+d)),y=Yr(f),w={rootMargin:-m+"px "+-h+"px "+-g+"px "+-y+"px",threshold:nt(0,fn(1,l))||1};let A=!0;function k(C){const T=C[0].intersectionRatio;if(T!==l){if(!A)return a();T?a(!1,T):r=setTimeout(()=>{a(!1,1e-7)},1e3)}T===1&&!Jf(u,e.getBoundingClientRect())&&a(),A=!1}try{n=new IntersectionObserver(k,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver(k,w)}n.observe(e)}return a(!0),o}function cS(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=xa(e),f=i||o?[...u?Lt(u):[],...Lt(t)]:[];f.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const c=u&&s?uS(u,n):null;let p=-1,d=null;a&&(d=new ResizeObserver(y=>{let[v]=y;v&&v.target===u&&d&&(d.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=d)==null||w.observe(t)})),n()}),u&&!l&&d.observe(u),d.observe(t));let m,h=l?Kt(e):null;l&&g();function g(){const y=Kt(e);h&&!Jf(h,y)&&n(),h=y,m=requestAnimationFrame(g)}return n(),()=>{var y;f.forEach(v=>{i&&v.removeEventListener("scroll",n),o&&v.removeEventListener("resize",n)}),c==null||c(),(y=d)==null||y.disconnect(),d=null,l&&cancelAnimationFrame(m)}}const fS=Fk,dS=Rk,pS=Bk,hS=(e,t,n)=>{const r=new Map,i={platform:lS,...n},o={...i.platform,_c:r};return Pk(e,t,{...i,platform:o})};var mS=typeof document<"u",gS=function(){},ti=mS?_.useLayoutEffect:gS;function ni(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(!ni(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!ni(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Zf(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Xf(e,t){const n=Zf(e);return Math.round(t*n)/n}function Sa(e){const t=E.useRef(e);return ti(()=>{t.current=e}),t}function yS(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[f,c]=E.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,d]=E.useState(r);ni(p,r)||d(r);const[m,h]=E.useState(null),[g,y]=E.useState(null),v=E.useCallback($=>{$!==C.current&&(C.current=$,h($))},[]),w=E.useCallback($=>{$!==T.current&&(T.current=$,y($))},[]),A=o||m,k=a||g,C=E.useRef(null),T=E.useRef(null),P=E.useRef(f),R=l!=null,I=Sa(l),O=Sa(i),j=Sa(u),M=E.useCallback(()=>{if(!C.current||!T.current)return;const $={placement:t,strategy:n,middleware:p};O.current&&($.platform=O.current),hS(C.current,T.current,$).then(V=>{const b={...V,isPositioned:j.current!==!1};L.current&&!ni(P.current,b)&&(P.current=b,Ls.flushSync(()=>{c(b)}))})},[p,t,n,O,j]);ti(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,c($=>({...$,isPositioned:!1})))},[u]);const L=E.useRef(!1);ti(()=>(L.current=!0,()=>{L.current=!1}),[]),ti(()=>{if(A&&(C.current=A),k&&(T.current=k),A&&k){if(I.current)return I.current(A,k,M);M()}},[A,k,M,I,R]);const D=E.useMemo(()=>({reference:C,floating:T,setReference:v,setFloating:w}),[v,w]),z=E.useMemo(()=>({reference:A,floating:k}),[A,k]),U=E.useMemo(()=>{const $={position:n,left:0,top:0};if(!z.floating)return $;const V=Xf(z.floating,f.x),b=Xf(z.floating,f.y);return s?{...$,transform:"translate("+V+"px, "+b+"px)",...Zf(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:b}},[n,s,z.floating,f.x,f.y]);return E.useMemo(()=>({...f,update:M,refs:D,elements:z,floatingStyles:U}),[f,M,D,z,U])}const vS=(e,t)=>({...fS(e),options:[e,t]}),bS=(e,t)=>({...dS(e),options:[e,t]}),wS=(e,t)=>({...pS(e),options:[e,t]});/*!
|
|
276
276
|
* tabbable 6.3.0
|
|
277
277
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
278
|
-
*/var wS=["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])"],Ca=wS.join(","),td=typeof Element>"u",ar=td?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ri=!td&&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},sr=function(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),o=i===""||i==="true",a=o||n&&t&&sr(t.parentNode);return a},kS=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},SS=function(t,n,r){if(sr(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Ca));return n&&ar.call(t,Ca)&&i.unshift(t),i=i.filter(r),i},Aa=function(t,n,r){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!sr(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,u=Aa(l,!0,r);r.flatten?i.push.apply(i,u):i.push({scopeParent:a,candidates:u})}else{var f=ar.call(a,Ca);f&&r.filter(a)&&(n||!t.includes(a))&&i.push(a);var c=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!sr(c,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(c&&p){var d=Aa(c===!0?a.children:c.children,!0,r);r.flatten?i.push.apply(i,d):i.push({scopeParent:a,candidates:d})}else o.unshift.apply(o,a.children)}}return i},nd=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},rd=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||kS(t))&&!nd(t)?0:t.tabIndex},ES=function(t,n){var r=rd(t);return r<0&&n&&!nd(t)?0:r},CS=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},id=function(t){return t.tagName==="INPUT"},AS=function(t){return id(t)&&t.type==="hidden"},IS=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},TS=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},OS=function(t){if(!t.name)return!0;var n=t.form||ri(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var o=TS(i,t.form);return!o||o===t},DS=function(t){return id(t)&&t.type==="radio"},MS=function(t){return DS(t)&&!OS(t)},_S=function(t){var n,r=t&&ri(t),i=(n=r)===null||n===void 0?void 0:n.host,o=!1;if(r&&r!==t){var a,s,l;for(o=!!((a=i)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!o&&i;){var u,f,c;r=ri(i),i=(u=r)===null||u===void 0?void 0:u.host,o=!!((f=i)!==null&&f!==void 0&&(c=f.ownerDocument)!==null&&c!==void 0&&c.contains(i))}}return o},od=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},PS=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var o=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}if(getComputedStyle(t).visibility==="hidden")return!0;var a=ar.call(t,"details>summary:first-of-type"),s=a?t.parentElement:t;if(ar.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof i=="function"){for(var l=t;t;){var u=t.parentElement,f=ri(t);if(u&&!u.shadowRoot&&i(u)===!0)return od(t);t.assignedSlot?t=t.assignedSlot:!u&&f!==t.ownerDocument?t=f.host:t=u}t=l}if(_S(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return od(t);return!1},NS=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 ar.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},LS=function(t,n){return!(n.disabled||sr(n)||AS(n)||PS(n,t)||IS(n)||NS(n))},ad=function(t,n){return!(MS(n)||rd(n)<0||!LS(t,n))},FS=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},sd=function(t){var n=[],r=[];return t.forEach(function(i,o){var a=!!i.scopeParent,s=a?i.scopeParent:i,l=ES(s,a),u=a?sd(i.candidates):s;l===0?a?n.push.apply(n,u):n.push(s):r.push({documentOrder:o,tabIndex:l,item:i,isScope:a,content:u})}),r.sort(CS).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},Ia=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Aa([t],n.includeContainer,{filter:ad.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:FS}):r=SS(t,n.includeContainer,ad.bind(null,n)),sd(r)};const Ta="ArrowUp",ii="ArrowDown",mn="ArrowLeft",lr="ArrowRight";function oi(e,t,n){return Math.floor(e/t)!==n}function ur(e,t){return t<0||t>=e.current.length}function Oa(e,t){return Ve(e,{disabledIndices:t})}function ld(e,t){return Ve(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ve(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:o=1}=t===void 0?{}:t;const a=e.current;let s=n;do{var l,u;s=s+(r?-o:o)}while(s>=0&&s<=a.length-1&&(i?i.includes(s):a[s]==null||(l=a[s])!=null&&l.hasAttribute("disabled")||((u=a[s])==null?void 0:u.getAttribute("aria-disabled"))==="true"));return s}function RS(e,t){let{event:n,orientation:r,loop:i,cols:o,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:u,stopEvent:f=!1}=t,c=u;if(n.key===Ta){if(f&&je(n),u===-1)c=l;else if(c=Ve(e,{startingIndex:c,amount:o,decrement:!0,disabledIndices:a}),i&&(u-o<s||c<0)){const p=u%o,d=l%o,m=l-(d-p);d===p?c=l:c=d>p?m:m-o}ur(e,c)&&(c=u)}if(n.key===ii&&(f&&je(n),u===-1?c=s:(c=Ve(e,{startingIndex:u,amount:o,disabledIndices:a}),i&&u+o>l&&(c=Ve(e,{startingIndex:u%o-o,amount:o,disabledIndices:a}))),ur(e,c)&&(c=u)),r==="both"){const p=If(u/o);n.key===lr&&(f&&je(n),u%o!==o-1?(c=Ve(e,{startingIndex:u,disabledIndices:a}),i&&oi(c,o,p)&&(c=Ve(e,{startingIndex:u-u%o-1,disabledIndices:a}))):i&&(c=Ve(e,{startingIndex:u-u%o-1,disabledIndices:a})),oi(c,o,p)&&(c=u)),n.key===mn&&(f&&je(n),u%o!==0?(c=Ve(e,{startingIndex:u,disabledIndices:a,decrement:!0}),i&&oi(c,o,p)&&(c=Ve(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:a}))):i&&(c=Ve(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:a})),oi(c,o,p)&&(c=u));const d=If(l/o)===p;ur(e,c)&&(i&&d?c=n.key===mn?l:Ve(e,{startingIndex:u-u%o-1,disabledIndices:a}):c=u)}return c}let ud=0;function Ct(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(ud);const o=()=>e==null?void 0:e.focus({preventScroll:n});i?o():ud=requestAnimationFrame(o)}var Re=typeof document<"u"?F.useLayoutEffect:F.useEffect;function ai(){return ai=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},ai.apply(this,arguments)}let Da=!1,BS=0;const cd=()=>"floating-ui-"+BS++;function zS(){const[e,t]=E.useState(()=>Da?cd():void 0);return Re(()=>{e==null&&t(cd())},[]),E.useEffect(()=>{Da||(Da=!0)},[]),e}const Ma=E.useId||zS;function $S(){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 jS=E.createContext(null),US=E.createContext(null),fd=()=>{var e;return((e=E.useContext(jS))==null?void 0:e.id)||null},si=()=>E.useContext(US);function cr(e){return"data-floating-ui-"+e}function Ft(e){const t=F.useRef(e);return Re(()=>{t.current=e}),t}function HS(e,t){var n;let r=[],i=(n=e.find(o=>o.id===t))==null?void 0:n.parentId;for(;i;){const o=e.find(a=>a.id===i);i=o==null?void 0:o.parentId,o&&(r=r.concat(o))}return r}function gn(e,t){let n=e.filter(i=>{var o;return i.parentId===t&&((o=i.context)==null?void 0:o.open)}),r=n;for(;r.length;)r=e.filter(i=>{var o;return(o=r)==null?void 0:o.some(a=>{var s;return i.parentId===a.id&&((s=i.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function WS(e,t){let n,r=-1;function i(o,a){a>r&&(n=o,r=a),gn(e,o).forEach(l=>{i(l.id,a+1)})}return i(t,0),e.find(o=>o.id===n)}let yn=new WeakMap,li=new WeakSet,ui={},_a=0;const VS=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,dd=e=>e&&(e.host||dd(e.parentNode)),qS=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=dd(n);return e.contains(r)?r:null}).filter(n=>n!=null);function KS(e,t,n,r){const i="data-floating-ui-inert",o=r?"inert":n?"aria-hidden":null,a=qS(t,e),s=new Set,l=new Set(a),u=[];ui[i]||(ui[i]=new WeakMap);const f=ui[i];a.forEach(c),p(t),s.clear();function c(d){!d||s.has(d)||(s.add(d),d.parentNode&&c(d.parentNode))}function p(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,m=>{if(s.has(m))p(m);else{const h=o?m.getAttribute(o):null,y=h!==null&&h!=="false",g=(yn.get(m)||0)+1,v=(f.get(m)||0)+1;yn.set(m,g),f.set(m,v),u.push(m),g===1&&y&&li.add(m),v===1&&m.setAttribute(i,""),!y&&o&&m.setAttribute(o,"true")}})}return _a++,()=>{u.forEach(d=>{const m=(yn.get(d)||0)-1,h=(f.get(d)||0)-1;yn.set(d,m),f.set(d,h),m||(!li.has(d)&&o&&d.removeAttribute(o),li.delete(d)),h||d.removeAttribute(i)}),_a--,_a||(yn=new WeakMap,yn=new WeakMap,li=new WeakSet,ui={})}}function pd(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=ft(e[0]).body;return KS(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Pa=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function hd(e,t){const n=Ia(e,Pa());t==="prev"&&n.reverse();const r=n.indexOf(Pt(ft(e)));return n.slice(r+1)[0]}function md(){return hd(document.body,"next")}function gd(){return hd(document.body,"prev")}function fr(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ze(n,r)}function YS(e){Ia(e,Pa()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function GS(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 Na={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 QS;function yd(e){e.key==="Tab"&&(e.target,clearTimeout(QS))}const ci=E.forwardRef(function(t,n){const[r,i]=E.useState();Re(()=>(Pf()&&i("button"),document.addEventListener("keydown",yd),()=>{document.removeEventListener("keydown",yd)}),[]);const o={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[cr("focus-guard")]:"",style:Na};return E.createElement("span",ai({},t,o))}),vd=E.createContext(null);function JS(e){let{id:t,root:n}=e===void 0?{}:e;const[r,i]=E.useState(null),o=Ma(),a=bd(),s=E.useMemo(()=>({id:t,root:n,portalContext:a,uniqueId:o}),[t,n,a,o]),l=E.useRef();return Re(()=>()=>{r==null||r.remove()},[r,s]),Re(()=>{if(l.current===s)return;l.current=s;const{id:u,root:f,portalContext:c,uniqueId:p}=s,d=u?document.getElementById(u):null,m=cr("portal");if(d){const h=document.createElement("div");h.id=p,h.setAttribute(m,""),d.appendChild(h),i(h)}else{let h=f||(c==null?void 0:c.portalNode);h&&!at(h)&&(h=h.current),h=h||document.body;let y=null;u&&(y=document.createElement("div"),y.id=u,h.appendChild(y));const g=document.createElement("div");g.id=p,g.setAttribute(m,""),h=y||h,h.appendChild(g),i(g)}},[s]),r}function ZS(e){let{children:t,id:n,root:r=null,preserveTabOrder:i=!0}=e;const o=JS({id:n,root:r}),[a,s]=E.useState(null),l=E.useRef(null),u=E.useRef(null),f=E.useRef(null),c=E.useRef(null),p=!!a&&!a.modal&&a.open&&i&&!!(r||o);return E.useEffect(()=>{if(!o||!i||a!=null&&a.modal)return;function d(m){o&&fr(m)&&(m.type==="focusin"?GS:YS)(o)}return o.addEventListener("focusin",d,!0),o.addEventListener("focusout",d,!0),()=>{o.removeEventListener("focusin",d,!0),o.removeEventListener("focusout",d,!0)}},[o,i,a==null?void 0:a.modal]),E.createElement(vd.Provider,{value:E.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:f,afterInsideRef:c,portalNode:o,setFocusManagerState:s}),[i,o])},p&&o&&E.createElement(ci,{"data-type":"outside",ref:l,onFocus:d=>{if(fr(d,o)){var m;(m=f.current)==null||m.focus()}else{const h=gd()||(a==null?void 0:a.refs.domReference.current);h==null||h.focus()}}}),p&&o&&E.createElement("span",{"aria-owns":o.id,style:Na}),o&&Ns.createPortal(t,o),p&&o&&E.createElement(ci,{"data-type":"outside",ref:u,onFocus:d=>{if(fr(d,o)){var m;(m=c.current)==null||m.focus()}else{const h=md()||(a==null?void 0:a.refs.domReference.current);h==null||h.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,d.nativeEvent))}}}))}const bd=()=>E.useContext(vd),XS=E.forwardRef(function(t,n){return E.createElement("button",ai({},t,{type:"button",ref:n,tabIndex:-1,style:Na}))});function eE(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],guards:o=!0,initialFocus:a=0,returnFocus:s=!0,modal:l=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:f=!0}=e,{open:c,refs:p,nodeId:d,onOpenChange:m,events:h,dataRef:y,elements:{domReference:g,floating:v}}=t,x=VS()?o:!0,A=Ft(i),k=Ft(a),C=Ft(s),T=si(),M=bd(),R=typeof a=="number"&&a<0,I=E.useRef(null),O=E.useRef(null),j=E.useRef(!1),_=E.useRef(null),N=E.useRef(!1),D=M!=null,z=g&&g.getAttribute("role")==="combobox"&&Ff(g)&&R,U=E.useCallback(function(P){return P===void 0&&(P=v),P?Ia(P,Pa()):[]},[v]),$=E.useCallback(P=>{const H=U(P);return A.current.map(w=>g&&w==="reference"?g:v&&w==="floating"?v:H).filter(Boolean).flat()},[g,v,A,U]);E.useEffect(()=>{if(r||!l)return;function P(w){if(w.key==="Tab"){Ze(v,Pt(ft(v)))&&U().length===0&&!z&&je(w);const W=$(),X=Lf(w);A.current[0]==="reference"&&X===g&&(je(w),w.shiftKey?Ct(W[W.length-1]):Ct(W[1])),A.current[1]==="floating"&&X===v&&w.shiftKey&&(je(w),Ct(W[0]))}}const H=ft(v);return H.addEventListener("keydown",P),()=>{H.removeEventListener("keydown",P)}},[r,g,v,l,A,p,z,U,$]),E.useEffect(()=>{if(r||!f)return;function P(){N.current=!0,setTimeout(()=>{N.current=!1})}function H(w){const W=w.relatedTarget;queueMicrotask(()=>{const X=!(Ze(g,W)||Ze(v,W)||Ze(W,v)||Ze(M==null?void 0:M.portalNode,W)||W!=null&&W.hasAttribute(cr("focus-guard"))||T&&(gn(T.nodesRef.current,d).find(Y=>{var J,ee;return Ze((J=Y.context)==null?void 0:J.elements.floating,W)||Ze((ee=Y.context)==null?void 0:ee.elements.domReference,W)})||HS(T.nodesRef.current,d).find(Y=>{var J,ee;return((J=Y.context)==null?void 0:J.elements.floating)===W||((ee=Y.context)==null?void 0:ee.elements.domReference)===W})));W&&X&&!N.current&&W!==_.current&&(j.current=!0,m(!1,w))})}if(v&&cn(g))return g.addEventListener("focusout",H),g.addEventListener("pointerdown",P),!l&&v.addEventListener("focusout",H),()=>{g.removeEventListener("focusout",H),g.removeEventListener("pointerdown",P),!l&&v.removeEventListener("focusout",H)}},[r,g,v,l,d,T,M,m,f]),E.useEffect(()=>{var P;if(r)return;const H=Array.from((M==null||(P=M.portalNode)==null?void 0:P.querySelectorAll("["+cr("portal")+"]"))||[]);if(v){const w=[v,...H,I.current,O.current,A.current.includes("reference")||z?g:null].filter(X=>X!=null),W=l?pd(w,x,!x):pd(w);return()=>{W()}}},[r,g,v,l,A,M,z,x]),Re(()=>{if(r||!v)return;const P=ft(v),H=Pt(P);queueMicrotask(()=>{const w=$(v),W=k.current,X=(typeof W=="number"?w[W]:W.current)||v,Y=Ze(v,H);!R&&!Y&&c&&Ct(X,{preventScroll:X===v})})},[r,c,v,R,$,k]),Re(()=>{if(r||!v)return;let P=!1;const H=ft(v),w=Pt(H),W=y.current;_.current=w;function X(Y){if(Y.type==="escapeKey"&&p.domReference.current&&(_.current=p.domReference.current),["referencePress","escapeKey"].includes(Y.type))return;const J=Y.data.returnFocus;typeof J=="object"?(j.current=!1,P=J.preventScroll):j.current=!J}return h.on("dismiss",X),()=>{h.off("dismiss",X);const Y=Pt(H);(Ze(v,Y)||T&&gn(T.nodesRef.current,d).some(ee=>{var ie;return Ze((ie=ee.context)==null?void 0:ie.elements.floating,Y)})||W.openEvent&&["click","mousedown"].includes(W.openEvent.type))&&p.domReference.current&&(_.current=p.domReference.current),C.current&&cn(_.current)&&!j.current&&Ct(_.current,{cancelPrevious:!1,preventScroll:P})}},[r,v,C,y,p,h,T,d]),Re(()=>{if(!(r||!M))return M.setFocusManagerState({modal:l,closeOnFocusOut:f,open:c,onOpenChange:m,refs:p}),()=>{M.setFocusManagerState(null)}},[r,M,l,c,m,p,f]),Re(()=>{if(!r&&v&&typeof MutationObserver=="function"&&!R){const P=()=>{const w=v.getAttribute("tabindex");A.current.includes("floating")||Pt(ft(v))!==p.domReference.current&&U().length===0?w!=="0"&&v.setAttribute("tabindex","0"):w!=="-1"&&v.setAttribute("tabindex","-1")};P();const H=new MutationObserver(P);return H.observe(v,{childList:!0,subtree:!0,attributes:!0}),()=>{H.disconnect()}}},[r,v,p,A,U,R]);function V(P){return r||!u||!l?null:E.createElement(XS,{ref:P==="start"?I:O,onClick:H=>m(!1,H.nativeEvent)},typeof u=="string"?u:"Dismiss")}const b=!r&&x&&!z&&(D||l);return E.createElement(E.Fragment,null,b&&E.createElement(ci,{"data-type":"inside",ref:M==null?void 0:M.beforeInsideRef,onFocus:P=>{if(l){const w=$();Ct(i[0]==="reference"?w[0]:w[w.length-1])}else if(M!=null&&M.preserveTabOrder&&M.portalNode)if(j.current=!1,fr(P,M.portalNode)){const w=md()||g;w==null||w.focus()}else{var H;(H=M.beforeOutsideRef.current)==null||H.focus()}}}),!z&&V("start"),n,V("end"),b&&E.createElement(ci,{"data-type":"inside",ref:M==null?void 0:M.afterInsideRef,onFocus:P=>{if(l)Ct($()[0]);else if(M!=null&&M.preserveTabOrder&&M.portalNode)if(f&&(j.current=!0),fr(P,M.portalNode)){const w=gd()||g;w==null||w.focus()}else{var H;(H=M.afterOutsideRef.current)==null||H.focus()}}}))}function xd(e){return cn(e.target)&&e.target.tagName==="BUTTON"}function wd(e){return Ff(e)}function tE(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:o}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:u=!1,keyboardHandlers:f=!0}=t,c=E.useRef(),p=E.useRef(!1);return E.useMemo(()=>a?{reference:{onPointerDown(d){c.current=d.pointerType},onMouseDown(d){d.button===0&&(Nf(c.current)&&u||s!=="click"&&(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")?r(!1,d.nativeEvent):(d.preventDefault(),r(!0,d.nativeEvent))))},onClick(d){if(s==="mousedown"&&c.current){c.current=void 0;return}Nf(c.current)&&u||(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="click")?r(!1,d.nativeEvent):r(!0,d.nativeEvent))},onKeyDown(d){c.current=void 0,!(d.defaultPrevented||!f||xd(d))&&(d.key===" "&&!wd(o)&&(d.preventDefault(),p.current=!0),d.key==="Enter"&&r(!(n&&l),d.nativeEvent))},onKeyUp(d){d.defaultPrevented||!f||xd(d)||wd(o)||d.key===" "&&p.current&&(p.current=!1,r(!(n&&l),d.nativeEvent))}}}:{},[a,i,s,u,f,o,l,n,r])}const nE=E.useInsertionEffect||(e=>e());function Rt(e){const t=E.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return nE(()=>{t.current=e}),E.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}const rE={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},iE={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},oE=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 aE(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:i,nodeId:o,elements:{reference:a,domReference:s,floating:l},dataRef:u}=e,{enabled:f=!0,escapeKey:c=!0,outsidePress:p=!0,outsidePressEvent:d="pointerdown",referencePress:m=!1,referencePressEvent:h="pointerdown",ancestorScroll:y=!1,bubbles:g}=t,v=si(),x=fd()!=null,A=Rt(typeof p=="function"?p:()=>!1),k=typeof p=="function"?A:p,C=E.useRef(!1),{escapeKeyBubbles:T,outsidePressBubbles:M}=oE(g),R=Rt(O=>{if(!n||!f||!c||O.key!=="Escape")return;const j=v?gn(v.nodesRef.current,o):[];if(!T&&(O.stopPropagation(),j.length>0)){let _=!0;if(j.forEach(N=>{var D;if((D=N.context)!=null&&D.open&&!N.context.dataRef.current.__escapeKeyBubbles){_=!1;return}}),!_)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,Ck(O)?O.nativeEvent:O)}),I=Rt(O=>{const j=C.current;if(C.current=!1,j||typeof k=="function"&&!k(O))return;const _=Lf(O),N="["+cr("inert")+"]",D=ft(l).querySelectorAll(N);let z=at(_)?_:null;for(;z&&!xk(z);){const V=kk(z);if(V===ft(l).body||!at(V))break;z=V}if(D.length&&at(_)&&!Ak(_)&&!Ze(_,l)&&Array.from(D).every(V=>!Ze(z,V)))return;if(cn(_)&&l){const V=_.clientWidth>0&&_.scrollWidth>_.clientWidth,b=_.clientHeight>0&&_.scrollHeight>_.clientHeight;let P=b&&O.offsetX>_.clientWidth;if(b&&wk(_).direction==="rtl"&&(P=O.offsetX<=_.offsetWidth-_.clientWidth),P||V&&O.offsetY>_.clientHeight)return}const U=v&&gn(v.nodesRef.current,o).some(V=>{var b;return ya(O,(b=V.context)==null?void 0:b.elements.floating)});if(ya(O,l)||ya(O,s)||U)return;const $=v?gn(v.nodesRef.current,o):[];if($.length>0){let V=!0;if($.forEach(b=>{var P;if((P=b.context)!=null&&P.open&&!b.context.dataRef.current.__outsidePressBubbles){V=!1;return}}),!V)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:x?{preventScroll:!0}:Mf(O)||_f(O)}}),r(!1,O)});return E.useEffect(()=>{if(!n||!f)return;u.current.__escapeKeyBubbles=T,u.current.__outsidePressBubbles=M;function O(N){r(!1,N)}const j=ft(l);c&&j.addEventListener("keydown",R),k&&j.addEventListener(d,I);let _=[];return y&&(at(s)&&(_=Lt(s)),at(l)&&(_=_.concat(Lt(l))),!at(a)&&a&&a.contextElement&&(_=_.concat(Lt(a.contextElement)))),_=_.filter(N=>{var D;return N!==((D=j.defaultView)==null?void 0:D.visualViewport)}),_.forEach(N=>{N.addEventListener("scroll",O,{passive:!0})}),()=>{c&&j.removeEventListener("keydown",R),k&&j.removeEventListener(d,I),_.forEach(N=>{N.removeEventListener("scroll",O)})}},[u,l,s,a,c,k,d,n,r,y,f,T,M,R,I]),E.useEffect(()=>{C.current=!1},[k,d]),E.useMemo(()=>f?{reference:{onKeyDown:R,[rE[h]]:O=>{m&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,O.nativeEvent))}},floating:{onKeyDown:R,[iE[d]]:()=>{C.current=!0}}}:{},[f,i,m,d,h,r,R])}let La;process.env.NODE_ENV!=="production"&&(La=new Set);function sE(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:i}=e;if(process.env.NODE_ENV!=="production"){var o;const T="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if((o=e.elements)!=null&&o.reference&&!at(e.elements.reference)){var a;if(!((a=La)!=null&&a.has(T))){var s;(s=La)==null||s.add(T),console.error(T)}}}const[l,u]=E.useState(null),f=((t=e.elements)==null?void 0:t.reference)||l,c=yS(e),p=si(),d=Rt((T,M)=>{T&&(h.current.openEvent=M),r==null||r(T,M)}),m=E.useRef(null),h=E.useRef({}),y=E.useState(()=>$S())[0],g=Ma(),v=E.useCallback(T=>{const M=at(T)?{getBoundingClientRect:()=>T.getBoundingClientRect(),contextElement:T}:T;c.refs.setReference(M)},[c.refs]),x=E.useCallback(T=>{(at(T)||T===null)&&(m.current=T,u(T)),(at(c.refs.reference.current)||c.refs.reference.current===null||T!==null&&!at(T))&&c.refs.setReference(T)},[c.refs]),A=E.useMemo(()=>({...c.refs,setReference:x,setPositionReference:v,domReference:m}),[c.refs,x,v]),k=E.useMemo(()=>({...c.elements,domReference:f}),[c.elements,f]),C=E.useMemo(()=>({...c,refs:A,elements:k,dataRef:h,nodeId:i,floatingId:g,events:y,open:n,onOpenChange:d}),[c,i,g,y,n,d,A,k]);return Re(()=>{const T=p==null?void 0:p.nodesRef.current.find(M=>M.id===i);T&&(T.context=C)}),E.useMemo(()=>({...c,context:C,refs:A,elements:k}),[c,A,k,C])}function Fa(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(i=>i?i[n]:null).concat(e).reduce((i,o)=>(o&&Object.entries(o).forEach(a=>{let[s,l]=a;if(s.indexOf("on")===0){if(r.has(s)||r.set(s,[]),typeof l=="function"){var u;(u=r.get(s))==null||u.push(l),i[s]=function(){for(var f,c=arguments.length,p=new Array(c),d=0;d<c;d++)p[d]=arguments[d];return(f=r.get(s))==null?void 0:f.map(m=>m(...p)).find(m=>m!==void 0)}}}else i[s]=l}),i),{})}}function lE(e){e===void 0&&(e=[]);const t=e,n=E.useCallback(o=>Fa(o,e,"reference"),t),r=E.useCallback(o=>Fa(o,e,"floating"),t),i=E.useCallback(o=>Fa(o,e,"item"),e.map(o=>o==null?void 0:o.item));return E.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])}let kd=!1;function fi(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Sd(e,t){return fi(t,e===Ta||e===ii,e===mn||e===lr)}function Ra(e,t,n){return fi(t,e===ii,n?e===mn:e===lr)||e==="Enter"||e==" "||e===""}function uE(e,t,n){return fi(t,n?e===mn:e===lr,e===ii)}function Ed(e,t,n){return fi(t,n?e===lr:e===mn,e===Ta)}function cE(e,t){const{open:n,onOpenChange:r,refs:i,elements:{domReference:o,floating:a}}=e,{listRef:s,activeIndex:l,onNavigate:u=()=>{},enabled:f=!0,selectedIndex:c=null,allowEscape:p=!1,loop:d=!1,nested:m=!1,rtl:h=!1,virtual:y=!1,focusItemOnOpen:g="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:x=!0,disabledIndices:A=void 0,orientation:k="vertical",cols:C=1,scrollItemIntoView:T=!0,virtualItemRef:M}=t;process.env.NODE_ENV!=="production"&&(p&&(d||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(" "))),k==="vertical"&&C>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const R=fd(),I=si(),O=Rt(u),j=E.useRef(g),_=E.useRef(c??-1),N=E.useRef(null),D=E.useRef(!0),z=E.useRef(O),U=E.useRef(!!a),$=E.useRef(!1),V=E.useRef(!1),b=Ft(A),P=Ft(n),H=Ft(T),[w,W]=E.useState(),[X,Y]=E.useState(),J=Rt(function(K,te,L){L===void 0&&(L=!1);const ne=K.current[te.current];ne&&(y?(W(ne.id),I==null||I.events.emit("virtualfocus",ne),M&&(M.current=ne)):Ct(ne,{preventScroll:!0,sync:Ek()&&Pf()?kd||$.current:!1}),requestAnimationFrame(()=>{const me=H.current;me&&ne&&(L||!D.current)&&(ne.scrollIntoView==null||ne.scrollIntoView(typeof me=="boolean"?{block:"nearest",inline:"nearest"}:me))}))});Re(()=>{document.createElement("div").focus({get preventScroll(){return kd=!0,!1}})},[]),Re(()=>{f&&(n&&a?j.current&&c!=null&&(V.current=!0,O(c)):U.current&&(_.current=-1,z.current(null)))},[f,n,a,c,O]),Re(()=>{if(f&&n&&a)if(l==null){if($.current=!1,c!=null)return;if(U.current&&(_.current=-1,J(s,_)),!U.current&&j.current&&(N.current!=null||j.current===!0&&N.current==null)){let K=0;const te=()=>{s.current[0]==null?(K<2&&(K?requestAnimationFrame:queueMicrotask)(te),K++):(_.current=N.current==null||Ra(N.current,k,h)||m?Oa(s,b.current):ld(s,b.current),N.current=null,O(_.current))};te()}}else ur(s,l)||(_.current=l,J(s,_,V.current),V.current=!1)},[f,n,a,l,c,m,s,k,h,O,J,b]),Re(()=>{var K,te;if(!f||a||!I||y||!U.current)return;const L=I.nodesRef.current,ne=(K=L.find(oe=>oe.id===R))==null||(te=K.context)==null?void 0:te.elements.floating,me=Pt(ft(a)),ke=L.some(oe=>oe.context&&Ze(oe.context.elements.floating,me));ne&&!ke&&D.current&&ne.focus({preventScroll:!0})},[f,a,I,R,y]),Re(()=>{if(!f||!I||!y||R)return;function K(te){Y(te.id),M&&(M.current=te)}return I.events.on("virtualfocus",K),()=>{I.events.off("virtualfocus",K)}},[f,I,y,R,M]),Re(()=>{z.current=O,U.current=!!a}),Re(()=>{n||(N.current=null)},[n]);const ee=l!=null,ie=E.useMemo(()=>{function K(L){if(!n)return;const ne=s.current.indexOf(L);ne!==-1&&O(ne)}return{onFocus(L){let{currentTarget:ne}=L;K(ne)},onClick:L=>{let{currentTarget:ne}=L;return ne.focus({preventScroll:!0})},...v&&{onMouseMove(L){let{currentTarget:ne}=L;K(ne)},onPointerLeave(L){let{pointerType:ne}=L;!D.current||ne==="touch"||(_.current=-1,J(s,_),O(null),y||Ct(i.floating.current,{preventScroll:!0}))}}}},[n,i,J,v,s,O,y]);return E.useMemo(()=>{if(!f)return{};const K=b.current;function te(oe){if(D.current=!1,$.current=!0,!P.current&&oe.currentTarget===i.floating.current)return;if(m&&Ed(oe.key,k,h)){je(oe),r(!1,oe.nativeEvent),cn(o)&&!y&&o.focus();return}const G=_.current,ue=Oa(s,K),de=ld(s,K);if(oe.key==="Home"&&(je(oe),_.current=ue,O(_.current)),oe.key==="End"&&(je(oe),_.current=de,O(_.current)),!(C>1&&(_.current=RS(s,{event:oe,orientation:k,loop:d,cols:C,disabledIndices:K,minIndex:ue,maxIndex:de,prevIndex:_.current,stopEvent:!0}),O(_.current),k==="both"))&&Sd(oe.key,k)){if(je(oe),n&&!y&&Pt(oe.currentTarget.ownerDocument)===oe.currentTarget){_.current=Ra(oe.key,k,h)?ue:de,O(_.current);return}Ra(oe.key,k,h)?d?_.current=G>=de?p&&G!==s.current.length?-1:ue:Ve(s,{startingIndex:G,disabledIndices:K}):_.current=Math.min(de,Ve(s,{startingIndex:G,disabledIndices:K})):d?_.current=G<=ue?p&&G!==-1?s.current.length:de:Ve(s,{startingIndex:G,decrement:!0,disabledIndices:K}):_.current=Math.max(ue,Ve(s,{startingIndex:G,decrement:!0,disabledIndices:K})),ur(s,_.current)?O(null):O(_.current)}}function L(oe){g==="auto"&&Mf(oe.nativeEvent)&&(j.current=!0)}function ne(oe){j.current=g,g==="auto"&&_f(oe.nativeEvent)&&(j.current=!0)}const me=y&&n&&ee&&{"aria-activedescendant":X||w},ke=s.current.find(oe=>(oe==null?void 0:oe.id)===w);return{reference:{...me,onKeyDown(oe){D.current=!1;const G=oe.key.indexOf("Arrow")===0,ue=uE(oe.key,k,h),de=Ed(oe.key,k,h),xe=Sd(oe.key,k),Se=(m?ue:xe)||oe.key==="Enter"||oe.key.trim()==="";if(y&&n){const se=I==null?void 0:I.nodesRef.current.find(q=>q.parentId==null),B=I&&se?WS(I.nodesRef.current,se.id):null;if(G&&B&&M){const q=new KeyboardEvent("keydown",{key:oe.key,bubbles:!0});if(ue||de){var Ue,Ye;const ae=((Ue=B.context)==null?void 0:Ue.elements.domReference)===oe.currentTarget,le=de&&!ae?(Ye=B.context)==null?void 0:Ye.elements.domReference:ue?ke:null;le&&(je(oe),le.dispatchEvent(q),Y(void 0))}if(xe&&B.context&&B.context.open&&B.parentId&&oe.currentTarget!==B.context.elements.domReference){var Z;je(oe),(Z=B.context.elements.domReference)==null||Z.dispatchEvent(q);return}}return te(oe)}if(!(!n&&!x&&G)){if(Se&&(N.current=m&&xe?null:oe.key),m){ue&&(je(oe),n?(_.current=Oa(s,K),O(_.current)):r(!0,oe.nativeEvent));return}xe&&(c!=null&&(_.current=c),je(oe),!n&&x?r(!0,oe.nativeEvent):te(oe),n&&O(_.current))}},onFocus(){n&&O(null)},onPointerDown:ne,onMouseDown:L,onClick:L},floating:{"aria-orientation":k==="both"?void 0:k,...me,onKeyDown:te,onPointerMove(){D.current=!0}},item:ie}},[o,i,w,X,b,P,s,f,k,h,y,n,ee,m,c,x,p,C,d,g,O,r,ie,I,M])}function fE(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:i=!0,role:o="dialog"}=t,a=Ma();return E.useMemo(()=>{const s={id:r,role:o};return i?o==="tooltip"?{reference:{"aria-describedby":n?r:void 0},floating:s}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":o==="alertdialog"?"dialog":o,"aria-controls":n?r:void 0,...o==="listbox"&&{role:"combobox"},...o==="menu"&&{id:a}},floating:{...s,...o==="menu"&&{"aria-labelledby":a}}}:{}},[i,o,n,r,a])}function dE(e,t){var n;const{open:r,dataRef:i}=e,{listRef:o,activeIndex:a,onMatch:s,onTypingChange:l,enabled:u=!0,findMatch:f=null,resetMs:c=750,ignoreKeys:p=[],selectedIndex:d=null}=t,m=E.useRef(),h=E.useRef(""),y=E.useRef((n=d??a)!=null?n:-1),g=E.useRef(null),v=Rt(s),x=Rt(l),A=Ft(f),k=Ft(p);return Re(()=>{r&&(clearTimeout(m.current),g.current=null,h.current="")},[r]),Re(()=>{if(r&&h.current===""){var C;y.current=(C=d??a)!=null?C:-1}},[r,d,a]),E.useMemo(()=>{if(!u)return{};function C(R){R?i.current.typing||(i.current.typing=R,x(R)):i.current.typing&&(i.current.typing=R,x(R))}function T(R,I,O){const j=A.current?A.current(I,O):I.find(_=>(_==null?void 0:_.toLocaleLowerCase().indexOf(O.toLocaleLowerCase()))===0);return j?R.indexOf(j):-1}function M(R){const I=o.current;if(h.current.length>0&&h.current[0]!==" "&&(T(I,I,h.current)===-1?C(!1):R.key===" "&&je(R)),I==null||k.current.includes(R.key)||R.key.length!==1||R.ctrlKey||R.metaKey||R.altKey)return;r&&R.key!==" "&&(je(R),C(!0)),I.every(N=>{var D,z;return N?((D=N[0])==null?void 0:D.toLocaleLowerCase())!==((z=N[1])==null?void 0:z.toLocaleLowerCase()):!0})&&h.current===R.key&&(h.current="",y.current=g.current),h.current+=R.key,clearTimeout(m.current),m.current=setTimeout(()=>{h.current="",y.current=g.current,C(!1)},c);const j=y.current,_=T(I,[...I.slice((j||0)+1),...I.slice(0,(j||0)+1)],h.current);_!==-1?(v(_),g.current=_):R.key!==" "&&(h.current="",C(!1))}return{reference:{onKeyDown:M},floating:{onKeyDown:M,onKeyUp(R){R.key===" "&&C(!1)}}}},[u,r,i,o,c,k,A,v,x])}const pE=({options:e,reusable:t,sendMessage:n,isReadOnly:r})=>{var D,z,U,$,V;const i=sn(b=>b.messageContainerRef),o=sn(b=>b.portalContainer),[a,s]=E.useState(!1),[l,u]=E.useState(null),[f,c]=E.useState(null),{message:{blocks:{dropdown:p}}}=ge,d=e.reduce((b,P)=>(b[P.label]=P.value,b),{}),m=d?Object.keys(d):[],h=b=>{s(f!==null&&!t?!1:b)},{refs:y,floatingStyles:g,context:v}=sE({placement:"bottom-start",open:a,onOpenChange:h,whileElementsMounted:cS,middleware:[vS(5),bS({padding:10,boundary:(i==null?void 0:i.current)??void 0,crossAxis:!0}),xS({apply({rects:b,elements:P,availableHeight:H}){Object.assign(P.floating.style,{maxHeight:`${H}px`,minWidth:`${b.reference.width}px`})},padding:10})]}),x=E.useRef([]),A=E.useRef(m),k=E.useRef(!1),C=tE(v,{event:"mousedown"}),T=aE(v),M=fE(v,{role:"listbox"}),R=cE(v,{listRef:x,activeIndex:l,selectedIndex:f,onNavigate:u,loop:!0}),I=dE(v,{listRef:A,activeIndex:l,selectedIndex:f,onMatch:a?u:c,onTypingChange(b){k.current=b}}),{getReferenceProps:O,getFloatingProps:j,getItemProps:_}=lE([T,M,R,I,C]),N=b=>{c(b),m[b]!==void 0&&(n==null||n({type:"text",text:m[b]??"",value:d[m[b]]??""})),s(!1)};return S.jsxs(S.Fragment,{children:[S.jsxs("div",{tabIndex:0,ref:y.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":f!==null&&!t?"":void 0,style:r?{pointerEvents:"none"}:void 0,...(D=p.button)==null?void 0:D.container,...O(),children:[S.jsx("span",{...(z=p.button)==null?void 0:z.text,children:f?m[f]:"Select..."}),S.jsx(eg,{...(U=p.button)==null?void 0:U.icon})]}),a&&S.jsx(ZS,{root:o??void 0,children:S.jsx(eE,{context:v,modal:!1,children:S.jsx("div",{ref:y.setFloating,className:(V=($=p.content)==null?void 0:$.container)==null?void 0:V.className,style:{...g,pointerEvents:"auto"},...j(),children:m.map((b,P)=>{var H;return S.jsx("div",{ref:w=>{x.current[P]=w},role:"option",tabIndex:P===l?0:-1,"aria-selected":P===f&&P===l,"data-active":P===l?"":void 0,...(H=p.content)==null?void 0:H.item,..._({onClick(){N(P)},onKeyDown(w){w.key==="Enter"&&(w.preventDefault(),N(P)),w.key===" "&&!k.current&&(w.preventDefault(),N(P))}}),children:b},b)})})})})]})},Cd=({ref:e,title:t,url:n,isReadOnly:r,...i})=>{const{message:{blocks:{file:o}}}=ge;return S.jsxs("a",{...i,...o.container,href:n,style:r?{pointerEvents:"none"}:void 0,download:!0,ref:e,target:"_blank",rel:"noreferrer",children:[S.jsx("p",{...o.title,children:t||n}),S.jsx(ag,{...o.icon})]})};Cd.displayName="File";const hE=_t()((e,t)=>({components:{},getCustomComponent:async n=>{const r=t().components[n];if(r)return r;const i=await fetch(n).then(u=>u.text()),o=new Blob([i],{type:"application/javascript"}),s=await import(URL.createObjectURL(o)),l=()=>s.default;return e(u=>({components:{...u.components,[n]:l}})),l}}));globalThis.React=F;const Ad={audio:mf,bubble:uf,button:P1,carousel:Af,column:yf,dropdown:pE,file:Cd,image:pf,location:gf,row:vf,text:i1,video:hf,custom:({url:e,name:t,data:n,...r})=>{const i=hE(u=>u.getCustomComponent),[o,a]=F.useState(null),[s,l]=F.useState(null);return F.useEffect(()=>{i(e).then(a).catch(u=>{l(u.message)})},[e]),s?S.jsx("div",{style:{color:"red"},children:s}):o?S.jsx(o,{...n,...r}):null}},Yt=({block:e,renderers:t,...n})=>{const r=(t==null?void 0:t[e.type])??Ad[e.type],i={...n,...e};return S.jsx(r,{...i})};function Id(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=Id(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function dr(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Id(e))&&(r&&(r+=" "),r+=t);return r}const mE=({disabled:e,onFileSelected:t})=>{const n=F.useRef(null),{uploadButton:r}=ge.composer,i=()=>{n.current&&n.current.click()},o=a=>{const s=a.target.files;s&&s.length>0&&Array.from(s).forEach(l=>{t(l)})};return S.jsxs(S.Fragment,{children:[S.jsx(yg,{...r,role:"button",tabIndex:0,"aria-label":"Upload File Button","data-disabled":e,onClick:i}),S.jsx("input",{value:"",multiple:!0,type:"file",ref:n,style:{display:"none"},onChange:o})]})},gE=({name:e,type:t,instance:n,status:r,removeFile:i})=>{const{loader:o,fileIcon:a,removeIcon:s,errorIcon:l,previewImage:u}=ge.composer.fileWidget,f=["PNG","JPEG","JPG"].includes(pi(n.name));return r==="loading"?S.jsx(di,{name:e,status:r,removeButton:S.jsx("div",{...o}),extension:pi(n.name),children:S.jsx("div",{...a.container,children:S.jsx(Ba,{type:t,...a.icon})})}):r==="error"?S.jsx(di,{name:e,status:r,removeButton:S.jsx(Td,{removeFile:()=>i(e)}),extension:"Upload Error",children:S.jsxs("div",{...a.container,children:[S.jsx(rg,{...l}),S.jsx(Ba,{type:t,...a.icon})]})}):r=="uploaded"&&f?S.jsx(di,{name:e,status:r,removeButton:S.jsx(Td,{removeFile:()=>i(e)}),extension:pi(n.name),children:S.jsx("div",{...a.container,children:S.jsx("img",{src:URL.createObjectURL(n),alt:e,...u})})}):S.jsx(di,{name:e,status:r,removeButton:S.jsx(Dl,{onClick:()=>i(e),...s}),extension:pi(n.name),children:S.jsx("div",{...a.container,children:S.jsx(Ba,{type:t,...a.icon})})})},di=({name:e,status:t,removeButton:n,children:r,extension:i})=>{const{container:o,metadata:a}=ge.composer.fileWidget;return S.jsxs("div",{"data-status":t,title:e,...o,children:[n,r,S.jsxs("div",{...a.container,children:[S.jsx("div",{...a.name,children:e}),S.jsx("div",{...a.type,children:i})]})]})},Ba=({type:e,...t})=>e==="image"?S.jsx(ug,{...t}):e==="video"?S.jsx(kg,{...t}):e==="audio"?S.jsx(Pl,{...t}):S.jsx(Ml,{...t}),pi=e=>{if(!e)return"File";const t=e.split(".").pop();return t?t.toUpperCase():"File"},Td=({removeFile:e})=>{const{composer:{fileWidget:{removeIcon:t}}}=ge;return S.jsx(Dl,{role:"button",tabIndex:0,"aria-label":"Remove File Button",onClick:()=>e(),...t})};function za(){return za=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},za.apply(null,arguments)}function yE(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var vE=F.useLayoutEffect,bE=function(t){var n=F.useRef(t);return vE(function(){n.current=t}),n},Od=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},xE=function(t,n){var r=F.useRef();return F.useCallback(function(i){t.current=i,r.current&&Od(r.current,null),r.current=n,n&&Od(n,i)},[n])},Dd={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},wE=function(t){Object.keys(Dd).forEach(function(n){t.style.setProperty(n,Dd[n],"important")})},Md=wE,Ke=null,_d=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function kE(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),Ke||(Ke=document.createElement("textarea"),Ke.setAttribute("tabindex","-1"),Ke.setAttribute("aria-hidden","true"),Md(Ke)),Ke.parentNode===null&&document.body.appendChild(Ke);var i=e.paddingSize,o=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(p){var d=p;Ke.style[d]=a[d]}),Md(Ke),Ke.value=t;var l=_d(Ke,e);Ke.value=t,l=_d(Ke,e),Ke.value="x";var u=Ke.scrollHeight-i,f=u*n;s==="border-box"&&(f=f+i+o),l=Math.max(f,l);var c=u*r;return s==="border-box"&&(c=c+i+o),l=Math.min(c,l),[l,u]}var Pd=function(){},SE=function(t,n){return t.reduce(function(r,i){return r[i]=n[i],r},{})},EE=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],CE=!!document.documentElement.currentStyle,AE=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=SE(EE,n),i=r.boxSizing;if(i==="")return null;CE&&i==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var o=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),a=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:o,borderSize:a}},IE=AE;function Nd(e,t,n){var r=bE(n);E.useLayoutEffect(function(){var i=function(a){return r.current(a)};if(e)return e.addEventListener(t,i),function(){return e.removeEventListener(t,i)}},[])}var TE=function(t){Nd(window,"resize",t)},OE=function(t){Nd(document.fonts,"loadingdone",t)},DE=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],ME=function(t,n){var r=t.cacheMeasurements,i=t.maxRows,o=t.minRows,a=t.onChange,s=a===void 0?Pd:a,l=t.onHeightChange,u=l===void 0?Pd:l,f=yE(t,DE),c=f.value!==void 0,p=E.useRef(null),d=xE(p,n),m=E.useRef(0),h=E.useRef(),y=function(){var x=p.current,A=r&&h.current?h.current:IE(x);if(A){h.current=A;var k=kE(A,x.value||x.placeholder||"x",o,i),C=k[0],T=k[1];m.current!==C&&(m.current=C,x.style.setProperty("height",C+"px","important"),u(C,{rowHeight:T}))}},g=function(x){c||y(),s(x)};return E.useLayoutEffect(y),TE(y),OE(y),E.createElement("textarea",za({},f,{onChange:g,ref:d}))},_E=E.forwardRef(ME);const PE=({inputRef:e,composerPlaceholder:t,composerDisabled:n,textInput:r,historyIndex:i,setTextInput:o,setHistoryIndex:a,sendComposerMessage:s,allowFileUpload:l,onFilePasted:u})=>{const f=Kc(h=>h.messageHistory),[c,p]=F.useState(""),{input:d}=ge.composer,m=h=>{if(!l||!u||!h.clipboardData)return;const y=Array.from(h.clipboardData.files);y.length>0&&(h.preventDefault(),y.forEach(g=>{u(g)}))};return S.jsx(_E,{...d,"aria-label":"Message Input",ref:e,placeholder:t??"Type your message...",disabled:n,value:r,"data-has-value":!!r,onChange:h=>{const y=h.target.value;o(y),f.includes(y)||a(-1)},onPaste:m,maxRows:5,onKeyDown:h=>{if(n)return;const y=h.nativeEvent;if(!(y.isComposing||y.keyCode===229)&&(h.key==="Enter"&&h.shiftKey?(h.preventDefault(),o(`${r}
|
|
278
|
+
*/var xS=["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])"],Ea=xS.join(","),ed=typeof Element>"u",ar=ed?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ri=!ed&&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},sr=function(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),o=i===""||i==="true",a=o||n&&t&&sr(t.parentNode);return a},kS=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},SS=function(t,n,r){if(sr(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Ea));return n&&ar.call(t,Ea)&&i.unshift(t),i=i.filter(r),i},Ca=function(t,n,r){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!sr(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,u=Ca(l,!0,r);r.flatten?i.push.apply(i,u):i.push({scopeParent:a,candidates:u})}else{var f=ar.call(a,Ea);f&&r.filter(a)&&(n||!t.includes(a))&&i.push(a);var c=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!sr(c,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(c&&p){var d=Ca(c===!0?a.children:c.children,!0,r);r.flatten?i.push.apply(i,d):i.push({scopeParent:a,candidates:d})}else o.unshift.apply(o,a.children)}}return i},td=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},nd=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||kS(t))&&!td(t)?0:t.tabIndex},ES=function(t,n){var r=nd(t);return r<0&&n&&!td(t)?0:r},CS=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},rd=function(t){return t.tagName==="INPUT"},AS=function(t){return rd(t)&&t.type==="hidden"},IS=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},TS=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},OS=function(t){if(!t.name)return!0;var n=t.form||ri(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var o=TS(i,t.form);return!o||o===t},DS=function(t){return rd(t)&&t.type==="radio"},MS=function(t){return DS(t)&&!OS(t)},_S=function(t){var n,r=t&&ri(t),i=(n=r)===null||n===void 0?void 0:n.host,o=!1;if(r&&r!==t){var a,s,l;for(o=!!((a=i)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!o&&i;){var u,f,c;r=ri(i),i=(u=r)===null||u===void 0?void 0:u.host,o=!!((f=i)!==null&&f!==void 0&&(c=f.ownerDocument)!==null&&c!==void 0&&c.contains(i))}}return o},id=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},PS=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var o=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}if(getComputedStyle(t).visibility==="hidden")return!0;var a=ar.call(t,"details>summary:first-of-type"),s=a?t.parentElement:t;if(ar.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof i=="function"){for(var l=t;t;){var u=t.parentElement,f=ri(t);if(u&&!u.shadowRoot&&i(u)===!0)return id(t);t.assignedSlot?t=t.assignedSlot:!u&&f!==t.ownerDocument?t=f.host:t=u}t=l}if(_S(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return id(t);return!1},NS=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 ar.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},LS=function(t,n){return!(n.disabled||sr(n)||AS(n)||PS(n,t)||IS(n)||NS(n))},od=function(t,n){return!(MS(n)||nd(n)<0||!LS(t,n))},FS=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},ad=function(t){var n=[],r=[];return t.forEach(function(i,o){var a=!!i.scopeParent,s=a?i.scopeParent:i,l=ES(s,a),u=a?ad(i.candidates):s;l===0?a?n.push.apply(n,u):n.push(s):r.push({documentOrder:o,tabIndex:l,item:i,isScope:a,content:u})}),r.sort(CS).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},Aa=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Ca([t],n.includeContainer,{filter:od.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:FS}):r=SS(t,n.includeContainer,od.bind(null,n)),ad(r)};const Ia="ArrowUp",ii="ArrowDown",mn="ArrowLeft",lr="ArrowRight";function oi(e,t,n){return Math.floor(e/t)!==n}function ur(e,t){return t<0||t>=e.current.length}function Ta(e,t){return Ve(e,{disabledIndices:t})}function sd(e,t){return Ve(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ve(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:o=1}=t===void 0?{}:t;const a=e.current;let s=n;do{var l,u;s=s+(r?-o:o)}while(s>=0&&s<=a.length-1&&(i?i.includes(s):a[s]==null||(l=a[s])!=null&&l.hasAttribute("disabled")||((u=a[s])==null?void 0:u.getAttribute("aria-disabled"))==="true"));return s}function RS(e,t){let{event:n,orientation:r,loop:i,cols:o,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:u,stopEvent:f=!1}=t,c=u;if(n.key===Ia){if(f&&je(n),u===-1)c=l;else if(c=Ve(e,{startingIndex:c,amount:o,decrement:!0,disabledIndices:a}),i&&(u-o<s||c<0)){const p=u%o,d=l%o,m=l-(d-p);d===p?c=l:c=d>p?m:m-o}ur(e,c)&&(c=u)}if(n.key===ii&&(f&&je(n),u===-1?c=s:(c=Ve(e,{startingIndex:u,amount:o,disabledIndices:a}),i&&u+o>l&&(c=Ve(e,{startingIndex:u%o-o,amount:o,disabledIndices:a}))),ur(e,c)&&(c=u)),r==="both"){const p=Af(u/o);n.key===lr&&(f&&je(n),u%o!==o-1?(c=Ve(e,{startingIndex:u,disabledIndices:a}),i&&oi(c,o,p)&&(c=Ve(e,{startingIndex:u-u%o-1,disabledIndices:a}))):i&&(c=Ve(e,{startingIndex:u-u%o-1,disabledIndices:a})),oi(c,o,p)&&(c=u)),n.key===mn&&(f&&je(n),u%o!==0?(c=Ve(e,{startingIndex:u,disabledIndices:a,decrement:!0}),i&&oi(c,o,p)&&(c=Ve(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:a}))):i&&(c=Ve(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:a})),oi(c,o,p)&&(c=u));const d=Af(l/o)===p;ur(e,c)&&(i&&d?c=n.key===mn?l:Ve(e,{startingIndex:u-u%o-1,disabledIndices:a}):c=u)}return c}let ld=0;function Ct(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(ld);const o=()=>e==null?void 0:e.focus({preventScroll:n});i?o():ld=requestAnimationFrame(o)}var Re=typeof document<"u"?_.useLayoutEffect:_.useEffect;function ai(){return ai=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},ai.apply(this,arguments)}let Oa=!1,BS=0;const ud=()=>"floating-ui-"+BS++;function zS(){const[e,t]=E.useState(()=>Oa?ud():void 0);return Re(()=>{e==null&&t(ud())},[]),E.useEffect(()=>{Oa||(Oa=!0)},[]),e}const Da=E.useId||zS;function $S(){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 jS=E.createContext(null),US=E.createContext(null),cd=()=>{var e;return((e=E.useContext(jS))==null?void 0:e.id)||null},si=()=>E.useContext(US);function cr(e){return"data-floating-ui-"+e}function Ft(e){const t=_.useRef(e);return Re(()=>{t.current=e}),t}function HS(e,t){var n;let r=[],i=(n=e.find(o=>o.id===t))==null?void 0:n.parentId;for(;i;){const o=e.find(a=>a.id===i);i=o==null?void 0:o.parentId,o&&(r=r.concat(o))}return r}function gn(e,t){let n=e.filter(i=>{var o;return i.parentId===t&&((o=i.context)==null?void 0:o.open)}),r=n;for(;r.length;)r=e.filter(i=>{var o;return(o=r)==null?void 0:o.some(a=>{var s;return i.parentId===a.id&&((s=i.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function WS(e,t){let n,r=-1;function i(o,a){a>r&&(n=o,r=a),gn(e,o).forEach(l=>{i(l.id,a+1)})}return i(t,0),e.find(o=>o.id===n)}let yn=new WeakMap,li=new WeakSet,ui={},Ma=0;const VS=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,fd=e=>e&&(e.host||fd(e.parentNode)),qS=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=fd(n);return e.contains(r)?r:null}).filter(n=>n!=null);function KS(e,t,n,r){const i="data-floating-ui-inert",o=r?"inert":n?"aria-hidden":null,a=qS(t,e),s=new Set,l=new Set(a),u=[];ui[i]||(ui[i]=new WeakMap);const f=ui[i];a.forEach(c),p(t),s.clear();function c(d){!d||s.has(d)||(s.add(d),d.parentNode&&c(d.parentNode))}function p(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,m=>{if(s.has(m))p(m);else{const h=o?m.getAttribute(o):null,g=h!==null&&h!=="false",y=(yn.get(m)||0)+1,v=(f.get(m)||0)+1;yn.set(m,y),f.set(m,v),u.push(m),y===1&&g&&li.add(m),v===1&&m.setAttribute(i,""),!g&&o&&m.setAttribute(o,"true")}})}return Ma++,()=>{u.forEach(d=>{const m=(yn.get(d)||0)-1,h=(f.get(d)||0)-1;yn.set(d,m),f.set(d,h),m||(!li.has(d)&&o&&d.removeAttribute(o),li.delete(d)),h||d.removeAttribute(i)}),Ma--,Ma||(yn=new WeakMap,yn=new WeakMap,li=new WeakSet,ui={})}}function dd(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=ft(e[0]).body;return KS(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const _a=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function pd(e,t){const n=Aa(e,_a());t==="prev"&&n.reverse();const r=n.indexOf(Pt(ft(e)));return n.slice(r+1)[0]}function hd(){return pd(document.body,"next")}function md(){return pd(document.body,"prev")}function fr(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ze(n,r)}function YS(e){Aa(e,_a()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function GS(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 Pa={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 QS;function gd(e){e.key==="Tab"&&(e.target,clearTimeout(QS))}const ci=E.forwardRef(function(t,n){const[r,i]=E.useState();Re(()=>(_f()&&i("button"),document.addEventListener("keydown",gd),()=>{document.removeEventListener("keydown",gd)}),[]);const o={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[cr("focus-guard")]:"",style:Pa};return E.createElement("span",ai({},t,o))}),yd=E.createContext(null);function JS(e){let{id:t,root:n}=e===void 0?{}:e;const[r,i]=E.useState(null),o=Da(),a=vd(),s=E.useMemo(()=>({id:t,root:n,portalContext:a,uniqueId:o}),[t,n,a,o]),l=E.useRef();return Re(()=>()=>{r==null||r.remove()},[r,s]),Re(()=>{if(l.current===s)return;l.current=s;const{id:u,root:f,portalContext:c,uniqueId:p}=s,d=u?document.getElementById(u):null,m=cr("portal");if(d){const h=document.createElement("div");h.id=p,h.setAttribute(m,""),d.appendChild(h),i(h)}else{let h=f||(c==null?void 0:c.portalNode);h&&!at(h)&&(h=h.current),h=h||document.body;let g=null;u&&(g=document.createElement("div"),g.id=u,h.appendChild(g));const y=document.createElement("div");y.id=p,y.setAttribute(m,""),h=g||h,h.appendChild(y),i(y)}},[s]),r}function ZS(e){let{children:t,id:n,root:r=null,preserveTabOrder:i=!0}=e;const o=JS({id:n,root:r}),[a,s]=E.useState(null),l=E.useRef(null),u=E.useRef(null),f=E.useRef(null),c=E.useRef(null),p=!!a&&!a.modal&&a.open&&i&&!!(r||o);return E.useEffect(()=>{if(!o||!i||a!=null&&a.modal)return;function d(m){o&&fr(m)&&(m.type==="focusin"?GS:YS)(o)}return o.addEventListener("focusin",d,!0),o.addEventListener("focusout",d,!0),()=>{o.removeEventListener("focusin",d,!0),o.removeEventListener("focusout",d,!0)}},[o,i,a==null?void 0:a.modal]),E.createElement(yd.Provider,{value:E.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:f,afterInsideRef:c,portalNode:o,setFocusManagerState:s}),[i,o])},p&&o&&E.createElement(ci,{"data-type":"outside",ref:l,onFocus:d=>{if(fr(d,o)){var m;(m=f.current)==null||m.focus()}else{const h=md()||(a==null?void 0:a.refs.domReference.current);h==null||h.focus()}}}),p&&o&&E.createElement("span",{"aria-owns":o.id,style:Pa}),o&&Ps.createPortal(t,o),p&&o&&E.createElement(ci,{"data-type":"outside",ref:u,onFocus:d=>{if(fr(d,o)){var m;(m=c.current)==null||m.focus()}else{const h=hd()||(a==null?void 0:a.refs.domReference.current);h==null||h.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,d.nativeEvent))}}}))}const vd=()=>E.useContext(yd),XS=E.forwardRef(function(t,n){return E.createElement("button",ai({},t,{type:"button",ref:n,tabIndex:-1,style:Pa}))});function eE(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],guards:o=!0,initialFocus:a=0,returnFocus:s=!0,modal:l=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:f=!0}=e,{open:c,refs:p,nodeId:d,onOpenChange:m,events:h,dataRef:g,elements:{domReference:y,floating:v}}=t,w=VS()?o:!0,A=Ft(i),k=Ft(a),C=Ft(s),T=si(),P=vd(),R=typeof a=="number"&&a<0,I=E.useRef(null),O=E.useRef(null),j=E.useRef(!1),M=E.useRef(null),L=E.useRef(!1),D=P!=null,z=y&&y.getAttribute("role")==="combobox"&&Lf(y)&&R,U=E.useCallback(function(N){return N===void 0&&(N=v),N?Aa(N,_a()):[]},[v]),$=E.useCallback(N=>{const H=U(N);return A.current.map(x=>y&&x==="reference"?y:v&&x==="floating"?v:H).filter(Boolean).flat()},[y,v,A,U]);E.useEffect(()=>{if(r||!l)return;function N(x){if(x.key==="Tab"){Ze(v,Pt(ft(v)))&&U().length===0&&!z&&je(x);const W=$(),ee=Nf(x);A.current[0]==="reference"&&ee===y&&(je(x),x.shiftKey?Ct(W[W.length-1]):Ct(W[1])),A.current[1]==="floating"&&ee===v&&x.shiftKey&&(je(x),Ct(W[0]))}}const H=ft(v);return H.addEventListener("keydown",N),()=>{H.removeEventListener("keydown",N)}},[r,y,v,l,A,p,z,U,$]),E.useEffect(()=>{if(r||!f)return;function N(){L.current=!0,setTimeout(()=>{L.current=!1})}function H(x){const W=x.relatedTarget;queueMicrotask(()=>{const ee=!(Ze(y,W)||Ze(v,W)||Ze(W,v)||Ze(P==null?void 0:P.portalNode,W)||W!=null&&W.hasAttribute(cr("focus-guard"))||T&&(gn(T.nodesRef.current,d).find(Y=>{var J,X;return Ze((J=Y.context)==null?void 0:J.elements.floating,W)||Ze((X=Y.context)==null?void 0:X.elements.domReference,W)})||HS(T.nodesRef.current,d).find(Y=>{var J,X;return((J=Y.context)==null?void 0:J.elements.floating)===W||((X=Y.context)==null?void 0:X.elements.domReference)===W})));W&&ee&&!L.current&&W!==M.current&&(j.current=!0,m(!1,x))})}if(v&&cn(y))return y.addEventListener("focusout",H),y.addEventListener("pointerdown",N),!l&&v.addEventListener("focusout",H),()=>{y.removeEventListener("focusout",H),y.removeEventListener("pointerdown",N),!l&&v.removeEventListener("focusout",H)}},[r,y,v,l,d,T,P,m,f]),E.useEffect(()=>{var N;if(r)return;const H=Array.from((P==null||(N=P.portalNode)==null?void 0:N.querySelectorAll("["+cr("portal")+"]"))||[]);if(v){const x=[v,...H,I.current,O.current,A.current.includes("reference")||z?y:null].filter(ee=>ee!=null),W=l?dd(x,w,!w):dd(x);return()=>{W()}}},[r,y,v,l,A,P,z,w]),Re(()=>{if(r||!v)return;const N=ft(v),H=Pt(N);queueMicrotask(()=>{const x=$(v),W=k.current,ee=(typeof W=="number"?x[W]:W.current)||v,Y=Ze(v,H);!R&&!Y&&c&&Ct(ee,{preventScroll:ee===v})})},[r,c,v,R,$,k]),Re(()=>{if(r||!v)return;let N=!1;const H=ft(v),x=Pt(H),W=g.current;M.current=x;function ee(Y){if(Y.type==="escapeKey"&&p.domReference.current&&(M.current=p.domReference.current),["referencePress","escapeKey"].includes(Y.type))return;const J=Y.data.returnFocus;typeof J=="object"?(j.current=!1,N=J.preventScroll):j.current=!J}return h.on("dismiss",ee),()=>{h.off("dismiss",ee);const Y=Pt(H);(Ze(v,Y)||T&&gn(T.nodesRef.current,d).some(X=>{var ie;return Ze((ie=X.context)==null?void 0:ie.elements.floating,Y)})||W.openEvent&&["click","mousedown"].includes(W.openEvent.type))&&p.domReference.current&&(M.current=p.domReference.current),C.current&&cn(M.current)&&!j.current&&Ct(M.current,{cancelPrevious:!1,preventScroll:N})}},[r,v,C,g,p,h,T,d]),Re(()=>{if(!(r||!P))return P.setFocusManagerState({modal:l,closeOnFocusOut:f,open:c,onOpenChange:m,refs:p}),()=>{P.setFocusManagerState(null)}},[r,P,l,c,m,p,f]),Re(()=>{if(!r&&v&&typeof MutationObserver=="function"&&!R){const N=()=>{const x=v.getAttribute("tabindex");A.current.includes("floating")||Pt(ft(v))!==p.domReference.current&&U().length===0?x!=="0"&&v.setAttribute("tabindex","0"):x!=="-1"&&v.setAttribute("tabindex","-1")};N();const H=new MutationObserver(N);return H.observe(v,{childList:!0,subtree:!0,attributes:!0}),()=>{H.disconnect()}}},[r,v,p,A,U,R]);function V(N){return r||!u||!l?null:E.createElement(XS,{ref:N==="start"?I:O,onClick:H=>m(!1,H.nativeEvent)},typeof u=="string"?u:"Dismiss")}const b=!r&&w&&!z&&(D||l);return E.createElement(E.Fragment,null,b&&E.createElement(ci,{"data-type":"inside",ref:P==null?void 0:P.beforeInsideRef,onFocus:N=>{if(l){const x=$();Ct(i[0]==="reference"?x[0]:x[x.length-1])}else if(P!=null&&P.preserveTabOrder&&P.portalNode)if(j.current=!1,fr(N,P.portalNode)){const x=hd()||y;x==null||x.focus()}else{var H;(H=P.beforeOutsideRef.current)==null||H.focus()}}}),!z&&V("start"),n,V("end"),b&&E.createElement(ci,{"data-type":"inside",ref:P==null?void 0:P.afterInsideRef,onFocus:N=>{if(l)Ct($()[0]);else if(P!=null&&P.preserveTabOrder&&P.portalNode)if(f&&(j.current=!0),fr(N,P.portalNode)){const x=md()||y;x==null||x.focus()}else{var H;(H=P.afterOutsideRef.current)==null||H.focus()}}}))}function bd(e){return cn(e.target)&&e.target.tagName==="BUTTON"}function wd(e){return Lf(e)}function tE(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:o}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:u=!1,keyboardHandlers:f=!0}=t,c=E.useRef(),p=E.useRef(!1);return E.useMemo(()=>a?{reference:{onPointerDown(d){c.current=d.pointerType},onMouseDown(d){d.button===0&&(Pf(c.current)&&u||s!=="click"&&(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")?r(!1,d.nativeEvent):(d.preventDefault(),r(!0,d.nativeEvent))))},onClick(d){if(s==="mousedown"&&c.current){c.current=void 0;return}Pf(c.current)&&u||(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="click")?r(!1,d.nativeEvent):r(!0,d.nativeEvent))},onKeyDown(d){c.current=void 0,!(d.defaultPrevented||!f||bd(d))&&(d.key===" "&&!wd(o)&&(d.preventDefault(),p.current=!0),d.key==="Enter"&&r(!(n&&l),d.nativeEvent))},onKeyUp(d){d.defaultPrevented||!f||bd(d)||wd(o)||d.key===" "&&p.current&&(p.current=!1,r(!(n&&l),d.nativeEvent))}}}:{},[a,i,s,u,f,o,l,n,r])}const nE=E.useInsertionEffect||(e=>e());function Rt(e){const t=E.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return nE(()=>{t.current=e}),E.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}const rE={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},iE={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},oE=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 aE(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:i,nodeId:o,elements:{reference:a,domReference:s,floating:l},dataRef:u}=e,{enabled:f=!0,escapeKey:c=!0,outsidePress:p=!0,outsidePressEvent:d="pointerdown",referencePress:m=!1,referencePressEvent:h="pointerdown",ancestorScroll:g=!1,bubbles:y}=t,v=si(),w=cd()!=null,A=Rt(typeof p=="function"?p:()=>!1),k=typeof p=="function"?A:p,C=E.useRef(!1),{escapeKeyBubbles:T,outsidePressBubbles:P}=oE(y),R=Rt(O=>{if(!n||!f||!c||O.key!=="Escape")return;const j=v?gn(v.nodesRef.current,o):[];if(!T&&(O.stopPropagation(),j.length>0)){let M=!0;if(j.forEach(L=>{var D;if((D=L.context)!=null&&D.open&&!L.context.dataRef.current.__escapeKeyBubbles){M=!1;return}}),!M)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,Ck(O)?O.nativeEvent:O)}),I=Rt(O=>{const j=C.current;if(C.current=!1,j||typeof k=="function"&&!k(O))return;const M=Nf(O),L="["+cr("inert")+"]",D=ft(l).querySelectorAll(L);let z=at(M)?M:null;for(;z&&!wk(z);){const V=kk(z);if(V===ft(l).body||!at(V))break;z=V}if(D.length&&at(M)&&!Ak(M)&&!Ze(M,l)&&Array.from(D).every(V=>!Ze(z,V)))return;if(cn(M)&&l){const V=M.clientWidth>0&&M.scrollWidth>M.clientWidth,b=M.clientHeight>0&&M.scrollHeight>M.clientHeight;let N=b&&O.offsetX>M.clientWidth;if(b&&xk(M).direction==="rtl"&&(N=O.offsetX<=M.offsetWidth-M.clientWidth),N||V&&O.offsetY>M.clientHeight)return}const U=v&&gn(v.nodesRef.current,o).some(V=>{var b;return ga(O,(b=V.context)==null?void 0:b.elements.floating)});if(ga(O,l)||ga(O,s)||U)return;const $=v?gn(v.nodesRef.current,o):[];if($.length>0){let V=!0;if($.forEach(b=>{var N;if((N=b.context)!=null&&N.open&&!b.context.dataRef.current.__outsidePressBubbles){V=!1;return}}),!V)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:w?{preventScroll:!0}:Df(O)||Mf(O)}}),r(!1,O)});return E.useEffect(()=>{if(!n||!f)return;u.current.__escapeKeyBubbles=T,u.current.__outsidePressBubbles=P;function O(L){r(!1,L)}const j=ft(l);c&&j.addEventListener("keydown",R),k&&j.addEventListener(d,I);let M=[];return g&&(at(s)&&(M=Lt(s)),at(l)&&(M=M.concat(Lt(l))),!at(a)&&a&&a.contextElement&&(M=M.concat(Lt(a.contextElement)))),M=M.filter(L=>{var D;return L!==((D=j.defaultView)==null?void 0:D.visualViewport)}),M.forEach(L=>{L.addEventListener("scroll",O,{passive:!0})}),()=>{c&&j.removeEventListener("keydown",R),k&&j.removeEventListener(d,I),M.forEach(L=>{L.removeEventListener("scroll",O)})}},[u,l,s,a,c,k,d,n,r,g,f,T,P,R,I]),E.useEffect(()=>{C.current=!1},[k,d]),E.useMemo(()=>f?{reference:{onKeyDown:R,[rE[h]]:O=>{m&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,O.nativeEvent))}},floating:{onKeyDown:R,[iE[d]]:()=>{C.current=!0}}}:{},[f,i,m,d,h,r,R])}let Na;process.env.NODE_ENV!=="production"&&(Na=new Set);function sE(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:i}=e;if(process.env.NODE_ENV!=="production"){var o;const T="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if((o=e.elements)!=null&&o.reference&&!at(e.elements.reference)){var a;if(!((a=Na)!=null&&a.has(T))){var s;(s=Na)==null||s.add(T),console.error(T)}}}const[l,u]=E.useState(null),f=((t=e.elements)==null?void 0:t.reference)||l,c=yS(e),p=si(),d=Rt((T,P)=>{T&&(h.current.openEvent=P),r==null||r(T,P)}),m=E.useRef(null),h=E.useRef({}),g=E.useState(()=>$S())[0],y=Da(),v=E.useCallback(T=>{const P=at(T)?{getBoundingClientRect:()=>T.getBoundingClientRect(),contextElement:T}:T;c.refs.setReference(P)},[c.refs]),w=E.useCallback(T=>{(at(T)||T===null)&&(m.current=T,u(T)),(at(c.refs.reference.current)||c.refs.reference.current===null||T!==null&&!at(T))&&c.refs.setReference(T)},[c.refs]),A=E.useMemo(()=>({...c.refs,setReference:w,setPositionReference:v,domReference:m}),[c.refs,w,v]),k=E.useMemo(()=>({...c.elements,domReference:f}),[c.elements,f]),C=E.useMemo(()=>({...c,refs:A,elements:k,dataRef:h,nodeId:i,floatingId:y,events:g,open:n,onOpenChange:d}),[c,i,y,g,n,d,A,k]);return Re(()=>{const T=p==null?void 0:p.nodesRef.current.find(P=>P.id===i);T&&(T.context=C)}),E.useMemo(()=>({...c,context:C,refs:A,elements:k}),[c,A,k,C])}function La(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(i=>i?i[n]:null).concat(e).reduce((i,o)=>(o&&Object.entries(o).forEach(a=>{let[s,l]=a;if(s.indexOf("on")===0){if(r.has(s)||r.set(s,[]),typeof l=="function"){var u;(u=r.get(s))==null||u.push(l),i[s]=function(){for(var f,c=arguments.length,p=new Array(c),d=0;d<c;d++)p[d]=arguments[d];return(f=r.get(s))==null?void 0:f.map(m=>m(...p)).find(m=>m!==void 0)}}}else i[s]=l}),i),{})}}function lE(e){e===void 0&&(e=[]);const t=e,n=E.useCallback(o=>La(o,e,"reference"),t),r=E.useCallback(o=>La(o,e,"floating"),t),i=E.useCallback(o=>La(o,e,"item"),e.map(o=>o==null?void 0:o.item));return E.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])}let xd=!1;function fi(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function kd(e,t){return fi(t,e===Ia||e===ii,e===mn||e===lr)}function Fa(e,t,n){return fi(t,e===ii,n?e===mn:e===lr)||e==="Enter"||e==" "||e===""}function uE(e,t,n){return fi(t,n?e===mn:e===lr,e===ii)}function Sd(e,t,n){return fi(t,n?e===lr:e===mn,e===Ia)}function cE(e,t){const{open:n,onOpenChange:r,refs:i,elements:{domReference:o,floating:a}}=e,{listRef:s,activeIndex:l,onNavigate:u=()=>{},enabled:f=!0,selectedIndex:c=null,allowEscape:p=!1,loop:d=!1,nested:m=!1,rtl:h=!1,virtual:g=!1,focusItemOnOpen:y="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:w=!0,disabledIndices:A=void 0,orientation:k="vertical",cols:C=1,scrollItemIntoView:T=!0,virtualItemRef:P}=t;process.env.NODE_ENV!=="production"&&(p&&(d||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),g||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),k==="vertical"&&C>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const R=cd(),I=si(),O=Rt(u),j=E.useRef(y),M=E.useRef(c??-1),L=E.useRef(null),D=E.useRef(!0),z=E.useRef(O),U=E.useRef(!!a),$=E.useRef(!1),V=E.useRef(!1),b=Ft(A),N=Ft(n),H=Ft(T),[x,W]=E.useState(),[ee,Y]=E.useState(),J=Rt(function(K,te,F){F===void 0&&(F=!1);const ne=K.current[te.current];ne&&(g?(W(ne.id),I==null||I.events.emit("virtualfocus",ne),P&&(P.current=ne)):Ct(ne,{preventScroll:!0,sync:Ek()&&_f()?xd||$.current:!1}),requestAnimationFrame(()=>{const me=H.current;me&&ne&&(F||!D.current)&&(ne.scrollIntoView==null||ne.scrollIntoView(typeof me=="boolean"?{block:"nearest",inline:"nearest"}:me))}))});Re(()=>{document.createElement("div").focus({get preventScroll(){return xd=!0,!1}})},[]),Re(()=>{f&&(n&&a?j.current&&c!=null&&(V.current=!0,O(c)):U.current&&(M.current=-1,z.current(null)))},[f,n,a,c,O]),Re(()=>{if(f&&n&&a)if(l==null){if($.current=!1,c!=null)return;if(U.current&&(M.current=-1,J(s,M)),!U.current&&j.current&&(L.current!=null||j.current===!0&&L.current==null)){let K=0;const te=()=>{s.current[0]==null?(K<2&&(K?requestAnimationFrame:queueMicrotask)(te),K++):(M.current=L.current==null||Fa(L.current,k,h)||m?Ta(s,b.current):sd(s,b.current),L.current=null,O(M.current))};te()}}else ur(s,l)||(M.current=l,J(s,M,V.current),V.current=!1)},[f,n,a,l,c,m,s,k,h,O,J,b]),Re(()=>{var K,te;if(!f||a||!I||g||!U.current)return;const F=I.nodesRef.current,ne=(K=F.find(oe=>oe.id===R))==null||(te=K.context)==null?void 0:te.elements.floating,me=Pt(ft(a)),ke=F.some(oe=>oe.context&&Ze(oe.context.elements.floating,me));ne&&!ke&&D.current&&ne.focus({preventScroll:!0})},[f,a,I,R,g]),Re(()=>{if(!f||!I||!g||R)return;function K(te){Y(te.id),P&&(P.current=te)}return I.events.on("virtualfocus",K),()=>{I.events.off("virtualfocus",K)}},[f,I,g,R,P]),Re(()=>{z.current=O,U.current=!!a}),Re(()=>{n||(L.current=null)},[n]);const X=l!=null,ie=E.useMemo(()=>{function K(F){if(!n)return;const ne=s.current.indexOf(F);ne!==-1&&O(ne)}return{onFocus(F){let{currentTarget:ne}=F;K(ne)},onClick:F=>{let{currentTarget:ne}=F;return ne.focus({preventScroll:!0})},...v&&{onMouseMove(F){let{currentTarget:ne}=F;K(ne)},onPointerLeave(F){let{pointerType:ne}=F;!D.current||ne==="touch"||(M.current=-1,J(s,M),O(null),g||Ct(i.floating.current,{preventScroll:!0}))}}}},[n,i,J,v,s,O,g]);return E.useMemo(()=>{if(!f)return{};const K=b.current;function te(oe){if(D.current=!1,$.current=!0,!N.current&&oe.currentTarget===i.floating.current)return;if(m&&Sd(oe.key,k,h)){je(oe),r(!1,oe.nativeEvent),cn(o)&&!g&&o.focus();return}const G=M.current,ue=Ta(s,K),de=sd(s,K);if(oe.key==="Home"&&(je(oe),M.current=ue,O(M.current)),oe.key==="End"&&(je(oe),M.current=de,O(M.current)),!(C>1&&(M.current=RS(s,{event:oe,orientation:k,loop:d,cols:C,disabledIndices:K,minIndex:ue,maxIndex:de,prevIndex:M.current,stopEvent:!0}),O(M.current),k==="both"))&&kd(oe.key,k)){if(je(oe),n&&!g&&Pt(oe.currentTarget.ownerDocument)===oe.currentTarget){M.current=Fa(oe.key,k,h)?ue:de,O(M.current);return}Fa(oe.key,k,h)?d?M.current=G>=de?p&&G!==s.current.length?-1:ue:Ve(s,{startingIndex:G,disabledIndices:K}):M.current=Math.min(de,Ve(s,{startingIndex:G,disabledIndices:K})):d?M.current=G<=ue?p&&G!==-1?s.current.length:de:Ve(s,{startingIndex:G,decrement:!0,disabledIndices:K}):M.current=Math.max(ue,Ve(s,{startingIndex:G,decrement:!0,disabledIndices:K})),ur(s,M.current)?O(null):O(M.current)}}function F(oe){y==="auto"&&Df(oe.nativeEvent)&&(j.current=!0)}function ne(oe){j.current=y,y==="auto"&&Mf(oe.nativeEvent)&&(j.current=!0)}const me=g&&n&&X&&{"aria-activedescendant":ee||x},ke=s.current.find(oe=>(oe==null?void 0:oe.id)===x);return{reference:{...me,onKeyDown(oe){D.current=!1;const G=oe.key.indexOf("Arrow")===0,ue=uE(oe.key,k,h),de=Sd(oe.key,k,h),we=kd(oe.key,k),Se=(m?ue:we)||oe.key==="Enter"||oe.key.trim()==="";if(g&&n){const se=I==null?void 0:I.nodesRef.current.find(q=>q.parentId==null),B=I&&se?WS(I.nodesRef.current,se.id):null;if(G&&B&&P){const q=new KeyboardEvent("keydown",{key:oe.key,bubbles:!0});if(ue||de){var Ue,Ye;const ae=((Ue=B.context)==null?void 0:Ue.elements.domReference)===oe.currentTarget,le=de&&!ae?(Ye=B.context)==null?void 0:Ye.elements.domReference:ue?ke:null;le&&(je(oe),le.dispatchEvent(q),Y(void 0))}if(we&&B.context&&B.context.open&&B.parentId&&oe.currentTarget!==B.context.elements.domReference){var Z;je(oe),(Z=B.context.elements.domReference)==null||Z.dispatchEvent(q);return}}return te(oe)}if(!(!n&&!w&&G)){if(Se&&(L.current=m&&we?null:oe.key),m){ue&&(je(oe),n?(M.current=Ta(s,K),O(M.current)):r(!0,oe.nativeEvent));return}we&&(c!=null&&(M.current=c),je(oe),!n&&w?r(!0,oe.nativeEvent):te(oe),n&&O(M.current))}},onFocus(){n&&O(null)},onPointerDown:ne,onMouseDown:F,onClick:F},floating:{"aria-orientation":k==="both"?void 0:k,...me,onKeyDown:te,onPointerMove(){D.current=!0}},item:ie}},[o,i,x,ee,b,N,s,f,k,h,g,n,X,m,c,w,p,C,d,y,O,r,ie,I,P])}function fE(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:i=!0,role:o="dialog"}=t,a=Da();return E.useMemo(()=>{const s={id:r,role:o};return i?o==="tooltip"?{reference:{"aria-describedby":n?r:void 0},floating:s}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":o==="alertdialog"?"dialog":o,"aria-controls":n?r:void 0,...o==="listbox"&&{role:"combobox"},...o==="menu"&&{id:a}},floating:{...s,...o==="menu"&&{"aria-labelledby":a}}}:{}},[i,o,n,r,a])}function dE(e,t){var n;const{open:r,dataRef:i}=e,{listRef:o,activeIndex:a,onMatch:s,onTypingChange:l,enabled:u=!0,findMatch:f=null,resetMs:c=750,ignoreKeys:p=[],selectedIndex:d=null}=t,m=E.useRef(),h=E.useRef(""),g=E.useRef((n=d??a)!=null?n:-1),y=E.useRef(null),v=Rt(s),w=Rt(l),A=Ft(f),k=Ft(p);return Re(()=>{r&&(clearTimeout(m.current),y.current=null,h.current="")},[r]),Re(()=>{if(r&&h.current===""){var C;g.current=(C=d??a)!=null?C:-1}},[r,d,a]),E.useMemo(()=>{if(!u)return{};function C(R){R?i.current.typing||(i.current.typing=R,w(R)):i.current.typing&&(i.current.typing=R,w(R))}function T(R,I,O){const j=A.current?A.current(I,O):I.find(M=>(M==null?void 0:M.toLocaleLowerCase().indexOf(O.toLocaleLowerCase()))===0);return j?R.indexOf(j):-1}function P(R){const I=o.current;if(h.current.length>0&&h.current[0]!==" "&&(T(I,I,h.current)===-1?C(!1):R.key===" "&&je(R)),I==null||k.current.includes(R.key)||R.key.length!==1||R.ctrlKey||R.metaKey||R.altKey)return;r&&R.key!==" "&&(je(R),C(!0)),I.every(L=>{var D,z;return L?((D=L[0])==null?void 0:D.toLocaleLowerCase())!==((z=L[1])==null?void 0:z.toLocaleLowerCase()):!0})&&h.current===R.key&&(h.current="",g.current=y.current),h.current+=R.key,clearTimeout(m.current),m.current=setTimeout(()=>{h.current="",g.current=y.current,C(!1)},c);const j=g.current,M=T(I,[...I.slice((j||0)+1),...I.slice(0,(j||0)+1)],h.current);M!==-1?(v(M),y.current=M):R.key!==" "&&(h.current="",C(!1))}return{reference:{onKeyDown:P},floating:{onKeyDown:P,onKeyUp(R){R.key===" "&&C(!1)}}}},[u,r,i,o,c,k,A,v,w])}const pE=({options:e,reusable:t,sendMessage:n,isReadOnly:r})=>{var D,z,U,$,V;const i=sn(b=>b.messageContainerRef),o=sn(b=>b.portalContainer),[a,s]=E.useState(!1),[l,u]=E.useState(null),[f,c]=E.useState(null),{message:{blocks:{dropdown:p}}}=ge,d=e.reduce((b,N)=>(b[N.label]=N.value,b),{}),m=d?Object.keys(d):[],h=b=>{s(f!==null&&!t?!1:b)},{refs:g,floatingStyles:y,context:v}=sE({placement:"bottom-start",open:a,onOpenChange:h,whileElementsMounted:cS,middleware:[vS(5),bS({padding:10,boundary:(i==null?void 0:i.current)??void 0,crossAxis:!0}),wS({apply({rects:b,elements:N,availableHeight:H}){Object.assign(N.floating.style,{maxHeight:`${H}px`,minWidth:`${b.reference.width}px`})},padding:10})]}),w=E.useRef([]),A=E.useRef(m),k=E.useRef(!1),C=tE(v,{event:"mousedown"}),T=aE(v),P=fE(v,{role:"listbox"}),R=cE(v,{listRef:w,activeIndex:l,selectedIndex:f,onNavigate:u,loop:!0}),I=dE(v,{listRef:A,activeIndex:l,selectedIndex:f,onMatch:a?u:c,onTypingChange(b){k.current=b}}),{getReferenceProps:O,getFloatingProps:j,getItemProps:M}=lE([T,P,R,I,C]),L=b=>{c(b),m[b]!==void 0&&(n==null||n({type:"text",text:m[b]??"",value:d[m[b]]??""})),s(!1)};return S.jsxs(S.Fragment,{children:[S.jsxs("div",{tabIndex:0,ref:g.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":f!==null&&!t?"":void 0,style:r?{pointerEvents:"none"}:void 0,...(D=p.button)==null?void 0:D.container,...O(),children:[S.jsx("span",{...(z=p.button)==null?void 0:z.text,children:f?m[f]:"Select..."}),S.jsx(P0,{...(U=p.button)==null?void 0:U.icon})]}),a&&S.jsx(ZS,{root:o??void 0,children:S.jsx(eE,{context:v,modal:!1,children:S.jsx("div",{ref:g.setFloating,className:(V=($=p.content)==null?void 0:$.container)==null?void 0:V.className,style:{...y,pointerEvents:"auto"},...j(),children:m.map((b,N)=>{var H;return S.jsx("div",{ref:x=>{w.current[N]=x},role:"option",tabIndex:N===l?0:-1,"aria-selected":N===f&&N===l,"data-active":N===l?"":void 0,...(H=p.content)==null?void 0:H.item,...M({onClick(){L(N)},onKeyDown(x){x.key==="Enter"&&(x.preventDefault(),L(N)),x.key===" "&&!k.current&&(x.preventDefault(),L(N))}}),children:b},b)})})})})]})},Ed=_.forwardRef(({title:e,url:t,isReadOnly:n,...r},i)=>{const{message:{blocks:{file:o}}}=ge;return S.jsxs("a",{...r,...o.container,href:t,style:n?{pointerEvents:"none"}:void 0,download:!0,ref:i,target:"_blank",rel:"noreferrer",children:[S.jsx("p",{...o.title,children:e||t}),S.jsx(z0,{...o.icon})]})});Ed.displayName="File";const hE=_t()((e,t)=>({components:{},getCustomComponent:async n=>{const r=t().components[n];if(r)return r;const i=await fetch(n).then(u=>u.text()),o=new Blob([i],{type:"application/javascript"}),s=await import(URL.createObjectURL(o)),l=()=>s.default;return e(u=>({components:{...u.components,[n]:l}})),l}}));globalThis.React=_;const Cd={audio:hf,bubble:lf,button:P1,carousel:Cf,column:gf,dropdown:pE,file:Ed,image:df,location:mf,row:yf,text:i1,video:pf,custom:({url:e,name:t,data:n,...r})=>{const i=hE(u=>u.getCustomComponent),[o,a]=_.useState(null),[s,l]=_.useState(null);return _.useEffect(()=>{i(e).then(a).catch(u=>{l(u.message)})},[e]),s?S.jsx("div",{style:{color:"red"},children:s}):o?S.jsx(o,{...n,...r}):null}},Yt=({block:e,renderers:t,...n})=>{const r=(t==null?void 0:t[e.type])??Cd[e.type],i={...n,...e};return S.jsx(r,{...i})};function Ad(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=Ad(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function dr(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ad(e))&&(r&&(r+=" "),r+=t);return r}const mE=({disabled:e,onFileSelected:t})=>{const n=_.useRef(null),{uploadButton:r}=ge.composer,i=()=>{n.current&&n.current.click()},o=a=>{const s=a.target.files;s&&s.length>0&&Array.from(s).forEach(l=>{t(l)})};return S.jsxs(S.Fragment,{children:[S.jsx(Q0,{...r,role:"button",tabIndex:0,"aria-label":"Upload File Button","data-disabled":e,onClick:i}),S.jsx("input",{value:"",multiple:!0,type:"file",ref:n,style:{display:"none"},onChange:o})]})},gE=({name:e,type:t,instance:n,status:r,removeFile:i})=>{const{loader:o,fileIcon:a,removeIcon:s,errorIcon:l,previewImage:u}=ge.composer.fileWidget,f=["PNG","JPEG","JPG"].includes(pi(n.name));return r==="loading"?S.jsx(di,{name:e,status:r,removeButton:S.jsx("div",{...o}),extension:pi(n.name),children:S.jsx("div",{...a.container,children:S.jsx(Ra,{type:t,...a.icon})})}):r==="error"?S.jsx(di,{name:e,status:r,removeButton:S.jsx(Id,{removeFile:()=>i(e)}),extension:"Upload Error",children:S.jsxs("div",{...a.container,children:[S.jsx(F0,{...l}),S.jsx(Ra,{type:t,...a.icon})]})}):r=="uploaded"&&f?S.jsx(di,{name:e,status:r,removeButton:S.jsx(Id,{removeFile:()=>i(e)}),extension:pi(n.name),children:S.jsx("div",{...a.container,children:S.jsx("img",{src:URL.createObjectURL(n),alt:e,...u})})}):S.jsx(di,{name:e,status:r,removeButton:S.jsx(_c,{onClick:()=>i(e),...s}),extension:pi(n.name),children:S.jsx("div",{...a.container,children:S.jsx(Ra,{type:t,...a.icon})})})},di=({name:e,status:t,removeButton:n,children:r,extension:i})=>{const{container:o,metadata:a}=ge.composer.fileWidget;return S.jsxs("div",{"data-status":t,title:e,...o,children:[n,r,S.jsxs("div",{...a.container,children:[S.jsx("div",{...a.name,children:e}),S.jsx("div",{...a.type,children:i})]})]})},Ra=({type:e,...t})=>e==="image"?S.jsx(U0,{...t}):e==="video"?S.jsx(t1,{...t}):e==="audio"?S.jsx(Lc,{...t}):S.jsx(Pc,{...t}),pi=e=>{if(!e)return"File";const t=e.split(".").pop();return t?t.toUpperCase():"File"},Id=({removeFile:e})=>{const{composer:{fileWidget:{removeIcon:t}}}=ge;return S.jsx(_c,{role:"button",tabIndex:0,"aria-label":"Remove File Button",onClick:()=>e(),...t})};function Ba(){return Ba=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},Ba.apply(null,arguments)}function yE(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var vE=_.useLayoutEffect,bE=function(t){var n=_.useRef(t);return vE(function(){n.current=t}),n},Td=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},wE=function(t,n){var r=_.useRef();return _.useCallback(function(i){t.current=i,r.current&&Td(r.current,null),r.current=n,n&&Td(n,i)},[n])},Od={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},xE=function(t){Object.keys(Od).forEach(function(n){t.style.setProperty(n,Od[n],"important")})},Dd=xE,Ke=null,Md=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function kE(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),Ke||(Ke=document.createElement("textarea"),Ke.setAttribute("tabindex","-1"),Ke.setAttribute("aria-hidden","true"),Dd(Ke)),Ke.parentNode===null&&document.body.appendChild(Ke);var i=e.paddingSize,o=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(p){var d=p;Ke.style[d]=a[d]}),Dd(Ke),Ke.value=t;var l=Md(Ke,e);Ke.value=t,l=Md(Ke,e),Ke.value="x";var u=Ke.scrollHeight-i,f=u*n;s==="border-box"&&(f=f+i+o),l=Math.max(f,l);var c=u*r;return s==="border-box"&&(c=c+i+o),l=Math.min(c,l),[l,u]}var _d=function(){},SE=function(t,n){return t.reduce(function(r,i){return r[i]=n[i],r},{})},EE=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],CE=!!document.documentElement.currentStyle,AE=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=SE(EE,n),i=r.boxSizing;if(i==="")return null;CE&&i==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var o=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),a=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:o,borderSize:a}},IE=AE;function Pd(e,t,n){var r=bE(n);E.useLayoutEffect(function(){var i=function(a){return r.current(a)};if(e)return e.addEventListener(t,i),function(){return e.removeEventListener(t,i)}},[])}var TE=function(t){Pd(window,"resize",t)},OE=function(t){Pd(document.fonts,"loadingdone",t)},DE=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],ME=function(t,n){var r=t.cacheMeasurements,i=t.maxRows,o=t.minRows,a=t.onChange,s=a===void 0?_d:a,l=t.onHeightChange,u=l===void 0?_d:l,f=yE(t,DE),c=f.value!==void 0,p=E.useRef(null),d=wE(p,n),m=E.useRef(0),h=E.useRef(),g=function(){var w=p.current,A=r&&h.current?h.current:IE(w);if(A){h.current=A;var k=kE(A,w.value||w.placeholder||"x",o,i),C=k[0],T=k[1];m.current!==C&&(m.current=C,w.style.setProperty("height",C+"px","important"),u(C,{rowHeight:T}))}},y=function(w){c||g(),s(w)};return E.useLayoutEffect(g),TE(g),OE(g),E.createElement("textarea",Ba({},f,{onChange:y,ref:d}))},_E=E.forwardRef(ME);const PE=({inputRef:e,composerPlaceholder:t,composerDisabled:n,textInput:r,historyIndex:i,setTextInput:o,setHistoryIndex:a,sendComposerMessage:s,allowFileUpload:l,onFilePasted:u})=>{const f=qc(h=>h.messageHistory),[c,p]=_.useState(""),{input:d}=ge.composer,m=h=>{if(!l||!u||!h.clipboardData)return;const g=Array.from(h.clipboardData.files);g.length>0&&(h.preventDefault(),g.forEach(y=>{u(y)}))};return S.jsx(_E,{...d,"aria-label":"Message Input",ref:e,placeholder:t??"Type your message...",disabled:n,value:r,"data-has-value":!!r,onChange:h=>{const g=h.target.value;o(g),f.includes(g)||a(-1)},onPaste:m,maxRows:5,onKeyDown:h=>{if(n)return;const g=h.nativeEvent;if(!(g.isComposing||g.keyCode===229)&&(h.key==="Enter"&&h.shiftKey?(h.preventDefault(),o(`${r}
|
|
279
279
|
`)):h.key==="Enter"&&(h.preventDefault(),s()),!(r.trim().includes(`
|
|
280
|
-
`)||r.trim().includes("\r")))){if(h.key==="ArrowUp"){h.preventDefault(),i===-1&&r.trim()!==""&&p(r);const
|
|
280
|
+
`)||r.trim().includes("\r")))){if(h.key==="ArrowUp"){h.preventDefault(),i===-1&&r.trim()!==""&&p(r);const y=Math.min(i+1,f.length-1);a(y),o(f[y]??"")}if(h.key==="ArrowDown"){h.preventDefault();const y=Math.max(i-1,-1);o(i===-1?r.trim():y===-1?c:f[y]??""),a(y)}}}})},NE=({disabled:e,setTextInput:t})=>{const[n,r]=_.useState(!1),i=_.useRef(null),{voiceButton:o}=ge.composer,a=window.SpeechRecognition||window.webkitSpeechRecognition,s=()=>{i.current||(i.current=new a);const l=i.current;l&&(l.continuous=!0,l.onresult=u=>{var c,p,d;const f=((d=(p=(c=u.results)==null?void 0:c[0])==null?void 0:p[0])==null?void 0:d.transcript)??"";t(f??""),l.stop(),r(!1)},n?(l.stop(),r(!1)):(l.start(),r(!0)))};if(a)return S.jsx(K0,{...o,tabIndex:0,"aria-label":"Voice Input Button",role:"button","data-show":!e,"data-listens":!!n,onClick:s})},Nd=_.memo(_.forwardRef(({className:e,inputRef:t,disableComposer:n,isReadOnly:r,allowFileUpload:i,disableSendButton:o,connected:a,composerPlaceholder:s,footer:l,sendMessage:u,uploadFile:f,storageKey:c,children:p,...d},m)=>{const{composer:h}=ge,g=n||r||!a,[y,v]=_.useState(""),[w,A]=_.useState(-1),k=of(c),C=k(M=>M.files),T=k(M=>M.setFiles),P=k(M=>M.deleteFile),R=k(M=>M.uploadFile),I=qc(M=>M.addMessageToHistory),O=!!y||C.filter(M=>M.status==="uploaded").length>0;t=t??_.useRef(null);const j=()=>{if(o)return;const M=C.filter(z=>z.status==="uploaded");if(!M.length&&!y)return;const L=(M==null?void 0:M.map(z=>{const U=z.url,$=z.type;return{video:{type:"video",videoUrl:U},audio:{type:"audio",audioUrl:U},image:{type:"image",imageUrl:U}}[$]??{title:z.name,type:"file",fileUrl:U}}))??[];y&&L.push({type:"text",text:y});let D;L.length==1?D=L[0]:D={type:"bloc",items:L.map(U=>{const{type:$,...V}=U;return{type:$,payload:V}})},v(""),y.trim()!==""&&(u==null||u(D),T([]),I(y),A(-1))};return r?null:S.jsxs(S.Fragment,{children:[S.jsxs("div",{"data-disabled":g,"data-waiting":o,className:dr(h.container.className,e),ref:m,...d,children:[p,C.length>0&&S.jsx("div",{...h==null?void 0:h.fileContainer,children:C.map(M=>S.jsx(gE,{...M,removeFile:P},M.name))}),S.jsxs("div",{...h.inputContainer,onClick:()=>{t&&"current"in t&&t.current&&t.current.focus()},children:[i&&S.jsx(mE,{disabled:g,onFileSelected:M=>{f&&R(M,f)}}),S.jsx(PE,{inputRef:t,composerPlaceholder:s,composerDisabled:g,textInput:y,historyIndex:w,setTextInput:v,setHistoryIndex:A,sendComposerMessage:j,allowFileUpload:i,onFilePasted:M=>{f&&R(M,f)}}),o&&S.jsx(H0,{...h.inputLoader,role:"status","data-show":o}),!g&&!o&&S.jsxs(S.Fragment,{children:[S.jsx(M0,{...h.sendbutton,role:"button",tabIndex:0,"aria-label":"Send Message Button","data-show":O,onClick:()=>j()}),S.jsx(NE,{disabled:O,setTextInput:v})]})]})]}),S.jsx(Qu,{components:{a:({node:M,...L})=>S.jsx("a",{...L,target:"_blank",rel:"noreferrer noopener"})},allowedElements:["a","strong","code","em","p","span"],...h.footer,children:l})]})}));var za={exports:{}},hi={exports:{}},Ce={};/** @license React v16.13.1
|
|
281
281
|
* react-is.production.min.js
|
|
282
282
|
*
|
|
283
283
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
284
284
|
*
|
|
285
285
|
* This source code is licensed under the MIT license found in the
|
|
286
286
|
* LICENSE file in the root directory of this source tree.
|
|
287
|
-
*/var Ld;function LE(){if(Ld)return Ce;Ld=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,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,c=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,
|
|
287
|
+
*/var Ld;function LE(){if(Ld)return Ce;Ld=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,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,c=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function w(k){if(typeof k=="object"&&k!==null){var C=k.$$typeof;switch(C){case t:switch(k=k.type,k){case l:case u:case r:case o:case i:case c:return k;default:switch(k=k&&k.$$typeof,k){case s:case f:case m:case d:case a:return k;default:return C}}case n:return C}}}function A(k){return w(k)===u}return Ce.AsyncMode=l,Ce.ConcurrentMode=u,Ce.ContextConsumer=s,Ce.ContextProvider=a,Ce.Element=t,Ce.ForwardRef=f,Ce.Fragment=r,Ce.Lazy=m,Ce.Memo=d,Ce.Portal=n,Ce.Profiler=o,Ce.StrictMode=i,Ce.Suspense=c,Ce.isAsyncMode=function(k){return A(k)||w(k)===l},Ce.isConcurrentMode=A,Ce.isContextConsumer=function(k){return w(k)===s},Ce.isContextProvider=function(k){return w(k)===a},Ce.isElement=function(k){return typeof k=="object"&&k!==null&&k.$$typeof===t},Ce.isForwardRef=function(k){return w(k)===f},Ce.isFragment=function(k){return w(k)===r},Ce.isLazy=function(k){return w(k)===m},Ce.isMemo=function(k){return w(k)===d},Ce.isPortal=function(k){return w(k)===n},Ce.isProfiler=function(k){return w(k)===o},Ce.isStrictMode=function(k){return w(k)===i},Ce.isSuspense=function(k){return w(k)===c},Ce.isValidElementType=function(k){return typeof k=="string"||typeof k=="function"||k===r||k===u||k===o||k===i||k===c||k===p||typeof k=="object"&&k!==null&&(k.$$typeof===m||k.$$typeof===d||k.$$typeof===a||k.$$typeof===s||k.$$typeof===f||k.$$typeof===g||k.$$typeof===y||k.$$typeof===v||k.$$typeof===h)},Ce.typeOf=w,Ce}var Ae={};/** @license React v16.13.1
|
|
288
288
|
* react-is.development.js
|
|
289
289
|
*
|
|
290
290
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
291
291
|
*
|
|
292
292
|
* This source code is licensed under the MIT license found in the
|
|
293
293
|
* LICENSE file in the root directory of this source tree.
|
|
294
|
-
*/var Fd;function FE(){return Fd||(Fd=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,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,c=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,
|
|
294
|
+
*/var Fd;function FE(){return Fd||(Fd=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,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,c=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function w(F){return typeof F=="string"||typeof F=="function"||F===r||F===u||F===o||F===i||F===c||F===p||typeof F=="object"&&F!==null&&(F.$$typeof===m||F.$$typeof===d||F.$$typeof===a||F.$$typeof===s||F.$$typeof===f||F.$$typeof===g||F.$$typeof===y||F.$$typeof===v||F.$$typeof===h)}function A(F){if(typeof F=="object"&&F!==null){var ne=F.$$typeof;switch(ne){case t:var me=F.type;switch(me){case l:case u:case r:case o:case i:case c:return me;default:var ke=me&&me.$$typeof;switch(ke){case s:case f:case m:case d:case a:return ke;default:return ne}}case n:return ne}}}var k=l,C=u,T=s,P=a,R=t,I=f,O=r,j=m,M=d,L=n,D=o,z=i,U=c,$=!1;function V(F){return $||($=!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.")),b(F)||A(F)===l}function b(F){return A(F)===u}function N(F){return A(F)===s}function H(F){return A(F)===a}function x(F){return typeof F=="object"&&F!==null&&F.$$typeof===t}function W(F){return A(F)===f}function ee(F){return A(F)===r}function Y(F){return A(F)===m}function J(F){return A(F)===d}function X(F){return A(F)===n}function ie(F){return A(F)===o}function K(F){return A(F)===i}function te(F){return A(F)===c}Ae.AsyncMode=k,Ae.ConcurrentMode=C,Ae.ContextConsumer=T,Ae.ContextProvider=P,Ae.Element=R,Ae.ForwardRef=I,Ae.Fragment=O,Ae.Lazy=j,Ae.Memo=M,Ae.Portal=L,Ae.Profiler=D,Ae.StrictMode=z,Ae.Suspense=U,Ae.isAsyncMode=V,Ae.isConcurrentMode=b,Ae.isContextConsumer=N,Ae.isContextProvider=H,Ae.isElement=x,Ae.isForwardRef=W,Ae.isFragment=ee,Ae.isLazy=Y,Ae.isMemo=J,Ae.isPortal=X,Ae.isProfiler=ie,Ae.isStrictMode=K,Ae.isSuspense=te,Ae.isValidElementType=w,Ae.typeOf=A}()),Ae}var Rd;function Bd(){return Rd||(Rd=1,process.env.NODE_ENV==="production"?hi.exports=LE():hi.exports=FE()),hi.exports}/*
|
|
295
295
|
object-assign
|
|
296
296
|
(c) Sindre Sorhus
|
|
297
297
|
@license MIT
|
|
298
|
-
*/var
|
|
299
|
-
Valid keys: `+JSON.stringify(Object.keys(b),null," "));var
|
|
300
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iC(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function oC(e){if(Array.isArray(e))return
|
|
301
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ep(e,t){if(e){if(typeof e=="string")return
|
|
302
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DC(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function MC(e){if(Array.isArray(e))return
|
|
303
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lp(e,t){if(e){if(typeof e=="string")return Za(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Za(e,t)}}function Za(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function PC(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function NC(e){if(Array.isArray(e))return e}function up(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ne(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?up(Object(n),!0).forEach(function(r){Xa(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):up(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vi(e,t){if(e==null)return{};var n=LC(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function LC(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var es=F.forwardRef(function(e,t){var n=e.children,r=vi(e,EC),i=fp(r),o=i.open,a=vi(i,CC);return F.useImperativeHandle(t,function(){return{open:o}},[o]),F.createElement(F.Fragment,null,n(Ne(Ne({},a),{},{open:o})))});es.displayName="Dropzone";var cp={disabled:!1,getFilesFromEvent:KE,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};es.defaultProps=cp,es.propTypes={children:Te.func,accept:Te.objectOf(Te.arrayOf(Te.string)),multiple:Te.bool,preventDropOnDocument:Te.bool,noClick:Te.bool,noKeyboard:Te.bool,noDrag:Te.bool,noDragEventsBubbling:Te.bool,minSize:Te.number,maxSize:Te.number,maxFiles:Te.number,disabled:Te.bool,getFilesFromEvent:Te.func,onFileDialogCancel:Te.func,onFileDialogOpen:Te.func,useFsAccessApi:Te.bool,autoFocus:Te.bool,onDragEnter:Te.func,onDragLeave:Te.func,onDragOver:Te.func,onDrop:Te.func,onDropAccepted:Te.func,onDropRejected:Te.func,onError:Te.func,validator:Te.func};var ts={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function fp(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Ne(Ne({},cp),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,f=t.onDragLeave,c=t.onDragOver,p=t.onDrop,d=t.onDropAccepted,m=t.onDropRejected,h=t.onFileDialogCancel,y=t.onFileDialogOpen,g=t.useFsAccessApi,v=t.autoFocus,x=t.preventDropOnDocument,A=t.noClick,k=t.noKeyboard,C=t.noDrag,T=t.noDragEventsBubbling,M=t.onError,R=t.validator,I=F.useMemo(function(){return wC(n)},[n]),O=F.useMemo(function(){return xC(n)},[n]),j=F.useMemo(function(){return typeof y=="function"?y:dp},[y]),_=F.useMemo(function(){return typeof h=="function"?h:dp},[h]),N=F.useRef(null),D=F.useRef(null),z=F.useReducer(FC,ts),U=Ja(z,2),$=U[0],V=U[1],b=$.isFocused,P=$.isFileDialogActive,H=F.useRef(typeof window<"u"&&window.isSecureContext&&g&&bC()),w=function(){!H.current&&P&&setTimeout(function(){if(D.current){var se=D.current.files;se.length||(V({type:"closeDialog"}),_())}},300)};F.useEffect(function(){return window.addEventListener("focus",w,!1),function(){window.removeEventListener("focus",w,!1)}},[D,P,_,H]);var W=F.useRef([]),X=function(se){N.current&&N.current.contains(se.target)||(se.preventDefault(),W.current=[])};F.useEffect(function(){return x&&(document.addEventListener("dragover",op,!1),document.addEventListener("drop",X,!1)),function(){x&&(document.removeEventListener("dragover",op),document.removeEventListener("drop",X))}},[N,x]),F.useEffect(function(){return!r&&v&&N.current&&N.current.focus(),function(){}},[N,v,r]);var Y=F.useCallback(function(Z){M?M(Z):console.error(Z)},[M]),J=F.useCallback(function(Z){Z.preventDefault(),Z.persist(),xe(Z),W.current=[].concat(TC(W.current),[Z.target]),yi(Z)&&Promise.resolve(i(Z)).then(function(se){if(!(gi(Z)&&!T)){var B=se.length,q=B>0&&mC({files:se,accept:I,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:R}),ae=B>0&&!q;V({isDragAccept:q,isDragReject:ae,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Z)}}).catch(function(se){return Y(se)})},[i,u,Y,T,I,a,o,s,l,R]),ee=F.useCallback(function(Z){Z.preventDefault(),Z.persist(),xe(Z);var se=yi(Z);if(se&&Z.dataTransfer)try{Z.dataTransfer.dropEffect="copy"}catch{}return se&&c&&c(Z),!1},[c,T]),ie=F.useCallback(function(Z){Z.preventDefault(),Z.persist(),xe(Z);var se=W.current.filter(function(q){return N.current&&N.current.contains(q)}),B=se.indexOf(Z.target);B!==-1&&se.splice(B,1),W.current=se,!(se.length>0)&&(V({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),yi(Z)&&f&&f(Z))},[N,f,T]),K=F.useCallback(function(Z,se){var B=[],q=[];Z.forEach(function(ae){var le=rp(ae,I),pe=Ja(le,2),fe=pe[0],Ee=pe[1],Oe=ip(ae,a,o),st=Ja(Oe,2),gt=st[0],ze=st[1],lt=R?R(ae):null;if(fe&>&&!lt)B.push(ae);else{var Ge=[Ee,ze];lt&&(Ge=Ge.concat(lt)),q.push({file:ae,errors:Ge.filter(function(zi){return zi})})}}),(!s&&B.length>1||s&&l>=1&&B.length>l)&&(B.forEach(function(ae){q.push({file:ae,errors:[hC]})}),B.splice(0)),V({acceptedFiles:B,fileRejections:q,type:"setFiles"}),p&&p(B,q,se),q.length>0&&m&&m(q,se),B.length>0&&d&&d(B,se)},[V,s,I,a,o,l,p,d,m,R]),te=F.useCallback(function(Z){Z.preventDefault(),Z.persist(),xe(Z),W.current=[],yi(Z)&&Promise.resolve(i(Z)).then(function(se){gi(Z)&&!T||K(se,Z)}).catch(function(se){return Y(se)}),V({type:"reset"})},[i,K,Y,T]),L=F.useCallback(function(){if(H.current){V({type:"openDialog"}),j();var Z={multiple:s,types:O};window.showOpenFilePicker(Z).then(function(se){return i(se)}).then(function(se){K(se,null),V({type:"closeDialog"})}).catch(function(se){kC(se)?(_(se),V({type:"closeDialog"})):SC(se)?(H.current=!1,D.current?(D.current.value=null,D.current.click()):Y(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):Y(se)});return}D.current&&(V({type:"openDialog"}),j(),D.current.value=null,D.current.click())},[V,j,_,g,K,Y,O,s]),ne=F.useCallback(function(Z){!N.current||!N.current.isEqualNode(Z.target)||(Z.key===" "||Z.key==="Enter"||Z.keyCode===32||Z.keyCode===13)&&(Z.preventDefault(),L())},[N,L]),me=F.useCallback(function(){V({type:"focus"})},[]),ke=F.useCallback(function(){V({type:"blur"})},[]),oe=F.useCallback(function(){A||(vC()?setTimeout(L,0):L())},[A,L]),G=function(se){return r?null:se},ue=function(se){return k?null:G(se)},de=function(se){return C?null:G(se)},xe=function(se){T&&se.stopPropagation()},Se=F.useMemo(function(){return function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},se=Z.refKey,B=se===void 0?"ref":se,q=Z.role,ae=Z.onKeyDown,le=Z.onFocus,pe=Z.onBlur,fe=Z.onClick,Ee=Z.onDragEnter,Oe=Z.onDragOver,st=Z.onDragLeave,gt=Z.onDrop,ze=vi(Z,AC);return Ne(Ne(Xa({onKeyDown:ue(kt(ae,ne)),onFocus:ue(kt(le,me)),onBlur:ue(kt(pe,ke)),onClick:G(kt(fe,oe)),onDragEnter:de(kt(Ee,J)),onDragOver:de(kt(Oe,ee)),onDragLeave:de(kt(st,ie)),onDrop:de(kt(gt,te)),role:typeof q=="string"&&q!==""?q:"presentation"},B,N),!r&&!k?{tabIndex:0}:{}),ze)}},[N,ne,me,ke,oe,J,ee,ie,te,k,C,r]),Ue=F.useCallback(function(Z){Z.stopPropagation()},[]),Ye=F.useMemo(function(){return function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},se=Z.refKey,B=se===void 0?"ref":se,q=Z.onChange,ae=Z.onClick,le=vi(Z,IC),pe=Xa({accept:I,multiple:s,type:"file",style:{display:"none"},onChange:G(kt(q,te)),onClick:G(kt(ae,Ue)),tabIndex:-1},B,D);return Ne(Ne({},pe),le)}},[D,n,s,te,r]);return Ne(Ne({},$),{},{isFocused:b&&!r,getRootProps:Se,getInputProps:Ye,rootRef:N,inputRef:D,open:G(L)})}function FC(e,t){switch(t.type){case"focus":return Ne(Ne({},e),{},{isFocused:!0});case"blur":return Ne(Ne({},e),{},{isFocused:!1});case"openDialog":return Ne(Ne({},ts),{},{isFileDialogActive:!0});case"closeDialog":return Ne(Ne({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Ne(Ne({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Ne(Ne({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Ne({},ts);default:return e}}function dp(){}const pp=({children:e})=>{const t=F.useRef(null),[n,r]=F.useState({open:!1}),i=({title:a,description:s,confirmButtonText:l,cancelButtonText:u,onConfirm:f,onCancel:c,initialValue:p,Content:d})=>new Promise((m,h)=>{t.current=p,r({open:!0,title:a,description:s,confirmButtonText:l,cancelButtonText:u,content:d?S.jsx(d,{value:p,setValue:y=>{t.current=y}}):null,onConfirm:()=>{f==null||f(),m(t.current),o()},onCancel:()=>{c==null||c(),h(),o()}})}),o=()=>{r(a=>({...a,open:!1}))};return S.jsxs(aa,{value:{showInputModal:i},children:[S.jsx(In,{open:n.open,onOpenChange:a=>r(s=>({...s,open:a})),children:S.jsx(In.Content,{title:n.title,description:n.description,confirmButtonText:n.confirmButtonText,cancelButtonText:n.cancelButtonText,onConfirm:n.onConfirm,onCancel:n.onCancel,children:n.content})}),e]})},RC=(e,t)=>{const n=e.replace(/\s+/g,"+");if(!e.replace(/[^a-zA-Z0-9\s\-_]/g,"").trim())return;const i=t.filter(l=>/^\d+$/.test(l)).join(";"),o=`https://fonts.googleapis.com/css2?family=${n}:wght@${i}&display=swap`;if(document.querySelector(`link[href="${o}"]`))return;const s=document.createElement("link");s.rel="stylesheet",s.href=o,document.head.appendChild(s)},hp=({color:e,fontFamily:t,radius:n,themeMode:r,variant:i,headerVariant:o,additionalStylesheetUrl:a})=>{F.useMemo(()=>{t&&RC(t,["100","200","300","400","500","600","700","800"])},[t]);const s=F.useMemo(()=>ll({color:e,fontFamily:t,radius:n,themeMode:r,variant:i,headerVariant:o}),[e,t,n,r,i,o]);return S.jsxs(S.Fragment,{children:[a&&S.jsx("link",{rel:"stylesheet",href:a}),S.jsxs("style",{children:[s,`
|
|
298
|
+
*/var $a,zd;function RE(){if(zd)return $a;zd=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(a).map(function(f){return a[f]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(f){u[f]=f}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return $a=i()?Object.assign:function(o,a){for(var s,l=r(o),u,f=1;f<arguments.length;f++){s=Object(arguments[f]);for(var c in s)t.call(s,c)&&(l[c]=s[c]);if(e){u=e(s);for(var p=0;p<u.length;p++)n.call(s,u[p])&&(l[u[p]]=s[u[p]])}}return l},$a}var ja,$d;function Ua(){if($d)return ja;$d=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ja=e,ja}var Ha,jd;function Ud(){return jd||(jd=1,Ha=Function.call.bind(Object.prototype.hasOwnProperty)),Ha}var Wa,Hd;function BE(){if(Hd)return Wa;Hd=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Ua(),n={},r=Ud();e=function(o){var a="Warning: "+o;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(o,a,s,l,u){if(process.env.NODE_ENV!=="production"){for(var f in o)if(r(o,f)){var c;try{if(typeof o[f]!="function"){var p=Error((l||"React class")+": "+s+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}c=o[f](a,f,l,s,null,t)}catch(m){c=m}if(c&&!(c instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof c+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),c instanceof Error&&!(c.message in n)){n[c.message]=!0;var d=u?u():"";e("Failed "+s+" type: "+c.message+(d??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Wa=i,Wa}var Va,Wd;function zE(){if(Wd)return Va;Wd=1;var e=Bd(),t=RE(),n=Ua(),r=Ud(),i=BE(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return Va=function(s,l){var u=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function c(b){var N=b&&(u&&b[u]||b[f]);if(typeof N=="function")return N}var p="<<anonymous>>",d={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:v(),arrayOf:w,element:A(),elementType:k(),instanceOf:C,node:I(),objectOf:P,oneOf:T,oneOfType:R,shape:j,exact:M};function m(b,N){return b===N?b!==0||1/b===1/N:b!==b&&N!==N}function h(b,N){this.message=b,this.data=N&&typeof N=="object"?N:{},this.stack=""}h.prototype=Error.prototype;function g(b){if(process.env.NODE_ENV!=="production")var N={},H=0;function x(ee,Y,J,X,ie,K,te){if(X=X||p,K=K||J,te!==n){if(l){var F=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 F.name="Invariant Violation",F}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ne=X+":"+J;!N[ne]&&H<3&&(o("You are manually calling a React.PropTypes validation function for the `"+K+"` prop on `"+X+"`. 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."),N[ne]=!0,H++)}}return Y[J]==null?ee?Y[J]===null?new h("The "+ie+" `"+K+"` is marked as required "+("in `"+X+"`, but its value is `null`.")):new h("The "+ie+" `"+K+"` is marked as required in "+("`"+X+"`, but its value is `undefined`.")):null:b(Y,J,X,ie,K)}var W=x.bind(null,!1);return W.isRequired=x.bind(null,!0),W}function y(b){function N(H,x,W,ee,Y,J){var X=H[x],ie=z(X);if(ie!==b){var K=U(X);return new h("Invalid "+ee+" `"+Y+"` of type "+("`"+K+"` supplied to `"+W+"`, expected ")+("`"+b+"`."),{expectedType:b})}return null}return g(N)}function v(){return g(a)}function w(b){function N(H,x,W,ee,Y){if(typeof b!="function")return new h("Property `"+Y+"` of component `"+W+"` has invalid PropType notation inside arrayOf.");var J=H[x];if(!Array.isArray(J)){var X=z(J);return new h("Invalid "+ee+" `"+Y+"` of type "+("`"+X+"` supplied to `"+W+"`, expected an array."))}for(var ie=0;ie<J.length;ie++){var K=b(J,ie,W,ee,Y+"["+ie+"]",n);if(K instanceof Error)return K}return null}return g(N)}function A(){function b(N,H,x,W,ee){var Y=N[H];if(!s(Y)){var J=z(Y);return new h("Invalid "+W+" `"+ee+"` of type "+("`"+J+"` supplied to `"+x+"`, expected a single ReactElement."))}return null}return g(b)}function k(){function b(N,H,x,W,ee){var Y=N[H];if(!e.isValidElementType(Y)){var J=z(Y);return new h("Invalid "+W+" `"+ee+"` of type "+("`"+J+"` supplied to `"+x+"`, expected a single ReactElement type."))}return null}return g(b)}function C(b){function N(H,x,W,ee,Y){if(!(H[x]instanceof b)){var J=b.name||p,X=V(H[x]);return new h("Invalid "+ee+" `"+Y+"` of type "+("`"+X+"` supplied to `"+W+"`, expected ")+("instance of `"+J+"`."))}return null}return g(N)}function T(b){if(!Array.isArray(b))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("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])."):o("Invalid argument supplied to oneOf, expected an array.")),a;function N(H,x,W,ee,Y){for(var J=H[x],X=0;X<b.length;X++)if(m(J,b[X]))return null;var ie=JSON.stringify(b,function(te,F){var ne=U(F);return ne==="symbol"?String(F):F});return new h("Invalid "+ee+" `"+Y+"` of value `"+String(J)+"` "+("supplied to `"+W+"`, expected one of "+ie+"."))}return g(N)}function P(b){function N(H,x,W,ee,Y){if(typeof b!="function")return new h("Property `"+Y+"` of component `"+W+"` has invalid PropType notation inside objectOf.");var J=H[x],X=z(J);if(X!=="object")return new h("Invalid "+ee+" `"+Y+"` of type "+("`"+X+"` supplied to `"+W+"`, expected an object."));for(var ie in J)if(r(J,ie)){var K=b(J,ie,W,ee,Y+"."+ie,n);if(K instanceof Error)return K}return null}return g(N)}function R(b){if(!Array.isArray(b))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var N=0;N<b.length;N++){var H=b[N];if(typeof H!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+$(H)+" at index "+N+"."),a}function x(W,ee,Y,J,X){for(var ie=[],K=0;K<b.length;K++){var te=b[K],F=te(W,ee,Y,J,X,n);if(F==null)return null;F.data&&r(F.data,"expectedType")&&ie.push(F.data.expectedType)}var ne=ie.length>0?", expected one of type ["+ie.join(", ")+"]":"";return new h("Invalid "+J+" `"+X+"` supplied to "+("`"+Y+"`"+ne+"."))}return g(x)}function I(){function b(N,H,x,W,ee){return L(N[H])?null:new h("Invalid "+W+" `"+ee+"` supplied to "+("`"+x+"`, expected a ReactNode."))}return g(b)}function O(b,N,H,x,W){return new h((b||"React class")+": "+N+" type `"+H+"."+x+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+W+"`.")}function j(b){function N(H,x,W,ee,Y){var J=H[x],X=z(J);if(X!=="object")return new h("Invalid "+ee+" `"+Y+"` of type `"+X+"` "+("supplied to `"+W+"`, expected `object`."));for(var ie in b){var K=b[ie];if(typeof K!="function")return O(W,ee,Y,ie,U(K));var te=K(J,ie,W,ee,Y+"."+ie,n);if(te)return te}return null}return g(N)}function M(b){function N(H,x,W,ee,Y){var J=H[x],X=z(J);if(X!=="object")return new h("Invalid "+ee+" `"+Y+"` of type `"+X+"` "+("supplied to `"+W+"`, expected `object`."));var ie=t({},H[x],b);for(var K in ie){var te=b[K];if(r(b,K)&&typeof te!="function")return O(W,ee,Y,K,U(te));if(!te)return new h("Invalid "+ee+" `"+Y+"` key `"+K+"` supplied to `"+W+"`.\nBad object: "+JSON.stringify(H[x],null," ")+`
|
|
299
|
+
Valid keys: `+JSON.stringify(Object.keys(b),null," "));var F=te(J,K,W,ee,Y+"."+K,n);if(F)return F}return null}return g(N)}function L(b){switch(typeof b){case"number":case"string":case"undefined":return!0;case"boolean":return!b;case"object":if(Array.isArray(b))return b.every(L);if(b===null||s(b))return!0;var N=c(b);if(N){var H=N.call(b),x;if(N!==b.entries){for(;!(x=H.next()).done;)if(!L(x.value))return!1}else for(;!(x=H.next()).done;){var W=x.value;if(W&&!L(W[1]))return!1}}else return!1;return!0;default:return!1}}function D(b,N){return b==="symbol"?!0:N?N["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&N instanceof Symbol:!1}function z(b){var N=typeof b;return Array.isArray(b)?"array":b instanceof RegExp?"object":D(N,b)?"symbol":N}function U(b){if(typeof b>"u"||b===null)return""+b;var N=z(b);if(N==="object"){if(b instanceof Date)return"date";if(b instanceof RegExp)return"regexp"}return N}function $(b){var N=U(b);switch(N){case"array":case"object":return"an "+N;case"boolean":case"date":case"regexp":return"a "+N;default:return N}}function V(b){return!b.constructor||!b.constructor.name?p:b.constructor.name}return d.checkPropTypes=i,d.resetWarningCache=i.resetWarningCache,d.PropTypes=d,d},Va}var qa,Vd;function $E(){if(Vd)return qa;Vd=1;var e=Ua();function t(){}function n(){}return n.resetWarningCache=t,qa=function(){function r(a,s,l,u,f,c){if(c!==e){var p=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 p.name="Invariant Violation",p}}r.isRequired=r;function i(){return r}var o={array:r,bigint: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 o.PropTypes=o,o},qa}if(process.env.NODE_ENV!=="production"){var jE=Bd(),UE=!0;za.exports=zE()(jE.isElement,UE)}else za.exports=$E()();var HE=za.exports;const Te=jt(HE);var WE=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function pr(e,t){var n=VE(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function VE(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=WE.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var qE=[".DS_Store","Thumbs.db"];function KE(e){return ln(this,void 0,void 0,function(){return un(this,function(t){return mi(e)&&YE(e.dataTransfer)?[2,ZE(e.dataTransfer,e.type)]:GE(e)?[2,QE(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,JE(e)]:[2,[]]})})}function YE(e){return mi(e)}function GE(e){return mi(e)&&mi(e.target)}function mi(e){return typeof e=="object"&&e!==null}function QE(e){return Ka(e.target.files).map(function(t){return pr(t)})}function JE(e){return ln(this,void 0,void 0,function(){var t;return un(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return pr(r)})]}})})}function ZE(e,t){return ln(this,void 0,void 0,function(){var n,r;return un(this,function(i){switch(i.label){case 0:return e.items?(n=Ka(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(XE))]):[3,2];case 1:return r=i.sent(),[2,qd(Kd(r))];case 2:return[2,qd(Ka(e.files).map(function(o){return pr(o)}))]}})})}function qd(e){return e.filter(function(t){return qE.indexOf(t.name)===-1})}function Ka(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function XE(e){if(typeof e.webkitGetAsEntry!="function")return Yd(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?Gd(t):Yd(e)}function Kd(e){return e.reduce(function(t,n){return sa(sa([],ff(t),!1),ff(Array.isArray(n)?Kd(n):[n]),!1)},[])}function Yd(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=pr(t);return Promise.resolve(n)}function eC(e){return ln(this,void 0,void 0,function(){return un(this,function(t){return[2,e.isDirectory?Gd(e):tC(e)]})})}function Gd(e){var t=e.createReader();return new Promise(function(n,r){var i=[];function o(){var a=this;t.readEntries(function(s){return ln(a,void 0,void 0,function(){var l,u,f;return un(this,function(c){switch(c.label){case 0:if(s.length)return[3,5];c.label=1;case 1:return c.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return l=c.sent(),n(l),[3,4];case 3:return u=c.sent(),r(u),[3,4];case 4:return[3,6];case 5:f=Promise.all(s.map(eC)),i.push(f),o(),c.label=6;case 6:return[2]}})})},function(s){r(s)})}o()})}function tC(e){return ln(this,void 0,void 0,function(){return un(this,function(t){return[2,new Promise(function(n,r){e.file(function(i){var o=pr(i,e.fullPath);n(o)},function(i){r(i)})})]})})}var nC=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",i=(e.type||"").toLowerCase(),o=i.replace(/\/.*$/,"");return n.some(function(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?o===s.replace(/\/.*$/,""):i===s})}return!0};function Qd(e){return oC(e)||iC(e)||ep(e)||rC()}function rC(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
300
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iC(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function oC(e){if(Array.isArray(e))return Ya(e)}function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Zd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Jd(Object(n),!0).forEach(function(r){Xd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hr(e,t){return lC(e)||sC(e,t)||ep(e,t)||aC()}function aC(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
301
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ep(e,t){if(e){if(typeof e=="string")return Ya(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ya(e,t)}}function Ya(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function sC(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function lC(e){if(Array.isArray(e))return e}var uC="file-invalid-type",cC="file-too-large",fC="file-too-small",dC="too-many-files",pC=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:uC,message:"File type must be ".concat(n)}},tp=function(t){return{code:cC,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},np=function(t){return{code:fC,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},hC={code:dC,message:"Too many files"};function rp(e,t){var n=e.type==="application/x-moz-file"||nC(e,t);return[n,n?null:pC(t)]}function ip(e,t,n){if(Gt(e.size))if(Gt(t)&&Gt(n)){if(e.size>n)return[!1,tp(n)];if(e.size<t)return[!1,np(t)]}else{if(Gt(t)&&e.size<t)return[!1,np(t)];if(Gt(n)&&e.size>n)return[!1,tp(n)]}return[!0,null]}function Gt(e){return e!=null}function mC(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=rp(l,n),f=hr(u,1),c=f[0],p=ip(l,r,i),d=hr(p,1),m=d[0],h=s?s(l):null;return c&&m&&!h})}function gi(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function yi(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function op(e){e.preventDefault()}function gC(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function yC(e){return e.indexOf("Edge/")!==-1}function vC(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return gC(e)||yC(e)}function kt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return t.some(function(s){return!gi(r)&&s&&s.apply(void 0,[r].concat(o)),gi(r)})}}function bC(){return"showOpenFilePicker"in window}function wC(e){if(Gt(e)){var t=Object.entries(e).filter(function(n){var r=hr(n,2),i=r[0],o=r[1],a=!0;return ap(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),a=!1),(!Array.isArray(o)||!o.every(sp))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var i=hr(r,2),o=i[0],a=i[1];return Zd(Zd({},n),{},Xd({},o,a))},{});return[{description:"Files",accept:t}]}return e}function xC(e){if(Gt(e))return Object.entries(e).reduce(function(t,n){var r=hr(n,2),i=r[0],o=r[1];return[].concat(Qd(t),[i],Qd(o))},[]).filter(function(t){return ap(t)||sp(t)}).join(",")}function kC(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function SC(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function ap(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function sp(e){return/^.*\.[\w]+$/.test(e)}var EC=["children"],CC=["open"],AC=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],IC=["refKey","onChange","onClick"];function TC(e){return MC(e)||DC(e)||lp(e)||OC()}function OC(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
302
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DC(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function MC(e){if(Array.isArray(e))return Qa(e)}function Ga(e,t){return NC(e)||PC(e,t)||lp(e,t)||_C()}function _C(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
303
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lp(e,t){if(e){if(typeof e=="string")return Qa(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qa(e,t)}}function Qa(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function PC(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function NC(e){if(Array.isArray(e))return e}function up(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ne(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?up(Object(n),!0).forEach(function(r){Ja(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):up(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ja(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vi(e,t){if(e==null)return{};var n=LC(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function LC(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Za=_.forwardRef(function(e,t){var n=e.children,r=vi(e,EC),i=fp(r),o=i.open,a=vi(i,CC);return _.useImperativeHandle(t,function(){return{open:o}},[o]),_.createElement(_.Fragment,null,n(Ne(Ne({},a),{},{open:o})))});Za.displayName="Dropzone";var cp={disabled:!1,getFilesFromEvent:KE,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Za.defaultProps=cp,Za.propTypes={children:Te.func,accept:Te.objectOf(Te.arrayOf(Te.string)),multiple:Te.bool,preventDropOnDocument:Te.bool,noClick:Te.bool,noKeyboard:Te.bool,noDrag:Te.bool,noDragEventsBubbling:Te.bool,minSize:Te.number,maxSize:Te.number,maxFiles:Te.number,disabled:Te.bool,getFilesFromEvent:Te.func,onFileDialogCancel:Te.func,onFileDialogOpen:Te.func,useFsAccessApi:Te.bool,autoFocus:Te.bool,onDragEnter:Te.func,onDragLeave:Te.func,onDragOver:Te.func,onDrop:Te.func,onDropAccepted:Te.func,onDropRejected:Te.func,onError:Te.func,validator:Te.func};var Xa={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function fp(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Ne(Ne({},cp),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,f=t.onDragLeave,c=t.onDragOver,p=t.onDrop,d=t.onDropAccepted,m=t.onDropRejected,h=t.onFileDialogCancel,g=t.onFileDialogOpen,y=t.useFsAccessApi,v=t.autoFocus,w=t.preventDropOnDocument,A=t.noClick,k=t.noKeyboard,C=t.noDrag,T=t.noDragEventsBubbling,P=t.onError,R=t.validator,I=_.useMemo(function(){return xC(n)},[n]),O=_.useMemo(function(){return wC(n)},[n]),j=_.useMemo(function(){return typeof g=="function"?g:dp},[g]),M=_.useMemo(function(){return typeof h=="function"?h:dp},[h]),L=_.useRef(null),D=_.useRef(null),z=_.useReducer(FC,Xa),U=Ga(z,2),$=U[0],V=U[1],b=$.isFocused,N=$.isFileDialogActive,H=_.useRef(typeof window<"u"&&window.isSecureContext&&y&&bC()),x=function(){!H.current&&N&&setTimeout(function(){if(D.current){var se=D.current.files;se.length||(V({type:"closeDialog"}),M())}},300)};_.useEffect(function(){return window.addEventListener("focus",x,!1),function(){window.removeEventListener("focus",x,!1)}},[D,N,M,H]);var W=_.useRef([]),ee=function(se){L.current&&L.current.contains(se.target)||(se.preventDefault(),W.current=[])};_.useEffect(function(){return w&&(document.addEventListener("dragover",op,!1),document.addEventListener("drop",ee,!1)),function(){w&&(document.removeEventListener("dragover",op),document.removeEventListener("drop",ee))}},[L,w]),_.useEffect(function(){return!r&&v&&L.current&&L.current.focus(),function(){}},[L,v,r]);var Y=_.useCallback(function(Z){P?P(Z):console.error(Z)},[P]),J=_.useCallback(function(Z){Z.preventDefault(),Z.persist(),we(Z),W.current=[].concat(TC(W.current),[Z.target]),yi(Z)&&Promise.resolve(i(Z)).then(function(se){if(!(gi(Z)&&!T)){var B=se.length,q=B>0&&mC({files:se,accept:I,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:R}),ae=B>0&&!q;V({isDragAccept:q,isDragReject:ae,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Z)}}).catch(function(se){return Y(se)})},[i,u,Y,T,I,a,o,s,l,R]),X=_.useCallback(function(Z){Z.preventDefault(),Z.persist(),we(Z);var se=yi(Z);if(se&&Z.dataTransfer)try{Z.dataTransfer.dropEffect="copy"}catch{}return se&&c&&c(Z),!1},[c,T]),ie=_.useCallback(function(Z){Z.preventDefault(),Z.persist(),we(Z);var se=W.current.filter(function(q){return L.current&&L.current.contains(q)}),B=se.indexOf(Z.target);B!==-1&&se.splice(B,1),W.current=se,!(se.length>0)&&(V({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),yi(Z)&&f&&f(Z))},[L,f,T]),K=_.useCallback(function(Z,se){var B=[],q=[];Z.forEach(function(ae){var le=rp(ae,I),pe=Ga(le,2),fe=pe[0],Ee=pe[1],Oe=ip(ae,a,o),st=Ga(Oe,2),gt=st[0],ze=st[1],lt=R?R(ae):null;if(fe&>&&!lt)B.push(ae);else{var Ge=[Ee,ze];lt&&(Ge=Ge.concat(lt)),q.push({file:ae,errors:Ge.filter(function(Bi){return Bi})})}}),(!s&&B.length>1||s&&l>=1&&B.length>l)&&(B.forEach(function(ae){q.push({file:ae,errors:[hC]})}),B.splice(0)),V({acceptedFiles:B,fileRejections:q,type:"setFiles"}),p&&p(B,q,se),q.length>0&&m&&m(q,se),B.length>0&&d&&d(B,se)},[V,s,I,a,o,l,p,d,m,R]),te=_.useCallback(function(Z){Z.preventDefault(),Z.persist(),we(Z),W.current=[],yi(Z)&&Promise.resolve(i(Z)).then(function(se){gi(Z)&&!T||K(se,Z)}).catch(function(se){return Y(se)}),V({type:"reset"})},[i,K,Y,T]),F=_.useCallback(function(){if(H.current){V({type:"openDialog"}),j();var Z={multiple:s,types:O};window.showOpenFilePicker(Z).then(function(se){return i(se)}).then(function(se){K(se,null),V({type:"closeDialog"})}).catch(function(se){kC(se)?(M(se),V({type:"closeDialog"})):SC(se)?(H.current=!1,D.current?(D.current.value=null,D.current.click()):Y(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):Y(se)});return}D.current&&(V({type:"openDialog"}),j(),D.current.value=null,D.current.click())},[V,j,M,y,K,Y,O,s]),ne=_.useCallback(function(Z){!L.current||!L.current.isEqualNode(Z.target)||(Z.key===" "||Z.key==="Enter"||Z.keyCode===32||Z.keyCode===13)&&(Z.preventDefault(),F())},[L,F]),me=_.useCallback(function(){V({type:"focus"})},[]),ke=_.useCallback(function(){V({type:"blur"})},[]),oe=_.useCallback(function(){A||(vC()?setTimeout(F,0):F())},[A,F]),G=function(se){return r?null:se},ue=function(se){return k?null:G(se)},de=function(se){return C?null:G(se)},we=function(se){T&&se.stopPropagation()},Se=_.useMemo(function(){return function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},se=Z.refKey,B=se===void 0?"ref":se,q=Z.role,ae=Z.onKeyDown,le=Z.onFocus,pe=Z.onBlur,fe=Z.onClick,Ee=Z.onDragEnter,Oe=Z.onDragOver,st=Z.onDragLeave,gt=Z.onDrop,ze=vi(Z,AC);return Ne(Ne(Ja({onKeyDown:ue(kt(ae,ne)),onFocus:ue(kt(le,me)),onBlur:ue(kt(pe,ke)),onClick:G(kt(fe,oe)),onDragEnter:de(kt(Ee,J)),onDragOver:de(kt(Oe,X)),onDragLeave:de(kt(st,ie)),onDrop:de(kt(gt,te)),role:typeof q=="string"&&q!==""?q:"presentation"},B,L),!r&&!k?{tabIndex:0}:{}),ze)}},[L,ne,me,ke,oe,J,X,ie,te,k,C,r]),Ue=_.useCallback(function(Z){Z.stopPropagation()},[]),Ye=_.useMemo(function(){return function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},se=Z.refKey,B=se===void 0?"ref":se,q=Z.onChange,ae=Z.onClick,le=vi(Z,IC),pe=Ja({accept:I,multiple:s,type:"file",style:{display:"none"},onChange:G(kt(q,te)),onClick:G(kt(ae,Ue)),tabIndex:-1},B,D);return Ne(Ne({},pe),le)}},[D,n,s,te,r]);return Ne(Ne({},$),{},{isFocused:b&&!r,getRootProps:Se,getInputProps:Ye,rootRef:L,inputRef:D,open:G(F)})}function FC(e,t){switch(t.type){case"focus":return Ne(Ne({},e),{},{isFocused:!0});case"blur":return Ne(Ne({},e),{},{isFocused:!1});case"openDialog":return Ne(Ne({},Xa),{},{isFileDialogActive:!0});case"closeDialog":return Ne(Ne({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Ne(Ne({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Ne(Ne({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Ne({},Xa);default:return e}}function dp(){}const pp=({children:e})=>{const t=_.useRef(null),[n,r]=_.useState({open:!1}),i=({title:a,description:s,confirmButtonText:l,cancelButtonText:u,onConfirm:f,onCancel:c,initialValue:p,Content:d})=>new Promise((m,h)=>{t.current=p,r({open:!0,title:a,description:s,confirmButtonText:l,cancelButtonText:u,content:d?S.jsx(d,{value:p,setValue:g=>{t.current=g}}):null,onConfirm:()=>{f==null||f(),m(t.current),o()},onCancel:()=>{c==null||c(),h(),o()}})}),o=()=>{r(a=>({...a,open:!1}))};return S.jsxs(oa.Provider,{value:{showInputModal:i},children:[S.jsx(In,{open:n.open,onOpenChange:a=>r(s=>({...s,open:a})),children:S.jsx(In.Content,{title:n.title,description:n.description,confirmButtonText:n.confirmButtonText,cancelButtonText:n.cancelButtonText,onConfirm:n.onConfirm,onCancel:n.onCancel,children:n.content})}),e]})},RC=(e,t)=>{const n=e.replace(/\s+/g,"+");if(!e.replace(/[^a-zA-Z0-9\s\-_]/g,"").trim())return;const i=t.filter(l=>/^\d+$/.test(l)).join(";"),o=`https://fonts.googleapis.com/css2?family=${n}:wght@${i}&display=swap`;if(document.querySelector(`link[href="${o}"]`))return;const s=document.createElement("link");s.rel="stylesheet",s.href=o,document.head.appendChild(s)},hp=({color:e,fontFamily:t,radius:n,themeMode:r,variant:i,headerVariant:o,additionalStylesheetUrl:a})=>{_.useMemo(()=>{t&&RC(t,["100","200","300","400","500","600","700","800"])},[t]);const s=_.useMemo(()=>sl({color:e,fontFamily:t,radius:n,themeMode:r,variant:i,headerVariant:o}),[e,t,n,r,i,o]);return S.jsxs(S.Fragment,{children:[a&&S.jsx("link",{rel:"stylesheet",href:a}),S.jsxs("style",{children:[s,`
|
|
304
304
|
.bpWebchat {
|
|
305
305
|
border-radius: ${.375*(n??1)}rem;
|
|
306
306
|
}
|
|
307
307
|
.bpMessagePreview {
|
|
308
308
|
border-radius: ${.125*(n??1)}rem;
|
|
309
309
|
}
|
|
310
|
-
`]})]})},ns=({ref:e,children:t,className:n,uploadFile:r,allowFileUpload:i,storageKey:o,connected:a,...s})=>{const{container:l}=ge,u=sn(y=>y.setMessageContainerRef),c=af(o)(y=>y.uploadFile),[p,d]=F.useState(0);F.useEffect(()=>{u(e)},[e,u]);const m=F.useCallback(y=>{r&&(y.forEach(g=>c(g,r)),d(0))},[c,r]),{getRootProps:h}=fp({noClick:!0,noKeyboard:!0,onDrop:m,disabled:!(i&&r),onDragEnter:()=>d(y=>y+1),onDragLeave:()=>d(y=>y-1)});return S.jsxs("div",{...s,className:dr(l.className,n),ref:e,...h(),children:[S.jsxs("div",{"data-hover":p>0,...l.dropzone.overlay,children:["Drop files to upload",S.jsx(ig,{style:{width:"50px"}})]}),S.jsx(pp,{children:t})]})};ns.displayName="Container";const mp=({ref:e,onClick:t,imgUrl:n,...r})=>{const{fab:i}=ge,{container:o,icon:a,image:s}=i??{};return n?S.jsx("img",{src:n,role:"button",tabIndex:0,...s,draggable:"false",onClick:t}):S.jsx("div",{...r,...o,ref:e,onClick:t,children:S.jsx("div",{...a})})};mp.displayName="Fab";function At(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 BC(e,t){const n=E.createContext(t),r=o=>{const{children:a,...s}=o,l=E.useMemo(()=>s,Object.values(s));return S.jsx(n.Provider,{value:l,children:a})};r.displayName=e+"Provider";function i(o){const a=E.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function gp(e,t=[]){let n=[];function r(o,a){const s=E.createContext(a),l=n.length;n=[...n,a];const u=c=>{var g;const{scope:p,children:d,...m}=c,h=((g=p==null?void 0:p[e])==null?void 0:g[l])||s,y=E.useMemo(()=>m,Object.values(m));return S.jsx(h.Provider,{value:y,children:d})};u.displayName=o+"Provider";function f(c,p){var h;const d=((h=p==null?void 0:p[e])==null?void 0:h[l])||s,m=E.useContext(d);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${c}\` must be used within \`${o}\``)}return[u,f]}const i=()=>{const o=n.map(a=>E.createContext(a));return function(s){const l=(s==null?void 0:s[e])||o;return E.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,zC(i,...t)]}function zC(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const c=l(o)[`__scope${u}`];return{...s,...c}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var $C=E[" useInsertionEffect ".trim().toString()]||Tt;function yp({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,a]=jC({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:i;{const f=E.useRef(e!==void 0);E.useEffect(()=>{const c=f.current;c!==s&&console.warn(`${r} is changing from ${c?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=s},[s,r])}const u=E.useCallback(f=>{var c;if(s){const p=UC(f)?f(e):f;p!==e&&((c=a.current)==null||c.call(a,p))}else o(f)},[s,e,o,a]);return[l,u]}function jC({defaultProp:e,onChange:t}){const[n,r]=E.useState(e),i=E.useRef(n),o=E.useRef(t);return $C(()=>{o.current=t},[t]),E.useEffect(()=>{var a;i.current!==n&&((a=o.current)==null||a.call(o,n),i.current=n)},[n,i]),[n,r,o]}function UC(e){return typeof e=="function"}function vp(e){const t=HC(e),n=E.forwardRef((r,i)=>{const{children:o,...a}=r,s=E.Children.toArray(o),l=s.find(VC);if(l){const u=l.props.children,f=s.map(c=>c===l?E.Children.count(u)>1?E.Children.only(null):E.isValidElement(u)?u.props.children:null:c);return S.jsx(t,{...a,ref:i,children:E.isValidElement(u)?E.cloneElement(u,void 0,f):null})}return S.jsx(t,{...a,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function HC(e){const t=E.forwardRef((n,r)=>{const{children:i,...o}=n;if(E.isValidElement(i)){const a=KC(i),s=qC(o,i.props);return i.type!==E.Fragment&&(s.ref=r?Ui(r,a):a),E.cloneElement(i,s)}return E.Children.count(i)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var WC=Symbol("radix.slottable");function VC(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===WC}function qC(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{const l=o(...s);return i(...s),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function KC(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 YC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ht=YC.reduce((e,t)=>{const n=vp(`Primitive.${t}`),r=E.forwardRef((i,o)=>{const{asChild:a,...s}=i,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),S.jsx(l,{...s,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function GC(e,t){e&&Fs.flushSync(()=>e.dispatchEvent(t))}function QC(e,t){return E.useReducer((n,r)=>t[n][r]??n,e)}var bi=e=>{const{present:t,children:n}=e,r=JC(t),i=typeof n=="function"?n({present:r.isPresent}):E.Children.only(n),o=Ot(r.ref,ZC(i));return typeof n=="function"||r.isPresent?E.cloneElement(i,{ref:o}):null};bi.displayName="Presence";function JC(e){const[t,n]=E.useState(),r=E.useRef(null),i=E.useRef(e),o=E.useRef("none"),a=e?"mounted":"unmounted",[s,l]=QC(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const u=xi(r.current);o.current=s==="mounted"?u:"none"},[s]),Tt(()=>{const u=r.current,f=i.current;if(f!==e){const p=o.current,d=xi(u);e?l("MOUNT"):d==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&p!==d?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Tt(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,c=d=>{const h=xi(r.current).includes(CSS.escape(d.animationName));if(d.target===t&&h&&(l("ANIMATION_END"),!i.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},p=d=>{d.target===t&&(o.current=xi(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:E.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function xi(e){return(e==null?void 0:e.animationName)||"none"}function ZC(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 XC=E[" useId ".trim().toString()]||(()=>{}),eA=0;function wi(e){const[t,n]=E.useState(XC());return Tt(()=>{n(r=>r??String(eA++))},[e]),e||(t?`radix-${t}`:"")}var ki="Collapsible",[tA]=gp(ki),[nA,rs]=tA(ki),bp=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:a,...s}=e,[l,u]=yp({prop:r,defaultProp:i??!1,onChange:a,caller:ki});return S.jsx(nA,{scope:n,disabled:o,contentId:wi(),open:l,onOpenToggle:E.useCallback(()=>u(f=>!f),[u]),children:S.jsx(ht.div,{"data-state":os(l),"data-disabled":o?"":void 0,...s,ref:t})})});bp.displayName=ki;var xp="CollapsibleTrigger",wp=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=rs(xp,n);return S.jsx(ht.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":os(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:At(e.onClick,i.onOpenToggle)})});wp.displayName=xp;var is="CollapsibleContent",kp=E.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=rs(is,e.__scopeCollapsible);return S.jsx(bi,{present:n||i.open,children:({present:o})=>S.jsx(rA,{...r,ref:t,present:o})})});kp.displayName=is;var rA=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,a=rs(is,n),[s,l]=E.useState(r),u=E.useRef(null),f=Ot(t,u),c=E.useRef(0),p=c.current,d=E.useRef(0),m=d.current,h=a.open||s,y=E.useRef(h),g=E.useRef(void 0);return E.useEffect(()=>{const v=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(v)},[]),Tt(()=>{const v=u.current;if(v){g.current=g.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const x=v.getBoundingClientRect();c.current=x.height,d.current=x.width,y.current||(v.style.transitionDuration=g.current.transitionDuration,v.style.animationName=g.current.animationName),l(r)}},[a.open,r]),S.jsx(ht.div,{"data-state":os(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!h,...o,ref:f,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})});function os(e){return e?"open":"closed"}var iA=bp,oA=kp;const Sp=({onClick:e,...t})=>{const{header:n}=ge,r=i=>{i.stopPropagation(),e==null||e()};return S.jsx(Nl,{...t,...n.content.actions.icons,role:"button",tabIndex:0,"aria-label":"Close Chatbot Button",onClick:r,onKeyDown:i=>{i.key==="Enter"&&r(i)}})},as=({restartConversation:e,...t})=>{var o,a;const{header:n}=ge,{showInputModal:r}=sa(),i=async s=>{s.stopPropagation(),r?r({title:"Create New Conversation",description:"This will clear the current conversation and start a new one.",confirmButtonText:"New conversation",cancelButtonText:"Cancel"}).then(()=>e()):e()};return S.jsx(vg,{...t,...(a=(o=n==null?void 0:n.content)==null?void 0:o.actions)==null?void 0:a.icons,"aria-label":"Restart Conversation Button",tabIndex:0,role:"button",onClick:i})},mr=({icon:e,title:t,link:n,...r})=>{var a,s,l,u,f,c,p,d,m,h,y,g;const{header:i}=ge,o=e??og;return t?n?S.jsxs("a",{...r,...(s=(a=i.expandedContent)==null?void 0:a.descriptionItems)==null?void 0:s.container,href:n,target:"_blank",rel:"noreferrer noopener",children:[S.jsx(o,{...(u=(l=i.expandedContent)==null?void 0:l.descriptionItems)==null?void 0:u.icon}),S.jsx("p",{...(c=(f=i.expandedContent)==null?void 0:f.descriptionItems)==null?void 0:c.link,children:t})]}):S.jsxs("div",{...r,...(d=(p=i.expandedContent)==null?void 0:p.descriptionItems)==null?void 0:d.container,children:[S.jsx(o,{...(h=(m=i.expandedContent)==null?void 0:m.descriptionItems)==null?void 0:h.icon}),S.jsx("p",{...(g=(y=i.expandedContent)==null?void 0:y.descriptionItems)==null?void 0:g.text,children:t})]}):null},aA=({soundOn:e,toggleSound:t})=>{const n=o=>{o.stopPropagation(),t==null||t()},{header:r}=ge,i=e?Pl:Sg;return S.jsx("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),n(o))},title:e?"Disable chat sounds":"Enable chat sounds",...r.content.actions.icons,children:S.jsx(i,{size:16})})},Ep=({defaultOpen:e,closeWindow:t,configuration:n,restartConversation:r,disabled:i,soundOn:o,toggleSound:a,clientId:s,...l})=>{var m,h,y,g,v,x,A,k,C,T,M,R,I,O,j,_,N,D,z,U,$,V,b,P;const{header:u}=ge,[f,c]=F.useState(e),p=!!((m=n.email)!=null&&m.title)||!!((h=n.phone)!=null&&h.title)||!!((y=n.website)!=null&&y.title)||!!((g=n.termsOfService)!=null&&g.link)||!!((v=n.privacyPolicy)!=null&&v.link),d=p&&!i;return S.jsxs(iA,{open:d?f:!1,onOpenChange:c,"data-disabled":d?void 0:"",...u.container,...l,children:[S.jsxs(wp,{"aria-label":"Expand Header Button",...u.content.container,children:[S.jsx(Nn,{userId:s,src:n.botAvatar,...u.content.avatar,children:n.botName||"Bot"}),S.jsx("h2",{...u.content.title,children:n.botName||"Bot"}),n.botDescription&&S.jsx("p",{...u.content.description,children:n.botDescription}),S.jsxs("div",{...u.content.actions.container,children:[n.soundEnabled&&o!==void 0&&a&&S.jsx(aA,{soundOn:o,toggleSound:a})," ",r&&S.jsx(as,{restartConversation:r}),t&&S.jsx(Sp,{onClick:t})]})]}),p&&S.jsxs(oA,{...u.expandedContent.container,children:[S.jsxs("div",{"data-links":"",...u.expandedContent.group,children:[S.jsx(mr,{"data-email":"",icon:dg,title:(x=n.email)==null?void 0:x.title,link:(k=(A=n.email)==null?void 0:A.link)!=null&&k.startsWith("mailto:")?(C=n.email)==null?void 0:C.link:`mailto:${(T=n.email)==null?void 0:T.link}`}),S.jsx(mr,{"data-phone":"",icon:gg,title:(M=n.phone)==null?void 0:M.title,link:(I=(R=n.phone)==null?void 0:R.link)!=null&&I.startsWith("tel:")?(O=n.phone)==null?void 0:O.link:`tel:${(j=n.phone)==null?void 0:j.link}`}),S.jsx(mr,{"data-website":"",link:(_=n.website)==null?void 0:_.link,icon:lg,title:(N=n.website)==null?void 0:N.title})]}),S.jsxs("div",{"data-legal":"",...(D=u.expandedContent)==null?void 0:D.group,children:[((z=n.termsOfService)==null?void 0:z.link)&&S.jsx(mr,{"data-terms":"",link:(U=n.termsOfService)==null?void 0:U.link,icon:Ml,title:($=n.termsOfService)==null?void 0:$.title}),((V=n.privacyPolicy)==null?void 0:V.link)&&S.jsx(mr,{"data-privacy":"",link:(b=n.privacyPolicy)==null?void 0:b.link,icon:fg,title:(P=n.privacyPolicy)==null?void 0:P.title})]})]})]})},ss=F.memo(({...e})=>{const{typingIndicator:t}=ge;return S.jsx("div",{...e,...t==null?void 0:t.container,children:S.jsx("div",{...t==null?void 0:t.loader})})});ss.displayName="TypingIndicator";const Si=F.memo(({ref:e,direction:t,block:n,disableInput:r,children:i,sender:o,id:a,authorId:s,status:l,renderers:u,isReadOnly:f,isLastDeliveredMessage:c,feedback:p,timestamp:d,metadata:m,sendMessage:h,addMessageFeedback:y,showAvatar:g})=>{const[v,x]=F.useState([]),{message:{container:A,deliveryStatus:k}}=ge;return g=g??t==="incoming",S.jsx(oa,{value:{isLoading:v,setIsLoading:x},children:S.jsxs("div",{...A,className:dr(A==null?void 0:A.className,c&&(k==null?void 0:k.className)),"data-loaded":v.length===0,"data-disable-input":!!r,"data-direction":t,dir:"auto",ref:e,children:[t==="incoming"&&g&&S.jsx(Cp,{authorId:s,sender:o}),n&&S.jsx(Yt,{block:{...n,isReadOnly:f,direction:t,timestamp:d,sender:o,feedback:p,messageId:a,status:l,metadata:m,sendMessage:h,addMessageFeedback:y},renderers:u}),t==="outgoing"&&g&&S.jsx(Cp,{authorId:s,sender:o}),i]})})});Si.displayName="Message";const Cp=({authorId:e,sender:t})=>{const{message:{avatar:n}}=ge,[r,i]=F.useState("idle"),o=qs(e??"",15);return S.jsxs(Yi,{"data-color":o,"data-loading-status":r,...n==null?void 0:n.container,children:[S.jsx(Gi,{...n==null?void 0:n.image,onLoadingStatusChange:i,src:t==null?void 0:t.avatar}),S.jsxs(Qi,{...n==null?void 0:n.fallback,children:[t==null?void 0:t.name[0]," "]})]})};let ls=(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),"");/*!---------------------------------------------------------------------------------------------
|
|
310
|
+
`]})]})},es=({children:e,className:t,uploadFile:n,allowFileUpload:r,storageKey:i,connected:o,...a})=>{const{container:s}=ge,l=sn(g=>g.setMessageContainerRef),f=of(i)(g=>g.uploadFile),[c,p]=_.useState(0),d=_.useRef(null);_.useEffect(()=>{l(d)},[d,l]);const m=_.useCallback(g=>{n&&(g.forEach(y=>f(y,n)),p(0))},[f,n]),{getRootProps:h}=fp({noClick:!0,noKeyboard:!0,onDrop:m,disabled:!(r&&n),onDragEnter:()=>p(g=>g+1),onDragLeave:()=>p(g=>g-1)});return S.jsxs("div",{...a,className:dr(s.className,t),...h(),ref:d,children:[S.jsxs("div",{"data-hover":c>0,...s.dropzone.overlay,children:["Drop files to upload",S.jsx(R0,{style:{width:"50px"}})]}),S.jsx(pp,{children:e})]})};es.displayName="Container";const mp=_.forwardRef(({onClick:e,imgUrl:t,...n},r)=>{const{fab:i}=ge,{container:o,icon:a,image:s}=i??{};return t?S.jsx("img",{src:t,role:"button",tabIndex:0,...s,draggable:"false",onClick:e}):S.jsx("div",{...n,...o,ref:r,onClick:e,children:S.jsx("div",{...a})})});mp.displayName="Fab";function At(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 BC(e,t){const n=E.createContext(t),r=o=>{const{children:a,...s}=o,l=E.useMemo(()=>s,Object.values(s));return S.jsx(n.Provider,{value:l,children:a})};r.displayName=e+"Provider";function i(o){const a=E.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function gp(e,t=[]){let n=[];function r(o,a){const s=E.createContext(a),l=n.length;n=[...n,a];const u=c=>{var y;const{scope:p,children:d,...m}=c,h=((y=p==null?void 0:p[e])==null?void 0:y[l])||s,g=E.useMemo(()=>m,Object.values(m));return S.jsx(h.Provider,{value:g,children:d})};u.displayName=o+"Provider";function f(c,p){var h;const d=((h=p==null?void 0:p[e])==null?void 0:h[l])||s,m=E.useContext(d);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${c}\` must be used within \`${o}\``)}return[u,f]}const i=()=>{const o=n.map(a=>E.createContext(a));return function(s){const l=(s==null?void 0:s[e])||o;return E.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,zC(i,...t)]}function zC(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const c=l(o)[`__scope${u}`];return{...s,...c}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var $C=E[" useInsertionEffect ".trim().toString()]||Tt;function yp({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,a]=jC({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:i;{const f=E.useRef(e!==void 0);E.useEffect(()=>{const c=f.current;c!==s&&console.warn(`${r} is changing from ${c?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=s},[s,r])}const u=E.useCallback(f=>{var c;if(s){const p=UC(f)?f(e):f;p!==e&&((c=a.current)==null||c.call(a,p))}else o(f)},[s,e,o,a]);return[l,u]}function jC({defaultProp:e,onChange:t}){const[n,r]=E.useState(e),i=E.useRef(n),o=E.useRef(t);return $C(()=>{o.current=t},[t]),E.useEffect(()=>{var a;i.current!==n&&((a=o.current)==null||a.call(o,n),i.current=n)},[n,i]),[n,r,o]}function UC(e){return typeof e=="function"}function vp(e){const t=HC(e),n=E.forwardRef((r,i)=>{const{children:o,...a}=r,s=E.Children.toArray(o),l=s.find(VC);if(l){const u=l.props.children,f=s.map(c=>c===l?E.Children.count(u)>1?E.Children.only(null):E.isValidElement(u)?u.props.children:null:c);return S.jsx(t,{...a,ref:i,children:E.isValidElement(u)?E.cloneElement(u,void 0,f):null})}return S.jsx(t,{...a,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function HC(e){const t=E.forwardRef((n,r)=>{const{children:i,...o}=n;if(E.isValidElement(i)){const a=KC(i),s=qC(o,i.props);return i.type!==E.Fragment&&(s.ref=r?ji(r,a):a),E.cloneElement(i,s)}return E.Children.count(i)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var WC=Symbol("radix.slottable");function VC(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===WC}function qC(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{const l=o(...s);return i(...s),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function KC(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 YC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ht=YC.reduce((e,t)=>{const n=vp(`Primitive.${t}`),r=E.forwardRef((i,o)=>{const{asChild:a,...s}=i,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),S.jsx(l,{...s,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function GC(e,t){e&&Ls.flushSync(()=>e.dispatchEvent(t))}function QC(e,t){return E.useReducer((n,r)=>t[n][r]??n,e)}var bi=e=>{const{present:t,children:n}=e,r=JC(t),i=typeof n=="function"?n({present:r.isPresent}):E.Children.only(n),o=Ot(r.ref,ZC(i));return typeof n=="function"||r.isPresent?E.cloneElement(i,{ref:o}):null};bi.displayName="Presence";function JC(e){const[t,n]=E.useState(),r=E.useRef(null),i=E.useRef(e),o=E.useRef("none"),a=e?"mounted":"unmounted",[s,l]=QC(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const u=wi(r.current);o.current=s==="mounted"?u:"none"},[s]),Tt(()=>{const u=r.current,f=i.current;if(f!==e){const p=o.current,d=wi(u);e?l("MOUNT"):d==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&p!==d?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Tt(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,c=d=>{const h=wi(r.current).includes(CSS.escape(d.animationName));if(d.target===t&&h&&(l("ANIMATION_END"),!i.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},p=d=>{d.target===t&&(o.current=wi(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:E.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function wi(e){return(e==null?void 0:e.animationName)||"none"}function ZC(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 XC=E[" useId ".trim().toString()]||(()=>{}),eA=0;function xi(e){const[t,n]=E.useState(XC());return Tt(()=>{n(r=>r??String(eA++))},[e]),e||(t?`radix-${t}`:"")}var ki="Collapsible",[tA]=gp(ki),[nA,ts]=tA(ki),bp=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:a,...s}=e,[l,u]=yp({prop:r,defaultProp:i??!1,onChange:a,caller:ki});return S.jsx(nA,{scope:n,disabled:o,contentId:xi(),open:l,onOpenToggle:E.useCallback(()=>u(f=>!f),[u]),children:S.jsx(ht.div,{"data-state":rs(l),"data-disabled":o?"":void 0,...s,ref:t})})});bp.displayName=ki;var wp="CollapsibleTrigger",xp=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=ts(wp,n);return S.jsx(ht.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":rs(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:At(e.onClick,i.onOpenToggle)})});xp.displayName=wp;var ns="CollapsibleContent",kp=E.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=ts(ns,e.__scopeCollapsible);return S.jsx(bi,{present:n||i.open,children:({present:o})=>S.jsx(rA,{...r,ref:t,present:o})})});kp.displayName=ns;var rA=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,a=ts(ns,n),[s,l]=E.useState(r),u=E.useRef(null),f=Ot(t,u),c=E.useRef(0),p=c.current,d=E.useRef(0),m=d.current,h=a.open||s,g=E.useRef(h),y=E.useRef(void 0);return E.useEffect(()=>{const v=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(v)},[]),Tt(()=>{const v=u.current;if(v){y.current=y.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const w=v.getBoundingClientRect();c.current=w.height,d.current=w.width,g.current||(v.style.transitionDuration=y.current.transitionDuration,v.style.animationName=y.current.animationName),l(r)}},[a.open,r]),S.jsx(ht.div,{"data-state":rs(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!h,...o,ref:f,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})});function rs(e){return e?"open":"closed"}var iA=bp,oA=kp;const is=({restartConversation:e,...t})=>{var o,a;const{header:n}=ge,{showInputModal:r}=aa(),i=async s=>{s.stopPropagation(),r?r({title:"Create New Conversation",description:"This will clear the current conversation and start a new one.",confirmButtonText:"New conversation",cancelButtonText:"Cancel"}).then(()=>e()):e()};return S.jsx(J0,{...t,...(a=(o=n==null?void 0:n.content)==null?void 0:o.actions)==null?void 0:a.icons,"aria-label":"Restart Conversation Button",tabIndex:0,role:"button",onClick:i})},Sp=({onClick:e,...t})=>{const{header:n}=ge,r=i=>{i.stopPropagation(),e==null||e()};return S.jsx(Fc,{...t,...n.content.actions.icons,role:"button",tabIndex:0,"aria-label":"Close Chatbot Button",onClick:r,onKeyDown:i=>{i.key==="Enter"&&r(i)}})},mr=({icon:e,title:t,link:n,...r})=>{var a,s,l,u,f,c,p,d,m,h,g,y;const{header:i}=ge,o=e??B0;return t?n?S.jsxs("a",{...r,...(s=(a=i.expandedContent)==null?void 0:a.descriptionItems)==null?void 0:s.container,href:n,target:"_blank",rel:"noreferrer noopener",children:[S.jsx(o,{...(u=(l=i.expandedContent)==null?void 0:l.descriptionItems)==null?void 0:u.icon}),S.jsx("p",{...(c=(f=i.expandedContent)==null?void 0:f.descriptionItems)==null?void 0:c.link,children:t})]}):S.jsxs("div",{...r,...(d=(p=i.expandedContent)==null?void 0:p.descriptionItems)==null?void 0:d.container,children:[S.jsx(o,{...(h=(m=i.expandedContent)==null?void 0:m.descriptionItems)==null?void 0:h.icon}),S.jsx("p",{...(y=(g=i.expandedContent)==null?void 0:g.descriptionItems)==null?void 0:y.text,children:t})]}):null},aA=({soundOn:e,toggleSound:t})=>{const n=o=>{o.stopPropagation(),t==null||t()},{header:r}=ge,i=e?Lc:n1;return S.jsx("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),n(o))},title:e?"Disable chat sounds":"Enable chat sounds",...r.content.actions.icons,children:S.jsx(i,{size:16})})},Ep=({defaultOpen:e,closeWindow:t,configuration:n,restartConversation:r,disabled:i,soundOn:o,toggleSound:a,clientId:s,...l})=>{var m,h,g,y,v,w,A,k,C,T,P,R,I,O,j,M,L,D,z,U,$,V,b,N;const{header:u}=ge,[f,c]=_.useState(e),p=!!((m=n.email)!=null&&m.title)||!!((h=n.phone)!=null&&h.title)||!!((g=n.website)!=null&&g.title)||!!((y=n.termsOfService)!=null&&y.link)||!!((v=n.privacyPolicy)!=null&&v.link),d=p&&!i;return S.jsxs(iA,{open:d?f:!1,onOpenChange:c,"data-disabled":d?void 0:"",...u.container,...l,children:[S.jsxs(xp,{"aria-label":"Expand Header Button",...u.content.container,children:[S.jsx(Nn,{userId:s,src:n.botAvatar,...u.content.avatar,children:n.botName||"Bot"}),S.jsx("h2",{...u.content.title,children:n.botName||"Bot"}),n.botDescription&&S.jsx("p",{...u.content.description,children:n.botDescription}),S.jsxs("div",{...u.content.actions.container,children:[n.soundEnabled&&o!==void 0&&a&&S.jsx(aA,{soundOn:o,toggleSound:a})," ",r&&S.jsx(is,{restartConversation:r}),t&&S.jsx(Sp,{onClick:t})]})]}),p&&S.jsxs(oA,{...u.expandedContent.container,children:[S.jsxs("div",{"data-links":"",...u.expandedContent.group,children:[S.jsx(mr,{"data-email":"",icon:V0,title:(w=n.email)==null?void 0:w.title,link:(k=(A=n.email)==null?void 0:A.link)!=null&&k.startsWith("mailto:")?(C=n.email)==null?void 0:C.link:`mailto:${(T=n.email)==null?void 0:T.link}`}),S.jsx(mr,{"data-phone":"",icon:G0,title:(P=n.phone)==null?void 0:P.title,link:(I=(R=n.phone)==null?void 0:R.link)!=null&&I.startsWith("tel:")?(O=n.phone)==null?void 0:O.link:`tel:${(j=n.phone)==null?void 0:j.link}`}),S.jsx(mr,{"data-website":"",link:(M=n.website)==null?void 0:M.link,icon:j0,title:(L=n.website)==null?void 0:L.title})]}),S.jsxs("div",{"data-legal":"",...(D=u.expandedContent)==null?void 0:D.group,children:[((z=n.termsOfService)==null?void 0:z.link)&&S.jsx(mr,{"data-terms":"",link:(U=n.termsOfService)==null?void 0:U.link,icon:Pc,title:($=n.termsOfService)==null?void 0:$.title}),((V=n.privacyPolicy)==null?void 0:V.link)&&S.jsx(mr,{"data-privacy":"",link:(b=n.privacyPolicy)==null?void 0:b.link,icon:W0,title:(N=n.privacyPolicy)==null?void 0:N.title})]})]})]})},os=_.memo(({...e})=>{const{typingIndicator:t}=ge;return S.jsx("div",{...e,...t==null?void 0:t.container,children:S.jsx("div",{...t==null?void 0:t.loader})})});os.displayName="TypingIndicator";const as=_.memo(_.forwardRef(({direction:e,block:t,disableInput:n,children:r,sender:i,id:o,authorId:a,status:s,renderers:l,isReadOnly:u,isLastDeliveredMessage:f,feedback:c,timestamp:p,metadata:d,sendMessage:m,addMessageFeedback:h,showAvatar:g},y)=>{const[v,w]=_.useState([]),{message:{container:A,deliveryStatus:k}}=ge;return g=g??e==="incoming",S.jsx(ia.Provider,{value:{isLoading:v,setIsLoading:w},children:S.jsxs("div",{...A,className:dr(A==null?void 0:A.className,f&&(k==null?void 0:k.className)),"data-loaded":v.length===0,"data-disable-input":!!n,"data-direction":e,dir:"auto",ref:y,children:[e==="incoming"&&g&&S.jsx(Cp,{authorId:a,sender:i}),t&&S.jsx(Yt,{block:{...t,isReadOnly:u,direction:e,timestamp:p,sender:i,feedback:c,messageId:o,status:s,metadata:d,sendMessage:m,addMessageFeedback:h},renderers:l}),e==="outgoing"&&g&&S.jsx(Cp,{authorId:a,sender:i}),r]})})})),Cp=({authorId:e,sender:t})=>{const{message:{avatar:n}}=ge,[r,i]=_.useState("idle"),o=Vs(e??"",15);return S.jsxs(Ki,{"data-color":o,"data-loading-status":r,...n==null?void 0:n.container,children:[S.jsx(Yi,{...n==null?void 0:n.image,onLoadingStatusChange:i,src:t==null?void 0:t.avatar}),S.jsxs(Gi,{...n==null?void 0:n.fallback,children:[t==null?void 0:t.name[0]," "]})]})};function sA({botAvatar:e,botDescription:t,botName:n}){const{messageList:{marquee:r}}=ge;return S.jsxs("li",{...r.container,children:[S.jsx(Nn,{src:e,...r.avatar,children:(n||"Bot").slice(0,1)}),S.jsxs("div",{...r.content,children:[S.jsx("h1",{...r.title,children:n||"Bot"}),S.jsx("p",{...r.description,children:t})]})]})}let ss=(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),"");/*!---------------------------------------------------------------------------------------------
|
|
311
311
|
* Copyright (c) StackBlitz. All rights reserved.
|
|
312
312
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
313
|
-
*--------------------------------------------------------------------------------------------*/const sA={damping:.7,stiffness:.05,mass:1.25},lA=70,uA=1e3/60,cA=350;let Ei=!1;(Rh=globalThis.document)==null||Rh.addEventListener("mousedown",()=>{Ei=!0}),(Bh=globalThis.document)==null||Bh.addEventListener("mouseup",()=>{Ei=!1}),(zh=globalThis.document)==null||zh.addEventListener("click",()=>{Ei=!1});const fA=(e={})=>{const[t,n]=F.useState(!1),[r,i]=F.useState(e.initial!==!1),[o,a]=F.useState(!1),s=F.useRef(null);s.current=e;const l=F.useCallback(()=>{var A;if(!Ei)return!1;const v=window.getSelection();if(!v||!v.rangeCount)return!1;const x=v.getRangeAt(0);return x.commonAncestorContainer.contains(y.current)||((A=y.current)==null?void 0:A.contains(x.commonAncestorContainer))},[]),u=F.useCallback(v=>{c.isAtBottom=v,i(v)},[]),f=F.useCallback(v=>{c.escapedFromLock=v,n(v)},[]),c=F.useMemo(()=>{let v;return{escapedFromLock:t,isAtBottom:r,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){var x;return((x=y.current)==null?void 0:x.scrollTop)??0},set scrollTop(x){y.current&&(y.current.scrollTop=x,c.ignoreScrollToTop=y.current.scrollTop)},get targetScrollTop(){return!y.current||!g.current?0:y.current.scrollHeight-1-y.current.clientHeight},get calculatedTargetScrollTop(){if(!y.current||!g.current)return 0;const{targetScrollTop:x}=this;if(!e.targetScrollTop)return x;if((v==null?void 0:v.targetScrollTop)===x)return v.calculatedScrollTop;const A=Math.max(Math.min(e.targetScrollTop(x,{scrollElement:y.current,contentElement:g.current}),x),0);return v={targetScrollTop:x,calculatedScrollTop:A},requestAnimationFrame(()=>{v=void 0}),A},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=lA}}},[]),p=F.useCallback((v={})=>{var R;typeof v=="string"&&(v={animation:v}),v.preserveScrollPosition||u(!0);const x=Date.now()+(Number(v.wait)||0),A=cs(s.current,v.animation),{ignoreEscapes:k=!1}=v;let C,T=c.calculatedTargetScrollTop;v.duration instanceof Promise?v.duration.finally(()=>{C=Date.now()}):C=x+(v.duration??0);const M=async()=>{const I=new Promise(requestAnimationFrame).then(()=>{var N;if(!c.isAtBottom)return c.animation=void 0,!1;const{scrollTop:O}=c,j=performance.now(),_=(j-(c.lastTick??j))/uA;if(c.animation||(c.animation={behavior:A,promise:I,ignoreEscapes:k}),c.animation.behavior===A&&(c.lastTick=j),l()||x>Date.now())return M();if(O<Math.min(T,c.calculatedTargetScrollTop)){if(((N=c.animation)==null?void 0:N.behavior)===A){if(A==="instant")return c.scrollTop=c.calculatedTargetScrollTop,M();c.velocity=(A.damping*c.velocity+A.stiffness*c.scrollDifference)/A.mass,c.accumulated+=c.velocity*_,c.scrollTop+=c.accumulated,c.scrollTop!==O&&(c.accumulated=0)}return M()}return C>Date.now()?(T=c.calculatedTargetScrollTop,M()):(c.animation=void 0,c.scrollTop<c.calculatedTargetScrollTop?p({animation:cs(s.current,s.current.resize),ignoreEscapes:k,duration:Math.max(0,C-Date.now())||void 0}):c.isAtBottom)});return I.then(O=>(requestAnimationFrame(()=>{c.animation||(c.lastTick=void 0,c.velocity=0)}),O))};return v.wait!==!0&&(c.animation=void 0),((R=c.animation)==null?void 0:R.behavior)===A?c.animation.promise:M()},[u,l,c]),d=F.useCallback(()=>{f(!0),u(!1)},[f,u]),m=F.useCallback(({target:v})=>{if(v!==y.current)return;const{scrollTop:x,ignoreScrollToTop:A}=c;let{lastScrollTop:k=x}=c;c.lastScrollTop=x,c.ignoreScrollToTop=void 0,A&&A>x&&(k=A),a(c.isNearBottom),setTimeout(()=>{var M;if(c.resizeDifference||x===A)return;if(l()){f(!0),u(!1);return}const C=x>k,T=x<k;if((M=c.animation)!=null&&M.ignoreEscapes){c.scrollTop=k;return}T&&(f(!0),u(!1)),C&&f(!1),!c.escapedFromLock&&c.isNearBottom&&u(!0)},1)},[f,u,l,c]),h=F.useCallback(({target:v,deltaY:x})=>{var k;let A=v;for(;!["scroll","auto"].includes(getComputedStyle(A).overflow);){if(!A.parentElement)return;A=A.parentElement}A===y.current&&x<0&&y.current.scrollHeight>y.current.clientHeight&&!((k=c.animation)!=null&&k.ignoreEscapes)&&(f(!0),u(!1))},[f,u,c]),y=Ap(v=>{var x,A;(x=y.current)==null||x.removeEventListener("scroll",m),(A=y.current)==null||A.removeEventListener("wheel",h),v==null||v.addEventListener("scroll",m,{passive:!0}),v==null||v.addEventListener("wheel",h,{passive:!0})},[]),g=Ap(v=>{var A,k;if((A=c.resizeObserver)==null||A.disconnect(),!v)return;let x;c.resizeObserver=new ResizeObserver(([C])=>{const{height:T}=C.contentRect,M=T-(x??T);if(c.resizeDifference=M,c.scrollTop>c.targetScrollTop&&(c.scrollTop=c.targetScrollTop),a(c.isNearBottom),M>=0){const R=cs(s.current,x?s.current.resize:s.current.initial);p({animation:R,wait:!0,preserveScrollPosition:!0,duration:R==="instant"?void 0:cA})}else c.isNearBottom&&(f(!1),u(!0));x=T,requestAnimationFrame(()=>{setTimeout(()=>{c.resizeDifference===M&&(c.resizeDifference=0)},1)})}),(k=c.resizeObserver)==null||k.observe(v)},[]);return{contentRef:g,scrollRef:y,scrollToBottom:p,stopScroll:d,isAtBottom:r||o,isNearBottom:o,escapedFromLock:t,state:c}};function Ap(e,t){const n=F.useCallback(r=>(n.current=r,e(r)),t);return n}const us=new Map;function cs(...e){const t={...sA};let n=!1;for(const i of e){if(i==="instant"){n=!0;continue}typeof i=="object"&&(n=!1,t.damping=i.damping??t.damping,t.stiffness=i.stiffness??t.stiffness,t.mass=i.mass??t.mass)}const r=JSON.stringify(t);return us.has(r)||us.set(r,Object.freeze(t)),n?"instant":us.get(r)}const Ip=F.createContext(null),dA=typeof window<"u"?F.useLayoutEffect:F.useEffect;function Ci({instance:e,children:t,resize:n,initial:r,mass:i,damping:o,stiffness:a,targetScrollTop:s,contextRef:l,...u}){const f=F.useRef(null),c=E.useCallback((k,C)=>{const T=(A==null?void 0:A.targetScrollTop)??s;return(T==null?void 0:T(k,C))??k},[s]),p=fA({mass:i,damping:o,stiffness:a,resize:n,initial:r,targetScrollTop:c}),{scrollRef:d,contentRef:m,scrollToBottom:h,stopScroll:y,isAtBottom:g,escapedFromLock:v,state:x}=e??p,A=F.useMemo(()=>({scrollToBottom:h,stopScroll:y,scrollRef:d,isAtBottom:g,escapedFromLock:v,contentRef:m,state:x,get targetScrollTop(){return f.current},set targetScrollTop(k){f.current=k}}),[h,g,m,d,y,v,x]);return F.useImperativeHandle(l,()=>A,[A]),dA(()=>{d.current&&getComputedStyle(d.current).overflow==="visible"&&(d.current.style.overflow="auto")},[]),S.jsx(Ip.Provider,{value:A,children:S.jsx("div",{...u,children:typeof t=="function"?t(A):t})})}(function(e){function t({children:n,...r}){const i=Tp();return S.jsx("div",{ref:i.scrollRef,style:{height:"100%",width:"100%"},children:S.jsx("div",{...r,ref:i.contentRef,children:typeof n=="function"?n(i):n})})}e.Content=t})(Ci||(Ci={}));function Tp(){const e=F.useContext(Ip);if(!e)throw new Error("use-stick-to-bottom component context must be used within a StickToBottom component");return e}function pA({botAvatar:e,botDescription:t,botName:n}){const{messageList:{marquee:r}}=ge;return S.jsxs("li",{...r.container,children:[S.jsx(Nn,{src:e,...r.avatar,children:(n||"Bot").slice(0,1)}),S.jsxs("div",{...r.content,children:[S.jsx("h1",{...r.title,children:n||"Bot"}),S.jsx("p",{...r.description,children:t})]})]})}const fs=F.memo(({className:e,messages:t=[],isTyping:n,headerMessage:r,renderers:i,botAvatar:o,botDescription:a,botName:s,sendMessage:l,addMessageFeedback:u,showMarquee:f=!0,showDateSystemMessage:c=!0,showMessageStatus:p=!0,showIncomingMessageAvatar:d=!0,showOutgoingMessageAvatar:m=!1,...h})=>{var A;const{messageList:y}=ge,g=F.useMemo(()=>c?gm(t):t,[t]),v=F.useMemo(()=>{var C;const k=g.filter(T=>T.direction==="outgoing"&&T.status!=="pending");return(C=k[k.length-1])==null?void 0:C.id},[g]),x=k=>{if(k.direction==="incoming")return d;if(k.direction==="outgoing")return m};return S.jsxs(Ci,{...h,resize:"smooth",initial:"instant",className:dr(y.container.className,e),children:[S.jsxs(Ci.Content,{className:y.viewPort.className,children:[r&&S.jsx("span",{...y.headerMessage,children:r}),f&&S.jsx(pA,{botAvatar:o,botDescription:a,botName:s}),g.map(k=>{var C;return S.jsx(Si,{renderers:i,sendMessage:l,addMessageFeedback:u,isLastDeliveredMessage:p&&k.id===v,showAvatar:x(k),...k},((C=k.metadata)==null?void 0:C.clientMessageId)||k.id)}),n&&S.jsx(Si,{id:ls(),renderers:i,sendMessage:l,direction:"incoming",timestamp:new Date,showAvatar:d,block:void 0,sender:((A=t.filter(k=>k.direction==="incoming").at(-1))==null?void 0:A.sender)??{name:s||"Bot",avatar:o},children:S.jsx(ss,{})})]}),S.jsx(hA,{})]})}),hA=()=>{const{isAtBottom:e,scrollToBottom:t}=Tp(),{messageList:n}=ge;return e?null:S.jsx("button",{className:n.scrollDownButton.className,onClick:()=>t()})};fs.displayName="MessageList";function Op({error:e,restartConversation:t,closeWindow:n}){let r,i;const{error:o}=ge;return e.type==="configuration"?(r="Configuration error",i=S.jsx(mg,{...o.icon})):e.type==="bot"?(r="Bot error",i=S.jsx(Ol,{...o.icon})):e.type==="network"?(r="Network error",i=S.jsx(Eg,{...o.icon})):e.type==="disconnected"?(r="Disconnected",i=S.jsx(wg,{...o.icon})):(r="Unexpected error",i=S.jsx(Ol,{...o.icon})),S.jsx(mA,{error:e,title:r,icon:i,restartConversation:t,closeWindow:n})}function mA({error:e,title:t,icon:n,restartConversation:r,closeWindow:i}){const{error:o}=ge;return S.jsxs("div",{...o.container,children:[S.jsxs("div",{...o.header.container,children:[`Webchat ${e.type} error`,S.jsxs("div",{...o.header.actions,children:[r&&S.jsx(as,{restartConversation:r,style:{color:"white",backgroundColor:"transparent"}}),i&&S.jsx(Sp,{onClick:i,style:{color:"white",backgroundColor:"transparent"}})]})]}),S.jsxs("div",{...o.content,children:[n,S.jsx("div",{...o.errorTitle,children:t}),S.jsx("div",{...o.errorMessage,children:e.message}),e.id&&S.jsx("div",{...o.id,children:e.id})]})]})}const gA=({className:e,...t})=>{const{className:n}=ge.loader;return S.jsx("div",{...t,className:dr(e,n)})},Dp=({ref:e,connected:t,configuration:n,isTyping:r,messages:i,user:o,isLoading:a,renderers:s,isReadOnly:l,disableComposer:u,allowFileUpload:f,error:c,participants:p,closeWindow:d,sendMessage:m,uploadFile:h,addMessageFeedback:y,restartConversation:g,clientId:v,storageKey:x,soundOn:A,toggleSound:k,disableSendButton:C,...T})=>{const{color:M,fontFamily:R,radius:I,themeMode:O,variant:j,headerVariant:_,botAvatar:N,botDescription:D,botName:z,composerPlaceholder:U,footer:$,feedbackEnabled:V,additionalStylesheetUrl:b}=n,P={color:M,fontFamily:R,radius:I,themeMode:O,variant:j,headerVariant:_,additionalStylesheetUrl:b};V||(y=void 0);const H=F.useMemo(()=>o?Qs(i,p,o.id,z,N):[],[N,z,i,o,p]),w=F.useRef(null),W=sn(X=>X.setPortalContainer);return F.useEffect(()=>(W(w.current),()=>{W(null)}),[W]),S.jsxs(S.Fragment,{children:[S.jsx(hp,{...P}),S.jsx("div",{ref:w,style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:10}}),S.jsx(ns,{connected:t,allowFileUpload:f,uploadFile:h,storageKey:x,...T,children:c?S.jsx(Op,{error:c,restartConversation:g,closeWindow:d}):S.jsxs(S.Fragment,{children:[S.jsx(Ep,{closeWindow:d,configuration:n,restartConversation:g,clientId:v,soundOn:A,toggleSound:k}),a?S.jsx(gA,{}):S.jsx(fs,{botAvatar:N,botDescription:D,botName:z,renderers:s,isTyping:r,sendMessage:m,addMessageFeedback:y,messages:H}),S.jsx($a,{ref:e,sendMessage:m,uploadFile:h,connected:t,isReadOnly:l,disableComposer:u,footer:$,composerPlaceholder:U,allowFileUpload:f,disableSendButton:C,storageKey:x})]})})]})};function Mp(){const[e,t]=F.useState(!1),n=F.useRef(null);return{state:e,setState:(r,i)=>{if(t(r),!r)return()=>{};if(n.current=new Date,!i)return()=>{};const o=setTimeout(()=>{const a=n.current;a&&new Date().getTime()-a.getTime()>i&&t(!1)},i+100);return()=>clearTimeout(o)}}}var yA=Object.defineProperty,vA=(e,t,n)=>t in e?yA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bA=(e,t,n)=>vA(e,t+"",n),xA=async(e,t)=>{let n=typeof t=="function"?await t(e):t;if(n)return e.scheme==="bearer"?`Bearer ${n}`:e.scheme==="basic"?`Basic ${btoa(n)}`:n},wA={bodySerializer:e=>JSON.stringify(e,(t,n)=>typeof n=="bigint"?n.toString():n)},kA=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},SA=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},EA=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},_p=({allowReserved:e,explode:t,name:n,style:r,value:i})=>{if(!t){let s=(e?i:i.map(l=>encodeURIComponent(l))).join(SA(r));switch(r){case"label":return`.${s}`;case"matrix":return`;${n}=${s}`;case"simple":return s;default:return`${n}=${s}`}}let o=kA(r),a=i.map(s=>r==="label"||r==="simple"?e?s:encodeURIComponent(s):Ai({allowReserved:e,name:n,value:s})).join(o);return r==="label"||r==="matrix"?o+a:a},Ai=({allowReserved:e,name:t,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?n:encodeURIComponent(n)}`},Pp=({allowReserved:e,explode:t,name:n,style:r,value:i})=>{if(i instanceof Date)return`${n}=${i.toISOString()}`;if(r!=="deepObject"&&!t){let s=[];Object.entries(i).forEach(([u,f])=>{s=[...s,u,e?f:encodeURIComponent(f)]});let l=s.join(",");switch(r){case"form":return`${n}=${l}`;case"label":return`.${l}`;case"matrix":return`;${n}=${l}`;default:return l}}let o=EA(r),a=Object.entries(i).map(([s,l])=>Ai({allowReserved:e,name:r==="deepObject"?`${n}[${s}]`:s,value:l})).join(o);return r==="label"||r==="matrix"?o+a:a},CA=/\{[^{}]+\}/g,AA=({path:e,url:t})=>{let n=t,r=t.match(CA);if(r)for(let i of r){let o=!1,a=i.substring(1,i.length-1),s="simple";a.endsWith("*")&&(o=!0,a=a.substring(0,a.length-1)),a.startsWith(".")?(a=a.substring(1),s="label"):a.startsWith(";")&&(a=a.substring(1),s="matrix");let l=e[a];if(l==null)continue;if(Array.isArray(l)){n=n.replace(i,_p({explode:o,name:a,style:s,value:l}));continue}if(typeof l=="object"){n=n.replace(i,Pp({explode:o,name:a,style:s,value:l}));continue}if(s==="matrix"){n=n.replace(i,`;${Ai({name:a,value:l})}`);continue}let u=encodeURIComponent(s==="label"?`.${l}`:l);n=n.replace(i,u)}return n},Np=({allowReserved:e,array:t,object:n}={})=>r=>{let i=[];if(r&&typeof r=="object")for(let o in r){let a=r[o];if(a!=null){if(Array.isArray(a)){i=[...i,_p({allowReserved:e,explode:!0,name:o,style:"form",value:a,...t})];continue}if(typeof a=="object"){i=[...i,Pp({allowReserved:e,explode:!0,name:o,style:"deepObject",value:a,...n})];continue}i=[...i,Ai({allowReserved:e,name:o,value:a})]}}return i.join("&")},IA=e=>{var t;if(!e)return"stream";let n=(t=e.split(";")[0])==null?void 0:t.trim();if(n){if(n.startsWith("application/json")||n.endsWith("+json"))return"json";if(n==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(r=>n.startsWith(r)))return"blob";if(n.startsWith("text/"))return"text"}},TA=async({security:e,...t})=>{for(let n of e){let r=await xA(n,t.auth);if(!r)continue;let i=n.name??"Authorization";switch(n.in){case"query":t.query||(t.query={}),t.query[i]=r;break;case"cookie":t.headers.append("Cookie",`${i}=${r}`);break;case"header":default:t.headers.set(i,r);break}return}},Lp=e=>OA({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:Np(e.querySerializer),url:e.url}),OA=({baseUrl:e,path:t,query:n,querySerializer:r,url:i})=>{let o=i.startsWith("/")?i:`/${i}`,a=(e??"")+o;t&&(a=AA({path:t,url:a}));let s=n?r(n):"";return s.startsWith("?")&&(s=s.substring(1)),s&&(a+=`?${s}`),a},Fp=(e,t)=>{var n;let r={...e,...t};return(n=r.baseUrl)!=null&&n.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=Rp(e.headers,t.headers),r},Rp=(...e)=>{let t=new Headers;for(let n of e){if(!n||typeof n!="object")continue;let r=n instanceof Headers?n.entries():Object.entries(n);for(let[i,o]of r)if(o===null)t.delete(i);else if(Array.isArray(o))for(let a of o)t.append(i,a);else o!==void 0&&t.set(i,typeof o=="object"?JSON.stringify(o):o)}return t},ds=class{constructor(){bA(this,"_fns"),this._fns=[]}clear(){this._fns=[]}exists(t){return this._fns.indexOf(t)!==-1}eject(t){let n=this._fns.indexOf(t);n!==-1&&(this._fns=[...this._fns.slice(0,n),...this._fns.slice(n+1)])}use(t){this._fns=[...this._fns,t]}},DA=()=>({error:new ds,request:new ds,response:new ds}),MA=Np({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),_A={"Content-Type":"application/json"},Bp=(e={})=>({...wA,headers:_A,parseAs:"auto",querySerializer:MA,...e}),PA=(e={})=>{let t=Fp(Bp(),e),n=()=>({...t}),r=a=>(t=Fp(t,a),n()),i=DA(),o=async a=>{let s={...t,...a,fetch:a.fetch??t.fetch??globalThis.fetch,headers:Rp(t.headers,a.headers)};s.security&&await TA({...s,security:s.security}),s.body&&s.bodySerializer&&(s.body=s.bodySerializer(s.body)),(s.body===void 0||s.body==="")&&s.headers.delete("Content-Type");let l=Lp(s),u={redirect:"follow",...s},f=new Request(l,u);for(let y of i.request._fns)f=await y(f,s);let c=s.fetch,p=await c(f);for(let y of i.response._fns)p=await y(p,f,s);let d={request:f,response:p};if(p.ok){if(p.status===204||p.headers.get("Content-Length")==="0")return{data:{},...d};let y=(s.parseAs==="auto"?IA(p.headers.get("Content-Type")):s.parseAs)??"json";if(y==="stream")return{data:p.body,...d};let g=await p[y]();return y==="json"&&(s.responseValidator&&await s.responseValidator(g),s.responseTransformer&&(g=await s.responseTransformer(g))),{data:g,...d}}let m=await p.text();try{m=JSON.parse(m)}catch{}let h=m;for(let y of i.error._fns)h=await y(m,p,f,s);if(h=h||{},s.throwOnError)throw h;return{error:h,...d}};return{buildUrl:Lp,connect:a=>o({...a,method:"CONNECT"}),delete:a=>o({...a,method:"DELETE"}),get:a=>o({...a,method:"GET"}),getConfig:n,head:a=>o({...a,method:"HEAD"}),interceptors:i,options:a=>o({...a,method:"OPTIONS"}),patch:a=>o({...a,method:"PATCH"}),post:a=>o({...a,method:"POST"}),put:a=>o({...a,method:"PUT"}),request:o,setConfig:r,trace:a=>o({...a,method:"TRACE"})}},NA=PA,LA=Bp;const Me=NA((e=>({...e,withCredentials:!0,timeout:6e4,maxBodyLength:104857600,maxContentLength:104857600,throwOnError:!0}))(LA({baseUrl:"https://webchat.botpress.cloud/"}))),FA=e=>(e.client??Me).delete({url:"/conversations/{id}",...e}),RA=e=>(e.client??Me).get({url:"/conversations/{id}",...e}),BA=e=>(e.client??Me).get({url:"/conversations",...e}),zA=e=>(e.client??Me).post({url:"/conversations",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),$A=e=>(e.client??Me).get({url:"/conversations/{id}/messages",...e}),jA=e=>(e.client??Me).get({url:"/conversations/{id}/participants",...e}),UA=e=>(e.client??Me).post({url:"/conversations/{id}/participants",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),HA=e=>(e.client??Me).delete({url:"/conversations/{id}/participants/{userId}",...e}),WA=e=>(e.client??Me).get({url:"/conversations/{id}/participants/{userId}",...e}),VA=e=>(e.client??Me).delete({url:"/messages/{id}",...e}),qA=e=>(e.client??Me).get({url:"/messages/{id}",...e}),KA=e=>(e.client??Me).put({url:"/messages/{id}",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),YA=e=>(e.client??Me).post({url:"/messages",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),GA=e=>(e.client??Me).delete({url:"/messages/{id}/feedback",...e}),QA=e=>(e.client??Me).put({url:"/messages/{id}/feedback",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),JA=e=>(e.client??Me).delete({url:"/users/me",...e}),ZA=e=>(e.client??Me).get({url:"/users/me",...e}),XA=e=>(e.client??Me).put({url:"/users/me",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),eI=e=>((e==null?void 0:e.client)??Me).post({url:"/users/key",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),tI=e=>(e.client??Me).get({url:"/events/{id}",...e}),nI=e=>(e.client??Me).post({url:"/events",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),rI=e=>(e.client??Me).post({url:"/files",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}});let zp=class extends Error{constructor(t,n){super(t),this.name="ParseError",this.type=n.type,this.field=n.field,this.value=n.value,this.line=n.line}};function ps(e){}function iI(e){if(typeof e=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:t=ps,onError:n=ps,onRetry:r=ps,onComment:i}=e;let o="",a=!0,s,l="",u="";function f(h){const y=a?h.replace(/^\xEF\xBB\xBF/,""):h,[g,v]=oI(`${o}${y}`);for(const x of g)c(x);o=v,a=!1}function c(h){if(h===""){d();return}if(h.startsWith(":")){i&&i(h.slice(h.startsWith(": ")?2:1));return}const y=h.indexOf(":");if(y!==-1){const g=h.slice(0,y),v=h[y+1]===" "?2:1,x=h.slice(y+v);p(g,x,h);return}p(h,"",h)}function p(h,y,g){switch(h){case"event":u=y;break;case"data":l=`${l}${y}
|
|
314
|
-
`;break;case"id":s=
|
|
313
|
+
*--------------------------------------------------------------------------------------------*/const lA={damping:.7,stiffness:.05,mass:1.25},uA=70,cA=1e3/60,fA=350;let Si=!1;(Rh=globalThis.document)==null||Rh.addEventListener("mousedown",()=>{Si=!0}),(Bh=globalThis.document)==null||Bh.addEventListener("mouseup",()=>{Si=!1}),(zh=globalThis.document)==null||zh.addEventListener("click",()=>{Si=!1});const dA=(e={})=>{const[t,n]=_.useState(!1),[r,i]=_.useState(e.initial!==!1),[o,a]=_.useState(!1),s=_.useRef(null);s.current=e;const l=_.useCallback(()=>{var A;if(!Si)return!1;const v=window.getSelection();if(!v||!v.rangeCount)return!1;const w=v.getRangeAt(0);return w.commonAncestorContainer.contains(g.current)||((A=g.current)==null?void 0:A.contains(w.commonAncestorContainer))},[]),u=_.useCallback(v=>{c.isAtBottom=v,i(v)},[]),f=_.useCallback(v=>{c.escapedFromLock=v,n(v)},[]),c=_.useMemo(()=>{let v;return{escapedFromLock:t,isAtBottom:r,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){var w;return((w=g.current)==null?void 0:w.scrollTop)??0},set scrollTop(w){g.current&&(g.current.scrollTop=w,c.ignoreScrollToTop=g.current.scrollTop)},get targetScrollTop(){return!g.current||!y.current?0:g.current.scrollHeight-1-g.current.clientHeight},get calculatedTargetScrollTop(){if(!g.current||!y.current)return 0;const{targetScrollTop:w}=this;if(!e.targetScrollTop)return w;if((v==null?void 0:v.targetScrollTop)===w)return v.calculatedScrollTop;const A=Math.max(Math.min(e.targetScrollTop(w,{scrollElement:g.current,contentElement:y.current}),w),0);return v={targetScrollTop:w,calculatedScrollTop:A},requestAnimationFrame(()=>{v=void 0}),A},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=uA}}},[]),p=_.useCallback((v={})=>{var R;typeof v=="string"&&(v={animation:v}),v.preserveScrollPosition||u(!0);const w=Date.now()+(Number(v.wait)||0),A=us(s.current,v.animation),{ignoreEscapes:k=!1}=v;let C,T=c.calculatedTargetScrollTop;v.duration instanceof Promise?v.duration.finally(()=>{C=Date.now()}):C=w+(v.duration??0);const P=async()=>{const I=new Promise(requestAnimationFrame).then(()=>{var L;if(!c.isAtBottom)return c.animation=void 0,!1;const{scrollTop:O}=c,j=performance.now(),M=(j-(c.lastTick??j))/cA;if(c.animation||(c.animation={behavior:A,promise:I,ignoreEscapes:k}),c.animation.behavior===A&&(c.lastTick=j),l()||w>Date.now())return P();if(O<Math.min(T,c.calculatedTargetScrollTop)){if(((L=c.animation)==null?void 0:L.behavior)===A){if(A==="instant")return c.scrollTop=c.calculatedTargetScrollTop,P();c.velocity=(A.damping*c.velocity+A.stiffness*c.scrollDifference)/A.mass,c.accumulated+=c.velocity*M,c.scrollTop+=c.accumulated,c.scrollTop!==O&&(c.accumulated=0)}return P()}return C>Date.now()?(T=c.calculatedTargetScrollTop,P()):(c.animation=void 0,c.scrollTop<c.calculatedTargetScrollTop?p({animation:us(s.current,s.current.resize),ignoreEscapes:k,duration:Math.max(0,C-Date.now())||void 0}):c.isAtBottom)});return I.then(O=>(requestAnimationFrame(()=>{c.animation||(c.lastTick=void 0,c.velocity=0)}),O))};return v.wait!==!0&&(c.animation=void 0),((R=c.animation)==null?void 0:R.behavior)===A?c.animation.promise:P()},[u,l,c]),d=_.useCallback(()=>{f(!0),u(!1)},[f,u]),m=_.useCallback(({target:v})=>{if(v!==g.current)return;const{scrollTop:w,ignoreScrollToTop:A}=c;let{lastScrollTop:k=w}=c;c.lastScrollTop=w,c.ignoreScrollToTop=void 0,A&&A>w&&(k=A),a(c.isNearBottom),setTimeout(()=>{var P;if(c.resizeDifference||w===A)return;if(l()){f(!0),u(!1);return}const C=w>k,T=w<k;if((P=c.animation)!=null&&P.ignoreEscapes){c.scrollTop=k;return}T&&(f(!0),u(!1)),C&&f(!1),!c.escapedFromLock&&c.isNearBottom&&u(!0)},1)},[f,u,l,c]),h=_.useCallback(({target:v,deltaY:w})=>{var k;let A=v;for(;!["scroll","auto"].includes(getComputedStyle(A).overflow);){if(!A.parentElement)return;A=A.parentElement}A===g.current&&w<0&&g.current.scrollHeight>g.current.clientHeight&&!((k=c.animation)!=null&&k.ignoreEscapes)&&(f(!0),u(!1))},[f,u,c]),g=Ap(v=>{var w,A;(w=g.current)==null||w.removeEventListener("scroll",m),(A=g.current)==null||A.removeEventListener("wheel",h),v==null||v.addEventListener("scroll",m,{passive:!0}),v==null||v.addEventListener("wheel",h,{passive:!0})},[]),y=Ap(v=>{var A,k;if((A=c.resizeObserver)==null||A.disconnect(),!v)return;let w;c.resizeObserver=new ResizeObserver(([C])=>{const{height:T}=C.contentRect,P=T-(w??T);if(c.resizeDifference=P,c.scrollTop>c.targetScrollTop&&(c.scrollTop=c.targetScrollTop),a(c.isNearBottom),P>=0){const R=us(s.current,w?s.current.resize:s.current.initial);p({animation:R,wait:!0,preserveScrollPosition:!0,duration:R==="instant"?void 0:fA})}else c.isNearBottom&&(f(!1),u(!0));w=T,requestAnimationFrame(()=>{setTimeout(()=>{c.resizeDifference===P&&(c.resizeDifference=0)},1)})}),(k=c.resizeObserver)==null||k.observe(v)},[]);return{contentRef:y,scrollRef:g,scrollToBottom:p,stopScroll:d,isAtBottom:r||o,isNearBottom:o,escapedFromLock:t,state:c}};function Ap(e,t){const n=_.useCallback(r=>(n.current=r,e(r)),t);return n}const ls=new Map;function us(...e){const t={...lA};let n=!1;for(const i of e){if(i==="instant"){n=!0;continue}typeof i=="object"&&(n=!1,t.damping=i.damping??t.damping,t.stiffness=i.stiffness??t.stiffness,t.mass=i.mass??t.mass)}const r=JSON.stringify(t);return ls.has(r)||ls.set(r,Object.freeze(t)),n?"instant":ls.get(r)}const Ip=_.createContext(null),pA=typeof window<"u"?_.useLayoutEffect:_.useEffect;function Ei({instance:e,children:t,resize:n,initial:r,mass:i,damping:o,stiffness:a,targetScrollTop:s,contextRef:l,...u}){const f=_.useRef(null),c=E.useCallback((k,C)=>{const T=(A==null?void 0:A.targetScrollTop)??s;return(T==null?void 0:T(k,C))??k},[s]),p=dA({mass:i,damping:o,stiffness:a,resize:n,initial:r,targetScrollTop:c}),{scrollRef:d,contentRef:m,scrollToBottom:h,stopScroll:g,isAtBottom:y,escapedFromLock:v,state:w}=e??p,A=_.useMemo(()=>({scrollToBottom:h,stopScroll:g,scrollRef:d,isAtBottom:y,escapedFromLock:v,contentRef:m,state:w,get targetScrollTop(){return f.current},set targetScrollTop(k){f.current=k}}),[h,y,m,d,g,v,w]);return _.useImperativeHandle(l,()=>A,[A]),pA(()=>{d.current&&getComputedStyle(d.current).overflow==="visible"&&(d.current.style.overflow="auto")},[]),S.jsx(Ip.Provider,{value:A,children:S.jsx("div",{...u,children:typeof t=="function"?t(A):t})})}(function(e){function t({children:n,...r}){const i=Tp();return S.jsx("div",{ref:i.scrollRef,style:{height:"100%",width:"100%"},children:S.jsx("div",{...r,ref:i.contentRef,children:typeof n=="function"?n(i):n})})}e.Content=t})(Ei||(Ei={}));function Tp(){const e=_.useContext(Ip);if(!e)throw new Error("use-stick-to-bottom component context must be used within a StickToBottom component");return e}const cs=_.memo(({className:e,messages:t=[],isTyping:n,headerMessage:r,renderers:i,botAvatar:o,botDescription:a,botName:s,sendMessage:l,addMessageFeedback:u,showMarquee:f=!0,showDateSystemMessage:c=!0,showMessageStatus:p=!0,showIncomingMessageAvatar:d=!0,showOutgoingMessageAvatar:m=!1,...h})=>{var A;const{messageList:g}=ge,y=_.useMemo(()=>c?gm(t):t,[t]),v=_.useMemo(()=>{var C;const k=y.filter(T=>T.direction==="outgoing"&&T.status!=="pending");return(C=k[k.length-1])==null?void 0:C.id},[y]),w=k=>{if(k.direction==="incoming")return d;if(k.direction==="outgoing")return m};return S.jsxs(Ei,{...h,resize:"smooth",initial:"instant",className:dr(g.container.className,e),children:[S.jsxs(Ei.Content,{className:g.viewPort.className,children:[r&&S.jsx("span",{...g.headerMessage,children:r}),f&&S.jsx(sA,{botAvatar:o,botDescription:a,botName:s}),y.map(k=>{var C;return S.jsx(as,{renderers:i,sendMessage:l,addMessageFeedback:u,isLastDeliveredMessage:p&&k.id===v,showAvatar:w(k),...k},((C=k.metadata)==null?void 0:C.clientMessageId)||k.id)}),n&&S.jsx(as,{id:ss(),renderers:i,sendMessage:l,direction:"incoming",timestamp:new Date,showAvatar:d,block:void 0,sender:((A=t.filter(k=>k.direction==="incoming").at(-1))==null?void 0:A.sender)??{name:s||"Bot",avatar:o},children:S.jsx(os,{})})]}),S.jsx(hA,{})]})}),hA=()=>{const{isAtBottom:e,scrollToBottom:t}=Tp(),{messageList:n}=ge;return e?null:S.jsx("button",{className:n.scrollDownButton.className,onClick:()=>t()})};cs.displayName="MessageList";function Op({error:e,restartConversation:t,closeWindow:n}){let r,i;const{error:o}=ge;return e.type==="configuration"?(r="Configuration error",i=S.jsx(Y0,{...o.icon})):e.type==="bot"?(r="Bot error",i=S.jsx(Mc,{...o.icon})):e.type==="network"?(r="Network error",i=S.jsx(r1,{...o.icon})):e.type==="disconnected"?(r="Disconnected",i=S.jsx(e1,{...o.icon})):(r="Unexpected error",i=S.jsx(Mc,{...o.icon})),S.jsx(mA,{error:e,title:r,icon:i,restartConversation:t,closeWindow:n})}function mA({error:e,title:t,icon:n,restartConversation:r,closeWindow:i}){const{error:o}=ge;return S.jsxs("div",{...o.container,children:[S.jsxs("div",{...o.header.container,children:[`Webchat ${e.type} error`,S.jsxs("div",{...o.header.actions,children:[r&&S.jsx(is,{restartConversation:r,style:{color:"white",backgroundColor:"transparent"}}),i&&S.jsx(Sp,{onClick:i,style:{color:"white",backgroundColor:"transparent"}})]})]}),S.jsxs("div",{...o.content,children:[n,S.jsx("div",{...o.errorTitle,children:t}),S.jsx("div",{...o.errorMessage,children:e.message}),e.id&&S.jsx("div",{...o.id,children:e.id})]})]})}const gA=({className:e,...t})=>{const{className:n}=ge.loader;return S.jsx("div",{...t,className:dr(e,n)})},Dp=({connected:e,configuration:t,isTyping:n,messages:r,user:i,isLoading:o,renderers:a,isReadOnly:s,disableComposer:l,allowFileUpload:u,error:f,participants:c,closeWindow:p,sendMessage:d,uploadFile:m,addMessageFeedback:h,restartConversation:g,clientId:y,storageKey:v,soundOn:w,toggleSound:A,disableSendButton:k,...C})=>{const{color:T,fontFamily:P,radius:R,themeMode:I,variant:O,headerVariant:j,botAvatar:M,botDescription:L,botName:D,composerPlaceholder:z,footer:U,feedbackEnabled:$,additionalStylesheetUrl:V}=t,b={color:T,fontFamily:P,radius:R,themeMode:I,variant:O,headerVariant:j,additionalStylesheetUrl:V};$||(h=void 0);const N=_.useMemo(()=>i?Gs(r,c,i.id,D,M):[],[M,D,r,i,c]),H=_.useRef(null),x=sn(W=>W.setPortalContainer);return _.useEffect(()=>(x(H.current),()=>{x(null)}),[x]),S.jsxs(S.Fragment,{children:[S.jsx(hp,{...b}),S.jsx("div",{ref:H,style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:10}}),S.jsx(es,{connected:e,allowFileUpload:u,uploadFile:m,storageKey:v,...C,children:f?S.jsx(Op,{error:f,restartConversation:g,closeWindow:p}):S.jsxs(S.Fragment,{children:[S.jsx(Ep,{closeWindow:p,configuration:t,restartConversation:g,clientId:y,soundOn:w,toggleSound:A}),o?S.jsx(gA,{}):S.jsx(cs,{botAvatar:M,botDescription:L,botName:D,renderers:a,isTyping:n,sendMessage:d,addMessageFeedback:h,messages:N}),S.jsx(Nd,{sendMessage:d,uploadFile:m,connected:e,isReadOnly:s,disableComposer:l,footer:U,composerPlaceholder:z,allowFileUpload:u,disableSendButton:k,storageKey:v})]})})]})};function Mp(){const[e,t]=_.useState(!1),n=_.useRef(null);return{state:e,setState:(r,i)=>{if(t(r),!r)return()=>{};if(n.current=new Date,!i)return()=>{};const o=setTimeout(()=>{const a=n.current;a&&new Date().getTime()-a.getTime()>i&&t(!1)},i+100);return()=>clearTimeout(o)}}}var yA=Object.defineProperty,vA=(e,t,n)=>t in e?yA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bA=(e,t,n)=>vA(e,t+"",n),wA=async(e,t)=>{let n=typeof t=="function"?await t(e):t;if(n)return e.scheme==="bearer"?`Bearer ${n}`:e.scheme==="basic"?`Basic ${btoa(n)}`:n},xA={bodySerializer:e=>JSON.stringify(e,(t,n)=>typeof n=="bigint"?n.toString():n)},kA=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},SA=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},EA=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},_p=({allowReserved:e,explode:t,name:n,style:r,value:i})=>{if(!t){let s=(e?i:i.map(l=>encodeURIComponent(l))).join(SA(r));switch(r){case"label":return`.${s}`;case"matrix":return`;${n}=${s}`;case"simple":return s;default:return`${n}=${s}`}}let o=kA(r),a=i.map(s=>r==="label"||r==="simple"?e?s:encodeURIComponent(s):Ci({allowReserved:e,name:n,value:s})).join(o);return r==="label"||r==="matrix"?o+a:a},Ci=({allowReserved:e,name:t,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?n:encodeURIComponent(n)}`},Pp=({allowReserved:e,explode:t,name:n,style:r,value:i})=>{if(i instanceof Date)return`${n}=${i.toISOString()}`;if(r!=="deepObject"&&!t){let s=[];Object.entries(i).forEach(([u,f])=>{s=[...s,u,e?f:encodeURIComponent(f)]});let l=s.join(",");switch(r){case"form":return`${n}=${l}`;case"label":return`.${l}`;case"matrix":return`;${n}=${l}`;default:return l}}let o=EA(r),a=Object.entries(i).map(([s,l])=>Ci({allowReserved:e,name:r==="deepObject"?`${n}[${s}]`:s,value:l})).join(o);return r==="label"||r==="matrix"?o+a:a},CA=/\{[^{}]+\}/g,AA=({path:e,url:t})=>{let n=t,r=t.match(CA);if(r)for(let i of r){let o=!1,a=i.substring(1,i.length-1),s="simple";a.endsWith("*")&&(o=!0,a=a.substring(0,a.length-1)),a.startsWith(".")?(a=a.substring(1),s="label"):a.startsWith(";")&&(a=a.substring(1),s="matrix");let l=e[a];if(l==null)continue;if(Array.isArray(l)){n=n.replace(i,_p({explode:o,name:a,style:s,value:l}));continue}if(typeof l=="object"){n=n.replace(i,Pp({explode:o,name:a,style:s,value:l}));continue}if(s==="matrix"){n=n.replace(i,`;${Ci({name:a,value:l})}`);continue}let u=encodeURIComponent(s==="label"?`.${l}`:l);n=n.replace(i,u)}return n},Np=({allowReserved:e,array:t,object:n}={})=>r=>{let i=[];if(r&&typeof r=="object")for(let o in r){let a=r[o];if(a!=null){if(Array.isArray(a)){i=[...i,_p({allowReserved:e,explode:!0,name:o,style:"form",value:a,...t})];continue}if(typeof a=="object"){i=[...i,Pp({allowReserved:e,explode:!0,name:o,style:"deepObject",value:a,...n})];continue}i=[...i,Ci({allowReserved:e,name:o,value:a})]}}return i.join("&")},IA=e=>{var t;if(!e)return"stream";let n=(t=e.split(";")[0])==null?void 0:t.trim();if(n){if(n.startsWith("application/json")||n.endsWith("+json"))return"json";if(n==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(r=>n.startsWith(r)))return"blob";if(n.startsWith("text/"))return"text"}},TA=async({security:e,...t})=>{for(let n of e){let r=await wA(n,t.auth);if(!r)continue;let i=n.name??"Authorization";switch(n.in){case"query":t.query||(t.query={}),t.query[i]=r;break;case"cookie":t.headers.append("Cookie",`${i}=${r}`);break;case"header":default:t.headers.set(i,r);break}return}},Lp=e=>OA({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:Np(e.querySerializer),url:e.url}),OA=({baseUrl:e,path:t,query:n,querySerializer:r,url:i})=>{let o=i.startsWith("/")?i:`/${i}`,a=(e??"")+o;t&&(a=AA({path:t,url:a}));let s=n?r(n):"";return s.startsWith("?")&&(s=s.substring(1)),s&&(a+=`?${s}`),a},Fp=(e,t)=>{var n;let r={...e,...t};return(n=r.baseUrl)!=null&&n.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=Rp(e.headers,t.headers),r},Rp=(...e)=>{let t=new Headers;for(let n of e){if(!n||typeof n!="object")continue;let r=n instanceof Headers?n.entries():Object.entries(n);for(let[i,o]of r)if(o===null)t.delete(i);else if(Array.isArray(o))for(let a of o)t.append(i,a);else o!==void 0&&t.set(i,typeof o=="object"?JSON.stringify(o):o)}return t},fs=class{constructor(){bA(this,"_fns"),this._fns=[]}clear(){this._fns=[]}exists(t){return this._fns.indexOf(t)!==-1}eject(t){let n=this._fns.indexOf(t);n!==-1&&(this._fns=[...this._fns.slice(0,n),...this._fns.slice(n+1)])}use(t){this._fns=[...this._fns,t]}},DA=()=>({error:new fs,request:new fs,response:new fs}),MA=Np({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),_A={"Content-Type":"application/json"},Bp=(e={})=>({...xA,headers:_A,parseAs:"auto",querySerializer:MA,...e}),PA=(e={})=>{let t=Fp(Bp(),e),n=()=>({...t}),r=a=>(t=Fp(t,a),n()),i=DA(),o=async a=>{let s={...t,...a,fetch:a.fetch??t.fetch??globalThis.fetch,headers:Rp(t.headers,a.headers)};s.security&&await TA({...s,security:s.security}),s.body&&s.bodySerializer&&(s.body=s.bodySerializer(s.body)),(s.body===void 0||s.body==="")&&s.headers.delete("Content-Type");let l=Lp(s),u={redirect:"follow",...s},f=new Request(l,u);for(let g of i.request._fns)f=await g(f,s);let c=s.fetch,p=await c(f);for(let g of i.response._fns)p=await g(p,f,s);let d={request:f,response:p};if(p.ok){if(p.status===204||p.headers.get("Content-Length")==="0")return{data:{},...d};let g=(s.parseAs==="auto"?IA(p.headers.get("Content-Type")):s.parseAs)??"json";if(g==="stream")return{data:p.body,...d};let y=await p[g]();return g==="json"&&(s.responseValidator&&await s.responseValidator(y),s.responseTransformer&&(y=await s.responseTransformer(y))),{data:y,...d}}let m=await p.text();try{m=JSON.parse(m)}catch{}let h=m;for(let g of i.error._fns)h=await g(m,p,f,s);if(h=h||{},s.throwOnError)throw h;return{error:h,...d}};return{buildUrl:Lp,connect:a=>o({...a,method:"CONNECT"}),delete:a=>o({...a,method:"DELETE"}),get:a=>o({...a,method:"GET"}),getConfig:n,head:a=>o({...a,method:"HEAD"}),interceptors:i,options:a=>o({...a,method:"OPTIONS"}),patch:a=>o({...a,method:"PATCH"}),post:a=>o({...a,method:"POST"}),put:a=>o({...a,method:"PUT"}),request:o,setConfig:r,trace:a=>o({...a,method:"TRACE"})}},NA=PA,LA=Bp;const Me=NA((e=>({...e,withCredentials:!0,timeout:6e4,maxBodyLength:104857600,maxContentLength:104857600,throwOnError:!0}))(LA({baseUrl:"https://webchat.botpress.cloud/"}))),FA=e=>(e.client??Me).delete({url:"/conversations/{id}",...e}),RA=e=>(e.client??Me).get({url:"/conversations/{id}",...e}),BA=e=>(e.client??Me).get({url:"/conversations",...e}),zA=e=>(e.client??Me).post({url:"/conversations",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),$A=e=>(e.client??Me).get({url:"/conversations/{id}/messages",...e}),jA=e=>(e.client??Me).get({url:"/conversations/{id}/participants",...e}),UA=e=>(e.client??Me).post({url:"/conversations/{id}/participants",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),HA=e=>(e.client??Me).delete({url:"/conversations/{id}/participants/{userId}",...e}),WA=e=>(e.client??Me).get({url:"/conversations/{id}/participants/{userId}",...e}),VA=e=>(e.client??Me).delete({url:"/messages/{id}",...e}),qA=e=>(e.client??Me).get({url:"/messages/{id}",...e}),KA=e=>(e.client??Me).put({url:"/messages/{id}",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),YA=e=>(e.client??Me).post({url:"/messages",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),GA=e=>(e.client??Me).delete({url:"/messages/{id}/feedback",...e}),QA=e=>(e.client??Me).put({url:"/messages/{id}/feedback",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),JA=e=>(e.client??Me).delete({url:"/users/me",...e}),ZA=e=>(e.client??Me).get({url:"/users/me",...e}),XA=e=>(e.client??Me).put({url:"/users/me",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),eI=e=>((e==null?void 0:e.client)??Me).post({url:"/users/key",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),tI=e=>(e.client??Me).get({url:"/events/{id}",...e}),nI=e=>(e.client??Me).post({url:"/events",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),rI=e=>(e.client??Me).post({url:"/files",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}});let zp=class extends Error{constructor(t,n){super(t),this.name="ParseError",this.type=n.type,this.field=n.field,this.value=n.value,this.line=n.line}};function ds(e){}function iI(e){if(typeof e=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:t=ds,onError:n=ds,onRetry:r=ds,onComment:i}=e;let o="",a=!0,s,l="",u="";function f(h){const g=a?h.replace(/^\xEF\xBB\xBF/,""):h,[y,v]=oI(`${o}${g}`);for(const w of y)c(w);o=v,a=!1}function c(h){if(h===""){d();return}if(h.startsWith(":")){i&&i(h.slice(h.startsWith(": ")?2:1));return}const g=h.indexOf(":");if(g!==-1){const y=h.slice(0,g),v=h[g+1]===" "?2:1,w=h.slice(g+v);p(y,w,h);return}p(h,"",h)}function p(h,g,y){switch(h){case"event":u=g;break;case"data":l=`${l}${g}
|
|
314
|
+
`;break;case"id":s=g.includes("\0")?void 0:g;break;case"retry":/^\d+$/.test(g)?r(parseInt(g,10)):n(new zp(`Invalid \`retry\` value: "${g}"`,{type:"invalid-retry",value:g,line:y}));break;default:n(new zp(`Unknown field "${h.length>20?`${h.slice(0,20)}…`:h}"`,{type:"unknown-field",field:h,value:g,line:y}));break}}function d(){l.length>0&&t({id:s,event:u||void 0,data:l.endsWith(`
|
|
315
315
|
`)?l.slice(0,-1):l}),s=void 0,l="",u=""}function m(h={}){o&&h.consume&&c(o),a=!0,s=void 0,l="",u="",o=""}return{feed:f,reset:m}}function oI(e){const t=[];let n="",r=0;for(;r<e.length;){const i=e.indexOf("\r",r),o=e.indexOf(`
|
|
316
316
|
`,r);let a=-1;if(i!==-1&&o!==-1?a=Math.min(i,o):i!==-1?i===e.length-1?a=-1:a=i:o!==-1&&(a=o),a===-1){n=e.slice(r);break}else{const s=e.slice(r,a);t.push(s),r=a+1,e[r-1]==="\r"&&e[r]===`
|
|
317
|
-
`&&r++}}return[t,n]}class $p extends Event{constructor(t,n){var r,i;super(t),this.code=(r=n==null?void 0:n.code)!=null?r:void 0,this.message=(i=n==null?void 0:n.message)!=null?i:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return r(jp(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(jp(this),n)}}function aI(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function hs(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(hs).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${hs(e.cause)}`:e.message:`${e}`}function jp(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var Up=e=>{throw TypeError(e)},ms=(e,t,n)=>t.has(e)||Up("Cannot "+n),ve=(e,t,n)=>(ms(e,t,"read from private field"),n?n.call(e):t.get(e)),Be=(e,t,n)=>t.has(e)?Up("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),_e=(e,t,n,r)=>(ms(e,t,"write to private field"),t.set(e,n),n),It=(e,t,n)=>(ms(e,t,"access private method"),n),Xe,Qt,vn,Ii,Ti,gr,bn,yr,Bt,xn,wn,kn,vr,mt,gs,ys,vs,Hp,bs,xs,br,ws,ks;class Oi extends EventTarget{constructor(t,n){var r,i;super(),Be(this,mt),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,Be(this,Xe),Be(this,Qt),Be(this,vn),Be(this,Ii),Be(this,Ti),Be(this,gr),Be(this,bn),Be(this,yr,null),Be(this,Bt),Be(this,xn),Be(this,wn,null),Be(this,kn,null),Be(this,vr,null),Be(this,ys,async o=>{var a;ve(this,xn).reset();const{body:s,redirected:l,status:u,headers:f}=o;if(u===204){It(this,mt,br).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?_e(this,vn,new URL(o.url)):_e(this,vn,void 0),u!==200){It(this,mt,br).call(this,`Non-200 status code (${u})`,u);return}if(!(f.get("content-type")||"").startsWith("text/event-stream")){It(this,mt,br).call(this,'Invalid content type, expected "text/event-stream"',u);return}if(ve(this,Xe)===this.CLOSED)return;_e(this,Xe,this.OPEN);const c=new Event("open");if((a=ve(this,vr))==null||a.call(this,c),this.dispatchEvent(c),typeof s!="object"||!s||!("getReader"in s)){It(this,mt,br).call(this,"Invalid response body, expected a web ReadableStream",u),this.close();return}const p=new TextDecoder,d=s.getReader();let m=!0;do{const{done:h,value:y}=await d.read();y&&ve(this,xn).feed(p.decode(y,{stream:!h})),h&&(m=!1,ve(this,xn).reset(),It(this,mt,ws).call(this))}while(m)}),Be(this,vs,o=>{_e(this,Bt,void 0),!(o.name==="AbortError"||o.type==="aborted")&&It(this,mt,ws).call(this,hs(o))}),Be(this,bs,o=>{typeof o.id=="string"&&_e(this,yr,o.id);const a=new MessageEvent(o.event||"message",{data:o.data,origin:ve(this,vn)?ve(this,vn).origin:ve(this,Qt).origin,lastEventId:o.id||""});ve(this,kn)&&(!o.event||o.event==="message")&&ve(this,kn).call(this,a),this.dispatchEvent(a)}),Be(this,xs,o=>{_e(this,gr,o)}),Be(this,ks,()=>{_e(this,bn,void 0),ve(this,Xe)===this.CONNECTING&&It(this,mt,gs).call(this)});try{if(t instanceof URL)_e(this,Qt,t);else if(typeof t=="string")_e(this,Qt,new URL(t,sI()));else throw new Error("Invalid URL")}catch{throw aI("An invalid or illegal string was specified")}_e(this,xn,iI({onEvent:ve(this,bs),onRetry:ve(this,xs)})),_e(this,Xe,this.CONNECTING),_e(this,gr,3e3),_e(this,Ti,(r=n==null?void 0:n.fetch)!=null?r:globalThis.fetch),_e(this,Ii,(i=n==null?void 0:n.withCredentials)!=null?i:!1),It(this,mt,gs).call(this)}get readyState(){return ve(this,Xe)}get url(){return ve(this,Qt).href}get withCredentials(){return ve(this,Ii)}get onerror(){return ve(this,wn)}set onerror(t){_e(this,wn,t)}get onmessage(){return ve(this,kn)}set onmessage(t){_e(this,kn,t)}get onopen(){return ve(this,vr)}set onopen(t){_e(this,vr,t)}addEventListener(t,n,r){const i=n;super.addEventListener(t,i,r)}removeEventListener(t,n,r){const i=n;super.removeEventListener(t,i,r)}close(){ve(this,bn)&&clearTimeout(ve(this,bn)),ve(this,Xe)!==this.CLOSED&&(ve(this,Bt)&&ve(this,Bt).abort(),_e(this,Xe,this.CLOSED),_e(this,Bt,void 0))}}Xe=new WeakMap,Qt=new WeakMap,vn=new WeakMap,Ii=new WeakMap,Ti=new WeakMap,gr=new WeakMap,bn=new WeakMap,yr=new WeakMap,Bt=new WeakMap,xn=new WeakMap,wn=new WeakMap,kn=new WeakMap,vr=new WeakMap,mt=new WeakSet,gs=function(){_e(this,Xe,this.CONNECTING),_e(this,Bt,new AbortController),ve(this,Ti)(ve(this,Qt),It(this,mt,Hp).call(this)).then(ve(this,ys)).catch(ve(this,vs))},ys=new WeakMap,vs=new WeakMap,Hp=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...ve(this,yr)?{"Last-Event-ID":ve(this,yr)}:void 0},cache:"no-store",signal:(e=ve(this,Bt))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},bs=new WeakMap,xs=new WeakMap,br=function(e,t){var n;ve(this,Xe)!==this.CLOSED&&_e(this,Xe,this.CLOSED);const r=new $p("error",{code:t,message:e});(n=ve(this,wn))==null||n.call(this,r),this.dispatchEvent(r)},ws=function(e,t){var n;if(ve(this,Xe)===this.CLOSED)return;_e(this,Xe,this.CONNECTING);const r=new $p("error",{code:t,message:e});(n=ve(this,wn))==null||n.call(this,r),this.dispatchEvent(r),_e(this,bn,setTimeout(ve(this,ks),ve(this,gr)))},ks=new WeakMap,Oi.CONNECTING=0,Oi.OPEN=1,Oi.CLOSED=2;function sI(){const e="document"in globalThis?globalThis.document:void 0;return e&&typeof e=="object"&&"baseURI"in e&&typeof e.baseURI=="string"?e.baseURI:void 0}async function lI(e){var t;const n=await e.clone().json();if((t=n==null?void 0:n.id)!=null&&t.startsWith("err_")){const r=new Error(n.message);throw r.id=n.id,r.code=n.code,r.type=n.type,r}return e}const Wp=()=>{const e={};return{on:(t,n)=>{var r;return e[t]||(e[t]=new Set),(r=e[t])==null||r.add(n),()=>{var i;return(i=e[t])==null?void 0:i.delete(n)}},emit:(t,n)=>{var r,i;(r=e[t])==null||r.forEach(o=>o(n)),(i=e["*"])==null||i.forEach(o=>o({type:t,payload:n}))}}},Le=e=>e.data,Vp=10,qp=3e3,uI="60000",cI={throwOnError:!0},fI=({conversationId:e,userToken:t,clientId:n,apiUrl:r,adminSecret:i})=>{let o=0,a=null;const s=Wp(),l=()=>{a&&a.close();const u=`${`${r||Me.getConfig().baseUrl}/${n}`}/initialize${e?`?conversationId=${e}`:""}`,f={...i?{"x-admin-secret":i}:{},...t?{"x-user-key":t}:{}};a=Yp(u,f),a.onopen=()=>s.emit("open"),a.onerror=c=>{o<Vp?(o++,setTimeout(()=>l(),qp)):s.emit("error",c)},a.onmessage=c=>{const p=Kp(c.data);s.emit(p.type,p.data)}};return l(),s.on},dI=({userKey:e,clientId:t,apiUrl:n,customHeaders:r})=>{const i={"x-user-key":e,...r},o=`${n||Me.getConfig().baseUrl}/${t}`,a={...cI,baseUrl:o};return Me.interceptors.response._fns.length===0&&Me.interceptors.response.use(lI),{createConversation:()=>zA({...a,headers:i,body:{}}).then(Le),getConversation:({conversationId:s})=>RA({...a,headers:i,path:{id:s}}).then(Le),deleteConversation:({conversationId:s})=>FA({...a,headers:i,path:{id:s}}).then(Le),listConversations:({nextToken:s})=>BA({...a,headers:i,query:{nextToken:s}}).then(Le),listConversationMessages:({conversationId:s,nextToken:l})=>$A({...a,headers:i,path:{id:s},query:{nextToken:l}}).then(Le),addParticipant:({conversationId:s,userId:l})=>UA({...a,headers:i,path:{id:s},body:{userId:l}}).then(Le),removeParticipant:({conversationId:s,userId:l})=>HA({...a,headers:i,path:{id:s,userId:l}}).then(Le),getParticipant:({conversationId:s,userId:l})=>WA({...a,headers:i,path:{id:s,userId:l}}).then(Le),listParticipants:({conversationId:s,nextToken:l})=>jA({...a,headers:i,path:{id:s},query:{nextToken:l}}).then(Le),createMessage:s=>YA({...a,headers:i,body:s}).then(Le),updateMessage:({messageId:s,...l})=>KA({...a,headers:i,path:{id:s},body:l}).then(Le),getMessage:({messageId:s})=>qA({...a,headers:i,path:{id:s}}).then(Le),deleteMessage:({messageId:s})=>VA({...a,headers:i,path:{id:s}}).then(Le),createFile:s=>rI({...a,headers:i,body:s}).then(Le),getUser:()=>ZA({...a,headers:i}).then(Le),updateUser:s=>XA({...a,headers:i,body:s}).then(Le),deleteUser:()=>JA({...a,headers:i}).then(Le),createEvent:s=>nI({...a,headers:i,body:s}).then(Le),getEvent:({eventId:s})=>tI({...a,headers:i,path:{id:s}}).then(Le),addMessageFeedback:({messageId:s,...l})=>QA({...a,headers:i,path:{id:s},body:l}).then(Le),removeMessageFeedback:({messageId:s})=>GA({...a,headers:i,path:{id:s}}).then(Le),generateUserKey:({adminSecret:s,...l})=>eI({...a,headers:{"x-admin-secret":s},body:l}).then(Le),listenConversation:({conversationId:s})=>{let l=0,u=null;const f=Wp(),c=()=>{u&&u.close();const p=`${o}/conversations/${s}/listen`;u=Yp(p,i),u.onopen=()=>f.emit("open"),u.onerror=d=>{l<Vp?(l++,setTimeout(()=>c(),qp)):f.emit("error",d)},u.onmessage=d=>{const m=Kp(d.data);f.emit(m.type,m.data)}};return c(),f.on}}},Kp=e=>{try{return JSON.parse(e)}catch{return e}},Yp=(e,t)=>new Oi(e,{fetch:(n,r)=>fetch(n,{...r,headers:{...r==null?void 0:r.headers,...t,timeout:uI}})}),Gp={chatMessageNotification:new URL("data:audio/ogg;base64,T2dnUwACAAAAAAAAAAAVJAEzAAAAAOU+A6UBHgF2b3JiaXMAAAAAASJWAAD/////AH0AAP////+pAU9nZ1MAAAAAAAAAAAAAFSQBMwEAAAD3T/UfDpz////////////////FA3ZvcmJpcwwAAABMYXZmNjEuNy4xMDAEAAAAHwAAAGVuY29kZXI9TGF2YzYxLjE5LjEwMSBsaWJ2b3JiaXMrAAAAZW5jb2RlZF9ieT1BZG9iZSBQcmVtaWVyZSBQcm8gMjAyNS4wIChNYWNpbhcAAAB0aW1lX3JlZmVyZW5jZT0xMjExMDQwMA8AAABkYXRlPTIwMjUtMDgtMDUBBXZvcmJpcyJCQ1YBAEAAABhCECoFrWOOOsgVIYwZoqBCyinHHULQIaMkQ4g6xjXHGGNHuWSKQsmB0JBVAABAAACkHFdQckkt55xzoxhXzHHoIOecc+UgZ8xxCSXnnHOOOeeSco4x55xzoxhXDnIpLeecc4EUR4pxpxjnnHOkHEeKcagY55xzbTG3knLOOeecc+Ygh1JyrjXnnHOkGGcOcgsl55xzxiBnzHHrIOecc4w1t9RyzjnnnHPOOeecc84555xzjDHnnHPOOeecc24x5xZzrjnnnHPOOeccc84555xzIDRkFQCQAACgoSiK4igOEBqyCgDIAAAQQHEUR5EUS7Ecy9EkDQgNWQUAAAEACAAAoEiGpEiKpViOZmmeJnqiKJqiKquyacqyLMuy67ouEBqyCgBIAABQURTFcBQHCA1ZBQBkAAAIYCiKoziO5FiSpVmeB4SGrAIAgAAABAAAUAxHsRRN8STP8jzP8zzP8zzP8zzP8zzP8zzP8zwNCA1ZBQAgAAAAgihkGANCQ1YBAEAAAAghGhlDnVISXAoWQhwRQx1CzkOppYPgKYUlY9JTrEEIIXzvPffee++B0JBVAAAQAABhFDiIgcckCCGEYhQnRHGmIAghhOUkWMp56CQI3YMQQrice8u59957IDRkFQAACADAIIQQQgghhBBCCCmklFJIKaaYYoopxxxzzDHHIIMMMuigk046yaSSTjrKJKOOUmsptRRTTLHlFmOttdacc69BKWOMMcYYY4wxxhhjjDHGGCMIDVkFAIAAABAGGWSQQQghhBRSSCmmmHLMMcccA0JDVgEAgAAAAgAAABxFUiRHciRHkiTJkixJkzzLszzLszxN1ERNFVXVVW3X9m1f9m3f1WXf9mXb1WVdlmXdtW1d1l1d13Vd13Vd13Vd13Vd13Vd14HQkFUAgAQAgI7kOI7kOI7kSI6kSAoQGrIKAJABABAAgKM4iuNIjuRYjiVZkiZplmd5lqd5mqiJHhAasgoAAAQAEAAAAAAAgKIoiqM4jiRZlqZpnqd6oiiaqqqKpqmqqmqapmmapmmapmmapmmapmmapmmapmmapmmapmmapmmapmkCoSGrAAAJAAAdx3EcR3Ecx3EkR5IkIDRkFQAgAwAgAABDURxFcizHkjRLszzL00TP9FxRNnVTV20gNGQVAAAIACAAAAAAAADHczzHczzJkzzLczzHkzxJ0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRNA0JDVgIAZAAAEJOQSk6xV0YpxiS0XiqkFJPUe6iYYkw67alCBikHuYdKIaWg094ypZBSDHunmELIGOqhg5AxhbDX2nPPvfceCA1ZEQBEAQAAxiDGEGPIMSYlgxIxxyRkUiLnnJROSialpFZazKSEmEqLkXNOSiclk1JaC6llkkprJaYCAAACHAAAAiyEQkNWBABRAACIMUgppBRSSjGnmENKKceUY0gp5ZxyTjnHmHQQKucYdA5KpJRyjjmnnHMSMgeVcw5CJp0AAIAABwCAAAuh0JAVAUCcAACAkHOKMQgRYxBCCSmFUFKqnJPSQUmpg5JSSanFklKMlXNSOgkpdRJSKinFWFKKLaRUY2kt19JSjS3GnFuMvYaUYi2p1Vpaq7nFWHOLNffIOUqdlNY6Ka2l1mpNrdXaSWktpNZiaS3G1mLNKcacMymthZZiK6nF2GLLNbWYc2kt1xRjzynGnmusucecgzCt1ZxayznFmHvMseeYcw+Sc5Q6Ka11UlpLrdWaWqs1k9Jaaa3GkFqLLcacW4sxZ1JaLKnFWFqKMcWYc4st19BarinGnFOLOcdag5Kx9l5aqznFmHuKreeYczA2x547SrmW1nourfVecy5C1tyLaC3n1GoPKsaec87B2NyDEK3lnGrsPcXYe+45GNtz8K3W4FvNRcicg9C5+KZ7MEbV2oPMtQiZcxA66CJ08Ml4lGoureVcWus91hp8zTkI0VruKcbeU4u9156bsL0HIVrLPcXYg4ox+JpzMDrnYlStwcecg5C1FqF7L0rnIJSqtQeZa1Ay1yJ08MXooIsvAABgwAEAIMCEMlBoyIoAIE4AgEHIOaUYhEopCKGElEIoKVWMSciYg5IxJ6WUUloIJbWKMQiZY1Iyx6SEEloqJbQSSmmplNJaKKW1llqMKbUWQymphVJaK6W0llqqMbVWY8SYlMw5KZljUkoprZVSWqsck5IxKKmDkEopKcVSUouVc1Iy6Kh0EEoqqcRUUmmtpNJSKaXFklJsKcVUW4u1hlJaLKnEVlJqMbVUW4sx14gxKRlzUjLnpJRSUiultJY5J6WDjkrmoKSSUmulpBQz5qR0DkrKIKNSUootpRJTKKW1klJspaTWWoy1ptRaLSW1VlJqsZQSW4sx1xZLTZ2U1koqMYZSWmsx5ppaizGUElspKcaSSmytxZpbbDmGUlosqcRWSmqx1ZZja7Hm1FKNKbWaW2y5xpRTj7X2nFqrNbVUY2ux5lhbb7XWnDsprYVSWislxZhai7HFWHMoJbaSUmylpBhbbLm2FmMPobRYSmqxpBJjazHmGFuOqbVaW2y5ptRirbX2HFtuPaUWa4ux5tJSjTXX3mNNORUAADDgAAAQYEIZKDRkJQAQBQAAGMMYYxAapZxzTkqDlHPOScmcgxBCSplzEEJIKXNOQkotZc5BSKm1UEpKrcUWSkmptRYLAAAocAAACLBBU2JxgEJDVgIAUQAAiDFKMQahMUYp5yA0xijFGIRKKcack1ApxZhzUDLHnINQSuaccxBKCSGUUkpKIYRSSkmpAACAAgcAgAAbNCUWByg0ZEUAEAUAABhjnDPOIQqdpc5SJKmj1lFrKKUaS4ydxlZ767nTGnttuTeUSo2p1o5ry7nV3mlNPbccCwAAO3AAADuwEAoNWQkA5AEAEMYoxZhzzhmFGHPOOecMUow555xzijHnnIMQQsWYc85BCCFzzjkIoYSSOecchBBK6JyDUEoppXTOQQihlFI65yCEUkopnXMQSimllAIAgAocAAACbBTZnGAkqNCQlQBAHgAAYAxCzklprWHMOQgt1dgwxhyUlGKLnIOQUou5RsxBSCnGoDsoKbUYbPCdhJRaizkHk1KLNefeg0iptZqDzj3VVnPPvfecYqw1595zLwAAd8EBAOzARpHNCUaCCg1ZCQDkAQAQCCnFmHPOGaUYc8w554xSjDHmnHOKMcacc85BxRhjzjkHIWPMOecghJAx5pxzEELonHMOQgghdM45ByGEEDrnoIMQQgidcxBCCCGEAgCAChwAAAJsFNmcYCSo0JCVAEA4AAAAIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEELonHPOOeecc84555xzzjnnnHPOOScAyLfCAcD/wcYZVpLOCkeDCw1ZCQCEAwAACkEopWIQSiklkk46KZ2TUEopkYNSSumklFJKCaWUUkoIpZRSSggdlFJCKaWUUkoppZRSSimllFI6KaWUUkoppZTKOSmlk1JKKaVEzkkpIZRSSimlhFJKKaWUUkoppZRSSimllFJKKaWEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQCALgbHAAgEmycYSXprHA0uNCQlQBASAAAoBRzjkoIKZSQUqiYoo5CKSmkUkoKEWPOSeochVBSKKmDyjkIpaSUQiohdc5BByWFkFIJIZWOOugolFBSKiWU0jkopYQUSkoplZBCSKl0lFIoJZWUQiohlVJKSCWVEEoKnaRUSgqppFRSCJ10kEInJaSSSgqpk5RSKiWllEpKJXRSQioppRBCSqmUEEpIKaVOUkmppBRCKCGFlFJKJaWSSkohlVRCCaWklFIooaRUUkoppZJSKQAA4MABACDACDrJqLIIG0248AAUGrISACADAECUdNZpp0kiCDFFmScNKcYgtaQswxBTkonxFGOMOShGQw4x5JQYF0oIoYNiPCaVQ8pQUbm31DkFxRZjfO+xFwEAAAgCAASEBAAYICiYAQAGBwgjBwIdAQQObQCAgQiZCQwKocFBJgA8QERIBQCJCYrShS4IIYJ0EWTxwIUTN5644YQObRAAAAAAABAA8AEAkFAAERHRzFVYXGBkaGxwdHh8gIQEAAAAAAAIAHwAACQiQERENHMVFhcYGRobHB0eHyAhAQAAAAAAAAAAQEBAAAAAAAAgAAAAQEBPZ2dTAASuMwAAAAAAABUkATMCAAAACYS6sR4BAUQxGR89NxobGiEkKCknJiYmJSUhISEaFgwBAQEAAnyfvULHAlAEJgh2vpgQBMHIyMjIyNhIQOjz+ePz58+fL89xAwYBAFaH//3//7/xNw0MBoNB6qlPfWrUKQng+/0FABAAhLEjKuHFBwA4AHC9Fx4Oh7EwDEOgvnJ3RtV+Op0+nU6n5cyzEwAoltTpwed5dgVKMPoru90zNHGA7F0CP98BAAAAAHl9ePviAgCW+3rugPIDwC6BbWoTAFEAAADh5GpCCACgc+0zxlAAVKddkjDsA14GDoJtf7R+NkE4W23hI5mF3d74iVGvzg9PpA4cCQs66joePTmOfhgl7vNZzYzQADDyz30FAGSvVUZ6wJ4MAKbCGeb4+v5NLIdK3YvrLkCu98uV//FpXQNyKAKAV7r186fTktcJJgjAlVp1fUmaGgtrdAAuDXYJSPs/AAAAAHDnAeHxciEUAB76CvfarGjDzIjALoEd+/0EAAAAQNYeMrkBAF6ZKm8xuw94NtgloHDUCAAAAIAMJ5Qz2iUAvjhKL8lkfmA6wi6BWfNHgiAAAABq4eeqGgCg8+LAAXQAfhgqz2RKHzAVYJeAynEAIQEAALwq6tFbIQAEEIIO8iULngMAXhgajrw3D5iFWhe7BLZNrwCVKAAA0t2TfT8mADx0aMfS4CULeACvA14YWnasNht80ZpdAhv8BEiiAADgcbm4jo0JANAVCTRV6JqQS0OTADoAXhg6zWy+AZ3GsiDRAYJzgiQAAICnb9FLAQAUNQFd44AioMNJICUAfhi67ZRjA2IMSHTAJK0KkgAAAG7W0uLlEgC6KnQdDkgBlAAdJAB+GHpL40hATAASHSC5CZIAAAAGZ3J60ioBoKsBTQKE5KFJIJFAAp4Y+jp7cg4qINEBi+MASQAAAM8rmdZcAKApwFhNPHQkQEBRQwIAnhj6OZ8KIBwDiQ4Q9ApIFAAAQHRFd6FEALA0NaApQAegnPrDA54Y+nN+AYAIJDoAfgIkCgAAcLRlPVsLALqmKqFpHIwUwQEJCwCeKPpzEQA8kOgAyTlBAgAAgPnK3q8jAWAuJFBYOsbAAgCeKPolEQA8rMFCohQAAMxD2BdSAJYFdNThKcCkBQCOgwKeGPpzEQA8rEEhCQAAoCz4MRGA41gaQMBRjACexHugAACeGPqFCAAeugQAAHryFgBdRYGFhGeow8x7AJ4Y+iURADyIigIAliFAAcYWCQC11gGeGPolEQA8UAAAABoODg4=",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:ji&&ji.tagName.toUpperCase()==="SCRIPT"&&ji.src||new URL("index.umd.cjs",document.baseURI).href).href};function Qp({apiUrl:e="https://webchat.botpress.cloud",clientId:t,storageKey:n,storageLocation:r,adminSecret:i,soundEnabled:o,...a}){var oe;const s=of(n,r),l=s(G=>G.conversationId),u=s(G=>G.user),f=s(G=>G.setConversationId),c=s(G=>G.setUser),p=s(G=>G.clearConversationId),d=an(G=>G.messages),m=an(G=>G.saveMessage),h=an(G=>G.updateMessage),y=an(G=>G.fetchMessages),g=an(G=>G.setMessages),v=an(G=>G.clearMessages),x=Gn(G=>G.participants),A=Gn(G=>G.setParticipants),k=Gn(G=>G.addParticipant),C=Gn(G=>G.removeParticipant),T=Gn(G=>G.clearParticipants),M=sf(`webchat-sound-${t}`),R=M(G=>G.soundOn),I=M(G=>G.toggleSound),{state:O,setState:j}=Mp(),{state:_,setState:N}=Mp(),D=F.useMemo(()=>el(),[]),[z,U]=F.useState("connecting"),[$,V]=F.useState(a.conversationId),[b,P]=F.useState(a.user),[H,w]=F.useState(void 0),[W,X]=F.useState(!1),[Y,J]=F.useState(void 0),ee=F.useRef(!1),ie=F.useRef(null),K=F.useRef(o??!1);F.useEffect(()=>{K.current=o??!1},[o]);const te=F.useRef(R);F.useEffect(()=>{te.current=R},[R]),F.useEffect(()=>{var Ue,Ye,Z,se;const G=pI(t,e);if(G){J(G),U("error");return}if(ee.current)return;ee.current=!0,j(!1),U("connecting");try{ie.current=new Audio,ie.current.preload="auto",ie.current.src=Gp.chatMessageNotification,ie.current.volume=.9}catch(B){console.error("Error loading sound effect:",B),ie.current=null}let ue;(Ue=a.user)!=null&&Ue.userToken&&a.conversationId?ue={conversationId:a.conversationId,userToken:(Ye=a.user)==null?void 0:Ye.userToken}:(Z=a.user)!=null&&Z.userToken?ue={conversationId:void 0,userToken:(se=a.user)==null?void 0:se.userToken}:ue={conversationId:l,userToken:u==null?void 0:u.userToken};const de=fI({apiUrl:e,clientId:t,userToken:ue.userToken,conversationId:ue.conversationId,adminSecret:i});let xe=[];const Se=de("init",({conversation:B,messages:q,participants:ae,user:le})=>{const pe=dI({clientId:t,apiUrl:e,userKey:le.userKey});pe.createEvent({conversationId:B.id,payload:{type:"conversation_started",data:{}}}).then(({event:fe})=>{var Ee,Oe;(Oe=(Ee=fe.payload.data)==null?void 0:Ee.status)!=null&&Oe.isInitial&&D.emit("conversation",B.id)}),xe=[...xe,de("error",fe=>{J(Ee=>Ee||Sr(fe)),U("error"),D.emit("error",new Error(`Connection to conversation lost: ${fe==null?void 0:fe.message}`))}),de("message_created",fe=>{const Ee=Kn(fe);le.id!==Ee.authorId&&(K.current&&te.current&&ie.current&&ie.current.play().catch(()=>{}),j(!1),N(!1),D.emit("isTyping",{isTyping:!1,timeout:0})),m(Ee),D.emit("message",Ee)}),de("message_status_changed",fe=>{var Ee;fe.newStatus==="processing"&&h((Ee=fe.message.metadata)==null?void 0:Ee.clientMessageId,{status:fe.newStatus})}),de("typing_stopped",()=>{j(!1),N(!1)}),de("typing_started",()=>{j(!0,5e3),N(!0,5e3),D.emit("isTyping",{isTyping:!0,timeout:5e3})}),de("participant_added",fe=>{k(fe.participant),D.emit("participantAdded",fe.participant)}),de("participant_removed",fe=>{C(fe.participantId),D.emit("participantRemoved",fe.participantId)}),de("webchat_visibility",fe=>D.emit("webchatVisibility",fe.visibility)),de("webchat_config",fe=>D.emit("webchatConfig",fe.config)),de("custom",fe=>D.emit("customEvent",fe.event))],V(B.id),f(B.id),P({userId:le.id,userToken:le.userKey}),c({userId:le.id,userToken:le.userKey}),A(ae),g(q.reverse().map(fe=>Kn(fe)).filter(Boolean)),J(void 0),U("connected"),w(pe)});return xe.push(Se),()=>{ee.current=!1,xe.forEach(B=>B())}},[a.conversationId,(oe=a.user)==null?void 0:oe.userToken,W]);const L=async(G,ue)=>{const de=ue||$;if(!G||!de)return;const xe=await y({client:G,conversationId:de});g(xe);const{participants:Se}=await G.listParticipants({conversationId:de});A(Se)},ne=async G=>{if(!G)throw new Error("Cannot start new conversation: client is not initialized");p(),v(),T(),V(void 0),X(ue=>!ue)};async function me(G,ue){const xe=[{predicate:Se=>Se.message===Zi||Se.type==="ResourceNotFound",recover:()=>ne(ue)},{predicate:Se=>Se.type==="network"||Se.type==="disconnected"||Se.message===Pn,recover:()=>L(ue,$)}].find(Se=>Se.predicate(G));if(!xe){U("error"),J(G);return}try{await El(xe.recover,3,5e3),J(void 0),U("connected")}catch(Se){J(Sr(Se)),U("error")}}if(z!=="connected"||!b||!$||!H)return{clientState:z,on:D.on,client:void 0,messages:[],conversationId:void 0,newConversation:async()=>{await ne(H)},user:void 0,isTyping:void 0,participants:[],toggleSound:I,soundOn:R,error:Y,disableSendButton:_};const ke={sendMessage:async G=>{const ue=ls(),de={id:ue,createdAt:new Date().toISOString(),userId:b.userId,conversationId:$,payload:G,metadata:{clientMessageId:ue,delivered:!1}},xe=Kn(de);xe.status="pending",m(xe),N(!0,5e3);try{await H.createMessage({conversationId:$,payload:G,metadata:{clientMessageId:ue}})}catch(Se){await me(Sr(Se),H),D.emit("error",Se)}},sendEvent:async(G,ue)=>{await H.createEvent({conversationId:$,payload:{type:"custom",data:G},bindConversation:(ue==null?void 0:ue.bindConversation)??!0,bindUser:(ue==null?void 0:ue.bindUser)??!0})},uploadFile:async G=>{const{size:ue,name:de}=G,Se=await(ae=>new Promise((le,pe)=>{const fe=new FileReader;fe.onload=Ee=>{var Oe;return le((Oe=Ee.target)==null?void 0:Oe.result)},fe.onerror=Ee=>{var Oe;return pe((Oe=Ee.target)==null?void 0:Oe.error)},fe.readAsArrayBuffer(ae)}))(G),Ue=new Date;Ue.setDate(Ue.getDate()+30);const{file:{uploadUrl:Ye,contentType:Z,url:se}}=await H.createFile({size:ue,key:`${ls(6)}-${G.name}`,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat",conversation:$,user:b.userId},expiresAt:Ue.toISOString()});await fetch(Ye,{method:"PUT",headers:{"x-amz-tagging":"public=true","content-type":Z},body:Se});const B=Z.split("/").shift()??"",q=fl(B)?B:"file";return{fileUrl:se,name:de,type:q}},addMessageFeedback:async(G,ue)=>{h(G,{feedback:ue.value}),await H.addMessageFeedback({messageId:G,...ue})},getUser:async()=>{const{user:G}=await H.getUser();return G},updateUser:async G=>{const{user:ue}=await H.updateUser({name:G.name,pictureUrl:G.pictureUrl,userData:G.data});return ue}};return{clientState:"connected",on:D.on,client:ke,messages:d,conversationId:$,newConversation:async()=>{await ne(H)},user:b,isTyping:O,participants:x,error:Y,soundOn:R,toggleSound:I,disableSendButton:_}}const pI=(e,t)=>{if(!e)return{type:"configuration",message:dl};if(!zm(t))return{type:"configuration",message:pl}},hI=({clientId:e,storageKey:t,configuration:n,allowFileUpload:r,apiUrl:i,user:o,conversationId:a,...s})=>{const l=t||`bp-webchat-${e}`,{clientState:u,client:f,isTyping:c,newConversation:p,messages:d,participants:m,user:h,error:y,soundOn:g,toggleSound:v,disableSendButton:x}=Qp({clientId:e,apiUrl:i,conversationId:a,user:o,storageKey:l,storageLocation:n==null?void 0:n.storageLocation,adminSecret:n==null?void 0:n.adminSecret,soundEnabled:n==null?void 0:n.soundEnabled}),{sendMessage:A,uploadFile:k,addMessageFeedback:C}=f??{};return S.jsx(Dp,{configuration:n??{},user:h!=null&&h.userId?{id:h==null?void 0:h.userId}:void 0,isLoading:u==="connecting",isTyping:c,connected:u==="connected"?!0:u==="disconnected"?!1:void 0,messages:d,sendMessage:A,uploadFile:k,addMessageFeedback:C,allowFileUpload:r,restartConversation:p,...s,participants:m,error:y,clientId:e,soundOn:g,toggleSound:v,disableSendButton:x})};function mI(e,t=globalThis==null?void 0:globalThis.document){const n=Zt(e);E.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 gI="DismissableLayer",Ss="dismissableLayer.update",yI="dismissableLayer.pointerDownOutside",vI="dismissableLayer.focusOutside",Jp,Zp=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Xp=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...l}=e,u=E.useContext(Zp),[f,c]=E.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,d]=E.useState({}),m=Ot(t,T=>c(T)),h=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=h.indexOf(y),v=f?h.indexOf(f):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,A=v>=g,k=wI(T=>{const M=T.target,R=[...u.branches].some(I=>I.contains(M));!A||R||(i==null||i(T),a==null||a(T),T.defaultPrevented||s==null||s())},p),C=kI(T=>{const M=T.target;[...u.branches].some(I=>I.contains(M))||(o==null||o(T),a==null||a(T),T.defaultPrevented||s==null||s())},p);return mI(T=>{v===u.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&s&&(T.preventDefault(),s()))},p),E.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Jp=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),eh(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Jp)}},[f,p,n,u]),E.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),eh())},[f,u]),E.useEffect(()=>{const T=()=>d({});return document.addEventListener(Ss,T),()=>document.removeEventListener(Ss,T)},[]),S.jsx(ht.div,{...l,ref:m,style:{pointerEvents:x?A?"auto":"none":void 0,...e.style},onFocusCapture:At(e.onFocusCapture,C.onFocusCapture),onBlurCapture:At(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:At(e.onPointerDownCapture,k.onPointerDownCapture)})});Xp.displayName=gI;var bI="DismissableLayerBranch",xI=E.forwardRef((e,t)=>{const n=E.useContext(Zp),r=E.useRef(null),i=Ot(t,r);return E.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),S.jsx(ht.div,{...e,ref:i})});xI.displayName=bI;function wI(e,t=globalThis==null?void 0:globalThis.document){const n=Zt(e),r=E.useRef(!1),i=E.useRef(()=>{});return E.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let l=function(){th(yI,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function kI(e,t=globalThis==null?void 0:globalThis.document){const n=Zt(e),r=E.useRef(!1);return E.useEffect(()=>{const i=o=>{o.target&&!r.current&&th(vI,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function eh(){const e=new CustomEvent(Ss);document.dispatchEvent(e)}function th(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?GC(i,o):i.dispatchEvent(o)}var Es="focusScope.autoFocusOnMount",Cs="focusScope.autoFocusOnUnmount",nh={bubbles:!1,cancelable:!0},SI="FocusScope",rh=E.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=E.useState(null),u=Zt(i),f=Zt(o),c=E.useRef(null),p=Ot(t,h=>l(h)),d=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(r){let h=function(x){if(d.paused||!s)return;const A=x.target;s.contains(A)?c.current=A:zt(c.current,{select:!0})},y=function(x){if(d.paused||!s)return;const A=x.relatedTarget;A!==null&&(s.contains(A)||zt(c.current,{select:!0}))},g=function(x){if(document.activeElement===document.body)for(const k of x)k.removedNodes.length>0&&zt(s)};document.addEventListener("focusin",h),document.addEventListener("focusout",y);const v=new MutationObserver(g);return s&&v.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",y),v.disconnect()}}},[r,s,d.paused]),E.useEffect(()=>{if(s){ah.add(d);const h=document.activeElement;if(!s.contains(h)){const g=new CustomEvent(Es,nh);s.addEventListener(Es,u),s.dispatchEvent(g),g.defaultPrevented||(EI(OI(ih(s)),{select:!0}),document.activeElement===h&&zt(s))}return()=>{s.removeEventListener(Es,u),setTimeout(()=>{const g=new CustomEvent(Cs,nh);s.addEventListener(Cs,f),s.dispatchEvent(g),g.defaultPrevented||zt(h??document.body,{select:!0}),s.removeEventListener(Cs,f),ah.remove(d)},0)}}},[s,u,f,d]);const m=E.useCallback(h=>{if(!n&&!r||d.paused)return;const y=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,g=document.activeElement;if(y&&g){const v=h.currentTarget,[x,A]=CI(v);x&&A?!h.shiftKey&&g===A?(h.preventDefault(),n&&zt(x,{select:!0})):h.shiftKey&&g===x&&(h.preventDefault(),n&&zt(A,{select:!0})):g===v&&h.preventDefault()}},[n,r,d.paused]);return S.jsx(ht.div,{tabIndex:-1,...a,ref:p,onKeyDown:m})});rh.displayName=SI;function EI(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(zt(r,{select:t}),document.activeElement!==n)return}function CI(e){const t=ih(e),n=oh(t,e),r=oh(t.reverse(),e);return[n,r]}function ih(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 oh(e,t){for(const n of e)if(!AI(n,{upTo:t}))return n}function AI(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 II(e){return e instanceof HTMLInputElement&&"select"in e}function zt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&II(e)&&t&&e.select()}}var ah=TI();function TI(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=sh(e,t),e.unshift(t)},remove(t){var n;e=sh(e,t),(n=e[0])==null||n.resume()}}}function sh(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function OI(e){return e.filter(t=>t.tagName!=="A")}var As=0;function DI(){E.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??lh()),document.body.insertAdjacentElement("beforeend",e[1]??lh()),As++,()=>{As===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),As--}},[])}function lh(){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 Di="right-scroll-bar-position",Mi="width-before-scroll-bar",MI="with-scroll-bars-hidden",_I="--removed-body-scroll-bar-size";function Is(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function PI(e,t){var n=F.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 NI=typeof window<"u"?E.useLayoutEffect:E.useEffect,uh=new WeakMap;function LI(e,t){var n=PI(null,function(r){return e.forEach(function(i){return Is(i,r)})});return NI(function(){var r=uh.get(n);if(r){var i=new Set(r),o=new Set(e),a=n.current;i.forEach(function(s){o.has(s)||Is(s,null)}),o.forEach(function(s){i.has(s)||Is(s,a)})}uh.set(n,e)},[e]),n}function FI(e){return e}function RI(e,t){t===void 0&&(t=FI);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var f=a;a=[],f.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(f){a.push(f),u()},filter:function(f){return a=a.filter(f),n}}}};return i}function BI(e){e===void 0&&(e={});var t=RI(null);return t.options=ot({async:!0,ssr:!1},e),t}var ch=function(e){var t=e.sideCar,n=cf(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 E.createElement(r,ot({},n))};ch.isSideCarExport=!0;function zI(e,t){return e.useMedium(t),ch}var fh=BI(),Ts=function(){},_i=E.forwardRef(function(e,t){var n=E.useRef(null),r=E.useState({onScrollCapture:Ts,onWheelCapture:Ts,onTouchMoveCapture:Ts}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,c=e.shards,p=e.sideCar,d=e.noRelative,m=e.noIsolation,h=e.inert,y=e.allowPinchZoom,g=e.as,v=g===void 0?"div":g,x=e.gapMode,A=cf(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=p,C=LI([n,t]),T=ot(ot({},A),i);return E.createElement(E.Fragment,null,f&&E.createElement(k,{sideCar:fh,removeScrollBar:u,shards:c,noRelative:d,noIsolation:m,inert:h,setCallbacks:o,allowPinchZoom:!!y,lockRef:n,gapMode:x}),a?E.cloneElement(E.Children.only(s),ot(ot({},T),{ref:C})):E.createElement(v,ot({},T,{className:l,ref:C}),s))});_i.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},_i.classNames={fullWidth:Mi,zeroRight:Di};var $I=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function jI(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=$I();return t&&e.setAttribute("nonce",t),e}function UI(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function HI(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var WI=function(){var e=0,t=null;return{add:function(n){e==0&&(t=jI())&&(UI(t,n),HI(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},VI=function(){var e=WI();return function(t,n){E.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},dh=function(){var e=VI(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},qI={left:0,top:0,right:0,gap:0},Os=function(e){return parseInt(e||"",10)||0},KI=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[Os(n),Os(r),Os(i)]},YI=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return qI;var t=KI(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])}},GI=dh(),Sn="data-scroll-locked",QI=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
317
|
+
`&&r++}}return[t,n]}class $p extends Event{constructor(t,n){var r,i;super(t),this.code=(r=n==null?void 0:n.code)!=null?r:void 0,this.message=(i=n==null?void 0:n.message)!=null?i:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return r(jp(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(jp(this),n)}}function aI(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function ps(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(ps).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${ps(e.cause)}`:e.message:`${e}`}function jp(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var Up=e=>{throw TypeError(e)},hs=(e,t,n)=>t.has(e)||Up("Cannot "+n),ve=(e,t,n)=>(hs(e,t,"read from private field"),n?n.call(e):t.get(e)),Be=(e,t,n)=>t.has(e)?Up("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),_e=(e,t,n,r)=>(hs(e,t,"write to private field"),t.set(e,n),n),It=(e,t,n)=>(hs(e,t,"access private method"),n),Xe,Qt,vn,Ai,Ii,gr,bn,yr,Bt,wn,xn,kn,vr,mt,ms,gs,ys,Hp,vs,bs,br,ws,xs;class Ti extends EventTarget{constructor(t,n){var r,i;super(),Be(this,mt),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,Be(this,Xe),Be(this,Qt),Be(this,vn),Be(this,Ai),Be(this,Ii),Be(this,gr),Be(this,bn),Be(this,yr,null),Be(this,Bt),Be(this,wn),Be(this,xn,null),Be(this,kn,null),Be(this,vr,null),Be(this,gs,async o=>{var a;ve(this,wn).reset();const{body:s,redirected:l,status:u,headers:f}=o;if(u===204){It(this,mt,br).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?_e(this,vn,new URL(o.url)):_e(this,vn,void 0),u!==200){It(this,mt,br).call(this,`Non-200 status code (${u})`,u);return}if(!(f.get("content-type")||"").startsWith("text/event-stream")){It(this,mt,br).call(this,'Invalid content type, expected "text/event-stream"',u);return}if(ve(this,Xe)===this.CLOSED)return;_e(this,Xe,this.OPEN);const c=new Event("open");if((a=ve(this,vr))==null||a.call(this,c),this.dispatchEvent(c),typeof s!="object"||!s||!("getReader"in s)){It(this,mt,br).call(this,"Invalid response body, expected a web ReadableStream",u),this.close();return}const p=new TextDecoder,d=s.getReader();let m=!0;do{const{done:h,value:g}=await d.read();g&&ve(this,wn).feed(p.decode(g,{stream:!h})),h&&(m=!1,ve(this,wn).reset(),It(this,mt,ws).call(this))}while(m)}),Be(this,ys,o=>{_e(this,Bt,void 0),!(o.name==="AbortError"||o.type==="aborted")&&It(this,mt,ws).call(this,ps(o))}),Be(this,vs,o=>{typeof o.id=="string"&&_e(this,yr,o.id);const a=new MessageEvent(o.event||"message",{data:o.data,origin:ve(this,vn)?ve(this,vn).origin:ve(this,Qt).origin,lastEventId:o.id||""});ve(this,kn)&&(!o.event||o.event==="message")&&ve(this,kn).call(this,a),this.dispatchEvent(a)}),Be(this,bs,o=>{_e(this,gr,o)}),Be(this,xs,()=>{_e(this,bn,void 0),ve(this,Xe)===this.CONNECTING&&It(this,mt,ms).call(this)});try{if(t instanceof URL)_e(this,Qt,t);else if(typeof t=="string")_e(this,Qt,new URL(t,sI()));else throw new Error("Invalid URL")}catch{throw aI("An invalid or illegal string was specified")}_e(this,wn,iI({onEvent:ve(this,vs),onRetry:ve(this,bs)})),_e(this,Xe,this.CONNECTING),_e(this,gr,3e3),_e(this,Ii,(r=n==null?void 0:n.fetch)!=null?r:globalThis.fetch),_e(this,Ai,(i=n==null?void 0:n.withCredentials)!=null?i:!1),It(this,mt,ms).call(this)}get readyState(){return ve(this,Xe)}get url(){return ve(this,Qt).href}get withCredentials(){return ve(this,Ai)}get onerror(){return ve(this,xn)}set onerror(t){_e(this,xn,t)}get onmessage(){return ve(this,kn)}set onmessage(t){_e(this,kn,t)}get onopen(){return ve(this,vr)}set onopen(t){_e(this,vr,t)}addEventListener(t,n,r){const i=n;super.addEventListener(t,i,r)}removeEventListener(t,n,r){const i=n;super.removeEventListener(t,i,r)}close(){ve(this,bn)&&clearTimeout(ve(this,bn)),ve(this,Xe)!==this.CLOSED&&(ve(this,Bt)&&ve(this,Bt).abort(),_e(this,Xe,this.CLOSED),_e(this,Bt,void 0))}}Xe=new WeakMap,Qt=new WeakMap,vn=new WeakMap,Ai=new WeakMap,Ii=new WeakMap,gr=new WeakMap,bn=new WeakMap,yr=new WeakMap,Bt=new WeakMap,wn=new WeakMap,xn=new WeakMap,kn=new WeakMap,vr=new WeakMap,mt=new WeakSet,ms=function(){_e(this,Xe,this.CONNECTING),_e(this,Bt,new AbortController),ve(this,Ii)(ve(this,Qt),It(this,mt,Hp).call(this)).then(ve(this,gs)).catch(ve(this,ys))},gs=new WeakMap,ys=new WeakMap,Hp=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...ve(this,yr)?{"Last-Event-ID":ve(this,yr)}:void 0},cache:"no-store",signal:(e=ve(this,Bt))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},vs=new WeakMap,bs=new WeakMap,br=function(e,t){var n;ve(this,Xe)!==this.CLOSED&&_e(this,Xe,this.CLOSED);const r=new $p("error",{code:t,message:e});(n=ve(this,xn))==null||n.call(this,r),this.dispatchEvent(r)},ws=function(e,t){var n;if(ve(this,Xe)===this.CLOSED)return;_e(this,Xe,this.CONNECTING);const r=new $p("error",{code:t,message:e});(n=ve(this,xn))==null||n.call(this,r),this.dispatchEvent(r),_e(this,bn,setTimeout(ve(this,xs),ve(this,gr)))},xs=new WeakMap,Ti.CONNECTING=0,Ti.OPEN=1,Ti.CLOSED=2;function sI(){const e="document"in globalThis?globalThis.document:void 0;return e&&typeof e=="object"&&"baseURI"in e&&typeof e.baseURI=="string"?e.baseURI:void 0}async function lI(e){var t;const n=await e.clone().json();if((t=n==null?void 0:n.id)!=null&&t.startsWith("err_")){const r=new Error(n.message);throw r.id=n.id,r.code=n.code,r.type=n.type,r}return e}const Wp=()=>{const e={};return{on:(t,n)=>{var r;return e[t]||(e[t]=new Set),(r=e[t])==null||r.add(n),()=>{var i;return(i=e[t])==null?void 0:i.delete(n)}},emit:(t,n)=>{var r,i;(r=e[t])==null||r.forEach(o=>o(n)),(i=e["*"])==null||i.forEach(o=>o({type:t,payload:n}))}}},Le=e=>e.data,Vp=10,qp=3e3,uI="60000",cI={throwOnError:!0},fI=({conversationId:e,userToken:t,clientId:n,apiUrl:r,adminSecret:i})=>{let o=0,a=null;const s=Wp(),l=()=>{a&&a.close();const u=`${`${r||Me.getConfig().baseUrl}/${n}`}/initialize${e?`?conversationId=${e}`:""}`,f={...i?{"x-admin-secret":i}:{},...t?{"x-user-key":t}:{}};a=Yp(u,f),a.onopen=()=>s.emit("open"),a.onerror=c=>{o<Vp?(o++,setTimeout(()=>l(),qp)):s.emit("error",c)},a.onmessage=c=>{const p=Kp(c.data);s.emit(p.type,p.data)}};return l(),s.on},dI=({userKey:e,clientId:t,apiUrl:n,customHeaders:r})=>{const i={"x-user-key":e,...r},o=`${n||Me.getConfig().baseUrl}/${t}`,a={...cI,baseUrl:o};return Me.interceptors.response._fns.length===0&&Me.interceptors.response.use(lI),{createConversation:()=>zA({...a,headers:i,body:{}}).then(Le),getConversation:({conversationId:s})=>RA({...a,headers:i,path:{id:s}}).then(Le),deleteConversation:({conversationId:s})=>FA({...a,headers:i,path:{id:s}}).then(Le),listConversations:({nextToken:s})=>BA({...a,headers:i,query:{nextToken:s}}).then(Le),listConversationMessages:({conversationId:s,nextToken:l})=>$A({...a,headers:i,path:{id:s},query:{nextToken:l}}).then(Le),addParticipant:({conversationId:s,userId:l})=>UA({...a,headers:i,path:{id:s},body:{userId:l}}).then(Le),removeParticipant:({conversationId:s,userId:l})=>HA({...a,headers:i,path:{id:s,userId:l}}).then(Le),getParticipant:({conversationId:s,userId:l})=>WA({...a,headers:i,path:{id:s,userId:l}}).then(Le),listParticipants:({conversationId:s,nextToken:l})=>jA({...a,headers:i,path:{id:s},query:{nextToken:l}}).then(Le),createMessage:s=>YA({...a,headers:i,body:s}).then(Le),updateMessage:({messageId:s,...l})=>KA({...a,headers:i,path:{id:s},body:l}).then(Le),getMessage:({messageId:s})=>qA({...a,headers:i,path:{id:s}}).then(Le),deleteMessage:({messageId:s})=>VA({...a,headers:i,path:{id:s}}).then(Le),createFile:s=>rI({...a,headers:i,body:s}).then(Le),getUser:()=>ZA({...a,headers:i}).then(Le),updateUser:s=>XA({...a,headers:i,body:s}).then(Le),deleteUser:()=>JA({...a,headers:i}).then(Le),createEvent:s=>nI({...a,headers:i,body:s}).then(Le),getEvent:({eventId:s})=>tI({...a,headers:i,path:{id:s}}).then(Le),addMessageFeedback:({messageId:s,...l})=>QA({...a,headers:i,path:{id:s},body:l}).then(Le),removeMessageFeedback:({messageId:s})=>GA({...a,headers:i,path:{id:s}}).then(Le),generateUserKey:({adminSecret:s,...l})=>eI({...a,headers:{"x-admin-secret":s},body:l}).then(Le),listenConversation:({conversationId:s})=>{let l=0,u=null;const f=Wp(),c=()=>{u&&u.close();const p=`${o}/conversations/${s}/listen`;u=Yp(p,i),u.onopen=()=>f.emit("open"),u.onerror=d=>{l<Vp?(l++,setTimeout(()=>c(),qp)):f.emit("error",d)},u.onmessage=d=>{const m=Kp(d.data);f.emit(m.type,m.data)}};return c(),f.on}}},Kp=e=>{try{return JSON.parse(e)}catch{return e}},Yp=(e,t)=>new Ti(e,{fetch:(n,r)=>fetch(n,{...r,headers:{...r==null?void 0:r.headers,...t,timeout:uI}})}),Gp={chatMessageNotification:new URL("data:audio/ogg;base64,T2dnUwACAAAAAAAAAAAVJAEzAAAAAOU+A6UBHgF2b3JiaXMAAAAAASJWAAD/////AH0AAP////+pAU9nZ1MAAAAAAAAAAAAAFSQBMwEAAAD3T/UfDpz////////////////FA3ZvcmJpcwwAAABMYXZmNjEuNy4xMDAEAAAAHwAAAGVuY29kZXI9TGF2YzYxLjE5LjEwMSBsaWJ2b3JiaXMrAAAAZW5jb2RlZF9ieT1BZG9iZSBQcmVtaWVyZSBQcm8gMjAyNS4wIChNYWNpbhcAAAB0aW1lX3JlZmVyZW5jZT0xMjExMDQwMA8AAABkYXRlPTIwMjUtMDgtMDUBBXZvcmJpcyJCQ1YBAEAAABhCECoFrWOOOsgVIYwZoqBCyinHHULQIaMkQ4g6xjXHGGNHuWSKQsmB0JBVAABAAACkHFdQckkt55xzoxhXzHHoIOecc+UgZ8xxCSXnnHOOOeeSco4x55xzoxhXDnIpLeecc4EUR4pxpxjnnHOkHEeKcagY55xzbTG3knLOOeecc+Ygh1JyrjXnnHOkGGcOcgsl55xzxiBnzHHrIOecc4w1t9RyzjnnnHPOOeecc84555xzjDHnnHPOOeecc24x5xZzrjnnnHPOOeccc84555xzIDRkFQCQAACgoSiK4igOEBqyCgDIAAAQQHEUR5EUS7Ecy9EkDQgNWQUAAAEACAAAoEiGpEiKpViOZmmeJnqiKJqiKquyacqyLMuy67ouEBqyCgBIAABQURTFcBQHCA1ZBQBkAAAIYCiKoziO5FiSpVmeB4SGrAIAgAAABAAAUAxHsRRN8STP8jzP8zzP8zzP8zzP8zzP8zzP8zwNCA1ZBQAgAAAAgihkGANCQ1YBAEAAAAghGhlDnVISXAoWQhwRQx1CzkOppYPgKYUlY9JTrEEIIXzvPffee++B0JBVAAAQAABhFDiIgcckCCGEYhQnRHGmIAghhOUkWMp56CQI3YMQQrice8u59957IDRkFQAACADAIIQQQgghhBBCCCmklFJIKaaYYoopxxxzzDHHIIMMMuigk046yaSSTjrKJKOOUmsptRRTTLHlFmOttdacc69BKWOMMcYYY4wxxhhjjDHGGCMIDVkFAIAAABAGGWSQQQghhBRSSCmmmHLMMcccA0JDVgEAgAAAAgAAABxFUiRHciRHkiTJkixJkzzLszzLszxN1ERNFVXVVW3X9m1f9m3f1WXf9mXb1WVdlmXdtW1d1l1d13Vd13Vd13Vd13Vd13Vd14HQkFUAgAQAgI7kOI7kOI7kSI6kSAoQGrIKAJABABAAgKM4iuNIjuRYjiVZkiZplmd5lqd5mqiJHhAasgoAAAQAEAAAAAAAgKIoiqM4jiRZlqZpnqd6oiiaqqqKpqmqqmqapmmapmmapmmapmmapmmapmmapmmapmmapmmapmmapmkCoSGrAAAJAAAdx3EcR3Ecx3EkR5IkIDRkFQAgAwAgAABDURxFcizHkjRLszzL00TP9FxRNnVTV20gNGQVAAAIACAAAAAAAADHczzHczzJkzzLczzHkzxJ0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRNA0JDVgIAZAAAEJOQSk6xV0YpxiS0XiqkFJPUe6iYYkw67alCBikHuYdKIaWg094ypZBSDHunmELIGOqhg5AxhbDX2nPPvfceCA1ZEQBEAQAAxiDGEGPIMSYlgxIxxyRkUiLnnJROSialpFZazKSEmEqLkXNOSiclk1JaC6llkkprJaYCAAACHAAAAiyEQkNWBABRAACIMUgppBRSSjGnmENKKceUY0gp5ZxyTjnHmHQQKucYdA5KpJRyjjmnnHMSMgeVcw5CJp0AAIAABwCAAAuh0JAVAUCcAACAkHOKMQgRYxBCCSmFUFKqnJPSQUmpg5JSSanFklKMlXNSOgkpdRJSKinFWFKKLaRUY2kt19JSjS3GnFuMvYaUYi2p1Vpaq7nFWHOLNffIOUqdlNY6Ka2l1mpNrdXaSWktpNZiaS3G1mLNKcacMymthZZiK6nF2GLLNbWYc2kt1xRjzynGnmusucecgzCt1ZxayznFmHvMseeYcw+Sc5Q6Ka11UlpLrdWaWqs1k9Jaaa3GkFqLLcacW4sxZ1JaLKnFWFqKMcWYc4st19BarinGnFOLOcdag5Kx9l5aqznFmHuKreeYczA2x547SrmW1nourfVecy5C1tyLaC3n1GoPKsaec87B2NyDEK3lnGrsPcXYe+45GNtz8K3W4FvNRcicg9C5+KZ7MEbV2oPMtQiZcxA66CJ08Ml4lGoureVcWus91hp8zTkI0VruKcbeU4u9156bsL0HIVrLPcXYg4ox+JpzMDrnYlStwcecg5C1FqF7L0rnIJSqtQeZa1Ay1yJ08MXooIsvAABgwAEAIMCEMlBoyIoAIE4AgEHIOaUYhEopCKGElEIoKVWMSciYg5IxJ6WUUloIJbWKMQiZY1Iyx6SEEloqJbQSSmmplNJaKKW1llqMKbUWQymphVJaK6W0llqqMbVWY8SYlMw5KZljUkoprZVSWqsck5IxKKmDkEopKcVSUouVc1Iy6Kh0EEoqqcRUUmmtpNJSKaXFklJsKcVUW4u1hlJaLKnEVlJqMbVUW4sx14gxKRlzUjLnpJRSUiultJY5J6WDjkrmoKSSUmulpBQz5qR0DkrKIKNSUootpRJTKKW1klJspaTWWoy1ptRaLSW1VlJqsZQSW4sx1xZLTZ2U1koqMYZSWmsx5ppaizGUElspKcaSSmytxZpbbDmGUlosqcRWSmqx1ZZja7Hm1FKNKbWaW2y5xpRTj7X2nFqrNbVUY2ux5lhbb7XWnDsprYVSWislxZhai7HFWHMoJbaSUmylpBhbbLm2FmMPobRYSmqxpBJjazHmGFuOqbVaW2y5ptRirbX2HFtuPaUWa4ux5tJSjTXX3mNNORUAADDgAAAQYEIZKDRkJQAQBQAAGMMYYxAapZxzTkqDlHPOScmcgxBCSplzEEJIKXNOQkotZc5BSKm1UEpKrcUWSkmptRYLAAAocAAACLBBU2JxgEJDVgIAUQAAiDFKMQahMUYp5yA0xijFGIRKKcack1ApxZhzUDLHnINQSuaccxBKCSGUUkpKIYRSSkmpAACAAgcAgAAbNCUWByg0ZEUAEAUAABhjnDPOIQqdpc5SJKmj1lFrKKUaS4ydxlZ767nTGnttuTeUSo2p1o5ry7nV3mlNPbccCwAAO3AAADuwEAoNWQkA5AEAEMYoxZhzzhmFGHPOOecMUow555xzijHnnIMQQsWYc85BCCFzzjkIoYSSOecchBBK6JyDUEoppXTOQQihlFI65yCEUkopnXMQSimllAIAgAocAAACbBTZnGAkqNCQlQBAHgAAYAxCzklprWHMOQgt1dgwxhyUlGKLnIOQUou5RsxBSCnGoDsoKbUYbPCdhJRaizkHk1KLNefeg0iptZqDzj3VVnPPvfecYqw1595zLwAAd8EBAOzARpHNCUaCCg1ZCQDkAQAQCCnFmHPOGaUYc8w554xSjDHmnHOKMcacc85BxRhjzjkHIWPMOecghJAx5pxzEELonHMOQgghdM45ByGEEDrnoIMQQgidcxBCCCGEAgCAChwAAAJsFNmcYCSo0JCVAEA4AAAAIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEELonHPOOeecc84555xzzjnnnHPOOScAyLfCAcD/wcYZVpLOCkeDCw1ZCQCEAwAACkEopWIQSiklkk46KZ2TUEopkYNSSumklFJKCaWUUkoIpZRSSggdlFJCKaWUUkoppZRSSimllFI6KaWUUkoppZTKOSmlk1JKKaVEzkkpIZRSSimlhFJKKaWUUkoppZRSSimllFJKKaWEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQCALgbHAAgEmycYSXprHA0uNCQlQBASAAAoBRzjkoIKZSQUqiYoo5CKSmkUkoKEWPOSeochVBSKKmDyjkIpaSUQiohdc5BByWFkFIJIZWOOugolFBSKiWU0jkopYQUSkoplZBCSKl0lFIoJZWUQiohlVJKSCWVEEoKnaRUSgqppFRSCJ10kEInJaSSSgqpk5RSKiWllEpKJXRSQioppRBCSqmUEEpIKaVOUkmppBRCKCGFlFJKJaWSSkohlVRCCaWklFIooaRUUkoppZJSKQAA4MABACDACDrJqLIIG0248AAUGrISACADAECUdNZpp0kiCDFFmScNKcYgtaQswxBTkonxFGOMOShGQw4x5JQYF0oIoYNiPCaVQ8pQUbm31DkFxRZjfO+xFwEAAAgCAASEBAAYICiYAQAGBwgjBwIdAQQObQCAgQiZCQwKocFBJgA8QERIBQCJCYrShS4IIYJ0EWTxwIUTN5644YQObRAAAAAAABAA8AEAkFAAERHRzFVYXGBkaGxwdHh8gIQEAAAAAAAIAHwAACQiQERENHMVFhcYGRobHB0eHyAhAQAAAAAAAAAAQEBAAAAAAAAgAAAAQEBPZ2dTAASuMwAAAAAAABUkATMCAAAACYS6sR4BAUQxGR89NxobGiEkKCknJiYmJSUhISEaFgwBAQEAAnyfvULHAlAEJgh2vpgQBMHIyMjIyNhIQOjz+ePz58+fL89xAwYBAFaH//3//7/xNw0MBoNB6qlPfWrUKQng+/0FABAAhLEjKuHFBwA4AHC9Fx4Oh7EwDEOgvnJ3RtV+Op0+nU6n5cyzEwAoltTpwed5dgVKMPoru90zNHGA7F0CP98BAAAAAHl9ePviAgCW+3rugPIDwC6BbWoTAFEAAADh5GpCCACgc+0zxlAAVKddkjDsA14GDoJtf7R+NkE4W23hI5mF3d74iVGvzg9PpA4cCQs66joePTmOfhgl7vNZzYzQADDyz30FAGSvVUZ6wJ4MAKbCGeb4+v5NLIdK3YvrLkCu98uV//FpXQNyKAKAV7r186fTktcJJgjAlVp1fUmaGgtrdAAuDXYJSPs/AAAAAHDnAeHxciEUAB76CvfarGjDzIjALoEd+/0EAAAAQNYeMrkBAF6ZKm8xuw94NtgloHDUCAAAAIAMJ5Qz2iUAvjhKL8lkfmA6wi6BWfNHgiAAAABq4eeqGgCg8+LAAXQAfhgqz2RKHzAVYJeAynEAIQEAALwq6tFbIQAEEIIO8iULngMAXhgajrw3D5iFWhe7BLZNrwCVKAAA0t2TfT8mADx0aMfS4CULeACvA14YWnasNht80ZpdAhv8BEiiAADgcbm4jo0JANAVCTRV6JqQS0OTADoAXhg6zWy+AZ3GsiDRAYJzgiQAAICnb9FLAQAUNQFd44AioMNJICUAfhi67ZRjA2IMSHTAJK0KkgAAAG7W0uLlEgC6KnQdDkgBlAAdJAB+GHpL40hATAASHSC5CZIAAAAGZ3J60ioBoKsBTQKE5KFJIJFAAp4Y+jp7cg4qINEBi+MASQAAAM8rmdZcAKApwFhNPHQkQEBRQwIAnhj6OZ8KIBwDiQ4Q9ApIFAAAQHRFd6FEALA0NaApQAegnPrDA54Y+nN+AYAIJDoAfgIkCgAAcLRlPVsLALqmKqFpHIwUwQEJCwCeKPpzEQA8kOgAyTlBAgAAgPnK3q8jAWAuJFBYOsbAAgCeKPolEQA8rMFCohQAAMxD2BdSAJYFdNThKcCkBQCOgwKeGPpzEQA8rEEhCQAAoCz4MRGA41gaQMBRjACexHugAACeGPqFCAAeugQAAHryFgBdRYGFhGeow8x7AJ4Y+iURADyIigIAliFAAcYWCQC11gGeGPolEQA8UAAAABoODg4=",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:$i&&$i.tagName.toUpperCase()==="SCRIPT"&&$i.src||new URL("index.umd.cjs",document.baseURI).href).href};function Qp({apiUrl:e="https://webchat.botpress.cloud",clientId:t,storageKey:n,storageLocation:r,adminSecret:i,soundEnabled:o,...a}){var oe;const s=rf(n,r),l=s(G=>G.conversationId),u=s(G=>G.user),f=s(G=>G.setConversationId),c=s(G=>G.setUser),p=s(G=>G.clearConversationId),d=an(G=>G.messages),m=an(G=>G.saveMessage),h=an(G=>G.updateMessage),g=an(G=>G.fetchMessages),y=an(G=>G.setMessages),v=an(G=>G.clearMessages),w=Gn(G=>G.participants),A=Gn(G=>G.setParticipants),k=Gn(G=>G.addParticipant),C=Gn(G=>G.removeParticipant),T=Gn(G=>G.clearParticipants),P=af(`webchat-sound-${t}`),R=P(G=>G.soundOn),I=P(G=>G.toggleSound),{state:O,setState:j}=Mp(),{state:M,setState:L}=Mp(),D=_.useMemo(()=>Xs(),[]),[z,U]=_.useState("connecting"),[$,V]=_.useState(a.conversationId),[b,N]=_.useState(a.user),[H,x]=_.useState(void 0),[W,ee]=_.useState(!1),[Y,J]=_.useState(void 0),X=_.useRef(!1),ie=_.useRef(null),K=_.useRef(o??!1);_.useEffect(()=>{K.current=o??!1},[o]);const te=_.useRef(R);_.useEffect(()=>{te.current=R},[R]),_.useEffect(()=>{var Ue,Ye,Z,se;const G=pI(t,e);if(G){J(G),U("error");return}if(X.current)return;X.current=!0,j(!1),U("connecting");try{ie.current=new Audio,ie.current.preload="auto",ie.current.src=Gp.chatMessageNotification,ie.current.volume=.9}catch(B){console.error("Error loading sound effect:",B),ie.current=null}let ue;(Ue=a.user)!=null&&Ue.userToken&&a.conversationId?ue={conversationId:a.conversationId,userToken:(Ye=a.user)==null?void 0:Ye.userToken}:(Z=a.user)!=null&&Z.userToken?ue={conversationId:void 0,userToken:(se=a.user)==null?void 0:se.userToken}:ue={conversationId:l,userToken:u==null?void 0:u.userToken};const de=fI({apiUrl:e,clientId:t,userToken:ue.userToken,conversationId:ue.conversationId,adminSecret:i});let we=[];const Se=de("init",({conversation:B,messages:q,participants:ae,user:le})=>{const pe=dI({clientId:t,apiUrl:e,userKey:le.userKey});pe.createEvent({conversationId:B.id,payload:{type:"conversation_started",data:{}}}).then(({event:fe})=>{var Ee,Oe;(Oe=(Ee=fe.payload.data)==null?void 0:Ee.status)!=null&&Oe.isInitial&&D.emit("conversation",B.id)}),we=[...we,de("error",fe=>{J(Ee=>Ee||Sr(fe)),U("error"),D.emit("error",new Error(`Connection to conversation lost: ${fe==null?void 0:fe.message}`))}),de("message_created",fe=>{const Ee=Kn(fe);le.id!==Ee.authorId&&(K.current&&te.current&&ie.current&&ie.current.play().catch(()=>{}),j(!1),L(!1),D.emit("isTyping",{isTyping:!1,timeout:0})),m(Ee),D.emit("message",Ee)}),de("message_status_changed",fe=>{var Ee;fe.newStatus==="processing"&&h((Ee=fe.message.metadata)==null?void 0:Ee.clientMessageId,{status:fe.newStatus})}),de("typing_stopped",()=>{j(!1),L(!1)}),de("typing_started",()=>{j(!0,5e3),L(!0,5e3),D.emit("isTyping",{isTyping:!0,timeout:5e3})}),de("participant_added",fe=>{k(fe.participant),D.emit("participantAdded",fe.participant)}),de("participant_removed",fe=>{C(fe.participantId),D.emit("participantRemoved",fe.participantId)}),de("webchat_visibility",fe=>D.emit("webchatVisibility",fe.visibility)),de("webchat_config",fe=>D.emit("webchatConfig",fe.config)),de("custom",fe=>D.emit("customEvent",fe.event))],V(B.id),f(B.id),N({userId:le.id,userToken:le.userKey}),c({userId:le.id,userToken:le.userKey}),A(ae),y(q.reverse().map(fe=>Kn(fe)).filter(Boolean)),J(void 0),U("connected"),x(pe)});return we.push(Se),()=>{X.current=!1,we.forEach(B=>B())}},[a.conversationId,(oe=a.user)==null?void 0:oe.userToken,W]);const F=async(G,ue)=>{const de=ue||$;if(!G||!de)return;const we=await g({client:G,conversationId:de});y(we);const{participants:Se}=await G.listParticipants({conversationId:de});A(Se)},ne=async G=>{if(!G)throw new Error("Cannot start new conversation: client is not initialized");p(),v(),T(),V(void 0),ee(ue=>!ue)};async function me(G,ue){const we=[{predicate:Se=>Se.message===Ji||Se.type==="ResourceNotFound",recover:()=>ne(ue)},{predicate:Se=>Se.type==="network"||Se.type==="disconnected"||Se.message===Pn,recover:()=>F(ue,$)}].find(Se=>Se.predicate(G));if(!we){U("error"),J(G);return}try{await Sl(we.recover,3,5e3),J(void 0),U("connected")}catch(Se){J(Sr(Se)),U("error")}}if(z!=="connected"||!b||!$||!H)return{clientState:z,on:D.on,client:void 0,messages:[],conversationId:void 0,newConversation:async()=>{await ne(H)},user:void 0,isTyping:void 0,participants:[],toggleSound:I,soundOn:R,error:Y,disableSendButton:M};const ke={sendMessage:async G=>{const ue=ss(),de={id:ue,createdAt:new Date().toISOString(),userId:b.userId,conversationId:$,payload:G,metadata:{clientMessageId:ue,delivered:!1}},we=Kn(de);we.status="pending",m(we),L(!0,5e3);try{await H.createMessage({conversationId:$,payload:G,metadata:{clientMessageId:ue}})}catch(Se){await me(Sr(Se),H),D.emit("error",Se)}},sendEvent:async(G,ue)=>{await H.createEvent({conversationId:$,payload:{type:"custom",data:G},bindConversation:(ue==null?void 0:ue.bindConversation)??!0,bindUser:(ue==null?void 0:ue.bindUser)??!0})},uploadFile:async G=>{const{size:ue,name:de}=G,Se=await(ae=>new Promise((le,pe)=>{const fe=new FileReader;fe.onload=Ee=>{var Oe;return le((Oe=Ee.target)==null?void 0:Oe.result)},fe.onerror=Ee=>{var Oe;return pe((Oe=Ee.target)==null?void 0:Oe.error)},fe.readAsArrayBuffer(ae)}))(G),Ue=new Date;Ue.setDate(Ue.getDate()+30);const{file:{uploadUrl:Ye,contentType:Z,url:se}}=await H.createFile({size:ue,key:`${ss(6)}-${G.name}`,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat",conversation:$,user:b.userId},expiresAt:Ue.toISOString()});await fetch(Ye,{method:"PUT",headers:{"x-amz-tagging":"public=true","content-type":Z},body:Se});const B=Z.split("/").shift()??"",q=cl(B)?B:"file";return{fileUrl:se,name:de,type:q}},addMessageFeedback:async(G,ue)=>{h(G,{feedback:ue.value}),await H.addMessageFeedback({messageId:G,...ue})},getUser:async()=>{const{user:G}=await H.getUser();return G},updateUser:async G=>{const{user:ue}=await H.updateUser({name:G.name,pictureUrl:G.pictureUrl,userData:G.data});return ue}};return{clientState:"connected",on:D.on,client:ke,messages:d,conversationId:$,newConversation:async()=>{await ne(H)},user:b,isTyping:O,participants:w,error:Y,soundOn:R,toggleSound:I,disableSendButton:M}}const pI=(e,t)=>{if(!e)return{type:"configuration",message:fl};if(!zm(t))return{type:"configuration",message:dl}},hI=({clientId:e,storageKey:t,configuration:n,allowFileUpload:r,apiUrl:i,user:o,conversationId:a,...s})=>{const l=t||`bp-webchat-${e}`,{clientState:u,client:f,isTyping:c,newConversation:p,messages:d,participants:m,user:h,error:g,soundOn:y,toggleSound:v,disableSendButton:w}=Qp({clientId:e,apiUrl:i,conversationId:a,user:o,storageKey:l,storageLocation:n==null?void 0:n.storageLocation,adminSecret:n==null?void 0:n.adminSecret,soundEnabled:n==null?void 0:n.soundEnabled}),{sendMessage:A,uploadFile:k,addMessageFeedback:C}=f??{};return S.jsx(Dp,{configuration:n??{},user:h!=null&&h.userId?{id:h==null?void 0:h.userId}:void 0,isLoading:u==="connecting",isTyping:c,connected:u==="connected"?!0:u==="disconnected"?!1:void 0,messages:d,sendMessage:A,uploadFile:k,addMessageFeedback:C,allowFileUpload:r,restartConversation:p,...s,participants:m,error:g,clientId:e,soundOn:y,toggleSound:v,disableSendButton:w})};function mI(e,t=globalThis==null?void 0:globalThis.document){const n=Zt(e);E.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 gI="DismissableLayer",ks="dismissableLayer.update",yI="dismissableLayer.pointerDownOutside",vI="dismissableLayer.focusOutside",Jp,Zp=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Xp=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...l}=e,u=E.useContext(Zp),[f,c]=E.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,d]=E.useState({}),m=Ot(t,T=>c(T)),h=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=h.indexOf(g),v=f?h.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,A=v>=y,k=xI(T=>{const P=T.target,R=[...u.branches].some(I=>I.contains(P));!A||R||(i==null||i(T),a==null||a(T),T.defaultPrevented||s==null||s())},p),C=kI(T=>{const P=T.target;[...u.branches].some(I=>I.contains(P))||(o==null||o(T),a==null||a(T),T.defaultPrevented||s==null||s())},p);return mI(T=>{v===u.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&s&&(T.preventDefault(),s()))},p),E.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Jp=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),eh(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Jp)}},[f,p,n,u]),E.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),eh())},[f,u]),E.useEffect(()=>{const T=()=>d({});return document.addEventListener(ks,T),()=>document.removeEventListener(ks,T)},[]),S.jsx(ht.div,{...l,ref:m,style:{pointerEvents:w?A?"auto":"none":void 0,...e.style},onFocusCapture:At(e.onFocusCapture,C.onFocusCapture),onBlurCapture:At(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:At(e.onPointerDownCapture,k.onPointerDownCapture)})});Xp.displayName=gI;var bI="DismissableLayerBranch",wI=E.forwardRef((e,t)=>{const n=E.useContext(Zp),r=E.useRef(null),i=Ot(t,r);return E.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),S.jsx(ht.div,{...e,ref:i})});wI.displayName=bI;function xI(e,t=globalThis==null?void 0:globalThis.document){const n=Zt(e),r=E.useRef(!1),i=E.useRef(()=>{});return E.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let l=function(){th(yI,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function kI(e,t=globalThis==null?void 0:globalThis.document){const n=Zt(e),r=E.useRef(!1);return E.useEffect(()=>{const i=o=>{o.target&&!r.current&&th(vI,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function eh(){const e=new CustomEvent(ks);document.dispatchEvent(e)}function th(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?GC(i,o):i.dispatchEvent(o)}var Ss="focusScope.autoFocusOnMount",Es="focusScope.autoFocusOnUnmount",nh={bubbles:!1,cancelable:!0},SI="FocusScope",rh=E.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=E.useState(null),u=Zt(i),f=Zt(o),c=E.useRef(null),p=Ot(t,h=>l(h)),d=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(r){let h=function(w){if(d.paused||!s)return;const A=w.target;s.contains(A)?c.current=A:zt(c.current,{select:!0})},g=function(w){if(d.paused||!s)return;const A=w.relatedTarget;A!==null&&(s.contains(A)||zt(c.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const k of w)k.removedNodes.length>0&&zt(s)};document.addEventListener("focusin",h),document.addEventListener("focusout",g);const v=new MutationObserver(y);return s&&v.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",g),v.disconnect()}}},[r,s,d.paused]),E.useEffect(()=>{if(s){ah.add(d);const h=document.activeElement;if(!s.contains(h)){const y=new CustomEvent(Ss,nh);s.addEventListener(Ss,u),s.dispatchEvent(y),y.defaultPrevented||(EI(OI(ih(s)),{select:!0}),document.activeElement===h&&zt(s))}return()=>{s.removeEventListener(Ss,u),setTimeout(()=>{const y=new CustomEvent(Es,nh);s.addEventListener(Es,f),s.dispatchEvent(y),y.defaultPrevented||zt(h??document.body,{select:!0}),s.removeEventListener(Es,f),ah.remove(d)},0)}}},[s,u,f,d]);const m=E.useCallback(h=>{if(!n&&!r||d.paused)return;const g=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,y=document.activeElement;if(g&&y){const v=h.currentTarget,[w,A]=CI(v);w&&A?!h.shiftKey&&y===A?(h.preventDefault(),n&&zt(w,{select:!0})):h.shiftKey&&y===w&&(h.preventDefault(),n&&zt(A,{select:!0})):y===v&&h.preventDefault()}},[n,r,d.paused]);return S.jsx(ht.div,{tabIndex:-1,...a,ref:p,onKeyDown:m})});rh.displayName=SI;function EI(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(zt(r,{select:t}),document.activeElement!==n)return}function CI(e){const t=ih(e),n=oh(t,e),r=oh(t.reverse(),e);return[n,r]}function ih(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 oh(e,t){for(const n of e)if(!AI(n,{upTo:t}))return n}function AI(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 II(e){return e instanceof HTMLInputElement&&"select"in e}function zt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&II(e)&&t&&e.select()}}var ah=TI();function TI(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=sh(e,t),e.unshift(t)},remove(t){var n;e=sh(e,t),(n=e[0])==null||n.resume()}}}function sh(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function OI(e){return e.filter(t=>t.tagName!=="A")}var Cs=0;function DI(){E.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??lh()),document.body.insertAdjacentElement("beforeend",e[1]??lh()),Cs++,()=>{Cs===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Cs--}},[])}function lh(){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 Oi="right-scroll-bar-position",Di="width-before-scroll-bar",MI="with-scroll-bars-hidden",_I="--removed-body-scroll-bar-size";function As(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function PI(e,t){var n=_.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 NI=typeof window<"u"?E.useLayoutEffect:E.useEffect,uh=new WeakMap;function LI(e,t){var n=PI(null,function(r){return e.forEach(function(i){return As(i,r)})});return NI(function(){var r=uh.get(n);if(r){var i=new Set(r),o=new Set(e),a=n.current;i.forEach(function(s){o.has(s)||As(s,null)}),o.forEach(function(s){i.has(s)||As(s,a)})}uh.set(n,e)},[e]),n}function FI(e){return e}function RI(e,t){t===void 0&&(t=FI);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var f=a;a=[],f.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(f){a.push(f),u()},filter:function(f){return a=a.filter(f),n}}}};return i}function BI(e){e===void 0&&(e={});var t=RI(null);return t.options=ot({async:!0,ssr:!1},e),t}var ch=function(e){var t=e.sideCar,n=cf(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 E.createElement(r,ot({},n))};ch.isSideCarExport=!0;function zI(e,t){return e.useMedium(t),ch}var fh=BI(),Is=function(){},Mi=E.forwardRef(function(e,t){var n=E.useRef(null),r=E.useState({onScrollCapture:Is,onWheelCapture:Is,onTouchMoveCapture:Is}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,c=e.shards,p=e.sideCar,d=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,y=e.as,v=y===void 0?"div":y,w=e.gapMode,A=cf(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=p,C=LI([n,t]),T=ot(ot({},A),i);return E.createElement(E.Fragment,null,f&&E.createElement(k,{sideCar:fh,removeScrollBar:u,shards:c,noRelative:d,noIsolation:m,inert:h,setCallbacks:o,allowPinchZoom:!!g,lockRef:n,gapMode:w}),a?E.cloneElement(E.Children.only(s),ot(ot({},T),{ref:C})):E.createElement(v,ot({},T,{className:l,ref:C}),s))});Mi.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Mi.classNames={fullWidth:Di,zeroRight:Oi};var $I=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function jI(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=$I();return t&&e.setAttribute("nonce",t),e}function UI(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function HI(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var WI=function(){var e=0,t=null;return{add:function(n){e==0&&(t=jI())&&(UI(t,n),HI(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},VI=function(){var e=WI();return function(t,n){E.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},dh=function(){var e=VI(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},qI={left:0,top:0,right:0,gap:0},Ts=function(e){return parseInt(e||"",10)||0},KI=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[Ts(n),Ts(r),Ts(i)]},YI=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return qI;var t=KI(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])}},GI=dh(),Sn="data-scroll-locked",QI=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
318
318
|
.`.concat(MI,` {
|
|
319
319
|
overflow: hidden `).concat(r,`;
|
|
320
320
|
padding-right: `).concat(s,"px ").concat(r,`;
|
|
@@ -332,30 +332,30 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
332
332
|
`),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
333
333
|
}
|
|
334
334
|
|
|
335
|
-
.`).concat(
|
|
335
|
+
.`).concat(Oi,` {
|
|
336
336
|
right: `).concat(s,"px ").concat(r,`;
|
|
337
337
|
}
|
|
338
338
|
|
|
339
|
-
.`).concat(
|
|
339
|
+
.`).concat(Di,` {
|
|
340
340
|
margin-right: `).concat(s,"px ").concat(r,`;
|
|
341
341
|
}
|
|
342
342
|
|
|
343
|
-
.`).concat(
|
|
343
|
+
.`).concat(Oi," .").concat(Oi,` {
|
|
344
344
|
right: 0 `).concat(r,`;
|
|
345
345
|
}
|
|
346
346
|
|
|
347
|
-
.`).concat(
|
|
347
|
+
.`).concat(Di," .").concat(Di,` {
|
|
348
348
|
margin-right: 0 `).concat(r,`;
|
|
349
349
|
}
|
|
350
350
|
|
|
351
351
|
body[`).concat(Sn,`] {
|
|
352
352
|
`).concat(_I,": ").concat(s,`px;
|
|
353
353
|
}
|
|
354
|
-
`)},ph=function(){var e=parseInt(document.body.getAttribute(Sn)||"0",10);return isFinite(e)?e:0},JI=function(){E.useEffect(function(){return document.body.setAttribute(Sn,(ph()+1).toString()),function(){var e=ph()-1;e<=0?document.body.removeAttribute(Sn):document.body.setAttribute(Sn,e.toString())}},[])},ZI=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;JI();var o=E.useMemo(function(){return YI(i)},[i]);return E.createElement(GI,{styles:QI(o,!t,i,n?"":"!important")})},
|
|
354
|
+
`)},ph=function(){var e=parseInt(document.body.getAttribute(Sn)||"0",10);return isFinite(e)?e:0},JI=function(){E.useEffect(function(){return document.body.setAttribute(Sn,(ph()+1).toString()),function(){var e=ph()-1;e<=0?document.body.removeAttribute(Sn):document.body.setAttribute(Sn,e.toString())}},[])},ZI=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;JI();var o=E.useMemo(function(){return YI(i)},[i]);return E.createElement(GI,{styles:QI(o,!t,i,n?"":"!important")})},Os=!1;if(typeof window<"u")try{var _i=Object.defineProperty({},"passive",{get:function(){return Os=!0,!0}});window.addEventListener("test",_i,_i),window.removeEventListener("test",_i,_i)}catch{Os=!1}var En=Os?{passive:!1}:!1,XI=function(e){return e.tagName==="TEXTAREA"},hh=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!XI(e)&&n[t]==="visible")},eT=function(e){return hh(e,"overflowY")},tT=function(e){return hh(e,"overflowX")},mh=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=gh(e,r);if(i){var o=yh(e,r),a=o[1],s=o[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},nT=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},rT=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},gh=function(e,t){return e==="v"?eT(t):tT(t)},yh=function(e,t){return e==="v"?nT(t):rT(t)},iT=function(e,t){return e==="h"&&t==="rtl"?-1:1},oT=function(e,t,n,r,i){var o=iT(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,f=a>0,c=0,p=0;do{if(!s)break;var d=yh(e,s),m=d[0],h=d[1],g=d[2],y=h-g-o*m;(m||y)&&gh(e,s)&&(c+=y,p+=m);var v=s.parentNode;s=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(f&&Math.abs(c)<1||!f&&Math.abs(p)<1)&&(u=!0),u},Pi=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},vh=function(e){return[e.deltaX,e.deltaY]},bh=function(e){return e&&"current"in e?e.current:e},aT=function(e,t){return e[0]===t[0]&&e[1]===t[1]},sT=function(e){return`
|
|
355
355
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
356
356
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
357
|
-
`)},lT=0,Cn=[];function uT(e){var t=E.useRef([]),n=E.useRef([0,0]),r=E.useRef(),i=E.useState(lT++)[0],o=E.useState(dh)[0],a=E.useRef(e);E.useEffect(function(){a.current=e},[e]),E.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var h=
|
|
357
|
+
`)},lT=0,Cn=[];function uT(e){var t=E.useRef([]),n=E.useRef([0,0]),r=E.useRef(),i=E.useState(lT++)[0],o=E.useState(dh)[0],a=E.useRef(e);E.useEffect(function(){a.current=e},[e]),E.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var h=sa([e.lockRef.current],(e.shards||[]).map(bh),!0).filter(Boolean);return h.forEach(function(g){return g.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),h.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=E.useCallback(function(h,g){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!a.current.allowPinchZoom;var y=Pi(h),v=n.current,w="deltaX"in h?h.deltaX:v[0]-y[0],A="deltaY"in h?h.deltaY:v[1]-y[1],k,C=h.target,T=Math.abs(w)>Math.abs(A)?"h":"v";if("touches"in h&&T==="h"&&C.type==="range")return!1;var P=mh(T,C);if(!P)return!0;if(P?k=T:(k=T==="v"?"h":"v",P=mh(T,C)),!P)return!1;if(!r.current&&"changedTouches"in h&&(w||A)&&(r.current=k),!k)return!0;var R=r.current||k;return oT(R,g,h,R==="h"?w:A)},[]),l=E.useCallback(function(h){var g=h;if(!(!Cn.length||Cn[Cn.length-1]!==o)){var y="deltaY"in g?vh(g):Pi(g),v=t.current.filter(function(k){return k.name===g.type&&(k.target===g.target||g.target===k.shadowParent)&&aT(k.delta,y)})[0];if(v&&v.should){g.cancelable&&g.preventDefault();return}if(!v){var w=(a.current.shards||[]).map(bh).filter(Boolean).filter(function(k){return k.contains(g.target)}),A=w.length>0?s(g,w[0]):!a.current.noIsolation;A&&g.cancelable&&g.preventDefault()}}},[]),u=E.useCallback(function(h,g,y,v){var w={name:h,delta:g,target:y,should:v,shadowParent:cT(y)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(A){return A!==w})},1)},[]),f=E.useCallback(function(h){n.current=Pi(h),r.current=void 0},[]),c=E.useCallback(function(h){u(h.type,vh(h),h.target,s(h,e.lockRef.current))},[]),p=E.useCallback(function(h){u(h.type,Pi(h),h.target,s(h,e.lockRef.current))},[]);E.useEffect(function(){return Cn.push(o),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:p}),document.addEventListener("wheel",l,En),document.addEventListener("touchmove",l,En),document.addEventListener("touchstart",f,En),function(){Cn=Cn.filter(function(h){return h!==o}),document.removeEventListener("wheel",l,En),document.removeEventListener("touchmove",l,En),document.removeEventListener("touchstart",f,En)}},[]);var d=e.removeScrollBar,m=e.inert;return E.createElement(E.Fragment,null,m?E.createElement(o,{styles:sT(i)}):null,d?E.createElement(ZI,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function cT(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const fT=zI(fh,uT);var wh=E.forwardRef(function(e,t){return E.createElement(Mi,ot({},e,{ref:t,sideCar:fT}))});wh.classNames=Mi.classNames;var dT=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},An=new WeakMap,Ni=new WeakMap,Li={},Ds=0,xh=function(e){return e&&(e.host||xh(e.parentNode))},pT=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=xh(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})},hT=function(e,t,n,r){var i=pT(t,Array.isArray(e)?e:[e]);Li[n]||(Li[n]=new WeakMap);var o=Li[n],a=[],s=new Set,l=new Set(i),u=function(c){!c||s.has(c)||(s.add(c),u(c.parentNode))};i.forEach(u);var f=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(p){if(s.has(p))f(p);else try{var d=p.getAttribute(r),m=d!==null&&d!=="false",h=(An.get(p)||0)+1,g=(o.get(p)||0)+1;An.set(p,h),o.set(p,g),a.push(p),h===1&&m&&Ni.set(p,!0),g===1&&p.setAttribute(n,"true"),m||p.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return f(t),s.clear(),Ds++,function(){a.forEach(function(c){var p=An.get(c)-1,d=o.get(c)-1;An.set(c,p),o.set(c,d),p||(Ni.has(c)||c.removeAttribute(r),Ni.delete(c)),d||c.removeAttribute(n)}),Ds--,Ds||(An=new WeakMap,An=new WeakMap,Ni=new WeakMap,Li={})}},mT=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=dT(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),hT(r,i,n,"aria-hidden")):function(){return null}},Fi="Dialog",[kh]=gp(Fi),[gT,St]=kh(Fi),Sh=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,s=E.useRef(null),l=E.useRef(null),[u,f]=yp({prop:r,defaultProp:i??!1,onChange:o,caller:Fi});return S.jsx(gT,{scope:t,triggerRef:s,contentRef:l,contentId:xi(),titleId:xi(),descriptionId:xi(),open:u,onOpenChange:f,onOpenToggle:E.useCallback(()=>f(c=>!c),[f]),modal:a,children:n})};Sh.displayName=Fi;var Eh="DialogTrigger",Ch=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=St(Eh,n),o=Ot(t,i.triggerRef);return S.jsx(ht.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":_s(i.open),...r,ref:o,onClick:At(e.onClick,i.onOpenToggle)})});Ch.displayName=Eh;var yT="DialogPortal",[FO,Ah]=kh(yT,{forceMount:void 0}),Ri="DialogOverlay",vT=E.forwardRef((e,t)=>{const n=Ah(Ri,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=St(Ri,e.__scopeDialog);return o.modal?S.jsx(bi,{present:r||o.open,children:S.jsx(wT,{...i,ref:t})}):null});vT.displayName=Ri;var bT=vp("DialogOverlay.RemoveScroll"),wT=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=St(Ri,n);return S.jsx(wh,{as:bT,allowPinchZoom:!0,shards:[i.contentRef],children:S.jsx(ht.div,{"data-state":_s(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Jt="DialogContent",Ih=E.forwardRef((e,t)=>{const n=Ah(Jt,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=St(Jt,e.__scopeDialog);return S.jsx(bi,{present:r||o.open,children:o.modal?S.jsx(xT,{...i,ref:t}):S.jsx(kT,{...i,ref:t})})});Ih.displayName=Jt;var xT=E.forwardRef((e,t)=>{const n=St(Jt,e.__scopeDialog),r=E.useRef(null),i=Ot(t,n.contentRef,r);return E.useEffect(()=>{const o=r.current;if(o)return mT(o)},[]),S.jsx(Th,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:At(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:At(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:At(e.onFocusOutside,o=>o.preventDefault())})}),kT=E.forwardRef((e,t)=>{const n=St(Jt,e.__scopeDialog),r=E.useRef(!1),i=E.useRef(!1);return S.jsx(Th,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var a,s;(a=e.onCloseAutoFocus)==null||a.call(e,o),o.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;((u=n.triggerRef.current)==null?void 0:u.contains(a))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),Th=E.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,s=St(Jt,n),l=E.useRef(null),u=Ot(t,l);return DI(),S.jsxs(S.Fragment,{children:[S.jsx(rh,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:S.jsx(Xp,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":_s(s.open),...a,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),S.jsxs(S.Fragment,{children:[S.jsx(ST,{titleId:s.titleId}),S.jsx(CT,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Ms="DialogTitle",Oh=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=St(Ms,n);return S.jsx(ht.h2,{id:i.titleId,...r,ref:t})});Oh.displayName=Ms;var Dh="DialogDescription",Mh=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=St(Dh,n);return S.jsx(ht.p,{id:i.descriptionId,...r,ref:t})});Mh.displayName=Dh;var _h="DialogClose",Ph=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=St(_h,n);return S.jsx(ht.button,{type:"button",...r,ref:t,onClick:At(e.onClick,()=>i.onOpenChange(!1))})});Ph.displayName=_h;function _s(e){return e?"open":"closed"}var Nh="DialogTitleWarning",[RO,Lh]=BC(Nh,{contentName:Jt,titleName:Ms,docsSlug:"dialog"}),ST=({titleId:e})=>{const t=Lh(Nh),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
358
358
|
|
|
359
359
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
360
360
|
|
|
361
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return E.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},ET="DialogDescriptionWarning",CT=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Lh(ET).contentName}}.`;return E.useEffect(()=>{var o;const i=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},AT=Sh,IT=Ch,TT=Ih,OT=Oh,DT=Mh,MT=Ph;function In({open:e,onOpenChange:t,children:n}){const{modal:r}=ge;return S.jsxs(AT,{open:e,modal:!1,onOpenChange:t,children:[e&&S.jsx("div",{...r==null?void 0:r.overlay}),n]})}function _T({title:e,description:t,onConfirm:n,onCancel:r,confirmButtonText:i,cancelButtonText:o,children:a}){const{modal:s}=ge;return S.jsx(S.Fragment,{children:S.jsxs(TT,{...s.dialog.container,children:[S.jsx(OT,{...s.dialog.title,children:e}),S.jsx(DT,{...s.dialog.description,children:t}),S.jsx("div",{...s.dialog.content.container,children:a}),S.jsxs("div",{...s.dialog.button.container,children:[i&&S.jsx("button",{...s.dialog.button.confirm,type:"button",onClick:n,children:i}),o&&S.jsx("button",{...s.dialog.button.cancel,type:"button",onClick:r,children:o})]})]})})}In.Button=IT,In.Close=MT,In.Content=_T;const Fh=({
|
|
361
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return E.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},ET="DialogDescriptionWarning",CT=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Lh(ET).contentName}}.`;return E.useEffect(()=>{var o;const i=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},AT=Sh,IT=Ch,TT=Ih,OT=Oh,DT=Mh,MT=Ph;function In({open:e,onOpenChange:t,children:n}){const{modal:r}=ge;return S.jsxs(AT,{open:e,modal:!1,onOpenChange:t,children:[e&&S.jsx("div",{...r==null?void 0:r.overlay}),n]})}function _T({title:e,description:t,onConfirm:n,onCancel:r,confirmButtonText:i,cancelButtonText:o,children:a}){const{modal:s}=ge;return S.jsx(S.Fragment,{children:S.jsxs(TT,{...s.dialog.container,children:[S.jsx(OT,{...s.dialog.title,children:e}),S.jsx(DT,{...s.dialog.description,children:t}),S.jsx("div",{...s.dialog.content.container,children:a}),S.jsxs("div",{...s.dialog.button.container,children:[i&&S.jsx("button",{...s.dialog.button.confirm,type:"button",onClick:n,children:i}),o&&S.jsx("button",{...s.dialog.button.cancel,type:"button",onClick:r,children:o})]})]})})}In.Button=IT,In.Close=MT,In.Content=_T;const Fh=_.forwardRef(({children:e,onClick:t,avatarUrl:n,botName:r,description:i,onClose:o,...a},s)=>{const{messagePreview:l}=ge,{container:u,closeButton:f,message:c,avatar:p,description:d}=l??{};return S.jsxs("div",{...a,...u,ref:s,onClick:t,children:[S.jsx(Nn,{src:n,...p,children:r||"Bot"}),S.jsx("p",{...c,children:e}),S.jsx("p",{...d,children:i}),S.jsx(Fc,{...f,onClick:m=>{m.stopPropagation(),o==null||o()}})]})});Fh.displayName="MessagePreview",re.Avatar=Nn,re.BOT_IS_BLOCKED=ml,re.Block=Yt,re.CONFIG_ACCESS_DENIED=Vm,re.Chat=Dp,re.Composer=Nd,re.Container=es,re.ErrorState=Op,re.Fab=mp,re.Header=Ep,re.INVALID_API_URL=dl,re.INVALID_BOTPRESS_URL=hl,re.INVALID_CLIENT_ID=pl,re.INVALID_CONFIGURATION=Wm,re.INVALID_CONFIG_URL=Hm,re.INVALID_MESSAGE_CONTENT_TYPE=vl,re.MISSING_API_URL=$m,re.MISSING_BOT_ID=jm,re.MISSING_CLIENT_ID=fl,re.MISSING_CONFIG_URL=Um,re.Message=as,re.MessageContext=ia,re.MessageList=cs,re.MessagePreview=Fh,re.Modal=In,re.ModalContext=oa,re.ModalProvider=pp,re.NETWORK_ERROR=Pn,re.NOT_A_PARTICIPANT=Ji,re.QUOTA_EXCEEDED=gl,re.RestartConversationButton=is,re.SOUND_EFFECTS=Gp,re.SSE_DISCONNECTED_ERROR=yl,re.StylesheetProvider=hp,re.TypingIndicator=os,re.Webchat=hI,re.commonApiErrorMap=Xi,re.enrichMessage=Gs,re.fileTypes=ul,re.generateThemeOverride=ll,re.generateThemeStylesheet=sl,re.getUseChatSoundStore=af,re.getUseWebchatClientStore=rf,re.integrationMessagePayloadToBlockPayload=Yc,re.integrationMessageToBlockMessage=Kn,re.isCommonApiErrorType=wl,re.isEventError=kl,re.isFileType=cl,re.isIntegrationError=xl,re.isWebhookHandlerErrorType=bl,re.mapToWebchatError=Sr,re.renderers=Cd,re.retryWithBackoff=Sl,re.useMessageContext=sf,re.useModalContext=aa,re.useWebchat=Qp,re.useWebchatStore=sn,re.webchatClasses=ge,re.webhookHandlerErrorMap=Zi,Object.defineProperty(re,Symbol.toStringTag,{value:"Module"})});
|