@botpress/webchat 2.1.6 → 2.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as t, B as r, C as m, f as c, e as i, h as n, F as h, H as p, j as d, L as S, M as l, k as u, l as C, n as P, R as b, U as g, W as v, o as y, i as M, y as f, z as T, I as k, J as B, t as I, w as W, s as F, p as H, b as L, K as R, q as w, v as x, m as A, E as U, x as _, D as j, u as q, d as z, G as D } from "./index-
|
|
1
|
+
import { A as t, B as r, C as m, f as c, e as i, h as n, F as h, H as p, j as d, L as S, M as l, k as u, l as C, n as P, R as b, U as g, W as v, o as y, i as M, y as f, z as T, I as k, J as B, t as I, w as W, s as F, p as H, b as L, K as R, q as w, v as x, m as A, E as U, x as _, D as j, u as q, d as z, G as D } from "./index-91e34028.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-dom";
|
|
4
4
|
export {
|
package/dist/index.umd.cjs
CHANGED
|
@@ -415,10 +415,10 @@ to {
|
|
|
415
415
|
[zustand devtools middleware] Unsupported __setState action format.
|
|
416
416
|
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
|
|
417
417
|
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|
|
418
|
-
`);const b=_.state[s];if(b==null)return;JSON.stringify(i.getState())!==JSON.stringify(b)&&h(b);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(_)});case"DISPATCH":switch(v.payload.type){case"RESET":return h(y),s===void 0?d==null?void 0:d.init(i.getState()):d==null?void 0:d.init(hm(l.name));case"COMMIT":if(s===void 0){d==null||d.init(i.getState());return}return d==null?void 0:d.init(hm(l.name));case"ROLLBACK":return d_(v.state,_=>{if(s===void 0){h(_),d==null||d.init(i.getState());return}h(_[s]),d==null||d.init(hm(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return d_(v.state,_=>{if(s===void 0){h(_);return}JSON.stringify(i.getState())!==JSON.stringify(_[s])&&h(_[s])});case"IMPORT_STATE":{const{nextLiftedState:_}=v.payload,b=(w=_.computedStates.slice(-1)[0])==null?void 0:w.state;if(!b)return;h(s===void 0?b:b[s]),d==null||d.send(null,_);return}case"PAUSE_RECORDING":return m=!m}return}}),y},d_=(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 Yve(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var o;const a=l=>l===null?null:JSON.parse(l,t==null?void 0:t.reviver),s=(o=n.getItem(i))!=null?o:null;return s instanceof Promise?s.then(a):a(s)},setItem:(i,o)=>n.setItem(i,JSON.stringify(o,t==null?void 0:t.replacer)),removeItem:i=>n.removeItem(i)}}const lf=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return lf(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return lf(r)(n)}}}},Jve=(e,t)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:w=>w,version:0,merge:(w,_)=>({..._,...w}),...t},a=!1;const s=new Set,l=new Set;let c;try{c=o.getStorage()}catch{}if(!c)return e((...w)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...w)},r,i);const d=lf(o.serialize),p=()=>{const w=o.partialize({...r()});let _;const b=d({state:w,version:o.version}).then(S=>c.setItem(o.name,S)).catch(S=>{_=S});if(_)throw _;return b},m=i.setState;i.setState=(w,_)=>{m(w,_),p()};const h=e((...w)=>{n(...w),p()},r,i);let y;const v=()=>{var w;if(!c)return;a=!1,s.forEach(b=>b(r()));const _=((w=o.onRehydrateStorage)==null?void 0:w.call(o,r()))||void 0;return lf(c.getItem.bind(c))(o.name).then(b=>{if(b)return o.deserialize(b)}).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==o.version){if(o.migrate)return o.migrate(b.state,b.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return b.state}).then(b=>{var S;return y=o.merge(b,(S=r())!=null?S:h),n(y,!0),p()}).then(()=>{_==null||_(y,void 0),a=!0,l.forEach(b=>b(y))}).catch(b=>{_==null||_(void 0,b)})};return i.persist={setOptions:w=>{o={...o,...w},w.getStorage&&(c=w.getStorage())},clearStorage:()=>{c==null||c.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>v(),hasHydrated:()=>a,onHydrate:w=>(s.add(w),()=>{s.delete(w)}),onFinishHydration:w=>(l.add(w),()=>{l.delete(w)})},v(),y||h},Xve=(e,t)=>(n,r,i)=>{let o={storage:Yve(()=>localStorage),partialize:v=>v,version:0,merge:(v,w)=>({...w,...v}),...t},a=!1;const s=new Set,l=new Set;let c=o.storage;if(!c)return e((...v)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...v)},r,i);const d=()=>{const v=o.partialize({...r()});return c.setItem(o.name,{state:v,version:o.version})},p=i.setState;i.setState=(v,w)=>{p(v,w),d()};const m=e((...v)=>{n(...v),d()},r,i);let h;const y=()=>{var v,w;if(!c)return;a=!1,s.forEach(b=>{var S;return b((S=r())!=null?S:m)});const _=((w=o.onRehydrateStorage)==null?void 0:w.call(o,(v=r())!=null?v:m))||void 0;return lf(c.getItem.bind(c))(o.name).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==o.version){if(o.migrate)return o.migrate(b.state,b.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return b.state}).then(b=>{var S;return h=o.merge(b,(S=r())!=null?S:m),n(h,!0),d()}).then(()=>{_==null||_(h,void 0),h=r(),a=!0,l.forEach(b=>b(h))}).catch(b=>{_==null||_(void 0,b)})};return i.persist={setOptions:v=>{o={...o,...v},v.storage&&(c=v.storage)},clearStorage:()=>{c==null||c.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>y(),hasHydrated:()=>a,onHydrate:v=>(s.add(v),()=>{s.delete(v)}),onFinishHydration:v=>(l.add(v),()=>{l.delete(v)})},o.skipHydration||y(),h||m},Qve=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?Jve(e,t):Xve(e,t),Vo=Kve()(v2(Qve((e,t)=>({messageHistory:{},addMessageToHistory:({userId:n,message:r})=>e(i=>({...i,messageHistory:{...i.messageHistory,[n]:[r,...(i.messageHistory[n]??[]).slice(0,100)]}})),clientMode:"",setClientMode:n=>{const{clearAll:r,clientMode:i}=t();i!==n&&r(),e(o=>({...o,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"}))),b2=C.createContext(null),ebe=e=>{const t={theme:{},configuration:{},messages:[],connected:!0,disableComposer:!1,renderers:{},isReadOnly:!1,userData:{},closeWindow:()=>{},messageContainerRef:{current:null},isTyping:!1,allowFileUpload:!1,conversationId:void 0,disableRestartConversation:!1},n=e==null?void 0:e.client,r=e==null?void 0:e.conversationId,i=Vo.getState().setClientMode,o=Vo.getState().setConversationId;return n&&i(n.mode),C.useEffect(()=>{r&&o(r)},[r]),l2()(v2((a,s)=>{const l=p=>a(m=>({...m,messages:[...m.messages??[],p]})),c=p=>a(m=>({...m,messages:p})),d=Vo.getState().addMessageToHistory;return{...t,...e,eventEmitter:Ire,client:n,sendFile:p=>s().client.sendFile(p),sendTextMessage:async p=>{const m=s().client;m&&await m.sendMessage(p),l({direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:"bubble",block:{type:"text",text:p}}}),m!=null&&m.userId&&d({message:p,userId:m.userId})},on:(p,m)=>{const h=s().client;return h?h.on(p,m):()=>{}},getClientId:()=>{var p;return(p=s().client)==null?void 0:p.clientId},setState:p=>a(m=>({...m,...p})),setTheme:p=>a(m=>({...m,theme:p})),setMessages:c,setConfiguration:p=>a(m=>({...m,configuration:p})),setIsTyping:p=>a(m=>({...m,isTyping:p})),addMessage:l,setConnected:p=>a(m=>({...m,connected:p})),restartConversation:async()=>{const p=s().client,m=s().setMessages;p&&(await p.newConversation(),m([]))}}},{name:"webchatStore"}))};function it(e){const t=C.useContext(b2);if(!t)throw new Error("Missing WebchatContext.Provider in the tree");return y2(t,e)}const tbe=({text:e,buttonValue:t,type:n,styles:r,variant:i,groupId:o,reusable:a,...s})=>{const l=it(b=>b.eventEmitter),c=it(b=>b.sendTextMessage),d=it(b=>b.isReadOnly),[p,m]=C.useState(!1),[h,y]=C.useState(!1),[v,w]=C.useState(!1);C.useEffect(()=>{if(o)return l.on(`button-group-${o}-click`,()=>{y(!0),a||w(!0)})},[l,o,a]);function _(){o&&l.emit(`button-group-${o}-click`),m(!0),a||w(!0),i!=="link"&&c(t)}return X.jsx(nbe,{...s,variant:i,onClick:_,disabled:v||d,"data-activated":p?"":void 0,"data-group-activated":h?"":void 0,"data-type":i,value:t,...r==null?void 0:r[n],children:e})},nbe=e=>{if(e.variant==="link"){const{value:r,variant:i,...o}=e;return X.jsx("a",{...o,href:r,target:"_blank",rel:"noopener noreferrer"})}const{variant:t,...n}=e;return X.jsx("button",{type:"button",...n})},rbe=C.forwardRef(({block:e,styles:t,type:n,...r},i)=>X.jsx("div",{...r,...t==null?void 0:t[n],ref:i,children:X.jsx(fl,{styles:t,block:e})})),_2=C.createContext(null);function w2(){const e=C.useContext(_2);if(!e)throw new Error("useComposerContext must be used within a Message");return e}const x2=C.createContext(null);function ibe(){const e=C.useContext(x2);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const S2=C.createContext(null);function E2(){const e=C.useContext(S2);if(!e)throw new Error("useModalContext must be used within a ModalProvider");return e}C.createContext(null);const obe=C.forwardRef(({url:e,type:t,styles:n,orientation:r="auto",...i},o)=>{var m,h;const a=C.useId(),{setIsLoading:s}=ibe(),[l,c]=C.useState(r),[d,p]=C.useState(!1);return C.useLayoutEffect(()=>{s(y=>[...y,a])},[]),C.useEffect(()=>{e&&l==="auto"&&sge(e).then(({width:y,height:v})=>{c(abe(y,v)),s(w=>w.filter(_=>_!==a))})},[e]),X.jsxs(X.Fragment,{children:[d?null:X.jsx("div",{"data-orientation":l,...(m=n==null?void 0:n[t])==null?void 0:m.placeholder}),X.jsx("img",{"data-orientation":l,"data-loaded":d,...i,...(h=n==null?void 0:n[t])==null?void 0:h.image,src:e,alt:"",ref:o,loading:"lazy",onLoad:()=>{p(!0)}})]})});function abe(e,t){const n={square:1,portrait:.75,landscape:1.3333333333333333},r=e/t;return Object.keys(n).reduce((o,a)=>Math.abs(n[a]-r)<Math.abs(n[o]-r)?a:o)}const sbe=C.forwardRef(({url:e,type:t,styles:n,...r},i)=>X.jsx("div",{children:X.jsx("video",{...r,controls:!0,src:e,...n==null?void 0:n[t],ref:i})})),ube=C.forwardRef(({url:e,type:t,styles:n,...r},i)=>X.jsx("div",{children:X.jsx("audio",{...r,controls:!0,src:e,...n==null?void 0:n[t],ref:i})}));function lbe({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M10 3a.75.75 0 01.75.75v10.638l3.96-4.158a.75.75 0 111.08 1.04l-5.25 5.5a.75.75 0 01-1.08 0l-5.25-5.5a.75.75 0 111.08-1.04l3.96 4.158V3.75A.75.75 0 0110 3z",clipRule:"evenodd"}))}const cbe=z.forwardRef(lbe);function fbe({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M15.312 11.424a5.5 5.5 0 01-9.201 2.466l-.312-.311h2.433a.75.75 0 000-1.5H3.989a.75.75 0 00-.75.75v4.242a.75.75 0 001.5 0v-2.43l.31.31a7 7 0 0011.712-3.138.75.75 0 00-1.449-.39zm1.23-3.723a.75.75 0 00.219-.53V2.929a.75.75 0 00-1.5 0V5.36l-.31-.31A7 7 0 003.239 8.188a.75.75 0 101.448.389A5.5 5.5 0 0113.89 6.11l.311.31h-2.432a.75.75 0 000 1.5h4.243a.75.75 0 00.53-.219z",clipRule:"evenodd"}))}const dbe=z.forwardRef(fbe);function pbe({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm-.75-4.75a.75.75 0 001.5 0V8.66l1.95 2.1a.75.75 0 101.1-1.02l-3.25-3.5a.75.75 0 00-1.1 0L6.2 9.74a.75.75 0 101.1 1.02l1.95-2.1v4.59z",clipRule:"evenodd"}))}const hbe=z.forwardRef(pbe);function mbe({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z",clipRule:"evenodd"}))}const ybe=z.forwardRef(mbe);function gbe({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M4.5 2A1.5 1.5 0 003 3.5v13A1.5 1.5 0 004.5 18h11a1.5 1.5 0 001.5-1.5V7.621a1.5 1.5 0 00-.44-1.06l-4.12-4.122A1.5 1.5 0 0011.378 2H4.5zm4.75 6.75a.75.75 0 011.5 0v2.546l.943-1.048a.75.75 0 011.114 1.004l-2.25 2.5a.75.75 0 01-1.114 0l-2.25-2.5a.75.75 0 111.114-1.004l.943 1.048V8.75z",clipRule:"evenodd"}))}const vbe=z.forwardRef(gbe);function bbe({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M9.69 18.933l.003.001C9.89 19.02 10 19 10 19s.11.02.308-.066l.002-.001.006-.003.018-.008a5.741 5.741 0 00.281-.14c.186-.096.446-.24.757-.433.62-.384 1.445-.966 2.274-1.765C15.302 14.988 17 12.493 17 9A7 7 0 103 9c0 3.492 1.698 5.988 3.355 7.584a13.731 13.731 0 002.273 1.765 11.842 11.842 0 00.976.544l.062.029.018.008.006.003zM10 11.25a2.25 2.25 0 100-4.5 2.25 2.25 0 000 4.5z",clipRule:"evenodd"}))}const _be=z.forwardRef(bbe);function wbe({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{d:"M10.75 4.75a.75.75 0 00-1.5 0v4.5h-4.5a.75.75 0 000 1.5h4.5v4.5a.75.75 0 001.5 0v-4.5h4.5a.75.75 0 000-1.5h-4.5v-4.5z"}))}const xbe=z.forwardRef(wbe),Sbe=C.forwardRef(({type:e,latitude:t,longitude:n,title:r,styles:i,...o},a)=>{var l,c,d;const s=`https://www.google.com/maps/search/?api=1&query=${t},${n}`;return X.jsxs("a",{...o,...(l=i==null?void 0:i[e])==null?void 0:l.container,href:s,type:"_blank",rel:"noopener",ref:a,children:[X.jsx("p",{...(c=i==null?void 0:i[e])==null?void 0:c.title,children:r}),X.jsx(_be,{...(d=i==null?void 0:i[e])==null?void 0:d.icon})]})}),Ebe=C.forwardRef(({blocks:e,styles:t,type:n,horizontalAlignment:r,verticalAlignment:i,...o},a)=>X.jsx("div",{"data-horizontal":r,"data-vertical":i,...o,...t==null?void 0:t[n],ref:a,children:e.map((s,l)=>X.jsx(fl,{styles:t,block:s},l))})),Abe=C.forwardRef(({blocks:e,styles:t,type:n,horizontalAlignment:r,verticalAlignment:i,...o},a)=>X.jsx("div",{"data-horizontal":r,"data-vertical":i,...o,...t==null?void 0:t[n],ref:a,children:e.map((s,l)=>X.jsx(fl,{styles:t,block:s},l))}));function Cbe(e){return Object.prototype.toString.call(e)==="[object Object]"}function A2(e){return Cbe(e)||Array.isArray(e)}function Obe(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function p_(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const i=JSON.stringify(Object.keys(e.breakpoints||{})),o=JSON.stringify(Object.keys(t.breakpoints||{}));return i!==o?!1:n.every(a=>{const s=e[a],l=t[a];return typeof s=="function"?`${s}`==`${l}`:!A2(s)||!A2(l)?s===l:p_(s,l)})}function C2(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function Tbe(e,t){if(e.length!==t.length)return!1;const n=C2(e),r=C2(t);return n.every((i,o)=>{const a=r[o];return p_(i,a)})}function h_(e){return typeof e=="number"}function O2(e){return typeof e=="string"}function m_(e){return typeof e=="boolean"}function T2(e){return Object.prototype.toString.call(e)==="[object Object]"}function Nn(e){return Math.abs(e)}function y_(e){return Math.sign(e)}function mm(e,t){return Nn(e-t)}function $be(e,t){if(e===0||t===0||Nn(e)<=Nn(t))return 0;const n=mm(Nn(e),Nn(t));return Nn(n/e)}function cf(e){return gm(e).map(Number)}function Ko(e){return e[ym(e)]}function ym(e){return Math.max(0,e.length-1)}function gm(e){return Object.keys(e)}function $2(e,t){return[e,t].reduce((n,r)=>(gm(r).forEach(i=>{const o=n[i],a=r[i],s=T2(o)&&T2(a);n[i]=s?$2(o,a):a}),n),{})}function k2(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function kbe(e,t){const n={start:r,center:i,end:o};function r(){return 0}function i(c){return o(c)/2}function o(c){return t-c}function a(){return t*Number(e)}function s(c){return h_(e)?a():n[e](c)}return{measure:s}}function Ibe(e,t){const n=e==="y"?"y":"x",r=e==="y"?"x":"y",i=s(),o=l();function a(d){const{width:p,height:m}=d;return n==="x"?p:m}function s(){return n==="y"?"top":t==="rtl"?"right":"left"}function l(){return n==="y"?"bottom":t==="rtl"?"left":"right"}return{scroll:n,cross:r,startEdge:i,endEdge:o,measureSize:a}}function ka(e,t){const n=Nn(e-t);function r(c){return c<e}function i(c){return c>t}function o(c){return r(c)||i(c)}function a(c){return o(c)?r(c)?e:t:c}function s(c){return n?c-n*Math.ceil((c-t)/n):c}return{length:n,max:t,min:e,constrain:a,reachedAny:o,reachedMax:i,reachedMin:r,removeOffset:s}}function I2(e,t,n){const{constrain:r}=ka(0,e),i=e+1;let o=a(t);function a(m){return n?Nn((i+m)%i):r(m)}function s(){return o}function l(m){return o=a(m),p}function c(m){return d().set(s()+m)}function d(){return I2(e,s(),n)}const p={get:s,set:l,add:c,clone:d};return p}function Pbe(e){const t=e==="rtl"?-1:1;function n(i){return i*t}return{apply:n}}function ff(){let e=[];function t(i,o,a,s={passive:!0}){return i.addEventListener(o,a,s),e.push(()=>i.removeEventListener(o,a,s)),r}function n(){e=e.filter(i=>i())}const r={add:t,clear:n};return r}function Rbe(e,t,n,r,i,o,a,s,l,c,d,p,m,h,y,v,w,_,b){const{cross:S}=e,A=["INPUT","SELECT","TEXTAREA"],E={passive:!1},T=ff(),j=ff(),L=ka(50,225).constrain(y.measure(20)),F={mouse:300,touch:400},M={mouse:500,touch:600},H=v?43:25;let re=!1,Q=0,G=0,V=!1,q=!1,Y=!1,ne=!1;function ce(Ae,Fe){if(!Fe)return;function $e(lt){(m_(Fe)||Fe(Ae,lt))&&qe(lt)}const Ze=n;T.add(Ze,"dragstart",lt=>lt.preventDefault(),E).add(Ze,"touchmove",()=>{},E).add(Ze,"touchend",()=>{}).add(Ze,"touchstart",$e).add(Ze,"mousedown",$e).add(Ze,"touchcancel",Je).add(Ze,"contextmenu",Je).add(Ze,"click",rt,!0)}function P(){T.clear(),j.clear()}function ue(){const Ae=ne?r:n;j.add(Ae,"touchmove",Me,E).add(Ae,"touchend",Je).add(Ae,"mousemove",Me,E).add(Ae,"mouseup",Je)}function Oe(Ae){const Fe=Ae.nodeName||"";return A.includes(Fe)}function N(){return(v?M:F)[ne?"mouse":"touch"]}function Ne(Ae,Fe){const $e=m.add(y_(Ae)*-1),Ze=p.byDistance(Ae,!v).distance;return v||Nn(Ae)<L?Ze:_&&Fe?Ze*.5:p.byIndex($e.get(),0).distance}function qe(Ae){const Fe=k2(Ae,i);ne=Fe,!(Fe&&Ae.button!==0)&&(Oe(Ae.target)||(Y=v&&Fe&&!Ae.buttons&&re,re=mm(o.get(),s.get())>=2,V=!0,a.pointerDown(Ae),d.useFriction(0).useDuration(0),o.set(s),ue(),Q=a.readPoint(Ae),G=a.readPoint(Ae,S),h.emit("pointerDown")))}function Me(Ae){const Fe=a.readPoint(Ae),$e=a.readPoint(Ae,S),Ze=mm(Fe,Q),lt=mm($e,G);if(!q&&!ne&&(!Ae.cancelable||(q=Ze>lt,!q)))return Je(Ae);const K=a.pointerMove(Ae);Ze>w&&(Y=!0),d.useFriction(.3).useDuration(1),l.start(),o.add(t.apply(K)),Ae.preventDefault()}function Je(Ae){const $e=p.byDistance(0,!1).index!==m.get(),Ze=a.pointerUp(Ae)*N(),lt=Ne(t.apply(Ze),$e),K=$be(Ze,lt),pe=H-10*K,Te=b+K/50;q=!1,V=!1,j.clear(),d.useDuration(pe).useFriction(Te),c.distance(lt,!v),ne=!1,h.emit("pointerUp")}function rt(Ae){Y&&(Ae.stopPropagation(),Ae.preventDefault())}function Ke(){return V}return{init:ce,pointerDown:Ke,destroy:P}}function Dbe(e,t){let r,i;function o(p){return p.timeStamp}function a(p,m){const y=`client${(m||e.scroll)==="x"?"X":"Y"}`;return(k2(p,t)?p:p.touches[0])[y]}function s(p){return r=p,i=p,a(p)}function l(p){const m=a(p)-a(i),h=o(p)-o(r)>170;return i=p,h&&(r=p),m}function c(p){if(!r||!i)return 0;const m=a(i)-a(r),h=o(p)-o(r),y=o(p)-o(i)>170,v=m/h;return h&&!y&&Nn(v)>.1?v:0}return{pointerDown:s,pointerMove:l,pointerUp:c,readPoint:a}}function Nbe(e){function t(r){return e*(r/100)}return{measure:t}}function Mbe(e,t,n,r,i){let o,a,s=[],l=!1;function c(h){return i.measureSize(h.getBoundingClientRect())}function d(h,y){if(!y)return;a=c(e),s=r.map(c);function v(_){for(const b of _){const S=b.target===e,A=r.indexOf(b.target),E=S?a:s[A],T=c(S?e:r[A]);if(E!==T){n.requestAnimationFrame(()=>{h.reInit(),t.emit("resize")});break}}}o=new ResizeObserver(_=>{l||(m_(y)||y(h,_))&&v(_)}),[e].concat(r).forEach(_=>o.observe(_))}function p(){o&&o.disconnect(),l=!0}return{init:d,destroy:p}}function jbe(e,t,n,r){let i=!0,o=0,a=0,s=n,l=r,c=e.get(),d=0;function p(){const E=t.get()-e.get(),T=!s;let j=0;return T?(o=0,e.set(t),j=E):(o+=E/s,o*=l,c+=o,e.add(o),j=c-d),a=y_(j),d=c,i=Nn(E)<.001,A}function m(){return i}function h(){return s}function y(){return a}function v(){return o}function w(){return b(n)}function _(){return S(r)}function b(E){return s=E,A}function S(E){return l=E,A}const A={direction:y,duration:h,velocity:v,seek:p,settled:m,useBaseFriction:_,useBaseDuration:w,useFriction:S,useDuration:b};return A}function Lbe(e,t,n,r,i){const o=i.measure(10),a=i.measure(50),s=ka(.1,.99);let l=!1;function c(){return!(l||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function d(h){if(!c())return;const y=e.reachedMin(t.get())?"min":"max",v=Nn(e[y]-t.get()),w=n.get()-t.get(),_=s.constrain(v/a);n.subtract(w*_),!h&&Nn(w)<o&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function p(h){l=!h}return{constrain:d,toggleActive:p}}function Fbe(e,t,n,r){const i=ka(-t+e,n[0]),o=l(),a=c();function s(){const p=o[0],m=Ko(o),h=o.lastIndexOf(p),y=o.indexOf(m)+1;return ka(h,y)}function l(){return n.map(i.constrain).map(p=>parseFloat(p.toFixed(3)))}function c(){if(t<=e)return[i.max];if(r==="keepSnaps")return o;const{min:p,max:m}=s();return o.slice(p,m)}return{snapsContained:a}}function qbe(e,t,n){const r=t[0],i=n?r-e:Ko(t);return{limit:ka(i,r)}}function Ube(e,t,n,r){const o=t.min+.1,a=t.max+.1,{reachedMin:s,reachedMax:l}=ka(o,a);function c(m){return m===1?l(n.get()):m===-1?s(n.get()):!1}function d(m){if(!c(m))return;const h=e*(m*-1);r.forEach(y=>y.add(h))}return{loop:d}}function Bbe(e){const{max:t,length:n}=e;function r(o){return(o-t)/-n}return{get:r}}function zbe(e,t,n,r,i,o,a){const{startEdge:s,endEdge:l}=e,{groupSlides:c}=o,d=h().map(t.measure),p=y(),m=v();function h(){return c(r).map(_=>Ko(_)[l]-_[0][s]).map(Nn)}function y(){return r.map(_=>n[s]-_[s]).map(_=>-Nn(_))}function v(){const b=Ko(p)-Ko(i);return c(p).map(S=>S[0]).map((S,A,E)=>{const T=!A,j=A===ym(E);return a&&T?0:a&&j?b:S+d[A]})}return{snaps:p,snapsAligned:m}}function Zbe(e,t,n,r,i){const{reachedAny:o,removeOffset:a,constrain:s}=r;function l(y){return y.concat().sort((v,w)=>Nn(v)-Nn(w))[0]}function c(y){const v=e?a(y):s(y),w=t.map(b=>b-v).map(b=>d(b,0)).map((b,S)=>({diff:b,index:S})).sort((b,S)=>Nn(b.diff)-Nn(S.diff)),{index:_}=w[0];return{index:_,distance:v}}function d(y,v){const w=[y,y+n,y-n];if(!e)return w[0];if(!v)return l(w);const _=w.filter(b=>y_(b)===v);return l(_)}function p(y,v){const w=t[y]-i.get(),_=d(w,v);return{index:y,distance:_}}function m(y,v){const w=i.get()+y,{index:_,distance:b}=c(w),S=!e&&o(w);if(!v||S)return{index:_,distance:y};const A=t[_]-b,E=y+d(A,0);return{index:_,distance:E}}return{byDistance:m,byIndex:p,shortcut:d}}function Hbe(e,t,n,r,i,o,a){function s(p){const m=p.distance,h=p.index!==t.get();o.add(m),m&&(i.duration()?e.start():(e.update(),e.render(1),e.update())),h&&(n.set(t.get()),t.set(p.index),a.emit("select"))}function l(p,m){const h=r.byDistance(p,m);s(h)}function c(p,m){const h=t.clone().set(p),y=r.byIndex(h.get(),m);s(y)}return{distance:l,index:c}}function vm(e){let t=e;function n(){return t}function r(l){t=a(l)}function i(l){t+=a(l)}function o(l){t-=a(l)}function a(l){return h_(l)?l:l.get()}return{get:n,set:r,add:i,subtract:o}}function P2(e,t,n){const r=e.scroll==="x"?a:s,i=n.style;let o=!1;function a(m){return`translate3d(${m}px,0px,0px)`}function s(m){return`translate3d(0px,${m}px,0px)`}function l(m){o||(i.transform=r(t.apply(m)))}function c(m){o=!m}function d(){o||(i.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:d,to:l,toggleActive:c}}function Wbe(e,t,n,r,i,o,a,s,l){const c=cf(i),d=cf(i).reverse(),p=v().concat(w());function m(E,T){return E.reduce((j,L)=>j-i[L],T)}function h(E,T){return E.reduce((j,L)=>m(j,T)>0?j.concat([L]):j,[])}function y(E,T){const j=T==="start",L=j?-r:r,F=a.findSlideBounds([L]);return E.map(M=>{const H=j?0:-r,re=j?r:0,G=F.filter(V=>V.index===M)[0][j?"end":"start"];return{index:M,slideLocation:vm(-1),translate:P2(e,t,l[M]),target:()=>s.get()>G?H:re}})}function v(){const E=o[0]-1,T=h(d,E);return y(T,"end")}function w(){const E=n-o[0]-1,T=h(c,E);return y(T,"start")}function _(){return p.every(({index:E})=>{const T=c.filter(j=>j!==E);return m(T,n)<=.1})}function b(){p.forEach(E=>{const{target:T,translate:j,slideLocation:L}=E,F=T();F!==L.get()&&(j.to(F),L.set(F))})}function S(){p.forEach(E=>E.translate.clear())}return{canLoop:_,clear:S,loop:b,loopPoints:p}}function Vbe(e,t){let n,r=!1;function i(s,l){if(!l)return;function c(d){for(const p of d)if(p.type==="childList"){s.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(d=>{r||(m_(l)||l(s,d))&&c(d)}),n.observe(e,{childList:!0})}function o(){n&&n.disconnect(),r=!0}return{init:i,destroy:o}}function Kbe(e,t,n,r,i,o,a){const{removeOffset:s,constrain:l}=i,c=.5,d=o?[0,t,-t]:[0],p=h(d,a);function m(w){const _=w||0;return n.map(b=>ka(c,b-c).constrain(b*_))}function h(w,_){const b=w||d,S=m(_);return b.reduce((A,E)=>{const T=r.map((j,L)=>({start:j-n[L]+S[L]+E,end:j+e-S[L]+E,index:L}));return A.concat(T)},[])}function y(w,_){const b=o?s(w):l(w);return(_||p).reduce((A,E)=>{const{index:T,start:j,end:L}=E,F=A.includes(T),M=j<b&&L>b;return!F&&M?A.concat([T]):A},[])}return{check:y,findSlideBounds:h}}function Gbe(e,t,n,r,i,o){const{measureSize:a,startEdge:s,endEdge:l}=e,c=n[0]&&i,d=y(),p=v(),m=n.map(a),h=w();function y(){if(!c)return 0;const b=n[0];return Nn(t[s]-b[s])}function v(){if(!c)return 0;const b=o.getComputedStyle(Ko(r));return parseFloat(b.getPropertyValue(`margin-${l}`))}function w(){return n.map((b,S,A)=>{const E=!S,T=S===ym(A);return E?m[S]+d:T?m[S]+p:A[S+1][s]-b[s]}).map(Nn)}return{slideSizes:m,slideSizesWithGaps:h}}function Ybe(e,t,n){const r=h_(n);function i(l,c){return cf(l).filter(d=>d%c===0).map(d=>l.slice(d,d+c))}function o(l){return cf(l).reduce((c,d)=>{const m=t.slice(Ko(c),d+1).reduce((h,y)=>h+y,0);return!d||m>e?c.concat(d):c},[]).map((c,d,p)=>l.slice(c,p[d+1]))}function a(l){return r?i(l,n):o(l)}return{groupSlides:a}}function Jbe(e,t,n,r,i,o,a,s){const{align:l,axis:c,direction:d,startIndex:p,inViewThreshold:m,loop:h,duration:y,dragFree:v,dragThreshold:w,slidesToScroll:_,skipSnaps:b,containScroll:S}=o,A=t.getBoundingClientRect(),E=n.map(Te=>Te.getBoundingClientRect()),T=Pbe(d),j=Ibe(c,d),L=j.measureSize(A),F=Nbe(L),M=kbe(l,L),H=!h&&!!S,re=h||!!S,{slideSizes:Q,slideSizesWithGaps:G}=Gbe(j,A,E,n,re,i),V=Ybe(L,G,_),{snaps:q,snapsAligned:Y}=zbe(j,M,A,E,G,V,H),ne=-Ko(q)+Ko(G),{snapsContained:ce}=Fbe(L,ne,Y,S),P=H?ce:Y,{limit:ue}=qbe(ne,P,h),Oe=I2(ym(P),p,h),N=Oe.clone(),Ne=cf(n),qe=({dragHandler:Te,scrollBody:Se,scrollBounds:et,eventHandler:Ue,animation:ot,options:{loop:It}})=>{const mt=Te.pointerDown();It||et.constrain(mt);const ie=Se.seek().settled();ie&&!mt&&(ot.stop(),Ue.emit("settle")),ie||Ue.emit("scroll")},Me=({scrollBody:Te,translate:Se,location:et,offsetLocation:Ue,scrollLooper:ot,slideLooper:It,options:{loop:mt}},ie)=>{const ge=Te.velocity();Ue.set(et.get()-ge+ge*ie),mt&&(ot.loop(Te.direction()),It.loop()),Se.to(Ue.get())},Je={start:()=>s.start(pe),stop:()=>s.stop(pe),update:()=>qe(pe),render:Te=>Me(pe,Te)},rt=.68,Ke=P[Oe.get()],Pe=vm(Ke),Ae=vm(Ke),Fe=vm(Ke),$e=jbe(Pe,Fe,y,rt),Ze=Zbe(h,P,ne,ue,Fe),lt=Hbe(Je,Oe,N,Ze,$e,Fe,a),K=Kbe(L,ne,Q,q,ue,h,m),pe={ownerDocument:r,ownerWindow:i,eventHandler:a,containerRect:A,slideRects:E,animation:Je,axis:j,direction:T,dragHandler:Rbe(j,T,e,r,i,Fe,Dbe(j,i),Pe,Je,lt,$e,Ze,Oe,a,F,v,w,b,rt),eventStore:ff(),percentOfView:F,index:Oe,indexPrevious:N,limit:ue,location:Pe,offsetLocation:Ae,options:o,resizeHandler:Mbe(t,a,i,n,j),scrollBody:$e,scrollBounds:Lbe(ue,Pe,Fe,$e,F),scrollLooper:Ube(ne,ue,Ae,[Pe,Ae,Fe]),scrollProgress:Bbe(ue),scrollSnaps:P,scrollTarget:Ze,scrollTo:lt,slideLooper:Wbe(j,T,L,ne,G,P,K,Ae,n),slidesHandler:Vbe(t,a),slidesInView:K,slideIndexes:Ne,slidesToScroll:V,target:Fe,translate:P2(j,T,t)};return pe}function Xbe(e){const t=16.666666666666668;let n=[],r=null,i=0,o=0;function a(p){r||(r=p);const m=p-r;for(r=p,i+=m;i>=t;)n.forEach(({animation:y})=>y.update()),i-=t;const h=Nn(i/t);n.forEach(({animation:y})=>y.render(h)),o&&e.requestAnimationFrame(a)}function s(p){n.includes(p)||n.push(p),!o&&(o=e.requestAnimationFrame(a))}function l(p){n=n.filter(m=>m!==p),!n.length&&(e.cancelAnimationFrame(o),r=null,i=0,o=0)}function c(){r=null,i=0}return{start:s,stop:l,reset:c,window:e}}function Qbe(){const e={};let t;function n(l){t=l}function r(l){return e[l]||[]}function i(l){return r(l).forEach(c=>c(t,l)),s}function o(l,c){return e[l]=r(l).concat([c]),s}function a(l,c){return e[l]=r(l).filter(d=>d!==c),s}const s={init:n,emit:i,off:a,on:o};return s}const e0e={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 t0e(e){function t(o,a){return $2(o,a||{})}function n(o){const a=o.breakpoints||{},s=gm(a).filter(l=>e.matchMedia(l).matches).map(l=>a[l]).reduce((l,c)=>t(l,c),{});return t(o,s)}function r(o){return o.map(a=>gm(a.breakpoints||{})).reduce((a,s)=>a.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function n0e(e){let t=[];function n(o,a){return t=o.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(a,e)),o.reduce((s,l)=>Object.assign(s,{[l.name]:l}),{})}function r(){t=t.filter(o=>o.destroy())}return{init:n,destroy:r}}function il(e,t,n){const r=e.ownerDocument,i=r.defaultView,o=t0e(i),a=n0e(o),s=ff(),l=ff(),c=Qbe(),{animationRealms:d}=il,{mergeOptions:p,optionsAtMedia:m,optionsMediaQueries:h}=o,{on:y,off:v,emit:w}=c,_=Q;let b=!1,S,A=p(e0e,il.globalOptions),E=p(A),T=[],j,L,F;function M(){const{container:$e,slides:Ze}=E;L=(O2($e)?e.querySelector($e):$e)||e.children[0];const K=O2(Ze)?L.querySelectorAll(Ze):Ze;F=[].slice.call(K||L.children)}function H($e,Ze){const lt=Jbe(e,L,F,r,i,$e,c,Ze);if($e.loop&&!lt.slideLooper.canLoop()){const K=Object.assign({},$e,{loop:!1});return H(K,Ze)}return lt}function re($e,Ze){if(b)return;const lt=d.find(pe=>pe.window===i),K=lt||Xbe(i);lt||d.push(K),A=p(A,$e),E=m(A),T=Ze||T,M(),S=H(E,K),h([A,...T.map(({options:pe})=>pe)]).forEach(pe=>s.add(pe,"change",Q)),E.active&&(S.translate.to(S.location.get()),S.eventHandler.init(Fe),S.resizeHandler.init(Fe,E.watchResize),S.slidesHandler.init(Fe,E.watchSlides),l.add(r,"visibilitychange",()=>{r.hidden&&K.reset()}),S.options.loop&&S.slideLooper.loop(),L.offsetParent&&F.length&&S.dragHandler.init(Fe,E.watchDrag),j=a.init(T,Fe))}function Q($e,Ze){const lt=qe();G(),re(p({startIndex:lt},$e),Ze),c.emit("reInit")}function G(){S.dragHandler.destroy(),S.animation.stop(),S.eventStore.clear(),S.translate.clear(),S.slideLooper.clear(),S.resizeHandler.destroy(),S.slidesHandler.destroy(),a.destroy(),s.clear(),l.clear()}function V(){b||(b=!0,s.clear(),G(),c.emit("destroy"))}function q($e){const Ze=S[$e?"target":"location"].get(),lt=E.loop?"removeOffset":"constrain";return S.slidesInView.check(S.limit[lt](Ze))}function Y($e){const Ze=q($e);return S.slideIndexes.filter(lt=>!Ze.includes(lt))}function ne($e,Ze,lt){!E.active||b||(S.scrollBody.useBaseFriction().useDuration(Ze?0:E.duration),S.scrollTo.index($e,lt||0))}function ce($e){const Ze=S.index.add(1).get();ne(Ze,$e===!0,-1)}function P($e){const Ze=S.index.add(-1).get();ne(Ze,$e===!0,1)}function ue(){return S.index.add(1).get()!==qe()}function Oe(){return S.index.add(-1).get()!==qe()}function N(){return S.scrollSnaps.map(S.scrollProgress.get)}function Ne(){return S.scrollProgress.get(S.location.get())}function qe(){return S.index.get()}function Me(){return S.indexPrevious.get()}function Je(){return j}function rt(){return S}function Ke(){return e}function Pe(){return L}function Ae(){return F}const Fe={canScrollNext:ue,canScrollPrev:Oe,containerNode:Pe,internalEngine:rt,destroy:V,off:v,on:y,emit:w,plugins:Je,previousScrollSnap:Me,reInit:_,rootNode:Ke,scrollNext:ce,scrollPrev:P,scrollProgress:Ne,scrollSnapList:N,scrollTo:ne,selectedScrollSnap:qe,slideNodes:Ae,slidesInView:q,slidesNotInView:Y};return re(t,n),setTimeout(()=>c.emit("init"),0),Fe}il.animationRealms=[],il.globalOptions=void 0;function g_(e={},t=[]){const n=C.useRef(e),r=C.useRef(t),[i,o]=C.useState(),[a,s]=C.useState(),l=C.useCallback(()=>{i&&i.reInit(n.current,r.current)},[i]);return C.useEffect(()=>{if(Obe()&&a){il.globalOptions=g_.globalOptions;const c=il(a,n.current,r.current);return o(c),()=>c.destroy()}else o(void 0)},[a,o]),C.useEffect(()=>{p_(n.current,e)||(n.current=e,l())},[e,l]),C.useEffect(()=>{Tbe(r.current,t)||(r.current=t,l())},[t,l]),[s,i]}g_.globalOptions=void 0;function r0e({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 010-1.06l7.5-7.5a.75.75 0 111.06 1.06L9.31 12l6.97 6.97a.75.75 0 11-1.06 1.06l-7.5-7.5z",clipRule:"evenodd"}))}const i0e=z.forwardRef(r0e);function o0e({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 010 1.06l-7.5 7.5a.75.75 0 01-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 011.06-1.06l7.5 7.5z",clipRule:"evenodd"}))}const a0e=z.forwardRef(o0e);function s0e({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0016.5 9h-1.875a1.875 1.875 0 01-1.875-1.875V5.25A3.75 3.75 0 009 1.5H5.625zM7.5 15a.75.75 0 01.75-.75h7.5a.75.75 0 010 1.5h-7.5A.75.75 0 017.5 15zm.75 2.25a.75.75 0 000 1.5H12a.75.75 0 000-1.5H8.25z",clipRule:"evenodd"}),z.createElement("path",{d:"M12.971 1.816A5.23 5.23 0 0114.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 013.434 1.279 9.768 9.768 0 00-6.963-6.963z"}))}const u0e=z.forwardRef(s0e);function l0e({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{d:"M1.5 8.67v8.58a3 3 0 003 3h15a3 3 0 003-3V8.67l-8.928 5.493a3 3 0 01-3.144 0L1.5 8.67z"}),z.createElement("path",{d:"M22.5 6.908V6.75a3 3 0 00-3-3h-15a3 3 0 00-3 3v.158l9.714 5.978a1.5 1.5 0 001.572 0L22.5 6.908z"}))}const c0e=z.forwardRef(l0e);function f0e({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{d:"M21.721 12.752a9.711 9.711 0 00-.945-5.003 12.754 12.754 0 01-4.339 2.708 18.991 18.991 0 01-.214 4.772 17.165 17.165 0 005.498-2.477zM14.634 15.55a17.324 17.324 0 00.332-4.647c-.952.227-1.945.347-2.966.347-1.021 0-2.014-.12-2.966-.347a17.515 17.515 0 00.332 4.647 17.385 17.385 0 005.268 0zM9.772 17.119a18.963 18.963 0 004.456 0A17.182 17.182 0 0112 21.724a17.18 17.18 0 01-2.228-4.605zM7.777 15.23a18.87 18.87 0 01-.214-4.774 12.753 12.753 0 01-4.34-2.708 9.711 9.711 0 00-.944 5.004 17.165 17.165 0 005.498 2.477zM21.356 14.752a9.765 9.765 0 01-7.478 6.817 18.64 18.64 0 001.988-4.718 18.627 18.627 0 005.49-2.098zM2.644 14.752c1.682.971 3.53 1.688 5.49 2.099a18.64 18.64 0 001.988 4.718 9.765 9.765 0 01-7.478-6.816zM13.878 2.43a9.755 9.755 0 016.116 3.986 11.267 11.267 0 01-3.746 2.504 18.63 18.63 0 00-2.37-6.49zM12 2.276a17.152 17.152 0 012.805 7.121c-.897.23-1.837.353-2.805.353-.968 0-1.908-.122-2.805-.353A17.151 17.151 0 0112 2.276zM10.122 2.43a18.629 18.629 0 00-2.37 6.49 11.266 11.266 0 01-3.746-2.504 9.754 9.754 0 016.116-3.985z"}))}const d0e=z.forwardRef(f0e);function p0e({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M12 1.5a5.25 5.25 0 00-5.25 5.25v3a3 3 0 00-3 3v6.75a3 3 0 003 3h10.5a3 3 0 003-3v-6.75a3 3 0 00-3-3v-3c0-2.9-2.35-5.25-5.25-5.25zm3.75 8.25v-3a3.75 3.75 0 10-7.5 0v3h7.5z",clipRule:"evenodd"}))}const h0e=z.forwardRef(p0e);function m0e({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M1.5 4.5a3 3 0 013-3h1.372c.86 0 1.61.586 1.819 1.42l1.105 4.423a1.875 1.875 0 01-.694 1.955l-1.293.97c-.135.101-.164.249-.126.352a11.285 11.285 0 006.697 6.697c.103.038.25.009.352-.126l.97-1.293a1.875 1.875 0 011.955-.694l4.423 1.105c.834.209 1.42.959 1.42 1.82V19.5a3 3 0 01-3 3h-2.25C8.552 22.5 1.5 15.448 1.5 6.75V4.5z",clipRule:"evenodd"}))}const y0e=z.forwardRef(m0e),g0e=C.forwardRef(({type:e,styles:t,blocks:n},r)=>{const[i,o]=g_({skipSnaps:!0}),[a,s]=C.useState(!0),[l,c]=C.useState(!0),d=C.useCallback(()=>o&&o.scrollPrev(),[o]),p=C.useCallback(()=>o&&o.scrollNext(),[o]),m=t==null?void 0:t[e],h=C.useCallback(y=>{s(!y.canScrollPrev()),c(!y.canScrollNext())},[]);return C.useEffect(()=>{o&&(h(o),o.on("reInit",h),o.on("select",h))},[o,h]),X.jsxs("div",{...m==null?void 0:m.container,"data-container":"carousel",ref:i,children:[X.jsx("div",{ref:r,...m==null?void 0:m.slidesContainer,children:n.map((y,v)=>X.jsx(fl,{styles:t,block:y},v))}),X.jsx(i0e,{...m==null?void 0:m.backButton,"data-disabled":a?"":void 0,onClick:d}),X.jsx(a0e,{...m==null?void 0:m.nextButton,"data-disabled":l?"":void 0,onClick:p})]})}),ol=Math.min,ui=Math.max,bm=Math.round,al=Math.floor,Ia=e=>({x:e,y:e});function R2(e,t,n){return ui(e,ol(t,n))}function _m(e,t){return typeof e=="function"?e(t):e}function df(e){return e.split("-")[0]}function v_(e){return e.split("-")[1]}function D2(e){return e==="x"?"y":"x"}function v0e(e){return e==="y"?"height":"width"}function pf(e){return["top","bottom"].includes(df(e))?"y":"x"}function b0e(e){return D2(pf(e))}function _0e(e){return{top:0,right:0,bottom:0,left:0,...e}}function w0e(e){return typeof e!="number"?_0e(e):{top:e,right:e,bottom:e,left:e}}function wm(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Pa(e){return N2(e)?(e.nodeName||"").toLowerCase():"#document"}function li(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Go(e){var t;return(t=(N2(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function N2(e){return e instanceof Node||e instanceof li(e).Node}function Fn(e){return e instanceof Element||e instanceof li(e).Element}function Ar(e){return e instanceof HTMLElement||e instanceof li(e).HTMLElement}function b_(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof li(e).ShadowRoot}function hf(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ci(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function x0e(e){return["table","td","th"].includes(Pa(e))}function __(e){const t=w_(),n=ci(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 S0e(e){let t=Ls(e);for(;Ar(t)&&!mf(t);){if(__(t))return t;t=Ls(t)}return null}function w_(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function mf(e){return["html","body","#document"].includes(Pa(e))}function ci(e){return li(e).getComputedStyle(e)}function xm(e){return Fn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ls(e){if(Pa(e)==="html")return e;const t=e.assignedSlot||e.parentNode||b_(e)&&e.host||Go(e);return b_(t)?t.host:t}function M2(e){const t=Ls(e);return mf(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ar(t)&&hf(t)?t:M2(t)}function Ra(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=M2(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=li(i);return o?t.concat(a,a.visualViewport||[],hf(i)?i:[],a.frameElement&&n?Ra(a.frameElement):[]):t.concat(i,Ra(i,[],n))}function Da(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 Yr(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&b_(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function j2(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function E0e(){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 L2(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(j2())||t.test(E0e()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function F2(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 q2(){return/apple/i.test(navigator.vendor)}function A0e(){return j2().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function U2(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function C0e(e){return"nativeEvent"in e}function O0e(e){return e.matches("html,body")}function Zi(e){return(e==null?void 0:e.ownerDocument)||document}function x_(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 B2(e){return"composedPath"in e?e.composedPath()[0]:e.target}const T0e="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function z2(e){return Ar(e)&&e.matches(T0e)}function hr(e){e.preventDefault(),e.stopPropagation()}function Z2(e,t,n){let{reference:r,floating:i}=e;const o=pf(t),a=b0e(t),s=v0e(a),l=df(t),c=o==="y",d=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,m=r[s]/2-i[s]/2;let h;switch(l){case"top":h={x:d,y:r.y-i.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:p};break;case"left":h={x:r.x-i.width,y:p};break;default:h={x:r.x,y:r.y}}switch(v_(t)){case"start":h[a]-=m*(n&&c?-1:1);break;case"end":h[a]+=m*(n&&c?-1:1);break}return h}const $0e=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:p}=Z2(c,r,l),m=r,h={},y=0;for(let v=0;v<s.length;v++){const{name:w,fn:_}=s[v],{x:b,y:S,data:A,reset:E}=await _({x:d,y:p,initialPlacement:r,placement:m,strategy:i,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});if(d=b??d,p=S??p,h={...h,[w]:{...h[w],...A}},E&&y<=50){y++,typeof E=="object"&&(E.placement&&(m=E.placement),E.rects&&(c=E.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):E.rects),{x:d,y:p}=Z2(c,m,l)),v=-1;continue}}return{x:d,y:p,placement:m,strategy:i,middlewareData:h}};async function H2(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:m=!1,padding:h=0}=_m(t,e),y=w0e(h),w=s[m?p==="floating"?"reference":"floating":p],_=wm(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(w)))==null||n?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),b=p==="floating"?{...a.floating,x:r,y:i}:a.reference,S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),A=await(o.isElement==null?void 0:o.isElement(S))?await(o.getScale==null?void 0:o.getScale(S))||{x:1,y:1}:{x:1,y:1},E=wm(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:b,offsetParent:S,strategy:l}):b);return{top:(_.top-E.top+y.top)/A.y,bottom:(E.bottom-_.bottom+y.bottom)/A.y,left:(_.left-E.left+y.left)/A.x,right:(E.right-_.right+y.right)/A.x}}async function k0e(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=df(n),s=v_(n),l=pf(n)==="y",c=["left","top"].includes(a)?-1:1,d=o&&l?-1:1,p=_m(t,e);let{mainAxis:m,crossAxis:h,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return s&&typeof y=="number"&&(h=s==="end"?y*-1:y),l?{x:h*d,y:m*c}:{x:m*c,y:h*d}}const I0e=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await k0e(t,e);return{x:n+i.x,y:r+i.y,data:i}}}},P0e=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:w=>{let{x:_,y:b}=w;return{x:_,y:b}}},...l}=_m(e,t),c={x:n,y:r},d=await H2(t,l),p=pf(df(i)),m=D2(p);let h=c[m],y=c[p];if(o){const w=m==="y"?"top":"left",_=m==="y"?"bottom":"right",b=h+d[w],S=h-d[_];h=R2(b,h,S)}if(a){const w=p==="y"?"top":"left",_=p==="y"?"bottom":"right",b=y+d[w],S=y-d[_];y=R2(b,y,S)}const v=s.fn({...t,[m]:h,[p]:y});return{...v,data:{x:v.x-n,y:v.y-r}}}}},R0e=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:o}=t,{apply:a=()=>{},...s}=_m(e,t),l=await H2(t,s),c=df(n),d=v_(n),p=pf(n)==="y",{width:m,height:h}=r.floating;let y,v;c==="top"||c==="bottom"?(y=c,v=d===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(v=c,y=d==="end"?"top":"bottom");const w=h-l[y],_=m-l[v],b=!t.middlewareData.shift;let S=w,A=_;if(p){const T=m-l.left-l.right;A=d||b?ol(_,T):T}else{const T=h-l.top-l.bottom;S=d||b?ol(w,T):T}if(b&&!d){const T=ui(l.left,0),j=ui(l.right,0),L=ui(l.top,0),F=ui(l.bottom,0);p?A=m-2*(T!==0||j!==0?T+j:ui(l.left,l.right)):S=h-2*(L!==0||F!==0?L+F:ui(l.top,l.bottom))}await a({...t,availableWidth:A,availableHeight:S});const E=await i.getDimensions(o.floating);return m!==E.width||h!==E.height?{reset:{rects:!0}}:{}}}};function W2(e){const t=ci(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ar(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=bm(n)!==o||bm(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function S_(e){return Fn(e)?e:e.contextElement}function sl(e){const t=S_(e);if(!Ar(t))return Ia(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=W2(t);let a=(o?bm(n.width):n.width)/r,s=(o?bm(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const D0e=Ia(0);function V2(e){const t=li(e);return!w_()||!t.visualViewport?D0e:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function N0e(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==li(e)?!1:t}function Fs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=S_(e);let a=Ia(1);t&&(r?Fn(r)&&(a=sl(r)):a=sl(e));const s=N0e(o,n,r)?V2(o):Ia(0);let l=(i.left+s.x)/a.x,c=(i.top+s.y)/a.y,d=i.width/a.x,p=i.height/a.y;if(o){const m=li(o),h=r&&Fn(r)?li(r):r;let y=m.frameElement;for(;y&&r&&h!==m;){const v=sl(y),w=y.getBoundingClientRect(),_=ci(y),b=w.left+(y.clientLeft+parseFloat(_.paddingLeft))*v.x,S=w.top+(y.clientTop+parseFloat(_.paddingTop))*v.y;l*=v.x,c*=v.y,d*=v.x,p*=v.y,l+=b,c+=S,y=li(y).frameElement}}return wm({width:d,height:p,x:l,y:c})}function M0e(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Ar(n),o=Go(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0},s=Ia(1);const l=Ia(0);if((i||!i&&r!=="fixed")&&((Pa(n)!=="body"||hf(o))&&(a=xm(n)),Ar(n))){const c=Fs(n);s=sl(n),l.x=c.x+n.clientLeft,l.y=c.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+l.x,y:t.y*s.y-a.scrollTop*s.y+l.y}}function j0e(e){return Array.from(e.getClientRects())}function K2(e){return Fs(Go(e)).left+xm(e).scrollLeft}function L0e(e){const t=Go(e),n=xm(e),r=e.ownerDocument.body,i=ui(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=ui(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+K2(e);const s=-n.scrollTop;return ci(r).direction==="rtl"&&(a+=ui(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}function F0e(e,t){const n=li(e),r=Go(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const c=w_();(!c||c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function q0e(e,t){const n=Fs(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Ar(e)?sl(e):Ia(1),a=e.clientWidth*o.x,s=e.clientHeight*o.y,l=i*o.x,c=r*o.y;return{width:a,height:s,x:l,y:c}}function G2(e,t,n){let r;if(t==="viewport")r=F0e(e,n);else if(t==="document")r=L0e(Go(e));else if(Fn(t))r=q0e(t,n);else{const i=V2(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return wm(r)}function Y2(e,t){const n=Ls(e);return n===t||!Fn(n)||mf(n)?!1:ci(n).position==="fixed"||Y2(n,t)}function U0e(e,t){const n=t.get(e);if(n)return n;let r=Ra(e,[],!1).filter(s=>Fn(s)&&Pa(s)!=="body"),i=null;const o=ci(e).position==="fixed";let a=o?Ls(e):e;for(;Fn(a)&&!mf(a);){const s=ci(a),l=__(a);!l&&s.position==="fixed"&&(i=null),(o?!l&&!i:!l&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||hf(a)&&!l&&Y2(e,a))?r=r.filter(d=>d!==a):i=s,a=Ls(a)}return t.set(e,r),r}function B0e(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?U0e(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,d)=>{const p=G2(t,d,i);return c.top=ui(p.top,c.top),c.right=ol(p.right,c.right),c.bottom=ol(p.bottom,c.bottom),c.left=ui(p.left,c.left),c},G2(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function z0e(e){return W2(e)}function Z0e(e,t,n){const r=Ar(t),i=Go(t),o=n==="fixed",a=Fs(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=Ia(0);if(r||!r&&!o)if((Pa(t)!=="body"||hf(i))&&(s=xm(t)),r){const c=Fs(t,!0,o,t);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else i&&(l.x=K2(i));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function J2(e,t){return!Ar(e)||ci(e).position==="fixed"?null:t?t(e):e.offsetParent}function X2(e,t){const n=li(e);if(!Ar(e))return n;let r=J2(e,t);for(;r&&x0e(r)&&ci(r).position==="static";)r=J2(r,t);return r&&(Pa(r)==="html"||Pa(r)==="body"&&ci(r).position==="static"&&!__(r))?n:r||S0e(e)||n}const H0e=async function(e){let{reference:t,floating:n,strategy:r}=e;const i=this.getOffsetParent||X2,o=this.getDimensions;return{reference:Z0e(t,await i(n),r),floating:{x:0,y:0,...await o(n)}}};function W0e(e){return ci(e).direction==="rtl"}const V0e={convertOffsetParentRelativeRectToViewportRelativeRect:M0e,getDocumentElement:Go,getClippingRect:B0e,getOffsetParent:X2,getElementRects:H0e,getClientRects:j0e,getDimensions:z0e,getScale:sl,isElement:Fn,isRTL:W0e};function K0e(e,t){let n=null,r;const i=Go(e);function o(){clearTimeout(r),n&&n.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();const{left:c,top:d,width:p,height:m}=e.getBoundingClientRect();if(s||t(),!p||!m)return;const h=al(d),y=al(i.clientWidth-(c+p)),v=al(i.clientHeight-(d+m)),w=al(c),b={rootMargin:-h+"px "+-y+"px "+-v+"px "+-w+"px",threshold:ui(0,ol(1,l))||1};let S=!0;function A(E){const T=E[0].intersectionRatio;if(T!==l){if(!S)return a();T?a(!1,T):r=setTimeout(()=>{a(!1,1e-7)},100)}S=!1}try{n=new IntersectionObserver(A,{...b,root:i.ownerDocument})}catch{n=new IntersectionObserver(A,b)}n.observe(e)}return a(!0),o}function G0e(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=S_(e),d=i||o?[...c?Ra(c):[],...Ra(t)]:[];d.forEach(_=>{i&&_.addEventListener("scroll",n,{passive:!0}),o&&_.addEventListener("resize",n)});const p=c&&s?K0e(c,n):null;let m=-1,h=null;a&&(h=new ResizeObserver(_=>{let[b]=_;b&&b.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{h&&h.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let y,v=l?Fs(e):null;l&&w();function w(){const _=Fs(e);v&&(_.x!==v.x||_.y!==v.y||_.width!==v.width||_.height!==v.height)&&n(),v=_,y=requestAnimationFrame(w)}return n(),()=>{d.forEach(_=>{i&&_.removeEventListener("scroll",n),o&&_.removeEventListener("resize",n)}),p&&p(),h&&h.disconnect(),h=null,l&&cancelAnimationFrame(y)}}const Y0e=(e,t,n)=>{const r=new Map,i={platform:V0e,...n},o={...i.platform,_c:r};return $0e(e,t,{...i,platform:o})};var Sm=typeof document<"u"?C.useLayoutEffect:C.useEffect;function Em(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Em(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Em(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Q2(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function eD(e,t){const n=Q2(e);return Math.round(t*n)/n}function tD(e){const t=z.useRef(e);return Sm(()=>{t.current=e}),t}function J0e(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[d,p]=z.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=z.useState(r);Em(m,r)||h(r);const[y,v]=z.useState(null),[w,_]=z.useState(null),b=z.useCallback(q=>{q!=T.current&&(T.current=q,v(q))},[v]),S=z.useCallback(q=>{q!==j.current&&(j.current=q,_(q))},[_]),A=o||y,E=a||w,T=z.useRef(null),j=z.useRef(null),L=z.useRef(d),F=tD(l),M=tD(i),H=z.useCallback(()=>{if(!T.current||!j.current)return;const q={placement:t,strategy:n,middleware:m};M.current&&(q.platform=M.current),Y0e(T.current,j.current,q).then(Y=>{const ne={...Y,isPositioned:!0};re.current&&!Em(L.current,ne)&&(L.current=ne,r3.flushSync(()=>{p(ne)}))})},[m,t,n,M]);Sm(()=>{c===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,p(q=>({...q,isPositioned:!1})))},[c]);const re=z.useRef(!1);Sm(()=>(re.current=!0,()=>{re.current=!1}),[]),Sm(()=>{if(A&&(T.current=A),E&&(j.current=E),A&&E){if(F.current)return F.current(A,E,H);H()}},[A,E,H,F]);const Q=z.useMemo(()=>({reference:T,floating:j,setReference:b,setFloating:S}),[b,S]),G=z.useMemo(()=>({reference:A,floating:E}),[A,E]),V=z.useMemo(()=>{const q={position:n,left:0,top:0};if(!G.floating)return q;const Y=eD(G.floating,d.x),ne=eD(G.floating,d.y);return s?{...q,transform:"translate("+Y+"px, "+ne+"px)",...Q2(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Y,top:ne}},[n,s,G.floating,d.x,d.y]);return z.useMemo(()=>({...d,update:H,refs:Q,elements:G,floatingStyles:V}),[d,H,Q,G,V])}/*!
|
|
418
|
+
`);const b=_.state[s];if(b==null)return;JSON.stringify(i.getState())!==JSON.stringify(b)&&h(b);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(_)});case"DISPATCH":switch(v.payload.type){case"RESET":return h(y),s===void 0?d==null?void 0:d.init(i.getState()):d==null?void 0:d.init(hm(l.name));case"COMMIT":if(s===void 0){d==null||d.init(i.getState());return}return d==null?void 0:d.init(hm(l.name));case"ROLLBACK":return d_(v.state,_=>{if(s===void 0){h(_),d==null||d.init(i.getState());return}h(_[s]),d==null||d.init(hm(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return d_(v.state,_=>{if(s===void 0){h(_);return}JSON.stringify(i.getState())!==JSON.stringify(_[s])&&h(_[s])});case"IMPORT_STATE":{const{nextLiftedState:_}=v.payload,b=(w=_.computedStates.slice(-1)[0])==null?void 0:w.state;if(!b)return;h(s===void 0?b:b[s]),d==null||d.send(null,_);return}case"PAUSE_RECORDING":return m=!m}return}}),y},d_=(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 Yve(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var o;const a=l=>l===null?null:JSON.parse(l,t==null?void 0:t.reviver),s=(o=n.getItem(i))!=null?o:null;return s instanceof Promise?s.then(a):a(s)},setItem:(i,o)=>n.setItem(i,JSON.stringify(o,t==null?void 0:t.replacer)),removeItem:i=>n.removeItem(i)}}const lf=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return lf(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return lf(r)(n)}}}},Jve=(e,t)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:w=>w,version:0,merge:(w,_)=>({..._,...w}),...t},a=!1;const s=new Set,l=new Set;let c;try{c=o.getStorage()}catch{}if(!c)return e((...w)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...w)},r,i);const d=lf(o.serialize),p=()=>{const w=o.partialize({...r()});let _;const b=d({state:w,version:o.version}).then(S=>c.setItem(o.name,S)).catch(S=>{_=S});if(_)throw _;return b},m=i.setState;i.setState=(w,_)=>{m(w,_),p()};const h=e((...w)=>{n(...w),p()},r,i);let y;const v=()=>{var w;if(!c)return;a=!1,s.forEach(b=>b(r()));const _=((w=o.onRehydrateStorage)==null?void 0:w.call(o,r()))||void 0;return lf(c.getItem.bind(c))(o.name).then(b=>{if(b)return o.deserialize(b)}).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==o.version){if(o.migrate)return o.migrate(b.state,b.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return b.state}).then(b=>{var S;return y=o.merge(b,(S=r())!=null?S:h),n(y,!0),p()}).then(()=>{_==null||_(y,void 0),a=!0,l.forEach(b=>b(y))}).catch(b=>{_==null||_(void 0,b)})};return i.persist={setOptions:w=>{o={...o,...w},w.getStorage&&(c=w.getStorage())},clearStorage:()=>{c==null||c.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>v(),hasHydrated:()=>a,onHydrate:w=>(s.add(w),()=>{s.delete(w)}),onFinishHydration:w=>(l.add(w),()=>{l.delete(w)})},v(),y||h},Xve=(e,t)=>(n,r,i)=>{let o={storage:Yve(()=>localStorage),partialize:v=>v,version:0,merge:(v,w)=>({...w,...v}),...t},a=!1;const s=new Set,l=new Set;let c=o.storage;if(!c)return e((...v)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...v)},r,i);const d=()=>{const v=o.partialize({...r()});return c.setItem(o.name,{state:v,version:o.version})},p=i.setState;i.setState=(v,w)=>{p(v,w),d()};const m=e((...v)=>{n(...v),d()},r,i);let h;const y=()=>{var v,w;if(!c)return;a=!1,s.forEach(b=>{var S;return b((S=r())!=null?S:m)});const _=((w=o.onRehydrateStorage)==null?void 0:w.call(o,(v=r())!=null?v:m))||void 0;return lf(c.getItem.bind(c))(o.name).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==o.version){if(o.migrate)return o.migrate(b.state,b.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return b.state}).then(b=>{var S;return h=o.merge(b,(S=r())!=null?S:m),n(h,!0),d()}).then(()=>{_==null||_(h,void 0),h=r(),a=!0,l.forEach(b=>b(h))}).catch(b=>{_==null||_(void 0,b)})};return i.persist={setOptions:v=>{o={...o,...v},v.storage&&(c=v.storage)},clearStorage:()=>{c==null||c.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>y(),hasHydrated:()=>a,onHydrate:v=>(s.add(v),()=>{s.delete(v)}),onFinishHydration:v=>(l.add(v),()=>{l.delete(v)})},o.skipHydration||y(),h||m},Qve=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?Jve(e,t):Xve(e,t),Vo=Kve()(v2(Qve((e,t)=>({messageHistory:{},addMessageToHistory:({userId:n,message:r})=>e(i=>({...i,messageHistory:{...i.messageHistory,[n]:[r,...(i.messageHistory[n]??[]).slice(0,100)]}})),clientMode:"",setClientMode:n=>{const{clearAll:r,clientMode:i}=t();i!==n&&r(),e(o=>({...o,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"}))),b2=C.createContext(null),ebe=e=>{const t={theme:{},configuration:{},messages:[],connected:!0,disableComposer:!1,renderers:{},isReadOnly:!1,userData:{},closeWindow:()=>{},messageContainerRef:{current:null},isTyping:!1,allowFileUpload:!1,conversationId:void 0,disableRestartConversation:!1},n=e==null?void 0:e.client,r=e==null?void 0:e.conversationId,i=Vo.getState().setClientMode,o=Vo.getState().setConversationId;return n&&i(n.mode),C.useEffect(()=>{r&&o(r)},[r]),l2()(v2((a,s)=>{const l=p=>a(m=>({...m,messages:[...m.messages??[],p]})),c=p=>a(m=>({...m,messages:p})),d=Vo.getState().addMessageToHistory;return{...t,...e,eventEmitter:Ire,client:n,sendFile:p=>s().client.sendFile(p),sendTextMessage:async p=>{const m=s().client;l({direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:"bubble",block:{type:"text",text:p}}}),m&&await m.sendMessage(p),m!=null&&m.userId&&d({message:p,userId:m.userId})},on:(p,m)=>{const h=s().client;return h?h.on(p,m):()=>{}},getClientId:()=>{var p;return(p=s().client)==null?void 0:p.clientId},setState:p=>a(m=>({...m,...p})),setTheme:p=>a(m=>({...m,theme:p})),setMessages:c,setConfiguration:p=>a(m=>({...m,configuration:p})),setIsTyping:p=>a(m=>({...m,isTyping:p})),addMessage:l,setConnected:p=>a(m=>({...m,connected:p})),restartConversation:async()=>{const p=s().client,m=s().setMessages;p&&(await p.newConversation(),m([]))}}},{name:"webchatStore"}))};function it(e){const t=C.useContext(b2);if(!t)throw new Error("Missing WebchatContext.Provider in the tree");return y2(t,e)}const tbe=({text:e,buttonValue:t,type:n,styles:r,variant:i,groupId:o,reusable:a,...s})=>{const l=it(b=>b.eventEmitter),c=it(b=>b.sendTextMessage),d=it(b=>b.isReadOnly),[p,m]=C.useState(!1),[h,y]=C.useState(!1),[v,w]=C.useState(!1);C.useEffect(()=>{if(o)return l.on(`button-group-${o}-click`,()=>{y(!0),a||w(!0)})},[l,o,a]);function _(){o&&l.emit(`button-group-${o}-click`),m(!0),a||w(!0),i!=="link"&&c(t)}return X.jsx(nbe,{...s,variant:i,onClick:_,disabled:v||d,"data-activated":p?"":void 0,"data-group-activated":h?"":void 0,"data-type":i,value:t,...r==null?void 0:r[n],children:e})},nbe=e=>{if(e.variant==="link"){const{value:r,variant:i,...o}=e;return X.jsx("a",{...o,href:r,target:"_blank",rel:"noopener noreferrer"})}const{variant:t,...n}=e;return X.jsx("button",{type:"button",...n})},rbe=C.forwardRef(({block:e,styles:t,type:n,...r},i)=>X.jsx("div",{...r,...t==null?void 0:t[n],ref:i,children:X.jsx(fl,{styles:t,block:e})})),_2=C.createContext(null);function w2(){const e=C.useContext(_2);if(!e)throw new Error("useComposerContext must be used within a Message");return e}const x2=C.createContext(null);function ibe(){const e=C.useContext(x2);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const S2=C.createContext(null);function E2(){const e=C.useContext(S2);if(!e)throw new Error("useModalContext must be used within a ModalProvider");return e}C.createContext(null);const obe=C.forwardRef(({url:e,type:t,styles:n,orientation:r="auto",...i},o)=>{var m,h;const a=C.useId(),{setIsLoading:s}=ibe(),[l,c]=C.useState(r),[d,p]=C.useState(!1);return C.useLayoutEffect(()=>{s(y=>[...y,a])},[]),C.useEffect(()=>{e&&l==="auto"&&sge(e).then(({width:y,height:v})=>{c(abe(y,v)),s(w=>w.filter(_=>_!==a))})},[e]),X.jsxs(X.Fragment,{children:[d?null:X.jsx("div",{"data-orientation":l,...(m=n==null?void 0:n[t])==null?void 0:m.placeholder}),X.jsx("img",{"data-orientation":l,"data-loaded":d,...i,...(h=n==null?void 0:n[t])==null?void 0:h.image,src:e,alt:"",ref:o,loading:"lazy",onLoad:()=>{p(!0)}})]})});function abe(e,t){const n={square:1,portrait:.75,landscape:1.3333333333333333},r=e/t;return Object.keys(n).reduce((o,a)=>Math.abs(n[a]-r)<Math.abs(n[o]-r)?a:o)}const sbe=C.forwardRef(({url:e,type:t,styles:n,...r},i)=>X.jsx("div",{children:X.jsx("video",{...r,controls:!0,src:e,...n==null?void 0:n[t],ref:i})})),ube=C.forwardRef(({url:e,type:t,styles:n,...r},i)=>X.jsx("div",{children:X.jsx("audio",{...r,controls:!0,src:e,...n==null?void 0:n[t],ref:i})}));function lbe({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M10 3a.75.75 0 01.75.75v10.638l3.96-4.158a.75.75 0 111.08 1.04l-5.25 5.5a.75.75 0 01-1.08 0l-5.25-5.5a.75.75 0 111.08-1.04l3.96 4.158V3.75A.75.75 0 0110 3z",clipRule:"evenodd"}))}const cbe=z.forwardRef(lbe);function fbe({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M15.312 11.424a5.5 5.5 0 01-9.201 2.466l-.312-.311h2.433a.75.75 0 000-1.5H3.989a.75.75 0 00-.75.75v4.242a.75.75 0 001.5 0v-2.43l.31.31a7 7 0 0011.712-3.138.75.75 0 00-1.449-.39zm1.23-3.723a.75.75 0 00.219-.53V2.929a.75.75 0 00-1.5 0V5.36l-.31-.31A7 7 0 003.239 8.188a.75.75 0 101.448.389A5.5 5.5 0 0113.89 6.11l.311.31h-2.432a.75.75 0 000 1.5h4.243a.75.75 0 00.53-.219z",clipRule:"evenodd"}))}const dbe=z.forwardRef(fbe);function pbe({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm-.75-4.75a.75.75 0 001.5 0V8.66l1.95 2.1a.75.75 0 101.1-1.02l-3.25-3.5a.75.75 0 00-1.1 0L6.2 9.74a.75.75 0 101.1 1.02l1.95-2.1v4.59z",clipRule:"evenodd"}))}const hbe=z.forwardRef(pbe);function mbe({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z",clipRule:"evenodd"}))}const ybe=z.forwardRef(mbe);function gbe({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M4.5 2A1.5 1.5 0 003 3.5v13A1.5 1.5 0 004.5 18h11a1.5 1.5 0 001.5-1.5V7.621a1.5 1.5 0 00-.44-1.06l-4.12-4.122A1.5 1.5 0 0011.378 2H4.5zm4.75 6.75a.75.75 0 011.5 0v2.546l.943-1.048a.75.75 0 011.114 1.004l-2.25 2.5a.75.75 0 01-1.114 0l-2.25-2.5a.75.75 0 111.114-1.004l.943 1.048V8.75z",clipRule:"evenodd"}))}const vbe=z.forwardRef(gbe);function bbe({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M9.69 18.933l.003.001C9.89 19.02 10 19 10 19s.11.02.308-.066l.002-.001.006-.003.018-.008a5.741 5.741 0 00.281-.14c.186-.096.446-.24.757-.433.62-.384 1.445-.966 2.274-1.765C15.302 14.988 17 12.493 17 9A7 7 0 103 9c0 3.492 1.698 5.988 3.355 7.584a13.731 13.731 0 002.273 1.765 11.842 11.842 0 00.976.544l.062.029.018.008.006.003zM10 11.25a2.25 2.25 0 100-4.5 2.25 2.25 0 000 4.5z",clipRule:"evenodd"}))}const _be=z.forwardRef(bbe);function wbe({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{d:"M10.75 4.75a.75.75 0 00-1.5 0v4.5h-4.5a.75.75 0 000 1.5h4.5v4.5a.75.75 0 001.5 0v-4.5h4.5a.75.75 0 000-1.5h-4.5v-4.5z"}))}const xbe=z.forwardRef(wbe),Sbe=C.forwardRef(({type:e,latitude:t,longitude:n,title:r,styles:i,...o},a)=>{var l,c,d;const s=`https://www.google.com/maps/search/?api=1&query=${t},${n}`;return X.jsxs("a",{...o,...(l=i==null?void 0:i[e])==null?void 0:l.container,href:s,type:"_blank",rel:"noopener",ref:a,children:[X.jsx("p",{...(c=i==null?void 0:i[e])==null?void 0:c.title,children:r}),X.jsx(_be,{...(d=i==null?void 0:i[e])==null?void 0:d.icon})]})}),Ebe=C.forwardRef(({blocks:e,styles:t,type:n,horizontalAlignment:r,verticalAlignment:i,...o},a)=>X.jsx("div",{"data-horizontal":r,"data-vertical":i,...o,...t==null?void 0:t[n],ref:a,children:e.map((s,l)=>X.jsx(fl,{styles:t,block:s},l))})),Abe=C.forwardRef(({blocks:e,styles:t,type:n,horizontalAlignment:r,verticalAlignment:i,...o},a)=>X.jsx("div",{"data-horizontal":r,"data-vertical":i,...o,...t==null?void 0:t[n],ref:a,children:e.map((s,l)=>X.jsx(fl,{styles:t,block:s},l))}));function Cbe(e){return Object.prototype.toString.call(e)==="[object Object]"}function A2(e){return Cbe(e)||Array.isArray(e)}function Obe(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function p_(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const i=JSON.stringify(Object.keys(e.breakpoints||{})),o=JSON.stringify(Object.keys(t.breakpoints||{}));return i!==o?!1:n.every(a=>{const s=e[a],l=t[a];return typeof s=="function"?`${s}`==`${l}`:!A2(s)||!A2(l)?s===l:p_(s,l)})}function C2(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function Tbe(e,t){if(e.length!==t.length)return!1;const n=C2(e),r=C2(t);return n.every((i,o)=>{const a=r[o];return p_(i,a)})}function h_(e){return typeof e=="number"}function O2(e){return typeof e=="string"}function m_(e){return typeof e=="boolean"}function T2(e){return Object.prototype.toString.call(e)==="[object Object]"}function Nn(e){return Math.abs(e)}function y_(e){return Math.sign(e)}function mm(e,t){return Nn(e-t)}function $be(e,t){if(e===0||t===0||Nn(e)<=Nn(t))return 0;const n=mm(Nn(e),Nn(t));return Nn(n/e)}function cf(e){return gm(e).map(Number)}function Ko(e){return e[ym(e)]}function ym(e){return Math.max(0,e.length-1)}function gm(e){return Object.keys(e)}function $2(e,t){return[e,t].reduce((n,r)=>(gm(r).forEach(i=>{const o=n[i],a=r[i],s=T2(o)&&T2(a);n[i]=s?$2(o,a):a}),n),{})}function k2(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function kbe(e,t){const n={start:r,center:i,end:o};function r(){return 0}function i(c){return o(c)/2}function o(c){return t-c}function a(){return t*Number(e)}function s(c){return h_(e)?a():n[e](c)}return{measure:s}}function Ibe(e,t){const n=e==="y"?"y":"x",r=e==="y"?"x":"y",i=s(),o=l();function a(d){const{width:p,height:m}=d;return n==="x"?p:m}function s(){return n==="y"?"top":t==="rtl"?"right":"left"}function l(){return n==="y"?"bottom":t==="rtl"?"left":"right"}return{scroll:n,cross:r,startEdge:i,endEdge:o,measureSize:a}}function ka(e,t){const n=Nn(e-t);function r(c){return c<e}function i(c){return c>t}function o(c){return r(c)||i(c)}function a(c){return o(c)?r(c)?e:t:c}function s(c){return n?c-n*Math.ceil((c-t)/n):c}return{length:n,max:t,min:e,constrain:a,reachedAny:o,reachedMax:i,reachedMin:r,removeOffset:s}}function I2(e,t,n){const{constrain:r}=ka(0,e),i=e+1;let o=a(t);function a(m){return n?Nn((i+m)%i):r(m)}function s(){return o}function l(m){return o=a(m),p}function c(m){return d().set(s()+m)}function d(){return I2(e,s(),n)}const p={get:s,set:l,add:c,clone:d};return p}function Pbe(e){const t=e==="rtl"?-1:1;function n(i){return i*t}return{apply:n}}function ff(){let e=[];function t(i,o,a,s={passive:!0}){return i.addEventListener(o,a,s),e.push(()=>i.removeEventListener(o,a,s)),r}function n(){e=e.filter(i=>i())}const r={add:t,clear:n};return r}function Rbe(e,t,n,r,i,o,a,s,l,c,d,p,m,h,y,v,w,_,b){const{cross:S}=e,A=["INPUT","SELECT","TEXTAREA"],E={passive:!1},T=ff(),j=ff(),L=ka(50,225).constrain(y.measure(20)),F={mouse:300,touch:400},M={mouse:500,touch:600},H=v?43:25;let re=!1,Q=0,G=0,V=!1,q=!1,Y=!1,ne=!1;function ce(Ae,Fe){if(!Fe)return;function $e(lt){(m_(Fe)||Fe(Ae,lt))&&qe(lt)}const Ze=n;T.add(Ze,"dragstart",lt=>lt.preventDefault(),E).add(Ze,"touchmove",()=>{},E).add(Ze,"touchend",()=>{}).add(Ze,"touchstart",$e).add(Ze,"mousedown",$e).add(Ze,"touchcancel",Je).add(Ze,"contextmenu",Je).add(Ze,"click",rt,!0)}function P(){T.clear(),j.clear()}function ue(){const Ae=ne?r:n;j.add(Ae,"touchmove",Me,E).add(Ae,"touchend",Je).add(Ae,"mousemove",Me,E).add(Ae,"mouseup",Je)}function Oe(Ae){const Fe=Ae.nodeName||"";return A.includes(Fe)}function N(){return(v?M:F)[ne?"mouse":"touch"]}function Ne(Ae,Fe){const $e=m.add(y_(Ae)*-1),Ze=p.byDistance(Ae,!v).distance;return v||Nn(Ae)<L?Ze:_&&Fe?Ze*.5:p.byIndex($e.get(),0).distance}function qe(Ae){const Fe=k2(Ae,i);ne=Fe,!(Fe&&Ae.button!==0)&&(Oe(Ae.target)||(Y=v&&Fe&&!Ae.buttons&&re,re=mm(o.get(),s.get())>=2,V=!0,a.pointerDown(Ae),d.useFriction(0).useDuration(0),o.set(s),ue(),Q=a.readPoint(Ae),G=a.readPoint(Ae,S),h.emit("pointerDown")))}function Me(Ae){const Fe=a.readPoint(Ae),$e=a.readPoint(Ae,S),Ze=mm(Fe,Q),lt=mm($e,G);if(!q&&!ne&&(!Ae.cancelable||(q=Ze>lt,!q)))return Je(Ae);const K=a.pointerMove(Ae);Ze>w&&(Y=!0),d.useFriction(.3).useDuration(1),l.start(),o.add(t.apply(K)),Ae.preventDefault()}function Je(Ae){const $e=p.byDistance(0,!1).index!==m.get(),Ze=a.pointerUp(Ae)*N(),lt=Ne(t.apply(Ze),$e),K=$be(Ze,lt),pe=H-10*K,Te=b+K/50;q=!1,V=!1,j.clear(),d.useDuration(pe).useFriction(Te),c.distance(lt,!v),ne=!1,h.emit("pointerUp")}function rt(Ae){Y&&(Ae.stopPropagation(),Ae.preventDefault())}function Ke(){return V}return{init:ce,pointerDown:Ke,destroy:P}}function Dbe(e,t){let r,i;function o(p){return p.timeStamp}function a(p,m){const y=`client${(m||e.scroll)==="x"?"X":"Y"}`;return(k2(p,t)?p:p.touches[0])[y]}function s(p){return r=p,i=p,a(p)}function l(p){const m=a(p)-a(i),h=o(p)-o(r)>170;return i=p,h&&(r=p),m}function c(p){if(!r||!i)return 0;const m=a(i)-a(r),h=o(p)-o(r),y=o(p)-o(i)>170,v=m/h;return h&&!y&&Nn(v)>.1?v:0}return{pointerDown:s,pointerMove:l,pointerUp:c,readPoint:a}}function Nbe(e){function t(r){return e*(r/100)}return{measure:t}}function Mbe(e,t,n,r,i){let o,a,s=[],l=!1;function c(h){return i.measureSize(h.getBoundingClientRect())}function d(h,y){if(!y)return;a=c(e),s=r.map(c);function v(_){for(const b of _){const S=b.target===e,A=r.indexOf(b.target),E=S?a:s[A],T=c(S?e:r[A]);if(E!==T){n.requestAnimationFrame(()=>{h.reInit(),t.emit("resize")});break}}}o=new ResizeObserver(_=>{l||(m_(y)||y(h,_))&&v(_)}),[e].concat(r).forEach(_=>o.observe(_))}function p(){o&&o.disconnect(),l=!0}return{init:d,destroy:p}}function jbe(e,t,n,r){let i=!0,o=0,a=0,s=n,l=r,c=e.get(),d=0;function p(){const E=t.get()-e.get(),T=!s;let j=0;return T?(o=0,e.set(t),j=E):(o+=E/s,o*=l,c+=o,e.add(o),j=c-d),a=y_(j),d=c,i=Nn(E)<.001,A}function m(){return i}function h(){return s}function y(){return a}function v(){return o}function w(){return b(n)}function _(){return S(r)}function b(E){return s=E,A}function S(E){return l=E,A}const A={direction:y,duration:h,velocity:v,seek:p,settled:m,useBaseFriction:_,useBaseDuration:w,useFriction:S,useDuration:b};return A}function Lbe(e,t,n,r,i){const o=i.measure(10),a=i.measure(50),s=ka(.1,.99);let l=!1;function c(){return!(l||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function d(h){if(!c())return;const y=e.reachedMin(t.get())?"min":"max",v=Nn(e[y]-t.get()),w=n.get()-t.get(),_=s.constrain(v/a);n.subtract(w*_),!h&&Nn(w)<o&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function p(h){l=!h}return{constrain:d,toggleActive:p}}function Fbe(e,t,n,r){const i=ka(-t+e,n[0]),o=l(),a=c();function s(){const p=o[0],m=Ko(o),h=o.lastIndexOf(p),y=o.indexOf(m)+1;return ka(h,y)}function l(){return n.map(i.constrain).map(p=>parseFloat(p.toFixed(3)))}function c(){if(t<=e)return[i.max];if(r==="keepSnaps")return o;const{min:p,max:m}=s();return o.slice(p,m)}return{snapsContained:a}}function qbe(e,t,n){const r=t[0],i=n?r-e:Ko(t);return{limit:ka(i,r)}}function Ube(e,t,n,r){const o=t.min+.1,a=t.max+.1,{reachedMin:s,reachedMax:l}=ka(o,a);function c(m){return m===1?l(n.get()):m===-1?s(n.get()):!1}function d(m){if(!c(m))return;const h=e*(m*-1);r.forEach(y=>y.add(h))}return{loop:d}}function Bbe(e){const{max:t,length:n}=e;function r(o){return(o-t)/-n}return{get:r}}function zbe(e,t,n,r,i,o,a){const{startEdge:s,endEdge:l}=e,{groupSlides:c}=o,d=h().map(t.measure),p=y(),m=v();function h(){return c(r).map(_=>Ko(_)[l]-_[0][s]).map(Nn)}function y(){return r.map(_=>n[s]-_[s]).map(_=>-Nn(_))}function v(){const b=Ko(p)-Ko(i);return c(p).map(S=>S[0]).map((S,A,E)=>{const T=!A,j=A===ym(E);return a&&T?0:a&&j?b:S+d[A]})}return{snaps:p,snapsAligned:m}}function Zbe(e,t,n,r,i){const{reachedAny:o,removeOffset:a,constrain:s}=r;function l(y){return y.concat().sort((v,w)=>Nn(v)-Nn(w))[0]}function c(y){const v=e?a(y):s(y),w=t.map(b=>b-v).map(b=>d(b,0)).map((b,S)=>({diff:b,index:S})).sort((b,S)=>Nn(b.diff)-Nn(S.diff)),{index:_}=w[0];return{index:_,distance:v}}function d(y,v){const w=[y,y+n,y-n];if(!e)return w[0];if(!v)return l(w);const _=w.filter(b=>y_(b)===v);return l(_)}function p(y,v){const w=t[y]-i.get(),_=d(w,v);return{index:y,distance:_}}function m(y,v){const w=i.get()+y,{index:_,distance:b}=c(w),S=!e&&o(w);if(!v||S)return{index:_,distance:y};const A=t[_]-b,E=y+d(A,0);return{index:_,distance:E}}return{byDistance:m,byIndex:p,shortcut:d}}function Hbe(e,t,n,r,i,o,a){function s(p){const m=p.distance,h=p.index!==t.get();o.add(m),m&&(i.duration()?e.start():(e.update(),e.render(1),e.update())),h&&(n.set(t.get()),t.set(p.index),a.emit("select"))}function l(p,m){const h=r.byDistance(p,m);s(h)}function c(p,m){const h=t.clone().set(p),y=r.byIndex(h.get(),m);s(y)}return{distance:l,index:c}}function vm(e){let t=e;function n(){return t}function r(l){t=a(l)}function i(l){t+=a(l)}function o(l){t-=a(l)}function a(l){return h_(l)?l:l.get()}return{get:n,set:r,add:i,subtract:o}}function P2(e,t,n){const r=e.scroll==="x"?a:s,i=n.style;let o=!1;function a(m){return`translate3d(${m}px,0px,0px)`}function s(m){return`translate3d(0px,${m}px,0px)`}function l(m){o||(i.transform=r(t.apply(m)))}function c(m){o=!m}function d(){o||(i.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:d,to:l,toggleActive:c}}function Wbe(e,t,n,r,i,o,a,s,l){const c=cf(i),d=cf(i).reverse(),p=v().concat(w());function m(E,T){return E.reduce((j,L)=>j-i[L],T)}function h(E,T){return E.reduce((j,L)=>m(j,T)>0?j.concat([L]):j,[])}function y(E,T){const j=T==="start",L=j?-r:r,F=a.findSlideBounds([L]);return E.map(M=>{const H=j?0:-r,re=j?r:0,G=F.filter(V=>V.index===M)[0][j?"end":"start"];return{index:M,slideLocation:vm(-1),translate:P2(e,t,l[M]),target:()=>s.get()>G?H:re}})}function v(){const E=o[0]-1,T=h(d,E);return y(T,"end")}function w(){const E=n-o[0]-1,T=h(c,E);return y(T,"start")}function _(){return p.every(({index:E})=>{const T=c.filter(j=>j!==E);return m(T,n)<=.1})}function b(){p.forEach(E=>{const{target:T,translate:j,slideLocation:L}=E,F=T();F!==L.get()&&(j.to(F),L.set(F))})}function S(){p.forEach(E=>E.translate.clear())}return{canLoop:_,clear:S,loop:b,loopPoints:p}}function Vbe(e,t){let n,r=!1;function i(s,l){if(!l)return;function c(d){for(const p of d)if(p.type==="childList"){s.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(d=>{r||(m_(l)||l(s,d))&&c(d)}),n.observe(e,{childList:!0})}function o(){n&&n.disconnect(),r=!0}return{init:i,destroy:o}}function Kbe(e,t,n,r,i,o,a){const{removeOffset:s,constrain:l}=i,c=.5,d=o?[0,t,-t]:[0],p=h(d,a);function m(w){const _=w||0;return n.map(b=>ka(c,b-c).constrain(b*_))}function h(w,_){const b=w||d,S=m(_);return b.reduce((A,E)=>{const T=r.map((j,L)=>({start:j-n[L]+S[L]+E,end:j+e-S[L]+E,index:L}));return A.concat(T)},[])}function y(w,_){const b=o?s(w):l(w);return(_||p).reduce((A,E)=>{const{index:T,start:j,end:L}=E,F=A.includes(T),M=j<b&&L>b;return!F&&M?A.concat([T]):A},[])}return{check:y,findSlideBounds:h}}function Gbe(e,t,n,r,i,o){const{measureSize:a,startEdge:s,endEdge:l}=e,c=n[0]&&i,d=y(),p=v(),m=n.map(a),h=w();function y(){if(!c)return 0;const b=n[0];return Nn(t[s]-b[s])}function v(){if(!c)return 0;const b=o.getComputedStyle(Ko(r));return parseFloat(b.getPropertyValue(`margin-${l}`))}function w(){return n.map((b,S,A)=>{const E=!S,T=S===ym(A);return E?m[S]+d:T?m[S]+p:A[S+1][s]-b[s]}).map(Nn)}return{slideSizes:m,slideSizesWithGaps:h}}function Ybe(e,t,n){const r=h_(n);function i(l,c){return cf(l).filter(d=>d%c===0).map(d=>l.slice(d,d+c))}function o(l){return cf(l).reduce((c,d)=>{const m=t.slice(Ko(c),d+1).reduce((h,y)=>h+y,0);return!d||m>e?c.concat(d):c},[]).map((c,d,p)=>l.slice(c,p[d+1]))}function a(l){return r?i(l,n):o(l)}return{groupSlides:a}}function Jbe(e,t,n,r,i,o,a,s){const{align:l,axis:c,direction:d,startIndex:p,inViewThreshold:m,loop:h,duration:y,dragFree:v,dragThreshold:w,slidesToScroll:_,skipSnaps:b,containScroll:S}=o,A=t.getBoundingClientRect(),E=n.map(Te=>Te.getBoundingClientRect()),T=Pbe(d),j=Ibe(c,d),L=j.measureSize(A),F=Nbe(L),M=kbe(l,L),H=!h&&!!S,re=h||!!S,{slideSizes:Q,slideSizesWithGaps:G}=Gbe(j,A,E,n,re,i),V=Ybe(L,G,_),{snaps:q,snapsAligned:Y}=zbe(j,M,A,E,G,V,H),ne=-Ko(q)+Ko(G),{snapsContained:ce}=Fbe(L,ne,Y,S),P=H?ce:Y,{limit:ue}=qbe(ne,P,h),Oe=I2(ym(P),p,h),N=Oe.clone(),Ne=cf(n),qe=({dragHandler:Te,scrollBody:Se,scrollBounds:et,eventHandler:Ue,animation:ot,options:{loop:It}})=>{const mt=Te.pointerDown();It||et.constrain(mt);const ie=Se.seek().settled();ie&&!mt&&(ot.stop(),Ue.emit("settle")),ie||Ue.emit("scroll")},Me=({scrollBody:Te,translate:Se,location:et,offsetLocation:Ue,scrollLooper:ot,slideLooper:It,options:{loop:mt}},ie)=>{const ge=Te.velocity();Ue.set(et.get()-ge+ge*ie),mt&&(ot.loop(Te.direction()),It.loop()),Se.to(Ue.get())},Je={start:()=>s.start(pe),stop:()=>s.stop(pe),update:()=>qe(pe),render:Te=>Me(pe,Te)},rt=.68,Ke=P[Oe.get()],Pe=vm(Ke),Ae=vm(Ke),Fe=vm(Ke),$e=jbe(Pe,Fe,y,rt),Ze=Zbe(h,P,ne,ue,Fe),lt=Hbe(Je,Oe,N,Ze,$e,Fe,a),K=Kbe(L,ne,Q,q,ue,h,m),pe={ownerDocument:r,ownerWindow:i,eventHandler:a,containerRect:A,slideRects:E,animation:Je,axis:j,direction:T,dragHandler:Rbe(j,T,e,r,i,Fe,Dbe(j,i),Pe,Je,lt,$e,Ze,Oe,a,F,v,w,b,rt),eventStore:ff(),percentOfView:F,index:Oe,indexPrevious:N,limit:ue,location:Pe,offsetLocation:Ae,options:o,resizeHandler:Mbe(t,a,i,n,j),scrollBody:$e,scrollBounds:Lbe(ue,Pe,Fe,$e,F),scrollLooper:Ube(ne,ue,Ae,[Pe,Ae,Fe]),scrollProgress:Bbe(ue),scrollSnaps:P,scrollTarget:Ze,scrollTo:lt,slideLooper:Wbe(j,T,L,ne,G,P,K,Ae,n),slidesHandler:Vbe(t,a),slidesInView:K,slideIndexes:Ne,slidesToScroll:V,target:Fe,translate:P2(j,T,t)};return pe}function Xbe(e){const t=16.666666666666668;let n=[],r=null,i=0,o=0;function a(p){r||(r=p);const m=p-r;for(r=p,i+=m;i>=t;)n.forEach(({animation:y})=>y.update()),i-=t;const h=Nn(i/t);n.forEach(({animation:y})=>y.render(h)),o&&e.requestAnimationFrame(a)}function s(p){n.includes(p)||n.push(p),!o&&(o=e.requestAnimationFrame(a))}function l(p){n=n.filter(m=>m!==p),!n.length&&(e.cancelAnimationFrame(o),r=null,i=0,o=0)}function c(){r=null,i=0}return{start:s,stop:l,reset:c,window:e}}function Qbe(){const e={};let t;function n(l){t=l}function r(l){return e[l]||[]}function i(l){return r(l).forEach(c=>c(t,l)),s}function o(l,c){return e[l]=r(l).concat([c]),s}function a(l,c){return e[l]=r(l).filter(d=>d!==c),s}const s={init:n,emit:i,off:a,on:o};return s}const e0e={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 t0e(e){function t(o,a){return $2(o,a||{})}function n(o){const a=o.breakpoints||{},s=gm(a).filter(l=>e.matchMedia(l).matches).map(l=>a[l]).reduce((l,c)=>t(l,c),{});return t(o,s)}function r(o){return o.map(a=>gm(a.breakpoints||{})).reduce((a,s)=>a.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function n0e(e){let t=[];function n(o,a){return t=o.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(a,e)),o.reduce((s,l)=>Object.assign(s,{[l.name]:l}),{})}function r(){t=t.filter(o=>o.destroy())}return{init:n,destroy:r}}function il(e,t,n){const r=e.ownerDocument,i=r.defaultView,o=t0e(i),a=n0e(o),s=ff(),l=ff(),c=Qbe(),{animationRealms:d}=il,{mergeOptions:p,optionsAtMedia:m,optionsMediaQueries:h}=o,{on:y,off:v,emit:w}=c,_=Q;let b=!1,S,A=p(e0e,il.globalOptions),E=p(A),T=[],j,L,F;function M(){const{container:$e,slides:Ze}=E;L=(O2($e)?e.querySelector($e):$e)||e.children[0];const K=O2(Ze)?L.querySelectorAll(Ze):Ze;F=[].slice.call(K||L.children)}function H($e,Ze){const lt=Jbe(e,L,F,r,i,$e,c,Ze);if($e.loop&&!lt.slideLooper.canLoop()){const K=Object.assign({},$e,{loop:!1});return H(K,Ze)}return lt}function re($e,Ze){if(b)return;const lt=d.find(pe=>pe.window===i),K=lt||Xbe(i);lt||d.push(K),A=p(A,$e),E=m(A),T=Ze||T,M(),S=H(E,K),h([A,...T.map(({options:pe})=>pe)]).forEach(pe=>s.add(pe,"change",Q)),E.active&&(S.translate.to(S.location.get()),S.eventHandler.init(Fe),S.resizeHandler.init(Fe,E.watchResize),S.slidesHandler.init(Fe,E.watchSlides),l.add(r,"visibilitychange",()=>{r.hidden&&K.reset()}),S.options.loop&&S.slideLooper.loop(),L.offsetParent&&F.length&&S.dragHandler.init(Fe,E.watchDrag),j=a.init(T,Fe))}function Q($e,Ze){const lt=qe();G(),re(p({startIndex:lt},$e),Ze),c.emit("reInit")}function G(){S.dragHandler.destroy(),S.animation.stop(),S.eventStore.clear(),S.translate.clear(),S.slideLooper.clear(),S.resizeHandler.destroy(),S.slidesHandler.destroy(),a.destroy(),s.clear(),l.clear()}function V(){b||(b=!0,s.clear(),G(),c.emit("destroy"))}function q($e){const Ze=S[$e?"target":"location"].get(),lt=E.loop?"removeOffset":"constrain";return S.slidesInView.check(S.limit[lt](Ze))}function Y($e){const Ze=q($e);return S.slideIndexes.filter(lt=>!Ze.includes(lt))}function ne($e,Ze,lt){!E.active||b||(S.scrollBody.useBaseFriction().useDuration(Ze?0:E.duration),S.scrollTo.index($e,lt||0))}function ce($e){const Ze=S.index.add(1).get();ne(Ze,$e===!0,-1)}function P($e){const Ze=S.index.add(-1).get();ne(Ze,$e===!0,1)}function ue(){return S.index.add(1).get()!==qe()}function Oe(){return S.index.add(-1).get()!==qe()}function N(){return S.scrollSnaps.map(S.scrollProgress.get)}function Ne(){return S.scrollProgress.get(S.location.get())}function qe(){return S.index.get()}function Me(){return S.indexPrevious.get()}function Je(){return j}function rt(){return S}function Ke(){return e}function Pe(){return L}function Ae(){return F}const Fe={canScrollNext:ue,canScrollPrev:Oe,containerNode:Pe,internalEngine:rt,destroy:V,off:v,on:y,emit:w,plugins:Je,previousScrollSnap:Me,reInit:_,rootNode:Ke,scrollNext:ce,scrollPrev:P,scrollProgress:Ne,scrollSnapList:N,scrollTo:ne,selectedScrollSnap:qe,slideNodes:Ae,slidesInView:q,slidesNotInView:Y};return re(t,n),setTimeout(()=>c.emit("init"),0),Fe}il.animationRealms=[],il.globalOptions=void 0;function g_(e={},t=[]){const n=C.useRef(e),r=C.useRef(t),[i,o]=C.useState(),[a,s]=C.useState(),l=C.useCallback(()=>{i&&i.reInit(n.current,r.current)},[i]);return C.useEffect(()=>{if(Obe()&&a){il.globalOptions=g_.globalOptions;const c=il(a,n.current,r.current);return o(c),()=>c.destroy()}else o(void 0)},[a,o]),C.useEffect(()=>{p_(n.current,e)||(n.current=e,l())},[e,l]),C.useEffect(()=>{Tbe(r.current,t)||(r.current=t,l())},[t,l]),[s,i]}g_.globalOptions=void 0;function r0e({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 010-1.06l7.5-7.5a.75.75 0 111.06 1.06L9.31 12l6.97 6.97a.75.75 0 11-1.06 1.06l-7.5-7.5z",clipRule:"evenodd"}))}const i0e=z.forwardRef(r0e);function o0e({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 010 1.06l-7.5 7.5a.75.75 0 01-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 011.06-1.06l7.5 7.5z",clipRule:"evenodd"}))}const a0e=z.forwardRef(o0e);function s0e({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0016.5 9h-1.875a1.875 1.875 0 01-1.875-1.875V5.25A3.75 3.75 0 009 1.5H5.625zM7.5 15a.75.75 0 01.75-.75h7.5a.75.75 0 010 1.5h-7.5A.75.75 0 017.5 15zm.75 2.25a.75.75 0 000 1.5H12a.75.75 0 000-1.5H8.25z",clipRule:"evenodd"}),z.createElement("path",{d:"M12.971 1.816A5.23 5.23 0 0114.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 013.434 1.279 9.768 9.768 0 00-6.963-6.963z"}))}const u0e=z.forwardRef(s0e);function l0e({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{d:"M1.5 8.67v8.58a3 3 0 003 3h15a3 3 0 003-3V8.67l-8.928 5.493a3 3 0 01-3.144 0L1.5 8.67z"}),z.createElement("path",{d:"M22.5 6.908V6.75a3 3 0 00-3-3h-15a3 3 0 00-3 3v.158l9.714 5.978a1.5 1.5 0 001.572 0L22.5 6.908z"}))}const c0e=z.forwardRef(l0e);function f0e({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{d:"M21.721 12.752a9.711 9.711 0 00-.945-5.003 12.754 12.754 0 01-4.339 2.708 18.991 18.991 0 01-.214 4.772 17.165 17.165 0 005.498-2.477zM14.634 15.55a17.324 17.324 0 00.332-4.647c-.952.227-1.945.347-2.966.347-1.021 0-2.014-.12-2.966-.347a17.515 17.515 0 00.332 4.647 17.385 17.385 0 005.268 0zM9.772 17.119a18.963 18.963 0 004.456 0A17.182 17.182 0 0112 21.724a17.18 17.18 0 01-2.228-4.605zM7.777 15.23a18.87 18.87 0 01-.214-4.774 12.753 12.753 0 01-4.34-2.708 9.711 9.711 0 00-.944 5.004 17.165 17.165 0 005.498 2.477zM21.356 14.752a9.765 9.765 0 01-7.478 6.817 18.64 18.64 0 001.988-4.718 18.627 18.627 0 005.49-2.098zM2.644 14.752c1.682.971 3.53 1.688 5.49 2.099a18.64 18.64 0 001.988 4.718 9.765 9.765 0 01-7.478-6.816zM13.878 2.43a9.755 9.755 0 016.116 3.986 11.267 11.267 0 01-3.746 2.504 18.63 18.63 0 00-2.37-6.49zM12 2.276a17.152 17.152 0 012.805 7.121c-.897.23-1.837.353-2.805.353-.968 0-1.908-.122-2.805-.353A17.151 17.151 0 0112 2.276zM10.122 2.43a18.629 18.629 0 00-2.37 6.49 11.266 11.266 0 01-3.746-2.504 9.754 9.754 0 016.116-3.985z"}))}const d0e=z.forwardRef(f0e);function p0e({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M12 1.5a5.25 5.25 0 00-5.25 5.25v3a3 3 0 00-3 3v6.75a3 3 0 003 3h10.5a3 3 0 003-3v-6.75a3 3 0 00-3-3v-3c0-2.9-2.35-5.25-5.25-5.25zm3.75 8.25v-3a3.75 3.75 0 10-7.5 0v3h7.5z",clipRule:"evenodd"}))}const h0e=z.forwardRef(p0e);function m0e({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M1.5 4.5a3 3 0 013-3h1.372c.86 0 1.61.586 1.819 1.42l1.105 4.423a1.875 1.875 0 01-.694 1.955l-1.293.97c-.135.101-.164.249-.126.352a11.285 11.285 0 006.697 6.697c.103.038.25.009.352-.126l.97-1.293a1.875 1.875 0 011.955-.694l4.423 1.105c.834.209 1.42.959 1.42 1.82V19.5a3 3 0 01-3 3h-2.25C8.552 22.5 1.5 15.448 1.5 6.75V4.5z",clipRule:"evenodd"}))}const y0e=z.forwardRef(m0e),g0e=C.forwardRef(({type:e,styles:t,blocks:n},r)=>{const[i,o]=g_({skipSnaps:!0}),[a,s]=C.useState(!0),[l,c]=C.useState(!0),d=C.useCallback(()=>o&&o.scrollPrev(),[o]),p=C.useCallback(()=>o&&o.scrollNext(),[o]),m=t==null?void 0:t[e],h=C.useCallback(y=>{s(!y.canScrollPrev()),c(!y.canScrollNext())},[]);return C.useEffect(()=>{o&&(h(o),o.on("reInit",h),o.on("select",h))},[o,h]),X.jsxs("div",{...m==null?void 0:m.container,"data-container":"carousel",ref:i,children:[X.jsx("div",{ref:r,...m==null?void 0:m.slidesContainer,children:n.map((y,v)=>X.jsx(fl,{styles:t,block:y},v))}),X.jsx(i0e,{...m==null?void 0:m.backButton,"data-disabled":a?"":void 0,onClick:d}),X.jsx(a0e,{...m==null?void 0:m.nextButton,"data-disabled":l?"":void 0,onClick:p})]})}),ol=Math.min,ui=Math.max,bm=Math.round,al=Math.floor,Ia=e=>({x:e,y:e});function R2(e,t,n){return ui(e,ol(t,n))}function _m(e,t){return typeof e=="function"?e(t):e}function df(e){return e.split("-")[0]}function v_(e){return e.split("-")[1]}function D2(e){return e==="x"?"y":"x"}function v0e(e){return e==="y"?"height":"width"}function pf(e){return["top","bottom"].includes(df(e))?"y":"x"}function b0e(e){return D2(pf(e))}function _0e(e){return{top:0,right:0,bottom:0,left:0,...e}}function w0e(e){return typeof e!="number"?_0e(e):{top:e,right:e,bottom:e,left:e}}function wm(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Pa(e){return N2(e)?(e.nodeName||"").toLowerCase():"#document"}function li(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Go(e){var t;return(t=(N2(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function N2(e){return e instanceof Node||e instanceof li(e).Node}function Fn(e){return e instanceof Element||e instanceof li(e).Element}function Ar(e){return e instanceof HTMLElement||e instanceof li(e).HTMLElement}function b_(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof li(e).ShadowRoot}function hf(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ci(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function x0e(e){return["table","td","th"].includes(Pa(e))}function __(e){const t=w_(),n=ci(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 S0e(e){let t=Ls(e);for(;Ar(t)&&!mf(t);){if(__(t))return t;t=Ls(t)}return null}function w_(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function mf(e){return["html","body","#document"].includes(Pa(e))}function ci(e){return li(e).getComputedStyle(e)}function xm(e){return Fn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ls(e){if(Pa(e)==="html")return e;const t=e.assignedSlot||e.parentNode||b_(e)&&e.host||Go(e);return b_(t)?t.host:t}function M2(e){const t=Ls(e);return mf(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ar(t)&&hf(t)?t:M2(t)}function Ra(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=M2(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=li(i);return o?t.concat(a,a.visualViewport||[],hf(i)?i:[],a.frameElement&&n?Ra(a.frameElement):[]):t.concat(i,Ra(i,[],n))}function Da(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 Yr(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&b_(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function j2(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function E0e(){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 L2(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(j2())||t.test(E0e()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function F2(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 q2(){return/apple/i.test(navigator.vendor)}function A0e(){return j2().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function U2(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function C0e(e){return"nativeEvent"in e}function O0e(e){return e.matches("html,body")}function Zi(e){return(e==null?void 0:e.ownerDocument)||document}function x_(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 B2(e){return"composedPath"in e?e.composedPath()[0]:e.target}const T0e="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function z2(e){return Ar(e)&&e.matches(T0e)}function hr(e){e.preventDefault(),e.stopPropagation()}function Z2(e,t,n){let{reference:r,floating:i}=e;const o=pf(t),a=b0e(t),s=v0e(a),l=df(t),c=o==="y",d=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,m=r[s]/2-i[s]/2;let h;switch(l){case"top":h={x:d,y:r.y-i.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:p};break;case"left":h={x:r.x-i.width,y:p};break;default:h={x:r.x,y:r.y}}switch(v_(t)){case"start":h[a]-=m*(n&&c?-1:1);break;case"end":h[a]+=m*(n&&c?-1:1);break}return h}const $0e=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:p}=Z2(c,r,l),m=r,h={},y=0;for(let v=0;v<s.length;v++){const{name:w,fn:_}=s[v],{x:b,y:S,data:A,reset:E}=await _({x:d,y:p,initialPlacement:r,placement:m,strategy:i,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});if(d=b??d,p=S??p,h={...h,[w]:{...h[w],...A}},E&&y<=50){y++,typeof E=="object"&&(E.placement&&(m=E.placement),E.rects&&(c=E.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):E.rects),{x:d,y:p}=Z2(c,m,l)),v=-1;continue}}return{x:d,y:p,placement:m,strategy:i,middlewareData:h}};async function H2(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:m=!1,padding:h=0}=_m(t,e),y=w0e(h),w=s[m?p==="floating"?"reference":"floating":p],_=wm(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(w)))==null||n?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),b=p==="floating"?{...a.floating,x:r,y:i}:a.reference,S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),A=await(o.isElement==null?void 0:o.isElement(S))?await(o.getScale==null?void 0:o.getScale(S))||{x:1,y:1}:{x:1,y:1},E=wm(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:b,offsetParent:S,strategy:l}):b);return{top:(_.top-E.top+y.top)/A.y,bottom:(E.bottom-_.bottom+y.bottom)/A.y,left:(_.left-E.left+y.left)/A.x,right:(E.right-_.right+y.right)/A.x}}async function k0e(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=df(n),s=v_(n),l=pf(n)==="y",c=["left","top"].includes(a)?-1:1,d=o&&l?-1:1,p=_m(t,e);let{mainAxis:m,crossAxis:h,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return s&&typeof y=="number"&&(h=s==="end"?y*-1:y),l?{x:h*d,y:m*c}:{x:m*c,y:h*d}}const I0e=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await k0e(t,e);return{x:n+i.x,y:r+i.y,data:i}}}},P0e=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:w=>{let{x:_,y:b}=w;return{x:_,y:b}}},...l}=_m(e,t),c={x:n,y:r},d=await H2(t,l),p=pf(df(i)),m=D2(p);let h=c[m],y=c[p];if(o){const w=m==="y"?"top":"left",_=m==="y"?"bottom":"right",b=h+d[w],S=h-d[_];h=R2(b,h,S)}if(a){const w=p==="y"?"top":"left",_=p==="y"?"bottom":"right",b=y+d[w],S=y-d[_];y=R2(b,y,S)}const v=s.fn({...t,[m]:h,[p]:y});return{...v,data:{x:v.x-n,y:v.y-r}}}}},R0e=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:o}=t,{apply:a=()=>{},...s}=_m(e,t),l=await H2(t,s),c=df(n),d=v_(n),p=pf(n)==="y",{width:m,height:h}=r.floating;let y,v;c==="top"||c==="bottom"?(y=c,v=d===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(v=c,y=d==="end"?"top":"bottom");const w=h-l[y],_=m-l[v],b=!t.middlewareData.shift;let S=w,A=_;if(p){const T=m-l.left-l.right;A=d||b?ol(_,T):T}else{const T=h-l.top-l.bottom;S=d||b?ol(w,T):T}if(b&&!d){const T=ui(l.left,0),j=ui(l.right,0),L=ui(l.top,0),F=ui(l.bottom,0);p?A=m-2*(T!==0||j!==0?T+j:ui(l.left,l.right)):S=h-2*(L!==0||F!==0?L+F:ui(l.top,l.bottom))}await a({...t,availableWidth:A,availableHeight:S});const E=await i.getDimensions(o.floating);return m!==E.width||h!==E.height?{reset:{rects:!0}}:{}}}};function W2(e){const t=ci(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ar(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=bm(n)!==o||bm(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function S_(e){return Fn(e)?e:e.contextElement}function sl(e){const t=S_(e);if(!Ar(t))return Ia(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=W2(t);let a=(o?bm(n.width):n.width)/r,s=(o?bm(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const D0e=Ia(0);function V2(e){const t=li(e);return!w_()||!t.visualViewport?D0e:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function N0e(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==li(e)?!1:t}function Fs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=S_(e);let a=Ia(1);t&&(r?Fn(r)&&(a=sl(r)):a=sl(e));const s=N0e(o,n,r)?V2(o):Ia(0);let l=(i.left+s.x)/a.x,c=(i.top+s.y)/a.y,d=i.width/a.x,p=i.height/a.y;if(o){const m=li(o),h=r&&Fn(r)?li(r):r;let y=m.frameElement;for(;y&&r&&h!==m;){const v=sl(y),w=y.getBoundingClientRect(),_=ci(y),b=w.left+(y.clientLeft+parseFloat(_.paddingLeft))*v.x,S=w.top+(y.clientTop+parseFloat(_.paddingTop))*v.y;l*=v.x,c*=v.y,d*=v.x,p*=v.y,l+=b,c+=S,y=li(y).frameElement}}return wm({width:d,height:p,x:l,y:c})}function M0e(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Ar(n),o=Go(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0},s=Ia(1);const l=Ia(0);if((i||!i&&r!=="fixed")&&((Pa(n)!=="body"||hf(o))&&(a=xm(n)),Ar(n))){const c=Fs(n);s=sl(n),l.x=c.x+n.clientLeft,l.y=c.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+l.x,y:t.y*s.y-a.scrollTop*s.y+l.y}}function j0e(e){return Array.from(e.getClientRects())}function K2(e){return Fs(Go(e)).left+xm(e).scrollLeft}function L0e(e){const t=Go(e),n=xm(e),r=e.ownerDocument.body,i=ui(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=ui(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+K2(e);const s=-n.scrollTop;return ci(r).direction==="rtl"&&(a+=ui(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}function F0e(e,t){const n=li(e),r=Go(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const c=w_();(!c||c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function q0e(e,t){const n=Fs(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Ar(e)?sl(e):Ia(1),a=e.clientWidth*o.x,s=e.clientHeight*o.y,l=i*o.x,c=r*o.y;return{width:a,height:s,x:l,y:c}}function G2(e,t,n){let r;if(t==="viewport")r=F0e(e,n);else if(t==="document")r=L0e(Go(e));else if(Fn(t))r=q0e(t,n);else{const i=V2(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return wm(r)}function Y2(e,t){const n=Ls(e);return n===t||!Fn(n)||mf(n)?!1:ci(n).position==="fixed"||Y2(n,t)}function U0e(e,t){const n=t.get(e);if(n)return n;let r=Ra(e,[],!1).filter(s=>Fn(s)&&Pa(s)!=="body"),i=null;const o=ci(e).position==="fixed";let a=o?Ls(e):e;for(;Fn(a)&&!mf(a);){const s=ci(a),l=__(a);!l&&s.position==="fixed"&&(i=null),(o?!l&&!i:!l&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||hf(a)&&!l&&Y2(e,a))?r=r.filter(d=>d!==a):i=s,a=Ls(a)}return t.set(e,r),r}function B0e(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?U0e(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,d)=>{const p=G2(t,d,i);return c.top=ui(p.top,c.top),c.right=ol(p.right,c.right),c.bottom=ol(p.bottom,c.bottom),c.left=ui(p.left,c.left),c},G2(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function z0e(e){return W2(e)}function Z0e(e,t,n){const r=Ar(t),i=Go(t),o=n==="fixed",a=Fs(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=Ia(0);if(r||!r&&!o)if((Pa(t)!=="body"||hf(i))&&(s=xm(t)),r){const c=Fs(t,!0,o,t);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else i&&(l.x=K2(i));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function J2(e,t){return!Ar(e)||ci(e).position==="fixed"?null:t?t(e):e.offsetParent}function X2(e,t){const n=li(e);if(!Ar(e))return n;let r=J2(e,t);for(;r&&x0e(r)&&ci(r).position==="static";)r=J2(r,t);return r&&(Pa(r)==="html"||Pa(r)==="body"&&ci(r).position==="static"&&!__(r))?n:r||S0e(e)||n}const H0e=async function(e){let{reference:t,floating:n,strategy:r}=e;const i=this.getOffsetParent||X2,o=this.getDimensions;return{reference:Z0e(t,await i(n),r),floating:{x:0,y:0,...await o(n)}}};function W0e(e){return ci(e).direction==="rtl"}const V0e={convertOffsetParentRelativeRectToViewportRelativeRect:M0e,getDocumentElement:Go,getClippingRect:B0e,getOffsetParent:X2,getElementRects:H0e,getClientRects:j0e,getDimensions:z0e,getScale:sl,isElement:Fn,isRTL:W0e};function K0e(e,t){let n=null,r;const i=Go(e);function o(){clearTimeout(r),n&&n.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();const{left:c,top:d,width:p,height:m}=e.getBoundingClientRect();if(s||t(),!p||!m)return;const h=al(d),y=al(i.clientWidth-(c+p)),v=al(i.clientHeight-(d+m)),w=al(c),b={rootMargin:-h+"px "+-y+"px "+-v+"px "+-w+"px",threshold:ui(0,ol(1,l))||1};let S=!0;function A(E){const T=E[0].intersectionRatio;if(T!==l){if(!S)return a();T?a(!1,T):r=setTimeout(()=>{a(!1,1e-7)},100)}S=!1}try{n=new IntersectionObserver(A,{...b,root:i.ownerDocument})}catch{n=new IntersectionObserver(A,b)}n.observe(e)}return a(!0),o}function G0e(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=S_(e),d=i||o?[...c?Ra(c):[],...Ra(t)]:[];d.forEach(_=>{i&&_.addEventListener("scroll",n,{passive:!0}),o&&_.addEventListener("resize",n)});const p=c&&s?K0e(c,n):null;let m=-1,h=null;a&&(h=new ResizeObserver(_=>{let[b]=_;b&&b.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{h&&h.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let y,v=l?Fs(e):null;l&&w();function w(){const _=Fs(e);v&&(_.x!==v.x||_.y!==v.y||_.width!==v.width||_.height!==v.height)&&n(),v=_,y=requestAnimationFrame(w)}return n(),()=>{d.forEach(_=>{i&&_.removeEventListener("scroll",n),o&&_.removeEventListener("resize",n)}),p&&p(),h&&h.disconnect(),h=null,l&&cancelAnimationFrame(y)}}const Y0e=(e,t,n)=>{const r=new Map,i={platform:V0e,...n},o={...i.platform,_c:r};return $0e(e,t,{...i,platform:o})};var Sm=typeof document<"u"?C.useLayoutEffect:C.useEffect;function Em(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Em(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Em(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Q2(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function eD(e,t){const n=Q2(e);return Math.round(t*n)/n}function tD(e){const t=z.useRef(e);return Sm(()=>{t.current=e}),t}function J0e(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[d,p]=z.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=z.useState(r);Em(m,r)||h(r);const[y,v]=z.useState(null),[w,_]=z.useState(null),b=z.useCallback(q=>{q!=T.current&&(T.current=q,v(q))},[v]),S=z.useCallback(q=>{q!==j.current&&(j.current=q,_(q))},[_]),A=o||y,E=a||w,T=z.useRef(null),j=z.useRef(null),L=z.useRef(d),F=tD(l),M=tD(i),H=z.useCallback(()=>{if(!T.current||!j.current)return;const q={placement:t,strategy:n,middleware:m};M.current&&(q.platform=M.current),Y0e(T.current,j.current,q).then(Y=>{const ne={...Y,isPositioned:!0};re.current&&!Em(L.current,ne)&&(L.current=ne,r3.flushSync(()=>{p(ne)}))})},[m,t,n,M]);Sm(()=>{c===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,p(q=>({...q,isPositioned:!1})))},[c]);const re=z.useRef(!1);Sm(()=>(re.current=!0,()=>{re.current=!1}),[]),Sm(()=>{if(A&&(T.current=A),E&&(j.current=E),A&&E){if(F.current)return F.current(A,E,H);H()}},[A,E,H,F]);const Q=z.useMemo(()=>({reference:T,floating:j,setReference:b,setFloating:S}),[b,S]),G=z.useMemo(()=>({reference:A,floating:E}),[A,E]),V=z.useMemo(()=>{const q={position:n,left:0,top:0};if(!G.floating)return q;const Y=eD(G.floating,d.x),ne=eD(G.floating,d.y);return s?{...q,transform:"translate("+Y+"px, "+ne+"px)",...Q2(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Y,top:ne}},[n,s,G.floating,d.x,d.y]);return z.useMemo(()=>({...d,update:H,refs:Q,elements:G,floatingStyles:V}),[d,H,Q,G,V])}/*!
|
|
419
419
|
* tabbable 6.2.0
|
|
420
420
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
421
|
-
*/var X0e=["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])"],E_=X0e.join(","),nD=typeof Element>"u",yf=nD?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Am=!nD&&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},Cm=function e(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),o=i===""||i==="true",a=o||n&&t&&e(t.parentNode);return a},Q0e=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},e_e=function(t,n,r){if(Cm(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(E_));return n&&yf.call(t,E_)&&i.unshift(t),i=i.filter(r),i},t_e=function e(t,n,r){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!Cm(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=e(l,!0,r);r.flatten?i.push.apply(i,c):i.push({scopeParent:a,candidates:c})}else{var d=yf.call(a,E_);d&&r.filter(a)&&(n||!t.includes(a))&&i.push(a);var p=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),m=!Cm(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(p&&m){var h=e(p===!0?a.children:p.children,!0,r);r.flatten?i.push.apply(i,h):i.push({scopeParent:a,candidates:h})}else o.unshift.apply(o,a.children)}}return i},rD=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},iD=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Q0e(t))&&!rD(t)?0:t.tabIndex},n_e=function(t,n){var r=iD(t);return r<0&&n&&!rD(t)?0:r},r_e=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},oD=function(t){return t.tagName==="INPUT"},i_e=function(t){return oD(t)&&t.type==="hidden"},o_e=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},a_e=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},s_e=function(t){if(!t.name)return!0;var n=t.form||Am(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var o=a_e(i,t.form);return!o||o===t},u_e=function(t){return oD(t)&&t.type==="radio"},l_e=function(t){return u_e(t)&&!s_e(t)},c_e=function(t){var n,r=t&&Am(t),i=(n=r)===null||n===void 0?void 0:n.host,o=!1;if(r&&r!==t){var a,s,l;for(o=!!((a=i)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!o&&i;){var c,d,p;r=Am(i),i=(c=r)===null||c===void 0?void 0:c.host,o=!!((d=i)!==null&&d!==void 0&&(p=d.ownerDocument)!==null&&p!==void 0&&p.contains(i))}}return o},aD=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},f_e=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var o=yf.call(t,"details>summary:first-of-type"),a=o?t.parentElement:t;if(yf.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var s=t;t;){var l=t.parentElement,c=Am(t);if(l&&!l.shadowRoot&&i(l)===!0)return aD(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(c_e(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return aD(t);return!1},d_e=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return yf.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},p_e=function(t,n){return!(n.disabled||Cm(n)||i_e(n)||f_e(n,t)||o_e(n)||d_e(n))},sD=function(t,n){return!(l_e(n)||iD(n)<0||!p_e(t,n))},h_e=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},m_e=function e(t){var n=[],r=[];return t.forEach(function(i,o){var a=!!i.scopeParent,s=a?i.scopeParent:i,l=n_e(s,a),c=a?e(i.candidates):s;l===0?a?n.push.apply(n,c):n.push(s):r.push({documentOrder:o,tabIndex:l,item:i,isScope:a,content:c})}),r.sort(r_e).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},A_=function(t,n){n=n||{};var r;return n.getShadowRoot?r=t_e([t],n.includeContainer,{filter:sD.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:h_e}):r=e_e(t,n.includeContainer,sD.bind(null,n)),m_e(r)};const C_="ArrowUp",Om="ArrowDown",ul="ArrowLeft",gf="ArrowRight";function Tm(e,t,n){return Math.floor(e/t)!==n}function vf(e,t){return t<0||t>=e.current.length}function O_(e,t){return Cr(e,{disabledIndices:t})}function uD(e,t){return Cr(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Cr(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:o=1}=t===void 0?{}:t;const a=e.current;let s=n;do{var l,c;s=s+(r?-o:o)}while(s>=0&&s<=a.length-1&&(i?i.includes(s):a[s]==null||(l=a[s])!=null&&l.hasAttribute("disabled")||((c=a[s])==null?void 0:c.getAttribute("aria-disabled"))==="true"));return s}function y_e(e,t){let{event:n,orientation:r,loop:i,cols:o,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:c,stopEvent:d=!1}=t,p=c;if(n.key===C_){if(d&&hr(n),c===-1)p=l;else if(p=Cr(e,{startingIndex:p,amount:o,decrement:!0,disabledIndices:a}),i&&(c-o<s||p<0)){const m=c%o,h=l%o,y=l-(h-m);h===m?p=l:p=h>m?y:y-o}vf(e,p)&&(p=c)}if(n.key===Om&&(d&&hr(n),c===-1?p=s:(p=Cr(e,{startingIndex:c,amount:o,disabledIndices:a}),i&&c+o>l&&(p=Cr(e,{startingIndex:c%o-o,amount:o,disabledIndices:a}))),vf(e,p)&&(p=c)),r==="both"){const m=al(c/o);n.key===gf&&(d&&hr(n),c%o!==o-1?(p=Cr(e,{startingIndex:c,disabledIndices:a}),i&&Tm(p,o,m)&&(p=Cr(e,{startingIndex:c-c%o-1,disabledIndices:a}))):i&&(p=Cr(e,{startingIndex:c-c%o-1,disabledIndices:a})),Tm(p,o,m)&&(p=c)),n.key===ul&&(d&&hr(n),c%o!==0?(p=Cr(e,{startingIndex:c,disabledIndices:a,decrement:!0}),i&&Tm(p,o,m)&&(p=Cr(e,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:a}))):i&&(p=Cr(e,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:a})),Tm(p,o,m)&&(p=c));const h=al(l/o)===m;vf(e,p)&&(i&&h?p=n.key===ul?l:Cr(e,{startingIndex:c-c%o-1,disabledIndices:a}):p=c)}return p}let lD=0;function Yo(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(lD);const o=()=>e==null?void 0:e.focus({preventScroll:n});i?o():lD=requestAnimationFrame(o)}var er=typeof document<"u"?C.useLayoutEffect:C.useEffect;function $m(){return $m=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},$m.apply(this,arguments)}let T_=!1,g_e=0;const cD=()=>"floating-ui-"+g_e++;function v_e(){const[e,t]=z.useState(()=>T_?cD():void 0);return er(()=>{e==null&&t(cD())},[]),z.useEffect(()=>{T_||(T_=!0)},[]),e}const $_=z["useId".toString()]||v_e;function b_e(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(i=>i!==n))||[])}}}const __e=z.createContext(null),w_e=z.createContext(null),fD=()=>{var e;return((e=z.useContext(__e))==null?void 0:e.id)||null},km=()=>z.useContext(w_e);function bf(e){return"data-floating-ui-"+e}function Na(e){const t=C.useRef(e);return er(()=>{t.current=e}),t}function x_e(e,t){var n;let r=[],i=(n=e.find(o=>o.id===t))==null?void 0:n.parentId;for(;i;){const o=e.find(a=>a.id===i);i=o==null?void 0:o.parentId,o&&(r=r.concat(o))}return r}function ll(e,t){let n=e.filter(i=>{var o;return i.parentId===t&&((o=i.context)==null?void 0:o.open)}),r=n;for(;r.length;)r=e.filter(i=>{var o;return(o=r)==null?void 0:o.some(a=>{var s;return i.parentId===a.id&&((s=i.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function S_e(e,t){let n,r=-1;function i(o,a){a>r&&(n=o,r=a),ll(e,o).forEach(l=>{i(l.id,a+1)})}return i(t,0),e.find(o=>o.id===n)}let cl=new WeakMap,Im=new WeakSet,Pm={},k_=0;const E_e=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,dD=e=>e&&(e.host||dD(e.parentNode)),A_e=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=dD(n);return e.contains(r)?r:null}).filter(n=>n!=null);function C_e(e,t,n,r){const i="data-floating-ui-inert",o=r?"inert":n?"aria-hidden":null,a=A_e(t,e),s=new Set,l=new Set(a),c=[];Pm[i]||(Pm[i]=new WeakMap);const d=Pm[i];a.forEach(p),m(t),s.clear();function p(h){!h||s.has(h)||(s.add(h),h.parentNode&&p(h.parentNode))}function m(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,y=>{if(s.has(y))m(y);else{const v=o?y.getAttribute(o):null,w=v!==null&&v!=="false",_=(cl.get(y)||0)+1,b=(d.get(y)||0)+1;cl.set(y,_),d.set(y,b),c.push(y),_===1&&w&&Im.add(y),b===1&&y.setAttribute(i,""),!w&&o&&y.setAttribute(o,"true")}})}return k_++,()=>{c.forEach(h=>{const y=(cl.get(h)||0)-1,v=(d.get(h)||0)-1;cl.set(h,y),d.set(h,v),y||(!Im.has(h)&&o&&h.removeAttribute(o),Im.delete(h)),v||h.removeAttribute(i)}),k_--,k_||(cl=new WeakMap,cl=new WeakMap,Im=new WeakSet,Pm={})}}function pD(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Zi(e[0]).body;return C_e(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const I_=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function hD(e,t){const n=A_(e,I_());t==="prev"&&n.reverse();const r=n.indexOf(Da(Zi(e)));return n.slice(r+1)[0]}function mD(){return hD(document.body,"next")}function yD(){return hD(document.body,"prev")}function _f(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Yr(n,r)}function O_e(e){A_(e,I_()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function T_e(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 P_={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 $_e;function gD(e){e.key==="Tab"&&(e.target,clearTimeout($_e))}const Rm=z.forwardRef(function(t,n){const[r,i]=z.useState();er(()=>(q2()&&i("button"),document.addEventListener("keydown",gD),()=>{document.removeEventListener("keydown",gD)}),[]);const o={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[bf("focus-guard")]:"",style:P_};return z.createElement("span",$m({},t,o))}),vD=z.createContext(null);function k_e(e){let{id:t,root:n}=e===void 0?{}:e;const[r,i]=z.useState(null),o=$_(),a=bD(),s=z.useMemo(()=>({id:t,root:n,portalContext:a,uniqueId:o}),[t,n,a,o]),l=z.useRef();return er(()=>()=>{r==null||r.remove()},[r,s]),er(()=>{if(l.current===s)return;l.current=s;const{id:c,root:d,portalContext:p,uniqueId:m}=s,h=c?document.getElementById(c):null,y=bf("portal");if(h){const v=document.createElement("div");v.id=m,v.setAttribute(y,""),h.appendChild(v),i(v)}else{let v=d||(p==null?void 0:p.portalNode);v&&!Fn(v)&&(v=v.current),v=v||document.body;let w=null;c&&(w=document.createElement("div"),w.id=c,v.appendChild(w));const _=document.createElement("div");_.id=m,_.setAttribute(y,""),v=w||v,v.appendChild(_),i(_)}},[s]),r}function I_e(e){let{children:t,id:n,root:r=null,preserveTabOrder:i=!0}=e;const o=k_e({id:n,root:r}),[a,s]=z.useState(null),l=z.useRef(null),c=z.useRef(null),d=z.useRef(null),p=z.useRef(null),m=!!a&&!a.modal&&a.open&&i&&!!(r||o);return z.useEffect(()=>{if(!o||!i||a!=null&&a.modal)return;function h(y){o&&_f(y)&&(y.type==="focusin"?T_e:O_e)(o)}return o.addEventListener("focusin",h,!0),o.addEventListener("focusout",h,!0),()=>{o.removeEventListener("focusin",h,!0),o.removeEventListener("focusout",h,!0)}},[o,i,a==null?void 0:a.modal]),z.createElement(vD.Provider,{value:z.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:p,portalNode:o,setFocusManagerState:s}),[i,o])},m&&o&&z.createElement(Rm,{"data-type":"outside",ref:l,onFocus:h=>{if(_f(h,o)){var y;(y=d.current)==null||y.focus()}else{const v=yD()||(a==null?void 0:a.refs.domReference.current);v==null||v.focus()}}}),m&&o&&z.createElement("span",{"aria-owns":o.id,style:P_}),o&&Xi.createPortal(t,o),m&&o&&z.createElement(Rm,{"data-type":"outside",ref:c,onFocus:h=>{if(_f(h,o)){var y;(y=p.current)==null||y.focus()}else{const v=mD()||(a==null?void 0:a.refs.domReference.current);v==null||v.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,h.nativeEvent))}}}))}const bD=()=>z.useContext(vD),P_e=z.forwardRef(function(t,n){return z.createElement("button",$m({},t,{type:"button",ref:n,tabIndex:-1,style:P_}))});function R_e(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],guards:o=!0,initialFocus:a=0,returnFocus:s=!0,modal:l=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:d=!0}=e,{open:p,refs:m,nodeId:h,onOpenChange:y,events:v,dataRef:w,elements:{domReference:_,floating:b}}=t,S=E_e()?o:!0,A=Na(i),E=Na(a),T=Na(s),j=km(),L=bD(),F=typeof a=="number"&&a<0,M=z.useRef(null),H=z.useRef(null),re=z.useRef(!1),Q=z.useRef(null),G=z.useRef(!1),V=L!=null,q=_&&_.getAttribute("role")==="combobox"&&z2(_)&&F,Y=z.useCallback(function(ue){return ue===void 0&&(ue=b),ue?A_(ue,I_()):[]},[b]),ne=z.useCallback(ue=>{const Oe=Y(ue);return A.current.map(N=>_&&N==="reference"?_:b&&N==="floating"?b:Oe).filter(Boolean).flat()},[_,b,A,Y]);z.useEffect(()=>{if(r||!l)return;function ue(N){if(N.key==="Tab"){Yr(b,Da(Zi(b)))&&Y().length===0&&!q&&hr(N);const Ne=ne(),qe=B2(N);A.current[0]==="reference"&&qe===_&&(hr(N),N.shiftKey?Yo(Ne[Ne.length-1]):Yo(Ne[1])),A.current[1]==="floating"&&qe===b&&N.shiftKey&&(hr(N),Yo(Ne[0]))}}const Oe=Zi(b);return Oe.addEventListener("keydown",ue),()=>{Oe.removeEventListener("keydown",ue)}},[r,_,b,l,A,m,q,Y,ne]),z.useEffect(()=>{if(r||!d)return;function ue(){G.current=!0,setTimeout(()=>{G.current=!1})}function Oe(N){const Ne=N.relatedTarget;queueMicrotask(()=>{const qe=!(Yr(_,Ne)||Yr(b,Ne)||Yr(Ne,b)||Yr(L==null?void 0:L.portalNode,Ne)||Ne!=null&&Ne.hasAttribute(bf("focus-guard"))||j&&(ll(j.nodesRef.current,h).find(Me=>{var Je,rt;return Yr((Je=Me.context)==null?void 0:Je.elements.floating,Ne)||Yr((rt=Me.context)==null?void 0:rt.elements.domReference,Ne)})||x_e(j.nodesRef.current,h).find(Me=>{var Je,rt;return((Je=Me.context)==null?void 0:Je.elements.floating)===Ne||((rt=Me.context)==null?void 0:rt.elements.domReference)===Ne})));Ne&&qe&&!G.current&&Ne!==Q.current&&(re.current=!0,y(!1,N))})}if(b&&Ar(_))return _.addEventListener("focusout",Oe),_.addEventListener("pointerdown",ue),!l&&b.addEventListener("focusout",Oe),()=>{_.removeEventListener("focusout",Oe),_.removeEventListener("pointerdown",ue),!l&&b.removeEventListener("focusout",Oe)}},[r,_,b,l,h,j,L,y,d]),z.useEffect(()=>{var ue;if(r)return;const Oe=Array.from((L==null||(ue=L.portalNode)==null?void 0:ue.querySelectorAll("["+bf("portal")+"]"))||[]);if(b){const N=[b,...Oe,M.current,H.current,A.current.includes("reference")||q?_:null].filter(qe=>qe!=null),Ne=l?pD(N,S,!S):pD(N);return()=>{Ne()}}},[r,_,b,l,A,L,q,S]),er(()=>{if(r||!b)return;const ue=Zi(b),Oe=Da(ue);queueMicrotask(()=>{const N=ne(b),Ne=E.current,qe=(typeof Ne=="number"?N[Ne]:Ne.current)||b,Me=Yr(b,Oe);!F&&!Me&&p&&Yo(qe,{preventScroll:qe===b})})},[r,p,b,F,ne,E]),er(()=>{if(r||!b)return;let ue=!1;const Oe=Zi(b),N=Da(Oe),Ne=w.current;Q.current=N;function qe(Me){if(Me.type==="escapeKey"&&m.domReference.current&&(Q.current=m.domReference.current),["referencePress","escapeKey"].includes(Me.type))return;const Je=Me.data.returnFocus;typeof Je=="object"?(re.current=!1,ue=Je.preventScroll):re.current=!Je}return v.on("dismiss",qe),()=>{v.off("dismiss",qe);const Me=Da(Oe);(Yr(b,Me)||j&&ll(j.nodesRef.current,h).some(rt=>{var Ke;return Yr((Ke=rt.context)==null?void 0:Ke.elements.floating,Me)})||Ne.openEvent&&["click","mousedown"].includes(Ne.openEvent.type))&&m.domReference.current&&(Q.current=m.domReference.current),T.current&&Ar(Q.current)&&!re.current&&Yo(Q.current,{cancelPrevious:!1,preventScroll:ue})}},[r,b,T,w,m,v,j,h]),er(()=>{if(!(r||!L))return L.setFocusManagerState({modal:l,closeOnFocusOut:d,open:p,onOpenChange:y,refs:m}),()=>{L.setFocusManagerState(null)}},[r,L,l,p,y,m,d]),er(()=>{if(!r&&b&&typeof MutationObserver=="function"&&!F){const ue=()=>{const N=b.getAttribute("tabindex");A.current.includes("floating")||Da(Zi(b))!==m.domReference.current&&Y().length===0?N!=="0"&&b.setAttribute("tabindex","0"):N!=="-1"&&b.setAttribute("tabindex","-1")};ue();const Oe=new MutationObserver(ue);return Oe.observe(b,{childList:!0,subtree:!0,attributes:!0}),()=>{Oe.disconnect()}}},[r,b,m,A,Y,F]);function ce(ue){return r||!c||!l?null:z.createElement(P_e,{ref:ue==="start"?M:H,onClick:Oe=>y(!1,Oe.nativeEvent)},typeof c=="string"?c:"Dismiss")}const P=!r&&S&&!q&&(V||l);return z.createElement(z.Fragment,null,P&&z.createElement(Rm,{"data-type":"inside",ref:L==null?void 0:L.beforeInsideRef,onFocus:ue=>{if(l){const N=ne();Yo(i[0]==="reference"?N[0]:N[N.length-1])}else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(re.current=!1,_f(ue,L.portalNode)){const N=mD()||_;N==null||N.focus()}else{var Oe;(Oe=L.beforeOutsideRef.current)==null||Oe.focus()}}}),!q&&ce("start"),n,ce("end"),P&&z.createElement(Rm,{"data-type":"inside",ref:L==null?void 0:L.afterInsideRef,onFocus:ue=>{if(l)Yo(ne()[0]);else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(d&&(re.current=!0),_f(ue,L.portalNode)){const N=yD()||_;N==null||N.focus()}else{var Oe;(Oe=L.afterOutsideRef.current)==null||Oe.focus()}}}))}function _D(e){return Ar(e.target)&&e.target.tagName==="BUTTON"}function wD(e){return z2(e)}function D_e(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:o}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:d=!0}=t,p=z.useRef(),m=z.useRef(!1);return z.useMemo(()=>a?{reference:{onPointerDown(h){p.current=h.pointerType},onMouseDown(h){h.button===0&&(U2(p.current,!0)&&c||s!=="click"&&(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")?r(!1,h.nativeEvent):(h.preventDefault(),r(!0,h.nativeEvent))))},onClick(h){if(s==="mousedown"&&p.current){p.current=void 0;return}U2(p.current,!0)&&c||(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="click")?r(!1,h.nativeEvent):r(!0,h.nativeEvent))},onKeyDown(h){p.current=void 0,!(h.defaultPrevented||!d||_D(h))&&(h.key===" "&&!wD(o)&&(h.preventDefault(),m.current=!0),h.key==="Enter"&&r(!(n&&l),h.nativeEvent))},onKeyUp(h){h.defaultPrevented||!d||_D(h)||wD(o)||h.key===" "&&m.current&&(m.current=!1,r(!(n&&l),h.nativeEvent))}}}:{},[a,i,s,c,d,o,l,n,r])}const N_e=z["useInsertionEffect".toString()]||(e=>e());function Ma(e){const t=z.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return N_e(()=>{t.current=e}),z.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}const M_e={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},j_e={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},L_e=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 F_e(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:i,nodeId:o,elements:{reference:a,domReference:s,floating:l},dataRef:c}=e,{enabled:d=!0,escapeKey:p=!0,outsidePress:m=!0,outsidePressEvent:h="pointerdown",referencePress:y=!1,referencePressEvent:v="pointerdown",ancestorScroll:w=!1,bubbles:_}=t,b=km(),S=fD()!=null,A=Ma(typeof m=="function"?m:()=>!1),E=typeof m=="function"?A:m,T=z.useRef(!1),{escapeKeyBubbles:j,outsidePressBubbles:L}=L_e(_),F=Ma(H=>{if(!n||!d||!p||H.key!=="Escape")return;const re=b?ll(b.nodesRef.current,o):[];if(!j&&(H.stopPropagation(),re.length>0)){let Q=!0;if(re.forEach(G=>{var V;if((V=G.context)!=null&&V.open&&!G.context.dataRef.current.__escapeKeyBubbles){Q=!1;return}}),!Q)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,C0e(H)?H.nativeEvent:H)}),M=Ma(H=>{const re=T.current;if(T.current=!1,re||typeof E=="function"&&!E(H))return;const Q=B2(H),G="["+bf("inert")+"]",V=Zi(l).querySelectorAll(G);let q=Fn(Q)?Q:null;for(;q&&!mf(q);){const ce=Ls(q);if(ce===Zi(l).body||!Fn(ce))break;q=ce}if(V.length&&Fn(Q)&&!O0e(Q)&&!Yr(Q,l)&&Array.from(V).every(ce=>!Yr(q,ce)))return;if(Ar(Q)&&l){const ce=Q.clientWidth>0&&Q.scrollWidth>Q.clientWidth,P=Q.clientHeight>0&&Q.scrollHeight>Q.clientHeight;let ue=P&&H.offsetX>Q.clientWidth;if(P&&ci(Q).direction==="rtl"&&(ue=H.offsetX<=Q.offsetWidth-Q.clientWidth),ue||ce&&H.offsetY>Q.clientHeight)return}const Y=b&&ll(b.nodesRef.current,o).some(ce=>{var P;return x_(H,(P=ce.context)==null?void 0:P.elements.floating)});if(x_(H,l)||x_(H,s)||Y)return;const ne=b?ll(b.nodesRef.current,o):[];if(ne.length>0){let ce=!0;if(ne.forEach(P=>{var ue;if((ue=P.context)!=null&&ue.open&&!P.context.dataRef.current.__outsidePressBubbles){ce=!1;return}}),!ce)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:S?{preventScroll:!0}:L2(H)||F2(H)}}),r(!1,H)});return z.useEffect(()=>{if(!n||!d)return;c.current.__escapeKeyBubbles=j,c.current.__outsidePressBubbles=L;function H(G){r(!1,G)}const re=Zi(l);p&&re.addEventListener("keydown",F),E&&re.addEventListener(h,M);let Q=[];return w&&(Fn(s)&&(Q=Ra(s)),Fn(l)&&(Q=Q.concat(Ra(l))),!Fn(a)&&a&&a.contextElement&&(Q=Q.concat(Ra(a.contextElement)))),Q=Q.filter(G=>{var V;return G!==((V=re.defaultView)==null?void 0:V.visualViewport)}),Q.forEach(G=>{G.addEventListener("scroll",H,{passive:!0})}),()=>{p&&re.removeEventListener("keydown",F),E&&re.removeEventListener(h,M),Q.forEach(G=>{G.removeEventListener("scroll",H)})}},[c,l,s,a,p,E,h,n,r,w,d,j,L,F,M]),z.useEffect(()=>{T.current=!1},[E,h]),z.useMemo(()=>d?{reference:{onKeyDown:F,[M_e[v]]:H=>{y&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,H.nativeEvent))}},floating:{onKeyDown:F,[j_e[h]]:()=>{T.current=!0}}}:{},[d,i,y,h,v,r,F])}let R_;process.env.NODE_ENV!=="production"&&(R_=new Set);function q_e(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:i}=e;if(process.env.NODE_ENV!=="production"){var o;const j="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if((o=e.elements)!=null&&o.reference&&!Fn(e.elements.reference)){var a;if(!((a=R_)!=null&&a.has(j))){var s;(s=R_)==null||s.add(j),console.error(j)}}}const[l,c]=z.useState(null),d=((t=e.elements)==null?void 0:t.reference)||l,p=J0e(e),m=km(),h=Ma((j,L)=>{j&&(v.current.openEvent=L),r==null||r(j,L)}),y=z.useRef(null),v=z.useRef({}),w=z.useState(()=>b_e())[0],_=$_(),b=z.useCallback(j=>{const L=Fn(j)?{getBoundingClientRect:()=>j.getBoundingClientRect(),contextElement:j}:j;p.refs.setReference(L)},[p.refs]),S=z.useCallback(j=>{(Fn(j)||j===null)&&(y.current=j,c(j)),(Fn(p.refs.reference.current)||p.refs.reference.current===null||j!==null&&!Fn(j))&&p.refs.setReference(j)},[p.refs]),A=z.useMemo(()=>({...p.refs,setReference:S,setPositionReference:b,domReference:y}),[p.refs,S,b]),E=z.useMemo(()=>({...p.elements,domReference:d}),[p.elements,d]),T=z.useMemo(()=>({...p,refs:A,elements:E,dataRef:v,nodeId:i,floatingId:_,events:w,open:n,onOpenChange:h}),[p,i,_,w,n,h,A,E]);return er(()=>{const j=m==null?void 0:m.nodesRef.current.find(L=>L.id===i);j&&(j.context=T)}),z.useMemo(()=>({...p,context:T,refs:A,elements:E}),[p,A,E,T])}function D_(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(i=>i?i[n]:null).concat(e).reduce((i,o)=>(o&&Object.entries(o).forEach(a=>{let[s,l]=a;if(s.indexOf("on")===0){if(r.has(s)||r.set(s,[]),typeof l=="function"){var c;(c=r.get(s))==null||c.push(l),i[s]=function(){for(var d,p=arguments.length,m=new Array(p),h=0;h<p;h++)m[h]=arguments[h];return(d=r.get(s))==null?void 0:d.map(y=>y(...m)).find(y=>y!==void 0)}}}else i[s]=l}),i),{})}}function U_e(e){e===void 0&&(e=[]);const t=e,n=z.useCallback(o=>D_(o,e,"reference"),t),r=z.useCallback(o=>D_(o,e,"floating"),t),i=z.useCallback(o=>D_(o,e,"item"),e.map(o=>o==null?void 0:o.item));return z.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])}let xD=!1;function Dm(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function SD(e,t){return Dm(t,e===C_||e===Om,e===ul||e===gf)}function N_(e,t,n){return Dm(t,e===Om,n?e===ul:e===gf)||e==="Enter"||e==" "||e===""}function B_e(e,t,n){return Dm(t,n?e===ul:e===gf,e===Om)}function ED(e,t,n){return Dm(t,n?e===gf:e===ul,e===C_)}function z_e(e,t){const{open:n,onOpenChange:r,refs:i,elements:{domReference:o,floating:a}}=e,{listRef:s,activeIndex:l,onNavigate:c=()=>{},enabled:d=!0,selectedIndex:p=null,allowEscape:m=!1,loop:h=!1,nested:y=!1,rtl:v=!1,virtual:w=!1,focusItemOnOpen:_="auto",focusItemOnHover:b=!0,openOnArrowKeyDown:S=!0,disabledIndices:A=void 0,orientation:E="vertical",cols:T=1,scrollItemIntoView:j=!0,virtualItemRef:L}=t;process.env.NODE_ENV!=="production"&&(m&&(h||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),w||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),E==="vertical"&&T>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const F=fD(),M=km(),H=Ma(c),re=z.useRef(_),Q=z.useRef(p??-1),G=z.useRef(null),V=z.useRef(!0),q=z.useRef(H),Y=z.useRef(!!a),ne=z.useRef(!1),ce=z.useRef(!1),P=Na(A),ue=Na(n),Oe=Na(j),[N,Ne]=z.useState(),[qe,Me]=z.useState(),Je=Ma(function(Pe,Ae,Fe){Fe===void 0&&(Fe=!1);const $e=Pe.current[Ae.current];$e&&(w?(Ne($e.id),M==null||M.events.emit("virtualfocus",$e),L&&(L.current=$e)):Yo($e,{preventScroll:!0,sync:A0e()&&q2()?xD||ne.current:!1}),requestAnimationFrame(()=>{const Ze=Oe.current;Ze&&$e&&(Fe||!V.current)&&($e.scrollIntoView==null||$e.scrollIntoView(typeof Ze=="boolean"?{block:"nearest",inline:"nearest"}:Ze))}))});er(()=>{document.createElement("div").focus({get preventScroll(){return xD=!0,!1}})},[]),er(()=>{d&&(n&&a?re.current&&p!=null&&(ce.current=!0,H(p)):Y.current&&(Q.current=-1,q.current(null)))},[d,n,a,p,H]),er(()=>{if(d&&n&&a)if(l==null){if(ne.current=!1,p!=null)return;if(Y.current&&(Q.current=-1,Je(s,Q)),!Y.current&&re.current&&(G.current!=null||re.current===!0&&G.current==null)){let Pe=0;const Ae=()=>{s.current[0]==null?(Pe<2&&(Pe?requestAnimationFrame:queueMicrotask)(Ae),Pe++):(Q.current=G.current==null||N_(G.current,E,v)||y?O_(s,P.current):uD(s,P.current),G.current=null,H(Q.current))};Ae()}}else vf(s,l)||(Q.current=l,Je(s,Q,ce.current),ce.current=!1)},[d,n,a,l,p,y,s,E,v,H,Je,P]),er(()=>{var Pe,Ae;if(!d||a||!M||w||!Y.current)return;const Fe=M.nodesRef.current,$e=(Pe=Fe.find(K=>K.id===F))==null||(Ae=Pe.context)==null?void 0:Ae.elements.floating,Ze=Da(Zi(a)),lt=Fe.some(K=>K.context&&Yr(K.context.elements.floating,Ze));$e&&!lt&&V.current&&$e.focus({preventScroll:!0})},[d,a,M,F,w]),er(()=>{if(!d||!M||!w||F)return;function Pe(Ae){Me(Ae.id),L&&(L.current=Ae)}return M.events.on("virtualfocus",Pe),()=>{M.events.off("virtualfocus",Pe)}},[d,M,w,F,L]),er(()=>{q.current=H,Y.current=!!a}),er(()=>{n||(G.current=null)},[n]);const rt=l!=null,Ke=z.useMemo(()=>{function Pe(Fe){if(!n)return;const $e=s.current.indexOf(Fe);$e!==-1&&H($e)}return{onFocus(Fe){let{currentTarget:$e}=Fe;Pe($e)},onClick:Fe=>{let{currentTarget:$e}=Fe;return $e.focus({preventScroll:!0})},...b&&{onMouseMove(Fe){let{currentTarget:$e}=Fe;Pe($e)},onPointerLeave(Fe){let{pointerType:$e}=Fe;!V.current||$e==="touch"||(Q.current=-1,Je(s,Q),H(null),w||Yo(i.floating.current,{preventScroll:!0}))}}}},[n,i,Je,b,s,H,w]);return z.useMemo(()=>{if(!d)return{};const Pe=P.current;function Ae(K){if(V.current=!1,ne.current=!0,!ue.current&&K.currentTarget===i.floating.current)return;if(y&&ED(K.key,E,v)){hr(K),r(!1,K.nativeEvent),Ar(o)&&!w&&o.focus();return}const pe=Q.current,Te=O_(s,Pe),Se=uD(s,Pe);if(K.key==="Home"&&(hr(K),Q.current=Te,H(Q.current)),K.key==="End"&&(hr(K),Q.current=Se,H(Q.current)),!(T>1&&(Q.current=y_e(s,{event:K,orientation:E,loop:h,cols:T,disabledIndices:Pe,minIndex:Te,maxIndex:Se,prevIndex:Q.current,stopEvent:!0}),H(Q.current),E==="both"))&&SD(K.key,E)){if(hr(K),n&&!w&&Da(K.currentTarget.ownerDocument)===K.currentTarget){Q.current=N_(K.key,E,v)?Te:Se,H(Q.current);return}N_(K.key,E,v)?h?Q.current=pe>=Se?m&&pe!==s.current.length?-1:Te:Cr(s,{startingIndex:pe,disabledIndices:Pe}):Q.current=Math.min(Se,Cr(s,{startingIndex:pe,disabledIndices:Pe})):h?Q.current=pe<=Te?m&&pe!==-1?s.current.length:Se:Cr(s,{startingIndex:pe,decrement:!0,disabledIndices:Pe}):Q.current=Math.max(Te,Cr(s,{startingIndex:pe,decrement:!0,disabledIndices:Pe})),vf(s,Q.current)?H(null):H(Q.current)}}function Fe(K){_==="auto"&&L2(K.nativeEvent)&&(re.current=!0)}function $e(K){re.current=_,_==="auto"&&F2(K.nativeEvent)&&(re.current=!0)}const Ze=w&&n&&rt&&{"aria-activedescendant":qe||N},lt=s.current.find(K=>(K==null?void 0:K.id)===N);return{reference:{...Ze,onKeyDown(K){V.current=!1;const pe=K.key.indexOf("Arrow")===0,Te=B_e(K.key,E,v),Se=ED(K.key,E,v),et=SD(K.key,E),Ue=(y?Te:et)||K.key==="Enter"||K.key.trim()==="";if(w&&n){const ie=M==null?void 0:M.nodesRef.current.find(xe=>xe.parentId==null),ge=M&&ie?S_e(M.nodesRef.current,ie.id):null;if(pe&&ge&&L){const xe=new KeyboardEvent("keydown",{key:K.key,bubbles:!0});if(Te||Se){var ot,It;const Be=((ot=ge.context)==null?void 0:ot.elements.domReference)===K.currentTarget,ct=Se&&!Be?(It=ge.context)==null?void 0:It.elements.domReference:Te?lt:null;ct&&(hr(K),ct.dispatchEvent(xe),Me(void 0))}if(et&&ge.context&&ge.context.open&&ge.parentId&&K.currentTarget!==ge.context.elements.domReference){var mt;hr(K),(mt=ge.context.elements.domReference)==null||mt.dispatchEvent(xe);return}}return Ae(K)}if(!(!n&&!S&&pe)){if(Ue&&(G.current=y&&et?null:K.key),y){Te&&(hr(K),n?(Q.current=O_(s,Pe),H(Q.current)):r(!0,K.nativeEvent));return}et&&(p!=null&&(Q.current=p),hr(K),!n&&S?r(!0,K.nativeEvent):Ae(K),n&&H(Q.current))}},onFocus(){n&&H(null)},onPointerDown:$e,onMouseDown:Fe,onClick:Fe},floating:{"aria-orientation":E==="both"?void 0:E,...Ze,onKeyDown:Ae,onPointerMove(){V.current=!0}},item:Ke}},[o,i,N,qe,P,ue,s,d,E,v,w,n,rt,y,p,S,m,T,h,_,H,r,Ke,M,L])}function Z_e(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:i=!0,role:o="dialog"}=t,a=$_();return z.useMemo(()=>{const s={id:r,role:o};return i?o==="tooltip"?{reference:{"aria-describedby":n?r:void 0},floating:s}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":o==="alertdialog"?"dialog":o,"aria-controls":n?r:void 0,...o==="listbox"&&{role:"combobox"},...o==="menu"&&{id:a}},floating:{...s,...o==="menu"&&{"aria-labelledby":a}}}:{}},[i,o,n,r,a])}function H_e(e,t){var n;const{open:r,dataRef:i}=e,{listRef:o,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:d=null,resetMs:p=750,ignoreKeys:m=[],selectedIndex:h=null}=t,y=z.useRef(),v=z.useRef(""),w=z.useRef((n=h??a)!=null?n:-1),_=z.useRef(null),b=Ma(s),S=Ma(l),A=Na(d),E=Na(m);return er(()=>{r&&(clearTimeout(y.current),_.current=null,v.current="")},[r]),er(()=>{if(r&&v.current===""){var T;w.current=(T=h??a)!=null?T:-1}},[r,h,a]),z.useMemo(()=>{if(!c)return{};function T(F){F?i.current.typing||(i.current.typing=F,S(F)):i.current.typing&&(i.current.typing=F,S(F))}function j(F,M,H){const re=A.current?A.current(M,H):M.find(Q=>(Q==null?void 0:Q.toLocaleLowerCase().indexOf(H.toLocaleLowerCase()))===0);return re?F.indexOf(re):-1}function L(F){const M=o.current;if(v.current.length>0&&v.current[0]!==" "&&(j(M,M,v.current)===-1?T(!1):F.key===" "&&hr(F)),M==null||E.current.includes(F.key)||F.key.length!==1||F.ctrlKey||F.metaKey||F.altKey)return;r&&F.key!==" "&&(hr(F),T(!0)),M.every(G=>{var V,q;return G?((V=G[0])==null?void 0:V.toLocaleLowerCase())!==((q=G[1])==null?void 0:q.toLocaleLowerCase()):!0})&&v.current===F.key&&(v.current="",w.current=_.current),v.current+=F.key,clearTimeout(y.current),y.current=setTimeout(()=>{v.current="",w.current=_.current,T(!1)},p);const re=w.current,Q=j(M,[...M.slice((re||0)+1),...M.slice(0,(re||0)+1)],v.current);Q!==-1?(b(Q),_.current=Q):F.key!==" "&&(v.current="",T(!1))}return{reference:{onKeyDown:L},floating:{onKeyDown:L,onKeyUp(F){F.key===" "&&T(!1)}}}},[c,r,i,o,p,E,A,b,S])}const W_e=({styles:e,type:t,options:n,label:r,reusable:i})=>{var Y,ne,ce,P,ue,Oe,N,Ne,qe,Me,Je,rt;const o=it(Ke=>Ke.sendTextMessage),a=it(Ke=>Ke.messageContainerRef),s=it(Ke=>Ke.isReadOnly),[l,c]=z.useState(!1),[d,p]=z.useState(null),[m,h]=z.useState(null),y=n.reduce((Ke,Pe)=>(Ke[Pe.label]=Pe.value,Ke),{}),v=y?Object.keys(y):[],w=Ke=>{c(m!==null&&!i?!1:Ke)},{refs:_,floatingStyles:b,context:S}=q_e({placement:"bottom-start",open:l,onOpenChange:w,whileElementsMounted:G0e,middleware:[I0e(5),P0e({padding:10,boundary:(a==null?void 0:a.current)??void 0,crossAxis:!0}),R0e({apply({rects:Ke,elements:Pe,availableHeight:Ae}){Object.assign(Pe.floating.style,{maxHeight:`${Ae}px`,minWidth:`${Ke.reference.width}px`})},padding:10})]}),A=z.useRef([]),E=z.useRef(v),T=z.useRef(!1),j=D_e(S,{event:"mousedown"}),L=F_e(S),F=Z_e(S,{role:"listbox"}),M=z_e(S,{listRef:A,activeIndex:d,selectedIndex:m,onNavigate:p,loop:!0}),H=H_e(S,{listRef:E,activeIndex:d,selectedIndex:m,onMatch:l?p:h,onTypingChange(Ke){T.current=Ke}}),{getReferenceProps:re,getFloatingProps:Q,getItemProps:G}=U_e([L,F,M,H,j]),V=Ke=>{h(Ke),o(y[v[Ke]]),c(!1)},q=m!==null?v[m]:void 0;return X.jsxs(X.Fragment,{children:[X.jsxs("div",{tabIndex:0,ref:_.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":m!==null&&!i?"":void 0,...(ne=(Y=e==null?void 0:e[t])==null?void 0:Y.button)==null?void 0:ne.container,...re(),children:[X.jsx("span",{...(P=(ce=e==null?void 0:e[t])==null?void 0:ce.button)==null?void 0:P.text,children:q||r||"Select..."}),X.jsx(ybe,{...(Oe=(ue=e==null?void 0:e[t])==null?void 0:ue.button)==null?void 0:Oe.icon})]}),l&&X.jsx(I_e,{children:X.jsx(R_e,{context:S,modal:!1,children:X.jsx("div",{ref:_.setFloating,className:(qe=(Ne=(N=e==null?void 0:e[t])==null?void 0:N.content)==null?void 0:Ne.container)==null?void 0:qe.className,style:{...b,...(rt=(Je=(Me=e==null?void 0:e[t])==null?void 0:Me.content)==null?void 0:Je.container)==null?void 0:rt.style},...Q(),children:v.map((Ke,Pe)=>{var Ae,Fe;return X.jsx("div",{ref:$e=>{A.current[Pe]=$e},role:"option",tabIndex:Pe===d?0:-1,"aria-selected":Pe===m&&Pe===d,"data-active":Pe===d?"":void 0,...(Fe=(Ae=e==null?void 0:e[t])==null?void 0:Ae.content)==null?void 0:Fe.item,...G({onClick(){s||V(Pe)},onKeyDown($e){s||($e.key==="Enter"&&($e.preventDefault(),V(Pe)),$e.key===" "&&!T.current&&($e.preventDefault(),V(Pe)))}}),children:Ke},Ke)})})})})]})},V_e=C.forwardRef(({type:e,title:t,styles:n,url:r,...i},o)=>{var a,s,l;return X.jsxs("a",{...i,...(a=n==null?void 0:n[e])==null?void 0:a.container,href:r,download:!0,ref:o,target:"_blank",children:[X.jsx("p",{...(s=n==null?void 0:n[e])==null?void 0:s.title,children:t||r}),X.jsx(vbe,{...(l=n==null?void 0:n[e])==null?void 0:l.icon})]})}),AD={audio:ube,bubble:rbe,button:tbe,carousel:g0e,column:Ebe,dropdown:W_e,file:V_e,image:obe,location:Sbe,row:Abe,text:rce,video:sbe},fl=({block:e,styles:t,...n})=>{const i=it(a=>a.renderers)[e.type]??AD[e.type],o={...n,styles:t,...e};return X.jsx(i,{...o})},CD=C.memo(C.forwardRef((e,t)=>{const{composer:n}=it(p=>p.theme),r=it(p=>p.sendTextMessage),i=it(p=>p.disableComposer),o=it(p=>p.isReadOnly),[a,s]=C.useState(""),[l,c]=C.useState(-1);if(o)return null;const d=()=>{a&&(r(a),s(""),c(-1))};return X.jsx(_2.Provider,{value:{value:a,setValue:s,historyIndex:l,setHistoryIndex:c,sendMessage:d},children:X.jsx("div",{"data-disabled":i,...e,...n==null?void 0:n.container,ref:t})})})),OD=C.memo(e=>{const{composer:t}=it(w=>w.theme),n=it(w=>w.configuration),r=it(w=>w.disableComposer),{value:i,setValue:o,historyIndex:a,setHistoryIndex:s,sendMessage:l}=w2(),c=C.useRef(null),d=Vo(w=>w.user),p=Vo(w=>w.messageHistory),[m,h]=C.useState(!1);ice(c.current,i),C.useEffect(()=>{c.current&&(c.current.selectionStart=c.current.value.length,c.current.selectionEnd=c.current.value.length)},[i]);function y({key:w}){w==="Shift"&&h(!0)}function v({key:w}){w==="Shift"&&h(!1)}return C.useEffect(()=>(window.addEventListener("keydown",y),window.addEventListener("keyup",v),()=>{window.removeEventListener("keydown",y),window.removeEventListener("keyup",v)}),[]),X.jsx("textarea",{...t==null?void 0:t.input,placeholder:(n==null?void 0:n.composerPlaceholder)??"Type your message...",disabled:r,ref:c,value:i,"data-has-value":!!i,onChange:w=>o(w.target.value),onKeyDown:w=>{if(!r){if(w.key==="Enter"&&(w.preventDefault(),m?(o(`${i}
|
|
421
|
+
*/var X0e=["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])"],E_=X0e.join(","),nD=typeof Element>"u",yf=nD?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Am=!nD&&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},Cm=function e(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),o=i===""||i==="true",a=o||n&&t&&e(t.parentNode);return a},Q0e=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},e_e=function(t,n,r){if(Cm(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(E_));return n&&yf.call(t,E_)&&i.unshift(t),i=i.filter(r),i},t_e=function e(t,n,r){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!Cm(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=e(l,!0,r);r.flatten?i.push.apply(i,c):i.push({scopeParent:a,candidates:c})}else{var d=yf.call(a,E_);d&&r.filter(a)&&(n||!t.includes(a))&&i.push(a);var p=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),m=!Cm(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(p&&m){var h=e(p===!0?a.children:p.children,!0,r);r.flatten?i.push.apply(i,h):i.push({scopeParent:a,candidates:h})}else o.unshift.apply(o,a.children)}}return i},rD=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},iD=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Q0e(t))&&!rD(t)?0:t.tabIndex},n_e=function(t,n){var r=iD(t);return r<0&&n&&!rD(t)?0:r},r_e=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},oD=function(t){return t.tagName==="INPUT"},i_e=function(t){return oD(t)&&t.type==="hidden"},o_e=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},a_e=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},s_e=function(t){if(!t.name)return!0;var n=t.form||Am(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var o=a_e(i,t.form);return!o||o===t},u_e=function(t){return oD(t)&&t.type==="radio"},l_e=function(t){return u_e(t)&&!s_e(t)},c_e=function(t){var n,r=t&&Am(t),i=(n=r)===null||n===void 0?void 0:n.host,o=!1;if(r&&r!==t){var a,s,l;for(o=!!((a=i)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!o&&i;){var c,d,p;r=Am(i),i=(c=r)===null||c===void 0?void 0:c.host,o=!!((d=i)!==null&&d!==void 0&&(p=d.ownerDocument)!==null&&p!==void 0&&p.contains(i))}}return o},aD=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},f_e=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var o=yf.call(t,"details>summary:first-of-type"),a=o?t.parentElement:t;if(yf.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var s=t;t;){var l=t.parentElement,c=Am(t);if(l&&!l.shadowRoot&&i(l)===!0)return aD(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(c_e(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return aD(t);return!1},d_e=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return yf.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},p_e=function(t,n){return!(n.disabled||Cm(n)||i_e(n)||f_e(n,t)||o_e(n)||d_e(n))},sD=function(t,n){return!(l_e(n)||iD(n)<0||!p_e(t,n))},h_e=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},m_e=function e(t){var n=[],r=[];return t.forEach(function(i,o){var a=!!i.scopeParent,s=a?i.scopeParent:i,l=n_e(s,a),c=a?e(i.candidates):s;l===0?a?n.push.apply(n,c):n.push(s):r.push({documentOrder:o,tabIndex:l,item:i,isScope:a,content:c})}),r.sort(r_e).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},A_=function(t,n){n=n||{};var r;return n.getShadowRoot?r=t_e([t],n.includeContainer,{filter:sD.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:h_e}):r=e_e(t,n.includeContainer,sD.bind(null,n)),m_e(r)};const C_="ArrowUp",Om="ArrowDown",ul="ArrowLeft",gf="ArrowRight";function Tm(e,t,n){return Math.floor(e/t)!==n}function vf(e,t){return t<0||t>=e.current.length}function O_(e,t){return Cr(e,{disabledIndices:t})}function uD(e,t){return Cr(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Cr(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:o=1}=t===void 0?{}:t;const a=e.current;let s=n;do{var l,c;s=s+(r?-o:o)}while(s>=0&&s<=a.length-1&&(i?i.includes(s):a[s]==null||(l=a[s])!=null&&l.hasAttribute("disabled")||((c=a[s])==null?void 0:c.getAttribute("aria-disabled"))==="true"));return s}function y_e(e,t){let{event:n,orientation:r,loop:i,cols:o,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:c,stopEvent:d=!1}=t,p=c;if(n.key===C_){if(d&&hr(n),c===-1)p=l;else if(p=Cr(e,{startingIndex:p,amount:o,decrement:!0,disabledIndices:a}),i&&(c-o<s||p<0)){const m=c%o,h=l%o,y=l-(h-m);h===m?p=l:p=h>m?y:y-o}vf(e,p)&&(p=c)}if(n.key===Om&&(d&&hr(n),c===-1?p=s:(p=Cr(e,{startingIndex:c,amount:o,disabledIndices:a}),i&&c+o>l&&(p=Cr(e,{startingIndex:c%o-o,amount:o,disabledIndices:a}))),vf(e,p)&&(p=c)),r==="both"){const m=al(c/o);n.key===gf&&(d&&hr(n),c%o!==o-1?(p=Cr(e,{startingIndex:c,disabledIndices:a}),i&&Tm(p,o,m)&&(p=Cr(e,{startingIndex:c-c%o-1,disabledIndices:a}))):i&&(p=Cr(e,{startingIndex:c-c%o-1,disabledIndices:a})),Tm(p,o,m)&&(p=c)),n.key===ul&&(d&&hr(n),c%o!==0?(p=Cr(e,{startingIndex:c,disabledIndices:a,decrement:!0}),i&&Tm(p,o,m)&&(p=Cr(e,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:a}))):i&&(p=Cr(e,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:a})),Tm(p,o,m)&&(p=c));const h=al(l/o)===m;vf(e,p)&&(i&&h?p=n.key===ul?l:Cr(e,{startingIndex:c-c%o-1,disabledIndices:a}):p=c)}return p}let lD=0;function Yo(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(lD);const o=()=>e==null?void 0:e.focus({preventScroll:n});i?o():lD=requestAnimationFrame(o)}var er=typeof document<"u"?C.useLayoutEffect:C.useEffect;function $m(){return $m=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},$m.apply(this,arguments)}let T_=!1,g_e=0;const cD=()=>"floating-ui-"+g_e++;function v_e(){const[e,t]=z.useState(()=>T_?cD():void 0);return er(()=>{e==null&&t(cD())},[]),z.useEffect(()=>{T_||(T_=!0)},[]),e}const $_=z["useId".toString()]||v_e;function b_e(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(i=>i!==n))||[])}}}const __e=z.createContext(null),w_e=z.createContext(null),fD=()=>{var e;return((e=z.useContext(__e))==null?void 0:e.id)||null},km=()=>z.useContext(w_e);function bf(e){return"data-floating-ui-"+e}function Na(e){const t=C.useRef(e);return er(()=>{t.current=e}),t}function x_e(e,t){var n;let r=[],i=(n=e.find(o=>o.id===t))==null?void 0:n.parentId;for(;i;){const o=e.find(a=>a.id===i);i=o==null?void 0:o.parentId,o&&(r=r.concat(o))}return r}function ll(e,t){let n=e.filter(i=>{var o;return i.parentId===t&&((o=i.context)==null?void 0:o.open)}),r=n;for(;r.length;)r=e.filter(i=>{var o;return(o=r)==null?void 0:o.some(a=>{var s;return i.parentId===a.id&&((s=i.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function S_e(e,t){let n,r=-1;function i(o,a){a>r&&(n=o,r=a),ll(e,o).forEach(l=>{i(l.id,a+1)})}return i(t,0),e.find(o=>o.id===n)}let cl=new WeakMap,Im=new WeakSet,Pm={},k_=0;const E_e=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,dD=e=>e&&(e.host||dD(e.parentNode)),A_e=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=dD(n);return e.contains(r)?r:null}).filter(n=>n!=null);function C_e(e,t,n,r){const i="data-floating-ui-inert",o=r?"inert":n?"aria-hidden":null,a=A_e(t,e),s=new Set,l=new Set(a),c=[];Pm[i]||(Pm[i]=new WeakMap);const d=Pm[i];a.forEach(p),m(t),s.clear();function p(h){!h||s.has(h)||(s.add(h),h.parentNode&&p(h.parentNode))}function m(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,y=>{if(s.has(y))m(y);else{const v=o?y.getAttribute(o):null,w=v!==null&&v!=="false",_=(cl.get(y)||0)+1,b=(d.get(y)||0)+1;cl.set(y,_),d.set(y,b),c.push(y),_===1&&w&&Im.add(y),b===1&&y.setAttribute(i,""),!w&&o&&y.setAttribute(o,"true")}})}return k_++,()=>{c.forEach(h=>{const y=(cl.get(h)||0)-1,v=(d.get(h)||0)-1;cl.set(h,y),d.set(h,v),y||(!Im.has(h)&&o&&h.removeAttribute(o),Im.delete(h)),v||h.removeAttribute(i)}),k_--,k_||(cl=new WeakMap,cl=new WeakMap,Im=new WeakSet,Pm={})}}function pD(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Zi(e[0]).body;return C_e(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const I_=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function hD(e,t){const n=A_(e,I_());t==="prev"&&n.reverse();const r=n.indexOf(Da(Zi(e)));return n.slice(r+1)[0]}function mD(){return hD(document.body,"next")}function yD(){return hD(document.body,"prev")}function _f(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Yr(n,r)}function O_e(e){A_(e,I_()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function T_e(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 P_={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 $_e;function gD(e){e.key==="Tab"&&(e.target,clearTimeout($_e))}const Rm=z.forwardRef(function(t,n){const[r,i]=z.useState();er(()=>(q2()&&i("button"),document.addEventListener("keydown",gD),()=>{document.removeEventListener("keydown",gD)}),[]);const o={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[bf("focus-guard")]:"",style:P_};return z.createElement("span",$m({},t,o))}),vD=z.createContext(null);function k_e(e){let{id:t,root:n}=e===void 0?{}:e;const[r,i]=z.useState(null),o=$_(),a=bD(),s=z.useMemo(()=>({id:t,root:n,portalContext:a,uniqueId:o}),[t,n,a,o]),l=z.useRef();return er(()=>()=>{r==null||r.remove()},[r,s]),er(()=>{if(l.current===s)return;l.current=s;const{id:c,root:d,portalContext:p,uniqueId:m}=s,h=c?document.getElementById(c):null,y=bf("portal");if(h){const v=document.createElement("div");v.id=m,v.setAttribute(y,""),h.appendChild(v),i(v)}else{let v=d||(p==null?void 0:p.portalNode);v&&!Fn(v)&&(v=v.current),v=v||document.body;let w=null;c&&(w=document.createElement("div"),w.id=c,v.appendChild(w));const _=document.createElement("div");_.id=m,_.setAttribute(y,""),v=w||v,v.appendChild(_),i(_)}},[s]),r}function I_e(e){let{children:t,id:n,root:r=null,preserveTabOrder:i=!0}=e;const o=k_e({id:n,root:r}),[a,s]=z.useState(null),l=z.useRef(null),c=z.useRef(null),d=z.useRef(null),p=z.useRef(null),m=!!a&&!a.modal&&a.open&&i&&!!(r||o);return z.useEffect(()=>{if(!o||!i||a!=null&&a.modal)return;function h(y){o&&_f(y)&&(y.type==="focusin"?T_e:O_e)(o)}return o.addEventListener("focusin",h,!0),o.addEventListener("focusout",h,!0),()=>{o.removeEventListener("focusin",h,!0),o.removeEventListener("focusout",h,!0)}},[o,i,a==null?void 0:a.modal]),z.createElement(vD.Provider,{value:z.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:p,portalNode:o,setFocusManagerState:s}),[i,o])},m&&o&&z.createElement(Rm,{"data-type":"outside",ref:l,onFocus:h=>{if(_f(h,o)){var y;(y=d.current)==null||y.focus()}else{const v=yD()||(a==null?void 0:a.refs.domReference.current);v==null||v.focus()}}}),m&&o&&z.createElement("span",{"aria-owns":o.id,style:P_}),o&&Xi.createPortal(t,o),m&&o&&z.createElement(Rm,{"data-type":"outside",ref:c,onFocus:h=>{if(_f(h,o)){var y;(y=p.current)==null||y.focus()}else{const v=mD()||(a==null?void 0:a.refs.domReference.current);v==null||v.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,h.nativeEvent))}}}))}const bD=()=>z.useContext(vD),P_e=z.forwardRef(function(t,n){return z.createElement("button",$m({},t,{type:"button",ref:n,tabIndex:-1,style:P_}))});function R_e(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],guards:o=!0,initialFocus:a=0,returnFocus:s=!0,modal:l=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:d=!0}=e,{open:p,refs:m,nodeId:h,onOpenChange:y,events:v,dataRef:w,elements:{domReference:_,floating:b}}=t,S=E_e()?o:!0,A=Na(i),E=Na(a),T=Na(s),j=km(),L=bD(),F=typeof a=="number"&&a<0,M=z.useRef(null),H=z.useRef(null),re=z.useRef(!1),Q=z.useRef(null),G=z.useRef(!1),V=L!=null,q=_&&_.getAttribute("role")==="combobox"&&z2(_)&&F,Y=z.useCallback(function(ue){return ue===void 0&&(ue=b),ue?A_(ue,I_()):[]},[b]),ne=z.useCallback(ue=>{const Oe=Y(ue);return A.current.map(N=>_&&N==="reference"?_:b&&N==="floating"?b:Oe).filter(Boolean).flat()},[_,b,A,Y]);z.useEffect(()=>{if(r||!l)return;function ue(N){if(N.key==="Tab"){Yr(b,Da(Zi(b)))&&Y().length===0&&!q&&hr(N);const Ne=ne(),qe=B2(N);A.current[0]==="reference"&&qe===_&&(hr(N),N.shiftKey?Yo(Ne[Ne.length-1]):Yo(Ne[1])),A.current[1]==="floating"&&qe===b&&N.shiftKey&&(hr(N),Yo(Ne[0]))}}const Oe=Zi(b);return Oe.addEventListener("keydown",ue),()=>{Oe.removeEventListener("keydown",ue)}},[r,_,b,l,A,m,q,Y,ne]),z.useEffect(()=>{if(r||!d)return;function ue(){G.current=!0,setTimeout(()=>{G.current=!1})}function Oe(N){const Ne=N.relatedTarget;queueMicrotask(()=>{const qe=!(Yr(_,Ne)||Yr(b,Ne)||Yr(Ne,b)||Yr(L==null?void 0:L.portalNode,Ne)||Ne!=null&&Ne.hasAttribute(bf("focus-guard"))||j&&(ll(j.nodesRef.current,h).find(Me=>{var Je,rt;return Yr((Je=Me.context)==null?void 0:Je.elements.floating,Ne)||Yr((rt=Me.context)==null?void 0:rt.elements.domReference,Ne)})||x_e(j.nodesRef.current,h).find(Me=>{var Je,rt;return((Je=Me.context)==null?void 0:Je.elements.floating)===Ne||((rt=Me.context)==null?void 0:rt.elements.domReference)===Ne})));Ne&&qe&&!G.current&&Ne!==Q.current&&(re.current=!0,y(!1,N))})}if(b&&Ar(_))return _.addEventListener("focusout",Oe),_.addEventListener("pointerdown",ue),!l&&b.addEventListener("focusout",Oe),()=>{_.removeEventListener("focusout",Oe),_.removeEventListener("pointerdown",ue),!l&&b.removeEventListener("focusout",Oe)}},[r,_,b,l,h,j,L,y,d]),z.useEffect(()=>{var ue;if(r)return;const Oe=Array.from((L==null||(ue=L.portalNode)==null?void 0:ue.querySelectorAll("["+bf("portal")+"]"))||[]);if(b){const N=[b,...Oe,M.current,H.current,A.current.includes("reference")||q?_:null].filter(qe=>qe!=null),Ne=l?pD(N,S,!S):pD(N);return()=>{Ne()}}},[r,_,b,l,A,L,q,S]),er(()=>{if(r||!b)return;const ue=Zi(b),Oe=Da(ue);queueMicrotask(()=>{const N=ne(b),Ne=E.current,qe=(typeof Ne=="number"?N[Ne]:Ne.current)||b,Me=Yr(b,Oe);!F&&!Me&&p&&Yo(qe,{preventScroll:qe===b})})},[r,p,b,F,ne,E]),er(()=>{if(r||!b)return;let ue=!1;const Oe=Zi(b),N=Da(Oe),Ne=w.current;Q.current=N;function qe(Me){if(Me.type==="escapeKey"&&m.domReference.current&&(Q.current=m.domReference.current),["referencePress","escapeKey"].includes(Me.type))return;const Je=Me.data.returnFocus;typeof Je=="object"?(re.current=!1,ue=Je.preventScroll):re.current=!Je}return v.on("dismiss",qe),()=>{v.off("dismiss",qe);const Me=Da(Oe);(Yr(b,Me)||j&&ll(j.nodesRef.current,h).some(rt=>{var Ke;return Yr((Ke=rt.context)==null?void 0:Ke.elements.floating,Me)})||Ne.openEvent&&["click","mousedown"].includes(Ne.openEvent.type))&&m.domReference.current&&(Q.current=m.domReference.current),T.current&&Ar(Q.current)&&!re.current&&Yo(Q.current,{cancelPrevious:!1,preventScroll:ue})}},[r,b,T,w,m,v,j,h]),er(()=>{if(!(r||!L))return L.setFocusManagerState({modal:l,closeOnFocusOut:d,open:p,onOpenChange:y,refs:m}),()=>{L.setFocusManagerState(null)}},[r,L,l,p,y,m,d]),er(()=>{if(!r&&b&&typeof MutationObserver=="function"&&!F){const ue=()=>{const N=b.getAttribute("tabindex");A.current.includes("floating")||Da(Zi(b))!==m.domReference.current&&Y().length===0?N!=="0"&&b.setAttribute("tabindex","0"):N!=="-1"&&b.setAttribute("tabindex","-1")};ue();const Oe=new MutationObserver(ue);return Oe.observe(b,{childList:!0,subtree:!0,attributes:!0}),()=>{Oe.disconnect()}}},[r,b,m,A,Y,F]);function ce(ue){return r||!c||!l?null:z.createElement(P_e,{ref:ue==="start"?M:H,onClick:Oe=>y(!1,Oe.nativeEvent)},typeof c=="string"?c:"Dismiss")}const P=!r&&S&&!q&&(V||l);return z.createElement(z.Fragment,null,P&&z.createElement(Rm,{"data-type":"inside",ref:L==null?void 0:L.beforeInsideRef,onFocus:ue=>{if(l){const N=ne();Yo(i[0]==="reference"?N[0]:N[N.length-1])}else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(re.current=!1,_f(ue,L.portalNode)){const N=mD()||_;N==null||N.focus()}else{var Oe;(Oe=L.beforeOutsideRef.current)==null||Oe.focus()}}}),!q&&ce("start"),n,ce("end"),P&&z.createElement(Rm,{"data-type":"inside",ref:L==null?void 0:L.afterInsideRef,onFocus:ue=>{if(l)Yo(ne()[0]);else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(d&&(re.current=!0),_f(ue,L.portalNode)){const N=yD()||_;N==null||N.focus()}else{var Oe;(Oe=L.afterOutsideRef.current)==null||Oe.focus()}}}))}function _D(e){return Ar(e.target)&&e.target.tagName==="BUTTON"}function wD(e){return z2(e)}function D_e(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:o}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:d=!0}=t,p=z.useRef(),m=z.useRef(!1);return z.useMemo(()=>a?{reference:{onPointerDown(h){p.current=h.pointerType},onMouseDown(h){h.button===0&&(U2(p.current,!0)&&c||s!=="click"&&(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")?r(!1,h.nativeEvent):(h.preventDefault(),r(!0,h.nativeEvent))))},onClick(h){if(s==="mousedown"&&p.current){p.current=void 0;return}U2(p.current,!0)&&c||(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="click")?r(!1,h.nativeEvent):r(!0,h.nativeEvent))},onKeyDown(h){p.current=void 0,!(h.defaultPrevented||!d||_D(h))&&(h.key===" "&&!wD(o)&&(h.preventDefault(),m.current=!0),h.key==="Enter"&&r(!(n&&l),h.nativeEvent))},onKeyUp(h){h.defaultPrevented||!d||_D(h)||wD(o)||h.key===" "&&m.current&&(m.current=!1,r(!(n&&l),h.nativeEvent))}}}:{},[a,i,s,c,d,o,l,n,r])}const N_e=z["useInsertionEffect".toString()]||(e=>e());function Ma(e){const t=z.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return N_e(()=>{t.current=e}),z.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}const M_e={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},j_e={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},L_e=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 F_e(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:i,nodeId:o,elements:{reference:a,domReference:s,floating:l},dataRef:c}=e,{enabled:d=!0,escapeKey:p=!0,outsidePress:m=!0,outsidePressEvent:h="pointerdown",referencePress:y=!1,referencePressEvent:v="pointerdown",ancestorScroll:w=!1,bubbles:_}=t,b=km(),S=fD()!=null,A=Ma(typeof m=="function"?m:()=>!1),E=typeof m=="function"?A:m,T=z.useRef(!1),{escapeKeyBubbles:j,outsidePressBubbles:L}=L_e(_),F=Ma(H=>{if(!n||!d||!p||H.key!=="Escape")return;const re=b?ll(b.nodesRef.current,o):[];if(!j&&(H.stopPropagation(),re.length>0)){let Q=!0;if(re.forEach(G=>{var V;if((V=G.context)!=null&&V.open&&!G.context.dataRef.current.__escapeKeyBubbles){Q=!1;return}}),!Q)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,C0e(H)?H.nativeEvent:H)}),M=Ma(H=>{const re=T.current;if(T.current=!1,re||typeof E=="function"&&!E(H))return;const Q=B2(H),G="["+bf("inert")+"]",V=Zi(l).querySelectorAll(G);let q=Fn(Q)?Q:null;for(;q&&!mf(q);){const ce=Ls(q);if(ce===Zi(l).body||!Fn(ce))break;q=ce}if(V.length&&Fn(Q)&&!O0e(Q)&&!Yr(Q,l)&&Array.from(V).every(ce=>!Yr(q,ce)))return;if(Ar(Q)&&l){const ce=Q.clientWidth>0&&Q.scrollWidth>Q.clientWidth,P=Q.clientHeight>0&&Q.scrollHeight>Q.clientHeight;let ue=P&&H.offsetX>Q.clientWidth;if(P&&ci(Q).direction==="rtl"&&(ue=H.offsetX<=Q.offsetWidth-Q.clientWidth),ue||ce&&H.offsetY>Q.clientHeight)return}const Y=b&&ll(b.nodesRef.current,o).some(ce=>{var P;return x_(H,(P=ce.context)==null?void 0:P.elements.floating)});if(x_(H,l)||x_(H,s)||Y)return;const ne=b?ll(b.nodesRef.current,o):[];if(ne.length>0){let ce=!0;if(ne.forEach(P=>{var ue;if((ue=P.context)!=null&&ue.open&&!P.context.dataRef.current.__outsidePressBubbles){ce=!1;return}}),!ce)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:S?{preventScroll:!0}:L2(H)||F2(H)}}),r(!1,H)});return z.useEffect(()=>{if(!n||!d)return;c.current.__escapeKeyBubbles=j,c.current.__outsidePressBubbles=L;function H(G){r(!1,G)}const re=Zi(l);p&&re.addEventListener("keydown",F),E&&re.addEventListener(h,M);let Q=[];return w&&(Fn(s)&&(Q=Ra(s)),Fn(l)&&(Q=Q.concat(Ra(l))),!Fn(a)&&a&&a.contextElement&&(Q=Q.concat(Ra(a.contextElement)))),Q=Q.filter(G=>{var V;return G!==((V=re.defaultView)==null?void 0:V.visualViewport)}),Q.forEach(G=>{G.addEventListener("scroll",H,{passive:!0})}),()=>{p&&re.removeEventListener("keydown",F),E&&re.removeEventListener(h,M),Q.forEach(G=>{G.removeEventListener("scroll",H)})}},[c,l,s,a,p,E,h,n,r,w,d,j,L,F,M]),z.useEffect(()=>{T.current=!1},[E,h]),z.useMemo(()=>d?{reference:{onKeyDown:F,[M_e[v]]:H=>{y&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,H.nativeEvent))}},floating:{onKeyDown:F,[j_e[h]]:()=>{T.current=!0}}}:{},[d,i,y,h,v,r,F])}let R_;process.env.NODE_ENV!=="production"&&(R_=new Set);function q_e(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:i}=e;if(process.env.NODE_ENV!=="production"){var o;const j="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if((o=e.elements)!=null&&o.reference&&!Fn(e.elements.reference)){var a;if(!((a=R_)!=null&&a.has(j))){var s;(s=R_)==null||s.add(j),console.error(j)}}}const[l,c]=z.useState(null),d=((t=e.elements)==null?void 0:t.reference)||l,p=J0e(e),m=km(),h=Ma((j,L)=>{j&&(v.current.openEvent=L),r==null||r(j,L)}),y=z.useRef(null),v=z.useRef({}),w=z.useState(()=>b_e())[0],_=$_(),b=z.useCallback(j=>{const L=Fn(j)?{getBoundingClientRect:()=>j.getBoundingClientRect(),contextElement:j}:j;p.refs.setReference(L)},[p.refs]),S=z.useCallback(j=>{(Fn(j)||j===null)&&(y.current=j,c(j)),(Fn(p.refs.reference.current)||p.refs.reference.current===null||j!==null&&!Fn(j))&&p.refs.setReference(j)},[p.refs]),A=z.useMemo(()=>({...p.refs,setReference:S,setPositionReference:b,domReference:y}),[p.refs,S,b]),E=z.useMemo(()=>({...p.elements,domReference:d}),[p.elements,d]),T=z.useMemo(()=>({...p,refs:A,elements:E,dataRef:v,nodeId:i,floatingId:_,events:w,open:n,onOpenChange:h}),[p,i,_,w,n,h,A,E]);return er(()=>{const j=m==null?void 0:m.nodesRef.current.find(L=>L.id===i);j&&(j.context=T)}),z.useMemo(()=>({...p,context:T,refs:A,elements:E}),[p,A,E,T])}function D_(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(i=>i?i[n]:null).concat(e).reduce((i,o)=>(o&&Object.entries(o).forEach(a=>{let[s,l]=a;if(s.indexOf("on")===0){if(r.has(s)||r.set(s,[]),typeof l=="function"){var c;(c=r.get(s))==null||c.push(l),i[s]=function(){for(var d,p=arguments.length,m=new Array(p),h=0;h<p;h++)m[h]=arguments[h];return(d=r.get(s))==null?void 0:d.map(y=>y(...m)).find(y=>y!==void 0)}}}else i[s]=l}),i),{})}}function U_e(e){e===void 0&&(e=[]);const t=e,n=z.useCallback(o=>D_(o,e,"reference"),t),r=z.useCallback(o=>D_(o,e,"floating"),t),i=z.useCallback(o=>D_(o,e,"item"),e.map(o=>o==null?void 0:o.item));return z.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])}let xD=!1;function Dm(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function SD(e,t){return Dm(t,e===C_||e===Om,e===ul||e===gf)}function N_(e,t,n){return Dm(t,e===Om,n?e===ul:e===gf)||e==="Enter"||e==" "||e===""}function B_e(e,t,n){return Dm(t,n?e===ul:e===gf,e===Om)}function ED(e,t,n){return Dm(t,n?e===gf:e===ul,e===C_)}function z_e(e,t){const{open:n,onOpenChange:r,refs:i,elements:{domReference:o,floating:a}}=e,{listRef:s,activeIndex:l,onNavigate:c=()=>{},enabled:d=!0,selectedIndex:p=null,allowEscape:m=!1,loop:h=!1,nested:y=!1,rtl:v=!1,virtual:w=!1,focusItemOnOpen:_="auto",focusItemOnHover:b=!0,openOnArrowKeyDown:S=!0,disabledIndices:A=void 0,orientation:E="vertical",cols:T=1,scrollItemIntoView:j=!0,virtualItemRef:L}=t;process.env.NODE_ENV!=="production"&&(m&&(h||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),w||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),E==="vertical"&&T>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const F=fD(),M=km(),H=Ma(c),re=z.useRef(_),Q=z.useRef(p??-1),G=z.useRef(null),V=z.useRef(!0),q=z.useRef(H),Y=z.useRef(!!a),ne=z.useRef(!1),ce=z.useRef(!1),P=Na(A),ue=Na(n),Oe=Na(j),[N,Ne]=z.useState(),[qe,Me]=z.useState(),Je=Ma(function(Pe,Ae,Fe){Fe===void 0&&(Fe=!1);const $e=Pe.current[Ae.current];$e&&(w?(Ne($e.id),M==null||M.events.emit("virtualfocus",$e),L&&(L.current=$e)):Yo($e,{preventScroll:!0,sync:A0e()&&q2()?xD||ne.current:!1}),requestAnimationFrame(()=>{const Ze=Oe.current;Ze&&$e&&(Fe||!V.current)&&($e.scrollIntoView==null||$e.scrollIntoView(typeof Ze=="boolean"?{block:"nearest",inline:"nearest"}:Ze))}))});er(()=>{document.createElement("div").focus({get preventScroll(){return xD=!0,!1}})},[]),er(()=>{d&&(n&&a?re.current&&p!=null&&(ce.current=!0,H(p)):Y.current&&(Q.current=-1,q.current(null)))},[d,n,a,p,H]),er(()=>{if(d&&n&&a)if(l==null){if(ne.current=!1,p!=null)return;if(Y.current&&(Q.current=-1,Je(s,Q)),!Y.current&&re.current&&(G.current!=null||re.current===!0&&G.current==null)){let Pe=0;const Ae=()=>{s.current[0]==null?(Pe<2&&(Pe?requestAnimationFrame:queueMicrotask)(Ae),Pe++):(Q.current=G.current==null||N_(G.current,E,v)||y?O_(s,P.current):uD(s,P.current),G.current=null,H(Q.current))};Ae()}}else vf(s,l)||(Q.current=l,Je(s,Q,ce.current),ce.current=!1)},[d,n,a,l,p,y,s,E,v,H,Je,P]),er(()=>{var Pe,Ae;if(!d||a||!M||w||!Y.current)return;const Fe=M.nodesRef.current,$e=(Pe=Fe.find(K=>K.id===F))==null||(Ae=Pe.context)==null?void 0:Ae.elements.floating,Ze=Da(Zi(a)),lt=Fe.some(K=>K.context&&Yr(K.context.elements.floating,Ze));$e&&!lt&&V.current&&$e.focus({preventScroll:!0})},[d,a,M,F,w]),er(()=>{if(!d||!M||!w||F)return;function Pe(Ae){Me(Ae.id),L&&(L.current=Ae)}return M.events.on("virtualfocus",Pe),()=>{M.events.off("virtualfocus",Pe)}},[d,M,w,F,L]),er(()=>{q.current=H,Y.current=!!a}),er(()=>{n||(G.current=null)},[n]);const rt=l!=null,Ke=z.useMemo(()=>{function Pe(Fe){if(!n)return;const $e=s.current.indexOf(Fe);$e!==-1&&H($e)}return{onFocus(Fe){let{currentTarget:$e}=Fe;Pe($e)},onClick:Fe=>{let{currentTarget:$e}=Fe;return $e.focus({preventScroll:!0})},...b&&{onMouseMove(Fe){let{currentTarget:$e}=Fe;Pe($e)},onPointerLeave(Fe){let{pointerType:$e}=Fe;!V.current||$e==="touch"||(Q.current=-1,Je(s,Q),H(null),w||Yo(i.floating.current,{preventScroll:!0}))}}}},[n,i,Je,b,s,H,w]);return z.useMemo(()=>{if(!d)return{};const Pe=P.current;function Ae(K){if(V.current=!1,ne.current=!0,!ue.current&&K.currentTarget===i.floating.current)return;if(y&&ED(K.key,E,v)){hr(K),r(!1,K.nativeEvent),Ar(o)&&!w&&o.focus();return}const pe=Q.current,Te=O_(s,Pe),Se=uD(s,Pe);if(K.key==="Home"&&(hr(K),Q.current=Te,H(Q.current)),K.key==="End"&&(hr(K),Q.current=Se,H(Q.current)),!(T>1&&(Q.current=y_e(s,{event:K,orientation:E,loop:h,cols:T,disabledIndices:Pe,minIndex:Te,maxIndex:Se,prevIndex:Q.current,stopEvent:!0}),H(Q.current),E==="both"))&&SD(K.key,E)){if(hr(K),n&&!w&&Da(K.currentTarget.ownerDocument)===K.currentTarget){Q.current=N_(K.key,E,v)?Te:Se,H(Q.current);return}N_(K.key,E,v)?h?Q.current=pe>=Se?m&&pe!==s.current.length?-1:Te:Cr(s,{startingIndex:pe,disabledIndices:Pe}):Q.current=Math.min(Se,Cr(s,{startingIndex:pe,disabledIndices:Pe})):h?Q.current=pe<=Te?m&&pe!==-1?s.current.length:Se:Cr(s,{startingIndex:pe,decrement:!0,disabledIndices:Pe}):Q.current=Math.max(Te,Cr(s,{startingIndex:pe,decrement:!0,disabledIndices:Pe})),vf(s,Q.current)?H(null):H(Q.current)}}function Fe(K){_==="auto"&&L2(K.nativeEvent)&&(re.current=!0)}function $e(K){re.current=_,_==="auto"&&F2(K.nativeEvent)&&(re.current=!0)}const Ze=w&&n&&rt&&{"aria-activedescendant":qe||N},lt=s.current.find(K=>(K==null?void 0:K.id)===N);return{reference:{...Ze,onKeyDown(K){V.current=!1;const pe=K.key.indexOf("Arrow")===0,Te=B_e(K.key,E,v),Se=ED(K.key,E,v),et=SD(K.key,E),Ue=(y?Te:et)||K.key==="Enter"||K.key.trim()==="";if(w&&n){const ie=M==null?void 0:M.nodesRef.current.find(xe=>xe.parentId==null),ge=M&&ie?S_e(M.nodesRef.current,ie.id):null;if(pe&&ge&&L){const xe=new KeyboardEvent("keydown",{key:K.key,bubbles:!0});if(Te||Se){var ot,It;const Be=((ot=ge.context)==null?void 0:ot.elements.domReference)===K.currentTarget,ct=Se&&!Be?(It=ge.context)==null?void 0:It.elements.domReference:Te?lt:null;ct&&(hr(K),ct.dispatchEvent(xe),Me(void 0))}if(et&&ge.context&&ge.context.open&&ge.parentId&&K.currentTarget!==ge.context.elements.domReference){var mt;hr(K),(mt=ge.context.elements.domReference)==null||mt.dispatchEvent(xe);return}}return Ae(K)}if(!(!n&&!S&&pe)){if(Ue&&(G.current=y&&et?null:K.key),y){Te&&(hr(K),n?(Q.current=O_(s,Pe),H(Q.current)):r(!0,K.nativeEvent));return}et&&(p!=null&&(Q.current=p),hr(K),!n&&S?r(!0,K.nativeEvent):Ae(K),n&&H(Q.current))}},onFocus(){n&&H(null)},onPointerDown:$e,onMouseDown:Fe,onClick:Fe},floating:{"aria-orientation":E==="both"?void 0:E,...Ze,onKeyDown:Ae,onPointerMove(){V.current=!0}},item:Ke}},[o,i,N,qe,P,ue,s,d,E,v,w,n,rt,y,p,S,m,T,h,_,H,r,Ke,M,L])}function Z_e(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:i=!0,role:o="dialog"}=t,a=$_();return z.useMemo(()=>{const s={id:r,role:o};return i?o==="tooltip"?{reference:{"aria-describedby":n?r:void 0},floating:s}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":o==="alertdialog"?"dialog":o,"aria-controls":n?r:void 0,...o==="listbox"&&{role:"combobox"},...o==="menu"&&{id:a}},floating:{...s,...o==="menu"&&{"aria-labelledby":a}}}:{}},[i,o,n,r,a])}function H_e(e,t){var n;const{open:r,dataRef:i}=e,{listRef:o,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:d=null,resetMs:p=750,ignoreKeys:m=[],selectedIndex:h=null}=t,y=z.useRef(),v=z.useRef(""),w=z.useRef((n=h??a)!=null?n:-1),_=z.useRef(null),b=Ma(s),S=Ma(l),A=Na(d),E=Na(m);return er(()=>{r&&(clearTimeout(y.current),_.current=null,v.current="")},[r]),er(()=>{if(r&&v.current===""){var T;w.current=(T=h??a)!=null?T:-1}},[r,h,a]),z.useMemo(()=>{if(!c)return{};function T(F){F?i.current.typing||(i.current.typing=F,S(F)):i.current.typing&&(i.current.typing=F,S(F))}function j(F,M,H){const re=A.current?A.current(M,H):M.find(Q=>(Q==null?void 0:Q.toLocaleLowerCase().indexOf(H.toLocaleLowerCase()))===0);return re?F.indexOf(re):-1}function L(F){const M=o.current;if(v.current.length>0&&v.current[0]!==" "&&(j(M,M,v.current)===-1?T(!1):F.key===" "&&hr(F)),M==null||E.current.includes(F.key)||F.key.length!==1||F.ctrlKey||F.metaKey||F.altKey)return;r&&F.key!==" "&&(hr(F),T(!0)),M.every(G=>{var V,q;return G?((V=G[0])==null?void 0:V.toLocaleLowerCase())!==((q=G[1])==null?void 0:q.toLocaleLowerCase()):!0})&&v.current===F.key&&(v.current="",w.current=_.current),v.current+=F.key,clearTimeout(y.current),y.current=setTimeout(()=>{v.current="",w.current=_.current,T(!1)},p);const re=w.current,Q=j(M,[...M.slice((re||0)+1),...M.slice(0,(re||0)+1)],v.current);Q!==-1?(b(Q),_.current=Q):F.key!==" "&&(v.current="",T(!1))}return{reference:{onKeyDown:L},floating:{onKeyDown:L,onKeyUp(F){F.key===" "&&T(!1)}}}},[c,r,i,o,p,E,A,b,S])}const W_e=({styles:e,type:t,options:n,label:r,reusable:i})=>{var Y,ne,ce,P,ue,Oe,N,Ne,qe,Me,Je,rt;const o=it(Ke=>Ke.sendTextMessage),a=it(Ke=>Ke.messageContainerRef),s=it(Ke=>Ke.isReadOnly),[l,c]=z.useState(!1),[d,p]=z.useState(null),[m,h]=z.useState(null),y=n.reduce((Ke,Pe)=>(Ke[Pe.label]=Pe.value,Ke),{}),v=y?Object.keys(y):[],w=Ke=>{c(m!==null&&!i?!1:Ke)},{refs:_,floatingStyles:b,context:S}=q_e({placement:"bottom-start",open:l,onOpenChange:w,whileElementsMounted:G0e,middleware:[I0e(5),P0e({padding:10,boundary:(a==null?void 0:a.current)??void 0,crossAxis:!0}),R0e({apply({rects:Ke,elements:Pe,availableHeight:Ae}){Object.assign(Pe.floating.style,{maxHeight:`${Ae}px`,minWidth:`${Ke.reference.width}px`})},padding:10})]}),A=z.useRef([]),E=z.useRef(v),T=z.useRef(!1),j=D_e(S,{event:"mousedown"}),L=F_e(S),F=Z_e(S,{role:"listbox"}),M=z_e(S,{listRef:A,activeIndex:d,selectedIndex:m,onNavigate:p,loop:!0}),H=H_e(S,{listRef:E,activeIndex:d,selectedIndex:m,onMatch:l?p:h,onTypingChange(Ke){T.current=Ke}}),{getReferenceProps:re,getFloatingProps:Q,getItemProps:G}=U_e([L,F,M,H,j]),V=Ke=>{h(Ke),o(y[v[Ke]]),c(!1)},q=m!==null?v[m]:void 0;return X.jsxs(X.Fragment,{children:[X.jsxs("div",{tabIndex:0,ref:_.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":m!==null&&!i?"":void 0,...(ne=(Y=e==null?void 0:e[t])==null?void 0:Y.button)==null?void 0:ne.container,...re(),children:[X.jsx("span",{...(P=(ce=e==null?void 0:e[t])==null?void 0:ce.button)==null?void 0:P.text,children:q||r||"Select..."}),X.jsx(ybe,{...(Oe=(ue=e==null?void 0:e[t])==null?void 0:ue.button)==null?void 0:Oe.icon})]}),l&&X.jsx(I_e,{children:X.jsx(R_e,{context:S,modal:!1,children:X.jsx("div",{ref:_.setFloating,className:(qe=(Ne=(N=e==null?void 0:e[t])==null?void 0:N.content)==null?void 0:Ne.container)==null?void 0:qe.className,style:{...b,...(rt=(Je=(Me=e==null?void 0:e[t])==null?void 0:Me.content)==null?void 0:Je.container)==null?void 0:rt.style},...Q(),children:v.map((Ke,Pe)=>{var Ae,Fe;return X.jsx("div",{ref:$e=>{A.current[Pe]=$e},role:"option",tabIndex:Pe===d?0:-1,"aria-selected":Pe===m&&Pe===d,"data-active":Pe===d?"":void 0,...(Fe=(Ae=e==null?void 0:e[t])==null?void 0:Ae.content)==null?void 0:Fe.item,...G({onClick(){s||V(Pe)},onKeyDown($e){s||($e.key==="Enter"&&($e.preventDefault(),V(Pe)),$e.key===" "&&!T.current&&($e.preventDefault(),V(Pe)))}}),children:Ke},Ke)})})})})]})},V_e=C.forwardRef(({type:e,title:t,styles:n,url:r,...i},o)=>{var a,s,l;return X.jsxs("a",{...i,...(a=n==null?void 0:n[e])==null?void 0:a.container,href:r,download:!0,ref:o,target:"_blank",children:[X.jsx("p",{...(s=n==null?void 0:n[e])==null?void 0:s.title,children:t||r}),X.jsx(vbe,{...(l=n==null?void 0:n[e])==null?void 0:l.icon})]})}),AD={audio:ube,bubble:rbe,button:tbe,carousel:g0e,column:Ebe,dropdown:W_e,file:V_e,image:obe,location:Sbe,row:Abe,text:rce,video:sbe},fl=({block:e,styles:t,...n})=>{const i=it(a=>a.renderers)[e.type]??AD[e.type],o={...n,styles:t,...e};return X.jsx(i,{...o})},CD=C.memo(C.forwardRef((e,t)=>{const{composer:n}=it(p=>p.theme),r=it(p=>p.sendTextMessage),i=it(p=>p.disableComposer),o=it(p=>p.isReadOnly),[a,s]=C.useState(""),[l,c]=C.useState(-1);if(o)return null;const d=()=>{a&&(r(a),s(""),c(-1))};return X.jsx(_2.Provider,{value:{value:a,setValue:s,historyIndex:l,setHistoryIndex:c,sendMessage:d},children:X.jsx("div",{"data-disabled":i,...e,...n==null?void 0:n.container,ref:t})})})),OD=C.memo(e=>{const{composer:t}=it(w=>w.theme),n=it(w=>w.configuration),r=it(w=>w.disableComposer),{value:i,setValue:o,historyIndex:a,setHistoryIndex:s,sendMessage:l}=w2(),c=C.useRef(null),d=Vo(w=>w.user),p=Vo(w=>w.messageHistory),[m,h]=C.useState(!1);ice(c.current,i);function y({key:w}){w==="Shift"&&h(!0)}function v({key:w}){w==="Shift"&&h(!1)}return C.useEffect(()=>(window.addEventListener("keydown",y),window.addEventListener("keyup",v),()=>{window.removeEventListener("keydown",y),window.removeEventListener("keyup",v)}),[]),X.jsx("textarea",{...t==null?void 0:t.input,placeholder:(n==null?void 0:n.composerPlaceholder)??"Type your message...",disabled:r,ref:c,value:i,"data-has-value":!!i,onChange:w=>o(w.target.value),onKeyDown:w=>{if(!r){if(w.key==="Enter"&&(w.preventDefault(),m?(o(`${i}
|
|
422
422
|
`),setTimeout(()=>{var _;return(_=c.current)==null?void 0:_.scroll({behavior:"instant",top:c.current.scrollHeight})},0)):l()),w.key==="ArrowUp"){w.preventDefault();const _=p[(d==null?void 0:d.userId)??""]??[];a<_.length-1&&o(_[a+1]),s(()=>Math.min(a+1,_.length-1))}if(w.key==="ArrowDown"){w.preventDefault();const _=p[(d==null?void 0:d.userId)??""]??[];o(a===0?"":_[a-1]),s(()=>Math.max(a-1,-1))}}},...e})}),TD=C.memo(C.forwardRef(({icon:e=xbe,...t},n)=>{var d,p;const{composer:r}=it(m=>m.theme),i=it(m=>m.sendFile),o=it(m=>m.addMessage),a=C.useRef(null);if(!it(m=>m.allowFileUpload))return null;const l=()=>{var m;a.current&&((m=a.current)==null||m.click())},c=async m=>{var y;const h=(y=m.target.files)==null?void 0:y[0];if(h)try{const{fileUrl:v,type:w}=await i(h)??"";o({direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:w,url:v}})}catch(v){console.error("Error sending file:",v)}};return X.jsxs(X.Fragment,{children:[X.jsx("button",{type:"button",ref:n,...t,...(d=r==null?void 0:r.uploadButton)==null?void 0:d.container,onClick:l,children:X.jsx(e,{...(p=r==null?void 0:r.uploadButton)==null?void 0:p.icon})}),X.jsx("input",{type:"file",ref:a,style:{display:"none"},onChange:c})]})})),$D=C.memo(C.forwardRef(({icon:e=hbe,...t},n)=>{var a,s;const{value:r,sendMessage:i}=w2(),{composer:o}=it(l=>l.theme);return X.jsx("button",{type:"button",ref:n,...t,...(a=o==null?void 0:o.button)==null?void 0:a.container,disabled:!r,onClick:i,children:X.jsx(e,{...(s=o==null?void 0:o.button)==null?void 0:s.icon})})})),kD=({children:e})=>{const[t,n]=C.useState(!1),[r,i]=C.useState(""),[o,a]=C.useState(null),s=({title:c,content:d})=>{i(c),a(d),n(!0)},l=()=>{n(!1)};return X.jsxs(S2.Provider,{value:{hideModal:l,showModal:s,title:r,content:o,open:t},children:[X.jsx(Fa,{open:t,onOpenChange:n,children:X.jsx(Fa.Content,{title:r,children:o})}),e]})},K_e=({children:e,...t})=>{const n=C.useRef(),r=C.useRef(null),i=ebe({...t,messageContainerRef:r});return n.current||(n.current=i),X.jsx(b2.Provider,{value:n.current,children:X.jsx(G_e,{children:e})})},G_e=({children:e})=>{const t=it(h=>h.client),n=it(h=>h.addMessage),r=it(h=>h.setMessages),i=it(h=>h.configuration),o=it(h=>h.setConnected),a=it(h=>h.userData),s=Vo(h=>h.setConversationId),l=Vo(h=>h.user),c=Vo(h=>h.conversationId),d=Vo(h=>h.setUser),[p,m]=C.useState(0);return C.useEffect(()=>{if(t)return t.on("message",h=>{try{const{payload:y,disableInput:v}=h;n({direction:"incoming",sender:{name:i.botName??"Bot",avatar:i.botAvatar},timestamp:new Date(h.sentOn),block:y,disableInput:v})}catch{console.error("Invalid message payload")}})},[]),C.useEffect(()=>{if(t)return t.on("conversation",h=>{s(h)})},[]),o_(async()=>{if(t)return t.on("error",()=>{m(h=>h+1)})}),o_(async()=>{if(!t||c&&t.conversationId===c)return;let h;try{h=await t.connect(l,a),o(!0)}catch(v){console.error(v),o(!1);return}d(h),c&&await t.conversationExists(c)?await t.switchConversation(c):await t.newConversation();const y=[];for(const v of await t.listMessages())try{const{payload:w,authorId:_,sentOn:b,disableInput:S}=v,A=_===t.userId?"outgoing":"incoming";y.push({direction:A,sender:A==="outgoing"?{name:"You"}:{name:i.botName??"Bot",avatar:i.botAvatar},timestamp:new Date(b),block:w,disableInput:S})}catch{console.error("Invalid message payload")}return r(y.reverse()),()=>{t.disconnect()}},[p,c]),X.jsx(X.Fragment,{children:e})};function Or(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}const Y_e=z["useId".toString()]||(()=>{});let J_e=0;function Nm(e){const[t,n]=z.useState(Y_e());return $u(()=>{e||n(r=>r??String(J_e++))},[e]),e||(t?`radix-${t}`:"")}function ID({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=X_e({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Dr(n),l=C.useCallback(c=>{if(o){const p=typeof c=="function"?c(e):c;p!==e&&s(p)}else i(c)},[o,e,i,s]);return[a,l]}function X_e({defaultProp:e,onChange:t}){const n=C.useState(e),[r]=n,i=C.useRef(r),o=Dr(t);return C.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function Q_e(e,t=globalThis==null?void 0:globalThis.document){const n=Dr(e);C.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const M_="dismissableLayer.update",ewe="dismissableLayer.pointerDownOutside",twe="dismissableLayer.focusOutside";let PD;const nwe=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),rwe=C.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...c}=e,d=C.useContext(nwe),[p,m]=C.useState(null),h=(n=p==null?void 0:p.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,y]=C.useState({}),v=ii(t,L=>m(L)),w=Array.from(d.layers),[_]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=w.indexOf(_),S=p?w.indexOf(p):-1,A=d.layersWithOutsidePointerEventsDisabled.size>0,E=S>=b,T=iwe(L=>{const F=L.target,M=[...d.branches].some(H=>H.contains(F));!E||M||(o==null||o(L),s==null||s(L),L.defaultPrevented||l==null||l())},h),j=owe(L=>{const F=L.target;[...d.branches].some(H=>H.contains(F))||(a==null||a(L),s==null||s(L),L.defaultPrevented||l==null||l())},h);return Q_e(L=>{S===d.layers.size-1&&(i==null||i(L),!L.defaultPrevented&&l&&(L.preventDefault(),l()))},h),C.useEffect(()=>{if(p)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(PD=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),RD(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=PD)}},[p,h,r,d]),C.useEffect(()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),RD())},[p,d]),C.useEffect(()=>{const L=()=>y({});return document.addEventListener(M_,L),()=>document.removeEventListener(M_,L)},[]),C.createElement(dr.div,ys({},c,{ref:v,style:{pointerEvents:A?E?"auto":"none":void 0,...e.style},onFocusCapture:Or(e.onFocusCapture,j.onFocusCapture),onBlurCapture:Or(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:Or(e.onPointerDownCapture,T.onPointerDownCapture)}))});function iwe(e,t=globalThis==null?void 0:globalThis.document){const n=Dr(e),r=C.useRef(!1),i=C.useRef(()=>{});return C.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let c=function(){DD(ewe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function owe(e,t=globalThis==null?void 0:globalThis.document){const n=Dr(e),r=C.useRef(!1);return C.useEffect(()=>{const i=o=>{o.target&&!r.current&&DD(twe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function RD(){const e=new CustomEvent(M_);document.dispatchEvent(e)}function DD(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Are(i,o):i.dispatchEvent(o)}const j_="focusScope.autoFocusOnMount",L_="focusScope.autoFocusOnUnmount",ND={bubbles:!1,cancelable:!0},awe=C.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.useState(null),c=Dr(i),d=Dr(o),p=C.useRef(null),m=ii(t,v=>l(v)),h=C.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.useEffect(()=>{if(r){let v=function(S){if(h.paused||!s)return;const A=S.target;s.contains(A)?p.current=A:ja(p.current,{select:!0})},w=function(S){if(h.paused||!s)return;const A=S.relatedTarget;A!==null&&(s.contains(A)||ja(p.current,{select:!0}))},_=function(S){const A=document.activeElement;for(const E of S)E.removedNodes.length>0&&(s!=null&&s.contains(A)||ja(s))};document.addEventListener("focusin",v),document.addEventListener("focusout",w);const b=new MutationObserver(_);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",w),b.disconnect()}}},[r,s,h.paused]),C.useEffect(()=>{if(s){LD.add(h);const v=document.activeElement;if(!s.contains(v)){const _=new CustomEvent(j_,ND);s.addEventListener(j_,c),s.dispatchEvent(_),_.defaultPrevented||(swe(dwe(MD(s)),{select:!0}),document.activeElement===v&&ja(s))}return()=>{s.removeEventListener(j_,c),setTimeout(()=>{const _=new CustomEvent(L_,ND);s.addEventListener(L_,d),s.dispatchEvent(_),_.defaultPrevented||ja(v??document.body,{select:!0}),s.removeEventListener(L_,d),LD.remove(h)},0)}}},[s,c,d,h]);const y=C.useCallback(v=>{if(!n&&!r||h.paused)return;const w=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,_=document.activeElement;if(w&&_){const b=v.currentTarget,[S,A]=uwe(b);S&&A?!v.shiftKey&&_===A?(v.preventDefault(),n&&ja(S,{select:!0})):v.shiftKey&&_===S&&(v.preventDefault(),n&&ja(A,{select:!0})):_===b&&v.preventDefault()}},[n,r,h.paused]);return C.createElement(dr.div,ys({tabIndex:-1},a,{ref:m,onKeyDown:y}))});function swe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ja(r,{select:t}),document.activeElement!==n)return}function uwe(e){const t=MD(e),n=jD(t,e),r=jD(t.reverse(),e);return[n,r]}function MD(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function jD(e,t){for(const n of e)if(!lwe(n,{upTo:t}))return n}function lwe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function cwe(e){return e instanceof HTMLInputElement&&"select"in e}function ja(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&cwe(e)&&t&&e.select()}}const LD=fwe();function fwe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=FD(e,t),e.unshift(t)},remove(t){var n;e=FD(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function FD(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function dwe(e){return e.filter(t=>t.tagName!=="A")}function pwe(e,t){return C.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const La=e=>{const{present:t,children:n}=e,r=hwe(t),i=typeof n=="function"?n({present:r.isPresent}):C.Children.only(n),o=ii(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.cloneElement(i,{ref:o}):null};La.displayName="Presence";function hwe(e){const[t,n]=C.useState(),r=C.useRef({}),i=C.useRef(e),o=C.useRef("none"),a=e?"mounted":"unmounted",[s,l]=pwe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const c=Mm(r.current);o.current=s==="mounted"?c:"none"},[s]),$u(()=>{const c=r.current,d=i.current;if(d!==e){const m=o.current,h=Mm(c);e?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&m!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),$u(()=>{if(t){const c=p=>{const h=Mm(r.current).includes(p.animationName);p.target===t&&h&&Xi.flushSync(()=>l("ANIMATION_END"))},d=p=>{p.target===t&&(o.current=Mm(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function Mm(e){return(e==null?void 0:e.animationName)||"none"}let F_=0;function mwe(){C.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:qD()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:qD()),F_++,()=>{F_===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),F_--}},[])}function qD(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var _o=function(){return _o=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},_o.apply(this,arguments)};function UD(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function ywe(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var jm="right-scroll-bar-position",Lm="width-before-scroll-bar",gwe="with-scroll-bars-hidden",vwe="--removed-body-scroll-bar-size";function bwe(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function _we(e,t){var n=C.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function wwe(e,t){return _we(t||null,function(n){return e.forEach(function(r){return bwe(r,n)})})}function xwe(e){return e}function Swe(e,t){t===void 0&&(t=xwe);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var d=a;a=[],d.forEach(o)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(d){a.push(d),c()},filter:function(d){return a=a.filter(d),n}}}};return i}function Ewe(e){e===void 0&&(e={});var t=Swe(null);return t.options=_o({async:!0,ssr:!1},e),t}var BD=function(e){var t=e.sideCar,n=UD(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return z.createElement(r,_o({},n))};BD.isSideCarExport=!0;function Awe(e,t){return e.useMedium(t),BD}var zD=Ewe(),q_=function(){},Fm=z.forwardRef(function(e,t){var n=z.useRef(null),r=z.useState({onScrollCapture:q_,onWheelCapture:q_,onTouchMoveCapture:q_}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,d=e.enabled,p=e.shards,m=e.sideCar,h=e.noIsolation,y=e.inert,v=e.allowPinchZoom,w=e.as,_=w===void 0?"div":w,b=UD(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),S=m,A=wwe([n,t]),E=_o(_o({},b),i);return z.createElement(z.Fragment,null,d&&z.createElement(S,{sideCar:zD,removeScrollBar:c,shards:p,noIsolation:h,inert:y,setCallbacks:o,allowPinchZoom:!!v,lockRef:n}),a?z.cloneElement(z.Children.only(s),_o(_o({},E),{ref:A})):z.createElement(_,_o({},E,{className:l,ref:A}),s))});Fm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Fm.classNames={fullWidth:Lm,zeroRight:jm};var ZD,Cwe=function(){if(ZD)return ZD;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Owe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Cwe();return t&&e.setAttribute("nonce",t),e}function Twe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function $we(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var kwe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Owe())&&(Twe(t,n),$we(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Iwe=function(){var e=kwe();return function(t,n){z.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},HD=function(){var e=Iwe(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Pwe={left:0,top:0,right:0,gap:0},U_=function(e){return parseInt(e||"",10)||0},Rwe=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[U_(n),U_(r),U_(i)]},Dwe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Pwe;var t=Rwe(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Nwe=HD(),Mwe=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
423
423
|
.`.concat(gwe,` {
|
|
424
424
|
overflow: hidden `).concat(r,`;
|