@botpress/webchat 2.2.18 → 2.2.20
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 +5 -5
- package/dist/components/Block.d.ts +2 -2
- package/dist/components/Message/Message.d.ts +1 -1
- package/dist/components/renderers/Audio/Audio.d.ts +1 -1
- package/dist/components/renderers/Carousel/Carousel.d.ts +1 -1
- package/dist/components/renderers/File/File.d.ts +1 -1
- package/dist/components/renderers/Image/Image.d.ts +1 -1
- package/dist/components/renderers/Location/Location.d.ts +1 -1
- package/dist/components/renderers/Video/Video.d.ts +1 -1
- package/dist/index.js +31 -29
- package/dist/index.umd.cjs +2 -2
- package/dist/types/block-type.d.ts +14 -13
- package/package.json +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @botpress/webchat@2.2.
|
|
2
|
+
> @botpress/webchat@2.2.20 build /home/runner/work/echo/echo/packages/webchat-frontend
|
|
3
3
|
> vite build
|
|
4
4
|
|
|
5
5
|
[36mvite v4.4.11 [32mbuilding for production...[36m[39m
|
|
@@ -16,9 +16,9 @@ rendering chunks...
|
|
|
16
16
|
[36m[vite:dts][32m Start generate declaration files...[39m
|
|
17
17
|
computing gzip size...
|
|
18
18
|
[2mdist/[22m[35mstyle.css [39m[1m[2m 29.84 kB[22m[1m[22m[2m │ gzip: 5.72 kB[22m
|
|
19
|
-
[2mdist/[22m[36mindex.js [39m[1m[33m1,
|
|
20
|
-
[32m[36m[vite:dts][32m Declaration files built in
|
|
19
|
+
[2mdist/[22m[36mindex.js [39m[1m[33m1,045.16 kB[39m[22m[2m │ gzip: 274.58 kB[22m
|
|
20
|
+
[32m[36m[vite:dts][32m Declaration files built in 14972ms.
|
|
21
21
|
[39m
|
|
22
22
|
[2mdist/[22m[35mstyle.css [39m[1m[2m 29.84 kB[22m[1m[22m[2m │ gzip: 5.72 kB[22m
|
|
23
|
-
[2mdist/[22m[36mindex.umd.cjs [39m[1m[33m712.
|
|
24
|
-
[32m✓ built in 24.
|
|
23
|
+
[2mdist/[22m[36mindex.umd.cjs [39m[1m[33m712.77 kB[39m[22m[2m │ gzip: 227.66 kB[22m
|
|
24
|
+
[32m✓ built in 24.75s[39m
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
|
-
import { BlockObjects, BlockType } from '../types';
|
|
2
|
+
import { BlockObjects, BlockType, type CommonBlockProps } from '../types';
|
|
3
3
|
type BlockProps<T extends BlockType> = {
|
|
4
4
|
block: BlockObjects[T];
|
|
5
|
-
};
|
|
5
|
+
} & CommonBlockProps;
|
|
6
6
|
export declare const Block: <T extends BlockType>({ block, ...props }: BlockProps<T>) => JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -3,4 +3,4 @@ import type { MessageObject } from '../../types';
|
|
|
3
3
|
export declare const Message: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<{
|
|
4
4
|
scroll: () => void;
|
|
5
5
|
children?: ReactNode;
|
|
6
|
-
} &
|
|
6
|
+
} & MessageObject & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const Audio: import("react").ForwardRefExoticComponent<import("../../../adapters/target").AudioMessage & import("react").RefAttributes<HTMLAudioElement>>;
|
|
1
|
+
export declare const Audio: import("react").ForwardRefExoticComponent<import("../../../adapters/target").AudioMessage & import("../../..").CommonBlockProps & import("react").RefAttributes<HTMLAudioElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const Carousel: import("react").ForwardRefExoticComponent<import("../../../adapters/target").CarouselMessage & import("react").RefAttributes<HTMLDivElement>>;
|
|
1
|
+
export declare const Carousel: import("react").ForwardRefExoticComponent<import("../../../adapters/target").CarouselMessage & import("../../..").CommonBlockProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const File: import("react").ForwardRefExoticComponent<import("../../../adapters/target").FileMessage & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
1
|
+
export declare const File: import("react").ForwardRefExoticComponent<import("../../../adapters/target").FileMessage & import("../../..").CommonBlockProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const Image: import("react").ForwardRefExoticComponent<import("../../../adapters/target").ImageMessage & import("react").RefAttributes<HTMLImageElement>>;
|
|
1
|
+
export declare const Image: import("react").ForwardRefExoticComponent<import("../../../adapters/target").ImageMessage & import("../../..").CommonBlockProps & import("react").RefAttributes<HTMLImageElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const Location: import("react").ForwardRefExoticComponent<import("../../../adapters/target").LocationMessage & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
1
|
+
export declare const Location: import("react").ForwardRefExoticComponent<import("../../../adapters/target").LocationMessage & import("../../..").CommonBlockProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const Video: import("react").ForwardRefExoticComponent<import("../../../adapters/target").VideoMessage & import("react").RefAttributes<HTMLVideoElement>>;
|
|
1
|
+
export declare const Video: import("react").ForwardRefExoticComponent<import("../../../adapters/target").VideoMessage & import("../../..").CommonBlockProps & import("react").RefAttributes<HTMLVideoElement>>;
|
package/dist/index.js
CHANGED
|
@@ -23097,14 +23097,16 @@ const A7 = ({ text: e, buttonValue: t, type: n, variant: r, groupId: o, reusable
|
|
|
23097
23097
|
}
|
|
23098
23098
|
const { variant: t, ...n } = e;
|
|
23099
23099
|
return /* @__PURE__ */ j.jsx("button", { type: "button", ...n });
|
|
23100
|
-
}, I7 = We(
|
|
23101
|
-
|
|
23102
|
-
|
|
23103
|
-
|
|
23104
|
-
|
|
23105
|
-
|
|
23106
|
-
|
|
23107
|
-
|
|
23100
|
+
}, I7 = We(
|
|
23101
|
+
({ block: e, type: t, direction: n, timestamp: r, sender: o, ...i }, a) => {
|
|
23102
|
+
const {
|
|
23103
|
+
message: {
|
|
23104
|
+
blocks: { bubble: s }
|
|
23105
|
+
}
|
|
23106
|
+
} = mt;
|
|
23107
|
+
return /* @__PURE__ */ j.jsx("div", { ...i, ...s, ref: a, children: /* @__PURE__ */ j.jsx(Hs, { direction: n, timestamp: r, sender: o, block: e }) });
|
|
23108
|
+
}
|
|
23109
|
+
), Q_ = Ko(null);
|
|
23108
23110
|
function M7() {
|
|
23109
23111
|
const e = Cr(Q_);
|
|
23110
23112
|
if (!e)
|
|
@@ -23300,22 +23302,22 @@ const X7 = /* @__PURE__ */ k.forwardRef(J7), Q7 = X7, eU = We(({ type: e, latitu
|
|
|
23300
23302
|
/* @__PURE__ */ j.jsx(Q7, { ...s.icon })
|
|
23301
23303
|
] });
|
|
23302
23304
|
}), tU = We(
|
|
23303
|
-
({ blocks: e, type: t, horizontalAlignment: n, verticalAlignment: r,
|
|
23305
|
+
({ blocks: e, type: t, horizontalAlignment: n, verticalAlignment: r, direction: o, sender: i, timestamp: a, ...s }, c) => {
|
|
23304
23306
|
const {
|
|
23305
23307
|
message: {
|
|
23306
|
-
blocks: { column:
|
|
23308
|
+
blocks: { column: l }
|
|
23307
23309
|
}
|
|
23308
23310
|
} = mt;
|
|
23309
|
-
return /* @__PURE__ */ j.jsx("div", { "data-horizontal": n, "data-vertical": r, ...
|
|
23311
|
+
return /* @__PURE__ */ j.jsx("div", { "data-horizontal": n, "data-vertical": r, ...s, ...l, ref: c, children: e.map((u, f) => /* @__PURE__ */ j.jsx(Hs, { block: u, direction: o, sender: i, timestamp: a }, f)) });
|
|
23310
23312
|
}
|
|
23311
23313
|
), nU = We(
|
|
23312
|
-
({ blocks: e, type: t, horizontalAlignment: n, verticalAlignment: r,
|
|
23314
|
+
({ blocks: e, type: t, horizontalAlignment: n, verticalAlignment: r, direction: o, sender: i, timestamp: a, ...s }, c) => {
|
|
23313
23315
|
const {
|
|
23314
23316
|
message: {
|
|
23315
|
-
blocks: { row:
|
|
23317
|
+
blocks: { row: l }
|
|
23316
23318
|
}
|
|
23317
23319
|
} = mt;
|
|
23318
|
-
return /* @__PURE__ */ j.jsx("div", { "data-horizontal": n, "data-vertical": r, ...
|
|
23320
|
+
return /* @__PURE__ */ j.jsx("div", { "data-horizontal": n, "data-vertical": r, ...s, ...l, ref: c, children: e.map((u, f) => /* @__PURE__ */ j.jsx(Hs, { block: u, direction: o, sender: i, timestamp: a }, f)) });
|
|
23319
23321
|
}
|
|
23320
23322
|
);
|
|
23321
23323
|
function rU(e) {
|
|
@@ -24611,32 +24613,32 @@ function XU({
|
|
|
24611
24613
|
clipRule: "evenodd"
|
|
24612
24614
|
}));
|
|
24613
24615
|
}
|
|
24614
|
-
const QU = /* @__PURE__ */ k.forwardRef(XU), e9 = QU, t9 = We(({ blocks: e },
|
|
24615
|
-
const [
|
|
24616
|
+
const QU = /* @__PURE__ */ k.forwardRef(XU), e9 = QU, t9 = We(({ blocks: e, direction: t, sender: n, timestamp: r }, o) => {
|
|
24617
|
+
const [i, a] = Hm({ skipSnaps: !0 }), [s, c] = Le(!0), [l, u] = Le(!0), f = at(() => a == null ? void 0 : a.scrollPrev(), [a]), p = at(() => a == null ? void 0 : a.scrollNext(), [a]), {
|
|
24616
24618
|
message: {
|
|
24617
|
-
blocks: { carousel:
|
|
24619
|
+
blocks: { carousel: d }
|
|
24618
24620
|
}
|
|
24619
|
-
} = mt,
|
|
24620
|
-
|
|
24621
|
+
} = mt, h = at((m) => {
|
|
24622
|
+
c(!m.canScrollPrev()), u(!m.canScrollNext());
|
|
24621
24623
|
}, []);
|
|
24622
24624
|
return Ne(() => {
|
|
24623
|
-
|
|
24624
|
-
}, [
|
|
24625
|
-
/* @__PURE__ */ j.jsx("div", { ref:
|
|
24625
|
+
a && (h(a), a.on("reInit", h), a.on("select", h));
|
|
24626
|
+
}, [a, h]), /* @__PURE__ */ j.jsxs("div", { ...d == null ? void 0 : d.container, "data-container": "carousel", ref: i, children: [
|
|
24627
|
+
/* @__PURE__ */ j.jsx("div", { ref: o, ...d == null ? void 0 : d.slidesContainer, children: e.map((m, v) => /* @__PURE__ */ j.jsx(Hs, { block: m, direction: t, sender: n, timestamp: r }, v)) }),
|
|
24626
24628
|
/* @__PURE__ */ j.jsx(
|
|
24627
24629
|
DU,
|
|
24628
24630
|
{
|
|
24629
|
-
...
|
|
24630
|
-
"data-disabled":
|
|
24631
|
-
onClick:
|
|
24631
|
+
...d == null ? void 0 : d.backButton,
|
|
24632
|
+
"data-disabled": s ? "" : void 0,
|
|
24633
|
+
onClick: f
|
|
24632
24634
|
}
|
|
24633
24635
|
),
|
|
24634
24636
|
/* @__PURE__ */ j.jsx(
|
|
24635
24637
|
LU,
|
|
24636
24638
|
{
|
|
24637
|
-
...
|
|
24638
|
-
"data-disabled":
|
|
24639
|
-
onClick:
|
|
24639
|
+
...d == null ? void 0 : d.nextButton,
|
|
24640
|
+
"data-disabled": l ? "" : void 0,
|
|
24641
|
+
onClick: p
|
|
24640
24642
|
}
|
|
24641
24643
|
)
|
|
24642
24644
|
] });
|
|
@@ -29538,7 +29540,7 @@ const vH = dH, gH = mH, bH = (e) => /* @__PURE__ */ k.createElement("svg", { xml
|
|
|
29538
29540
|
/* @__PURE__ */ j.jsx(wS, { ...(v = u == null ? void 0 : u.avatar) == null ? void 0 : v.image, src: (i == null ? void 0 : i.avatar) ?? f }),
|
|
29539
29541
|
/* @__PURE__ */ j.jsx(xS, { ...(y = u == null ? void 0 : u.avatar) == null ? void 0 : y.fallback, children: (i == null ? void 0 : i.name[0]) ?? ((g = p ?? "Bot") == null ? void 0 : g[0]) })
|
|
29540
29542
|
] }),
|
|
29541
|
-
t && /* @__PURE__ */ j.jsx(Hs, { block: t }),
|
|
29543
|
+
t && /* @__PURE__ */ j.jsx(Hs, { block: t, direction: e, sender: i, timestamp: a.timestamp }),
|
|
29542
29544
|
o
|
|
29543
29545
|
]
|
|
29544
29546
|
}
|
package/dist/index.umd.cjs
CHANGED
|
@@ -277,7 +277,7 @@ to {
|
|
|
277
277
|
[zustand devtools middleware] Unsupported __setState action format.
|
|
278
278
|
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
|
|
279
279
|
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|
|
280
|
-
`);const g=y.state[s];if(g==null)return;JSON.stringify(o.getState())!==JSON.stringify(g)&&d(g);return}o.dispatchFromDevtools&&typeof o.dispatch=="function"&&o.dispatch(y)});case"DISPATCH":switch(m.payload.type){case"RESET":return d(h),s===void 0?u==null?void 0:u.init(o.getState()):u==null?void 0:u.init(_l(c.name));case"COMMIT":if(s===void 0){u==null||u.init(o.getState());return}return u==null?void 0:u.init(_l(c.name));case"ROLLBACK":return Fp(m.state,y=>{if(s===void 0){d(y),u==null||u.init(o.getState());return}d(y[s]),u==null||u.init(_l(c.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Fp(m.state,y=>{if(s===void 0){d(y);return}JSON.stringify(o.getState())!==JSON.stringify(y[s])&&d(y[s])});case"IMPORT_STATE":{const{nextLiftedState:y}=m.payload,g=(v=y.computedStates.slice(-1)[0])==null?void 0:v.state;if(!g)return;d(s===void 0?g:g[s]),u==null||u.send(null,y);return}case"PAUSE_RECORDING":return p=!p}return}}),h},Fp=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)};function D6(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var i;const a=c=>c===null?null:JSON.parse(c,t==null?void 0:t.reviver),s=(i=n.getItem(o))!=null?i:null;return s instanceof Promise?s.then(a):a(s)},setItem:(o,i)=>n.setItem(o,JSON.stringify(i,t==null?void 0:t.replacer)),removeItem:o=>n.removeItem(o)}}const as=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return as(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return as(r)(n)}}}},j6=(e,t)=>(n,r,o)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:v=>v,version:0,merge:(v,y)=>({...y,...v}),...t},a=!1;const s=new Set,c=new Set;let l;try{l=i.getStorage()}catch{}if(!l)return e((...v)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...v)},r,o);const u=as(i.serialize),f=()=>{const v=i.partialize({...r()});let y;const g=u({state:v,version:i.version}).then(b=>l.setItem(i.name,b)).catch(b=>{y=b});if(y)throw y;return g},p=o.setState;o.setState=(v,y)=>{p(v,y),f()};const d=e((...v)=>{n(...v),f()},r,o);let h;const m=()=>{var v;if(!l)return;a=!1,s.forEach(g=>g(r()));const y=((v=i.onRehydrateStorage)==null?void 0:v.call(i,r()))||void 0;return as(l.getItem.bind(l))(i.name).then(g=>{if(g)return i.deserialize(g)}).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==i.version){if(i.migrate)return i.migrate(g.state,g.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return g.state}).then(g=>{var b;return h=i.merge(g,(b=r())!=null?b:d),n(h,!0),f()}).then(()=>{y==null||y(h,void 0),a=!0,c.forEach(g=>g(h))}).catch(g=>{y==null||y(void 0,g)})};return o.persist={setOptions:v=>{i={...i,...v},v.getStorage&&(l=v.getStorage())},clearStorage:()=>{l==null||l.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>m(),hasHydrated:()=>a,onHydrate:v=>(s.add(v),()=>{s.delete(v)}),onFinishHydration:v=>(c.add(v),()=>{c.delete(v)})},m(),h||d},F6=(e,t)=>(n,r,o)=>{let i={storage:D6(()=>localStorage),partialize:m=>m,version:0,merge:(m,v)=>({...v,...m}),...t},a=!1;const s=new Set,c=new Set;let l=i.storage;if(!l)return e((...m)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...m)},r,o);const u=()=>{const m=i.partialize({...r()});return l.setItem(i.name,{state:m,version:i.version})},f=o.setState;o.setState=(m,v)=>{f(m,v),u()};const p=e((...m)=>{n(...m),u()},r,o);let d;const h=()=>{var m,v;if(!l)return;a=!1,s.forEach(g=>{var b;return g((b=r())!=null?b:p)});const y=((v=i.onRehydrateStorage)==null?void 0:v.call(i,(m=r())!=null?m:p))||void 0;return as(l.getItem.bind(l))(i.name).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==i.version){if(i.migrate)return i.migrate(g.state,g.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return g.state}).then(g=>{var b;return d=i.merge(g,(b=r())!=null?b:p),n(d,!0),u()}).then(()=>{y==null||y(d,void 0),d=r(),a=!0,c.forEach(g=>g(d))}).catch(g=>{y==null||y(void 0,g)})};return o.persist={setOptions:m=>{i={...i,...m},m.storage&&(l=m.storage)},clearStorage:()=>{l==null||l.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>h(),hasHydrated:()=>a,onHydrate:m=>(s.add(m),()=>{s.delete(m)}),onFinishHydration:m=>(c.add(m),()=>{c.delete(m)})},i.skipHydration||h(),d||p},L6=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?j6(e,t):F6(e,t),_n=M6()(Ox(L6((e,t)=>({messageHistory:{},addMessageToHistory:({userId:n,message:r})=>e(o=>({...o,messageHistory:{...o.messageHistory,[n]:[r,...(o.messageHistory[n]??[]).slice(0,100)]}})),clientMode:"",setClientMode:n=>{const{clearAll:r,clientMode:o}=t();o!==n&&r(),e(i=>({...i,clientMode:n}))},setUser:n=>e(r=>({...r,user:n})),setConversationId:n=>e(r=>({...r,conversationId:n})),clearAll:()=>{e(n=>({...n,messageHistory:{},user:void 0,conversationId:void 0}))}}),{name:"botpress-webchat"}))),Tx=E.createContext(null),B6=e=>{const t={configuration:{},messages:{},connected:!0,disableComposer:!1,renderers:{},isReadOnly:!1,userData:{},userName:void 0,userPictureUrl:void 0,closeWindow:void 0,messageContainerRef:{current:null},isTyping:!1,lastTypingHeartbeat:null,allowFileUpload:!1,conversationId:void 0,disableRestartConversation:!1},n=e==null?void 0:e.client,r=e==null?void 0:e.conversationId,o=_n.getState().setClientMode,i=_n.getState().setConversationId;return n&&o(n.mode),E.useEffect(()=>{r&&i(r)},[r]),bx()(Ox((a,s)=>{const c=f=>{const p=_n.getState().conversationId;if(p)return a(d=>{const h=d.messages[p]??[];return{...d,messages:{...d.messages,[p]:[...h.filter(m=>m.id!==f.id),{id:dc(),...f}]}}})},l=f=>{const p=_n.getState().conversationId;if(p)return a(d=>({...d,messages:{...d.messages,[p]:f}}))},u=_n.getState().addMessageToHistory;return{...t,...e,eventEmitter:QA,client:n,sendFile:f=>s().client.sendFile(f),sendTextMessage:async f=>{const p=s().client;c({id:dc(),direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:"bubble",block:{type:"text",text:f}}}),p&&await p.sendMessage(f),p!=null&&p.userId&&u({message:f,userId:p.userId})},on:(f,p)=>{const d=s().client;return d?d.on(f,p):()=>{}},getClientId:()=>{var f;return(f=s().client)==null?void 0:f.clientId},setHeaderMessage:f=>a({headerMessage:f}),setDisableComposer:f=>a({disableComposer:f}),setState:f=>a(p=>({...p,...f})),setMessages:l,getMessages:()=>s().messages[_n.getState().conversationId??""]??[],setIsTyping:(f,p)=>{a(d=>({...d,isTyping:f})),f&&(a(d=>({...d,lastTypingHeartbeat:new Date})),p&&setTimeout(()=>{const d=s().lastTypingHeartbeat;d&&new Date().getTime()-d.getTime()>p&&a(h=>({...h,isTyping:!1}))},p+100))},setLastTypingHeartbeat:f=>a(p=>({...p,lastTypingHeartbeat:f})),addMessage:c,setConnected:f=>a(p=>({...p,connected:f})),restartConversation:async()=>{const f=s().client,p=s().setMessages;f&&(await f.newConversation(),p([]))}}},{name:"webchatStore"}))};function Pe(e){const t=E.useContext(Tx);if(!t)throw new Error("Missing WebchatContext.Provider in the tree");return kx(t,e)}const U6=({text:e,buttonValue:t,type:n,variant:r,groupId:o,reusable:i,...a})=>{const s=Pe(g=>g.eventEmitter),c=Pe(g=>g.sendTextMessage),l=Pe(g=>g.isReadOnly),[u,f]=E.useState(!1),[p,d]=E.useState(!1),[h,m]=E.useState(!1),{message:{blocks:{button:v}}}=ct;E.useEffect(()=>{if(o)return s.on(`button-group-${o}-click`,()=>{d(!0),i||m(!0)})},[s,o,i]);function y(){o&&s.emit(`button-group-${o}-click`),f(!0),i||m(!0),r!=="link"&&c(t)}return F.jsx(z6,{...a,variant:r,onClick:y,disabled:h||l,"data-activated":u?"":void 0,"data-group-activated":p?"":void 0,"data-type":r,value:t,...v,children:e})},z6=e=>{if(e.variant==="link"){const{value:r,variant:o,...i}=e;return F.jsx("a",{...i,href:r,target:"_blank",rel:"noopener noreferrer"})}const{variant:t,...n}=e;return F.jsx("button",{type:"button",...n})},q6=E.forwardRef(({block:e,type:t,...n},r)=>{const{message:{blocks:{bubble:o}}}=ct;return F.jsx("div",{...n,...o,ref:r,children:F.jsx(Wi,{block:e})})}),Ax=E.createContext(null);function H6(){const e=E.useContext(Ax);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const Px=E.createContext(null);function Ix(){const e=E.useContext(Px);if(!e)throw new Error("useModalContext must be used within a ModalProvider");return e}const Rx=E.createContext(null);function Mx(){const e=E.useContext(Rx);if(!e)throw new Error("useWebchatConfig must be used within a WebchatConfigProvider");return e}const V6=E.forwardRef(({url:e,type:t,orientation:n="auto",...r},o)=>{const i=E.useId(),{setIsLoading:a}=H6(),[s,c]=E.useState(n),[l,u]=E.useState(!1),{message:{blocks:{image:f}}}=ct;return E.useLayoutEffect(()=>{a(p=>[...p,i])},[]),E.useEffect(()=>{e&&s==="auto"&&_B(e).then(({width:p,height:d})=>{c(W6(p,d)),a(h=>h.filter(m=>m!==i))})},[e]),F.jsxs(F.Fragment,{children:[l?null:F.jsx("div",{"data-orientation":s,...f.placeholder}),F.jsx("img",{"data-orientation":s,"data-loaded":l,...r,...f.image,src:e,alt:"",ref:o,loading:"lazy",onLoad:()=>{u(!0)}})]})});function W6(e,t){const n={square:1,portrait:.75,landscape:1.3333333333333333},r=e/t;return Object.keys(n).reduce((i,a)=>Math.abs(n[a]-r)<Math.abs(n[i]-r)?a:i)}const K6=E.forwardRef(({url:e,type:t,...n},r)=>{const{message:{blocks:{video:o}}}=ct;return F.jsx("div",{children:F.jsx("video",{...n,controls:!0,src:e,...o,ref:r})})}),G6=E.forwardRef(({url:e,type:t,...n},r)=>{const{message:{blocks:{audio:o}}}=ct;return F.jsx("div",{children:F.jsx("audio",{...n,controls:!0,src:e,...o,ref:r})})});function Z6({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M10 3a.75.75 0 0 1 .75.75v10.638l3.96-4.158a.75.75 0 1 1 1.08 1.04l-5.25 5.5a.75.75 0 0 1-1.08 0l-5.25-5.5a.75.75 0 1 1 1.08-1.04l3.96 4.158V3.75A.75.75 0 0 1 10 3Z",clipRule:"evenodd"}))}const Y6=C.forwardRef(Z6);function J6({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M15.312 11.424a5.5 5.5 0 0 1-9.201 2.466l-.312-.311h2.433a.75.75 0 0 0 0-1.5H3.989a.75.75 0 0 0-.75.75v4.242a.75.75 0 0 0 1.5 0v-2.43l.31.31a7 7 0 0 0 11.712-3.138.75.75 0 0 0-1.449-.39Zm1.23-3.723a.75.75 0 0 0 .219-.53V2.929a.75.75 0 0 0-1.5 0V5.36l-.31-.31A7 7 0 0 0 3.239 8.188a.75.75 0 1 0 1.448.389A5.5 5.5 0 0 1 13.89 6.11l.311.31h-2.432a.75.75 0 0 0 0 1.5h4.243a.75.75 0 0 0 .53-.219Z",clipRule:"evenodd"}))}const X6=C.forwardRef(J6);function Q6({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const e7=C.forwardRef(Q6);function t7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M4.5 2A1.5 1.5 0 0 0 3 3.5v13A1.5 1.5 0 0 0 4.5 18h11a1.5 1.5 0 0 0 1.5-1.5V7.621a1.5 1.5 0 0 0-.44-1.06l-4.12-4.122A1.5 1.5 0 0 0 11.378 2H4.5Zm4.75 6.75a.75.75 0 0 1 1.5 0v2.546l.943-1.048a.75.75 0 0 1 1.114 1.004l-2.25 2.5a.75.75 0 0 1-1.114 0l-2.25-2.5a.75.75 0 1 1 1.114-1.004l.943 1.048V8.75Z",clipRule:"evenodd"}))}const n7=C.forwardRef(t7);function r7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"m9.69 18.933.003.001C9.89 19.02 10 19 10 19s.11.02.308-.066l.002-.001.006-.003.018-.008a5.741 5.741 0 0 0 .281-.14c.186-.096.446-.24.757-.433.62-.384 1.445-.966 2.274-1.765C15.302 14.988 17 12.493 17 9A7 7 0 1 0 3 9c0 3.492 1.698 5.988 3.355 7.584a13.731 13.731 0 0 0 2.273 1.765 11.842 11.842 0 0 0 .976.544l.062.029.018.008.006.003ZM10 11.25a2.25 2.25 0 1 0 0-4.5 2.25 2.25 0 0 0 0 4.5Z",clipRule:"evenodd"}))}const o7=C.forwardRef(r7),i7=E.forwardRef(({type:e,latitude:t,longitude:n,title:r,...o},i)=>{const a=`https://www.google.com/maps/search/?api=1&query=${t},${n}`,{message:{blocks:{location:s}}}=ct;return F.jsxs("a",{...o,...s.container,href:a,type:"_blank",rel:"noopener",ref:i,children:[F.jsx("p",{...s.title,children:r}),F.jsx(o7,{...s.icon})]})}),a7=E.forwardRef(({blocks:e,type:t,horizontalAlignment:n,verticalAlignment:r,...o},i)=>{const{message:{blocks:{column:a}}}=ct;return F.jsx("div",{"data-horizontal":n,"data-vertical":r,...o,...a,ref:i,children:e.map((s,c)=>F.jsx(Wi,{block:s},c))})}),s7=E.forwardRef(({blocks:e,type:t,horizontalAlignment:n,verticalAlignment:r,...o},i)=>{const{message:{blocks:{row:a}}}=ct;return F.jsx("div",{"data-horizontal":n,"data-vertical":r,...o,...a,ref:i,children:e.map((s,c)=>F.jsx(Wi,{block:s},c))})});function c7(e){return Object.prototype.toString.call(e)==="[object Object]"}function Nx(e){return c7(e)||Array.isArray(e)}function l7(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Lp(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const o=JSON.stringify(Object.keys(e.breakpoints||{})),i=JSON.stringify(Object.keys(t.breakpoints||{}));return o!==i?!1:n.every(a=>{const s=e[a],c=t[a];return typeof s=="function"?`${s}`==`${c}`:!Nx(s)||!Nx(c)?s===c:Lp(s,c)})}function Dx(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function u7(e,t){if(e.length!==t.length)return!1;const n=Dx(e),r=Dx(t);return n.every((o,i)=>{const a=r[i];return Lp(o,a)})}function Bp(e){return typeof e=="number"}function jx(e){return typeof e=="string"}function Up(e){return typeof e=="boolean"}function Fx(e){return Object.prototype.toString.call(e)==="[object Object]"}function wt(e){return Math.abs(e)}function zp(e){return Math.sign(e)}function $l(e,t){return wt(e-t)}function f7(e,t){if(e===0||t===0||wt(e)<=wt(t))return 0;const n=$l(wt(e),wt(t));return wt(n/e)}function ss(e){return Cl(e).map(Number)}function Fr(e){return e[kl(e)]}function kl(e){return Math.max(0,e.length-1)}function Cl(e){return Object.keys(e)}function Lx(e,t){return[e,t].reduce((n,r)=>(Cl(r).forEach(o=>{const i=n[o],a=r[o],s=Fx(i)&&Fx(a);n[o]=s?Lx(i,a):a}),n),{})}function Bx(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function d7(e,t){const n={start:r,center:o,end:i};function r(){return 0}function o(l){return i(l)/2}function i(l){return t-l}function a(){return t*Number(e)}function s(l){return Bp(e)?a():n[e](l)}return{measure:s}}function p7(e,t){const n=e==="y"?"y":"x",r=e==="y"?"x":"y",o=s(),i=c();function a(u){const{width:f,height:p}=u;return n==="x"?f:p}function s(){return n==="y"?"top":t==="rtl"?"right":"left"}function c(){return n==="y"?"bottom":t==="rtl"?"left":"right"}return{scroll:n,cross:r,startEdge:o,endEdge:i,measureSize:a}}function mo(e,t){const n=wt(e-t);function r(l){return l<e}function o(l){return l>t}function i(l){return r(l)||o(l)}function a(l){return i(l)?r(l)?e:t:l}function s(l){return n?l-n*Math.ceil((l-t)/n):l}return{length:n,max:t,min:e,constrain:a,reachedAny:i,reachedMax:o,reachedMin:r,removeOffset:s}}function Ux(e,t,n){const{constrain:r}=mo(0,e),o=e+1;let i=a(t);function a(p){return n?wt((o+p)%o):r(p)}function s(){return i}function c(p){return i=a(p),f}function l(p){return u().set(s()+p)}function u(){return Ux(e,s(),n)}const f={get:s,set:c,add:l,clone:u};return f}function h7(e){const t=e==="rtl"?-1:1;function n(o){return o*t}return{apply:n}}function cs(){let e=[];function t(o,i,a,s={passive:!0}){return o.addEventListener(i,a,s),e.push(()=>o.removeEventListener(i,a,s)),r}function n(){e=e.filter(o=>o())}const r={add:t,clear:n};return r}function m7(e,t,n,r,o,i,a,s,c,l,u,f,p,d,h,m,v,y,g){const{cross:b}=e,k=["INPUT","SELECT","TEXTAREA"],S={passive:!1},$=cs(),T=cs(),R=mo(50,225).constrain(h.measure(20)),B={mouse:300,touch:400},O={mouse:500,touch:600},M=m?43:25;let H=!1,L=0,P=0,N=!1,j=!1,W=!1,V=!1;function D(Q,G){if(!G)return;function fe(_e){(Up(G)||G(Q,_e))&&ae(_e)}const ve=n;$.add(ve,"dragstart",_e=>_e.preventDefault(),S).add(ve,"touchmove",()=>{},S).add(ve,"touchend",()=>{}).add(ve,"touchstart",fe).add(ve,"mousedown",fe).add(ve,"touchcancel",le).add(ve,"contextmenu",le).add(ve,"click",pe,!0)}function w(){$.clear(),T.clear()}function z(){const Q=V?r:n;T.add(Q,"touchmove",re,S).add(Q,"touchend",le).add(Q,"mousemove",re,S).add(Q,"mouseup",le)}function K(Q){const G=Q.nodeName||"";return k.includes(G)}function _(){return(m?O:B)[V?"mouse":"touch"]}function J(Q,G){const fe=p.add(zp(Q)*-1),ve=f.byDistance(Q,!m).distance;return m||wt(Q)<R?ve:y&&G?ve*.5:f.byIndex(fe.get(),0).distance}function ae(Q){const G=Bx(Q,o);V=G,!(G&&Q.button!==0)&&(K(Q.target)||(W=m&&G&&!Q.buttons&&H,H=$l(i.get(),s.get())>=2,N=!0,a.pointerDown(Q),u.useFriction(0).useDuration(0),i.set(s),z(),L=a.readPoint(Q),P=a.readPoint(Q,b),d.emit("pointerDown")))}function re(Q){const G=a.readPoint(Q),fe=a.readPoint(Q,b),ve=$l(G,L),_e=$l(fe,P);if(!j&&!V&&(!Q.cancelable||(j=ve>_e,!j)))return le(Q);const I=a.pointerMove(Q);ve>v&&(W=!0),u.useFriction(.3).useDuration(1),c.start(),i.add(t.apply(I)),Q.preventDefault()}function le(Q){const fe=f.byDistance(0,!1).index!==p.get(),ve=a.pointerUp(Q)*_(),_e=J(t.apply(ve),fe),I=f7(ve,_e),X=M-10*I,oe=g+I/50;j=!1,N=!1,T.clear(),u.useDuration(X).useFriction(oe),l.distance(_e,!m),V=!1,d.emit("pointerUp")}function pe(Q){W&&(Q.stopPropagation(),Q.preventDefault())}function me(){return N}return{init:D,pointerDown:me,destroy:w}}function y7(e,t){let r,o;function i(f){return f.timeStamp}function a(f,p){const h=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(Bx(f,t)?f:f.touches[0])[h]}function s(f){return r=f,o=f,a(f)}function c(f){const p=a(f)-a(o),d=i(f)-i(r)>170;return o=f,d&&(r=f),p}function l(f){if(!r||!o)return 0;const p=a(o)-a(r),d=i(f)-i(r),h=i(f)-i(o)>170,m=p/d;return d&&!h&&wt(m)>.1?m:0}return{pointerDown:s,pointerMove:c,pointerUp:l,readPoint:a}}function v7(e){function t(r){return e*(r/100)}return{measure:t}}function g7(e,t,n,r,o){let i,a,s=[],c=!1;function l(d){return o.measureSize(d.getBoundingClientRect())}function u(d,h){if(!h)return;a=l(e),s=r.map(l);function m(y){for(const g of y){const b=g.target===e,k=r.indexOf(g.target),S=b?a:s[k],$=l(b?e:r[k]);if(S!==$){n.requestAnimationFrame(()=>{d.reInit(),t.emit("resize")});break}}}i=new ResizeObserver(y=>{c||(Up(h)||h(d,y))&&m(y)}),[e].concat(r).forEach(y=>i.observe(y))}function f(){i&&i.disconnect(),c=!0}return{init:u,destroy:f}}function b7(e,t,n,r){let o=!0,i=0,a=0,s=n,c=r,l=e.get(),u=0;function f(){const S=t.get()-e.get(),$=!s;let T=0;return $?(i=0,e.set(t),T=S):(i+=S/s,i*=c,l+=i,e.add(i),T=l-u),a=zp(T),u=l,o=wt(S)<.001,k}function p(){return o}function d(){return s}function h(){return a}function m(){return i}function v(){return g(n)}function y(){return b(r)}function g(S){return s=S,k}function b(S){return c=S,k}const k={direction:h,duration:d,velocity:m,seek:f,settled:p,useBaseFriction:y,useBaseDuration:v,useFriction:b,useDuration:g};return k}function w7(e,t,n,r,o){const i=o.measure(10),a=o.measure(50),s=mo(.1,.99);let c=!1;function l(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(d){if(!l())return;const h=e.reachedMin(t.get())?"min":"max",m=wt(e[h]-t.get()),v=n.get()-t.get(),y=s.constrain(m/a);n.subtract(v*y),!d&&wt(v)<i&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function f(d){c=!d}return{constrain:u,toggleActive:f}}function x7(e,t,n,r){const o=mo(-t+e,n[0]),i=c(),a=l();function s(){const f=i[0],p=Fr(i),d=i.lastIndexOf(f),h=i.indexOf(p)+1;return mo(d,h)}function c(){return n.map(o.constrain).map(f=>parseFloat(f.toFixed(3)))}function l(){if(t<=e)return[o.max];if(r==="keepSnaps")return i;const{min:f,max:p}=s();return i.slice(f,p)}return{snapsContained:a}}function S7(e,t,n){const r=t[0],o=n?r-e:Fr(t);return{limit:mo(o,r)}}function E7(e,t,n,r){const i=t.min+.1,a=t.max+.1,{reachedMin:s,reachedMax:c}=mo(i,a);function l(p){return p===1?c(n.get()):p===-1?s(n.get()):!1}function u(p){if(!l(p))return;const d=e*(p*-1);r.forEach(h=>h.add(d))}return{loop:u}}function _7(e){const{max:t,length:n}=e;function r(i){return(i-t)/-n}return{get:r}}function $7(e,t,n,r,o,i,a){const{startEdge:s,endEdge:c}=e,{groupSlides:l}=i,u=d().map(t.measure),f=h(),p=m();function d(){return l(r).map(y=>Fr(y)[c]-y[0][s]).map(wt)}function h(){return r.map(y=>n[s]-y[s]).map(y=>-wt(y))}function m(){const g=Fr(f)-Fr(o);return l(f).map(b=>b[0]).map((b,k,S)=>{const $=!k,T=k===kl(S);return a&&$?0:a&&T?g:b+u[k]})}return{snaps:f,snapsAligned:p}}function k7(e,t,n,r,o){const{reachedAny:i,removeOffset:a,constrain:s}=r;function c(h){return h.concat().sort((m,v)=>wt(m)-wt(v))[0]}function l(h){const m=e?a(h):s(h),v=t.map(g=>g-m).map(g=>u(g,0)).map((g,b)=>({diff:g,index:b})).sort((g,b)=>wt(g.diff)-wt(b.diff)),{index:y}=v[0];return{index:y,distance:m}}function u(h,m){const v=[h,h+n,h-n];if(!e)return v[0];if(!m)return c(v);const y=v.filter(g=>zp(g)===m);return c(y)}function f(h,m){const v=t[h]-o.get(),y=u(v,m);return{index:h,distance:y}}function p(h,m){const v=o.get()+h,{index:y,distance:g}=l(v),b=!e&&i(v);if(!m||b)return{index:y,distance:h};const k=t[y]-g,S=h+u(k,0);return{index:y,distance:S}}return{byDistance:p,byIndex:f,shortcut:u}}function C7(e,t,n,r,o,i,a){function s(f){const p=f.distance,d=f.index!==t.get();i.add(p),p&&(o.duration()?e.start():(e.update(),e.render(1),e.update())),d&&(n.set(t.get()),t.set(f.index),a.emit("select"))}function c(f,p){const d=r.byDistance(f,p);s(d)}function l(f,p){const d=t.clone().set(f),h=r.byIndex(d.get(),p);s(h)}return{distance:c,index:l}}function Ol(e){let t=e;function n(){return t}function r(c){t=a(c)}function o(c){t+=a(c)}function i(c){t-=a(c)}function a(c){return Bp(c)?c:c.get()}return{get:n,set:r,add:o,subtract:i}}function zx(e,t,n){const r=e.scroll==="x"?a:s,o=n.style;let i=!1;function a(p){return`translate3d(${p}px,0px,0px)`}function s(p){return`translate3d(0px,${p}px,0px)`}function c(p){i||(o.transform=r(t.apply(p)))}function l(p){i=!p}function u(){i||(o.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:u,to:c,toggleActive:l}}function O7(e,t,n,r,o,i,a,s,c){const l=ss(o),u=ss(o).reverse(),f=m().concat(v());function p(S,$){return S.reduce((T,R)=>T-o[R],$)}function d(S,$){return S.reduce((T,R)=>p(T,$)>0?T.concat([R]):T,[])}function h(S,$){const T=$==="start",R=T?-r:r,B=a.findSlideBounds([R]);return S.map(O=>{const M=T?0:-r,H=T?r:0,P=B.filter(N=>N.index===O)[0][T?"end":"start"];return{index:O,slideLocation:Ol(-1),translate:zx(e,t,c[O]),target:()=>s.get()>P?M:H}})}function m(){const S=i[0]-1,$=d(u,S);return h($,"end")}function v(){const S=n-i[0]-1,$=d(l,S);return h($,"start")}function y(){return f.every(({index:S})=>{const $=l.filter(T=>T!==S);return p($,n)<=.1})}function g(){f.forEach(S=>{const{target:$,translate:T,slideLocation:R}=S,B=$();B!==R.get()&&(T.to(B),R.set(B))})}function b(){f.forEach(S=>S.translate.clear())}return{canLoop:y,clear:b,loop:g,loopPoints:f}}function T7(e,t){let n,r=!1;function o(s,c){if(!c)return;function l(u){for(const f of u)if(f.type==="childList"){s.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(u=>{r||(Up(c)||c(s,u))&&l(u)}),n.observe(e,{childList:!0})}function i(){n&&n.disconnect(),r=!0}return{init:o,destroy:i}}function A7(e,t,n,r,o,i,a){const{removeOffset:s,constrain:c}=o,l=.5,u=i?[0,t,-t]:[0],f=d(u,a);function p(v){const y=v||0;return n.map(g=>mo(l,g-l).constrain(g*y))}function d(v,y){const g=v||u,b=p(y);return g.reduce((k,S)=>{const $=r.map((T,R)=>({start:T-n[R]+b[R]+S,end:T+e-b[R]+S,index:R}));return k.concat($)},[])}function h(v,y){const g=i?s(v):c(v);return(y||f).reduce((k,S)=>{const{index:$,start:T,end:R}=S,B=k.includes($),O=T<g&&R>g;return!B&&O?k.concat([$]):k},[])}return{check:h,findSlideBounds:d}}function P7(e,t,n,r,o,i){const{measureSize:a,startEdge:s,endEdge:c}=e,l=n[0]&&o,u=h(),f=m(),p=n.map(a),d=v();function h(){if(!l)return 0;const g=n[0];return wt(t[s]-g[s])}function m(){if(!l)return 0;const g=i.getComputedStyle(Fr(r));return parseFloat(g.getPropertyValue(`margin-${c}`))}function v(){return n.map((g,b,k)=>{const S=!b,$=b===kl(k);return S?p[b]+u:$?p[b]+f:k[b+1][s]-g[s]}).map(wt)}return{slideSizes:p,slideSizesWithGaps:d}}function I7(e,t,n){const r=Bp(n);function o(c,l){return ss(c).filter(u=>u%l===0).map(u=>c.slice(u,u+l))}function i(c){return ss(c).reduce((l,u)=>{const p=t.slice(Fr(l),u+1).reduce((d,h)=>d+h,0);return!u||p>e?l.concat(u):l},[]).map((l,u,f)=>c.slice(l,f[u+1]))}function a(c){return r?o(c,n):i(c)}return{groupSlides:a}}function R7(e,t,n,r,o,i,a,s){const{align:c,axis:l,direction:u,startIndex:f,inViewThreshold:p,loop:d,duration:h,dragFree:m,dragThreshold:v,slidesToScroll:y,skipSnaps:g,containScroll:b}=i,k=t.getBoundingClientRect(),S=n.map(oe=>oe.getBoundingClientRect()),$=h7(u),T=p7(l,u),R=T.measureSize(k),B=v7(R),O=d7(c,R),M=!d&&!!b,H=d||!!b,{slideSizes:L,slideSizesWithGaps:P}=P7(T,k,S,n,H,o),N=I7(R,P,y),{snaps:j,snapsAligned:W}=$7(T,O,k,S,P,N,M),V=-Fr(j)+Fr(P),{snapsContained:D}=x7(R,V,W,b),w=M?D:W,{limit:z}=S7(V,w,d),K=Ux(kl(w),f,d),_=K.clone(),J=ss(n),ae=({dragHandler:oe,scrollBody:ee,scrollBounds:Se,eventHandler:xe,animation:ke,options:{loop:Fe}})=>{const Te=oe.pointerDown();Fe||Se.constrain(Te);const U=ee.seek().settled();U&&!Te&&(ke.stop(),xe.emit("settle")),U||xe.emit("scroll")},re=({scrollBody:oe,translate:ee,location:Se,offsetLocation:xe,scrollLooper:ke,slideLooper:Fe,options:{loop:Te}},U)=>{const Z=oe.velocity();xe.set(Se.get()-Z+Z*U),Te&&(ke.loop(oe.direction()),Fe.loop()),ee.to(xe.get())},le={start:()=>s.start(X),stop:()=>s.stop(X),update:()=>ae(X),render:oe=>re(X,oe)},pe=.68,me=w[K.get()],ce=Ol(me),Q=Ol(me),G=Ol(me),fe=b7(ce,G,h,pe),ve=k7(d,w,V,z,G),_e=C7(le,K,_,ve,fe,G,a),I=A7(R,V,L,j,z,d,p),X={ownerDocument:r,ownerWindow:o,eventHandler:a,containerRect:k,slideRects:S,animation:le,axis:T,direction:$,dragHandler:m7(T,$,e,r,o,G,y7(T,o),ce,le,_e,fe,ve,K,a,B,m,v,g,pe),eventStore:cs(),percentOfView:B,index:K,indexPrevious:_,limit:z,location:ce,offsetLocation:Q,options:i,resizeHandler:g7(t,a,o,n,T),scrollBody:fe,scrollBounds:w7(z,ce,G,fe,B),scrollLooper:E7(V,z,Q,[ce,Q,G]),scrollProgress:_7(z),scrollSnaps:w,scrollTarget:ve,scrollTo:_e,slideLooper:O7(T,$,R,V,P,w,I,Q,n),slidesHandler:T7(t,a),slidesInView:I,slideIndexes:J,slidesToScroll:N,target:G,translate:zx(T,$,t)};return X}function M7(e){const t=16.666666666666668;let n=[],r=null,o=0,i=0;function a(f){r||(r=f);const p=f-r;for(r=f,o+=p;o>=t;)n.forEach(({animation:h})=>h.update()),o-=t;const d=wt(o/t);n.forEach(({animation:h})=>h.render(d)),i&&e.requestAnimationFrame(a)}function s(f){n.includes(f)||n.push(f),!i&&(i=e.requestAnimationFrame(a))}function c(f){n=n.filter(p=>p!==f),!n.length&&(e.cancelAnimationFrame(i),r=null,o=0,i=0)}function l(){r=null,o=0}return{start:s,stop:c,reset:l,window:e}}function N7(){const e={};let t;function n(c){t=c}function r(c){return e[c]||[]}function o(c){return r(c).forEach(l=>l(t,c)),s}function i(c,l){return e[c]=r(c).concat([l]),s}function a(c,l){return e[c]=r(c).filter(u=>u!==l),s}const s={init:n,emit:o,off:a,on:i};return s}const D7={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,breakpoints:{},dragFree:!1,dragThreshold:10,inViewThreshold:0,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0};function j7(e){function t(i,a){return Lx(i,a||{})}function n(i){const a=i.breakpoints||{},s=Cl(a).filter(c=>e.matchMedia(c).matches).map(c=>a[c]).reduce((c,l)=>t(c,l),{});return t(i,s)}function r(i){return i.map(a=>Cl(a.breakpoints||{})).reduce((a,s)=>a.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function F7(e){let t=[];function n(i,a){return t=i.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(a,e)),i.reduce((s,c)=>Object.assign(s,{[c.name]:c}),{})}function r(){t=t.filter(i=>i.destroy())}return{init:n,destroy:r}}function Li(e,t,n){const r=e.ownerDocument,o=r.defaultView,i=j7(o),a=F7(i),s=cs(),c=cs(),l=N7(),{animationRealms:u}=Li,{mergeOptions:f,optionsAtMedia:p,optionsMediaQueries:d}=i,{on:h,off:m,emit:v}=l,y=L;let g=!1,b,k=f(D7,Li.globalOptions),S=f(k),$=[],T,R,B;function O(){const{container:fe,slides:ve}=S;R=(jx(fe)?e.querySelector(fe):fe)||e.children[0];const I=jx(ve)?R.querySelectorAll(ve):ve;B=[].slice.call(I||R.children)}function M(fe,ve){const _e=R7(e,R,B,r,o,fe,l,ve);if(fe.loop&&!_e.slideLooper.canLoop()){const I=Object.assign({},fe,{loop:!1});return M(I,ve)}return _e}function H(fe,ve){if(g)return;const _e=u.find(X=>X.window===o),I=_e||M7(o);_e||u.push(I),k=f(k,fe),S=p(k),$=ve||$,O(),b=M(S,I),d([k,...$.map(({options:X})=>X)]).forEach(X=>s.add(X,"change",L)),S.active&&(b.translate.to(b.location.get()),b.eventHandler.init(G),b.resizeHandler.init(G,S.watchResize),b.slidesHandler.init(G,S.watchSlides),c.add(r,"visibilitychange",()=>{r.hidden&&I.reset()}),b.options.loop&&b.slideLooper.loop(),R.offsetParent&&B.length&&b.dragHandler.init(G,S.watchDrag),T=a.init($,G))}function L(fe,ve){const _e=ae();P(),H(f({startIndex:_e},fe),ve),l.emit("reInit")}function P(){b.dragHandler.destroy(),b.animation.stop(),b.eventStore.clear(),b.translate.clear(),b.slideLooper.clear(),b.resizeHandler.destroy(),b.slidesHandler.destroy(),a.destroy(),s.clear(),c.clear()}function N(){g||(g=!0,s.clear(),P(),l.emit("destroy"))}function j(fe){const ve=b[fe?"target":"location"].get(),_e=S.loop?"removeOffset":"constrain";return b.slidesInView.check(b.limit[_e](ve))}function W(fe){const ve=j(fe);return b.slideIndexes.filter(_e=>!ve.includes(_e))}function V(fe,ve,_e){!S.active||g||(b.scrollBody.useBaseFriction().useDuration(ve?0:S.duration),b.scrollTo.index(fe,_e||0))}function D(fe){const ve=b.index.add(1).get();V(ve,fe===!0,-1)}function w(fe){const ve=b.index.add(-1).get();V(ve,fe===!0,1)}function z(){return b.index.add(1).get()!==ae()}function K(){return b.index.add(-1).get()!==ae()}function _(){return b.scrollSnaps.map(b.scrollProgress.get)}function J(){return b.scrollProgress.get(b.location.get())}function ae(){return b.index.get()}function re(){return b.indexPrevious.get()}function le(){return T}function pe(){return b}function me(){return e}function ce(){return R}function Q(){return B}const G={canScrollNext:z,canScrollPrev:K,containerNode:ce,internalEngine:pe,destroy:N,off:m,on:h,emit:v,plugins:le,previousScrollSnap:re,reInit:y,rootNode:me,scrollNext:D,scrollPrev:w,scrollProgress:J,scrollSnapList:_,scrollTo:V,selectedScrollSnap:ae,slideNodes:Q,slidesInView:j,slidesNotInView:W};return H(t,n),setTimeout(()=>l.emit("init"),0),G}Li.animationRealms=[],Li.globalOptions=void 0;function qp(e={},t=[]){const n=E.useRef(e),r=E.useRef(t),[o,i]=E.useState(),[a,s]=E.useState(),c=E.useCallback(()=>{o&&o.reInit(n.current,r.current)},[o]);return E.useEffect(()=>{if(l7()&&a){Li.globalOptions=qp.globalOptions;const l=Li(a,n.current,r.current);return i(l),()=>l.destroy()}else i(void 0)},[a,i]),E.useEffect(()=>{Lp(n.current,e)||(n.current=e,c())},[e,c]),E.useEffect(()=>{u7(r.current,t)||(r.current=t,c())},[t,c]),[s,o]}qp.globalOptions=void 0;function L7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))}const B7=C.forwardRef(L7);function U7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",clipRule:"evenodd"}))}const z7=C.forwardRef(U7);function q7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5H5.625ZM7.5 15a.75.75 0 0 1 .75-.75h7.5a.75.75 0 0 1 0 1.5h-7.5A.75.75 0 0 1 7.5 15Zm.75 2.25a.75.75 0 0 0 0 1.5H12a.75.75 0 0 0 0-1.5H8.25Z",clipRule:"evenodd"}),C.createElement("path",{d:"M12.971 1.816A5.23 5.23 0 0 1 14.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 0 1 3.434 1.279 9.768 9.768 0 0 0-6.963-6.963Z"}))}const H7=C.forwardRef(q7);function V7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"M1.5 8.67v8.58a3 3 0 0 0 3 3h15a3 3 0 0 0 3-3V8.67l-8.928 5.493a3 3 0 0 1-3.144 0L1.5 8.67Z"}),C.createElement("path",{d:"M22.5 6.908V6.75a3 3 0 0 0-3-3h-15a3 3 0 0 0-3 3v.158l9.714 5.978a1.5 1.5 0 0 0 1.572 0L22.5 6.908Z"}))}const W7=C.forwardRef(V7);function K7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"M21.721 12.752a9.711 9.711 0 0 0-.945-5.003 12.754 12.754 0 0 1-4.339 2.708 18.991 18.991 0 0 1-.214 4.772 17.165 17.165 0 0 0 5.498-2.477ZM14.634 15.55a17.324 17.324 0 0 0 .332-4.647c-.952.227-1.945.347-2.966.347-1.021 0-2.014-.12-2.966-.347a17.515 17.515 0 0 0 .332 4.647 17.385 17.385 0 0 0 5.268 0ZM9.772 17.119a18.963 18.963 0 0 0 4.456 0A17.182 17.182 0 0 1 12 21.724a17.18 17.18 0 0 1-2.228-4.605ZM7.777 15.23a18.87 18.87 0 0 1-.214-4.774 12.753 12.753 0 0 1-4.34-2.708 9.711 9.711 0 0 0-.944 5.004 17.165 17.165 0 0 0 5.498 2.477ZM21.356 14.752a9.765 9.765 0 0 1-7.478 6.817 18.64 18.64 0 0 0 1.988-4.718 18.627 18.627 0 0 0 5.49-2.098ZM2.644 14.752c1.682.971 3.53 1.688 5.49 2.099a18.64 18.64 0 0 0 1.988 4.718 9.765 9.765 0 0 1-7.478-6.816ZM13.878 2.43a9.755 9.755 0 0 1 6.116 3.986 11.267 11.267 0 0 1-3.746 2.504 18.63 18.63 0 0 0-2.37-6.49ZM12 2.276a17.152 17.152 0 0 1 2.805 7.121c-.897.23-1.837.353-2.805.353-.968 0-1.908-.122-2.805-.353A17.151 17.151 0 0 1 12 2.276ZM10.122 2.43a18.629 18.629 0 0 0-2.37 6.49 11.266 11.266 0 0 1-3.746-2.504 9.754 9.754 0 0 1 6.116-3.985Z"}))}const G7=C.forwardRef(K7);function Z7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M12 1.5a5.25 5.25 0 0 0-5.25 5.25v3a3 3 0 0 0-3 3v6.75a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3v-6.75a3 3 0 0 0-3-3v-3c0-2.9-2.35-5.25-5.25-5.25Zm3.75 8.25v-3a3.75 3.75 0 1 0-7.5 0v3h7.5Z",clipRule:"evenodd"}))}const Y7=C.forwardRef(Z7);function J7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M1.5 4.5a3 3 0 0 1 3-3h1.372c.86 0 1.61.586 1.819 1.42l1.105 4.423a1.875 1.875 0 0 1-.694 1.955l-1.293.97c-.135.101-.164.249-.126.352a11.285 11.285 0 0 0 6.697 6.697c.103.038.25.009.352-.126l.97-1.293a1.875 1.875 0 0 1 1.955-.694l4.423 1.105c.834.209 1.42.959 1.42 1.82V19.5a3 3 0 0 1-3 3h-2.25C8.552 22.5 1.5 15.448 1.5 6.75V4.5Z",clipRule:"evenodd"}))}const X7=C.forwardRef(J7),Q7=E.forwardRef(({blocks:e},t)=>{const[n,r]=qp({skipSnaps:!0}),[o,i]=E.useState(!0),[a,s]=E.useState(!0),c=E.useCallback(()=>r==null?void 0:r.scrollPrev(),[r]),l=E.useCallback(()=>r==null?void 0:r.scrollNext(),[r]),{message:{blocks:{carousel:u}}}=ct,f=E.useCallback(p=>{i(!p.canScrollPrev()),s(!p.canScrollNext())},[]);return E.useEffect(()=>{r&&(f(r),r.on("reInit",f),r.on("select",f))},[r,f]),F.jsxs("div",{...u==null?void 0:u.container,"data-container":"carousel",ref:n,children:[F.jsx("div",{ref:t,...u==null?void 0:u.slidesContainer,children:e.map((p,d)=>F.jsx(Wi,{block:p},d))}),F.jsx(B7,{...u==null?void 0:u.backButton,"data-disabled":o?"":void 0,onClick:c}),F.jsx(z7,{...u==null?void 0:u.nextButton,"data-disabled":a?"":void 0,onClick:l})]})}),Bi=Math.min,$n=Math.max,Tl=Math.round,Ui=Math.floor,yo=e=>({x:e,y:e});function qx(e,t,n){return $n(e,Bi(t,n))}function Al(e,t){return typeof e=="function"?e(t):e}function ls(e){return e.split("-")[0]}function Hp(e){return e.split("-")[1]}function Hx(e){return e==="x"?"y":"x"}function eU(e){return e==="y"?"height":"width"}function us(e){return["top","bottom"].includes(ls(e))?"y":"x"}function tU(e){return Hx(us(e))}function nU(e){return{top:0,right:0,bottom:0,left:0,...e}}function rU(e){return typeof e!="number"?nU(e):{top:e,right:e,bottom:e,left:e}}function Pl(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function vo(e){return Vx(e)?(e.nodeName||"").toLowerCase():"#document"}function kn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Lr(e){var t;return(t=(Vx(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Vx(e){return e instanceof Node||e instanceof kn(e).Node}function xt(e){return e instanceof Element||e instanceof kn(e).Element}function tn(e){return e instanceof HTMLElement||e instanceof kn(e).HTMLElement}function Vp(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof kn(e).ShadowRoot}function fs(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Cn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function oU(e){return["table","td","th"].includes(vo(e))}function Wp(e){const t=Kp(),n=Cn(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function iU(e){let t=Jo(e);for(;tn(t)&&!ds(t);){if(Wp(t))return t;t=Jo(t)}return null}function Kp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ds(e){return["html","body","#document"].includes(vo(e))}function Cn(e){return kn(e).getComputedStyle(e)}function Il(e){return xt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Jo(e){if(vo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Vp(e)&&e.host||Lr(e);return Vp(t)?t.host:t}function Wx(e){const t=Jo(e);return ds(t)?e.ownerDocument?e.ownerDocument.body:e.body:tn(t)&&fs(t)?t:Wx(t)}function go(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Wx(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=kn(o);return i?t.concat(a,a.visualViewport||[],fs(o)?o:[],a.frameElement&&n?go(a.frameElement):[]):t.concat(o,go(o,[],n))}function bo(e){let t=e.activeElement;for(;((n=t)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function yn(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Vp(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Kx(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function aU(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function Gx(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(Kx())||t.test(aU()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Zx(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function Yx(){return/apple/i.test(navigator.vendor)}function sU(){return Kx().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Jx(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function cU(e){return"nativeEvent"in e}function lU(e){return e.matches("html,body")}function Gn(e){return(e==null?void 0:e.ownerDocument)||document}function Gp(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Xx(e){return"composedPath"in e?e.composedPath()[0]:e.target}const uU="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Qx(e){return tn(e)&&e.matches(uU)}function Wt(e){e.preventDefault(),e.stopPropagation()}function eS(e,t,n){let{reference:r,floating:o}=e;const i=us(t),a=tU(t),s=eU(a),c=ls(t),l=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let d;switch(c){case"top":d={x:u,y:r.y-o.height};break;case"bottom":d={x:u,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-o.width,y:f};break;default:d={x:r.x,y:r.y}}switch(Hp(t)){case"start":d[a]-=p*(n&&l?-1:1);break;case"end":d[a]+=p*(n&&l?-1:1);break}return d}const fU=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=eS(l,r,c),p=r,d={},h=0;for(let m=0;m<s.length;m++){const{name:v,fn:y}=s[m],{x:g,y:b,data:k,reset:S}=await y({x:u,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:d,rects:l,platform:a,elements:{reference:e,floating:t}});if(u=g??u,f=b??f,d={...d,[v]:{...d[v],...k}},S&&h<=50){h++,typeof S=="object"&&(S.placement&&(p=S.placement),S.rects&&(l=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:u,y:f}=eS(l,p,c)),m=-1;continue}}return{x:u,y:f,placement:p,strategy:o,middlewareData:d}};async function tS(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=Al(t,e),h=rU(d),v=s[p?f==="floating"?"reference":"floating":f],y=Pl(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),g=f==="floating"?{...a.floating,x:r,y:o}:a.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),k=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},S=Pl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:g,offsetParent:b,strategy:c}):g);return{top:(y.top-S.top+h.top)/k.y,bottom:(S.bottom-y.bottom+h.bottom)/k.y,left:(y.left-S.left+h.left)/k.x,right:(S.right-y.right+h.right)/k.x}}async function dU(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=ls(n),s=Hp(n),c=us(n)==="y",l=["left","top"].includes(a)?-1:1,u=i&&c?-1:1,f=Al(t,e);let{mainAxis:p,crossAxis:d,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&typeof h=="number"&&(d=s==="end"?h*-1:h),c?{x:d*u,y:p*l}:{x:p*l,y:d*u}}const pU=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await dU(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},hU=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:v=>{let{x:y,y:g}=v;return{x:y,y:g}}},...c}=Al(e,t),l={x:n,y:r},u=await tS(t,c),f=us(ls(o)),p=Hx(f);let d=l[p],h=l[f];if(i){const v=p==="y"?"top":"left",y=p==="y"?"bottom":"right",g=d+u[v],b=d-u[y];d=qx(g,d,b)}if(a){const v=f==="y"?"top":"left",y=f==="y"?"bottom":"right",g=h+u[v],b=h-u[y];h=qx(g,h,b)}const m=s.fn({...t,[p]:d,[f]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},mU=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=Al(e,t),c=await tS(t,s),l=ls(n),u=Hp(n),f=us(n)==="y",{width:p,height:d}=r.floating;let h,m;l==="top"||l==="bottom"?(h=l,m=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=l,h=u==="end"?"top":"bottom");const v=d-c[h],y=p-c[m],g=!t.middlewareData.shift;let b=v,k=y;if(f){const $=p-c.left-c.right;k=u||g?Bi(y,$):$}else{const $=d-c.top-c.bottom;b=u||g?Bi(v,$):$}if(g&&!u){const $=$n(c.left,0),T=$n(c.right,0),R=$n(c.top,0),B=$n(c.bottom,0);f?k=p-2*($!==0||T!==0?$+T:$n(c.left,c.right)):b=d-2*(R!==0||B!==0?R+B:$n(c.top,c.bottom))}await a({...t,availableWidth:k,availableHeight:b});const S=await o.getDimensions(i.floating);return p!==S.width||d!==S.height?{reset:{rects:!0}}:{}}}};function nS(e){const t=Cn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=tn(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Tl(n)!==i||Tl(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Zp(e){return xt(e)?e:e.contextElement}function zi(e){const t=Zp(e);if(!tn(t))return yo(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=nS(t);let a=(i?Tl(n.width):n.width)/r,s=(i?Tl(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const yU=yo(0);function rS(e){const t=kn(e);return!Kp()||!t.visualViewport?yU:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function vU(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==kn(e)?!1:t}function Xo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Zp(e);let a=yo(1);t&&(r?xt(r)&&(a=zi(r)):a=zi(e));const s=vU(i,n,r)?rS(i):yo(0);let c=(o.left+s.x)/a.x,l=(o.top+s.y)/a.y,u=o.width/a.x,f=o.height/a.y;if(i){const p=kn(i),d=r&&xt(r)?kn(r):r;let h=p.frameElement;for(;h&&r&&d!==p;){const m=zi(h),v=h.getBoundingClientRect(),y=Cn(h),g=v.left+(h.clientLeft+parseFloat(y.paddingLeft))*m.x,b=v.top+(h.clientTop+parseFloat(y.paddingTop))*m.y;c*=m.x,l*=m.y,u*=m.x,f*=m.y,c+=g,l+=b,h=kn(h).frameElement}}return Pl({width:u,height:f,x:c,y:l})}function gU(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=tn(n),i=Lr(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0},s=yo(1);const c=yo(0);if((o||!o&&r!=="fixed")&&((vo(n)!=="body"||fs(i))&&(a=Il(n)),tn(n))){const l=Xo(n);s=zi(n),c.x=l.x+n.clientLeft,c.y=l.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+c.x,y:t.y*s.y-a.scrollTop*s.y+c.y}}function bU(e){return Array.from(e.getClientRects())}function oS(e){return Xo(Lr(e)).left+Il(e).scrollLeft}function wU(e){const t=Lr(e),n=Il(e),r=e.ownerDocument.body,o=$n(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=$n(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+oS(e);const s=-n.scrollTop;return Cn(r).direction==="rtl"&&(a+=$n(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function xU(e,t){const n=kn(e),r=Lr(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;const l=Kp();(!l||l&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s,y:c}}function SU(e,t){const n=Xo(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=tn(e)?zi(e):yo(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,c=o*i.x,l=r*i.y;return{width:a,height:s,x:c,y:l}}function iS(e,t,n){let r;if(t==="viewport")r=xU(e,n);else if(t==="document")r=wU(Lr(e));else if(xt(t))r=SU(t,n);else{const o=rS(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Pl(r)}function aS(e,t){const n=Jo(e);return n===t||!xt(n)||ds(n)?!1:Cn(n).position==="fixed"||aS(n,t)}function EU(e,t){const n=t.get(e);if(n)return n;let r=go(e,[],!1).filter(s=>xt(s)&&vo(s)!=="body"),o=null;const i=Cn(e).position==="fixed";let a=i?Jo(e):e;for(;xt(a)&&!ds(a);){const s=Cn(a),c=Wp(a);!c&&s.position==="fixed"&&(o=null),(i?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||fs(a)&&!c&&aS(e,a))?r=r.filter(u=>u!==a):o=s,a=Jo(a)}return t.set(e,r),r}function _U(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?EU(t,this._c):[].concat(n),r],s=a[0],c=a.reduce((l,u)=>{const f=iS(t,u,o);return l.top=$n(f.top,l.top),l.right=Bi(f.right,l.right),l.bottom=Bi(f.bottom,l.bottom),l.left=$n(f.left,l.left),l},iS(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function $U(e){return nS(e)}function kU(e,t,n){const r=tn(t),o=Lr(t),i=n==="fixed",a=Xo(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=yo(0);if(r||!r&&!i)if((vo(t)!=="body"||fs(o))&&(s=Il(t)),r){const l=Xo(t,!0,i,t);c.x=l.x+t.clientLeft,c.y=l.y+t.clientTop}else o&&(c.x=oS(o));return{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function sS(e,t){return!tn(e)||Cn(e).position==="fixed"?null:t?t(e):e.offsetParent}function cS(e,t){const n=kn(e);if(!tn(e))return n;let r=sS(e,t);for(;r&&oU(r)&&Cn(r).position==="static";)r=sS(r,t);return r&&(vo(r)==="html"||vo(r)==="body"&&Cn(r).position==="static"&&!Wp(r))?n:r||iU(e)||n}const CU=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||cS,i=this.getDimensions;return{reference:kU(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function OU(e){return Cn(e).direction==="rtl"}const TU={convertOffsetParentRelativeRectToViewportRelativeRect:gU,getDocumentElement:Lr,getClippingRect:_U,getOffsetParent:cS,getElementRects:CU,getClientRects:bU,getDimensions:$U,getScale:zi,isElement:xt,isRTL:OU};function AU(e,t){let n=null,r;const o=Lr(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),i();const{left:l,top:u,width:f,height:p}=e.getBoundingClientRect();if(s||t(),!f||!p)return;const d=Ui(u),h=Ui(o.clientWidth-(l+f)),m=Ui(o.clientHeight-(u+p)),v=Ui(l),g={rootMargin:-d+"px "+-h+"px "+-m+"px "+-v+"px",threshold:$n(0,Bi(1,c))||1};let b=!0;function k(S){const $=S[0].intersectionRatio;if($!==c){if(!b)return a();$?a(!1,$):r=setTimeout(()=>{a(!1,1e-7)},100)}b=!1}try{n=new IntersectionObserver(k,{...g,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,g)}n.observe(e)}return a(!0),i}function PU(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=Zp(e),u=o||i?[...l?go(l):[],...go(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const f=l&&s?AU(l,n):null;let p=-1,d=null;a&&(d=new ResizeObserver(y=>{let[g]=y;g&&g.target===l&&d&&(d.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{d&&d.observe(t)})),n()}),l&&!c&&d.observe(l),d.observe(t));let h,m=c?Xo(e):null;c&&v();function v(){const y=Xo(e);m&&(y.x!==m.x||y.y!==m.y||y.width!==m.width||y.height!==m.height)&&n(),m=y,h=requestAnimationFrame(v)}return n(),()=>{u.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),f&&f(),d&&d.disconnect(),d=null,c&&cancelAnimationFrame(h)}}const IU=(e,t,n)=>{const r=new Map,o={platform:TU,...n},i={...o.platform,_c:r};return fU(e,t,{...o,platform:i})};var Rl=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Ml(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Ml(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Ml(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function lS(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function uS(e,t){const n=lS(e);return Math.round(t*n)/n}function fS(e){const t=C.useRef(e);return Rl(()=>{t.current=e}),t}function RU(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,f]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,d]=C.useState(r);Ml(p,r)||d(r);const[h,m]=C.useState(null),[v,y]=C.useState(null),g=C.useCallback(j=>{j!=$.current&&($.current=j,m(j))},[m]),b=C.useCallback(j=>{j!==T.current&&(T.current=j,y(j))},[y]),k=i||h,S=a||v,$=C.useRef(null),T=C.useRef(null),R=C.useRef(u),B=fS(c),O=fS(o),M=C.useCallback(()=>{if(!$.current||!T.current)return;const j={placement:t,strategy:n,middleware:p};O.current&&(j.platform=O.current),IU($.current,T.current,j).then(W=>{const V={...W,isPositioned:!0};H.current&&!Ml(R.current,V)&&(R.current=V,GO.flushSync(()=>{f(V)}))})},[p,t,n,O]);Rl(()=>{l===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(j=>({...j,isPositioned:!1})))},[l]);const H=C.useRef(!1);Rl(()=>(H.current=!0,()=>{H.current=!1}),[]),Rl(()=>{if(k&&($.current=k),S&&(T.current=S),k&&S){if(B.current)return B.current(k,S,M);M()}},[k,S,M,B]);const L=C.useMemo(()=>({reference:$,floating:T,setReference:g,setFloating:b}),[g,b]),P=C.useMemo(()=>({reference:k,floating:S}),[k,S]),N=C.useMemo(()=>{const j={position:n,left:0,top:0};if(!P.floating)return j;const W=uS(P.floating,u.x),V=uS(P.floating,u.y);return s?{...j,transform:"translate("+W+"px, "+V+"px)",...lS(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:V}},[n,s,P.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:M,refs:L,elements:P,floatingStyles:N}),[u,M,L,P,N])}/*!
|
|
280
|
+
`);const g=y.state[s];if(g==null)return;JSON.stringify(o.getState())!==JSON.stringify(g)&&d(g);return}o.dispatchFromDevtools&&typeof o.dispatch=="function"&&o.dispatch(y)});case"DISPATCH":switch(m.payload.type){case"RESET":return d(h),s===void 0?u==null?void 0:u.init(o.getState()):u==null?void 0:u.init(_l(c.name));case"COMMIT":if(s===void 0){u==null||u.init(o.getState());return}return u==null?void 0:u.init(_l(c.name));case"ROLLBACK":return Fp(m.state,y=>{if(s===void 0){d(y),u==null||u.init(o.getState());return}d(y[s]),u==null||u.init(_l(c.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Fp(m.state,y=>{if(s===void 0){d(y);return}JSON.stringify(o.getState())!==JSON.stringify(y[s])&&d(y[s])});case"IMPORT_STATE":{const{nextLiftedState:y}=m.payload,g=(v=y.computedStates.slice(-1)[0])==null?void 0:v.state;if(!g)return;d(s===void 0?g:g[s]),u==null||u.send(null,y);return}case"PAUSE_RECORDING":return p=!p}return}}),h},Fp=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)};function D6(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var i;const a=c=>c===null?null:JSON.parse(c,t==null?void 0:t.reviver),s=(i=n.getItem(o))!=null?i:null;return s instanceof Promise?s.then(a):a(s)},setItem:(o,i)=>n.setItem(o,JSON.stringify(i,t==null?void 0:t.replacer)),removeItem:o=>n.removeItem(o)}}const as=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return as(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return as(r)(n)}}}},j6=(e,t)=>(n,r,o)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:v=>v,version:0,merge:(v,y)=>({...y,...v}),...t},a=!1;const s=new Set,c=new Set;let l;try{l=i.getStorage()}catch{}if(!l)return e((...v)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...v)},r,o);const u=as(i.serialize),f=()=>{const v=i.partialize({...r()});let y;const g=u({state:v,version:i.version}).then(b=>l.setItem(i.name,b)).catch(b=>{y=b});if(y)throw y;return g},p=o.setState;o.setState=(v,y)=>{p(v,y),f()};const d=e((...v)=>{n(...v),f()},r,o);let h;const m=()=>{var v;if(!l)return;a=!1,s.forEach(g=>g(r()));const y=((v=i.onRehydrateStorage)==null?void 0:v.call(i,r()))||void 0;return as(l.getItem.bind(l))(i.name).then(g=>{if(g)return i.deserialize(g)}).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==i.version){if(i.migrate)return i.migrate(g.state,g.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return g.state}).then(g=>{var b;return h=i.merge(g,(b=r())!=null?b:d),n(h,!0),f()}).then(()=>{y==null||y(h,void 0),a=!0,c.forEach(g=>g(h))}).catch(g=>{y==null||y(void 0,g)})};return o.persist={setOptions:v=>{i={...i,...v},v.getStorage&&(l=v.getStorage())},clearStorage:()=>{l==null||l.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>m(),hasHydrated:()=>a,onHydrate:v=>(s.add(v),()=>{s.delete(v)}),onFinishHydration:v=>(c.add(v),()=>{c.delete(v)})},m(),h||d},F6=(e,t)=>(n,r,o)=>{let i={storage:D6(()=>localStorage),partialize:m=>m,version:0,merge:(m,v)=>({...v,...m}),...t},a=!1;const s=new Set,c=new Set;let l=i.storage;if(!l)return e((...m)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...m)},r,o);const u=()=>{const m=i.partialize({...r()});return l.setItem(i.name,{state:m,version:i.version})},f=o.setState;o.setState=(m,v)=>{f(m,v),u()};const p=e((...m)=>{n(...m),u()},r,o);let d;const h=()=>{var m,v;if(!l)return;a=!1,s.forEach(g=>{var b;return g((b=r())!=null?b:p)});const y=((v=i.onRehydrateStorage)==null?void 0:v.call(i,(m=r())!=null?m:p))||void 0;return as(l.getItem.bind(l))(i.name).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==i.version){if(i.migrate)return i.migrate(g.state,g.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return g.state}).then(g=>{var b;return d=i.merge(g,(b=r())!=null?b:p),n(d,!0),u()}).then(()=>{y==null||y(d,void 0),d=r(),a=!0,c.forEach(g=>g(d))}).catch(g=>{y==null||y(void 0,g)})};return o.persist={setOptions:m=>{i={...i,...m},m.storage&&(l=m.storage)},clearStorage:()=>{l==null||l.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>h(),hasHydrated:()=>a,onHydrate:m=>(s.add(m),()=>{s.delete(m)}),onFinishHydration:m=>(c.add(m),()=>{c.delete(m)})},i.skipHydration||h(),d||p},L6=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?j6(e,t):F6(e,t),_n=M6()(Ox(L6((e,t)=>({messageHistory:{},addMessageToHistory:({userId:n,message:r})=>e(o=>({...o,messageHistory:{...o.messageHistory,[n]:[r,...(o.messageHistory[n]??[]).slice(0,100)]}})),clientMode:"",setClientMode:n=>{const{clearAll:r,clientMode:o}=t();o!==n&&r(),e(i=>({...i,clientMode:n}))},setUser:n=>e(r=>({...r,user:n})),setConversationId:n=>e(r=>({...r,conversationId:n})),clearAll:()=>{e(n=>({...n,messageHistory:{},user:void 0,conversationId:void 0}))}}),{name:"botpress-webchat"}))),Tx=E.createContext(null),B6=e=>{const t={configuration:{},messages:{},connected:!0,disableComposer:!1,renderers:{},isReadOnly:!1,userData:{},userName:void 0,userPictureUrl:void 0,closeWindow:void 0,messageContainerRef:{current:null},isTyping:!1,lastTypingHeartbeat:null,allowFileUpload:!1,conversationId:void 0,disableRestartConversation:!1},n=e==null?void 0:e.client,r=e==null?void 0:e.conversationId,o=_n.getState().setClientMode,i=_n.getState().setConversationId;return n&&o(n.mode),E.useEffect(()=>{r&&i(r)},[r]),bx()(Ox((a,s)=>{const c=f=>{const p=_n.getState().conversationId;if(p)return a(d=>{const h=d.messages[p]??[];return{...d,messages:{...d.messages,[p]:[...h.filter(m=>m.id!==f.id),{id:dc(),...f}]}}})},l=f=>{const p=_n.getState().conversationId;if(p)return a(d=>({...d,messages:{...d.messages,[p]:f}}))},u=_n.getState().addMessageToHistory;return{...t,...e,eventEmitter:QA,client:n,sendFile:f=>s().client.sendFile(f),sendTextMessage:async f=>{const p=s().client;c({id:dc(),direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:"bubble",block:{type:"text",text:f}}}),p&&await p.sendMessage(f),p!=null&&p.userId&&u({message:f,userId:p.userId})},on:(f,p)=>{const d=s().client;return d?d.on(f,p):()=>{}},getClientId:()=>{var f;return(f=s().client)==null?void 0:f.clientId},setHeaderMessage:f=>a({headerMessage:f}),setDisableComposer:f=>a({disableComposer:f}),setState:f=>a(p=>({...p,...f})),setMessages:l,getMessages:()=>s().messages[_n.getState().conversationId??""]??[],setIsTyping:(f,p)=>{a(d=>({...d,isTyping:f})),f&&(a(d=>({...d,lastTypingHeartbeat:new Date})),p&&setTimeout(()=>{const d=s().lastTypingHeartbeat;d&&new Date().getTime()-d.getTime()>p&&a(h=>({...h,isTyping:!1}))},p+100))},setLastTypingHeartbeat:f=>a(p=>({...p,lastTypingHeartbeat:f})),addMessage:c,setConnected:f=>a(p=>({...p,connected:f})),restartConversation:async()=>{const f=s().client,p=s().setMessages;f&&(await f.newConversation(),p([]))}}},{name:"webchatStore"}))};function Pe(e){const t=E.useContext(Tx);if(!t)throw new Error("Missing WebchatContext.Provider in the tree");return kx(t,e)}const U6=({text:e,buttonValue:t,type:n,variant:r,groupId:o,reusable:i,...a})=>{const s=Pe(g=>g.eventEmitter),c=Pe(g=>g.sendTextMessage),l=Pe(g=>g.isReadOnly),[u,f]=E.useState(!1),[p,d]=E.useState(!1),[h,m]=E.useState(!1),{message:{blocks:{button:v}}}=ct;E.useEffect(()=>{if(o)return s.on(`button-group-${o}-click`,()=>{d(!0),i||m(!0)})},[s,o,i]);function y(){o&&s.emit(`button-group-${o}-click`),f(!0),i||m(!0),r!=="link"&&c(t)}return F.jsx(z6,{...a,variant:r,onClick:y,disabled:h||l,"data-activated":u?"":void 0,"data-group-activated":p?"":void 0,"data-type":r,value:t,...v,children:e})},z6=e=>{if(e.variant==="link"){const{value:r,variant:o,...i}=e;return F.jsx("a",{...i,href:r,target:"_blank",rel:"noopener noreferrer"})}const{variant:t,...n}=e;return F.jsx("button",{type:"button",...n})},q6=E.forwardRef(({block:e,type:t,direction:n,timestamp:r,sender:o,...i},a)=>{const{message:{blocks:{bubble:s}}}=ct;return F.jsx("div",{...i,...s,ref:a,children:F.jsx(Wi,{direction:n,timestamp:r,sender:o,block:e})})}),Ax=E.createContext(null);function H6(){const e=E.useContext(Ax);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const Px=E.createContext(null);function Ix(){const e=E.useContext(Px);if(!e)throw new Error("useModalContext must be used within a ModalProvider");return e}const Rx=E.createContext(null);function Mx(){const e=E.useContext(Rx);if(!e)throw new Error("useWebchatConfig must be used within a WebchatConfigProvider");return e}const V6=E.forwardRef(({url:e,type:t,orientation:n="auto",...r},o)=>{const i=E.useId(),{setIsLoading:a}=H6(),[s,c]=E.useState(n),[l,u]=E.useState(!1),{message:{blocks:{image:f}}}=ct;return E.useLayoutEffect(()=>{a(p=>[...p,i])},[]),E.useEffect(()=>{e&&s==="auto"&&_B(e).then(({width:p,height:d})=>{c(W6(p,d)),a(h=>h.filter(m=>m!==i))})},[e]),F.jsxs(F.Fragment,{children:[l?null:F.jsx("div",{"data-orientation":s,...f.placeholder}),F.jsx("img",{"data-orientation":s,"data-loaded":l,...r,...f.image,src:e,alt:"",ref:o,loading:"lazy",onLoad:()=>{u(!0)}})]})});function W6(e,t){const n={square:1,portrait:.75,landscape:1.3333333333333333},r=e/t;return Object.keys(n).reduce((i,a)=>Math.abs(n[a]-r)<Math.abs(n[i]-r)?a:i)}const K6=E.forwardRef(({url:e,type:t,...n},r)=>{const{message:{blocks:{video:o}}}=ct;return F.jsx("div",{children:F.jsx("video",{...n,controls:!0,src:e,...o,ref:r})})}),G6=E.forwardRef(({url:e,type:t,...n},r)=>{const{message:{blocks:{audio:o}}}=ct;return F.jsx("div",{children:F.jsx("audio",{...n,controls:!0,src:e,...o,ref:r})})});function Z6({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M10 3a.75.75 0 0 1 .75.75v10.638l3.96-4.158a.75.75 0 1 1 1.08 1.04l-5.25 5.5a.75.75 0 0 1-1.08 0l-5.25-5.5a.75.75 0 1 1 1.08-1.04l3.96 4.158V3.75A.75.75 0 0 1 10 3Z",clipRule:"evenodd"}))}const Y6=C.forwardRef(Z6);function J6({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M15.312 11.424a5.5 5.5 0 0 1-9.201 2.466l-.312-.311h2.433a.75.75 0 0 0 0-1.5H3.989a.75.75 0 0 0-.75.75v4.242a.75.75 0 0 0 1.5 0v-2.43l.31.31a7 7 0 0 0 11.712-3.138.75.75 0 0 0-1.449-.39Zm1.23-3.723a.75.75 0 0 0 .219-.53V2.929a.75.75 0 0 0-1.5 0V5.36l-.31-.31A7 7 0 0 0 3.239 8.188a.75.75 0 1 0 1.448.389A5.5 5.5 0 0 1 13.89 6.11l.311.31h-2.432a.75.75 0 0 0 0 1.5h4.243a.75.75 0 0 0 .53-.219Z",clipRule:"evenodd"}))}const X6=C.forwardRef(J6);function Q6({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const e7=C.forwardRef(Q6);function t7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M4.5 2A1.5 1.5 0 0 0 3 3.5v13A1.5 1.5 0 0 0 4.5 18h11a1.5 1.5 0 0 0 1.5-1.5V7.621a1.5 1.5 0 0 0-.44-1.06l-4.12-4.122A1.5 1.5 0 0 0 11.378 2H4.5Zm4.75 6.75a.75.75 0 0 1 1.5 0v2.546l.943-1.048a.75.75 0 0 1 1.114 1.004l-2.25 2.5a.75.75 0 0 1-1.114 0l-2.25-2.5a.75.75 0 1 1 1.114-1.004l.943 1.048V8.75Z",clipRule:"evenodd"}))}const n7=C.forwardRef(t7);function r7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"m9.69 18.933.003.001C9.89 19.02 10 19 10 19s.11.02.308-.066l.002-.001.006-.003.018-.008a5.741 5.741 0 0 0 .281-.14c.186-.096.446-.24.757-.433.62-.384 1.445-.966 2.274-1.765C15.302 14.988 17 12.493 17 9A7 7 0 1 0 3 9c0 3.492 1.698 5.988 3.355 7.584a13.731 13.731 0 0 0 2.273 1.765 11.842 11.842 0 0 0 .976.544l.062.029.018.008.006.003ZM10 11.25a2.25 2.25 0 1 0 0-4.5 2.25 2.25 0 0 0 0 4.5Z",clipRule:"evenodd"}))}const o7=C.forwardRef(r7),i7=E.forwardRef(({type:e,latitude:t,longitude:n,title:r,...o},i)=>{const a=`https://www.google.com/maps/search/?api=1&query=${t},${n}`,{message:{blocks:{location:s}}}=ct;return F.jsxs("a",{...o,...s.container,href:a,type:"_blank",rel:"noopener",ref:i,children:[F.jsx("p",{...s.title,children:r}),F.jsx(o7,{...s.icon})]})}),a7=E.forwardRef(({blocks:e,type:t,horizontalAlignment:n,verticalAlignment:r,direction:o,sender:i,timestamp:a,...s},c)=>{const{message:{blocks:{column:l}}}=ct;return F.jsx("div",{"data-horizontal":n,"data-vertical":r,...s,...l,ref:c,children:e.map((u,f)=>F.jsx(Wi,{block:u,direction:o,sender:i,timestamp:a},f))})}),s7=E.forwardRef(({blocks:e,type:t,horizontalAlignment:n,verticalAlignment:r,direction:o,sender:i,timestamp:a,...s},c)=>{const{message:{blocks:{row:l}}}=ct;return F.jsx("div",{"data-horizontal":n,"data-vertical":r,...s,...l,ref:c,children:e.map((u,f)=>F.jsx(Wi,{block:u,direction:o,sender:i,timestamp:a},f))})});function c7(e){return Object.prototype.toString.call(e)==="[object Object]"}function Nx(e){return c7(e)||Array.isArray(e)}function l7(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Lp(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const o=JSON.stringify(Object.keys(e.breakpoints||{})),i=JSON.stringify(Object.keys(t.breakpoints||{}));return o!==i?!1:n.every(a=>{const s=e[a],c=t[a];return typeof s=="function"?`${s}`==`${c}`:!Nx(s)||!Nx(c)?s===c:Lp(s,c)})}function Dx(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function u7(e,t){if(e.length!==t.length)return!1;const n=Dx(e),r=Dx(t);return n.every((o,i)=>{const a=r[i];return Lp(o,a)})}function Bp(e){return typeof e=="number"}function jx(e){return typeof e=="string"}function Up(e){return typeof e=="boolean"}function Fx(e){return Object.prototype.toString.call(e)==="[object Object]"}function wt(e){return Math.abs(e)}function zp(e){return Math.sign(e)}function $l(e,t){return wt(e-t)}function f7(e,t){if(e===0||t===0||wt(e)<=wt(t))return 0;const n=$l(wt(e),wt(t));return wt(n/e)}function ss(e){return Cl(e).map(Number)}function Fr(e){return e[kl(e)]}function kl(e){return Math.max(0,e.length-1)}function Cl(e){return Object.keys(e)}function Lx(e,t){return[e,t].reduce((n,r)=>(Cl(r).forEach(o=>{const i=n[o],a=r[o],s=Fx(i)&&Fx(a);n[o]=s?Lx(i,a):a}),n),{})}function Bx(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function d7(e,t){const n={start:r,center:o,end:i};function r(){return 0}function o(l){return i(l)/2}function i(l){return t-l}function a(){return t*Number(e)}function s(l){return Bp(e)?a():n[e](l)}return{measure:s}}function p7(e,t){const n=e==="y"?"y":"x",r=e==="y"?"x":"y",o=s(),i=c();function a(u){const{width:f,height:p}=u;return n==="x"?f:p}function s(){return n==="y"?"top":t==="rtl"?"right":"left"}function c(){return n==="y"?"bottom":t==="rtl"?"left":"right"}return{scroll:n,cross:r,startEdge:o,endEdge:i,measureSize:a}}function mo(e,t){const n=wt(e-t);function r(l){return l<e}function o(l){return l>t}function i(l){return r(l)||o(l)}function a(l){return i(l)?r(l)?e:t:l}function s(l){return n?l-n*Math.ceil((l-t)/n):l}return{length:n,max:t,min:e,constrain:a,reachedAny:i,reachedMax:o,reachedMin:r,removeOffset:s}}function Ux(e,t,n){const{constrain:r}=mo(0,e),o=e+1;let i=a(t);function a(p){return n?wt((o+p)%o):r(p)}function s(){return i}function c(p){return i=a(p),f}function l(p){return u().set(s()+p)}function u(){return Ux(e,s(),n)}const f={get:s,set:c,add:l,clone:u};return f}function h7(e){const t=e==="rtl"?-1:1;function n(o){return o*t}return{apply:n}}function cs(){let e=[];function t(o,i,a,s={passive:!0}){return o.addEventListener(i,a,s),e.push(()=>o.removeEventListener(i,a,s)),r}function n(){e=e.filter(o=>o())}const r={add:t,clear:n};return r}function m7(e,t,n,r,o,i,a,s,c,l,u,f,p,d,h,m,v,y,g){const{cross:b}=e,k=["INPUT","SELECT","TEXTAREA"],S={passive:!1},$=cs(),T=cs(),R=mo(50,225).constrain(h.measure(20)),B={mouse:300,touch:400},O={mouse:500,touch:600},M=m?43:25;let H=!1,L=0,P=0,N=!1,j=!1,W=!1,V=!1;function D(Q,G){if(!G)return;function fe(_e){(Up(G)||G(Q,_e))&&ae(_e)}const ve=n;$.add(ve,"dragstart",_e=>_e.preventDefault(),S).add(ve,"touchmove",()=>{},S).add(ve,"touchend",()=>{}).add(ve,"touchstart",fe).add(ve,"mousedown",fe).add(ve,"touchcancel",le).add(ve,"contextmenu",le).add(ve,"click",pe,!0)}function w(){$.clear(),T.clear()}function z(){const Q=V?r:n;T.add(Q,"touchmove",re,S).add(Q,"touchend",le).add(Q,"mousemove",re,S).add(Q,"mouseup",le)}function K(Q){const G=Q.nodeName||"";return k.includes(G)}function _(){return(m?O:B)[V?"mouse":"touch"]}function J(Q,G){const fe=p.add(zp(Q)*-1),ve=f.byDistance(Q,!m).distance;return m||wt(Q)<R?ve:y&&G?ve*.5:f.byIndex(fe.get(),0).distance}function ae(Q){const G=Bx(Q,o);V=G,!(G&&Q.button!==0)&&(K(Q.target)||(W=m&&G&&!Q.buttons&&H,H=$l(i.get(),s.get())>=2,N=!0,a.pointerDown(Q),u.useFriction(0).useDuration(0),i.set(s),z(),L=a.readPoint(Q),P=a.readPoint(Q,b),d.emit("pointerDown")))}function re(Q){const G=a.readPoint(Q),fe=a.readPoint(Q,b),ve=$l(G,L),_e=$l(fe,P);if(!j&&!V&&(!Q.cancelable||(j=ve>_e,!j)))return le(Q);const I=a.pointerMove(Q);ve>v&&(W=!0),u.useFriction(.3).useDuration(1),c.start(),i.add(t.apply(I)),Q.preventDefault()}function le(Q){const fe=f.byDistance(0,!1).index!==p.get(),ve=a.pointerUp(Q)*_(),_e=J(t.apply(ve),fe),I=f7(ve,_e),X=M-10*I,oe=g+I/50;j=!1,N=!1,T.clear(),u.useDuration(X).useFriction(oe),l.distance(_e,!m),V=!1,d.emit("pointerUp")}function pe(Q){W&&(Q.stopPropagation(),Q.preventDefault())}function me(){return N}return{init:D,pointerDown:me,destroy:w}}function y7(e,t){let r,o;function i(f){return f.timeStamp}function a(f,p){const h=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(Bx(f,t)?f:f.touches[0])[h]}function s(f){return r=f,o=f,a(f)}function c(f){const p=a(f)-a(o),d=i(f)-i(r)>170;return o=f,d&&(r=f),p}function l(f){if(!r||!o)return 0;const p=a(o)-a(r),d=i(f)-i(r),h=i(f)-i(o)>170,m=p/d;return d&&!h&&wt(m)>.1?m:0}return{pointerDown:s,pointerMove:c,pointerUp:l,readPoint:a}}function v7(e){function t(r){return e*(r/100)}return{measure:t}}function g7(e,t,n,r,o){let i,a,s=[],c=!1;function l(d){return o.measureSize(d.getBoundingClientRect())}function u(d,h){if(!h)return;a=l(e),s=r.map(l);function m(y){for(const g of y){const b=g.target===e,k=r.indexOf(g.target),S=b?a:s[k],$=l(b?e:r[k]);if(S!==$){n.requestAnimationFrame(()=>{d.reInit(),t.emit("resize")});break}}}i=new ResizeObserver(y=>{c||(Up(h)||h(d,y))&&m(y)}),[e].concat(r).forEach(y=>i.observe(y))}function f(){i&&i.disconnect(),c=!0}return{init:u,destroy:f}}function b7(e,t,n,r){let o=!0,i=0,a=0,s=n,c=r,l=e.get(),u=0;function f(){const S=t.get()-e.get(),$=!s;let T=0;return $?(i=0,e.set(t),T=S):(i+=S/s,i*=c,l+=i,e.add(i),T=l-u),a=zp(T),u=l,o=wt(S)<.001,k}function p(){return o}function d(){return s}function h(){return a}function m(){return i}function v(){return g(n)}function y(){return b(r)}function g(S){return s=S,k}function b(S){return c=S,k}const k={direction:h,duration:d,velocity:m,seek:f,settled:p,useBaseFriction:y,useBaseDuration:v,useFriction:b,useDuration:g};return k}function w7(e,t,n,r,o){const i=o.measure(10),a=o.measure(50),s=mo(.1,.99);let c=!1;function l(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(d){if(!l())return;const h=e.reachedMin(t.get())?"min":"max",m=wt(e[h]-t.get()),v=n.get()-t.get(),y=s.constrain(m/a);n.subtract(v*y),!d&&wt(v)<i&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function f(d){c=!d}return{constrain:u,toggleActive:f}}function x7(e,t,n,r){const o=mo(-t+e,n[0]),i=c(),a=l();function s(){const f=i[0],p=Fr(i),d=i.lastIndexOf(f),h=i.indexOf(p)+1;return mo(d,h)}function c(){return n.map(o.constrain).map(f=>parseFloat(f.toFixed(3)))}function l(){if(t<=e)return[o.max];if(r==="keepSnaps")return i;const{min:f,max:p}=s();return i.slice(f,p)}return{snapsContained:a}}function S7(e,t,n){const r=t[0],o=n?r-e:Fr(t);return{limit:mo(o,r)}}function E7(e,t,n,r){const i=t.min+.1,a=t.max+.1,{reachedMin:s,reachedMax:c}=mo(i,a);function l(p){return p===1?c(n.get()):p===-1?s(n.get()):!1}function u(p){if(!l(p))return;const d=e*(p*-1);r.forEach(h=>h.add(d))}return{loop:u}}function _7(e){const{max:t,length:n}=e;function r(i){return(i-t)/-n}return{get:r}}function $7(e,t,n,r,o,i,a){const{startEdge:s,endEdge:c}=e,{groupSlides:l}=i,u=d().map(t.measure),f=h(),p=m();function d(){return l(r).map(y=>Fr(y)[c]-y[0][s]).map(wt)}function h(){return r.map(y=>n[s]-y[s]).map(y=>-wt(y))}function m(){const g=Fr(f)-Fr(o);return l(f).map(b=>b[0]).map((b,k,S)=>{const $=!k,T=k===kl(S);return a&&$?0:a&&T?g:b+u[k]})}return{snaps:f,snapsAligned:p}}function k7(e,t,n,r,o){const{reachedAny:i,removeOffset:a,constrain:s}=r;function c(h){return h.concat().sort((m,v)=>wt(m)-wt(v))[0]}function l(h){const m=e?a(h):s(h),v=t.map(g=>g-m).map(g=>u(g,0)).map((g,b)=>({diff:g,index:b})).sort((g,b)=>wt(g.diff)-wt(b.diff)),{index:y}=v[0];return{index:y,distance:m}}function u(h,m){const v=[h,h+n,h-n];if(!e)return v[0];if(!m)return c(v);const y=v.filter(g=>zp(g)===m);return c(y)}function f(h,m){const v=t[h]-o.get(),y=u(v,m);return{index:h,distance:y}}function p(h,m){const v=o.get()+h,{index:y,distance:g}=l(v),b=!e&&i(v);if(!m||b)return{index:y,distance:h};const k=t[y]-g,S=h+u(k,0);return{index:y,distance:S}}return{byDistance:p,byIndex:f,shortcut:u}}function C7(e,t,n,r,o,i,a){function s(f){const p=f.distance,d=f.index!==t.get();i.add(p),p&&(o.duration()?e.start():(e.update(),e.render(1),e.update())),d&&(n.set(t.get()),t.set(f.index),a.emit("select"))}function c(f,p){const d=r.byDistance(f,p);s(d)}function l(f,p){const d=t.clone().set(f),h=r.byIndex(d.get(),p);s(h)}return{distance:c,index:l}}function Ol(e){let t=e;function n(){return t}function r(c){t=a(c)}function o(c){t+=a(c)}function i(c){t-=a(c)}function a(c){return Bp(c)?c:c.get()}return{get:n,set:r,add:o,subtract:i}}function zx(e,t,n){const r=e.scroll==="x"?a:s,o=n.style;let i=!1;function a(p){return`translate3d(${p}px,0px,0px)`}function s(p){return`translate3d(0px,${p}px,0px)`}function c(p){i||(o.transform=r(t.apply(p)))}function l(p){i=!p}function u(){i||(o.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:u,to:c,toggleActive:l}}function O7(e,t,n,r,o,i,a,s,c){const l=ss(o),u=ss(o).reverse(),f=m().concat(v());function p(S,$){return S.reduce((T,R)=>T-o[R],$)}function d(S,$){return S.reduce((T,R)=>p(T,$)>0?T.concat([R]):T,[])}function h(S,$){const T=$==="start",R=T?-r:r,B=a.findSlideBounds([R]);return S.map(O=>{const M=T?0:-r,H=T?r:0,P=B.filter(N=>N.index===O)[0][T?"end":"start"];return{index:O,slideLocation:Ol(-1),translate:zx(e,t,c[O]),target:()=>s.get()>P?M:H}})}function m(){const S=i[0]-1,$=d(u,S);return h($,"end")}function v(){const S=n-i[0]-1,$=d(l,S);return h($,"start")}function y(){return f.every(({index:S})=>{const $=l.filter(T=>T!==S);return p($,n)<=.1})}function g(){f.forEach(S=>{const{target:$,translate:T,slideLocation:R}=S,B=$();B!==R.get()&&(T.to(B),R.set(B))})}function b(){f.forEach(S=>S.translate.clear())}return{canLoop:y,clear:b,loop:g,loopPoints:f}}function T7(e,t){let n,r=!1;function o(s,c){if(!c)return;function l(u){for(const f of u)if(f.type==="childList"){s.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(u=>{r||(Up(c)||c(s,u))&&l(u)}),n.observe(e,{childList:!0})}function i(){n&&n.disconnect(),r=!0}return{init:o,destroy:i}}function A7(e,t,n,r,o,i,a){const{removeOffset:s,constrain:c}=o,l=.5,u=i?[0,t,-t]:[0],f=d(u,a);function p(v){const y=v||0;return n.map(g=>mo(l,g-l).constrain(g*y))}function d(v,y){const g=v||u,b=p(y);return g.reduce((k,S)=>{const $=r.map((T,R)=>({start:T-n[R]+b[R]+S,end:T+e-b[R]+S,index:R}));return k.concat($)},[])}function h(v,y){const g=i?s(v):c(v);return(y||f).reduce((k,S)=>{const{index:$,start:T,end:R}=S,B=k.includes($),O=T<g&&R>g;return!B&&O?k.concat([$]):k},[])}return{check:h,findSlideBounds:d}}function P7(e,t,n,r,o,i){const{measureSize:a,startEdge:s,endEdge:c}=e,l=n[0]&&o,u=h(),f=m(),p=n.map(a),d=v();function h(){if(!l)return 0;const g=n[0];return wt(t[s]-g[s])}function m(){if(!l)return 0;const g=i.getComputedStyle(Fr(r));return parseFloat(g.getPropertyValue(`margin-${c}`))}function v(){return n.map((g,b,k)=>{const S=!b,$=b===kl(k);return S?p[b]+u:$?p[b]+f:k[b+1][s]-g[s]}).map(wt)}return{slideSizes:p,slideSizesWithGaps:d}}function I7(e,t,n){const r=Bp(n);function o(c,l){return ss(c).filter(u=>u%l===0).map(u=>c.slice(u,u+l))}function i(c){return ss(c).reduce((l,u)=>{const p=t.slice(Fr(l),u+1).reduce((d,h)=>d+h,0);return!u||p>e?l.concat(u):l},[]).map((l,u,f)=>c.slice(l,f[u+1]))}function a(c){return r?o(c,n):i(c)}return{groupSlides:a}}function R7(e,t,n,r,o,i,a,s){const{align:c,axis:l,direction:u,startIndex:f,inViewThreshold:p,loop:d,duration:h,dragFree:m,dragThreshold:v,slidesToScroll:y,skipSnaps:g,containScroll:b}=i,k=t.getBoundingClientRect(),S=n.map(oe=>oe.getBoundingClientRect()),$=h7(u),T=p7(l,u),R=T.measureSize(k),B=v7(R),O=d7(c,R),M=!d&&!!b,H=d||!!b,{slideSizes:L,slideSizesWithGaps:P}=P7(T,k,S,n,H,o),N=I7(R,P,y),{snaps:j,snapsAligned:W}=$7(T,O,k,S,P,N,M),V=-Fr(j)+Fr(P),{snapsContained:D}=x7(R,V,W,b),w=M?D:W,{limit:z}=S7(V,w,d),K=Ux(kl(w),f,d),_=K.clone(),J=ss(n),ae=({dragHandler:oe,scrollBody:ee,scrollBounds:Se,eventHandler:xe,animation:ke,options:{loop:Fe}})=>{const Te=oe.pointerDown();Fe||Se.constrain(Te);const U=ee.seek().settled();U&&!Te&&(ke.stop(),xe.emit("settle")),U||xe.emit("scroll")},re=({scrollBody:oe,translate:ee,location:Se,offsetLocation:xe,scrollLooper:ke,slideLooper:Fe,options:{loop:Te}},U)=>{const Z=oe.velocity();xe.set(Se.get()-Z+Z*U),Te&&(ke.loop(oe.direction()),Fe.loop()),ee.to(xe.get())},le={start:()=>s.start(X),stop:()=>s.stop(X),update:()=>ae(X),render:oe=>re(X,oe)},pe=.68,me=w[K.get()],ce=Ol(me),Q=Ol(me),G=Ol(me),fe=b7(ce,G,h,pe),ve=k7(d,w,V,z,G),_e=C7(le,K,_,ve,fe,G,a),I=A7(R,V,L,j,z,d,p),X={ownerDocument:r,ownerWindow:o,eventHandler:a,containerRect:k,slideRects:S,animation:le,axis:T,direction:$,dragHandler:m7(T,$,e,r,o,G,y7(T,o),ce,le,_e,fe,ve,K,a,B,m,v,g,pe),eventStore:cs(),percentOfView:B,index:K,indexPrevious:_,limit:z,location:ce,offsetLocation:Q,options:i,resizeHandler:g7(t,a,o,n,T),scrollBody:fe,scrollBounds:w7(z,ce,G,fe,B),scrollLooper:E7(V,z,Q,[ce,Q,G]),scrollProgress:_7(z),scrollSnaps:w,scrollTarget:ve,scrollTo:_e,slideLooper:O7(T,$,R,V,P,w,I,Q,n),slidesHandler:T7(t,a),slidesInView:I,slideIndexes:J,slidesToScroll:N,target:G,translate:zx(T,$,t)};return X}function M7(e){const t=16.666666666666668;let n=[],r=null,o=0,i=0;function a(f){r||(r=f);const p=f-r;for(r=f,o+=p;o>=t;)n.forEach(({animation:h})=>h.update()),o-=t;const d=wt(o/t);n.forEach(({animation:h})=>h.render(d)),i&&e.requestAnimationFrame(a)}function s(f){n.includes(f)||n.push(f),!i&&(i=e.requestAnimationFrame(a))}function c(f){n=n.filter(p=>p!==f),!n.length&&(e.cancelAnimationFrame(i),r=null,o=0,i=0)}function l(){r=null,o=0}return{start:s,stop:c,reset:l,window:e}}function N7(){const e={};let t;function n(c){t=c}function r(c){return e[c]||[]}function o(c){return r(c).forEach(l=>l(t,c)),s}function i(c,l){return e[c]=r(c).concat([l]),s}function a(c,l){return e[c]=r(c).filter(u=>u!==l),s}const s={init:n,emit:o,off:a,on:i};return s}const D7={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,breakpoints:{},dragFree:!1,dragThreshold:10,inViewThreshold:0,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0};function j7(e){function t(i,a){return Lx(i,a||{})}function n(i){const a=i.breakpoints||{},s=Cl(a).filter(c=>e.matchMedia(c).matches).map(c=>a[c]).reduce((c,l)=>t(c,l),{});return t(i,s)}function r(i){return i.map(a=>Cl(a.breakpoints||{})).reduce((a,s)=>a.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function F7(e){let t=[];function n(i,a){return t=i.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(a,e)),i.reduce((s,c)=>Object.assign(s,{[c.name]:c}),{})}function r(){t=t.filter(i=>i.destroy())}return{init:n,destroy:r}}function Li(e,t,n){const r=e.ownerDocument,o=r.defaultView,i=j7(o),a=F7(i),s=cs(),c=cs(),l=N7(),{animationRealms:u}=Li,{mergeOptions:f,optionsAtMedia:p,optionsMediaQueries:d}=i,{on:h,off:m,emit:v}=l,y=L;let g=!1,b,k=f(D7,Li.globalOptions),S=f(k),$=[],T,R,B;function O(){const{container:fe,slides:ve}=S;R=(jx(fe)?e.querySelector(fe):fe)||e.children[0];const I=jx(ve)?R.querySelectorAll(ve):ve;B=[].slice.call(I||R.children)}function M(fe,ve){const _e=R7(e,R,B,r,o,fe,l,ve);if(fe.loop&&!_e.slideLooper.canLoop()){const I=Object.assign({},fe,{loop:!1});return M(I,ve)}return _e}function H(fe,ve){if(g)return;const _e=u.find(X=>X.window===o),I=_e||M7(o);_e||u.push(I),k=f(k,fe),S=p(k),$=ve||$,O(),b=M(S,I),d([k,...$.map(({options:X})=>X)]).forEach(X=>s.add(X,"change",L)),S.active&&(b.translate.to(b.location.get()),b.eventHandler.init(G),b.resizeHandler.init(G,S.watchResize),b.slidesHandler.init(G,S.watchSlides),c.add(r,"visibilitychange",()=>{r.hidden&&I.reset()}),b.options.loop&&b.slideLooper.loop(),R.offsetParent&&B.length&&b.dragHandler.init(G,S.watchDrag),T=a.init($,G))}function L(fe,ve){const _e=ae();P(),H(f({startIndex:_e},fe),ve),l.emit("reInit")}function P(){b.dragHandler.destroy(),b.animation.stop(),b.eventStore.clear(),b.translate.clear(),b.slideLooper.clear(),b.resizeHandler.destroy(),b.slidesHandler.destroy(),a.destroy(),s.clear(),c.clear()}function N(){g||(g=!0,s.clear(),P(),l.emit("destroy"))}function j(fe){const ve=b[fe?"target":"location"].get(),_e=S.loop?"removeOffset":"constrain";return b.slidesInView.check(b.limit[_e](ve))}function W(fe){const ve=j(fe);return b.slideIndexes.filter(_e=>!ve.includes(_e))}function V(fe,ve,_e){!S.active||g||(b.scrollBody.useBaseFriction().useDuration(ve?0:S.duration),b.scrollTo.index(fe,_e||0))}function D(fe){const ve=b.index.add(1).get();V(ve,fe===!0,-1)}function w(fe){const ve=b.index.add(-1).get();V(ve,fe===!0,1)}function z(){return b.index.add(1).get()!==ae()}function K(){return b.index.add(-1).get()!==ae()}function _(){return b.scrollSnaps.map(b.scrollProgress.get)}function J(){return b.scrollProgress.get(b.location.get())}function ae(){return b.index.get()}function re(){return b.indexPrevious.get()}function le(){return T}function pe(){return b}function me(){return e}function ce(){return R}function Q(){return B}const G={canScrollNext:z,canScrollPrev:K,containerNode:ce,internalEngine:pe,destroy:N,off:m,on:h,emit:v,plugins:le,previousScrollSnap:re,reInit:y,rootNode:me,scrollNext:D,scrollPrev:w,scrollProgress:J,scrollSnapList:_,scrollTo:V,selectedScrollSnap:ae,slideNodes:Q,slidesInView:j,slidesNotInView:W};return H(t,n),setTimeout(()=>l.emit("init"),0),G}Li.animationRealms=[],Li.globalOptions=void 0;function qp(e={},t=[]){const n=E.useRef(e),r=E.useRef(t),[o,i]=E.useState(),[a,s]=E.useState(),c=E.useCallback(()=>{o&&o.reInit(n.current,r.current)},[o]);return E.useEffect(()=>{if(l7()&&a){Li.globalOptions=qp.globalOptions;const l=Li(a,n.current,r.current);return i(l),()=>l.destroy()}else i(void 0)},[a,i]),E.useEffect(()=>{Lp(n.current,e)||(n.current=e,c())},[e,c]),E.useEffect(()=>{u7(r.current,t)||(r.current=t,c())},[t,c]),[s,o]}qp.globalOptions=void 0;function L7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))}const B7=C.forwardRef(L7);function U7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",clipRule:"evenodd"}))}const z7=C.forwardRef(U7);function q7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5H5.625ZM7.5 15a.75.75 0 0 1 .75-.75h7.5a.75.75 0 0 1 0 1.5h-7.5A.75.75 0 0 1 7.5 15Zm.75 2.25a.75.75 0 0 0 0 1.5H12a.75.75 0 0 0 0-1.5H8.25Z",clipRule:"evenodd"}),C.createElement("path",{d:"M12.971 1.816A5.23 5.23 0 0 1 14.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 0 1 3.434 1.279 9.768 9.768 0 0 0-6.963-6.963Z"}))}const H7=C.forwardRef(q7);function V7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"M1.5 8.67v8.58a3 3 0 0 0 3 3h15a3 3 0 0 0 3-3V8.67l-8.928 5.493a3 3 0 0 1-3.144 0L1.5 8.67Z"}),C.createElement("path",{d:"M22.5 6.908V6.75a3 3 0 0 0-3-3h-15a3 3 0 0 0-3 3v.158l9.714 5.978a1.5 1.5 0 0 0 1.572 0L22.5 6.908Z"}))}const W7=C.forwardRef(V7);function K7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"M21.721 12.752a9.711 9.711 0 0 0-.945-5.003 12.754 12.754 0 0 1-4.339 2.708 18.991 18.991 0 0 1-.214 4.772 17.165 17.165 0 0 0 5.498-2.477ZM14.634 15.55a17.324 17.324 0 0 0 .332-4.647c-.952.227-1.945.347-2.966.347-1.021 0-2.014-.12-2.966-.347a17.515 17.515 0 0 0 .332 4.647 17.385 17.385 0 0 0 5.268 0ZM9.772 17.119a18.963 18.963 0 0 0 4.456 0A17.182 17.182 0 0 1 12 21.724a17.18 17.18 0 0 1-2.228-4.605ZM7.777 15.23a18.87 18.87 0 0 1-.214-4.774 12.753 12.753 0 0 1-4.34-2.708 9.711 9.711 0 0 0-.944 5.004 17.165 17.165 0 0 0 5.498 2.477ZM21.356 14.752a9.765 9.765 0 0 1-7.478 6.817 18.64 18.64 0 0 0 1.988-4.718 18.627 18.627 0 0 0 5.49-2.098ZM2.644 14.752c1.682.971 3.53 1.688 5.49 2.099a18.64 18.64 0 0 0 1.988 4.718 9.765 9.765 0 0 1-7.478-6.816ZM13.878 2.43a9.755 9.755 0 0 1 6.116 3.986 11.267 11.267 0 0 1-3.746 2.504 18.63 18.63 0 0 0-2.37-6.49ZM12 2.276a17.152 17.152 0 0 1 2.805 7.121c-.897.23-1.837.353-2.805.353-.968 0-1.908-.122-2.805-.353A17.151 17.151 0 0 1 12 2.276ZM10.122 2.43a18.629 18.629 0 0 0-2.37 6.49 11.266 11.266 0 0 1-3.746-2.504 9.754 9.754 0 0 1 6.116-3.985Z"}))}const G7=C.forwardRef(K7);function Z7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M12 1.5a5.25 5.25 0 0 0-5.25 5.25v3a3 3 0 0 0-3 3v6.75a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3v-6.75a3 3 0 0 0-3-3v-3c0-2.9-2.35-5.25-5.25-5.25Zm3.75 8.25v-3a3.75 3.75 0 1 0-7.5 0v3h7.5Z",clipRule:"evenodd"}))}const Y7=C.forwardRef(Z7);function J7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M1.5 4.5a3 3 0 0 1 3-3h1.372c.86 0 1.61.586 1.819 1.42l1.105 4.423a1.875 1.875 0 0 1-.694 1.955l-1.293.97c-.135.101-.164.249-.126.352a11.285 11.285 0 0 0 6.697 6.697c.103.038.25.009.352-.126l.97-1.293a1.875 1.875 0 0 1 1.955-.694l4.423 1.105c.834.209 1.42.959 1.42 1.82V19.5a3 3 0 0 1-3 3h-2.25C8.552 22.5 1.5 15.448 1.5 6.75V4.5Z",clipRule:"evenodd"}))}const X7=C.forwardRef(J7),Q7=E.forwardRef(({blocks:e,direction:t,sender:n,timestamp:r},o)=>{const[i,a]=qp({skipSnaps:!0}),[s,c]=E.useState(!0),[l,u]=E.useState(!0),f=E.useCallback(()=>a==null?void 0:a.scrollPrev(),[a]),p=E.useCallback(()=>a==null?void 0:a.scrollNext(),[a]),{message:{blocks:{carousel:d}}}=ct,h=E.useCallback(m=>{c(!m.canScrollPrev()),u(!m.canScrollNext())},[]);return E.useEffect(()=>{a&&(h(a),a.on("reInit",h),a.on("select",h))},[a,h]),F.jsxs("div",{...d==null?void 0:d.container,"data-container":"carousel",ref:i,children:[F.jsx("div",{ref:o,...d==null?void 0:d.slidesContainer,children:e.map((m,v)=>F.jsx(Wi,{block:m,direction:t,sender:n,timestamp:r},v))}),F.jsx(B7,{...d==null?void 0:d.backButton,"data-disabled":s?"":void 0,onClick:f}),F.jsx(z7,{...d==null?void 0:d.nextButton,"data-disabled":l?"":void 0,onClick:p})]})}),Bi=Math.min,$n=Math.max,Tl=Math.round,Ui=Math.floor,yo=e=>({x:e,y:e});function qx(e,t,n){return $n(e,Bi(t,n))}function Al(e,t){return typeof e=="function"?e(t):e}function ls(e){return e.split("-")[0]}function Hp(e){return e.split("-")[1]}function Hx(e){return e==="x"?"y":"x"}function eU(e){return e==="y"?"height":"width"}function us(e){return["top","bottom"].includes(ls(e))?"y":"x"}function tU(e){return Hx(us(e))}function nU(e){return{top:0,right:0,bottom:0,left:0,...e}}function rU(e){return typeof e!="number"?nU(e):{top:e,right:e,bottom:e,left:e}}function Pl(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function vo(e){return Vx(e)?(e.nodeName||"").toLowerCase():"#document"}function kn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Lr(e){var t;return(t=(Vx(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Vx(e){return e instanceof Node||e instanceof kn(e).Node}function xt(e){return e instanceof Element||e instanceof kn(e).Element}function tn(e){return e instanceof HTMLElement||e instanceof kn(e).HTMLElement}function Vp(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof kn(e).ShadowRoot}function fs(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Cn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function oU(e){return["table","td","th"].includes(vo(e))}function Wp(e){const t=Kp(),n=Cn(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function iU(e){let t=Jo(e);for(;tn(t)&&!ds(t);){if(Wp(t))return t;t=Jo(t)}return null}function Kp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ds(e){return["html","body","#document"].includes(vo(e))}function Cn(e){return kn(e).getComputedStyle(e)}function Il(e){return xt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Jo(e){if(vo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Vp(e)&&e.host||Lr(e);return Vp(t)?t.host:t}function Wx(e){const t=Jo(e);return ds(t)?e.ownerDocument?e.ownerDocument.body:e.body:tn(t)&&fs(t)?t:Wx(t)}function go(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Wx(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=kn(o);return i?t.concat(a,a.visualViewport||[],fs(o)?o:[],a.frameElement&&n?go(a.frameElement):[]):t.concat(o,go(o,[],n))}function bo(e){let t=e.activeElement;for(;((n=t)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function yn(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Vp(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Kx(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function aU(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function Gx(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(Kx())||t.test(aU()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Zx(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function Yx(){return/apple/i.test(navigator.vendor)}function sU(){return Kx().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Jx(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function cU(e){return"nativeEvent"in e}function lU(e){return e.matches("html,body")}function Gn(e){return(e==null?void 0:e.ownerDocument)||document}function Gp(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Xx(e){return"composedPath"in e?e.composedPath()[0]:e.target}const uU="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Qx(e){return tn(e)&&e.matches(uU)}function Wt(e){e.preventDefault(),e.stopPropagation()}function eS(e,t,n){let{reference:r,floating:o}=e;const i=us(t),a=tU(t),s=eU(a),c=ls(t),l=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let d;switch(c){case"top":d={x:u,y:r.y-o.height};break;case"bottom":d={x:u,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-o.width,y:f};break;default:d={x:r.x,y:r.y}}switch(Hp(t)){case"start":d[a]-=p*(n&&l?-1:1);break;case"end":d[a]+=p*(n&&l?-1:1);break}return d}const fU=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=eS(l,r,c),p=r,d={},h=0;for(let m=0;m<s.length;m++){const{name:v,fn:y}=s[m],{x:g,y:b,data:k,reset:S}=await y({x:u,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:d,rects:l,platform:a,elements:{reference:e,floating:t}});if(u=g??u,f=b??f,d={...d,[v]:{...d[v],...k}},S&&h<=50){h++,typeof S=="object"&&(S.placement&&(p=S.placement),S.rects&&(l=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:u,y:f}=eS(l,p,c)),m=-1;continue}}return{x:u,y:f,placement:p,strategy:o,middlewareData:d}};async function tS(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=Al(t,e),h=rU(d),v=s[p?f==="floating"?"reference":"floating":f],y=Pl(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),g=f==="floating"?{...a.floating,x:r,y:o}:a.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),k=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},S=Pl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:g,offsetParent:b,strategy:c}):g);return{top:(y.top-S.top+h.top)/k.y,bottom:(S.bottom-y.bottom+h.bottom)/k.y,left:(y.left-S.left+h.left)/k.x,right:(S.right-y.right+h.right)/k.x}}async function dU(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=ls(n),s=Hp(n),c=us(n)==="y",l=["left","top"].includes(a)?-1:1,u=i&&c?-1:1,f=Al(t,e);let{mainAxis:p,crossAxis:d,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&typeof h=="number"&&(d=s==="end"?h*-1:h),c?{x:d*u,y:p*l}:{x:p*l,y:d*u}}const pU=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await dU(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},hU=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:v=>{let{x:y,y:g}=v;return{x:y,y:g}}},...c}=Al(e,t),l={x:n,y:r},u=await tS(t,c),f=us(ls(o)),p=Hx(f);let d=l[p],h=l[f];if(i){const v=p==="y"?"top":"left",y=p==="y"?"bottom":"right",g=d+u[v],b=d-u[y];d=qx(g,d,b)}if(a){const v=f==="y"?"top":"left",y=f==="y"?"bottom":"right",g=h+u[v],b=h-u[y];h=qx(g,h,b)}const m=s.fn({...t,[p]:d,[f]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},mU=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=Al(e,t),c=await tS(t,s),l=ls(n),u=Hp(n),f=us(n)==="y",{width:p,height:d}=r.floating;let h,m;l==="top"||l==="bottom"?(h=l,m=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=l,h=u==="end"?"top":"bottom");const v=d-c[h],y=p-c[m],g=!t.middlewareData.shift;let b=v,k=y;if(f){const $=p-c.left-c.right;k=u||g?Bi(y,$):$}else{const $=d-c.top-c.bottom;b=u||g?Bi(v,$):$}if(g&&!u){const $=$n(c.left,0),T=$n(c.right,0),R=$n(c.top,0),B=$n(c.bottom,0);f?k=p-2*($!==0||T!==0?$+T:$n(c.left,c.right)):b=d-2*(R!==0||B!==0?R+B:$n(c.top,c.bottom))}await a({...t,availableWidth:k,availableHeight:b});const S=await o.getDimensions(i.floating);return p!==S.width||d!==S.height?{reset:{rects:!0}}:{}}}};function nS(e){const t=Cn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=tn(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Tl(n)!==i||Tl(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Zp(e){return xt(e)?e:e.contextElement}function zi(e){const t=Zp(e);if(!tn(t))return yo(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=nS(t);let a=(i?Tl(n.width):n.width)/r,s=(i?Tl(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const yU=yo(0);function rS(e){const t=kn(e);return!Kp()||!t.visualViewport?yU:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function vU(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==kn(e)?!1:t}function Xo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Zp(e);let a=yo(1);t&&(r?xt(r)&&(a=zi(r)):a=zi(e));const s=vU(i,n,r)?rS(i):yo(0);let c=(o.left+s.x)/a.x,l=(o.top+s.y)/a.y,u=o.width/a.x,f=o.height/a.y;if(i){const p=kn(i),d=r&&xt(r)?kn(r):r;let h=p.frameElement;for(;h&&r&&d!==p;){const m=zi(h),v=h.getBoundingClientRect(),y=Cn(h),g=v.left+(h.clientLeft+parseFloat(y.paddingLeft))*m.x,b=v.top+(h.clientTop+parseFloat(y.paddingTop))*m.y;c*=m.x,l*=m.y,u*=m.x,f*=m.y,c+=g,l+=b,h=kn(h).frameElement}}return Pl({width:u,height:f,x:c,y:l})}function gU(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=tn(n),i=Lr(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0},s=yo(1);const c=yo(0);if((o||!o&&r!=="fixed")&&((vo(n)!=="body"||fs(i))&&(a=Il(n)),tn(n))){const l=Xo(n);s=zi(n),c.x=l.x+n.clientLeft,c.y=l.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+c.x,y:t.y*s.y-a.scrollTop*s.y+c.y}}function bU(e){return Array.from(e.getClientRects())}function oS(e){return Xo(Lr(e)).left+Il(e).scrollLeft}function wU(e){const t=Lr(e),n=Il(e),r=e.ownerDocument.body,o=$n(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=$n(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+oS(e);const s=-n.scrollTop;return Cn(r).direction==="rtl"&&(a+=$n(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function xU(e,t){const n=kn(e),r=Lr(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;const l=Kp();(!l||l&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s,y:c}}function SU(e,t){const n=Xo(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=tn(e)?zi(e):yo(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,c=o*i.x,l=r*i.y;return{width:a,height:s,x:c,y:l}}function iS(e,t,n){let r;if(t==="viewport")r=xU(e,n);else if(t==="document")r=wU(Lr(e));else if(xt(t))r=SU(t,n);else{const o=rS(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Pl(r)}function aS(e,t){const n=Jo(e);return n===t||!xt(n)||ds(n)?!1:Cn(n).position==="fixed"||aS(n,t)}function EU(e,t){const n=t.get(e);if(n)return n;let r=go(e,[],!1).filter(s=>xt(s)&&vo(s)!=="body"),o=null;const i=Cn(e).position==="fixed";let a=i?Jo(e):e;for(;xt(a)&&!ds(a);){const s=Cn(a),c=Wp(a);!c&&s.position==="fixed"&&(o=null),(i?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||fs(a)&&!c&&aS(e,a))?r=r.filter(u=>u!==a):o=s,a=Jo(a)}return t.set(e,r),r}function _U(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?EU(t,this._c):[].concat(n),r],s=a[0],c=a.reduce((l,u)=>{const f=iS(t,u,o);return l.top=$n(f.top,l.top),l.right=Bi(f.right,l.right),l.bottom=Bi(f.bottom,l.bottom),l.left=$n(f.left,l.left),l},iS(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function $U(e){return nS(e)}function kU(e,t,n){const r=tn(t),o=Lr(t),i=n==="fixed",a=Xo(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=yo(0);if(r||!r&&!i)if((vo(t)!=="body"||fs(o))&&(s=Il(t)),r){const l=Xo(t,!0,i,t);c.x=l.x+t.clientLeft,c.y=l.y+t.clientTop}else o&&(c.x=oS(o));return{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function sS(e,t){return!tn(e)||Cn(e).position==="fixed"?null:t?t(e):e.offsetParent}function cS(e,t){const n=kn(e);if(!tn(e))return n;let r=sS(e,t);for(;r&&oU(r)&&Cn(r).position==="static";)r=sS(r,t);return r&&(vo(r)==="html"||vo(r)==="body"&&Cn(r).position==="static"&&!Wp(r))?n:r||iU(e)||n}const CU=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||cS,i=this.getDimensions;return{reference:kU(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function OU(e){return Cn(e).direction==="rtl"}const TU={convertOffsetParentRelativeRectToViewportRelativeRect:gU,getDocumentElement:Lr,getClippingRect:_U,getOffsetParent:cS,getElementRects:CU,getClientRects:bU,getDimensions:$U,getScale:zi,isElement:xt,isRTL:OU};function AU(e,t){let n=null,r;const o=Lr(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),i();const{left:l,top:u,width:f,height:p}=e.getBoundingClientRect();if(s||t(),!f||!p)return;const d=Ui(u),h=Ui(o.clientWidth-(l+f)),m=Ui(o.clientHeight-(u+p)),v=Ui(l),g={rootMargin:-d+"px "+-h+"px "+-m+"px "+-v+"px",threshold:$n(0,Bi(1,c))||1};let b=!0;function k(S){const $=S[0].intersectionRatio;if($!==c){if(!b)return a();$?a(!1,$):r=setTimeout(()=>{a(!1,1e-7)},100)}b=!1}try{n=new IntersectionObserver(k,{...g,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,g)}n.observe(e)}return a(!0),i}function PU(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=Zp(e),u=o||i?[...l?go(l):[],...go(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const f=l&&s?AU(l,n):null;let p=-1,d=null;a&&(d=new ResizeObserver(y=>{let[g]=y;g&&g.target===l&&d&&(d.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{d&&d.observe(t)})),n()}),l&&!c&&d.observe(l),d.observe(t));let h,m=c?Xo(e):null;c&&v();function v(){const y=Xo(e);m&&(y.x!==m.x||y.y!==m.y||y.width!==m.width||y.height!==m.height)&&n(),m=y,h=requestAnimationFrame(v)}return n(),()=>{u.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),f&&f(),d&&d.disconnect(),d=null,c&&cancelAnimationFrame(h)}}const IU=(e,t,n)=>{const r=new Map,o={platform:TU,...n},i={...o.platform,_c:r};return fU(e,t,{...o,platform:i})};var Rl=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Ml(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Ml(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Ml(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function lS(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function uS(e,t){const n=lS(e);return Math.round(t*n)/n}function fS(e){const t=C.useRef(e);return Rl(()=>{t.current=e}),t}function RU(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,f]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,d]=C.useState(r);Ml(p,r)||d(r);const[h,m]=C.useState(null),[v,y]=C.useState(null),g=C.useCallback(j=>{j!=$.current&&($.current=j,m(j))},[m]),b=C.useCallback(j=>{j!==T.current&&(T.current=j,y(j))},[y]),k=i||h,S=a||v,$=C.useRef(null),T=C.useRef(null),R=C.useRef(u),B=fS(c),O=fS(o),M=C.useCallback(()=>{if(!$.current||!T.current)return;const j={placement:t,strategy:n,middleware:p};O.current&&(j.platform=O.current),IU($.current,T.current,j).then(W=>{const V={...W,isPositioned:!0};H.current&&!Ml(R.current,V)&&(R.current=V,GO.flushSync(()=>{f(V)}))})},[p,t,n,O]);Rl(()=>{l===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(j=>({...j,isPositioned:!1})))},[l]);const H=C.useRef(!1);Rl(()=>(H.current=!0,()=>{H.current=!1}),[]),Rl(()=>{if(k&&($.current=k),S&&(T.current=S),k&&S){if(B.current)return B.current(k,S,M);M()}},[k,S,M,B]);const L=C.useMemo(()=>({reference:$,floating:T,setReference:g,setFloating:b}),[g,b]),P=C.useMemo(()=>({reference:k,floating:S}),[k,S]),N=C.useMemo(()=>{const j={position:n,left:0,top:0};if(!P.floating)return j;const W=uS(P.floating,u.x),V=uS(P.floating,u.y);return s?{...j,transform:"translate("+W+"px, "+V+"px)",...lS(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:V}},[n,s,P.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:M,refs:L,elements:P,floatingStyles:N}),[u,M,L,P,N])}/*!
|
|
281
281
|
* tabbable 6.2.0
|
|
282
282
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
283
283
|
*/var MU=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Yp=MU.join(","),dS=typeof Element>"u",ps=dS?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Nl=!dS&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Dl=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&e(t.parentNode);return a},NU=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},DU=function(t,n,r){if(Dl(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Yp));return n&&ps.call(t,Yp)&&o.unshift(t),o=o.filter(r),o},jU=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Dl(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),c=s.length?s:a.children,l=e(c,!0,r);r.flatten?o.push.apply(o,l):o.push({scopeParent:a,candidates:l})}else{var u=ps.call(a,Yp);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var f=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Dl(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(f&&p){var d=e(f===!0?a.children:f.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:a,candidates:d})}else i.unshift.apply(i,a.children)}}return o},pS=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},hS=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||NU(t))&&!pS(t)?0:t.tabIndex},FU=function(t,n){var r=hS(t);return r<0&&n&&!pS(t)?0:r},LU=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},mS=function(t){return t.tagName==="INPUT"},BU=function(t){return mS(t)&&t.type==="hidden"},UU=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},zU=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},qU=function(t){if(!t.name)return!0;var n=t.form||Nl(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=zU(o,t.form);return!i||i===t},HU=function(t){return mS(t)&&t.type==="radio"},VU=function(t){return HU(t)&&!qU(t)},WU=function(t){var n,r=t&&Nl(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,c;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!i&&o;){var l,u,f;r=Nl(o),o=(l=r)===null||l===void 0?void 0:l.host,i=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},yS=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},KU=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=ps.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(ps.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var c=t.parentElement,l=Nl(t);if(c&&!c.shadowRoot&&o(c)===!0)return yS(t);t.assignedSlot?t=t.assignedSlot:!c&&l!==t.ownerDocument?t=l.host:t=c}t=s}if(WU(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return yS(t);return!1},GU=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return ps.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},ZU=function(t,n){return!(n.disabled||Dl(n)||BU(n)||KU(n,t)||UU(n)||GU(n))},vS=function(t,n){return!(VU(n)||hS(n)<0||!ZU(t,n))},YU=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},JU=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,c=FU(s,a),l=a?e(o.candidates):s;c===0?a?n.push.apply(n,l):n.push(s):r.push({documentOrder:i,tabIndex:c,item:o,isScope:a,content:l})}),r.sort(LU).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Jp=function(t,n){n=n||{};var r;return n.getShadowRoot?r=jU([t],n.includeContainer,{filter:vS.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:YU}):r=DU(t,n.includeContainer,vS.bind(null,n)),JU(r)};const Xp="ArrowUp",jl="ArrowDown",qi="ArrowLeft",hs="ArrowRight";function Fl(e,t,n){return Math.floor(e/t)!==n}function ms(e,t){return t<0||t>=e.current.length}function Qp(e,t){return nn(e,{disabledIndices:t})}function gS(e,t){return nn(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function nn(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t;const a=e.current;let s=n;do{var c,l;s=s+(r?-i:i)}while(s>=0&&s<=a.length-1&&(o?o.includes(s):a[s]==null||(c=a[s])!=null&&c.hasAttribute("disabled")||((l=a[s])==null?void 0:l.getAttribute("aria-disabled"))==="true"));return s}function XU(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:a,minIndex:s,maxIndex:c,prevIndex:l,stopEvent:u=!1}=t,f=l;if(n.key===Xp){if(u&&Wt(n),l===-1)f=c;else if(f=nn(e,{startingIndex:f,amount:i,decrement:!0,disabledIndices:a}),o&&(l-i<s||f<0)){const p=l%i,d=c%i,h=c-(d-p);d===p?f=c:f=d>p?h:h-i}ms(e,f)&&(f=l)}if(n.key===jl&&(u&&Wt(n),l===-1?f=s:(f=nn(e,{startingIndex:l,amount:i,disabledIndices:a}),o&&l+i>c&&(f=nn(e,{startingIndex:l%i-i,amount:i,disabledIndices:a}))),ms(e,f)&&(f=l)),r==="both"){const p=Ui(l/i);n.key===hs&&(u&&Wt(n),l%i!==i-1?(f=nn(e,{startingIndex:l,disabledIndices:a}),o&&Fl(f,i,p)&&(f=nn(e,{startingIndex:l-l%i-1,disabledIndices:a}))):o&&(f=nn(e,{startingIndex:l-l%i-1,disabledIndices:a})),Fl(f,i,p)&&(f=l)),n.key===qi&&(u&&Wt(n),l%i!==0?(f=nn(e,{startingIndex:l,disabledIndices:a,decrement:!0}),o&&Fl(f,i,p)&&(f=nn(e,{startingIndex:l+(i-l%i),decrement:!0,disabledIndices:a}))):o&&(f=nn(e,{startingIndex:l+(i-l%i),decrement:!0,disabledIndices:a})),Fl(f,i,p)&&(f=l));const d=Ui(c/i)===p;ms(e,f)&&(o&&d?f=n.key===qi?c:nn(e,{startingIndex:l-l%i-1,disabledIndices:a}):f=l)}return f}let bS=0;function Br(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(bS);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():bS=requestAnimationFrame(i)}var Pt=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Ll(){return Ll=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ll.apply(this,arguments)}let eh=!1,QU=0;const wS=()=>"floating-ui-"+QU++;function e9(){const[e,t]=C.useState(()=>eh?wS():void 0);return Pt(()=>{e==null&&t(wS())},[]),C.useEffect(()=>{eh||(eh=!0)},[]),e}const th=C["useId".toString()]||e9;function t9(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const n9=C.createContext(null),r9=C.createContext(null),xS=()=>{var e;return((e=C.useContext(n9))==null?void 0:e.id)||null},Bl=()=>C.useContext(r9);function ys(e){return"data-floating-ui-"+e}function wo(e){const t=E.useRef(e);return Pt(()=>{t.current=e}),t}function o9(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(a=>a.id===o);o=i==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function Hi(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function i9(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),Hi(e,i).forEach(c=>{o(c.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}let Vi=new WeakMap,Ul=new WeakSet,zl={},nh=0;const a9=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,SS=e=>e&&(e.host||SS(e.parentNode)),s9=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=SS(n);return e.contains(r)?r:null}).filter(n=>n!=null);function c9(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=s9(t,e),s=new Set,c=new Set(a),l=[];zl[o]||(zl[o]=new WeakMap);const u=zl[o];a.forEach(f),p(t),s.clear();function f(d){!d||s.has(d)||(s.add(d),d.parentNode&&f(d.parentNode))}function p(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,h=>{if(s.has(h))p(h);else{const m=i?h.getAttribute(i):null,v=m!==null&&m!=="false",y=(Vi.get(h)||0)+1,g=(u.get(h)||0)+1;Vi.set(h,y),u.set(h,g),l.push(h),y===1&&v&&Ul.add(h),g===1&&h.setAttribute(o,""),!v&&i&&h.setAttribute(i,"true")}})}return nh++,()=>{l.forEach(d=>{const h=(Vi.get(d)||0)-1,m=(u.get(d)||0)-1;Vi.set(d,h),u.set(d,m),h||(!Ul.has(d)&&i&&d.removeAttribute(i),Ul.delete(d)),m||d.removeAttribute(o)}),nh--,nh||(Vi=new WeakMap,Vi=new WeakMap,Ul=new WeakSet,zl={})}}function ES(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Gn(e[0]).body;return c9(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const rh=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function _S(e,t){const n=Jp(e,rh());t==="prev"&&n.reverse();const r=n.indexOf(bo(Gn(e)));return n.slice(r+1)[0]}function $S(){return _S(document.body,"next")}function kS(){return _S(document.body,"prev")}function vs(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!yn(n,r)}function l9(e){Jp(e,rh()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function u9(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const oh={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let f9;function CS(e){e.key==="Tab"&&(e.target,clearTimeout(f9))}const ql=C.forwardRef(function(t,n){const[r,o]=C.useState();Pt(()=>(Yx()&&o("button"),document.addEventListener("keydown",CS),()=>{document.removeEventListener("keydown",CS)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[ys("focus-guard")]:"",style:oh};return C.createElement("span",Ll({},t,i))}),OS=C.createContext(null);function d9(e){let{id:t,root:n}=e===void 0?{}:e;const[r,o]=C.useState(null),i=th(),a=TS(),s=C.useMemo(()=>({id:t,root:n,portalContext:a,uniqueId:i}),[t,n,a,i]),c=C.useRef();return Pt(()=>()=>{r==null||r.remove()},[r,s]),Pt(()=>{if(c.current===s)return;c.current=s;const{id:l,root:u,portalContext:f,uniqueId:p}=s,d=l?document.getElementById(l):null,h=ys("portal");if(d){const m=document.createElement("div");m.id=p,m.setAttribute(h,""),d.appendChild(m),o(m)}else{let m=u||(f==null?void 0:f.portalNode);m&&!xt(m)&&(m=m.current),m=m||document.body;let v=null;l&&(v=document.createElement("div"),v.id=l,m.appendChild(v));const y=document.createElement("div");y.id=p,y.setAttribute(h,""),m=v||m,m.appendChild(y),o(y)}},[s]),r}function p9(e){let{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e;const i=d9({id:n,root:r}),[a,s]=C.useState(null),c=C.useRef(null),l=C.useRef(null),u=C.useRef(null),f=C.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(r||i);return C.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function d(h){i&&vs(h)&&(h.type==="focusin"?u9:l9)(i)}return i.addEventListener("focusin",d,!0),i.addEventListener("focusout",d,!0),()=>{i.removeEventListener("focusin",d,!0),i.removeEventListener("focusout",d,!0)}},[i,o,a==null?void 0:a.modal]),C.createElement(OS.Provider,{value:C.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:c,afterOutsideRef:l,beforeInsideRef:u,afterInsideRef:f,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&C.createElement(ql,{"data-type":"outside",ref:c,onFocus:d=>{if(vs(d,i)){var h;(h=u.current)==null||h.focus()}else{const m=kS()||(a==null?void 0:a.refs.domReference.current);m==null||m.focus()}}}),p&&i&&C.createElement("span",{"aria-owns":i.id,style:oh}),i&&rr.createPortal(t,i),p&&i&&C.createElement(ql,{"data-type":"outside",ref:l,onFocus:d=>{if(vs(d,i)){var h;(h=f.current)==null||h.focus()}else{const m=$S()||(a==null?void 0:a.refs.domReference.current);m==null||m.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,d.nativeEvent))}}}))}const TS=()=>C.useContext(OS),h9=C.forwardRef(function(t,n){return C.createElement("button",Ll({},t,{type:"button",ref:n,tabIndex:-1,style:oh}))});function m9(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,modal:c=!0,visuallyHiddenDismiss:l=!1,closeOnFocusOut:u=!0}=e,{open:f,refs:p,nodeId:d,onOpenChange:h,events:m,dataRef:v,elements:{domReference:y,floating:g}}=t,b=a9()?i:!0,k=wo(o),S=wo(a),$=wo(s),T=Bl(),R=TS(),B=typeof a=="number"&&a<0,O=C.useRef(null),M=C.useRef(null),H=C.useRef(!1),L=C.useRef(null),P=C.useRef(!1),N=R!=null,j=y&&y.getAttribute("role")==="combobox"&&Qx(y)&&B,W=C.useCallback(function(z){return z===void 0&&(z=g),z?Jp(z,rh()):[]},[g]),V=C.useCallback(z=>{const K=W(z);return k.current.map(_=>y&&_==="reference"?y:g&&_==="floating"?g:K).filter(Boolean).flat()},[y,g,k,W]);C.useEffect(()=>{if(r||!c)return;function z(_){if(_.key==="Tab"){yn(g,bo(Gn(g)))&&W().length===0&&!j&&Wt(_);const J=V(),ae=Xx(_);k.current[0]==="reference"&&ae===y&&(Wt(_),_.shiftKey?Br(J[J.length-1]):Br(J[1])),k.current[1]==="floating"&&ae===g&&_.shiftKey&&(Wt(_),Br(J[0]))}}const K=Gn(g);return K.addEventListener("keydown",z),()=>{K.removeEventListener("keydown",z)}},[r,y,g,c,k,p,j,W,V]),C.useEffect(()=>{if(r||!u)return;function z(){P.current=!0,setTimeout(()=>{P.current=!1})}function K(_){const J=_.relatedTarget;queueMicrotask(()=>{const ae=!(yn(y,J)||yn(g,J)||yn(J,g)||yn(R==null?void 0:R.portalNode,J)||J!=null&&J.hasAttribute(ys("focus-guard"))||T&&(Hi(T.nodesRef.current,d).find(re=>{var le,pe;return yn((le=re.context)==null?void 0:le.elements.floating,J)||yn((pe=re.context)==null?void 0:pe.elements.domReference,J)})||o9(T.nodesRef.current,d).find(re=>{var le,pe;return((le=re.context)==null?void 0:le.elements.floating)===J||((pe=re.context)==null?void 0:pe.elements.domReference)===J})));J&&ae&&!P.current&&J!==L.current&&(H.current=!0,h(!1,_))})}if(g&&tn(y))return y.addEventListener("focusout",K),y.addEventListener("pointerdown",z),!c&&g.addEventListener("focusout",K),()=>{y.removeEventListener("focusout",K),y.removeEventListener("pointerdown",z),!c&&g.removeEventListener("focusout",K)}},[r,y,g,c,d,T,R,h,u]),C.useEffect(()=>{var z;if(r)return;const K=Array.from((R==null||(z=R.portalNode)==null?void 0:z.querySelectorAll("["+ys("portal")+"]"))||[]);if(g){const _=[g,...K,O.current,M.current,k.current.includes("reference")||j?y:null].filter(ae=>ae!=null),J=c?ES(_,b,!b):ES(_);return()=>{J()}}},[r,y,g,c,k,R,j,b]),Pt(()=>{if(r||!g)return;const z=Gn(g),K=bo(z);queueMicrotask(()=>{const _=V(g),J=S.current,ae=(typeof J=="number"?_[J]:J.current)||g,re=yn(g,K);!B&&!re&&f&&Br(ae,{preventScroll:ae===g})})},[r,f,g,B,V,S]),Pt(()=>{if(r||!g)return;let z=!1;const K=Gn(g),_=bo(K),J=v.current;L.current=_;function ae(re){if(re.type==="escapeKey"&&p.domReference.current&&(L.current=p.domReference.current),["referencePress","escapeKey"].includes(re.type))return;const le=re.data.returnFocus;typeof le=="object"?(H.current=!1,z=le.preventScroll):H.current=!le}return m.on("dismiss",ae),()=>{m.off("dismiss",ae);const re=bo(K);(yn(g,re)||T&&Hi(T.nodesRef.current,d).some(pe=>{var me;return yn((me=pe.context)==null?void 0:me.elements.floating,re)})||J.openEvent&&["click","mousedown"].includes(J.openEvent.type))&&p.domReference.current&&(L.current=p.domReference.current),$.current&&tn(L.current)&&!H.current&&Br(L.current,{cancelPrevious:!1,preventScroll:z})}},[r,g,$,v,p,m,T,d]),Pt(()=>{if(!(r||!R))return R.setFocusManagerState({modal:c,closeOnFocusOut:u,open:f,onOpenChange:h,refs:p}),()=>{R.setFocusManagerState(null)}},[r,R,c,f,h,p,u]),Pt(()=>{if(!r&&g&&typeof MutationObserver=="function"&&!B){const z=()=>{const _=g.getAttribute("tabindex");k.current.includes("floating")||bo(Gn(g))!==p.domReference.current&&W().length===0?_!=="0"&&g.setAttribute("tabindex","0"):_!=="-1"&&g.setAttribute("tabindex","-1")};z();const K=new MutationObserver(z);return K.observe(g,{childList:!0,subtree:!0,attributes:!0}),()=>{K.disconnect()}}},[r,g,p,k,W,B]);function D(z){return r||!l||!c?null:C.createElement(h9,{ref:z==="start"?O:M,onClick:K=>h(!1,K.nativeEvent)},typeof l=="string"?l:"Dismiss")}const w=!r&&b&&!j&&(N||c);return C.createElement(C.Fragment,null,w&&C.createElement(ql,{"data-type":"inside",ref:R==null?void 0:R.beforeInsideRef,onFocus:z=>{if(c){const _=V();Br(o[0]==="reference"?_[0]:_[_.length-1])}else if(R!=null&&R.preserveTabOrder&&R.portalNode)if(H.current=!1,vs(z,R.portalNode)){const _=$S()||y;_==null||_.focus()}else{var K;(K=R.beforeOutsideRef.current)==null||K.focus()}}}),!j&&D("start"),n,D("end"),w&&C.createElement(ql,{"data-type":"inside",ref:R==null?void 0:R.afterInsideRef,onFocus:z=>{if(c)Br(V()[0]);else if(R!=null&&R.preserveTabOrder&&R.portalNode)if(u&&(H.current=!0),vs(z,R.portalNode)){const _=kS()||y;_==null||_.focus()}else{var K;(K=R.afterOutsideRef.current)==null||K.focus()}}}))}function AS(e){return tn(e.target)&&e.target.tagName==="BUTTON"}function PS(e){return Qx(e)}function y9(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:c=!0,ignoreMouse:l=!1,keyboardHandlers:u=!0}=t,f=C.useRef(),p=C.useRef(!1);return C.useMemo(()=>a?{reference:{onPointerDown(d){f.current=d.pointerType},onMouseDown(d){d.button===0&&(Jx(f.current,!0)&&l||s!=="click"&&(n&&c&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,d.nativeEvent):(d.preventDefault(),r(!0,d.nativeEvent))))},onClick(d){if(s==="mousedown"&&f.current){f.current=void 0;return}Jx(f.current,!0)&&l||(n&&c&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,d.nativeEvent):r(!0,d.nativeEvent))},onKeyDown(d){f.current=void 0,!(d.defaultPrevented||!u||AS(d))&&(d.key===" "&&!PS(i)&&(d.preventDefault(),p.current=!0),d.key==="Enter"&&r(!(n&&c),d.nativeEvent))},onKeyUp(d){d.defaultPrevented||!u||AS(d)||PS(i)||d.key===" "&&p.current&&(p.current=!1,r(!(n&&c),d.nativeEvent))}}}:{},[a,o,s,l,u,i,c,n,r])}const v9=C["useInsertionEffect".toString()]||(e=>e());function xo(e){const t=C.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return v9(()=>{t.current=e}),C.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const g9={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},b9={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},w9=e=>{var t,n;return{escapeKeyBubbles:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePressBubbles:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function x9(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,nodeId:i,elements:{reference:a,domReference:s,floating:c},dataRef:l}=e,{enabled:u=!0,escapeKey:f=!0,outsidePress:p=!0,outsidePressEvent:d="pointerdown",referencePress:h=!1,referencePressEvent:m="pointerdown",ancestorScroll:v=!1,bubbles:y}=t,g=Bl(),b=xS()!=null,k=xo(typeof p=="function"?p:()=>!1),S=typeof p=="function"?k:p,$=C.useRef(!1),{escapeKeyBubbles:T,outsidePressBubbles:R}=w9(y),B=xo(M=>{if(!n||!u||!f||M.key!=="Escape")return;const H=g?Hi(g.nodesRef.current,i):[];if(!T&&(M.stopPropagation(),H.length>0)){let L=!0;if(H.forEach(P=>{var N;if((N=P.context)!=null&&N.open&&!P.context.dataRef.current.__escapeKeyBubbles){L=!1;return}}),!L)return}o.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,cU(M)?M.nativeEvent:M)}),O=xo(M=>{const H=$.current;if($.current=!1,H||typeof S=="function"&&!S(M))return;const L=Xx(M),P="["+ys("inert")+"]",N=Gn(c).querySelectorAll(P);let j=xt(L)?L:null;for(;j&&!ds(j);){const D=Jo(j);if(D===Gn(c).body||!xt(D))break;j=D}if(N.length&&xt(L)&&!lU(L)&&!yn(L,c)&&Array.from(N).every(D=>!yn(j,D)))return;if(tn(L)&&c){const D=L.clientWidth>0&&L.scrollWidth>L.clientWidth,w=L.clientHeight>0&&L.scrollHeight>L.clientHeight;let z=w&&M.offsetX>L.clientWidth;if(w&&Cn(L).direction==="rtl"&&(z=M.offsetX<=L.offsetWidth-L.clientWidth),z||D&&M.offsetY>L.clientHeight)return}const W=g&&Hi(g.nodesRef.current,i).some(D=>{var w;return Gp(M,(w=D.context)==null?void 0:w.elements.floating)});if(Gp(M,c)||Gp(M,s)||W)return;const V=g?Hi(g.nodesRef.current,i):[];if(V.length>0){let D=!0;if(V.forEach(w=>{var z;if((z=w.context)!=null&&z.open&&!w.context.dataRef.current.__outsidePressBubbles){D=!1;return}}),!D)return}o.emit("dismiss",{type:"outsidePress",data:{returnFocus:b?{preventScroll:!0}:Gx(M)||Zx(M)}}),r(!1,M)});return C.useEffect(()=>{if(!n||!u)return;l.current.__escapeKeyBubbles=T,l.current.__outsidePressBubbles=R;function M(P){r(!1,P)}const H=Gn(c);f&&H.addEventListener("keydown",B),S&&H.addEventListener(d,O);let L=[];return v&&(xt(s)&&(L=go(s)),xt(c)&&(L=L.concat(go(c))),!xt(a)&&a&&a.contextElement&&(L=L.concat(go(a.contextElement)))),L=L.filter(P=>{var N;return P!==((N=H.defaultView)==null?void 0:N.visualViewport)}),L.forEach(P=>{P.addEventListener("scroll",M,{passive:!0})}),()=>{f&&H.removeEventListener("keydown",B),S&&H.removeEventListener(d,O),L.forEach(P=>{P.removeEventListener("scroll",M)})}},[l,c,s,a,f,S,d,n,r,v,u,T,R,B,O]),C.useEffect(()=>{$.current=!1},[S,d]),C.useMemo(()=>u?{reference:{onKeyDown:B,[g9[m]]:M=>{h&&(o.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,M.nativeEvent))}},floating:{onKeyDown:B,[b9[d]]:()=>{$.current=!0}}}:{},[u,o,h,d,m,r,B])}let ih;process.env.NODE_ENV!=="production"&&(ih=new Set);function S9(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:o}=e;if(process.env.NODE_ENV!=="production"){var i;const T="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if((i=e.elements)!=null&&i.reference&&!xt(e.elements.reference)){var a;if(!((a=ih)!=null&&a.has(T))){var s;(s=ih)==null||s.add(T),console.error(T)}}}const[c,l]=C.useState(null),u=((t=e.elements)==null?void 0:t.reference)||c,f=RU(e),p=Bl(),d=xo((T,R)=>{T&&(m.current.openEvent=R),r==null||r(T,R)}),h=C.useRef(null),m=C.useRef({}),v=C.useState(()=>t9())[0],y=th(),g=C.useCallback(T=>{const R=xt(T)?{getBoundingClientRect:()=>T.getBoundingClientRect(),contextElement:T}:T;f.refs.setReference(R)},[f.refs]),b=C.useCallback(T=>{(xt(T)||T===null)&&(h.current=T,l(T)),(xt(f.refs.reference.current)||f.refs.reference.current===null||T!==null&&!xt(T))&&f.refs.setReference(T)},[f.refs]),k=C.useMemo(()=>({...f.refs,setReference:b,setPositionReference:g,domReference:h}),[f.refs,b,g]),S=C.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),$=C.useMemo(()=>({...f,refs:k,elements:S,dataRef:m,nodeId:o,floatingId:y,events:v,open:n,onOpenChange:d}),[f,o,y,v,n,d,k,S]);return Pt(()=>{const T=p==null?void 0:p.nodesRef.current.find(R=>R.id===o);T&&(T.context=$)}),C.useMemo(()=>({...f,context:$,refs:k,elements:S}),[f,k,S,$])}function ah(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(o=>o?o[n]:null).concat(e).reduce((o,i)=>(i&&Object.entries(i).forEach(a=>{let[s,c]=a;if(s.indexOf("on")===0){if(r.has(s)||r.set(s,[]),typeof c=="function"){var l;(l=r.get(s))==null||l.push(c),o[s]=function(){for(var u,f=arguments.length,p=new Array(f),d=0;d<f;d++)p[d]=arguments[d];return(u=r.get(s))==null?void 0:u.map(h=>h(...p)).find(h=>h!==void 0)}}}else o[s]=c}),o),{})}}function E9(e){e===void 0&&(e=[]);const t=e,n=C.useCallback(i=>ah(i,e,"reference"),t),r=C.useCallback(i=>ah(i,e,"floating"),t),o=C.useCallback(i=>ah(i,e,"item"),e.map(i=>i==null?void 0:i.item));return C.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:o}),[n,r,o])}let IS=!1;function Hl(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function RS(e,t){return Hl(t,e===Xp||e===jl,e===qi||e===hs)}function sh(e,t,n){return Hl(t,e===jl,n?e===qi:e===hs)||e==="Enter"||e==" "||e===""}function _9(e,t,n){return Hl(t,n?e===qi:e===hs,e===jl)}function MS(e,t,n){return Hl(t,n?e===hs:e===qi,e===Xp)}function $9(e,t){const{open:n,onOpenChange:r,refs:o,elements:{domReference:i,floating:a}}=e,{listRef:s,activeIndex:c,onNavigate:l=()=>{},enabled:u=!0,selectedIndex:f=null,allowEscape:p=!1,loop:d=!1,nested:h=!1,rtl:m=!1,virtual:v=!1,focusItemOnOpen:y="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:b=!0,disabledIndices:k=void 0,orientation:S="vertical",cols:$=1,scrollItemIntoView:T=!0,virtualItemRef:R}=t;process.env.NODE_ENV!=="production"&&(p&&(d||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),v||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),S==="vertical"&&$>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const B=xS(),O=Bl(),M=xo(l),H=C.useRef(y),L=C.useRef(f??-1),P=C.useRef(null),N=C.useRef(!0),j=C.useRef(M),W=C.useRef(!!a),V=C.useRef(!1),D=C.useRef(!1),w=wo(k),z=wo(n),K=wo(T),[_,J]=C.useState(),[ae,re]=C.useState(),le=xo(function(ce,Q,G){G===void 0&&(G=!1);const fe=ce.current[Q.current];fe&&(v?(J(fe.id),O==null||O.events.emit("virtualfocus",fe),R&&(R.current=fe)):Br(fe,{preventScroll:!0,sync:sU()&&Yx()?IS||V.current:!1}),requestAnimationFrame(()=>{const ve=K.current;ve&&fe&&(G||!N.current)&&(fe.scrollIntoView==null||fe.scrollIntoView(typeof ve=="boolean"?{block:"nearest",inline:"nearest"}:ve))}))});Pt(()=>{document.createElement("div").focus({get preventScroll(){return IS=!0,!1}})},[]),Pt(()=>{u&&(n&&a?H.current&&f!=null&&(D.current=!0,M(f)):W.current&&(L.current=-1,j.current(null)))},[u,n,a,f,M]),Pt(()=>{if(u&&n&&a)if(c==null){if(V.current=!1,f!=null)return;if(W.current&&(L.current=-1,le(s,L)),!W.current&&H.current&&(P.current!=null||H.current===!0&&P.current==null)){let ce=0;const Q=()=>{s.current[0]==null?(ce<2&&(ce?requestAnimationFrame:queueMicrotask)(Q),ce++):(L.current=P.current==null||sh(P.current,S,m)||h?Qp(s,w.current):gS(s,w.current),P.current=null,M(L.current))};Q()}}else ms(s,c)||(L.current=c,le(s,L,D.current),D.current=!1)},[u,n,a,c,f,h,s,S,m,M,le,w]),Pt(()=>{var ce,Q;if(!u||a||!O||v||!W.current)return;const G=O.nodesRef.current,fe=(ce=G.find(I=>I.id===B))==null||(Q=ce.context)==null?void 0:Q.elements.floating,ve=bo(Gn(a)),_e=G.some(I=>I.context&&yn(I.context.elements.floating,ve));fe&&!_e&&N.current&&fe.focus({preventScroll:!0})},[u,a,O,B,v]),Pt(()=>{if(!u||!O||!v||B)return;function ce(Q){re(Q.id),R&&(R.current=Q)}return O.events.on("virtualfocus",ce),()=>{O.events.off("virtualfocus",ce)}},[u,O,v,B,R]),Pt(()=>{j.current=M,W.current=!!a}),Pt(()=>{n||(P.current=null)},[n]);const pe=c!=null,me=C.useMemo(()=>{function ce(G){if(!n)return;const fe=s.current.indexOf(G);fe!==-1&&M(fe)}return{onFocus(G){let{currentTarget:fe}=G;ce(fe)},onClick:G=>{let{currentTarget:fe}=G;return fe.focus({preventScroll:!0})},...g&&{onMouseMove(G){let{currentTarget:fe}=G;ce(fe)},onPointerLeave(G){let{pointerType:fe}=G;!N.current||fe==="touch"||(L.current=-1,le(s,L),M(null),v||Br(o.floating.current,{preventScroll:!0}))}}}},[n,o,le,g,s,M,v]);return C.useMemo(()=>{if(!u)return{};const ce=w.current;function Q(I){if(N.current=!1,V.current=!0,!z.current&&I.currentTarget===o.floating.current)return;if(h&&MS(I.key,S,m)){Wt(I),r(!1,I.nativeEvent),tn(i)&&!v&&i.focus();return}const X=L.current,oe=Qp(s,ce),ee=gS(s,ce);if(I.key==="Home"&&(Wt(I),L.current=oe,M(L.current)),I.key==="End"&&(Wt(I),L.current=ee,M(L.current)),!($>1&&(L.current=XU(s,{event:I,orientation:S,loop:d,cols:$,disabledIndices:ce,minIndex:oe,maxIndex:ee,prevIndex:L.current,stopEvent:!0}),M(L.current),S==="both"))&&RS(I.key,S)){if(Wt(I),n&&!v&&bo(I.currentTarget.ownerDocument)===I.currentTarget){L.current=sh(I.key,S,m)?oe:ee,M(L.current);return}sh(I.key,S,m)?d?L.current=X>=ee?p&&X!==s.current.length?-1:oe:nn(s,{startingIndex:X,disabledIndices:ce}):L.current=Math.min(ee,nn(s,{startingIndex:X,disabledIndices:ce})):d?L.current=X<=oe?p&&X!==-1?s.current.length:ee:nn(s,{startingIndex:X,decrement:!0,disabledIndices:ce}):L.current=Math.max(oe,nn(s,{startingIndex:X,decrement:!0,disabledIndices:ce})),ms(s,L.current)?M(null):M(L.current)}}function G(I){y==="auto"&&Gx(I.nativeEvent)&&(H.current=!0)}function fe(I){H.current=y,y==="auto"&&Zx(I.nativeEvent)&&(H.current=!0)}const ve=v&&n&&pe&&{"aria-activedescendant":ae||_},_e=s.current.find(I=>(I==null?void 0:I.id)===_);return{reference:{...ve,onKeyDown(I){N.current=!1;const X=I.key.indexOf("Arrow")===0,oe=_9(I.key,S,m),ee=MS(I.key,S,m),Se=RS(I.key,S),xe=(h?oe:Se)||I.key==="Enter"||I.key.trim()==="";if(v&&n){const U=O==null?void 0:O.nodesRef.current.find(q=>q.parentId==null),Z=O&&U?i9(O.nodesRef.current,U.id):null;if(X&&Z&&R){const q=new KeyboardEvent("keydown",{key:I.key,bubbles:!0});if(oe||ee){var ke,Fe;const te=((ke=Z.context)==null?void 0:ke.elements.domReference)===I.currentTarget,de=ee&&!te?(Fe=Z.context)==null?void 0:Fe.elements.domReference:oe?_e:null;de&&(Wt(I),de.dispatchEvent(q),re(void 0))}if(Se&&Z.context&&Z.context.open&&Z.parentId&&I.currentTarget!==Z.context.elements.domReference){var Te;Wt(I),(Te=Z.context.elements.domReference)==null||Te.dispatchEvent(q);return}}return Q(I)}if(!(!n&&!b&&X)){if(xe&&(P.current=h&&Se?null:I.key),h){oe&&(Wt(I),n?(L.current=Qp(s,ce),M(L.current)):r(!0,I.nativeEvent));return}Se&&(f!=null&&(L.current=f),Wt(I),!n&&b?r(!0,I.nativeEvent):Q(I),n&&M(L.current))}},onFocus(){n&&M(null)},onPointerDown:fe,onMouseDown:G,onClick:G},floating:{"aria-orientation":S==="both"?void 0:S,...ve,onKeyDown:Q,onPointerMove(){N.current=!0}},item:me}},[i,o,_,ae,w,z,s,u,S,m,v,n,pe,h,f,b,p,$,d,y,M,r,me,O,R])}function k9(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:o=!0,role:i="dialog"}=t,a=th();return C.useMemo(()=>{const s={id:r,role:i};return o?i==="tooltip"?{reference:{"aria-describedby":n?r:void 0},floating:s}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":i==="alertdialog"?"dialog":i,"aria-controls":n?r:void 0,...i==="listbox"&&{role:"combobox"},...i==="menu"&&{id:a}},floating:{...s,...i==="menu"&&{"aria-labelledby":a}}}:{}},[o,i,n,r,a])}function C9(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:c,enabled:l=!0,findMatch:u=null,resetMs:f=750,ignoreKeys:p=[],selectedIndex:d=null}=t,h=C.useRef(),m=C.useRef(""),v=C.useRef((n=d??a)!=null?n:-1),y=C.useRef(null),g=xo(s),b=xo(c),k=wo(u),S=wo(p);return Pt(()=>{r&&(clearTimeout(h.current),y.current=null,m.current="")},[r]),Pt(()=>{if(r&&m.current===""){var $;v.current=($=d??a)!=null?$:-1}},[r,d,a]),C.useMemo(()=>{if(!l)return{};function $(B){B?o.current.typing||(o.current.typing=B,b(B)):o.current.typing&&(o.current.typing=B,b(B))}function T(B,O,M){const H=k.current?k.current(O,M):O.find(L=>(L==null?void 0:L.toLocaleLowerCase().indexOf(M.toLocaleLowerCase()))===0);return H?B.indexOf(H):-1}function R(B){const O=i.current;if(m.current.length>0&&m.current[0]!==" "&&(T(O,O,m.current)===-1?$(!1):B.key===" "&&Wt(B)),O==null||S.current.includes(B.key)||B.key.length!==1||B.ctrlKey||B.metaKey||B.altKey)return;r&&B.key!==" "&&(Wt(B),$(!0)),O.every(P=>{var N,j;return P?((N=P[0])==null?void 0:N.toLocaleLowerCase())!==((j=P[1])==null?void 0:j.toLocaleLowerCase()):!0})&&m.current===B.key&&(m.current="",v.current=y.current),m.current+=B.key,clearTimeout(h.current),h.current=setTimeout(()=>{m.current="",v.current=y.current,$(!1)},f);const H=v.current,L=T(O,[...O.slice((H||0)+1),...O.slice(0,(H||0)+1)],m.current);L!==-1?(g(L),y.current=L):B.key!==" "&&(m.current="",$(!1))}return{reference:{onKeyDown:R},floating:{onKeyDown:R,onKeyUp(B){B.key===" "&&$(!1)}}}},[l,r,o,i,f,S,k,g,b])}const O9=({options:e,label:t,reusable:n})=>{var j,W,V,D,w;const r=Pe(z=>z.sendTextMessage),o=Pe(z=>z.messageContainerRef),i=Pe(z=>z.isReadOnly),[a,s]=C.useState(!1),[c,l]=C.useState(null),[u,f]=C.useState(null),{message:{blocks:{dropdown:p}}}=ct,d=e.reduce((z,K)=>(z[K.label]=K.value,z),{}),h=d?Object.keys(d):[],m=z=>{s(u!==null&&!n?!1:z)},{refs:v,floatingStyles:y,context:g}=S9({placement:"bottom-start",open:a,onOpenChange:m,whileElementsMounted:PU,middleware:[pU(5),hU({padding:10,boundary:(o==null?void 0:o.current)??void 0,crossAxis:!0}),mU({apply({rects:z,elements:K,availableHeight:_}){Object.assign(K.floating.style,{maxHeight:`${_}px`,minWidth:`${z.reference.width}px`})},padding:10})]}),b=C.useRef([]),k=C.useRef(h),S=C.useRef(!1),$=y9(g,{event:"mousedown"}),T=x9(g),R=k9(g,{role:"listbox"}),B=$9(g,{listRef:b,activeIndex:c,selectedIndex:u,onNavigate:l,loop:!0}),O=C9(g,{listRef:k,activeIndex:c,selectedIndex:u,onMatch:a?l:f,onTypingChange(z){S.current=z}}),{getReferenceProps:M,getFloatingProps:H,getItemProps:L}=E9([T,R,B,O,$]),P=z=>{f(z),r(d[h[z]]),s(!1)},N=u!==null?h[u]:void 0;return F.jsxs(F.Fragment,{children:[F.jsxs("div",{tabIndex:0,ref:v.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":u!==null&&!n?"":void 0,...(j=p.button)==null?void 0:j.container,...M(),children:[F.jsx("span",{...(W=p.button)==null?void 0:W.text,children:N||t||"Select..."}),F.jsx(e7,{...(V=p.button)==null?void 0:V.icon})]}),a&&F.jsx(p9,{children:F.jsx(m9,{context:g,modal:!1,children:F.jsx("div",{ref:v.setFloating,className:(w=(D=p.content)==null?void 0:D.container)==null?void 0:w.className,style:{...y},...H(),children:h.map((z,K)=>{var _;return F.jsx("div",{ref:J=>{b.current[K]=J},role:"option",tabIndex:K===c?0:-1,"aria-selected":K===u&&K===c,"data-active":K===c?"":void 0,...(_=p.content)==null?void 0:_.item,...L({onClick(){i||P(K)},onKeyDown(J){i||(J.key==="Enter"&&(J.preventDefault(),P(K)),J.key===" "&&!S.current&&(J.preventDefault(),P(K)))}}),children:z},z)})})})})]})},T9=E.forwardRef(({type:e,title:t,url:n,...r},o)=>{const{message:{blocks:{file:i}}}=ct;return F.jsxs("a",{...r,...i.container,href:n,download:!0,ref:o,target:"_blank",rel:"noreferrer",children:[F.jsx("p",{...i.title,children:t||n}),F.jsx(n7,{...i.icon})]})}),NS={audio:G6,bubble:q6,button:U6,carousel:Q7,column:a7,dropdown:O9,file:T9,image:V6,location:i7,row:s7,text:FD,video:K6},Wi=({block:e,...t})=>{const r=Pe(i=>i.renderers)[e.type]??NS[e.type],o={...t,...e};return F.jsx(r,{...o})};function A9({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M8 14a.75.75 0 0 1-.75-.75V4.56L4.03 7.78a.75.75 0 0 1-1.06-1.06l4.5-4.5a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1-1.06 1.06L8.75 4.56v8.69A.75.75 0 0 1 8 14Z",clipRule:"evenodd"}))}const P9=C.forwardRef(A9);function I9({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"M8 1a2 2 0 0 0-2 2v4a2 2 0 1 0 4 0V3a2 2 0 0 0-2-2Z"}),C.createElement("path",{d:"M4.5 7A.75.75 0 0 0 3 7a5.001 5.001 0 0 0 4.25 4.944V13.5h-1.5a.75.75 0 0 0 0 1.5h4.5a.75.75 0 0 0 0-1.5h-1.5v-1.556A5.001 5.001 0 0 0 13 7a.75.75 0 0 0-1.5 0 3.5 3.5 0 1 1-7 0Z"}))}const R9=C.forwardRef(I9);function M9({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"M8.75 3.75a.75.75 0 0 0-1.5 0v3.5h-3.5a.75.75 0 0 0 0 1.5h3.5v3.5a.75.75 0 0 0 1.5 0v-3.5h3.5a.75.75 0 0 0 0-1.5h-3.5v-3.5Z"}))}const N9=C.forwardRef(M9);function D9(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var j9=E.useLayoutEffect,F9=function(t){var n=C.useRef(t);return j9(function(){n.current=t}),n},DS=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},L9=function(t,n){var r=E.useRef();return E.useCallback(function(o){t.current=o,r.current&&DS(r.current,null),r.current=n,n&&DS(n,o)},[n])},jS={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},B9=function(t){Object.keys(jS).forEach(function(n){t.style.setProperty(n,jS[n],"important")})},FS=B9,un=null,LS=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function U9(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),un||(un=document.createElement("textarea"),un.setAttribute("tabindex","-1"),un.setAttribute("aria-hidden","true"),FS(un)),un.parentNode===null&&document.body.appendChild(un);var o=e.paddingSize,i=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(p){var d=p;un.style[d]=a[d]}),FS(un),un.value=t;var c=LS(un,e);un.value=t,c=LS(un,e),un.value="x";var l=un.scrollHeight-o,u=l*n;s==="border-box"&&(u=u+o+i),c=Math.max(u,c);var f=l*r;return s==="border-box"&&(f=f+o+i),c=Math.min(f,c),[c,l]}var BS=function(){},z9=function(t,n){return t.reduce(function(r,o){return r[o]=n[o],r},{})},q9=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],H9=!!document.documentElement.currentStyle,V9=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=z9(q9,n),o=r.boxSizing;if(o==="")return null;H9&&o==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var i=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),a=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:i,borderSize:a}},W9=V9;function US(e,t,n){var r=F9(n);C.useLayoutEffect(function(){var o=function(a){return r.current(a)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var K9=function(t){US(window,"resize",t)},G9=function(t){US(document.fonts,"loadingdone",t)},Z9=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],Y9=function(t,n){var r=t.cacheMeasurements,o=t.maxRows,i=t.minRows,a=t.onChange,s=a===void 0?BS:a,c=t.onHeightChange,l=c===void 0?BS:c,u=D9(t,Z9),f=u.value!==void 0,p=C.useRef(null),d=L9(p,n),h=C.useRef(0),m=C.useRef(),v=function(){var b=p.current,k=r&&m.current?m.current:W9(b);if(k){m.current=k;var S=U9(k,b.value||b.placeholder||"x",i,o),$=S[0],T=S[1];h.current!==$&&(h.current=$,b.style.setProperty("height",$+"px","important"),l($,{rowHeight:T}))}},y=function(b){f||v(),s(b)};return C.useLayoutEffect(v),K9(v),G9(v),C.createElement("textarea",no({},u,{onChange:y,ref:d}))},J9=C.forwardRef(Y9);const zS=E.memo(E.forwardRef(({children:e,...t},n)=>{const{composer:r}=ct,o=Pe(P=>P.disableComposer),i=Pe(P=>P.setIsTyping),a=Pe(P=>P.isReadOnly),s=Pe(P=>P.sendFile),c=Pe(P=>P.addMessage),l=Pe(P=>P.sendTextMessage),u=Pe(P=>P.allowFileUpload),f=Pe(P=>P.connected),{composerPlaceholder:p,showPoweredBy:d}=Mx(),[h,m]=E.useState(""),[v,y]=E.useState(-1),[g,b]=E.useState(!1),k=E.useRef(null),S=E.useRef(null),$=_n(P=>P.user),T=_n(P=>P.messageHistory);if(a)return null;const R=()=>{var P;k.current&&((P=k.current)==null||P.click())},B=o||a||!f,O=async P=>{var j;const N=(j=P.target.files)==null?void 0:j[0];if(N)try{const{fileUrl:W,type:V}=await s(N)??"";c({direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:V,url:W}})}catch(W){console.error("Error sending file:",W)}},M=window.SpeechRecognition||window.webkitSpeechRecognition,H=()=>{S.current||(S.current=new M);const P=S.current;P&&(P.continuous=!0,P.onresult=N=>{const j=N.results[0][0].transcript;m(j),P.stop(),b(!1)},g?(P.stop(),b(!1)):(P.start(),b(!0)))},L=()=>{h&&(l(h),setTimeout(()=>i(!0,9e3),500),m(""),y(-1))};return F.jsxs(F.Fragment,{children:[F.jsxs("div",{"data-disabled":B,...t,...r.container,ref:n,children:[u&&F.jsxs(F.Fragment,{children:[F.jsx("button",{type:"button",disabled:B,...r.uploadButton.container,onClick:R,children:F.jsx(N9,{...r.uploadButton.icon})}),F.jsx("input",{type:"file",ref:k,style:{display:"none"},onChange:O})]}),F.jsx(J9,{...r==null?void 0:r.input,placeholder:p??"Type your message...",disabled:B,value:h,"data-has-value":!!h,onChange:P=>m(P.target.value),maxRows:5,onKeyDown:P=>{if(!B){if(P.key==="Enter"&&P.shiftKey?(P.preventDefault(),m(`${h}
|
|
@@ -321,7 +321,7 @@ to {
|
|
|
321
321
|
`)},pz=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=C.useMemo(function(){return uz(o)},[o]);return C.createElement(fz,{styles:dz(i,!t,o,n?"":"!important")})},Eh=!1;if(typeof window<"u")try{var Ql=Object.defineProperty({},"passive",{get:function(){return Eh=!0,!0}});window.addEventListener("test",Ql,Ql),window.removeEventListener("test",Ql,Ql)}catch{Eh=!1}var Ki=Eh?{passive:!1}:!1,hz=function(e){return e.tagName==="TEXTAREA"},aE=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!hz(e)&&n[t]==="visible")},mz=function(e){return aE(e,"overflowY")},yz=function(e){return aE(e,"overflowX")},sE=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=cE(e,n);if(r){var o=lE(e,n),i=o[1],a=o[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},vz=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},gz=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},cE=function(e,t){return e==="v"?mz(t):yz(t)},lE=function(e,t){return e==="v"?vz(t):gz(t)},bz=function(e,t){return e==="h"&&t==="rtl"?-1:1},wz=function(e,t,n,r,o){var i=bz(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,c=t.contains(s),l=!1,u=a>0,f=0,p=0;do{var d=lE(e,s),h=d[0],m=d[1],v=d[2],y=m-v-i*h;(h||y)&&cE(e,s)&&(f+=y,p+=h),s=s.parentNode}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(o&&f===0||!o&&a>f)||!u&&(o&&p===0||!o&&-a>p))&&(l=!0),l},eu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},uE=function(e){return[e.deltaX,e.deltaY]},fE=function(e){return e&&"current"in e?e.current:e},xz=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Sz=function(e){return`
|
|
322
322
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
323
323
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
324
|
-
`)},Ez=0,Gi=[];function _z(e){var t=C.useRef([]),n=C.useRef([0,0]),r=C.useRef(),o=C.useState(Ez++)[0],i=C.useState(function(){return iE()})[0],a=C.useRef(e);C.useEffect(function(){a.current=e},[e]),C.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=W8([e.lockRef.current],(e.shards||[]).map(fE),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.useCallback(function(m,v){if("touches"in m&&m.touches.length===2)return!a.current.allowPinchZoom;var y=eu(m),g=n.current,b="deltaX"in m?m.deltaX:g[0]-y[0],k="deltaY"in m?m.deltaY:g[1]-y[1],S,$=m.target,T=Math.abs(b)>Math.abs(k)?"h":"v";if("touches"in m&&T==="h"&&$.type==="range")return!1;var R=sE(T,$);if(!R)return!0;if(R?S=T:(S=T==="v"?"h":"v",R=sE(T,$)),!R)return!1;if(!r.current&&"changedTouches"in m&&(b||k)&&(r.current=S),!S)return!0;var B=r.current||S;return wz(B,v,m,B==="h"?b:k,!0)},[]),c=C.useCallback(function(m){var v=m;if(!(!Gi.length||Gi[Gi.length-1]!==i)){var y="deltaY"in v?uE(v):eu(v),g=t.current.filter(function(S){return S.name===v.type&&S.target===v.target&&xz(S.delta,y)})[0];if(g&&g.should){v.cancelable&&v.preventDefault();return}if(!g){var b=(a.current.shards||[]).map(fE).filter(Boolean).filter(function(S){return S.contains(v.target)}),k=b.length>0?s(v,b[0]):!a.current.noIsolation;k&&v.cancelable&&v.preventDefault()}}},[]),l=C.useCallback(function(m,v,y,g){var b={name:m,delta:v,target:y,should:g};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(k){return k!==b})},1)},[]),u=C.useCallback(function(m){n.current=eu(m),r.current=void 0},[]),f=C.useCallback(function(m){l(m.type,uE(m),m.target,s(m,e.lockRef.current))},[]),p=C.useCallback(function(m){l(m.type,eu(m),m.target,s(m,e.lockRef.current))},[]);C.useEffect(function(){return Gi.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Ki),document.addEventListener("touchmove",c,Ki),document.addEventListener("touchstart",u,Ki),function(){Gi=Gi.filter(function(m){return m!==i}),document.removeEventListener("wheel",c,Ki),document.removeEventListener("touchmove",c,Ki),document.removeEventListener("touchstart",u,Ki)}},[]);var d=e.removeScrollBar,h=e.inert;return C.createElement(C.Fragment,null,h?C.createElement(i,{styles:Sz(o)}):null,d?C.createElement(pz,{gapMode:"margin"}):null)}const $z=tz(rE,_z);var dE=C.forwardRef(function(e,t){return C.createElement(Xl,gr({},e,{ref:t,sideCar:$z}))});dE.classNames=Xl.classNames;const kz=dE;var Cz=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Zi=new WeakMap,tu=new WeakMap,nu={},_h=0,pE=function(e){return e&&(e.host||pE(e.parentNode))},Oz=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=pE(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Tz=function(e,t,n,r){var o=Oz(t,Array.isArray(e)?e:[e]);nu[n]||(nu[n]=new WeakMap);var i=nu[n],a=[],s=new Set,c=new Set(o),l=function(f){!f||s.has(f)||(s.add(f),l(f.parentNode))};o.forEach(l);var u=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(p){if(s.has(p))u(p);else{var d=p.getAttribute(r),h=d!==null&&d!=="false",m=(Zi.get(p)||0)+1,v=(i.get(p)||0)+1;Zi.set(p,m),i.set(p,v),a.push(p),m===1&&h&&tu.set(p,!0),v===1&&p.setAttribute(n,"true"),h||p.setAttribute(r,"true")}})};return u(t),s.clear(),_h++,function(){a.forEach(function(f){var p=Zi.get(f)-1,d=i.get(f)-1;Zi.set(f,p),i.set(f,d),p||(tu.has(f)||f.removeAttribute(r),tu.delete(f)),d||f.removeAttribute(n)}),_h--,_h||(Zi=new WeakMap,Zi=new WeakMap,tu=new WeakMap,nu={})}},Az=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||Cz(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Tz(r,o,n,"aria-hidden")):function(){return null}};const hE="Dialog",[mE,aue]=Nf(hE),[Pz,zr]=mE(hE),Iz=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=E.useRef(null),c=E.useRef(null),[l=!1,u]=VS({prop:r,defaultProp:o,onChange:i});return E.createElement(Pz,{scope:t,triggerRef:s,contentRef:c,contentId:Kl(),titleId:Kl(),descriptionId:Kl(),open:l,onOpenChange:u,onOpenToggle:E.useCallback(()=>u(f=>!f),[u]),modal:a},n)},Rz="DialogTrigger",Mz=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=zr(Rz,n),i=Mo(t,o.triggerRef);return E.createElement(In.button,Ot({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":kh(o.open)},r,{ref:i,onClick:Ur(e.onClick,o.onOpenToggle)}))}),Nz="DialogPortal",[sue,yE]=mE(Nz,{forceMount:void 0}),$h="DialogOverlay",Dz=E.forwardRef((e,t)=>{const n=yE($h,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=zr($h,e.__scopeDialog);return i.modal?E.createElement(Gl,{present:r||i.open},E.createElement(jz,Ot({},o,{ref:t}))):null}),jz=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=zr($h,n);return E.createElement(kz,{as:Df,allowPinchZoom:!0,shards:[o.contentRef]},E.createElement(In.div,Ot({"data-state":kh(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),gs="DialogContent",Fz=E.forwardRef((e,t)=>{const n=yE(gs,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=zr(gs,e.__scopeDialog);return E.createElement(Gl,{present:r||i.open},i.modal?E.createElement(Lz,Ot({},o,{ref:t})):E.createElement(Bz,Ot({},o,{ref:t})))}),Lz=E.forwardRef((e,t)=>{const n=zr(gs,e.__scopeDialog),r=E.useRef(null),o=Mo(t,n.contentRef,r);return E.useEffect(()=>{const i=r.current;if(i)return Az(i)},[]),E.createElement(vE,Ot({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ur(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Ur(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Ur(e.onFocusOutside,i=>i.preventDefault())}))}),Bz=E.forwardRef((e,t)=>{const n=zr(gs,e.__scopeDialog),r=E.useRef(!1),o=E.useRef(!1);return E.createElement(vE,Ot({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;r.current||(s=n.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;((s=n.triggerRef.current)===null||s===void 0?void 0:s.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),vE=E.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=zr(gs,n),c=E.useRef(null),l=Mo(t,c);return V8(),E.createElement(E.Fragment,null,E.createElement(D8,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},E.createElement(R8,Ot({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":kh(s.open)},a,{ref:l,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),Uz="DialogTitle",zz=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=zr(Uz,n);return E.createElement(In.h2,Ot({id:o.titleId},r,{ref:t}))}),qz="DialogClose",Hz=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=zr(qz,n);return E.createElement(In.button,Ot({type:"button"},r,{ref:t,onClick:Ur(e.onClick,()=>o.onOpenChange(!1))}))});function kh(e){return e?"open":"closed"}const Vz=Iz,Wz=Mz,Kz=Dz,Gz=Fz,Zz=zz,gE=Hz;function Yz({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const bE=C.forwardRef(Yz);function Eo({open:e,onOpenChange:t,children:n}){return F.jsx(Vz,{open:e,onOpenChange:t,children:n})}function Jz({title:e,children:t}){var r,o,i,a,s,c,l,u;const{modal:n}=ct;return F.jsxs(F.Fragment,{children:[F.jsx(Kz,{...n==null?void 0:n.overlay}),F.jsx("div",{...n==null?void 0:n.container,children:F.jsxs(Gz,{...(r=n==null?void 0:n.dialog)==null?void 0:r.container,children:[F.jsxs("div",{...(i=(o=n==null?void 0:n.dialog)==null?void 0:o.title)==null?void 0:i.container,children:[F.jsx(Zz,{...(s=(a=n==null?void 0:n.dialog)==null?void 0:a.title)==null?void 0:s.text,children:e}),F.jsx(gE,{children:F.jsx(bE,{role:"button",tabIndex:0,...(l=(c=n==null?void 0:n.dialog)==null?void 0:c.title)==null?void 0:l.closeIcon})})]}),F.jsx("div",{...(u=n==null?void 0:n.dialog)==null?void 0:u.content,children:t})]})})]})}Eo.Button=Wz,Eo.Close=gE,Eo.Content=Jz;const wE=E.forwardRef(({children:e,...t},n)=>{const{container:r}=ct;return F.jsxs("div",{...t,...r,ref:n,children:[F.jsx(h6,{}),F.jsxs(qS,{children:[F.jsx(Xz,{}),e]})]})}),Xz=()=>{const{modal:e}=ct,t=Pe(r=>r.connected),{showModal:n}=Ix();return E.useEffect(()=>{var r,o,i,a;t||n({title:"Connection Error",content:F.jsxs(F.Fragment,{children:[F.jsx("p",{...(o=(r=e==null?void 0:e.dialog)==null?void 0:r.newConversation)==null?void 0:o.text,children:"There was an error connecting to the server. Please check your internet connection and try again."}),F.jsx(Eo.Close,{asChild:!0,children:F.jsx("button",{type:"button",...(a=(i=e==null?void 0:e.dialog)==null?void 0:i.newConversation)==null?void 0:a.button,onClick:()=>window.location.reload(),children:"Restart"})})]})})},[t]),F.jsx(F.Fragment,{})},Qz=E.forwardRef(({children:e,onClick:t,...n},r)=>{const{fab:o}=ct,{container:i,icon:a}=o??{};return F.jsx("div",{...n,...i,ref:r,onClick:t,children:F.jsx("div",{...a})})}),xE="Collapsible",[eq,lue]=Nf(xE),[tq,Ch]=eq(xE),nq=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[c=!1,l]=VS({prop:r,defaultProp:o,onChange:a});return E.createElement(tq,{scope:n,disabled:i,contentId:Kl(),open:c,onOpenToggle:E.useCallback(()=>l(u=>!u),[l])},E.createElement(In.div,Ot({"data-state":Oh(c),"data-disabled":i?"":void 0},s,{ref:t})))}),rq="CollapsibleTrigger",oq=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Ch(rq,n);return E.createElement(In.button,Ot({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Oh(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},r,{ref:t,onClick:Ur(e.onClick,o.onOpenToggle)}))}),SE="CollapsibleContent",iq=E.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Ch(SE,e.__scopeCollapsible);return E.createElement(Gl,{present:n||o.open},({present:i})=>E.createElement(aq,Ot({},r,{ref:t,present:i})))}),aq=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,a=Ch(SE,n),[s,c]=E.useState(r),l=E.useRef(null),u=Mo(t,l),f=E.useRef(0),p=f.current,d=E.useRef(0),h=d.current,m=a.open||s,v=E.useRef(m),y=E.useRef();return E.useEffect(()=>{const g=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(g)},[]),Pa(()=>{const g=l.current;if(g){y.current=y.current||{transitionDuration:g.style.transitionDuration,animationName:g.style.animationName},g.style.transitionDuration="0s",g.style.animationName="none";const b=g.getBoundingClientRect();f.current=b.height,d.current=b.width,v.current||(g.style.transitionDuration=y.current.transitionDuration,g.style.animationName=y.current.animationName),c(r)}},[a.open,r]),E.createElement(In.div,Ot({"data-state":Oh(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!m},i,{ref:u,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style}}),m&&o)});function Oh(e){return e?"open":"closed"}const sq=nq,cq=iq,lq=e=>C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e},C.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M15.5 5.5v-5m0 0h-5m5 0L8.833 7.167m-2.5-5H4.5c-1.4 0-2.1 0-2.635.272A2.5 2.5 0 0 0 .772 3.532C.5 4.066.5 4.767.5 6.167V11.5c0 1.4 0 2.1.272 2.635a2.5 2.5 0 0 0 1.093 1.092C2.4 15.5 3.1 15.5 4.5 15.5h5.333c1.4 0 2.1 0 2.635-.273a2.5 2.5 0 0 0 1.093-1.092c.272-.535.272-1.235.272-2.635V9.667"})),EE=({...e})=>{var a,s;const{header:t,modal:n}=ct,r=Pe(c=>c.restartConversation),{showModal:o}=Ix(),i=c=>{var l,u,f,p;c.stopPropagation(),o({title:"Restart Conversation",content:F.jsxs(F.Fragment,{children:[F.jsx("p",{...(u=(l=n==null?void 0:n.dialog)==null?void 0:l.newConversation)==null?void 0:u.text,children:"Are you sure you want to restart a new conversation?"}),F.jsx(Eo.Close,{asChild:!0,children:F.jsx("button",{type:"button",...(p=(f=n==null?void 0:n.dialog)==null?void 0:f.newConversation)==null?void 0:p.button,onClick:r,children:"Restart"})})]})})};return F.jsx(X6,{...e,...(s=(a=t==null?void 0:t.content)==null?void 0:a.actions)==null?void 0:s.icons,role:"button",tabIndex:0,onClick:i,onKeyDown:c=>{c.key==="Enter"&&i(c)}})},uq=({...e})=>{const{header:t}=ct,n=Pe(o=>o.closeWindow),r=o=>{o.stopPropagation(),n==null||n()};return F.jsx(bE,{...e,...t.content.actions.icons,role:"button",tabIndex:0,onClick:r,onKeyDown:o=>{o.key==="Enter"&&r(o)}})},bs=({icon:e,title:t,link:n,...r})=>{var a,s,c,l,u,f,p,d,h,m,v,y;const{header:o}=ct,i=e??lq;return t?n?F.jsxs("a",{...r,...(s=(a=o.expandedContent)==null?void 0:a.descriptionItems)==null?void 0:s.container,href:n,target:"_blank",rel:"noreferrer noopener",children:[F.jsx(i,{...(l=(c=o.expandedContent)==null?void 0:c.descriptionItems)==null?void 0:l.icon}),F.jsx("p",{...(f=(u=o.expandedContent)==null?void 0:u.descriptionItems)==null?void 0:f.link,children:t})]}):F.jsxs("div",{...r,...(d=(p=o.expandedContent)==null?void 0:p.descriptionItems)==null?void 0:d.container,children:[F.jsx(i,{...(m=(h=o.expandedContent)==null?void 0:h.descriptionItems)==null?void 0:m.icon}),F.jsx("p",{...(y=(v=o.expandedContent)==null?void 0:v.descriptionItems)==null?void 0:y.text,children:t})]}):null},_E=({defaultOpen:e,disabled:t,onOpenChange:n,...r})=>{var p,d,h,m,v,y,g,b,k,S,$,T,R,B,O,M,H,L,P,N,j,W;const{header:o}=ct,i=Pe(V=>V.configuration),a=Pe(V=>V.closeWindow),s=Pe(V=>V.getClientId)(),c=Pe(V=>!V.disableRestartConversation),[l,u]=E.useState(!!e),f=!!((p=i.email)!=null&&p.title)||!!((d=i.phone)!=null&&d.title)||!!((h=i.website)!=null&&h.title)||!!((m=i.termsOfService)!=null&&m.link)||!!((v=i.privacyPolicy)!=null&&v.link);return F.jsxs(sq,{open:f?l:!1,onOpenChange:u,"data-disabled":f?void 0:"",...o.container,...r,children:[F.jsxs(oq,{...o.content.container,children:[F.jsx(Uf,{...r,userId:s,src:i.botAvatar,...o.content.avatar,children:i.botName||"Bot"}),F.jsx("h2",{...o.content.title,children:i.botName||"Bot"}),i.botDescription&&F.jsx("p",{...o.content.description,children:i.botDescription}),F.jsxs("div",{...o.content.actions.container,children:[c&&F.jsx(EE,{}),a&&F.jsx(uq,{})]})]}),F.jsxs(cq,{...o.expandedContent.container,children:[F.jsxs("div",{"data-links":"",...o.expandedContent.group,children:[F.jsx(bs,{"data-email":"",icon:W7,title:(y=i.email)==null?void 0:y.title,link:(b=(g=i.email)==null?void 0:g.link)!=null&&b.startsWith("mailto:")?(k=i.email)==null?void 0:k.link:`mailto:${(S=i.email)==null?void 0:S.link}`}),F.jsx(bs,{"data-phone":"",icon:X7,title:($=i.phone)==null?void 0:$.title,link:(R=(T=i.phone)==null?void 0:T.link)!=null&&R.startsWith("tel:")?(B=i.phone)==null?void 0:B.link:`tel:${(O=i.phone)==null?void 0:O.link}`}),F.jsx(bs,{"data-website":"",link:(M=i.website)==null?void 0:M.link,icon:G7,title:(H=i.website)==null?void 0:H.title})]}),F.jsxs("div",{"data-legal":"",...(L=o.expandedContent)==null?void 0:L.group,children:[F.jsx(bs,{"data-terms":"",link:(P=i.termsOfService)==null?void 0:P.link,icon:H7,title:(N=i.termsOfService)==null?void 0:N.title}),F.jsx(bs,{"data-privacy":"",link:(j=i.privacyPolicy)==null?void 0:j.link,icon:Y7,title:(W=i.privacyPolicy)==null?void 0:W.title})]})]})]})},$E=E.memo(({...e})=>{const{typingIndicator:t}=ct;return F.jsx("div",{...e,...t==null?void 0:t.container,children:F.jsx("div",{...t==null?void 0:t.loader})})}),Th=E.memo(E.forwardRef(({direction:e,block:t,scroll:n,disableInput:r,children:o,sender:i,...a},s)=>{var m,v,y,g;const[c,l]=E.useState([]),{message:u}=ct,{botAvatar:f,botName:p}=Pe(b=>b.configuration),d=Pe(b=>b.getClientId)(),h=Ug(d??"",15);return F.jsx(Ax.Provider,{value:{isLoading:c,setIsLoading:l},children:F.jsxs("div",{...a,...u==null?void 0:u.container,"data-loaded":c.length===0,"data-disable-input":!!r,"data-direction":e,ref:s,children:[F.jsxs(Ag,{"data-color":h,...(m=u==null?void 0:u.avatar)==null?void 0:m.container,children:[F.jsx(Pg,{...(v=u==null?void 0:u.avatar)==null?void 0:v.image,src:(i==null?void 0:i.avatar)??f}),F.jsx(Ig,{...(y=u==null?void 0:u.avatar)==null?void 0:y.fallback,children:(i==null?void 0:i.name[0])??((g=p??"Bot")==null?void 0:g[0])})]}),t&&F.jsx(Wi,{block:t}),o]})})}));function fq(){const e=Pe(r=>r.getClientId)(),t=Pe(r=>r.configuration),{messageList:{marquee:n}}=ct;return F.jsxs("li",{...n.container,children:[F.jsx(Uf,{userId:e,src:t.botAvatar,...n.avatar,children:(t.botName||"Bot").slice(0,1)}),F.jsxs("div",{...n.content,children:[F.jsx("h1",{...n.title,children:t.botName||"Bot"}),F.jsx("p",{...n.description,children:t.botDescription})]})]})}function dq(e,t){try{var n=global,r=n.document;if(typeof r<"u"&&r.createElement&&r.head&&r.head.appendChild){var o=r.querySelector('html meta[name="'.concat(encodeURI(e),'"]'))||r.createElement("meta");o.setAttribute("name",e),o.setAttribute("content",t),r.head.appendChild(o)}}catch{}}function pq(){dq("react-scroll-to-bottom:version","4.2.0")}var ws=function(e){return e&&e.Math===Math&&e},It=ws(typeof globalThis=="object"&&globalThis)||ws(typeof window=="object"&&window)||ws(typeof self=="object"&&self)||ws(typeof be=="object"&&be)||ws(typeof be=="object"&&be)||function(){return this}()||Function("return this")(),Rt=function(e){try{return!!e()}catch{return!0}},hq=Rt,ru=!hq(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),mq=ru,kE=Function.prototype,CE=kE.apply,OE=kE.call,Ah=typeof Reflect=="object"&&Reflect.apply||(mq?OE.bind(CE):function(){return OE.apply(CE,arguments)}),TE=ru,AE=Function.prototype,Ph=AE.call,yq=TE&&AE.bind.bind(Ph,Ph),Mt=TE?yq:function(e){return function(){return Ph.apply(e,arguments)}},PE=Mt,vq=PE({}.toString),gq=PE("".slice),Qo=function(e){return gq(vq(e),8,-1)},bq=Qo,wq=Mt,Ih=function(e){if(bq(e)==="Function")return wq(e)},Rh=typeof document=="object"&&document.all,rn=typeof Rh>"u"&&Rh!==void 0?function(e){return typeof e=="function"||e===Rh}:function(e){return typeof e=="function"},xs={},xq=Rt,vn=!xq(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Sq=ru,ou=Function.prototype.call,br=Sq?ou.bind(ou):function(){return ou.apply(ou,arguments)},Mh={},IE={}.propertyIsEnumerable,RE=Object.getOwnPropertyDescriptor,Eq=RE&&!IE.call({1:2},1);Mh.f=Eq?function(t){var n=RE(this,t);return!!n&&n.enumerable}:IE;var Ss=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},_q=Mt,$q=Rt,kq=Qo,Nh=Object,Cq=_q("".split),ME=$q(function(){return!Nh("z").propertyIsEnumerable(0)})?function(e){return kq(e)==="String"?Cq(e,""):Nh(e)}:Nh,Dh=function(e){return e==null},Oq=Dh,Tq=TypeError,jh=function(e){if(Oq(e))throw new Tq("Can't call method on "+e);return e},Aq=ME,Pq=jh,wr=function(e){return Aq(Pq(e))},Iq=rn,qr=function(e){return typeof e=="object"?e!==null:Iq(e)},Kt={},Fh=Kt,Lh=It,Rq=rn,NE=function(e){return Rq(e)?e:void 0},xr=function(e,t){return arguments.length<2?NE(Fh[e])||NE(Lh[e]):Fh[e]&&Fh[e][t]||Lh[e]&&Lh[e][t]},Mq=Mt,Hr=Mq({}.isPrototypeOf),Nq=It,DE=Nq.navigator,jE=DE&&DE.userAgent,Bh=jE?String(jE):"",FE=It,Uh=Bh,LE=FE.process,BE=FE.Deno,UE=LE&&LE.versions||BE&&BE.version,zE=UE&&UE.v8,Zn,iu;zE&&(Zn=zE.split("."),iu=Zn[0]>0&&Zn[0]<4?1:+(Zn[0]+Zn[1])),!iu&&Uh&&(Zn=Uh.match(/Edge\/(\d+)/),(!Zn||Zn[1]>=74)&&(Zn=Uh.match(/Chrome\/(\d+)/),Zn&&(iu=+Zn[1])));var zh=iu,qE=zh,Dq=Rt,jq=It,Fq=jq.String,Yi=!!Object.getOwnPropertySymbols&&!Dq(function(){var e=Symbol("symbol detection");return!Fq(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&qE&&qE<41}),Lq=Yi,HE=Lq&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Bq=xr,Uq=rn,zq=Hr,qq=HE,Hq=Object,Es=qq?function(e){return typeof e=="symbol"}:function(e){var t=Bq("Symbol");return Uq(t)&&zq(t.prototype,Hq(e))},Vq=String,au=function(e){try{return Vq(e)}catch{return"Object"}},Wq=rn,Kq=au,Gq=TypeError,qh=function(e){if(Wq(e))return e;throw new Gq(Kq(e)+" is not a function")},Zq=qh,Yq=Dh,Hh=function(e,t){var n=e[t];return Yq(n)?void 0:Zq(n)},Vh=br,Wh=rn,Kh=qr,Jq=TypeError,Xq=function(e,t){var n,r;if(t==="string"&&Wh(n=e.toString)&&!Kh(r=Vh(n,e))||Wh(n=e.valueOf)&&!Kh(r=Vh(n,e))||t!=="string"&&Wh(n=e.toString)&&!Kh(r=Vh(n,e)))return r;throw new Jq("Can't convert object to primitive value")},VE={exports:{}},WE=It,Qq=Object.defineProperty,eH=function(e,t){try{Qq(WE,e,{value:t,configurable:!0,writable:!0})}catch{WE[e]=t}return t},tH=It,nH=eH,KE="__core-js_shared__",GE=VE.exports=tH[KE]||nH(KE,{});(GE.versions||(GE.versions=[])).push({version:"3.38.1",mode:"pure",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Gh=VE.exports,ZE=Gh,Ji=function(e,t){return ZE[e]||(ZE[e]=t||{})},rH=jh,oH=Object,Vr=function(e){return oH(rH(e))},iH=Mt,aH=Vr,sH=iH({}.hasOwnProperty),On=Object.hasOwn||function(t,n){return sH(aH(t),n)},cH=Mt,lH=0,uH=Math.random(),fH=cH(1 .toString),Zh=function(e){return"Symbol("+(e===void 0?"":e)+")_"+fH(++lH+uH,36)},dH=It,pH=Ji,YE=On,hH=Zh,mH=Yi,yH=HE,Xi=dH.Symbol,Yh=pH("wks"),vH=yH?Xi.for||Xi:Xi&&Xi.withoutSetter||hH,zt=function(e){return YE(Yh,e)||(Yh[e]=mH&&YE(Xi,e)?Xi[e]:vH("Symbol."+e)),Yh[e]},gH=br,JE=qr,XE=Es,bH=Hh,wH=Xq,xH=zt,SH=TypeError,EH=xH("toPrimitive"),_H=function(e,t){if(!JE(e)||XE(e))return e;var n=bH(e,EH),r;if(n){if(t===void 0&&(t="default"),r=gH(n,e,t),!JE(r)||XE(r))return r;throw new SH("Can't convert object to primitive value")}return t===void 0&&(t="number"),wH(e,t)},$H=_H,kH=Es,Jh=function(e){var t=$H(e,"string");return kH(t)?t:t+""},CH=It,QE=qr,Xh=CH.document,OH=QE(Xh)&&QE(Xh.createElement),e_=function(e){return OH?Xh.createElement(e):{}},TH=vn,AH=Rt,PH=e_,t_=!TH&&!AH(function(){return Object.defineProperty(PH("div"),"a",{get:function(){return 7}}).a!==7}),IH=vn,RH=br,MH=Mh,NH=Ss,DH=wr,jH=Jh,FH=On,LH=t_,n_=Object.getOwnPropertyDescriptor;xs.f=IH?n_:function(t,n){if(t=DH(t),n=jH(n),LH)try{return n_(t,n)}catch{}if(FH(t,n))return NH(!RH(MH.f,t,n),t[n])};var BH=Rt,UH=rn,zH=/#|\.prototype\./,_s=function(e,t){var n=HH[qH(e)];return n===WH?!0:n===VH?!1:UH(t)?BH(t):!!t},qH=_s.normalize=function(e){return String(e).replace(zH,".").toLowerCase()},HH=_s.data={},VH=_s.NATIVE="N",WH=_s.POLYFILL="P",KH=_s,r_=Ih,GH=qh,ZH=ru,YH=r_(r_.bind),Qh=function(e,t){return GH(e),t===void 0?e:ZH?YH(e,t):function(){return e.apply(t,arguments)}},Yn={},JH=vn,XH=Rt,o_=JH&&XH(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),QH=qr,eV=String,tV=TypeError,_o=function(e){if(QH(e))return e;throw new tV(eV(e)+" is not an object")},nV=vn,rV=t_,oV=o_,su=_o,i_=Jh,iV=TypeError,em=Object.defineProperty,aV=Object.getOwnPropertyDescriptor,tm="enumerable",nm="configurable",rm="writable";Yn.f=nV?oV?function(t,n,r){if(su(t),n=i_(n),su(r),typeof t=="function"&&n==="prototype"&&"value"in r&&rm in r&&!r[rm]){var o=aV(t,n);o&&o[rm]&&(t[n]=r.value,r={configurable:nm in r?r[nm]:o[nm],enumerable:tm in r?r[tm]:o[tm],writable:!1})}return em(t,n,r)}:em:function(t,n,r){if(su(t),n=i_(n),su(r),rV)try{return em(t,n,r)}catch{}if("get"in r||"set"in r)throw new iV("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var sV=vn,cV=Yn,lV=Ss,cu=sV?function(e,t,n){return cV.f(e,t,lV(1,n))}:function(e,t,n){return e[t]=n,e},$s=It,uV=Ah,fV=Ih,dV=rn,pV=xs.f,hV=KH,Qi=Kt,mV=Qh,ea=cu,a_=On,yV=function(e){var t=function(n,r,o){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,o)}return uV(e,this,arguments)};return t.prototype=e.prototype,t},at=function(e,t){var n=e.target,r=e.global,o=e.stat,i=e.proto,a=r?$s:o?$s[n]:$s[n]&&$s[n].prototype,s=r?Qi:Qi[n]||ea(Qi,n,{})[n],c=s.prototype,l,u,f,p,d,h,m,v,y;for(p in t)l=hV(r?p:n+(o?".":"#")+p,e.forced),u=!l&&a&&a_(a,p),h=s[p],u&&(e.dontCallGetSet?(y=pV(a,p),m=y&&y.value):m=a[p]),d=u&&m?m:t[p],!(!l&&!i&&typeof h==typeof d)&&(e.bind&&u?v=mV(d,$s):e.wrap&&u?v=yV(d):i&&dV(d)?v=fV(d):v=d,(e.sham||d&&d.sham||h&&h.sham)&&ea(v,"sham",!0),ea(s,p,v),i&&(f=n+"Prototype",a_(Qi,f)||ea(Qi,f,{}),ea(Qi[f],p,d),e.real&&c&&(l||!c[p])&&ea(c,p,d)))},vV=Qo,ta=Array.isArray||function(t){return vV(t)==="Array"},gV=at,bV=ta;gV({target:"Array",stat:!0},{isArray:bV});var wV=Kt,xV=wV.Array.isArray,SV=xV,s_=SV,EV=s_,_V=EV,$V=_V,kV=$V,CV=kV;const c_=Ue(CV);function OV(e){if(c_(e))return e}var TV=Math.ceil,AV=Math.floor,PV=Math.trunc||function(t){var n=+t;return(n>0?AV:TV)(n)},IV=PV,lu=function(e){var t=+e;return t!==t||t===0?0:IV(t)},RV=lu,MV=Math.min,NV=function(e){var t=RV(e);return t>0?MV(t,9007199254740991):0},DV=NV,ei=function(e){return DV(e.length)},jV=TypeError,FV=9007199254740991,om=function(e){if(e>FV)throw jV("Maximum allowed index exceeded");return e},LV=vn,BV=Yn,UV=Ss,ks=function(e,t,n){LV?BV.f(e,t,UV(0,n)):e[t]=n},zV=zt,qV=zV("toStringTag"),l_={};l_[qV]="z";var im=String(l_)==="[object z]",HV=im,VV=rn,uu=Qo,WV=zt,KV=WV("toStringTag"),GV=Object,ZV=uu(function(){return arguments}())==="Arguments",YV=function(e,t){try{return e[t]}catch{}},Cs=HV?uu:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=YV(t=GV(e),KV))=="string"?n:ZV?uu(t):(r=uu(t))==="Object"&&VV(t.callee)?"Arguments":r},JV=Mt,XV=rn,am=Gh,QV=JV(Function.toString);XV(am.inspectSource)||(am.inspectSource=function(e){return QV(e)});var eW=am.inspectSource,tW=Mt,nW=Rt,u_=rn,rW=Cs,oW=xr,iW=eW,f_=function(){},d_=oW("Reflect","construct"),sm=/^\s*(?:class|function)\b/,aW=tW(sm.exec),sW=!sm.test(f_),Os=function(t){if(!u_(t))return!1;try{return d_(f_,[],t),!0}catch{return!1}},p_=function(t){if(!u_(t))return!1;switch(rW(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return sW||!!aW(sm,iW(t))}catch{return!0}};p_.sham=!0;var cm=!d_||nW(function(){var e;return Os(Os.call)||!Os(Object)||!Os(function(){e=!0})||e})?p_:Os,h_=ta,cW=cm,lW=qr,uW=zt,fW=uW("species"),m_=Array,dW=function(e){var t;return h_(e)&&(t=e.constructor,cW(t)&&(t===m_||h_(t.prototype))?t=void 0:lW(t)&&(t=t[fW],t===null&&(t=void 0))),t===void 0?m_:t},pW=dW,lm=function(e,t){return new(pW(e))(t===0?0:t)},hW=Rt,mW=zt,yW=zh,vW=mW("species"),fu=function(e){return yW>=51||!hW(function(){var t=[],n=t.constructor={};return n[vW]=function(){return{foo:1}},t[e](Boolean).foo!==1})},gW=at,bW=Rt,wW=ta,xW=qr,SW=Vr,EW=ei,y_=om,v_=ks,_W=lm,$W=fu,kW=zt,CW=zh,g_=kW("isConcatSpreadable"),OW=CW>=51||!bW(function(){var e=[];return e[g_]=!1,e.concat()[0]!==e}),TW=function(e){if(!xW(e))return!1;var t=e[g_];return t!==void 0?!!t:wW(e)},AW=!OW||!$W("concat");gW({target:"Array",proto:!0,arity:1,forced:AW},{concat:function(t){var n=SW(this),r=_W(n,0),o=0,i,a,s,c,l;for(i=-1,s=arguments.length;i<s;i++)if(l=i===-1?n:arguments[i],TW(l))for(c=EW(l),y_(o+c),a=0;a<c;a++,o++)a in l&&v_(r,o,l[a]);else y_(o+1),v_(r,o++,l);return r.length=o,r}});var PW=Cs,IW=String,Ts=function(e){if(PW(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return IW(e)},du={},RW=lu,MW=Math.max,NW=Math.min,um=function(e,t){var n=RW(e);return n<0?MW(n+t,0):NW(n,t)},DW=wr,jW=um,FW=ei,b_=function(e){return function(t,n,r){var o=DW(t),i=FW(o);if(i===0)return!e&&-1;var a=jW(r,i),s;if(e&&n!==n){for(;i>a;)if(s=o[a++],s!==s)return!0}else for(;i>a;a++)if((e||a in o)&&o[a]===n)return e||a||0;return!e&&-1}},w_={includes:b_(!0),indexOf:b_(!1)},pu={},LW=Mt,fm=On,BW=wr,UW=w_.indexOf,zW=pu,x_=LW([].push),S_=function(e,t){var n=BW(e),r=0,o=[],i;for(i in n)!fm(zW,i)&&fm(n,i)&&x_(o,i);for(;t.length>r;)fm(n,i=t[r++])&&(~UW(o,i)||x_(o,i));return o},dm=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],qW=S_,HW=dm,pm=Object.keys||function(t){return qW(t,HW)},VW=vn,WW=o_,KW=Yn,GW=_o,ZW=wr,YW=pm;du.f=VW&&!WW?Object.defineProperties:function(t,n){GW(t);for(var r=ZW(n),o=YW(n),i=o.length,a=0,s;i>a;)KW.f(t,s=o[a++],r[s]);return t};var JW=xr,XW=JW("document","documentElement"),QW=Ji,eK=Zh,E_=QW("keys"),hu=function(e){return E_[e]||(E_[e]=eK(e))},tK=_o,nK=du,__=dm,rK=pu,oK=XW,iK=e_,aK=hu,$_=">",k_="<",hm="prototype",mm="script",C_=aK("IE_PROTO"),ym=function(){},O_=function(e){return k_+mm+$_+e+k_+"/"+mm+$_},T_=function(e){e.write(O_("")),e.close();var t=e.parentWindow.Object;return e=null,t},sK=function(){var e=iK("iframe"),t="java"+mm+":",n;return e.style.display="none",oK.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(O_("document.F=Object")),n.close(),n.F},mu,yu=function(){try{mu=new ActiveXObject("htmlfile")}catch{}yu=typeof document<"u"?document.domain&&mu?T_(mu):sK():T_(mu);for(var e=__.length;e--;)delete yu[hm][__[e]];return yu()};rK[C_]=!0;var vm=Object.create||function(t,n){var r;return t!==null?(ym[hm]=tK(t),r=new ym,ym[hm]=null,r[C_]=t):r=yu(),n===void 0?r:nK.f(r,n)},vu={},cK=S_,lK=dm,uK=lK.concat("length","prototype");vu.f=Object.getOwnPropertyNames||function(t){return cK(t,uK)};var A_={},fK=Mt,gu=fK([].slice),dK=Qo,pK=wr,P_=vu.f,hK=gu,I_=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],mK=function(e){try{return P_(e)}catch{return hK(I_)}};A_.f=function(t){return I_&&dK(t)==="Window"?mK(t):P_(pK(t))};var bu={};bu.f=Object.getOwnPropertySymbols;var yK=cu,wu=function(e,t,n,r){return r&&r.enumerable?e[t]=n:yK(e,t,n),e},vK=Yn,gK=function(e,t,n){return vK.f(e,t,n)},As={},bK=zt;As.f=bK;var R_=Kt,wK=On,xK=As,SK=Yn.f,gt=function(e){var t=R_.Symbol||(R_.Symbol={});wK(t,e)||SK(t,e,{value:xK.f(e)})},EK=br,_K=xr,$K=zt,kK=wu,M_=function(){var e=_K("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=$K("toPrimitive");t&&!t[r]&&kK(t,r,function(o){return EK(n,this)},{arity:1})},CK=im,OK=Cs,TK=CK?{}.toString:function(){return"[object "+OK(this)+"]"},AK=im,PK=Yn.f,IK=cu,RK=On,MK=TK,NK=zt,N_=NK("toStringTag"),na=function(e,t,n,r){var o=n?e:e&&e.prototype;o&&(RK(o,N_)||PK(o,N_,{configurable:!0,value:t}),r&&!AK&&IK(o,"toString",MK))},DK=It,jK=rn,D_=DK.WeakMap,FK=jK(D_)&&/native code/.test(String(D_)),LK=FK,j_=It,BK=qr,UK=cu,gm=On,bm=Gh,zK=hu,qK=pu,F_="Object already initialized",wm=j_.TypeError,HK=j_.WeakMap,xu,Ps,Su,VK=function(e){return Su(e)?Ps(e):xu(e,{})},WK=function(e){return function(t){var n;if(!BK(t)||(n=Ps(t)).type!==e)throw new wm("Incompatible receiver, "+e+" required");return n}};if(LK||bm.state){var Sr=bm.state||(bm.state=new HK);Sr.get=Sr.get,Sr.has=Sr.has,Sr.set=Sr.set,xu=function(e,t){if(Sr.has(e))throw new wm(F_);return t.facade=e,Sr.set(e,t),t},Ps=function(e){return Sr.get(e)||{}},Su=function(e){return Sr.has(e)}}else{var ra=zK("state");qK[ra]=!0,xu=function(e,t){if(gm(e,ra))throw new wm(F_);return t.facade=e,UK(e,ra,t),t},Ps=function(e){return gm(e,ra)?e[ra]:{}},Su=function(e){return gm(e,ra)}}var xm={set:xu,get:Ps,has:Su,enforce:VK,getterFor:WK},KK=Qh,GK=Mt,ZK=ME,YK=Vr,JK=ei,XK=lm,L_=GK([].push),$o=function(e){var t=e===1,n=e===2,r=e===3,o=e===4,i=e===6,a=e===7,s=e===5||i;return function(c,l,u,f){for(var p=YK(c),d=ZK(p),h=JK(d),m=KK(l,u),v=0,y=f||XK,g=t?y(c,h):n||a?y(c,0):void 0,b,k;h>v;v++)if((s||v in d)&&(b=d[v],k=m(b,v,p),e))if(t)g[v]=k;else if(k)switch(e){case 3:return!0;case 5:return b;case 6:return v;case 2:L_(g,b)}else switch(e){case 4:return!1;case 7:L_(g,b)}return i?-1:r||o?o:g}},Sm={forEach:$o(0),map:$o(1),filter:$o(2),some:$o(3),every:$o(4),find:$o(5),findIndex:$o(6),filterReject:$o(7)},Eu=at,Is=It,Em=br,QK=Mt,oa=vn,ia=Yi,eG=Rt,qt=On,tG=Hr,_m=_o,_u=wr,$m=Jh,nG=Ts,km=Ss,aa=vm,B_=pm,rG=vu,U_=A_,oG=bu,z_=xs,q_=Yn,iG=du,H_=Mh,V_=wu,aG=gK,Cm=Ji,sG=hu,W_=pu,K_=Zh,cG=zt,lG=As,uG=gt,fG=M_,dG=na,G_=xm,$u=Sm.forEach,gn=sG("hidden"),ku="Symbol",Rs="prototype",pG=G_.set,Z_=G_.getterFor(ku),Jn=Object[Rs],ti=Is.Symbol,Ms=ti&&ti[Rs],hG=Is.RangeError,mG=Is.TypeError,Om=Is.QObject,Y_=z_.f,ni=q_.f,J_=U_.f,yG=H_.f,X_=QK([].push),Wr=Cm("symbols"),Ns=Cm("op-symbols"),vG=Cm("wks"),Tm=!Om||!Om[Rs]||!Om[Rs].findChild,Q_=function(e,t,n){var r=Y_(Jn,t);r&&delete Jn[t],ni(e,t,n),r&&e!==Jn&&ni(Jn,t,r)},Am=oa&&eG(function(){return aa(ni({},"a",{get:function(){return ni(this,"a",{value:7}).a}})).a!==7})?Q_:ni,Pm=function(e,t){var n=Wr[e]=aa(Ms);return pG(n,{type:ku,tag:e,description:t}),oa||(n.description=t),n},Cu=function(t,n,r){t===Jn&&Cu(Ns,n,r),_m(t);var o=$m(n);return _m(r),qt(Wr,o)?(r.enumerable?(qt(t,gn)&&t[gn][o]&&(t[gn][o]=!1),r=aa(r,{enumerable:km(0,!1)})):(qt(t,gn)||ni(t,gn,km(1,aa(null))),t[gn][o]=!0),Am(t,o,r)):ni(t,o,r)},Im=function(t,n){_m(t);var r=_u(n),o=B_(r).concat(r$(r));return $u(o,function(i){(!oa||Em(e$,r,i))&&Cu(t,i,r[i])}),t},gG=function(t,n){return n===void 0?aa(t):Im(aa(t),n)},e$=function(t){var n=$m(t),r=Em(yG,this,n);return this===Jn&&qt(Wr,n)&&!qt(Ns,n)?!1:r||!qt(this,n)||!qt(Wr,n)||qt(this,gn)&&this[gn][n]?r:!0},t$=function(t,n){var r=_u(t),o=$m(n);if(!(r===Jn&&qt(Wr,o)&&!qt(Ns,o))){var i=Y_(r,o);return i&&qt(Wr,o)&&!(qt(r,gn)&&r[gn][o])&&(i.enumerable=!0),i}},n$=function(t){var n=J_(_u(t)),r=[];return $u(n,function(o){!qt(Wr,o)&&!qt(W_,o)&&X_(r,o)}),r},r$=function(e){var t=e===Jn,n=J_(t?Ns:_u(e)),r=[];return $u(n,function(o){qt(Wr,o)&&(!t||qt(Jn,o))&&X_(r,Wr[o])}),r};ia||(ti=function(){if(tG(Ms,this))throw new mG("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:nG(arguments[0]),n=K_(t),r=function(o){var i=this===void 0?Is:this;i===Jn&&Em(r,Ns,o),qt(i,gn)&&qt(i[gn],n)&&(i[gn][n]=!1);var a=km(1,o);try{Am(i,n,a)}catch(s){if(!(s instanceof hG))throw s;Q_(i,n,a)}};return oa&&Tm&&Am(Jn,n,{configurable:!0,set:r}),Pm(n,t)},Ms=ti[Rs],V_(Ms,"toString",function(){return Z_(this).tag}),V_(ti,"withoutSetter",function(e){return Pm(K_(e),e)}),H_.f=e$,q_.f=Cu,iG.f=Im,z_.f=t$,rG.f=U_.f=n$,oG.f=r$,lG.f=function(e){return Pm(cG(e),e)},oa&&aG(Ms,"description",{configurable:!0,get:function(){return Z_(this).description}})),Eu({global:!0,constructor:!0,wrap:!0,forced:!ia,sham:!ia},{Symbol:ti}),$u(B_(vG),function(e){uG(e)}),Eu({target:ku,stat:!0,forced:!ia},{useSetter:function(){Tm=!0},useSimple:function(){Tm=!1}}),Eu({target:"Object",stat:!0,forced:!ia,sham:!oa},{create:gG,defineProperty:Cu,defineProperties:Im,getOwnPropertyDescriptor:t$}),Eu({target:"Object",stat:!0,forced:!ia},{getOwnPropertyNames:n$}),fG(),dG(ti,ku),W_[gn]=!0;var bG=Yi,o$=bG&&!!Symbol.for&&!!Symbol.keyFor,wG=at,xG=xr,SG=On,EG=Ts,i$=Ji,_G=o$,Rm=i$("string-to-symbol-registry"),$G=i$("symbol-to-string-registry");wG({target:"Symbol",stat:!0,forced:!_G},{for:function(e){var t=EG(e);if(SG(Rm,t))return Rm[t];var n=xG("Symbol")(t);return Rm[t]=n,$G[n]=t,n}});var kG=at,CG=On,OG=Es,TG=au,AG=Ji,PG=o$,a$=AG("symbol-to-string-registry");kG({target:"Symbol",stat:!0,forced:!PG},{keyFor:function(t){if(!OG(t))throw new TypeError(TG(t)+" is not a symbol");if(CG(a$,t))return a$[t]}});var IG=Mt,s$=ta,RG=rn,c$=Qo,MG=Ts,l$=IG([].push),NG=function(e){if(RG(e))return e;if(s$(e)){for(var t=e.length,n=[],r=0;r<t;r++){var o=e[r];typeof o=="string"?l$(n,o):(typeof o=="number"||c$(o)==="Number"||c$(o)==="String")&&l$(n,MG(o))}var i=n.length,a=!0;return function(s,c){if(a)return a=!1,c;if(s$(this))return c;for(var l=0;l<i;l++)if(n[l]===s)return c}}},DG=at,u$=xr,f$=Ah,jG=br,Ds=Mt,d$=Rt,p$=rn,h$=Es,m$=gu,FG=NG,LG=Yi,BG=String,ko=u$("JSON","stringify"),Ou=Ds(/./.exec),y$=Ds("".charAt),UG=Ds("".charCodeAt),zG=Ds("".replace),qG=Ds(1 .toString),HG=/[\uD800-\uDFFF]/g,v$=/^[\uD800-\uDBFF]$/,g$=/^[\uDC00-\uDFFF]$/,b$=!LG||d$(function(){var e=u$("Symbol")("stringify detection");return ko([e])!=="[null]"||ko({a:e})!=="{}"||ko(Object(e))!=="{}"}),w$=d$(function(){return ko("\uDF06\uD834")!=='"\\udf06\\ud834"'||ko("\uDEAD")!=='"\\udead"'}),VG=function(e,t){var n=m$(arguments),r=FG(t);if(!(!p$(r)&&(e===void 0||h$(e))))return n[1]=function(o,i){if(p$(r)&&(i=jG(r,this,BG(o),i)),!h$(i))return i},f$(ko,null,n)},WG=function(e,t,n){var r=y$(n,t-1),o=y$(n,t+1);return Ou(v$,e)&&!Ou(g$,o)||Ou(g$,e)&&!Ou(v$,r)?"\\u"+qG(UG(e,0),16):e};ko&&DG({target:"JSON",stat:!0,arity:3,forced:b$||w$},{stringify:function(t,n,r){var o=m$(arguments),i=f$(b$?VG:ko,null,o);return w$&&typeof i=="string"?zG(i,HG,WG):i}});var KG=at,GG=Yi,ZG=Rt,x$=bu,YG=Vr,JG=!GG||ZG(function(){x$.f(1)});KG({target:"Object",stat:!0,forced:JG},{getOwnPropertySymbols:function(t){var n=x$.f;return n?n(YG(t)):[]}});var XG=gt;XG("asyncIterator");var QG=gt;QG("hasInstance");var eZ=gt;eZ("isConcatSpreadable");var tZ=gt;tZ("iterator");var nZ=gt;nZ("match");var rZ=gt;rZ("matchAll");var oZ=gt;oZ("replace");var iZ=gt;iZ("search");var aZ=gt;aZ("species");var sZ=gt;sZ("split");var cZ=gt,lZ=M_;cZ("toPrimitive"),lZ();var uZ=xr,fZ=gt,dZ=na;fZ("toStringTag"),dZ(uZ("Symbol"),"Symbol");var pZ=gt;pZ("unscopables");var hZ=It,mZ=na;mZ(hZ.JSON,"JSON",!0);var yZ=Kt,vZ=yZ.Symbol,sa={},Mm=vn,gZ=On,S$=Function.prototype,bZ=Mm&&Object.getOwnPropertyDescriptor,Nm=gZ(S$,"name"),wZ=Nm&&(function(){}).name==="something",xZ=Nm&&(!Mm||Mm&&bZ(S$,"name").configurable),SZ={EXISTS:Nm,PROPER:wZ,CONFIGURABLE:xZ},EZ=Rt,_Z=!EZ(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),$Z=On,kZ=rn,CZ=Vr,OZ=hu,TZ=_Z,E$=OZ("IE_PROTO"),Dm=Object,AZ=Dm.prototype,_$=TZ?Dm.getPrototypeOf:function(e){var t=CZ(e);if($Z(t,E$))return t[E$];var n=t.constructor;return kZ(n)&&t instanceof n?n.prototype:t instanceof Dm?AZ:null},PZ=Rt,IZ=rn,RZ=qr,MZ=vm,$$=_$,NZ=wu,DZ=zt,jm=DZ("iterator"),k$=!1,Kr,Fm,Lm;[].keys&&(Lm=[].keys(),"next"in Lm?(Fm=$$($$(Lm)),Fm!==Object.prototype&&(Kr=Fm)):k$=!0);var jZ=!RZ(Kr)||PZ(function(){var e={};return Kr[jm].call(e)!==e});jZ?Kr={}:Kr=MZ(Kr),IZ(Kr[jm])||NZ(Kr,jm,function(){return this});var C$={IteratorPrototype:Kr,BUGGY_SAFARI_ITERATORS:k$},FZ=C$.IteratorPrototype,LZ=vm,BZ=Ss,UZ=na,zZ=sa,qZ=function(){return this},HZ=function(e,t,n,r){var o=t+" Iterator";return e.prototype=LZ(FZ,{next:BZ(+!r,n)}),UZ(e,o,!1,!0),zZ[o]=qZ,e},VZ=at,WZ=br,O$=SZ,KZ=HZ,GZ=_$,ZZ=na,T$=wu,YZ=zt,A$=sa,P$=C$,JZ=O$.PROPER;O$.CONFIGURABLE,P$.IteratorPrototype;var Tu=P$.BUGGY_SAFARI_ITERATORS,Bm=YZ("iterator"),I$="keys",Au="values",R$="entries",XZ=function(){return this},M$=function(e,t,n,r,o,i,a){KZ(n,t,r);var s=function(y){if(y===o&&p)return p;if(!Tu&&y&&y in u)return u[y];switch(y){case I$:return function(){return new n(this,y)};case Au:return function(){return new n(this,y)};case R$:return function(){return new n(this,y)}}return function(){return new n(this)}},c=t+" Iterator",l=!1,u=e.prototype,f=u[Bm]||u["@@iterator"]||o&&u[o],p=!Tu&&f||s(o),d=t==="Array"&&u.entries||f,h,m,v;if(d&&(h=GZ(d.call(new e)),h!==Object.prototype&&h.next&&(ZZ(h,c,!0,!0),A$[c]=XZ)),JZ&&o===Au&&f&&f.name!==Au&&(l=!0,p=function(){return WZ(f,this)}),o)if(m={values:s(Au),keys:i?p:s(I$),entries:s(R$)},a)for(v in m)(Tu||l||!(v in u))&&T$(u,v,m[v]);else VZ({target:t,proto:!0,forced:Tu||l},m);return a&&u[Bm]!==p&&T$(u,Bm,p,{name:o}),A$[t]=p,m},N$=function(e,t){return{value:e,done:t}},QZ=wr,D$=sa,j$=xm;Yn.f;var eY=M$,Pu=N$,F$="Array Iterator",tY=j$.set,nY=j$.getterFor(F$);eY(Array,"Array",function(e,t){tY(this,{type:F$,target:QZ(e),index:0,kind:t})},function(){var e=nY(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,Pu(void 0,!0);switch(e.kind){case"keys":return Pu(n,!1);case"values":return Pu(t[n],!1)}return Pu([n,t[n]],!1)},"values"),D$.Arguments=D$.Array;var rY={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},oY=rY,iY=It,aY=na,L$=sa;for(var Um in oY)aY(iY[Um],Um),L$[Um]=L$.Array;var sY=vZ,cY=sY,lY=zt,uY=Yn.f,B$=lY("metadata"),U$=Function.prototype;U$[B$]===void 0&&uY(U$,B$,{value:null});var fY=gt;fY("asyncDispose");var dY=gt;dY("dispose");var pY=gt;pY("metadata");var hY=cY,mY=hY,yY=xr,vY=Mt,zm=yY("Symbol"),gY=zm.keyFor,bY=vY(zm.prototype.valueOf),z$=zm.isRegisteredSymbol||function(t){try{return gY(bY(t))!==void 0}catch{return!1}},wY=at,xY=z$;wY({target:"Symbol",stat:!0},{isRegisteredSymbol:xY});for(var SY=Ji,q$=xr,EY=Mt,_Y=Es,$Y=zt,Iu=q$("Symbol"),H$=Iu.isWellKnownSymbol,V$=q$("Object","getOwnPropertyNames"),kY=EY(Iu.prototype.valueOf),W$=SY("wks"),qm=0,K$=V$(Iu),CY=K$.length;qm<CY;qm++)try{var G$=K$[qm];_Y(Iu[G$])&&$Y(G$)}catch{}var Z$=function(t){if(H$&&H$(t))return!0;try{for(var n=kY(t),r=0,o=V$(W$),i=o.length;r<i;r++)if(W$[o[r]]==n)return!0}catch{}return!1},OY=at,TY=Z$;OY({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:TY});var AY=gt;AY("customMatcher");var PY=gt;PY("observable");var IY=at,RY=z$;IY({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:RY});var MY=at,NY=Z$;MY({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:NY});var DY=gt;DY("matcher");var jY=gt;jY("metadataKey");var FY=gt;FY("patternMatch");var LY=gt;LY("replaceAll");var BY=mY,UY=BY,zY=UY;const ca=Ue(zY);var Hm=Mt,qY=lu,HY=Ts,VY=jh,WY=Hm("".charAt),Y$=Hm("".charCodeAt),KY=Hm("".slice),J$=function(e){return function(t,n){var r=HY(VY(t)),o=qY(n),i=r.length,a,s;return o<0||o>=i?e?"":void 0:(a=Y$(r,o),a<55296||a>56319||o+1===i||(s=Y$(r,o+1))<56320||s>57343?e?WY(r,o):a:e?KY(r,o,o+2):(a-55296<<10)+(s-56320)+65536)}},GY={codeAt:J$(!1),charAt:J$(!0)},ZY=GY.charAt,YY=Ts,X$=xm,JY=M$,Q$=N$,ek="String Iterator",XY=X$.set,QY=X$.getterFor(ek);JY(String,"String",function(e){XY(this,{type:ek,string:YY(e),index:0})},function(){var t=QY(this),n=t.string,r=t.index,o;return r>=n.length?Q$(void 0,!0):(o=ZY(n,r),t.index+=o.length,Q$(o,!1))});var eJ=Cs,tk=Hh,tJ=Dh,nJ=sa,rJ=zt,oJ=rJ("iterator"),Vm=function(e){if(!tJ(e))return tk(e,oJ)||tk(e,"@@iterator")||nJ[eJ(e)]},iJ=Vm,aJ=iJ,sJ=aJ,cJ=sJ,lJ=cJ,uJ=lJ,fJ=uJ,dJ=fJ,pJ=dJ;const nk=Ue(pJ);var hJ=vn,mJ=ta,yJ=TypeError,vJ=Object.getOwnPropertyDescriptor,gJ=hJ&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),rk=gJ?function(e,t){if(mJ(e)&&!vJ(e,"length").writable)throw new yJ("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},bJ=at,wJ=Vr,xJ=ei,SJ=rk,EJ=om,_J=Rt,$J=_J(function(){return[].push.call({length:4294967296},1)!==4294967297}),kJ=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},CJ=$J||!kJ();bJ({target:"Array",proto:!0,arity:1,forced:CJ},{push:function(t){var n=wJ(this),r=xJ(n),o=arguments.length;EJ(r+o);for(var i=0;i<o;i++)n[r]=arguments[i],r++;return SJ(n,r),r}});var OJ=It,TJ=Kt,ri=function(e,t){var n=TJ[e+"Prototype"],r=n&&n[t];if(r)return r;var o=OJ[e],i=o&&o.prototype;return i&&i[t]},AJ=ri,PJ=AJ("Array","push"),IJ=Hr,RJ=PJ,Wm=Array.prototype,MJ=function(e){var t=e.push;return e===Wm||IJ(Wm,e)&&t===Wm.push?RJ:t},NJ=MJ,DJ=NJ,jJ=DJ,FJ=jJ,LJ=FJ,BJ=LJ,UJ=BJ;const zJ=Ue(UJ);function qJ(e,t){var n=e==null?null:typeof ca<"u"&&nk(e)||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(zJ(s).call(s,r.value),s.length!==t);c=!0);}catch(u){l=!0,o=u}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}var HJ=at,ok=ta,VJ=cm,WJ=qr,ik=um,KJ=ei,GJ=wr,ZJ=ks,YJ=zt,JJ=fu,XJ=gu,QJ=JJ("slice"),eX=YJ("species"),Km=Array,tX=Math.max;HJ({target:"Array",proto:!0,forced:!QJ},{slice:function(t,n){var r=GJ(this),o=KJ(r),i=ik(t,o),a=ik(n===void 0?o:n,o),s,c,l;if(ok(r)&&(s=r.constructor,VJ(s)&&(s===Km||ok(s.prototype))?s=void 0:WJ(s)&&(s=s[eX],s===null&&(s=void 0)),s===Km||s===void 0))return XJ(r,i,a);for(c=new(s===void 0?Km:s)(tX(a-i,0)),l=0;i<a;i++,l++)i in r&&ZJ(c,l,r[i]);return c.length=l,c}});var nX=ri,rX=nX("Array","slice"),oX=Hr,iX=rX,Gm=Array.prototype,aX=function(e){var t=e.slice;return e===Gm||oX(Gm,e)&&t===Gm.slice?iX:t},sX=aX,cX=sX,lX=cX,uX=lX,fX=uX,dX=fX,pX=dX;const hX=Ue(pX);var mX=br,ak=_o,yX=Hh,vX=function(e,t,n){var r,o;ak(e);try{if(r=yX(e,"return"),!r){if(t==="throw")throw n;return n}r=mX(r,e)}catch(i){o=!0,r=i}if(t==="throw")throw n;if(o)throw r;return ak(r),n},gX=_o,bX=vX,wX=function(e,t,n,r){try{return r?t(gX(n)[0],n[1]):t(n)}catch(o){bX(e,"throw",o)}},xX=zt,SX=sa,EX=xX("iterator"),_X=Array.prototype,$X=function(e){return e!==void 0&&(SX.Array===e||_X[EX]===e)},kX=br,CX=qh,OX=_o,TX=au,AX=Vm,PX=TypeError,IX=function(e,t){var n=arguments.length<2?AX(e):t;if(CX(n))return OX(kX(n,e));throw new PX(TX(e)+" is not iterable")},RX=Qh,MX=br,NX=Vr,DX=wX,jX=$X,FX=cm,LX=ei,sk=ks,BX=IX,UX=Vm,ck=Array,zX=function(t){var n=NX(t),r=FX(this),o=arguments.length,i=o>1?arguments[1]:void 0,a=i!==void 0;a&&(i=RX(i,o>2?arguments[2]:void 0));var s=UX(n),c=0,l,u,f,p,d,h;if(s&&!(this===ck&&jX(s)))for(u=r?new this:[],p=BX(n,s),d=p.next;!(f=MX(d,p)).done;c++)h=a?DX(p,i,[f.value,c],!0):f.value,sk(u,c,h);else for(l=LX(n),u=r?new this(l):ck(l);l>c;c++)h=a?i(n[c],c):n[c],sk(u,c,h);return u.length=c,u},qX=zt,lk=qX("iterator"),uk=!1;try{var HX=0,fk={next:function(){return{done:!!HX++}},return:function(){uk=!0}};fk[lk]=function(){return this},Array.from(fk,function(){throw 2})}catch{}var VX=function(e,t){try{if(!t&&!uk)return!1}catch{return!1}var n=!1;try{var r={};r[lk]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},WX=at,KX=zX,GX=VX,ZX=!GX(function(e){Array.from(e)});WX({target:"Array",stat:!0,forced:ZX},{from:KX});var YX=Kt,JX=YX.Array.from,XX=JX,QX=XX,eQ=QX,tQ=eQ,nQ=tQ,rQ=nQ,oQ=rQ;const dk=Ue(oQ);function Zm(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function pk(e,t){if(e){var n;if(typeof e=="string")return Zm(e,t);var r=hX(n={}.toString.call(e)).call(n,8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?dk(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Zm(e,t):void 0}}function iQ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
324
|
+
`)},Ez=0,Gi=[];function _z(e){var t=C.useRef([]),n=C.useRef([0,0]),r=C.useRef(),o=C.useState(Ez++)[0],i=C.useState(function(){return iE()})[0],a=C.useRef(e);C.useEffect(function(){a.current=e},[e]),C.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=W8([e.lockRef.current],(e.shards||[]).map(fE),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.useCallback(function(m,v){if("touches"in m&&m.touches.length===2)return!a.current.allowPinchZoom;var y=eu(m),g=n.current,b="deltaX"in m?m.deltaX:g[0]-y[0],k="deltaY"in m?m.deltaY:g[1]-y[1],S,$=m.target,T=Math.abs(b)>Math.abs(k)?"h":"v";if("touches"in m&&T==="h"&&$.type==="range")return!1;var R=sE(T,$);if(!R)return!0;if(R?S=T:(S=T==="v"?"h":"v",R=sE(T,$)),!R)return!1;if(!r.current&&"changedTouches"in m&&(b||k)&&(r.current=S),!S)return!0;var B=r.current||S;return wz(B,v,m,B==="h"?b:k,!0)},[]),c=C.useCallback(function(m){var v=m;if(!(!Gi.length||Gi[Gi.length-1]!==i)){var y="deltaY"in v?uE(v):eu(v),g=t.current.filter(function(S){return S.name===v.type&&S.target===v.target&&xz(S.delta,y)})[0];if(g&&g.should){v.cancelable&&v.preventDefault();return}if(!g){var b=(a.current.shards||[]).map(fE).filter(Boolean).filter(function(S){return S.contains(v.target)}),k=b.length>0?s(v,b[0]):!a.current.noIsolation;k&&v.cancelable&&v.preventDefault()}}},[]),l=C.useCallback(function(m,v,y,g){var b={name:m,delta:v,target:y,should:g};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(k){return k!==b})},1)},[]),u=C.useCallback(function(m){n.current=eu(m),r.current=void 0},[]),f=C.useCallback(function(m){l(m.type,uE(m),m.target,s(m,e.lockRef.current))},[]),p=C.useCallback(function(m){l(m.type,eu(m),m.target,s(m,e.lockRef.current))},[]);C.useEffect(function(){return Gi.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Ki),document.addEventListener("touchmove",c,Ki),document.addEventListener("touchstart",u,Ki),function(){Gi=Gi.filter(function(m){return m!==i}),document.removeEventListener("wheel",c,Ki),document.removeEventListener("touchmove",c,Ki),document.removeEventListener("touchstart",u,Ki)}},[]);var d=e.removeScrollBar,h=e.inert;return C.createElement(C.Fragment,null,h?C.createElement(i,{styles:Sz(o)}):null,d?C.createElement(pz,{gapMode:"margin"}):null)}const $z=tz(rE,_z);var dE=C.forwardRef(function(e,t){return C.createElement(Xl,gr({},e,{ref:t,sideCar:$z}))});dE.classNames=Xl.classNames;const kz=dE;var Cz=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Zi=new WeakMap,tu=new WeakMap,nu={},_h=0,pE=function(e){return e&&(e.host||pE(e.parentNode))},Oz=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=pE(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Tz=function(e,t,n,r){var o=Oz(t,Array.isArray(e)?e:[e]);nu[n]||(nu[n]=new WeakMap);var i=nu[n],a=[],s=new Set,c=new Set(o),l=function(f){!f||s.has(f)||(s.add(f),l(f.parentNode))};o.forEach(l);var u=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(p){if(s.has(p))u(p);else{var d=p.getAttribute(r),h=d!==null&&d!=="false",m=(Zi.get(p)||0)+1,v=(i.get(p)||0)+1;Zi.set(p,m),i.set(p,v),a.push(p),m===1&&h&&tu.set(p,!0),v===1&&p.setAttribute(n,"true"),h||p.setAttribute(r,"true")}})};return u(t),s.clear(),_h++,function(){a.forEach(function(f){var p=Zi.get(f)-1,d=i.get(f)-1;Zi.set(f,p),i.set(f,d),p||(tu.has(f)||f.removeAttribute(r),tu.delete(f)),d||f.removeAttribute(n)}),_h--,_h||(Zi=new WeakMap,Zi=new WeakMap,tu=new WeakMap,nu={})}},Az=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||Cz(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Tz(r,o,n,"aria-hidden")):function(){return null}};const hE="Dialog",[mE,aue]=Nf(hE),[Pz,zr]=mE(hE),Iz=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=E.useRef(null),c=E.useRef(null),[l=!1,u]=VS({prop:r,defaultProp:o,onChange:i});return E.createElement(Pz,{scope:t,triggerRef:s,contentRef:c,contentId:Kl(),titleId:Kl(),descriptionId:Kl(),open:l,onOpenChange:u,onOpenToggle:E.useCallback(()=>u(f=>!f),[u]),modal:a},n)},Rz="DialogTrigger",Mz=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=zr(Rz,n),i=Mo(t,o.triggerRef);return E.createElement(In.button,Ot({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":kh(o.open)},r,{ref:i,onClick:Ur(e.onClick,o.onOpenToggle)}))}),Nz="DialogPortal",[sue,yE]=mE(Nz,{forceMount:void 0}),$h="DialogOverlay",Dz=E.forwardRef((e,t)=>{const n=yE($h,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=zr($h,e.__scopeDialog);return i.modal?E.createElement(Gl,{present:r||i.open},E.createElement(jz,Ot({},o,{ref:t}))):null}),jz=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=zr($h,n);return E.createElement(kz,{as:Df,allowPinchZoom:!0,shards:[o.contentRef]},E.createElement(In.div,Ot({"data-state":kh(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),gs="DialogContent",Fz=E.forwardRef((e,t)=>{const n=yE(gs,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=zr(gs,e.__scopeDialog);return E.createElement(Gl,{present:r||i.open},i.modal?E.createElement(Lz,Ot({},o,{ref:t})):E.createElement(Bz,Ot({},o,{ref:t})))}),Lz=E.forwardRef((e,t)=>{const n=zr(gs,e.__scopeDialog),r=E.useRef(null),o=Mo(t,n.contentRef,r);return E.useEffect(()=>{const i=r.current;if(i)return Az(i)},[]),E.createElement(vE,Ot({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ur(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Ur(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Ur(e.onFocusOutside,i=>i.preventDefault())}))}),Bz=E.forwardRef((e,t)=>{const n=zr(gs,e.__scopeDialog),r=E.useRef(!1),o=E.useRef(!1);return E.createElement(vE,Ot({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;r.current||(s=n.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;((s=n.triggerRef.current)===null||s===void 0?void 0:s.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),vE=E.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=zr(gs,n),c=E.useRef(null),l=Mo(t,c);return V8(),E.createElement(E.Fragment,null,E.createElement(D8,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},E.createElement(R8,Ot({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":kh(s.open)},a,{ref:l,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),Uz="DialogTitle",zz=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=zr(Uz,n);return E.createElement(In.h2,Ot({id:o.titleId},r,{ref:t}))}),qz="DialogClose",Hz=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=zr(qz,n);return E.createElement(In.button,Ot({type:"button"},r,{ref:t,onClick:Ur(e.onClick,()=>o.onOpenChange(!1))}))});function kh(e){return e?"open":"closed"}const Vz=Iz,Wz=Mz,Kz=Dz,Gz=Fz,Zz=zz,gE=Hz;function Yz({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const bE=C.forwardRef(Yz);function Eo({open:e,onOpenChange:t,children:n}){return F.jsx(Vz,{open:e,onOpenChange:t,children:n})}function Jz({title:e,children:t}){var r,o,i,a,s,c,l,u;const{modal:n}=ct;return F.jsxs(F.Fragment,{children:[F.jsx(Kz,{...n==null?void 0:n.overlay}),F.jsx("div",{...n==null?void 0:n.container,children:F.jsxs(Gz,{...(r=n==null?void 0:n.dialog)==null?void 0:r.container,children:[F.jsxs("div",{...(i=(o=n==null?void 0:n.dialog)==null?void 0:o.title)==null?void 0:i.container,children:[F.jsx(Zz,{...(s=(a=n==null?void 0:n.dialog)==null?void 0:a.title)==null?void 0:s.text,children:e}),F.jsx(gE,{children:F.jsx(bE,{role:"button",tabIndex:0,...(l=(c=n==null?void 0:n.dialog)==null?void 0:c.title)==null?void 0:l.closeIcon})})]}),F.jsx("div",{...(u=n==null?void 0:n.dialog)==null?void 0:u.content,children:t})]})})]})}Eo.Button=Wz,Eo.Close=gE,Eo.Content=Jz;const wE=E.forwardRef(({children:e,...t},n)=>{const{container:r}=ct;return F.jsxs("div",{...t,...r,ref:n,children:[F.jsx(h6,{}),F.jsxs(qS,{children:[F.jsx(Xz,{}),e]})]})}),Xz=()=>{const{modal:e}=ct,t=Pe(r=>r.connected),{showModal:n}=Ix();return E.useEffect(()=>{var r,o,i,a;t||n({title:"Connection Error",content:F.jsxs(F.Fragment,{children:[F.jsx("p",{...(o=(r=e==null?void 0:e.dialog)==null?void 0:r.newConversation)==null?void 0:o.text,children:"There was an error connecting to the server. Please check your internet connection and try again."}),F.jsx(Eo.Close,{asChild:!0,children:F.jsx("button",{type:"button",...(a=(i=e==null?void 0:e.dialog)==null?void 0:i.newConversation)==null?void 0:a.button,onClick:()=>window.location.reload(),children:"Restart"})})]})})},[t]),F.jsx(F.Fragment,{})},Qz=E.forwardRef(({children:e,onClick:t,...n},r)=>{const{fab:o}=ct,{container:i,icon:a}=o??{};return F.jsx("div",{...n,...i,ref:r,onClick:t,children:F.jsx("div",{...a})})}),xE="Collapsible",[eq,lue]=Nf(xE),[tq,Ch]=eq(xE),nq=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[c=!1,l]=VS({prop:r,defaultProp:o,onChange:a});return E.createElement(tq,{scope:n,disabled:i,contentId:Kl(),open:c,onOpenToggle:E.useCallback(()=>l(u=>!u),[l])},E.createElement(In.div,Ot({"data-state":Oh(c),"data-disabled":i?"":void 0},s,{ref:t})))}),rq="CollapsibleTrigger",oq=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Ch(rq,n);return E.createElement(In.button,Ot({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Oh(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},r,{ref:t,onClick:Ur(e.onClick,o.onOpenToggle)}))}),SE="CollapsibleContent",iq=E.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Ch(SE,e.__scopeCollapsible);return E.createElement(Gl,{present:n||o.open},({present:i})=>E.createElement(aq,Ot({},r,{ref:t,present:i})))}),aq=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,a=Ch(SE,n),[s,c]=E.useState(r),l=E.useRef(null),u=Mo(t,l),f=E.useRef(0),p=f.current,d=E.useRef(0),h=d.current,m=a.open||s,v=E.useRef(m),y=E.useRef();return E.useEffect(()=>{const g=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(g)},[]),Pa(()=>{const g=l.current;if(g){y.current=y.current||{transitionDuration:g.style.transitionDuration,animationName:g.style.animationName},g.style.transitionDuration="0s",g.style.animationName="none";const b=g.getBoundingClientRect();f.current=b.height,d.current=b.width,v.current||(g.style.transitionDuration=y.current.transitionDuration,g.style.animationName=y.current.animationName),c(r)}},[a.open,r]),E.createElement(In.div,Ot({"data-state":Oh(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!m},i,{ref:u,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style}}),m&&o)});function Oh(e){return e?"open":"closed"}const sq=nq,cq=iq,lq=e=>C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e},C.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M15.5 5.5v-5m0 0h-5m5 0L8.833 7.167m-2.5-5H4.5c-1.4 0-2.1 0-2.635.272A2.5 2.5 0 0 0 .772 3.532C.5 4.066.5 4.767.5 6.167V11.5c0 1.4 0 2.1.272 2.635a2.5 2.5 0 0 0 1.093 1.092C2.4 15.5 3.1 15.5 4.5 15.5h5.333c1.4 0 2.1 0 2.635-.273a2.5 2.5 0 0 0 1.093-1.092c.272-.535.272-1.235.272-2.635V9.667"})),EE=({...e})=>{var a,s;const{header:t,modal:n}=ct,r=Pe(c=>c.restartConversation),{showModal:o}=Ix(),i=c=>{var l,u,f,p;c.stopPropagation(),o({title:"Restart Conversation",content:F.jsxs(F.Fragment,{children:[F.jsx("p",{...(u=(l=n==null?void 0:n.dialog)==null?void 0:l.newConversation)==null?void 0:u.text,children:"Are you sure you want to restart a new conversation?"}),F.jsx(Eo.Close,{asChild:!0,children:F.jsx("button",{type:"button",...(p=(f=n==null?void 0:n.dialog)==null?void 0:f.newConversation)==null?void 0:p.button,onClick:r,children:"Restart"})})]})})};return F.jsx(X6,{...e,...(s=(a=t==null?void 0:t.content)==null?void 0:a.actions)==null?void 0:s.icons,role:"button",tabIndex:0,onClick:i,onKeyDown:c=>{c.key==="Enter"&&i(c)}})},uq=({...e})=>{const{header:t}=ct,n=Pe(o=>o.closeWindow),r=o=>{o.stopPropagation(),n==null||n()};return F.jsx(bE,{...e,...t.content.actions.icons,role:"button",tabIndex:0,onClick:r,onKeyDown:o=>{o.key==="Enter"&&r(o)}})},bs=({icon:e,title:t,link:n,...r})=>{var a,s,c,l,u,f,p,d,h,m,v,y;const{header:o}=ct,i=e??lq;return t?n?F.jsxs("a",{...r,...(s=(a=o.expandedContent)==null?void 0:a.descriptionItems)==null?void 0:s.container,href:n,target:"_blank",rel:"noreferrer noopener",children:[F.jsx(i,{...(l=(c=o.expandedContent)==null?void 0:c.descriptionItems)==null?void 0:l.icon}),F.jsx("p",{...(f=(u=o.expandedContent)==null?void 0:u.descriptionItems)==null?void 0:f.link,children:t})]}):F.jsxs("div",{...r,...(d=(p=o.expandedContent)==null?void 0:p.descriptionItems)==null?void 0:d.container,children:[F.jsx(i,{...(m=(h=o.expandedContent)==null?void 0:h.descriptionItems)==null?void 0:m.icon}),F.jsx("p",{...(y=(v=o.expandedContent)==null?void 0:v.descriptionItems)==null?void 0:y.text,children:t})]}):null},_E=({defaultOpen:e,disabled:t,onOpenChange:n,...r})=>{var p,d,h,m,v,y,g,b,k,S,$,T,R,B,O,M,H,L,P,N,j,W;const{header:o}=ct,i=Pe(V=>V.configuration),a=Pe(V=>V.closeWindow),s=Pe(V=>V.getClientId)(),c=Pe(V=>!V.disableRestartConversation),[l,u]=E.useState(!!e),f=!!((p=i.email)!=null&&p.title)||!!((d=i.phone)!=null&&d.title)||!!((h=i.website)!=null&&h.title)||!!((m=i.termsOfService)!=null&&m.link)||!!((v=i.privacyPolicy)!=null&&v.link);return F.jsxs(sq,{open:f?l:!1,onOpenChange:u,"data-disabled":f?void 0:"",...o.container,...r,children:[F.jsxs(oq,{...o.content.container,children:[F.jsx(Uf,{...r,userId:s,src:i.botAvatar,...o.content.avatar,children:i.botName||"Bot"}),F.jsx("h2",{...o.content.title,children:i.botName||"Bot"}),i.botDescription&&F.jsx("p",{...o.content.description,children:i.botDescription}),F.jsxs("div",{...o.content.actions.container,children:[c&&F.jsx(EE,{}),a&&F.jsx(uq,{})]})]}),F.jsxs(cq,{...o.expandedContent.container,children:[F.jsxs("div",{"data-links":"",...o.expandedContent.group,children:[F.jsx(bs,{"data-email":"",icon:W7,title:(y=i.email)==null?void 0:y.title,link:(b=(g=i.email)==null?void 0:g.link)!=null&&b.startsWith("mailto:")?(k=i.email)==null?void 0:k.link:`mailto:${(S=i.email)==null?void 0:S.link}`}),F.jsx(bs,{"data-phone":"",icon:X7,title:($=i.phone)==null?void 0:$.title,link:(R=(T=i.phone)==null?void 0:T.link)!=null&&R.startsWith("tel:")?(B=i.phone)==null?void 0:B.link:`tel:${(O=i.phone)==null?void 0:O.link}`}),F.jsx(bs,{"data-website":"",link:(M=i.website)==null?void 0:M.link,icon:G7,title:(H=i.website)==null?void 0:H.title})]}),F.jsxs("div",{"data-legal":"",...(L=o.expandedContent)==null?void 0:L.group,children:[F.jsx(bs,{"data-terms":"",link:(P=i.termsOfService)==null?void 0:P.link,icon:H7,title:(N=i.termsOfService)==null?void 0:N.title}),F.jsx(bs,{"data-privacy":"",link:(j=i.privacyPolicy)==null?void 0:j.link,icon:Y7,title:(W=i.privacyPolicy)==null?void 0:W.title})]})]})]})},$E=E.memo(({...e})=>{const{typingIndicator:t}=ct;return F.jsx("div",{...e,...t==null?void 0:t.container,children:F.jsx("div",{...t==null?void 0:t.loader})})}),Th=E.memo(E.forwardRef(({direction:e,block:t,scroll:n,disableInput:r,children:o,sender:i,...a},s)=>{var m,v,y,g;const[c,l]=E.useState([]),{message:u}=ct,{botAvatar:f,botName:p}=Pe(b=>b.configuration),d=Pe(b=>b.getClientId)(),h=Ug(d??"",15);return F.jsx(Ax.Provider,{value:{isLoading:c,setIsLoading:l},children:F.jsxs("div",{...a,...u==null?void 0:u.container,"data-loaded":c.length===0,"data-disable-input":!!r,"data-direction":e,ref:s,children:[F.jsxs(Ag,{"data-color":h,...(m=u==null?void 0:u.avatar)==null?void 0:m.container,children:[F.jsx(Pg,{...(v=u==null?void 0:u.avatar)==null?void 0:v.image,src:(i==null?void 0:i.avatar)??f}),F.jsx(Ig,{...(y=u==null?void 0:u.avatar)==null?void 0:y.fallback,children:(i==null?void 0:i.name[0])??((g=p??"Bot")==null?void 0:g[0])})]}),t&&F.jsx(Wi,{block:t,direction:e,sender:i,timestamp:a.timestamp}),o]})})}));function fq(){const e=Pe(r=>r.getClientId)(),t=Pe(r=>r.configuration),{messageList:{marquee:n}}=ct;return F.jsxs("li",{...n.container,children:[F.jsx(Uf,{userId:e,src:t.botAvatar,...n.avatar,children:(t.botName||"Bot").slice(0,1)}),F.jsxs("div",{...n.content,children:[F.jsx("h1",{...n.title,children:t.botName||"Bot"}),F.jsx("p",{...n.description,children:t.botDescription})]})]})}function dq(e,t){try{var n=global,r=n.document;if(typeof r<"u"&&r.createElement&&r.head&&r.head.appendChild){var o=r.querySelector('html meta[name="'.concat(encodeURI(e),'"]'))||r.createElement("meta");o.setAttribute("name",e),o.setAttribute("content",t),r.head.appendChild(o)}}catch{}}function pq(){dq("react-scroll-to-bottom:version","4.2.0")}var ws=function(e){return e&&e.Math===Math&&e},It=ws(typeof globalThis=="object"&&globalThis)||ws(typeof window=="object"&&window)||ws(typeof self=="object"&&self)||ws(typeof be=="object"&&be)||ws(typeof be=="object"&&be)||function(){return this}()||Function("return this")(),Rt=function(e){try{return!!e()}catch{return!0}},hq=Rt,ru=!hq(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),mq=ru,kE=Function.prototype,CE=kE.apply,OE=kE.call,Ah=typeof Reflect=="object"&&Reflect.apply||(mq?OE.bind(CE):function(){return OE.apply(CE,arguments)}),TE=ru,AE=Function.prototype,Ph=AE.call,yq=TE&&AE.bind.bind(Ph,Ph),Mt=TE?yq:function(e){return function(){return Ph.apply(e,arguments)}},PE=Mt,vq=PE({}.toString),gq=PE("".slice),Qo=function(e){return gq(vq(e),8,-1)},bq=Qo,wq=Mt,Ih=function(e){if(bq(e)==="Function")return wq(e)},Rh=typeof document=="object"&&document.all,rn=typeof Rh>"u"&&Rh!==void 0?function(e){return typeof e=="function"||e===Rh}:function(e){return typeof e=="function"},xs={},xq=Rt,vn=!xq(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Sq=ru,ou=Function.prototype.call,br=Sq?ou.bind(ou):function(){return ou.apply(ou,arguments)},Mh={},IE={}.propertyIsEnumerable,RE=Object.getOwnPropertyDescriptor,Eq=RE&&!IE.call({1:2},1);Mh.f=Eq?function(t){var n=RE(this,t);return!!n&&n.enumerable}:IE;var Ss=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},_q=Mt,$q=Rt,kq=Qo,Nh=Object,Cq=_q("".split),ME=$q(function(){return!Nh("z").propertyIsEnumerable(0)})?function(e){return kq(e)==="String"?Cq(e,""):Nh(e)}:Nh,Dh=function(e){return e==null},Oq=Dh,Tq=TypeError,jh=function(e){if(Oq(e))throw new Tq("Can't call method on "+e);return e},Aq=ME,Pq=jh,wr=function(e){return Aq(Pq(e))},Iq=rn,qr=function(e){return typeof e=="object"?e!==null:Iq(e)},Kt={},Fh=Kt,Lh=It,Rq=rn,NE=function(e){return Rq(e)?e:void 0},xr=function(e,t){return arguments.length<2?NE(Fh[e])||NE(Lh[e]):Fh[e]&&Fh[e][t]||Lh[e]&&Lh[e][t]},Mq=Mt,Hr=Mq({}.isPrototypeOf),Nq=It,DE=Nq.navigator,jE=DE&&DE.userAgent,Bh=jE?String(jE):"",FE=It,Uh=Bh,LE=FE.process,BE=FE.Deno,UE=LE&&LE.versions||BE&&BE.version,zE=UE&&UE.v8,Zn,iu;zE&&(Zn=zE.split("."),iu=Zn[0]>0&&Zn[0]<4?1:+(Zn[0]+Zn[1])),!iu&&Uh&&(Zn=Uh.match(/Edge\/(\d+)/),(!Zn||Zn[1]>=74)&&(Zn=Uh.match(/Chrome\/(\d+)/),Zn&&(iu=+Zn[1])));var zh=iu,qE=zh,Dq=Rt,jq=It,Fq=jq.String,Yi=!!Object.getOwnPropertySymbols&&!Dq(function(){var e=Symbol("symbol detection");return!Fq(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&qE&&qE<41}),Lq=Yi,HE=Lq&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Bq=xr,Uq=rn,zq=Hr,qq=HE,Hq=Object,Es=qq?function(e){return typeof e=="symbol"}:function(e){var t=Bq("Symbol");return Uq(t)&&zq(t.prototype,Hq(e))},Vq=String,au=function(e){try{return Vq(e)}catch{return"Object"}},Wq=rn,Kq=au,Gq=TypeError,qh=function(e){if(Wq(e))return e;throw new Gq(Kq(e)+" is not a function")},Zq=qh,Yq=Dh,Hh=function(e,t){var n=e[t];return Yq(n)?void 0:Zq(n)},Vh=br,Wh=rn,Kh=qr,Jq=TypeError,Xq=function(e,t){var n,r;if(t==="string"&&Wh(n=e.toString)&&!Kh(r=Vh(n,e))||Wh(n=e.valueOf)&&!Kh(r=Vh(n,e))||t!=="string"&&Wh(n=e.toString)&&!Kh(r=Vh(n,e)))return r;throw new Jq("Can't convert object to primitive value")},VE={exports:{}},WE=It,Qq=Object.defineProperty,eH=function(e,t){try{Qq(WE,e,{value:t,configurable:!0,writable:!0})}catch{WE[e]=t}return t},tH=It,nH=eH,KE="__core-js_shared__",GE=VE.exports=tH[KE]||nH(KE,{});(GE.versions||(GE.versions=[])).push({version:"3.38.1",mode:"pure",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Gh=VE.exports,ZE=Gh,Ji=function(e,t){return ZE[e]||(ZE[e]=t||{})},rH=jh,oH=Object,Vr=function(e){return oH(rH(e))},iH=Mt,aH=Vr,sH=iH({}.hasOwnProperty),On=Object.hasOwn||function(t,n){return sH(aH(t),n)},cH=Mt,lH=0,uH=Math.random(),fH=cH(1 .toString),Zh=function(e){return"Symbol("+(e===void 0?"":e)+")_"+fH(++lH+uH,36)},dH=It,pH=Ji,YE=On,hH=Zh,mH=Yi,yH=HE,Xi=dH.Symbol,Yh=pH("wks"),vH=yH?Xi.for||Xi:Xi&&Xi.withoutSetter||hH,zt=function(e){return YE(Yh,e)||(Yh[e]=mH&&YE(Xi,e)?Xi[e]:vH("Symbol."+e)),Yh[e]},gH=br,JE=qr,XE=Es,bH=Hh,wH=Xq,xH=zt,SH=TypeError,EH=xH("toPrimitive"),_H=function(e,t){if(!JE(e)||XE(e))return e;var n=bH(e,EH),r;if(n){if(t===void 0&&(t="default"),r=gH(n,e,t),!JE(r)||XE(r))return r;throw new SH("Can't convert object to primitive value")}return t===void 0&&(t="number"),wH(e,t)},$H=_H,kH=Es,Jh=function(e){var t=$H(e,"string");return kH(t)?t:t+""},CH=It,QE=qr,Xh=CH.document,OH=QE(Xh)&&QE(Xh.createElement),e_=function(e){return OH?Xh.createElement(e):{}},TH=vn,AH=Rt,PH=e_,t_=!TH&&!AH(function(){return Object.defineProperty(PH("div"),"a",{get:function(){return 7}}).a!==7}),IH=vn,RH=br,MH=Mh,NH=Ss,DH=wr,jH=Jh,FH=On,LH=t_,n_=Object.getOwnPropertyDescriptor;xs.f=IH?n_:function(t,n){if(t=DH(t),n=jH(n),LH)try{return n_(t,n)}catch{}if(FH(t,n))return NH(!RH(MH.f,t,n),t[n])};var BH=Rt,UH=rn,zH=/#|\.prototype\./,_s=function(e,t){var n=HH[qH(e)];return n===WH?!0:n===VH?!1:UH(t)?BH(t):!!t},qH=_s.normalize=function(e){return String(e).replace(zH,".").toLowerCase()},HH=_s.data={},VH=_s.NATIVE="N",WH=_s.POLYFILL="P",KH=_s,r_=Ih,GH=qh,ZH=ru,YH=r_(r_.bind),Qh=function(e,t){return GH(e),t===void 0?e:ZH?YH(e,t):function(){return e.apply(t,arguments)}},Yn={},JH=vn,XH=Rt,o_=JH&&XH(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),QH=qr,eV=String,tV=TypeError,_o=function(e){if(QH(e))return e;throw new tV(eV(e)+" is not an object")},nV=vn,rV=t_,oV=o_,su=_o,i_=Jh,iV=TypeError,em=Object.defineProperty,aV=Object.getOwnPropertyDescriptor,tm="enumerable",nm="configurable",rm="writable";Yn.f=nV?oV?function(t,n,r){if(su(t),n=i_(n),su(r),typeof t=="function"&&n==="prototype"&&"value"in r&&rm in r&&!r[rm]){var o=aV(t,n);o&&o[rm]&&(t[n]=r.value,r={configurable:nm in r?r[nm]:o[nm],enumerable:tm in r?r[tm]:o[tm],writable:!1})}return em(t,n,r)}:em:function(t,n,r){if(su(t),n=i_(n),su(r),rV)try{return em(t,n,r)}catch{}if("get"in r||"set"in r)throw new iV("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var sV=vn,cV=Yn,lV=Ss,cu=sV?function(e,t,n){return cV.f(e,t,lV(1,n))}:function(e,t,n){return e[t]=n,e},$s=It,uV=Ah,fV=Ih,dV=rn,pV=xs.f,hV=KH,Qi=Kt,mV=Qh,ea=cu,a_=On,yV=function(e){var t=function(n,r,o){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,o)}return uV(e,this,arguments)};return t.prototype=e.prototype,t},at=function(e,t){var n=e.target,r=e.global,o=e.stat,i=e.proto,a=r?$s:o?$s[n]:$s[n]&&$s[n].prototype,s=r?Qi:Qi[n]||ea(Qi,n,{})[n],c=s.prototype,l,u,f,p,d,h,m,v,y;for(p in t)l=hV(r?p:n+(o?".":"#")+p,e.forced),u=!l&&a&&a_(a,p),h=s[p],u&&(e.dontCallGetSet?(y=pV(a,p),m=y&&y.value):m=a[p]),d=u&&m?m:t[p],!(!l&&!i&&typeof h==typeof d)&&(e.bind&&u?v=mV(d,$s):e.wrap&&u?v=yV(d):i&&dV(d)?v=fV(d):v=d,(e.sham||d&&d.sham||h&&h.sham)&&ea(v,"sham",!0),ea(s,p,v),i&&(f=n+"Prototype",a_(Qi,f)||ea(Qi,f,{}),ea(Qi[f],p,d),e.real&&c&&(l||!c[p])&&ea(c,p,d)))},vV=Qo,ta=Array.isArray||function(t){return vV(t)==="Array"},gV=at,bV=ta;gV({target:"Array",stat:!0},{isArray:bV});var wV=Kt,xV=wV.Array.isArray,SV=xV,s_=SV,EV=s_,_V=EV,$V=_V,kV=$V,CV=kV;const c_=Ue(CV);function OV(e){if(c_(e))return e}var TV=Math.ceil,AV=Math.floor,PV=Math.trunc||function(t){var n=+t;return(n>0?AV:TV)(n)},IV=PV,lu=function(e){var t=+e;return t!==t||t===0?0:IV(t)},RV=lu,MV=Math.min,NV=function(e){var t=RV(e);return t>0?MV(t,9007199254740991):0},DV=NV,ei=function(e){return DV(e.length)},jV=TypeError,FV=9007199254740991,om=function(e){if(e>FV)throw jV("Maximum allowed index exceeded");return e},LV=vn,BV=Yn,UV=Ss,ks=function(e,t,n){LV?BV.f(e,t,UV(0,n)):e[t]=n},zV=zt,qV=zV("toStringTag"),l_={};l_[qV]="z";var im=String(l_)==="[object z]",HV=im,VV=rn,uu=Qo,WV=zt,KV=WV("toStringTag"),GV=Object,ZV=uu(function(){return arguments}())==="Arguments",YV=function(e,t){try{return e[t]}catch{}},Cs=HV?uu:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=YV(t=GV(e),KV))=="string"?n:ZV?uu(t):(r=uu(t))==="Object"&&VV(t.callee)?"Arguments":r},JV=Mt,XV=rn,am=Gh,QV=JV(Function.toString);XV(am.inspectSource)||(am.inspectSource=function(e){return QV(e)});var eW=am.inspectSource,tW=Mt,nW=Rt,u_=rn,rW=Cs,oW=xr,iW=eW,f_=function(){},d_=oW("Reflect","construct"),sm=/^\s*(?:class|function)\b/,aW=tW(sm.exec),sW=!sm.test(f_),Os=function(t){if(!u_(t))return!1;try{return d_(f_,[],t),!0}catch{return!1}},p_=function(t){if(!u_(t))return!1;switch(rW(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return sW||!!aW(sm,iW(t))}catch{return!0}};p_.sham=!0;var cm=!d_||nW(function(){var e;return Os(Os.call)||!Os(Object)||!Os(function(){e=!0})||e})?p_:Os,h_=ta,cW=cm,lW=qr,uW=zt,fW=uW("species"),m_=Array,dW=function(e){var t;return h_(e)&&(t=e.constructor,cW(t)&&(t===m_||h_(t.prototype))?t=void 0:lW(t)&&(t=t[fW],t===null&&(t=void 0))),t===void 0?m_:t},pW=dW,lm=function(e,t){return new(pW(e))(t===0?0:t)},hW=Rt,mW=zt,yW=zh,vW=mW("species"),fu=function(e){return yW>=51||!hW(function(){var t=[],n=t.constructor={};return n[vW]=function(){return{foo:1}},t[e](Boolean).foo!==1})},gW=at,bW=Rt,wW=ta,xW=qr,SW=Vr,EW=ei,y_=om,v_=ks,_W=lm,$W=fu,kW=zt,CW=zh,g_=kW("isConcatSpreadable"),OW=CW>=51||!bW(function(){var e=[];return e[g_]=!1,e.concat()[0]!==e}),TW=function(e){if(!xW(e))return!1;var t=e[g_];return t!==void 0?!!t:wW(e)},AW=!OW||!$W("concat");gW({target:"Array",proto:!0,arity:1,forced:AW},{concat:function(t){var n=SW(this),r=_W(n,0),o=0,i,a,s,c,l;for(i=-1,s=arguments.length;i<s;i++)if(l=i===-1?n:arguments[i],TW(l))for(c=EW(l),y_(o+c),a=0;a<c;a++,o++)a in l&&v_(r,o,l[a]);else y_(o+1),v_(r,o++,l);return r.length=o,r}});var PW=Cs,IW=String,Ts=function(e){if(PW(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return IW(e)},du={},RW=lu,MW=Math.max,NW=Math.min,um=function(e,t){var n=RW(e);return n<0?MW(n+t,0):NW(n,t)},DW=wr,jW=um,FW=ei,b_=function(e){return function(t,n,r){var o=DW(t),i=FW(o);if(i===0)return!e&&-1;var a=jW(r,i),s;if(e&&n!==n){for(;i>a;)if(s=o[a++],s!==s)return!0}else for(;i>a;a++)if((e||a in o)&&o[a]===n)return e||a||0;return!e&&-1}},w_={includes:b_(!0),indexOf:b_(!1)},pu={},LW=Mt,fm=On,BW=wr,UW=w_.indexOf,zW=pu,x_=LW([].push),S_=function(e,t){var n=BW(e),r=0,o=[],i;for(i in n)!fm(zW,i)&&fm(n,i)&&x_(o,i);for(;t.length>r;)fm(n,i=t[r++])&&(~UW(o,i)||x_(o,i));return o},dm=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],qW=S_,HW=dm,pm=Object.keys||function(t){return qW(t,HW)},VW=vn,WW=o_,KW=Yn,GW=_o,ZW=wr,YW=pm;du.f=VW&&!WW?Object.defineProperties:function(t,n){GW(t);for(var r=ZW(n),o=YW(n),i=o.length,a=0,s;i>a;)KW.f(t,s=o[a++],r[s]);return t};var JW=xr,XW=JW("document","documentElement"),QW=Ji,eK=Zh,E_=QW("keys"),hu=function(e){return E_[e]||(E_[e]=eK(e))},tK=_o,nK=du,__=dm,rK=pu,oK=XW,iK=e_,aK=hu,$_=">",k_="<",hm="prototype",mm="script",C_=aK("IE_PROTO"),ym=function(){},O_=function(e){return k_+mm+$_+e+k_+"/"+mm+$_},T_=function(e){e.write(O_("")),e.close();var t=e.parentWindow.Object;return e=null,t},sK=function(){var e=iK("iframe"),t="java"+mm+":",n;return e.style.display="none",oK.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(O_("document.F=Object")),n.close(),n.F},mu,yu=function(){try{mu=new ActiveXObject("htmlfile")}catch{}yu=typeof document<"u"?document.domain&&mu?T_(mu):sK():T_(mu);for(var e=__.length;e--;)delete yu[hm][__[e]];return yu()};rK[C_]=!0;var vm=Object.create||function(t,n){var r;return t!==null?(ym[hm]=tK(t),r=new ym,ym[hm]=null,r[C_]=t):r=yu(),n===void 0?r:nK.f(r,n)},vu={},cK=S_,lK=dm,uK=lK.concat("length","prototype");vu.f=Object.getOwnPropertyNames||function(t){return cK(t,uK)};var A_={},fK=Mt,gu=fK([].slice),dK=Qo,pK=wr,P_=vu.f,hK=gu,I_=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],mK=function(e){try{return P_(e)}catch{return hK(I_)}};A_.f=function(t){return I_&&dK(t)==="Window"?mK(t):P_(pK(t))};var bu={};bu.f=Object.getOwnPropertySymbols;var yK=cu,wu=function(e,t,n,r){return r&&r.enumerable?e[t]=n:yK(e,t,n),e},vK=Yn,gK=function(e,t,n){return vK.f(e,t,n)},As={},bK=zt;As.f=bK;var R_=Kt,wK=On,xK=As,SK=Yn.f,gt=function(e){var t=R_.Symbol||(R_.Symbol={});wK(t,e)||SK(t,e,{value:xK.f(e)})},EK=br,_K=xr,$K=zt,kK=wu,M_=function(){var e=_K("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=$K("toPrimitive");t&&!t[r]&&kK(t,r,function(o){return EK(n,this)},{arity:1})},CK=im,OK=Cs,TK=CK?{}.toString:function(){return"[object "+OK(this)+"]"},AK=im,PK=Yn.f,IK=cu,RK=On,MK=TK,NK=zt,N_=NK("toStringTag"),na=function(e,t,n,r){var o=n?e:e&&e.prototype;o&&(RK(o,N_)||PK(o,N_,{configurable:!0,value:t}),r&&!AK&&IK(o,"toString",MK))},DK=It,jK=rn,D_=DK.WeakMap,FK=jK(D_)&&/native code/.test(String(D_)),LK=FK,j_=It,BK=qr,UK=cu,gm=On,bm=Gh,zK=hu,qK=pu,F_="Object already initialized",wm=j_.TypeError,HK=j_.WeakMap,xu,Ps,Su,VK=function(e){return Su(e)?Ps(e):xu(e,{})},WK=function(e){return function(t){var n;if(!BK(t)||(n=Ps(t)).type!==e)throw new wm("Incompatible receiver, "+e+" required");return n}};if(LK||bm.state){var Sr=bm.state||(bm.state=new HK);Sr.get=Sr.get,Sr.has=Sr.has,Sr.set=Sr.set,xu=function(e,t){if(Sr.has(e))throw new wm(F_);return t.facade=e,Sr.set(e,t),t},Ps=function(e){return Sr.get(e)||{}},Su=function(e){return Sr.has(e)}}else{var ra=zK("state");qK[ra]=!0,xu=function(e,t){if(gm(e,ra))throw new wm(F_);return t.facade=e,UK(e,ra,t),t},Ps=function(e){return gm(e,ra)?e[ra]:{}},Su=function(e){return gm(e,ra)}}var xm={set:xu,get:Ps,has:Su,enforce:VK,getterFor:WK},KK=Qh,GK=Mt,ZK=ME,YK=Vr,JK=ei,XK=lm,L_=GK([].push),$o=function(e){var t=e===1,n=e===2,r=e===3,o=e===4,i=e===6,a=e===7,s=e===5||i;return function(c,l,u,f){for(var p=YK(c),d=ZK(p),h=JK(d),m=KK(l,u),v=0,y=f||XK,g=t?y(c,h):n||a?y(c,0):void 0,b,k;h>v;v++)if((s||v in d)&&(b=d[v],k=m(b,v,p),e))if(t)g[v]=k;else if(k)switch(e){case 3:return!0;case 5:return b;case 6:return v;case 2:L_(g,b)}else switch(e){case 4:return!1;case 7:L_(g,b)}return i?-1:r||o?o:g}},Sm={forEach:$o(0),map:$o(1),filter:$o(2),some:$o(3),every:$o(4),find:$o(5),findIndex:$o(6),filterReject:$o(7)},Eu=at,Is=It,Em=br,QK=Mt,oa=vn,ia=Yi,eG=Rt,qt=On,tG=Hr,_m=_o,_u=wr,$m=Jh,nG=Ts,km=Ss,aa=vm,B_=pm,rG=vu,U_=A_,oG=bu,z_=xs,q_=Yn,iG=du,H_=Mh,V_=wu,aG=gK,Cm=Ji,sG=hu,W_=pu,K_=Zh,cG=zt,lG=As,uG=gt,fG=M_,dG=na,G_=xm,$u=Sm.forEach,gn=sG("hidden"),ku="Symbol",Rs="prototype",pG=G_.set,Z_=G_.getterFor(ku),Jn=Object[Rs],ti=Is.Symbol,Ms=ti&&ti[Rs],hG=Is.RangeError,mG=Is.TypeError,Om=Is.QObject,Y_=z_.f,ni=q_.f,J_=U_.f,yG=H_.f,X_=QK([].push),Wr=Cm("symbols"),Ns=Cm("op-symbols"),vG=Cm("wks"),Tm=!Om||!Om[Rs]||!Om[Rs].findChild,Q_=function(e,t,n){var r=Y_(Jn,t);r&&delete Jn[t],ni(e,t,n),r&&e!==Jn&&ni(Jn,t,r)},Am=oa&&eG(function(){return aa(ni({},"a",{get:function(){return ni(this,"a",{value:7}).a}})).a!==7})?Q_:ni,Pm=function(e,t){var n=Wr[e]=aa(Ms);return pG(n,{type:ku,tag:e,description:t}),oa||(n.description=t),n},Cu=function(t,n,r){t===Jn&&Cu(Ns,n,r),_m(t);var o=$m(n);return _m(r),qt(Wr,o)?(r.enumerable?(qt(t,gn)&&t[gn][o]&&(t[gn][o]=!1),r=aa(r,{enumerable:km(0,!1)})):(qt(t,gn)||ni(t,gn,km(1,aa(null))),t[gn][o]=!0),Am(t,o,r)):ni(t,o,r)},Im=function(t,n){_m(t);var r=_u(n),o=B_(r).concat(r$(r));return $u(o,function(i){(!oa||Em(e$,r,i))&&Cu(t,i,r[i])}),t},gG=function(t,n){return n===void 0?aa(t):Im(aa(t),n)},e$=function(t){var n=$m(t),r=Em(yG,this,n);return this===Jn&&qt(Wr,n)&&!qt(Ns,n)?!1:r||!qt(this,n)||!qt(Wr,n)||qt(this,gn)&&this[gn][n]?r:!0},t$=function(t,n){var r=_u(t),o=$m(n);if(!(r===Jn&&qt(Wr,o)&&!qt(Ns,o))){var i=Y_(r,o);return i&&qt(Wr,o)&&!(qt(r,gn)&&r[gn][o])&&(i.enumerable=!0),i}},n$=function(t){var n=J_(_u(t)),r=[];return $u(n,function(o){!qt(Wr,o)&&!qt(W_,o)&&X_(r,o)}),r},r$=function(e){var t=e===Jn,n=J_(t?Ns:_u(e)),r=[];return $u(n,function(o){qt(Wr,o)&&(!t||qt(Jn,o))&&X_(r,Wr[o])}),r};ia||(ti=function(){if(tG(Ms,this))throw new mG("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:nG(arguments[0]),n=K_(t),r=function(o){var i=this===void 0?Is:this;i===Jn&&Em(r,Ns,o),qt(i,gn)&&qt(i[gn],n)&&(i[gn][n]=!1);var a=km(1,o);try{Am(i,n,a)}catch(s){if(!(s instanceof hG))throw s;Q_(i,n,a)}};return oa&&Tm&&Am(Jn,n,{configurable:!0,set:r}),Pm(n,t)},Ms=ti[Rs],V_(Ms,"toString",function(){return Z_(this).tag}),V_(ti,"withoutSetter",function(e){return Pm(K_(e),e)}),H_.f=e$,q_.f=Cu,iG.f=Im,z_.f=t$,rG.f=U_.f=n$,oG.f=r$,lG.f=function(e){return Pm(cG(e),e)},oa&&aG(Ms,"description",{configurable:!0,get:function(){return Z_(this).description}})),Eu({global:!0,constructor:!0,wrap:!0,forced:!ia,sham:!ia},{Symbol:ti}),$u(B_(vG),function(e){uG(e)}),Eu({target:ku,stat:!0,forced:!ia},{useSetter:function(){Tm=!0},useSimple:function(){Tm=!1}}),Eu({target:"Object",stat:!0,forced:!ia,sham:!oa},{create:gG,defineProperty:Cu,defineProperties:Im,getOwnPropertyDescriptor:t$}),Eu({target:"Object",stat:!0,forced:!ia},{getOwnPropertyNames:n$}),fG(),dG(ti,ku),W_[gn]=!0;var bG=Yi,o$=bG&&!!Symbol.for&&!!Symbol.keyFor,wG=at,xG=xr,SG=On,EG=Ts,i$=Ji,_G=o$,Rm=i$("string-to-symbol-registry"),$G=i$("symbol-to-string-registry");wG({target:"Symbol",stat:!0,forced:!_G},{for:function(e){var t=EG(e);if(SG(Rm,t))return Rm[t];var n=xG("Symbol")(t);return Rm[t]=n,$G[n]=t,n}});var kG=at,CG=On,OG=Es,TG=au,AG=Ji,PG=o$,a$=AG("symbol-to-string-registry");kG({target:"Symbol",stat:!0,forced:!PG},{keyFor:function(t){if(!OG(t))throw new TypeError(TG(t)+" is not a symbol");if(CG(a$,t))return a$[t]}});var IG=Mt,s$=ta,RG=rn,c$=Qo,MG=Ts,l$=IG([].push),NG=function(e){if(RG(e))return e;if(s$(e)){for(var t=e.length,n=[],r=0;r<t;r++){var o=e[r];typeof o=="string"?l$(n,o):(typeof o=="number"||c$(o)==="Number"||c$(o)==="String")&&l$(n,MG(o))}var i=n.length,a=!0;return function(s,c){if(a)return a=!1,c;if(s$(this))return c;for(var l=0;l<i;l++)if(n[l]===s)return c}}},DG=at,u$=xr,f$=Ah,jG=br,Ds=Mt,d$=Rt,p$=rn,h$=Es,m$=gu,FG=NG,LG=Yi,BG=String,ko=u$("JSON","stringify"),Ou=Ds(/./.exec),y$=Ds("".charAt),UG=Ds("".charCodeAt),zG=Ds("".replace),qG=Ds(1 .toString),HG=/[\uD800-\uDFFF]/g,v$=/^[\uD800-\uDBFF]$/,g$=/^[\uDC00-\uDFFF]$/,b$=!LG||d$(function(){var e=u$("Symbol")("stringify detection");return ko([e])!=="[null]"||ko({a:e})!=="{}"||ko(Object(e))!=="{}"}),w$=d$(function(){return ko("\uDF06\uD834")!=='"\\udf06\\ud834"'||ko("\uDEAD")!=='"\\udead"'}),VG=function(e,t){var n=m$(arguments),r=FG(t);if(!(!p$(r)&&(e===void 0||h$(e))))return n[1]=function(o,i){if(p$(r)&&(i=jG(r,this,BG(o),i)),!h$(i))return i},f$(ko,null,n)},WG=function(e,t,n){var r=y$(n,t-1),o=y$(n,t+1);return Ou(v$,e)&&!Ou(g$,o)||Ou(g$,e)&&!Ou(v$,r)?"\\u"+qG(UG(e,0),16):e};ko&&DG({target:"JSON",stat:!0,arity:3,forced:b$||w$},{stringify:function(t,n,r){var o=m$(arguments),i=f$(b$?VG:ko,null,o);return w$&&typeof i=="string"?zG(i,HG,WG):i}});var KG=at,GG=Yi,ZG=Rt,x$=bu,YG=Vr,JG=!GG||ZG(function(){x$.f(1)});KG({target:"Object",stat:!0,forced:JG},{getOwnPropertySymbols:function(t){var n=x$.f;return n?n(YG(t)):[]}});var XG=gt;XG("asyncIterator");var QG=gt;QG("hasInstance");var eZ=gt;eZ("isConcatSpreadable");var tZ=gt;tZ("iterator");var nZ=gt;nZ("match");var rZ=gt;rZ("matchAll");var oZ=gt;oZ("replace");var iZ=gt;iZ("search");var aZ=gt;aZ("species");var sZ=gt;sZ("split");var cZ=gt,lZ=M_;cZ("toPrimitive"),lZ();var uZ=xr,fZ=gt,dZ=na;fZ("toStringTag"),dZ(uZ("Symbol"),"Symbol");var pZ=gt;pZ("unscopables");var hZ=It,mZ=na;mZ(hZ.JSON,"JSON",!0);var yZ=Kt,vZ=yZ.Symbol,sa={},Mm=vn,gZ=On,S$=Function.prototype,bZ=Mm&&Object.getOwnPropertyDescriptor,Nm=gZ(S$,"name"),wZ=Nm&&(function(){}).name==="something",xZ=Nm&&(!Mm||Mm&&bZ(S$,"name").configurable),SZ={EXISTS:Nm,PROPER:wZ,CONFIGURABLE:xZ},EZ=Rt,_Z=!EZ(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),$Z=On,kZ=rn,CZ=Vr,OZ=hu,TZ=_Z,E$=OZ("IE_PROTO"),Dm=Object,AZ=Dm.prototype,_$=TZ?Dm.getPrototypeOf:function(e){var t=CZ(e);if($Z(t,E$))return t[E$];var n=t.constructor;return kZ(n)&&t instanceof n?n.prototype:t instanceof Dm?AZ:null},PZ=Rt,IZ=rn,RZ=qr,MZ=vm,$$=_$,NZ=wu,DZ=zt,jm=DZ("iterator"),k$=!1,Kr,Fm,Lm;[].keys&&(Lm=[].keys(),"next"in Lm?(Fm=$$($$(Lm)),Fm!==Object.prototype&&(Kr=Fm)):k$=!0);var jZ=!RZ(Kr)||PZ(function(){var e={};return Kr[jm].call(e)!==e});jZ?Kr={}:Kr=MZ(Kr),IZ(Kr[jm])||NZ(Kr,jm,function(){return this});var C$={IteratorPrototype:Kr,BUGGY_SAFARI_ITERATORS:k$},FZ=C$.IteratorPrototype,LZ=vm,BZ=Ss,UZ=na,zZ=sa,qZ=function(){return this},HZ=function(e,t,n,r){var o=t+" Iterator";return e.prototype=LZ(FZ,{next:BZ(+!r,n)}),UZ(e,o,!1,!0),zZ[o]=qZ,e},VZ=at,WZ=br,O$=SZ,KZ=HZ,GZ=_$,ZZ=na,T$=wu,YZ=zt,A$=sa,P$=C$,JZ=O$.PROPER;O$.CONFIGURABLE,P$.IteratorPrototype;var Tu=P$.BUGGY_SAFARI_ITERATORS,Bm=YZ("iterator"),I$="keys",Au="values",R$="entries",XZ=function(){return this},M$=function(e,t,n,r,o,i,a){KZ(n,t,r);var s=function(y){if(y===o&&p)return p;if(!Tu&&y&&y in u)return u[y];switch(y){case I$:return function(){return new n(this,y)};case Au:return function(){return new n(this,y)};case R$:return function(){return new n(this,y)}}return function(){return new n(this)}},c=t+" Iterator",l=!1,u=e.prototype,f=u[Bm]||u["@@iterator"]||o&&u[o],p=!Tu&&f||s(o),d=t==="Array"&&u.entries||f,h,m,v;if(d&&(h=GZ(d.call(new e)),h!==Object.prototype&&h.next&&(ZZ(h,c,!0,!0),A$[c]=XZ)),JZ&&o===Au&&f&&f.name!==Au&&(l=!0,p=function(){return WZ(f,this)}),o)if(m={values:s(Au),keys:i?p:s(I$),entries:s(R$)},a)for(v in m)(Tu||l||!(v in u))&&T$(u,v,m[v]);else VZ({target:t,proto:!0,forced:Tu||l},m);return a&&u[Bm]!==p&&T$(u,Bm,p,{name:o}),A$[t]=p,m},N$=function(e,t){return{value:e,done:t}},QZ=wr,D$=sa,j$=xm;Yn.f;var eY=M$,Pu=N$,F$="Array Iterator",tY=j$.set,nY=j$.getterFor(F$);eY(Array,"Array",function(e,t){tY(this,{type:F$,target:QZ(e),index:0,kind:t})},function(){var e=nY(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,Pu(void 0,!0);switch(e.kind){case"keys":return Pu(n,!1);case"values":return Pu(t[n],!1)}return Pu([n,t[n]],!1)},"values"),D$.Arguments=D$.Array;var rY={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},oY=rY,iY=It,aY=na,L$=sa;for(var Um in oY)aY(iY[Um],Um),L$[Um]=L$.Array;var sY=vZ,cY=sY,lY=zt,uY=Yn.f,B$=lY("metadata"),U$=Function.prototype;U$[B$]===void 0&&uY(U$,B$,{value:null});var fY=gt;fY("asyncDispose");var dY=gt;dY("dispose");var pY=gt;pY("metadata");var hY=cY,mY=hY,yY=xr,vY=Mt,zm=yY("Symbol"),gY=zm.keyFor,bY=vY(zm.prototype.valueOf),z$=zm.isRegisteredSymbol||function(t){try{return gY(bY(t))!==void 0}catch{return!1}},wY=at,xY=z$;wY({target:"Symbol",stat:!0},{isRegisteredSymbol:xY});for(var SY=Ji,q$=xr,EY=Mt,_Y=Es,$Y=zt,Iu=q$("Symbol"),H$=Iu.isWellKnownSymbol,V$=q$("Object","getOwnPropertyNames"),kY=EY(Iu.prototype.valueOf),W$=SY("wks"),qm=0,K$=V$(Iu),CY=K$.length;qm<CY;qm++)try{var G$=K$[qm];_Y(Iu[G$])&&$Y(G$)}catch{}var Z$=function(t){if(H$&&H$(t))return!0;try{for(var n=kY(t),r=0,o=V$(W$),i=o.length;r<i;r++)if(W$[o[r]]==n)return!0}catch{}return!1},OY=at,TY=Z$;OY({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:TY});var AY=gt;AY("customMatcher");var PY=gt;PY("observable");var IY=at,RY=z$;IY({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:RY});var MY=at,NY=Z$;MY({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:NY});var DY=gt;DY("matcher");var jY=gt;jY("metadataKey");var FY=gt;FY("patternMatch");var LY=gt;LY("replaceAll");var BY=mY,UY=BY,zY=UY;const ca=Ue(zY);var Hm=Mt,qY=lu,HY=Ts,VY=jh,WY=Hm("".charAt),Y$=Hm("".charCodeAt),KY=Hm("".slice),J$=function(e){return function(t,n){var r=HY(VY(t)),o=qY(n),i=r.length,a,s;return o<0||o>=i?e?"":void 0:(a=Y$(r,o),a<55296||a>56319||o+1===i||(s=Y$(r,o+1))<56320||s>57343?e?WY(r,o):a:e?KY(r,o,o+2):(a-55296<<10)+(s-56320)+65536)}},GY={codeAt:J$(!1),charAt:J$(!0)},ZY=GY.charAt,YY=Ts,X$=xm,JY=M$,Q$=N$,ek="String Iterator",XY=X$.set,QY=X$.getterFor(ek);JY(String,"String",function(e){XY(this,{type:ek,string:YY(e),index:0})},function(){var t=QY(this),n=t.string,r=t.index,o;return r>=n.length?Q$(void 0,!0):(o=ZY(n,r),t.index+=o.length,Q$(o,!1))});var eJ=Cs,tk=Hh,tJ=Dh,nJ=sa,rJ=zt,oJ=rJ("iterator"),Vm=function(e){if(!tJ(e))return tk(e,oJ)||tk(e,"@@iterator")||nJ[eJ(e)]},iJ=Vm,aJ=iJ,sJ=aJ,cJ=sJ,lJ=cJ,uJ=lJ,fJ=uJ,dJ=fJ,pJ=dJ;const nk=Ue(pJ);var hJ=vn,mJ=ta,yJ=TypeError,vJ=Object.getOwnPropertyDescriptor,gJ=hJ&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),rk=gJ?function(e,t){if(mJ(e)&&!vJ(e,"length").writable)throw new yJ("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},bJ=at,wJ=Vr,xJ=ei,SJ=rk,EJ=om,_J=Rt,$J=_J(function(){return[].push.call({length:4294967296},1)!==4294967297}),kJ=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},CJ=$J||!kJ();bJ({target:"Array",proto:!0,arity:1,forced:CJ},{push:function(t){var n=wJ(this),r=xJ(n),o=arguments.length;EJ(r+o);for(var i=0;i<o;i++)n[r]=arguments[i],r++;return SJ(n,r),r}});var OJ=It,TJ=Kt,ri=function(e,t){var n=TJ[e+"Prototype"],r=n&&n[t];if(r)return r;var o=OJ[e],i=o&&o.prototype;return i&&i[t]},AJ=ri,PJ=AJ("Array","push"),IJ=Hr,RJ=PJ,Wm=Array.prototype,MJ=function(e){var t=e.push;return e===Wm||IJ(Wm,e)&&t===Wm.push?RJ:t},NJ=MJ,DJ=NJ,jJ=DJ,FJ=jJ,LJ=FJ,BJ=LJ,UJ=BJ;const zJ=Ue(UJ);function qJ(e,t){var n=e==null?null:typeof ca<"u"&&nk(e)||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(zJ(s).call(s,r.value),s.length!==t);c=!0);}catch(u){l=!0,o=u}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}var HJ=at,ok=ta,VJ=cm,WJ=qr,ik=um,KJ=ei,GJ=wr,ZJ=ks,YJ=zt,JJ=fu,XJ=gu,QJ=JJ("slice"),eX=YJ("species"),Km=Array,tX=Math.max;HJ({target:"Array",proto:!0,forced:!QJ},{slice:function(t,n){var r=GJ(this),o=KJ(r),i=ik(t,o),a=ik(n===void 0?o:n,o),s,c,l;if(ok(r)&&(s=r.constructor,VJ(s)&&(s===Km||ok(s.prototype))?s=void 0:WJ(s)&&(s=s[eX],s===null&&(s=void 0)),s===Km||s===void 0))return XJ(r,i,a);for(c=new(s===void 0?Km:s)(tX(a-i,0)),l=0;i<a;i++,l++)i in r&&ZJ(c,l,r[i]);return c.length=l,c}});var nX=ri,rX=nX("Array","slice"),oX=Hr,iX=rX,Gm=Array.prototype,aX=function(e){var t=e.slice;return e===Gm||oX(Gm,e)&&t===Gm.slice?iX:t},sX=aX,cX=sX,lX=cX,uX=lX,fX=uX,dX=fX,pX=dX;const hX=Ue(pX);var mX=br,ak=_o,yX=Hh,vX=function(e,t,n){var r,o;ak(e);try{if(r=yX(e,"return"),!r){if(t==="throw")throw n;return n}r=mX(r,e)}catch(i){o=!0,r=i}if(t==="throw")throw n;if(o)throw r;return ak(r),n},gX=_o,bX=vX,wX=function(e,t,n,r){try{return r?t(gX(n)[0],n[1]):t(n)}catch(o){bX(e,"throw",o)}},xX=zt,SX=sa,EX=xX("iterator"),_X=Array.prototype,$X=function(e){return e!==void 0&&(SX.Array===e||_X[EX]===e)},kX=br,CX=qh,OX=_o,TX=au,AX=Vm,PX=TypeError,IX=function(e,t){var n=arguments.length<2?AX(e):t;if(CX(n))return OX(kX(n,e));throw new PX(TX(e)+" is not iterable")},RX=Qh,MX=br,NX=Vr,DX=wX,jX=$X,FX=cm,LX=ei,sk=ks,BX=IX,UX=Vm,ck=Array,zX=function(t){var n=NX(t),r=FX(this),o=arguments.length,i=o>1?arguments[1]:void 0,a=i!==void 0;a&&(i=RX(i,o>2?arguments[2]:void 0));var s=UX(n),c=0,l,u,f,p,d,h;if(s&&!(this===ck&&jX(s)))for(u=r?new this:[],p=BX(n,s),d=p.next;!(f=MX(d,p)).done;c++)h=a?DX(p,i,[f.value,c],!0):f.value,sk(u,c,h);else for(l=LX(n),u=r?new this(l):ck(l);l>c;c++)h=a?i(n[c],c):n[c],sk(u,c,h);return u.length=c,u},qX=zt,lk=qX("iterator"),uk=!1;try{var HX=0,fk={next:function(){return{done:!!HX++}},return:function(){uk=!0}};fk[lk]=function(){return this},Array.from(fk,function(){throw 2})}catch{}var VX=function(e,t){try{if(!t&&!uk)return!1}catch{return!1}var n=!1;try{var r={};r[lk]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},WX=at,KX=zX,GX=VX,ZX=!GX(function(e){Array.from(e)});WX({target:"Array",stat:!0,forced:ZX},{from:KX});var YX=Kt,JX=YX.Array.from,XX=JX,QX=XX,eQ=QX,tQ=eQ,nQ=tQ,rQ=nQ,oQ=rQ;const dk=Ue(oQ);function Zm(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function pk(e,t){if(e){var n;if(typeof e=="string")return Zm(e,t);var r=hX(n={}.toString.call(e)).call(n,8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?dk(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Zm(e,t):void 0}}function iQ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
325
325
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Er(e,t){return OV(e)||qJ(e,t)||pk(e,t)||iQ()}var hk={exports:{}};/*!
|
|
326
326
|
Copyright (c) 2018 Jed Watson.
|
|
327
327
|
Licensed under the MIT License (MIT), see
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { Theme } from './theme';
|
|
2
2
|
import { target } from '../adapters';
|
|
3
3
|
export type BlockStyles = NonNullable<Theme['message']>['blocks'];
|
|
4
|
-
export type
|
|
5
|
-
export type
|
|
6
|
-
export type
|
|
7
|
-
export type
|
|
8
|
-
export type
|
|
9
|
-
export type
|
|
10
|
-
export type
|
|
11
|
-
export type
|
|
12
|
-
export type
|
|
13
|
-
export type
|
|
14
|
-
export type
|
|
15
|
-
export type
|
|
4
|
+
export type CommonBlockProps = Pick<MessageObject, 'direction' | 'timestamp' | 'sender'>;
|
|
5
|
+
export type AudioBlock = target.AudioMessage & CommonBlockProps;
|
|
6
|
+
export type BubbleBlock = target.BubbleMessage & CommonBlockProps;
|
|
7
|
+
export type ButtonBlock = target.ButtonMessage & CommonBlockProps;
|
|
8
|
+
export type CarouselBlock = target.CarouselMessage & CommonBlockProps;
|
|
9
|
+
export type ColumnBlock = target.ColumnMessage & CommonBlockProps;
|
|
10
|
+
export type DropdownBlock = target.DropdownMessage & CommonBlockProps;
|
|
11
|
+
export type FileBlock = target.FileMessage & CommonBlockProps;
|
|
12
|
+
export type ImageBlock = target.ImageMessage & CommonBlockProps;
|
|
13
|
+
export type LocationBlock = target.LocationMessage & CommonBlockProps;
|
|
14
|
+
export type RowBlock = target.RowMessage & CommonBlockProps;
|
|
15
|
+
export type TextBlock = target.TextMessage & CommonBlockProps;
|
|
16
|
+
export type VideoBlock = target.VideoMessage & CommonBlockProps;
|
|
16
17
|
export type BlockObject = target.Message;
|
|
17
18
|
export type BlockType = BlockObject['type'];
|
|
18
19
|
export type Sender = {
|
|
@@ -28,7 +29,7 @@ export type MessageObject<T = BlockObject> = {
|
|
|
28
29
|
block: T;
|
|
29
30
|
};
|
|
30
31
|
export type BlockObjects = {
|
|
31
|
-
[T in BlockType]: Extract<BlockObject, {
|
|
32
|
+
[T in BlockType]: Extract<BlockObject & CommonBlockProps, {
|
|
32
33
|
type: T;
|
|
33
34
|
}>;
|
|
34
35
|
};
|