@botpress/webchat 2.3.0 → 2.3.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/.turbo/turbo-build.log +7 -7
- package/dist/gen/client/models.d.ts +0 -52
- package/dist/gen/client/operations/createMessage.d.ts +0 -104
- package/dist/gen/client/operations/getMessage.d.ts +0 -52
- package/dist/gen/client/operations/listConversationMessages.d.ts +0 -52
- package/dist/gen/signals/index.d.ts +0 -93
- package/dist/gen/signals/messageCreated.t.d.ts +0 -52
- package/dist/gen/signals/messageCreated.z.d.ts +0 -93
- package/dist/index.js +34 -59
- package/dist/index.umd.cjs +2 -2
- package/dist/style.css +1 -1
- package/dist/styles/classes.d.ts +22 -22
- package/package.json +1 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -51,7 +51,7 @@ Check the top-level render call using <`+me+">.")}return ne}}function Rt(I,ne){{
|
|
|
51
51
|
`))+1))}const a="#".repeat(o),s=n.enter("headingAtx"),l=n.enter("phrasing");i.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
|
|
52
52
|
`,...i.current()});return/^[\t ]/.test(c)&&(c="&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),s(),c}j0.peek=_j;function j0(e){return e.value||""}function _j(){return"<"}N0.peek=Tj;function N0(e,t,n,r){const o=rd(n),i=o==='"'?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),c+=l.move(")"),a(),c}function Tj(){return"!"}L0.peek=Cj;function L0(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const f=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),o==="full"||!c||c!==f?l+=s.move(f+"]"):o==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function Cj(){return"!"}F0.peek=Ij;function F0(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const a=n.unsafe[i],s=n.compilePattern(a);let l;if(a.atBreak)for(;l=s.exec(r);){let c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return o+r+o}function Ij(){return"`"}function B0(e,t){const n=If(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))}U0.peek=Aj;function U0(e,t,n,r){const o=rd(n),i=o==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(B0(e,n)){const u=n.stack;n.stack=[],s=n.enter("autolink");let f=a.move("<");return f+=a.move(n.containerPhrasing(e,{before:f,after:">",...a.current()})),f+=a.move(">"),s(),n.stack=u,f}s=n.enter("link"),l=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${i}`),c+=a.move(" "+o),c+=a.move(n.safe(e.title,{before:c,after:o,...a.current()})),c+=a.move(o),l()),c+=a.move(")"),s(),c}function Aj(e,t,n){return B0(e,n)?"<":"["}z0.peek=Pj;function z0(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const f=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),o==="full"||!c||c!==f?l+=s.move(f+"]"):o==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function Pj(){return"["}function od(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 Rj(e){const t=od(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 Mj(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 H0(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Dj(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let a=e.ordered?Mj(n):od(n);const s=e.ordered?a==="."?")":".":Rj(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const u=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&u&&(!u.children||!u.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),H0(n)===a&&u){let f=-1;for(;++f<e.children.length;){const p=e.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=i,o(),c}function jj(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Nj(e,t,n,r){const o=jj(n);let i=n.bulletCurrent||od(n);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let a=i.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const s=n.createTracker(r);s.move(i+" ".repeat(a-i.length)),s.shift(a);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),u);return l(),c;function u(f,p,d){return p?(d?"":" ".repeat(a))+f:(d?i:i+" ".repeat(a-i.length))+f}}function Lj(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),a=n.containerPhrasing(e,r);return i(),o(),a}const Fj=Xs(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Bj(e,t,n,r){return(e.children.some(function(a){return Fj(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Uj(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}q0.peek=zj;function q0(e,t,n,r){const o=Uj(n),i=n.enter("strong"),a=n.createTracker(r);let s=a.move(o+o);return s+=a.move(n.containerPhrasing(e,{before:s,after:o,...a.current()})),s+=a.move(o+o),i(),s}function zj(e,t,n){return n.options.strong||"*"}function Hj(e,t,n,r){return n.safe(e.value,r)}function qj(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Wj(e,t,n){const r=(H0(n)+(n.options.ruleSpaces?" ":"")).repeat(qj(n));return n.options.ruleSpaces?r.slice(0,-1):r}const W0={blockquote:hj,break:M0,code:wj,definition:Sj,emphasis:D0,hardBreak:M0,heading:kj,html:j0,image:N0,imageReference:L0,inlineCode:F0,link:U0,linkReference:z0,list:Dj,listItem:Nj,paragraph:Lj,root:Bj,strong:q0,text:Hj,thematicBreak:Wj};function Vj(){return{enter:{table:Kj,tableData:V0,tableHeader:V0,tableRow:Zj},exit:{codeText:Yj,table:Gj,tableData:id,tableHeader:id,tableRow:id}}}function Kj(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Gj(e){this.exit(e),this.data.inTable=void 0}function Zj(e){this.enter({type:"tableRow",children:[]},e)}function id(e){this.exit(e)}function V0(e){this.enter({type:"tableCell",children:[]},e)}function Yj(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Jj));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Jj(e,t){return t==="|"?t:e}function Xj(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
53
53
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:a,tableCell:l,tableRow:s}};function a(d,h,m,y){return c(u(d,m,y),d.align)}function s(d,h,m,y){const v=f(d,m,y),g=c([v]);return g.slice(0,g.indexOf(`
|
|
54
|
-
`))}function l(d,h,m,y){const v=m.enter("tableCell"),g=m.enter("phrasing"),b=m.containerPhrasing(d,{...y,before:i,after:i});return g(),v(),b}function c(d,h){return fj(d,{align:h,alignDelimiters:r,padding:n,stringLength:o})}function u(d,h,m){const y=d.children;let v=-1;const g=[],b=h.enter("table");for(;++v<y.length;)g[v]=f(y[v],h,m);return b(),g}function f(d,h,m){const y=d.children;let v=-1;const g=[],b=h.enter("tableRow");for(;++v<y.length;)g[v]=l(y[v],d,h,m);return b(),g}function p(d,h,m){let y=W0.inlineCode(d,h,m);return m.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function Qj(){return{exit:{taskListCheckValueChecked:K0,taskListCheckValueUnchecked:K0,paragraph:tN}}}function eN(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:nN}}}function K0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function tN(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 o=t.children;let i=-1,a;for(;++i<o.length;){const s=o[i];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 nN(e,t,n,r){const o=e.children[0],i=typeof e.checked=="boolean"&&o&&o.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(a);let l=W0.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+a}}function rN(){return[MD(),VD(),aj(),Vj(),Qj()]}function oN(e){return{extensions:[DD(),KD(),sj(),Xj(e),eN()]}}const iN={tokenize:fN,partial:!0},G0={tokenize:dN,partial:!0},Z0={tokenize:pN,partial:!0},Y0={tokenize:hN,partial:!0},aN={tokenize:mN,partial:!0},J0={tokenize:cN,previous:Q0},X0={tokenize:uN,previous:ew},xr={tokenize:lN,previous:tw},er={};function sN(){return{text:er}}let Oo=48;for(;Oo<123;)er[Oo]=xr,Oo++,Oo===58?Oo=65:Oo===91&&(Oo=97);er[43]=xr,er[45]=xr,er[46]=xr,er[95]=xr,er[72]=[xr,X0],er[104]=[xr,X0],er[87]=[xr,J0],er[119]=[xr,J0];function lN(e,t,n){const r=this;let o,i;return a;function a(f){return!ad(f)||!tw.call(r,r.previous)||sd(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return ad(f)?(e.consume(f),s):f===64?(e.consume(f),l):n(f)}function l(f){return f===46?e.check(aN,u,c)(f):f===45||f===95||Kt(f)?(i=!0,e.consume(f),l):u(f)}function c(f){return e.consume(f),o=!0,l}function u(f){return i&&o&&nn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function cN(e,t,n){const r=this;return o;function o(a){return a!==87&&a!==119||!Q0.call(r,r.previous)||sd(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(iN,e.attempt(G0,e.attempt(Z0,i),n),n)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function uN(e,t,n){const r=this;let o="",i=!1;return a;function a(f){return(f===72||f===104)&&ew.call(r,r.previous)&&!sd(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if(nn(f)&&o.length<5)return o+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const p=o.toLowerCase();if(p==="http"||p==="https")return e.consume(f),l}return n(f)}function l(f){return f===47?(e.consume(f),i?c:(i=!0,l)):n(f)}function c(f){return f===null||Us(f)||at(f)||$o(f)||zs(f)?n(f):e.attempt(G0,e.attempt(Z0,u),n)(f)}function u(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function fN(e,t,n){let r=0;return o;function o(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),o):a===46&&r===3?(e.consume(a),i):n(a)}function i(a){return a===null?n(a):t(a)}}function dN(e,t,n){let r,o,i;return a;function a(c){return c===46||c===95?e.check(Y0,l,s)(c):c===null||at(c)||$o(c)||c!==45&&zs(c)?l(c):(i=!0,e.consume(c),a)}function s(c){return c===95?r=!0:(o=r,r=void 0),e.consume(c),a}function l(c){return o||r||!i?n(c):t(c)}}function pN(e,t){let n=0,r=0;return o;function o(a){return a===40?(n++,e.consume(a),o):a===41&&r<n?i(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(Y0,t,i)(a):a===null||at(a)||$o(a)?t(a):(e.consume(a),o)}function i(a){return a===41&&r++,e.consume(a),o}}function hN(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),i):s===93?(e.consume(s),o):s===60||s===null||at(s)||$o(s)?t(s):n(s)}function o(s){return s===null||s===40||s===91||at(s)||$o(s)?t(s):r(s)}function i(s){return nn(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):nn(s)?(e.consume(s),a):n(s)}}function mN(e,t,n){return r;function r(i){return e.consume(i),o}function o(i){return Kt(i)?n(i):t(i)}}function Q0(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||at(e)}function ew(e){return!nn(e)}function tw(e){return!(e===47||ad(e))}function ad(e){return e===43||e===45||e===46||e===95||Kt(e)}function sd(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 vN={tokenize:$N,partial:!0};function yN(){return{document:{91:{tokenize:xN,continuation:{tokenize:SN},exit:EN}},text:{91:{tokenize:wN},93:{add:"after",tokenize:gN,resolveTo:bN}}}}function gN(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const l=r.events[o][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!a||!a._balanced)return n(l);const c=Nn(r.sliceSerialize({start:a.end,end:r.now()}));return c.codePointAt(0)!==94||!i.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function bN(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)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function wN(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,a;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),l}function l(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(f){if(i>999||f===93&&!a||f===null||f===91||at(f))return n(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return o.includes(Nn(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return at(f)||(a=!0),i++,e.consume(f),f===92?u:c}function u(f){return f===91||f===92||f===93?(e.consume(f),i++,c):c(f)}}function xN(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0,s;return l;function l(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(h)}function u(h){if(a>999||h===93&&!s||h===null||h===91||at(h))return n(h);if(h===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return i=Nn(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return at(h)||(s=!0),a++,e.consume(h),h===92?f:u}function f(h){return h===91||h===92||h===93?(e.consume(h),a++,u):u(h)}function p(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),o.includes(i)||o.push(i),He(e,d,"gfmFootnoteDefinitionWhitespace")):n(h)}function d(h){return t(h)}}function SN(e,t,n){return e.check(da,t,e.attempt(vN,t,n))}function EN(e){e.exit("gfmFootnoteDefinition")}function $N(e,t,n){const r=this;return He(e,o,"gfmFootnoteDefinitionIndent",4+1);function o(i){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(i):n(i)}}function ON(e){let n=(e||{}).singleTilde;const r={tokenize:i,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(a,s){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let c=l;for(;c--;)if(a[c][0]==="exit"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[c][1].end.offset-a[c][1].start.offset){a[l][1].type="strikethroughSequence",a[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[l][1].end)},f={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[l][1].start)},p=[["enter",u,s],["enter",a[c][1],s],["exit",a[c][1],s],["enter",f,s]],d=s.parser.constructs.insideSpan.null;d&&hn(p,p.length,0,qs(d,a.slice(c+1,l),s)),hn(p,p.length,0,[["exit",f,s],["enter",a[l][1],s],["exit",a[l][1],s],["exit",u,s]]),hn(a,c-1,l-c+3,p),l=c+p.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function i(a,s,l){const c=this.previous,u=this.events;let f=0;return p;function p(h){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(h):(a.enter("strikethroughSequenceTemporary"),d(h))}function d(h){const m=Hs(c);if(h===126)return f>1?l(h):(a.consume(h),f++,d);if(f<2&&!n)return l(h);const y=a.exit("strikethroughSequenceTemporary"),v=Hs(h);return y._open=!v||v===2&&!!m,y._close=!m||m===2&&!!v,s(h)}}}class kN{constructor(){this.map=[]}add(t,n,r){_N(this,t,n,r)}consume(t){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let o=r.pop();for(;o;)t.push(...o),o=r.pop();this.map.length=0}}function _N(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function TN(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function CN(){return{flow:{null:{tokenize:IN,resolveAll:AN}}}}function IN(e,t,n){const r=this;let o=0,i=0,a;return s;function s(T){let M=r.events.length-1;for(;M>-1;){const A=r.events[M][1].type;if(A==="lineEnding"||A==="linePrefix")M--;else break}const q=M>-1?r.events[M][1].type:null,B=q==="tableHead"||q==="tableRow"?$:l;return B===$&&r.parser.lazy[r.now().line]?n(T):B(T)}function l(T){return e.enter("tableHead"),e.enter("tableRow"),c(T)}function c(T){return T===124||(a=!0,i+=1),u(T)}function u(T){return T===null?n(T):$e(T)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),d):n(T):Fe(T)?He(e,u,"whitespace")(T):(i+=1,a&&(a=!1,o+=1),T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),a=!0,u):(e.enter("data"),f(T)))}function f(T){return T===null||T===124||at(T)?(e.exit("data"),u(T)):(e.consume(T),T===92?p:f)}function p(T){return T===92||T===124?(e.consume(T),f):f(T)}function d(T){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(T):(e.enter("tableDelimiterRow"),a=!1,Fe(T)?He(e,h,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):h(T))}function h(T){return T===45||T===58?y(T):T===124?(a=!0,e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),m):S(T)}function m(T){return Fe(T)?He(e,y,"whitespace")(T):y(T)}function y(T){return T===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),v):T===45?(i+=1,v(T)):T===null||$e(T)?k(T):S(T)}function v(T){return T===45?(e.enter("tableDelimiterFiller"),g(T)):S(T)}function g(T){return T===45?(e.consume(T),g):T===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(T))}function b(T){return Fe(T)?He(e,k,"whitespace")(T):k(T)}function k(T){return T===124?h(T):T===null||$e(T)?!a||o!==i?S(T):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(T)):S(T)}function S(T){return n(T)}function $(T){return e.enter("tableRow"),C(T)}function C(T){return T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),C):T===null||$e(T)?(e.exit("tableRow"),t(T)):Fe(T)?He(e,C,"whitespace")(T):(e.enter("data"),P(T))}function P(T){return T===null||T===124||at(T)?(e.exit("data"),C(T)):(e.consume(T),T===92?F:P)}function F(T){return T===92||T===124?(e.consume(T),P):P(T)}}function AN(e,t){let n=-1,r=!0,o=0,i=[0,0,0,0],a=[0,0,0,0],s=!1,l=0,c,u,f;const p=new kN;for(;++n<e.length;){const d=e[n],h=d[1];d[0]==="enter"?h.type==="tableHead"?(s=!1,l!==0&&(nw(p,t,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(n,0,[["enter",c,t]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(r=!0,f=void 0,i=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,u={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(n,0,[["enter",u,t]])),o=h.type==="tableDelimiterRow"?2:u?3:1):o&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(i[1]!==0&&(a[0]=a[1],f=nl(p,t,i,o,void 0,f),i=[0,0,0,0]),a[2]=n)):h.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(a[0]=a[1],f=nl(p,t,i,o,void 0,f)),i=a,a=[i[1],n,0,0])):h.type==="tableHead"?(s=!0,l=n):h.type==="tableRow"||h.type==="tableDelimiterRow"?(l=n,i[1]!==0?(a[0]=a[1],f=nl(p,t,i,o,n,f)):a[1]!==0&&(f=nl(p,t,a,o,n,f)),o=0):o&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&nw(p,t,l,c,u),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=TN(t.events,n))}return e}function nl(e,t,n,r,o,i){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(i.end=Object.assign({},Qo(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const l=Qo(t.events,n[1]);if(i={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const c=Qo(t.events,n[2]),u=Qo(t.events,n[3]),f={type:s,start:Object.assign({},c),end:Object.assign({},u)};if(e.add(n[2],0,[["enter",f,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 h=n[2]+1,m=n[3]-n[2]-1;e.add(h,m,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return o!==void 0&&(i.end=Object.assign({},Qo(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function nw(e,t,n,r,o){const i=[],a=Qo(t.events,n);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function Qo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const PN={tokenize:MN};function RN(){return{text:{91:PN}}}function MN(e,t,n){const r=this;return o;function o(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),i)}function i(l){return at(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return $e(l)?t(l):Fe(l)?e.check({tokenize:DN},t,n)(l):n(l)}}function DN(e,t,n){return He(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function jN(e){return Ab([sN(),yN(),ON(e),CN(),RN()])}const NN={};function LN(e){const t=this,n=e||NN,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(jN(n)),i.push(rN()),a.push(oN(n))}const st={container:{className:"bpContainer"},modal:{container:{className:"bpModalContainer"},overlay:{className:"bpModalOverlay"},dialog:{container:{className:"bpModalDialogContainer"},title:{container:{className:"bpModalDialogTitleContainer"},text:{className:"bpModalDialogTitleText"},closeIcon:{className:"bpModalDialogTitleCloseIcon"}},content:{className:"bpModalDialogContent"},newConversation:{button:{className:"bpModalDialogNewConversationButton"},text:{className:"bpModalDialogNewConversationText"}}}},fab:{container:{className:"bpFabContainer"},icon:{className:"bpFabIcon"}},notification:{container:{className:"bpNotificationContainer"},title:{className:"bpNotificationTitle"},description:{className:"bpNotificationDescription"},icon:{className:"bpNotificationIcon"},closeIcon:{className:"bpNotificationCloseIcon"}},header:{container:{className:"bpHeaderContainer"},content:{container:{className:"bpHeaderContentContainer"},title:{className:"bpHeaderContentTitle"},description:{className:"bpHeaderContentDescription"},avatar:{container:{className:"bpHeaderContentAvatarContainer"},image:{className:"bpHeaderContentAvatarImage"},fallback:{className:"bpHeaderContentAvatarFallback"}},actions:{container:{className:"bpHeaderContentActionsContainer"},icons:{className:"bpHeaderContentActionsIcons"}}},expandedContent:{container:{className:"bpHeaderExpandedContentContainer"},descriptionItems:{container:{className:"bpHeaderExpandedContentDescriptionItemsContainer"},icon:{className:"bpHeaderExpandedContentDescriptionItemsIcon"},text:{className:"bpHeaderExpandedContentDescriptionItemsText"},link:{className:"bpHeaderExpandedContentDescriptionItemsLink"}},group:{className:"bpHeaderExpandedContentGroup"}},newConversationIcon:{className:"bpHeaderNewConversationIcon"}},composer:{container:{className:"bpComposerContainer"},poweredBy:{className:"bpComposerPoweredBy"},input:{className:"bpComposerInput"},button:{container:{className:"bpComposerButtonContainer"},icon:{className:"bpComposerButtonIcon"}},uploadButton:{icon:{className:"bpComposerUploadButtonIcon"},container:{className:"bpComposerUploadButtonContainer"}},voiceButton:{icon:{className:"bpComposerVoiceButtonIcon"},container:{className:"bpComposerVoiceButtonContainer"}}},messageList:{scrollDownButton:{container:{className:"bpMessageListScrollDownButtonContainer"},button:{className:"bpMessageListScrollDownButtonButton"},icon:{className:"bpMessageListScrollDownButtonIcon"}},container:{className:"bpMessageListContainer"},viewPort:{className:"bpMessageListViewport"},marquee:{container:{className:"bpMessageListMarqueeContainer"},content:{className:"bpMessageListMarqueeContent"},title:{className:"bpMessageListMarqueeTitle"},description:{className:"bpMessageListMarqueeDescription"},avatar:{container:{className:"bpMessageListMarqueeAvatarContainer"},image:{className:"bpMessageListMarqueeAvatarImage"},fallback:{className:"bpMessageListMarqueeAvatarFallback"}}},headerMessage:{className:"bpMessageListHeaderMessage"}},message:{container:{className:"bpMessageContainer"},avatar:{container:{className:"bpMessageAvatarContainer"},image:{className:"bpMessageAvatarImage"},fallback:{className:"bpMessageAvatarFallback"}},blocks:{text:{heading1:{className:"bpMessageBlocksTextHeading1"},heading2:{className:"bpMessageBlocksTextHeading2"},heading3:{className:"bpMessageBlocksTextHeading3"},unorderedList:{className:"bpMessageBlocksTextUnorderedList"},orderedList:{className:"bpMessageBlocksTextOrderedList"},link:{className:"bpMessageBlocksTextLink"},italic:{className:"bpMessageBlocksTextItalic"},bold:{className:"bpMessageBlocksTextBold"},text:{className:"bpMessageBlocksTextText"},horizontalRule:{className:"bpMessageBlocksTextHorizontalRule"},listItem:{className:"bpMessageBlocksTextListItem"},lineBreak:{className:"bpMessageBlocksTextLineBreak"},pre:{className:"bpMessageBlocksTextPre"}},audio:{className:"bpMessageBlocksAudio"},image:{image:{className:"bpMessageBlocksImageImage"},placeholder:{className:"bpMessageBlocksImagePlaceholder"}},video:{className:"bpMessageBlocksVideo"},location:{container:{className:"bpMessageBlocksLocationContainer"},title:{className:"bpMessageBlocksLocationTitle"},icon:{className:"bpMessageBlocksLocationIcon"}},file:{container:{className:"bpMessageBlocksFileContainer"},title:{className:"bpMessageBlocksFileTitle"},icon:{className:"bpMessageBlocksFileIcon"}},row:{className:"bpMessageBlocksRow"},column:{className:"bpMessageBlocksColumn"},bubble:{className:"bpMessageBlocksBubble"},carousel:{container:{className:"bpMessageBlocksCarouselContainer"},slidesContainer:{className:"bpMessageBlocksCarouselSlidesContainer"},backButton:{className:"bpMessageBlocksCarouselBackButton"},nextButton:{className:"bpMessageBlocksCarouselNextButton"}},dropdown:{button:{container:{className:"bpMessageBlocksDropdownButtonContainer"},text:{className:"bpMessageBlocksDropdownButtonText"},icon:{className:"bpMessageBlocksDropdownButtonIcon"}},content:{container:{className:"bpMessageBlocksDropdownContentContainer"},item:{className:"bpMessageBlocksDropdownContentItem"}}},button:{className:"bpMessageBlocksButton"}}},typingIndicator:{container:{className:"bpTypingIndicatorContainer"},loader:{className:"bpTypingIndicatorLoader"}}},FN=({text:e})=>{const{message:{blocks:{text:t}}}=st,n={h1:({node:r,...o})=>L.jsx("h1",{...o,...t==null?void 0:t.heading1}),h2:({node:r,...o})=>L.jsx("h2",{...o,...t==null?void 0:t.heading2}),h3:({node:r,...o})=>L.jsx("h3",{...o,...t==null?void 0:t.heading3}),h4:"h3",h5:"h3",h6:"h3",em:({node:r,...o})=>L.jsx("em",{...o,...t==null?void 0:t.italic}),strong:({node:r,...o})=>L.jsx("strong",{...o,...t==null?void 0:t.bold}),p:({node:r,...o})=>L.jsx("p",{...o,...t==null?void 0:t.text}),hr:({node:r,...o})=>L.jsx("hr",{...o,...t==null?void 0:t.horizontalRule}),a:({node:r,...o})=>L.jsx("a",{...o,...t==null?void 0:t.link,target:"_blank"}),ol:({node:r,...o})=>L.jsx("ol",{...o,...t==null?void 0:t.orderedList}),ul:({node:r,...o})=>L.jsx("ul",{...o,...t==null?void 0:t.unorderedList}),li:({node:r,...o})=>L.jsx("li",{...o,...t==null?void 0:t.listItem}),br:({node:r,...o})=>L.jsx("br",{...o,...t==null?void 0:t.lineBreak}),pre:({node:r,...o})=>L.jsx("pre",{...o,...t==null?void 0:t.pre})};return L.jsx(OD,{components:n,remarkPlugins:[LN,RD],children:e})};function rw(e,t){return function(){return e.apply(t,arguments)}}const{toString:ow}=Object.prototype,{getPrototypeOf:ld}=Object,cd=(e=>t=>{const n=ow.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Sr=e=>(e=e.toLowerCase(),t=>cd(t)===e),rl=e=>t=>typeof t===e,{isArray:ei}=Array,va=rl("undefined");function BN(e){return e!==null&&!va(e)&&e.constructor!==null&&!va(e.constructor)&&ko(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const iw=Sr("ArrayBuffer");function UN(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&iw(e.buffer),t}const zN=rl("string"),ko=rl("function"),aw=rl("number"),ud=e=>e!==null&&typeof e=="object",HN=e=>e===!0||e===!1,ol=e=>{if(cd(e)!=="object")return!1;const t=ld(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},qN=Sr("Date"),WN=Sr("File"),VN=Sr("Blob"),KN=Sr("FileList"),GN=e=>ud(e)&&ko(e.pipe),ZN=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||ow.call(e)===t||ko(e.toString)&&e.toString()===t)},YN=Sr("URLSearchParams"),JN=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ya(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),ei(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let s;for(r=0;r<a;r++)s=i[r],t.call(null,e[s],s,e)}}function sw(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const lw=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),cw=e=>!va(e)&&e!==lw;function fd(){const{caseless:e}=cw(this)&&this||{},t={},n=(r,o)=>{const i=e&&sw(t,o)||o;ol(t[i])&&ol(r)?t[i]=fd(t[i],r):ol(r)?t[i]=fd({},r):ei(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&ya(arguments[r],n);return t}const XN=(e,t,n,{allOwnKeys:r}={})=>(ya(t,(o,i)=>{n&&ko(o)?e[i]=rw(o,n):e[i]=o},{allOwnKeys:r}),e),QN=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),eL=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},tL=(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&ld(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},nL=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},rL=e=>{if(!e)return null;if(ei(e))return e;let t=e.length;if(!aw(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},oL=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ld(Uint8Array)),iL=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},aL=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},sL=Sr("HTMLFormElement"),lL=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),uw=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),cL=Sr("RegExp"),fw=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ya(n,(o,i)=>{t(o,i,e)!==!1&&(r[i]=o)}),Object.defineProperties(e,r)},Y={isArray:ei,isArrayBuffer:iw,isBuffer:BN,isFormData:ZN,isArrayBufferView:UN,isString:zN,isNumber:aw,isBoolean:HN,isObject:ud,isPlainObject:ol,isUndefined:va,isDate:qN,isFile:WN,isBlob:VN,isRegExp:cL,isFunction:ko,isStream:GN,isURLSearchParams:YN,isTypedArray:oL,isFileList:KN,forEach:ya,merge:fd,extend:XN,trim:JN,stripBOM:QN,inherits:eL,toFlatObject:tL,kindOf:cd,kindOfTest:Sr,endsWith:nL,toArray:rL,forEachEntry:iL,matchAll:aL,isHTMLForm:sL,hasOwnProperty:uw,hasOwnProp:uw,reduceDescriptors:fw,freezeMethods:e=>{fw(e,(t,n)=>{if(ko(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(ko(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},toObjectSet:(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return ei(e)?r(e):r(String(e).split(t)),n},toCamelCase:lL,noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:sw,global:lw,isContextDefined:cw,toJSONObject:e=>{const t=new Array(10),n=(r,o)=>{if(ud(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=ei(r)?[]:{};return ya(r,(a,s)=>{const l=n(a,o+1);!va(l)&&(i[s]=l)}),t[o]=void 0,i}}return r};return n(e,0)}};function Ve(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}Y.inherits(Ve,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Y.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const dw=Ve.prototype,pw={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{pw[e]={value:e}}),Object.defineProperties(Ve,pw),Object.defineProperty(dw,"isAxiosError",{value:!0}),Ve.from=(e,t,n,r,o,i)=>{const a=Object.create(dw);return Y.toFlatObject(e,a,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),Ve.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};var uL=typeof self=="object"?self.FormData:window.FormData;const fL=Le(uL);function dd(e){return Y.isPlainObject(e)||Y.isArray(e)}function hw(e){return Y.endsWith(e,"[]")?e.slice(0,-2):e}function mw(e,t,n){return e?e.concat(t).map(function(o,i){return o=hw(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function dL(e){return Y.isArray(e)&&!e.some(dd)}const pL=Y.toFlatObject(Y,{},null,function(t){return/^is[A-Z]/.test(t)});function hL(e){return e&&Y.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function il(e,t,n){if(!Y.isObject(e))throw new TypeError("target must be an object");t=t||new(fL||FormData),n=Y.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!Y.isUndefined(y[m])});const r=n.metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&hL(t);if(!Y.isFunction(o))throw new TypeError("visitor must be a function");function c(h){if(h===null)return"";if(Y.isDate(h))return h.toISOString();if(!l&&Y.isBlob(h))throw new Ve("Blob is not supported. Use a Buffer instead.");return Y.isArrayBuffer(h)||Y.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,m,y){let v=h;if(h&&!y&&typeof h=="object"){if(Y.endsWith(m,"{}"))m=r?m:m.slice(0,-2),h=JSON.stringify(h);else if(Y.isArray(h)&&dL(h)||Y.isFileList(h)||Y.endsWith(m,"[]")&&(v=Y.toArray(h)))return m=hw(m),v.forEach(function(b,k){!(Y.isUndefined(b)||b===null)&&t.append(a===!0?mw([m],k,i):a===null?m:m+"[]",c(b))}),!1}return dd(h)?!0:(t.append(mw(y,m,i),c(h)),!1)}const f=[],p=Object.assign(pL,{defaultVisitor:u,convertValue:c,isVisitable:dd});function d(h,m){if(!Y.isUndefined(h)){if(f.indexOf(h)!==-1)throw Error("Circular reference detected in "+m.join("."));f.push(h),Y.forEach(h,function(v,g){(!(Y.isUndefined(v)||v===null)&&o.call(t,v,Y.isString(g)?g.trim():g,m,p))===!0&&d(v,m?m.concat(g):[g])}),f.pop()}}if(!Y.isObject(e))throw new TypeError("data must be an object");return d(e),t}function vw(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function pd(e,t){this._pairs=[],e&&il(e,this,t)}const yw=pd.prototype;yw.append=function(t,n){this._pairs.push([t,n])},yw.toString=function(t){const n=t?function(r){return t.call(this,r,vw)}:vw;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function mL(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function gw(e,t,n){if(!t)return e;const r=n&&n.encode||mL,o=n&&n.serialize;let i;if(o?i=o(t,n):i=Y.isURLSearchParams(t)?t.toString():new pd(t,n).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class vL{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Y.forEach(this.handlers,function(r){r!==null&&t(r)})}}const bw=vL,ww={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},yL=typeof URLSearchParams<"u"?URLSearchParams:pd,gL=FormData,bL=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),wL=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),tr={isBrowser:!0,classes:{URLSearchParams:yL,FormData:gL,Blob},isStandardBrowserEnv:bL,isStandardBrowserWebWorkerEnv:wL,protocols:["http","https","file","blob","url","data"]};function xL(e,t){return il(e,new tr.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return tr.isNode&&Y.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function SL(e){return Y.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function EL(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}function xw(e){function t(n,r,o,i){let a=n[i++];const s=Number.isFinite(+a),l=i>=n.length;return a=!a&&Y.isArray(o)?o.length:a,l?(Y.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!s):((!o[a]||!Y.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],i)&&Y.isArray(o[a])&&(o[a]=EL(o[a])),!s)}if(Y.isFormData(e)&&Y.isFunction(e.entries)){const n={};return Y.forEachEntry(e,(r,o)=>{t(SL(r),o,n,0)}),n}return null}const $L={"Content-Type":void 0};function OL(e,t,n){if(Y.isString(e))try{return(t||JSON.parse)(e),Y.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const al={transitional:ww,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=Y.isObject(t);if(i&&Y.isHTMLForm(t)&&(t=new FormData(t)),Y.isFormData(t))return o&&o?JSON.stringify(xw(t)):t;if(Y.isArrayBuffer(t)||Y.isBuffer(t)||Y.isStream(t)||Y.isFile(t)||Y.isBlob(t))return t;if(Y.isArrayBufferView(t))return t.buffer;if(Y.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return xL(t,this.formSerializer).toString();if((s=Y.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return il(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),OL(t)):t}],transformResponse:[function(t){const n=this.transitional||al.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(t&&Y.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?Ve.from(s,Ve.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:tr.classes.FormData,Blob:tr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Y.forEach(["delete","get","head"],function(t){al.headers[t]={}}),Y.forEach(["post","put","patch"],function(t){al.headers[t]=Y.merge($L)});const hd=al,kL=Y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),_L=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
54
|
+
`))}function l(d,h,m,y){const v=m.enter("tableCell"),g=m.enter("phrasing"),b=m.containerPhrasing(d,{...y,before:i,after:i});return g(),v(),b}function c(d,h){return fj(d,{align:h,alignDelimiters:r,padding:n,stringLength:o})}function u(d,h,m){const y=d.children;let v=-1;const g=[],b=h.enter("table");for(;++v<y.length;)g[v]=f(y[v],h,m);return b(),g}function f(d,h,m){const y=d.children;let v=-1;const g=[],b=h.enter("tableRow");for(;++v<y.length;)g[v]=l(y[v],d,h,m);return b(),g}function p(d,h,m){let y=W0.inlineCode(d,h,m);return m.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function Qj(){return{exit:{taskListCheckValueChecked:K0,taskListCheckValueUnchecked:K0,paragraph:tN}}}function eN(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:nN}}}function K0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function tN(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 o=t.children;let i=-1,a;for(;++i<o.length;){const s=o[i];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 nN(e,t,n,r){const o=e.children[0],i=typeof e.checked=="boolean"&&o&&o.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(a);let l=W0.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+a}}function rN(){return[MD(),VD(),aj(),Vj(),Qj()]}function oN(e){return{extensions:[DD(),KD(),sj(),Xj(e),eN()]}}const iN={tokenize:fN,partial:!0},G0={tokenize:dN,partial:!0},Z0={tokenize:pN,partial:!0},Y0={tokenize:hN,partial:!0},aN={tokenize:mN,partial:!0},J0={tokenize:cN,previous:Q0},X0={tokenize:uN,previous:ew},xr={tokenize:lN,previous:tw},er={};function sN(){return{text:er}}let Oo=48;for(;Oo<123;)er[Oo]=xr,Oo++,Oo===58?Oo=65:Oo===91&&(Oo=97);er[43]=xr,er[45]=xr,er[46]=xr,er[95]=xr,er[72]=[xr,X0],er[104]=[xr,X0],er[87]=[xr,J0],er[119]=[xr,J0];function lN(e,t,n){const r=this;let o,i;return a;function a(f){return!ad(f)||!tw.call(r,r.previous)||sd(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return ad(f)?(e.consume(f),s):f===64?(e.consume(f),l):n(f)}function l(f){return f===46?e.check(aN,u,c)(f):f===45||f===95||Kt(f)?(i=!0,e.consume(f),l):u(f)}function c(f){return e.consume(f),o=!0,l}function u(f){return i&&o&&nn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function cN(e,t,n){const r=this;return o;function o(a){return a!==87&&a!==119||!Q0.call(r,r.previous)||sd(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(iN,e.attempt(G0,e.attempt(Z0,i),n),n)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function uN(e,t,n){const r=this;let o="",i=!1;return a;function a(f){return(f===72||f===104)&&ew.call(r,r.previous)&&!sd(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if(nn(f)&&o.length<5)return o+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const p=o.toLowerCase();if(p==="http"||p==="https")return e.consume(f),l}return n(f)}function l(f){return f===47?(e.consume(f),i?c:(i=!0,l)):n(f)}function c(f){return f===null||Us(f)||at(f)||$o(f)||zs(f)?n(f):e.attempt(G0,e.attempt(Z0,u),n)(f)}function u(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function fN(e,t,n){let r=0;return o;function o(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),o):a===46&&r===3?(e.consume(a),i):n(a)}function i(a){return a===null?n(a):t(a)}}function dN(e,t,n){let r,o,i;return a;function a(c){return c===46||c===95?e.check(Y0,l,s)(c):c===null||at(c)||$o(c)||c!==45&&zs(c)?l(c):(i=!0,e.consume(c),a)}function s(c){return c===95?r=!0:(o=r,r=void 0),e.consume(c),a}function l(c){return o||r||!i?n(c):t(c)}}function pN(e,t){let n=0,r=0;return o;function o(a){return a===40?(n++,e.consume(a),o):a===41&&r<n?i(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(Y0,t,i)(a):a===null||at(a)||$o(a)?t(a):(e.consume(a),o)}function i(a){return a===41&&r++,e.consume(a),o}}function hN(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),i):s===93?(e.consume(s),o):s===60||s===null||at(s)||$o(s)?t(s):n(s)}function o(s){return s===null||s===40||s===91||at(s)||$o(s)?t(s):r(s)}function i(s){return nn(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):nn(s)?(e.consume(s),a):n(s)}}function mN(e,t,n){return r;function r(i){return e.consume(i),o}function o(i){return Kt(i)?n(i):t(i)}}function Q0(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||at(e)}function ew(e){return!nn(e)}function tw(e){return!(e===47||ad(e))}function ad(e){return e===43||e===45||e===46||e===95||Kt(e)}function sd(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 vN={tokenize:$N,partial:!0};function yN(){return{document:{91:{tokenize:xN,continuation:{tokenize:SN},exit:EN}},text:{91:{tokenize:wN},93:{add:"after",tokenize:gN,resolveTo:bN}}}}function gN(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const l=r.events[o][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!a||!a._balanced)return n(l);const c=Nn(r.sliceSerialize({start:a.end,end:r.now()}));return c.codePointAt(0)!==94||!i.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function bN(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)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function wN(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,a;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),l}function l(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(f){if(i>999||f===93&&!a||f===null||f===91||at(f))return n(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return o.includes(Nn(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return at(f)||(a=!0),i++,e.consume(f),f===92?u:c}function u(f){return f===91||f===92||f===93?(e.consume(f),i++,c):c(f)}}function xN(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0,s;return l;function l(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(h)}function u(h){if(a>999||h===93&&!s||h===null||h===91||at(h))return n(h);if(h===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return i=Nn(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return at(h)||(s=!0),a++,e.consume(h),h===92?f:u}function f(h){return h===91||h===92||h===93?(e.consume(h),a++,u):u(h)}function p(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),o.includes(i)||o.push(i),He(e,d,"gfmFootnoteDefinitionWhitespace")):n(h)}function d(h){return t(h)}}function SN(e,t,n){return e.check(da,t,e.attempt(vN,t,n))}function EN(e){e.exit("gfmFootnoteDefinition")}function $N(e,t,n){const r=this;return He(e,o,"gfmFootnoteDefinitionIndent",4+1);function o(i){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(i):n(i)}}function ON(e){let n=(e||{}).singleTilde;const r={tokenize:i,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(a,s){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let c=l;for(;c--;)if(a[c][0]==="exit"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[c][1].end.offset-a[c][1].start.offset){a[l][1].type="strikethroughSequence",a[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[l][1].end)},f={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[l][1].start)},p=[["enter",u,s],["enter",a[c][1],s],["exit",a[c][1],s],["enter",f,s]],d=s.parser.constructs.insideSpan.null;d&&hn(p,p.length,0,qs(d,a.slice(c+1,l),s)),hn(p,p.length,0,[["exit",f,s],["enter",a[l][1],s],["exit",a[l][1],s],["exit",u,s]]),hn(a,c-1,l-c+3,p),l=c+p.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function i(a,s,l){const c=this.previous,u=this.events;let f=0;return p;function p(h){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(h):(a.enter("strikethroughSequenceTemporary"),d(h))}function d(h){const m=Hs(c);if(h===126)return f>1?l(h):(a.consume(h),f++,d);if(f<2&&!n)return l(h);const y=a.exit("strikethroughSequenceTemporary"),v=Hs(h);return y._open=!v||v===2&&!!m,y._close=!m||m===2&&!!v,s(h)}}}class kN{constructor(){this.map=[]}add(t,n,r){_N(this,t,n,r)}consume(t){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let o=r.pop();for(;o;)t.push(...o),o=r.pop();this.map.length=0}}function _N(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function TN(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function CN(){return{flow:{null:{tokenize:IN,resolveAll:AN}}}}function IN(e,t,n){const r=this;let o=0,i=0,a;return s;function s(T){let M=r.events.length-1;for(;M>-1;){const A=r.events[M][1].type;if(A==="lineEnding"||A==="linePrefix")M--;else break}const q=M>-1?r.events[M][1].type:null,B=q==="tableHead"||q==="tableRow"?$:l;return B===$&&r.parser.lazy[r.now().line]?n(T):B(T)}function l(T){return e.enter("tableHead"),e.enter("tableRow"),c(T)}function c(T){return T===124||(a=!0,i+=1),u(T)}function u(T){return T===null?n(T):$e(T)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),d):n(T):Fe(T)?He(e,u,"whitespace")(T):(i+=1,a&&(a=!1,o+=1),T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),a=!0,u):(e.enter("data"),f(T)))}function f(T){return T===null||T===124||at(T)?(e.exit("data"),u(T)):(e.consume(T),T===92?p:f)}function p(T){return T===92||T===124?(e.consume(T),f):f(T)}function d(T){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(T):(e.enter("tableDelimiterRow"),a=!1,Fe(T)?He(e,h,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):h(T))}function h(T){return T===45||T===58?y(T):T===124?(a=!0,e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),m):S(T)}function m(T){return Fe(T)?He(e,y,"whitespace")(T):y(T)}function y(T){return T===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),v):T===45?(i+=1,v(T)):T===null||$e(T)?k(T):S(T)}function v(T){return T===45?(e.enter("tableDelimiterFiller"),g(T)):S(T)}function g(T){return T===45?(e.consume(T),g):T===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(T))}function b(T){return Fe(T)?He(e,k,"whitespace")(T):k(T)}function k(T){return T===124?h(T):T===null||$e(T)?!a||o!==i?S(T):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(T)):S(T)}function S(T){return n(T)}function $(T){return e.enter("tableRow"),C(T)}function C(T){return T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),C):T===null||$e(T)?(e.exit("tableRow"),t(T)):Fe(T)?He(e,C,"whitespace")(T):(e.enter("data"),P(T))}function P(T){return T===null||T===124||at(T)?(e.exit("data"),C(T)):(e.consume(T),T===92?F:P)}function F(T){return T===92||T===124?(e.consume(T),P):P(T)}}function AN(e,t){let n=-1,r=!0,o=0,i=[0,0,0,0],a=[0,0,0,0],s=!1,l=0,c,u,f;const p=new kN;for(;++n<e.length;){const d=e[n],h=d[1];d[0]==="enter"?h.type==="tableHead"?(s=!1,l!==0&&(nw(p,t,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(n,0,[["enter",c,t]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(r=!0,f=void 0,i=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,u={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(n,0,[["enter",u,t]])),o=h.type==="tableDelimiterRow"?2:u?3:1):o&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(i[1]!==0&&(a[0]=a[1],f=nl(p,t,i,o,void 0,f),i=[0,0,0,0]),a[2]=n)):h.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(a[0]=a[1],f=nl(p,t,i,o,void 0,f)),i=a,a=[i[1],n,0,0])):h.type==="tableHead"?(s=!0,l=n):h.type==="tableRow"||h.type==="tableDelimiterRow"?(l=n,i[1]!==0?(a[0]=a[1],f=nl(p,t,i,o,n,f)):a[1]!==0&&(f=nl(p,t,a,o,n,f)),o=0):o&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&nw(p,t,l,c,u),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=TN(t.events,n))}return e}function nl(e,t,n,r,o,i){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(i.end=Object.assign({},Qo(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const l=Qo(t.events,n[1]);if(i={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const c=Qo(t.events,n[2]),u=Qo(t.events,n[3]),f={type:s,start:Object.assign({},c),end:Object.assign({},u)};if(e.add(n[2],0,[["enter",f,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 h=n[2]+1,m=n[3]-n[2]-1;e.add(h,m,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return o!==void 0&&(i.end=Object.assign({},Qo(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function nw(e,t,n,r,o){const i=[],a=Qo(t.events,n);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function Qo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const PN={tokenize:MN};function RN(){return{text:{91:PN}}}function MN(e,t,n){const r=this;return o;function o(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),i)}function i(l){return at(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return $e(l)?t(l):Fe(l)?e.check({tokenize:DN},t,n)(l):n(l)}}function DN(e,t,n){return He(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function jN(e){return Ab([sN(),yN(),ON(e),CN(),RN()])}const NN={};function LN(e){const t=this,n=e||NN,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(jN(n)),i.push(rN()),a.push(oN(n))}const st={container:{className:"bpReset bpContainer"},modal:{container:{className:"bpReset bpModalContainer"},overlay:{className:"bpModalOverlay"},dialog:{container:{className:"bpReset bpModalDialogContainer"},title:{container:{className:"bpReset bpModalDialogTitleContainer"},text:{className:"bpModalDialogTitleText"},closeIcon:{className:"bpModalDialogTitleCloseIcon"}},content:{className:"bpModalDialogContent"},newConversation:{button:{className:"bpModalDialogNewConversationButton"},text:{className:"bpModalDialogNewConversationText"}}}},fab:{container:{className:"bpReset bpFabContainer"},icon:{className:"bpFabIcon"}},notification:{container:{className:"bpReset bpNotificationContainer"},title:{className:"bpNotificationTitle"},description:{className:"bpNotificationDescription"},icon:{className:"bpNotificationIcon"},closeIcon:{className:"bpNotificationCloseIcon"}},header:{container:{className:"bpReset bpHeaderContainer"},content:{container:{className:"bpReset bpHeaderContentContainer"},title:{className:"bpHeaderContentTitle"},description:{className:"bpHeaderContentDescription"},avatar:{container:{className:"bpReset bpHeaderContentAvatarContainer"},image:{className:"bpHeaderContentAvatarImage"},fallback:{className:"bpHeaderContentAvatarFallback"}},actions:{container:{className:"bpReset bpHeaderContentActionsContainer"},icons:{className:"bpHeaderContentActionsIcons"}}},expandedContent:{container:{className:"bpReset bpHeaderExpandedContentContainer"},descriptionItems:{container:{className:"bpReset bpHeaderExpandedContentDescriptionItemsContainer"},icon:{className:"bpHeaderExpandedContentDescriptionItemsIcon"},text:{className:"bpHeaderExpandedContentDescriptionItemsText"},link:{className:"bpHeaderExpandedContentDescriptionItemsLink"}},group:{className:"bpHeaderExpandedContentGroup"}},newConversationIcon:{className:"bpHeaderNewConversationIcon"}},composer:{container:{className:"bpReset bpComposerContainer"},poweredBy:{className:"bpComposerPoweredBy"},input:{className:"bpComposerInput"},button:{container:{className:"bpReset bpComposerButtonContainer"},icon:{className:"bpComposerButtonIcon"}},uploadButton:{icon:{className:"bpComposerUploadButtonIcon"},container:{className:"bpReset bpComposerUploadButtonContainer"}},voiceButton:{icon:{className:"bpComposerVoiceButtonIcon"},container:{className:"bpReset bpComposerVoiceButtonContainer"}}},messageList:{scrollDownButton:{container:{className:"bpReset bpMessageListScrollDownButtonContainer"},button:{className:"bpMessageListScrollDownButtonButton"},icon:{className:"bpMessageListScrollDownButtonIcon"}},container:{className:"bpReset bpMessageListContainer"},viewPort:{className:"bpMessageListViewport"},marquee:{container:{className:"bpReset bpMessageListMarqueeContainer"},content:{className:"bpMessageListMarqueeContent"},title:{className:"bpMessageListMarqueeTitle"},description:{className:"bpMessageListMarqueeDescription"},avatar:{container:{className:"bpReset bpMessageListMarqueeAvatarContainer"},image:{className:"bpMessageListMarqueeAvatarImage"},fallback:{className:"bpMessageListMarqueeAvatarFallback"}}},headerMessage:{className:"bpMessageListHeaderMessage"}},message:{container:{className:"bpReset bpMessageContainer"},avatar:{container:{className:"bpReset bpMessageAvatarContainer"},image:{className:"bpMessageAvatarImage"},fallback:{className:"bpMessageAvatarFallback"}},blocks:{text:{heading1:{className:"bpMessageBlocksTextHeading1"},heading2:{className:"bpMessageBlocksTextHeading2"},heading3:{className:"bpMessageBlocksTextHeading3"},unorderedList:{className:"bpMessageBlocksTextUnorderedList"},orderedList:{className:"bpMessageBlocksTextOrderedList"},link:{className:"bpMessageBlocksTextLink"},italic:{className:"bpMessageBlocksTextItalic"},bold:{className:"bpMessageBlocksTextBold"},text:{className:"bpMessageBlocksTextText"},horizontalRule:{className:"bpMessageBlocksTextHorizontalRule"},listItem:{className:"bpMessageBlocksTextListItem"},lineBreak:{className:"bpMessageBlocksTextLineBreak"},pre:{className:"bpMessageBlocksTextPre"}},audio:{className:"bpMessageBlocksAudio"},image:{image:{className:"bpMessageBlocksImageImage"},placeholder:{className:"bpMessageBlocksImagePlaceholder"}},video:{className:"bpMessageBlocksVideo"},location:{container:{className:"bpMessageBlocksLocationContainer"},title:{className:"bpMessageBlocksLocationTitle"},icon:{className:"bpMessageBlocksLocationIcon"}},file:{container:{className:"bpMessageBlocksFileContainer"},title:{className:"bpMessageBlocksFileTitle"},icon:{className:"bpMessageBlocksFileIcon"}},row:{className:"bpMessageBlocksRow"},column:{className:"bpMessageBlocksColumn"},bubble:{className:"bpMessageBlocksBubble"},carousel:{container:{className:"bpMessageBlocksCarouselContainer"},slidesContainer:{className:"bpMessageBlocksCarouselSlidesContainer"},backButton:{className:"bpMessageBlocksCarouselBackButton"},nextButton:{className:"bpMessageBlocksCarouselNextButton"}},dropdown:{button:{container:{className:"bpMessageBlocksDropdownButtonContainer"},text:{className:"bpMessageBlocksDropdownButtonText"},icon:{className:"bpMessageBlocksDropdownButtonIcon"}},content:{container:{className:"bpMessageBlocksDropdownContentContainer"},item:{className:"bpMessageBlocksDropdownContentItem"}}},button:{className:"bpMessageBlocksButton"}}},typingIndicator:{container:{className:"bpTypingIndicatorContainer"},loader:{className:"bpTypingIndicatorLoader"}}},FN=({text:e})=>{const{message:{blocks:{text:t}}}=st,n={h1:({node:r,...o})=>L.jsx("h1",{...o,...t==null?void 0:t.heading1}),h2:({node:r,...o})=>L.jsx("h2",{...o,...t==null?void 0:t.heading2}),h3:({node:r,...o})=>L.jsx("h3",{...o,...t==null?void 0:t.heading3}),h4:"h3",h5:"h3",h6:"h3",em:({node:r,...o})=>L.jsx("em",{...o,...t==null?void 0:t.italic}),strong:({node:r,...o})=>L.jsx("strong",{...o,...t==null?void 0:t.bold}),p:({node:r,...o})=>L.jsx("p",{...o,...t==null?void 0:t.text}),hr:({node:r,...o})=>L.jsx("hr",{...o,...t==null?void 0:t.horizontalRule}),a:({node:r,...o})=>L.jsx("a",{...o,...t==null?void 0:t.link,target:"_blank"}),ol:({node:r,...o})=>L.jsx("ol",{...o,...t==null?void 0:t.orderedList}),ul:({node:r,...o})=>L.jsx("ul",{...o,...t==null?void 0:t.unorderedList}),li:({node:r,...o})=>L.jsx("li",{...o,...t==null?void 0:t.listItem}),br:({node:r,...o})=>L.jsx("br",{...o,...t==null?void 0:t.lineBreak}),pre:({node:r,...o})=>L.jsx("pre",{...o,...t==null?void 0:t.pre})};return L.jsx(OD,{components:n,remarkPlugins:[LN,RD],children:e})};function rw(e,t){return function(){return e.apply(t,arguments)}}const{toString:ow}=Object.prototype,{getPrototypeOf:ld}=Object,cd=(e=>t=>{const n=ow.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Sr=e=>(e=e.toLowerCase(),t=>cd(t)===e),rl=e=>t=>typeof t===e,{isArray:ei}=Array,va=rl("undefined");function BN(e){return e!==null&&!va(e)&&e.constructor!==null&&!va(e.constructor)&&ko(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const iw=Sr("ArrayBuffer");function UN(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&iw(e.buffer),t}const zN=rl("string"),ko=rl("function"),aw=rl("number"),ud=e=>e!==null&&typeof e=="object",HN=e=>e===!0||e===!1,ol=e=>{if(cd(e)!=="object")return!1;const t=ld(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},qN=Sr("Date"),WN=Sr("File"),VN=Sr("Blob"),KN=Sr("FileList"),GN=e=>ud(e)&&ko(e.pipe),ZN=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||ow.call(e)===t||ko(e.toString)&&e.toString()===t)},YN=Sr("URLSearchParams"),JN=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ya(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),ei(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let s;for(r=0;r<a;r++)s=i[r],t.call(null,e[s],s,e)}}function sw(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const lw=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),cw=e=>!va(e)&&e!==lw;function fd(){const{caseless:e}=cw(this)&&this||{},t={},n=(r,o)=>{const i=e&&sw(t,o)||o;ol(t[i])&&ol(r)?t[i]=fd(t[i],r):ol(r)?t[i]=fd({},r):ei(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&ya(arguments[r],n);return t}const XN=(e,t,n,{allOwnKeys:r}={})=>(ya(t,(o,i)=>{n&&ko(o)?e[i]=rw(o,n):e[i]=o},{allOwnKeys:r}),e),QN=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),eL=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},tL=(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&ld(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},nL=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},rL=e=>{if(!e)return null;if(ei(e))return e;let t=e.length;if(!aw(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},oL=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ld(Uint8Array)),iL=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},aL=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},sL=Sr("HTMLFormElement"),lL=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),uw=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),cL=Sr("RegExp"),fw=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ya(n,(o,i)=>{t(o,i,e)!==!1&&(r[i]=o)}),Object.defineProperties(e,r)},Y={isArray:ei,isArrayBuffer:iw,isBuffer:BN,isFormData:ZN,isArrayBufferView:UN,isString:zN,isNumber:aw,isBoolean:HN,isObject:ud,isPlainObject:ol,isUndefined:va,isDate:qN,isFile:WN,isBlob:VN,isRegExp:cL,isFunction:ko,isStream:GN,isURLSearchParams:YN,isTypedArray:oL,isFileList:KN,forEach:ya,merge:fd,extend:XN,trim:JN,stripBOM:QN,inherits:eL,toFlatObject:tL,kindOf:cd,kindOfTest:Sr,endsWith:nL,toArray:rL,forEachEntry:iL,matchAll:aL,isHTMLForm:sL,hasOwnProperty:uw,hasOwnProp:uw,reduceDescriptors:fw,freezeMethods:e=>{fw(e,(t,n)=>{if(ko(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(ko(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},toObjectSet:(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return ei(e)?r(e):r(String(e).split(t)),n},toCamelCase:lL,noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:sw,global:lw,isContextDefined:cw,toJSONObject:e=>{const t=new Array(10),n=(r,o)=>{if(ud(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=ei(r)?[]:{};return ya(r,(a,s)=>{const l=n(a,o+1);!va(l)&&(i[s]=l)}),t[o]=void 0,i}}return r};return n(e,0)}};function Ve(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}Y.inherits(Ve,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Y.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const dw=Ve.prototype,pw={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{pw[e]={value:e}}),Object.defineProperties(Ve,pw),Object.defineProperty(dw,"isAxiosError",{value:!0}),Ve.from=(e,t,n,r,o,i)=>{const a=Object.create(dw);return Y.toFlatObject(e,a,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),Ve.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};var uL=typeof self=="object"?self.FormData:window.FormData;const fL=Le(uL);function dd(e){return Y.isPlainObject(e)||Y.isArray(e)}function hw(e){return Y.endsWith(e,"[]")?e.slice(0,-2):e}function mw(e,t,n){return e?e.concat(t).map(function(o,i){return o=hw(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function dL(e){return Y.isArray(e)&&!e.some(dd)}const pL=Y.toFlatObject(Y,{},null,function(t){return/^is[A-Z]/.test(t)});function hL(e){return e&&Y.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function il(e,t,n){if(!Y.isObject(e))throw new TypeError("target must be an object");t=t||new(fL||FormData),n=Y.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!Y.isUndefined(y[m])});const r=n.metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&hL(t);if(!Y.isFunction(o))throw new TypeError("visitor must be a function");function c(h){if(h===null)return"";if(Y.isDate(h))return h.toISOString();if(!l&&Y.isBlob(h))throw new Ve("Blob is not supported. Use a Buffer instead.");return Y.isArrayBuffer(h)||Y.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,m,y){let v=h;if(h&&!y&&typeof h=="object"){if(Y.endsWith(m,"{}"))m=r?m:m.slice(0,-2),h=JSON.stringify(h);else if(Y.isArray(h)&&dL(h)||Y.isFileList(h)||Y.endsWith(m,"[]")&&(v=Y.toArray(h)))return m=hw(m),v.forEach(function(b,k){!(Y.isUndefined(b)||b===null)&&t.append(a===!0?mw([m],k,i):a===null?m:m+"[]",c(b))}),!1}return dd(h)?!0:(t.append(mw(y,m,i),c(h)),!1)}const f=[],p=Object.assign(pL,{defaultVisitor:u,convertValue:c,isVisitable:dd});function d(h,m){if(!Y.isUndefined(h)){if(f.indexOf(h)!==-1)throw Error("Circular reference detected in "+m.join("."));f.push(h),Y.forEach(h,function(v,g){(!(Y.isUndefined(v)||v===null)&&o.call(t,v,Y.isString(g)?g.trim():g,m,p))===!0&&d(v,m?m.concat(g):[g])}),f.pop()}}if(!Y.isObject(e))throw new TypeError("data must be an object");return d(e),t}function vw(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function pd(e,t){this._pairs=[],e&&il(e,this,t)}const yw=pd.prototype;yw.append=function(t,n){this._pairs.push([t,n])},yw.toString=function(t){const n=t?function(r){return t.call(this,r,vw)}:vw;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function mL(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function gw(e,t,n){if(!t)return e;const r=n&&n.encode||mL,o=n&&n.serialize;let i;if(o?i=o(t,n):i=Y.isURLSearchParams(t)?t.toString():new pd(t,n).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class vL{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Y.forEach(this.handlers,function(r){r!==null&&t(r)})}}const bw=vL,ww={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},yL=typeof URLSearchParams<"u"?URLSearchParams:pd,gL=FormData,bL=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),wL=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),tr={isBrowser:!0,classes:{URLSearchParams:yL,FormData:gL,Blob},isStandardBrowserEnv:bL,isStandardBrowserWebWorkerEnv:wL,protocols:["http","https","file","blob","url","data"]};function xL(e,t){return il(e,new tr.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return tr.isNode&&Y.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function SL(e){return Y.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function EL(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}function xw(e){function t(n,r,o,i){let a=n[i++];const s=Number.isFinite(+a),l=i>=n.length;return a=!a&&Y.isArray(o)?o.length:a,l?(Y.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!s):((!o[a]||!Y.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],i)&&Y.isArray(o[a])&&(o[a]=EL(o[a])),!s)}if(Y.isFormData(e)&&Y.isFunction(e.entries)){const n={};return Y.forEachEntry(e,(r,o)=>{t(SL(r),o,n,0)}),n}return null}const $L={"Content-Type":void 0};function OL(e,t,n){if(Y.isString(e))try{return(t||JSON.parse)(e),Y.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const al={transitional:ww,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=Y.isObject(t);if(i&&Y.isHTMLForm(t)&&(t=new FormData(t)),Y.isFormData(t))return o&&o?JSON.stringify(xw(t)):t;if(Y.isArrayBuffer(t)||Y.isBuffer(t)||Y.isStream(t)||Y.isFile(t)||Y.isBlob(t))return t;if(Y.isArrayBufferView(t))return t.buffer;if(Y.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return xL(t,this.formSerializer).toString();if((s=Y.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return il(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),OL(t)):t}],transformResponse:[function(t){const n=this.transitional||al.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(t&&Y.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?Ve.from(s,Ve.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:tr.classes.FormData,Blob:tr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Y.forEach(["delete","get","head"],function(t){al.headers[t]={}}),Y.forEach(["post","put","patch"],function(t){al.headers[t]=Y.merge($L)});const hd=al,kL=Y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),_L=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
55
55
|
`).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&kL[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Sw=Symbol("internals");function ga(e){return e&&String(e).trim().toLowerCase()}function sl(e){return e===!1||e==null?e:Y.isArray(e)?e.map(sl):String(e)}function TL(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}function CL(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function Ew(e,t,n,r){if(Y.isFunction(r))return r.call(this,t,n);if(Y.isString(t)){if(Y.isString(r))return t.indexOf(r)!==-1;if(Y.isRegExp(r))return r.test(t)}}function IL(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function AL(e,t){const n=Y.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,a){return this[r].call(this,t,o,i,a)},configurable:!0})})}class ll{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(s,l,c){const u=ga(l);if(!u)throw new Error("header name must be a non-empty string");const f=Y.findKey(o,u);(!f||o[f]===void 0||c===!0||c===void 0&&o[f]!==!1)&&(o[f||l]=sl(s))}const a=(s,l)=>Y.forEach(s,(c,u)=>i(c,u,l));return Y.isPlainObject(t)||t instanceof this.constructor?a(t,n):Y.isString(t)&&(t=t.trim())&&!CL(t)?a(_L(t),n):t!=null&&i(n,t,r),this}get(t,n){if(t=ga(t),t){const r=Y.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return TL(o);if(Y.isFunction(n))return n.call(this,o,r);if(Y.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ga(t),t){const r=Y.findKey(this,t);return!!(r&&(!n||Ew(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(a){if(a=ga(a),a){const s=Y.findKey(r,a);s&&(!n||Ew(r,r[s],s,n))&&(delete r[s],o=!0)}}return Y.isArray(t)?t.forEach(i):i(t),o}clear(){return Object.keys(this).forEach(this.delete.bind(this))}normalize(t){const n=this,r={};return Y.forEach(this,(o,i)=>{const a=Y.findKey(r,i);if(a){n[a]=sl(o),delete n[i];return}const s=t?IL(i):String(i).trim();s!==i&&delete n[i],n[s]=sl(o),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Y.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&Y.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
56
56
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Sw]=this[Sw]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=ga(a);r[s]||(AL(o,a),r[s]=!0)}return Y.isArray(t)?t.forEach(i):i(t),this}}ll.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),Y.freezeMethods(ll.prototype),Y.freezeMethods(ll);const Er=ll;function md(e,t){const n=this||hd,r=t||n,o=Er.from(r.headers);let i=r.data;return Y.forEach(e,function(s){i=s.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function $w(e){return!!(e&&e.__CANCEL__)}function ba(e,t,n){Ve.call(this,e??"canceled",Ve.ERR_CANCELED,t,n),this.name="CanceledError"}Y.inherits(ba,Ve,{__CANCEL__:!0});const PL=null;function RL(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ve("Request failed with status code "+n.status,[Ve.ERR_BAD_REQUEST,Ve.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const ML=tr.isStandardBrowserEnv?function(){return{write:function(n,r,o,i,a,s){const l=[];l.push(n+"="+encodeURIComponent(r)),Y.isNumber(o)&&l.push("expires="+new Date(o).toGMTString()),Y.isString(i)&&l.push("path="+i),Y.isString(a)&&l.push("domain="+a),s===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function DL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function jL(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Ow(e,t){return e&&!DL(t)?jL(e,t):t}const NL=tr.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(i){let a=i;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(a){const s=Y.isString(a)?o(a):a;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function LL(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function FL(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[i];a||(a=c),n[o]=l,r[o]=c;let f=i,p=0;for(;f!==o;)p+=n[f++],f=f%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),c-a<t)return;const d=u&&c-u;return d?Math.round(p*1e3/d):void 0}}function kw(e,t){let n=0;const r=FL(50,250);return o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-n,l=r(s),c=i<=a;n=i;const u={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&c?(a-i)/l:void 0,event:o};u[t?"download":"upload"]=!0,e(u)}}const cl={http:PL,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let o=e.data;const i=Er.from(e.headers).normalize(),a=e.responseType;let s;function l(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}Y.isFormData(o)&&(tr.isStandardBrowserEnv||tr.isStandardBrowserWebWorkerEnv)&&i.setContentType(!1);let c=new XMLHttpRequest;if(e.auth){const d=e.auth.username||"",h=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(d+":"+h))}const u=Ow(e.baseURL,e.url);c.open(e.method.toUpperCase(),gw(u,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function f(){if(!c)return;const d=Er.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),m={data:!a||a==="text"||a==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:d,config:e,request:c};RL(function(v){n(v),l()},function(v){r(v),l()},m),c=null}if("onloadend"in c?c.onloadend=f:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(f)},c.onabort=function(){c&&(r(new Ve("Request aborted",Ve.ECONNABORTED,e,c)),c=null)},c.onerror=function(){r(new Ve("Network Error",Ve.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let h=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const m=e.transitional||ww;e.timeoutErrorMessage&&(h=e.timeoutErrorMessage),r(new Ve(h,m.clarifyTimeoutError?Ve.ETIMEDOUT:Ve.ECONNABORTED,e,c)),c=null},tr.isStandardBrowserEnv){const d=(e.withCredentials||NL(u))&&e.xsrfCookieName&&ML.read(e.xsrfCookieName);d&&i.set(e.xsrfHeaderName,d)}o===void 0&&i.setContentType(null),"setRequestHeader"in c&&Y.forEach(i.toJSON(),function(h,m){c.setRequestHeader(m,h)}),Y.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),a&&a!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",kw(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",kw(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=d=>{c&&(r(!d||d.type?new ba(null,e,c):d),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const p=LL(u);if(p&&tr.protocols.indexOf(p)===-1){r(new Ve("Unsupported protocol "+p+":",Ve.ERR_BAD_REQUEST,e));return}c.send(o||null)})}};Y.forEach(cl,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const BL={getAdapter:e=>{e=Y.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let o=0;o<t&&(n=e[o],!(r=Y.isString(n)?cl[n.toLowerCase()]:n));o++);if(!r)throw r===!1?new Ve(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(Y.hasOwnProp(cl,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!Y.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:cl};function vd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ba(null,e)}function _w(e){return vd(e),e.headers=Er.from(e.headers),e.data=md.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),BL.getAdapter(e.adapter||hd.adapter)(e).then(function(r){return vd(e),r.data=md.call(e,e.transformResponse,r),r.headers=Er.from(r.headers),r},function(r){return $w(r)||(vd(e),r&&r.response&&(r.response.data=md.call(e,e.transformResponse,r.response),r.response.headers=Er.from(r.response.headers))),Promise.reject(r)})}const Tw=e=>e instanceof Er?e.toJSON():e;function ti(e,t){t=t||{};const n={};function r(c,u,f){return Y.isPlainObject(c)&&Y.isPlainObject(u)?Y.merge.call({caseless:f},c,u):Y.isPlainObject(u)?Y.merge({},u):Y.isArray(u)?u.slice():u}function o(c,u,f){if(Y.isUndefined(u)){if(!Y.isUndefined(c))return r(void 0,c,f)}else return r(c,u,f)}function i(c,u){if(!Y.isUndefined(u))return r(void 0,u)}function a(c,u){if(Y.isUndefined(u)){if(!Y.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function s(c,u,f){if(f in t)return r(c,u);if(f in e)return r(void 0,c)}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(c,u)=>o(Tw(c),Tw(u),!0)};return Y.forEach(Object.keys(e).concat(Object.keys(t)),function(u){const f=l[u]||o,p=f(e[u],t[u],u);Y.isUndefined(p)&&f!==s||(n[u]=p)}),n}const Cw="1.2.5",yd={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{yd[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Iw={};yd.transitional=function(t,n,r){function o(i,a){return"[Axios v"+Cw+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,s)=>{if(t===!1)throw new Ve(o(a," has been removed"+(n?" in "+n:"")),Ve.ERR_DEPRECATED);return n&&!Iw[a]&&(Iw[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,s):!0}};function UL(e,t,n){if(typeof e!="object")throw new Ve("options must be an object",Ve.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const s=e[i],l=s===void 0||a(s,i,e);if(l!==!0)throw new Ve("option "+i+" must be "+l,Ve.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ve("Unknown option "+i,Ve.ERR_BAD_OPTION)}}const gd={assertOptions:UL,validators:yd},Zr=gd.validators;class ul{constructor(t){this.defaults=t,this.interceptors={request:new bw,response:new bw}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ti(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&gd.assertOptions(r,{silentJSONParsing:Zr.transitional(Zr.boolean),forcedJSONParsing:Zr.transitional(Zr.boolean),clarifyTimeoutError:Zr.transitional(Zr.boolean)},!1),o!==void 0&&gd.assertOptions(o,{encode:Zr.function,serialize:Zr.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a;a=i&&Y.merge(i.common,i[n.method]),a&&Y.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),n.headers=Er.concat(a,i);const s=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,f=0,p;if(!l){const h=[_w.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,c),p=h.length,u=Promise.resolve(n);f<p;)u=u.then(h[f++],h[f++]);return u}p=s.length;let d=n;for(f=0;f<p;){const h=s[f++],m=s[f++];try{d=h(d)}catch(y){m.call(this,y);break}}try{u=_w.call(this,d)}catch(h){return Promise.reject(h)}for(f=0,p=c.length;f<p;)u=u.then(c[f++],c[f++]);return u}getUri(t){t=ti(this.defaults,t);const n=Ow(t.baseURL,t.url);return gw(n,t.params,t.paramsSerializer)}}Y.forEach(["delete","get","head","options"],function(t){ul.prototype[t]=function(n,r){return this.request(ti(r||{},{method:t,url:n,data:(r||{}).data}))}}),Y.forEach(["post","put","patch"],function(t){function n(r){return function(i,a,s){return this.request(ti(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}ul.prototype[t]=n(),ul.prototype[t+"Form"]=n(!0)});const fl=ul;class bd{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{r.subscribe(s),i=s}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,s){r.reason||(r.reason=new ba(i,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new bd(function(o){t=o}),cancel:t}}}const zL=bd;function HL(e){return function(n){return e.apply(null,n)}}function qL(e){return Y.isObject(e)&&e.isAxiosError===!0}const wd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(wd).forEach(([e,t])=>{wd[t]=e});const WL=wd;function Aw(e){const t=new fl(e),n=rw(fl.prototype.request,t);return Y.extend(n,fl.prototype,t,{allOwnKeys:!0}),Y.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Aw(ti(e,o))},n}const _t=Aw(hd);_t.Axios=fl,_t.CanceledError=ba,_t.CancelToken=zL,_t.isCancel=$w,_t.VERSION=Cw,_t.toFormData=il,_t.AxiosError=Ve,_t.Cancel=_t.CanceledError,_t.all=function(t){return Promise.all(t)},_t.spread=HL,_t.isAxiosError=qL,_t.mergeConfig=ti,_t.AxiosHeaders=Er,_t.formToJSON=e=>xw(Y.isHTMLForm(e)?new FormData(e):e),_t.HttpStatusCode=WL,_t.default=_t;const Pw=_t,Rw={},VL=Object.freeze(Object.defineProperty({__proto__:null,default:Rw},Symbol.toStringTag,{value:"Module"})),KL={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))};let xd=typeof window<"u"&&typeof window.document<"u"?window.crypto:Rw;xd.getRandomValues||(xd=KL);class lt extends Error{constructor(n,r,o,i,a,s){super(i);we(this,"isApiError",!0);this.code=n,this.description=r,this.type=o,this.message=i,this.error=a,this.id=s,this.id||(this.id=lt.generateId())}format(){return`[${this.type}] ${this.message} (Error ID: ${this.id})`}toJSON(){return{id:this.id,code:this.code,type:this.type,message:this.message}}static generateId(){const n=this.getPrefix(),r=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],o=4,i=Array.from(xd.getRandomValues(new Uint8Array(o))).map(a=>a.toString(16).padStart(2,"0")).join("").toUpperCase();return`${n}_${r}x${i}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}}const GL=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,Sd=e=>e instanceof lt||GL(e)&&e.isApiError===!0;class wa extends lt{constructor(t,n,r){super(500,"An unknown error occurred","Unknown",t,n,r)}}class ZL extends lt{constructor(t,n,r){super(500,"An internal error occurred","Internal",t,n,r)}}class YL extends lt{constructor(t,n,r){super(401,"The request requires to be authenticated.","Unauthorized",t,n,r)}}class JL extends lt{constructor(t,n,r){super(403,"The requested action can't be peform by this resource.","Forbidden",t,n,r)}}class XL extends lt{constructor(t,n,r){super(413,"The request payload is too large.","PayloadTooLarge",t,n,r)}}class QL extends lt{constructor(t,n,r){super(400,"The request payload is invalid.","InvalidPayload",t,n,r)}}class e5 extends lt{constructor(t,n,r){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",t,n,r)}}class t5 extends lt{constructor(t,n,r){super(405,"The requested method does not exist.","MethodNotFound",t,n,r)}}class n5 extends lt{constructor(t,n,r){super(404,"The requested resource does not exist.","ResourceNotFound",t,n,r)}}class r5 extends lt{constructor(t,n,r){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",t,n,r)}}class o5 extends lt{constructor(t,n,r){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,n,r)}}class i5 extends lt{constructor(t,n,r){super(400,"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.","InvalidIdentifier",t,n,r)}}class a5 extends lt{constructor(t,n,r){super(409,"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together.","RelationConflict",t,n,r)}}class s5 extends lt{constructor(t,n,r){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",t,n,r)}}class l5 extends lt{constructor(t,n,r){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",t,n,r)}}class c5 extends lt{constructor(t,n,r){super(400,"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.","ReferenceNotFound",t,n,r)}}class u5 extends lt{constructor(t,n,r){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",t,n,r)}}class f5 extends lt{constructor(t,n,r){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",t,n,r)}}class d5 extends lt{constructor(t,n,r){super(409,"The record attempted to be created already exists.","AlreadyExists",t,n,r)}}class p5 extends lt{constructor(t,n,r){super(429,"The request has been rate limited.","RateLimited",t,n,r)}}class h5 extends lt{constructor(t,n,r){super(402,"A payment is required to perform this request.","PaymentRequired",t,n,r)}}class m5 extends lt{constructor(t,n,r){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",t,n,r)}}class v5 extends lt{constructor(t,n,r){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",t,n,r)}}class y5 extends lt{constructor(t,n,r){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",t,n,r)}}const g5={Unknown:wa,Internal:ZL,Unauthorized:YL,Forbidden:JL,PayloadTooLarge:XL,InvalidPayload:QL,UnsupportedMediaType:e5,MethodNotFound:t5,ResourceNotFound:n5,InvalidJsonSchema:r5,InvalidDataFormat:o5,InvalidIdentifier:i5,RelationConflict:a5,ReferenceConstraint:s5,ResourceLockedConflict:l5,ReferenceNotFound:c5,InvalidQuery:u5,Runtime:f5,AlreadyExists:d5,RateLimited:p5,PaymentRequired:h5,QuotaExceeded:m5,LimitExceeded:v5,BreakingChanges:y5},Mw=e=>Sd(e)?e:e instanceof Error?new wa(e.message,e):typeof e=="string"?new wa(e):b5(e);function b5(e){if(typeof e=="object"&&"code"in e&&"type"in e&&"id"in e&&"message"in e&&typeof e.type=="string"&&typeof e.message=="string"){const t=g5[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new wa(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new wa("An invalid error occurred: "+JSON.stringify(e))}var w5=Error,x5=EvalError,S5=RangeError,E5=ReferenceError,Dw=SyntaxError,_o=TypeError,$5=URIError,dl=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var i=Object.getOwnPropertySymbols(t);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,n);if(a.value!==o||a.enumerable!==!0)return!1}return!0},jw=typeof Symbol<"u"&&Symbol,O5=dl,Ed=function(){return typeof jw!="function"||typeof Symbol!="function"||typeof jw("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:O5()},$d={__proto__:null,foo:{}},k5=Object,_5=function(){return{__proto__:$d}.foo===$d.foo&&!($d instanceof k5)},T5="Function.prototype.bind called on incompatible ",C5=Object.prototype.toString,I5=Math.max,A5="[object Function]",Nw=function(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var i=0;i<n.length;i+=1)r[i+t.length]=n[i];return r},P5=function(t,n){for(var r=[],o=n||0,i=0;o<t.length;o+=1,i+=1)r[i]=t[o];return r},R5=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},M5=function(t){var n=this;if(typeof n!="function"||C5.apply(n)!==A5)throw new TypeError(T5+n);for(var r=P5(arguments,1),o,i=function(){if(this instanceof o){var u=n.apply(this,Nw(r,arguments));return Object(u)===u?u:this}return n.apply(t,Nw(r,arguments))},a=I5(0,n.length-r.length),s=[],l=0;l<a;l++)s[l]="$"+l;if(o=Function("binder","return function ("+R5(s,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o},D5=M5,Od=Function.prototype.bind||D5,j5=Function.prototype.call,N5=Object.prototype.hasOwnProperty,L5=Od,Lw=L5.call(j5,N5),Ue,F5=w5,B5=x5,U5=S5,z5=E5,ni=Dw,ri=_o,H5=$5,Fw=Function,kd=function(e){try{return Fw('"use strict"; return ('+e+").constructor;")()}catch{}},To=Object.getOwnPropertyDescriptor;if(To)try{To({},"")}catch{To=null}var _d=function(){throw new ri},q5=To?function(){try{return arguments.callee,_d}catch{try{return To(arguments,"callee").get}catch{return _d}}}():_d,oi=Ed(),W5=_5(),jt=Object.getPrototypeOf||(W5?function(e){return e.__proto__}:null),ii={},V5=typeof Uint8Array>"u"||!jt?Ue:jt(Uint8Array),Co={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ue:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ue:ArrayBuffer,"%ArrayIteratorPrototype%":oi&&jt?jt([][Symbol.iterator]()):Ue,"%AsyncFromSyncIteratorPrototype%":Ue,"%AsyncFunction%":ii,"%AsyncGenerator%":ii,"%AsyncGeneratorFunction%":ii,"%AsyncIteratorPrototype%":ii,"%Atomics%":typeof Atomics>"u"?Ue:Atomics,"%BigInt%":typeof BigInt>"u"?Ue:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ue:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ue:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ue:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":F5,"%eval%":eval,"%EvalError%":B5,"%Float32Array%":typeof Float32Array>"u"?Ue:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ue:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ue:FinalizationRegistry,"%Function%":Fw,"%GeneratorFunction%":ii,"%Int8Array%":typeof Int8Array>"u"?Ue:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ue:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ue:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":oi&&jt?jt(jt([][Symbol.iterator]())):Ue,"%JSON%":typeof JSON=="object"?JSON:Ue,"%Map%":typeof Map>"u"?Ue:Map,"%MapIteratorPrototype%":typeof Map>"u"||!oi||!jt?Ue:jt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ue:Promise,"%Proxy%":typeof Proxy>"u"?Ue:Proxy,"%RangeError%":U5,"%ReferenceError%":z5,"%Reflect%":typeof Reflect>"u"?Ue:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ue:Set,"%SetIteratorPrototype%":typeof Set>"u"||!oi||!jt?Ue:jt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ue:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":oi&&jt?jt(""[Symbol.iterator]()):Ue,"%Symbol%":oi?Symbol:Ue,"%SyntaxError%":ni,"%ThrowTypeError%":q5,"%TypedArray%":V5,"%TypeError%":ri,"%Uint8Array%":typeof Uint8Array>"u"?Ue:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ue:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ue:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ue:Uint32Array,"%URIError%":H5,"%WeakMap%":typeof WeakMap>"u"?Ue:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ue:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ue:WeakSet};if(jt)try{null.error}catch(e){var K5=jt(jt(e));Co["%Error.prototype%"]=K5}var G5=function e(t){var n;if(t==="%AsyncFunction%")n=kd("async function () {}");else if(t==="%GeneratorFunction%")n=kd("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=kd("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&jt&&(n=jt(o.prototype))}return Co[t]=n,n},Bw={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},xa=Od,pl=Lw,Z5=xa.call(Function.call,Array.prototype.concat),Y5=xa.call(Function.apply,Array.prototype.splice),Uw=xa.call(Function.call,String.prototype.replace),hl=xa.call(Function.call,String.prototype.slice),J5=xa.call(Function.call,RegExp.prototype.exec),X5=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Q5=/\\(\\)?/g,eF=function(t){var n=hl(t,0,1),r=hl(t,-1);if(n==="%"&&r!=="%")throw new ni("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new ni("invalid intrinsic syntax, expected opening `%`");var o=[];return Uw(t,X5,function(i,a,s,l){o[o.length]=s?Uw(l,Q5,"$1"):a||i}),o},tF=function(t,n){var r=t,o;if(pl(Bw,r)&&(o=Bw[r],r="%"+o[0]+"%"),pl(Co,r)){var i=Co[r];if(i===ii&&(i=G5(r)),typeof i>"u"&&!n)throw new ri("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new ni("intrinsic "+t+" does not exist!")},nr=function(t,n){if(typeof t!="string"||t.length===0)throw new ri("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new ri('"allowMissing" argument must be a boolean');if(J5(/^%?[^%]*%?$/,t)===null)throw new ni("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=eF(t),o=r.length>0?r[0]:"",i=tF("%"+o+"%",n),a=i.name,s=i.value,l=!1,c=i.alias;c&&(o=c[0],Y5(r,Z5([0,1],c)));for(var u=1,f=!0;u<r.length;u+=1){var p=r[u],d=hl(p,0,1),h=hl(p,-1);if((d==='"'||d==="'"||d==="`"||h==='"'||h==="'"||h==="`")&&d!==h)throw new ni("property names with quotes must have matching quotes");if((p==="constructor"||!f)&&(l=!0),o+="."+p,a="%"+o+"%",pl(Co,a))s=Co[a];else if(s!=null){if(!(p in s)){if(!n)throw new ri("base intrinsic for "+t+" exists, but the property is not available.");return}if(To&&u+1>=r.length){var m=To(s,p);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?s=m.get:s=s[p]}else f=pl(s,p),s=s[p];f&&!l&&(Co[a]=s)}}return s},zw={exports:{}},nF=nr,ml=nF("%Object.defineProperty%",!0)||!1;if(ml)try{ml({},"a",{value:1})}catch{ml=!1}var Td=ml,rF=nr,vl=rF("%Object.getOwnPropertyDescriptor%",!0);if(vl)try{vl([],"length")}catch{vl=null}var Cd=vl,Hw=Td,oF=Dw,ai=_o,qw=Cd,Id=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new ai("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new ai("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new ai("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new ai("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new ai("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new ai("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,l=!!qw&&qw(t,n);if(Hw)Hw(t,n,{configurable:a===null&&l?l.configurable:!a,enumerable:o===null&&l?l.enumerable:!o,value:r,writable:i===null&&l?l.writable:!i});else if(s||!o&&!i&&!a)t[n]=r;else throw new oF("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Ad=Td,Ww=function(){return!!Ad};Ww.hasArrayLengthDefineBug=function(){if(!Ad)return null;try{return Ad([],"length",{value:1}).length!==1}catch{return!0}};var Pd=Ww,iF=nr,Vw=Id,aF=Pd(),Kw=Cd,Gw=_o,sF=iF("%Math.floor%"),lF=function(t,n){if(typeof t!="function")throw new Gw("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||sF(n)!==n)throw new Gw("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in t&&Kw){var a=Kw(t,"length");a&&!a.configurable&&(o=!1),a&&!a.writable&&(i=!1)}return(o||i||!r)&&(aF?Vw(t,"length",n,!0,!0):Vw(t,"length",n)),t};(function(e){var t=Od,n=nr,r=lF,o=_o,i=n("%Function.prototype.apply%"),a=n("%Function.prototype.call%"),s=n("%Reflect.apply%",!0)||t.call(a,i),l=Td,c=n("%Math.max%");e.exports=function(p){if(typeof p!="function")throw new o("a function is required");var d=s(t,a,arguments);return r(d,1+c(0,p.length-(arguments.length-1)),!0)};var u=function(){return s(t,i,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(zw);var si=zw.exports,Zw=nr,Yw=si,cF=Yw(Zw("String.prototype.indexOf")),_n=function(t,n){var r=Zw(t,!!n);return typeof r=="function"&&cF(t,".prototype.")>-1?Yw(r):r};const uF=EA(VL);var Rd=typeof Map=="function"&&Map.prototype,Md=Object.getOwnPropertyDescriptor&&Rd?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,yl=Rd&&Md&&typeof Md.get=="function"?Md.get:null,Jw=Rd&&Map.prototype.forEach,Dd=typeof Set=="function"&&Set.prototype,jd=Object.getOwnPropertyDescriptor&&Dd?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,gl=Dd&&jd&&typeof jd.get=="function"?jd.get:null,Xw=Dd&&Set.prototype.forEach,fF=typeof WeakMap=="function"&&WeakMap.prototype,Sa=fF?WeakMap.prototype.has:null,dF=typeof WeakSet=="function"&&WeakSet.prototype,Ea=dF?WeakSet.prototype.has:null,pF=typeof WeakRef=="function"&&WeakRef.prototype,Qw=pF?WeakRef.prototype.deref:null,hF=Boolean.prototype.valueOf,mF=Object.prototype.toString,vF=Function.prototype.toString,yF=String.prototype.match,Nd=String.prototype.slice,Yr=String.prototype.replace,gF=String.prototype.toUpperCase,ex=String.prototype.toLowerCase,tx=RegExp.prototype.test,nx=Array.prototype.concat,rr=Array.prototype.join,bF=Array.prototype.slice,rx=Math.floor,Ld=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Fd=Object.getOwnPropertySymbols,Bd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,li=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Gt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===li||"symbol")?Symbol.toStringTag:null,ox=Object.prototype.propertyIsEnumerable,ix=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function ax(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||tx.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-rx(-e):rx(e);if(r!==e){var o=String(r),i=Nd.call(t,o.length+1);return Yr.call(o,n,"$&_")+"."+Yr.call(Yr.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Yr.call(t,n,"$&_")}var Ud=uF,sx=Ud.custom,lx=fx(sx)?sx:null,wF=function e(t,n,r,o){var i=n||{};if(Jr(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Jr(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=Jr(i,"customInspect")?i.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Jr(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Jr(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=i.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return px(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return s?ax(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return s?ax(t,c):c}var u=typeof i.depth>"u"?5:i.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return zd(t)?"[Array]":"[Object]";var f=LF(i,r);if(typeof o>"u")o=[];else if(dx(o,t)>=0)return"[Circular]";function p(B,A,D){if(A&&(o=bF.call(o),o.push(A)),D){var N={depth:i.depth};return Jr(i,"quoteStyle")&&(N.quoteStyle=i.quoteStyle),e(B,N,r+1,o)}return e(B,i,r+1,o)}if(typeof t=="function"&&!ux(t)){var d=CF(t),h=bl(t,p);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(h.length>0?" { "+rr.call(h,", ")+" }":"")}if(fx(t)){var m=li?Yr.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Bd.call(t);return typeof t=="object"&&!li?$a(m):m}if(DF(t)){for(var y="<"+ex.call(String(t.nodeName)),v=t.attributes||[],g=0;g<v.length;g++)y+=" "+v[g].name+"="+cx(xF(v[g].value),"double",i);return y+=">",t.childNodes&&t.childNodes.length&&(y+="..."),y+="</"+ex.call(String(t.nodeName))+">",y}if(zd(t)){if(t.length===0)return"[]";var b=bl(t,p);return f&&!NF(b)?"["+qd(b,f)+"]":"[ "+rr.call(b,", ")+" ]"}if(EF(t)){var k=bl(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!ox.call(t,"cause")?"{ ["+String(t)+"] "+rr.call(nx.call("[cause]: "+p(t.cause),k),", ")+" }":k.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+rr.call(k,", ")+" }"}if(typeof t=="object"&&a){if(lx&&typeof t[lx]=="function"&&Ud)return Ud(t,{depth:u-r});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(IF(t)){var S=[];return Jw&&Jw.call(t,function(B,A){S.push(p(A,t,!0)+" => "+p(B,t))}),hx("Map",yl.call(t),S,f)}if(RF(t)){var $=[];return Xw&&Xw.call(t,function(B){$.push(p(B,t))}),hx("Set",gl.call(t),$,f)}if(AF(t))return Hd("WeakMap");if(MF(t))return Hd("WeakSet");if(PF(t))return Hd("WeakRef");if(OF(t))return $a(p(Number(t)));if(_F(t))return $a(p(Ld.call(t)));if(kF(t))return $a(hF.call(t));if($F(t))return $a(p(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof Xe<"u"&&t===Xe)return"{ [object globalThis] }";if(!SF(t)&&!ux(t)){var C=bl(t,p),P=ix?ix(t)===Object.prototype:t instanceof Object||t.constructor===Object,F=t instanceof Object?"":"null prototype",T=!P&&Gt&&Object(t)===t&&Gt in t?Nd.call(Xr(t),8,-1):F?"Object":"",M=P||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",q=M+(T||F?"["+rr.call(nx.call([],T||[],F||[]),": ")+"] ":"");return C.length===0?q+"{}":f?q+"{"+qd(C,f)+"}":q+"{ "+rr.call(C,", ")+" }"}return String(t)};function cx(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function xF(e){return Yr.call(String(e),/"/g,""")}function zd(e){return Xr(e)==="[object Array]"&&(!Gt||!(typeof e=="object"&&Gt in e))}function SF(e){return Xr(e)==="[object Date]"&&(!Gt||!(typeof e=="object"&&Gt in e))}function ux(e){return Xr(e)==="[object RegExp]"&&(!Gt||!(typeof e=="object"&&Gt in e))}function EF(e){return Xr(e)==="[object Error]"&&(!Gt||!(typeof e=="object"&&Gt in e))}function $F(e){return Xr(e)==="[object String]"&&(!Gt||!(typeof e=="object"&&Gt in e))}function OF(e){return Xr(e)==="[object Number]"&&(!Gt||!(typeof e=="object"&&Gt in e))}function kF(e){return Xr(e)==="[object Boolean]"&&(!Gt||!(typeof e=="object"&&Gt in e))}function fx(e){if(li)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Bd)return!1;try{return Bd.call(e),!0}catch{}return!1}function _F(e){if(!e||typeof e!="object"||!Ld)return!1;try{return Ld.call(e),!0}catch{}return!1}var TF=Object.prototype.hasOwnProperty||function(e){return e in this};function Jr(e,t){return TF.call(e,t)}function Xr(e){return mF.call(e)}function CF(e){if(e.name)return e.name;var t=yF.call(vF.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function dx(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function IF(e){if(!yl||!e||typeof e!="object")return!1;try{yl.call(e);try{gl.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function AF(e){if(!Sa||!e||typeof e!="object")return!1;try{Sa.call(e,Sa);try{Ea.call(e,Ea)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function PF(e){if(!Qw||!e||typeof e!="object")return!1;try{return Qw.call(e),!0}catch{}return!1}function RF(e){if(!gl||!e||typeof e!="object")return!1;try{gl.call(e);try{yl.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function MF(e){if(!Ea||!e||typeof e!="object")return!1;try{Ea.call(e,Ea);try{Sa.call(e,Sa)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function DF(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function px(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return px(Nd.call(e,0,t.maxStringLength),t)+r}var o=Yr.call(Yr.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,jF);return cx(o,"single",t)}function jF(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+gF.call(t.toString(16))}function $a(e){return"Object("+e+")"}function Hd(e){return e+" { ? }"}function hx(e,t,n,r){var o=r?qd(n,r):rr.call(n,", ");return e+" ("+t+") {"+o+"}"}function NF(e){for(var t=0;t<e.length;t++)if(dx(e[t],`
|
|
57
57
|
`)>=0)return!1;return!0}function LF(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=rr.call(Array(e.indent+1)," ");else return null;return{base:n,prev:rr.call(Array(t+1),n)}}function qd(e,t){if(e.length===0)return"";var n=`
|
|
@@ -65,7 +65,7 @@ Check the top-level render call using <`+me+">.")}return ne}}function Rt(I,ne){{
|
|
|
65
65
|
`.charCodeAt(0)||Mt==="\r".charCodeAt(0))&&(ht=Rt)}var qt=(ht!==-1?dt:"")+ot.slice(0,ht+1);dt=(ht===-1?dt:"")+ot.slice(ht+1),ot!==""&&(U=Date.now(),Z+=ot.length);for(var Dt=0;Dt<qt.length;Dt+=1){var Mt=qt.charCodeAt(Dt);if(pt===x&&Mt===`
|
|
66
66
|
`.charCodeAt(0))pt=z;else if(pt===x&&(pt=z),Mt==="\r".charCodeAt(0)||Mt===`
|
|
67
67
|
`.charCodeAt(0)){if(pt!==z){pt===K&&(Sn=Dt+1);var In=qt.slice(dn,Sn-1),Gn=qt.slice(Sn+(Sn<Dt&&qt.charCodeAt(Sn)===" ".charCodeAt(0)?1:0),Dt);In==="data"?(Pt+=`
|
|
68
|
-
`,Pt+=Gn):In==="id"?rt=Gn:In==="event"?tt=Gn:In==="retry"?(be=pe(Gn,be),_e=be):In==="heartbeatTimeout"&&(Oe=pe(Gn,Oe),Be!==0&&(o(Be),Be=r(function(){Fr()},Oe)))}if(pt===z){if(Pt!==""){Ne=rt,tt===""&&(tt="message");var vo=new B(tt,{data:Pt.slice(1),lastEventId:rt});if(R.dispatchEvent(vo),tt==="open"?le(R,R.onopen,vo):tt==="message"?le(R,R.onmessage,vo):tt==="error"&&le(R,R.onerror,vo),ct===j)return}Pt="",tt=""}pt=Mt==="\r".charCodeAt(0)?x:z}else pt===z&&(dn=Dt,pt=K),pt===K?Mt===":".charCodeAt(0)&&(Sn=Dt+1,pt=O):pt===O&&(pt=J)}}},gr=function(ot){if(ct===W||ct===V){ct=N,Be!==0&&(o(Be),Be=0),Be=r(function(){Fr()},_e),_e=he(Math.min(be*16,_e*2)),R.readyState=V;var ht=new D("error",{error:ot});R.dispatchEvent(ht),le(R,R.onerror,ht),ot!=null&&console.error(ot)}},Kn=function(){ct=j,ke!=null&&(ke.abort(),ke=void 0),Be!==0&&(o(Be),Be=0),R.readyState=j},Fr=function(){if(Be=0,ct!==N){if(!U&&ke!=null)gr(new Error("No activity within "+Oe+" milliseconds. "+(ct===V?"No response received.":Z+" chars received.")+" Reconnecting.")),ke!=null&&(ke.abort(),ke=void 0);else{var ot=Math.max((U||Date.now())+Oe-Date.now(),1);U=!1,Be=r(function(){Fr()},ot)}return}U=!1,Z=0,Be=r(function(){Fr()},Oe),ct=V,Pt="",tt="",rt=Ne,dt="",dn=0,Sn=0,pt=z;var ht=X;if(X.slice(0,5)!=="data:"&&X.slice(0,5)!=="blob:"&&Ne!==""){var Rt=X.indexOf("?");ht=Rt===-1?X:X.slice(0,Rt+1)+X.slice(Rt+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Gn,vo){return vo===xe?"":Gn}),ht+=(X.indexOf("?")===-1?"?":"&")+xe+"="+encodeURIComponent(Ne)}var Mt=R.withCredentials,qt={};qt.Accept="text/event-stream";var Dt=R.headers;if(Dt!=null)for(var In in Dt)Object.prototype.hasOwnProperty.call(Dt,In)&&(qt[In]=Dt[In]);try{ke=Ae.open(de,Vn,Lr,gr,ht,Mt,qt)}catch(Gn){throw Kn(),Gn}};R.url=X,R.readyState=V,R.withCredentials=ee,R.headers=H,R._close=Kn,Fr()}Q.prototype=Object.create(T.prototype),Q.prototype.CONNECTING=V,Q.prototype.OPEN=W,Q.prototype.CLOSED=j,Q.prototype.close=function(){this._close()},Q.CONNECTING=V,Q.OPEN=W,Q.CLOSED=j,Q.prototype.withCredentials=void 0;var Ee=l;i!=null&&(l==null||!("withCredentials"in l.prototype))&&(Ee=Q),function(R){{var X=R(t);X!==void 0&&(e.exports=X)}}(function(R){R.EventSourcePolyfill=Q,R.NativeEventSource=l,R.EventSource=Ee})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:Xe:globalThis)})(Qd,Qd.exports);var X3=Qd.exports;const Q3=Le(X3),e4=(e,t={})=>{const n=new Q3.EventSourcePolyfill(e,{headers:t.headers}),r=new Sx;return n.onopen=o=>r.emit("open",o),n.onmessage=o=>r.emit("message",o),n.onerror=o=>r.emit("error",o),{emitter:r,source:n}},t4=async(e,t={})=>{const{emitter:n,source:r}=e4(e,t);return await new Promise((o,i)=>{n.on("open",()=>{o()}),n.on("error",a=>{i(a)})}).finally(()=>n.cleanup()),{on:n.on.bind(n),close:()=>{n.cleanup(),r.close()}}},n4=w.object({type:w.literal("message_created"),data:w.object({id:w.string().describe("Id of the [Message](#schema_message)"),createdAt:w.string().datetime().describe("Creation date of the [Message](#schema_message) in ISO 8601 format"),payload:w.union([w.object({audioUrl:w.string().min(1),className:w.string().describe("CSS className to apply to the message").optional(),type:w.literal("audio")}),w.object({title:w.string().min(1),subtitle:w.string().optional(),imageUrl:w.string().optional(),actions:w.array(w.object({action:w.enum(["postback","url","say"]),label:w.string().min(1),value:w.string().min(1)})),type:w.literal("card"),className:w.string().describe("CSS className to apply to the message").optional()}),w.object({items:w.array(w.object({title:w.string().min(1),subtitle:w.string().optional(),imageUrl:w.string().optional(),actions:w.array(w.object({action:w.enum(["postback","url","say"]),label:w.string().min(1),value:w.string().min(1)})),className:w.string().describe("CSS className to apply to the message").optional()})),className:w.string().describe("CSS className to apply to the message").optional(),type:w.literal("carousel")}),w.object({text:w.string(),options:w.array(w.object({label:w.string().min(1),value:w.string().min(1)})),className:w.string().describe("CSS className to apply to the message").optional(),type:w.literal("choice"),disableFreeText:w.boolean().optional()}),w.object({text:w.string(),options:w.array(w.object({label:w.string().min(1),value:w.string().min(1)})),className:w.string().describe("CSS className to apply to the message").optional(),type:w.literal("dropdown")}),w.object({fileUrl:w.string().min(1),title:w.string().min(1).optional(),className:w.string().describe("CSS className to apply to the message").optional(),type:w.literal("file")}),w.object({imageUrl:w.string().min(1),className:w.string().describe("CSS className to apply to the message").optional(),type:w.literal("image")}),w.object({latitude:w.number(),longitude:w.number(),address:w.string().optional(),title:w.string().optional(),className:w.string().describe("CSS className to apply to the message").optional(),type:w.literal("location")}),w.object({markdown:w.string().min(1),className:w.string().describe("CSS className to apply to the message").optional(),type:w.literal("markdown")}),w.object({text:w.string().min(1),className:w.string().describe("CSS className to apply to the message").optional(),type:w.literal("text")}),w.object({videoUrl:w.string().min(1),className:w.string().describe("CSS className to apply to the message").optional(),type:w.literal("video")}),w.object({items:w.array(w.union([w.object({type:w.literal("text"),payload:w.object({text:w.string().min(1)})}),w.object({type:w.literal("markdown"),payload:w.object({markdown:w.string().min(1)})}),w.object({type:w.literal("image"),payload:w.object({imageUrl:w.string().min(1)})}),w.object({type:w.literal("audio"),payload:w.object({audioUrl:w.string().min(1)})}),w.object({type:w.literal("video"),payload:w.object({videoUrl:w.string().min(1)})}),w.object({type:w.literal("file"),payload:w.object({fileUrl:w.string().min(1),title:w.string().min(1).optional()})}),w.object({type:w.literal("location"),payload:w.object({latitude:w.number(),longitude:w.number(),address:w.string().optional(),title:w.string().optional()})})])),className:w.string().describe("CSS className to apply to the message").optional(),type:w.literal("bloc")})]).describe("Payload is the content type of the message."),userId:w.string().describe("ID of the [User](#schema_user)"),conversationId:w.string().describe("ID of the [Conversation](#schema_conversation)")}).describe("The Message object represents a message in a [Conversation](#schema_conversation) for a specific [User](#schema_user).")}),r4=w.object({type:w.literal("webchat_visibility"),data:w.object({visibility:w.union([w.literal("show"),w.literal("hide"),w.literal("toggle")])})}),o4=w.object({type:w.literal("webchat_config"),data:w.object({config:w.record(w.union([w.any(),w.null()]))})}),i4=w.object({type:w.literal("custom"),data:w.object({event:w.record(w.union([w.any(),w.null()]))})}),a4=w.object({type:w.literal("typing_started"),data:w.object({timeout:w.number().optional()})}),s4=w.object({type:w.literal("typing_stopped"),data:w.record(w.never())}),l4={messageCreated:n4,webchatVisibility:r4,webchatConfig:o4,custom:i4,typingStarted:a4,typingStopped:s4},Ex="unknown error",Iu=class Iu extends Sx{constructor(n){super();we(this,"_state",{status:"disconnected"});we(this,"connect",async()=>{if(this._state.status==="connected")return;if(this._state.status==="connecting"){await this._state.connectionPromise;return}const n=this._connect();this._state={status:"connecting",connectionPromise:n},await n});we(this,"disconnect",async()=>{if(this._state.status==="disconnected")return;let n;this._state.status==="connecting"?n=await this._state.connectionPromise:n=this._state.source,this._disconnectSync(n)});we(this,"_connect",async()=>{const n=await t4(`${this._props.url}/conversations/${this._props.conversationId}/listen`,{headers:{"x-user-key":this._props.userKey}});return n.on("message",this._handleMessage),n.on("error",this._handleError(n)),this._state={status:"connected",source:n},n});we(this,"_disconnectSync",n=>{n.close(),this._state={status:"disconnected"}});we(this,"_handleMessage",n=>{const r=this._parseSignal(n.data);this.emit(r.type,r.data)});we(this,"_handleError",n=>r=>{this._disconnectSync(n);const o=this._toError(r);this.emit("error",o)});we(this,"_parseSignal",n=>{for(const r of Object.values(l4)){const o=this._safeJsonParse(n),i=r.safeParse(o);if(i.success)return i.data}return{type:"unknown",data:n}});we(this,"_safeJsonParse",n=>{try{return JSON.parse(n)}catch{return n}});we(this,"_toError",n=>{if(n instanceof Error)return n;if(typeof n=="string")return new Error(n);if(n===null)return new Error(Ex);if(typeof n=="object"&&"message"in n)return this._toError(n.message);try{const r=JSON.stringify(n);return new Error(r)}catch{return new Error(Ex)}});this._props=n}get status(){return this._state.status}};we(Iu,"listen",async n=>{const r=new Iu(n);return await r.connect(),r});let ep=Iu;const $x=100*1024*1024,c4=$x,u4=$x,f4=6e4;class d4{constructor(t){we(this,"_auto");we(this,"createConversation",t=>this._auto.createConversation(t));we(this,"getConversation",t=>this._auto.getConversation(t));we(this,"deleteConversation",t=>this._auto.deleteConversation(t));we(this,"listConversations",t=>this._auto.listConversations(t));we(this,"listConversationMessages",t=>this._auto.listConversationMessages(t));we(this,"addParticipant",t=>this._auto.addParticipant(t));we(this,"removeParticipant",t=>this._auto.removeParticipant(t));we(this,"getParticipant",t=>this._auto.getParticipant(t));we(this,"listParticipants",t=>this._auto.listParticipants(t));we(this,"createMessage",t=>this._auto.createMessage(t));we(this,"getMessage",t=>this._auto.getMessage(t));we(this,"deleteMessage",t=>this._auto.deleteMessage(t));we(this,"createFile",t=>this._auto.createFile(t));we(this,"createUser",t=>this._auto.createUser(t));we(this,"getUser",t=>this._auto.getUser(t));we(this,"updateUser",t=>this._auto.updateUser(t));we(this,"deleteUser",t=>this._auto.deleteUser(t));we(this,"createEvent",t=>this._auto.createEvent(t));we(this,"getEvent",t=>this._auto.getEvent(t));we(this,"listenConversation",async({id:t,"x-user-key":n})=>await ep.listen({url:this.props.apiUrl,conversationId:t,userKey:n}));this.props=t;const{apiUrl:n}=t,r={...t.headers},o=t.timeout??f4,i=Pw.create({baseURL:n,headers:r,withCredentials:!0,timeout:o,maxBodyLength:c4,maxContentLength:u4});this._auto=new J3(i)}}const El={disconnected:0,user_creating:1,user_created:2,conversation_creating:3,conversation_created:4},sn=(e,t)=>e.status===t,ir=(e,t)=>El[e.status]<El[t],Ox=(e,t)=>El[e.status]>=El[t];class ar extends Error{constructor(t){super(`Unexpected state: ${t.status}`),this.state=t}}const kx=["audio","file","image","video"],_x=e=>kx.includes(e);class p4 extends Lg{constructor(n){super();we(this,"_client");we(this,"_webhookId");we(this,"_apiUrl");we(this,"_state",{status:"disconnected"});we(this,"mode","pushpin");we(this,"_initialConnect",async({data:n,name:r,pictureUrl:o})=>{if(Ox(this._state,"user_created"))throw new Error("Client is already connected. Please disconnect first.");if(sn(this._state,"user_creating"))return;this._state={status:"user_creating"};const{user:{id:i},key:a}=await this._client.createUser({name:r,pictureUrl:o,userData:n});return this._state={status:"user_created",userId:i,userKey:a},{userId:i,userToken:a}});we(this,"_reConnect",async(n,{data:r,name:o,pictureUrl:i})=>{if(Ox(this._state,"user_created")){if(this._state.userId!==n.userId)throw new Error("Client is already connected. Please disconnect first.");return n}return sn(this._state,"user_creating")||(this._state={status:"user_created",userId:n.userId,userKey:n.userToken},await this._client.updateUser({"x-user-key":n.userToken,name:o,pictureUrl:i,userData:r})),n});we(this,"_mapMessage",n=>{const{payload:r,disableInput:o}=ra(n.payload);return{id:n.id,conversationId:n.conversationId,authorId:n.userId,sentOn:new Date(n.createdAt),payload:r,disableInput:o}});const r=`${n.apiUrl}/${n.clientId}`;this._webhookId=n.clientId,this._apiUrl=r,this._client=new d4({apiUrl:r})}get apiUrl(){return this._apiUrl}get clientId(){return this._webhookId}get userId(){if(!ir(this._state,"user_created"))return this._state.userId}async getUser(){if(ir(this._state,"user_created"))throw new ar(this._state);const{user:n}=await this._client.getUser({"x-user-key":this._state.userKey});return{data:n.data}}async updateUser(n){if(ir(this._state,"user_created"))throw new ar(this._state);const{user:r}=await this._client.updateUser({"x-user-key":this._state.userKey,name:n.name,pictureUrl:n.pictureUrl,userData:n.data});return r}get conversationId(){if(!ir(this._state,"conversation_created"))return this._state.conversationId}async connect(n,r,o={}){const i={data:r,...o};return n?await this.userExists(n)?this._reConnect(n,i):this._initialConnect(i):this._initialConnect(i)}async disconnect(){sn(this._state,"conversation_created")?this._state.signalEmitter.cleanup():sn(this._state,"conversation_creating")&&console.warn("zombie conversation..."),this._state={status:"disconnected"}}async sendFile(n){if(ir(this._state,"user_created"))throw new ar(this._state);if(sn(this._state,"conversation_creating"))throw new ar(this._state);let r;sn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state));const{size:o,name:i}=n,s=await(h=>new Promise((m,y)=>{const v=new FileReader;v.onload=g=>{var b;return m((b=g.target)==null?void 0:b.result)},v.onerror=g=>{var b;return y((b=g.target)==null?void 0:b.error)},v.readAsArrayBuffer(h)}))(n),{file:{uploadUrl:l,contentType:c,url:u}}=await this._client.createFile({"x-user-key":r.userKey,size:o,key:i,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"}});await fetch(l,{method:"PUT",headers:{"x-amz-tagging":"public=true"},body:s});const f=c.split("/").shift()??"",p=_x(f)?f:"file",d=p==="image"?{type:p,imageUrl:u}:p==="audio"?{type:p,audioUrl:u}:p==="video"?{type:p,videoUrl:u}:{type:p,fileUrl:u};return await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:d}),this.emit("messageSent",d),{fileUrl:u,name:i,type:p}}async sendMessage(n){if(ir(this._state,"user_created"))throw new ar(this._state);if(sn(this._state,"conversation_creating"))throw new ar(this._state);let r;sn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:n}),this.emit("messageSent",n)}async sendEvent(n){if(ir(this._state,"user_created"))throw new ar(this._state);if(sn(this._state,"conversation_creating"))throw new ar(this._state);let r;sn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createEvent({"x-user-key":r.userKey,conversationId:r.conversationId,payload:{type:"custom",data:n}})}async switchConversation(n){if(ir(this._state,"user_created"))throw new ar(this._state);sn(this._state,"conversation_created")&&this._state.conversationId===n||sn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._connectConversation(this._state,n))}async conversationExists(n){if(ir(this._state,"user_created"))return!1;try{return await this._client.getConversation({"x-user-key":this._state.userKey,id:n}),!0}catch(r){if(Sd(r)&&r.code===404)return!1;throw r}}async userExists({userToken:n}){try{return await this._client.getUser({"x-user-key":n}),!0}catch(r){const o=i=>i.code===404||i.code===401;if(Sd(r)&&o(r))return!1;throw r}}async newConversation(){if(ir(this._state,"user_created"))throw new ar(this._state);sn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._createNewConversation(this._state))}async _createNewConversation(n){const{conversation:{id:r}}=await this._client.createConversation({"x-user-key":n.userKey}),o=await this._connectConversation(n,r);return await this._client.createEvent({"x-user-key":n.userKey,conversationId:r,payload:{type:"conversation_started",data:{}}}),o}async listMessages(){if(!sn(this._state,"conversation_created"))return[];const{conversationId:n,userKey:r}=this._state,o=[];let i;do{const a=await this._client.listConversationMessages({id:n,"x-user-key":r,nextToken:i});o.push(...a.messages),i=a.meta.nextToken}while(i);return o.map(this._mapMessage)}async _connectConversation(n,r){const o=await this._client.listenConversation({id:r,"x-user-key":n.userKey});return o.on("unknown",i=>{typeof i=="string"&&i==="ping"||console.debug("unknown event",i)}),o.on("message_created",i=>{i.userId!==n.userId&&this.emit("message",this._mapMessage(i))}),o.on("error",()=>{this._state={status:"user_created",userId:n.userId,userKey:n.userKey},this.emit("error",new Error("Connection to conversation lost"))}),o.on("webchat_visibility",i=>{this.emit("webchatVisibility",i.visibility)}),o.on("webchat_config",i=>{this.emit("webchatConfig",i.config)}),o.on("typing_started",i=>{this.emit("isTyping",{isTyping:!0,timeout:i.timeout??5e3})}),o.on("typing_stopped",()=>{this.emit("isTyping",{isTyping:!1,timeout:0})}),o.on("custom",i=>{this.emit("customEvent",i.event)}),this.emit("conversation",r),this._state={status:"conversation_created",userId:n.userId,userKey:n.userKey,conversationId:r,signalEmitter:o},this._state}}const Tx=({clientId:e,apiUrl:t="https://webchat.botpress.cloud"})=>new p4({apiUrl:t,clientId:e}),h4=({clientId:e,apiUrl:t="https://webchat.botpress.cloud"})=>{const[n]=E.useState(Tx({clientId:e,apiUrl:t}));return n},m4=(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 o=null;const i=new Image;i.addEventListener("load",()=>{o&&clearTimeout(o),n({width:i.naturalWidth,height:i.naturalHeight})}),i.addEventListener("error",a=>{o&&clearTimeout(o),r(`${a.type}: ${a.message}`)}),i.src=e,t.timeout&&(o=setTimeout(()=>r("Timeout"),t.timeout))});let v4={data:""},y4=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||v4,g4=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,b4=/\/\*[^]*?\*\/| +/g,Cx=/\n+/g,Qr=(e,t)=>{let n="",r="",o="";for(let i in e){let a=e[i];i[0]=="@"?i[1]=="i"?n=i+" "+a+";":r+=i[1]=="f"?Qr(a,i):i+"{"+Qr(a,i[1]=="k"?"":t)+"}":typeof a=="object"?r+=Qr(a,t?t.replace(/([^,])+/g,s=>i.replace(/(^:.*)|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,s):s?s+" "+l:l)):i):a!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=Qr.p?Qr.p(i,a):i+":"+a+";")}return n+(t&&o?t+"{"+o+"}":o)+r},Or={},Ix=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Ix(e[n]);return t}return e},w4=(e,t,n,r,o)=>{let i=Ix(e),a=Or[i]||(Or[i]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(i));if(!Or[a]){let l=i!==e?e:(c=>{let u,f,p=[{}];for(;u=g4.exec(c.replace(b4,""));)u[4]?p.shift():u[3]?(f=u[3].replace(Cx," ").trim(),p.unshift(p[0][f]=p[0][f]||{})):p[0][u[1]]=u[2].replace(Cx," ").trim();return p[0]})(e);Or[a]=Qr(o?{["@keyframes "+a]:l}:l,n?"":"."+a)}let s=n&&Or.g?Or.g:null;return n&&(Or.g=Or[a]),((l,c,u,f)=>{f?c.data=c.data.replace(f,l):c.data.indexOf(l)===-1&&(c.data=u?l+c.data:c.data+l)})(Or[a],t,r,s),a},x4=(e,t,n)=>e.reduce((r,o,i)=>{let a=t[i];if(a&&a.call){let s=a(n),l=s&&s.props&&s.props.className||/^go/.test(s)&&s;a=l?"."+l:s&&typeof s=="object"?s.props?"":Qr(s,""):s===!1?"":s}return r+o+(a??"")},"");function $l(e){let t=this||{},n=e.call?e(t.p):e;return w4(n.unshift?n.raw?x4(n,[].slice.call(arguments,1),t.p):n.reduce((r,o)=>Object.assign(r,o&&o.call?o(t.p):o),{}):n,y4(t.target),t.g,t.o,t.k)}let Ax,tp,np;$l.bind({g:1});let kr=$l.bind({k:1});function S4(e,t,n,r){Qr.p=t,Ax=e,tp=n,np=r}function eo(e,t){let n=this||{};return function(){let r=arguments;function o(i,a){let s=Object.assign({},i),l=s.className||o.className;n.p=Object.assign({theme:tp&&tp()},s),n.o=/ *go\d+/.test(l),s.className=$l.apply(n,r)+(l?" "+l:""),t&&(s.ref=a);let c=e;return e[0]&&(c=s.as||e,delete s.as),np&&c[0]&&np(s),Ax(c,s)}return t?t(o):o}}var E4=e=>typeof e=="function",Ol=(e,t)=>E4(e)?e(t):e,$4=(()=>{let e=0;return()=>(++e).toString()})(),Px=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),O4=20,kl=new Map,k4=1e3,Rx=e=>{if(kl.has(e))return;let t=setTimeout(()=>{kl.delete(e),Ao({type:4,toastId:e})},k4);kl.set(e,t)},_4=e=>{let t=kl.get(e);t&&clearTimeout(t)},rp=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,O4)};case 1:return t.toast.id&&_4(t.toast.id),{...e,toasts:e.toasts.map(i=>i.id===t.toast.id?{...i,...t.toast}:i)};case 2:let{toast:n}=t;return e.toasts.find(i=>i.id===n.id)?rp(e,{type:1,toast:n}):rp(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?Rx(r):e.toasts.forEach(i=>{Rx(i.id)}),{...e,toasts:e.toasts.map(i=>i.id===r||r===void 0?{...i,visible:!1}:i)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(i=>i.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(i=>({...i,pauseDuration:i.pauseDuration+o}))}}},_l=[],Tl={toasts:[],pausedAt:void 0},Ao=e=>{Tl=rp(Tl,e),_l.forEach(t=>{t(Tl)})},T4={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},C4=(e={})=>{let[t,n]=E.useState(Tl);E.useEffect(()=>(_l.push(n),()=>{let o=_l.indexOf(n);o>-1&&_l.splice(o,1)}),[t]);let r=t.toasts.map(o=>{var i,a;return{...e,...e[o.type],...o,duration:o.duration||((i=e[o.type])==null?void 0:i.duration)||(e==null?void 0:e.duration)||T4[o.type],style:{...e.style,...(a=e[o.type])==null?void 0:a.style,...o.style}}});return{...t,toasts:r}},I4=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||$4()}),ka=e=>(t,n)=>{let r=I4(t,e,n);return Ao({type:2,toast:r}),r.id},Tn=(e,t)=>ka("blank")(e,t);Tn.error=ka("error"),Tn.success=ka("success"),Tn.loading=ka("loading"),Tn.custom=ka("custom"),Tn.dismiss=e=>{Ao({type:3,toastId:e})},Tn.remove=e=>Ao({type:4,toastId:e}),Tn.promise=(e,t,n)=>{let r=Tn.loading(t.loading,{...n,...n==null?void 0:n.loading});return e.then(o=>(Tn.success(Ol(t.success,o),{id:r,...n,...n==null?void 0:n.success}),o)).catch(o=>{Tn.error(Ol(t.error,o),{id:r,...n,...n==null?void 0:n.error})}),e};var A4=(e,t)=>{Ao({type:1,toast:{id:e,height:t}})},P4=()=>{Ao({type:5,time:Date.now()})},R4=e=>{let{toasts:t,pausedAt:n}=C4(e);E.useEffect(()=>{if(n)return;let i=Date.now(),a=t.map(s=>{if(s.duration===1/0)return;let l=(s.duration||0)+s.pauseDuration-(i-s.createdAt);if(l<0){s.visible&&Tn.dismiss(s.id);return}return setTimeout(()=>Tn.dismiss(s.id),l)});return()=>{a.forEach(s=>s&&clearTimeout(s))}},[t,n]);let r=E.useCallback(()=>{n&&Ao({type:6,time:Date.now()})},[n]),o=E.useCallback((i,a)=>{let{reverseOrder:s=!1,gutter:l=8,defaultPosition:c}=a||{},u=t.filter(d=>(d.position||c)===(i.position||c)&&d.height),f=u.findIndex(d=>d.id===i.id),p=u.filter((d,h)=>h<f&&d.visible).length;return u.filter(d=>d.visible).slice(...s?[p+1]:[0,p]).reduce((d,h)=>d+(h.height||0)+l,0)},[t]);return{toasts:t,handlers:{updateHeight:A4,startPause:P4,endPause:r,calculateOffset:o}}},M4=kr`
|
|
68
|
+
`,Pt+=Gn):In==="id"?rt=Gn:In==="event"?tt=Gn:In==="retry"?(be=pe(Gn,be),_e=be):In==="heartbeatTimeout"&&(Oe=pe(Gn,Oe),Be!==0&&(o(Be),Be=r(function(){Fr()},Oe)))}if(pt===z){if(Pt!==""){Ne=rt,tt===""&&(tt="message");var vo=new B(tt,{data:Pt.slice(1),lastEventId:rt});if(R.dispatchEvent(vo),tt==="open"?le(R,R.onopen,vo):tt==="message"?le(R,R.onmessage,vo):tt==="error"&&le(R,R.onerror,vo),ct===j)return}Pt="",tt=""}pt=Mt==="\r".charCodeAt(0)?x:z}else pt===z&&(dn=Dt,pt=K),pt===K?Mt===":".charCodeAt(0)&&(Sn=Dt+1,pt=O):pt===O&&(pt=J)}}},gr=function(ot){if(ct===W||ct===V){ct=N,Be!==0&&(o(Be),Be=0),Be=r(function(){Fr()},_e),_e=he(Math.min(be*16,_e*2)),R.readyState=V;var ht=new D("error",{error:ot});R.dispatchEvent(ht),le(R,R.onerror,ht),ot!=null&&console.error(ot)}},Kn=function(){ct=j,ke!=null&&(ke.abort(),ke=void 0),Be!==0&&(o(Be),Be=0),R.readyState=j},Fr=function(){if(Be=0,ct!==N){if(!U&&ke!=null)gr(new Error("No activity within "+Oe+" milliseconds. "+(ct===V?"No response received.":Z+" chars received.")+" Reconnecting.")),ke!=null&&(ke.abort(),ke=void 0);else{var ot=Math.max((U||Date.now())+Oe-Date.now(),1);U=!1,Be=r(function(){Fr()},ot)}return}U=!1,Z=0,Be=r(function(){Fr()},Oe),ct=V,Pt="",tt="",rt=Ne,dt="",dn=0,Sn=0,pt=z;var ht=X;if(X.slice(0,5)!=="data:"&&X.slice(0,5)!=="blob:"&&Ne!==""){var Rt=X.indexOf("?");ht=Rt===-1?X:X.slice(0,Rt+1)+X.slice(Rt+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Gn,vo){return vo===xe?"":Gn}),ht+=(X.indexOf("?")===-1?"?":"&")+xe+"="+encodeURIComponent(Ne)}var Mt=R.withCredentials,qt={};qt.Accept="text/event-stream";var Dt=R.headers;if(Dt!=null)for(var In in Dt)Object.prototype.hasOwnProperty.call(Dt,In)&&(qt[In]=Dt[In]);try{ke=Ae.open(de,Vn,Lr,gr,ht,Mt,qt)}catch(Gn){throw Kn(),Gn}};R.url=X,R.readyState=V,R.withCredentials=ee,R.headers=H,R._close=Kn,Fr()}Q.prototype=Object.create(T.prototype),Q.prototype.CONNECTING=V,Q.prototype.OPEN=W,Q.prototype.CLOSED=j,Q.prototype.close=function(){this._close()},Q.CONNECTING=V,Q.OPEN=W,Q.CLOSED=j,Q.prototype.withCredentials=void 0;var Ee=l;i!=null&&(l==null||!("withCredentials"in l.prototype))&&(Ee=Q),function(R){{var X=R(t);X!==void 0&&(e.exports=X)}}(function(R){R.EventSourcePolyfill=Q,R.NativeEventSource=l,R.EventSource=Ee})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:Xe:globalThis)})(Qd,Qd.exports);var X3=Qd.exports;const Q3=Le(X3),e4=(e,t={})=>{const n=new Q3.EventSourcePolyfill(e,{headers:t.headers}),r=new Sx;return n.onopen=o=>r.emit("open",o),n.onmessage=o=>r.emit("message",o),n.onerror=o=>r.emit("error",o),{emitter:r,source:n}},t4=async(e,t={})=>{const{emitter:n,source:r}=e4(e,t);return await new Promise((o,i)=>{n.on("open",()=>{o()}),n.on("error",a=>{i(a)})}).finally(()=>n.cleanup()),{on:n.on.bind(n),close:()=>{n.cleanup(),r.close()}}},n4=w.object({type:w.literal("message_created"),data:w.object({id:w.string().describe("Id of the [Message](#schema_message)"),createdAt:w.string().datetime().describe("Creation date of the [Message](#schema_message) in ISO 8601 format"),payload:w.union([w.object({audioUrl:w.string().min(1),type:w.literal("audio")}),w.object({title:w.string().min(1),subtitle:w.string().min(1).optional(),imageUrl:w.string().min(1).optional(),actions:w.array(w.object({action:w.enum(["postback","url","say"]),label:w.string().min(1),value:w.string().min(1)})),type:w.literal("card")}),w.object({items:w.array(w.object({title:w.string().min(1),subtitle:w.string().min(1).optional(),imageUrl:w.string().min(1).optional(),actions:w.array(w.object({action:w.enum(["postback","url","say"]),label:w.string().min(1),value:w.string().min(1)}))})),type:w.literal("carousel")}),w.object({text:w.string().min(1),options:w.array(w.object({label:w.string().min(1),value:w.string().min(1)})),type:w.literal("choice"),disableFreeText:w.boolean().optional()}),w.object({text:w.string().min(1),options:w.array(w.object({label:w.string().min(1),value:w.string().min(1)})),type:w.literal("dropdown")}),w.object({fileUrl:w.string().min(1),title:w.string().min(1).optional(),type:w.literal("file")}),w.object({imageUrl:w.string().min(1),type:w.literal("image")}),w.object({latitude:w.number(),longitude:w.number(),address:w.string().optional(),title:w.string().optional(),type:w.literal("location")}),w.object({markdown:w.string().min(1),type:w.literal("markdown")}),w.object({text:w.string().min(1),type:w.literal("text")}),w.object({videoUrl:w.string().min(1),type:w.literal("video")}),w.object({items:w.array(w.union([w.object({type:w.literal("text"),payload:w.object({text:w.string().min(1)})}),w.object({type:w.literal("markdown"),payload:w.object({markdown:w.string().min(1)})}),w.object({type:w.literal("image"),payload:w.object({imageUrl:w.string().min(1)})}),w.object({type:w.literal("audio"),payload:w.object({audioUrl:w.string().min(1)})}),w.object({type:w.literal("video"),payload:w.object({videoUrl:w.string().min(1)})}),w.object({type:w.literal("file"),payload:w.object({fileUrl:w.string().min(1),title:w.string().min(1).optional()})}),w.object({type:w.literal("location"),payload:w.object({latitude:w.number(),longitude:w.number(),address:w.string().optional(),title:w.string().optional()})})])),type:w.literal("bloc")})]).describe("Payload is the content type of the message."),userId:w.string().describe("ID of the [User](#schema_user)"),conversationId:w.string().describe("ID of the [Conversation](#schema_conversation)")}).describe("The Message object represents a message in a [Conversation](#schema_conversation) for a specific [User](#schema_user).")}),r4=w.object({type:w.literal("webchat_visibility"),data:w.object({visibility:w.union([w.literal("show"),w.literal("hide"),w.literal("toggle")])})}),o4=w.object({type:w.literal("webchat_config"),data:w.object({config:w.record(w.union([w.any(),w.null()]))})}),i4=w.object({type:w.literal("custom"),data:w.object({event:w.record(w.union([w.any(),w.null()]))})}),a4=w.object({type:w.literal("typing_started"),data:w.object({timeout:w.number().optional()})}),s4=w.object({type:w.literal("typing_stopped"),data:w.record(w.never())}),l4={messageCreated:n4,webchatVisibility:r4,webchatConfig:o4,custom:i4,typingStarted:a4,typingStopped:s4},Ex="unknown error",Iu=class Iu extends Sx{constructor(n){super();we(this,"_state",{status:"disconnected"});we(this,"connect",async()=>{if(this._state.status==="connected")return;if(this._state.status==="connecting"){await this._state.connectionPromise;return}const n=this._connect();this._state={status:"connecting",connectionPromise:n},await n});we(this,"disconnect",async()=>{if(this._state.status==="disconnected")return;let n;this._state.status==="connecting"?n=await this._state.connectionPromise:n=this._state.source,this._disconnectSync(n)});we(this,"_connect",async()=>{const n=await t4(`${this._props.url}/conversations/${this._props.conversationId}/listen`,{headers:{"x-user-key":this._props.userKey}});return n.on("message",this._handleMessage),n.on("error",this._handleError(n)),this._state={status:"connected",source:n},n});we(this,"_disconnectSync",n=>{n.close(),this._state={status:"disconnected"}});we(this,"_handleMessage",n=>{const r=this._parseSignal(n.data);this.emit(r.type,r.data)});we(this,"_handleError",n=>r=>{this._disconnectSync(n);const o=this._toError(r);this.emit("error",o)});we(this,"_parseSignal",n=>{for(const r of Object.values(l4)){const o=this._safeJsonParse(n),i=r.safeParse(o);if(i.success)return i.data}return{type:"unknown",data:n}});we(this,"_safeJsonParse",n=>{try{return JSON.parse(n)}catch{return n}});we(this,"_toError",n=>{if(n instanceof Error)return n;if(typeof n=="string")return new Error(n);if(n===null)return new Error(Ex);if(typeof n=="object"&&"message"in n)return this._toError(n.message);try{const r=JSON.stringify(n);return new Error(r)}catch{return new Error(Ex)}});this._props=n}get status(){return this._state.status}};we(Iu,"listen",async n=>{const r=new Iu(n);return await r.connect(),r});let ep=Iu;const $x=100*1024*1024,c4=$x,u4=$x,f4=6e4;class d4{constructor(t){we(this,"_auto");we(this,"createConversation",t=>this._auto.createConversation(t));we(this,"getConversation",t=>this._auto.getConversation(t));we(this,"deleteConversation",t=>this._auto.deleteConversation(t));we(this,"listConversations",t=>this._auto.listConversations(t));we(this,"listConversationMessages",t=>this._auto.listConversationMessages(t));we(this,"addParticipant",t=>this._auto.addParticipant(t));we(this,"removeParticipant",t=>this._auto.removeParticipant(t));we(this,"getParticipant",t=>this._auto.getParticipant(t));we(this,"listParticipants",t=>this._auto.listParticipants(t));we(this,"createMessage",t=>this._auto.createMessage(t));we(this,"getMessage",t=>this._auto.getMessage(t));we(this,"deleteMessage",t=>this._auto.deleteMessage(t));we(this,"createFile",t=>this._auto.createFile(t));we(this,"createUser",t=>this._auto.createUser(t));we(this,"getUser",t=>this._auto.getUser(t));we(this,"updateUser",t=>this._auto.updateUser(t));we(this,"deleteUser",t=>this._auto.deleteUser(t));we(this,"createEvent",t=>this._auto.createEvent(t));we(this,"getEvent",t=>this._auto.getEvent(t));we(this,"listenConversation",async({id:t,"x-user-key":n})=>await ep.listen({url:this.props.apiUrl,conversationId:t,userKey:n}));this.props=t;const{apiUrl:n}=t,r={...t.headers},o=t.timeout??f4,i=Pw.create({baseURL:n,headers:r,withCredentials:!0,timeout:o,maxBodyLength:c4,maxContentLength:u4});this._auto=new J3(i)}}const El={disconnected:0,user_creating:1,user_created:2,conversation_creating:3,conversation_created:4},sn=(e,t)=>e.status===t,ir=(e,t)=>El[e.status]<El[t],Ox=(e,t)=>El[e.status]>=El[t];class ar extends Error{constructor(t){super(`Unexpected state: ${t.status}`),this.state=t}}const kx=["audio","file","image","video"],_x=e=>kx.includes(e);class p4 extends Lg{constructor(n){super();we(this,"_client");we(this,"_webhookId");we(this,"_apiUrl");we(this,"_state",{status:"disconnected"});we(this,"mode","pushpin");we(this,"_initialConnect",async({data:n,name:r,pictureUrl:o})=>{if(Ox(this._state,"user_created"))throw new Error("Client is already connected. Please disconnect first.");if(sn(this._state,"user_creating"))return;this._state={status:"user_creating"};const{user:{id:i},key:a}=await this._client.createUser({name:r,pictureUrl:o,userData:n});return this._state={status:"user_created",userId:i,userKey:a},{userId:i,userToken:a}});we(this,"_reConnect",async(n,{data:r,name:o,pictureUrl:i})=>{if(Ox(this._state,"user_created")){if(this._state.userId!==n.userId)throw new Error("Client is already connected. Please disconnect first.");return n}return sn(this._state,"user_creating")||(this._state={status:"user_created",userId:n.userId,userKey:n.userToken},await this._client.updateUser({"x-user-key":n.userToken,name:o,pictureUrl:i,userData:r})),n});we(this,"_mapMessage",n=>{const{payload:r,disableInput:o}=ra(n.payload);return{id:n.id,conversationId:n.conversationId,authorId:n.userId,sentOn:new Date(n.createdAt),payload:r,disableInput:o}});const r=`${n.apiUrl}/${n.clientId}`;this._webhookId=n.clientId,this._apiUrl=r,this._client=new d4({apiUrl:r})}get apiUrl(){return this._apiUrl}get clientId(){return this._webhookId}get userId(){if(!ir(this._state,"user_created"))return this._state.userId}async getUser(){if(ir(this._state,"user_created"))throw new ar(this._state);const{user:n}=await this._client.getUser({"x-user-key":this._state.userKey});return{data:n.data}}async updateUser(n){if(ir(this._state,"user_created"))throw new ar(this._state);const{user:r}=await this._client.updateUser({"x-user-key":this._state.userKey,name:n.name,pictureUrl:n.pictureUrl,userData:n.data});return r}get conversationId(){if(!ir(this._state,"conversation_created"))return this._state.conversationId}async connect(n,r,o={}){const i={data:r,...o};return n?await this.userExists(n)?this._reConnect(n,i):this._initialConnect(i):this._initialConnect(i)}async disconnect(){sn(this._state,"conversation_created")?this._state.signalEmitter.cleanup():sn(this._state,"conversation_creating")&&console.warn("zombie conversation..."),this._state={status:"disconnected"}}async sendFile(n){if(ir(this._state,"user_created"))throw new ar(this._state);if(sn(this._state,"conversation_creating"))throw new ar(this._state);let r;sn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state));const{size:o,name:i}=n,s=await(h=>new Promise((m,y)=>{const v=new FileReader;v.onload=g=>{var b;return m((b=g.target)==null?void 0:b.result)},v.onerror=g=>{var b;return y((b=g.target)==null?void 0:b.error)},v.readAsArrayBuffer(h)}))(n),{file:{uploadUrl:l,contentType:c,url:u}}=await this._client.createFile({"x-user-key":r.userKey,size:o,key:i,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"}});await fetch(l,{method:"PUT",headers:{"x-amz-tagging":"public=true"},body:s});const f=c.split("/").shift()??"",p=_x(f)?f:"file",d=p==="image"?{type:p,imageUrl:u}:p==="audio"?{type:p,audioUrl:u}:p==="video"?{type:p,videoUrl:u}:{type:p,fileUrl:u};return await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:d}),this.emit("messageSent",d),{fileUrl:u,name:i,type:p}}async sendMessage(n){if(ir(this._state,"user_created"))throw new ar(this._state);if(sn(this._state,"conversation_creating"))throw new ar(this._state);let r;sn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:n}),this.emit("messageSent",n)}async sendEvent(n){if(ir(this._state,"user_created"))throw new ar(this._state);if(sn(this._state,"conversation_creating"))throw new ar(this._state);let r;sn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createEvent({"x-user-key":r.userKey,conversationId:r.conversationId,payload:{type:"custom",data:n}})}async switchConversation(n){if(ir(this._state,"user_created"))throw new ar(this._state);sn(this._state,"conversation_created")&&this._state.conversationId===n||sn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._connectConversation(this._state,n))}async conversationExists(n){if(ir(this._state,"user_created"))return!1;try{return await this._client.getConversation({"x-user-key":this._state.userKey,id:n}),!0}catch(r){if(Sd(r)&&r.code===404)return!1;throw r}}async userExists({userToken:n}){try{return await this._client.getUser({"x-user-key":n}),!0}catch(r){const o=i=>i.code===404||i.code===401;if(Sd(r)&&o(r))return!1;throw r}}async newConversation(){if(ir(this._state,"user_created"))throw new ar(this._state);sn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._createNewConversation(this._state))}async _createNewConversation(n){const{conversation:{id:r}}=await this._client.createConversation({"x-user-key":n.userKey}),o=await this._connectConversation(n,r);return await this._client.createEvent({"x-user-key":n.userKey,conversationId:r,payload:{type:"conversation_started",data:{}}}),o}async listMessages(){if(!sn(this._state,"conversation_created"))return[];const{conversationId:n,userKey:r}=this._state,o=[];let i;do{const a=await this._client.listConversationMessages({id:n,"x-user-key":r,nextToken:i});o.push(...a.messages),i=a.meta.nextToken}while(i);return o.map(this._mapMessage)}async _connectConversation(n,r){const o=await this._client.listenConversation({id:r,"x-user-key":n.userKey});return o.on("unknown",i=>{typeof i=="string"&&i==="ping"||console.debug("unknown event",i)}),o.on("message_created",i=>{i.userId!==n.userId&&this.emit("message",this._mapMessage(i))}),o.on("error",()=>{this._state={status:"user_created",userId:n.userId,userKey:n.userKey},this.emit("error",new Error("Connection to conversation lost"))}),o.on("webchat_visibility",i=>{this.emit("webchatVisibility",i.visibility)}),o.on("webchat_config",i=>{this.emit("webchatConfig",i.config)}),o.on("typing_started",i=>{this.emit("isTyping",{isTyping:!0,timeout:i.timeout??5e3})}),o.on("typing_stopped",()=>{this.emit("isTyping",{isTyping:!1,timeout:0})}),o.on("custom",i=>{this.emit("customEvent",i.event)}),this.emit("conversation",r),this._state={status:"conversation_created",userId:n.userId,userKey:n.userKey,conversationId:r,signalEmitter:o},this._state}}const Tx=({clientId:e,apiUrl:t="https://webchat.botpress.cloud"})=>new p4({apiUrl:t,clientId:e}),h4=({clientId:e,apiUrl:t="https://webchat.botpress.cloud"})=>{const[n]=E.useState(Tx({clientId:e,apiUrl:t}));return n},m4=(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 o=null;const i=new Image;i.addEventListener("load",()=>{o&&clearTimeout(o),n({width:i.naturalWidth,height:i.naturalHeight})}),i.addEventListener("error",a=>{o&&clearTimeout(o),r(`${a.type}: ${a.message}`)}),i.src=e,t.timeout&&(o=setTimeout(()=>r("Timeout"),t.timeout))});let v4={data:""},y4=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||v4,g4=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,b4=/\/\*[^]*?\*\/| +/g,Cx=/\n+/g,Qr=(e,t)=>{let n="",r="",o="";for(let i in e){let a=e[i];i[0]=="@"?i[1]=="i"?n=i+" "+a+";":r+=i[1]=="f"?Qr(a,i):i+"{"+Qr(a,i[1]=="k"?"":t)+"}":typeof a=="object"?r+=Qr(a,t?t.replace(/([^,])+/g,s=>i.replace(/(^:.*)|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,s):s?s+" "+l:l)):i):a!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=Qr.p?Qr.p(i,a):i+":"+a+";")}return n+(t&&o?t+"{"+o+"}":o)+r},Or={},Ix=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Ix(e[n]);return t}return e},w4=(e,t,n,r,o)=>{let i=Ix(e),a=Or[i]||(Or[i]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(i));if(!Or[a]){let l=i!==e?e:(c=>{let u,f,p=[{}];for(;u=g4.exec(c.replace(b4,""));)u[4]?p.shift():u[3]?(f=u[3].replace(Cx," ").trim(),p.unshift(p[0][f]=p[0][f]||{})):p[0][u[1]]=u[2].replace(Cx," ").trim();return p[0]})(e);Or[a]=Qr(o?{["@keyframes "+a]:l}:l,n?"":"."+a)}let s=n&&Or.g?Or.g:null;return n&&(Or.g=Or[a]),((l,c,u,f)=>{f?c.data=c.data.replace(f,l):c.data.indexOf(l)===-1&&(c.data=u?l+c.data:c.data+l)})(Or[a],t,r,s),a},x4=(e,t,n)=>e.reduce((r,o,i)=>{let a=t[i];if(a&&a.call){let s=a(n),l=s&&s.props&&s.props.className||/^go/.test(s)&&s;a=l?"."+l:s&&typeof s=="object"?s.props?"":Qr(s,""):s===!1?"":s}return r+o+(a??"")},"");function $l(e){let t=this||{},n=e.call?e(t.p):e;return w4(n.unshift?n.raw?x4(n,[].slice.call(arguments,1),t.p):n.reduce((r,o)=>Object.assign(r,o&&o.call?o(t.p):o),{}):n,y4(t.target),t.g,t.o,t.k)}let Ax,tp,np;$l.bind({g:1});let kr=$l.bind({k:1});function S4(e,t,n,r){Qr.p=t,Ax=e,tp=n,np=r}function eo(e,t){let n=this||{};return function(){let r=arguments;function o(i,a){let s=Object.assign({},i),l=s.className||o.className;n.p=Object.assign({theme:tp&&tp()},s),n.o=/ *go\d+/.test(l),s.className=$l.apply(n,r)+(l?" "+l:""),t&&(s.ref=a);let c=e;return e[0]&&(c=s.as||e,delete s.as),np&&c[0]&&np(s),Ax(c,s)}return t?t(o):o}}var E4=e=>typeof e=="function",Ol=(e,t)=>E4(e)?e(t):e,$4=(()=>{let e=0;return()=>(++e).toString()})(),Px=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),O4=20,kl=new Map,k4=1e3,Rx=e=>{if(kl.has(e))return;let t=setTimeout(()=>{kl.delete(e),Ao({type:4,toastId:e})},k4);kl.set(e,t)},_4=e=>{let t=kl.get(e);t&&clearTimeout(t)},rp=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,O4)};case 1:return t.toast.id&&_4(t.toast.id),{...e,toasts:e.toasts.map(i=>i.id===t.toast.id?{...i,...t.toast}:i)};case 2:let{toast:n}=t;return e.toasts.find(i=>i.id===n.id)?rp(e,{type:1,toast:n}):rp(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?Rx(r):e.toasts.forEach(i=>{Rx(i.id)}),{...e,toasts:e.toasts.map(i=>i.id===r||r===void 0?{...i,visible:!1}:i)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(i=>i.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(i=>({...i,pauseDuration:i.pauseDuration+o}))}}},_l=[],Tl={toasts:[],pausedAt:void 0},Ao=e=>{Tl=rp(Tl,e),_l.forEach(t=>{t(Tl)})},T4={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},C4=(e={})=>{let[t,n]=E.useState(Tl);E.useEffect(()=>(_l.push(n),()=>{let o=_l.indexOf(n);o>-1&&_l.splice(o,1)}),[t]);let r=t.toasts.map(o=>{var i,a;return{...e,...e[o.type],...o,duration:o.duration||((i=e[o.type])==null?void 0:i.duration)||(e==null?void 0:e.duration)||T4[o.type],style:{...e.style,...(a=e[o.type])==null?void 0:a.style,...o.style}}});return{...t,toasts:r}},I4=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||$4()}),ka=e=>(t,n)=>{let r=I4(t,e,n);return Ao({type:2,toast:r}),r.id},Tn=(e,t)=>ka("blank")(e,t);Tn.error=ka("error"),Tn.success=ka("success"),Tn.loading=ka("loading"),Tn.custom=ka("custom"),Tn.dismiss=e=>{Ao({type:3,toastId:e})},Tn.remove=e=>Ao({type:4,toastId:e}),Tn.promise=(e,t,n)=>{let r=Tn.loading(t.loading,{...n,...n==null?void 0:n.loading});return e.then(o=>(Tn.success(Ol(t.success,o),{id:r,...n,...n==null?void 0:n.success}),o)).catch(o=>{Tn.error(Ol(t.error,o),{id:r,...n,...n==null?void 0:n.error})}),e};var A4=(e,t)=>{Ao({type:1,toast:{id:e,height:t}})},P4=()=>{Ao({type:5,time:Date.now()})},R4=e=>{let{toasts:t,pausedAt:n}=C4(e);E.useEffect(()=>{if(n)return;let i=Date.now(),a=t.map(s=>{if(s.duration===1/0)return;let l=(s.duration||0)+s.pauseDuration-(i-s.createdAt);if(l<0){s.visible&&Tn.dismiss(s.id);return}return setTimeout(()=>Tn.dismiss(s.id),l)});return()=>{a.forEach(s=>s&&clearTimeout(s))}},[t,n]);let r=E.useCallback(()=>{n&&Ao({type:6,time:Date.now()})},[n]),o=E.useCallback((i,a)=>{let{reverseOrder:s=!1,gutter:l=8,defaultPosition:c}=a||{},u=t.filter(d=>(d.position||c)===(i.position||c)&&d.height),f=u.findIndex(d=>d.id===i.id),p=u.filter((d,h)=>h<f&&d.visible).length;return u.filter(d=>d.visible).slice(...s?[p+1]:[0,p]).reduce((d,h)=>d+(h.height||0)+l,0)},[t]);return{toasts:t,handlers:{updateHeight:A4,startPause:P4,endPause:r,calculateOffset:o}}},M4=kr`
|
|
69
69
|
from {
|
|
70
70
|
transform: scale(0) rotate(45deg);
|
|
71
71
|
opacity: 0;
|