@worldresources/wri-design-systems 2.186.0 → 2.186.2
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.cjs.js +3 -3
- package/dist/index.esm.js +12 -12
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -3684,10 +3684,10 @@ function Ju(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3684
3684
|
background-image: url(${n});
|
|
3685
3685
|
background-size: cover;
|
|
3686
3686
|
background-position: center;
|
|
3687
|
-
`)}),t.jsxs("div",{css:Ln,children:[t.jsxs("div",{className:"ds-base-map-title-container",children:[t.jsx("p",{className:"ds-base-map-title",children:e.label}),e.active?t.jsx(Gt,{label:"Active",variant:"warning",size:"small",icon:t.jsx(C,{})}):null]}),t.jsx("p",{className:"ds-base-map-caption",children:e.caption}),e.active&&e.children?t.jsx("div",{className:"ds-base-map-children",children:e.children}):null]})]},e.label);var n}))}):null]})]})})},exports.Breadcrumb=({links:r,separator:o,maxItems:i=99,linkRouter:a,size:s="default"})=>{const[l,c]=n.useState(r.length>i);n.useEffect((()=>{c(r.length>i)}),[r.length]);const d=a;return t.jsx(e.Breadcrumb.Root,{children:t.jsx(e.Breadcrumb.List,{gap:"small"===s?"6px":"10px",children:l?t.jsxs(t.Fragment,{children:[t.jsx(e.Breadcrumb.Item,{css:Mh(s),children:t.jsxs(d,{to:r[0].link,href:r[0].link,children:[r[0].icon,r[0].label]})}),t.jsx(e.Breadcrumb.Separator,{css:Ph(s),children:o||t.jsx($,{rotate:"270"})}),t.jsx("li",{className:"chakra-breadcrumb__item",children:t.jsx("button",{css:_h,type:"button",onClick:()=>c(!1),children:"..."})}),t.jsx(e.Breadcrumb.Separator,{css:Ph(s),children:o||t.jsx($,{rotate:"270"})}),t.jsx(e.Breadcrumb.Item,{css:Mh(s),children:t.jsxs("p",{"aria-current":"page","aria-label":r[r.length-1].label,children:[r[r.length-1].icon,r[r.length-1].label]})})]}):r.map(((i,a)=>i?.label?t.jsxs(n.Fragment,{children:[t.jsx(e.Breadcrumb.Item,{css:Mh(s),children:a<r.length-1?t.jsxs(d,{to:i.link,href:i.link,children:[i.icon,i.label]}):t.jsxs("p",{"aria-current":"page","aria-label":i.label,children:[i.label&&i.icon?i.icon:"",i.label]})}),a<r.length-1?t.jsx(e.Breadcrumb.Separator,{css:Ph(s),children:o||t.jsx($,{rotate:"270"})}):null]},i.label):null))})})},exports.Button=b,exports.Checkbox=Le,exports.CheckboxList=({label:o,caption:i,checkboxes:a,defaultValues:s,onCheckedChange:l,errorMessage:c,horizontal:d,required:u,hideCheckedCounter:p=!1,hideExpandToggle:h=!1})=>{const[f,
|
|
3688
|
-
margin-left: ${
|
|
3687
|
+
`)}),t.jsxs("div",{css:Ln,children:[t.jsxs("div",{className:"ds-base-map-title-container",children:[t.jsx("p",{className:"ds-base-map-title",children:e.label}),e.active?t.jsx(Gt,{label:"Active",variant:"warning",size:"small",icon:t.jsx(C,{})}):null]}),t.jsx("p",{className:"ds-base-map-caption",children:e.caption}),e.active&&e.children?t.jsx("div",{className:"ds-base-map-children",children:e.children}):null]})]},e.label);var n}))}):null]})]})})},exports.Breadcrumb=({links:r,separator:o,maxItems:i=99,linkRouter:a,size:s="default"})=>{const[l,c]=n.useState(r.length>i);n.useEffect((()=>{c(r.length>i)}),[r.length]);const d=a;return t.jsx(e.Breadcrumb.Root,{children:t.jsx(e.Breadcrumb.List,{gap:"small"===s?"6px":"10px",children:l?t.jsxs(t.Fragment,{children:[t.jsx(e.Breadcrumb.Item,{css:Mh(s),children:t.jsxs(d,{to:r[0].link,href:r[0].link,children:[r[0].icon,r[0].label]})}),t.jsx(e.Breadcrumb.Separator,{css:Ph(s),children:o||t.jsx($,{rotate:"270"})}),t.jsx("li",{className:"chakra-breadcrumb__item",children:t.jsx("button",{css:_h,type:"button",onClick:()=>c(!1),children:"..."})}),t.jsx(e.Breadcrumb.Separator,{css:Ph(s),children:o||t.jsx($,{rotate:"270"})}),t.jsx(e.Breadcrumb.Item,{css:Mh(s),children:t.jsxs("p",{"aria-current":"page","aria-label":r[r.length-1].label,children:[r[r.length-1].icon,r[r.length-1].label]})})]}):r.map(((i,a)=>i?.label?t.jsxs(n.Fragment,{children:[t.jsx(e.Breadcrumb.Item,{css:Mh(s),children:a<r.length-1?t.jsxs(d,{to:i.link,href:i.link,children:[i.icon,i.label]}):t.jsxs("p",{"aria-current":"page","aria-label":i.label,children:[i.label&&i.icon?i.icon:"",i.label]})}),a<r.length-1?t.jsx(e.Breadcrumb.Separator,{css:Ph(s),children:o||t.jsx($,{rotate:"270"})}):null]},i.label):null))})})},exports.Button=b,exports.Checkbox=Le,exports.CheckboxList=({label:o,caption:i,checkboxes:a,defaultValues:s,onCheckedChange:l,errorMessage:c,horizontal:d,required:u,hideCheckedCounter:p=!1,hideExpandToggle:h=!1})=>{const f=Array.isArray(s)?s:[],x=n.useMemo((()=>new Set(f)),[f]),[g,v]=n.useState((()=>a.filter((e=>e.name)).reduce(((e,t)=>{const n=t.name;return e[n]="boolean"==typeof t.checked?t.checked:x.has(n),e}),{}))),[m,b]=n.useState(!0);n.useEffect((()=>{v((e=>{const t=a.filter((e=>e.name)).reduce(((t,n)=>{const r=n.name;return t[r]="boolean"==typeof n.checked?n.checked:e[r]??x.has(r),t}),{});return Object.keys(e).length===Object.keys(t).length&&Object.entries(t).every((([t,n])=>e[t]===n))?e:t}))}),[a,x]);const y="string"!=typeof o,w=a.filter((e=>e.name)).reduce(((e,t)=>{const n=t.name;return e[n]="boolean"==typeof t.checked?t.checked:!!g[n],e}),{}),C=a.length>0&&a.every((e=>e.name&&w[e.name])),j=a.some((e=>e.name&&w[e.name]))&&!C,k=a.length,S=`${a.filter((e=>e?.name&&w[e.name])).length} / ${k}`,E=i?`${i}.`:"",R=u?"Required.":"Optional",L=c?`Error: ${c}.`:"",O=`${y?o.label:o}. ${E} ${R} ${L} `;return t.jsxs(e.Group,{css:ot,"aria-label":O,children:[c?t.jsx("div",{css:lt}):null,t.jsxs("div",{css:(T=!!c,r.css`
|
|
3688
|
+
margin-left: ${T?"19px":"0px"};
|
|
3689
3689
|
width: 100%;
|
|
3690
|
-
`),children:[t.jsx("div",{css:it,children:"string"==typeof o?t.jsxs(t.Fragment,{children:[u&&t.jsx("span",{id:"required-symbol","aria-label":"required",children:"*"}),o]}):t.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},children:[t.jsxs(Le,{checked:
|
|
3690
|
+
`),children:[t.jsx("div",{css:it,children:"string"==typeof o?t.jsxs(t.Fragment,{children:[u&&t.jsx("span",{id:"required-symbol","aria-label":"required",children:"*"}),o]}):t.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},children:[t.jsxs(Le,{checked:C,indeterminate:j,onCheckedChange:e=>(e=>{const t=a.filter((e=>void 0!==e.name)).reduce(((t,n)=>(t[n.name]=e,t)),{});v(t),l?.(t)})(!!e.checked),children:[o.label," ",!p&&t.jsx("span",{"aria-hidden":"true",css:dt,children:S})]}),!h&&t.jsxs("button",{type:"button",onClick:()=>b((e=>!e)),"aria-expanded":m,"aria-controls":"checkbox-list",css:ut,children:[m?"Hide":"Expand",t.jsx("span",{"aria-hidden":"true",children:m?t.jsx($,{style:{transform:"rotate(180deg)"}}):t.jsx($,{})})]})]})}),t.jsx("p",{css:at,"aria-label":i,children:i}),c?t.jsx("p",{css:ct,"aria-label":c,children:c}):null,t.jsx("div",{id:"checkbox-list",css:st(d,m),children:a.map((e=>{const{onCheckedChange:n,...r}=e;return t.jsx(Le,{ms:y&&!d?"6":"",css:{},checked:!!e?.name&&!!w[e.name],onCheckedChange:({checked:t})=>{((e,t)=>{const n={...g};t&&(n[t]=e,v(n)),l&&l(n)})(t,e.name),n?.({checked:!!t})},...r},e.name)}))})]})]});var T},exports.CheckboxOptionCard=({defaultValue:n,items:o,onValueChange:i})=>t.jsx(e.CheckboxGroup,{defaultValue:n,onValueChange:i,children:t.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"12px",children:o.map((o=>{return t.jsxs(e.CheckboxCard.Root,{css:Oe,defaultChecked:-1!==n?.indexOf(o.value),disabled:o.disabled,value:o.value,children:[t.jsx(e.CheckboxCard.HiddenInput,{}),t.jsxs(e.CheckboxCard.Control,{css:Te,children:[t.jsxs(e.CheckboxCard.Content,{css:(a=o.variant,r.css`
|
|
3691
3691
|
width: 100%;
|
|
3692
3692
|
display: flex;
|
|
3693
3693
|
flex-direction: ${"centered"===a?"column":"row"};
|
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as o,Icon as i,Tooltip as a,Portal as l,Group as s,Menu as c,Checkbox as d,CheckboxGroup as u,HStack as p,CheckboxCard as h,RadioCard as f,RadioGroup as g,Slider as v,For as m,Switch as x,Field as b,Input as y,Select as w,Tag as C,createListCollection as $,Textarea as k,Accordion as S,Popover as E,chakra as L,Flex as R,Text as O,Pagination as T,ButtonGroup as _,Table as P,Dialog as M,Breadcrumb as D,Tabs as N,VisuallyHidden as V,useMediaQuery as I,Collapsible as j,useDisclosure as A,InputGroup as z,Avatar as H,createToaster as B,Toaster as F,Toast as Z,Stack as W}from"@chakra-ui/react";import{jsxs as q,jsx as G,Fragment as U}from"@emotion/react/jsx-runtime";import*as X from"react";import Y,{forwardRef as K,useState as J,useRef as Q,useEffect as ee,
|
|
1
|
+
import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as o,Icon as i,Tooltip as a,Portal as l,Group as s,Menu as c,Checkbox as d,CheckboxGroup as u,HStack as p,CheckboxCard as h,RadioCard as f,RadioGroup as g,Slider as v,For as m,Switch as x,Field as b,Input as y,Select as w,Tag as C,createListCollection as $,Textarea as k,Accordion as S,Popover as E,chakra as L,Flex as R,Text as O,Pagination as T,ButtonGroup as _,Table as P,Dialog as M,Breadcrumb as D,Tabs as N,VisuallyHidden as V,useMediaQuery as I,Collapsible as j,useDisclosure as A,InputGroup as z,Avatar as H,createToaster as B,Toaster as F,Toast as Z,Stack as W}from"@chakra-ui/react";import{jsxs as q,jsx as G,Fragment as U}from"@emotion/react/jsx-runtime";import*as X from"react";import Y,{forwardRef as K,useState as J,useRef as Q,useEffect as ee,useMemo as te,useId as ne,useLayoutEffect as re,Children as oe,useCallback as ie,createElement as ae,useImperativeHandle as le,useDebugValue as se,Fragment as ce}from"react";import{css as de}from"@emotion/react";import{jsx as ue,jsxs as pe,Fragment as he}from"react/jsx-runtime";import*as fe from"react-dom";import ge,{createPortal as ve}from"react-dom";import me from"object-assign";const xe={neutral:{100:{value:"#FFFFFF"},200:{value:"#F6F6F6"},300:{value:"#E7E6E6"},400:{value:"#C9C9C9"},500:{value:"#B0B0B0"},600:{value:"#A1A1A1"},700:{value:"#5C5959"},800:{value:"#3D3B3B"},900:{value:"#1A1919"}},primary:{100:{value:"#FFFBF2"},200:{value:"#FCEFD3"},300:{value:"#FADFA7"},400:{value:"#F5BF4F"},500:{value:"#F0AB00"},600:{value:"#DE9E00"},700:{value:"#855B00"},800:{value:"#5F4205"},900:{value:"#332300"}},secondary:{100:{value:"#F2F6FF"},200:{value:"#D7E0F7"},300:{value:"#B2C3F0"},400:{value:"#4F6CBA"},500:{value:"#3855A3"},600:{value:"#0A4298"},700:{value:"#123369"},800:{value:"#162241"},900:{value:"#0B1121"}},success:{100:{value:"#EBF5F2"},200:{value:"#D3EED1"},300:{value:"#C2E5DC"},500:{value:"#009E77"},900:{value:"#00664D"}},warning:{100:{value:"#FBF7EA"},200:{value:"#E3CC8F"},300:{value:"#EEDDA5"},500:{value:"#A88100"},900:{value:"#715804"}},error:{100:{value:"#FFEFED"},200:{value:"#EDA1A9"},300:{value:"#F6C5C1"},500:{value:"#C11101"},900:{value:"#8D0D01"}},accessible:{"text-on-primary-mids":{value:"#332300"},"text-on-secondary-mids":{value:"#F2F6FF"},"controls-on-neutral-lights":{value:"#855B00"},"controls-on-neutral-darks":{value:"#F5BF4F"}}},be=(e=>{const t={};return Object.keys(e).forEach((n=>{Object.keys(e[n]).forEach((r=>{const o=e[n][r].value;t[`${n}-${r}`]=o}))})),t})(xe),ye=e(t,{theme:{tokens:{colors:xe}}}),we=(e,t)=>ye.tokens.getVar(`colors.${e}.${t}`)||xe?.[e]?.[t]?.value,Ce=e=>de`
|
|
2
2
|
width: auto;
|
|
3
3
|
height: ${"small"===e?"28px":"40px"};
|
|
4
4
|
font-size: ${"small"===e?"12px":"16px"};
|
|
@@ -1052,10 +1052,10 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as o,Ic
|
|
|
1052
1052
|
> span {
|
|
1053
1053
|
margin-left: 6px;
|
|
1054
1054
|
}
|
|
1055
|
-
`,Sn=({label:e,caption:t,checkboxes:n,defaultValues:r,onCheckedChange:o,errorMessage:i,horizontal:a,required:l,hideCheckedCounter:c=!1,hideExpandToggle:d=!1})=>{const[u,
|
|
1056
|
-
margin-left: ${
|
|
1055
|
+
`,Sn=({label:e,caption:t,checkboxes:n,defaultValues:r,onCheckedChange:o,errorMessage:i,horizontal:a,required:l,hideCheckedCounter:c=!1,hideExpandToggle:d=!1})=>{const u=Array.isArray(r)?r:[],p=te((()=>new Set(u)),[u]),[h,f]=J((()=>n.filter((e=>e.name)).reduce(((e,t)=>{const n=t.name;return e[n]="boolean"==typeof t.checked?t.checked:p.has(n),e}),{}))),[g,v]=J(!0);ee((()=>{f((e=>{const t=n.filter((e=>e.name)).reduce(((t,n)=>{const r=n.name;return t[r]="boolean"==typeof n.checked?n.checked:e[r]??p.has(r),t}),{});return Object.keys(e).length===Object.keys(t).length&&Object.entries(t).every((([t,n])=>e[t]===n))?e:t}))}),[n,p]);const m="string"!=typeof e,x=n.filter((e=>e.name)).reduce(((e,t)=>{const n=t.name;return e[n]="boolean"==typeof t.checked?t.checked:!!h[n],e}),{}),b=n.length>0&&n.every((e=>e.name&&x[e.name])),y=n.some((e=>e.name&&x[e.name]))&&!b,w=n.length,C=`${n.filter((e=>e?.name&&x[e.name])).length} / ${w}`,$=t?`${t}.`:"",k=l?"Required.":"Optional",S=i?`Error: ${i}.`:"",E=`${m?e.label:e}. ${$} ${k} ${S} `;return q(s,{css:mn,"aria-label":E,children:[i?G("div",{css:wn}):null,q("div",{css:(L=!!i,de`
|
|
1056
|
+
margin-left: ${L?"19px":"0px"};
|
|
1057
1057
|
width: 100%;
|
|
1058
|
-
`),children:[G("div",{css:xn,children:"string"==typeof e?q(U,{children:[l&&G("span",{id:"required-symbol","aria-label":"required",children:"*"}),e]}):q("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},children:[q(At,{checked:
|
|
1058
|
+
`),children:[G("div",{css:xn,children:"string"==typeof e?q(U,{children:[l&&G("span",{id:"required-symbol","aria-label":"required",children:"*"}),e]}):q("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},children:[q(At,{checked:b,indeterminate:y,onCheckedChange:e=>(e=>{const t=n.filter((e=>void 0!==e.name)).reduce(((t,n)=>(t[n.name]=e,t)),{});f(t),o?.(t)})(!!e.checked),children:[e.label," ",!c&&G("span",{"aria-hidden":"true",css:$n,children:C})]}),!d&&q("button",{type:"button",onClick:()=>v((e=>!e)),"aria-expanded":g,"aria-controls":"checkbox-list",css:kn,children:[g?"Hide":"Expand",G("span",{"aria-hidden":"true",children:G(Me,g?{style:{transform:"rotate(180deg)"}}:{})})]})]})}),G("p",{css:bn,"aria-label":t,children:t}),i?G("p",{css:Cn,"aria-label":i,children:i}):null,G("div",{id:"checkbox-list",css:yn(a,g),children:n.map((e=>{const{onCheckedChange:t,...n}=e;return G(At,{ms:m&&!a?"6":"",css:{},checked:!!e?.name&&!!x[e.name],onCheckedChange:({checked:n})=>{((e,t)=>{const n={...h};t&&(n[t]=e,f(n)),o&&o(n)})(n,e.name),t?.({checked:!!n})},...n},e.name)}))})]})]});var L},En=de`
|
|
1059
1059
|
width: 100%;
|
|
1060
1060
|
max-width: 370px;
|
|
1061
1061
|
position: relative;
|
|
@@ -1691,7 +1691,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as o,Ic
|
|
|
1691
1691
|
}
|
|
1692
1692
|
|
|
1693
1693
|
${t||n?`\n border: 1px solid ${we("neutral",700)};\n `:""}
|
|
1694
|
-
`,Ar=({label:e,caption:t,placeholder:n,errorMessage:r,required:o,disabled:i,size:a="default",defaultValue:l="",onChange:s,minLength:c,maxLength:d,...u})=>{const[p,h]=J(l),[f,g]=J(!1),[v,m]=J(!1),[x,y]=J(""),w=
|
|
1694
|
+
`,Ar=({label:e,caption:t,placeholder:n,errorMessage:r,required:o,disabled:i,size:a="default",defaultValue:l="",onChange:s,minLength:c,maxLength:d,...u})=>{const[p,h]=J(l),[f,g]=J(!1),[v,m]=J(!1),[x,y]=J(""),w=ne(),C=ne(),$=ne();ee((()=>{const{length:e}=l;c&&e<c&&e>0?(g(e<c),m(!1),y(`Enter at least ${c-e} characters`)):c&&0===e&&y(`Min ${c} characters`),d&&e>0?(g(!1),m(e>d),y(`You have ${d-e} characters remaining`)):d&&0===e&&y(`Max ${d} characters`)}),[]);const S=!!r||f||v,E=[t?w:null,S?C:null,x?$:null].filter(Boolean).join(" ")||void 0;return q("div",{css:Pr(a),children:[S?G("div",{css:Mr}):null,q(b.Root,{required:o,invalid:S,gap:"0",style:{marginLeft:S?"19px":"0px"},children:[e?q(b.Label,{css:Dr(a,i),"aria-label":e,children:[G(b.RequiredIndicator,{"aria-label":"required"}),e,o?"":G("span",{children:" (Optional)"})]}):null,t?G(b.HelperText,{id:w,css:Nr(a,i),children:t}):null,r?G(b.ErrorText,{id:C,css:Ir,"aria-label":`Error: ${r}`,"aria-live":"polite",children:r}):null,G(k,{placeholder:n,disabled:i,css:jr(a,p,l),onChange:e=>{h(e.target.value);const{length:t}=e.target.value;c&&d?(g(t<c),m(t>d),y(`You have ${d-t} characters remaining`)):c?(g(t<c),m(!1),y(t<c?`Enter at least ${c-t} characters`:"")):d&&(m(t>d),g(!1),y(`You have ${d-t} characters remaining`)),s&&s(e)},value:p,"aria-describedby":E,_placeholder:{color:"var(--chakra-colors-neutral-500)"},...u}),f&&c?q(b.ErrorText,{id:C,css:Ir,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You need ",c-p.length," more characters"]}):null,v&&d?q(b.ErrorText,{id:C,css:Ir,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You have ",p.length-d," characters too many"]}):null,!x||v||f?null:G(b.HelperText,{id:$,css:Vr,"aria-live":"polite",children:x})]})]})},zr=(e,t)=>de`
|
|
1695
1695
|
height: ${e};
|
|
1696
1696
|
width: ${t};
|
|
1697
1697
|
border: 1px solid ${we("neutral",300)};
|
|
@@ -1847,7 +1847,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as o,Ic
|
|
|
1847
1847
|
box-shadow:
|
|
1848
1848
|
0 0 0 2px ${we("neutral",100)},
|
|
1849
1849
|
rgba(0, 0, 0, 0.05) 0px 2px 2px 4px;
|
|
1850
|
-
`:"",children:q("button",{type:"button",css:Xr(n,!!r,!!t,a,i,l),"aria-label":e||(i?`Cluster of ${i} locations`:"simple-pin"===l?"Map pin location":"Map point"),ref:s,onClick:r,children:["cluster"===l&&c,"icon"===l&&t]})})})),Kr=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:o,variant:i="cluster"})=>ue(Yr,{count:r,mode:o,onClick:e,ref:t,showFocusState:n,variant:i}),Jr=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:o,variant:i="simple-pin"})=>ue(Yr,{count:r,mode:o,onClick:e,ref:t,showFocusState:n,variant:i}),Qr={Paper:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>ue(Yr,{ariaLabel:e||"paper icon",icon:ue(Qe,{color:"#79022C"}),backgroundColor:"#FFBCD4",onClick:t,ref:n,showFocusState:r}),Drop:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>ue(Yr,{ariaLabel:e||"drop icon",icon:ue(et,{color:"#7D2A03"}),backgroundColor:"#F3A078",onClick:t,ref:n,showFocusState:r}),Plant:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>ue(Yr,{ariaLabel:e||"plant icon",icon:ue(tt,{color:"#3B6402"}),backgroundColor:"#B7E578",onClick:t,ref:n,showFocusState:r}),Point:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>ue(Yr,{ariaLabel:e||"point icon",backgroundColor:we("primary",500),onClick:t,ref:n,showFocusState:r})};function eo(){return"undefined"!=typeof window}function to(e){return oo(e)?(e.nodeName||"").toLowerCase():"#document"}function no(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ro(e){var t;return null==(t=(oo(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function oo(e){return!!eo()&&(e instanceof Node||e instanceof no(e).Node)}function io(e){return!!eo()&&(e instanceof Element||e instanceof no(e).Element)}function ao(e){return!!eo()&&(e instanceof HTMLElement||e instanceof no(e).HTMLElement)}function lo(e){return!(!eo()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof no(e).ShadowRoot)}const so=new Set(["inline","contents"]);function co(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Co(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!so.has(o)}const uo=new Set(["table","td","th"]);function po(e){return uo.has(to(e))}const ho=[":popover-open",":modal"];function fo(e){return ho.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}const go=["transform","translate","scale","rotate","perspective"],vo=["transform","translate","scale","rotate","perspective","filter"],mo=["paint","layout","strict","content"];function xo(e){const t=bo(),n=io(e)?Co(e):e;return go.some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||vo.some((e=>(n.willChange||"").includes(e)))||mo.some((e=>(n.contain||"").includes(e)))}function bo(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const yo=new Set(["html","body","#document"]);function wo(e){return yo.has(to(e))}function Co(e){return no(e).getComputedStyle(e)}function $o(e){return io(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ko(e){if("html"===to(e))return e;const t=e.assignedSlot||e.parentNode||lo(e)&&e.host||ro(e);return lo(t)?t.host:t}function So(e){const t=ko(e);return wo(t)?e.ownerDocument?e.ownerDocument.body:e.body:ao(t)&&co(t)?t:So(t)}function Eo(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=So(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=no(o);if(i){const e=Lo(a);return t.concat(a,a.visualViewport||[],co(o)?o:[],e&&n?Eo(e):[])}return t.concat(o,Eo(o,[],n))}function Lo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Ro=Math.min,Oo=Math.max,To=Math.round,_o=Math.floor,Po=e=>({x:e,y:e}),Mo={left:"right",right:"left",bottom:"top",top:"bottom"},Do={start:"end",end:"start"};function No(e,t,n){return Oo(e,Ro(t,n))}function Vo(e,t){return"function"==typeof e?e(t):e}function Io(e){return e.split("-")[0]}function jo(e){return e.split("-")[1]}function Ao(e){return"x"===e?"y":"x"}function zo(e){return"y"===e?"height":"width"}const Ho=new Set(["top","bottom"]);function Bo(e){return Ho.has(Io(e))?"y":"x"}function Fo(e){return Ao(Bo(e))}function Zo(e){return e.replace(/start|end/g,(e=>Do[e]))}const Wo=["left","right"],qo=["right","left"],Go=["top","bottom"],Uo=["bottom","top"];function Xo(e,t,n,r){const o=jo(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?qo:Wo:t?Wo:qo;case"left":case"right":return t?Go:Uo;default:return[]}}(Io(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(Zo)))),i}function Yo(e){return e.replace(/left|right|bottom|top/g,(e=>Mo[e]))}function Ko(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Jo(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}const Qo="data-floating-ui-focusable";function ei(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&lo(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function ti(e){return"composedPath"in e?e.composedPath()[0]:e.target}function ni(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function ri(e){return(null==e?void 0:e.ownerDocument)||document}function oi(e,t,n){void 0===n&&(n=!0);return e.filter((e=>{var r;return e.parentId===t&&(!n||(null==(r=e.context)?void 0:r.open))})).flatMap((t=>[t,...oi(e,t.id,n)]))}var ii="undefined"!=typeof document?ne:function(){};const ai={...X}.useInsertionEffect||(e=>e());function li(e){const t=X.useRef((()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")}));return ai((()=>{t.current=e})),X.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function si(e,t,n){let{reference:r,floating:o}=e;const i=Bo(t),a=Fo(t),l=zo(a),s=Io(t),c="y"===i,d=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,p=r[l]/2-o[l]/2;let h;switch(s){case"top":h={x:d,y:r.y-o.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:u};break;case"left":h={x:r.x-o.width,y:u};break;default:h={x:r.x,y:r.y}}switch(jo(t)){case"start":h[a]-=p*(n&&c?-1:1);break;case"end":h[a]+=p*(n&&c?-1:1)}return h}async function ci(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:h=0}=Vo(t,e),f=Ko(h),g=l[p?"floating"===u?"reference":"floating":u],v=Jo(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:d,strategy:s})),m="floating"===u?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,x=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),b=await(null==i.isElement?void 0:i.isElement(x))&&await(null==i.getScale?void 0:i.getScale(x))||{x:1,y:1},y=Jo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:m,offsetParent:x,strategy:s}):m);return{top:(v.top-y.top+f.top)/b.y,bottom:(y.bottom-v.bottom+f.bottom)/b.y,left:(v.left-y.left+f.left)/b.x,right:(y.right-v.right+f.right)/b.x}}const di=new Set(["left","top"]);function ui(e){const t=Co(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ao(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=To(n)!==i||To(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function pi(e){return io(e)?e:e.contextElement}function hi(e){const t=pi(e);if(!ao(t))return Po(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=ui(t);let a=(i?To(n.width):n.width)/r,l=(i?To(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const fi=Po(0);function gi(e){const t=no(e);return bo()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:fi}function vi(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=pi(e);let a=Po(1);t&&(r?io(r)&&(a=hi(r)):a=hi(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==no(e))&&t}(i,n,r)?gi(i):Po(0);let s=(o.left+l.x)/a.x,c=(o.top+l.y)/a.y,d=o.width/a.x,u=o.height/a.y;if(i){const e=no(i),t=r&&io(r)?no(r):r;let n=e,o=Lo(n);for(;o&&r&&t!==n;){const e=hi(o),t=o.getBoundingClientRect(),r=Co(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,d*=e.x,u*=e.y,s+=i,c+=a,n=no(o),o=Lo(n)}}return Jo({width:d,height:u,x:s,y:c})}function mi(e,t){const n=$o(e).scrollLeft;return t?t.left+n:vi(ro(e)).left+n}function xi(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-mi(e,n),y:n.top+t.scrollTop}}const bi=new Set(["absolute","fixed"]);function yi(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=no(e),r=ro(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,s=0;if(o){i=o.width,a=o.height;const e=bo();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}const c=mi(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else c<=25&&(i+=c);return{width:i,height:a,x:l,y:s}}(e,n);else if("document"===t)r=function(e){const t=ro(e),n=$o(e),r=e.ownerDocument.body,o=Oo(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Oo(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+mi(e);const l=-n.scrollTop;return"rtl"===Co(r).direction&&(a+=Oo(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:l}}(ro(e));else if(io(t))r=function(e,t){const n=vi(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ao(e)?hi(e):Po(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=gi(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Jo(r)}function wi(e,t){const n=ko(e);return!(n===t||!io(n)||wo(n))&&("fixed"===Co(n).position||wi(n,t))}function Ci(e,t,n){const r=ao(t),o=ro(t),i="fixed"===n,a=vi(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const s=Po(0);function c(){s.x=mi(o)}if(r||!r&&!i)if(("body"!==to(t)||co(o))&&(l=$o(t)),r){const e=vi(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const d=!o||r||i?Po(0):xi(o,l);return{x:a.left+l.scrollLeft-s.x-d.x,y:a.top+l.scrollTop-s.y-d.y,width:a.width,height:a.height}}function $i(e){return"static"===Co(e).position}function ki(e,t){if(!ao(e)||"fixed"===Co(e).position)return null;if(t)return t(e);let n=e.offsetParent;return ro(e)===n&&(n=n.ownerDocument.body),n}function Si(e,t){const n=no(e);if(fo(e))return n;if(!ao(e)){let t=ko(e);for(;t&&!wo(t);){if(io(t)&&!$i(t))return t;t=ko(t)}return n}let r=ki(e,t);for(;r&&po(r)&&$i(r);)r=ki(r,t);return r&&wo(r)&&$i(r)&&!xo(r)?n:r||function(e){let t=ko(e);for(;ao(t)&&!wo(t);){if(xo(t))return t;if(fo(t))return null;t=ko(t)}return null}(e)||n}const Ei={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=ro(r),l=!!t&&fo(t.floating);if(r===a||l&&i)return n;let s={scrollLeft:0,scrollTop:0},c=Po(1);const d=Po(0),u=ao(r);if((u||!u&&!i)&&(("body"!==to(r)||co(a))&&(s=$o(r)),ao(r))){const e=vi(r);c=hi(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}const p=!a||u||i?Po(0):xi(a,s);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+d.x+p.x,y:n.y*c.y-s.scrollTop*c.y+d.y+p.y}},getDocumentElement:ro,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?fo(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Eo(e,[],!1).filter((e=>io(e)&&"body"!==to(e))),o=null;const i="fixed"===Co(e).position;let a=i?ko(e):e;for(;io(a)&&!wo(a);){const t=Co(a),n=xo(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&bi.has(o.position)||co(a)&&!n&&wi(e,a))?r=r.filter((e=>e!==a)):o=t,a=ko(a)}return t.set(e,r),r}(t,this._c):[].concat(n),a=[...i,r],l=a[0],s=a.reduce(((e,n)=>{const r=yi(t,n,o);return e.top=Oo(r.top,e.top),e.right=Ro(r.right,e.right),e.bottom=Ro(r.bottom,e.bottom),e.left=Oo(r.left,e.left),e}),yi(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Si,getElementRects:async function(e){const t=this.getOffsetParent||Si,n=this.getDimensions,r=await n(e.floating);return{reference:Ci(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=ui(e);return{width:t,height:n}},getScale:hi,isElement:io,isRTL:function(e){return"rtl"===Co(e).direction}};function Li(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ri(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=pi(e),d=o||i?[...c?Eo(c):[],...Eo(t)]:[];d.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const u=c&&l?function(e,t){let n,r=null;const o=ro(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),i();const c=e.getBoundingClientRect(),{left:d,top:u,width:p,height:h}=c;if(l||t(),!p||!h)return;const f={rootMargin:-_o(u)+"px "+-_o(o.clientWidth-(d+p))+"px "+-_o(o.clientHeight-(u+h))+"px "+-_o(d)+"px",threshold:Oo(0,Ro(1,s))||1};let g=!0;function v(t){const r=t[0].intersectionRatio;if(r!==s){if(!g)return a();r?a(!1,r):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}1!==r||Li(c,e.getBoundingClientRect())||a(),g=!1}try{r=new IntersectionObserver(v,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(v,f)}r.observe(e)}(!0),i}(c,n):null;let p,h=-1,f=null;a&&(f=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),n()})),c&&!s&&f.observe(c),f.observe(t));let g=s?vi(e):null;return s&&function t(){const r=vi(e);g&&!Li(g,r)&&n();g=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==u||u(),null==(e=f)||e.disconnect(),f=null,s&&cancelAnimationFrame(p)}}const Oi=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:l}=t,s=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=Io(n),l=jo(n),s="y"===Bo(n),c=di.has(a)?-1:1,d=i&&s?-1:1,u=Vo(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:f}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&"number"==typeof f&&(h="end"===l?-1*f:f),s?{x:h*d,y:p*c}:{x:p*c,y:h*d}}(t,e);return a===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:a}}}}},Ti=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=Vo(e,t),c={x:n,y:r},d=await ci(t,s),u=Bo(Io(o)),p=Ao(u);let h=c[p],f=c[u];if(i){const e="y"===p?"bottom":"right";h=No(h+d["y"===p?"top":"left"],h,h-d[e])}if(a){const e="y"===u?"bottom":"right";f=No(f+d["y"===u?"top":"left"],f,f-d[e])}const g=l.fn({...t,[p]:h,[u]:f});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:i,[u]:a}}}}}},_i=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:s,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:g=!0,...v}=Vo(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const m=Io(o),x=Bo(l),b=Io(l)===l,y=await(null==s.isRTL?void 0:s.isRTL(c.floating)),w=p||(b||!g?[Yo(l)]:function(e){const t=Yo(e);return[Zo(e),t,Zo(t)]}(l)),C="none"!==f;!p&&C&&w.push(...Xo(l,g,f,y));const $=[l,...w],k=await ci(t,v),S=[];let E=(null==(r=i.flip)?void 0:r.overflows)||[];if(d&&S.push(k[m]),u){const e=function(e,t,n){void 0===n&&(n=!1);const r=jo(e),o=Fo(e),i=zo(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Yo(a)),[a,Yo(a)]}(o,a,y);S.push(k[e[0]],k[e[1]])}if(E=[...E,{placement:o,overflows:S}],!S.every((e=>e<=0))){var L,R;const e=((null==(L=i.flip)?void 0:L.index)||0)+1,t=$[e];if(t){if(!("alignment"===u&&x!==Bo(t))||E.every((e=>Bo(e.placement)!==x||e.overflows[0]>0)))return{data:{index:e,overflows:E},reset:{placement:t}}}let n=null==(R=E.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:R.placement;if(!n)switch(h){case"bestFit":{var O;const e=null==(O=E.filter((e=>{if(C){const t=Bo(e.placement);return t===x||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:O[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}},Pi=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:l,middlewareData:s}=t,{element:c,padding:d=0}=Vo(e,t)||{};if(null==c)return{};const u=Ko(d),p={x:n,y:r},h=Fo(o),f=zo(h),g=await a.getDimensions(c),v="y"===h,m=v?"top":"left",x=v?"bottom":"right",b=v?"clientHeight":"clientWidth",y=i.reference[f]+i.reference[h]-p[h]-i.floating[f],w=p[h]-i.reference[h],C=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let $=C?C[b]:0;$&&await(null==a.isElement?void 0:a.isElement(C))||($=l.floating[b]||i.floating[f]);const k=y/2-w/2,S=$/2-g[f]/2-1,E=Ro(u[m],S),L=Ro(u[x],S),R=E,O=$-g[f]-L,T=$/2-g[f]/2+k,_=No(R,T,O),P=!s.arrow&&null!=jo(o)&&T!==_&&i.reference[f]/2-(T<R?E:L)-g[f]/2<0,M=P?T<R?T-R:T-O:0;return{[h]:p[h]+M,data:{[h]:_,centerOffset:T-_-M,...P&&{alignmentOffset:M}},reset:P}}}),Mi=(e,t,n)=>{const r=new Map,o={platform:Ei,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=i.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=si(c,r,s),p=r,h={},f=0;for(let n=0;n<l.length;n++){const{name:i,fn:g}=l[n],{x:v,y:m,data:x,reset:b}=await g({x:d,y:u,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});d=null!=v?v:d,u=null!=m?m:u,h={...h,[i]:{...h[i],...x}},b&&f<=50&&(f++,"object"==typeof b&&(b.placement&&(p=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:d,y:u}=si(c,p,s))),n=-1)}return{x:d,y:u,placement:p,strategy:o,middlewareData:h}})(e,t,{...o,platform:i})};var Di="undefined"!=typeof document?ne:function(){};function Ni(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Ni(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!Ni(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Vi(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ii(e,t){const n=Vi(e);return Math.round(t*n)/n}function ji(e){const t=X.useRef(e);return Di((()=>{t.current=e})),t}const Ai=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?Pi({element:n.current,padding:r}).fn(t):{}:n?Pi({element:n,padding:r}).fn(t):{};var o}}),zi=(e,t)=>({...Oi(e),options:[e,t]}),Hi=(e,t)=>({...Ti(e),options:[e,t]}),Bi=(e,t)=>({...Ai(e),options:[e,t]}),Fi="data-floating-ui-focusable",Zi="active",Wi="selected",qi={...X};let Gi=!1,Ui=0;const Xi=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Ui++;const Yi=qi.useId||function(){const[e,t]=X.useState((()=>Gi?Xi():void 0));return ii((()=>{null==e&&t(Xi())}),[]),X.useEffect((()=>{Gi=!0}),[]),e};let Ki;"production"!==process.env.NODE_ENV&&(Ki=new Set);const Ji=X.createContext(null),Qi=X.createContext(null),ea=()=>{var e;return(null==(e=X.useContext(Ji))?void 0:e.id)||null},ta=()=>X.useContext(Qi);const na={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},ra={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},oa=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function ia(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Yi(),i=X.useRef({}),[a]=X.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;null==(r=e.get(t))||r.delete(n)}}}())),l=null!=ea();if("production"!==process.env.NODE_ENV){const e=r.reference;e&&!io(e)&&function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");var i;null!=(e=Ki)&&e.has(o)||(null==(i=Ki)||i.add(o),console.error(o))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[s,c]=X.useState(r.reference),d=li(((e,t,r)=>{i.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:r,nested:l}),null==n||n(e,t,r)})),u=X.useMemo((()=>({setPositionReference:c})),[]),p=X.useMemo((()=>({reference:s||r.reference||null,floating:r.floating||null,domReference:r.reference})),[s,r.reference,r.floating]);return X.useMemo((()=>({dataRef:i,open:t,onOpenChange:d,elements:p,events:a,floatingId:o,refs:u})),[t,d,p,a,o,u])}function aa(e){void 0===e&&(e={});const{nodeId:t}=e,n=ia({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=X.useState(null),[l,s]=X.useState(null),c=(null==o?void 0:o.domReference)||i,d=X.useRef(null),u=ta();ii((()=>{c&&(d.current=c)}),[c]);const p=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:l=!0,whileElementsMounted:s,open:c}=e,[d,u]=X.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=X.useState(r);Ni(p,r)||h(r);const[f,g]=X.useState(null),[v,m]=X.useState(null),x=X.useCallback((e=>{e!==C.current&&(C.current=e,g(e))}),[]),b=X.useCallback((e=>{e!==$.current&&($.current=e,m(e))}),[]),y=i||f,w=a||v,C=X.useRef(null),$=X.useRef(null),k=X.useRef(d),S=null!=s,E=ji(s),L=ji(o),R=ji(c),O=X.useCallback((()=>{if(!C.current||!$.current)return;const e={placement:t,strategy:n,middleware:p};L.current&&(e.platform=L.current),Mi(C.current,$.current,e).then((e=>{const t={...e,isPositioned:!1!==R.current};T.current&&!Ni(k.current,t)&&(k.current=t,fe.flushSync((()=>{u(t)})))}))}),[p,t,n,L,R]);Di((()=>{!1===c&&k.current.isPositioned&&(k.current.isPositioned=!1,u((e=>({...e,isPositioned:!1}))))}),[c]);const T=X.useRef(!1);Di((()=>(T.current=!0,()=>{T.current=!1})),[]),Di((()=>{if(y&&(C.current=y),w&&($.current=w),y&&w){if(E.current)return E.current(y,w,O);O()}}),[y,w,O,E,S]);const _=X.useMemo((()=>({reference:C,floating:$,setReference:x,setFloating:b})),[x,b]),P=X.useMemo((()=>({reference:y,floating:w})),[y,w]),M=X.useMemo((()=>{const e={position:n,left:0,top:0};if(!P.floating)return e;const t=Ii(P.floating,d.x),r=Ii(P.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...Vi(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,l,P.floating,d.x,d.y]);return X.useMemo((()=>({...d,update:O,refs:_,elements:P,floatingStyles:M})),[d,O,_,P,M])}({...e,elements:{...o,...l&&{reference:l}}}),h=X.useCallback((e=>{const t=io(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;s(t),p.refs.setReference(t)}),[p.refs]),f=X.useCallback((e=>{(io(e)||null===e)&&(d.current=e,a(e)),(io(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!io(e))&&p.refs.setReference(e)}),[p.refs]),g=X.useMemo((()=>({...p.refs,setReference:f,setPositionReference:h,domReference:d})),[p.refs,f,h]),v=X.useMemo((()=>({...p.elements,domReference:c})),[p.elements,c]),m=X.useMemo((()=>({...p,...r,refs:g,elements:v,nodeId:t})),[p,g,v,t,r]);return ii((()=>{r.dataRef.current.floatingContext=m;const e=null==u?void 0:u.nodesRef.current.find((e=>e.id===t));e&&(e.context=m)})),X.useMemo((()=>({...p,context:m,refs:g,elements:v})),[p,g,v,m])}function la(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[Zi]:t,[Wi]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[Fi]:""},...i,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,i]=t;var a;o&&[Zi,Wi].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(a=r.get(n))||a.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map((e=>e(...o))).find((e=>void 0!==e))})):e[n]=i)})),e):e),{})}}const sa=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function ca(e,t){var n,r;void 0===t&&(t={});const{open:o,elements:i,floatingId:a}=e,{enabled:l=!0,role:s="dialog"}=t,c=Yi(),d=(null==(n=i.domReference)?void 0:n.id)||c,u=X.useMemo((()=>{var e,t;return(null==(e=(t=i.floating)?t.hasAttribute(Qo)?t:t.querySelector("["+Qo+"]")||t:null)?void 0:e.id)||a}),[i.floating,a]),p=null!=(r=sa.get(s))?r:s,h=null!=ea(),f=X.useMemo((()=>"tooltip"===p||"label"===s?{["aria-"+("label"===s?"labelledby":"describedby")]:o?u:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":"alertdialog"===p?"dialog":p,"aria-controls":o?u:void 0,..."listbox"===p&&{role:"combobox"},..."menu"===p&&{id:d},..."menu"===p&&h&&{role:"menuitem"},..."select"===s&&{"aria-autocomplete":"none"},..."combobox"===s&&{"aria-autocomplete":"list"}}),[p,u,h,o,d,s]),g=X.useMemo((()=>{const e={id:u,...p&&{role:p}};return"tooltip"===p||"label"===s?e:{...e,..."menu"===p&&{"aria-labelledby":d}}}),[p,u,d,s]),v=X.useCallback((e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:u+"-fui-option"}};switch(s){case"select":case"combobox":return{...r,"aria-selected":n}}return{}}),[u,s]);return X.useMemo((()=>l?{reference:f,floating:g,item:v}:{}),[l,f,g,v])}const da=de`
|
|
1850
|
+
`:"",children:q("button",{type:"button",css:Xr(n,!!r,!!t,a,i,l),"aria-label":e||(i?`Cluster of ${i} locations`:"simple-pin"===l?"Map pin location":"Map point"),ref:s,onClick:r,children:["cluster"===l&&c,"icon"===l&&t]})})})),Kr=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:o,variant:i="cluster"})=>ue(Yr,{count:r,mode:o,onClick:e,ref:t,showFocusState:n,variant:i}),Jr=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:o,variant:i="simple-pin"})=>ue(Yr,{count:r,mode:o,onClick:e,ref:t,showFocusState:n,variant:i}),Qr={Paper:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>ue(Yr,{ariaLabel:e||"paper icon",icon:ue(Qe,{color:"#79022C"}),backgroundColor:"#FFBCD4",onClick:t,ref:n,showFocusState:r}),Drop:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>ue(Yr,{ariaLabel:e||"drop icon",icon:ue(et,{color:"#7D2A03"}),backgroundColor:"#F3A078",onClick:t,ref:n,showFocusState:r}),Plant:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>ue(Yr,{ariaLabel:e||"plant icon",icon:ue(tt,{color:"#3B6402"}),backgroundColor:"#B7E578",onClick:t,ref:n,showFocusState:r}),Point:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>ue(Yr,{ariaLabel:e||"point icon",backgroundColor:we("primary",500),onClick:t,ref:n,showFocusState:r})};function eo(){return"undefined"!=typeof window}function to(e){return oo(e)?(e.nodeName||"").toLowerCase():"#document"}function no(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ro(e){var t;return null==(t=(oo(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function oo(e){return!!eo()&&(e instanceof Node||e instanceof no(e).Node)}function io(e){return!!eo()&&(e instanceof Element||e instanceof no(e).Element)}function ao(e){return!!eo()&&(e instanceof HTMLElement||e instanceof no(e).HTMLElement)}function lo(e){return!(!eo()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof no(e).ShadowRoot)}const so=new Set(["inline","contents"]);function co(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Co(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!so.has(o)}const uo=new Set(["table","td","th"]);function po(e){return uo.has(to(e))}const ho=[":popover-open",":modal"];function fo(e){return ho.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}const go=["transform","translate","scale","rotate","perspective"],vo=["transform","translate","scale","rotate","perspective","filter"],mo=["paint","layout","strict","content"];function xo(e){const t=bo(),n=io(e)?Co(e):e;return go.some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||vo.some((e=>(n.willChange||"").includes(e)))||mo.some((e=>(n.contain||"").includes(e)))}function bo(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const yo=new Set(["html","body","#document"]);function wo(e){return yo.has(to(e))}function Co(e){return no(e).getComputedStyle(e)}function $o(e){return io(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ko(e){if("html"===to(e))return e;const t=e.assignedSlot||e.parentNode||lo(e)&&e.host||ro(e);return lo(t)?t.host:t}function So(e){const t=ko(e);return wo(t)?e.ownerDocument?e.ownerDocument.body:e.body:ao(t)&&co(t)?t:So(t)}function Eo(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=So(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=no(o);if(i){const e=Lo(a);return t.concat(a,a.visualViewport||[],co(o)?o:[],e&&n?Eo(e):[])}return t.concat(o,Eo(o,[],n))}function Lo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Ro=Math.min,Oo=Math.max,To=Math.round,_o=Math.floor,Po=e=>({x:e,y:e}),Mo={left:"right",right:"left",bottom:"top",top:"bottom"},Do={start:"end",end:"start"};function No(e,t,n){return Oo(e,Ro(t,n))}function Vo(e,t){return"function"==typeof e?e(t):e}function Io(e){return e.split("-")[0]}function jo(e){return e.split("-")[1]}function Ao(e){return"x"===e?"y":"x"}function zo(e){return"y"===e?"height":"width"}const Ho=new Set(["top","bottom"]);function Bo(e){return Ho.has(Io(e))?"y":"x"}function Fo(e){return Ao(Bo(e))}function Zo(e){return e.replace(/start|end/g,(e=>Do[e]))}const Wo=["left","right"],qo=["right","left"],Go=["top","bottom"],Uo=["bottom","top"];function Xo(e,t,n,r){const o=jo(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?qo:Wo:t?Wo:qo;case"left":case"right":return t?Go:Uo;default:return[]}}(Io(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(Zo)))),i}function Yo(e){return e.replace(/left|right|bottom|top/g,(e=>Mo[e]))}function Ko(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Jo(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}const Qo="data-floating-ui-focusable";function ei(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&lo(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function ti(e){return"composedPath"in e?e.composedPath()[0]:e.target}function ni(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function ri(e){return(null==e?void 0:e.ownerDocument)||document}function oi(e,t,n){void 0===n&&(n=!0);return e.filter((e=>{var r;return e.parentId===t&&(!n||(null==(r=e.context)?void 0:r.open))})).flatMap((t=>[t,...oi(e,t.id,n)]))}var ii="undefined"!=typeof document?re:function(){};const ai={...X}.useInsertionEffect||(e=>e());function li(e){const t=X.useRef((()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")}));return ai((()=>{t.current=e})),X.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function si(e,t,n){let{reference:r,floating:o}=e;const i=Bo(t),a=Fo(t),l=zo(a),s=Io(t),c="y"===i,d=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,p=r[l]/2-o[l]/2;let h;switch(s){case"top":h={x:d,y:r.y-o.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:u};break;case"left":h={x:r.x-o.width,y:u};break;default:h={x:r.x,y:r.y}}switch(jo(t)){case"start":h[a]-=p*(n&&c?-1:1);break;case"end":h[a]+=p*(n&&c?-1:1)}return h}async function ci(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:h=0}=Vo(t,e),f=Ko(h),g=l[p?"floating"===u?"reference":"floating":u],v=Jo(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:d,strategy:s})),m="floating"===u?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,x=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),b=await(null==i.isElement?void 0:i.isElement(x))&&await(null==i.getScale?void 0:i.getScale(x))||{x:1,y:1},y=Jo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:m,offsetParent:x,strategy:s}):m);return{top:(v.top-y.top+f.top)/b.y,bottom:(y.bottom-v.bottom+f.bottom)/b.y,left:(v.left-y.left+f.left)/b.x,right:(y.right-v.right+f.right)/b.x}}const di=new Set(["left","top"]);function ui(e){const t=Co(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ao(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=To(n)!==i||To(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function pi(e){return io(e)?e:e.contextElement}function hi(e){const t=pi(e);if(!ao(t))return Po(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=ui(t);let a=(i?To(n.width):n.width)/r,l=(i?To(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const fi=Po(0);function gi(e){const t=no(e);return bo()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:fi}function vi(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=pi(e);let a=Po(1);t&&(r?io(r)&&(a=hi(r)):a=hi(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==no(e))&&t}(i,n,r)?gi(i):Po(0);let s=(o.left+l.x)/a.x,c=(o.top+l.y)/a.y,d=o.width/a.x,u=o.height/a.y;if(i){const e=no(i),t=r&&io(r)?no(r):r;let n=e,o=Lo(n);for(;o&&r&&t!==n;){const e=hi(o),t=o.getBoundingClientRect(),r=Co(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,d*=e.x,u*=e.y,s+=i,c+=a,n=no(o),o=Lo(n)}}return Jo({width:d,height:u,x:s,y:c})}function mi(e,t){const n=$o(e).scrollLeft;return t?t.left+n:vi(ro(e)).left+n}function xi(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-mi(e,n),y:n.top+t.scrollTop}}const bi=new Set(["absolute","fixed"]);function yi(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=no(e),r=ro(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,s=0;if(o){i=o.width,a=o.height;const e=bo();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}const c=mi(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else c<=25&&(i+=c);return{width:i,height:a,x:l,y:s}}(e,n);else if("document"===t)r=function(e){const t=ro(e),n=$o(e),r=e.ownerDocument.body,o=Oo(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Oo(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+mi(e);const l=-n.scrollTop;return"rtl"===Co(r).direction&&(a+=Oo(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:l}}(ro(e));else if(io(t))r=function(e,t){const n=vi(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ao(e)?hi(e):Po(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=gi(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Jo(r)}function wi(e,t){const n=ko(e);return!(n===t||!io(n)||wo(n))&&("fixed"===Co(n).position||wi(n,t))}function Ci(e,t,n){const r=ao(t),o=ro(t),i="fixed"===n,a=vi(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const s=Po(0);function c(){s.x=mi(o)}if(r||!r&&!i)if(("body"!==to(t)||co(o))&&(l=$o(t)),r){const e=vi(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const d=!o||r||i?Po(0):xi(o,l);return{x:a.left+l.scrollLeft-s.x-d.x,y:a.top+l.scrollTop-s.y-d.y,width:a.width,height:a.height}}function $i(e){return"static"===Co(e).position}function ki(e,t){if(!ao(e)||"fixed"===Co(e).position)return null;if(t)return t(e);let n=e.offsetParent;return ro(e)===n&&(n=n.ownerDocument.body),n}function Si(e,t){const n=no(e);if(fo(e))return n;if(!ao(e)){let t=ko(e);for(;t&&!wo(t);){if(io(t)&&!$i(t))return t;t=ko(t)}return n}let r=ki(e,t);for(;r&&po(r)&&$i(r);)r=ki(r,t);return r&&wo(r)&&$i(r)&&!xo(r)?n:r||function(e){let t=ko(e);for(;ao(t)&&!wo(t);){if(xo(t))return t;if(fo(t))return null;t=ko(t)}return null}(e)||n}const Ei={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=ro(r),l=!!t&&fo(t.floating);if(r===a||l&&i)return n;let s={scrollLeft:0,scrollTop:0},c=Po(1);const d=Po(0),u=ao(r);if((u||!u&&!i)&&(("body"!==to(r)||co(a))&&(s=$o(r)),ao(r))){const e=vi(r);c=hi(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}const p=!a||u||i?Po(0):xi(a,s);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+d.x+p.x,y:n.y*c.y-s.scrollTop*c.y+d.y+p.y}},getDocumentElement:ro,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?fo(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Eo(e,[],!1).filter((e=>io(e)&&"body"!==to(e))),o=null;const i="fixed"===Co(e).position;let a=i?ko(e):e;for(;io(a)&&!wo(a);){const t=Co(a),n=xo(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&bi.has(o.position)||co(a)&&!n&&wi(e,a))?r=r.filter((e=>e!==a)):o=t,a=ko(a)}return t.set(e,r),r}(t,this._c):[].concat(n),a=[...i,r],l=a[0],s=a.reduce(((e,n)=>{const r=yi(t,n,o);return e.top=Oo(r.top,e.top),e.right=Ro(r.right,e.right),e.bottom=Ro(r.bottom,e.bottom),e.left=Oo(r.left,e.left),e}),yi(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Si,getElementRects:async function(e){const t=this.getOffsetParent||Si,n=this.getDimensions,r=await n(e.floating);return{reference:Ci(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=ui(e);return{width:t,height:n}},getScale:hi,isElement:io,isRTL:function(e){return"rtl"===Co(e).direction}};function Li(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ri(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=pi(e),d=o||i?[...c?Eo(c):[],...Eo(t)]:[];d.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const u=c&&l?function(e,t){let n,r=null;const o=ro(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),i();const c=e.getBoundingClientRect(),{left:d,top:u,width:p,height:h}=c;if(l||t(),!p||!h)return;const f={rootMargin:-_o(u)+"px "+-_o(o.clientWidth-(d+p))+"px "+-_o(o.clientHeight-(u+h))+"px "+-_o(d)+"px",threshold:Oo(0,Ro(1,s))||1};let g=!0;function v(t){const r=t[0].intersectionRatio;if(r!==s){if(!g)return a();r?a(!1,r):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}1!==r||Li(c,e.getBoundingClientRect())||a(),g=!1}try{r=new IntersectionObserver(v,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(v,f)}r.observe(e)}(!0),i}(c,n):null;let p,h=-1,f=null;a&&(f=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),n()})),c&&!s&&f.observe(c),f.observe(t));let g=s?vi(e):null;return s&&function t(){const r=vi(e);g&&!Li(g,r)&&n();g=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==u||u(),null==(e=f)||e.disconnect(),f=null,s&&cancelAnimationFrame(p)}}const Oi=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:l}=t,s=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=Io(n),l=jo(n),s="y"===Bo(n),c=di.has(a)?-1:1,d=i&&s?-1:1,u=Vo(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:f}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&"number"==typeof f&&(h="end"===l?-1*f:f),s?{x:h*d,y:p*c}:{x:p*c,y:h*d}}(t,e);return a===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:a}}}}},Ti=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=Vo(e,t),c={x:n,y:r},d=await ci(t,s),u=Bo(Io(o)),p=Ao(u);let h=c[p],f=c[u];if(i){const e="y"===p?"bottom":"right";h=No(h+d["y"===p?"top":"left"],h,h-d[e])}if(a){const e="y"===u?"bottom":"right";f=No(f+d["y"===u?"top":"left"],f,f-d[e])}const g=l.fn({...t,[p]:h,[u]:f});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:i,[u]:a}}}}}},_i=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:s,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:g=!0,...v}=Vo(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const m=Io(o),x=Bo(l),b=Io(l)===l,y=await(null==s.isRTL?void 0:s.isRTL(c.floating)),w=p||(b||!g?[Yo(l)]:function(e){const t=Yo(e);return[Zo(e),t,Zo(t)]}(l)),C="none"!==f;!p&&C&&w.push(...Xo(l,g,f,y));const $=[l,...w],k=await ci(t,v),S=[];let E=(null==(r=i.flip)?void 0:r.overflows)||[];if(d&&S.push(k[m]),u){const e=function(e,t,n){void 0===n&&(n=!1);const r=jo(e),o=Fo(e),i=zo(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Yo(a)),[a,Yo(a)]}(o,a,y);S.push(k[e[0]],k[e[1]])}if(E=[...E,{placement:o,overflows:S}],!S.every((e=>e<=0))){var L,R;const e=((null==(L=i.flip)?void 0:L.index)||0)+1,t=$[e];if(t){if(!("alignment"===u&&x!==Bo(t))||E.every((e=>Bo(e.placement)!==x||e.overflows[0]>0)))return{data:{index:e,overflows:E},reset:{placement:t}}}let n=null==(R=E.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:R.placement;if(!n)switch(h){case"bestFit":{var O;const e=null==(O=E.filter((e=>{if(C){const t=Bo(e.placement);return t===x||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:O[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}},Pi=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:l,middlewareData:s}=t,{element:c,padding:d=0}=Vo(e,t)||{};if(null==c)return{};const u=Ko(d),p={x:n,y:r},h=Fo(o),f=zo(h),g=await a.getDimensions(c),v="y"===h,m=v?"top":"left",x=v?"bottom":"right",b=v?"clientHeight":"clientWidth",y=i.reference[f]+i.reference[h]-p[h]-i.floating[f],w=p[h]-i.reference[h],C=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let $=C?C[b]:0;$&&await(null==a.isElement?void 0:a.isElement(C))||($=l.floating[b]||i.floating[f]);const k=y/2-w/2,S=$/2-g[f]/2-1,E=Ro(u[m],S),L=Ro(u[x],S),R=E,O=$-g[f]-L,T=$/2-g[f]/2+k,_=No(R,T,O),P=!s.arrow&&null!=jo(o)&&T!==_&&i.reference[f]/2-(T<R?E:L)-g[f]/2<0,M=P?T<R?T-R:T-O:0;return{[h]:p[h]+M,data:{[h]:_,centerOffset:T-_-M,...P&&{alignmentOffset:M}},reset:P}}}),Mi=(e,t,n)=>{const r=new Map,o={platform:Ei,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=i.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=si(c,r,s),p=r,h={},f=0;for(let n=0;n<l.length;n++){const{name:i,fn:g}=l[n],{x:v,y:m,data:x,reset:b}=await g({x:d,y:u,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});d=null!=v?v:d,u=null!=m?m:u,h={...h,[i]:{...h[i],...x}},b&&f<=50&&(f++,"object"==typeof b&&(b.placement&&(p=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:d,y:u}=si(c,p,s))),n=-1)}return{x:d,y:u,placement:p,strategy:o,middlewareData:h}})(e,t,{...o,platform:i})};var Di="undefined"!=typeof document?re:function(){};function Ni(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Ni(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!Ni(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Vi(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ii(e,t){const n=Vi(e);return Math.round(t*n)/n}function ji(e){const t=X.useRef(e);return Di((()=>{t.current=e})),t}const Ai=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?Pi({element:n.current,padding:r}).fn(t):{}:n?Pi({element:n,padding:r}).fn(t):{};var o}}),zi=(e,t)=>({...Oi(e),options:[e,t]}),Hi=(e,t)=>({...Ti(e),options:[e,t]}),Bi=(e,t)=>({...Ai(e),options:[e,t]}),Fi="data-floating-ui-focusable",Zi="active",Wi="selected",qi={...X};let Gi=!1,Ui=0;const Xi=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Ui++;const Yi=qi.useId||function(){const[e,t]=X.useState((()=>Gi?Xi():void 0));return ii((()=>{null==e&&t(Xi())}),[]),X.useEffect((()=>{Gi=!0}),[]),e};let Ki;"production"!==process.env.NODE_ENV&&(Ki=new Set);const Ji=X.createContext(null),Qi=X.createContext(null),ea=()=>{var e;return(null==(e=X.useContext(Ji))?void 0:e.id)||null},ta=()=>X.useContext(Qi);const na={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},ra={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},oa=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function ia(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Yi(),i=X.useRef({}),[a]=X.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;null==(r=e.get(t))||r.delete(n)}}}())),l=null!=ea();if("production"!==process.env.NODE_ENV){const e=r.reference;e&&!io(e)&&function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");var i;null!=(e=Ki)&&e.has(o)||(null==(i=Ki)||i.add(o),console.error(o))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[s,c]=X.useState(r.reference),d=li(((e,t,r)=>{i.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:r,nested:l}),null==n||n(e,t,r)})),u=X.useMemo((()=>({setPositionReference:c})),[]),p=X.useMemo((()=>({reference:s||r.reference||null,floating:r.floating||null,domReference:r.reference})),[s,r.reference,r.floating]);return X.useMemo((()=>({dataRef:i,open:t,onOpenChange:d,elements:p,events:a,floatingId:o,refs:u})),[t,d,p,a,o,u])}function aa(e){void 0===e&&(e={});const{nodeId:t}=e,n=ia({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=X.useState(null),[l,s]=X.useState(null),c=(null==o?void 0:o.domReference)||i,d=X.useRef(null),u=ta();ii((()=>{c&&(d.current=c)}),[c]);const p=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:l=!0,whileElementsMounted:s,open:c}=e,[d,u]=X.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=X.useState(r);Ni(p,r)||h(r);const[f,g]=X.useState(null),[v,m]=X.useState(null),x=X.useCallback((e=>{e!==C.current&&(C.current=e,g(e))}),[]),b=X.useCallback((e=>{e!==$.current&&($.current=e,m(e))}),[]),y=i||f,w=a||v,C=X.useRef(null),$=X.useRef(null),k=X.useRef(d),S=null!=s,E=ji(s),L=ji(o),R=ji(c),O=X.useCallback((()=>{if(!C.current||!$.current)return;const e={placement:t,strategy:n,middleware:p};L.current&&(e.platform=L.current),Mi(C.current,$.current,e).then((e=>{const t={...e,isPositioned:!1!==R.current};T.current&&!Ni(k.current,t)&&(k.current=t,fe.flushSync((()=>{u(t)})))}))}),[p,t,n,L,R]);Di((()=>{!1===c&&k.current.isPositioned&&(k.current.isPositioned=!1,u((e=>({...e,isPositioned:!1}))))}),[c]);const T=X.useRef(!1);Di((()=>(T.current=!0,()=>{T.current=!1})),[]),Di((()=>{if(y&&(C.current=y),w&&($.current=w),y&&w){if(E.current)return E.current(y,w,O);O()}}),[y,w,O,E,S]);const _=X.useMemo((()=>({reference:C,floating:$,setReference:x,setFloating:b})),[x,b]),P=X.useMemo((()=>({reference:y,floating:w})),[y,w]),M=X.useMemo((()=>{const e={position:n,left:0,top:0};if(!P.floating)return e;const t=Ii(P.floating,d.x),r=Ii(P.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...Vi(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,l,P.floating,d.x,d.y]);return X.useMemo((()=>({...d,update:O,refs:_,elements:P,floatingStyles:M})),[d,O,_,P,M])}({...e,elements:{...o,...l&&{reference:l}}}),h=X.useCallback((e=>{const t=io(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;s(t),p.refs.setReference(t)}),[p.refs]),f=X.useCallback((e=>{(io(e)||null===e)&&(d.current=e,a(e)),(io(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!io(e))&&p.refs.setReference(e)}),[p.refs]),g=X.useMemo((()=>({...p.refs,setReference:f,setPositionReference:h,domReference:d})),[p.refs,f,h]),v=X.useMemo((()=>({...p.elements,domReference:c})),[p.elements,c]),m=X.useMemo((()=>({...p,...r,refs:g,elements:v,nodeId:t})),[p,g,v,t,r]);return ii((()=>{r.dataRef.current.floatingContext=m;const e=null==u?void 0:u.nodesRef.current.find((e=>e.id===t));e&&(e.context=m)})),X.useMemo((()=>({...p,context:m,refs:g,elements:v})),[p,g,v,m])}function la(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[Zi]:t,[Wi]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[Fi]:""},...i,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,i]=t;var a;o&&[Zi,Wi].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(a=r.get(n))||a.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map((e=>e(...o))).find((e=>void 0!==e))})):e[n]=i)})),e):e),{})}}const sa=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function ca(e,t){var n,r;void 0===t&&(t={});const{open:o,elements:i,floatingId:a}=e,{enabled:l=!0,role:s="dialog"}=t,c=Yi(),d=(null==(n=i.domReference)?void 0:n.id)||c,u=X.useMemo((()=>{var e,t;return(null==(e=(t=i.floating)?t.hasAttribute(Qo)?t:t.querySelector("["+Qo+"]")||t:null)?void 0:e.id)||a}),[i.floating,a]),p=null!=(r=sa.get(s))?r:s,h=null!=ea(),f=X.useMemo((()=>"tooltip"===p||"label"===s?{["aria-"+("label"===s?"labelledby":"describedby")]:o?u:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":"alertdialog"===p?"dialog":p,"aria-controls":o?u:void 0,..."listbox"===p&&{role:"combobox"},..."menu"===p&&{id:d},..."menu"===p&&h&&{role:"menuitem"},..."select"===s&&{"aria-autocomplete":"none"},..."combobox"===s&&{"aria-autocomplete":"list"}}),[p,u,h,o,d,s]),g=X.useMemo((()=>{const e={id:u,...p&&{role:p}};return"tooltip"===p||"label"===s?e:{...e,..."menu"===p&&{"aria-labelledby":d}}}),[p,u,d,s]),v=X.useCallback((e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:u+"-fui-option"}};switch(s){case"select":case"combobox":return{...r,"aria-selected":n}}return{}}),[u,s]);return X.useMemo((()=>l?{reference:f,floating:g,item:v}:{}),[l,f,g,v])}const da=de`
|
|
1851
1851
|
height: auto;
|
|
1852
1852
|
max-height: 512px;
|
|
1853
1853
|
width: 100%;
|
|
@@ -1995,7 +1995,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as o,Ic
|
|
|
1995
1995
|
margin-bottom: 0px;
|
|
1996
1996
|
}
|
|
1997
1997
|
}
|
|
1998
|
-
`,Pa=({label:e,children:t,openedByDefault:n})=>G("div",{children:G(S.Root,{defaultValue:n?[e]:[],multiple:!0,children:q(S.Item,{css:Ra,value:e,children:[q(S.ItemTrigger,{css:Oa,children:[G(r,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:G("p",{css:Ta,children:e})}),G(S.ItemIndicator,{display:"flex",children:G(Me,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),G(S.ItemContent,{css:_a,children:
|
|
1998
|
+
`,Pa=({label:e,children:t,openedByDefault:n})=>G("div",{children:G(S.Root,{defaultValue:n?[e]:[],multiple:!0,children:q(S.Item,{css:Ra,value:e,children:[q(S.ItemTrigger,{css:Oa,children:[G(r,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:G("p",{css:Ta,children:e})}),G(S.ItemIndicator,{display:"flex",children:G(Me,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),G(S.ItemContent,{css:_a,children:oe.map(t,(e=>G("div",{className:"ds-layer-parameters-item-child",children:e})))})]})})}),Ma=de`
|
|
1999
1999
|
padding: 12px;
|
|
2000
2000
|
padding-bottom: 20px;
|
|
2001
2001
|
display: flex;
|
|
@@ -2123,7 +2123,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as o,Ic
|
|
|
2123
2123
|
color: ${we("neutral",600)};
|
|
2124
2124
|
padding: 0 10px;
|
|
2125
2125
|
}
|
|
2126
|
-
`,Qa=({type:e,label:t,caption:n,color:r,onActionClick:o,showActionButton:i,pointIcon:a=G(Je,{color:"#006D2C"}),ariaLabelType:l=""})=>{const[s,c]=J(!0),d=
|
|
2126
|
+
`,Qa=({type:e,label:t,caption:n,color:r,onActionClick:o,showActionButton:i,pointIcon:a=G(Je,{color:"#006D2C"}),ariaLabelType:l=""})=>{const[s,c]=J(!0),d=ne(),u=ne(),p="raster"===e,h="line"===e,f="point"===e,g=ne(),v=te((()=>{let e=l??`${l},`;h&&(e="line,");return`${e} ${t}${n?`, ${n}`:""}. Currently ${s?"visible":"hidden"}.`}),[s,e,t,n]),m=s?"Hide":"Show";return q("div",{css:Ua,children:[G("p",{id:g,css:{position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,clip:"rect(0 0 0 0)",overflow:"hidden"},children:v}),q("div",{css:Xa,children:[q("div",{children:[p&&G("div",{css:Wa(r)}),h&&G("div",{css:qa(r)}),f&&G("div",{css:Ga(r),children:a})]}),q("div",{children:[G("p",{id:d,css:Ya,children:t}),n?G("p",{id:u,css:Ka,children:n}):null]})]}),o&&i?G("div",{css:Ja,children:G(Le,{type:"button",variant:"borderless",label:m,rightIcon:G(s?je:Ie,{}),"aria-pressed":s,"aria-labelledby":`${g} ${d}`,onClick:()=>{c((e=>!e)),o?.()}})}):null]})},el=de`
|
|
2127
2127
|
width: 100%;
|
|
2128
2128
|
display: flex;
|
|
2129
2129
|
flex-direction: column;
|
|
@@ -2485,7 +2485,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as o,Ic
|
|
|
2485
2485
|
bottom: 0;
|
|
2486
2486
|
left: 0;
|
|
2487
2487
|
border-top: 1px solid ${we("neutral",300)};
|
|
2488
|
-
`,Js=({header:e,content:t,footer:n,variant:r="fixed",width:o})=>{const[i,a]=J(void 0),[l,s]=J(void 0),c=Q(null),d=Q(null);ee((()=>{a(c?.current?.getBoundingClientRect()?.height),s(d?.current?.getBoundingClientRect()?.height)}),[e,n]);return q("div",{css:[qs(o),"fixed"===r?Gs:Us],children:[e?G("div",{css:Xs,ref:c,children:e}):null,G("div",{css:Ys(i,l),children:t}),n?G("div",{css:Ks,ref:d,children:n}):null]})};var Qs,ec;!function(){if(ec)return Qs;ec=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=function(e,t){var n=arguments.length;t=new Array(n>1?n-1:0);for(var r=1;r<n;r++)t[r-1]=arguments[r];var o=0,i="Warning: "+e.replace(/%s/g,(function(){return t[o++]}));"undefined"!=typeof console&&console.error(i);try{throw new Error(i)}catch(e){}};e=function(e,n,r){var o=arguments.length;r=new Array(o>2?o-2:0);for(var i=2;i<o;i++)r[i-2]=arguments[i];if(void 0===n)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");e||t.apply(null,[n].concat(r))}}Qs=e}();var tc=nc()?
|
|
2488
|
+
`,Js=({header:e,content:t,footer:n,variant:r="fixed",width:o})=>{const[i,a]=J(void 0),[l,s]=J(void 0),c=Q(null),d=Q(null);ee((()=>{a(c?.current?.getBoundingClientRect()?.height),s(d?.current?.getBoundingClientRect()?.height)}),[e,n]);return q("div",{css:[qs(o),"fixed"===r?Gs:Us],children:[e?G("div",{css:Xs,ref:c,children:e}):null,G("div",{css:Ys(i,l),children:t}),n?G("div",{css:Ks,ref:d,children:n}):null]})};var Qs,ec;!function(){if(ec)return Qs;ec=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=function(e,t){var n=arguments.length;t=new Array(n>1?n-1:0);for(var r=1;r<n;r++)t[r-1]=arguments[r];var o=0,i="Warning: "+e.replace(/%s/g,(function(){return t[o++]}));"undefined"!=typeof console&&console.error(i);try{throw new Error(i)}catch(e){}};e=function(e,n,r){var o=arguments.length;r=new Array(o>2?o-2:0);for(var i=2;i<o;i++)r[i-2]=arguments[i];if(void 0===n)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");e||t.apply(null,[n].concat(r))}}Qs=e}();var tc=nc()?re:ee;"production"!==process.env.NODE_ENV&&("undefined"!=typeof process?process:{env:{NODE_ENV:"development"}}).env;function nc(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV;var rc=function(e){var t,n=e.children,r=e.type,o=void 0===r?"reach-portal":r,i=Q(null),a=Q(null),l=(t=J(Object.create(null))[1],ie((function(){t(Object.create(null))}),[]));return tc((function(){if(i.current){var e=i.current.ownerDocument;return a.current=null==e?void 0:e.createElement(o),e.body.appendChild(a.current),l(),function(){a.current&&a.current.ownerDocument&&a.current.ownerDocument.body.removeChild(a.current)}}}),[o,l]),a.current?ve(n,a.current):ae("span",{ref:i})};"production"!==process.env.NODE_ENV&&(rc.displayName="Portal");
|
|
2489
2489
|
/*! *****************************************************************************
|
|
2490
2490
|
Copyright (c) Microsoft Corporation.
|
|
2491
2491
|
|
|
@@ -2499,7 +2499,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
2499
2499
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
2500
2500
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
2501
2501
|
PERFORMANCE OF THIS SOFTWARE.
|
|
2502
|
-
***************************************************************************** */var oc,ic,ac=function(){return ac=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ac.apply(this,arguments)};function lc(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function sc(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function cc(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function dc(e,t,n){if(2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}!function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"}(oc||(oc={})),function(e){e.Parent="#_parent",e.Internal="#_internal"}(ic||(ic={}));var uc=oc.Start,pc=oc.Stop,hc=oc.Raise,fc=oc.Send,gc=oc.Cancel,vc=oc.NullEvent,mc=oc.Assign;oc.After,oc.DoneState;var xc=oc.Log,bc=oc.Init,yc=oc.Invoke;oc.ErrorExecution;var wc,Cc=oc.ErrorPlatform,$c=oc.ErrorCustom,kc=oc.Update,Sc=oc.Choose,Ec=oc.Pure,Lc={},Rc="xstate.guard",Oc="production"===process.env.NODE_ENV;function Tc(e,t,n){void 0===n&&(n=".");var r=Mc(e,n),o=Mc(t,n);return Xc(o)?!!Xc(r)&&o===r:Xc(r)?r in o:Object.keys(r).every((function(e){return e in o&&Tc(r[e],o[e])}))}function _c(e){try{return Xc(e)||"number"==typeof e?"".concat(e):e.type}catch(e){throw new Error("Events must be strings or objects with a string event.type property.")}}function Pc(e,t){try{return Gc(e)?e:e.toString().split(t)}catch(t){throw new Error("'".concat(e,"' is not a valid state path."))}}function Mc(e,t){return"object"==typeof(n=e)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?e.value:Gc(e)?Dc(e):"string"!=typeof e?e:Dc(Pc(e,t));var n}function Dc(e){if(1===e.length)return e[0];for(var t={},n=t,r=0;r<e.length-1;r++)r===e.length-2?n[e[r]]=e[r+1]:(n[e[r]]={},n=n[e[r]]);return t}function Nc(e,t){for(var n={},r=Object.keys(e),o=0;o<r.length;o++){var i=r[o];n[i]=t(e[i],i,e,o)}return n}function Vc(e,t,n){var r,o,i={};try{for(var a=sc(Object.keys(e)),l=a.next();!l.done;l=a.next()){var s=l.value,c=e[s];n(c)&&(i[s]=t(c,s,e))}}catch(e){r={error:e}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}var Ic=function(e){return function(t){var n,r,o=t;try{for(var i=sc(e),a=i.next();!a.done;a=i.next()){o=o[a.value]}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}};function jc(e){return e?Xc(e)?[[e]]:Ac(Object.keys(e).map((function(t){var n=e[t];return"string"==typeof n||n&&Object.keys(n).length?jc(e[t]).map((function(e){return[t].concat(e)})):[[t]]}))):[[]]}function Ac(e){var t;return(t=[]).concat.apply(t,dc([],cc(e),!1))}function zc(e){return Gc(e)?e:[e]}function Hc(e){return void 0===e?[]:zc(e)}function Bc(e,t,n){var r,o;if(Uc(e))return e(t,n.data);var i={};try{for(var a=sc(Object.keys(e)),l=a.next();!l.done;l=a.next()){var s=l.value,c=e[s];Uc(c)?i[s]=c(t,n.data):i[s]=c}}catch(e){r={error:e}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}function Fc(e){return e instanceof Promise||!(null===e||!Uc(e)&&"object"!=typeof e||!Uc(e.then))}function Zc(e,t){return Nc(e.states,(function(e,n){if(e){var r=(Xc(t)?void 0:t[n])||(e?e.current:void 0);if(r)return{current:r,states:Zc(e,r)}}}))}function Wc(e,t,n,r){Oc||qc(!!e,"Attempting to update undefined context");var o=e?n.reduce((function(e,n){var o,i,a=n.assignment,l={state:r,action:n,_event:t},s={};if(Uc(a))s=a(e,t.data,l);else try{for(var c=sc(Object.keys(a)),d=c.next();!d.done;d=c.next()){var u=d.value,p=a[u];s[u]=Uc(p)?p(e,t.data,l):p}}catch(e){o={error:e}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}return Object.assign({},e,s)}),e):e;return o}var qc=function(){};function Gc(e){return Array.isArray(e)}function Uc(e){return"function"==typeof e}function Xc(e){return"string"==typeof e}function Yc(e,t){if(e)return Xc(e)?{type:Rc,name:e,predicate:t?t[e]:void 0}:Uc(e)?{type:Rc,name:e.name,predicate:e}:e}Oc||(qc=function(e,t){var n=e instanceof Error?e:void 0;if((n||!e)&&void 0!==console){var r=["Warning: ".concat(t)];n&&r.push(n),console.warn.apply(console,r)}});var Kc=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function Jc(e){return!!e&&"__xstatenode"in e}function Qc(e,t){return Xc(e)||"number"==typeof e?ac({type:e},t):e}function ed(e,t){if(!Xc(e)&&"$$type"in e&&"scxml"===e.$$type)return e;var n=Qc(e);return ac({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function td(e,t){return zc(t).map((function(t){return void 0===t||"string"==typeof t||Jc(t)?{target:t,event:e}:ac(ac({},t),{event:e})}))}function nd(e,t,n,r,o){var i=e.options.guards,a={state:o,cond:t,_event:r};if(t.type===Rc)return((null==i?void 0:i[t.name])||t.predicate)(n,r.data,a);var l=null==i?void 0:i[t.type];if(!l)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return l(n,r.data,a)}function rd(e){return"string"==typeof e?{type:e}:e}function od(e,t,n){var r=function(){},o="object"==typeof e,i=o?e:null;return{next:((o?e.next:e)||r).bind(i),error:((o?e.error:t)||r).bind(i),complete:((o?e.complete:n)||r).bind(i)}}function id(e,t){return"".concat(e,":invocation[").concat(t,"]")}function ad(e){return(e.type===hc||e.type===fc&&e.to===ic.Internal)&&"number"!=typeof e.delay}(wc={})[Kc]=function(){return this},wc[Symbol.observable]=function(){return this};var ld=ed({type:bc});function sd(e,t){return t&&t[e]||void 0}function cd(e,t){var n;if(Xc(e)||"number"==typeof e)n=Uc(r=sd(e,t))?{type:e,exec:r}:r||{type:e,exec:void 0};else if(Uc(e))n={type:e.name||e.toString(),exec:e};else{var r;if(Uc(r=sd(e.type,t)))n=ac(ac({},e),{exec:r});else if(r){var o=r.type||e.type;n=ac(ac(ac({},r),e),{type:o})}else n=e}return n}var dd=function(e,t){return e?(Gc(e)?e:[e]).map((function(e){return cd(e,t)})):[]};function ud(e){var t=cd(e);return ac(ac({id:Xc(e)?e:t.id},t),{type:t.type})}function pd(e,t){var n="".concat(oc.DoneState,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function hd(e,t){var n="".concat(oc.DoneInvoke,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function fd(e,t){var n="".concat(oc.ErrorPlatform,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function gd(e,t,n,r,o,i,a){void 0===a&&(a=!1);var l=a?[]:function(e){var t,n,r=[];try{for(var o=sc(e),i=o.next();!i.done;i=o.next())for(var a=i.value,l=0;l<a.actions.length;)a.actions[l].type!==mc?l++:(r.push(a.actions[l]),a.actions.splice(l,1))}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(o),s=l.length?Wc(n,r,l,t):n,c=a?[n]:void 0,d=[];function u(o,l){var u;switch(l.type){case hc:var p=function(e,t,n,r){var o,i={_event:n},a=ed(Uc(e.event)?e.event(t,n.data,i):e.event);if(Xc(e.delay)){var l=r&&r[e.delay];o=Uc(l)?l(t,n.data,i):l}else o=Uc(e.delay)?e.delay(t,n.data,i):e.delay;return ac(ac({},e),{type:hc,_event:a,delay:o})}(l,s,r,e.options.delays);return i&&"number"==typeof p.delay&&i(p,s,r),p;case fc:var h=function(e,t,n,r){var o,i={_event:n},a=ed(Uc(e.event)?e.event(t,n.data,i):e.event);if(Xc(e.delay)){var l=r&&r[e.delay];o=Uc(l)?l(t,n.data,i):l}else o=Uc(e.delay)?e.delay(t,n.data,i):e.delay;var s=Uc(e.to)?e.to(t,n.data,i):e.to;return ac(ac({},e),{to:s,_event:a,event:a.data,delay:o})}(l,s,r,e.options.delays);if(!Oc){var f=l.delay;qc(!Xc(f)||"number"==typeof h.delay,"No delay reference for delay expression '".concat(f,"' was found on machine '").concat(e.id,"'"))}return i&&h.to!==ic.Internal&&("entry"===o?d.push(h):i(h,s,r)),h;case xc:var g=function(e,t,n){return ac(ac({},e),{value:Xc(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})}(l,s,r);return null==i||i(g,s,r),g;case Sc:if(!(b=null===(u=l.conds.find((function(n){var o=Yc(n.cond,e.options.guards);return!o||nd(e,o,s,r,i?void 0:t)})))||void 0===u?void 0:u.actions))return[];var v=cc(gd(e,t,s,r,[{type:o,actions:dd(Hc(b),e.options.actions)}],i,a),2),m=v[0],x=v[1];return s=x,null==c||c.push(s),m;case Ec:var b;if(!(b=l.get(s,r.data)))return[];var y=cc(gd(e,t,s,r,[{type:o,actions:dd(Hc(b),e.options.actions)}],i,a),2),w=y[0],C=y[1];return s=C,null==c||c.push(s),w;case pc:g=function(e,t,n){var r=Uc(e.activity)?e.activity(t,n.data):e.activity,o="string"==typeof r?{id:r}:r;return{type:oc.Stop,activity:o}}(l,s,r);return null==i||i(g,n,r),g;case mc:s=Wc(s,r,[l],i?void 0:t),null==c||c.push(s);break;default:var $=cd(l,e.options.actions),k=$.exec;if(i)i($,s,r);else if(k&&c){var S=c.length-1,E=ac(ac({},$),{exec:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];k.apply(void 0,dc([c[S]],cc(t),!1))}});$=E}return $}}var p=Ac(o.map((function(e){var t,n,o=[];try{for(var a=sc(e.actions),l=a.next();!l.done;l=a.next()){var c=l.value,p=u(e.type,c);p&&(o=o.concat(p))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return d.forEach((function(e){i(e,s,r)})),d.length=0,o})));return[p,s]}var vd=function(e,t){return t(e)};function md(e){var t;return(t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}})[Kc]=function(){return this},t}function xd(e,t,n){var r=md(t);if(r.deferred=!0,Jc(e)){var o=r.state=vd(void 0,(function(){return(n?e.withContext(n):e).initialState}));r.getSnapshot=function(){return o}}return r}var bd=function(e){return"atomic"===e.type||"final"===e.type};function yd(e){return Object.keys(e.states).map((function(t){return e.states[t]}))}function wd(e){return yd(e).filter((function(e){return"history"!==e.type}))}function Cd(e){var t=[e];return bd(e)?t:t.concat(Ac(wd(e).map(Cd)))}function $d(e,t){var n,r,o,i,a,l,s,c,d=Sd(new Set(e)),u=new Set(t);try{for(var p=sc(u),h=p.next();!h.done;h=p.next())for(var f=($=h.value).parent;f&&!u.has(f);)u.add(f),f=f.parent}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}var g=Sd(u);try{for(var v=sc(u),m=v.next();!m.done;m=v.next()){if("compound"!==($=m.value).type||g.get($)&&g.get($).length){if("parallel"===$.type)try{for(var x=(a=void 0,sc(wd($))),b=x.next();!b.done;b=x.next()){var y=b.value;u.has(y)||(u.add(y),d.get(y)?d.get(y).forEach((function(e){return u.add(e)})):y.initialStateNodes.forEach((function(e){return u.add(e)})))}}catch(e){a={error:e}}finally{try{b&&!b.done&&(l=x.return)&&l.call(x)}finally{if(a)throw a.error}}}else d.get($)?d.get($).forEach((function(e){return u.add(e)})):$.initialStateNodes.forEach((function(e){return u.add(e)}))}}catch(e){o={error:e}}finally{try{m&&!m.done&&(i=v.return)&&i.call(v)}finally{if(o)throw o.error}}try{for(var w=sc(u),C=w.next();!C.done;C=w.next()){var $;for(f=($=C.value).parent;f&&!u.has(f);)u.add(f),f=f.parent}}catch(e){s={error:e}}finally{try{C&&!C.done&&(c=w.return)&&c.call(w)}finally{if(s)throw s.error}}return u}function kd(e,t){var n=t.get(e);if(!n)return{};if("compound"===e.type){var r=n[0];if(!r)return{};if(bd(r))return r.key}var o={};return n.forEach((function(e){o[e.key]=kd(e,t)})),o}function Sd(e){var t,n,r=new Map;try{for(var o=sc(e),i=o.next();!i.done;i=o.next()){var a=i.value;r.has(a)||r.set(a,[]),a.parent&&(r.has(a.parent)||r.set(a.parent,[]),r.get(a.parent).push(a))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}function Ed(e,t){return kd(e,Sd($d([e],t)))}function Ld(e,t){return Array.isArray(e)?e.some((function(e){return e===t})):e instanceof Set&&e.has(t)}function Rd(e,t){return"compound"===t.type?wd(t).some((function(t){return"final"===t.type&&Ld(e,t)})):"parallel"===t.type&&wd(t).every((function(t){return Rd(e,t)}))}function Od(e){return new Set(Ac(e.map((function(e){return e.tags}))))}function Td(e,t){if(e===t)return!0;if(void 0===e||void 0===t)return!1;if(Xc(e)||Xc(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((function(n){return Td(e[n],t[n])}))}var _d=function(){function e(e){var t,n,r=this;this.actions=[],this.activities=Lc,this.meta={},this.events=[],this.value=e.value,this.context=e.context,this._event=e._event,this._sessionid=e._sessionid,this.event=this._event.data,this.historyValue=e.historyValue,this.history=e.history,this.actions=e.actions||[],this.activities=e.activities||Lc,this.meta=(void 0===(n=e.configuration)&&(n=[]),n.reduce((function(e,t){return void 0!==t.meta&&(e[t.id]=t.meta),e}),{})),this.events=e.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=e.configuration,this.transitions=e.transitions,this.children=e.children,this.done=!!e.done,this.tags=null!==(t=Array.isArray(e.tags)?new Set(e.tags):e.tags)&&void 0!==t?t:new Set,this.machine=e.machine,Object.defineProperty(this,"nextEvents",{get:function(){return function(e){return dc([],cc(new Set(Ac(dc([],cc(e.map((function(e){return e.ownEvents}))),!1)))),!1)}(r.configuration)}})}return e.from=function(t,n){return t instanceof e?t.context!==n?new e({value:t.value,context:n,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,events:[],configuration:[],transitions:[],children:{}}):t:new e({value:t,context:n,_event:ld,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,n){if(t instanceof e){if(!t.actions.length)return t;var r=ld;return new e({value:t.value,context:n,_event:r,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,n)},e.prototype.toStrings=function(e,t){var n=this;if(void 0===e&&(e=this.value),void 0===t&&(t="."),Xc(e))return[e];var r=Object.keys(e);return r.concat.apply(r,dc([],cc(r.map((function(r){return n.toStrings(e[r],t).map((function(e){return r+t+e}))}))),!1))},e.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var t=e.tags;e.machine;var n=lc(e,["configuration","transitions","tags","machine"]);return ac(ac({},n),{tags:Array.from(t)})},e.prototype.matches=function(e){return Tc(e,this.value)},e.prototype.hasTag=function(e){return this.tags.has(e)},e.prototype.can=function(e){var t;Oc&&qc(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var n=null===(t=this.machine)||void 0===t?void 0:t.getTransitionData(this,e);return!!(null==n?void 0:n.transitions.length)&&n.transitions.some((function(e){return void 0!==e.target||e.actions.length}))},e}(),Pd={deferEvents:!1},Md=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=ac(ac({},Pd),e)}return e.prototype.initialize=function(e){if(this.initialized=!0,e){if(!this.options.deferEvents)return void this.schedule(e);this.process(e)}this.flushEvents()},e.prototype.schedule=function(e){if(this.initialized&&!this.processingEvent){if(0!==this.queue.length)throw new Error("Event queue should be empty when it is not processing events");this.process(e),this.flushEvents()}else this.queue.push(e)},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var e=this.queue.shift();e;)this.process(e),e=this.queue.shift()},e.prototype.process=function(e){this.processingEvent=!0;try{e()}catch(e){throw this.clear(),e}finally{this.processingEvent=!1}},e}(),Dd=new Map,Nd=0,Vd=function(){return"x:".concat(Nd++)},Id=function(e,t){return Dd.set(e,t),e},jd=function(e){return Dd.get(e)},Ad=function(e){Dd.delete(e)};function zd(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void(Oc||console.warn("XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues"))}function Hd(e){if(zd()){var t=function(){var e=zd();if(e&&"__xstate__"in e)return e.__xstate__}();t&&t.register(e)}}function Bd(e,t){void 0===t&&(t={});var n=e.initialState,r=new Set,o=[],i=!1,a=function(e){var t;return ac(((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}})[Kc]=function(){return this},t),e)}({id:t.id,send:function(t){o.push(t),function(){if(!i){for(i=!0;o.length>0;){var t=o.shift();n=e.transition(n,t,l),r.forEach((function(e){return e.next(n)}))}i=!1}}()},getSnapshot:function(){return n},subscribe:function(e,t,o){var i=od(e,t,o);return r.add(i),i.next(n),{unsubscribe:function(){r.delete(i)}}}}),l={parent:t.parent,self:a,id:t.id||"anonymous",observers:r};return n=e.start?e.start(l):n,a}var Fd,Zd={sync:!1,autoForward:!1};!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Fd||(Fd={}));var Wd=function(){function e(t,n){void 0===n&&(n=e.defaultOptions);var r=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=Fd.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(e,t){if(Gc(e))return r.batch(e),r.state;var n=ed(Qc(e,t));if(r.status===Fd.Stopped)return Oc||qc(!1,'Event "'.concat(n.name,'" was sent to stopped service "').concat(r.machine.id,'". This service has already reached its final state, and will not transition.\nEvent: ').concat(JSON.stringify(n.data))),r.state;if(r.status!==Fd.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(n.name,'" was sent to uninitialized service "').concat(r.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: ').concat(JSON.stringify(n.data)));return r.scheduler.schedule((function(){r.forward(n);var e=r._nextState(n);r.update(e,n)})),r._state},this.sendTo=function(e,t,n){var o,i=r.parent&&(t===ic.Parent||r.parent.id===t),a=i?r.parent:Xc(t)?t===ic.Internal?r:r.children.get(t)||jd(t):(o=t)&&"function"==typeof o.send?t:void 0;if(a)if("machine"in a){if(r.status!==Fd.Stopped||r.parent!==a||r.state.done){var l=ac(ac({},e),{name:e.name===$c?"".concat(fd(r.id)):e.name,origin:r.sessionId});!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([a,l]):a.send(l)}}else!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([a,e.data]):a.send(e.data);else{if(!i)throw new Error("Unable to send event to child '".concat(t,"' from service '").concat(r.id,"'."));Oc||qc(!1,"Service '".concat(r.id,"' has no parent: unable to send event ").concat(e.type))}},this._exec=function(e,t,n,o){void 0===o&&(o=r.machine.options.actions);var i=e.exec||sd(e.type,o),a=Uc(i)?i:i?i.exec:e.exec;if(a)try{return a(t,n.data,r.machine.config.predictableActionArguments?{action:e,_event:n}:{action:e,state:r.state,_event:n})}catch(e){throw r.parent&&r.parent.send({type:"xstate.error",data:e}),e}switch(e.type){case hc:var l=e;r.defer(l);break;case fc:var s=e;if("number"==typeof s.delay)return void r.defer(s);s.to?r.sendTo(s._event,s.to,n===ld):r.send(s._event);break;case gc:r.cancel(e.sendId);break;case uc:if(r.status!==Fd.Running)return;var c=e.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[c.id||c.type])break;if(c.type===oc.Invoke){var d=rd(c.src),u=r.machine.options.services?r.machine.options.services[d.type]:void 0,p=c.id,h=c.data;Oc||qc(!("forward"in c),"`forward` property is deprecated (found in invocation of '".concat(c.src,"' in in machine '").concat(r.machine.id,"'). ")+"Please use `autoForward` instead.");var f="autoForward"in c?c.autoForward:!!c.forward;if(!u)return void(Oc||qc(!1,"No service found for invocation '".concat(c.src,"' in machine '").concat(r.machine.id,"'.")));var g=h?Bc(h,t,n):void 0;if("string"==typeof u)return;var v=Uc(u)?u(t,n.data,{data:g,src:d,meta:c.meta}):u;if(!v)return;var m=void 0;Jc(v)&&(v=g?v.withContext(g):v,m={autoForward:f}),r.spawn(v,p,m)}else r.spawnActivity(c);break;case pc:r.stopChild(e.activity.id);break;case xc:var x=e,b=x.label,y=x.value;b?r.logger(b,y):r.logger(y);break;default:Oc||qc(!1,"No implementation found for action type '".concat(e.type,"'"))}};var o=ac(ac({},e.defaultOptions),n),i=o.clock,a=o.logger,l=o.parent,s=o.id,c=void 0!==s?s:t.id;this.id=c,this.logger=a,this.clock=i,this.parent=l,this.options=o,this.scheduler=new Md({deferEvents:this.options.deferEvents}),this.sessionId=Vd()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:vd(this,(function(){return e._initialState=e.machine.initialState,e._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return Oc||qc(this.status!==Fd.NotStarted,"Attempted to read state from uninitialized service '".concat(this.id,"'. Make sure the service is started first.")),this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(e,t){var n,r;try{for(var o=sc(e.actions),i=o.next();!i.done;i=o.next()){var a=i.value;this.exec(a,e,t)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.update=function(e,t){var n,r,o,i,a,l,s,c,d=this;if(e._sessionid=this.sessionId,this._state=e,this.machine.config.predictableActionArguments&&t!==ld||!this.options.execute)for(var u=void 0;u=this._outgoingQueue.shift();)u[0].send(u[1]);else this.execute(this.state);if(this.children.forEach((function(e){d.state.children[e.id]=e})),this.devTools&&this.devTools.send(t.data,e),e.event)try{for(var p=sc(this.eventListeners),h=p.next();!h.done;h=p.next()){(0,h.value)(e.event)}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}try{for(var f=sc(this.listeners),g=f.next();!g.done;g=f.next()){(0,g.value)(e,e.event)}}catch(e){o={error:e}}finally{try{g&&!g.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}try{for(var v=sc(this.contextListeners),m=v.next();!m.done;m=v.next()){(0,m.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(e){a={error:e}}finally{try{m&&!m.done&&(l=v.return)&&l.call(v)}finally{if(a)throw a.error}}if(this.state.done){var x=e.configuration.find((function(e){return"final"===e.type&&e.parent===d.machine})),b=x&&x.doneData?Bc(x.doneData,e.context,t):void 0;this._doneEvent=hd(this.id,b);try{for(var y=sc(this.doneListeners),w=y.next();!w.done;w=y.next()){(0,w.value)(this._doneEvent)}}catch(e){s={error:e}}finally{try{w&&!w.done&&(c=y.return)&&c.call(y)}finally{if(s)throw s.error}}this._stop(),this._stopChildren(),Ad(this.sessionId)}},e.prototype.onTransition=function(e){return this.listeners.add(e),this.status===Fd.Running&&e(this.state,this.state.event),this},e.prototype.subscribe=function(e,t,n){var r=this,o=od(e,t,n);this.listeners.add(o.next),this.status!==Fd.NotStarted&&o.next(this.state);var i=function(){r.doneListeners.delete(i),r.stopListeners.delete(i),o.complete()};return this.status===Fd.Stopped?o.complete():(this.onDone(i),this.onStop(i)),{unsubscribe:function(){r.listeners.delete(o.next),r.doneListeners.delete(i),r.stopListeners.delete(i)}}},e.prototype.onEvent=function(e){return this.eventListeners.add(e),this},e.prototype.onSend=function(e){return this.sendListeners.add(e),this},e.prototype.onChange=function(e){return this.contextListeners.add(e),this},e.prototype.onStop=function(e){return this.stopListeners.add(e),this},e.prototype.onDone=function(e){return this.status===Fd.Stopped&&this._doneEvent?e(this._doneEvent):this.doneListeners.add(e),this},e.prototype.off=function(e){return this.listeners.delete(e),this.eventListeners.delete(e),this.sendListeners.delete(e),this.stopListeners.delete(e),this.doneListeners.delete(e),this.contextListeners.delete(e),this},e.prototype.start=function(e){var t=this;if(this.status===Fd.Running)return this;this.machine._init(),Id(this.sessionId,this),this.initialized=!0,this.status=Fd.Running;var n=void 0===e?this.initialState:vd(this,(function(){return"object"==typeof(n=e)&&null!==n&&"value"in n&&"_event"in n?t.machine.resolveState(e):t.machine.resolveState(_d.from(e,t.machine.context));var n}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){t.update(n,ld)})),this},e.prototype._stopChildren=function(){this.children.forEach((function(e){Uc(e.stop)&&e.stop()})),this.children.clear()},e.prototype._stop=function(){var e,t,n,r,o,i,a,l,s,c;try{for(var d=sc(this.listeners),u=d.next();!u.done;u=d.next()){var p=u.value;this.listeners.delete(p)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}try{for(var h=sc(this.stopListeners),f=h.next();!f.done;f=h.next()){(p=f.value)(),this.stopListeners.delete(p)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}try{for(var g=sc(this.contextListeners),v=g.next();!v.done;v=g.next()){p=v.value;this.contextListeners.delete(p)}}catch(e){o={error:e}}finally{try{v&&!v.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}try{for(var m=sc(this.doneListeners),x=m.next();!x.done;x=m.next()){p=x.value;this.doneListeners.delete(p)}}catch(e){a={error:e}}finally{try{x&&!x.done&&(l=m.return)&&l.call(m)}finally{if(a)throw a.error}}if(!this.initialized)return this;this.initialized=!1,this.status=Fd.Stopped,this._initialState=void 0;try{for(var b=sc(Object.keys(this.delayedEventsMap)),y=b.next();!y.done;y=b.next()){var w=y.value;this.clock.clearTimeout(this.delayedEventsMap[w])}}catch(e){s={error:e}}finally{try{y&&!y.done&&(c=b.return)&&c.call(b)}finally{if(s)throw s.error}}this.scheduler.clear(),this.scheduler=new Md({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var e=this,t=this.scheduler;return this._stop(),t.schedule((function(){var t;if(!(null===(t=e._state)||void 0===t?void 0:t.done)){var n=ed({type:"xstate.stop"}),r=vd(e,(function(){var t=Ac(dc([],cc(e.state.configuration),!1).sort((function(e,t){return t.order-e.order})).map((function(t){return dd(t.onExit,e.machine.options.actions)}))),r=cc(gd(e.machine,e.state,e.state.context,n,[{type:"exit",actions:t}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),o=r[0],i=r[1],a=new _d({value:e.state.value,context:i,_event:n,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:o.filter((function(e){return!ad(e)})),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return a.changed=!0,a}));e.update(r,n),e._stopChildren(),Ad(e.sessionId)}})),this},e.prototype.batch=function(e){var t=this;if(this.status===Fd.NotStarted&&this.options.deferEvents)Oc||qc(!1,"".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'" and are deferred. Make sure .start() is called for this service.\nEvent: ').concat(JSON.stringify(event)));else if(this.status!==Fd.Running)throw new Error("".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));if(e.length){var n=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule((function(){var r,o,i=t.state,a=!1,l=[],s=function(e){var r=ed(e);t.forward(r),i=vd(t,(function(){return t.machine.transition(i,r,void 0,n||void 0)})),l.push.apply(l,dc([],cc(t.machine.config.predictableActionArguments?i.actions:i.actions.map((function(e){return function(e,t){var n=e.exec;return ac(ac({},e),{exec:void 0!==n?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0})}(e,i)}))),!1)),a=a||!!i.changed};try{for(var c=sc(e),d=c.next();!d.done;d=c.next()){s(d.value)}}catch(e){r={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}i.changed=a,i.actions=l,t.update(i,ed(e[e.length-1]))}))}},e.prototype.sender=function(e){return this.send.bind(this,e)},e.prototype._nextState=function(e,t){var n=this;void 0===t&&(t=!!this.machine.config.predictableActionArguments&&this._exec);var r=ed(e);if(0===r.name.indexOf(Cc)&&!this.state.nextEvents.some((function(e){return 0===e.indexOf(Cc)})))throw r.data.data;return vd(this,(function(){return n.machine.transition(n.state,r,void 0,t||void 0)}))},e.prototype.nextState=function(e){return this._nextState(e,!1)},e.prototype.forward=function(e){var t,n;try{for(var r=sc(this.forwardTo),o=r.next();!o.done;o=r.next()){var i=o.value,a=this.children.get(i);if(!a)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(i,"'."));a.send(e)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.defer=function(e){var t=this,n=this.clock.setTimeout((function(){"to"in e&&e.to?t.sendTo(e._event,e.to,!0):t.send(e._event)}),e.delay);e.id&&(this.delayedEventsMap[e.id]=n)},e.prototype.cancel=function(e){this.clock.clearTimeout(this.delayedEventsMap[e]),delete this.delayedEventsMap[e]},e.prototype.exec=function(e,t,n){void 0===n&&(n=this.machine.options.actions),this._exec(e,t.context,t._event,n)},e.prototype.removeChild=function(e){var t;this.children.delete(e),this.forwardTo.delete(e),null===(t=this.state)||void 0===t||delete t.children[e]},e.prototype.stopChild=function(e){var t=this.children.get(e);t&&(this.removeChild(e),Uc(t.stop)&&t.stop())},e.prototype.spawn=function(e,t,n){if(this.status!==Fd.Running)return xd(e,t);if(Fc(e))return this.spawnPromise(Promise.resolve(e),t);if(Uc(e))return this.spawnCallback(e,t);if(function(e){try{return"function"==typeof e.send}catch(e){return!1}}(o=e)&&"id"in o)return this.spawnActor(e,t);if(function(e){try{return"subscribe"in e&&Uc(e.subscribe)}catch(e){return!1}}(e))return this.spawnObservable(e,t);if(Jc(e))return this.spawnMachine(e,ac(ac({},n),{id:t}));if(null!==(r=e)&&"object"==typeof r&&"transition"in r&&"function"==typeof r.transition)return this.spawnBehavior(e,t);throw new Error('Unable to spawn entity "'.concat(t,'" of type "').concat(typeof e,'".'));var r,o},e.prototype.spawnMachine=function(t,n){var r=this;void 0===n&&(n={});var o=new e(t,ac(ac({},this.options),{parent:this,id:n.id||t.id})),i=ac(ac({},Zd),n);i.sync&&o.onTransition((function(e){r.send(kc,{state:e,id:o.id})}));var a=o;return this.children.set(o.id,a),i.autoForward&&this.forwardTo.add(o.id),o.onDone((function(e){r.removeChild(o.id),r.send(ed(e,{origin:o.id}))})).start(),a},e.prototype.spawnBehavior=function(e,t){var n=Bd(e,{id:t,parent:this});return this.children.set(t,n),n},e.prototype.spawnPromise=function(e,t){var n,r,o=this,i=!1;e.then((function(e){i||(r=e,o.removeChild(t),o.send(ed(hd(t,e),{origin:t})))}),(function(e){if(!i){o.removeChild(t);var n=fd(t,e);try{o.send(ed(n,{origin:t}))}catch(r){!function(e,t,n){if(!Oc){var r=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(n,"', error was '").concat(e,"'.").concat(r));else{var o=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(n,"'. ")+"Original error: '".concat(e,"'. ").concat(r," Current error is '").concat(t,"'.").concat(o))}}}(e,r,t),o.devTools&&o.devTools.send(n,o.state),o.machine.strict&&o.stop()}}}));var a=((n={id:t,send:function(){},subscribe:function(t,n,r){var o=od(t,n,r),i=!1;return e.then((function(e){i||(o.next(e),i||o.complete())}),(function(e){i||o.error(e)})),{unsubscribe:function(){return i=!0}}},stop:function(){i=!0},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[Kc]=function(){return this},n);return this.children.set(t,a),a},e.prototype.spawnCallback=function(e,t){var n,r,o,i=this,a=!1,l=new Set,s=new Set;try{o=e((function(e){r=e,s.forEach((function(t){return t(e)})),a||i.send(ed(e,{origin:t}))}),(function(e){l.add(e)}))}catch(e){this.send(fd(t,e))}if(Fc(o))return this.spawnPromise(o,t);var c=((n={id:t,send:function(e){return l.forEach((function(t){return t(e)}))},subscribe:function(e){var t=od(e);return s.add(t.next),{unsubscribe:function(){s.delete(t.next)}}},stop:function(){a=!0,Uc(o)&&o()},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[Kc]=function(){return this},n);return this.children.set(t,c),c},e.prototype.spawnObservable=function(e,t){var n,r,o=this,i=e.subscribe((function(e){r=e,o.send(ed(e,{origin:t}))}),(function(e){o.removeChild(t),o.send(ed(fd(t,e),{origin:t}))}),(function(){o.removeChild(t),o.send(ed(hd(t),{origin:t}))})),a=((n={id:t,send:function(){},subscribe:function(t,n,r){return e.subscribe(t,n,r)},stop:function(){return i.unsubscribe()},getSnapshot:function(){return r},toJSON:function(){return{id:t}}})[Kc]=function(){return this},n);return this.children.set(t,a),a},e.prototype.spawnActor=function(e,t){return this.children.set(t,e),e},e.prototype.spawnActivity=function(e){var t=this.machine.options&&this.machine.options.activities?this.machine.options.activities[e.type]:void 0;if(t){var n=t(this.state.context,e);this.spawnEffect(e.id,n)}else Oc||qc(!1,"No implementation found for activity '".concat(e.type,"'"))},e.prototype.spawnEffect=function(e,t){var n;this.children.set(e,((n={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:t||void 0,getSnapshot:function(){},toJSON:function(){return{id:e}}})[Kc]=function(){return this},n))},e.prototype.attachDev=function(){var e=zd();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var t="object"==typeof this.options.devTools?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(ac(ac({name:this.id,autoPause:!0,stateSanitizer:function(e){return{value:e.value,context:e.context,actions:e.actions}}},t),{features:ac({jump:!1,skip:!1},t?t.features:void 0)}),this.machine),this.devTools.init(this.state)}Hd(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[Kc]=function(){return this},e.prototype.getSnapshot=function(){return this.status===Fd.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(e,t){return setTimeout(e,t)},clearTimeout:function(e){return clearTimeout(e)}},logger:console.log.bind(console),devTools:!1},e.interpret=qd,e}();function qd(e,t){return new Wd(e,t)}function Gd(e){if("string"==typeof e){var t={type:e,toString:function(){return e}};return t}return e}function Ud(e){return ac(ac({type:yc},e),{toJSON:function(){e.onDone,e.onError;var t=lc(e,["onDone","onError"]);return ac(ac({},t),{type:yc,src:Gd(e.src)})}})}var Xd="",Yd="*",Kd={},Jd=function(e){return"#"===e[0]},Qd=function(){function e(t,n,r,o){void 0===r&&(r="context"in t?t.context:void 0);var i,a=this;this.config=t,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign({actions:{},guards:{},services:{},activities:{},delays:{}},n),this.parent=null==o?void 0:o.parent,this.key=this.config.key||(null==o?void 0:o.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:"."),this.id=this.config.id||dc([this.machine.key],cc(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:null!==(i=this.config.schema)&&void 0!==i?i:{},this.description=this.config.description,Oc||qc(!("parallel"in this.config),'The "parallel" property is deprecated and will be removed in version 4.1. '.concat(this.config.parallel?"Replace with `type: 'parallel'`":"Use `type: '".concat(this.type,"'`")," in the config for state node '").concat(this.id,"' instead.")),this.initial=this.config.initial,this.states=this.config.states?Nc(this.config.states,(function(t,n){var r,o=new e(t,{},void 0,{parent:a,key:n});return Object.assign(a.idMap,ac(((r={})[o.id]=o,r),o.idMap)),o})):Kd;var l=0;!function e(t){var n,r;t.order=l++;try{for(var o=sc(yd(t)),i=o.next();!i.done;i=o.next()){e(i.value)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}(this),this.history=!0===this.config.history?"shallow":this.config.history||!1,this._transient=!!this.config.always||!!this.config.on&&(Array.isArray(this.config.on)?this.config.on.some((function(e){return e.event===Xd})):Xd in this.config.on),this.strict=!!this.config.strict,this.onEntry=Hc(this.config.entry||this.config.onEntry).map((function(e){return cd(e)})),this.onExit=Hc(this.config.exit||this.config.onExit).map((function(e){return cd(e)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=Hc(this.config.invoke).map((function(e,t){var n,r;if(Jc(e)){var o=id(a.id,t);return a.machine.options.services=ac(((n={})[o]=e,n),a.machine.options.services),Ud({src:o,id:o})}if(Xc(e.src)){o=e.id||id(a.id,t);return Ud(ac(ac({},e),{id:o,src:e.src}))}if(Jc(e.src)||Uc(e.src)){o=e.id||id(a.id,t);return a.machine.options.services=ac(((r={})[o]=e.src,r),a.machine.options.services),Ud(ac(ac({id:o},e),{src:o}))}var i=e.src;return Ud(ac(ac({id:id(a.id,t)},e),{src:i}))})),this.activities=Hc(this.config.activities).concat(this.invoke).map((function(e){return ud(e)})),this.transition=this.transition.bind(this),this.tags=Hc(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||Cd(this).forEach((function(e){return e.on}))},e.prototype.withConfig=function(t,n){var r=this.options,o=r.actions,i=r.activities,a=r.guards,l=r.services,s=r.delays;return new e(this.config,{actions:ac(ac({},o),t.actions),activities:ac(ac({},i),t.activities),guards:ac(ac({},a),t.guards),services:ac(ac({},l),t.services),delays:ac(ac({},s),t.delays)},null!=n?n:this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return Uc(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:Nc(this.states,(function(e){return e.definition})),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var e=this.transitions;return this.__cache.on=e.reduce((function(e,t){return e[t.eventType]=e[t.eventType]||[],e[t.eventType].push(t),e}),{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(e){if(this.__cache.candidates[e])return this.__cache.candidates[e];var t=e===Xd,n=this.transitions.filter((function(n){var r=n.eventType===e;return t?r:r||n.eventType===Yd}));return this.__cache.candidates[e]=n,n},e.prototype.getDelayedTransitions=function(){var e=this,t=this.config.after;if(!t)return[];var n=function(t,n){var r=function(e,t){var n=t?"#".concat(t):"";return"".concat(oc.After,"(").concat(e,")").concat(n)}(Uc(t)?"".concat(e.id,":delay[").concat(n,"]"):t,e.id);return e.onEntry.push(function(e,t){return{to:t?t.to:void 0,type:fc,event:Uc(e)?e:Qc(e),delay:t?t.delay:void 0,id:t&&void 0!==t.id?t.id:Uc(e)?e.name:_c(e)}}(r,{delay:t})),e.onExit.push({type:gc,sendId:r}),r},r=Gc(t)?t.map((function(e,t){var r=n(e.delay,t);return ac(ac({},e),{event:r})})):Ac(Object.keys(t).map((function(e,r){var o=t[e],i=Xc(o)?{target:o}:o,a=isNaN(+e)?e:+e,l=n(a,r);return Hc(i).map((function(e){return ac(ac({},e),{event:l,delay:a})}))})));return r.map((function(t){var n=t.delay;return ac(ac({},e.formatTransition(t)),{delay:n})}))},e.prototype.getStateNodes=function(e){var t,n=this;if(!e)return[];var r=e instanceof _d?e.value:Mc(e,this.delimiter);if(Xc(r)){var o=this.getStateNode(r).initial;return void 0!==o?this.getStateNodes(((t={})[r]=o,t)):[this,this.states[r]]}var i=Object.keys(r),a=[this];return a.push.apply(a,dc([],cc(Ac(i.map((function(e){return n.getStateNode(e).getStateNodes(r[e])})))),!1)),a},e.prototype.handles=function(e){var t=_c(e);return this.events.includes(t)},e.prototype.resolveState=function(e){var t=e instanceof _d?e:_d.create(e),n=Array.from($d([],this.getStateNodes(t.value)));return new _d(ac(ac({},t),{value:this.resolve(t.value),configuration:n,done:Rd(n,this),tags:Od(n),machine:this.machine}))},e.prototype.transitionLeafNode=function(e,t,n){var r=this.getStateNode(e).next(t,n);return r&&r.transitions.length?r:this.next(t,n)},e.prototype.transitionCompoundNode=function(e,t,n){var r=Object.keys(e),o=this.getStateNode(r[0])._transition(e[r[0]],t,n);return o&&o.transitions.length?o:this.next(t,n)},e.prototype.transitionParallelNode=function(e,t,n){var r,o,i={};try{for(var a=sc(Object.keys(e)),l=a.next();!l.done;l=a.next()){var s=l.value,c=e[s];if(c){var d=this.getStateNode(s)._transition(c,t,n);d&&(i[s]=d)}}}catch(e){r={error:e}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}var u=Object.keys(i).map((function(e){return i[e]})),p=Ac(u.map((function(e){return e.transitions})));if(!u.some((function(e){return e.transitions.length>0})))return this.next(t,n);var h=Ac(Object.keys(i).map((function(e){return i[e].configuration})));return{transitions:p,exitSet:Ac(u.map((function(e){return e.exitSet}))),configuration:h,source:t,actions:Ac(Object.keys(i).map((function(e){return i[e].actions})))}},e.prototype._transition=function(e,t,n){return Xc(e)?this.transitionLeafNode(e,t,n):1===Object.keys(e).length?this.transitionCompoundNode(e,t,n):this.transitionParallelNode(e,t,n)},e.prototype.getTransitionData=function(e,t){return this._transition(e.value,e,ed(t))},e.prototype.next=function(e,t){var n,r,o,i=this,a=t.name,l=[],s=[];try{for(var c=sc(this.getCandidates(a)),d=c.next();!d.done;d=c.next()){var u=d.value,p=u.cond,h=u.in,f=e.context,g=!h||(Xc(h)&&Jd(h)?e.matches(Mc(this.getStateNodeById(h).path,this.delimiter)):Tc(Mc(h,this.delimiter),Ic(this.path.slice(0,-2))(e.value))),v=!1;try{v=!p||nd(this.machine,p,f,t,e)}catch(e){throw new Error("Unable to evaluate guard '".concat(p.name||p.type,"' in transition for event '").concat(a,"' in state node '").concat(this.id,"':\n").concat(e.message))}if(v&&g){void 0!==u.target&&(s=u.target),l.push.apply(l,dc([],cc(u.actions),!1)),o=u;break}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}if(o){if(!s.length)return{transitions:[o],exitSet:[],configuration:e.value?[this]:[],source:e,actions:l};var m=Ac(s.map((function(t){return i.getRelativeStateNodes(t,e.historyValue)})));return{transitions:[o],exitSet:!!o.internal?[]:Ac(s.map((function(e){return i.getPotentiallyReenteringNodes(e)}))),configuration:m,source:e,actions:l}}},e.prototype.getPotentiallyReenteringNodes=function(e){if(this.order<e.order)return[this];for(var t=[],n=this,r=e;n&&n!==r;)t.push(n),n=n.parent;return n!==r?[]:(t.push(r),t)},e.prototype.getActions=function(e,t,n,r,o,i,a){var l,s,c,d,u=this,p=i?$d([],this.getStateNodes(i.value)):[],h=new Set;try{for(var f=sc(Array.from(e).sort((function(e,t){return e.order-t.order}))),g=f.next();!g.done;g=f.next()){(!Ld(p,x=g.value)||Ld(n.exitSet,x)||x.parent&&h.has(x.parent))&&h.add(x)}}catch(e){l={error:e}}finally{try{g&&!g.done&&(s=f.return)&&s.call(f)}finally{if(l)throw l.error}}try{for(var v=sc(p),m=v.next();!m.done;m=v.next()){var x;Ld(e,x=m.value)&&!Ld(n.exitSet,x.parent)||n.exitSet.push(x)}}catch(e){c={error:e}}finally{try{m&&!m.done&&(d=v.return)&&d.call(v)}finally{if(c)throw c.error}}n.exitSet.sort((function(e,t){return t.order-e.order}));var b=Array.from(h).sort((function(e,t){return e.order-t.order})),y=new Set(n.exitSet),w=Ac(b.map((function(e){var t=[];if("final"!==e.type)return t;var i=e.parent;if(!i.parent)return t;t.push(pd(e.id,e.doneData),pd(i.id,e.doneData?Bc(e.doneData,r,o):void 0));var a=i.parent;return"parallel"===a.type&&wd(a).every((function(e){return Rd(n.configuration,e)}))&&t.push(pd(a.id)),t}))),C=b.map((function(e){var t=e.onEntry,n=e.activities.map((function(e){return function(e){var t=ud(e);return{type:oc.Start,activity:t,exec:void 0}}(e)}));return{type:"entry",actions:dd(a?dc(dc([],cc(t),!1),cc(n),!1):dc(dc([],cc(n),!1),cc(t),!1),u.machine.options.actions)}})).concat({type:"state_done",actions:w.map((function(e){return function(e,t){return{type:hc,event:"function"==typeof e?e:Qc(e),delay:t?t.delay:void 0,id:null==t?void 0:t.id}}(e)}))}),$=Array.from(y).map((function(e){return{type:"exit",actions:dd(dc(dc([],cc(e.onExit),!1),cc(e.activities.map((function(e){return function(e){var t=Uc(e)?e:ud(e);return{type:oc.Stop,activity:t,exec:void 0}}(e)}))),!1),u.machine.options.actions)}})).concat({type:"transition",actions:dd(n.actions,this.machine.options.actions)}).concat(C);if(t){var k=dd(Ac(dc([],cc(e),!1).sort((function(e,t){return t.order-e.order})).map((function(e){return e.onExit}))),this.machine.options.actions).filter((function(e){return!ad(e)}));return $.concat({type:"stop",actions:k})}return $},e.prototype.transition=function(e,t,n,r){void 0===e&&(e=this.initialState);var o,i,a=ed(t);if(e instanceof _d)o=void 0===n?e:this.resolveState(_d.from(e,n));else{var l=Xc(e)?this.resolve(Dc(this.getResolvedPath(e))):this.resolve(e),s=null!=n?n:this.machine.context;o=this.resolveState(_d.from(l,s))}if(!Oc&&a.name===Yd)throw new Error("An event cannot have the wildcard type ('".concat(Yd,"')"));if(this.strict&&!this.events.includes(a.name)&&(i=a.name,!/^(done|error)\./.test(i)))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(a.name,"'"));var c=this._transition(o.value,o,a)||{transitions:[],configuration:[],exitSet:[],source:o,actions:[]},d=$d([],this.getStateNodes(o.value)),u=c.configuration.length?$d(d,c.configuration):d;return c.configuration=dc([],cc(u),!1),this.resolveTransition(c,o,o.context,r,a)},e.prototype.resolveRaisedTransition=function(e,t,n,r){var o,i=e.actions;return(e=this.transition(e,t,void 0,r))._event=n,e.event=n.data,(o=e.actions).unshift.apply(o,dc([],cc(i),!1)),e},e.prototype.resolveTransition=function(e,t,n,r,o){var i,a,l,s,c=this;void 0===o&&(o=ld);var d=e.configuration,u=!t||e.transitions.length>0,p=u?e.configuration:t?t.configuration:[],h=Rd(p,this),f=u?Ed(this.machine,d):void 0,g=t?t.historyValue?t.historyValue:e.source?this.machine.historyValue(t.value):void 0:void 0,v=this.getActions(new Set(p),h,e,n,o,t,r),m=t?ac({},t.activities):{};try{for(var x=sc(v),b=x.next();!b.done;b=x.next()){var y=b.value;try{for(var w=(l=void 0,sc(y.actions)),C=w.next();!C.done;C=w.next()){var $=C.value;$.type===uc?m[$.activity.id||$.activity.type]=$:$.type===pc&&(m[$.activity.id||$.activity.type]=!1)}}catch(e){l={error:e}}finally{try{C&&!C.done&&(s=w.return)&&s.call(w)}finally{if(l)throw l.error}}}}catch(e){i={error:e}}finally{try{b&&!b.done&&(a=x.return)&&a.call(x)}finally{if(i)throw i.error}}var k,S,E=cc(gd(this,t,n,o,v,r,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),L=E[0],R=E[1],O=cc(function(e,t){var n,r,o=cc([[],[]],2),i=o[0],a=o[1];try{for(var l=sc(e),s=l.next();!s.done;s=l.next()){var c=s.value;t(c)?i.push(c):a.push(c)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return[i,a]}(L,ad),2),T=O[0],_=O[1],P=L.filter((function(e){var t;return e.type===uc&&(null===(t=e.activity)||void 0===t?void 0:t.type)===yc})),M=P.reduce((function(e,t){return e[t.activity.id]=function(e,t,n,r){var o,i=rd(e.src),a=null===(o=null==t?void 0:t.options.services)||void 0===o?void 0:o[i.type],l=e.data?Bc(e.data,n,r):void 0,s=a?xd(a,e.id,l):md(e.id);return s.meta=e,s}(t.activity,c.machine,R,o),e}),t?ac({},t.children):{}),D=new _d({value:f||t.value,context:R,_event:o,_sessionid:t?t._sessionid:null,historyValue:f?g?(k=g,S=f,{current:S,states:Zc(k,S)}):void 0:t?t.historyValue:void 0,history:!f||e.source?t:void 0,actions:f?_:[],activities:f?m:t?t.activities:{},events:[],configuration:p,transitions:e.transitions,children:M,done:h,tags:Od(p),machine:this}),N=n!==R;D.changed=o.name===kc||N;var V=D.history;V&&delete V.history;var I=!h&&(this._transient||d.some((function(e){return e._transient})));if(!(u||I&&o.name!==Xd))return D;var j=D;if(!h)for(I&&(j=this.resolveRaisedTransition(j,{type:vc},o,r));T.length;){var A=T.shift();j=this.resolveRaisedTransition(j,A._event,o,r)}var z=j.changed||(V?!!j.actions.length||N||typeof V.value!=typeof j.value||!Td(j.value,V.value):void 0);return j.changed=z,j.history=V,j},e.prototype.getStateNode=function(e){if(Jd(e))return this.machine.getStateNodeById(e);if(!this.states)throw new Error("Unable to retrieve child state '".concat(e,"' from '").concat(this.id,"'; no child states exist."));var t=this.states[e];if(!t)throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"));return t},e.prototype.getStateNodeById=function(e){var t=Jd(e)?e.slice(1):e;if(t===this.id)return this;var n=this.machine.idMap[t];if(!n)throw new Error("Child state node '#".concat(t,"' does not exist on machine '").concat(this.id,"'"));return n},e.prototype.getStateNodeByPath=function(e){if("string"==typeof e&&Jd(e))try{return this.getStateNodeById(e.slice(1))}catch(e){}for(var t=Pc(e,this.delimiter).slice(),n=this;t.length;){var r=t.shift();if(!r.length)break;n=n.getStateNode(r)}return n},e.prototype.resolve=function(e){var t,n=this;if(!e)return this.initialStateValue||Kd;switch(this.type){case"parallel":return Nc(this.initialStateValue,(function(t,r){return t?n.getStateNode(r).resolve(e[r]||t):Kd}));case"compound":if(Xc(e)){var r=this.getStateNode(e);return"parallel"===r.type||"compound"===r.type?((t={})[e]=r.initialStateValue,t):e}return Object.keys(e).length?Nc(e,(function(e,t){return e?n.getStateNode(t).resolve(e):Kd})):this.initialStateValue||{};default:return e||Kd}},e.prototype.getResolvedPath=function(e){if(Jd(e)){var t=this.machine.idMap[e.slice(1)];if(!t)throw new Error("Unable to find state node '".concat(e,"'"));return t.path}return Pc(e,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var e,t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;if("parallel"===this.type)t=Vc(this.states,(function(e){return e.initialStateValue||Kd}),(function(e){return!("history"===e.type)}));else if(void 0!==this.initial){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));t=bd(this.states[this.initial])?this.initial:((e={})[this.initial]=this.states[this.initial].initialStateValue,e)}else t={};return this.__cache.initialStateValue=t,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(e,t){this._init();var n=this.getStateNodes(e);return this.resolveTransition({configuration:n,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,null!=t?t:this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var e;if("history"===this.type){var t=this.config;e=Xc(t.target)&&Jd(t.target)?Dc(this.machine.getStateNodeById(t.target).path.slice(this.path.length-1)):t.target}return e},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(e,t,n){return void 0===n&&(n=!0),n?"history"===e.type?e.resolveHistory(t):e.initialStateNodes:[e]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var e=this;return bd(this)?[this]:"compound"!==this.type||this.initial?Ac(jc(this.initialStateValue).map((function(t){return e.getFromRelativePath(t)}))):(Oc||qc(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this])},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var t=cc(e),n=t[0],r=t.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(n,"' from node with no states"));var o=this.getStateNode(n);if("history"===o.type)return o.resolveHistory();if(!this.states[n])throw new Error("Child state '".concat(n,"' does not exist on '").concat(this.id,"'"));return this.states[n].getFromRelativePath(r)},e.prototype.historyValue=function(e){if(Object.keys(this.states).length)return{current:e||this.initialStateValue,states:Vc(this.states,(function(t,n){if(!e)return t.historyValue();var r=Xc(e)?void 0:e[n];return t.historyValue(r||t.initialStateValue)}),(function(e){return!e.history}))}},e.prototype.resolveHistory=function(e){var t=this;if("history"!==this.type)return[this];var n=this.parent;if(!e){var r=this.target;return r?Ac(jc(r).map((function(e){return n.getFromRelativePath(e)}))):n.initialStateNodes}var o,i,a=(o=n.path,i="states",function(e){var t,n,r=e;try{for(var a=sc(o),l=a.next();!l.done;l=a.next()){var s=l.value;r=r[i][s]}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return r})(e).current;return Xc(a)?[n.getStateNode(a)]:Ac(jc(a).map((function(e){return"deep"===t.history?n.getFromRelativePath(e):[n.states[e[0]]]})))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var e=this,t=Ac(Object.keys(this.states).map((function(t){return e.states[t].stateIds})));return[this.id].concat(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var e,t,n,r;if(this.__cache.events)return this.__cache.events;var o=this.states,i=new Set(this.ownEvents);if(o)try{for(var a=sc(Object.keys(o)),l=a.next();!l.done;l=a.next()){var s=o[l.value];if(s.states)try{for(var c=(n=void 0,sc(s.events)),d=c.next();!d.done;d=c.next()){var u=d.value;i.add("".concat(u))}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(i)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var e=new Set(this.transitions.filter((function(e){return!(!e.target&&!e.actions.length&&e.internal)})).map((function(e){return e.eventType})));return Array.from(e)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(e){var t=this;if(void 0!==e)return e.map((function(e){if(!Xc(e))return e;var n=e[0]===t.delimiter;if(n&&!t.parent)return t.getStateNodeByPath(e.slice(1));var r=n?t.key+e:e;if(!t.parent)return t.getStateNodeByPath(r);try{return t.parent.getStateNodeByPath(r)}catch(e){throw new Error("Invalid transition definition for state node '".concat(t.id,"':\n").concat(e.message))}}))},e.prototype.formatTransition=function(e){var t=this,n=function(e){if(void 0!==e&&""!==e)return Hc(e)}(e.target),r="internal"in e?e.internal:!n||n.some((function(e){return Xc(e)&&e[0]===t.delimiter})),o=this.machine.options.guards,i=this.resolveTarget(n),a=ac(ac({},e),{actions:dd(Hc(e.actions)),cond:Yc(e.cond,o),target:i,source:this,internal:r,eventType:e.event,toJSON:function(){return ac(ac({},a),{target:a.target?a.target.map((function(e){return"#".concat(e.id)})):void 0,source:"#".concat(t.id)})}});return a},e.prototype.formatTransitions=function(){var e,t,n,r=this;if(this.config.on)if(Array.isArray(this.config.on))n=this.config.on;else{var o=this.config.on,i=Yd,a=o[i],l=void 0===a?[]:a,s=lc(o,["*"]);n=Ac(Object.keys(s).map((function(e){Oc||e!==Xd||qc(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(r.id,'".'));var t=td(e,s[e]);return Oc||function(e,t,n){var r=n.slice(0,-1).some((function(e){return!("cond"in e)&&!("in"in e)&&(Xc(e.target)||Jc(e.target))})),o=t===Xd?"the transient event":"event '".concat(t,"'");qc(!r,"One or more transitions for ".concat(o," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")}(r,e,t),t})).concat(td(Yd,l)))}else n=[];var c=this.config.always?td("",this.config.always):[],d=this.config.onDone?td(String(pd(this.id)),this.config.onDone):[];Oc||qc(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var u=Ac(this.invoke.map((function(e){var t=[];return e.onDone&&t.push.apply(t,dc([],cc(td(String(hd(e.id)),e.onDone)),!1)),e.onError&&t.push.apply(t,dc([],cc(td(String(fd(e.id)),e.onError)),!1)),t}))),p=this.after,h=Ac(dc(dc(dc(dc([],cc(d),!1),cc(u),!1),cc(n),!1),cc(c),!1).map((function(e){return Hc(e).map((function(e){return r.formatTransition(e)}))})));try{for(var f=sc(p),g=f.next();!g.done;g=f.next()){var v=g.value;h.push(v)}}catch(t){e={error:t}}finally{try{g&&!g.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}return h},e}();var eu,tu=function(e){return{type:mc,assignment:e}};!function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"}(eu||(eu={}));var nu="undefined"!=typeof document?ne:function(){};function ru(e){var t=X.useRef();return t.current||(t.current={v:e()}),t.current.v}var ou=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},iu=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};var au=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},lu=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};function su(e,t){(0,e.exec)(t.context,t._event.data,{action:e,state:t,_event:t._event})()}function cu(e){var t=Q([]),n=Q([]);nu((function(){var r=e.subscribe((function(e){var r,o;if(e.actions.length){var i=e.actions.filter((function(e){return"function"==typeof e.exec&&"__effect"in e.exec})),a=au(function(e,t){var n,r,o=ou([[],[]],2),i=o[0],a=o[1];try{for(var l=iu(e),s=l.next();!s.done;s=l.next()){var c=s.value;t(c)?i.push(c):a.push(c)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return[i,a]}(i,(function(e){return e.exec.__effect===eu.Effect})),2),l=a[0],s=a[1];(r=t.current).push.apply(r,lu([],au(l.map((function(t){return[t,e]}))),!1)),(o=n.current).push.apply(o,lu([],au(s.map((function(t){return[t,e]}))),!1))}}));return function(){r.unsubscribe()}}),[]),nu((function(){for(;n.current.length;){var e=au(n.current.shift(),2);su(e[0],e[1])}})),ee((function(){for(;t.current.length;){var e=au(t.current.shift(),2);su(e[0],e[1])}}))}var du=function(){return du=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},du.apply(this,arguments)},uu=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},pu=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};var hu=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function fu(e,t){void 0===t&&(t={});var n=ie((function(e){var t=void 0===e.changed&&Object.keys(e.children).length;(e.changed||t)&&a(e)}),[]),r=function(e,t,n){void 0===t&&(t={});var r=ru((function(){return"function"==typeof e?e():e}));if("production"!==process.env.NODE_ENV&&"function"!=typeof e){var o=pu(J(r),1)[0];e!==o&&console.warn("Machine given to `useMachine` has changed between renders. This is not supported and might lead to unexpected results.\nPlease make sure that you pass the same Machine as argument each time.")}var i=t.context,a=t.guards,l=t.actions,s=t.activities,c=t.services,d=t.delays,u=t.state,p=uu(t,["context","guards","actions","activities","services","delays","state"]),h=ru((function(){var e={context:i,guards:a,actions:l,activities:s,services:c,delays:d};return qd(r.withConfig(e,(function(){return du(du({},r.context),i)})),du({deferEvents:!0},p))}));return nu((function(){var e;return n&&(e=h.subscribe(function(e){if("object"==typeof e)return e;var t=function(){};return{next:e,error:void 0||t,complete:void 0||t}}(n))),function(){null==e||e.unsubscribe()}}),[n]),nu((function(){return h.start(u?_d.create(u):void 0),function(){h.stop()}}),[]),nu((function(){Object.assign(h.machine.options.actions,l),Object.assign(h.machine.options.guards,a),Object.assign(h.machine.options.activities,s),Object.assign(h.machine.options.services,c),Object.assign(h.machine.options.delays,d)}),[l,a,s,c,d]),cu(h),h}(e,t,n),o=hu(J((function(){var e=r.machine.initialState;return t.state?_d.create(t.state):e})),2),i=o[0],a=o[1];return[i,r.send,r]}function gu(){return gu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gu.apply(null,arguments)}function vu(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}const mu={arr:Array.isArray,obj:e=>"[object Object]"===Object.prototype.toString.call(e),fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e,nul:e=>null===e,set:e=>e instanceof Set,map:e=>e instanceof Map,equ(e,t){if(typeof e!=typeof t)return!1;if(mu.str(e)||mu.num(e))return e===t;if(mu.obj(e)&&mu.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;let n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!mu.und(n)||e===t}};function xu(e,t){return mu.und(e)||mu.nul(e)?t:e}function bu(e){return mu.und(e)?[]:mu.arr(e)?e:[e]}function yu(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return mu.fun(e)?e(...n):e}function wu(e){const t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,vu(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(mu.und(t))return gu({to:t},e);const n=Object.keys(e).reduce(((n,r)=>mu.und(t[r])?gu({},n,{[r]:e[r]}):n),{});return gu({to:t},n)}class Cu{constructor(){this.payload=void 0,this.children=[]}getAnimatedValue(){return this.getValue()}getPayload(){return this.payload||this}attach(){}detach(){}getChildren(){return this.children}addChild(e){0===this.children.length&&this.attach(),this.children.push(e)}removeChild(e){const t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()}}class $u extends Cu{constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach((e=>e instanceof Cu&&e.addChild(this))),this.detach=()=>this.payload.forEach((e=>e instanceof Cu&&e.removeChild(this)))}}class ku extends Cu{constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach((e=>e instanceof Cu&&e.addChild(this))),this.detach=()=>Object.values(this.payload).forEach((e=>e instanceof Cu&&e.removeChild(this)))}getValue(e){void 0===e&&(e=!1);const t={};for(const n in this.payload){const r=this.payload[n];(!e||r instanceof Cu)&&(t[n]=r instanceof Cu?r[e?"getAnimatedValue":"getValue"]():r)}return t}getAnimatedValue(){return this.getValue(!0)}}let Su,Eu;let Lu,Ru=e=>"undefined"!=typeof window?window.requestAnimationFrame(e):-1;let Ou,Tu=()=>Date.now();class _u extends ku{constructor(e,t){super(),this.update=void 0,this.payload=e.style?gu({},e,{style:Ou(e.style)}):e,this.update=t,this.attach()}}let Pu=!1;const Mu=new Set,Du=()=>{if(!Pu)return!1;let e=Tu();for(let t of Mu){let n=!1;for(let r=0;r<t.configs.length;r++){let o,i,a=t.configs[r];for(let t=0;t<a.animatedValues.length;t++){let r=a.animatedValues[t];if(r.done)continue;let l=a.fromValues[t],s=a.toValues[t],c=r.lastPosition,d=s instanceof Cu,u=Array.isArray(a.initialVelocity)?a.initialVelocity[t]:a.initialVelocity;if(d&&(s=s.getValue()),a.immediate)r.setValue(s),r.done=!0;else if("string"!=typeof l&&"string"!=typeof s){if(void 0!==a.duration)c=l+a.easing((e-r.startTime)/a.duration)*(s-l),o=e>=r.startTime+a.duration;else if(a.decay)c=l+u/(1-.998)*(1-Math.exp(-.0020000000000000018*(e-r.startTime))),o=Math.abs(r.lastPosition-c)<.1,o&&(s=c);else{i=void 0!==r.lastTime?r.lastTime:e,u=void 0!==r.lastVelocity?r.lastVelocity:a.initialVelocity,e>i+64&&(i=e);let t=Math.floor(e-i);for(let e=0;e<t;++e){u+=1*((-a.tension*(c-s)+-a.friction*u)/a.mass)/1e3,c+=1*u/1e3}let n=!(!a.clamp||0===a.tension)&&(l<s?c>s:c<s),d=Math.abs(u)<=a.precision,p=0===a.tension||Math.abs(s-c)<=a.precision;o=n||d&&p,r.lastVelocity=u,r.lastTime=e}d&&!a.toValues[t].done&&(o=!1),o?(r.value!==s&&(c=s),r.done=!0):n=!0,r.setValue(c),r.lastPosition=c}else r.setValue(s),r.done=!0}t.props.onFrame&&(t.values[a.name]=a.interpolation.getValue())}t.props.onFrame&&t.props.onFrame(t.values),n||(Mu.delete(t),t.stop(!0))}return Mu.size?Ru(Du):Pu=!1,Pu};function Nu(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return Nu({range:e,output:t,extrapolate:n});if(Lu&&"string"==typeof e.output[0])return Lu(e);const r=e,o=r.output,i=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",l=r.extrapolateRight||r.extrapolate||"extend",s=r.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,i);return function(e,t,n,r,o,i,a,l,s){let c=s?s(e):e;if(c<t){if("identity"===a)return c;"clamp"===a&&(c=t)}if(c>n){if("identity"===l)return c;"clamp"===l&&(c=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t);c=i(c),r===-1/0?c=-c:o===1/0?c+=r:c=c*(o-r)+r;return c}(e,i[t],i[t+1],o[t],o[t+1],s,a,l,r.map)}}class Vu extends $u{constructor(e,t,n,r){super(),this.calc=void 0,this.payload=e instanceof $u&&!(e instanceof Vu)?e.getPayload():Array.isArray(e)?e:[e],this.calc=Nu(t,n,r)}getValue(){return this.calc(...this.payload.map((e=>e.getValue())))}updateConfig(e,t,n){this.calc=Nu(e,t,n)}interpolate(e,t,n){return new Vu(this,e,t,n)}}const Iu=(e,t,n)=>e&&new Vu(e,t,n);function ju(e,t){"update"in e?t.add(e):e.getChildren().forEach((e=>ju(e,t)))}class Au extends Cu{constructor(e){var t;super(),t=this,this.animatedStyles=new Set,this.value=void 0,this.startPosition=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.startTime=void 0,this.lastTime=void 0,this.done=!1,this.setValue=function(e,n){void 0===n&&(n=!0),t.value=e,n&&t.flush()},this.value=e,this.startPosition=e,this.lastPosition=e}flush(){0===this.animatedStyles.size&&ju(this,this.animatedStyles),this.animatedStyles.forEach((e=>e.update()))}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,t,n){return new Vu(this,e,t,n)}}class zu extends $u{constructor(e){super(),this.payload=e.map((e=>new Au(e)))}setValue(e,t){void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach(((e,n)=>this.payload[n].setValue(e,t))):this.payload.forEach((n=>n.setValue(e,t)))}getValue(){return this.payload.map((e=>e.getValue()))}interpolate(e,t){return new Vu(this,e,t)}}let Hu=0,Bu=class{constructor(){this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=()=>this.interpolations,this.id=Hu++}update(e){if(!e)return this;const t=wu(e),n=t.delay,r=void 0===n?0:n,o=t.to,i=vu(t,["delay","to"]);if(mu.arr(o)||mu.fun(o))this.queue.push(gu({},i,{delay:r,to:o}));else if(o){let e={};Object.entries(o).forEach((t=>{let n=t[0],o=t[1];const a=gu({to:{[n]:o},delay:yu(r,n)},i),l=e[a.delay]&&e[a.delay].to;e[a.delay]=gu({},e[a.delay],a,{to:gu({},l,a.to)})})),this.queue=Object.values(e)}return this.queue=this.queue.sort(((e,t)=>e.delay-t.delay)),this.diff(i),this}start(e){if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((e=>{let t=e.from,n=void 0===t?{}:t,r=e.to,o=void 0===r?{}:r;mu.obj(n)&&(this.merged=gu({},n,this.merged)),mu.obj(o)&&(this.merged=gu({},this.merged,o))}));const t=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach(((r,o)=>{let i=r.delay,a=vu(r,["delay"]);const l=r=>{o===n.length-1&&t===this.guid&&r&&(this.idle=!0,this.props.onRest&&this.props.onRest(this.merged)),e&&e()};let s=mu.arr(a.to)||mu.fun(a.to);i?setTimeout((()=>{t===this.guid&&(s?this.runAsync(a,l):this.diff(a).start(l))}),i):s?this.runAsync(a,l):this.diff(a).start(l)}))}else mu.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,Mu.has(t)||Mu.add(t),Pu||(Pu=!0,Ru(Du));var t;return this}stop(e){return this.listeners.forEach((t=>t(e))),this.listeners=[],this}pause(e){var t;return this.stop(!0),e&&(t=this,Mu.has(t)&&Mu.delete(t)),this}runAsync(e,t){var n=this;e.delay;let r=vu(e,["delay"]);const o=this.local;let i=Promise.resolve(void 0);if(mu.arr(r.to))for(let e=0;e<r.to.length;e++){const t=e,n=gu({},r,wu(r.to[t]));mu.arr(n.config)&&(n.config=n.config[t]),i=i.then((()=>{if(o===this.guid)return new Promise((e=>this.diff(n).start(e)))}))}else if(mu.fun(r.to)){let e,t=0;i=i.then((()=>r.to((n=>{const i=gu({},r,wu(n));if(mu.arr(i.config)&&(i.config=i.config[t]),t++,o===this.guid)return e=new Promise((e=>this.diff(i).start(e)))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((()=>e))))}i.then(t)}diff(e){this.props=gu({},this.props,e);let t=this.props,n=t.from,r=void 0===n?{}:n,o=t.to,i=void 0===o?{}:o,a=t.config,l=void 0===a?{}:a,s=t.reverse,c=t.attach,d=t.reset,u=t.immediate;if(s){var p=[i,r];r=p[0],i=p[1]}this.merged=gu({},r,this.merged,i),this.hasChanged=!1;let h=c&&c(this);if(this.animations=Object.entries(this.merged).reduce(((e,t)=>{let n=t[0],o=t[1],i=e[n]||{};const a=mu.num(o),s=mu.str(o)&&!o.startsWith("#")&&!/\d/.test(o)&&!Eu[o],c=mu.arr(o),p=!a&&!c&&!s;let f=mu.und(r[n])?o:r[n],g=a||c||s?o:1,v=yu(l,n);h&&(g=h.animations[n].parent);let m,x=i.parent,b=i.interpolation,y=bu(h?g.getPayload():g),w=o;p&&(w=Lu({range:[0,1],output:[o,o]})(1));let C=b&&b.getValue();const $=!mu.und(x)&&i.animatedValues.some((e=>!e.done)),k=!mu.equ(w,C),S=!mu.equ(w,i.previous),E=!mu.equ(v,i.config);if(d||S&&k||E){if(a||s)x=b=i.parent||new Au(f);else if(c)x=b=i.parent||new zu(f);else if(p){let e=i.interpolation&&i.interpolation.calc(i.parent.value);e=void 0===e||d?f:e,i.parent?(x=i.parent,x.setValue(0,!1)):x=new Au(0);const t={output:[e,o]};i.interpolation?(b=i.interpolation,i.interpolation.updateConfig(t)):b=x.interpolate(t)}return y=bu(h?g.getPayload():g),m=bu(x.getPayload()),d&&!p&&x.setValue(f,!1),this.hasChanged=!0,m.forEach((e=>{e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=$?e.lastVelocity:void 0,e.lastTime=$?e.lastTime:void 0,e.startTime=Tu(),e.done=!1,e.animatedStyles.clear()})),yu(u,n)&&x.setValue(p?g:o,!1),gu({},e,{[n]:gu({},i,{name:n,parent:x,interpolation:b,animatedValues:m,toValues:y,previous:w,config:v,fromValues:bu(x.getValue()),immediate:yu(u,n),initialVelocity:xu(v.velocity,0),clamp:xu(v.clamp,!1),precision:xu(v.precision,.01),tension:xu(v.tension,170),friction:xu(v.friction,26),mass:xu(v.mass,1),duration:v.duration,easing:xu(v.easing,(e=>e)),decay:v.decay})})}return k?e:(p&&(x.setValue(1,!1),b.updateConfig({output:[w,w]})),x.done=!0,this.hasChanged=!0,gu({},e,{[n]:gu({},e[n],{previous:w})}))}),this.animations),this.hasChanged){this.configs=Object.values(this.animations),this.values={},this.interpolations={};for(let e in this.animations)this.interpolations[e]=this.animations[e].interpolation,this.values[e]=this.animations[e].interpolation.getValue()}return this}destroy(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0}};const Fu=e=>{const t=mu.fun(e),n=((e,t)=>{const n=Q(!1),r=Q(),o=mu.fun(t),i=oe((()=>{let n;return r.current&&(r.current.map((e=>e.destroy())),r.current=void 0),[new Array(e).fill().map(((e,r)=>{const i=new Bu,a=o?yu(t,r,i):t[r];return 0===r&&(n=a.ref),i.update(a),n||i.start(),i})),n]}),[e]),a=i[0],l=i[1];r.current=a,le(l,(()=>({start:()=>Promise.all(r.current.map((e=>new Promise((t=>e.start(t)))))),stop:e=>r.current.forEach((t=>t.stop(e))),get controllers(){return r.current}})));const s=oe((()=>e=>r.current.map(((t,n)=>{t.update(o?yu(e,n,t):e[n]),l||t.start()}))),[e]);ee((()=>{n.current?o||s(t):l||r.current.forEach((e=>e.start()))})),ee((()=>(n.current=!0,()=>r.current.forEach((e=>e.destroy())))),[]);const c=r.current.map((e=>e.getValues()));return o?[c,s,e=>r.current.forEach((t=>t.pause(e)))]:c})(1,t?e:[e]),r=n[0],o=n[1],i=n[2];return t?[r[0],o,i]:r};class Zu extends ku{constructor(e){void 0===e&&(e={}),super(),!e.transform||e.transform instanceof Cu||(e=Su.transform(e)),this.payload=e}}const Wu={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},qu="[-+]?\\d*\\.?\\d+",Gu=qu+"%";function Uu(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}const Xu=new RegExp("rgb"+Uu(qu,qu,qu)),Yu=new RegExp("rgba"+Uu(qu,qu,qu,qu)),Ku=new RegExp("hsl"+Uu(qu,Gu,Gu)),Ju=new RegExp("hsla"+Uu(qu,Gu,Gu,qu)),Qu=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ep=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,tp=/^#([0-9a-fA-F]{6})$/,np=/^#([0-9a-fA-F]{8})$/;function rp(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function op(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=rp(o,r,e+1/3),a=rp(o,r,e),l=rp(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*a)<<16|Math.round(255*l)<<8}function ip(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function ap(e){return(parseFloat(e)%360+360)%360/360}function lp(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function sp(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function cp(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=tp.exec(e))?parseInt(t[1]+"ff",16)>>>0:Wu.hasOwnProperty(e)?Wu[e]:(t=Xu.exec(e))?(ip(t[1])<<24|ip(t[2])<<16|ip(t[3])<<8|255)>>>0:(t=Yu.exec(e))?(ip(t[1])<<24|ip(t[2])<<16|ip(t[3])<<8|lp(t[4]))>>>0:(t=Qu.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=np.exec(e))?parseInt(t[1],16)>>>0:(t=ep.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Ku.exec(e))?(255|op(ap(t[1]),sp(t[2]),sp(t[3])))>>>0:(t=Ju.exec(e))?(op(ap(t[1]),sp(t[2]),sp(t[3]))|lp(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}const dp=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,up=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,pp=new RegExp(`(${Object.keys(Wu).join("|")})`,"g");let hp={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const fp=["Webkit","Ms","Moz","O"];function gp(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||hp.hasOwnProperty(e)&&hp[e]?(""+t).trim():t+"px"}hp=Object.keys(hp).reduce(((e,t)=>(fp.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),hp);const vp={};var mp;Ou=e=>new Zu(e),mp=e=>{const t=e.output.map((e=>e.replace(up,cp))).map((e=>e.replace(pp,cp))),n=t[0].match(dp).map((()=>[]));t.forEach((e=>{e.match(dp).forEach(((e,t)=>n[t].push(+e)))}));const r=t[0].match(dp).map(((t,r)=>Nu(gu({},e,{output:n[r]}))));return e=>{let n=0;return t[0].replace(dp,(()=>r[n++](e))).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,((e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`))}},Lu=mp,Eu=Wu,function(e,t){Su={fn:e,transform:t}}(((e,t)=>{if(!e.nodeType||void 0===e.setAttribute)return!1;{const o=t.style,i=t.children,a=t.scrollTop,l=t.scrollLeft,s=vu(t,["style","children","scrollTop","scrollLeft"]),c="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;void 0!==a&&(e.scrollTop=a),void 0!==l&&(e.scrollLeft=l),void 0!==i&&(e.textContent=i);for(let t in o)if(o.hasOwnProperty(t)){var n=0===t.indexOf("--"),r=gp(t,o[t],n);"float"===t&&(t="cssFloat"),n?e.style.setProperty(t,r):e.style[t]=r}for(let t in s){const n=c?t:vp[t]||(vp[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())));void 0!==e.getAttribute(n)&&e.setAttribute(n,s[t])}}}),(e=>e));var xp;const bp=(xp=e=>K(((t,n)=>{const r=function(){const e=J(!1)[1];return ie((()=>e((e=>!e))),[])}(),o=Q(!0),i=Q(null),a=Q(null),l=ie((e=>{const t=i.current;i.current=new _u(e,(()=>{let e=!1;a.current&&(e=Su.fn(a.current,i.current.getAnimatedValue())),a.current&&!1!==e||r()})),t&&t.detach()}),[]);ee((()=>()=>{o.current=!1,i.current&&i.current.detach()}),[]),le(n,(()=>(e=>e.current)(a))),l(t);const s=i.current.getValue();s.scrollTop,s.scrollLeft;const c=vu(s,["scrollTop","scrollLeft"]),d=(u=e,!mu.fun(u)||u.prototype instanceof Y.Component?e=>a.current=function(e,t){return t&&(mu.fun(t)?t(e):mu.obj(t)&&(t.current=e)),e}(e,n):void 0);var u;return Y.createElement(e,gu({},c,{ref:d}))})),e=>(mu.arr(e)?e:Object.keys(e)).reduce(((e,t)=>{const n=t;return e[n]=xp(n),e}),xp))(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);function yp(e,t){return e.map((function(e,n){return e+t[n]}))}function wp(e,t){return e.map((function(e,n){return e-t[n]}))}function Cp(e){return Math.hypot.apply(Math,e)}function $p(e){return Math.sign?Math.sign(e):Number(e>0)-Number(e<0)||+e}function kp(e,t,n){return 0===t||Math.abs(t)===1/0?function(e,t){return Math.pow(e,5*t)}(e,n):e*t*n/(t+n*e)}function Sp(e,t,n,r){return void 0===r&&(r=.15),0===r?function(e,t,n){return Math.max(t,Math.min(e,n))}(e,t,n):e<t?-kp(t-e,n-t,r)+t:e>n?+kp(e-n,n-t,r)+n:e}function Ep(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}function Lp(){return Lp=Object.assign||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},Lp.apply(this,arguments)}function Rp(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Op(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Tp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _p(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Tp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tp(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function Pp(){}function Mp(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?Pp:1===t.length?t[0]:function(){for(var e,n,r=_p(t);!(n=r()).done;){e=n.value.apply(this,arguments)||e}return e}}function Dp(e,t){if(void 0===e){if(void 0===t)throw new Error("Must define fallback value if undefined is expected");e=t}return Array.isArray(e)?e:[e,e]}function Np(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}return e}function Vp(e,t){void 0===e&&(e={});for(var n={},r=0,o=Object.entries(t);r<o.length;r++){var i=o[r],a=i[0],l=i[1];switch(typeof l){case"function":n[a]=l.call(n,e[a],a,e);break;case"object":n[a]=Vp(e[a],l);break;case"boolean":l&&(n[a]=e[a])}}return n}var Ip=Lp({},{threshold:function(e){return void 0===e&&(e=0),Dp(e)},rubberband:function(e){switch(void 0===e&&(e=0),e){case!0:return Dp(.15);case!1:return Dp(0);default:return Dp(e)}},enabled:function(e){return void 0===e&&(e=!0),e},triggerAllEvents:function(e){return void 0===e&&(e=!1),e},initial:function(e){return void 0===e&&(e=0),"function"==typeof e?e:Dp(e)}},{axis:!0,lockDirection:function(e){return void 0===e&&(e=!1),e},bounds:function(e){if(void 0===e&&(e={}),"function"==typeof e)return function(t){return Ip.bounds(e(t))};var t=e,n=t.left,r=void 0===n?-1/0:n,o=t.right,i=void 0===o?1/0:o,a=t.top,l=void 0===a?-1/0:a,s=t.bottom;return[[r,i],[l,void 0===s?1/0:s]]}}),jp="undefined"!=typeof window&&window.document&&window.document.createElement,Ap={enabled:function(e){return void 0===e&&(e=!0),e},domTarget:!0,window:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return void 0===e&&(e=jp?window:void 0),e})),eventOptions:function(e){var t=void 0===e?{}:e,n=t.passive,r=void 0===n||n,o=t.capture;return{passive:r,capture:void 0!==o&&o}}},zp=Lp({},Ip,{threshold:function(e,t,n){var r=n.filterTaps,o=void 0!==r&&r,i=n.lockDirection,a=void 0!==i&&i,l=n.axis,s=Dp(e,o?3:a||(void 0===l?void 0:l)?1:0);return this.filterTaps=o||s[0]+s[1]>0,s},swipeVelocity:function(e){return void 0===e&&(e=.5),Dp(e)},swipeDistance:function(e){return void 0===e&&(e=60),Dp(e)},delay:function(e){switch(void 0===e&&(e=0),e){case!0:return 180;case!1:return 0;default:return e}}});function Hp(e){var t=e.domTarget,n=e.eventOptions,r=e.window,o=e.enabled,i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["domTarget","eventOptions","window","enabled"]),a=function(e){return void 0===e&&(e={}),Vp(e,Ap)}({domTarget:t,eventOptions:n,window:r,enabled:o});return a.drag=function(e){return void 0===e&&(e={}),Vp(e,zp)}(i),a}function Bp(e){return Lp({_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_lastEventType:void 0,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:Pp,canceled:!1,memo:void 0,args:void 0},e)}function Fp(){return{shared:{hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1},drag:Bp({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,_isTap:!0,_delayedEvent:!1,_pointerId:void 0,tap:!1,swipe:[0,0]}),pinch:Bp({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),wheel:Bp({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),move:Bp({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),scroll:Bp({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0})}}var Zp=new Map,Wp=function(){function e(e,t){var n=this;void 0===t&&(t=[]),this.controller=e,this.args=t,this.debounced=!0,this.setTimeout=function(e,t){var r;void 0===t&&(t=140),clearTimeout(n.controller.timeouts[n.stateKey]);for(var o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];n.controller.timeouts[n.stateKey]=(r=window).setTimeout.apply(r,[e,t].concat(i))},this.clearTimeout=function(){clearTimeout(n.controller.timeouts[n.stateKey])},this.fireGestureHandler=function(e){if(void 0===e&&(e=!1),n.state._blocked)return n.debounced||(n.state._active=!1,n.clean()),null;if(!e&&!n.state.intentional&&!n.config.triggerAllEvents)return null;if(n.state.intentional){var t=n.state.active,r=n.state._active;n.state.active=r,n.state.first=r&&!t,n.state.last=t&&!r,n.controller.state.shared[n.ingKey]=r}var o=Lp({},n.controller.state.shared,n.state,n.mapStateValues(n.state)),i=n.handler(o);return n.state.memo=void 0!==i?i:n.state.memo,n.state._active||n.clean(),o}}var t=e.prototype;return t.updateSharedState=function(e){Object.assign(this.controller.state.shared,e)},t.updateGestureState=function(e){Object.assign(this.state,e)},t.checkIntentionality=function(e,t){return{_intentional:e,_blocked:!1}},t.getMovement=function(e){var t=this.config,n=t.initial,r=t.bounds,o=t.rubberband,i=t.threshold,a=this.state,l=a._bounds,s=a._initial,c=a._active,d=a._intentional,u=a.lastOffset,p=a.movement,h=this.getInternalMovement(e,this.state),f=!1===d[0]?qp(h[0],i[0]):d[0],g=!1===d[1]?qp(h[1],i[1]):d[1],v=this.checkIntentionality([f,g],h);if(v._blocked)return Lp({},v,{_movement:h,delta:[0,0]});var m,x,b,y,w=v._intentional,C=h;(!1!==w[0]&&!1===d[0]&&(x=Np(n,this.state),m=Np(r,this.state),s[0]=x[0],l[0]=m[0]),!1!==w[1]&&!1===d[1])&&(x=null!=(b=x)?b:Np(n,this.state),m=null!=(y=m)?y:Np(r,this.state),s[1]=x[1],l[1]=m[1]);var $=[!1!==w[0]?h[0]-w[0]:s[0],!1!==w[1]?h[1]-w[1]:s[1]],k=yp($,u),S=c?o:[0,0];return $=Gp(l,yp($,s),S),Lp({},v,{intentional:!1!==w[0]||!1!==w[1],_initial:s,_movement:C,movement:$,values:e,offset:Gp(l,k,S),delta:wp($,p)})},t.clean=function(){this.clearTimeout()},Ep(e,[{key:"config",get:function(){return this.controller.config[this.stateKey]}},{key:"enabled",get:function(){return this.controller.config.enabled&&this.config.enabled}},{key:"state",get:function(){return this.controller.state[this.stateKey]}},{key:"handler",get:function(){return this.controller.handlers[this.stateKey]}}]),e}();function qp(e,t){return Math.abs(e)>=t&&$p(e)*t}function Gp(e,t,n){var r=t[0],o=t[1],i=n[0],a=n[1],l=e[0],s=l[0],c=l[1],d=e[1],u=d[0],p=d[1];return[Sp(r,s,c,i),Sp(o,u,p,a)]}function Up(e,t,n){var r=e.state,o=e.args,i=t.timeStamp,a=t.type,l=r.values;return{_lastEventType:a,event:t,timeStamp:i,elapsedTime:n?0:i-r.startTime,args:o,previous:l}}function Xp(e,t){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return e.call.apply(e,[this,Lp({},t,{event:n})].concat(o))}}var Yp=function(e){var t=this;this.classes=e,this.bind=function(){for(var e={},n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];for(var i,a=_p(t.classes);!(i=a()).done;){new(0,i.value)(t,r).addBindings(e)}for(var l=0,s=Object.entries(t.nativeRefs);l<s.length;l++){var c=s[l];Qp(e,c[0],Xp(c[1],Lp({},t.state.shared,{args:r})))}return t.config.domTarget?function(e,t){var n=e.config,r=e.domListeners,o=Jp(n);if(!o)throw new Error("domTarget must be defined");var i=n.eventOptions;th(o,Kp(r),i);for(var a=0,l=Object.entries(t);a<l.length;a++){var s=l[a],c=s[0],d=s[1],u=c.slice(2).toLowerCase();r.push([u,Mp.apply(void 0,d)])}eh(o,r,i)}(t,e):function(e,t){for(var n=e.config,r={},o=n.eventOptions.capture?"Capture":"",i=0,a=Object.entries(t);i<a.length;i++){var l=a[i],s=l[0],c=l[1],d=Array.isArray(c)?c:[c];r[s+o]=Mp.apply(void 0,d)}return r}(t,e)},this.effect=function(){return t.config.domTarget&&t.bind(),t.clean},this.clean=function(){var e=Jp(t.config),n=t.config.eventOptions;e&&th(e,Kp(t.domListeners),n),Object.values(t.timeouts).forEach(clearTimeout),function(e){var t=e.config,n=t.window,r=t.eventOptions,o=e.windowListeners;if(!n)return;for(var i in o){th(n,o[i],r)}e.windowListeners={}}(t)},this.state=Fp(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function Kp(e){return void 0===e&&(e=[]),e.splice(0,e.length)}function Jp(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function Qp(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function eh(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=_p(t);!(r=o()).done;){var i=r.value,a=i[0],l=i[1];e.addEventListener(a,l,n)}}function th(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=_p(t);!(r=o()).done;){var i=r.value,a=i[0],l=i[1];e.removeEventListener(a,l,n)}}function nh(e,t,n){void 0===n&&(n={});var r=function(e){var t=new Set;e.drag&&t.add(Zp.get("drag"));e.wheel&&t.add(Zp.get("wheel"));e.scroll&&t.add(Zp.get("scroll"));e.move&&t.add(Zp.get("move"));e.pinch&&t.add(Zp.get("pinch"));e.hover&&t.add(Zp.get("hover"));return t}(e),o=Y.useMemo((function(){return new Yp(r)}),[]);return o.config=t,o.handlers=e,o.nativeRefs=n,Y.useEffect(o.effect,[]),o.config.domTarget?rh:o.bind}function rh(){"development"===process.env.NODE_ENV&&console.warn("Deprecation notice: When the `domTarget` option is specified, you don't need to write `useEffect(bind, [bind])` anymore: event binding is now made handled internally to this lib.\n\nNext version won't return anything when `domTarget` is provided, therefore your code will break if you try to call `useEffect`.")}function oh(e){if("touches"in e){var t=e.targetTouches,n=e.changedTouches;return t.length>0?t:n}return null}function ih(e){var t="buttons"in e?e.buttons:0,n=oh(e),r=n&&n.length||0;return{touches:r,down:r>0||t>0,buttons:t,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey}}function ah(e){var t=oh(e),n=t?t[0]:e;return[n.clientX,n.clientY]}var lh=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).ingKey="dragging",t.stateKey="drag",t.onDragStart=function(e){t.enabled&&!t.state._active&&(!function(e,t,n){var r=e.config,o=e.windowListeners;void 0===n&&(n=[]),r.window&&(th(r.window,o[t],r.eventOptions),eh(r.window,o[t]=n,r.eventOptions))}(t.controller,t.stateKey,[["pointermove",t.onDragChange],["pointerup",t.onDragEnd],["pointercancel",t.onDragEnd]]),t.updateGestureState({_pointerId:e.pointerId}),t.config.delay>0?(t.state._delayedEvent=!0,"persist"in e&&"function"==typeof e.persist&&e.persist(),t.setTimeout(t.startDrag.bind(Op(t)),t.config.delay,e)):t.startDrag(e))},t.onDragChange=function(e){if(!t.state.canceled&&e.pointerId===t.state._pointerId)if(t.state._active){var n=ih(e);if(n.down){t.updateSharedState(n);var r=ah(e),o=t.getKinematics(r,e),i=Up(Op(t),e),a=t.state._isTap,l=Cp(o._movement);a&&l>=3&&(a=!1),t.updateGestureState(Lp({},i,o,{_isTap:a})),t.fireGestureHandler()}else t.onDragEnd(e)}else t.state._delayedEvent&&(t.clearTimeout(),t.startDrag(e))},t.onDragEnd=function(e){if(e.pointerId===t.state._pointerId){t.state._active=!1,t.updateSharedState({down:!1,buttons:0,touches:0});var n=t.state._isTap,r=t.state.velocities,o=r[0],i=r[1],a=t.state.movement,l=a[0],s=a[1],c=t.state._intentional,d=c[0],u=c[1],p=t.config.swipeVelocity,h=p[0],f=p[1],g=t.config.swipeDistance,v=g[0],m=g[1],x=Lp({},Up(Op(t),e),t.getMovement(t.state.values)),b=[0,0];x.elapsedTime<220&&(!1!==d&&Math.abs(o)>h&&Math.abs(l)>v&&(b[0]=$p(o)),!1!==u&&Math.abs(i)>f&&Math.abs(s)>m&&(b[1]=$p(i))),t.updateGestureState(Lp({},x,{tap:n,swipe:b})),t.fireGestureHandler(!0===n)}},t.clean=function(){e.prototype.clean.call(Op(t)),t.state._delayedEvent=!1,function(e,t){var n=e.config,r=e.windowListeners;n.window&&(th(n.window,r[t],n.eventOptions),delete r[t])}(t.controller,t.stateKey)},t.onCancel=function(){t.state.canceled||(t.updateGestureState({canceled:!0}),t.state._active=!1,t.updateSharedState({down:!1,buttons:0,touches:0}),requestAnimationFrame((function(){return t.fireGestureHandler()})))},t.onClick=function(e){t.state._isTap||e.stopPropagation()},t}Rp(t,e);var n=t.prototype;return n.startDrag=function(e){var t=ah(e);this.updateSharedState(ih(e)),this.updateGestureState(Lp({},function(e,t,n){var r=e.state.offset,o=n.timeStamp;return Lp({},Fp()[e.stateKey],{_active:!0,values:t,initial:t,offset:r,lastOffset:r,startTime:o})}(this,t,e),Up(this,e,!0),{_pointerId:e.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(t)),this.fireGestureHandler()},n.addBindings=function(e){(Qp(e,"onPointerDown",this.onDragStart),this.config.filterTaps)&&Qp(e,this.controller.config.eventOptions.capture?"onClick":"onClickCapture",this.onClick)},t}(function(e){function t(){return e.apply(this,arguments)||this}Rp(t,e);var n=t.prototype;return n.getInternalMovement=function(e,t){return wp(e,t.initial)},n.checkIntentionality=function(e,t){if(!1===e[0]&&!1===e[1])return{_intentional:e,axis:this.state.axis};var n=t.map(Math.abs),r=n[0],o=n[1],i=this.state.axis||(r>o?"x":r<o?"y":void 0);return this.config.axis||this.config.lockDirection?i?this.config.axis&&i!==this.config.axis?{_intentional:e,_blocked:!0,axis:i}:(e["x"===i?1:0]=!1,{_intentional:e,_blocked:!1,axis:i}):{_intentional:[!1,!1],_blocked:!1,axis:i}:{_intentional:e,_blocked:!1,axis:i}},n.getKinematics=function(e,t){var n=this.getMovement(e);if(!n._blocked){var r=t.timeStamp-this.state.timeStamp;Object.assign(n,function(e,t,n){var r=Cp(t),o=0===r?0:1/r,i=0===n?0:1/n,a=i*r,l=t.map((function(e){return i*e})),s=t.map((function(e){return o*e}));return{velocities:l,velocity:a,distance:Cp(e),direction:s}}(n.movement,n.delta,r))}return n},n.mapStateValues=function(e){return{xy:e.values,vxvy:e.velocities}},t}(Wp));function sh(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var n,r,o,i;if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!sh(e[r],t[r]))return!1;return!0}if("function"==typeof Map&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!sh(r.value[1],t.get(r.value[0])))return!1;return!0}if("function"==typeof Set&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;if("undefined"!=typeof Element&&e instanceof Element)return!1;for(r=n;0!=r--;)if(!("_owner"===o[r]&&e.$$typeof||sh(e[o[r]],t[o[r]])))return!1;return!0}return e!=e&&t!=t}function ch(e,t){try{return sh(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}function dh(e,t){void 0===t&&(t={}),Zp.set("drag",lh);var n=Q();return n.current||(n.current=function(e,t){var n,r,o=[],i=!1;return function(){for(var a=arguments.length,l=new Array(a),s=0;s<a;s++)l[s]=arguments[s];return i&&n===this&&t(l,o)||(r=e.apply(this,l),i=!0,n=this,o=l),r}}(Hp,ch)),nh({drag:e},n.current(t))}
|
|
2502
|
+
***************************************************************************** */var oc,ic,ac=function(){return ac=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ac.apply(this,arguments)};function lc(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function sc(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function cc(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function dc(e,t,n){if(2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}!function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"}(oc||(oc={})),function(e){e.Parent="#_parent",e.Internal="#_internal"}(ic||(ic={}));var uc=oc.Start,pc=oc.Stop,hc=oc.Raise,fc=oc.Send,gc=oc.Cancel,vc=oc.NullEvent,mc=oc.Assign;oc.After,oc.DoneState;var xc=oc.Log,bc=oc.Init,yc=oc.Invoke;oc.ErrorExecution;var wc,Cc=oc.ErrorPlatform,$c=oc.ErrorCustom,kc=oc.Update,Sc=oc.Choose,Ec=oc.Pure,Lc={},Rc="xstate.guard",Oc="production"===process.env.NODE_ENV;function Tc(e,t,n){void 0===n&&(n=".");var r=Mc(e,n),o=Mc(t,n);return Xc(o)?!!Xc(r)&&o===r:Xc(r)?r in o:Object.keys(r).every((function(e){return e in o&&Tc(r[e],o[e])}))}function _c(e){try{return Xc(e)||"number"==typeof e?"".concat(e):e.type}catch(e){throw new Error("Events must be strings or objects with a string event.type property.")}}function Pc(e,t){try{return Gc(e)?e:e.toString().split(t)}catch(t){throw new Error("'".concat(e,"' is not a valid state path."))}}function Mc(e,t){return"object"==typeof(n=e)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?e.value:Gc(e)?Dc(e):"string"!=typeof e?e:Dc(Pc(e,t));var n}function Dc(e){if(1===e.length)return e[0];for(var t={},n=t,r=0;r<e.length-1;r++)r===e.length-2?n[e[r]]=e[r+1]:(n[e[r]]={},n=n[e[r]]);return t}function Nc(e,t){for(var n={},r=Object.keys(e),o=0;o<r.length;o++){var i=r[o];n[i]=t(e[i],i,e,o)}return n}function Vc(e,t,n){var r,o,i={};try{for(var a=sc(Object.keys(e)),l=a.next();!l.done;l=a.next()){var s=l.value,c=e[s];n(c)&&(i[s]=t(c,s,e))}}catch(e){r={error:e}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}var Ic=function(e){return function(t){var n,r,o=t;try{for(var i=sc(e),a=i.next();!a.done;a=i.next()){o=o[a.value]}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}};function jc(e){return e?Xc(e)?[[e]]:Ac(Object.keys(e).map((function(t){var n=e[t];return"string"==typeof n||n&&Object.keys(n).length?jc(e[t]).map((function(e){return[t].concat(e)})):[[t]]}))):[[]]}function Ac(e){var t;return(t=[]).concat.apply(t,dc([],cc(e),!1))}function zc(e){return Gc(e)?e:[e]}function Hc(e){return void 0===e?[]:zc(e)}function Bc(e,t,n){var r,o;if(Uc(e))return e(t,n.data);var i={};try{for(var a=sc(Object.keys(e)),l=a.next();!l.done;l=a.next()){var s=l.value,c=e[s];Uc(c)?i[s]=c(t,n.data):i[s]=c}}catch(e){r={error:e}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}function Fc(e){return e instanceof Promise||!(null===e||!Uc(e)&&"object"!=typeof e||!Uc(e.then))}function Zc(e,t){return Nc(e.states,(function(e,n){if(e){var r=(Xc(t)?void 0:t[n])||(e?e.current:void 0);if(r)return{current:r,states:Zc(e,r)}}}))}function Wc(e,t,n,r){Oc||qc(!!e,"Attempting to update undefined context");var o=e?n.reduce((function(e,n){var o,i,a=n.assignment,l={state:r,action:n,_event:t},s={};if(Uc(a))s=a(e,t.data,l);else try{for(var c=sc(Object.keys(a)),d=c.next();!d.done;d=c.next()){var u=d.value,p=a[u];s[u]=Uc(p)?p(e,t.data,l):p}}catch(e){o={error:e}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}return Object.assign({},e,s)}),e):e;return o}var qc=function(){};function Gc(e){return Array.isArray(e)}function Uc(e){return"function"==typeof e}function Xc(e){return"string"==typeof e}function Yc(e,t){if(e)return Xc(e)?{type:Rc,name:e,predicate:t?t[e]:void 0}:Uc(e)?{type:Rc,name:e.name,predicate:e}:e}Oc||(qc=function(e,t){var n=e instanceof Error?e:void 0;if((n||!e)&&void 0!==console){var r=["Warning: ".concat(t)];n&&r.push(n),console.warn.apply(console,r)}});var Kc=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function Jc(e){return!!e&&"__xstatenode"in e}function Qc(e,t){return Xc(e)||"number"==typeof e?ac({type:e},t):e}function ed(e,t){if(!Xc(e)&&"$$type"in e&&"scxml"===e.$$type)return e;var n=Qc(e);return ac({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function td(e,t){return zc(t).map((function(t){return void 0===t||"string"==typeof t||Jc(t)?{target:t,event:e}:ac(ac({},t),{event:e})}))}function nd(e,t,n,r,o){var i=e.options.guards,a={state:o,cond:t,_event:r};if(t.type===Rc)return((null==i?void 0:i[t.name])||t.predicate)(n,r.data,a);var l=null==i?void 0:i[t.type];if(!l)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return l(n,r.data,a)}function rd(e){return"string"==typeof e?{type:e}:e}function od(e,t,n){var r=function(){},o="object"==typeof e,i=o?e:null;return{next:((o?e.next:e)||r).bind(i),error:((o?e.error:t)||r).bind(i),complete:((o?e.complete:n)||r).bind(i)}}function id(e,t){return"".concat(e,":invocation[").concat(t,"]")}function ad(e){return(e.type===hc||e.type===fc&&e.to===ic.Internal)&&"number"!=typeof e.delay}(wc={})[Kc]=function(){return this},wc[Symbol.observable]=function(){return this};var ld=ed({type:bc});function sd(e,t){return t&&t[e]||void 0}function cd(e,t){var n;if(Xc(e)||"number"==typeof e)n=Uc(r=sd(e,t))?{type:e,exec:r}:r||{type:e,exec:void 0};else if(Uc(e))n={type:e.name||e.toString(),exec:e};else{var r;if(Uc(r=sd(e.type,t)))n=ac(ac({},e),{exec:r});else if(r){var o=r.type||e.type;n=ac(ac(ac({},r),e),{type:o})}else n=e}return n}var dd=function(e,t){return e?(Gc(e)?e:[e]).map((function(e){return cd(e,t)})):[]};function ud(e){var t=cd(e);return ac(ac({id:Xc(e)?e:t.id},t),{type:t.type})}function pd(e,t){var n="".concat(oc.DoneState,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function hd(e,t){var n="".concat(oc.DoneInvoke,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function fd(e,t){var n="".concat(oc.ErrorPlatform,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function gd(e,t,n,r,o,i,a){void 0===a&&(a=!1);var l=a?[]:function(e){var t,n,r=[];try{for(var o=sc(e),i=o.next();!i.done;i=o.next())for(var a=i.value,l=0;l<a.actions.length;)a.actions[l].type!==mc?l++:(r.push(a.actions[l]),a.actions.splice(l,1))}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(o),s=l.length?Wc(n,r,l,t):n,c=a?[n]:void 0,d=[];function u(o,l){var u;switch(l.type){case hc:var p=function(e,t,n,r){var o,i={_event:n},a=ed(Uc(e.event)?e.event(t,n.data,i):e.event);if(Xc(e.delay)){var l=r&&r[e.delay];o=Uc(l)?l(t,n.data,i):l}else o=Uc(e.delay)?e.delay(t,n.data,i):e.delay;return ac(ac({},e),{type:hc,_event:a,delay:o})}(l,s,r,e.options.delays);return i&&"number"==typeof p.delay&&i(p,s,r),p;case fc:var h=function(e,t,n,r){var o,i={_event:n},a=ed(Uc(e.event)?e.event(t,n.data,i):e.event);if(Xc(e.delay)){var l=r&&r[e.delay];o=Uc(l)?l(t,n.data,i):l}else o=Uc(e.delay)?e.delay(t,n.data,i):e.delay;var s=Uc(e.to)?e.to(t,n.data,i):e.to;return ac(ac({},e),{to:s,_event:a,event:a.data,delay:o})}(l,s,r,e.options.delays);if(!Oc){var f=l.delay;qc(!Xc(f)||"number"==typeof h.delay,"No delay reference for delay expression '".concat(f,"' was found on machine '").concat(e.id,"'"))}return i&&h.to!==ic.Internal&&("entry"===o?d.push(h):i(h,s,r)),h;case xc:var g=function(e,t,n){return ac(ac({},e),{value:Xc(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})}(l,s,r);return null==i||i(g,s,r),g;case Sc:if(!(b=null===(u=l.conds.find((function(n){var o=Yc(n.cond,e.options.guards);return!o||nd(e,o,s,r,i?void 0:t)})))||void 0===u?void 0:u.actions))return[];var v=cc(gd(e,t,s,r,[{type:o,actions:dd(Hc(b),e.options.actions)}],i,a),2),m=v[0],x=v[1];return s=x,null==c||c.push(s),m;case Ec:var b;if(!(b=l.get(s,r.data)))return[];var y=cc(gd(e,t,s,r,[{type:o,actions:dd(Hc(b),e.options.actions)}],i,a),2),w=y[0],C=y[1];return s=C,null==c||c.push(s),w;case pc:g=function(e,t,n){var r=Uc(e.activity)?e.activity(t,n.data):e.activity,o="string"==typeof r?{id:r}:r;return{type:oc.Stop,activity:o}}(l,s,r);return null==i||i(g,n,r),g;case mc:s=Wc(s,r,[l],i?void 0:t),null==c||c.push(s);break;default:var $=cd(l,e.options.actions),k=$.exec;if(i)i($,s,r);else if(k&&c){var S=c.length-1,E=ac(ac({},$),{exec:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];k.apply(void 0,dc([c[S]],cc(t),!1))}});$=E}return $}}var p=Ac(o.map((function(e){var t,n,o=[];try{for(var a=sc(e.actions),l=a.next();!l.done;l=a.next()){var c=l.value,p=u(e.type,c);p&&(o=o.concat(p))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return d.forEach((function(e){i(e,s,r)})),d.length=0,o})));return[p,s]}var vd=function(e,t){return t(e)};function md(e){var t;return(t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}})[Kc]=function(){return this},t}function xd(e,t,n){var r=md(t);if(r.deferred=!0,Jc(e)){var o=r.state=vd(void 0,(function(){return(n?e.withContext(n):e).initialState}));r.getSnapshot=function(){return o}}return r}var bd=function(e){return"atomic"===e.type||"final"===e.type};function yd(e){return Object.keys(e.states).map((function(t){return e.states[t]}))}function wd(e){return yd(e).filter((function(e){return"history"!==e.type}))}function Cd(e){var t=[e];return bd(e)?t:t.concat(Ac(wd(e).map(Cd)))}function $d(e,t){var n,r,o,i,a,l,s,c,d=Sd(new Set(e)),u=new Set(t);try{for(var p=sc(u),h=p.next();!h.done;h=p.next())for(var f=($=h.value).parent;f&&!u.has(f);)u.add(f),f=f.parent}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}var g=Sd(u);try{for(var v=sc(u),m=v.next();!m.done;m=v.next()){if("compound"!==($=m.value).type||g.get($)&&g.get($).length){if("parallel"===$.type)try{for(var x=(a=void 0,sc(wd($))),b=x.next();!b.done;b=x.next()){var y=b.value;u.has(y)||(u.add(y),d.get(y)?d.get(y).forEach((function(e){return u.add(e)})):y.initialStateNodes.forEach((function(e){return u.add(e)})))}}catch(e){a={error:e}}finally{try{b&&!b.done&&(l=x.return)&&l.call(x)}finally{if(a)throw a.error}}}else d.get($)?d.get($).forEach((function(e){return u.add(e)})):$.initialStateNodes.forEach((function(e){return u.add(e)}))}}catch(e){o={error:e}}finally{try{m&&!m.done&&(i=v.return)&&i.call(v)}finally{if(o)throw o.error}}try{for(var w=sc(u),C=w.next();!C.done;C=w.next()){var $;for(f=($=C.value).parent;f&&!u.has(f);)u.add(f),f=f.parent}}catch(e){s={error:e}}finally{try{C&&!C.done&&(c=w.return)&&c.call(w)}finally{if(s)throw s.error}}return u}function kd(e,t){var n=t.get(e);if(!n)return{};if("compound"===e.type){var r=n[0];if(!r)return{};if(bd(r))return r.key}var o={};return n.forEach((function(e){o[e.key]=kd(e,t)})),o}function Sd(e){var t,n,r=new Map;try{for(var o=sc(e),i=o.next();!i.done;i=o.next()){var a=i.value;r.has(a)||r.set(a,[]),a.parent&&(r.has(a.parent)||r.set(a.parent,[]),r.get(a.parent).push(a))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}function Ed(e,t){return kd(e,Sd($d([e],t)))}function Ld(e,t){return Array.isArray(e)?e.some((function(e){return e===t})):e instanceof Set&&e.has(t)}function Rd(e,t){return"compound"===t.type?wd(t).some((function(t){return"final"===t.type&&Ld(e,t)})):"parallel"===t.type&&wd(t).every((function(t){return Rd(e,t)}))}function Od(e){return new Set(Ac(e.map((function(e){return e.tags}))))}function Td(e,t){if(e===t)return!0;if(void 0===e||void 0===t)return!1;if(Xc(e)||Xc(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((function(n){return Td(e[n],t[n])}))}var _d=function(){function e(e){var t,n,r=this;this.actions=[],this.activities=Lc,this.meta={},this.events=[],this.value=e.value,this.context=e.context,this._event=e._event,this._sessionid=e._sessionid,this.event=this._event.data,this.historyValue=e.historyValue,this.history=e.history,this.actions=e.actions||[],this.activities=e.activities||Lc,this.meta=(void 0===(n=e.configuration)&&(n=[]),n.reduce((function(e,t){return void 0!==t.meta&&(e[t.id]=t.meta),e}),{})),this.events=e.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=e.configuration,this.transitions=e.transitions,this.children=e.children,this.done=!!e.done,this.tags=null!==(t=Array.isArray(e.tags)?new Set(e.tags):e.tags)&&void 0!==t?t:new Set,this.machine=e.machine,Object.defineProperty(this,"nextEvents",{get:function(){return function(e){return dc([],cc(new Set(Ac(dc([],cc(e.map((function(e){return e.ownEvents}))),!1)))),!1)}(r.configuration)}})}return e.from=function(t,n){return t instanceof e?t.context!==n?new e({value:t.value,context:n,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,events:[],configuration:[],transitions:[],children:{}}):t:new e({value:t,context:n,_event:ld,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,n){if(t instanceof e){if(!t.actions.length)return t;var r=ld;return new e({value:t.value,context:n,_event:r,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,n)},e.prototype.toStrings=function(e,t){var n=this;if(void 0===e&&(e=this.value),void 0===t&&(t="."),Xc(e))return[e];var r=Object.keys(e);return r.concat.apply(r,dc([],cc(r.map((function(r){return n.toStrings(e[r],t).map((function(e){return r+t+e}))}))),!1))},e.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var t=e.tags;e.machine;var n=lc(e,["configuration","transitions","tags","machine"]);return ac(ac({},n),{tags:Array.from(t)})},e.prototype.matches=function(e){return Tc(e,this.value)},e.prototype.hasTag=function(e){return this.tags.has(e)},e.prototype.can=function(e){var t;Oc&&qc(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var n=null===(t=this.machine)||void 0===t?void 0:t.getTransitionData(this,e);return!!(null==n?void 0:n.transitions.length)&&n.transitions.some((function(e){return void 0!==e.target||e.actions.length}))},e}(),Pd={deferEvents:!1},Md=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=ac(ac({},Pd),e)}return e.prototype.initialize=function(e){if(this.initialized=!0,e){if(!this.options.deferEvents)return void this.schedule(e);this.process(e)}this.flushEvents()},e.prototype.schedule=function(e){if(this.initialized&&!this.processingEvent){if(0!==this.queue.length)throw new Error("Event queue should be empty when it is not processing events");this.process(e),this.flushEvents()}else this.queue.push(e)},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var e=this.queue.shift();e;)this.process(e),e=this.queue.shift()},e.prototype.process=function(e){this.processingEvent=!0;try{e()}catch(e){throw this.clear(),e}finally{this.processingEvent=!1}},e}(),Dd=new Map,Nd=0,Vd=function(){return"x:".concat(Nd++)},Id=function(e,t){return Dd.set(e,t),e},jd=function(e){return Dd.get(e)},Ad=function(e){Dd.delete(e)};function zd(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void(Oc||console.warn("XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues"))}function Hd(e){if(zd()){var t=function(){var e=zd();if(e&&"__xstate__"in e)return e.__xstate__}();t&&t.register(e)}}function Bd(e,t){void 0===t&&(t={});var n=e.initialState,r=new Set,o=[],i=!1,a=function(e){var t;return ac(((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}})[Kc]=function(){return this},t),e)}({id:t.id,send:function(t){o.push(t),function(){if(!i){for(i=!0;o.length>0;){var t=o.shift();n=e.transition(n,t,l),r.forEach((function(e){return e.next(n)}))}i=!1}}()},getSnapshot:function(){return n},subscribe:function(e,t,o){var i=od(e,t,o);return r.add(i),i.next(n),{unsubscribe:function(){r.delete(i)}}}}),l={parent:t.parent,self:a,id:t.id||"anonymous",observers:r};return n=e.start?e.start(l):n,a}var Fd,Zd={sync:!1,autoForward:!1};!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Fd||(Fd={}));var Wd=function(){function e(t,n){void 0===n&&(n=e.defaultOptions);var r=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=Fd.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(e,t){if(Gc(e))return r.batch(e),r.state;var n=ed(Qc(e,t));if(r.status===Fd.Stopped)return Oc||qc(!1,'Event "'.concat(n.name,'" was sent to stopped service "').concat(r.machine.id,'". This service has already reached its final state, and will not transition.\nEvent: ').concat(JSON.stringify(n.data))),r.state;if(r.status!==Fd.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(n.name,'" was sent to uninitialized service "').concat(r.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: ').concat(JSON.stringify(n.data)));return r.scheduler.schedule((function(){r.forward(n);var e=r._nextState(n);r.update(e,n)})),r._state},this.sendTo=function(e,t,n){var o,i=r.parent&&(t===ic.Parent||r.parent.id===t),a=i?r.parent:Xc(t)?t===ic.Internal?r:r.children.get(t)||jd(t):(o=t)&&"function"==typeof o.send?t:void 0;if(a)if("machine"in a){if(r.status!==Fd.Stopped||r.parent!==a||r.state.done){var l=ac(ac({},e),{name:e.name===$c?"".concat(fd(r.id)):e.name,origin:r.sessionId});!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([a,l]):a.send(l)}}else!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([a,e.data]):a.send(e.data);else{if(!i)throw new Error("Unable to send event to child '".concat(t,"' from service '").concat(r.id,"'."));Oc||qc(!1,"Service '".concat(r.id,"' has no parent: unable to send event ").concat(e.type))}},this._exec=function(e,t,n,o){void 0===o&&(o=r.machine.options.actions);var i=e.exec||sd(e.type,o),a=Uc(i)?i:i?i.exec:e.exec;if(a)try{return a(t,n.data,r.machine.config.predictableActionArguments?{action:e,_event:n}:{action:e,state:r.state,_event:n})}catch(e){throw r.parent&&r.parent.send({type:"xstate.error",data:e}),e}switch(e.type){case hc:var l=e;r.defer(l);break;case fc:var s=e;if("number"==typeof s.delay)return void r.defer(s);s.to?r.sendTo(s._event,s.to,n===ld):r.send(s._event);break;case gc:r.cancel(e.sendId);break;case uc:if(r.status!==Fd.Running)return;var c=e.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[c.id||c.type])break;if(c.type===oc.Invoke){var d=rd(c.src),u=r.machine.options.services?r.machine.options.services[d.type]:void 0,p=c.id,h=c.data;Oc||qc(!("forward"in c),"`forward` property is deprecated (found in invocation of '".concat(c.src,"' in in machine '").concat(r.machine.id,"'). ")+"Please use `autoForward` instead.");var f="autoForward"in c?c.autoForward:!!c.forward;if(!u)return void(Oc||qc(!1,"No service found for invocation '".concat(c.src,"' in machine '").concat(r.machine.id,"'.")));var g=h?Bc(h,t,n):void 0;if("string"==typeof u)return;var v=Uc(u)?u(t,n.data,{data:g,src:d,meta:c.meta}):u;if(!v)return;var m=void 0;Jc(v)&&(v=g?v.withContext(g):v,m={autoForward:f}),r.spawn(v,p,m)}else r.spawnActivity(c);break;case pc:r.stopChild(e.activity.id);break;case xc:var x=e,b=x.label,y=x.value;b?r.logger(b,y):r.logger(y);break;default:Oc||qc(!1,"No implementation found for action type '".concat(e.type,"'"))}};var o=ac(ac({},e.defaultOptions),n),i=o.clock,a=o.logger,l=o.parent,s=o.id,c=void 0!==s?s:t.id;this.id=c,this.logger=a,this.clock=i,this.parent=l,this.options=o,this.scheduler=new Md({deferEvents:this.options.deferEvents}),this.sessionId=Vd()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:vd(this,(function(){return e._initialState=e.machine.initialState,e._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return Oc||qc(this.status!==Fd.NotStarted,"Attempted to read state from uninitialized service '".concat(this.id,"'. Make sure the service is started first.")),this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(e,t){var n,r;try{for(var o=sc(e.actions),i=o.next();!i.done;i=o.next()){var a=i.value;this.exec(a,e,t)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.update=function(e,t){var n,r,o,i,a,l,s,c,d=this;if(e._sessionid=this.sessionId,this._state=e,this.machine.config.predictableActionArguments&&t!==ld||!this.options.execute)for(var u=void 0;u=this._outgoingQueue.shift();)u[0].send(u[1]);else this.execute(this.state);if(this.children.forEach((function(e){d.state.children[e.id]=e})),this.devTools&&this.devTools.send(t.data,e),e.event)try{for(var p=sc(this.eventListeners),h=p.next();!h.done;h=p.next()){(0,h.value)(e.event)}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}try{for(var f=sc(this.listeners),g=f.next();!g.done;g=f.next()){(0,g.value)(e,e.event)}}catch(e){o={error:e}}finally{try{g&&!g.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}try{for(var v=sc(this.contextListeners),m=v.next();!m.done;m=v.next()){(0,m.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(e){a={error:e}}finally{try{m&&!m.done&&(l=v.return)&&l.call(v)}finally{if(a)throw a.error}}if(this.state.done){var x=e.configuration.find((function(e){return"final"===e.type&&e.parent===d.machine})),b=x&&x.doneData?Bc(x.doneData,e.context,t):void 0;this._doneEvent=hd(this.id,b);try{for(var y=sc(this.doneListeners),w=y.next();!w.done;w=y.next()){(0,w.value)(this._doneEvent)}}catch(e){s={error:e}}finally{try{w&&!w.done&&(c=y.return)&&c.call(y)}finally{if(s)throw s.error}}this._stop(),this._stopChildren(),Ad(this.sessionId)}},e.prototype.onTransition=function(e){return this.listeners.add(e),this.status===Fd.Running&&e(this.state,this.state.event),this},e.prototype.subscribe=function(e,t,n){var r=this,o=od(e,t,n);this.listeners.add(o.next),this.status!==Fd.NotStarted&&o.next(this.state);var i=function(){r.doneListeners.delete(i),r.stopListeners.delete(i),o.complete()};return this.status===Fd.Stopped?o.complete():(this.onDone(i),this.onStop(i)),{unsubscribe:function(){r.listeners.delete(o.next),r.doneListeners.delete(i),r.stopListeners.delete(i)}}},e.prototype.onEvent=function(e){return this.eventListeners.add(e),this},e.prototype.onSend=function(e){return this.sendListeners.add(e),this},e.prototype.onChange=function(e){return this.contextListeners.add(e),this},e.prototype.onStop=function(e){return this.stopListeners.add(e),this},e.prototype.onDone=function(e){return this.status===Fd.Stopped&&this._doneEvent?e(this._doneEvent):this.doneListeners.add(e),this},e.prototype.off=function(e){return this.listeners.delete(e),this.eventListeners.delete(e),this.sendListeners.delete(e),this.stopListeners.delete(e),this.doneListeners.delete(e),this.contextListeners.delete(e),this},e.prototype.start=function(e){var t=this;if(this.status===Fd.Running)return this;this.machine._init(),Id(this.sessionId,this),this.initialized=!0,this.status=Fd.Running;var n=void 0===e?this.initialState:vd(this,(function(){return"object"==typeof(n=e)&&null!==n&&"value"in n&&"_event"in n?t.machine.resolveState(e):t.machine.resolveState(_d.from(e,t.machine.context));var n}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){t.update(n,ld)})),this},e.prototype._stopChildren=function(){this.children.forEach((function(e){Uc(e.stop)&&e.stop()})),this.children.clear()},e.prototype._stop=function(){var e,t,n,r,o,i,a,l,s,c;try{for(var d=sc(this.listeners),u=d.next();!u.done;u=d.next()){var p=u.value;this.listeners.delete(p)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}try{for(var h=sc(this.stopListeners),f=h.next();!f.done;f=h.next()){(p=f.value)(),this.stopListeners.delete(p)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}try{for(var g=sc(this.contextListeners),v=g.next();!v.done;v=g.next()){p=v.value;this.contextListeners.delete(p)}}catch(e){o={error:e}}finally{try{v&&!v.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}try{for(var m=sc(this.doneListeners),x=m.next();!x.done;x=m.next()){p=x.value;this.doneListeners.delete(p)}}catch(e){a={error:e}}finally{try{x&&!x.done&&(l=m.return)&&l.call(m)}finally{if(a)throw a.error}}if(!this.initialized)return this;this.initialized=!1,this.status=Fd.Stopped,this._initialState=void 0;try{for(var b=sc(Object.keys(this.delayedEventsMap)),y=b.next();!y.done;y=b.next()){var w=y.value;this.clock.clearTimeout(this.delayedEventsMap[w])}}catch(e){s={error:e}}finally{try{y&&!y.done&&(c=b.return)&&c.call(b)}finally{if(s)throw s.error}}this.scheduler.clear(),this.scheduler=new Md({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var e=this,t=this.scheduler;return this._stop(),t.schedule((function(){var t;if(!(null===(t=e._state)||void 0===t?void 0:t.done)){var n=ed({type:"xstate.stop"}),r=vd(e,(function(){var t=Ac(dc([],cc(e.state.configuration),!1).sort((function(e,t){return t.order-e.order})).map((function(t){return dd(t.onExit,e.machine.options.actions)}))),r=cc(gd(e.machine,e.state,e.state.context,n,[{type:"exit",actions:t}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),o=r[0],i=r[1],a=new _d({value:e.state.value,context:i,_event:n,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:o.filter((function(e){return!ad(e)})),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return a.changed=!0,a}));e.update(r,n),e._stopChildren(),Ad(e.sessionId)}})),this},e.prototype.batch=function(e){var t=this;if(this.status===Fd.NotStarted&&this.options.deferEvents)Oc||qc(!1,"".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'" and are deferred. Make sure .start() is called for this service.\nEvent: ').concat(JSON.stringify(event)));else if(this.status!==Fd.Running)throw new Error("".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));if(e.length){var n=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule((function(){var r,o,i=t.state,a=!1,l=[],s=function(e){var r=ed(e);t.forward(r),i=vd(t,(function(){return t.machine.transition(i,r,void 0,n||void 0)})),l.push.apply(l,dc([],cc(t.machine.config.predictableActionArguments?i.actions:i.actions.map((function(e){return function(e,t){var n=e.exec;return ac(ac({},e),{exec:void 0!==n?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0})}(e,i)}))),!1)),a=a||!!i.changed};try{for(var c=sc(e),d=c.next();!d.done;d=c.next()){s(d.value)}}catch(e){r={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}i.changed=a,i.actions=l,t.update(i,ed(e[e.length-1]))}))}},e.prototype.sender=function(e){return this.send.bind(this,e)},e.prototype._nextState=function(e,t){var n=this;void 0===t&&(t=!!this.machine.config.predictableActionArguments&&this._exec);var r=ed(e);if(0===r.name.indexOf(Cc)&&!this.state.nextEvents.some((function(e){return 0===e.indexOf(Cc)})))throw r.data.data;return vd(this,(function(){return n.machine.transition(n.state,r,void 0,t||void 0)}))},e.prototype.nextState=function(e){return this._nextState(e,!1)},e.prototype.forward=function(e){var t,n;try{for(var r=sc(this.forwardTo),o=r.next();!o.done;o=r.next()){var i=o.value,a=this.children.get(i);if(!a)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(i,"'."));a.send(e)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.defer=function(e){var t=this,n=this.clock.setTimeout((function(){"to"in e&&e.to?t.sendTo(e._event,e.to,!0):t.send(e._event)}),e.delay);e.id&&(this.delayedEventsMap[e.id]=n)},e.prototype.cancel=function(e){this.clock.clearTimeout(this.delayedEventsMap[e]),delete this.delayedEventsMap[e]},e.prototype.exec=function(e,t,n){void 0===n&&(n=this.machine.options.actions),this._exec(e,t.context,t._event,n)},e.prototype.removeChild=function(e){var t;this.children.delete(e),this.forwardTo.delete(e),null===(t=this.state)||void 0===t||delete t.children[e]},e.prototype.stopChild=function(e){var t=this.children.get(e);t&&(this.removeChild(e),Uc(t.stop)&&t.stop())},e.prototype.spawn=function(e,t,n){if(this.status!==Fd.Running)return xd(e,t);if(Fc(e))return this.spawnPromise(Promise.resolve(e),t);if(Uc(e))return this.spawnCallback(e,t);if(function(e){try{return"function"==typeof e.send}catch(e){return!1}}(o=e)&&"id"in o)return this.spawnActor(e,t);if(function(e){try{return"subscribe"in e&&Uc(e.subscribe)}catch(e){return!1}}(e))return this.spawnObservable(e,t);if(Jc(e))return this.spawnMachine(e,ac(ac({},n),{id:t}));if(null!==(r=e)&&"object"==typeof r&&"transition"in r&&"function"==typeof r.transition)return this.spawnBehavior(e,t);throw new Error('Unable to spawn entity "'.concat(t,'" of type "').concat(typeof e,'".'));var r,o},e.prototype.spawnMachine=function(t,n){var r=this;void 0===n&&(n={});var o=new e(t,ac(ac({},this.options),{parent:this,id:n.id||t.id})),i=ac(ac({},Zd),n);i.sync&&o.onTransition((function(e){r.send(kc,{state:e,id:o.id})}));var a=o;return this.children.set(o.id,a),i.autoForward&&this.forwardTo.add(o.id),o.onDone((function(e){r.removeChild(o.id),r.send(ed(e,{origin:o.id}))})).start(),a},e.prototype.spawnBehavior=function(e,t){var n=Bd(e,{id:t,parent:this});return this.children.set(t,n),n},e.prototype.spawnPromise=function(e,t){var n,r,o=this,i=!1;e.then((function(e){i||(r=e,o.removeChild(t),o.send(ed(hd(t,e),{origin:t})))}),(function(e){if(!i){o.removeChild(t);var n=fd(t,e);try{o.send(ed(n,{origin:t}))}catch(r){!function(e,t,n){if(!Oc){var r=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(n,"', error was '").concat(e,"'.").concat(r));else{var o=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(n,"'. ")+"Original error: '".concat(e,"'. ").concat(r," Current error is '").concat(t,"'.").concat(o))}}}(e,r,t),o.devTools&&o.devTools.send(n,o.state),o.machine.strict&&o.stop()}}}));var a=((n={id:t,send:function(){},subscribe:function(t,n,r){var o=od(t,n,r),i=!1;return e.then((function(e){i||(o.next(e),i||o.complete())}),(function(e){i||o.error(e)})),{unsubscribe:function(){return i=!0}}},stop:function(){i=!0},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[Kc]=function(){return this},n);return this.children.set(t,a),a},e.prototype.spawnCallback=function(e,t){var n,r,o,i=this,a=!1,l=new Set,s=new Set;try{o=e((function(e){r=e,s.forEach((function(t){return t(e)})),a||i.send(ed(e,{origin:t}))}),(function(e){l.add(e)}))}catch(e){this.send(fd(t,e))}if(Fc(o))return this.spawnPromise(o,t);var c=((n={id:t,send:function(e){return l.forEach((function(t){return t(e)}))},subscribe:function(e){var t=od(e);return s.add(t.next),{unsubscribe:function(){s.delete(t.next)}}},stop:function(){a=!0,Uc(o)&&o()},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[Kc]=function(){return this},n);return this.children.set(t,c),c},e.prototype.spawnObservable=function(e,t){var n,r,o=this,i=e.subscribe((function(e){r=e,o.send(ed(e,{origin:t}))}),(function(e){o.removeChild(t),o.send(ed(fd(t,e),{origin:t}))}),(function(){o.removeChild(t),o.send(ed(hd(t),{origin:t}))})),a=((n={id:t,send:function(){},subscribe:function(t,n,r){return e.subscribe(t,n,r)},stop:function(){return i.unsubscribe()},getSnapshot:function(){return r},toJSON:function(){return{id:t}}})[Kc]=function(){return this},n);return this.children.set(t,a),a},e.prototype.spawnActor=function(e,t){return this.children.set(t,e),e},e.prototype.spawnActivity=function(e){var t=this.machine.options&&this.machine.options.activities?this.machine.options.activities[e.type]:void 0;if(t){var n=t(this.state.context,e);this.spawnEffect(e.id,n)}else Oc||qc(!1,"No implementation found for activity '".concat(e.type,"'"))},e.prototype.spawnEffect=function(e,t){var n;this.children.set(e,((n={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:t||void 0,getSnapshot:function(){},toJSON:function(){return{id:e}}})[Kc]=function(){return this},n))},e.prototype.attachDev=function(){var e=zd();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var t="object"==typeof this.options.devTools?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(ac(ac({name:this.id,autoPause:!0,stateSanitizer:function(e){return{value:e.value,context:e.context,actions:e.actions}}},t),{features:ac({jump:!1,skip:!1},t?t.features:void 0)}),this.machine),this.devTools.init(this.state)}Hd(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[Kc]=function(){return this},e.prototype.getSnapshot=function(){return this.status===Fd.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(e,t){return setTimeout(e,t)},clearTimeout:function(e){return clearTimeout(e)}},logger:console.log.bind(console),devTools:!1},e.interpret=qd,e}();function qd(e,t){return new Wd(e,t)}function Gd(e){if("string"==typeof e){var t={type:e,toString:function(){return e}};return t}return e}function Ud(e){return ac(ac({type:yc},e),{toJSON:function(){e.onDone,e.onError;var t=lc(e,["onDone","onError"]);return ac(ac({},t),{type:yc,src:Gd(e.src)})}})}var Xd="",Yd="*",Kd={},Jd=function(e){return"#"===e[0]},Qd=function(){function e(t,n,r,o){void 0===r&&(r="context"in t?t.context:void 0);var i,a=this;this.config=t,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign({actions:{},guards:{},services:{},activities:{},delays:{}},n),this.parent=null==o?void 0:o.parent,this.key=this.config.key||(null==o?void 0:o.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:"."),this.id=this.config.id||dc([this.machine.key],cc(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:null!==(i=this.config.schema)&&void 0!==i?i:{},this.description=this.config.description,Oc||qc(!("parallel"in this.config),'The "parallel" property is deprecated and will be removed in version 4.1. '.concat(this.config.parallel?"Replace with `type: 'parallel'`":"Use `type: '".concat(this.type,"'`")," in the config for state node '").concat(this.id,"' instead.")),this.initial=this.config.initial,this.states=this.config.states?Nc(this.config.states,(function(t,n){var r,o=new e(t,{},void 0,{parent:a,key:n});return Object.assign(a.idMap,ac(((r={})[o.id]=o,r),o.idMap)),o})):Kd;var l=0;!function e(t){var n,r;t.order=l++;try{for(var o=sc(yd(t)),i=o.next();!i.done;i=o.next()){e(i.value)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}(this),this.history=!0===this.config.history?"shallow":this.config.history||!1,this._transient=!!this.config.always||!!this.config.on&&(Array.isArray(this.config.on)?this.config.on.some((function(e){return e.event===Xd})):Xd in this.config.on),this.strict=!!this.config.strict,this.onEntry=Hc(this.config.entry||this.config.onEntry).map((function(e){return cd(e)})),this.onExit=Hc(this.config.exit||this.config.onExit).map((function(e){return cd(e)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=Hc(this.config.invoke).map((function(e,t){var n,r;if(Jc(e)){var o=id(a.id,t);return a.machine.options.services=ac(((n={})[o]=e,n),a.machine.options.services),Ud({src:o,id:o})}if(Xc(e.src)){o=e.id||id(a.id,t);return Ud(ac(ac({},e),{id:o,src:e.src}))}if(Jc(e.src)||Uc(e.src)){o=e.id||id(a.id,t);return a.machine.options.services=ac(((r={})[o]=e.src,r),a.machine.options.services),Ud(ac(ac({id:o},e),{src:o}))}var i=e.src;return Ud(ac(ac({id:id(a.id,t)},e),{src:i}))})),this.activities=Hc(this.config.activities).concat(this.invoke).map((function(e){return ud(e)})),this.transition=this.transition.bind(this),this.tags=Hc(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||Cd(this).forEach((function(e){return e.on}))},e.prototype.withConfig=function(t,n){var r=this.options,o=r.actions,i=r.activities,a=r.guards,l=r.services,s=r.delays;return new e(this.config,{actions:ac(ac({},o),t.actions),activities:ac(ac({},i),t.activities),guards:ac(ac({},a),t.guards),services:ac(ac({},l),t.services),delays:ac(ac({},s),t.delays)},null!=n?n:this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return Uc(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:Nc(this.states,(function(e){return e.definition})),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var e=this.transitions;return this.__cache.on=e.reduce((function(e,t){return e[t.eventType]=e[t.eventType]||[],e[t.eventType].push(t),e}),{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(e){if(this.__cache.candidates[e])return this.__cache.candidates[e];var t=e===Xd,n=this.transitions.filter((function(n){var r=n.eventType===e;return t?r:r||n.eventType===Yd}));return this.__cache.candidates[e]=n,n},e.prototype.getDelayedTransitions=function(){var e=this,t=this.config.after;if(!t)return[];var n=function(t,n){var r=function(e,t){var n=t?"#".concat(t):"";return"".concat(oc.After,"(").concat(e,")").concat(n)}(Uc(t)?"".concat(e.id,":delay[").concat(n,"]"):t,e.id);return e.onEntry.push(function(e,t){return{to:t?t.to:void 0,type:fc,event:Uc(e)?e:Qc(e),delay:t?t.delay:void 0,id:t&&void 0!==t.id?t.id:Uc(e)?e.name:_c(e)}}(r,{delay:t})),e.onExit.push({type:gc,sendId:r}),r},r=Gc(t)?t.map((function(e,t){var r=n(e.delay,t);return ac(ac({},e),{event:r})})):Ac(Object.keys(t).map((function(e,r){var o=t[e],i=Xc(o)?{target:o}:o,a=isNaN(+e)?e:+e,l=n(a,r);return Hc(i).map((function(e){return ac(ac({},e),{event:l,delay:a})}))})));return r.map((function(t){var n=t.delay;return ac(ac({},e.formatTransition(t)),{delay:n})}))},e.prototype.getStateNodes=function(e){var t,n=this;if(!e)return[];var r=e instanceof _d?e.value:Mc(e,this.delimiter);if(Xc(r)){var o=this.getStateNode(r).initial;return void 0!==o?this.getStateNodes(((t={})[r]=o,t)):[this,this.states[r]]}var i=Object.keys(r),a=[this];return a.push.apply(a,dc([],cc(Ac(i.map((function(e){return n.getStateNode(e).getStateNodes(r[e])})))),!1)),a},e.prototype.handles=function(e){var t=_c(e);return this.events.includes(t)},e.prototype.resolveState=function(e){var t=e instanceof _d?e:_d.create(e),n=Array.from($d([],this.getStateNodes(t.value)));return new _d(ac(ac({},t),{value:this.resolve(t.value),configuration:n,done:Rd(n,this),tags:Od(n),machine:this.machine}))},e.prototype.transitionLeafNode=function(e,t,n){var r=this.getStateNode(e).next(t,n);return r&&r.transitions.length?r:this.next(t,n)},e.prototype.transitionCompoundNode=function(e,t,n){var r=Object.keys(e),o=this.getStateNode(r[0])._transition(e[r[0]],t,n);return o&&o.transitions.length?o:this.next(t,n)},e.prototype.transitionParallelNode=function(e,t,n){var r,o,i={};try{for(var a=sc(Object.keys(e)),l=a.next();!l.done;l=a.next()){var s=l.value,c=e[s];if(c){var d=this.getStateNode(s)._transition(c,t,n);d&&(i[s]=d)}}}catch(e){r={error:e}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}var u=Object.keys(i).map((function(e){return i[e]})),p=Ac(u.map((function(e){return e.transitions})));if(!u.some((function(e){return e.transitions.length>0})))return this.next(t,n);var h=Ac(Object.keys(i).map((function(e){return i[e].configuration})));return{transitions:p,exitSet:Ac(u.map((function(e){return e.exitSet}))),configuration:h,source:t,actions:Ac(Object.keys(i).map((function(e){return i[e].actions})))}},e.prototype._transition=function(e,t,n){return Xc(e)?this.transitionLeafNode(e,t,n):1===Object.keys(e).length?this.transitionCompoundNode(e,t,n):this.transitionParallelNode(e,t,n)},e.prototype.getTransitionData=function(e,t){return this._transition(e.value,e,ed(t))},e.prototype.next=function(e,t){var n,r,o,i=this,a=t.name,l=[],s=[];try{for(var c=sc(this.getCandidates(a)),d=c.next();!d.done;d=c.next()){var u=d.value,p=u.cond,h=u.in,f=e.context,g=!h||(Xc(h)&&Jd(h)?e.matches(Mc(this.getStateNodeById(h).path,this.delimiter)):Tc(Mc(h,this.delimiter),Ic(this.path.slice(0,-2))(e.value))),v=!1;try{v=!p||nd(this.machine,p,f,t,e)}catch(e){throw new Error("Unable to evaluate guard '".concat(p.name||p.type,"' in transition for event '").concat(a,"' in state node '").concat(this.id,"':\n").concat(e.message))}if(v&&g){void 0!==u.target&&(s=u.target),l.push.apply(l,dc([],cc(u.actions),!1)),o=u;break}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}if(o){if(!s.length)return{transitions:[o],exitSet:[],configuration:e.value?[this]:[],source:e,actions:l};var m=Ac(s.map((function(t){return i.getRelativeStateNodes(t,e.historyValue)})));return{transitions:[o],exitSet:!!o.internal?[]:Ac(s.map((function(e){return i.getPotentiallyReenteringNodes(e)}))),configuration:m,source:e,actions:l}}},e.prototype.getPotentiallyReenteringNodes=function(e){if(this.order<e.order)return[this];for(var t=[],n=this,r=e;n&&n!==r;)t.push(n),n=n.parent;return n!==r?[]:(t.push(r),t)},e.prototype.getActions=function(e,t,n,r,o,i,a){var l,s,c,d,u=this,p=i?$d([],this.getStateNodes(i.value)):[],h=new Set;try{for(var f=sc(Array.from(e).sort((function(e,t){return e.order-t.order}))),g=f.next();!g.done;g=f.next()){(!Ld(p,x=g.value)||Ld(n.exitSet,x)||x.parent&&h.has(x.parent))&&h.add(x)}}catch(e){l={error:e}}finally{try{g&&!g.done&&(s=f.return)&&s.call(f)}finally{if(l)throw l.error}}try{for(var v=sc(p),m=v.next();!m.done;m=v.next()){var x;Ld(e,x=m.value)&&!Ld(n.exitSet,x.parent)||n.exitSet.push(x)}}catch(e){c={error:e}}finally{try{m&&!m.done&&(d=v.return)&&d.call(v)}finally{if(c)throw c.error}}n.exitSet.sort((function(e,t){return t.order-e.order}));var b=Array.from(h).sort((function(e,t){return e.order-t.order})),y=new Set(n.exitSet),w=Ac(b.map((function(e){var t=[];if("final"!==e.type)return t;var i=e.parent;if(!i.parent)return t;t.push(pd(e.id,e.doneData),pd(i.id,e.doneData?Bc(e.doneData,r,o):void 0));var a=i.parent;return"parallel"===a.type&&wd(a).every((function(e){return Rd(n.configuration,e)}))&&t.push(pd(a.id)),t}))),C=b.map((function(e){var t=e.onEntry,n=e.activities.map((function(e){return function(e){var t=ud(e);return{type:oc.Start,activity:t,exec:void 0}}(e)}));return{type:"entry",actions:dd(a?dc(dc([],cc(t),!1),cc(n),!1):dc(dc([],cc(n),!1),cc(t),!1),u.machine.options.actions)}})).concat({type:"state_done",actions:w.map((function(e){return function(e,t){return{type:hc,event:"function"==typeof e?e:Qc(e),delay:t?t.delay:void 0,id:null==t?void 0:t.id}}(e)}))}),$=Array.from(y).map((function(e){return{type:"exit",actions:dd(dc(dc([],cc(e.onExit),!1),cc(e.activities.map((function(e){return function(e){var t=Uc(e)?e:ud(e);return{type:oc.Stop,activity:t,exec:void 0}}(e)}))),!1),u.machine.options.actions)}})).concat({type:"transition",actions:dd(n.actions,this.machine.options.actions)}).concat(C);if(t){var k=dd(Ac(dc([],cc(e),!1).sort((function(e,t){return t.order-e.order})).map((function(e){return e.onExit}))),this.machine.options.actions).filter((function(e){return!ad(e)}));return $.concat({type:"stop",actions:k})}return $},e.prototype.transition=function(e,t,n,r){void 0===e&&(e=this.initialState);var o,i,a=ed(t);if(e instanceof _d)o=void 0===n?e:this.resolveState(_d.from(e,n));else{var l=Xc(e)?this.resolve(Dc(this.getResolvedPath(e))):this.resolve(e),s=null!=n?n:this.machine.context;o=this.resolveState(_d.from(l,s))}if(!Oc&&a.name===Yd)throw new Error("An event cannot have the wildcard type ('".concat(Yd,"')"));if(this.strict&&!this.events.includes(a.name)&&(i=a.name,!/^(done|error)\./.test(i)))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(a.name,"'"));var c=this._transition(o.value,o,a)||{transitions:[],configuration:[],exitSet:[],source:o,actions:[]},d=$d([],this.getStateNodes(o.value)),u=c.configuration.length?$d(d,c.configuration):d;return c.configuration=dc([],cc(u),!1),this.resolveTransition(c,o,o.context,r,a)},e.prototype.resolveRaisedTransition=function(e,t,n,r){var o,i=e.actions;return(e=this.transition(e,t,void 0,r))._event=n,e.event=n.data,(o=e.actions).unshift.apply(o,dc([],cc(i),!1)),e},e.prototype.resolveTransition=function(e,t,n,r,o){var i,a,l,s,c=this;void 0===o&&(o=ld);var d=e.configuration,u=!t||e.transitions.length>0,p=u?e.configuration:t?t.configuration:[],h=Rd(p,this),f=u?Ed(this.machine,d):void 0,g=t?t.historyValue?t.historyValue:e.source?this.machine.historyValue(t.value):void 0:void 0,v=this.getActions(new Set(p),h,e,n,o,t,r),m=t?ac({},t.activities):{};try{for(var x=sc(v),b=x.next();!b.done;b=x.next()){var y=b.value;try{for(var w=(l=void 0,sc(y.actions)),C=w.next();!C.done;C=w.next()){var $=C.value;$.type===uc?m[$.activity.id||$.activity.type]=$:$.type===pc&&(m[$.activity.id||$.activity.type]=!1)}}catch(e){l={error:e}}finally{try{C&&!C.done&&(s=w.return)&&s.call(w)}finally{if(l)throw l.error}}}}catch(e){i={error:e}}finally{try{b&&!b.done&&(a=x.return)&&a.call(x)}finally{if(i)throw i.error}}var k,S,E=cc(gd(this,t,n,o,v,r,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),L=E[0],R=E[1],O=cc(function(e,t){var n,r,o=cc([[],[]],2),i=o[0],a=o[1];try{for(var l=sc(e),s=l.next();!s.done;s=l.next()){var c=s.value;t(c)?i.push(c):a.push(c)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return[i,a]}(L,ad),2),T=O[0],_=O[1],P=L.filter((function(e){var t;return e.type===uc&&(null===(t=e.activity)||void 0===t?void 0:t.type)===yc})),M=P.reduce((function(e,t){return e[t.activity.id]=function(e,t,n,r){var o,i=rd(e.src),a=null===(o=null==t?void 0:t.options.services)||void 0===o?void 0:o[i.type],l=e.data?Bc(e.data,n,r):void 0,s=a?xd(a,e.id,l):md(e.id);return s.meta=e,s}(t.activity,c.machine,R,o),e}),t?ac({},t.children):{}),D=new _d({value:f||t.value,context:R,_event:o,_sessionid:t?t._sessionid:null,historyValue:f?g?(k=g,S=f,{current:S,states:Zc(k,S)}):void 0:t?t.historyValue:void 0,history:!f||e.source?t:void 0,actions:f?_:[],activities:f?m:t?t.activities:{},events:[],configuration:p,transitions:e.transitions,children:M,done:h,tags:Od(p),machine:this}),N=n!==R;D.changed=o.name===kc||N;var V=D.history;V&&delete V.history;var I=!h&&(this._transient||d.some((function(e){return e._transient})));if(!(u||I&&o.name!==Xd))return D;var j=D;if(!h)for(I&&(j=this.resolveRaisedTransition(j,{type:vc},o,r));T.length;){var A=T.shift();j=this.resolveRaisedTransition(j,A._event,o,r)}var z=j.changed||(V?!!j.actions.length||N||typeof V.value!=typeof j.value||!Td(j.value,V.value):void 0);return j.changed=z,j.history=V,j},e.prototype.getStateNode=function(e){if(Jd(e))return this.machine.getStateNodeById(e);if(!this.states)throw new Error("Unable to retrieve child state '".concat(e,"' from '").concat(this.id,"'; no child states exist."));var t=this.states[e];if(!t)throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"));return t},e.prototype.getStateNodeById=function(e){var t=Jd(e)?e.slice(1):e;if(t===this.id)return this;var n=this.machine.idMap[t];if(!n)throw new Error("Child state node '#".concat(t,"' does not exist on machine '").concat(this.id,"'"));return n},e.prototype.getStateNodeByPath=function(e){if("string"==typeof e&&Jd(e))try{return this.getStateNodeById(e.slice(1))}catch(e){}for(var t=Pc(e,this.delimiter).slice(),n=this;t.length;){var r=t.shift();if(!r.length)break;n=n.getStateNode(r)}return n},e.prototype.resolve=function(e){var t,n=this;if(!e)return this.initialStateValue||Kd;switch(this.type){case"parallel":return Nc(this.initialStateValue,(function(t,r){return t?n.getStateNode(r).resolve(e[r]||t):Kd}));case"compound":if(Xc(e)){var r=this.getStateNode(e);return"parallel"===r.type||"compound"===r.type?((t={})[e]=r.initialStateValue,t):e}return Object.keys(e).length?Nc(e,(function(e,t){return e?n.getStateNode(t).resolve(e):Kd})):this.initialStateValue||{};default:return e||Kd}},e.prototype.getResolvedPath=function(e){if(Jd(e)){var t=this.machine.idMap[e.slice(1)];if(!t)throw new Error("Unable to find state node '".concat(e,"'"));return t.path}return Pc(e,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var e,t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;if("parallel"===this.type)t=Vc(this.states,(function(e){return e.initialStateValue||Kd}),(function(e){return!("history"===e.type)}));else if(void 0!==this.initial){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));t=bd(this.states[this.initial])?this.initial:((e={})[this.initial]=this.states[this.initial].initialStateValue,e)}else t={};return this.__cache.initialStateValue=t,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(e,t){this._init();var n=this.getStateNodes(e);return this.resolveTransition({configuration:n,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,null!=t?t:this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var e;if("history"===this.type){var t=this.config;e=Xc(t.target)&&Jd(t.target)?Dc(this.machine.getStateNodeById(t.target).path.slice(this.path.length-1)):t.target}return e},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(e,t,n){return void 0===n&&(n=!0),n?"history"===e.type?e.resolveHistory(t):e.initialStateNodes:[e]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var e=this;return bd(this)?[this]:"compound"!==this.type||this.initial?Ac(jc(this.initialStateValue).map((function(t){return e.getFromRelativePath(t)}))):(Oc||qc(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this])},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var t=cc(e),n=t[0],r=t.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(n,"' from node with no states"));var o=this.getStateNode(n);if("history"===o.type)return o.resolveHistory();if(!this.states[n])throw new Error("Child state '".concat(n,"' does not exist on '").concat(this.id,"'"));return this.states[n].getFromRelativePath(r)},e.prototype.historyValue=function(e){if(Object.keys(this.states).length)return{current:e||this.initialStateValue,states:Vc(this.states,(function(t,n){if(!e)return t.historyValue();var r=Xc(e)?void 0:e[n];return t.historyValue(r||t.initialStateValue)}),(function(e){return!e.history}))}},e.prototype.resolveHistory=function(e){var t=this;if("history"!==this.type)return[this];var n=this.parent;if(!e){var r=this.target;return r?Ac(jc(r).map((function(e){return n.getFromRelativePath(e)}))):n.initialStateNodes}var o,i,a=(o=n.path,i="states",function(e){var t,n,r=e;try{for(var a=sc(o),l=a.next();!l.done;l=a.next()){var s=l.value;r=r[i][s]}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return r})(e).current;return Xc(a)?[n.getStateNode(a)]:Ac(jc(a).map((function(e){return"deep"===t.history?n.getFromRelativePath(e):[n.states[e[0]]]})))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var e=this,t=Ac(Object.keys(this.states).map((function(t){return e.states[t].stateIds})));return[this.id].concat(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var e,t,n,r;if(this.__cache.events)return this.__cache.events;var o=this.states,i=new Set(this.ownEvents);if(o)try{for(var a=sc(Object.keys(o)),l=a.next();!l.done;l=a.next()){var s=o[l.value];if(s.states)try{for(var c=(n=void 0,sc(s.events)),d=c.next();!d.done;d=c.next()){var u=d.value;i.add("".concat(u))}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(i)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var e=new Set(this.transitions.filter((function(e){return!(!e.target&&!e.actions.length&&e.internal)})).map((function(e){return e.eventType})));return Array.from(e)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(e){var t=this;if(void 0!==e)return e.map((function(e){if(!Xc(e))return e;var n=e[0]===t.delimiter;if(n&&!t.parent)return t.getStateNodeByPath(e.slice(1));var r=n?t.key+e:e;if(!t.parent)return t.getStateNodeByPath(r);try{return t.parent.getStateNodeByPath(r)}catch(e){throw new Error("Invalid transition definition for state node '".concat(t.id,"':\n").concat(e.message))}}))},e.prototype.formatTransition=function(e){var t=this,n=function(e){if(void 0!==e&&""!==e)return Hc(e)}(e.target),r="internal"in e?e.internal:!n||n.some((function(e){return Xc(e)&&e[0]===t.delimiter})),o=this.machine.options.guards,i=this.resolveTarget(n),a=ac(ac({},e),{actions:dd(Hc(e.actions)),cond:Yc(e.cond,o),target:i,source:this,internal:r,eventType:e.event,toJSON:function(){return ac(ac({},a),{target:a.target?a.target.map((function(e){return"#".concat(e.id)})):void 0,source:"#".concat(t.id)})}});return a},e.prototype.formatTransitions=function(){var e,t,n,r=this;if(this.config.on)if(Array.isArray(this.config.on))n=this.config.on;else{var o=this.config.on,i=Yd,a=o[i],l=void 0===a?[]:a,s=lc(o,["*"]);n=Ac(Object.keys(s).map((function(e){Oc||e!==Xd||qc(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(r.id,'".'));var t=td(e,s[e]);return Oc||function(e,t,n){var r=n.slice(0,-1).some((function(e){return!("cond"in e)&&!("in"in e)&&(Xc(e.target)||Jc(e.target))})),o=t===Xd?"the transient event":"event '".concat(t,"'");qc(!r,"One or more transitions for ".concat(o," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")}(r,e,t),t})).concat(td(Yd,l)))}else n=[];var c=this.config.always?td("",this.config.always):[],d=this.config.onDone?td(String(pd(this.id)),this.config.onDone):[];Oc||qc(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var u=Ac(this.invoke.map((function(e){var t=[];return e.onDone&&t.push.apply(t,dc([],cc(td(String(hd(e.id)),e.onDone)),!1)),e.onError&&t.push.apply(t,dc([],cc(td(String(fd(e.id)),e.onError)),!1)),t}))),p=this.after,h=Ac(dc(dc(dc(dc([],cc(d),!1),cc(u),!1),cc(n),!1),cc(c),!1).map((function(e){return Hc(e).map((function(e){return r.formatTransition(e)}))})));try{for(var f=sc(p),g=f.next();!g.done;g=f.next()){var v=g.value;h.push(v)}}catch(t){e={error:t}}finally{try{g&&!g.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}return h},e}();var eu,tu=function(e){return{type:mc,assignment:e}};!function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"}(eu||(eu={}));var nu="undefined"!=typeof document?re:function(){};function ru(e){var t=X.useRef();return t.current||(t.current={v:e()}),t.current.v}var ou=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},iu=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};var au=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},lu=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};function su(e,t){(0,e.exec)(t.context,t._event.data,{action:e,state:t,_event:t._event})()}function cu(e){var t=Q([]),n=Q([]);nu((function(){var r=e.subscribe((function(e){var r,o;if(e.actions.length){var i=e.actions.filter((function(e){return"function"==typeof e.exec&&"__effect"in e.exec})),a=au(function(e,t){var n,r,o=ou([[],[]],2),i=o[0],a=o[1];try{for(var l=iu(e),s=l.next();!s.done;s=l.next()){var c=s.value;t(c)?i.push(c):a.push(c)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return[i,a]}(i,(function(e){return e.exec.__effect===eu.Effect})),2),l=a[0],s=a[1];(r=t.current).push.apply(r,lu([],au(l.map((function(t){return[t,e]}))),!1)),(o=n.current).push.apply(o,lu([],au(s.map((function(t){return[t,e]}))),!1))}}));return function(){r.unsubscribe()}}),[]),nu((function(){for(;n.current.length;){var e=au(n.current.shift(),2);su(e[0],e[1])}})),ee((function(){for(;t.current.length;){var e=au(t.current.shift(),2);su(e[0],e[1])}}))}var du=function(){return du=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},du.apply(this,arguments)},uu=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},pu=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};var hu=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function fu(e,t){void 0===t&&(t={});var n=ie((function(e){var t=void 0===e.changed&&Object.keys(e.children).length;(e.changed||t)&&a(e)}),[]),r=function(e,t,n){void 0===t&&(t={});var r=ru((function(){return"function"==typeof e?e():e}));if("production"!==process.env.NODE_ENV&&"function"!=typeof e){var o=pu(J(r),1)[0];e!==o&&console.warn("Machine given to `useMachine` has changed between renders. This is not supported and might lead to unexpected results.\nPlease make sure that you pass the same Machine as argument each time.")}var i=t.context,a=t.guards,l=t.actions,s=t.activities,c=t.services,d=t.delays,u=t.state,p=uu(t,["context","guards","actions","activities","services","delays","state"]),h=ru((function(){var e={context:i,guards:a,actions:l,activities:s,services:c,delays:d};return qd(r.withConfig(e,(function(){return du(du({},r.context),i)})),du({deferEvents:!0},p))}));return nu((function(){var e;return n&&(e=h.subscribe(function(e){if("object"==typeof e)return e;var t=function(){};return{next:e,error:void 0||t,complete:void 0||t}}(n))),function(){null==e||e.unsubscribe()}}),[n]),nu((function(){return h.start(u?_d.create(u):void 0),function(){h.stop()}}),[]),nu((function(){Object.assign(h.machine.options.actions,l),Object.assign(h.machine.options.guards,a),Object.assign(h.machine.options.activities,s),Object.assign(h.machine.options.services,c),Object.assign(h.machine.options.delays,d)}),[l,a,s,c,d]),cu(h),h}(e,t,n),o=hu(J((function(){var e=r.machine.initialState;return t.state?_d.create(t.state):e})),2),i=o[0],a=o[1];return[i,r.send,r]}function gu(){return gu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gu.apply(null,arguments)}function vu(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}const mu={arr:Array.isArray,obj:e=>"[object Object]"===Object.prototype.toString.call(e),fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e,nul:e=>null===e,set:e=>e instanceof Set,map:e=>e instanceof Map,equ(e,t){if(typeof e!=typeof t)return!1;if(mu.str(e)||mu.num(e))return e===t;if(mu.obj(e)&&mu.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;let n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!mu.und(n)||e===t}};function xu(e,t){return mu.und(e)||mu.nul(e)?t:e}function bu(e){return mu.und(e)?[]:mu.arr(e)?e:[e]}function yu(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return mu.fun(e)?e(...n):e}function wu(e){const t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,vu(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(mu.und(t))return gu({to:t},e);const n=Object.keys(e).reduce(((n,r)=>mu.und(t[r])?gu({},n,{[r]:e[r]}):n),{});return gu({to:t},n)}class Cu{constructor(){this.payload=void 0,this.children=[]}getAnimatedValue(){return this.getValue()}getPayload(){return this.payload||this}attach(){}detach(){}getChildren(){return this.children}addChild(e){0===this.children.length&&this.attach(),this.children.push(e)}removeChild(e){const t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()}}class $u extends Cu{constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach((e=>e instanceof Cu&&e.addChild(this))),this.detach=()=>this.payload.forEach((e=>e instanceof Cu&&e.removeChild(this)))}}class ku extends Cu{constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach((e=>e instanceof Cu&&e.addChild(this))),this.detach=()=>Object.values(this.payload).forEach((e=>e instanceof Cu&&e.removeChild(this)))}getValue(e){void 0===e&&(e=!1);const t={};for(const n in this.payload){const r=this.payload[n];(!e||r instanceof Cu)&&(t[n]=r instanceof Cu?r[e?"getAnimatedValue":"getValue"]():r)}return t}getAnimatedValue(){return this.getValue(!0)}}let Su,Eu;let Lu,Ru=e=>"undefined"!=typeof window?window.requestAnimationFrame(e):-1;let Ou,Tu=()=>Date.now();class _u extends ku{constructor(e,t){super(),this.update=void 0,this.payload=e.style?gu({},e,{style:Ou(e.style)}):e,this.update=t,this.attach()}}let Pu=!1;const Mu=new Set,Du=()=>{if(!Pu)return!1;let e=Tu();for(let t of Mu){let n=!1;for(let r=0;r<t.configs.length;r++){let o,i,a=t.configs[r];for(let t=0;t<a.animatedValues.length;t++){let r=a.animatedValues[t];if(r.done)continue;let l=a.fromValues[t],s=a.toValues[t],c=r.lastPosition,d=s instanceof Cu,u=Array.isArray(a.initialVelocity)?a.initialVelocity[t]:a.initialVelocity;if(d&&(s=s.getValue()),a.immediate)r.setValue(s),r.done=!0;else if("string"!=typeof l&&"string"!=typeof s){if(void 0!==a.duration)c=l+a.easing((e-r.startTime)/a.duration)*(s-l),o=e>=r.startTime+a.duration;else if(a.decay)c=l+u/(1-.998)*(1-Math.exp(-.0020000000000000018*(e-r.startTime))),o=Math.abs(r.lastPosition-c)<.1,o&&(s=c);else{i=void 0!==r.lastTime?r.lastTime:e,u=void 0!==r.lastVelocity?r.lastVelocity:a.initialVelocity,e>i+64&&(i=e);let t=Math.floor(e-i);for(let e=0;e<t;++e){u+=1*((-a.tension*(c-s)+-a.friction*u)/a.mass)/1e3,c+=1*u/1e3}let n=!(!a.clamp||0===a.tension)&&(l<s?c>s:c<s),d=Math.abs(u)<=a.precision,p=0===a.tension||Math.abs(s-c)<=a.precision;o=n||d&&p,r.lastVelocity=u,r.lastTime=e}d&&!a.toValues[t].done&&(o=!1),o?(r.value!==s&&(c=s),r.done=!0):n=!0,r.setValue(c),r.lastPosition=c}else r.setValue(s),r.done=!0}t.props.onFrame&&(t.values[a.name]=a.interpolation.getValue())}t.props.onFrame&&t.props.onFrame(t.values),n||(Mu.delete(t),t.stop(!0))}return Mu.size?Ru(Du):Pu=!1,Pu};function Nu(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return Nu({range:e,output:t,extrapolate:n});if(Lu&&"string"==typeof e.output[0])return Lu(e);const r=e,o=r.output,i=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",l=r.extrapolateRight||r.extrapolate||"extend",s=r.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,i);return function(e,t,n,r,o,i,a,l,s){let c=s?s(e):e;if(c<t){if("identity"===a)return c;"clamp"===a&&(c=t)}if(c>n){if("identity"===l)return c;"clamp"===l&&(c=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t);c=i(c),r===-1/0?c=-c:o===1/0?c+=r:c=c*(o-r)+r;return c}(e,i[t],i[t+1],o[t],o[t+1],s,a,l,r.map)}}class Vu extends $u{constructor(e,t,n,r){super(),this.calc=void 0,this.payload=e instanceof $u&&!(e instanceof Vu)?e.getPayload():Array.isArray(e)?e:[e],this.calc=Nu(t,n,r)}getValue(){return this.calc(...this.payload.map((e=>e.getValue())))}updateConfig(e,t,n){this.calc=Nu(e,t,n)}interpolate(e,t,n){return new Vu(this,e,t,n)}}const Iu=(e,t,n)=>e&&new Vu(e,t,n);function ju(e,t){"update"in e?t.add(e):e.getChildren().forEach((e=>ju(e,t)))}class Au extends Cu{constructor(e){var t;super(),t=this,this.animatedStyles=new Set,this.value=void 0,this.startPosition=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.startTime=void 0,this.lastTime=void 0,this.done=!1,this.setValue=function(e,n){void 0===n&&(n=!0),t.value=e,n&&t.flush()},this.value=e,this.startPosition=e,this.lastPosition=e}flush(){0===this.animatedStyles.size&&ju(this,this.animatedStyles),this.animatedStyles.forEach((e=>e.update()))}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,t,n){return new Vu(this,e,t,n)}}class zu extends $u{constructor(e){super(),this.payload=e.map((e=>new Au(e)))}setValue(e,t){void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach(((e,n)=>this.payload[n].setValue(e,t))):this.payload.forEach((n=>n.setValue(e,t)))}getValue(){return this.payload.map((e=>e.getValue()))}interpolate(e,t){return new Vu(this,e,t)}}let Hu=0,Bu=class{constructor(){this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=()=>this.interpolations,this.id=Hu++}update(e){if(!e)return this;const t=wu(e),n=t.delay,r=void 0===n?0:n,o=t.to,i=vu(t,["delay","to"]);if(mu.arr(o)||mu.fun(o))this.queue.push(gu({},i,{delay:r,to:o}));else if(o){let e={};Object.entries(o).forEach((t=>{let n=t[0],o=t[1];const a=gu({to:{[n]:o},delay:yu(r,n)},i),l=e[a.delay]&&e[a.delay].to;e[a.delay]=gu({},e[a.delay],a,{to:gu({},l,a.to)})})),this.queue=Object.values(e)}return this.queue=this.queue.sort(((e,t)=>e.delay-t.delay)),this.diff(i),this}start(e){if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((e=>{let t=e.from,n=void 0===t?{}:t,r=e.to,o=void 0===r?{}:r;mu.obj(n)&&(this.merged=gu({},n,this.merged)),mu.obj(o)&&(this.merged=gu({},this.merged,o))}));const t=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach(((r,o)=>{let i=r.delay,a=vu(r,["delay"]);const l=r=>{o===n.length-1&&t===this.guid&&r&&(this.idle=!0,this.props.onRest&&this.props.onRest(this.merged)),e&&e()};let s=mu.arr(a.to)||mu.fun(a.to);i?setTimeout((()=>{t===this.guid&&(s?this.runAsync(a,l):this.diff(a).start(l))}),i):s?this.runAsync(a,l):this.diff(a).start(l)}))}else mu.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,Mu.has(t)||Mu.add(t),Pu||(Pu=!0,Ru(Du));var t;return this}stop(e){return this.listeners.forEach((t=>t(e))),this.listeners=[],this}pause(e){var t;return this.stop(!0),e&&(t=this,Mu.has(t)&&Mu.delete(t)),this}runAsync(e,t){var n=this;e.delay;let r=vu(e,["delay"]);const o=this.local;let i=Promise.resolve(void 0);if(mu.arr(r.to))for(let e=0;e<r.to.length;e++){const t=e,n=gu({},r,wu(r.to[t]));mu.arr(n.config)&&(n.config=n.config[t]),i=i.then((()=>{if(o===this.guid)return new Promise((e=>this.diff(n).start(e)))}))}else if(mu.fun(r.to)){let e,t=0;i=i.then((()=>r.to((n=>{const i=gu({},r,wu(n));if(mu.arr(i.config)&&(i.config=i.config[t]),t++,o===this.guid)return e=new Promise((e=>this.diff(i).start(e)))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((()=>e))))}i.then(t)}diff(e){this.props=gu({},this.props,e);let t=this.props,n=t.from,r=void 0===n?{}:n,o=t.to,i=void 0===o?{}:o,a=t.config,l=void 0===a?{}:a,s=t.reverse,c=t.attach,d=t.reset,u=t.immediate;if(s){var p=[i,r];r=p[0],i=p[1]}this.merged=gu({},r,this.merged,i),this.hasChanged=!1;let h=c&&c(this);if(this.animations=Object.entries(this.merged).reduce(((e,t)=>{let n=t[0],o=t[1],i=e[n]||{};const a=mu.num(o),s=mu.str(o)&&!o.startsWith("#")&&!/\d/.test(o)&&!Eu[o],c=mu.arr(o),p=!a&&!c&&!s;let f=mu.und(r[n])?o:r[n],g=a||c||s?o:1,v=yu(l,n);h&&(g=h.animations[n].parent);let m,x=i.parent,b=i.interpolation,y=bu(h?g.getPayload():g),w=o;p&&(w=Lu({range:[0,1],output:[o,o]})(1));let C=b&&b.getValue();const $=!mu.und(x)&&i.animatedValues.some((e=>!e.done)),k=!mu.equ(w,C),S=!mu.equ(w,i.previous),E=!mu.equ(v,i.config);if(d||S&&k||E){if(a||s)x=b=i.parent||new Au(f);else if(c)x=b=i.parent||new zu(f);else if(p){let e=i.interpolation&&i.interpolation.calc(i.parent.value);e=void 0===e||d?f:e,i.parent?(x=i.parent,x.setValue(0,!1)):x=new Au(0);const t={output:[e,o]};i.interpolation?(b=i.interpolation,i.interpolation.updateConfig(t)):b=x.interpolate(t)}return y=bu(h?g.getPayload():g),m=bu(x.getPayload()),d&&!p&&x.setValue(f,!1),this.hasChanged=!0,m.forEach((e=>{e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=$?e.lastVelocity:void 0,e.lastTime=$?e.lastTime:void 0,e.startTime=Tu(),e.done=!1,e.animatedStyles.clear()})),yu(u,n)&&x.setValue(p?g:o,!1),gu({},e,{[n]:gu({},i,{name:n,parent:x,interpolation:b,animatedValues:m,toValues:y,previous:w,config:v,fromValues:bu(x.getValue()),immediate:yu(u,n),initialVelocity:xu(v.velocity,0),clamp:xu(v.clamp,!1),precision:xu(v.precision,.01),tension:xu(v.tension,170),friction:xu(v.friction,26),mass:xu(v.mass,1),duration:v.duration,easing:xu(v.easing,(e=>e)),decay:v.decay})})}return k?e:(p&&(x.setValue(1,!1),b.updateConfig({output:[w,w]})),x.done=!0,this.hasChanged=!0,gu({},e,{[n]:gu({},e[n],{previous:w})}))}),this.animations),this.hasChanged){this.configs=Object.values(this.animations),this.values={},this.interpolations={};for(let e in this.animations)this.interpolations[e]=this.animations[e].interpolation,this.values[e]=this.animations[e].interpolation.getValue()}return this}destroy(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0}};const Fu=e=>{const t=mu.fun(e),n=((e,t)=>{const n=Q(!1),r=Q(),o=mu.fun(t),i=te((()=>{let n;return r.current&&(r.current.map((e=>e.destroy())),r.current=void 0),[new Array(e).fill().map(((e,r)=>{const i=new Bu,a=o?yu(t,r,i):t[r];return 0===r&&(n=a.ref),i.update(a),n||i.start(),i})),n]}),[e]),a=i[0],l=i[1];r.current=a,le(l,(()=>({start:()=>Promise.all(r.current.map((e=>new Promise((t=>e.start(t)))))),stop:e=>r.current.forEach((t=>t.stop(e))),get controllers(){return r.current}})));const s=te((()=>e=>r.current.map(((t,n)=>{t.update(o?yu(e,n,t):e[n]),l||t.start()}))),[e]);ee((()=>{n.current?o||s(t):l||r.current.forEach((e=>e.start()))})),ee((()=>(n.current=!0,()=>r.current.forEach((e=>e.destroy())))),[]);const c=r.current.map((e=>e.getValues()));return o?[c,s,e=>r.current.forEach((t=>t.pause(e)))]:c})(1,t?e:[e]),r=n[0],o=n[1],i=n[2];return t?[r[0],o,i]:r};class Zu extends ku{constructor(e){void 0===e&&(e={}),super(),!e.transform||e.transform instanceof Cu||(e=Su.transform(e)),this.payload=e}}const Wu={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},qu="[-+]?\\d*\\.?\\d+",Gu=qu+"%";function Uu(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}const Xu=new RegExp("rgb"+Uu(qu,qu,qu)),Yu=new RegExp("rgba"+Uu(qu,qu,qu,qu)),Ku=new RegExp("hsl"+Uu(qu,Gu,Gu)),Ju=new RegExp("hsla"+Uu(qu,Gu,Gu,qu)),Qu=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ep=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,tp=/^#([0-9a-fA-F]{6})$/,np=/^#([0-9a-fA-F]{8})$/;function rp(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function op(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=rp(o,r,e+1/3),a=rp(o,r,e),l=rp(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*a)<<16|Math.round(255*l)<<8}function ip(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function ap(e){return(parseFloat(e)%360+360)%360/360}function lp(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function sp(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function cp(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=tp.exec(e))?parseInt(t[1]+"ff",16)>>>0:Wu.hasOwnProperty(e)?Wu[e]:(t=Xu.exec(e))?(ip(t[1])<<24|ip(t[2])<<16|ip(t[3])<<8|255)>>>0:(t=Yu.exec(e))?(ip(t[1])<<24|ip(t[2])<<16|ip(t[3])<<8|lp(t[4]))>>>0:(t=Qu.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=np.exec(e))?parseInt(t[1],16)>>>0:(t=ep.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Ku.exec(e))?(255|op(ap(t[1]),sp(t[2]),sp(t[3])))>>>0:(t=Ju.exec(e))?(op(ap(t[1]),sp(t[2]),sp(t[3]))|lp(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}const dp=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,up=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,pp=new RegExp(`(${Object.keys(Wu).join("|")})`,"g");let hp={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const fp=["Webkit","Ms","Moz","O"];function gp(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||hp.hasOwnProperty(e)&&hp[e]?(""+t).trim():t+"px"}hp=Object.keys(hp).reduce(((e,t)=>(fp.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),hp);const vp={};var mp;Ou=e=>new Zu(e),mp=e=>{const t=e.output.map((e=>e.replace(up,cp))).map((e=>e.replace(pp,cp))),n=t[0].match(dp).map((()=>[]));t.forEach((e=>{e.match(dp).forEach(((e,t)=>n[t].push(+e)))}));const r=t[0].match(dp).map(((t,r)=>Nu(gu({},e,{output:n[r]}))));return e=>{let n=0;return t[0].replace(dp,(()=>r[n++](e))).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,((e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`))}},Lu=mp,Eu=Wu,function(e,t){Su={fn:e,transform:t}}(((e,t)=>{if(!e.nodeType||void 0===e.setAttribute)return!1;{const o=t.style,i=t.children,a=t.scrollTop,l=t.scrollLeft,s=vu(t,["style","children","scrollTop","scrollLeft"]),c="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;void 0!==a&&(e.scrollTop=a),void 0!==l&&(e.scrollLeft=l),void 0!==i&&(e.textContent=i);for(let t in o)if(o.hasOwnProperty(t)){var n=0===t.indexOf("--"),r=gp(t,o[t],n);"float"===t&&(t="cssFloat"),n?e.style.setProperty(t,r):e.style[t]=r}for(let t in s){const n=c?t:vp[t]||(vp[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())));void 0!==e.getAttribute(n)&&e.setAttribute(n,s[t])}}}),(e=>e));var xp;const bp=(xp=e=>K(((t,n)=>{const r=function(){const e=J(!1)[1];return ie((()=>e((e=>!e))),[])}(),o=Q(!0),i=Q(null),a=Q(null),l=ie((e=>{const t=i.current;i.current=new _u(e,(()=>{let e=!1;a.current&&(e=Su.fn(a.current,i.current.getAnimatedValue())),a.current&&!1!==e||r()})),t&&t.detach()}),[]);ee((()=>()=>{o.current=!1,i.current&&i.current.detach()}),[]),le(n,(()=>(e=>e.current)(a))),l(t);const s=i.current.getValue();s.scrollTop,s.scrollLeft;const c=vu(s,["scrollTop","scrollLeft"]),d=(u=e,!mu.fun(u)||u.prototype instanceof Y.Component?e=>a.current=function(e,t){return t&&(mu.fun(t)?t(e):mu.obj(t)&&(t.current=e)),e}(e,n):void 0);var u;return Y.createElement(e,gu({},c,{ref:d}))})),e=>(mu.arr(e)?e:Object.keys(e)).reduce(((e,t)=>{const n=t;return e[n]=xp(n),e}),xp))(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);function yp(e,t){return e.map((function(e,n){return e+t[n]}))}function wp(e,t){return e.map((function(e,n){return e-t[n]}))}function Cp(e){return Math.hypot.apply(Math,e)}function $p(e){return Math.sign?Math.sign(e):Number(e>0)-Number(e<0)||+e}function kp(e,t,n){return 0===t||Math.abs(t)===1/0?function(e,t){return Math.pow(e,5*t)}(e,n):e*t*n/(t+n*e)}function Sp(e,t,n,r){return void 0===r&&(r=.15),0===r?function(e,t,n){return Math.max(t,Math.min(e,n))}(e,t,n):e<t?-kp(t-e,n-t,r)+t:e>n?+kp(e-n,n-t,r)+n:e}function Ep(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}function Lp(){return Lp=Object.assign||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},Lp.apply(this,arguments)}function Rp(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Op(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Tp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _p(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Tp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tp(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function Pp(){}function Mp(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?Pp:1===t.length?t[0]:function(){for(var e,n,r=_p(t);!(n=r()).done;){e=n.value.apply(this,arguments)||e}return e}}function Dp(e,t){if(void 0===e){if(void 0===t)throw new Error("Must define fallback value if undefined is expected");e=t}return Array.isArray(e)?e:[e,e]}function Np(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}return e}function Vp(e,t){void 0===e&&(e={});for(var n={},r=0,o=Object.entries(t);r<o.length;r++){var i=o[r],a=i[0],l=i[1];switch(typeof l){case"function":n[a]=l.call(n,e[a],a,e);break;case"object":n[a]=Vp(e[a],l);break;case"boolean":l&&(n[a]=e[a])}}return n}var Ip=Lp({},{threshold:function(e){return void 0===e&&(e=0),Dp(e)},rubberband:function(e){switch(void 0===e&&(e=0),e){case!0:return Dp(.15);case!1:return Dp(0);default:return Dp(e)}},enabled:function(e){return void 0===e&&(e=!0),e},triggerAllEvents:function(e){return void 0===e&&(e=!1),e},initial:function(e){return void 0===e&&(e=0),"function"==typeof e?e:Dp(e)}},{axis:!0,lockDirection:function(e){return void 0===e&&(e=!1),e},bounds:function(e){if(void 0===e&&(e={}),"function"==typeof e)return function(t){return Ip.bounds(e(t))};var t=e,n=t.left,r=void 0===n?-1/0:n,o=t.right,i=void 0===o?1/0:o,a=t.top,l=void 0===a?-1/0:a,s=t.bottom;return[[r,i],[l,void 0===s?1/0:s]]}}),jp="undefined"!=typeof window&&window.document&&window.document.createElement,Ap={enabled:function(e){return void 0===e&&(e=!0),e},domTarget:!0,window:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return void 0===e&&(e=jp?window:void 0),e})),eventOptions:function(e){var t=void 0===e?{}:e,n=t.passive,r=void 0===n||n,o=t.capture;return{passive:r,capture:void 0!==o&&o}}},zp=Lp({},Ip,{threshold:function(e,t,n){var r=n.filterTaps,o=void 0!==r&&r,i=n.lockDirection,a=void 0!==i&&i,l=n.axis,s=Dp(e,o?3:a||(void 0===l?void 0:l)?1:0);return this.filterTaps=o||s[0]+s[1]>0,s},swipeVelocity:function(e){return void 0===e&&(e=.5),Dp(e)},swipeDistance:function(e){return void 0===e&&(e=60),Dp(e)},delay:function(e){switch(void 0===e&&(e=0),e){case!0:return 180;case!1:return 0;default:return e}}});function Hp(e){var t=e.domTarget,n=e.eventOptions,r=e.window,o=e.enabled,i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["domTarget","eventOptions","window","enabled"]),a=function(e){return void 0===e&&(e={}),Vp(e,Ap)}({domTarget:t,eventOptions:n,window:r,enabled:o});return a.drag=function(e){return void 0===e&&(e={}),Vp(e,zp)}(i),a}function Bp(e){return Lp({_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_lastEventType:void 0,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:Pp,canceled:!1,memo:void 0,args:void 0},e)}function Fp(){return{shared:{hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1},drag:Bp({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,_isTap:!0,_delayedEvent:!1,_pointerId:void 0,tap:!1,swipe:[0,0]}),pinch:Bp({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),wheel:Bp({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),move:Bp({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),scroll:Bp({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0})}}var Zp=new Map,Wp=function(){function e(e,t){var n=this;void 0===t&&(t=[]),this.controller=e,this.args=t,this.debounced=!0,this.setTimeout=function(e,t){var r;void 0===t&&(t=140),clearTimeout(n.controller.timeouts[n.stateKey]);for(var o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];n.controller.timeouts[n.stateKey]=(r=window).setTimeout.apply(r,[e,t].concat(i))},this.clearTimeout=function(){clearTimeout(n.controller.timeouts[n.stateKey])},this.fireGestureHandler=function(e){if(void 0===e&&(e=!1),n.state._blocked)return n.debounced||(n.state._active=!1,n.clean()),null;if(!e&&!n.state.intentional&&!n.config.triggerAllEvents)return null;if(n.state.intentional){var t=n.state.active,r=n.state._active;n.state.active=r,n.state.first=r&&!t,n.state.last=t&&!r,n.controller.state.shared[n.ingKey]=r}var o=Lp({},n.controller.state.shared,n.state,n.mapStateValues(n.state)),i=n.handler(o);return n.state.memo=void 0!==i?i:n.state.memo,n.state._active||n.clean(),o}}var t=e.prototype;return t.updateSharedState=function(e){Object.assign(this.controller.state.shared,e)},t.updateGestureState=function(e){Object.assign(this.state,e)},t.checkIntentionality=function(e,t){return{_intentional:e,_blocked:!1}},t.getMovement=function(e){var t=this.config,n=t.initial,r=t.bounds,o=t.rubberband,i=t.threshold,a=this.state,l=a._bounds,s=a._initial,c=a._active,d=a._intentional,u=a.lastOffset,p=a.movement,h=this.getInternalMovement(e,this.state),f=!1===d[0]?qp(h[0],i[0]):d[0],g=!1===d[1]?qp(h[1],i[1]):d[1],v=this.checkIntentionality([f,g],h);if(v._blocked)return Lp({},v,{_movement:h,delta:[0,0]});var m,x,b,y,w=v._intentional,C=h;(!1!==w[0]&&!1===d[0]&&(x=Np(n,this.state),m=Np(r,this.state),s[0]=x[0],l[0]=m[0]),!1!==w[1]&&!1===d[1])&&(x=null!=(b=x)?b:Np(n,this.state),m=null!=(y=m)?y:Np(r,this.state),s[1]=x[1],l[1]=m[1]);var $=[!1!==w[0]?h[0]-w[0]:s[0],!1!==w[1]?h[1]-w[1]:s[1]],k=yp($,u),S=c?o:[0,0];return $=Gp(l,yp($,s),S),Lp({},v,{intentional:!1!==w[0]||!1!==w[1],_initial:s,_movement:C,movement:$,values:e,offset:Gp(l,k,S),delta:wp($,p)})},t.clean=function(){this.clearTimeout()},Ep(e,[{key:"config",get:function(){return this.controller.config[this.stateKey]}},{key:"enabled",get:function(){return this.controller.config.enabled&&this.config.enabled}},{key:"state",get:function(){return this.controller.state[this.stateKey]}},{key:"handler",get:function(){return this.controller.handlers[this.stateKey]}}]),e}();function qp(e,t){return Math.abs(e)>=t&&$p(e)*t}function Gp(e,t,n){var r=t[0],o=t[1],i=n[0],a=n[1],l=e[0],s=l[0],c=l[1],d=e[1],u=d[0],p=d[1];return[Sp(r,s,c,i),Sp(o,u,p,a)]}function Up(e,t,n){var r=e.state,o=e.args,i=t.timeStamp,a=t.type,l=r.values;return{_lastEventType:a,event:t,timeStamp:i,elapsedTime:n?0:i-r.startTime,args:o,previous:l}}function Xp(e,t){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return e.call.apply(e,[this,Lp({},t,{event:n})].concat(o))}}var Yp=function(e){var t=this;this.classes=e,this.bind=function(){for(var e={},n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];for(var i,a=_p(t.classes);!(i=a()).done;){new(0,i.value)(t,r).addBindings(e)}for(var l=0,s=Object.entries(t.nativeRefs);l<s.length;l++){var c=s[l];Qp(e,c[0],Xp(c[1],Lp({},t.state.shared,{args:r})))}return t.config.domTarget?function(e,t){var n=e.config,r=e.domListeners,o=Jp(n);if(!o)throw new Error("domTarget must be defined");var i=n.eventOptions;th(o,Kp(r),i);for(var a=0,l=Object.entries(t);a<l.length;a++){var s=l[a],c=s[0],d=s[1],u=c.slice(2).toLowerCase();r.push([u,Mp.apply(void 0,d)])}eh(o,r,i)}(t,e):function(e,t){for(var n=e.config,r={},o=n.eventOptions.capture?"Capture":"",i=0,a=Object.entries(t);i<a.length;i++){var l=a[i],s=l[0],c=l[1],d=Array.isArray(c)?c:[c];r[s+o]=Mp.apply(void 0,d)}return r}(t,e)},this.effect=function(){return t.config.domTarget&&t.bind(),t.clean},this.clean=function(){var e=Jp(t.config),n=t.config.eventOptions;e&&th(e,Kp(t.domListeners),n),Object.values(t.timeouts).forEach(clearTimeout),function(e){var t=e.config,n=t.window,r=t.eventOptions,o=e.windowListeners;if(!n)return;for(var i in o){th(n,o[i],r)}e.windowListeners={}}(t)},this.state=Fp(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function Kp(e){return void 0===e&&(e=[]),e.splice(0,e.length)}function Jp(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function Qp(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function eh(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=_p(t);!(r=o()).done;){var i=r.value,a=i[0],l=i[1];e.addEventListener(a,l,n)}}function th(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=_p(t);!(r=o()).done;){var i=r.value,a=i[0],l=i[1];e.removeEventListener(a,l,n)}}function nh(e,t,n){void 0===n&&(n={});var r=function(e){var t=new Set;e.drag&&t.add(Zp.get("drag"));e.wheel&&t.add(Zp.get("wheel"));e.scroll&&t.add(Zp.get("scroll"));e.move&&t.add(Zp.get("move"));e.pinch&&t.add(Zp.get("pinch"));e.hover&&t.add(Zp.get("hover"));return t}(e),o=Y.useMemo((function(){return new Yp(r)}),[]);return o.config=t,o.handlers=e,o.nativeRefs=n,Y.useEffect(o.effect,[]),o.config.domTarget?rh:o.bind}function rh(){"development"===process.env.NODE_ENV&&console.warn("Deprecation notice: When the `domTarget` option is specified, you don't need to write `useEffect(bind, [bind])` anymore: event binding is now made handled internally to this lib.\n\nNext version won't return anything when `domTarget` is provided, therefore your code will break if you try to call `useEffect`.")}function oh(e){if("touches"in e){var t=e.targetTouches,n=e.changedTouches;return t.length>0?t:n}return null}function ih(e){var t="buttons"in e?e.buttons:0,n=oh(e),r=n&&n.length||0;return{touches:r,down:r>0||t>0,buttons:t,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey}}function ah(e){var t=oh(e),n=t?t[0]:e;return[n.clientX,n.clientY]}var lh=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).ingKey="dragging",t.stateKey="drag",t.onDragStart=function(e){t.enabled&&!t.state._active&&(!function(e,t,n){var r=e.config,o=e.windowListeners;void 0===n&&(n=[]),r.window&&(th(r.window,o[t],r.eventOptions),eh(r.window,o[t]=n,r.eventOptions))}(t.controller,t.stateKey,[["pointermove",t.onDragChange],["pointerup",t.onDragEnd],["pointercancel",t.onDragEnd]]),t.updateGestureState({_pointerId:e.pointerId}),t.config.delay>0?(t.state._delayedEvent=!0,"persist"in e&&"function"==typeof e.persist&&e.persist(),t.setTimeout(t.startDrag.bind(Op(t)),t.config.delay,e)):t.startDrag(e))},t.onDragChange=function(e){if(!t.state.canceled&&e.pointerId===t.state._pointerId)if(t.state._active){var n=ih(e);if(n.down){t.updateSharedState(n);var r=ah(e),o=t.getKinematics(r,e),i=Up(Op(t),e),a=t.state._isTap,l=Cp(o._movement);a&&l>=3&&(a=!1),t.updateGestureState(Lp({},i,o,{_isTap:a})),t.fireGestureHandler()}else t.onDragEnd(e)}else t.state._delayedEvent&&(t.clearTimeout(),t.startDrag(e))},t.onDragEnd=function(e){if(e.pointerId===t.state._pointerId){t.state._active=!1,t.updateSharedState({down:!1,buttons:0,touches:0});var n=t.state._isTap,r=t.state.velocities,o=r[0],i=r[1],a=t.state.movement,l=a[0],s=a[1],c=t.state._intentional,d=c[0],u=c[1],p=t.config.swipeVelocity,h=p[0],f=p[1],g=t.config.swipeDistance,v=g[0],m=g[1],x=Lp({},Up(Op(t),e),t.getMovement(t.state.values)),b=[0,0];x.elapsedTime<220&&(!1!==d&&Math.abs(o)>h&&Math.abs(l)>v&&(b[0]=$p(o)),!1!==u&&Math.abs(i)>f&&Math.abs(s)>m&&(b[1]=$p(i))),t.updateGestureState(Lp({},x,{tap:n,swipe:b})),t.fireGestureHandler(!0===n)}},t.clean=function(){e.prototype.clean.call(Op(t)),t.state._delayedEvent=!1,function(e,t){var n=e.config,r=e.windowListeners;n.window&&(th(n.window,r[t],n.eventOptions),delete r[t])}(t.controller,t.stateKey)},t.onCancel=function(){t.state.canceled||(t.updateGestureState({canceled:!0}),t.state._active=!1,t.updateSharedState({down:!1,buttons:0,touches:0}),requestAnimationFrame((function(){return t.fireGestureHandler()})))},t.onClick=function(e){t.state._isTap||e.stopPropagation()},t}Rp(t,e);var n=t.prototype;return n.startDrag=function(e){var t=ah(e);this.updateSharedState(ih(e)),this.updateGestureState(Lp({},function(e,t,n){var r=e.state.offset,o=n.timeStamp;return Lp({},Fp()[e.stateKey],{_active:!0,values:t,initial:t,offset:r,lastOffset:r,startTime:o})}(this,t,e),Up(this,e,!0),{_pointerId:e.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(t)),this.fireGestureHandler()},n.addBindings=function(e){(Qp(e,"onPointerDown",this.onDragStart),this.config.filterTaps)&&Qp(e,this.controller.config.eventOptions.capture?"onClick":"onClickCapture",this.onClick)},t}(function(e){function t(){return e.apply(this,arguments)||this}Rp(t,e);var n=t.prototype;return n.getInternalMovement=function(e,t){return wp(e,t.initial)},n.checkIntentionality=function(e,t){if(!1===e[0]&&!1===e[1])return{_intentional:e,axis:this.state.axis};var n=t.map(Math.abs),r=n[0],o=n[1],i=this.state.axis||(r>o?"x":r<o?"y":void 0);return this.config.axis||this.config.lockDirection?i?this.config.axis&&i!==this.config.axis?{_intentional:e,_blocked:!0,axis:i}:(e["x"===i?1:0]=!1,{_intentional:e,_blocked:!1,axis:i}):{_intentional:[!1,!1],_blocked:!1,axis:i}:{_intentional:e,_blocked:!1,axis:i}},n.getKinematics=function(e,t){var n=this.getMovement(e);if(!n._blocked){var r=t.timeStamp-this.state.timeStamp;Object.assign(n,function(e,t,n){var r=Cp(t),o=0===r?0:1/r,i=0===n?0:1/n,a=i*r,l=t.map((function(e){return i*e})),s=t.map((function(e){return o*e}));return{velocities:l,velocity:a,distance:Cp(e),direction:s}}(n.movement,n.delta,r))}return n},n.mapStateValues=function(e){return{xy:e.values,vxvy:e.velocities}},t}(Wp));function sh(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var n,r,o,i;if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!sh(e[r],t[r]))return!1;return!0}if("function"==typeof Map&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!sh(r.value[1],t.get(r.value[0])))return!1;return!0}if("function"==typeof Set&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;if("undefined"!=typeof Element&&e instanceof Element)return!1;for(r=n;0!=r--;)if(!("_owner"===o[r]&&e.$$typeof||sh(e[o[r]],t[o[r]])))return!1;return!0}return e!=e&&t!=t}function ch(e,t){try{return sh(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}function dh(e,t){void 0===t&&(t={}),Zp.set("drag",lh);var n=Q();return n.current||(n.current=function(e,t){var n,r,o=[],i=!1;return function(){for(var a=arguments.length,l=new Array(a),s=0;s<a;s++)l[s]=arguments[s];return i&&n===this&&t(l,o)||(r=e.apply(this,l),i=!0,n=this,o=l),r}}(Hp,ch)),nh({drag:e},n.current(t))}
|
|
2503
2503
|
/*!
|
|
2504
2504
|
* tabbable 5.3.3
|
|
2505
2505
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
@@ -2508,7 +2508,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
2508
2508
|
* focus-trap 6.9.4
|
|
2509
2509
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
2510
2510
|
*/
|
|
2511
|
-
function _h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ph(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_h(Object(n),!0).forEach((function(t){Mh(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Mh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Dh,Nh=(Dh=[],{activateTrap:function(e){if(Dh.length>0){var t=Dh[Dh.length-1];t!==e&&t.pause()}var n=Dh.indexOf(e);-1===n||Dh.splice(n,1),Dh.push(e)},deactivateTrap:function(e){var t=Dh.indexOf(e);-1!==t&&Dh.splice(t,1),Dh.length>0&&Dh[Dh.length-1].unpause()}}),Vh=function(e){return setTimeout(e,0)},Ih=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},jh=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"==typeof e?e.apply(void 0,n):e},Ah=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},zh=function(e,t){var n,r=(null==t?void 0:t.document)||document,o=Ph({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},t),i={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},a=function(e,t,n){return e&&void 0!==e[t]?e[t]:o[n||t]},l=function(e){return i.containerGroups.findIndex((function(t){var n=t.container,r=t.tabbableNodes;return n.contains(e)||r.find((function(t){return t===e}))}))},s=function(e){var t=o[e];if("function"==typeof t){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];t=t.apply(void 0,i)}if(!0===t&&(t=void 0),!t){if(void 0===t||!1===t)return t;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var l=t;if("string"==typeof t&&!(l=r.querySelector(t)))throw new Error("`".concat(e,"` as selector refers to no known node"));return l},c=function(){var e=s("initialFocus");if(!1===e)return!1;if(void 0===e)if(l(r.activeElement)>=0)e=r.activeElement;else{var t=i.tabbableGroups[0];e=t&&t.firstTabbableNode||s("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},d=function(){if(i.containerGroups=i.containers.map((function(e){var t,n,r=Lh(e,o.tabbableOptions),i=(t=e,(n=(n=o.tabbableOptions)||{}).getShadowRoot?mh([t],n.includeContainer,{filter:$h.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):vh(t,n.includeContainer,$h.bind(null,n)));return{container:e,tabbableNodes:r,focusableNodes:i,firstTabbableNode:r.length>0?r[0]:null,lastTabbableNode:r.length>0?r[r.length-1]:null,nextTabbableNode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=i.findIndex((function(t){return t===e}));if(!(n<0))return t?i.slice(n+1).find((function(e){return Rh(e,o.tabbableOptions)})):i.slice(0,n).reverse().find((function(e){return Rh(e,o.tabbableOptions)}))}}})),i.tabbableGroups=i.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),i.tabbableGroups.length<=0&&!s("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},u=function e(t){!1!==t&&t!==r.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!o.preventScroll}),i.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(c()))},p=function(e){var t=s("setReturnFocus",e);return t||!1!==t&&e},h=function(e){var t=Ah(e);l(t)>=0||(jh(o.clickOutsideDeactivates,e)?n.deactivate({returnFocus:o.returnFocusOnDeactivate&&!Th(t,o.tabbableOptions)}):jh(o.allowOutsideClick,e)||e.preventDefault())},f=function(e){var t=Ah(e),n=l(t)>=0;n||t instanceof Document?n&&(i.mostRecentlyFocusedNode=t):(e.stopImmediatePropagation(),u(i.mostRecentlyFocusedNode||c()))},g=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==jh(o.escapeDeactivates,e))return e.preventDefault(),void n.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){var t=Ah(e);d();var n=null;if(i.tabbableGroups.length>0){var r=l(t),a=r>=0?i.containerGroups[r]:void 0;if(r<0)n=e.shiftKey?i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:i.tabbableGroups[0].firstTabbableNode;else if(e.shiftKey){var c=Ih(i.tabbableGroups,(function(e){var n=e.firstTabbableNode;return t===n}));if(c<0&&(a.container===t||Th(t,o.tabbableOptions)&&!Rh(t,o.tabbableOptions)&&!a.nextTabbableNode(t,!1))&&(c=r),c>=0){var p=0===c?i.tabbableGroups.length-1:c-1;n=i.tabbableGroups[p].lastTabbableNode}}else{var h=Ih(i.tabbableGroups,(function(e){var n=e.lastTabbableNode;return t===n}));if(h<0&&(a.container===t||Th(t,o.tabbableOptions)&&!Rh(t,o.tabbableOptions)&&!a.nextTabbableNode(t))&&(h=r),h>=0){var f=h===i.tabbableGroups.length-1?0:h+1;n=i.tabbableGroups[f].firstTabbableNode}}}else n=s("fallbackFocus");n&&(e.preventDefault(),u(n))}(e)},v=function(e){var t=Ah(e);l(t)>=0||jh(o.clickOutsideDeactivates,e)||jh(o.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},m=function(){if(i.active)return Nh.activateTrap(n),i.delayInitialFocusTimer=o.delayInitialFocus?Vh((function(){u(c())})):u(c()),r.addEventListener("focusin",f,!0),r.addEventListener("mousedown",h,{capture:!0,passive:!1}),r.addEventListener("touchstart",h,{capture:!0,passive:!1}),r.addEventListener("click",v,{capture:!0,passive:!1}),r.addEventListener("keydown",g,{capture:!0,passive:!1}),n},x=function(){if(i.active)return r.removeEventListener("focusin",f,!0),r.removeEventListener("mousedown",h,!0),r.removeEventListener("touchstart",h,!0),r.removeEventListener("click",v,!0),r.removeEventListener("keydown",g,!0),n};return(n={get active(){return i.active},get paused(){return i.paused},activate:function(e){if(i.active)return this;var t=a(e,"onActivate"),n=a(e,"onPostActivate"),o=a(e,"checkCanFocusTrap");o||d(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=r.activeElement,t&&t();var l=function(){o&&d(),m(),n&&n()};return o?(o(i.containers.concat()).then(l,l),this):(l(),this)},deactivate:function(e){if(!i.active)return this;var t=Ph({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},e);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,x(),i.active=!1,i.paused=!1,Nh.deactivateTrap(n);var r=a(t,"onDeactivate"),l=a(t,"onPostDeactivate"),s=a(t,"checkCanReturnFocus"),c=a(t,"returnFocus","returnFocusOnDeactivate");r&&r();var d=function(){Vh((function(){c&&u(p(i.nodeFocusedBeforeActivation)),l&&l()}))};return c&&s?(s(p(i.nodeFocusedBeforeActivation)).then(d,d),this):(d(),this)},pause:function(){return i.paused||!i.active||(i.paused=!0,x()),this},unpause:function(){return i.paused&&i.active?(i.paused=!1,d(),m(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return i.containers=t.map((function(e){return"string"==typeof e?r.querySelector(e):e})),i.active&&d(),this}}).updateContainerElements(e),n};var Hh=!1;if("undefined"!=typeof window){var Bh={get passive(){Hh=!0}};window.addEventListener("testPassive",null,Bh),window.removeEventListener("testPassive",null,Bh)}var Fh,Zh="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),Wh=[],qh=!1,Gh=-1,Uh=void 0,Xh=void 0,Yh=function(e){return Wh.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},Kh=function(e){var t=e||window.event;return!!Yh(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},Jh=function(e,t){if(e){if(!Wh.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};Wh=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(Wh),[n]),Zh?(e.ontouchstart=function(e){1===e.targetTouches.length&&(Gh=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&function(e,t){var n=e.targetTouches[0].clientY-Gh;!Yh(e.target)&&(t&&0===t.scrollTop&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?Kh(e):e.stopPropagation())}(t,e)},qh||(document.addEventListener("touchmove",Kh,Hh?{passive:!1}:void 0),qh=!0)):function(e){if(void 0===Xh){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;t&&n>0&&(Xh=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===Uh&&(Uh=document.body.style.overflow,document.body.style.overflow="hidden")}(t)}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")},Qh=function(e){e?(Wh=Wh.filter((function(t){return t.targetElement!==e})),Zh?(e.ontouchstart=null,e.ontouchmove=null,qh&&0===Wh.length&&(document.removeEventListener("touchmove",Kh,Hh?{passive:!1}:void 0),qh=!1)):Wh.length||(void 0!==Xh&&(document.body.style.paddingRight=Xh,Xh=void 0),void 0!==Uh&&(document.body.style.overflow=Uh,Uh=void 0))):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")},ef=[],tf="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(Fh||(Fh={}));var nf,rf=function(e){return Object.freeze(e)},of=function(e,t){this.inlineSize=e,this.blockSize=t,rf(this)},af=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,rf(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),lf=function(e){return e instanceof SVGElement&&"getBBox"in e},sf=function(e){if(lf(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||e.getClientRects().length)},cf=function(e){var t;if(e instanceof Element)return!0;var n=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},df="undefined"!=typeof window?window:{},uf=new WeakMap,pf=/auto|scroll/,hf=/^tb|vertical/,ff=/msie|trident/i.test(df.navigator&&df.navigator.userAgent),gf=function(e){return parseFloat(e||"0")},vf=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new of((n?t:e)||0,(n?e:t)||0)},mf=rf({devicePixelContentBoxSize:vf(),borderBoxSize:vf(),contentBoxSize:vf(),contentRect:new af(0,0,0,0)}),xf=function(e,t){if(void 0===t&&(t=!1),uf.has(e)&&!t)return uf.get(e);if(sf(e))return uf.set(e,mf),mf;var n=getComputedStyle(e),r=lf(e)&&e.ownerSVGElement&&e.getBBox(),o=!ff&&"border-box"===n.boxSizing,i=hf.test(n.writingMode||""),a=!r&&pf.test(n.overflowY||""),l=!r&&pf.test(n.overflowX||""),s=r?0:gf(n.paddingTop),c=r?0:gf(n.paddingRight),d=r?0:gf(n.paddingBottom),u=r?0:gf(n.paddingLeft),p=r?0:gf(n.borderTopWidth),h=r?0:gf(n.borderRightWidth),f=r?0:gf(n.borderBottomWidth),g=u+c,v=s+d,m=(r?0:gf(n.borderLeftWidth))+h,x=p+f,b=l?e.offsetHeight-x-e.clientHeight:0,y=a?e.offsetWidth-m-e.clientWidth:0,w=o?g+m:0,C=o?v+x:0,$=r?r.width:gf(n.width)-w-y,k=r?r.height:gf(n.height)-C-b,S=$+g+y+m,E=k+v+b+x,L=rf({devicePixelContentBoxSize:vf(Math.round($*devicePixelRatio),Math.round(k*devicePixelRatio),i),borderBoxSize:vf(S,E,i),contentBoxSize:vf($,k,i),contentRect:new af(u,s,$,k)});return uf.set(e,L),L},bf=function(e,t,n){var r=xf(e,n),o=r.borderBoxSize,i=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case Fh.DEVICE_PIXEL_CONTENT_BOX:return a;case Fh.BORDER_BOX:return o;default:return i}},yf=function(e){var t=xf(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=rf([t.borderBoxSize]),this.contentBoxSize=rf([t.contentBoxSize]),this.devicePixelContentBoxSize=rf([t.devicePixelContentBoxSize])},wf=function(e){if(sf(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},Cf=function(){var e=1/0,t=[];ef.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new yf(t.target),o=wf(t.target);r.push(n),t.lastReportedSize=bf(t.target,t.observedBox),o<e&&(e=o)})),t.push((function(){n.callback.call(n.observer,r,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,r=t;n<r.length;n++){(0,r[n])()}return e},$f=function(e){ef.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(wf(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},kf=function(){var e=0;for($f(e);ef.some((function(e){return e.activeTargets.length>0}));)e=Cf(),$f(e);return ef.some((function(e){return e.skippedTargets.length>0}))&&function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:tf}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=tf),window.dispatchEvent(e)}(),e>0},Sf=[],Ef=function(e){if(!nf){var t=0,n=document.createTextNode("");new MutationObserver((function(){return Sf.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),nf=function(){n.textContent="".concat(t?t--:t++)}}Sf.push(e),nf()},Lf=0,Rf={attributes:!0,characterData:!0,childList:!0,subtree:!0},Of=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Tf=function(e){return void 0===e&&(e=0),Date.now()+e},_f=!1,Pf=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!_f){_f=!0;var n,r=Tf(e);n=function(){var n=!1;try{n=kf()}finally{if(_f=!1,e=r-Tf(),!Lf)return;n?t.run(1e3):e>0?t.run(e):t.start()}},Ef((function(){requestAnimationFrame(n)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,Rf)};document.body?t():df.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Of.forEach((function(t){return df.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Of.forEach((function(t){return df.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),Mf=function(e){!Lf&&e>0&&Pf.start(),!(Lf+=e)&&Pf.stop()},Df=function(){function e(e,t){this.target=e,this.observedBox=t||Fh.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=bf(this.target,this.observedBox,!0);return function(e){return!lf(e)&&!function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)&&"inline"===getComputedStyle(e).display}(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),Nf=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},Vf=new WeakMap,If=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},jf=function(){function e(){}return e.connect=function(e,t){var n=new Nf(e,t);Vf.set(e,n)},e.observe=function(e,t,n){var r=Vf.get(e),o=0===r.observationTargets.length;If(r.observationTargets,t)<0&&(o&&ef.push(r),r.observationTargets.push(new Df(t,n&&n.box)),Mf(1),Pf.schedule())},e.unobserve=function(e,t){var n=Vf.get(e),r=If(n.observationTargets,t),o=1===n.observationTargets.length;r>=0&&(o&&ef.splice(ef.indexOf(n),1),n.observationTargets.splice(r,1),Mf(-1))},e.disconnect=function(e){var t=this,n=Vf.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),Af=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");jf.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!cf(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");jf.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!cf(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");jf.unobserve(this,e)},e.prototype.disconnect=function(){jf.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function zf(){return zf=Object.assign||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},zf.apply(this,arguments)}function Hf(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}var Bf="undefined"!=typeof window?ne:ee;function Ff(e,t,n){return t=(t=+t)==t?t:0,n=(n=+n)==n?n:0,(e=+e)==e&&(e=(e=e<=n?e:n)>=t?e:t),e}function Zf(e){var t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}var Wf={box:"border-box"};function qf(e,t){var n=t.label,r=t.enabled,o=t.resizeSourceRef,i=J(0),a=i[0],l=i[1];se(n+": "+a);var s=ie((function(e){l(e[0].borderBoxSize[0].blockSize),o.current="element"}),[o]);return Bf((function(){if(e.current&&r){var t=new Af(s);return t.observe(e.current,Wf),function(){t.disconnect()}}}),[e,s,r]),r?a:0}function Gf(e){return void 0===e&&(e=1e3),new Promise((function(t){return setTimeout(t,e)}))}var Uf={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},Xf={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},Yf=function(e,t,n){return void 0===n&&(n=e.context),new Qd(e,t,n)}({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:zf({},Uf,Xf)}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:zf({},Uf,Xf)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:zf({},{CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}}),onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[tu({y:function(e,t){return t.payload.y},velocity:function(e,t){return t.payload.velocity},snapSource:function(e,t){var n=t.payload.source;return void 0===n?"custom":n}})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:function(e,t){},onSnapCancel:function(e,t){},onResizeCancel:function(e,t){},onCloseCancel:function(e,t){},onOpenEnd:function(e,t){},onSnapEnd:function(e,t){},onRezizeEnd:function(e,t){}},services:{onSnapStart:function(){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenStart:function(){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseStart:function(){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeStart:function(){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},onSnapEnd:function(){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenEnd:function(){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseEnd:function(){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeEnd:function(){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},renderVisuallyHidden:function(e,t){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},activate:function(e,t){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},deactivate:function(e,t){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},openSmoothly:function(e,t){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},openImmediately:function(e,t){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},snapSmoothly:function(e,t){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},resizeSmoothly:function(e,t){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},closeSmoothly:function(e,t){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}}},guards:{initiallyClosed:function(e){return"CLOSED"===e.initialState},initiallyOpen:function(e){return"OPEN"===e.initialState}}}),Kf=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],Jf=["velocity"],Qf=["onRest","config"],eg={tension:170,friction:26},tg=eg.tension,ng=eg.friction,rg=Y.forwardRef((function(e,t){var n=e.children,r=e.sibling,o=e.className,i=e.footer,a=e.header,l=e.open,s=e.initialState,c=e.lastSnapRef,d=e.initialFocusRef,u=e.onDismiss,p=e.maxHeight,h=e.defaultSnap,f=void 0===h?ig:h,g=e.snapPoints,v=void 0===g?ag:g,m=e.blocking,x=void 0===m||m,b=e.scrollLocking,y=void 0===b||b,w=e.style,C=e.onSpringStart,$=e.onSpringCancel,k=e.onSpringEnd,S=e.reserveScrollBarGap,E=void 0===S?x:S,L=e.expandOnContentDrag,R=void 0!==L&&L,O=Hf(e,Kf),T=function(){var e=J(!1),t=e[0],n=e[1],r=J({}),o=r[0],i=r[1],a=ie((function(e){return i((function(t){var n;return zf({},t,((n={})[e]=!1,n))})),function(){i((function(t){var n;return zf({},t,((n={})[e]=!0,n))}))}}),[]);return ee((function(){var e=Object.values(o);0!==e.length&&e.every(Boolean)&&n(!0)}),[o]),{ready:t,registerReady:a}}(),_=T.ready,P=T.registerReady,M=Q(!1),D=Q(C),N=Q($),V=Q(k);ee((function(){D.current=C,N.current=$,V.current=k}),[$,C,k]);var I,j,A=Fu((function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}})),z=A[0],H=A[1],B=Q(null),F=Q(null),Z=Q(null),W=Q(null),q=Q(null),G=Q(null),U=Q(0),X=Q(),K=Q(!1),te=(I=oe((function(){return"undefined"!=typeof window?window.matchMedia("(prefers-reduced-motion: reduce)"):null}),[]),j=Q(null==I?void 0:I.matches),se(j.current?"reduce":"no-preference"),ee((function(){var e=function(e){j.current=e.matches};return null==I||I.addListener(e),function(){return null==I?void 0:I.removeListener(e)}}),[I]),j),ne=function(e){var t=e.targetRef,n=e.enabled,r=e.reserveScrollBarGap,o=Q({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return se(n?"Enabled":"Disabled"),ee((function(){if(!n)return o.current.deactivate(),void(o.current={activate:function(){},deactivate:function(){}});var e=t.current,i=!1;o.current={activate:function(){i||(i=!0,Jh(e,{allowTouchMove:function(e){return e.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:r}))},deactivate:function(){i&&(i=!1,Qh(e))}}}),[n,t,r]),o}({targetRef:F,enabled:_&&y,reserveScrollBarGap:E}),re=function(e){var t=e.targetRef,n=e.enabled,r=Q({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return se(n?"Enabled":"Disabled"),ee((function(){if(!n)return r.current.deactivate(),void(r.current={activate:function(){},deactivate:function(){}});var e=t.current,o=!1,i=[],a=[];r.current={activate:function(){if(!o){o=!0;var t=e.parentNode;document.querySelectorAll("body > *").forEach((function(e){if(e!==t){var n=e.getAttribute("aria-hidden");null!==n&&"false"!==n||(i.push(n),a.push(e),e.setAttribute("aria-hidden","true"))}}))}},deactivate:function(){o&&(o=!1,a.forEach((function(e,t){var n=i[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)})),i=[],a=[])}}}),[t,n]),r}({targetRef:B,enabled:_&&x}),ae=function(e){var t=e.targetRef,n=e.fallbackRef,r=e.initialFocusRef,o=e.enabled,i=Q({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return se(o?"Enabled":"Disabled"),ee((function(){if(!o)return i.current.deactivate(),void(i.current={activate:function(){},deactivate:function(){}});var e=n.current,a=zh(t.current,{onActivate:void 0,initialFocus:r?function(){return(null==r?void 0:r.current)||e}:void 0,fallbackFocus:e,escapeDeactivates:!1,clickOutsideDeactivates:!1}),l=!1;i.current={activate:function(){try{return l?Promise.resolve():(l=!0,Promise.resolve(a.activate()).then((function(){return Promise.resolve(new Promise((function(e){return setTimeout((function(){return e(void 0)}),0)}))).then((function(){}))})))}catch(e){return Promise.reject(e)}},deactivate:function(){l&&(l=!1,a.deactivate())}}}),[o,n,r,t]),i}({targetRef:B,fallbackRef:G,initialFocusRef:d||void 0,enabled:_&&x&&!1!==d}),ce=function(e){var t=e.getSnapPoints,n=e.heightRef,r=e.lastSnapRef,o=e.ready,i=function(e){var t=e.contentRef,n=e.controlledMaxHeight,r=e.footerEnabled,o=e.footerRef,i=e.headerEnabled,a=e.headerRef,l=e.registerReady,s=e.resizeSourceRef,c=oe((function(){return l("contentHeight")}),[l]),d=function(e,t,n){var r=oe((function(){return t("maxHeight")}),[t]),o=J((function(){return Zf(e)||"undefined"!=typeof window?window.innerHeight:0})),i=o[0],a=o[1],l=i>0,s=Q(0);return se(e?"controlled":"auto"),ee((function(){l&&r()}),[l,r]),Bf((function(){if(e)return a(Zf(e)),void(n.current="maxheightprop");var t=function(){s.current||(s.current=requestAnimationFrame((function(){a(window.innerHeight),n.current="window",s.current=0})))};return window.addEventListener("resize",t),a(window.innerHeight),n.current="window",r(),function(){window.removeEventListener("resize",t),cancelAnimationFrame(s.current)}}),[e,r,n]),i}(n,l,s),u=qf(a,{label:"headerHeight",enabled:i,resizeSourceRef:s}),p=qf(t,{label:"contentHeight",enabled:!0,resizeSourceRef:s}),h=qf(o,{label:"footerHeight",enabled:r,resizeSourceRef:s}),f=Math.min(d-u-h,p)+u+h;se("minHeight: "+f);var g=p>0;return ee((function(){g&&c()}),[g,c]),{maxHeight:d,minHeight:f,headerHeight:u,footerHeight:h}}({contentRef:e.contentRef,controlledMaxHeight:e.controlledMaxHeight,footerEnabled:e.footerEnabled,footerRef:e.footerRef,headerEnabled:e.headerEnabled,headerRef:e.headerRef,registerReady:e.registerReady,resizeSourceRef:e.resizeSourceRef}),a=i.maxHeight,l=i.minHeight,s=i.headerHeight,c=i.footerHeight,d=function(e,t){var n=[].concat(e).map(Zf).reduce((function(e,n){return e.add(Ff(n,0,t)),e}),new Set),r=Array.from(n),o=Math.min.apply(Math,r);if(Number.isNaN(o))throw new TypeError("minSnap is NaN");var i=Math.max.apply(Math,r);if(Number.isNaN(i))throw new TypeError("maxSnap is NaN");return{snapPoints:r,minSnap:o,maxSnap:i}}(o?t({height:n.current,footerHeight:c,headerHeight:s,minHeight:l,maxHeight:a}):[0],a),u=d.snapPoints,p=d.minSnap,h=d.maxSnap;return se("minSnap: "+p+", maxSnap:"+h),{minSnap:p,maxSnap:h,findSnap:function(e){var t=Zf("function"==typeof e?e({footerHeight:c,headerHeight:s,height:n.current,minHeight:l,maxHeight:a,snapPoints:u,lastSnap:r.current}):e);return u.reduce((function(e,n){return Math.abs(n-t)<Math.abs(e-t)?n:e}),p)},maxHeight:a}}({contentRef:Z,controlledMaxHeight:p,footerEnabled:!!i,footerRef:q,getSnapPoints:v,headerEnabled:!1!==a,headerRef:W,heightRef:U,lastSnapRef:c,ready:_,registerReady:P,resizeSourceRef:X}),de=ce.minSnap,ue=ce.maxSnap,pe=ce.maxHeight,he=ce.findSnap,fe=Q(pe),ge=Q(de),ve=Q(ue),me=Q(he),xe=Q(0);Bf((function(){fe.current=pe,ve.current=ue,ge.current=de,me.current=he,xe.current=he(f)}),[he,f,pe,ue,de]);var be=ie((function(e){var t=e.onRest,n=e.config,r=(n=void 0===n?{}:n).velocity,o=void 0===r?1:r,i=Hf(n,Jf),a=Hf(e,Qf);return new Promise((function(e){return H(zf({},a,{config:zf({velocity:o},i,{mass:1,tension:tg,friction:Math.max(ng,ng+(ng-ng*o))}),onRest:function(){var n=[].slice.call(arguments);e.apply(void 0,n),null==t||t.apply(void 0,n)}}))}))}),[H]),ye=fu(Yf,{devTools:!1,actions:{onOpenCancel:ie((function(){return null==N.current?void 0:N.current({type:"OPEN"})}),[]),onSnapCancel:ie((function(e){return null==N.current?void 0:N.current({type:"SNAP",source:e.snapSource})}),[]),onCloseCancel:ie((function(){return null==N.current?void 0:N.current({type:"CLOSE"})}),[]),onResizeCancel:ie((function(){return null==N.current?void 0:N.current({type:"RESIZE",source:X.current})}),[]),onOpenEnd:ie((function(){return null==V.current?void 0:V.current({type:"OPEN"})}),[]),onSnapEnd:ie((function(e,t){return null==V.current?void 0:V.current({type:"SNAP",source:e.snapSource})}),[]),onResizeEnd:ie((function(){return null==V.current?void 0:V.current({type:"RESIZE",source:X.current})}),[])},context:{initialState:s},services:{onSnapStart:ie((function(e,t){try{return Promise.resolve(null==D.current?void 0:D.current({type:"SNAP",source:t.payload.source||"custom"}))}catch(e){return Promise.reject(e)}}),[]),onOpenStart:ie((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseStart:ie((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeStart:ie((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"RESIZE",source:X.current}))}catch(e){return Promise.reject(e)}}),[]),onSnapEnd:ie((function(e,t){try{return Promise.resolve(null==V.current?void 0:V.current({type:"SNAP",source:e.snapSource}))}catch(e){return Promise.reject(e)}}),[]),onOpenEnd:ie((function(){try{return Promise.resolve(null==V.current?void 0:V.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseEnd:ie((function(){try{return Promise.resolve(null==V.current?void 0:V.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeEnd:ie((function(){try{return Promise.resolve(null==V.current?void 0:V.current({type:"RESIZE",source:X.current}))}catch(e){return Promise.reject(e)}}),[]),renderVisuallyHidden:ie((function(e,t){try{return Promise.resolve(be({y:xe.current,ready:0,maxHeight:fe.current,maxSnap:ve.current,minSnap:xe.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[be]),activate:ie((function(e,t){try{return M.current=!0,Promise.resolve(Promise.all([ne.current.activate(),ae.current.activate(),re.current.activate()])).then((function(){}))}catch(e){return Promise.reject(e)}}),[re,ae,ne]),deactivate:ie((function(){try{return ne.current.deactivate(),ae.current.deactivate(),re.current.deactivate(),M.current=!1,Promise.resolve()}catch(e){return Promise.reject(e)}}),[re,ae,ne]),openImmediately:ie((function(){try{return U.current=xe.current,Promise.resolve(be({y:xe.current,ready:1,maxHeight:fe.current,maxSnap:ve.current,minSnap:xe.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[be]),openSmoothly:ie((function(){try{return Promise.resolve(be({y:0,ready:1,maxHeight:fe.current,maxSnap:ve.current,minSnap:xe.current,immediate:!0})).then((function(){return U.current=xe.current,Promise.resolve(be({y:xe.current,ready:1,maxHeight:fe.current,maxSnap:ve.current,minSnap:xe.current,immediate:te.current})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[be,te]),snapSmoothly:ie((function(e,t){try{var n=me.current(e.y);return U.current=n,c.current=n,Promise.resolve(be({y:n,ready:1,maxHeight:fe.current,maxSnap:ve.current,minSnap:ge.current,immediate:te.current,config:{velocity:e.velocity}})).then((function(){}))}catch(e){return Promise.reject(e)}}),[be,c,te]),resizeSmoothly:ie((function(){try{var e=me.current(U.current);return U.current=e,c.current=e,Promise.resolve(be({y:e,ready:1,maxHeight:fe.current,maxSnap:ve.current,minSnap:ge.current,immediate:"element"!==X.current||te.current})).then((function(){}))}catch(e){return Promise.reject(e)}}),[be,c,te]),closeSmoothly:ie((function(e,t){try{return be({minSnap:U.current,immediate:!0}),U.current=0,Promise.resolve(be({y:0,maxHeight:fe.current,maxSnap:ve.current,immediate:te.current})).then((function(){return Promise.resolve(be({ready:0,immediate:!0})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[be,te])}}),we=ye[0],Ce=ye[1];ee((function(){_&&Ce(l?"OPEN":"CLOSE")}),[l,Ce,_]),Bf((function(){(pe||ue||de)&&Ce("RESIZE")}),[pe,ue,de,Ce]),ee((function(){return function(){ne.current.deactivate(),ae.current.deactivate(),re.current.deactivate()}}),[re,ae,ne]),le(t,(function(){return{snapTo:function(e,t){var n=void 0===t?{}:t,r=n.velocity,o=void 0===r?1:r,i=n.source,a=void 0===i?"custom":i;Ce("SNAP",{payload:{y:me.current(e),velocity:o,source:a}})},get height(){return U.current}}}),[Ce]),ee((function(){var e=F.current,t=function(e){K.current&&e.preventDefault()},n=function(t){e.scrollTop<0&&(requestAnimationFrame((function(){e.style.overflow="hidden",e.scrollTop=0,e.style.removeProperty("overflow")})),t.preventDefault())};return R&&(e.addEventListener("scroll",t),e.addEventListener("touchmove",t),e.addEventListener("touchstart",n)),function(){e.removeEventListener("scroll",t),e.removeEventListener("touchmove",t),e.removeEventListener("touchstart",n)}}),[R,F]);var $e=dh((function(e){var t=e.args,n=(t=void 0===t?[]:t)[0],r=(n=void 0===n?{}:n).closeOnTap,o=void 0!==r&&r,i=n.isContentDragging,a=void 0!==i&&i,l=e.cancel,s=e.direction[1],c=e.down,d=e.first,p=e.last,h=e.memo,f=void 0===h?z.y.getValue():h,g=e.tap,v=e.velocity,m=-1*e.movement[1];if(!M.current)return l(),f;if(u&&o&&g)return l(),setTimeout((function(){return u()}),0),f;if(g)return f;var x=f+m,b=m*v,y=Math.max(ge.current,Math.min(ve.current,x+2*b));if(!c&&u&&s>0&&x+b<ge.current/2)return l(),u(),f;var w=c?u||ge.current!==ve.current?Sp(x,u?0:ge.current,ve.current,.55):x<ge.current?Sp(x,ge.current,2*ve.current,.55):Sp(x,ge.current/2,ve.current,.55):y;return R&&a?(w>=ve.current&&(w=ve.current),f===ve.current&&F.current.scrollTop>0&&(w=ve.current),K.current=w<ve.current):K.current=!1,d&&Ce("DRAG"),p?(Ce("SNAP",{payload:{y:w,velocity:v>.05?v:1,source:"dragging"}}),f):(H({y:w,ready:1,maxHeight:fe.current,maxSnap:ve.current,minSnap:ge.current,immediate:!0,config:{velocity:v}}),f)}),{filterTaps:!0});if(Number.isNaN(ve.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(ge.current))throw new TypeError("minSnapRef is NaN!!");var ke=function(e){var t,n=e.spring,r=Iu([n.y,n.maxHeight],(function(e,t){return Math.round(Ff(t-e,0,16))+"px"})),o=Iu([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return Ff(e,t,n)+"px"})),i=Iu([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return e<t?t-e+"px":e>n?n-e+"px":"0px"})),a=Iu([n.y,n.maxSnap],(function(e,t){return e>=t?Math.ceil(e-t):0})),l=Iu([n.y,n.minSnap],(function(e,t){if(!t)return 0;var n=Math.max(t/2-45,0);return Ff((e-n)*(1/(Math.min(t/2+45,t)-n)+0),0,1)})),s=Iu([n.y,n.minSnap],(function(e,t){return t?Ff(e/t,0,1):0}));return(t={})["--rsbs-content-opacity"]=l,t["--rsbs-backdrop-opacity"]=s,t["--rsbs-antigap-scale-y"]=a,t["--rsbs-overlay-translate-y"]=i,t["--rsbs-overlay-rounded"]=r,t["--rsbs-overlay-h"]=o,t}({spring:z});return Y.createElement(bp.div,zf({},O,{"data-rsbs-root":!0,"data-rsbs-state":og.find(we.matches),"data-rsbs-is-blocking":x,"data-rsbs-is-dismissable":!!u,"data-rsbs-has-header":!!a,"data-rsbs-has-footer":!!i,className:o,ref:B,style:zf({},ke,w,{opacity:z.ready})}),r,x&&Y.createElement("div",zf({key:"backdrop","data-rsbs-backdrop":!0},$e({closeOnTap:!0}))),Y.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:G,onKeyDown:function(e){"Escape"===e.key&&(e.stopPropagation(),u&&u())}},!1!==a&&Y.createElement("div",zf({key:"header","data-rsbs-header":!0,ref:W},$e()),a),Y.createElement("div",zf({key:"scroll","data-rsbs-scroll":!0,ref:F},R?$e({isContentDragging:!0}):{}),Y.createElement("div",{"data-rsbs-content":!0,ref:Z},n)),i&&Y.createElement("div",zf({key:"footer",ref:q,"data-rsbs-footer":!0},$e()),i)))})),og=["closed","opening","open","closing","dragging","snapping","resizing"];function ig(e){var t=e.lastSnap;return null!=t?t:Math.min.apply(Math,e.snapPoints)}function ag(e){return e.minHeight}var lg=["onSpringStart","onSpringEnd","skipInitialTransition"],sg=K((function(e,t){var n=e.onSpringStart,r=e.onSpringEnd,o=e.skipInitialTransition,i=Hf(e,lg),a=J(!1),l=a[0],s=a[1],c=Q(),d=Q(null),u=Q(o&&i.open?"OPEN":"CLOSED");Bf((function(){if(i.open)return cancelAnimationFrame(c.current),s(!0),function(){u.current="CLOSED"}}),[i.open]);var p=ie((function(e){return Promise.resolve(null==n?void 0:n(e)).then((function(){"OPEN"===e.type&&cancelAnimationFrame(c.current)}))}),[n]),h=ie((function(e){return Promise.resolve(null==r?void 0:r(e)).then((function(){"CLOSE"===e.type&&(c.current=requestAnimationFrame((function(){return s(!1)})))}))}),[r]);return l?Y.createElement(rc,{"data-rsbs-portal":!0},Y.createElement(rg,zf({},i,{lastSnapRef:d,ref:t,initialState:u.current,onSpringStart:p,onSpringEnd:h}))):null}));const cg=de`
|
|
2511
|
+
function _h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ph(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_h(Object(n),!0).forEach((function(t){Mh(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Mh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Dh,Nh=(Dh=[],{activateTrap:function(e){if(Dh.length>0){var t=Dh[Dh.length-1];t!==e&&t.pause()}var n=Dh.indexOf(e);-1===n||Dh.splice(n,1),Dh.push(e)},deactivateTrap:function(e){var t=Dh.indexOf(e);-1!==t&&Dh.splice(t,1),Dh.length>0&&Dh[Dh.length-1].unpause()}}),Vh=function(e){return setTimeout(e,0)},Ih=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},jh=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"==typeof e?e.apply(void 0,n):e},Ah=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},zh=function(e,t){var n,r=(null==t?void 0:t.document)||document,o=Ph({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},t),i={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},a=function(e,t,n){return e&&void 0!==e[t]?e[t]:o[n||t]},l=function(e){return i.containerGroups.findIndex((function(t){var n=t.container,r=t.tabbableNodes;return n.contains(e)||r.find((function(t){return t===e}))}))},s=function(e){var t=o[e];if("function"==typeof t){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];t=t.apply(void 0,i)}if(!0===t&&(t=void 0),!t){if(void 0===t||!1===t)return t;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var l=t;if("string"==typeof t&&!(l=r.querySelector(t)))throw new Error("`".concat(e,"` as selector refers to no known node"));return l},c=function(){var e=s("initialFocus");if(!1===e)return!1;if(void 0===e)if(l(r.activeElement)>=0)e=r.activeElement;else{var t=i.tabbableGroups[0];e=t&&t.firstTabbableNode||s("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},d=function(){if(i.containerGroups=i.containers.map((function(e){var t,n,r=Lh(e,o.tabbableOptions),i=(t=e,(n=(n=o.tabbableOptions)||{}).getShadowRoot?mh([t],n.includeContainer,{filter:$h.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):vh(t,n.includeContainer,$h.bind(null,n)));return{container:e,tabbableNodes:r,focusableNodes:i,firstTabbableNode:r.length>0?r[0]:null,lastTabbableNode:r.length>0?r[r.length-1]:null,nextTabbableNode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=i.findIndex((function(t){return t===e}));if(!(n<0))return t?i.slice(n+1).find((function(e){return Rh(e,o.tabbableOptions)})):i.slice(0,n).reverse().find((function(e){return Rh(e,o.tabbableOptions)}))}}})),i.tabbableGroups=i.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),i.tabbableGroups.length<=0&&!s("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},u=function e(t){!1!==t&&t!==r.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!o.preventScroll}),i.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(c()))},p=function(e){var t=s("setReturnFocus",e);return t||!1!==t&&e},h=function(e){var t=Ah(e);l(t)>=0||(jh(o.clickOutsideDeactivates,e)?n.deactivate({returnFocus:o.returnFocusOnDeactivate&&!Th(t,o.tabbableOptions)}):jh(o.allowOutsideClick,e)||e.preventDefault())},f=function(e){var t=Ah(e),n=l(t)>=0;n||t instanceof Document?n&&(i.mostRecentlyFocusedNode=t):(e.stopImmediatePropagation(),u(i.mostRecentlyFocusedNode||c()))},g=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==jh(o.escapeDeactivates,e))return e.preventDefault(),void n.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){var t=Ah(e);d();var n=null;if(i.tabbableGroups.length>0){var r=l(t),a=r>=0?i.containerGroups[r]:void 0;if(r<0)n=e.shiftKey?i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:i.tabbableGroups[0].firstTabbableNode;else if(e.shiftKey){var c=Ih(i.tabbableGroups,(function(e){var n=e.firstTabbableNode;return t===n}));if(c<0&&(a.container===t||Th(t,o.tabbableOptions)&&!Rh(t,o.tabbableOptions)&&!a.nextTabbableNode(t,!1))&&(c=r),c>=0){var p=0===c?i.tabbableGroups.length-1:c-1;n=i.tabbableGroups[p].lastTabbableNode}}else{var h=Ih(i.tabbableGroups,(function(e){var n=e.lastTabbableNode;return t===n}));if(h<0&&(a.container===t||Th(t,o.tabbableOptions)&&!Rh(t,o.tabbableOptions)&&!a.nextTabbableNode(t))&&(h=r),h>=0){var f=h===i.tabbableGroups.length-1?0:h+1;n=i.tabbableGroups[f].firstTabbableNode}}}else n=s("fallbackFocus");n&&(e.preventDefault(),u(n))}(e)},v=function(e){var t=Ah(e);l(t)>=0||jh(o.clickOutsideDeactivates,e)||jh(o.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},m=function(){if(i.active)return Nh.activateTrap(n),i.delayInitialFocusTimer=o.delayInitialFocus?Vh((function(){u(c())})):u(c()),r.addEventListener("focusin",f,!0),r.addEventListener("mousedown",h,{capture:!0,passive:!1}),r.addEventListener("touchstart",h,{capture:!0,passive:!1}),r.addEventListener("click",v,{capture:!0,passive:!1}),r.addEventListener("keydown",g,{capture:!0,passive:!1}),n},x=function(){if(i.active)return r.removeEventListener("focusin",f,!0),r.removeEventListener("mousedown",h,!0),r.removeEventListener("touchstart",h,!0),r.removeEventListener("click",v,!0),r.removeEventListener("keydown",g,!0),n};return(n={get active(){return i.active},get paused(){return i.paused},activate:function(e){if(i.active)return this;var t=a(e,"onActivate"),n=a(e,"onPostActivate"),o=a(e,"checkCanFocusTrap");o||d(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=r.activeElement,t&&t();var l=function(){o&&d(),m(),n&&n()};return o?(o(i.containers.concat()).then(l,l),this):(l(),this)},deactivate:function(e){if(!i.active)return this;var t=Ph({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},e);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,x(),i.active=!1,i.paused=!1,Nh.deactivateTrap(n);var r=a(t,"onDeactivate"),l=a(t,"onPostDeactivate"),s=a(t,"checkCanReturnFocus"),c=a(t,"returnFocus","returnFocusOnDeactivate");r&&r();var d=function(){Vh((function(){c&&u(p(i.nodeFocusedBeforeActivation)),l&&l()}))};return c&&s?(s(p(i.nodeFocusedBeforeActivation)).then(d,d),this):(d(),this)},pause:function(){return i.paused||!i.active||(i.paused=!0,x()),this},unpause:function(){return i.paused&&i.active?(i.paused=!1,d(),m(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return i.containers=t.map((function(e){return"string"==typeof e?r.querySelector(e):e})),i.active&&d(),this}}).updateContainerElements(e),n};var Hh=!1;if("undefined"!=typeof window){var Bh={get passive(){Hh=!0}};window.addEventListener("testPassive",null,Bh),window.removeEventListener("testPassive",null,Bh)}var Fh,Zh="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),Wh=[],qh=!1,Gh=-1,Uh=void 0,Xh=void 0,Yh=function(e){return Wh.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},Kh=function(e){var t=e||window.event;return!!Yh(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},Jh=function(e,t){if(e){if(!Wh.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};Wh=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(Wh),[n]),Zh?(e.ontouchstart=function(e){1===e.targetTouches.length&&(Gh=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&function(e,t){var n=e.targetTouches[0].clientY-Gh;!Yh(e.target)&&(t&&0===t.scrollTop&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?Kh(e):e.stopPropagation())}(t,e)},qh||(document.addEventListener("touchmove",Kh,Hh?{passive:!1}:void 0),qh=!0)):function(e){if(void 0===Xh){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;t&&n>0&&(Xh=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===Uh&&(Uh=document.body.style.overflow,document.body.style.overflow="hidden")}(t)}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")},Qh=function(e){e?(Wh=Wh.filter((function(t){return t.targetElement!==e})),Zh?(e.ontouchstart=null,e.ontouchmove=null,qh&&0===Wh.length&&(document.removeEventListener("touchmove",Kh,Hh?{passive:!1}:void 0),qh=!1)):Wh.length||(void 0!==Xh&&(document.body.style.paddingRight=Xh,Xh=void 0),void 0!==Uh&&(document.body.style.overflow=Uh,Uh=void 0))):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")},ef=[],tf="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(Fh||(Fh={}));var nf,rf=function(e){return Object.freeze(e)},of=function(e,t){this.inlineSize=e,this.blockSize=t,rf(this)},af=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,rf(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),lf=function(e){return e instanceof SVGElement&&"getBBox"in e},sf=function(e){if(lf(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||e.getClientRects().length)},cf=function(e){var t;if(e instanceof Element)return!0;var n=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},df="undefined"!=typeof window?window:{},uf=new WeakMap,pf=/auto|scroll/,hf=/^tb|vertical/,ff=/msie|trident/i.test(df.navigator&&df.navigator.userAgent),gf=function(e){return parseFloat(e||"0")},vf=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new of((n?t:e)||0,(n?e:t)||0)},mf=rf({devicePixelContentBoxSize:vf(),borderBoxSize:vf(),contentBoxSize:vf(),contentRect:new af(0,0,0,0)}),xf=function(e,t){if(void 0===t&&(t=!1),uf.has(e)&&!t)return uf.get(e);if(sf(e))return uf.set(e,mf),mf;var n=getComputedStyle(e),r=lf(e)&&e.ownerSVGElement&&e.getBBox(),o=!ff&&"border-box"===n.boxSizing,i=hf.test(n.writingMode||""),a=!r&&pf.test(n.overflowY||""),l=!r&&pf.test(n.overflowX||""),s=r?0:gf(n.paddingTop),c=r?0:gf(n.paddingRight),d=r?0:gf(n.paddingBottom),u=r?0:gf(n.paddingLeft),p=r?0:gf(n.borderTopWidth),h=r?0:gf(n.borderRightWidth),f=r?0:gf(n.borderBottomWidth),g=u+c,v=s+d,m=(r?0:gf(n.borderLeftWidth))+h,x=p+f,b=l?e.offsetHeight-x-e.clientHeight:0,y=a?e.offsetWidth-m-e.clientWidth:0,w=o?g+m:0,C=o?v+x:0,$=r?r.width:gf(n.width)-w-y,k=r?r.height:gf(n.height)-C-b,S=$+g+y+m,E=k+v+b+x,L=rf({devicePixelContentBoxSize:vf(Math.round($*devicePixelRatio),Math.round(k*devicePixelRatio),i),borderBoxSize:vf(S,E,i),contentBoxSize:vf($,k,i),contentRect:new af(u,s,$,k)});return uf.set(e,L),L},bf=function(e,t,n){var r=xf(e,n),o=r.borderBoxSize,i=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case Fh.DEVICE_PIXEL_CONTENT_BOX:return a;case Fh.BORDER_BOX:return o;default:return i}},yf=function(e){var t=xf(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=rf([t.borderBoxSize]),this.contentBoxSize=rf([t.contentBoxSize]),this.devicePixelContentBoxSize=rf([t.devicePixelContentBoxSize])},wf=function(e){if(sf(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},Cf=function(){var e=1/0,t=[];ef.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new yf(t.target),o=wf(t.target);r.push(n),t.lastReportedSize=bf(t.target,t.observedBox),o<e&&(e=o)})),t.push((function(){n.callback.call(n.observer,r,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,r=t;n<r.length;n++){(0,r[n])()}return e},$f=function(e){ef.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(wf(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},kf=function(){var e=0;for($f(e);ef.some((function(e){return e.activeTargets.length>0}));)e=Cf(),$f(e);return ef.some((function(e){return e.skippedTargets.length>0}))&&function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:tf}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=tf),window.dispatchEvent(e)}(),e>0},Sf=[],Ef=function(e){if(!nf){var t=0,n=document.createTextNode("");new MutationObserver((function(){return Sf.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),nf=function(){n.textContent="".concat(t?t--:t++)}}Sf.push(e),nf()},Lf=0,Rf={attributes:!0,characterData:!0,childList:!0,subtree:!0},Of=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Tf=function(e){return void 0===e&&(e=0),Date.now()+e},_f=!1,Pf=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!_f){_f=!0;var n,r=Tf(e);n=function(){var n=!1;try{n=kf()}finally{if(_f=!1,e=r-Tf(),!Lf)return;n?t.run(1e3):e>0?t.run(e):t.start()}},Ef((function(){requestAnimationFrame(n)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,Rf)};document.body?t():df.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Of.forEach((function(t){return df.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Of.forEach((function(t){return df.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),Mf=function(e){!Lf&&e>0&&Pf.start(),!(Lf+=e)&&Pf.stop()},Df=function(){function e(e,t){this.target=e,this.observedBox=t||Fh.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=bf(this.target,this.observedBox,!0);return function(e){return!lf(e)&&!function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)&&"inline"===getComputedStyle(e).display}(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),Nf=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},Vf=new WeakMap,If=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},jf=function(){function e(){}return e.connect=function(e,t){var n=new Nf(e,t);Vf.set(e,n)},e.observe=function(e,t,n){var r=Vf.get(e),o=0===r.observationTargets.length;If(r.observationTargets,t)<0&&(o&&ef.push(r),r.observationTargets.push(new Df(t,n&&n.box)),Mf(1),Pf.schedule())},e.unobserve=function(e,t){var n=Vf.get(e),r=If(n.observationTargets,t),o=1===n.observationTargets.length;r>=0&&(o&&ef.splice(ef.indexOf(n),1),n.observationTargets.splice(r,1),Mf(-1))},e.disconnect=function(e){var t=this,n=Vf.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),Af=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");jf.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!cf(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");jf.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!cf(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");jf.unobserve(this,e)},e.prototype.disconnect=function(){jf.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function zf(){return zf=Object.assign||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},zf.apply(this,arguments)}function Hf(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}var Bf="undefined"!=typeof window?re:ee;function Ff(e,t,n){return t=(t=+t)==t?t:0,n=(n=+n)==n?n:0,(e=+e)==e&&(e=(e=e<=n?e:n)>=t?e:t),e}function Zf(e){var t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}var Wf={box:"border-box"};function qf(e,t){var n=t.label,r=t.enabled,o=t.resizeSourceRef,i=J(0),a=i[0],l=i[1];se(n+": "+a);var s=ie((function(e){l(e[0].borderBoxSize[0].blockSize),o.current="element"}),[o]);return Bf((function(){if(e.current&&r){var t=new Af(s);return t.observe(e.current,Wf),function(){t.disconnect()}}}),[e,s,r]),r?a:0}function Gf(e){return void 0===e&&(e=1e3),new Promise((function(t){return setTimeout(t,e)}))}var Uf={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},Xf={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},Yf=function(e,t,n){return void 0===n&&(n=e.context),new Qd(e,t,n)}({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:zf({},Uf,Xf)}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:zf({},Uf,Xf)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:zf({},{CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}}),onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[tu({y:function(e,t){return t.payload.y},velocity:function(e,t){return t.payload.velocity},snapSource:function(e,t){var n=t.payload.source;return void 0===n?"custom":n}})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:function(e,t){},onSnapCancel:function(e,t){},onResizeCancel:function(e,t){},onCloseCancel:function(e,t){},onOpenEnd:function(e,t){},onSnapEnd:function(e,t){},onRezizeEnd:function(e,t){}},services:{onSnapStart:function(){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenStart:function(){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseStart:function(){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeStart:function(){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},onSnapEnd:function(){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenEnd:function(){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseEnd:function(){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeEnd:function(){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},renderVisuallyHidden:function(e,t){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},activate:function(e,t){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},deactivate:function(e,t){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},openSmoothly:function(e,t){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},openImmediately:function(e,t){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},snapSmoothly:function(e,t){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},resizeSmoothly:function(e,t){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}},closeSmoothly:function(e,t){try{return Promise.resolve(Gf()).then((function(){}))}catch(e){return Promise.reject(e)}}},guards:{initiallyClosed:function(e){return"CLOSED"===e.initialState},initiallyOpen:function(e){return"OPEN"===e.initialState}}}),Kf=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],Jf=["velocity"],Qf=["onRest","config"],eg={tension:170,friction:26},tg=eg.tension,ng=eg.friction,rg=Y.forwardRef((function(e,t){var n=e.children,r=e.sibling,o=e.className,i=e.footer,a=e.header,l=e.open,s=e.initialState,c=e.lastSnapRef,d=e.initialFocusRef,u=e.onDismiss,p=e.maxHeight,h=e.defaultSnap,f=void 0===h?ig:h,g=e.snapPoints,v=void 0===g?ag:g,m=e.blocking,x=void 0===m||m,b=e.scrollLocking,y=void 0===b||b,w=e.style,C=e.onSpringStart,$=e.onSpringCancel,k=e.onSpringEnd,S=e.reserveScrollBarGap,E=void 0===S?x:S,L=e.expandOnContentDrag,R=void 0!==L&&L,O=Hf(e,Kf),T=function(){var e=J(!1),t=e[0],n=e[1],r=J({}),o=r[0],i=r[1],a=ie((function(e){return i((function(t){var n;return zf({},t,((n={})[e]=!1,n))})),function(){i((function(t){var n;return zf({},t,((n={})[e]=!0,n))}))}}),[]);return ee((function(){var e=Object.values(o);0!==e.length&&e.every(Boolean)&&n(!0)}),[o]),{ready:t,registerReady:a}}(),_=T.ready,P=T.registerReady,M=Q(!1),D=Q(C),N=Q($),V=Q(k);ee((function(){D.current=C,N.current=$,V.current=k}),[$,C,k]);var I,j,A=Fu((function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}})),z=A[0],H=A[1],B=Q(null),F=Q(null),Z=Q(null),W=Q(null),q=Q(null),G=Q(null),U=Q(0),X=Q(),K=Q(!1),ne=(I=te((function(){return"undefined"!=typeof window?window.matchMedia("(prefers-reduced-motion: reduce)"):null}),[]),j=Q(null==I?void 0:I.matches),se(j.current?"reduce":"no-preference"),ee((function(){var e=function(e){j.current=e.matches};return null==I||I.addListener(e),function(){return null==I?void 0:I.removeListener(e)}}),[I]),j),re=function(e){var t=e.targetRef,n=e.enabled,r=e.reserveScrollBarGap,o=Q({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return se(n?"Enabled":"Disabled"),ee((function(){if(!n)return o.current.deactivate(),void(o.current={activate:function(){},deactivate:function(){}});var e=t.current,i=!1;o.current={activate:function(){i||(i=!0,Jh(e,{allowTouchMove:function(e){return e.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:r}))},deactivate:function(){i&&(i=!1,Qh(e))}}}),[n,t,r]),o}({targetRef:F,enabled:_&&y,reserveScrollBarGap:E}),oe=function(e){var t=e.targetRef,n=e.enabled,r=Q({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return se(n?"Enabled":"Disabled"),ee((function(){if(!n)return r.current.deactivate(),void(r.current={activate:function(){},deactivate:function(){}});var e=t.current,o=!1,i=[],a=[];r.current={activate:function(){if(!o){o=!0;var t=e.parentNode;document.querySelectorAll("body > *").forEach((function(e){if(e!==t){var n=e.getAttribute("aria-hidden");null!==n&&"false"!==n||(i.push(n),a.push(e),e.setAttribute("aria-hidden","true"))}}))}},deactivate:function(){o&&(o=!1,a.forEach((function(e,t){var n=i[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)})),i=[],a=[])}}}),[t,n]),r}({targetRef:B,enabled:_&&x}),ae=function(e){var t=e.targetRef,n=e.fallbackRef,r=e.initialFocusRef,o=e.enabled,i=Q({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return se(o?"Enabled":"Disabled"),ee((function(){if(!o)return i.current.deactivate(),void(i.current={activate:function(){},deactivate:function(){}});var e=n.current,a=zh(t.current,{onActivate:void 0,initialFocus:r?function(){return(null==r?void 0:r.current)||e}:void 0,fallbackFocus:e,escapeDeactivates:!1,clickOutsideDeactivates:!1}),l=!1;i.current={activate:function(){try{return l?Promise.resolve():(l=!0,Promise.resolve(a.activate()).then((function(){return Promise.resolve(new Promise((function(e){return setTimeout((function(){return e(void 0)}),0)}))).then((function(){}))})))}catch(e){return Promise.reject(e)}},deactivate:function(){l&&(l=!1,a.deactivate())}}}),[o,n,r,t]),i}({targetRef:B,fallbackRef:G,initialFocusRef:d||void 0,enabled:_&&x&&!1!==d}),ce=function(e){var t=e.getSnapPoints,n=e.heightRef,r=e.lastSnapRef,o=e.ready,i=function(e){var t=e.contentRef,n=e.controlledMaxHeight,r=e.footerEnabled,o=e.footerRef,i=e.headerEnabled,a=e.headerRef,l=e.registerReady,s=e.resizeSourceRef,c=te((function(){return l("contentHeight")}),[l]),d=function(e,t,n){var r=te((function(){return t("maxHeight")}),[t]),o=J((function(){return Zf(e)||"undefined"!=typeof window?window.innerHeight:0})),i=o[0],a=o[1],l=i>0,s=Q(0);return se(e?"controlled":"auto"),ee((function(){l&&r()}),[l,r]),Bf((function(){if(e)return a(Zf(e)),void(n.current="maxheightprop");var t=function(){s.current||(s.current=requestAnimationFrame((function(){a(window.innerHeight),n.current="window",s.current=0})))};return window.addEventListener("resize",t),a(window.innerHeight),n.current="window",r(),function(){window.removeEventListener("resize",t),cancelAnimationFrame(s.current)}}),[e,r,n]),i}(n,l,s),u=qf(a,{label:"headerHeight",enabled:i,resizeSourceRef:s}),p=qf(t,{label:"contentHeight",enabled:!0,resizeSourceRef:s}),h=qf(o,{label:"footerHeight",enabled:r,resizeSourceRef:s}),f=Math.min(d-u-h,p)+u+h;se("minHeight: "+f);var g=p>0;return ee((function(){g&&c()}),[g,c]),{maxHeight:d,minHeight:f,headerHeight:u,footerHeight:h}}({contentRef:e.contentRef,controlledMaxHeight:e.controlledMaxHeight,footerEnabled:e.footerEnabled,footerRef:e.footerRef,headerEnabled:e.headerEnabled,headerRef:e.headerRef,registerReady:e.registerReady,resizeSourceRef:e.resizeSourceRef}),a=i.maxHeight,l=i.minHeight,s=i.headerHeight,c=i.footerHeight,d=function(e,t){var n=[].concat(e).map(Zf).reduce((function(e,n){return e.add(Ff(n,0,t)),e}),new Set),r=Array.from(n),o=Math.min.apply(Math,r);if(Number.isNaN(o))throw new TypeError("minSnap is NaN");var i=Math.max.apply(Math,r);if(Number.isNaN(i))throw new TypeError("maxSnap is NaN");return{snapPoints:r,minSnap:o,maxSnap:i}}(o?t({height:n.current,footerHeight:c,headerHeight:s,minHeight:l,maxHeight:a}):[0],a),u=d.snapPoints,p=d.minSnap,h=d.maxSnap;return se("minSnap: "+p+", maxSnap:"+h),{minSnap:p,maxSnap:h,findSnap:function(e){var t=Zf("function"==typeof e?e({footerHeight:c,headerHeight:s,height:n.current,minHeight:l,maxHeight:a,snapPoints:u,lastSnap:r.current}):e);return u.reduce((function(e,n){return Math.abs(n-t)<Math.abs(e-t)?n:e}),p)},maxHeight:a}}({contentRef:Z,controlledMaxHeight:p,footerEnabled:!!i,footerRef:q,getSnapPoints:v,headerEnabled:!1!==a,headerRef:W,heightRef:U,lastSnapRef:c,ready:_,registerReady:P,resizeSourceRef:X}),de=ce.minSnap,ue=ce.maxSnap,pe=ce.maxHeight,he=ce.findSnap,fe=Q(pe),ge=Q(de),ve=Q(ue),me=Q(he),xe=Q(0);Bf((function(){fe.current=pe,ve.current=ue,ge.current=de,me.current=he,xe.current=he(f)}),[he,f,pe,ue,de]);var be=ie((function(e){var t=e.onRest,n=e.config,r=(n=void 0===n?{}:n).velocity,o=void 0===r?1:r,i=Hf(n,Jf),a=Hf(e,Qf);return new Promise((function(e){return H(zf({},a,{config:zf({velocity:o},i,{mass:1,tension:tg,friction:Math.max(ng,ng+(ng-ng*o))}),onRest:function(){var n=[].slice.call(arguments);e.apply(void 0,n),null==t||t.apply(void 0,n)}}))}))}),[H]),ye=fu(Yf,{devTools:!1,actions:{onOpenCancel:ie((function(){return null==N.current?void 0:N.current({type:"OPEN"})}),[]),onSnapCancel:ie((function(e){return null==N.current?void 0:N.current({type:"SNAP",source:e.snapSource})}),[]),onCloseCancel:ie((function(){return null==N.current?void 0:N.current({type:"CLOSE"})}),[]),onResizeCancel:ie((function(){return null==N.current?void 0:N.current({type:"RESIZE",source:X.current})}),[]),onOpenEnd:ie((function(){return null==V.current?void 0:V.current({type:"OPEN"})}),[]),onSnapEnd:ie((function(e,t){return null==V.current?void 0:V.current({type:"SNAP",source:e.snapSource})}),[]),onResizeEnd:ie((function(){return null==V.current?void 0:V.current({type:"RESIZE",source:X.current})}),[])},context:{initialState:s},services:{onSnapStart:ie((function(e,t){try{return Promise.resolve(null==D.current?void 0:D.current({type:"SNAP",source:t.payload.source||"custom"}))}catch(e){return Promise.reject(e)}}),[]),onOpenStart:ie((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseStart:ie((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeStart:ie((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"RESIZE",source:X.current}))}catch(e){return Promise.reject(e)}}),[]),onSnapEnd:ie((function(e,t){try{return Promise.resolve(null==V.current?void 0:V.current({type:"SNAP",source:e.snapSource}))}catch(e){return Promise.reject(e)}}),[]),onOpenEnd:ie((function(){try{return Promise.resolve(null==V.current?void 0:V.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseEnd:ie((function(){try{return Promise.resolve(null==V.current?void 0:V.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeEnd:ie((function(){try{return Promise.resolve(null==V.current?void 0:V.current({type:"RESIZE",source:X.current}))}catch(e){return Promise.reject(e)}}),[]),renderVisuallyHidden:ie((function(e,t){try{return Promise.resolve(be({y:xe.current,ready:0,maxHeight:fe.current,maxSnap:ve.current,minSnap:xe.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[be]),activate:ie((function(e,t){try{return M.current=!0,Promise.resolve(Promise.all([re.current.activate(),ae.current.activate(),oe.current.activate()])).then((function(){}))}catch(e){return Promise.reject(e)}}),[oe,ae,re]),deactivate:ie((function(){try{return re.current.deactivate(),ae.current.deactivate(),oe.current.deactivate(),M.current=!1,Promise.resolve()}catch(e){return Promise.reject(e)}}),[oe,ae,re]),openImmediately:ie((function(){try{return U.current=xe.current,Promise.resolve(be({y:xe.current,ready:1,maxHeight:fe.current,maxSnap:ve.current,minSnap:xe.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[be]),openSmoothly:ie((function(){try{return Promise.resolve(be({y:0,ready:1,maxHeight:fe.current,maxSnap:ve.current,minSnap:xe.current,immediate:!0})).then((function(){return U.current=xe.current,Promise.resolve(be({y:xe.current,ready:1,maxHeight:fe.current,maxSnap:ve.current,minSnap:xe.current,immediate:ne.current})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[be,ne]),snapSmoothly:ie((function(e,t){try{var n=me.current(e.y);return U.current=n,c.current=n,Promise.resolve(be({y:n,ready:1,maxHeight:fe.current,maxSnap:ve.current,minSnap:ge.current,immediate:ne.current,config:{velocity:e.velocity}})).then((function(){}))}catch(e){return Promise.reject(e)}}),[be,c,ne]),resizeSmoothly:ie((function(){try{var e=me.current(U.current);return U.current=e,c.current=e,Promise.resolve(be({y:e,ready:1,maxHeight:fe.current,maxSnap:ve.current,minSnap:ge.current,immediate:"element"!==X.current||ne.current})).then((function(){}))}catch(e){return Promise.reject(e)}}),[be,c,ne]),closeSmoothly:ie((function(e,t){try{return be({minSnap:U.current,immediate:!0}),U.current=0,Promise.resolve(be({y:0,maxHeight:fe.current,maxSnap:ve.current,immediate:ne.current})).then((function(){return Promise.resolve(be({ready:0,immediate:!0})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[be,ne])}}),we=ye[0],Ce=ye[1];ee((function(){_&&Ce(l?"OPEN":"CLOSE")}),[l,Ce,_]),Bf((function(){(pe||ue||de)&&Ce("RESIZE")}),[pe,ue,de,Ce]),ee((function(){return function(){re.current.deactivate(),ae.current.deactivate(),oe.current.deactivate()}}),[oe,ae,re]),le(t,(function(){return{snapTo:function(e,t){var n=void 0===t?{}:t,r=n.velocity,o=void 0===r?1:r,i=n.source,a=void 0===i?"custom":i;Ce("SNAP",{payload:{y:me.current(e),velocity:o,source:a}})},get height(){return U.current}}}),[Ce]),ee((function(){var e=F.current,t=function(e){K.current&&e.preventDefault()},n=function(t){e.scrollTop<0&&(requestAnimationFrame((function(){e.style.overflow="hidden",e.scrollTop=0,e.style.removeProperty("overflow")})),t.preventDefault())};return R&&(e.addEventListener("scroll",t),e.addEventListener("touchmove",t),e.addEventListener("touchstart",n)),function(){e.removeEventListener("scroll",t),e.removeEventListener("touchmove",t),e.removeEventListener("touchstart",n)}}),[R,F]);var $e=dh((function(e){var t=e.args,n=(t=void 0===t?[]:t)[0],r=(n=void 0===n?{}:n).closeOnTap,o=void 0!==r&&r,i=n.isContentDragging,a=void 0!==i&&i,l=e.cancel,s=e.direction[1],c=e.down,d=e.first,p=e.last,h=e.memo,f=void 0===h?z.y.getValue():h,g=e.tap,v=e.velocity,m=-1*e.movement[1];if(!M.current)return l(),f;if(u&&o&&g)return l(),setTimeout((function(){return u()}),0),f;if(g)return f;var x=f+m,b=m*v,y=Math.max(ge.current,Math.min(ve.current,x+2*b));if(!c&&u&&s>0&&x+b<ge.current/2)return l(),u(),f;var w=c?u||ge.current!==ve.current?Sp(x,u?0:ge.current,ve.current,.55):x<ge.current?Sp(x,ge.current,2*ve.current,.55):Sp(x,ge.current/2,ve.current,.55):y;return R&&a?(w>=ve.current&&(w=ve.current),f===ve.current&&F.current.scrollTop>0&&(w=ve.current),K.current=w<ve.current):K.current=!1,d&&Ce("DRAG"),p?(Ce("SNAP",{payload:{y:w,velocity:v>.05?v:1,source:"dragging"}}),f):(H({y:w,ready:1,maxHeight:fe.current,maxSnap:ve.current,minSnap:ge.current,immediate:!0,config:{velocity:v}}),f)}),{filterTaps:!0});if(Number.isNaN(ve.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(ge.current))throw new TypeError("minSnapRef is NaN!!");var ke=function(e){var t,n=e.spring,r=Iu([n.y,n.maxHeight],(function(e,t){return Math.round(Ff(t-e,0,16))+"px"})),o=Iu([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return Ff(e,t,n)+"px"})),i=Iu([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return e<t?t-e+"px":e>n?n-e+"px":"0px"})),a=Iu([n.y,n.maxSnap],(function(e,t){return e>=t?Math.ceil(e-t):0})),l=Iu([n.y,n.minSnap],(function(e,t){if(!t)return 0;var n=Math.max(t/2-45,0);return Ff((e-n)*(1/(Math.min(t/2+45,t)-n)+0),0,1)})),s=Iu([n.y,n.minSnap],(function(e,t){return t?Ff(e/t,0,1):0}));return(t={})["--rsbs-content-opacity"]=l,t["--rsbs-backdrop-opacity"]=s,t["--rsbs-antigap-scale-y"]=a,t["--rsbs-overlay-translate-y"]=i,t["--rsbs-overlay-rounded"]=r,t["--rsbs-overlay-h"]=o,t}({spring:z});return Y.createElement(bp.div,zf({},O,{"data-rsbs-root":!0,"data-rsbs-state":og.find(we.matches),"data-rsbs-is-blocking":x,"data-rsbs-is-dismissable":!!u,"data-rsbs-has-header":!!a,"data-rsbs-has-footer":!!i,className:o,ref:B,style:zf({},ke,w,{opacity:z.ready})}),r,x&&Y.createElement("div",zf({key:"backdrop","data-rsbs-backdrop":!0},$e({closeOnTap:!0}))),Y.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:G,onKeyDown:function(e){"Escape"===e.key&&(e.stopPropagation(),u&&u())}},!1!==a&&Y.createElement("div",zf({key:"header","data-rsbs-header":!0,ref:W},$e()),a),Y.createElement("div",zf({key:"scroll","data-rsbs-scroll":!0,ref:F},R?$e({isContentDragging:!0}):{}),Y.createElement("div",{"data-rsbs-content":!0,ref:Z},n)),i&&Y.createElement("div",zf({key:"footer",ref:q,"data-rsbs-footer":!0},$e()),i)))})),og=["closed","opening","open","closing","dragging","snapping","resizing"];function ig(e){var t=e.lastSnap;return null!=t?t:Math.min.apply(Math,e.snapPoints)}function ag(e){return e.minHeight}var lg=["onSpringStart","onSpringEnd","skipInitialTransition"],sg=K((function(e,t){var n=e.onSpringStart,r=e.onSpringEnd,o=e.skipInitialTransition,i=Hf(e,lg),a=J(!1),l=a[0],s=a[1],c=Q(),d=Q(null),u=Q(o&&i.open?"OPEN":"CLOSED");Bf((function(){if(i.open)return cancelAnimationFrame(c.current),s(!0),function(){u.current="CLOSED"}}),[i.open]);var p=ie((function(e){return Promise.resolve(null==n?void 0:n(e)).then((function(){"OPEN"===e.type&&cancelAnimationFrame(c.current)}))}),[n]),h=ie((function(e){return Promise.resolve(null==r?void 0:r(e)).then((function(){"CLOSE"===e.type&&(c.current=requestAnimationFrame((function(){return s(!1)})))}))}),[r]);return l?Y.createElement(rc,{"data-rsbs-portal":!0},Y.createElement(rg,zf({},i,{lastSnapRef:d,ref:t,initialState:u.current,onSpringStart:p,onSpringEnd:h}))):null}));const cg=de`
|
|
2512
2512
|
width: 40px;
|
|
2513
2513
|
border-radius: 4px;
|
|
2514
2514
|
background: transparent;
|
|
@@ -3419,7 +3419,7 @@ function _h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3419
3419
|
}
|
|
3420
3420
|
}
|
|
3421
3421
|
}
|
|
3422
|
-
`,uv=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),pv=e=>1===e?"none":2===e?"left":"right",hv=({variant:e="panel",defaultValue:t,tabs:n,onTabClick:o,activationMode:i="manual"})=>{const[a,l]=J(uv(n,t)||0);return G("div",{css:iv(e),children:G(N.Root,{width:"full",defaultValue:t||n?.[0]?.value,onValueChange:({value:e})=>{return l(uv(n,t=e)),void(o&&o(t));var t},activationMode:i,children:G(N.List,{alignItems:"center",border:"none",children:n.map(((t,n)=>q(ce,{children:["view"===e&&1===n&&"left"===pv(a)?G("div",{css:sv}):null,G(N.Trigger,{css:[av,"view"===e&&cv,"panel"===e&&lv,"transparent"===e&&dv],"aria-label":t["aria-label"]||t.label,...t,children:q(r,{display:"flex",alignItems:"center",gap:"5px",children:[t.icon,t.label]})},t.label),"view"===e&&1===n&&"right"===pv(a)?G("div",{css:sv}):null]},t.label)))})})})},fv=({text:e,query:t})=>{if(!t)return e;const n=new RegExp(`(${t})`,"ig"),r=e.split(n);return ue(he,{children:r.map((e=>n.test(e)?ue("strong",{children:e},e):ue("span",{children:e},e)))})},gv=({items:e,query:t,onSelect:n,highlightedIndex:o})=>{const i=Q(null);return ee((()=>{if(!i.current)return;const e=i.current.children[o];e&&e.scrollIntoView({block:"nearest"})}),[o]),ue(r,{padding:"8px",children:e.map(((e,a)=>ue(r,{ref:i,padding:"6px 8px",borderRadius:"md",cursor:"pointer",bg:a===o?"gray.100":void 0,_hover:{background:"gray.50"},onClick:()=>n(e.id||e.label),children:ue(fv,{text:e.label,query:t})},e.id)))})},vv=({placeholder:e,disabled:t,size:n="default",options:i=[],resultsMaxHeight:a="200px",isLoading:s=!1,displayResults:c="text",onSelect:d,onQueryChange:u,onClear:p,renderResults:h})=>{const[f,g]=J(""),{open:v,onOpen:m,onClose:x}=A(),[b,y]=J(i),[w,C]=J(-1),[$,k]=J(!1),S=Q(null),E=`search-results-${
|
|
3422
|
+
`,uv=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),pv=e=>1===e?"none":2===e?"left":"right",hv=({variant:e="panel",defaultValue:t,tabs:n,onTabClick:o,activationMode:i="manual"})=>{const[a,l]=J(uv(n,t)||0);return G("div",{css:iv(e),children:G(N.Root,{width:"full",defaultValue:t||n?.[0]?.value,onValueChange:({value:e})=>{return l(uv(n,t=e)),void(o&&o(t));var t},activationMode:i,children:G(N.List,{alignItems:"center",border:"none",children:n.map(((t,n)=>q(ce,{children:["view"===e&&1===n&&"left"===pv(a)?G("div",{css:sv}):null,G(N.Trigger,{css:[av,"view"===e&&cv,"panel"===e&&lv,"transparent"===e&&dv],"aria-label":t["aria-label"]||t.label,...t,children:q(r,{display:"flex",alignItems:"center",gap:"5px",children:[t.icon,t.label]})},t.label),"view"===e&&1===n&&"right"===pv(a)?G("div",{css:sv}):null]},t.label)))})})})},fv=({text:e,query:t})=>{if(!t)return e;const n=new RegExp(`(${t})`,"ig"),r=e.split(n);return ue(he,{children:r.map((e=>n.test(e)?ue("strong",{children:e},e):ue("span",{children:e},e)))})},gv=({items:e,query:t,onSelect:n,highlightedIndex:o})=>{const i=Q(null);return ee((()=>{if(!i.current)return;const e=i.current.children[o];e&&e.scrollIntoView({block:"nearest"})}),[o]),ue(r,{padding:"8px",children:e.map(((e,a)=>ue(r,{ref:i,padding:"6px 8px",borderRadius:"md",cursor:"pointer",bg:a===o?"gray.100":void 0,_hover:{background:"gray.50"},onClick:()=>n(e.id||e.label),children:ue(fv,{text:e.label,query:t})},e.id)))})},vv=({placeholder:e,disabled:t,size:n="default",options:i=[],resultsMaxHeight:a="200px",isLoading:s=!1,displayResults:c="text",onSelect:d,onQueryChange:u,onClear:p,renderResults:h})=>{const[f,g]=J(""),{open:v,onOpen:m,onClose:x}=A(),[b,y]=J(i),[w,C]=J(-1),[$,k]=J(!1),S=Q(null),E=`search-results-${ne()}`,L=e=>{const t=i.find((t=>t.id===e||t.label===e));t&&(d?.(t),g(""),x())};ee((()=>{if(u?.(f),!f)return void y(i);const e=i.filter((e=>e.id?.toLowerCase().includes(f.toLowerCase())||e.label.toLowerCase().includes(f.toLowerCase())||e.caption?.toLowerCase().includes(f.toLowerCase()))).map((e=>({id:e.id,label:e.label,caption:e.caption,variant:"select",icon:e.icon,onItemClick:()=>L(e.id||e.label)})));y(e),m()}),[f]),ee((()=>{function e(e){v&&S.current&&!S.current.contains(e.target)&&x()}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[v]);const R=f.length?G(gt,{style:{marginTop:"8px"},onClick:()=>{g(""),p?.()}}):null,O="none"!==c&&!!f.length&&b.length>0&&v;let T=we("neutral",500);t?T=we("neutral",500):$&&(T=we("primary",700));const _="small"===n?"16px":"20px";return q("div",{ref:S,style:{position:"relative",width:"100%"},children:[G(z,{startElement:G(dt,{width:_,height:_,fill:T,style:{marginTop:"8px"}}),endElement:R,children:G(jn,{autoComplete:"off",placeholder:e||"Filter",onChange:e=>{const{value:t}=e.target;g(t)},onFocus:()=>k(!0),onBlur:()=>k(!1),value:f,label:"",style:{paddingLeft:"40px",borderColor:we("neutral",500)},type:"search","aria-label":e||"Search filter","aria-expanded":O,"aria-controls":E,role:"combobox","aria-autocomplete":"list",disabled:t,size:n,noMarginBottom:!0,onKeyDown:e=>{if(O){if("ArrowDown"===e.key&&(e.preventDefault(),C((e=>Math.min(e+1,b.length-1)))),"ArrowUp"===e.key&&(e.preventDefault(),C((e=>Math.max(e-1,0)))),"Enter"===e.key&&(e.preventDefault(),w>=0)){const e=b[w];L(e.id||e.label)}"Escape"===e.key&&x()}}})}),(O||s&&!!f.length)&&"custom"===c&&h&&!s&&h({items:b,highlightedIndex:w,query:f,onSelect:L}),(O||s&&!!f.length)&&G(l,{container:S,children:q(r,{position:"absolute",width:"100%",backgroundColor:"white",border:"custom"===c?"none":"1px solid",borderColor:"gray.200",borderRadius:"md",zIndex:1e3,overflowY:"auto",maxHeight:a,children:[s&&G(r,{padding:"1rem",children:G(o,{})}),"text"===c&&!s&&G(gv,{highlightedIndex:w,items:b,query:f,onSelect:L}),"list"===c&&!s&&G(bl,{items:b,highlightedIndex:w})]})})]})},mv={small:"16px",medium:"24px",large:"40px",default:"16px"};function xv(e,t,n,r){const o=function(e,t){return"string"==typeof t&&""!==t.trim()?t:e&&mv[e]?mv[e]:mv.default}(e,t),i=n?we("neutral",200):we("primary",300),a=r??i,l=r&&n?"opacity: 0.7;":"",s=we("neutral",n?400:800);return de`
|
|
3423
3423
|
height: ${o};
|
|
3424
3424
|
width: ${o};
|
|
3425
3425
|
border-radius: 50%;
|