@interopio/home-ui-react 2.2.4 → 2.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
- "use strict";var hv=Object.defineProperty;var mv=(t,n,e)=>n in t?hv(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e;var Lt=(t,n,e)=>(mv(t,typeof n!="symbol"?n+"":n,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),g=require("react"),oo=require("react-dom"),_e=require("@interopio/react-hooks"),pr=require("@interopio/workspaces-ui-react");function wf(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,o.get?o:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const G=wf(g),xf=wf(oo);function Cf(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ps,Sf={exports:{}};/*!
1
+ "use strict";var yv=Object.defineProperty;var wv=(t,n,e)=>n in t?yv(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e;var Mt=(t,n,e)=>(wv(t,typeof n!="symbol"?n+"":n,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),g=require("react"),oo=require("react-dom"),_e=require("@interopio/react-hooks"),hr=require("@interopio/workspaces-ui-react");function Sf(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,o.get?o:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const G=Sf(g),kf=Sf(oo);function Ef(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var gs,jf={exports:{}};/*!
2
2
  Copyright (c) 2018 Jed Watson.
3
3
  Licensed under the MIT License (MIT), see
4
4
  http://jedwatson.github.io/classnames
5
- */ps=Sf,function(){var t={}.hasOwnProperty;function n(){for(var r="",i=0;i<arguments.length;i++){var a=arguments[i];a&&(r=o(r,e(a)))}return r}function e(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var i="";for(var a in r)t.call(r,a)&&r[a]&&(i=o(i,a));return i}function o(r,i){return i?r?r+" "+i:r+i:r}ps.exports?(n.default=n,ps.exports=n):window.classNames=n}();var de=Cf(Sf.exports);function lt({className:t,size:n="16",variant:e="workspace",...o}){const r=de("icon",n&&[`icon-size-${n}`],t);return c.jsx("span",{className:r,"aria-label":`icon-${e}`,role:"presentation",...o,children:c.jsx("i",{className:`icon-${e}`})})}const Ge=g.forwardRef(({className:t,variant:n="default",icon:e="workspace",size:o="16",tooltip:r,iconSize:i="16",onClick:a,disabled:s,children:l,...u},f)=>{const d=de("io-btn-icon",n!=="default"&&[`io-btn-icon-${n}`],[`io-btn-icon-size-${o}`],t),p=g.useCallback(h=>{if(!s)return a?a(h):void 0;h.preventDefault()},[a,s]);return c.jsx("button",{className:d,type:"button",ref:f,"aria-label":"icon button","aria-disabled":s,title:r,onClick:p,disabled:s,...u,children:l??(e&&c.jsx(lt,{variant:e,size:i}))})});Ge.displayName="ButtonIcon";const gv={default:void 0,info:"info",success:"check-solid",warning:"exclamation-mark",critical:"exclamation-mark"};function vv({className:t,variant:n="default",size:e="normal",text:o,close:r=!1,closeButtonOnClick:i,append:a,...s}){const l=de("io-alert",`io-alert-${n}`,e==="large"&&"io-alert-lg",t),u=gv[n];return c.jsxs("div",{"data-testid":"io-alert",className:l,role:"alert","aria-label":"alert",...s,children:[u&&c.jsx(lt,{"data-testid":"io-alert-icon",variant:u,className:"icon-severity"}),o&&c.jsx("p",{"data-testid":"io-alert-text",className:"io-text-smaller",children:o}),e==="large"&&a,r&&c.jsx(Ge,{"data-testid":"io-alert-close-button",className:"ms-auto",size:"16",iconSize:"10",icon:"close",onClick:i})]})}function yv({className:t,variant:n="default",children:e,...o}){const r=de("io-badge",n!=="default"&&[`io-badge-${n}`],t);return c.jsx("div",{className:r,...o,children:e})}function Nn({className:t,tag:n="h2",size:e="normal",text:o="Title",...r}){const i=n,a=de(e==="small"&&"io-title-semibold",e==="normal"&&"io-title",e==="large"&&"io-title-large",t);return c.jsx(i,{className:a,...r,children:o})}function et({className:t,title:n,titleSize:e="normal",tag:o,hint:r,children:i,...a}){const s=de("io-block",t),l=n?"block-title":void 0;return c.jsxs("section",{className:s,"aria-label":n?void 0:"Block","aria-labelledby":l,...a,children:[n&&c.jsx(Nn,{id:l,tag:o,text:n,size:e}),i,r&&c.jsx("p",{className:"io-text-smaller",children:r})]})}const ho=t=>t.key==="Enter"||t.key===" ",Je=g.forwardRef(({className:t,variant:n="default",size:e="normal",icon:o,iconSize:r="12",iconRight:i=!1,text:a,onClick:s,disabled:l,children:u,...f},d)=>{const p=de("io-btn",(n==="primary"||n==="critical"||n==="outline"||n==="link")&&[`io-btn-${n}`],e==="large"&&"io-btn-lg",t),h=g.useCallback(v=>{if(!l)return s?s(v):void 0;v.preventDefault()},[s,l]),m=g.useCallback(v=>{l||ho(v)&&(v.preventDefault(),h(v))},[h,l]);return c.jsxs("button",{className:p,ref:d,type:"button","aria-disabled":l,onClick:h,onKeyDown:m,disabled:l,tabIndex:0,...f,children:[o&&!i&&c.jsx(lt,{variant:o,size:r}),u??a,o&&i&&c.jsx(lt,{variant:o,size:r})]})});Je.displayName="Button";const ja=g.createContext({}),kf=g.forwardRef(({icon:t="chevron-down",onClick:n,onKeyDown:e,...o},r)=>{const{handleToggle:i,disabled:a,setTriggerRef:s}=g.useContext(ja),l=g.useCallback(d=>{s==null||s(d),r&&(typeof r=="function"?r(d):r.current=d)},[r,s]),u=g.useCallback(d=>{d.stopPropagation(),n==null||n(d),d.defaultPrevented||(i==null||i())},[n,i]),f=g.useCallback(d=>{e==null||e(d),d.defaultPrevented||ho(d)&&(d.preventDefault(),d.stopPropagation(),i==null||i())},[e,i]);return c.jsx(Je,{icon:t,iconRight:!0,onClick:u,onKeyDown:f,disabled:a,ref:l,...o})});kf.displayName="DropdownButton";const Ef=g.forwardRef(({size:t="32",onClick:n,onKeyDown:e,...o},r)=>{const{handleToggle:i,disabled:a,setTriggerRef:s}=g.useContext(ja),l=g.useCallback(d=>{s==null||s(d),r&&(typeof r=="function"?r(d):r.current=d)},[r,s]),u=g.useCallback(d=>{d.stopPropagation(),n==null||n(d),d.defaultPrevented||(i==null||i())},[n,i]),f=g.useCallback(d=>{e==null||e(d),d.defaultPrevented||ho(d)&&(d.preventDefault(),d.stopPropagation(),i==null||i())},[e,i]);return c.jsx(Ge,{size:t,onClick:u,onKeyDown:f,disabled:a,ref:l,...o})});function jf({className:t,...n}){const e=de("io-dropdown-content",t);return c.jsx("div",{className:e,...n})}Ef.displayName="DropdownButtonIcon";const Of=g.createContext({}),Oa=g.forwardRef((t,n)=>{const{className:e,prepend:o,append:r,isSelected:i,onClick:a,description:s,disabled:l=!1,children:u,tooltip:f,...d}=t,{variant:p="default",selected:h,checkIcon:m,handleItemClick:v}=g.useContext(Of),y=i??(h==null?void 0:h.some(b=>b.children===u)),w=p!=="default"&&!!m,k=w||o,x=de("io-list-item",k&&"io-list-item-left",r&&"io-list-item-right",p!=="default"&&y&&"selected",s&&"io-list-item-description",l&&"io-list-item-disabled",e);return c.jsxs("li",{className:x,ref:n,role:"menuitem","aria-roledescription":"menuitem",tabIndex:0,onClick:b=>{l?b.preventDefault():(v==null||v(b,{children:u}),a==null||a(b))},...d,children:[k&&c.jsxs("div",{className:"io-list-left-column",children:[w&&c.jsx(lt,{variant:m.variant,title:y?m.tooltip:void 0,"data-testid":"list-item-check-icon"}),o]}),c.jsx("span",{className:"io-list-text",title:f,"data-testid":"list-item-title",children:u}),r&&c.jsx("div",{className:"io-list-right-column",children:r}),s&&c.jsx("div",{className:"io-list-text-description",children:s})]})});Oa.displayName="ListItem";const nl=g.forwardRef(({className:t,prepend:n,append:e,children:o,tooltip:r,...i},a)=>{const s=de("io-list-item",n&&"io-list-item-left",e&&"io-list-item-right","io-list-item-title",t);return c.jsxs("li",{className:s,ref:a,...i,children:[n&&c.jsx("div",{className:"io-list-left-column",children:n}),c.jsx("span",{className:"io-list-text",title:r,"data-testid":"list-item-title",children:o}),e&&c.jsx("div",{className:"io-list-right-column",children:e})]})});nl.displayName="ListItemTitle";const ol=g.forwardRef(({className:t,prepend:n,append:e,children:o,tooltip:r,...i},a)=>{const s=de("io-list-item",n&&"io-list-item-left",e&&"io-list-item-right","io-list-item-section",t);return c.jsxs("li",{className:s,ref:a,...i,children:[n&&c.jsx("div",{className:"io-list-left-column",children:n}),c.jsx("span",{className:"io-list-text",title:r,children:o}),e&&c.jsx("div",{className:"io-list-right-column",children:e})]})});ol.displayName="ListItemSection";const Nf=g.forwardRef(({className:t,prepend:n,append:e,children:o,tooltip:r,...i},a)=>{const s=de("io-list-item-header",t);return c.jsxs("div",{className:s,ref:a,...i,children:[n&&c.jsx("div",{className:"io-list-left-column",children:n}),c.jsx("span",{className:"io-list-text",title:r,children:o}),e&&c.jsx("div",{className:"io-list-right-column",children:e})]})});Nf.displayName="ListItemHeader";const If=g.forwardRef(({className:t,children:n,...e},o)=>{const r=de("io-list-item","io-list-with-sub-items",t);return c.jsx("li",{className:r,ref:o,...e,children:n})});If.displayName="ListItemWithSubItems";const Pf=g.forwardRef((t,n)=>{const{className:e,variant:o="default",checkIcon:r,children:i,...a}=t,[s,l]=g.useState([]),u=de("io-list",o!=="default"&&"io-list-selectable",e),f=g.useMemo(()=>{if(r)return typeof r=="object"?r:{variant:r}},[r]),d=g.useCallback((h,m)=>{if(o==="default")return;const v=s.some(y=>{var w,k;return((w=y.children)==null?void 0:w.toString())===((k=m.children)==null?void 0:k.toString())});o==="single"?l([m]):(()=>{const y=v?s.filter(w=>w.children!==m.children):[...s,m];l(y)})()},[s,o]),p=g.useMemo(()=>({variant:o,selected:s,checkIcon:f,handleItemClick:d}),[o,s,f,d]);return c.jsx(Of.Provider,{value:p,children:c.jsx("ul",{className:u,ref:n,...a,children:i})})});Pf.displayName="List";const mt=Pf;mt.Item=Oa,mt.ItemTitle=nl,mt.ItemSection=ol,mt.ItemHeader=Nf,mt.ItemWithSubItems=If;const Af=g.forwardRef((t,n)=>c.jsx(mt,{...t,ref:n}));Af.displayName="DropdownList";const Tf=g.forwardRef((t,n)=>{const{handleClose:e}=g.useContext(ja),{onClick:o,onKeyDown:r,...i}=t,a=g.useRef(null),s=g.useCallback(l=>{a.current=l,typeof n=="function"?n(l):n&&(n.current=l)},[n]);return c.jsx(Oa,{...i,ref:s,onClick:l=>{o==null||o(l),e==null||e()},onKeyDown:l=>{if(r==null||r(l),l.defaultPrevented||!ho(l))return;l.preventDefault(),l.stopPropagation();const u=(typeof n=="function"?null:n==null?void 0:n.current)||a.current;u==null||u.click()}})});Tf.displayName="DropdownItem";const Df=g.forwardRef((t,n)=>c.jsx(nl,{...t,ref:n}));Df.displayName="DropdownItemTitle";const Mf=g.forwardRef((t,n)=>c.jsx(ol,{...t,ref:n}));function mi({className:t,...n}){const e=de("io-separator",t);return c.jsx("hr",{className:e,...n})}Mf.displayName="DropdownItemSection";const _f=g.forwardRef((t,n)=>c.jsx(mi,{...t}));_f.displayName="DropdownSeparator";function Xs(t,n,e){const o=g.useCallback(r=>{n.some(a=>r.key===a)&&(r.preventDefault(),t())},[t,n]);g.useEffect(()=>{const r=(e==null?void 0:e.current)||document;return r.addEventListener("keydown",o),()=>{r.removeEventListener("keydown",o)}},[o,e])}const xe=g.forwardRef(({className:t,variant:n="outline",align:e="down",disabled:o,isOpen:r,onOpenChange:i,children:a,...s},l)=>{const u=g.useRef(null),f=g.useRef(null);g.useImperativeHandle(l,()=>f.current,[]);const{isOpen:d,handleOpen:p,handleClose:h}=((y,w)=>{const[k,x]=g.useState(!1),b=y!==void 0,E=b?y:k,j=g.useCallback(L=>{b||x(L),w==null||w(L)},[b,w]),B=g.useCallback(()=>j(!0),[j]),F=g.useCallback(()=>j(!1),[j]);return{isOpen:E,setOpen:j,handleOpen:B,handleClose:F}})(r,i);((y,w,k=!0)=>{g.useEffect(()=>{if(!k)return;const x=E=>{const j=E.target;j&&y.current&&!y.current.contains(j)&&(E.composedPath&&E.composedPath().some(B=>B===y.current||y.current&&B.nodeType===Node.ELEMENT_NODE&&y.current.contains(B))||w())},b=requestAnimationFrame(()=>{document.addEventListener("mousedown",x,!0)});return()=>{cancelAnimationFrame(b),document.removeEventListener("mousedown",x,!0)}},[y,w,k])})(f,h,d),Xs(()=>{d&&h()},["Escape"],f),Xs(()=>{d||o||u.current!==document.activeElement||p()},["ArrowDown","ArrowUp"],f);const m=g.useMemo(()=>({variant:n,align:e,disabled:o,isOpen:d,handleOpen:p,handleClose:h,handleToggle:d?h:p,setTriggerRef:y=>u.current=y}),[n,e,o,d,p,h]),v=de("io-dropdown",d&&"io-dropdown-open",n!=="default"&&`io-dropdown-${n}`,t);return c.jsx(ja.Provider,{value:m,children:c.jsx("div",{className:v,ref:f,...s,children:a})})});function Be({className:t,variant:n="default",align:e="left",children:o,...r}){const i=de("io-btn-group",n!=="default"&&`io-btn-group-${n}`,e==="right"&&"io-btn-group-right",t);return c.jsx("div",{className:i,"data-testid":"button-group",...r,children:o})}function Zt({className:t,draggable:n=!1,children:e,...o}){const r=de("io-header",n&&["draggable"],t);return c.jsx("header",{className:r,...o,children:e})}function Ar({className:t,children:n,...e}){const o=de("io-dialog-header",t);return c.jsx(Zt,{"data-testid":"io-dialog-header",className:o,...e,children:n})}function bv({className:t,children:n,...e}){const o=de("io-dialog-body",t);return c.jsx("div",{"data-testid":"io-dialog-body",className:o,...e,children:n})}function Io({className:t,children:n,...e}){const o=de("io-footer",t);return c.jsx("footer",{className:o,...e,children:n})}function ki({className:t,...n}){const e=de("io-dialog-footer",t);return c.jsx(Io,{"data-testid":"io-dialog-footer",className:e,...n})}function Na(){return typeof window<"u"}function fo(t){return Lf(t)?(t.nodeName||"").toLowerCase():"#document"}function Jt(t){var n;return(t==null||(n=t.ownerDocument)==null?void 0:n.defaultView)||window}function En(t){var n;return(n=(Lf(t)?t.ownerDocument:t.document)||window.document)==null?void 0:n.documentElement}function Lf(t){return!!Na()&&(t instanceof Node||t instanceof Jt(t).Node)}function Qe(t){return!!Na()&&(t instanceof Element||t instanceof Jt(t).Element)}function gt(t){return!!Na()&&(t instanceof HTMLElement||t instanceof Jt(t).HTMLElement)}function Qs(t){return!(!Na()||typeof ShadowRoot>"u")&&(t instanceof ShadowRoot||t instanceof Jt(t).ShadowRoot)}xe.Button=kf,xe.ButtonIcon=Ef,xe.Content=jf,xe.List=Af,xe.Item=Tf,xe.ItemTitle=Df,xe.ItemSection=Mf,xe.Separator=_f,Be.Button=Je,Be.ButtonIcon=Ge,Be.Dropdown=xe,Zt.Title=Nn,Zt.ButtonGroup=Be,Zt.Button=Je,Zt.ButtonIcon=Ge,Zt.Dropdown=xe,Ar.Title=Nn,Ar.ButtonGroup=Be,Ar.Button=Je,Ar.ButtonIcon=Ge,Ar.Dropdown=xe,bv.Content=function({className:t,children:n,...e}){const o=de("io-dialog-content",t);return c.jsx("div",{className:o,...e,children:n})},Io.ButtonGroup=Be,Io.Button=Je,Io.ButtonIcon=Ge,Io.Dropdown=xe,ki.ButtonGroup=Be,ki.Button=Je,ki.ButtonIcon=Ge,ki.Dropdown=xe;const wv=new Set(["inline","contents"]);function ei(t){const{overflow:n,overflowX:e,overflowY:o,display:r}=sn(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+e)&&!wv.has(r)}const xv=new Set(["table","td","th"]);function Cv(t){return xv.has(fo(t))}const Sv=[":popover-open",":modal"];function ea(t){return Sv.some(n=>{try{return t.matches(n)}catch{return!1}})}const kv=["transform","translate","scale","rotate","perspective"],Ev=["transform","translate","scale","rotate","perspective","filter"],jv=["paint","layout","strict","content"];function ec(t){const n=Ia(),e=Qe(t)?sn(t):t;return kv.some(o=>!!e[o]&&e[o]!=="none")||!!e.containerType&&e.containerType!=="normal"||!n&&!!e.backdropFilter&&e.backdropFilter!=="none"||!n&&!!e.filter&&e.filter!=="none"||Ev.some(o=>(e.willChange||"").includes(o))||jv.some(o=>(e.contain||"").includes(o))}function Ia(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Ov=new Set(["html","body","#document"]);function so(t){return Ov.has(fo(t))}function sn(t){return Jt(t).getComputedStyle(t)}function Pa(t){return Qe(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function zn(t){if(fo(t)==="html")return t;const n=t.assignedSlot||t.parentNode||Qs(t)&&t.host||En(t);return Qs(n)?n.host:n}function Rf(t){const n=zn(t);return so(n)?t.ownerDocument?t.ownerDocument.body:t.body:gt(n)&&ei(n)?n:Rf(n)}function co(t,n,e){var o;n===void 0&&(n=[]),e===void 0&&(e=!0);const r=Rf(t),i=r===((o=t.ownerDocument)==null?void 0:o.body),a=Jt(r);if(i){const s=tc(a);return n.concat(a,a.visualViewport||[],ei(r)?r:[],s&&e?co(s):[])}return n.concat(r,co(r,[],e))}function tc(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function $n(t){let n=t.activeElement;for(;((e=n)==null||(e=e.shadowRoot)==null?void 0:e.activeElement)!=null;){var e;n=n.shadowRoot.activeElement}return n}function Ct(t,n){if(!t||!n)return!1;const e=n.getRootNode==null?void 0:n.getRootNode();if(t.contains(n))return!0;if(e&&Qs(e)){let o=n;for(;o;){if(t===o)return!0;o=o.parentNode||o.host}}return!1}function Ff(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function Bf(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(n=>{let{brand:e,version:o}=n;return e+"/"+o}).join(" "):navigator.userAgent}function Hf(t){return!(t.mozInputSource!==0||!t.isTrusted)||(nc()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType)}function $f(t){return!Bf().includes("jsdom/")&&(!nc()&&t.width===0&&t.height===0||nc()&&t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"||t.width<1&&t.height<1&&t.pressure===0&&t.detail===0&&t.pointerType==="touch")}function Wf(){return/apple/i.test(navigator.vendor)}function nc(){const t=/android/i;return t.test(Ff())||t.test(Bf())}function zr(t,n){const e=["mouse","pen"];return n||e.push("",void 0),e.includes(t)}function Pt(t){return(t==null?void 0:t.ownerDocument)||document}function hs(t,n){if(n==null)return!1;if("composedPath"in t)return t.composedPath().includes(n);const e=t;return e.target!=null&&n.contains(e.target)}function Qn(t){return"composedPath"in t?t.composedPath()[0]:t.target}function zf(t){return gt(t)&&t.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function _t(t){t.preventDefault(),t.stopPropagation()}function oc(t){return!!t&&t.getAttribute("role")==="combobox"&&zf(t)}const ta=Math.min,To=Math.max,na=Math.round,tr=Math.floor,jn=t=>({x:t,y:t}),Nv={left:"right",right:"left",bottom:"top",top:"bottom"},Iv={start:"end",end:"start"};function xu(t,n,e){return To(t,ta(n,e))}function Aa(t,n){return typeof t=="function"?t(n):t}function Lo(t){return t.split("-")[0]}function Ta(t){return t.split("-")[1]}function Uf(t){return t==="x"?"y":"x"}function Vf(t){return t==="y"?"height":"width"}const Pv=new Set(["top","bottom"]);function ro(t){return Pv.has(Lo(t))?"y":"x"}function Yf(t){return Uf(ro(t))}function rc(t){return t.replace(/start|end/g,n=>Iv[n])}const Cu=["left","right"],Su=["right","left"],Av=["top","bottom"],Tv=["bottom","top"];function Dv(t,n,e,o){const r=Ta(t);let i=function(a,s,l){switch(a){case"top":case"bottom":return l?s?Su:Cu:s?Cu:Su;case"left":case"right":return s?Av:Tv;default:return[]}}(Lo(t),e==="start",o);return r&&(i=i.map(a=>a+"-"+r),n&&(i=i.concat(i.map(rc)))),i}function Ei(t){return t.replace(/left|right|bottom|top/g,n=>Nv[n])}function oa(t){const{x:n,y:e,width:o,height:r}=t;return{width:o,height:r,top:e,left:n,right:n+o,bottom:e+r,x:n,y:e}}/*!
5
+ */gs=jf,function(){var t={}.hasOwnProperty;function n(){for(var r="",i=0;i<arguments.length;i++){var a=arguments[i];a&&(r=o(r,e(a)))}return r}function e(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var i="";for(var a in r)t.call(r,a)&&r[a]&&(i=o(i,a));return i}function o(r,i){return i?r?r+" "+i:r+i:r}gs.exports?(n.default=n,gs.exports=n):window.classNames=n}();var de=Ef(jf.exports);function lt({className:t,size:n="16",variant:e="workspace",...o}){const r=de("icon",n&&[`icon-size-${n}`],t);return c.jsx("span",{className:r,"aria-label":`icon-${e}`,role:"presentation",...o,children:c.jsx("i",{className:`icon-${e}`})})}const Ge=g.forwardRef(({className:t,variant:n="default",icon:e="workspace",size:o="16",tooltip:r,iconSize:i="16",onClick:a,disabled:s,children:l,...u},f)=>{const d=de("io-btn-icon",n!=="default"&&[`io-btn-icon-${n}`],[`io-btn-icon-size-${o}`],t),p=g.useCallback(h=>{if(!s)return a?a(h):void 0;h.preventDefault()},[a,s]);return c.jsx("button",{className:d,type:"button",ref:f,"aria-label":"icon button","aria-disabled":s,title:r,onClick:p,disabled:s,...u,children:l??(e&&c.jsx(lt,{variant:e,size:i}))})});Ge.displayName="ButtonIcon";const bv={default:void 0,info:"info",success:"check-solid",warning:"exclamation-mark",critical:"exclamation-mark"};function xv({className:t,variant:n="default",size:e="normal",text:o,close:r=!1,closeButtonOnClick:i,append:a,...s}){const l=de("io-alert",`io-alert-${n}`,e==="large"&&"io-alert-lg",t),u=bv[n];return c.jsxs("div",{"data-testid":"io-alert",className:l,role:"alert","aria-label":"alert",...s,children:[u&&c.jsx(lt,{"data-testid":"io-alert-icon",variant:u,className:"icon-severity"}),o&&c.jsx("p",{"data-testid":"io-alert-text",className:"io-text-smaller",children:o}),e==="large"&&a,r&&c.jsx(Ge,{"data-testid":"io-alert-close-button",className:"ms-auto",size:"16",iconSize:"10",icon:"close",onClick:i})]})}function Cv({className:t,variant:n="default",children:e,...o}){const r=de("io-badge",n!=="default"&&[`io-badge-${n}`],t);return c.jsx("div",{className:r,...o,children:e})}function Nn({className:t,tag:n="h2",size:e="normal",text:o="Title",...r}){const i=n,a=de(e==="small"&&"io-title-semibold",e==="normal"&&"io-title",e==="large"&&"io-title-large",t);return c.jsx(i,{className:a,...r,children:o})}function et({className:t,title:n,titleSize:e="normal",tag:o,hint:r,children:i,...a}){const s=de("io-block",t),l=n?"block-title":void 0;return c.jsxs("section",{className:s,"aria-label":n?void 0:"Block","aria-labelledby":l,...a,children:[n&&c.jsx(Nn,{id:l,tag:o,text:n,size:e}),i,r&&c.jsx("p",{className:"io-text-smaller",children:r})]})}const ho=t=>t.key==="Enter"||t.key===" ",Je=g.forwardRef(({className:t,variant:n="default",size:e="normal",icon:o,iconSize:r="12",iconRight:i=!1,text:a,onClick:s,disabled:l,children:u,...f},d)=>{const p=de("io-btn",(n==="primary"||n==="critical"||n==="outline"||n==="link")&&[`io-btn-${n}`],e==="large"&&"io-btn-lg",t),h=g.useCallback(v=>{if(!l)return s?s(v):void 0;v.preventDefault()},[s,l]),m=g.useCallback(v=>{l||ho(v)&&(v.preventDefault(),h(v))},[h,l]);return c.jsxs("button",{className:p,ref:d,type:"button","aria-disabled":l,onClick:h,onKeyDown:m,disabled:l,tabIndex:0,...f,children:[o&&!i&&c.jsx(lt,{variant:o,size:r}),u??a,o&&i&&c.jsx(lt,{variant:o,size:r})]})});Je.displayName="Button";const Ia=g.createContext({}),Of=g.forwardRef(({icon:t="chevron-down",onClick:n,onKeyDown:e,...o},r)=>{const{handleToggle:i,disabled:a,setTriggerRef:s}=g.useContext(Ia),l=g.useCallback(d=>{s==null||s(d),r&&(typeof r=="function"?r(d):r.current=d)},[r,s]),u=g.useCallback(d=>{d.stopPropagation(),n==null||n(d),d.defaultPrevented||(i==null||i())},[n,i]),f=g.useCallback(d=>{e==null||e(d),d.defaultPrevented||ho(d)&&(d.preventDefault(),d.stopPropagation(),i==null||i())},[e,i]);return c.jsx(Je,{icon:t,iconRight:!0,onClick:u,onKeyDown:f,disabled:a,ref:l,...o})});Of.displayName="DropdownButton";const Nf=g.forwardRef(({size:t="32",onClick:n,onKeyDown:e,...o},r)=>{const{handleToggle:i,disabled:a,setTriggerRef:s}=g.useContext(Ia),l=g.useCallback(d=>{s==null||s(d),r&&(typeof r=="function"?r(d):r.current=d)},[r,s]),u=g.useCallback(d=>{d.stopPropagation(),n==null||n(d),d.defaultPrevented||(i==null||i())},[n,i]),f=g.useCallback(d=>{e==null||e(d),d.defaultPrevented||ho(d)&&(d.preventDefault(),d.stopPropagation(),i==null||i())},[e,i]);return c.jsx(Ge,{size:t,onClick:u,onKeyDown:f,disabled:a,ref:l,...o})});function If({className:t,...n}){const e=de("io-dropdown-content",t);return c.jsx("div",{className:e,...n})}Nf.displayName="DropdownButtonIcon";const Pf=g.createContext({}),Pa=g.forwardRef((t,n)=>{const{className:e,prepend:o,append:r,isSelected:i,onClick:a,description:s,disabled:l=!1,children:u,tooltip:f,...d}=t,{variant:p="default",selected:h,checkIcon:m,handleItemClick:v}=g.useContext(Pf),y=i??(h==null?void 0:h.some(w=>w.children===u)),x=p!=="default"&&!!m,S=x||o,b=de("io-list-item",S&&"io-list-item-left",r&&"io-list-item-right",p!=="default"&&y&&"selected",s&&"io-list-item-description",l&&"io-list-item-disabled",e);return c.jsxs("li",{className:b,ref:n,role:"menuitem","aria-roledescription":"menuitem",tabIndex:0,onClick:w=>{l?w.preventDefault():(v==null||v(w,{children:u}),a==null||a(w))},...d,children:[S&&c.jsxs("div",{className:"io-list-left-column",children:[x&&c.jsx(lt,{variant:m.variant,title:y?m.tooltip:void 0,"data-testid":"list-item-check-icon"}),o]}),c.jsx("span",{className:"io-list-text",title:f,"data-testid":"list-item-title",children:u}),r&&c.jsx("div",{className:"io-list-right-column",children:r}),s&&c.jsx("div",{className:"io-list-text-description",children:s})]})});Pa.displayName="ListItem";const il=g.forwardRef(({className:t,prepend:n,append:e,children:o,tooltip:r,...i},a)=>{const s=de("io-list-item",n&&"io-list-item-left",e&&"io-list-item-right","io-list-item-title",t);return c.jsxs("li",{className:s,ref:a,...i,children:[n&&c.jsx("div",{className:"io-list-left-column",children:n}),c.jsx("span",{className:"io-list-text",title:r,"data-testid":"list-item-title",children:o}),e&&c.jsx("div",{className:"io-list-right-column",children:e})]})});il.displayName="ListItemTitle";const al=g.forwardRef(({className:t,prepend:n,append:e,children:o,tooltip:r,...i},a)=>{const s=de("io-list-item",n&&"io-list-item-left",e&&"io-list-item-right","io-list-item-section",t);return c.jsxs("li",{className:s,ref:a,...i,children:[n&&c.jsx("div",{className:"io-list-left-column",children:n}),c.jsx("span",{className:"io-list-text",title:r,children:o}),e&&c.jsx("div",{className:"io-list-right-column",children:e})]})});al.displayName="ListItemSection";const Af=g.forwardRef(({className:t,prepend:n,append:e,children:o,tooltip:r,...i},a)=>{const s=de("io-list-item-header",t);return c.jsxs("div",{className:s,ref:a,...i,children:[n&&c.jsx("div",{className:"io-list-left-column",children:n}),c.jsx("span",{className:"io-list-text",title:r,children:o}),e&&c.jsx("div",{className:"io-list-right-column",children:e})]})});Af.displayName="ListItemHeader";const Tf=g.forwardRef(({className:t,children:n,...e},o)=>{const r=de("io-list-item","io-list-with-sub-items",t);return c.jsx("li",{className:r,ref:o,...e,children:n})});Tf.displayName="ListItemWithSubItems";const Df=g.forwardRef((t,n)=>{const{className:e,variant:o="default",checkIcon:r,children:i,...a}=t,[s,l]=g.useState([]),u=de("io-list",o!=="default"&&"io-list-selectable",e),f=g.useMemo(()=>{if(r)return typeof r=="object"?r:{variant:r}},[r]),d=g.useCallback((h,m)=>{if(o==="default")return;const v=s.some(y=>{var x,S;return((x=y.children)==null?void 0:x.toString())===((S=m.children)==null?void 0:S.toString())});o==="single"?l([m]):(()=>{const y=v?s.filter(x=>x.children!==m.children):[...s,m];l(y)})()},[s,o]),p=g.useMemo(()=>({variant:o,selected:s,checkIcon:f,handleItemClick:d}),[o,s,f,d]);return c.jsx(Pf.Provider,{value:p,children:c.jsx("ul",{className:u,ref:n,...a,children:i})})});Df.displayName="List";const mt=Df;mt.Item=Pa,mt.ItemTitle=il,mt.ItemSection=al,mt.ItemHeader=Af,mt.ItemWithSubItems=Tf;const Mf=g.forwardRef((t,n)=>c.jsx(mt,{...t,ref:n}));Mf.displayName="DropdownList";const _f=g.forwardRef((t,n)=>{const{handleClose:e}=g.useContext(Ia),{onClick:o,onKeyDown:r,...i}=t,a=g.useRef(null),s=g.useCallback(l=>{a.current=l,typeof n=="function"?n(l):n&&(n.current=l)},[n]);return c.jsx(Pa,{...i,ref:s,onClick:l=>{o==null||o(l),e==null||e()},onKeyDown:l=>{if(r==null||r(l),l.defaultPrevented||!ho(l))return;l.preventDefault(),l.stopPropagation();const u=(typeof n=="function"?null:n==null?void 0:n.current)||a.current;u==null||u.click()}})});_f.displayName="DropdownItem";const Lf=g.forwardRef((t,n)=>c.jsx(il,{...t,ref:n}));Lf.displayName="DropdownItemTitle";const Rf=g.forwardRef((t,n)=>c.jsx(al,{...t,ref:n}));function gi({className:t,...n}){const e=de("io-separator",t);return c.jsx("hr",{className:e,...n})}Rf.displayName="DropdownItemSection";const Ff=g.forwardRef((t,n)=>c.jsx(gi,{...t}));Ff.displayName="DropdownSeparator";function tc(t,n,e){const o=g.useCallback(r=>{n.some(a=>r.key===a)&&(r.preventDefault(),t())},[t,n]);g.useEffect(()=>{const r=(e==null?void 0:e.current)||document;return r.addEventListener("keydown",o),()=>{r.removeEventListener("keydown",o)}},[o,e])}const xe=g.forwardRef(({className:t,variant:n="outline",align:e="down",disabled:o,isOpen:r,onOpenChange:i,children:a,...s},l)=>{const u=g.useRef(null),f=g.useRef(null);g.useImperativeHandle(l,()=>f.current,[]);const{isOpen:d,handleOpen:p,handleClose:h}=((y,x)=>{const[S,b]=g.useState(!1),w=y!==void 0,E=w?y:S,j=g.useCallback(F=>{w||b(F),x==null||x(F)},[w,x]),_=g.useCallback(()=>j(!0),[j]),M=g.useCallback(()=>j(!1),[j]);return{isOpen:E,setOpen:j,handleOpen:_,handleClose:M}})(r,i);((y,x,S=!0)=>{g.useEffect(()=>{if(!S)return;const b=E=>{const j=E.target;j&&y.current&&!y.current.contains(j)&&(E.composedPath&&E.composedPath().some(_=>_===y.current||y.current&&_.nodeType===Node.ELEMENT_NODE&&y.current.contains(_))||x())},w=requestAnimationFrame(()=>{document.addEventListener("mousedown",b,!0)});return()=>{cancelAnimationFrame(w),document.removeEventListener("mousedown",b,!0)}},[y,x,S])})(f,h,d),tc(()=>{d&&h()},["Escape"],f),tc(()=>{d||o||u.current!==document.activeElement||p()},["ArrowDown","ArrowUp"],f);const m=g.useMemo(()=>({variant:n,align:e,disabled:o,isOpen:d,handleOpen:p,handleClose:h,handleToggle:d?h:p,setTriggerRef:y=>u.current=y}),[n,e,o,d,p,h]),v=de("io-dropdown",d&&"io-dropdown-open",n!=="default"&&`io-dropdown-${n}`,t);return c.jsx(Ia.Provider,{value:m,children:c.jsx("div",{className:v,ref:f,...s,children:a})})});function Be({className:t,variant:n="default",align:e="left",children:o,...r}){const i=de("io-btn-group",n!=="default"&&`io-btn-group-${n}`,e==="right"&&"io-btn-group-right",t);return c.jsx("div",{className:i,"data-testid":"button-group",...r,children:o})}function Zt({className:t,draggable:n=!1,children:e,...o}){const r=de("io-header",n&&["draggable"],t);return c.jsx("header",{className:r,...o,children:e})}function Tr({className:t,children:n,...e}){const o=de("io-dialog-header",t);return c.jsx(Zt,{"data-testid":"io-dialog-header",className:o,...e,children:n})}function Sv({className:t,children:n,...e}){const o=de("io-dialog-body",t);return c.jsx("div",{"data-testid":"io-dialog-body",className:o,...e,children:n})}function Io({className:t,children:n,...e}){const o=de("io-footer",t);return c.jsx("footer",{className:o,...e,children:n})}function Ei({className:t,...n}){const e=de("io-dialog-footer",t);return c.jsx(Io,{"data-testid":"io-dialog-footer",className:e,...n})}function Aa(){return typeof window<"u"}function fo(t){return Bf(t)?(t.nodeName||"").toLowerCase():"#document"}function Jt(t){var n;return(t==null||(n=t.ownerDocument)==null?void 0:n.defaultView)||window}function En(t){var n;return(n=(Bf(t)?t.ownerDocument:t.document)||window.document)==null?void 0:n.documentElement}function Bf(t){return!!Aa()&&(t instanceof Node||t instanceof Jt(t).Node)}function Qe(t){return!!Aa()&&(t instanceof Element||t instanceof Jt(t).Element)}function gt(t){return!!Aa()&&(t instanceof HTMLElement||t instanceof Jt(t).HTMLElement)}function nc(t){return!(!Aa()||typeof ShadowRoot>"u")&&(t instanceof ShadowRoot||t instanceof Jt(t).ShadowRoot)}xe.Button=Of,xe.ButtonIcon=Nf,xe.Content=If,xe.List=Mf,xe.Item=_f,xe.ItemTitle=Lf,xe.ItemSection=Rf,xe.Separator=Ff,Be.Button=Je,Be.ButtonIcon=Ge,Be.Dropdown=xe,Zt.Title=Nn,Zt.ButtonGroup=Be,Zt.Button=Je,Zt.ButtonIcon=Ge,Zt.Dropdown=xe,Tr.Title=Nn,Tr.ButtonGroup=Be,Tr.Button=Je,Tr.ButtonIcon=Ge,Tr.Dropdown=xe,Sv.Content=function({className:t,children:n,...e}){const o=de("io-dialog-content",t);return c.jsx("div",{className:o,...e,children:n})},Io.ButtonGroup=Be,Io.Button=Je,Io.ButtonIcon=Ge,Io.Dropdown=xe,Ei.ButtonGroup=Be,Ei.Button=Je,Ei.ButtonIcon=Ge,Ei.Dropdown=xe;const kv=new Set(["inline","contents"]);function ti(t){const{overflow:n,overflowX:e,overflowY:o,display:r}=sn(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+e)&&!kv.has(r)}const Ev=new Set(["table","td","th"]);function jv(t){return Ev.has(fo(t))}const Ov=[":popover-open",":modal"];function oa(t){return Ov.some(n=>{try{return t.matches(n)}catch{return!1}})}const Nv=["transform","translate","scale","rotate","perspective"],Iv=["transform","translate","scale","rotate","perspective","filter"],Pv=["paint","layout","strict","content"];function oc(t){const n=Ta(),e=Qe(t)?sn(t):t;return Nv.some(o=>!!e[o]&&e[o]!=="none")||!!e.containerType&&e.containerType!=="normal"||!n&&!!e.backdropFilter&&e.backdropFilter!=="none"||!n&&!!e.filter&&e.filter!=="none"||Iv.some(o=>(e.willChange||"").includes(o))||Pv.some(o=>(e.contain||"").includes(o))}function Ta(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Av=new Set(["html","body","#document"]);function so(t){return Av.has(fo(t))}function sn(t){return Jt(t).getComputedStyle(t)}function Da(t){return Qe(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function zn(t){if(fo(t)==="html")return t;const n=t.assignedSlot||t.parentNode||nc(t)&&t.host||En(t);return nc(n)?n.host:n}function Hf(t){const n=zn(t);return so(n)?t.ownerDocument?t.ownerDocument.body:t.body:gt(n)&&ti(n)?n:Hf(n)}function co(t,n,e){var o;n===void 0&&(n=[]),e===void 0&&(e=!0);const r=Hf(t),i=r===((o=t.ownerDocument)==null?void 0:o.body),a=Jt(r);if(i){const s=rc(a);return n.concat(a,a.visualViewport||[],ti(r)?r:[],s&&e?co(s):[])}return n.concat(r,co(r,[],e))}function rc(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function $n(t){let n=t.activeElement;for(;((e=n)==null||(e=e.shadowRoot)==null?void 0:e.activeElement)!=null;){var e;n=n.shadowRoot.activeElement}return n}function Ct(t,n){if(!t||!n)return!1;const e=n.getRootNode==null?void 0:n.getRootNode();if(t.contains(n))return!0;if(e&&nc(e)){let o=n;for(;o;){if(t===o)return!0;o=o.parentNode||o.host}}return!1}function $f(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function Wf(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(n=>{let{brand:e,version:o}=n;return e+"/"+o}).join(" "):navigator.userAgent}function zf(t){return!(t.mozInputSource!==0||!t.isTrusted)||(ic()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType)}function Uf(t){return!Wf().includes("jsdom/")&&(!ic()&&t.width===0&&t.height===0||ic()&&t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"||t.width<1&&t.height<1&&t.pressure===0&&t.detail===0&&t.pointerType==="touch")}function Vf(){return/apple/i.test(navigator.vendor)}function ic(){const t=/android/i;return t.test($f())||t.test(Wf())}function Ur(t,n){const e=["mouse","pen"];return n||e.push("",void 0),e.includes(t)}function Pt(t){return(t==null?void 0:t.ownerDocument)||document}function vs(t,n){if(n==null)return!1;if("composedPath"in t)return t.composedPath().includes(n);const e=t;return e.target!=null&&n.contains(e.target)}function Qn(t){return"composedPath"in t?t.composedPath()[0]:t.target}function Yf(t){return gt(t)&&t.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function Lt(t){t.preventDefault(),t.stopPropagation()}function ac(t){return!!t&&t.getAttribute("role")==="combobox"&&Yf(t)}const ra=Math.min,Do=Math.max,ia=Math.round,nr=Math.floor,jn=t=>({x:t,y:t}),Tv={left:"right",right:"left",bottom:"top",top:"bottom"},Dv={start:"end",end:"start"};function ku(t,n,e){return Do(t,ra(n,e))}function Ma(t,n){return typeof t=="function"?t(n):t}function Ro(t){return t.split("-")[0]}function _a(t){return t.split("-")[1]}function Gf(t){return t==="x"?"y":"x"}function Kf(t){return t==="y"?"height":"width"}const Mv=new Set(["top","bottom"]);function ro(t){return Mv.has(Ro(t))?"y":"x"}function Zf(t){return Gf(ro(t))}function sc(t){return t.replace(/start|end/g,n=>Dv[n])}const Eu=["left","right"],ju=["right","left"],_v=["top","bottom"],Lv=["bottom","top"];function Rv(t,n,e,o){const r=_a(t);let i=function(a,s,l){switch(a){case"top":case"bottom":return l?s?ju:Eu:s?Eu:ju;case"left":case"right":return s?_v:Lv;default:return[]}}(Ro(t),e==="start",o);return r&&(i=i.map(a=>a+"-"+r),n&&(i=i.concat(i.map(sc)))),i}function ji(t){return t.replace(/left|right|bottom|top/g,n=>Tv[n])}function aa(t){const{x:n,y:e,width:o,height:r}=t;return{width:o,height:r,top:e,left:n,right:n+o,bottom:e+r,x:n,y:e}}/*!
6
6
  * tabbable 6.2.0
7
7
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
8
- */var ra=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),Gf=typeof Element>"u",hr=Gf?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Wi=!Gf&&Element.prototype.getRootNode?function(t){var n;return t==null||(n=t.getRootNode)===null||n===void 0?void 0:n.call(t)}:function(t){return t==null?void 0:t.ownerDocument},ia=function t(n,e){var o;e===void 0&&(e=!0);var r=n==null||(o=n.getAttribute)===null||o===void 0?void 0:o.call(n,"inert");return r===""||r==="true"||e&&n&&t(n.parentNode)},Mv=function t(n,e,o){for(var r=[],i=Array.from(n);i.length;){var a=i.shift();if(!ia(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=t(s.length?s:a.children,!0,o);o.flatten?r.push.apply(r,l):r.push({scopeParent:a,candidates:l})}else{hr.call(a,ra)&&o.filter(a)&&(e||!n.includes(a))&&r.push(a);var u=a.shadowRoot||typeof o.getShadowRoot=="function"&&o.getShadowRoot(a),f=!ia(u,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(a));if(u&&f){var d=t(u===!0?a.children:u.children,!0,o);o.flatten?r.push.apply(r,d):r.push({scopeParent:a,candidates:d})}else i.unshift.apply(i,a.children)}}return r},Kf=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Zf=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||function(n){var e,o=n==null||(e=n.getAttribute)===null||e===void 0?void 0:e.call(n,"contenteditable");return o===""||o==="true"}(t))&&!Kf(t)?0:t.tabIndex},_v=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},qf=function(t){return t.tagName==="INPUT"},Lv=function(t){return function(n){return qf(n)&&n.type==="radio"}(t)&&!function(n){if(!n.name)return!0;var e,o=n.form||Wi(n),r=function(a){return o.querySelectorAll('input[type="radio"][name="'+a+'"]')};if(typeof window<"u"&&window.CSS!==void 0&&typeof window.CSS.escape=="function")e=r(window.CSS.escape(n.name));else try{e=r(n.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=function(a,s){for(var l=0;l<a.length;l++)if(a[l].checked&&a[l].form===s)return a[l]}(e,n.form);return!i||i===n}(t)},ku=function(t){var n=t.getBoundingClientRect(),e=n.width,o=n.height;return e===0&&o===0},Rv=function(t,n){var e=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var r=hr.call(t,"details>summary:first-of-type")?t.parentElement:t;if(hr.call(r,"details:not([open]) *"))return!0;if(e&&e!=="full"&&e!=="legacy-full"){if(e==="non-zero-area")return ku(t)}else{if(typeof o=="function"){for(var i=t;t;){var a=t.parentElement,s=Wi(t);if(a&&!a.shadowRoot&&o(a)===!0)return ku(t);t=t.assignedSlot?t.assignedSlot:a||s===t.ownerDocument?a:s.host}t=i}if(function(l){var u,f,d,p,h=l&&Wi(l),m=(u=h)===null||u===void 0?void 0:u.host,v=!1;if(h&&h!==l)for(v=!!((f=m)!==null&&f!==void 0&&(d=f.ownerDocument)!==null&&d!==void 0&&d.contains(m)||l!=null&&(p=l.ownerDocument)!==null&&p!==void 0&&p.contains(l));!v&&m;){var y,w,k;v=!((w=m=(y=h=Wi(m))===null||y===void 0?void 0:y.host)===null||w===void 0||(k=w.ownerDocument)===null||k===void 0||!k.contains(m))}return v}(t))return!t.getClientRects().length;if(e!=="legacy-full")return!0}return!1},Fv=function(t,n){return!(n.disabled||ia(n)||function(e){return qf(e)&&e.type==="hidden"}(n)||Rv(n,t)||function(e){return e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(o){return o.tagName==="SUMMARY"})}(n)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var o=e.parentElement;o;){if(o.tagName==="FIELDSET"&&o.disabled){for(var r=0;r<o.children.length;r++){var i=o.children.item(r);if(i.tagName==="LEGEND")return!!hr.call(o,"fieldset[disabled] *")||!i.contains(e)}return!0}o=o.parentElement}return!1}(n))},ic=function(t,n){return!(Lv(n)||Zf(n)<0||!Fv(t,n))},Bv=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Hv=function t(n){var e=[],o=[];return n.forEach(function(r,i){var a=!!r.scopeParent,s=a?r.scopeParent:r,l=function(f,d){var p=Zf(f);return p<0&&d&&!Kf(f)?0:p}(s,a),u=a?t(r.candidates):s;l===0?a?e.push.apply(e,u):e.push(s):o.push({documentOrder:i,tabIndex:l,item:r,isScope:a,content:u})}),o.sort(_v).reduce(function(r,i){return i.isScope?r.push.apply(r,i.content):r.push(i.content),r},[]).concat(e)},rl=function(t,n){var e;return e=(n=n||{}).getShadowRoot?Mv([t],n.includeContainer,{filter:ic.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Bv}):function(o,r,i){if(ia(o))return[];var a=Array.prototype.slice.apply(o.querySelectorAll(ra));return r&&hr.call(o,ra)&&a.unshift(o),a.filter(i)}(t,n.includeContainer,ic.bind(null,n)),Hv(e)};function Eu(t,n,e){let{reference:o,floating:r}=t;const i=ro(n),a=Yf(n),s=Vf(a),l=Lo(n),u=i==="y",f=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,p=o[s]/2-r[s]/2;let h;switch(l){case"top":h={x:f,y:o.y-r.height};break;case"bottom":h={x:f,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:d};break;case"left":h={x:o.x-r.width,y:d};break;default:h={x:o.x,y:o.y}}switch(Ta(n)){case"start":h[a]-=p*(e&&u?-1:1);break;case"end":h[a]+=p*(e&&u?-1:1)}return h}async function Jf(t,n){var e;n===void 0&&(n={});const{x:o,y:r,platform:i,rects:a,elements:s,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=Aa(n,t),m=function(E){return typeof E!="number"?function(j){return{top:0,right:0,bottom:0,left:0,...j}}(E):{top:E,right:E,bottom:E,left:E}}(h),v=s[p?d==="floating"?"reference":"floating":d],y=oa(await i.getClippingRect({element:(e=await(i.isElement==null?void 0:i.isElement(v)))==null||e?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:f,strategy:l})),w=d==="floating"?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),x=await(i.isElement==null?void 0:i.isElement(k))&&await(i.getScale==null?void 0:i.getScale(k))||{x:1,y:1},b=oa(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:k,strategy:l}):w);return{top:(y.top-b.top+m.top)/x.y,bottom:(b.bottom-y.bottom+m.bottom)/x.y,left:(y.left-b.left+m.left)/x.x,right:(b.right-y.right+m.right)/x.x}}const $v=new Set(["left","top"]);function Xf(t){const n=sn(t);let e=parseFloat(n.width)||0,o=parseFloat(n.height)||0;const r=gt(t),i=r?t.offsetWidth:e,a=r?t.offsetHeight:o,s=na(e)!==i||na(o)!==a;return s&&(e=i,o=a),{width:e,height:o,$:s}}function il(t){return Qe(t)?t:t.contextElement}function sr(t){const n=il(t);if(!gt(n))return jn(1);const e=n.getBoundingClientRect(),{width:o,height:r,$:i}=Xf(n);let a=(i?na(e.width):e.width)/o,s=(i?na(e.height):e.height)/r;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Wv=jn(0);function Qf(t){const n=Jt(t);return Ia()&&n.visualViewport?{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}:Wv}function Ro(t,n,e,o){n===void 0&&(n=!1),e===void 0&&(e=!1);const r=t.getBoundingClientRect(),i=il(t);let a=jn(1);n&&(o?Qe(o)&&(a=sr(o)):a=sr(t));const s=function(p,h,m){return h===void 0&&(h=!1),!(!m||h&&m!==Jt(p))&&h}(i,e,o)?Qf(i):jn(0);let l=(r.left+s.x)/a.x,u=(r.top+s.y)/a.y,f=r.width/a.x,d=r.height/a.y;if(i){const p=Jt(i),h=o&&Qe(o)?Jt(o):o;let m=p,v=tc(m);for(;v&&o&&h!==m;){const y=sr(v),w=v.getBoundingClientRect(),k=sn(v),x=w.left+(v.clientLeft+parseFloat(k.paddingLeft))*y.x,b=w.top+(v.clientTop+parseFloat(k.paddingTop))*y.y;l*=y.x,u*=y.y,f*=y.x,d*=y.y,l+=x,u+=b,m=Jt(v),v=tc(m)}}return oa({width:f,height:d,x:l,y:u})}function al(t,n){const e=Pa(t).scrollLeft;return n?n.left+e:Ro(En(t)).left+e}function ep(t,n,e){e===void 0&&(e=!1);const o=t.getBoundingClientRect();return{x:o.left+n.scrollLeft-(e?0:al(t,o)),y:o.top+n.scrollTop}}const zv=new Set(["absolute","fixed"]);function ju(t,n,e){let o;if(n==="viewport")o=function(r,i){const a=Jt(r),s=En(r),l=a.visualViewport;let u=s.clientWidth,f=s.clientHeight,d=0,p=0;if(l){u=l.width,f=l.height;const h=Ia();(!h||h&&i==="fixed")&&(d=l.offsetLeft,p=l.offsetTop)}return{width:u,height:f,x:d,y:p}}(t,e);else if(n==="document")o=function(r){const i=En(r),a=Pa(r),s=r.ownerDocument.body,l=To(i.scrollWidth,i.clientWidth,s.scrollWidth,s.clientWidth),u=To(i.scrollHeight,i.clientHeight,s.scrollHeight,s.clientHeight);let f=-a.scrollLeft+al(r);const d=-a.scrollTop;return sn(s).direction==="rtl"&&(f+=To(i.clientWidth,s.clientWidth)-l),{width:l,height:u,x:f,y:d}}(En(t));else if(Qe(n))o=function(r,i){const a=Ro(r,!0,i==="fixed"),s=a.top+r.clientTop,l=a.left+r.clientLeft,u=gt(r)?sr(r):jn(1);return{width:r.clientWidth*u.x,height:r.clientHeight*u.y,x:l*u.x,y:s*u.y}}(n,e);else{const r=Qf(t);o={x:n.x-r.x,y:n.y-r.y,width:n.width,height:n.height}}return oa(o)}function tp(t,n){const e=zn(t);return!(e===n||!Qe(e)||so(e))&&(sn(e).position==="fixed"||tp(e,n))}function Uv(t,n,e){const o=gt(n),r=En(n),i=e==="fixed",a=Ro(t,!0,i,n);let s={scrollLeft:0,scrollTop:0};const l=jn(0);function u(){l.x=al(r)}if(o||!o&&!i)if((fo(n)!=="body"||ei(r))&&(s=Pa(n)),o){const d=Ro(n,!0,i,n);l.x=d.x+n.clientLeft,l.y=d.y+n.clientTop}else r&&u();i&&!o&&r&&u();const f=!r||o||i?jn(0):ep(r,s);return{x:a.left+s.scrollLeft-l.x-f.x,y:a.top+s.scrollTop-l.y-f.y,width:a.width,height:a.height}}function ms(t){return sn(t).position==="static"}function Ou(t,n){if(!gt(t)||sn(t).position==="fixed")return null;if(n)return n(t);let e=t.offsetParent;return En(t)===e&&(e=e.ownerDocument.body),e}function Nu(t,n){const e=Jt(t);if(ea(t))return e;if(!gt(t)){let r=zn(t);for(;r&&!so(r);){if(Qe(r)&&!ms(r))return r;r=zn(r)}return e}let o=Ou(t,n);for(;o&&Cv(o)&&ms(o);)o=Ou(o,n);return o&&so(o)&&ms(o)&&!ec(o)?e:o||function(r){let i=zn(r);for(;gt(i)&&!so(i);){if(ec(i))return i;if(ea(i))return null;i=zn(i)}return null}(t)||e}const Vv={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:n,rect:e,offsetParent:o,strategy:r}=t;const i=r==="fixed",a=En(o),s=!!n&&ea(n.floating);if(o===a||s&&i)return e;let l={scrollLeft:0,scrollTop:0},u=jn(1);const f=jn(0),d=gt(o);if((d||!d&&!i)&&((fo(o)!=="body"||ei(a))&&(l=Pa(o)),gt(o))){const h=Ro(o);u=sr(o),f.x=h.x+o.clientLeft,f.y=h.y+o.clientTop}const p=!a||d||i?jn(0):ep(a,l,!0);return{width:e.width*u.x,height:e.height*u.y,x:e.x*u.x-l.scrollLeft*u.x+f.x+p.x,y:e.y*u.y-l.scrollTop*u.y+f.y+p.y}},getDocumentElement:En,getClippingRect:function(t){let{element:n,boundary:e,rootBoundary:o,strategy:r}=t;const i=[...e==="clippingAncestors"?ea(n)?[]:function(l,u){const f=u.get(l);if(f)return f;let d=co(l,[],!1).filter(v=>Qe(v)&&fo(v)!=="body"),p=null;const h=sn(l).position==="fixed";let m=h?zn(l):l;for(;Qe(m)&&!so(m);){const v=sn(m),y=ec(m);y||v.position!=="fixed"||(p=null),(h?!y&&!p:!y&&v.position==="static"&&p&&zv.has(p.position)||ei(m)&&!y&&tp(l,m))?d=d.filter(w=>w!==m):p=v,m=zn(m)}return u.set(l,d),d}(n,this._c):[].concat(e),o],a=i[0],s=i.reduce((l,u)=>{const f=ju(n,u,r);return l.top=To(f.top,l.top),l.right=ta(f.right,l.right),l.bottom=ta(f.bottom,l.bottom),l.left=To(f.left,l.left),l},ju(n,a,r));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Nu,getElementRects:async function(t){const n=this.getOffsetParent||Nu,e=this.getDimensions,o=await e(t.floating);return{reference:Uv(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:n,height:e}=Xf(t);return{width:n,height:e}},getScale:sr,isElement:Qe,isRTL:function(t){return sn(t).direction==="rtl"}};function Iu(t,n){return t.x===n.x&&t.y===n.y&&t.width===n.width&&t.height===n.height}function Yv(t,n,e,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=il(t),f=r||i?[...u?co(u):[],...co(n)]:[];f.forEach(y=>{r&&y.addEventListener("scroll",e,{passive:!0}),i&&y.addEventListener("resize",e)});const d=u&&s?function(y,w){let k,x=null;const b=En(y);function E(){var j;clearTimeout(k),(j=x)==null||j.disconnect(),x=null}return function j(B,F){B===void 0&&(B=!1),F===void 0&&(F=1),E();const L=y.getBoundingClientRect(),{left:D,top:T,width:P,height:re}=L;if(B||w(),!P||!re)return;const ae={rootMargin:-tr(T)+"px "+-tr(b.clientWidth-(D+P))+"px "+-tr(b.clientHeight-(T+re))+"px "+-tr(D)+"px",threshold:To(0,ta(1,F))||1};let z=!0;function ee(q){const ie=q[0].intersectionRatio;if(ie!==F){if(!z)return j();ie?j(!1,ie):k=setTimeout(()=>{j(!1,1e-7)},1e3)}ie!==1||Iu(L,y.getBoundingClientRect())||j(),z=!1}try{x=new IntersectionObserver(ee,{...ae,root:b.ownerDocument})}catch{x=new IntersectionObserver(ee,ae)}x.observe(y)}(!0),E}(u,e):null;let p,h=-1,m=null;a&&(m=new ResizeObserver(y=>{let[w]=y;w&&w.target===u&&m&&(m.unobserve(n),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var k;(k=m)==null||k.observe(n)})),e()}),u&&!l&&m.observe(u),m.observe(n));let v=l?Ro(t):null;return l&&function y(){const w=Ro(t);v&&!Iu(v,w)&&e(),v=w,p=requestAnimationFrame(y)}(),e(),()=>{var y;f.forEach(w=>{r&&w.removeEventListener("scroll",e),i&&w.removeEventListener("resize",e)}),d==null||d(),(y=m)==null||y.disconnect(),m=null,l&&cancelAnimationFrame(p)}}const Gv=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(n){var e,o;const{x:r,y:i,placement:a,middlewareData:s}=n,l=await async function(u,f){const{placement:d,platform:p,elements:h}=u,m=await(p.isRTL==null?void 0:p.isRTL(h.floating)),v=Lo(d),y=Ta(d),w=ro(d)==="y",k=$v.has(v)?-1:1,x=m&&w?-1:1,b=Aa(f,u);let{mainAxis:E,crossAxis:j,alignmentAxis:B}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return y&&typeof B=="number"&&(j=y==="end"?-1*B:B),w?{x:j*x,y:E*k}:{x:E*k,y:j*x}}(n,t);return a===((e=s.offset)==null?void 0:e.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:a}}}}},Kv=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(n){const{x:e,y:o,placement:r}=n,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:y=>{let{x:w,y:k}=y;return{x:w,y:k}}},...l}=Aa(t,n),u={x:e,y:o},f=await Jf(n,l),d=ro(Lo(r)),p=Uf(d);let h=u[p],m=u[d];if(i){const y=p==="y"?"bottom":"right";h=xu(h+f[p==="y"?"top":"left"],h,h-f[y])}if(a){const y=d==="y"?"bottom":"right";m=xu(m+f[d==="y"?"top":"left"],m,m-f[y])}const v=s.fn({...n,[p]:h,[d]:m});return{...v,data:{x:v.x-e,y:v.y-o,enabled:{[p]:i,[d]:a}}}}}},Zv=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(n){var e,o;const{placement:r,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:u}=n,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:v=!0,...y}=Aa(t,n);if((e=i.arrow)!=null&&e.alignmentOffset)return{};const w=Lo(r),k=ro(s),x=Lo(s)===s,b=await(l.isRTL==null?void 0:l.isRTL(u.floating)),E=p||(x||!v?[Ei(s)]:function(ae){const z=Ei(ae);return[rc(ae),z,rc(z)]}(s)),j=m!=="none";!p&&j&&E.push(...Dv(s,v,m,b));const B=[s,...E],F=await Jf(n,y),L=[];let D=((o=i.flip)==null?void 0:o.overflows)||[];if(f&&L.push(F[w]),d){const ae=function(z,ee,q){q===void 0&&(q=!1);const ie=Ta(z),J=Yf(z),W=Vf(J);let Q=J==="x"?ie===(q?"end":"start")?"right":"left":ie==="start"?"bottom":"top";return ee.reference[W]>ee.floating[W]&&(Q=Ei(Q)),[Q,Ei(Q)]}(r,a,b);L.push(F[ae[0]],F[ae[1]])}if(D=[...D,{placement:r,overflows:L}],!L.every(ae=>ae<=0)){var T,P;const ae=(((T=i.flip)==null?void 0:T.index)||0)+1,z=B[ae];if(z&&(!(d==="alignment"&&k!==ro(z))||D.every(q=>ro(q.placement)!==k||q.overflows[0]>0)))return{data:{index:ae,overflows:D},reset:{placement:z}};let ee=(P=D.filter(q=>q.overflows[0]<=0).sort((q,ie)=>q.overflows[1]-ie.overflows[1])[0])==null?void 0:P.placement;if(!ee)switch(h){case"bestFit":{var re;const q=(re=D.filter(ie=>{if(j){const J=ro(ie.placement);return J===k||J==="y"}return!0}).map(ie=>[ie.placement,ie.overflows.filter(J=>J>0).reduce((J,W)=>J+W,0)]).sort((ie,J)=>ie[1]-J[1])[0])==null?void 0:re[0];q&&(ee=q);break}case"initialPlacement":ee=s}if(r!==ee)return{reset:{placement:ee}}}return{}}}},qv=(t,n,e)=>{const o=new Map,r={platform:Vv,...e},i={...r.platform,_c:o};return(async(a,s,l)=>{const{placement:u="bottom",strategy:f="absolute",middleware:d=[],platform:p}=l,h=d.filter(Boolean),m=await(p.isRTL==null?void 0:p.isRTL(s));let v=await p.getElementRects({reference:a,floating:s,strategy:f}),{x:y,y:w}=Eu(v,u,m),k=u,x={},b=0;for(let E=0;E<h.length;E++){const{name:j,fn:B}=h[E],{x:F,y:L,data:D,reset:T}=await B({x:y,y:w,initialPlacement:u,placement:k,strategy:f,middlewareData:x,rects:v,platform:p,elements:{reference:a,floating:s}});y=F??y,w=L??w,x={...x,[j]:{...x[j],...D}},T&&b<=50&&(b++,typeof T=="object"&&(T.placement&&(k=T.placement),T.rects&&(v=T.rects===!0?await p.getElementRects({reference:a,floating:s,strategy:f}):T.rects),{x:y,y:w}=Eu(v,k,m)),E=-1)}return{x:y,y:w,placement:k,strategy:f,middlewareData:x}})(t,n,{...r,platform:i})};var zi=typeof document<"u"?g.useLayoutEffect:function(){};function aa(t,n){if(t===n)return!0;if(typeof t!=typeof n)return!1;if(typeof t=="function"&&t.toString()===n.toString())return!0;let e,o,r;if(t&&n&&typeof t=="object"){if(Array.isArray(t)){if(e=t.length,e!==n.length)return!1;for(o=e;o--!==0;)if(!aa(t[o],n[o]))return!1;return!0}if(r=Object.keys(t),e=r.length,e!==Object.keys(n).length)return!1;for(o=e;o--!==0;)if(!{}.hasOwnProperty.call(n,r[o]))return!1;for(o=e;o--!==0;){const i=r[o];if((i!=="_owner"||!t.$$typeof)&&!aa(t[i],n[i]))return!1}return!0}return t!=t&&n!=n}function np(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Pu(t,n){const e=np(t);return Math.round(n*e)/e}function gs(t){const n=G.useRef(t);return zi(()=>{n.current=t}),n}const Jv=(t,n)=>({...Kv(t),options:[t,n]}),Xv=(t,n)=>({...Zv(t),options:[t,n]});function op(t){return G.useMemo(()=>t.every(n=>n==null)?null:n=>{t.forEach(e=>{typeof e=="function"?e(n):e!=null&&(e.current=n)})},t)}const rp={...G},Qv=rp.useInsertionEffect||(t=>t());function Ft(t){const n=G.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Qv(()=>{n.current=t}),G.useCallback(function(){for(var e=arguments.length,o=new Array(e),r=0;r<e;r++)o[r]=arguments[r];return n.current==null?void 0:n.current(...o)},[])}const sl="ArrowUp",Zr="ArrowDown",eo="ArrowLeft",to="ArrowRight";function ji(t,n,e){return Math.floor(t/n)!==e}function Tr(t,n){return n<0||n>=t.current.length}function vs(t,n){return Nt(t,{disabledIndices:n})}function Au(t,n){return Nt(t,{decrement:!0,startingIndex:t.current.length,disabledIndices:n})}function Nt(t,n){let{startingIndex:e=-1,decrement:o=!1,disabledIndices:r,amount:i=1}=n===void 0?{}:n;const a=t.current;let s=e;do s+=o?-i:i;while(s>=0&&s<=a.length-1&&Ui(a,s,r));return s}function e1(t,n,e,o,r){if(t===-1)return-1;const i=e.indexOf(t),a=n[t];switch(r){case"tl":return i;case"tr":return a?i+a.width-1:i;case"bl":return a?i+(a.height-1)*o:i;case"br":return e.lastIndexOf(t)}}function t1(t,n){return n.flatMap((e,o)=>t.includes(e)?[o]:[])}function Ui(t,n,e){if(e)return e.includes(n);const o=t[n];return o==null||o.hasAttribute("disabled")||o.getAttribute("aria-disabled")==="true"}var tt=typeof document<"u"?g.useLayoutEffect:g.useEffect;function n1(t,n){const e=t.compareDocumentPosition(n);return e&Node.DOCUMENT_POSITION_FOLLOWING||e&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:e&Node.DOCUMENT_POSITION_PRECEDING||e&Node.DOCUMENT_POSITION_CONTAINS?1:0}const ip=G.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function o1(t){const{children:n,elementsRef:e,labelsRef:o}=t,[r,i]=G.useState(()=>new Map),a=G.useCallback(l=>{i(u=>new Map(u).set(l,null))},[]),s=G.useCallback(l=>{i(u=>{const f=new Map(u);return f.delete(l),f})},[]);return tt(()=>{const l=new Map(r);Array.from(l.keys()).sort(n1).forEach((u,f)=>{l.set(u,f)}),function(u,f){if(u.size!==f.size)return!1;for(const[d,p]of u.entries())if(p!==f.get(d))return!1;return!0}(r,l)||i(l)},[r]),G.createElement(ip.Provider,{value:G.useMemo(()=>({register:a,unregister:s,map:r,elementsRef:e,labelsRef:o}),[a,s,r,e,o])},n)}function ap(t){t===void 0&&(t={});const{label:n}=t,{register:e,unregister:o,map:r,elementsRef:i,labelsRef:a}=G.useContext(ip),[s,l]=G.useState(null),u=G.useRef(null),f=G.useCallback(d=>{if(u.current=d,s!==null&&(i.current[s]=d,a)){var p;const h=n!==void 0;a.current[s]=h?n:(p=d==null?void 0:d.textContent)!=null?p:null}},[s,i,a,n]);return tt(()=>{const d=u.current;if(d)return e(d),()=>{o(d)}},[e,o]),tt(()=>{const d=u.current?r.get(u.current):null;d!=null&&l(d)},[r]),G.useMemo(()=>({ref:f,index:s??-1}),[s,f])}function sa(){return sa=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},sa.apply(this,arguments)}let Tu=!1,r1=0;const Du=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+r1++,ac=rp.useId||function(){const[t,n]=G.useState(()=>Tu?Du():void 0);return tt(()=>{t==null&&n(Du())},[]),G.useEffect(()=>{Tu=!0},[]),t};let ti;function ys(){for(var t,n=arguments.length,e=new Array(n),o=0;o<n;o++)e[o]=arguments[o];const r="Floating UI: "+e.join(" ");var i;(t=ti)!=null&&t.has(r)||((i=ti)==null||i.add(r),console.warn(r))}function sp(){const t=new Map;return{emit(n,e){var o;(o=t.get(n))==null||o.forEach(r=>r(e))},on(n,e){t.set(n,[...t.get(n)||[],e])},off(n,e){var o;t.set(n,((o=t.get(n))==null?void 0:o.filter(r=>r!==e))||[])}}}process.env.NODE_ENV!=="production"&&(ti=new Set);const cp=G.createContext(null),lp=G.createContext(null),io=()=>{var t;return((t=G.useContext(cp))==null?void 0:t.id)||null},ao=()=>G.useContext(lp);function i1(t){const{children:n,id:e}=t,o=io();return G.createElement(cp.Provider,{value:G.useMemo(()=>({id:e,parentId:o}),[e,o])},n)}function a1(t){const{children:n}=t,e=G.useRef([]),o=G.useCallback(a=>{e.current=[...e.current,a]},[]),r=G.useCallback(a=>{e.current=e.current.filter(s=>s!==a)},[]),i=G.useState(()=>sp())[0];return G.createElement(lp.Provider,{value:G.useMemo(()=>({nodesRef:e,addNode:o,removeNode:r,events:i}),[o,r,i])},n)}function ni(t){return"data-floating-ui-"+t}function pn(t){const n=g.useRef(t);return tt(()=>{n.current=t}),n}const Mu=ni("safe-polygon");function bs(t,n,e){return e&&!zr(e)?0:typeof t=="number"?t:t==null?void 0:t[n]}let _u=0;function Xn(t,n){n===void 0&&(n={});const{preventScroll:e=!1,cancelPrevious:o=!0,sync:r=!1}=n;o&&cancelAnimationFrame(_u);const i=()=>t==null?void 0:t.focus({preventScroll:e});r?i():_u=requestAnimationFrame(i)}function Do(t,n){let e=t.filter(r=>{var i;return r.parentId===n&&((i=r.context)==null?void 0:i.open)}),o=e;for(;o.length;)o=t.filter(r=>{var i;return(i=o)==null?void 0:i.some(a=>{var s;return r.parentId===a.id&&((s=r.context)==null?void 0:s.open)})}),e=e.concat(o);return e}let Vo=new WeakMap,Oi=new WeakSet,Ni={},ws=0;const up=t=>t&&(t.host||up(t.parentNode));function s1(t,n,e,o){const r="data-floating-ui-inert",i=o?"inert":e?"aria-hidden":null,a=((d,p)=>p.map(h=>{if(d.contains(h))return h;const m=up(h);return d.contains(m)?m:null}).filter(h=>h!=null))(n,t),s=new Set,l=new Set(a),u=[];Ni[r]||(Ni[r]=new WeakMap);const f=Ni[r];return a.forEach(function d(p){!p||s.has(p)||(s.add(p),p.parentNode&&d(p.parentNode))}),function d(p){!p||l.has(p)||[].forEach.call(p.children,h=>{if(fo(h)!=="script")if(s.has(h))d(h);else{const m=i?h.getAttribute(i):null,v=m!==null&&m!=="false",y=(Vo.get(h)||0)+1,w=(f.get(h)||0)+1;Vo.set(h,y),f.set(h,w),u.push(h),y===1&&v&&Oi.add(h),w===1&&h.setAttribute(r,""),!v&&i&&h.setAttribute(i,"true")}})}(n),s.clear(),ws++,()=>{u.forEach(d=>{const p=(Vo.get(d)||0)-1,h=(f.get(d)||0)-1;Vo.set(d,p),f.set(d,h),p||(!Oi.has(d)&&i&&d.removeAttribute(i),Oi.delete(d)),h||d.removeAttribute(r)}),ws--,ws||(Vo=new WeakMap,Vo=new WeakMap,Oi=new WeakSet,Ni={})}}function Lu(t,n,e){n===void 0&&(n=!1),e===void 0&&(e=!1);const o=Pt(t[0]).body;return s1(t.concat(Array.from(o.querySelectorAll("[aria-live]"))),o,n,e)}const ca=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Ru(t,n){const e=rl(t,ca());n==="prev"&&e.reverse();const o=e.indexOf($n(Pt(t)));return e.slice(o+1)[0]}function Fu(t,n){const e=n||t.currentTarget,o=t.relatedTarget;return!o||!Ct(e,o)}const cl={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function Bu(t){t.key==="Tab"&&(t.target,clearTimeout(void 0))}const Hu=G.forwardRef(function(t,n){const[e,o]=G.useState();tt(()=>(Wf()&&o("button"),document.addEventListener("keydown",Bu),()=>{document.removeEventListener("keydown",Bu)}),[]);const r={ref:n,tabIndex:0,role:e,"aria-hidden":!e||void 0,[ni("focus-guard")]:"",style:cl};return G.createElement("span",sa({},t,r))}),c1=G.createContext(null),sc="data-floating-ui-focusable";function dp(t){return t?t.hasAttribute(sc)?t:t.querySelector("["+sc+"]")||t:null}let wo=[];function xs(t){wo=wo.filter(e=>e.isConnected);let n=t;if(n&&fo(n)!=="body"){if(!function(e,o){if(o=o||{},!e)throw new Error("No node provided");return hr.call(e,ra)!==!1&&ic(o,e)}(n,ca())){const e=rl(n,ca())[0];e&&(n=e)}wo.push(n),wo.length>20&&(wo=wo.slice(-20))}}function $u(){return wo.slice().reverse().find(t=>t.isConnected)}const l1=G.forwardRef(function(t,n){return G.createElement("button",sa({},t,{type:"button",ref:n,tabIndex:-1,style:cl}))});function u1(t){const{context:n,children:e,disabled:o=!1,order:r=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,restoreFocus:l=!1,modal:u=!0,visuallyHiddenDismiss:f=!1,closeOnFocusOut:d=!0}=t,{open:p,refs:h,nodeId:m,onOpenChange:v,events:y,dataRef:w,floatingId:k,elements:{domReference:x,floating:b}}=n,E=typeof a=="number"&&a<0,j=oc(x)&&E,B=typeof HTMLElement>"u"||!("inert"in HTMLElement.prototype)||i,F=pn(r),L=pn(a),D=pn(s),T=ao(),P=G.useContext(c1),re=G.useRef(null),ae=G.useRef(null),z=G.useRef(!1),ee=G.useRef(!1),q=G.useRef(-1),ie=P!=null,J=dp(b),W=Ft(function(M){return M===void 0&&(M=J),M?rl(M,ca()):[]}),Q=Ft(M=>{const O=W(M);return F.current.map(I=>x&&I==="reference"?x:J&&I==="floating"?J:O).filter(Boolean).flat()});function Y(M){return!o&&f&&u?G.createElement(l1,{ref:M==="start"?re:ae,onClick:O=>v(!1,O.nativeEvent)},typeof f=="string"?f:"Dismiss"):null}G.useEffect(()=>{if(o||!u)return;function M(I){if(I.key==="Tab"){Ct(J,$n(Pt(J)))&&W().length===0&&!j&&_t(I);const R=Q(),U=Qn(I);F.current[0]==="reference"&&U===x&&(_t(I),I.shiftKey?Xn(R[R.length-1]):Xn(R[1])),F.current[1]==="floating"&&U===J&&I.shiftKey&&(_t(I),Xn(R[0]))}}const O=Pt(J);return O.addEventListener("keydown",M),()=>{O.removeEventListener("keydown",M)}},[o,x,J,u,F,j,W,Q]),G.useEffect(()=>{if(!o&&b)return b.addEventListener("focusin",M),()=>{b.removeEventListener("focusin",M)};function M(O){const I=Qn(O),R=W().indexOf(I);R!==-1&&(q.current=R)}},[o,b,W]),G.useEffect(()=>{if(!o&&d)return b&&gt(x)?(x.addEventListener("focusout",O),x.addEventListener("pointerdown",M),b.addEventListener("focusout",O),()=>{x.removeEventListener("focusout",O),x.removeEventListener("pointerdown",M),b.removeEventListener("focusout",O)}):void 0;function M(){ee.current=!0,setTimeout(()=>{ee.current=!1})}function O(I){const R=I.relatedTarget;queueMicrotask(()=>{const U=!(Ct(x,R)||Ct(b,R)||Ct(R,b)||Ct(P==null?void 0:P.portalNode,R)||R!=null&&R.hasAttribute(ni("focus-guard"))||T&&(Do(T.nodesRef.current,m).find(V=>{var se,Z;return Ct((se=V.context)==null?void 0:se.elements.floating,R)||Ct((Z=V.context)==null?void 0:Z.elements.domReference,R)})||function(V,se){var Z;let A=[],me=(Z=V.find(we=>we.id===se))==null?void 0:Z.parentId;for(;me;){const we=V.find(Ie=>Ie.id===me);me=we==null?void 0:we.parentId,we&&(A=A.concat(we))}return A}(T.nodesRef.current,m).find(V=>{var se,Z;return((se=V.context)==null?void 0:se.elements.floating)===R||((Z=V.context)==null?void 0:Z.elements.domReference)===R})));if(l&&U&&$n(Pt(J))===Pt(J).body){gt(J)&&J.focus();const V=q.current,se=W(),Z=se[V]||se[se.length-1]||J;gt(Z)&&Z.focus()}!j&&u||!R||!U||ee.current||R===$u()||(z.current=!0,v(!1,I,"focus-out"))})}},[o,x,b,J,u,m,T,P,v,d,l,W,j]),G.useEffect(()=>{var M;if(o)return;const O=Array.from((P==null||(M=P.portalNode)==null?void 0:M.querySelectorAll("["+ni("portal")+"]"))||[]);if(b){const I=[b,...O,re.current,ae.current,F.current.includes("reference")||j?x:null].filter(U=>U!=null),R=u||j?Lu(I,B,!B):Lu(I);return()=>{R()}}},[o,x,b,u,F,P,j,B]),tt(()=>{if(o||!gt(J))return;const M=$n(Pt(J));queueMicrotask(()=>{const O=Q(J),I=L.current,R=(typeof I=="number"?O[I]:I.current)||J,U=Ct(J,M);E||U||!p||Xn(R,{preventScroll:R===J})})},[o,p,J,E,Q,L]),tt(()=>{if(o||!J)return;let M=!1;const O=Pt(J),I=$n(O);let R=w.current.openEvent;function U(se){let{open:Z,reason:A,event:me,nested:we}=se;Z&&(R=me),A==="escape-key"&&h.domReference.current&&xs(h.domReference.current),A==="hover"&&me.type==="mouseleave"&&(z.current=!0),A==="outside-press"&&(we?(z.current=!1,M=!0):z.current=!(Hf(me)||$f(me)))}xs(I),y.on("openchange",U);const V=O.createElement("span");return V.setAttribute("tabindex","-1"),V.setAttribute("aria-hidden","true"),Object.assign(V.style,cl),ie&&x&&x.insertAdjacentElement("afterend",V),()=>{y.off("openchange",U);const se=$n(O),Z=Ct(b,se)||T&&Do(T.nodesRef.current,m).some(me=>{var we;return Ct((we=me.context)==null?void 0:we.elements.floating,se)});(Z||R&&["click","mousedown"].includes(R.type))&&h.domReference.current&&xs(h.domReference.current);const A=typeof D.current=="boolean"?$u()||V:D.current.current||V;queueMicrotask(()=>{D.current&&!z.current&&gt(A)&&(A===se||se===O.body||Z)&&A.focus({preventScroll:M}),V.remove()})}},[o,b,J,D,w,h,y,T,m,ie,x]),G.useEffect(()=>{queueMicrotask(()=>{z.current=!1})},[o]),tt(()=>{if(!o&&P)return P.setFocusManagerState({modal:u,closeOnFocusOut:d,open:p,onOpenChange:v,refs:h}),()=>{P.setFocusManagerState(null)}},[o,P,u,p,v,h,d]),tt(()=>{if(o||!J||typeof MutationObserver!="function"||E)return;const M=()=>{const I=J.getAttribute("tabindex"),R=W(),U=$n(Pt(b)),V=R.indexOf(U);V!==-1&&(q.current=V),F.current.includes("floating")||U!==h.domReference.current&&R.length===0?I!=="0"&&J.setAttribute("tabindex","0"):I!=="-1"&&J.setAttribute("tabindex","-1")};M();const O=new MutationObserver(M);return O.observe(J,{childList:!0,subtree:!0,attributes:!0}),()=>{O.disconnect()}},[o,b,J,h,F,W,E]);const H=!o&&B&&(!u||!j)&&(ie||u);return G.createElement(G.Fragment,null,H&&G.createElement(Hu,{"data-type":"inside",ref:P==null?void 0:P.beforeInsideRef,onFocus:M=>{if(u){const I=Q();Xn(r[0]==="reference"?I[0]:I[I.length-1])}else if(P!=null&&P.preserveTabOrder&&P.portalNode)if(z.current=!1,Fu(M,P.portalNode)){const I=Ru(document.body,"next")||x;I==null||I.focus()}else{var O;(O=P.beforeOutsideRef.current)==null||O.focus()}}}),!j&&Y("start"),e,Y("end"),H&&G.createElement(Hu,{"data-type":"inside",ref:P==null?void 0:P.afterInsideRef,onFocus:M=>{if(u)Xn(Q()[0]);else if(P!=null&&P.preserveTabOrder&&P.portalNode)if(d&&(z.current=!0),Fu(M,P.portalNode)){const I=Ru(document.body,"prev")||x;I==null||I.focus()}else{var O;(O=P.afterOutsideRef.current)==null||O.focus()}}}))}function Wu(t){return gt(t.target)&&t.target.tagName==="BUTTON"}function zu(t){return zf(t)}const d1={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},f1={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Uu=t=>{var n,e;return{escapeKey:typeof t=="boolean"?t:(n=t==null?void 0:t.escapeKey)!=null&&n,outsidePress:typeof t=="boolean"?t:(e=t==null?void 0:t.outsidePress)==null||e}};function p1(t){const{open:n=!1,onOpenChange:e,elements:o}=t,r=ac(),i=G.useRef({}),[a]=G.useState(()=>sp()),s=io()!=null;if(process.env.NODE_ENV!=="production"){const h=o.reference;h&&!Qe(h)&&function(){for(var m,v=arguments.length,y=new Array(v),w=0;w<v;w++)y[w]=arguments[w];const k="Floating UI: "+y.join(" ");var x;(m=ti)!=null&&m.has(k)||((x=ti)==null||x.add(k),console.error(k))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,u]=G.useState(o.reference),f=Ft((h,m,v)=>{i.current.openEvent=h?m:void 0,a.emit("openchange",{open:h,event:m,reason:v,nested:s}),e==null||e(h,m,v)}),d=G.useMemo(()=>({setPositionReference:u}),[]),p=G.useMemo(()=>({reference:l||o.reference||null,floating:o.floating||null,domReference:o.reference}),[l,o.reference,o.floating]);return G.useMemo(()=>({dataRef:i,open:n,onOpenChange:f,elements:p,events:a,floatingId:r,refs:d}),[n,f,p,a,r,d])}function h1(t){t===void 0&&(t={});const{nodeId:n}=t,e=p1({...t,elements:{reference:null,floating:null,...t.elements}}),o=t.rootContext||e,r=o.elements,[i,a]=G.useState(null),[s,l]=G.useState(null),u=(r==null?void 0:r.domReference)||i,f=G.useRef(null),d=ao();tt(()=>{u&&(f.current=u)},[u]);const p=function(k){k===void 0&&(k={});const{placement:x="bottom",strategy:b="absolute",middleware:E=[],platform:j,elements:{reference:B,floating:F}={},transform:L=!0,whileElementsMounted:D,open:T}=k,[P,re]=G.useState({x:0,y:0,strategy:b,placement:x,middlewareData:{},isPositioned:!1}),[ae,z]=G.useState(E);aa(ae,E)||z(E);const[ee,q]=G.useState(null),[ie,J]=G.useState(null),W=G.useCallback(Oe=>{Oe!==M.current&&(M.current=Oe,q(Oe))},[]),Q=G.useCallback(Oe=>{Oe!==O.current&&(O.current=Oe,J(Oe))},[]),Y=B||ee,H=F||ie,M=G.useRef(null),O=G.useRef(null),I=G.useRef(P),R=D!=null,U=gs(D),V=gs(j),se=gs(T),Z=G.useCallback(()=>{if(!M.current||!O.current)return;const Oe={placement:x,strategy:b,middleware:ae};V.current&&(Oe.platform=V.current),qv(M.current,O.current,Oe).then(ke=>{const ue={...ke,isPositioned:se.current!==!1};A.current&&!aa(I.current,ue)&&(I.current=ue,xf.flushSync(()=>{re(ue)}))})},[ae,x,b,V,se]);zi(()=>{T===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,re(Oe=>({...Oe,isPositioned:!1})))},[T]);const A=G.useRef(!1);zi(()=>(A.current=!0,()=>{A.current=!1}),[]),zi(()=>{if(Y&&(M.current=Y),H&&(O.current=H),Y&&H){if(U.current)return U.current(Y,H,Z);Z()}},[Y,H,Z,U,R]);const me=G.useMemo(()=>({reference:M,floating:O,setReference:W,setFloating:Q}),[W,Q]),we=G.useMemo(()=>({reference:Y,floating:H}),[Y,H]),Ie=G.useMemo(()=>{const Oe={position:b,left:0,top:0};if(!we.floating)return Oe;const ke=Pu(we.floating,P.x),ue=Pu(we.floating,P.y);return L?{...Oe,transform:"translate("+ke+"px, "+ue+"px)",...np(we.floating)>=1.5&&{willChange:"transform"}}:{position:b,left:ke,top:ue}},[b,L,we.floating,P.x,P.y]);return G.useMemo(()=>({...P,update:Z,refs:me,elements:we,floatingStyles:Ie}),[P,Z,me,we,Ie])}({...t,elements:{...r,...s&&{reference:s}}}),h=G.useCallback(k=>{const x=Qe(k)?{getBoundingClientRect:()=>k.getBoundingClientRect(),contextElement:k}:k;l(x),p.refs.setReference(x)},[p.refs]),m=G.useCallback(k=>{(Qe(k)||k===null)&&(f.current=k,a(k)),(Qe(p.refs.reference.current)||p.refs.reference.current===null||k!==null&&!Qe(k))&&p.refs.setReference(k)},[p.refs]),v=G.useMemo(()=>({...p.refs,setReference:m,setPositionReference:h,domReference:f}),[p.refs,m,h]),y=G.useMemo(()=>({...p.elements,domReference:u}),[p.elements,u]),w=G.useMemo(()=>({...p,...o,refs:v,elements:y,nodeId:n}),[p,v,y,n,o]);return tt(()=>{o.dataRef.current.floatingContext=w;const k=d==null?void 0:d.nodesRef.current.find(x=>x.id===n);k&&(k.context=w)}),G.useMemo(()=>({...p,context:w,refs:v,elements:y}),[p,v,y,w])}const Vu="active",Yu="selected";function Cs(t,n,e){const o=new Map,r=e==="item";let i=t;if(r&&t){const{[Vu]:a,[Yu]:s,...l}=t;i=l}return{...e==="floating"&&{tabIndex:-1,[sc]:""},...i,...n.map(a=>{const s=a?a[e]:null;return typeof s=="function"?t?s(t):null:s}).concat(t).reduce((a,s)=>(s&&Object.entries(s).forEach(l=>{let[u,f]=l;var d;r&&[Vu,Yu].includes(u)||(u.indexOf("on")===0?(o.has(u)||o.set(u,[]),typeof f=="function"&&((d=o.get(u))==null||d.push(f),a[u]=function(){for(var p,h=arguments.length,m=new Array(h),v=0;v<h;v++)m[v]=arguments[v];return(p=o.get(u))==null?void 0:p.map(y=>y(...m)).find(y=>y!==void 0)})):a[u]=f)}),a),{})}}let Gu=!1;function Da(t,n,e){switch(t){case"vertical":return n;case"horizontal":return e;default:return n||e}}function Ku(t,n){return Da(n,t===sl||t===Zr,t===eo||t===to)}function Ss(t,n,e){return Da(n,t===Zr,e?t===eo:t===to)||t==="Enter"||t===" "||t===""}function Zu(t,n,e){return Da(n,e?t===to:t===eo,t===sl)}function m1(t,n){const{open:e,onOpenChange:o,elements:r}=t,{listRef:i,activeIndex:a,onNavigate:s=()=>{},enabled:l=!0,selectedIndex:u=null,allowEscape:f=!1,loop:d=!1,nested:p=!1,rtl:h=!1,virtual:m=!1,focusItemOnOpen:v="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:w=!0,disabledIndices:k,orientation:x="vertical",cols:b=1,scrollItemIntoView:E=!0,virtualItemRef:j,itemSizes:B,dense:F=!1}=n;process.env.NODE_ENV!=="production"&&(f&&(d||ys("`useListNavigation` looping must be enabled to allow escaping."),m||ys("`useListNavigation` must be virtual to allow escaping.")),x==="vertical"&&b>1&&ys("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const L=pn(dp(r.floating)),D=io(),T=ao(),P=Ft(s),re=oc(r.domReference),ae=G.useRef(v),z=G.useRef(u??-1),ee=G.useRef(null),q=G.useRef(!0),ie=G.useRef(P),J=G.useRef(!!r.floating),W=G.useRef(e),Q=G.useRef(!1),Y=G.useRef(!1),H=pn(k),M=pn(e),O=pn(E),I=pn(u),[R,U]=G.useState(),[V,se]=G.useState(),Z=Ft(function(ue,S,C){function N($){m?(U($.id),T==null||T.events.emit("virtualfocus",$),j&&(j.current=$)):Xn($,{preventScroll:!0,sync:!(!Ff().toLowerCase().startsWith("mac")||navigator.maxTouchPoints||!Wf())&&(Gu||Q.current)})}C===void 0&&(C=!1);const _=ue.current[S.current];_&&N(_),requestAnimationFrame(()=>{const $=ue.current[S.current]||_;if(!$)return;_||N($);const ce=O.current;ce&&me&&(C||!q.current)&&($.scrollIntoView==null||$.scrollIntoView(typeof ce=="boolean"?{block:"nearest",inline:"nearest"}:ce))})});tt(()=>{document.createElement("div").focus({get preventScroll(){return Gu=!0,!1}})},[]),tt(()=>{l&&(e&&r.floating?ae.current&&u!=null&&(Y.current=!0,z.current=u,P(u)):J.current&&(z.current=-1,ie.current(null)))},[l,e,r.floating,u,P]),tt(()=>{if(l&&e&&r.floating)if(a==null){if(Q.current=!1,I.current!=null)return;if(J.current&&(z.current=-1,Z(i,z)),(!W.current||!J.current)&&ae.current&&(ee.current!=null||ae.current===!0&&ee.current==null)){let ue=0;const S=()=>{i.current[0]==null?(ue<2&&(ue?requestAnimationFrame:queueMicrotask)(S),ue++):(z.current=ee.current==null||Ss(ee.current,x,h)||p?vs(i,H.current):Au(i,H.current),ee.current=null,P(z.current))};S()}}else Tr(i,a)||(z.current=a,Z(i,z,Y.current),Y.current=!1)},[l,e,r.floating,a,I,p,i,x,h,P,Z,H]),tt(()=>{var ue;if(!l||r.floating||!T||m||!J.current)return;const S=T.nodesRef.current,C=(ue=S.find($=>$.id===D))==null||(ue=ue.context)==null?void 0:ue.elements.floating,N=$n(Pt(r.floating)),_=S.some($=>$.context&&Ct($.context.elements.floating,N));C&&!_&&q.current&&C.focus({preventScroll:!0})},[l,r.floating,T,D,m]),tt(()=>{if(l&&T&&m&&!D)return T.events.on("virtualfocus",ue),()=>{T.events.off("virtualfocus",ue)};function ue(S){se(S.id),j&&(j.current=S)}},[l,T,m,D,j]),tt(()=>{ie.current=P,J.current=!!r.floating}),tt(()=>{e||(ee.current=null)},[e]),tt(()=>{W.current=e},[e]);const A=a!=null,me=G.useMemo(()=>{function ue(S){if(!e)return;const C=i.current.indexOf(S);C!==-1&&P(C)}return{onFocus(S){let{currentTarget:C}=S;ue(C)},onClick:S=>{let{currentTarget:C}=S;return C.focus({preventScroll:!0})},...y&&{onMouseMove(S){let{currentTarget:C}=S;ue(C)},onPointerLeave(S){let{pointerType:C}=S;q.current&&C!=="touch"&&(z.current=-1,Z(i,z),P(null),m||Xn(L.current,{preventScroll:!0}))}}}},[e,L,Z,y,i,P,m]),we=Ft(ue=>{if(q.current=!1,Q.current=!0,ue.which===229||!M.current&&ue.currentTarget===L.current)return;if(p&&Zu(ue.key,x,h))return _t(ue),o(!1,ue.nativeEvent,"list-navigation"),void(gt(r.domReference)&&(m?T==null||T.events.emit("virtualfocus",r.domReference):r.domReference.focus()));const S=z.current,C=vs(i,k),N=Au(i,k);if(re||(ue.key==="Home"&&(_t(ue),z.current=C,P(z.current)),ue.key==="End"&&(_t(ue),z.current=N,P(z.current))),b>1){const _=B||Array.from({length:i.current.length},()=>({width:1,height:1})),$=function(ne,te,le){const he=[];let ye=0;return ne.forEach((pe,oe)=>{let{width:Ee,height:Re}=pe;if(Ee>te&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+oe+" is greater than grid columns");let Pe=!1;for(le&&(ye=0);!Pe;){const Ce=[];for(let Ne=0;Ne<Ee;Ne++)for(let ge=0;ge<Re;ge++)Ce.push(ye+Ne+ge*te);ye%te+Ee<=te&&Ce.every(Ne=>he[Ne]==null)?(Ce.forEach(Ne=>{he[Ne]=oe}),Pe=!0):ye++}}),[...he]}(_,b,F),ce=$.findIndex(ne=>ne!=null&&!Ui(i.current,ne,k)),be=$.reduce((ne,te,le)=>te==null||Ui(i.current,te,k)?ne:le,-1),X=$[function(ne,te){let{event:le,orientation:he,loop:ye,rtl:pe,cols:oe,disabledIndices:Ee,minIndex:Re,maxIndex:Pe,prevIndex:Ce,stopEvent:Ne=!1}=te,ge=Ce;if(le.key===sl){if(Ne&&_t(le),Ce===-1)ge=Pe;else if(ge=Nt(ne,{startingIndex:ge,amount:oe,decrement:!0,disabledIndices:Ee}),ye&&(Ce-oe<Re||ge<0)){const Se=Ce%oe,Me=Pe%oe,Ae=Pe-(Me-Se);ge=Me===Se?Pe:Me>Se?Ae:Ae-oe}Tr(ne,ge)&&(ge=Ce)}if(le.key===Zr&&(Ne&&_t(le),Ce===-1?ge=Re:(ge=Nt(ne,{startingIndex:Ce,amount:oe,disabledIndices:Ee}),ye&&Ce+oe>Pe&&(ge=Nt(ne,{startingIndex:Ce%oe-oe,amount:oe,disabledIndices:Ee}))),Tr(ne,ge)&&(ge=Ce)),he==="both"){const Se=tr(Ce/oe);le.key===(pe?eo:to)&&(Ne&&_t(le),Ce%oe!==oe-1?(ge=Nt(ne,{startingIndex:Ce,disabledIndices:Ee}),ye&&ji(ge,oe,Se)&&(ge=Nt(ne,{startingIndex:Ce-Ce%oe-1,disabledIndices:Ee}))):ye&&(ge=Nt(ne,{startingIndex:Ce-Ce%oe-1,disabledIndices:Ee})),ji(ge,oe,Se)&&(ge=Ce)),le.key===(pe?to:eo)&&(Ne&&_t(le),Ce%oe!==0?(ge=Nt(ne,{startingIndex:Ce,decrement:!0,disabledIndices:Ee}),ye&&ji(ge,oe,Se)&&(ge=Nt(ne,{startingIndex:Ce+(oe-Ce%oe),decrement:!0,disabledIndices:Ee}))):ye&&(ge=Nt(ne,{startingIndex:Ce+(oe-Ce%oe),decrement:!0,disabledIndices:Ee})),ji(ge,oe,Se)&&(ge=Ce));const Me=tr(Pe/oe)===Se;Tr(ne,ge)&&(ge=ye&&Me?le.key===(pe?to:eo)?Pe:Nt(ne,{startingIndex:Ce-Ce%oe-1,disabledIndices:Ee}):Ce)}return ge}({current:$.map(ne=>ne!=null?i.current[ne]:null)},{event:ue,orientation:x,loop:d,rtl:h,cols:b,disabledIndices:t1([...k||i.current.map((ne,te)=>Ui(i.current,te)?te:void 0),void 0],$),minIndex:ce,maxIndex:be,prevIndex:e1(z.current>N?C:z.current,_,$,b,ue.key===Zr?"bl":ue.key===(h?eo:to)?"tr":"tl"),stopEvent:!0})];if(X!=null&&(z.current=X,P(z.current)),x==="both")return}if(Ku(ue.key,x)){if(_t(ue),e&&!m&&$n(ue.currentTarget.ownerDocument)===ue.currentTarget)return z.current=Ss(ue.key,x,h)?C:N,void P(z.current);Ss(ue.key,x,h)?z.current=d?S>=N?f&&S!==i.current.length?-1:C:Nt(i,{startingIndex:S,disabledIndices:k}):Math.min(N,Nt(i,{startingIndex:S,disabledIndices:k})):z.current=d?S<=C?f&&S!==-1?i.current.length:N:Nt(i,{startingIndex:S,decrement:!0,disabledIndices:k}):Math.max(C,Nt(i,{startingIndex:S,decrement:!0,disabledIndices:k})),Tr(i,z.current)?P(null):P(z.current)}}),Ie=G.useMemo(()=>m&&e&&A&&{"aria-activedescendant":V||R},[m,e,A,V,R]),Oe=G.useMemo(()=>({"aria-orientation":x==="both"?void 0:x,...!oc(r.domReference)&&Ie,onKeyDown:we,onPointerMove(){q.current=!0}}),[Ie,we,r.domReference,x]),ke=G.useMemo(()=>{function ue(S){v==="auto"&&Hf(S.nativeEvent)&&(ae.current=!0)}return{...Ie,onKeyDown(S){q.current=!1;const C=S.key.startsWith("Arrow"),N=["Home","End"].includes(S.key),_=C||N,$=function(he,ye,pe){return Da(ye,pe?he===eo:he===to,he===Zr)}(S.key,x,h),ce=Zu(S.key,x,h),be=Ku(S.key,x),X=(p?$:be)||S.key==="Enter"||S.key.trim()==="";if(m&&e){const he=T==null?void 0:T.nodesRef.current.find(pe=>pe.parentId==null),ye=T&&he?function(pe,oe){let Ee,Re=-1;return function Pe(Ce,Ne){Ne>Re&&(Ee=Ce,Re=Ne),Do(pe,Ce).forEach(ge=>{Pe(ge.id,Ne+1)})}(oe,0),pe.find(Pe=>Pe.id===Ee)}(T.nodesRef.current,he.id):null;if(_&&ye&&j){const pe=new KeyboardEvent("keydown",{key:S.key,bubbles:!0});if($||ce){var ne,te;const oe=((ne=ye.context)==null?void 0:ne.elements.domReference)===S.currentTarget,Ee=ce&&!oe?(te=ye.context)==null?void 0:te.elements.domReference:$?i.current.find(Re=>(Re==null?void 0:Re.id)===R):null;Ee&&(_t(S),Ee.dispatchEvent(pe),se(void 0))}var le;if((be||N)&&ye.context&&ye.context.open&&ye.parentId&&S.currentTarget!==ye.context.elements.domReference)return _t(S),void((le=ye.context.elements.domReference)==null||le.dispatchEvent(pe))}return we(S)}(e||w||!C)&&(X&&(ee.current=p&&be?null:S.key),p?$&&(_t(S),e?(z.current=vs(i,H.current),P(z.current)):o(!0,S.nativeEvent,"list-navigation")):be&&(u!=null&&(z.current=u),_t(S),!e&&w?o(!0,S.nativeEvent,"list-navigation"):we(S),e&&P(z.current)))},onFocus(){e&&!m&&P(null)},onPointerDown:function(S){ae.current=v,v==="auto"&&$f(S.nativeEvent)&&(ae.current=!0)},onMouseDown:ue,onClick:ue}},[R,Ie,we,H,v,i,p,P,o,e,w,x,h,u,T,m,j]);return G.useMemo(()=>l?{reference:ke,floating:Oe,item:me}:{},[l,ke,Oe,me])}const g1=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function qu(t,n){const[e,o]=t;let r=!1;const i=n.length;for(let a=0,s=i-1;a<i;s=a++){const[l,u]=n[a]||[0,0],[f,d]=n[s]||[0,0];u>=o!=d>=o&&e<=(f-l)*(o-u)/(d-u)+l&&(r=!r)}return r}function v1(t){t===void 0&&(t={});const{buffer:n=.5,blockPointerEvents:e=!1,requireIntent:o=!0}=t;let r,i=!1,a=null,s=null,l=performance.now();const u=f=>{let{x:d,y:p,placement:h,elements:m,onClose:v,nodeId:y,tree:w}=f;return function(k){function x(){clearTimeout(r),v()}if(clearTimeout(r),!m.domReference||!m.floating||h==null||d==null||p==null)return;const{clientX:b,clientY:E}=k,j=[b,E],B=Qn(k),F=k.type==="mouseleave",L=Ct(m.floating,B),D=Ct(m.domReference,B),T=m.domReference.getBoundingClientRect(),P=m.floating.getBoundingClientRect(),re=h.split("-")[0],ae=d>P.right-P.width/2,z=p>P.bottom-P.height/2,ee=function(M,O){return M[0]>=O.x&&M[0]<=O.x+O.width&&M[1]>=O.y&&M[1]<=O.y+O.height}(j,T),q=P.width>T.width,ie=P.height>T.height,J=(q?T:P).left,W=(q?T:P).right,Q=(ie?T:P).top,Y=(ie?T:P).bottom;if(L&&(i=!0,!F))return;if(D&&(i=!1),D&&!F)return void(i=!0);if(F&&Qe(k.relatedTarget)&&Ct(m.floating,k.relatedTarget)||w&&Do(w.nodesRef.current,y).some(M=>{let{context:O}=M;return O==null?void 0:O.open}))return;if(re==="top"&&p>=T.bottom-1||re==="bottom"&&p<=T.top+1||re==="left"&&d>=T.right-1||re==="right"&&d<=T.left+1)return x();let H=[];switch(re){case"top":H=[[J,T.top+1],[J,P.bottom-1],[W,P.bottom-1],[W,T.top+1]];break;case"bottom":H=[[J,P.top+1],[J,T.bottom-1],[W,T.bottom-1],[W,P.top+1]];break;case"left":H=[[P.right-1,Y],[P.right-1,Q],[T.left+1,Q],[T.left+1,Y]];break;case"right":H=[[T.right-1,Y],[T.right-1,Q],[P.left+1,Q],[P.left+1,Y]]}if(!qu([b,E],H)){if(i&&!ee)return x();if(!F&&o){const M=function(O,I){const R=performance.now(),U=R-l;if(a===null||s===null||U===0)return a=O,s=I,l=R,null;const V=O-a,se=I-s,Z=Math.sqrt(V*V+se*se);return a=O,s=I,l=R,Z/U}(k.clientX,k.clientY);if(M!==null&&M<.1)return x()}qu([b,E],function(M){let[O,I]=M;switch(re){case"top":return[[q?O+n/2:ae?O+4*n:O-4*n,I+n+1],[q?O-n/2:ae?O+4*n:O-4*n,I+n+1],[P.left,ae||q?P.bottom-n:P.top],[P.right,ae?q?P.bottom-n:P.top:P.bottom-n]];case"bottom":return[[q?O+n/2:ae?O+4*n:O-4*n,I-n],[q?O-n/2:ae?O+4*n:O-4*n,I-n],[P.left,ae||q?P.top+n:P.bottom],[P.right,ae?q?P.top+n:P.bottom:P.top+n]];case"left":{const R=[O+n+1,ie?I+n/2:z?I+4*n:I-4*n],U=[O+n+1,ie?I-n/2:z?I+4*n:I-4*n];return[[z||ie?P.right-n:P.left,P.top],[z?ie?P.right-n:P.left:P.right-n,P.bottom],R,U]}case"right":return[[O-n,ie?I+n/2:z?I+4*n:I-4*n],[O-n,ie?I-n/2:z?I+4*n:I-4*n],[z||ie?P.left+n:P.right,P.top],[z?ie?P.left+n:P.right:P.left+n,P.bottom]]}}([d,p]))?!i&&o&&(r=window.setTimeout(x,40)):x()}}};return u.__options={blockPointerEvents:e},u}const cc=g.createContext({getItemProps:()=>({}),activeIndex:null,setActiveIndex:()=>{},setHasFocusInside:()=>{},isOpen:!1,setIsOpen:()=>{}}),fp=g.forwardRef(({className:t,disabled:n,children:e,...o},r)=>{const i=g.useContext(cc),a=ap(),s=ao(),l=a.index===i.activeIndex,u=de("io-dropdown-menu-item",n&&"io-dropdown-menu-item-disabled",t);return c.jsx("div",{ref:op([a.ref,r]),role:"menuitem",className:u,tabIndex:l?0:-1,"aria-disabled":n,...o,...i.getItemProps({onClick(f){var d;if(n)return f.preventDefault(),void f.stopPropagation();(d=o.onClick)==null||d.call(o,f),i.setIsOpen(!1),s==null||s.events.emit("click")},onFocus(f){var d;n||((d=o.onFocus)==null||d.call(o,f),i.setHasFocusInside(!0))}}),children:e})});fp.displayName="DropdownMenuItem";const lc=g.forwardRef(({className:t,variant:n="default",icon:e,iconRight:o,text:r="",disabled:i,children:a,...s},l)=>{const[u,f]=g.useState(!1),[d,p]=g.useState(!1),[h,m]=g.useState(null),v=g.useRef([]),y=g.useRef([]),w=g.useContext(cc),k=ao(),x=function(){const O=ac(),I=ao(),R=io();return tt(()=>{const U={id:O,parentId:R};return I==null||I.addNode(U),()=>{I==null||I.removeNode(U)}},[I,O,R]),O}(),b=io(),E=ap(),j=b!=null,{floatingStyles:B,refs:F,context:L}=h1({nodeId:x,open:u,onOpenChange:f,placement:j?"right-start":"bottom-start",middleware:[(D={mainAxis:j?0:4,alignmentAxis:j?-4:0},{...Gv(D),options:[D,T]}),Xv(),Jv()],whileElementsMounted:Yv});var D,T;const P=function(O,I){I===void 0&&(I={});const{open:R,onOpenChange:U,dataRef:V,events:se,elements:Z}=O,{enabled:A=!0,delay:me=0,handleClose:we=null,mouseOnly:Ie=!1,restMs:Oe=0,move:ke=!0}=I,ue=ao(),S=io(),C=pn(we),N=pn(me),_=pn(R),$=G.useRef(),ce=G.useRef(-1),be=G.useRef(),X=G.useRef(-1),ne=G.useRef(!0),te=G.useRef(!1),le=G.useRef(()=>{}),he=G.useRef(!1),ye=G.useCallback(()=>{var Ne;const ge=(Ne=V.current.openEvent)==null?void 0:Ne.type;return(ge==null?void 0:ge.includes("mouse"))&&ge!=="mousedown"},[V]);G.useEffect(()=>{if(A)return se.on("openchange",Ne),()=>{se.off("openchange",Ne)};function Ne(ge){let{open:Se}=ge;Se||(clearTimeout(ce.current),clearTimeout(X.current),ne.current=!0,he.current=!1)}},[A,se]),G.useEffect(()=>{if(!A||!C.current||!R)return;function Ne(Se){ye()&&U(!1,Se,"hover")}const ge=Pt(Z.floating).documentElement;return ge.addEventListener("mouseleave",Ne),()=>{ge.removeEventListener("mouseleave",Ne)}},[Z.floating,R,U,A,C,ye]);const pe=G.useCallback(function(Ne,ge,Se){ge===void 0&&(ge=!0),Se===void 0&&(Se="hover");const Me=bs(N.current,"close",$.current);Me&&!be.current?(clearTimeout(ce.current),ce.current=window.setTimeout(()=>U(!1,Ne,Se),Me)):ge&&(clearTimeout(ce.current),U(!1,Ne,Se))},[N,U]),oe=Ft(()=>{le.current(),be.current=void 0}),Ee=Ft(()=>{if(te.current){const Ne=Pt(Z.floating).body;Ne.style.pointerEvents="",Ne.removeAttribute(Mu),te.current=!1}}),Re=Ft(()=>!!V.current.openEvent&&["click","mousedown"].includes(V.current.openEvent.type));G.useEffect(()=>{if(A&&Qe(Z.domReference)){var Ne;const Ae=Z.domReference;return R&&Ae.addEventListener("mouseleave",Me),(Ne=Z.floating)==null||Ne.addEventListener("mouseleave",Me),ke&&Ae.addEventListener("mousemove",ge,{once:!0}),Ae.addEventListener("mouseenter",ge),Ae.addEventListener("mouseleave",Se),()=>{var Ke;R&&Ae.removeEventListener("mouseleave",Me),(Ke=Z.floating)==null||Ke.removeEventListener("mouseleave",Me),ke&&Ae.removeEventListener("mousemove",ge),Ae.removeEventListener("mouseenter",ge),Ae.removeEventListener("mouseleave",Se)}}function ge(Ae){if(clearTimeout(ce.current),ne.current=!1,Ie&&!zr($.current)||Oe>0&&!bs(N.current,"open"))return;const Ke=bs(N.current,"open",$.current);Ke?ce.current=window.setTimeout(()=>{_.current||U(!0,Ae,"hover")},Ke):R||U(!0,Ae,"hover")}function Se(Ae){if(Re())return;le.current();const Ke=Pt(Z.floating);if(clearTimeout(X.current),he.current=!1,C.current&&V.current.floatingContext){R||clearTimeout(ce.current),be.current=C.current({...V.current.floatingContext,tree:ue,x:Ae.clientX,y:Ae.clientY,onClose(){Ee(),oe(),Re()||pe(Ae,!0,"safe-polygon")}});const kt=be.current;return Ke.addEventListener("mousemove",kt),void(le.current=()=>{Ke.removeEventListener("mousemove",kt)})}($.current!=="touch"||!Ct(Z.floating,Ae.relatedTarget))&&pe(Ae)}function Me(Ae){Re()||V.current.floatingContext&&(C.current==null||C.current({...V.current.floatingContext,tree:ue,x:Ae.clientX,y:Ae.clientY,onClose(){Ee(),oe(),Re()||pe(Ae)}})(Ae))}},[Z,A,O,Ie,Oe,ke,pe,oe,Ee,U,R,_,ue,N,C,V,Re]),tt(()=>{var Ne;if(A&&R&&(Ne=C.current)!=null&&Ne.__options.blockPointerEvents&&ye()){te.current=!0;const Se=Z.floating;if(Qe(Z.domReference)&&Se){var ge;const Me=Pt(Z.floating).body;Me.setAttribute(Mu,"");const Ae=Z.domReference,Ke=ue==null||(ge=ue.nodesRef.current.find(kt=>kt.id===S))==null||(ge=ge.context)==null?void 0:ge.elements.floating;return Ke&&(Ke.style.pointerEvents=""),Me.style.pointerEvents="none",Ae.style.pointerEvents="auto",Se.style.pointerEvents="auto",()=>{Me.style.pointerEvents="",Ae.style.pointerEvents="",Se.style.pointerEvents=""}}}},[A,R,S,Z,ue,C,ye]),tt(()=>{R||($.current=void 0,he.current=!1,oe(),Ee())},[R,oe,Ee]),G.useEffect(()=>()=>{oe(),clearTimeout(ce.current),clearTimeout(X.current),Ee()},[A,Z.domReference,oe,Ee]);const Pe=G.useMemo(()=>{function Ne(ge){$.current=ge.pointerType}return{onPointerDown:Ne,onPointerEnter:Ne,onMouseMove(ge){const{nativeEvent:Se}=ge;function Me(){ne.current||_.current||U(!0,Se,"hover")}Ie&&!zr($.current)||R||Oe===0||he.current&&ge.movementX**2+ge.movementY**2<2||(clearTimeout(X.current),$.current==="touch"?Me():(he.current=!0,X.current=window.setTimeout(Me,Oe)))}}},[Ie,U,R,_,Oe]),Ce=G.useMemo(()=>({onMouseEnter(){clearTimeout(ce.current)},onMouseLeave(Ne){Re()||pe(Ne.nativeEvent,!1)}}),[pe,Re]);return G.useMemo(()=>A?{reference:Pe,floating:Ce}:{},[A,Pe,Ce])}(L,{enabled:j,delay:{open:75},handleClose:v1({blockPointerEvents:!0})}),re=function(O,I){I===void 0&&(I={});const{open:R,onOpenChange:U,dataRef:V,elements:{domReference:se}}=O,{enabled:Z=!0,event:A="click",toggle:me=!0,ignoreMouse:we=!1,keyboardHandlers:Ie=!0,stickIfOpen:Oe=!0}=I,ke=G.useRef(),ue=G.useRef(!1),S=G.useMemo(()=>({onPointerDown(C){ke.current=C.pointerType},onMouseDown(C){const N=ke.current;C.button===0&&A!=="click"&&(zr(N,!0)&&we||(!R||!me||V.current.openEvent&&Oe&&V.current.openEvent.type!=="mousedown"?(C.preventDefault(),U(!0,C.nativeEvent,"click")):U(!1,C.nativeEvent,"click")))},onClick(C){const N=ke.current;A==="mousedown"&&ke.current?ke.current=void 0:zr(N,!0)&&we||(!R||!me||V.current.openEvent&&Oe&&V.current.openEvent.type!=="click"?U(!0,C.nativeEvent,"click"):U(!1,C.nativeEvent,"click"))},onKeyDown(C){ke.current=void 0,C.defaultPrevented||!Ie||Wu(C)||(C.key!==" "||zu(se)||(C.preventDefault(),ue.current=!0),C.key==="Enter"&&U(!R||!me,C.nativeEvent,"click"))},onKeyUp(C){C.defaultPrevented||!Ie||Wu(C)||zu(se)||C.key===" "&&ue.current&&(ue.current=!1,U(!R||!me,C.nativeEvent,"click"))}}),[V,se,A,we,Ie,U,R,Oe,me]);return G.useMemo(()=>Z?{reference:S}:{},[Z,S])}(L,{event:"mousedown",toggle:!j,ignoreMouse:j}),ae=function(O,I){var R;I===void 0&&(I={});const{open:U,floatingId:V}=O,{enabled:se=!0,role:Z="dialog"}=I,A=(R=g1.get(Z))!=null?R:Z,me=ac(),we=io()!=null,Ie=G.useMemo(()=>A==="tooltip"||Z==="label"?{["aria-"+(Z==="label"?"labelledby":"describedby")]:U?V:void 0}:{"aria-expanded":U?"true":"false","aria-haspopup":A==="alertdialog"?"dialog":A,"aria-controls":U?V:void 0,...A==="listbox"&&{role:"combobox"},...A==="menu"&&{id:me},...A==="menu"&&we&&{role:"menuitem"},...Z==="select"&&{"aria-autocomplete":"none"},...Z==="combobox"&&{"aria-autocomplete":"list"}},[A,V,we,U,me,Z]),Oe=G.useMemo(()=>{const ue={id:V,...A&&{role:A}};return A==="tooltip"||Z==="label"?ue:{...ue,...A==="menu"&&{"aria-labelledby":me}}},[A,V,me,Z]),ke=G.useCallback(ue=>{let{active:S,selected:C}=ue;const N={role:"option",...S&&{id:V+"-option"}};switch(Z){case"select":return{...N,"aria-selected":S&&C};case"combobox":return{...N,...S&&{"aria-selected":!0}}}return{}},[V,Z]);return G.useMemo(()=>se?{reference:Ie,floating:Oe,item:ke}:{},[se,Ie,Oe,ke])}(L,{role:"menu"}),z=function(O,I){I===void 0&&(I={});const{open:R,onOpenChange:U,elements:V,dataRef:se}=O,{enabled:Z=!0,escapeKey:A=!0,outsidePress:me=!0,outsidePressEvent:we="pointerdown",referencePress:Ie=!1,referencePressEvent:Oe="pointerdown",ancestorScroll:ke=!1,bubbles:ue,capture:S}=I,C=ao(),N=Ft(typeof me=="function"?me:()=>!1),_=typeof me=="function"?N:me,$=G.useRef(!1),ce=G.useRef(!1),{escapeKey:be,outsidePress:X}=Uu(ue),{escapeKey:ne,outsidePress:te}=Uu(S),le=G.useRef(!1),he=Ft(Pe=>{var Ce;if(!R||!Z||!A||Pe.key!=="Escape"||le.current)return;const Ne=(Ce=se.current.floatingContext)==null?void 0:Ce.nodeId,ge=C?Do(C.nodesRef.current,Ne):[];if(!be&&(Pe.stopPropagation(),ge.length>0)){let Se=!0;if(ge.forEach(Me=>{var Ae;(Ae=Me.context)==null||!Ae.open||Me.context.dataRef.current.__escapeKeyBubbles||(Se=!1)}),!Se)return}U(!1,function(Se){return"nativeEvent"in Se}(Pe)?Pe.nativeEvent:Pe,"escape-key")}),ye=Ft(Pe=>{var Ce;const Ne=()=>{var ge;he(Pe),(ge=Qn(Pe))==null||ge.removeEventListener("keydown",Ne)};(Ce=Qn(Pe))==null||Ce.addEventListener("keydown",Ne)}),pe=Ft(Pe=>{var Ce;const Ne=$.current;$.current=!1;const ge=ce.current;if(ce.current=!1,we==="click"&&ge||Ne||typeof _=="function"&&!_(Pe))return;const Se=Qn(Pe),Me="["+ni("inert")+"]",Ae=Pt(V.floating).querySelectorAll(Me);let Ke=Qe(Se)?Se:null;for(;Ke&&!so(Ke);){const Ot=zn(Ke);if(so(Ot)||!Qe(Ot))break;Ke=Ot}if(Ae.length&&Qe(Se)&&!Se.matches("html,body")&&!Ct(Se,V.floating)&&Array.from(Ae).every(Ot=>!Ct(Ke,Ot)))return;if(gt(Se)&&Re){const Ot=Se.clientWidth>0&&Se.scrollWidth>Se.clientWidth,on=Se.clientHeight>0&&Se.scrollHeight>Se.clientHeight;let rn=on&&Pe.offsetX>Se.clientWidth;if(on&&sn(Se).direction==="rtl"&&(rn=Pe.offsetX<=Se.offsetWidth-Se.clientWidth),rn||Ot&&Pe.offsetY>Se.clientHeight)return}const kt=(Ce=se.current.floatingContext)==null?void 0:Ce.nodeId,Uo=C&&Do(C.nodesRef.current,kt).some(Ot=>{var on;return hs(Pe,(on=Ot.context)==null?void 0:on.elements.floating)});if(hs(Pe,V.floating)||hs(Pe,V.domReference)||Uo)return;const dn=C?Do(C.nodesRef.current,kt):[];if(dn.length>0){let Ot=!0;if(dn.forEach(on=>{var rn;(rn=on.context)==null||!rn.open||on.context.dataRef.current.__outsidePressBubbles||(Ot=!1)}),!Ot)return}U(!1,Pe,"outside-press")}),oe=Ft(Pe=>{var Ce;const Ne=()=>{var ge;pe(Pe),(ge=Qn(Pe))==null||ge.removeEventListener(we,Ne)};(Ce=Qn(Pe))==null||Ce.addEventListener(we,Ne)});G.useEffect(()=>{if(!R||!Z)return;se.current.__escapeKeyBubbles=be,se.current.__outsidePressBubbles=X;let Pe=-1;function Ce(Ae){U(!1,Ae,"ancestor-scroll")}function Ne(){window.clearTimeout(Pe),le.current=!0}function ge(){Pe=window.setTimeout(()=>{le.current=!1},Ia()?5:0)}const Se=Pt(V.floating);A&&(Se.addEventListener("keydown",ne?ye:he,ne),Se.addEventListener("compositionstart",Ne),Se.addEventListener("compositionend",ge)),_&&Se.addEventListener(we,te?oe:pe,te);let Me=[];return ke&&(Qe(V.domReference)&&(Me=co(V.domReference)),Qe(V.floating)&&(Me=Me.concat(co(V.floating))),!Qe(V.reference)&&V.reference&&V.reference.contextElement&&(Me=Me.concat(co(V.reference.contextElement)))),Me=Me.filter(Ae=>{var Ke;return Ae!==((Ke=Se.defaultView)==null?void 0:Ke.visualViewport)}),Me.forEach(Ae=>{Ae.addEventListener("scroll",Ce,{passive:!0})}),()=>{A&&(Se.removeEventListener("keydown",ne?ye:he,ne),Se.removeEventListener("compositionstart",Ne),Se.removeEventListener("compositionend",ge)),_&&Se.removeEventListener(we,te?oe:pe,te),Me.forEach(Ae=>{Ae.removeEventListener("scroll",Ce)}),window.clearTimeout(Pe)}},[se,V,A,_,we,R,U,ke,Z,be,X,he,ne,ye,pe,te,oe]),G.useEffect(()=>{$.current=!1},[_,we]);const Ee=G.useMemo(()=>({onKeyDown:he,[d1[Oe]]:Pe=>{Ie&&U(!1,Pe.nativeEvent,"reference-press")}}),[he,U,Ie,Oe]),Re=G.useMemo(()=>({onKeyDown:he,onMouseDown(){ce.current=!0},onMouseUp(){ce.current=!0},[f1[we]]:()=>{$.current=!0}}),[he,we]);return G.useMemo(()=>Z?{reference:Ee,floating:Re}:{},[Z,Ee,Re])}(L,{bubbles:!0}),ee=m1(L,{listRef:v,activeIndex:h,nested:j,onNavigate:m}),{getReferenceProps:q,getFloatingProps:ie,getItemProps:J}=function(O){O===void 0&&(O=[]);const I=O.map(A=>A==null?void 0:A.reference),R=O.map(A=>A==null?void 0:A.floating),U=O.map(A=>A==null?void 0:A.item),V=G.useCallback(A=>Cs(A,O,"reference"),I),se=G.useCallback(A=>Cs(A,O,"floating"),R),Z=G.useCallback(A=>Cs(A,O,"item"),U);return G.useMemo(()=>({getReferenceProps:V,getFloatingProps:se,getItemProps:Z}),[V,se,Z])}([P,re,ae,z,ee]);g.useEffect(()=>{if(k)return k.events.on("click",O),k.events.on("menuopen",I),()=>{k.events.off("click",O),k.events.off("menuopen",I)};function O(){f(!1)}function I(R){R.nodeId!==x&&R.parentId===b&&f(!1)}},[k,x,b]),g.useEffect(()=>{u&&k&&k.events.emit("menuopen",{parentId:b,nodeId:x})},[k,u,x,b]);const W={activeIndex:h,setActiveIndex:m,getItemProps:J,setHasFocusInside:p,isOpen:u,setIsOpen:f},Q=g.useMemo(()=>W,[h,m,J,p,u]),Y=de("io-dropdown-menu-button",j&&"io-dropdown-menu-item",u&&!j&&"active",t),H=op([F.setReference,E.ref,l]),M=w.activeIndex===E.index?0:-1;return c.jsxs(i1,{id:x,children:[c.jsx(Je,{className:Y,ref:H,variant:j?"link":n,tabIndex:j?M:void 0,role:j?"menuitem":void 0,"data-open":u?"":void 0,"data-nested":j?"":void 0,"data-focus-inside":d?"":void 0,text:r,icon:j?"chevron-right":e,iconSize:"10",iconRight:!!j||o,disabled:i,...q(w.getItemProps({onFocus(O){var I;(I=s.onFocus)==null||I.call(s,O),p(!1),w.setHasFocusInside(!0)},...s}))}),c.jsx(cc.Provider,{value:Q,children:c.jsx(o1,{elementsRef:v,labelsRef:y,children:u&&c.jsx(u1,{context:L,modal:!1,initialFocus:j?-1:0,returnFocus:!j,children:c.jsx("div",{ref:F.setFloating,className:"io-dropdown-menu",style:B,...ie(),children:a})})})})]})});lc.displayName="DropdownMenu";const hn=g.forwardRef(({...t},n)=>io()===null?c.jsx(a1,{children:c.jsx(lc,{ref:n,...t})}):c.jsx(lc,{ref:n,...t}));function pp({className:t,variant:n="default",size:e="16",src:o,alt:r,...i}){const a=de("io-image-icon",n==="grayscale"&&[`io-image-icon-${n}`],e&&[`io-image-icon-${e}`],t);return c.jsx("img",{className:a,style:{width:`${e}px`,filter:n==="grayscale"?"grayscale(100%)":"none"},src:o,alt:r,...i})}function y1({className:t,size:n="large",variant:e="default",align:o="up",text:r,...i}){const a=de("io-loader",{[`io-loader-${e}`]:e!=="default"},n==="normal"&&"io-loader-md",n==="small"&&"io-loader-sm",o&&[`direction-${o}`],t);return c.jsxs("div",{className:a,role:"status","aria-live":"polite",...i,children:[c.jsx("div",{className:"io-loader-icon"}),r&&c.jsx("div",{className:"io-loader-text",children:r})]})}function no({className:t,children:n,...e}){const o=de("io-panel-header",t);return c.jsx(Zt,{className:o,...e,children:n})}hn.displayName="DropdownMenu",hn.Item=fp,hn.Separator=mi,no.Title=Nn,no.ButtonGroup=Be,no.Button=Je,no.ButtonIcon=Ge,no.Dropdown=xe;const mr=g.forwardRef(({className:t,children:n,...e},o)=>{const r=de("io-panel-body",t);return c.jsx("div",{className:r,ref:o,"data-testid":"panel-body",...e,children:n})});function Xo({className:t,...n}){const e=de("io-panel-footer",t);return c.jsx(Io,{className:e,...n})}function qe({className:t,children:n,...e}){const o=de("io-panel",t);return c.jsx("div",{className:o,"data-testid":"panel",...e,children:n})}function Ma({className:t,variant:n="default",children:e,...o}){const r=de("io-pill",n!=="default"&&[`io-pill-${n}`],t);return c.jsx("div",{className:r,role:"status",...o,children:e})}function b1({className:t,variant:n="active",value:e=0,...o}){const r=de("io-progress",n,t);let i;return i=e<0?0:e>100?100:e,c.jsx("div",{className:r,role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,...o,children:c.jsx("div",{className:"io-progress-bar",style:{width:`${i}%`}})})}/*!
8
+ */var sa=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),qf=typeof Element>"u",mr=qf?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Vi=!qf&&Element.prototype.getRootNode?function(t){var n;return t==null||(n=t.getRootNode)===null||n===void 0?void 0:n.call(t)}:function(t){return t==null?void 0:t.ownerDocument},ca=function t(n,e){var o;e===void 0&&(e=!0);var r=n==null||(o=n.getAttribute)===null||o===void 0?void 0:o.call(n,"inert");return r===""||r==="true"||e&&n&&t(n.parentNode)},Fv=function t(n,e,o){for(var r=[],i=Array.from(n);i.length;){var a=i.shift();if(!ca(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=t(s.length?s:a.children,!0,o);o.flatten?r.push.apply(r,l):r.push({scopeParent:a,candidates:l})}else{mr.call(a,sa)&&o.filter(a)&&(e||!n.includes(a))&&r.push(a);var u=a.shadowRoot||typeof o.getShadowRoot=="function"&&o.getShadowRoot(a),f=!ca(u,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(a));if(u&&f){var d=t(u===!0?a.children:u.children,!0,o);o.flatten?r.push.apply(r,d):r.push({scopeParent:a,candidates:d})}else i.unshift.apply(i,a.children)}}return r},Jf=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Xf=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||function(n){var e,o=n==null||(e=n.getAttribute)===null||e===void 0?void 0:e.call(n,"contenteditable");return o===""||o==="true"}(t))&&!Jf(t)?0:t.tabIndex},Bv=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Qf=function(t){return t.tagName==="INPUT"},Hv=function(t){return function(n){return Qf(n)&&n.type==="radio"}(t)&&!function(n){if(!n.name)return!0;var e,o=n.form||Vi(n),r=function(a){return o.querySelectorAll('input[type="radio"][name="'+a+'"]')};if(typeof window<"u"&&window.CSS!==void 0&&typeof window.CSS.escape=="function")e=r(window.CSS.escape(n.name));else try{e=r(n.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=function(a,s){for(var l=0;l<a.length;l++)if(a[l].checked&&a[l].form===s)return a[l]}(e,n.form);return!i||i===n}(t)},Ou=function(t){var n=t.getBoundingClientRect(),e=n.width,o=n.height;return e===0&&o===0},$v=function(t,n){var e=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var r=mr.call(t,"details>summary:first-of-type")?t.parentElement:t;if(mr.call(r,"details:not([open]) *"))return!0;if(e&&e!=="full"&&e!=="legacy-full"){if(e==="non-zero-area")return Ou(t)}else{if(typeof o=="function"){for(var i=t;t;){var a=t.parentElement,s=Vi(t);if(a&&!a.shadowRoot&&o(a)===!0)return Ou(t);t=t.assignedSlot?t.assignedSlot:a||s===t.ownerDocument?a:s.host}t=i}if(function(l){var u,f,d,p,h=l&&Vi(l),m=(u=h)===null||u===void 0?void 0:u.host,v=!1;if(h&&h!==l)for(v=!!((f=m)!==null&&f!==void 0&&(d=f.ownerDocument)!==null&&d!==void 0&&d.contains(m)||l!=null&&(p=l.ownerDocument)!==null&&p!==void 0&&p.contains(l));!v&&m;){var y,x,S;v=!((x=m=(y=h=Vi(m))===null||y===void 0?void 0:y.host)===null||x===void 0||(S=x.ownerDocument)===null||S===void 0||!S.contains(m))}return v}(t))return!t.getClientRects().length;if(e!=="legacy-full")return!0}return!1},Wv=function(t,n){return!(n.disabled||ca(n)||function(e){return Qf(e)&&e.type==="hidden"}(n)||$v(n,t)||function(e){return e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(o){return o.tagName==="SUMMARY"})}(n)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var o=e.parentElement;o;){if(o.tagName==="FIELDSET"&&o.disabled){for(var r=0;r<o.children.length;r++){var i=o.children.item(r);if(i.tagName==="LEGEND")return!!mr.call(o,"fieldset[disabled] *")||!i.contains(e)}return!0}o=o.parentElement}return!1}(n))},cc=function(t,n){return!(Hv(n)||Xf(n)<0||!Wv(t,n))},zv=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Uv=function t(n){var e=[],o=[];return n.forEach(function(r,i){var a=!!r.scopeParent,s=a?r.scopeParent:r,l=function(f,d){var p=Xf(f);return p<0&&d&&!Jf(f)?0:p}(s,a),u=a?t(r.candidates):s;l===0?a?e.push.apply(e,u):e.push(s):o.push({documentOrder:i,tabIndex:l,item:r,isScope:a,content:u})}),o.sort(Bv).reduce(function(r,i){return i.isScope?r.push.apply(r,i.content):r.push(i.content),r},[]).concat(e)},sl=function(t,n){var e;return e=(n=n||{}).getShadowRoot?Fv([t],n.includeContainer,{filter:cc.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:zv}):function(o,r,i){if(ca(o))return[];var a=Array.prototype.slice.apply(o.querySelectorAll(sa));return r&&mr.call(o,sa)&&a.unshift(o),a.filter(i)}(t,n.includeContainer,cc.bind(null,n)),Uv(e)};function Nu(t,n,e){let{reference:o,floating:r}=t;const i=ro(n),a=Zf(n),s=Kf(a),l=Ro(n),u=i==="y",f=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,p=o[s]/2-r[s]/2;let h;switch(l){case"top":h={x:f,y:o.y-r.height};break;case"bottom":h={x:f,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:d};break;case"left":h={x:o.x-r.width,y:d};break;default:h={x:o.x,y:o.y}}switch(_a(n)){case"start":h[a]-=p*(e&&u?-1:1);break;case"end":h[a]+=p*(e&&u?-1:1)}return h}async function ep(t,n){var e;n===void 0&&(n={});const{x:o,y:r,platform:i,rects:a,elements:s,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=Ma(n,t),m=function(E){return typeof E!="number"?function(j){return{top:0,right:0,bottom:0,left:0,...j}}(E):{top:E,right:E,bottom:E,left:E}}(h),v=s[p?d==="floating"?"reference":"floating":d],y=aa(await i.getClippingRect({element:(e=await(i.isElement==null?void 0:i.isElement(v)))==null||e?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:f,strategy:l})),x=d==="floating"?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),b=await(i.isElement==null?void 0:i.isElement(S))&&await(i.getScale==null?void 0:i.getScale(S))||{x:1,y:1},w=aa(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:S,strategy:l}):x);return{top:(y.top-w.top+m.top)/b.y,bottom:(w.bottom-y.bottom+m.bottom)/b.y,left:(y.left-w.left+m.left)/b.x,right:(w.right-y.right+m.right)/b.x}}const Vv=new Set(["left","top"]);function tp(t){const n=sn(t);let e=parseFloat(n.width)||0,o=parseFloat(n.height)||0;const r=gt(t),i=r?t.offsetWidth:e,a=r?t.offsetHeight:o,s=ia(e)!==i||ia(o)!==a;return s&&(e=i,o=a),{width:e,height:o,$:s}}function cl(t){return Qe(t)?t:t.contextElement}function cr(t){const n=cl(t);if(!gt(n))return jn(1);const e=n.getBoundingClientRect(),{width:o,height:r,$:i}=tp(n);let a=(i?ia(e.width):e.width)/o,s=(i?ia(e.height):e.height)/r;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Yv=jn(0);function np(t){const n=Jt(t);return Ta()&&n.visualViewport?{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}:Yv}function Fo(t,n,e,o){n===void 0&&(n=!1),e===void 0&&(e=!1);const r=t.getBoundingClientRect(),i=cl(t);let a=jn(1);n&&(o?Qe(o)&&(a=cr(o)):a=cr(t));const s=function(p,h,m){return h===void 0&&(h=!1),!(!m||h&&m!==Jt(p))&&h}(i,e,o)?np(i):jn(0);let l=(r.left+s.x)/a.x,u=(r.top+s.y)/a.y,f=r.width/a.x,d=r.height/a.y;if(i){const p=Jt(i),h=o&&Qe(o)?Jt(o):o;let m=p,v=rc(m);for(;v&&o&&h!==m;){const y=cr(v),x=v.getBoundingClientRect(),S=sn(v),b=x.left+(v.clientLeft+parseFloat(S.paddingLeft))*y.x,w=x.top+(v.clientTop+parseFloat(S.paddingTop))*y.y;l*=y.x,u*=y.y,f*=y.x,d*=y.y,l+=b,u+=w,m=Jt(v),v=rc(m)}}return aa({width:f,height:d,x:l,y:u})}function ll(t,n){const e=Da(t).scrollLeft;return n?n.left+e:Fo(En(t)).left+e}function op(t,n,e){e===void 0&&(e=!1);const o=t.getBoundingClientRect();return{x:o.left+n.scrollLeft-(e?0:ll(t,o)),y:o.top+n.scrollTop}}const Gv=new Set(["absolute","fixed"]);function Iu(t,n,e){let o;if(n==="viewport")o=function(r,i){const a=Jt(r),s=En(r),l=a.visualViewport;let u=s.clientWidth,f=s.clientHeight,d=0,p=0;if(l){u=l.width,f=l.height;const h=Ta();(!h||h&&i==="fixed")&&(d=l.offsetLeft,p=l.offsetTop)}return{width:u,height:f,x:d,y:p}}(t,e);else if(n==="document")o=function(r){const i=En(r),a=Da(r),s=r.ownerDocument.body,l=Do(i.scrollWidth,i.clientWidth,s.scrollWidth,s.clientWidth),u=Do(i.scrollHeight,i.clientHeight,s.scrollHeight,s.clientHeight);let f=-a.scrollLeft+ll(r);const d=-a.scrollTop;return sn(s).direction==="rtl"&&(f+=Do(i.clientWidth,s.clientWidth)-l),{width:l,height:u,x:f,y:d}}(En(t));else if(Qe(n))o=function(r,i){const a=Fo(r,!0,i==="fixed"),s=a.top+r.clientTop,l=a.left+r.clientLeft,u=gt(r)?cr(r):jn(1);return{width:r.clientWidth*u.x,height:r.clientHeight*u.y,x:l*u.x,y:s*u.y}}(n,e);else{const r=np(t);o={x:n.x-r.x,y:n.y-r.y,width:n.width,height:n.height}}return aa(o)}function rp(t,n){const e=zn(t);return!(e===n||!Qe(e)||so(e))&&(sn(e).position==="fixed"||rp(e,n))}function Kv(t,n,e){const o=gt(n),r=En(n),i=e==="fixed",a=Fo(t,!0,i,n);let s={scrollLeft:0,scrollTop:0};const l=jn(0);function u(){l.x=ll(r)}if(o||!o&&!i)if((fo(n)!=="body"||ti(r))&&(s=Da(n)),o){const d=Fo(n,!0,i,n);l.x=d.x+n.clientLeft,l.y=d.y+n.clientTop}else r&&u();i&&!o&&r&&u();const f=!r||o||i?jn(0):op(r,s);return{x:a.left+s.scrollLeft-l.x-f.x,y:a.top+s.scrollTop-l.y-f.y,width:a.width,height:a.height}}function ys(t){return sn(t).position==="static"}function Pu(t,n){if(!gt(t)||sn(t).position==="fixed")return null;if(n)return n(t);let e=t.offsetParent;return En(t)===e&&(e=e.ownerDocument.body),e}function Au(t,n){const e=Jt(t);if(oa(t))return e;if(!gt(t)){let r=zn(t);for(;r&&!so(r);){if(Qe(r)&&!ys(r))return r;r=zn(r)}return e}let o=Pu(t,n);for(;o&&jv(o)&&ys(o);)o=Pu(o,n);return o&&so(o)&&ys(o)&&!oc(o)?e:o||function(r){let i=zn(r);for(;gt(i)&&!so(i);){if(oc(i))return i;if(oa(i))return null;i=zn(i)}return null}(t)||e}const Zv={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:n,rect:e,offsetParent:o,strategy:r}=t;const i=r==="fixed",a=En(o),s=!!n&&oa(n.floating);if(o===a||s&&i)return e;let l={scrollLeft:0,scrollTop:0},u=jn(1);const f=jn(0),d=gt(o);if((d||!d&&!i)&&((fo(o)!=="body"||ti(a))&&(l=Da(o)),gt(o))){const h=Fo(o);u=cr(o),f.x=h.x+o.clientLeft,f.y=h.y+o.clientTop}const p=!a||d||i?jn(0):op(a,l,!0);return{width:e.width*u.x,height:e.height*u.y,x:e.x*u.x-l.scrollLeft*u.x+f.x+p.x,y:e.y*u.y-l.scrollTop*u.y+f.y+p.y}},getDocumentElement:En,getClippingRect:function(t){let{element:n,boundary:e,rootBoundary:o,strategy:r}=t;const i=[...e==="clippingAncestors"?oa(n)?[]:function(l,u){const f=u.get(l);if(f)return f;let d=co(l,[],!1).filter(v=>Qe(v)&&fo(v)!=="body"),p=null;const h=sn(l).position==="fixed";let m=h?zn(l):l;for(;Qe(m)&&!so(m);){const v=sn(m),y=oc(m);y||v.position!=="fixed"||(p=null),(h?!y&&!p:!y&&v.position==="static"&&p&&Gv.has(p.position)||ti(m)&&!y&&rp(l,m))?d=d.filter(x=>x!==m):p=v,m=zn(m)}return u.set(l,d),d}(n,this._c):[].concat(e),o],a=i[0],s=i.reduce((l,u)=>{const f=Iu(n,u,r);return l.top=Do(f.top,l.top),l.right=ra(f.right,l.right),l.bottom=ra(f.bottom,l.bottom),l.left=Do(f.left,l.left),l},Iu(n,a,r));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Au,getElementRects:async function(t){const n=this.getOffsetParent||Au,e=this.getDimensions,o=await e(t.floating);return{reference:Kv(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:n,height:e}=tp(t);return{width:n,height:e}},getScale:cr,isElement:Qe,isRTL:function(t){return sn(t).direction==="rtl"}};function Tu(t,n){return t.x===n.x&&t.y===n.y&&t.width===n.width&&t.height===n.height}function qv(t,n,e,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=cl(t),f=r||i?[...u?co(u):[],...co(n)]:[];f.forEach(y=>{r&&y.addEventListener("scroll",e,{passive:!0}),i&&y.addEventListener("resize",e)});const d=u&&s?function(y,x){let S,b=null;const w=En(y);function E(){var j;clearTimeout(S),(j=b)==null||j.disconnect(),b=null}return function j(_,M){_===void 0&&(_=!1),M===void 0&&(M=1),E();const F=y.getBoundingClientRect(),{left:D,top:A,width:P,height:re}=F;if(_||x(),!P||!re)return;const ae={rootMargin:-nr(A)+"px "+-nr(w.clientWidth-(D+P))+"px "+-nr(w.clientHeight-(A+re))+"px "+-nr(D)+"px",threshold:Do(0,ra(1,M))||1};let z=!0;function ee(q){const ie=q[0].intersectionRatio;if(ie!==M){if(!z)return j();ie?j(!1,ie):S=setTimeout(()=>{j(!1,1e-7)},1e3)}ie!==1||Tu(F,y.getBoundingClientRect())||j(),z=!1}try{b=new IntersectionObserver(ee,{...ae,root:w.ownerDocument})}catch{b=new IntersectionObserver(ee,ae)}b.observe(y)}(!0),E}(u,e):null;let p,h=-1,m=null;a&&(m=new ResizeObserver(y=>{let[x]=y;x&&x.target===u&&m&&(m.unobserve(n),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var S;(S=m)==null||S.observe(n)})),e()}),u&&!l&&m.observe(u),m.observe(n));let v=l?Fo(t):null;return l&&function y(){const x=Fo(t);v&&!Tu(v,x)&&e(),v=x,p=requestAnimationFrame(y)}(),e(),()=>{var y;f.forEach(x=>{r&&x.removeEventListener("scroll",e),i&&x.removeEventListener("resize",e)}),d==null||d(),(y=m)==null||y.disconnect(),m=null,l&&cancelAnimationFrame(p)}}const Jv=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(n){var e,o;const{x:r,y:i,placement:a,middlewareData:s}=n,l=await async function(u,f){const{placement:d,platform:p,elements:h}=u,m=await(p.isRTL==null?void 0:p.isRTL(h.floating)),v=Ro(d),y=_a(d),x=ro(d)==="y",S=Vv.has(v)?-1:1,b=m&&x?-1:1,w=Ma(f,u);let{mainAxis:E,crossAxis:j,alignmentAxis:_}=typeof w=="number"?{mainAxis:w,crossAxis:0,alignmentAxis:null}:{mainAxis:w.mainAxis||0,crossAxis:w.crossAxis||0,alignmentAxis:w.alignmentAxis};return y&&typeof _=="number"&&(j=y==="end"?-1*_:_),x?{x:j*b,y:E*S}:{x:E*S,y:j*b}}(n,t);return a===((e=s.offset)==null?void 0:e.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:a}}}}},Xv=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(n){const{x:e,y:o,placement:r}=n,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:y=>{let{x,y:S}=y;return{x,y:S}}},...l}=Ma(t,n),u={x:e,y:o},f=await ep(n,l),d=ro(Ro(r)),p=Gf(d);let h=u[p],m=u[d];if(i){const y=p==="y"?"bottom":"right";h=ku(h+f[p==="y"?"top":"left"],h,h-f[y])}if(a){const y=d==="y"?"bottom":"right";m=ku(m+f[d==="y"?"top":"left"],m,m-f[y])}const v=s.fn({...n,[p]:h,[d]:m});return{...v,data:{x:v.x-e,y:v.y-o,enabled:{[p]:i,[d]:a}}}}}},Qv=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(n){var e,o;const{placement:r,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:u}=n,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:v=!0,...y}=Ma(t,n);if((e=i.arrow)!=null&&e.alignmentOffset)return{};const x=Ro(r),S=ro(s),b=Ro(s)===s,w=await(l.isRTL==null?void 0:l.isRTL(u.floating)),E=p||(b||!v?[ji(s)]:function(ae){const z=ji(ae);return[sc(ae),z,sc(z)]}(s)),j=m!=="none";!p&&j&&E.push(...Rv(s,v,m,w));const _=[s,...E],M=await ep(n,y),F=[];let D=((o=i.flip)==null?void 0:o.overflows)||[];if(f&&F.push(M[x]),d){const ae=function(z,ee,q){q===void 0&&(q=!1);const ie=_a(z),J=Zf(z),W=Kf(J);let Q=J==="x"?ie===(q?"end":"start")?"right":"left":ie==="start"?"bottom":"top";return ee.reference[W]>ee.floating[W]&&(Q=ji(Q)),[Q,ji(Q)]}(r,a,w);F.push(M[ae[0]],M[ae[1]])}if(D=[...D,{placement:r,overflows:F}],!F.every(ae=>ae<=0)){var A,P;const ae=(((A=i.flip)==null?void 0:A.index)||0)+1,z=_[ae];if(z&&(!(d==="alignment"&&S!==ro(z))||D.every(q=>ro(q.placement)!==S||q.overflows[0]>0)))return{data:{index:ae,overflows:D},reset:{placement:z}};let ee=(P=D.filter(q=>q.overflows[0]<=0).sort((q,ie)=>q.overflows[1]-ie.overflows[1])[0])==null?void 0:P.placement;if(!ee)switch(h){case"bestFit":{var re;const q=(re=D.filter(ie=>{if(j){const J=ro(ie.placement);return J===S||J==="y"}return!0}).map(ie=>[ie.placement,ie.overflows.filter(J=>J>0).reduce((J,W)=>J+W,0)]).sort((ie,J)=>ie[1]-J[1])[0])==null?void 0:re[0];q&&(ee=q);break}case"initialPlacement":ee=s}if(r!==ee)return{reset:{placement:ee}}}return{}}}},e1=(t,n,e)=>{const o=new Map,r={platform:Zv,...e},i={...r.platform,_c:o};return(async(a,s,l)=>{const{placement:u="bottom",strategy:f="absolute",middleware:d=[],platform:p}=l,h=d.filter(Boolean),m=await(p.isRTL==null?void 0:p.isRTL(s));let v=await p.getElementRects({reference:a,floating:s,strategy:f}),{x:y,y:x}=Nu(v,u,m),S=u,b={},w=0;for(let E=0;E<h.length;E++){const{name:j,fn:_}=h[E],{x:M,y:F,data:D,reset:A}=await _({x:y,y:x,initialPlacement:u,placement:S,strategy:f,middlewareData:b,rects:v,platform:p,elements:{reference:a,floating:s}});y=M??y,x=F??x,b={...b,[j]:{...b[j],...D}},A&&w<=50&&(w++,typeof A=="object"&&(A.placement&&(S=A.placement),A.rects&&(v=A.rects===!0?await p.getElementRects({reference:a,floating:s,strategy:f}):A.rects),{x:y,y:x}=Nu(v,S,m)),E=-1)}return{x:y,y:x,placement:S,strategy:f,middlewareData:b}})(t,n,{...r,platform:i})};var Yi=typeof document<"u"?g.useLayoutEffect:function(){};function la(t,n){if(t===n)return!0;if(typeof t!=typeof n)return!1;if(typeof t=="function"&&t.toString()===n.toString())return!0;let e,o,r;if(t&&n&&typeof t=="object"){if(Array.isArray(t)){if(e=t.length,e!==n.length)return!1;for(o=e;o--!==0;)if(!la(t[o],n[o]))return!1;return!0}if(r=Object.keys(t),e=r.length,e!==Object.keys(n).length)return!1;for(o=e;o--!==0;)if(!{}.hasOwnProperty.call(n,r[o]))return!1;for(o=e;o--!==0;){const i=r[o];if((i!=="_owner"||!t.$$typeof)&&!la(t[i],n[i]))return!1}return!0}return t!=t&&n!=n}function ip(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Du(t,n){const e=ip(t);return Math.round(n*e)/e}function ws(t){const n=G.useRef(t);return Yi(()=>{n.current=t}),n}const t1=(t,n)=>({...Xv(t),options:[t,n]}),n1=(t,n)=>({...Qv(t),options:[t,n]});function ap(t){return G.useMemo(()=>t.every(n=>n==null)?null:n=>{t.forEach(e=>{typeof e=="function"?e(n):e!=null&&(e.current=n)})},t)}const sp={...G},o1=sp.useInsertionEffect||(t=>t());function Ft(t){const n=G.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return o1(()=>{n.current=t}),G.useCallback(function(){for(var e=arguments.length,o=new Array(e),r=0;r<e;r++)o[r]=arguments[r];return n.current==null?void 0:n.current(...o)},[])}const ul="ArrowUp",qr="ArrowDown",eo="ArrowLeft",to="ArrowRight";function Oi(t,n,e){return Math.floor(t/n)!==e}function Dr(t,n){return n<0||n>=t.current.length}function bs(t,n){return Nt(t,{disabledIndices:n})}function Mu(t,n){return Nt(t,{decrement:!0,startingIndex:t.current.length,disabledIndices:n})}function Nt(t,n){let{startingIndex:e=-1,decrement:o=!1,disabledIndices:r,amount:i=1}=n===void 0?{}:n;const a=t.current;let s=e;do s+=o?-i:i;while(s>=0&&s<=a.length-1&&Gi(a,s,r));return s}function r1(t,n,e,o,r){if(t===-1)return-1;const i=e.indexOf(t),a=n[t];switch(r){case"tl":return i;case"tr":return a?i+a.width-1:i;case"bl":return a?i+(a.height-1)*o:i;case"br":return e.lastIndexOf(t)}}function i1(t,n){return n.flatMap((e,o)=>t.includes(e)?[o]:[])}function Gi(t,n,e){if(e)return e.includes(n);const o=t[n];return o==null||o.hasAttribute("disabled")||o.getAttribute("aria-disabled")==="true"}var tt=typeof document<"u"?g.useLayoutEffect:g.useEffect;function a1(t,n){const e=t.compareDocumentPosition(n);return e&Node.DOCUMENT_POSITION_FOLLOWING||e&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:e&Node.DOCUMENT_POSITION_PRECEDING||e&Node.DOCUMENT_POSITION_CONTAINS?1:0}const cp=G.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function s1(t){const{children:n,elementsRef:e,labelsRef:o}=t,[r,i]=G.useState(()=>new Map),a=G.useCallback(l=>{i(u=>new Map(u).set(l,null))},[]),s=G.useCallback(l=>{i(u=>{const f=new Map(u);return f.delete(l),f})},[]);return tt(()=>{const l=new Map(r);Array.from(l.keys()).sort(a1).forEach((u,f)=>{l.set(u,f)}),function(u,f){if(u.size!==f.size)return!1;for(const[d,p]of u.entries())if(p!==f.get(d))return!1;return!0}(r,l)||i(l)},[r]),G.createElement(cp.Provider,{value:G.useMemo(()=>({register:a,unregister:s,map:r,elementsRef:e,labelsRef:o}),[a,s,r,e,o])},n)}function lp(t){t===void 0&&(t={});const{label:n}=t,{register:e,unregister:o,map:r,elementsRef:i,labelsRef:a}=G.useContext(cp),[s,l]=G.useState(null),u=G.useRef(null),f=G.useCallback(d=>{if(u.current=d,s!==null&&(i.current[s]=d,a)){var p;const h=n!==void 0;a.current[s]=h?n:(p=d==null?void 0:d.textContent)!=null?p:null}},[s,i,a,n]);return tt(()=>{const d=u.current;if(d)return e(d),()=>{o(d)}},[e,o]),tt(()=>{const d=u.current?r.get(u.current):null;d!=null&&l(d)},[r]),G.useMemo(()=>({ref:f,index:s??-1}),[s,f])}function ua(){return ua=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},ua.apply(this,arguments)}let _u=!1,c1=0;const Lu=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+c1++,lc=sp.useId||function(){const[t,n]=G.useState(()=>_u?Lu():void 0);return tt(()=>{t==null&&n(Lu())},[]),G.useEffect(()=>{_u=!0},[]),t};let ni;function xs(){for(var t,n=arguments.length,e=new Array(n),o=0;o<n;o++)e[o]=arguments[o];const r="Floating UI: "+e.join(" ");var i;(t=ni)!=null&&t.has(r)||((i=ni)==null||i.add(r),console.warn(r))}function up(){const t=new Map;return{emit(n,e){var o;(o=t.get(n))==null||o.forEach(r=>r(e))},on(n,e){t.set(n,[...t.get(n)||[],e])},off(n,e){var o;t.set(n,((o=t.get(n))==null?void 0:o.filter(r=>r!==e))||[])}}}process.env.NODE_ENV!=="production"&&(ni=new Set);const dp=G.createContext(null),fp=G.createContext(null),io=()=>{var t;return((t=G.useContext(dp))==null?void 0:t.id)||null},ao=()=>G.useContext(fp);function l1(t){const{children:n,id:e}=t,o=io();return G.createElement(dp.Provider,{value:G.useMemo(()=>({id:e,parentId:o}),[e,o])},n)}function u1(t){const{children:n}=t,e=G.useRef([]),o=G.useCallback(a=>{e.current=[...e.current,a]},[]),r=G.useCallback(a=>{e.current=e.current.filter(s=>s!==a)},[]),i=G.useState(()=>up())[0];return G.createElement(fp.Provider,{value:G.useMemo(()=>({nodesRef:e,addNode:o,removeNode:r,events:i}),[o,r,i])},n)}function oi(t){return"data-floating-ui-"+t}function pn(t){const n=g.useRef(t);return tt(()=>{n.current=t}),n}const Ru=oi("safe-polygon");function Cs(t,n,e){return e&&!Ur(e)?0:typeof t=="number"?t:t==null?void 0:t[n]}let Fu=0;function Xn(t,n){n===void 0&&(n={});const{preventScroll:e=!1,cancelPrevious:o=!0,sync:r=!1}=n;o&&cancelAnimationFrame(Fu);const i=()=>t==null?void 0:t.focus({preventScroll:e});r?i():Fu=requestAnimationFrame(i)}function Mo(t,n){let e=t.filter(r=>{var i;return r.parentId===n&&((i=r.context)==null?void 0:i.open)}),o=e;for(;o.length;)o=t.filter(r=>{var i;return(i=o)==null?void 0:i.some(a=>{var s;return r.parentId===a.id&&((s=r.context)==null?void 0:s.open)})}),e=e.concat(o);return e}let Yo=new WeakMap,Ni=new WeakSet,Ii={},Ss=0;const pp=t=>t&&(t.host||pp(t.parentNode));function d1(t,n,e,o){const r="data-floating-ui-inert",i=o?"inert":e?"aria-hidden":null,a=((d,p)=>p.map(h=>{if(d.contains(h))return h;const m=pp(h);return d.contains(m)?m:null}).filter(h=>h!=null))(n,t),s=new Set,l=new Set(a),u=[];Ii[r]||(Ii[r]=new WeakMap);const f=Ii[r];return a.forEach(function d(p){!p||s.has(p)||(s.add(p),p.parentNode&&d(p.parentNode))}),function d(p){!p||l.has(p)||[].forEach.call(p.children,h=>{if(fo(h)!=="script")if(s.has(h))d(h);else{const m=i?h.getAttribute(i):null,v=m!==null&&m!=="false",y=(Yo.get(h)||0)+1,x=(f.get(h)||0)+1;Yo.set(h,y),f.set(h,x),u.push(h),y===1&&v&&Ni.add(h),x===1&&h.setAttribute(r,""),!v&&i&&h.setAttribute(i,"true")}})}(n),s.clear(),Ss++,()=>{u.forEach(d=>{const p=(Yo.get(d)||0)-1,h=(f.get(d)||0)-1;Yo.set(d,p),f.set(d,h),p||(!Ni.has(d)&&i&&d.removeAttribute(i),Ni.delete(d)),h||d.removeAttribute(r)}),Ss--,Ss||(Yo=new WeakMap,Yo=new WeakMap,Ni=new WeakSet,Ii={})}}function Bu(t,n,e){n===void 0&&(n=!1),e===void 0&&(e=!1);const o=Pt(t[0]).body;return d1(t.concat(Array.from(o.querySelectorAll("[aria-live]"))),o,n,e)}const da=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Hu(t,n){const e=sl(t,da());n==="prev"&&e.reverse();const o=e.indexOf($n(Pt(t)));return e.slice(o+1)[0]}function $u(t,n){const e=n||t.currentTarget,o=t.relatedTarget;return!o||!Ct(e,o)}const dl={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function Wu(t){t.key==="Tab"&&(t.target,clearTimeout(void 0))}const zu=G.forwardRef(function(t,n){const[e,o]=G.useState();tt(()=>(Vf()&&o("button"),document.addEventListener("keydown",Wu),()=>{document.removeEventListener("keydown",Wu)}),[]);const r={ref:n,tabIndex:0,role:e,"aria-hidden":!e||void 0,[oi("focus-guard")]:"",style:dl};return G.createElement("span",ua({},t,r))}),f1=G.createContext(null),uc="data-floating-ui-focusable";function hp(t){return t?t.hasAttribute(uc)?t:t.querySelector("["+uc+"]")||t:null}let bo=[];function ks(t){bo=bo.filter(e=>e.isConnected);let n=t;if(n&&fo(n)!=="body"){if(!function(e,o){if(o=o||{},!e)throw new Error("No node provided");return mr.call(e,sa)!==!1&&cc(o,e)}(n,da())){const e=sl(n,da())[0];e&&(n=e)}bo.push(n),bo.length>20&&(bo=bo.slice(-20))}}function Uu(){return bo.slice().reverse().find(t=>t.isConnected)}const p1=G.forwardRef(function(t,n){return G.createElement("button",ua({},t,{type:"button",ref:n,tabIndex:-1,style:dl}))});function h1(t){const{context:n,children:e,disabled:o=!1,order:r=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,restoreFocus:l=!1,modal:u=!0,visuallyHiddenDismiss:f=!1,closeOnFocusOut:d=!0}=t,{open:p,refs:h,nodeId:m,onOpenChange:v,events:y,dataRef:x,floatingId:S,elements:{domReference:b,floating:w}}=n,E=typeof a=="number"&&a<0,j=ac(b)&&E,_=typeof HTMLElement>"u"||!("inert"in HTMLElement.prototype)||i,M=pn(r),F=pn(a),D=pn(s),A=ao(),P=G.useContext(f1),re=G.useRef(null),ae=G.useRef(null),z=G.useRef(!1),ee=G.useRef(!1),q=G.useRef(-1),ie=P!=null,J=hp(w),W=Ft(function(L){return L===void 0&&(L=J),L?sl(L,da()):[]}),Q=Ft(L=>{const O=W(L);return M.current.map(I=>b&&I==="reference"?b:J&&I==="floating"?J:O).filter(Boolean).flat()});function Y(L){return!o&&f&&u?G.createElement(p1,{ref:L==="start"?re:ae,onClick:O=>v(!1,O.nativeEvent)},typeof f=="string"?f:"Dismiss"):null}G.useEffect(()=>{if(o||!u)return;function L(I){if(I.key==="Tab"){Ct(J,$n(Pt(J)))&&W().length===0&&!j&&Lt(I);const B=Q(),U=Qn(I);M.current[0]==="reference"&&U===b&&(Lt(I),I.shiftKey?Xn(B[B.length-1]):Xn(B[1])),M.current[1]==="floating"&&U===J&&I.shiftKey&&(Lt(I),Xn(B[0]))}}const O=Pt(J);return O.addEventListener("keydown",L),()=>{O.removeEventListener("keydown",L)}},[o,b,J,u,M,j,W,Q]),G.useEffect(()=>{if(!o&&w)return w.addEventListener("focusin",L),()=>{w.removeEventListener("focusin",L)};function L(O){const I=Qn(O),B=W().indexOf(I);B!==-1&&(q.current=B)}},[o,w,W]),G.useEffect(()=>{if(!o&&d)return w&&gt(b)?(b.addEventListener("focusout",O),b.addEventListener("pointerdown",L),w.addEventListener("focusout",O),()=>{b.removeEventListener("focusout",O),b.removeEventListener("pointerdown",L),w.removeEventListener("focusout",O)}):void 0;function L(){ee.current=!0,setTimeout(()=>{ee.current=!1})}function O(I){const B=I.relatedTarget;queueMicrotask(()=>{const U=!(Ct(b,B)||Ct(w,B)||Ct(B,w)||Ct(P==null?void 0:P.portalNode,B)||B!=null&&B.hasAttribute(oi("focus-guard"))||A&&(Mo(A.nodesRef.current,m).find(V=>{var se,Z;return Ct((se=V.context)==null?void 0:se.elements.floating,B)||Ct((Z=V.context)==null?void 0:Z.elements.domReference,B)})||function(V,se){var Z;let T=[],me=(Z=V.find(be=>be.id===se))==null?void 0:Z.parentId;for(;me;){const be=V.find(Ie=>Ie.id===me);me=be==null?void 0:be.parentId,be&&(T=T.concat(be))}return T}(A.nodesRef.current,m).find(V=>{var se,Z;return((se=V.context)==null?void 0:se.elements.floating)===B||((Z=V.context)==null?void 0:Z.elements.domReference)===B})));if(l&&U&&$n(Pt(J))===Pt(J).body){gt(J)&&J.focus();const V=q.current,se=W(),Z=se[V]||se[se.length-1]||J;gt(Z)&&Z.focus()}!j&&u||!B||!U||ee.current||B===Uu()||(z.current=!0,v(!1,I,"focus-out"))})}},[o,b,w,J,u,m,A,P,v,d,l,W,j]),G.useEffect(()=>{var L;if(o)return;const O=Array.from((P==null||(L=P.portalNode)==null?void 0:L.querySelectorAll("["+oi("portal")+"]"))||[]);if(w){const I=[w,...O,re.current,ae.current,M.current.includes("reference")||j?b:null].filter(U=>U!=null),B=u||j?Bu(I,_,!_):Bu(I);return()=>{B()}}},[o,b,w,u,M,P,j,_]),tt(()=>{if(o||!gt(J))return;const L=$n(Pt(J));queueMicrotask(()=>{const O=Q(J),I=F.current,B=(typeof I=="number"?O[I]:I.current)||J,U=Ct(J,L);E||U||!p||Xn(B,{preventScroll:B===J})})},[o,p,J,E,Q,F]),tt(()=>{if(o||!J)return;let L=!1;const O=Pt(J),I=$n(O);let B=x.current.openEvent;function U(se){let{open:Z,reason:T,event:me,nested:be}=se;Z&&(B=me),T==="escape-key"&&h.domReference.current&&ks(h.domReference.current),T==="hover"&&me.type==="mouseleave"&&(z.current=!0),T==="outside-press"&&(be?(z.current=!1,L=!0):z.current=!(zf(me)||Uf(me)))}ks(I),y.on("openchange",U);const V=O.createElement("span");return V.setAttribute("tabindex","-1"),V.setAttribute("aria-hidden","true"),Object.assign(V.style,dl),ie&&b&&b.insertAdjacentElement("afterend",V),()=>{y.off("openchange",U);const se=$n(O),Z=Ct(w,se)||A&&Mo(A.nodesRef.current,m).some(me=>{var be;return Ct((be=me.context)==null?void 0:be.elements.floating,se)});(Z||B&&["click","mousedown"].includes(B.type))&&h.domReference.current&&ks(h.domReference.current);const T=typeof D.current=="boolean"?Uu()||V:D.current.current||V;queueMicrotask(()=>{D.current&&!z.current&&gt(T)&&(T===se||se===O.body||Z)&&T.focus({preventScroll:L}),V.remove()})}},[o,w,J,D,x,h,y,A,m,ie,b]),G.useEffect(()=>{queueMicrotask(()=>{z.current=!1})},[o]),tt(()=>{if(!o&&P)return P.setFocusManagerState({modal:u,closeOnFocusOut:d,open:p,onOpenChange:v,refs:h}),()=>{P.setFocusManagerState(null)}},[o,P,u,p,v,h,d]),tt(()=>{if(o||!J||typeof MutationObserver!="function"||E)return;const L=()=>{const I=J.getAttribute("tabindex"),B=W(),U=$n(Pt(w)),V=B.indexOf(U);V!==-1&&(q.current=V),M.current.includes("floating")||U!==h.domReference.current&&B.length===0?I!=="0"&&J.setAttribute("tabindex","0"):I!=="-1"&&J.setAttribute("tabindex","-1")};L();const O=new MutationObserver(L);return O.observe(J,{childList:!0,subtree:!0,attributes:!0}),()=>{O.disconnect()}},[o,w,J,h,M,W,E]);const H=!o&&_&&(!u||!j)&&(ie||u);return G.createElement(G.Fragment,null,H&&G.createElement(zu,{"data-type":"inside",ref:P==null?void 0:P.beforeInsideRef,onFocus:L=>{if(u){const I=Q();Xn(r[0]==="reference"?I[0]:I[I.length-1])}else if(P!=null&&P.preserveTabOrder&&P.portalNode)if(z.current=!1,$u(L,P.portalNode)){const I=Hu(document.body,"next")||b;I==null||I.focus()}else{var O;(O=P.beforeOutsideRef.current)==null||O.focus()}}}),!j&&Y("start"),e,Y("end"),H&&G.createElement(zu,{"data-type":"inside",ref:P==null?void 0:P.afterInsideRef,onFocus:L=>{if(u)Xn(Q()[0]);else if(P!=null&&P.preserveTabOrder&&P.portalNode)if(d&&(z.current=!0),$u(L,P.portalNode)){const I=Hu(document.body,"prev")||b;I==null||I.focus()}else{var O;(O=P.afterOutsideRef.current)==null||O.focus()}}}))}function Vu(t){return gt(t.target)&&t.target.tagName==="BUTTON"}function Yu(t){return Yf(t)}const m1={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},g1={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Gu=t=>{var n,e;return{escapeKey:typeof t=="boolean"?t:(n=t==null?void 0:t.escapeKey)!=null&&n,outsidePress:typeof t=="boolean"?t:(e=t==null?void 0:t.outsidePress)==null||e}};function v1(t){const{open:n=!1,onOpenChange:e,elements:o}=t,r=lc(),i=G.useRef({}),[a]=G.useState(()=>up()),s=io()!=null;if(process.env.NODE_ENV!=="production"){const h=o.reference;h&&!Qe(h)&&function(){for(var m,v=arguments.length,y=new Array(v),x=0;x<v;x++)y[x]=arguments[x];const S="Floating UI: "+y.join(" ");var b;(m=ni)!=null&&m.has(S)||((b=ni)==null||b.add(S),console.error(S))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,u]=G.useState(o.reference),f=Ft((h,m,v)=>{i.current.openEvent=h?m:void 0,a.emit("openchange",{open:h,event:m,reason:v,nested:s}),e==null||e(h,m,v)}),d=G.useMemo(()=>({setPositionReference:u}),[]),p=G.useMemo(()=>({reference:l||o.reference||null,floating:o.floating||null,domReference:o.reference}),[l,o.reference,o.floating]);return G.useMemo(()=>({dataRef:i,open:n,onOpenChange:f,elements:p,events:a,floatingId:r,refs:d}),[n,f,p,a,r,d])}function y1(t){t===void 0&&(t={});const{nodeId:n}=t,e=v1({...t,elements:{reference:null,floating:null,...t.elements}}),o=t.rootContext||e,r=o.elements,[i,a]=G.useState(null),[s,l]=G.useState(null),u=(r==null?void 0:r.domReference)||i,f=G.useRef(null),d=ao();tt(()=>{u&&(f.current=u)},[u]);const p=function(S){S===void 0&&(S={});const{placement:b="bottom",strategy:w="absolute",middleware:E=[],platform:j,elements:{reference:_,floating:M}={},transform:F=!0,whileElementsMounted:D,open:A}=S,[P,re]=G.useState({x:0,y:0,strategy:w,placement:b,middlewareData:{},isPositioned:!1}),[ae,z]=G.useState(E);la(ae,E)||z(E);const[ee,q]=G.useState(null),[ie,J]=G.useState(null),W=G.useCallback(Oe=>{Oe!==L.current&&(L.current=Oe,q(Oe))},[]),Q=G.useCallback(Oe=>{Oe!==O.current&&(O.current=Oe,J(Oe))},[]),Y=_||ee,H=M||ie,L=G.useRef(null),O=G.useRef(null),I=G.useRef(P),B=D!=null,U=ws(D),V=ws(j),se=ws(A),Z=G.useCallback(()=>{if(!L.current||!O.current)return;const Oe={placement:b,strategy:w,middleware:ae};V.current&&(Oe.platform=V.current),e1(L.current,O.current,Oe).then(ke=>{const ue={...ke,isPositioned:se.current!==!1};T.current&&!la(I.current,ue)&&(I.current=ue,kf.flushSync(()=>{re(ue)}))})},[ae,b,w,V,se]);Yi(()=>{A===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,re(Oe=>({...Oe,isPositioned:!1})))},[A]);const T=G.useRef(!1);Yi(()=>(T.current=!0,()=>{T.current=!1}),[]),Yi(()=>{if(Y&&(L.current=Y),H&&(O.current=H),Y&&H){if(U.current)return U.current(Y,H,Z);Z()}},[Y,H,Z,U,B]);const me=G.useMemo(()=>({reference:L,floating:O,setReference:W,setFloating:Q}),[W,Q]),be=G.useMemo(()=>({reference:Y,floating:H}),[Y,H]),Ie=G.useMemo(()=>{const Oe={position:w,left:0,top:0};if(!be.floating)return Oe;const ke=Du(be.floating,P.x),ue=Du(be.floating,P.y);return F?{...Oe,transform:"translate("+ke+"px, "+ue+"px)",...ip(be.floating)>=1.5&&{willChange:"transform"}}:{position:w,left:ke,top:ue}},[w,F,be.floating,P.x,P.y]);return G.useMemo(()=>({...P,update:Z,refs:me,elements:be,floatingStyles:Ie}),[P,Z,me,be,Ie])}({...t,elements:{...r,...s&&{reference:s}}}),h=G.useCallback(S=>{const b=Qe(S)?{getBoundingClientRect:()=>S.getBoundingClientRect(),contextElement:S}:S;l(b),p.refs.setReference(b)},[p.refs]),m=G.useCallback(S=>{(Qe(S)||S===null)&&(f.current=S,a(S)),(Qe(p.refs.reference.current)||p.refs.reference.current===null||S!==null&&!Qe(S))&&p.refs.setReference(S)},[p.refs]),v=G.useMemo(()=>({...p.refs,setReference:m,setPositionReference:h,domReference:f}),[p.refs,m,h]),y=G.useMemo(()=>({...p.elements,domReference:u}),[p.elements,u]),x=G.useMemo(()=>({...p,...o,refs:v,elements:y,nodeId:n}),[p,v,y,n,o]);return tt(()=>{o.dataRef.current.floatingContext=x;const S=d==null?void 0:d.nodesRef.current.find(b=>b.id===n);S&&(S.context=x)}),G.useMemo(()=>({...p,context:x,refs:v,elements:y}),[p,v,y,x])}const Ku="active",Zu="selected";function Es(t,n,e){const o=new Map,r=e==="item";let i=t;if(r&&t){const{[Ku]:a,[Zu]:s,...l}=t;i=l}return{...e==="floating"&&{tabIndex:-1,[uc]:""},...i,...n.map(a=>{const s=a?a[e]:null;return typeof s=="function"?t?s(t):null:s}).concat(t).reduce((a,s)=>(s&&Object.entries(s).forEach(l=>{let[u,f]=l;var d;r&&[Ku,Zu].includes(u)||(u.indexOf("on")===0?(o.has(u)||o.set(u,[]),typeof f=="function"&&((d=o.get(u))==null||d.push(f),a[u]=function(){for(var p,h=arguments.length,m=new Array(h),v=0;v<h;v++)m[v]=arguments[v];return(p=o.get(u))==null?void 0:p.map(y=>y(...m)).find(y=>y!==void 0)})):a[u]=f)}),a),{})}}let qu=!1;function La(t,n,e){switch(t){case"vertical":return n;case"horizontal":return e;default:return n||e}}function Ju(t,n){return La(n,t===ul||t===qr,t===eo||t===to)}function js(t,n,e){return La(n,t===qr,e?t===eo:t===to)||t==="Enter"||t===" "||t===""}function Xu(t,n,e){return La(n,e?t===to:t===eo,t===ul)}function w1(t,n){const{open:e,onOpenChange:o,elements:r}=t,{listRef:i,activeIndex:a,onNavigate:s=()=>{},enabled:l=!0,selectedIndex:u=null,allowEscape:f=!1,loop:d=!1,nested:p=!1,rtl:h=!1,virtual:m=!1,focusItemOnOpen:v="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:x=!0,disabledIndices:S,orientation:b="vertical",cols:w=1,scrollItemIntoView:E=!0,virtualItemRef:j,itemSizes:_,dense:M=!1}=n;process.env.NODE_ENV!=="production"&&(f&&(d||xs("`useListNavigation` looping must be enabled to allow escaping."),m||xs("`useListNavigation` must be virtual to allow escaping.")),b==="vertical"&&w>1&&xs("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const F=pn(hp(r.floating)),D=io(),A=ao(),P=Ft(s),re=ac(r.domReference),ae=G.useRef(v),z=G.useRef(u??-1),ee=G.useRef(null),q=G.useRef(!0),ie=G.useRef(P),J=G.useRef(!!r.floating),W=G.useRef(e),Q=G.useRef(!1),Y=G.useRef(!1),H=pn(S),L=pn(e),O=pn(E),I=pn(u),[B,U]=G.useState(),[V,se]=G.useState(),Z=Ft(function(ue,k,C){function N($){m?(U($.id),A==null||A.events.emit("virtualfocus",$),j&&(j.current=$)):Xn($,{preventScroll:!0,sync:!(!$f().toLowerCase().startsWith("mac")||navigator.maxTouchPoints||!Vf())&&(qu||Q.current)})}C===void 0&&(C=!1);const R=ue.current[k.current];R&&N(R),requestAnimationFrame(()=>{const $=ue.current[k.current]||R;if(!$)return;R||N($);const ce=O.current;ce&&me&&(C||!q.current)&&($.scrollIntoView==null||$.scrollIntoView(typeof ce=="boolean"?{block:"nearest",inline:"nearest"}:ce))})});tt(()=>{document.createElement("div").focus({get preventScroll(){return qu=!0,!1}})},[]),tt(()=>{l&&(e&&r.floating?ae.current&&u!=null&&(Y.current=!0,z.current=u,P(u)):J.current&&(z.current=-1,ie.current(null)))},[l,e,r.floating,u,P]),tt(()=>{if(l&&e&&r.floating)if(a==null){if(Q.current=!1,I.current!=null)return;if(J.current&&(z.current=-1,Z(i,z)),(!W.current||!J.current)&&ae.current&&(ee.current!=null||ae.current===!0&&ee.current==null)){let ue=0;const k=()=>{i.current[0]==null?(ue<2&&(ue?requestAnimationFrame:queueMicrotask)(k),ue++):(z.current=ee.current==null||js(ee.current,b,h)||p?bs(i,H.current):Mu(i,H.current),ee.current=null,P(z.current))};k()}}else Dr(i,a)||(z.current=a,Z(i,z,Y.current),Y.current=!1)},[l,e,r.floating,a,I,p,i,b,h,P,Z,H]),tt(()=>{var ue;if(!l||r.floating||!A||m||!J.current)return;const k=A.nodesRef.current,C=(ue=k.find($=>$.id===D))==null||(ue=ue.context)==null?void 0:ue.elements.floating,N=$n(Pt(r.floating)),R=k.some($=>$.context&&Ct($.context.elements.floating,N));C&&!R&&q.current&&C.focus({preventScroll:!0})},[l,r.floating,A,D,m]),tt(()=>{if(l&&A&&m&&!D)return A.events.on("virtualfocus",ue),()=>{A.events.off("virtualfocus",ue)};function ue(k){se(k.id),j&&(j.current=k)}},[l,A,m,D,j]),tt(()=>{ie.current=P,J.current=!!r.floating}),tt(()=>{e||(ee.current=null)},[e]),tt(()=>{W.current=e},[e]);const T=a!=null,me=G.useMemo(()=>{function ue(k){if(!e)return;const C=i.current.indexOf(k);C!==-1&&P(C)}return{onFocus(k){let{currentTarget:C}=k;ue(C)},onClick:k=>{let{currentTarget:C}=k;return C.focus({preventScroll:!0})},...y&&{onMouseMove(k){let{currentTarget:C}=k;ue(C)},onPointerLeave(k){let{pointerType:C}=k;q.current&&C!=="touch"&&(z.current=-1,Z(i,z),P(null),m||Xn(F.current,{preventScroll:!0}))}}}},[e,F,Z,y,i,P,m]),be=Ft(ue=>{if(q.current=!1,Q.current=!0,ue.which===229||!L.current&&ue.currentTarget===F.current)return;if(p&&Xu(ue.key,b,h))return Lt(ue),o(!1,ue.nativeEvent,"list-navigation"),void(gt(r.domReference)&&(m?A==null||A.events.emit("virtualfocus",r.domReference):r.domReference.focus()));const k=z.current,C=bs(i,S),N=Mu(i,S);if(re||(ue.key==="Home"&&(Lt(ue),z.current=C,P(z.current)),ue.key==="End"&&(Lt(ue),z.current=N,P(z.current))),w>1){const R=_||Array.from({length:i.current.length},()=>({width:1,height:1})),$=function(ne,te,le){const he=[];let ye=0;return ne.forEach((pe,oe)=>{let{width:Ee,height:Re}=pe;if(Ee>te&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+oe+" is greater than grid columns");let Pe=!1;for(le&&(ye=0);!Pe;){const Ce=[];for(let Ne=0;Ne<Ee;Ne++)for(let ge=0;ge<Re;ge++)Ce.push(ye+Ne+ge*te);ye%te+Ee<=te&&Ce.every(Ne=>he[Ne]==null)?(Ce.forEach(Ne=>{he[Ne]=oe}),Pe=!0):ye++}}),[...he]}(R,w,M),ce=$.findIndex(ne=>ne!=null&&!Gi(i.current,ne,S)),we=$.reduce((ne,te,le)=>te==null||Gi(i.current,te,S)?ne:le,-1),X=$[function(ne,te){let{event:le,orientation:he,loop:ye,rtl:pe,cols:oe,disabledIndices:Ee,minIndex:Re,maxIndex:Pe,prevIndex:Ce,stopEvent:Ne=!1}=te,ge=Ce;if(le.key===ul){if(Ne&&Lt(le),Ce===-1)ge=Pe;else if(ge=Nt(ne,{startingIndex:ge,amount:oe,decrement:!0,disabledIndices:Ee}),ye&&(Ce-oe<Re||ge<0)){const Se=Ce%oe,Me=Pe%oe,Ae=Pe-(Me-Se);ge=Me===Se?Pe:Me>Se?Ae:Ae-oe}Dr(ne,ge)&&(ge=Ce)}if(le.key===qr&&(Ne&&Lt(le),Ce===-1?ge=Re:(ge=Nt(ne,{startingIndex:Ce,amount:oe,disabledIndices:Ee}),ye&&Ce+oe>Pe&&(ge=Nt(ne,{startingIndex:Ce%oe-oe,amount:oe,disabledIndices:Ee}))),Dr(ne,ge)&&(ge=Ce)),he==="both"){const Se=nr(Ce/oe);le.key===(pe?eo:to)&&(Ne&&Lt(le),Ce%oe!==oe-1?(ge=Nt(ne,{startingIndex:Ce,disabledIndices:Ee}),ye&&Oi(ge,oe,Se)&&(ge=Nt(ne,{startingIndex:Ce-Ce%oe-1,disabledIndices:Ee}))):ye&&(ge=Nt(ne,{startingIndex:Ce-Ce%oe-1,disabledIndices:Ee})),Oi(ge,oe,Se)&&(ge=Ce)),le.key===(pe?to:eo)&&(Ne&&Lt(le),Ce%oe!==0?(ge=Nt(ne,{startingIndex:Ce,decrement:!0,disabledIndices:Ee}),ye&&Oi(ge,oe,Se)&&(ge=Nt(ne,{startingIndex:Ce+(oe-Ce%oe),decrement:!0,disabledIndices:Ee}))):ye&&(ge=Nt(ne,{startingIndex:Ce+(oe-Ce%oe),decrement:!0,disabledIndices:Ee})),Oi(ge,oe,Se)&&(ge=Ce));const Me=nr(Pe/oe)===Se;Dr(ne,ge)&&(ge=ye&&Me?le.key===(pe?to:eo)?Pe:Nt(ne,{startingIndex:Ce-Ce%oe-1,disabledIndices:Ee}):Ce)}return ge}({current:$.map(ne=>ne!=null?i.current[ne]:null)},{event:ue,orientation:b,loop:d,rtl:h,cols:w,disabledIndices:i1([...S||i.current.map((ne,te)=>Gi(i.current,te)?te:void 0),void 0],$),minIndex:ce,maxIndex:we,prevIndex:r1(z.current>N?C:z.current,R,$,w,ue.key===qr?"bl":ue.key===(h?eo:to)?"tr":"tl"),stopEvent:!0})];if(X!=null&&(z.current=X,P(z.current)),b==="both")return}if(Ju(ue.key,b)){if(Lt(ue),e&&!m&&$n(ue.currentTarget.ownerDocument)===ue.currentTarget)return z.current=js(ue.key,b,h)?C:N,void P(z.current);js(ue.key,b,h)?z.current=d?k>=N?f&&k!==i.current.length?-1:C:Nt(i,{startingIndex:k,disabledIndices:S}):Math.min(N,Nt(i,{startingIndex:k,disabledIndices:S})):z.current=d?k<=C?f&&k!==-1?i.current.length:N:Nt(i,{startingIndex:k,decrement:!0,disabledIndices:S}):Math.max(C,Nt(i,{startingIndex:k,decrement:!0,disabledIndices:S})),Dr(i,z.current)?P(null):P(z.current)}}),Ie=G.useMemo(()=>m&&e&&T&&{"aria-activedescendant":V||B},[m,e,T,V,B]),Oe=G.useMemo(()=>({"aria-orientation":b==="both"?void 0:b,...!ac(r.domReference)&&Ie,onKeyDown:be,onPointerMove(){q.current=!0}}),[Ie,be,r.domReference,b]),ke=G.useMemo(()=>{function ue(k){v==="auto"&&zf(k.nativeEvent)&&(ae.current=!0)}return{...Ie,onKeyDown(k){q.current=!1;const C=k.key.startsWith("Arrow"),N=["Home","End"].includes(k.key),R=C||N,$=function(he,ye,pe){return La(ye,pe?he===eo:he===to,he===qr)}(k.key,b,h),ce=Xu(k.key,b,h),we=Ju(k.key,b),X=(p?$:we)||k.key==="Enter"||k.key.trim()==="";if(m&&e){const he=A==null?void 0:A.nodesRef.current.find(pe=>pe.parentId==null),ye=A&&he?function(pe,oe){let Ee,Re=-1;return function Pe(Ce,Ne){Ne>Re&&(Ee=Ce,Re=Ne),Mo(pe,Ce).forEach(ge=>{Pe(ge.id,Ne+1)})}(oe,0),pe.find(Pe=>Pe.id===Ee)}(A.nodesRef.current,he.id):null;if(R&&ye&&j){const pe=new KeyboardEvent("keydown",{key:k.key,bubbles:!0});if($||ce){var ne,te;const oe=((ne=ye.context)==null?void 0:ne.elements.domReference)===k.currentTarget,Ee=ce&&!oe?(te=ye.context)==null?void 0:te.elements.domReference:$?i.current.find(Re=>(Re==null?void 0:Re.id)===B):null;Ee&&(Lt(k),Ee.dispatchEvent(pe),se(void 0))}var le;if((we||N)&&ye.context&&ye.context.open&&ye.parentId&&k.currentTarget!==ye.context.elements.domReference)return Lt(k),void((le=ye.context.elements.domReference)==null||le.dispatchEvent(pe))}return be(k)}(e||x||!C)&&(X&&(ee.current=p&&we?null:k.key),p?$&&(Lt(k),e?(z.current=bs(i,H.current),P(z.current)):o(!0,k.nativeEvent,"list-navigation")):we&&(u!=null&&(z.current=u),Lt(k),!e&&x?o(!0,k.nativeEvent,"list-navigation"):be(k),e&&P(z.current)))},onFocus(){e&&!m&&P(null)},onPointerDown:function(k){ae.current=v,v==="auto"&&Uf(k.nativeEvent)&&(ae.current=!0)},onMouseDown:ue,onClick:ue}},[B,Ie,be,H,v,i,p,P,o,e,x,b,h,u,A,m,j]);return G.useMemo(()=>l?{reference:ke,floating:Oe,item:me}:{},[l,ke,Oe,me])}const b1=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Qu(t,n){const[e,o]=t;let r=!1;const i=n.length;for(let a=0,s=i-1;a<i;s=a++){const[l,u]=n[a]||[0,0],[f,d]=n[s]||[0,0];u>=o!=d>=o&&e<=(f-l)*(o-u)/(d-u)+l&&(r=!r)}return r}function x1(t){t===void 0&&(t={});const{buffer:n=.5,blockPointerEvents:e=!1,requireIntent:o=!0}=t;let r,i=!1,a=null,s=null,l=performance.now();const u=f=>{let{x:d,y:p,placement:h,elements:m,onClose:v,nodeId:y,tree:x}=f;return function(S){function b(){clearTimeout(r),v()}if(clearTimeout(r),!m.domReference||!m.floating||h==null||d==null||p==null)return;const{clientX:w,clientY:E}=S,j=[w,E],_=Qn(S),M=S.type==="mouseleave",F=Ct(m.floating,_),D=Ct(m.domReference,_),A=m.domReference.getBoundingClientRect(),P=m.floating.getBoundingClientRect(),re=h.split("-")[0],ae=d>P.right-P.width/2,z=p>P.bottom-P.height/2,ee=function(L,O){return L[0]>=O.x&&L[0]<=O.x+O.width&&L[1]>=O.y&&L[1]<=O.y+O.height}(j,A),q=P.width>A.width,ie=P.height>A.height,J=(q?A:P).left,W=(q?A:P).right,Q=(ie?A:P).top,Y=(ie?A:P).bottom;if(F&&(i=!0,!M))return;if(D&&(i=!1),D&&!M)return void(i=!0);if(M&&Qe(S.relatedTarget)&&Ct(m.floating,S.relatedTarget)||x&&Mo(x.nodesRef.current,y).some(L=>{let{context:O}=L;return O==null?void 0:O.open}))return;if(re==="top"&&p>=A.bottom-1||re==="bottom"&&p<=A.top+1||re==="left"&&d>=A.right-1||re==="right"&&d<=A.left+1)return b();let H=[];switch(re){case"top":H=[[J,A.top+1],[J,P.bottom-1],[W,P.bottom-1],[W,A.top+1]];break;case"bottom":H=[[J,P.top+1],[J,A.bottom-1],[W,A.bottom-1],[W,P.top+1]];break;case"left":H=[[P.right-1,Y],[P.right-1,Q],[A.left+1,Q],[A.left+1,Y]];break;case"right":H=[[A.right-1,Y],[A.right-1,Q],[P.left+1,Q],[P.left+1,Y]]}if(!Qu([w,E],H)){if(i&&!ee)return b();if(!M&&o){const L=function(O,I){const B=performance.now(),U=B-l;if(a===null||s===null||U===0)return a=O,s=I,l=B,null;const V=O-a,se=I-s,Z=Math.sqrt(V*V+se*se);return a=O,s=I,l=B,Z/U}(S.clientX,S.clientY);if(L!==null&&L<.1)return b()}Qu([w,E],function(L){let[O,I]=L;switch(re){case"top":return[[q?O+n/2:ae?O+4*n:O-4*n,I+n+1],[q?O-n/2:ae?O+4*n:O-4*n,I+n+1],[P.left,ae||q?P.bottom-n:P.top],[P.right,ae?q?P.bottom-n:P.top:P.bottom-n]];case"bottom":return[[q?O+n/2:ae?O+4*n:O-4*n,I-n],[q?O-n/2:ae?O+4*n:O-4*n,I-n],[P.left,ae||q?P.top+n:P.bottom],[P.right,ae?q?P.top+n:P.bottom:P.top+n]];case"left":{const B=[O+n+1,ie?I+n/2:z?I+4*n:I-4*n],U=[O+n+1,ie?I-n/2:z?I+4*n:I-4*n];return[[z||ie?P.right-n:P.left,P.top],[z?ie?P.right-n:P.left:P.right-n,P.bottom],B,U]}case"right":return[[O-n,ie?I+n/2:z?I+4*n:I-4*n],[O-n,ie?I-n/2:z?I+4*n:I-4*n],[z||ie?P.left+n:P.right,P.top],[z?ie?P.left+n:P.right:P.left+n,P.bottom]]}}([d,p]))?!i&&o&&(r=window.setTimeout(b,40)):b()}}};return u.__options={blockPointerEvents:e},u}const dc=g.createContext({getItemProps:()=>({}),activeIndex:null,setActiveIndex:()=>{},setHasFocusInside:()=>{},isOpen:!1,setIsOpen:()=>{}}),mp=g.forwardRef(({className:t,disabled:n,children:e,...o},r)=>{const i=g.useContext(dc),a=lp(),s=ao(),l=a.index===i.activeIndex,u=de("io-dropdown-menu-item",n&&"io-dropdown-menu-item-disabled",t);return c.jsx("div",{ref:ap([a.ref,r]),role:"menuitem",className:u,tabIndex:l?0:-1,"aria-disabled":n,...o,...i.getItemProps({onClick(f){var d;if(n)return f.preventDefault(),void f.stopPropagation();(d=o.onClick)==null||d.call(o,f),i.setIsOpen(!1),s==null||s.events.emit("click")},onFocus(f){var d;n||((d=o.onFocus)==null||d.call(o,f),i.setHasFocusInside(!0))}}),children:e})});mp.displayName="DropdownMenuItem";const fc=g.forwardRef(({className:t,variant:n="default",icon:e,iconRight:o,text:r="",disabled:i,children:a,...s},l)=>{const[u,f]=g.useState(!1),[d,p]=g.useState(!1),[h,m]=g.useState(null),v=g.useRef([]),y=g.useRef([]),x=g.useContext(dc),S=ao(),b=function(){const O=lc(),I=ao(),B=io();return tt(()=>{const U={id:O,parentId:B};return I==null||I.addNode(U),()=>{I==null||I.removeNode(U)}},[I,O,B]),O}(),w=io(),E=lp(),j=w!=null,{floatingStyles:_,refs:M,context:F}=y1({nodeId:b,open:u,onOpenChange:f,placement:j?"right-start":"bottom-start",middleware:[(D={mainAxis:j?0:4,alignmentAxis:j?-4:0},{...Jv(D),options:[D,A]}),n1(),t1()],whileElementsMounted:qv});var D,A;const P=function(O,I){I===void 0&&(I={});const{open:B,onOpenChange:U,dataRef:V,events:se,elements:Z}=O,{enabled:T=!0,delay:me=0,handleClose:be=null,mouseOnly:Ie=!1,restMs:Oe=0,move:ke=!0}=I,ue=ao(),k=io(),C=pn(be),N=pn(me),R=pn(B),$=G.useRef(),ce=G.useRef(-1),we=G.useRef(),X=G.useRef(-1),ne=G.useRef(!0),te=G.useRef(!1),le=G.useRef(()=>{}),he=G.useRef(!1),ye=G.useCallback(()=>{var Ne;const ge=(Ne=V.current.openEvent)==null?void 0:Ne.type;return(ge==null?void 0:ge.includes("mouse"))&&ge!=="mousedown"},[V]);G.useEffect(()=>{if(T)return se.on("openchange",Ne),()=>{se.off("openchange",Ne)};function Ne(ge){let{open:Se}=ge;Se||(clearTimeout(ce.current),clearTimeout(X.current),ne.current=!0,he.current=!1)}},[T,se]),G.useEffect(()=>{if(!T||!C.current||!B)return;function Ne(Se){ye()&&U(!1,Se,"hover")}const ge=Pt(Z.floating).documentElement;return ge.addEventListener("mouseleave",Ne),()=>{ge.removeEventListener("mouseleave",Ne)}},[Z.floating,B,U,T,C,ye]);const pe=G.useCallback(function(Ne,ge,Se){ge===void 0&&(ge=!0),Se===void 0&&(Se="hover");const Me=Cs(N.current,"close",$.current);Me&&!we.current?(clearTimeout(ce.current),ce.current=window.setTimeout(()=>U(!1,Ne,Se),Me)):ge&&(clearTimeout(ce.current),U(!1,Ne,Se))},[N,U]),oe=Ft(()=>{le.current(),we.current=void 0}),Ee=Ft(()=>{if(te.current){const Ne=Pt(Z.floating).body;Ne.style.pointerEvents="",Ne.removeAttribute(Ru),te.current=!1}}),Re=Ft(()=>!!V.current.openEvent&&["click","mousedown"].includes(V.current.openEvent.type));G.useEffect(()=>{if(T&&Qe(Z.domReference)){var Ne;const Ae=Z.domReference;return B&&Ae.addEventListener("mouseleave",Me),(Ne=Z.floating)==null||Ne.addEventListener("mouseleave",Me),ke&&Ae.addEventListener("mousemove",ge,{once:!0}),Ae.addEventListener("mouseenter",ge),Ae.addEventListener("mouseleave",Se),()=>{var Ke;B&&Ae.removeEventListener("mouseleave",Me),(Ke=Z.floating)==null||Ke.removeEventListener("mouseleave",Me),ke&&Ae.removeEventListener("mousemove",ge),Ae.removeEventListener("mouseenter",ge),Ae.removeEventListener("mouseleave",Se)}}function ge(Ae){if(clearTimeout(ce.current),ne.current=!1,Ie&&!Ur($.current)||Oe>0&&!Cs(N.current,"open"))return;const Ke=Cs(N.current,"open",$.current);Ke?ce.current=window.setTimeout(()=>{R.current||U(!0,Ae,"hover")},Ke):B||U(!0,Ae,"hover")}function Se(Ae){if(Re())return;le.current();const Ke=Pt(Z.floating);if(clearTimeout(X.current),he.current=!1,C.current&&V.current.floatingContext){B||clearTimeout(ce.current),we.current=C.current({...V.current.floatingContext,tree:ue,x:Ae.clientX,y:Ae.clientY,onClose(){Ee(),oe(),Re()||pe(Ae,!0,"safe-polygon")}});const kt=we.current;return Ke.addEventListener("mousemove",kt),void(le.current=()=>{Ke.removeEventListener("mousemove",kt)})}($.current!=="touch"||!Ct(Z.floating,Ae.relatedTarget))&&pe(Ae)}function Me(Ae){Re()||V.current.floatingContext&&(C.current==null||C.current({...V.current.floatingContext,tree:ue,x:Ae.clientX,y:Ae.clientY,onClose(){Ee(),oe(),Re()||pe(Ae)}})(Ae))}},[Z,T,O,Ie,Oe,ke,pe,oe,Ee,U,B,R,ue,N,C,V,Re]),tt(()=>{var Ne;if(T&&B&&(Ne=C.current)!=null&&Ne.__options.blockPointerEvents&&ye()){te.current=!0;const Se=Z.floating;if(Qe(Z.domReference)&&Se){var ge;const Me=Pt(Z.floating).body;Me.setAttribute(Ru,"");const Ae=Z.domReference,Ke=ue==null||(ge=ue.nodesRef.current.find(kt=>kt.id===k))==null||(ge=ge.context)==null?void 0:ge.elements.floating;return Ke&&(Ke.style.pointerEvents=""),Me.style.pointerEvents="none",Ae.style.pointerEvents="auto",Se.style.pointerEvents="auto",()=>{Me.style.pointerEvents="",Ae.style.pointerEvents="",Se.style.pointerEvents=""}}}},[T,B,k,Z,ue,C,ye]),tt(()=>{B||($.current=void 0,he.current=!1,oe(),Ee())},[B,oe,Ee]),G.useEffect(()=>()=>{oe(),clearTimeout(ce.current),clearTimeout(X.current),Ee()},[T,Z.domReference,oe,Ee]);const Pe=G.useMemo(()=>{function Ne(ge){$.current=ge.pointerType}return{onPointerDown:Ne,onPointerEnter:Ne,onMouseMove(ge){const{nativeEvent:Se}=ge;function Me(){ne.current||R.current||U(!0,Se,"hover")}Ie&&!Ur($.current)||B||Oe===0||he.current&&ge.movementX**2+ge.movementY**2<2||(clearTimeout(X.current),$.current==="touch"?Me():(he.current=!0,X.current=window.setTimeout(Me,Oe)))}}},[Ie,U,B,R,Oe]),Ce=G.useMemo(()=>({onMouseEnter(){clearTimeout(ce.current)},onMouseLeave(Ne){Re()||pe(Ne.nativeEvent,!1)}}),[pe,Re]);return G.useMemo(()=>T?{reference:Pe,floating:Ce}:{},[T,Pe,Ce])}(F,{enabled:j,delay:{open:75},handleClose:x1({blockPointerEvents:!0})}),re=function(O,I){I===void 0&&(I={});const{open:B,onOpenChange:U,dataRef:V,elements:{domReference:se}}=O,{enabled:Z=!0,event:T="click",toggle:me=!0,ignoreMouse:be=!1,keyboardHandlers:Ie=!0,stickIfOpen:Oe=!0}=I,ke=G.useRef(),ue=G.useRef(!1),k=G.useMemo(()=>({onPointerDown(C){ke.current=C.pointerType},onMouseDown(C){const N=ke.current;C.button===0&&T!=="click"&&(Ur(N,!0)&&be||(!B||!me||V.current.openEvent&&Oe&&V.current.openEvent.type!=="mousedown"?(C.preventDefault(),U(!0,C.nativeEvent,"click")):U(!1,C.nativeEvent,"click")))},onClick(C){const N=ke.current;T==="mousedown"&&ke.current?ke.current=void 0:Ur(N,!0)&&be||(!B||!me||V.current.openEvent&&Oe&&V.current.openEvent.type!=="click"?U(!0,C.nativeEvent,"click"):U(!1,C.nativeEvent,"click"))},onKeyDown(C){ke.current=void 0,C.defaultPrevented||!Ie||Vu(C)||(C.key!==" "||Yu(se)||(C.preventDefault(),ue.current=!0),C.key==="Enter"&&U(!B||!me,C.nativeEvent,"click"))},onKeyUp(C){C.defaultPrevented||!Ie||Vu(C)||Yu(se)||C.key===" "&&ue.current&&(ue.current=!1,U(!B||!me,C.nativeEvent,"click"))}}),[V,se,T,be,Ie,U,B,Oe,me]);return G.useMemo(()=>Z?{reference:k}:{},[Z,k])}(F,{event:"mousedown",toggle:!j,ignoreMouse:j}),ae=function(O,I){var B;I===void 0&&(I={});const{open:U,floatingId:V}=O,{enabled:se=!0,role:Z="dialog"}=I,T=(B=b1.get(Z))!=null?B:Z,me=lc(),be=io()!=null,Ie=G.useMemo(()=>T==="tooltip"||Z==="label"?{["aria-"+(Z==="label"?"labelledby":"describedby")]:U?V:void 0}:{"aria-expanded":U?"true":"false","aria-haspopup":T==="alertdialog"?"dialog":T,"aria-controls":U?V:void 0,...T==="listbox"&&{role:"combobox"},...T==="menu"&&{id:me},...T==="menu"&&be&&{role:"menuitem"},...Z==="select"&&{"aria-autocomplete":"none"},...Z==="combobox"&&{"aria-autocomplete":"list"}},[T,V,be,U,me,Z]),Oe=G.useMemo(()=>{const ue={id:V,...T&&{role:T}};return T==="tooltip"||Z==="label"?ue:{...ue,...T==="menu"&&{"aria-labelledby":me}}},[T,V,me,Z]),ke=G.useCallback(ue=>{let{active:k,selected:C}=ue;const N={role:"option",...k&&{id:V+"-option"}};switch(Z){case"select":return{...N,"aria-selected":k&&C};case"combobox":return{...N,...k&&{"aria-selected":!0}}}return{}},[V,Z]);return G.useMemo(()=>se?{reference:Ie,floating:Oe,item:ke}:{},[se,Ie,Oe,ke])}(F,{role:"menu"}),z=function(O,I){I===void 0&&(I={});const{open:B,onOpenChange:U,elements:V,dataRef:se}=O,{enabled:Z=!0,escapeKey:T=!0,outsidePress:me=!0,outsidePressEvent:be="pointerdown",referencePress:Ie=!1,referencePressEvent:Oe="pointerdown",ancestorScroll:ke=!1,bubbles:ue,capture:k}=I,C=ao(),N=Ft(typeof me=="function"?me:()=>!1),R=typeof me=="function"?N:me,$=G.useRef(!1),ce=G.useRef(!1),{escapeKey:we,outsidePress:X}=Gu(ue),{escapeKey:ne,outsidePress:te}=Gu(k),le=G.useRef(!1),he=Ft(Pe=>{var Ce;if(!B||!Z||!T||Pe.key!=="Escape"||le.current)return;const Ne=(Ce=se.current.floatingContext)==null?void 0:Ce.nodeId,ge=C?Mo(C.nodesRef.current,Ne):[];if(!we&&(Pe.stopPropagation(),ge.length>0)){let Se=!0;if(ge.forEach(Me=>{var Ae;(Ae=Me.context)==null||!Ae.open||Me.context.dataRef.current.__escapeKeyBubbles||(Se=!1)}),!Se)return}U(!1,function(Se){return"nativeEvent"in Se}(Pe)?Pe.nativeEvent:Pe,"escape-key")}),ye=Ft(Pe=>{var Ce;const Ne=()=>{var ge;he(Pe),(ge=Qn(Pe))==null||ge.removeEventListener("keydown",Ne)};(Ce=Qn(Pe))==null||Ce.addEventListener("keydown",Ne)}),pe=Ft(Pe=>{var Ce;const Ne=$.current;$.current=!1;const ge=ce.current;if(ce.current=!1,be==="click"&&ge||Ne||typeof R=="function"&&!R(Pe))return;const Se=Qn(Pe),Me="["+oi("inert")+"]",Ae=Pt(V.floating).querySelectorAll(Me);let Ke=Qe(Se)?Se:null;for(;Ke&&!so(Ke);){const Ot=zn(Ke);if(so(Ot)||!Qe(Ot))break;Ke=Ot}if(Ae.length&&Qe(Se)&&!Se.matches("html,body")&&!Ct(Se,V.floating)&&Array.from(Ae).every(Ot=>!Ct(Ke,Ot)))return;if(gt(Se)&&Re){const Ot=Se.clientWidth>0&&Se.scrollWidth>Se.clientWidth,on=Se.clientHeight>0&&Se.scrollHeight>Se.clientHeight;let rn=on&&Pe.offsetX>Se.clientWidth;if(on&&sn(Se).direction==="rtl"&&(rn=Pe.offsetX<=Se.offsetWidth-Se.clientWidth),rn||Ot&&Pe.offsetY>Se.clientHeight)return}const kt=(Ce=se.current.floatingContext)==null?void 0:Ce.nodeId,Vo=C&&Mo(C.nodesRef.current,kt).some(Ot=>{var on;return vs(Pe,(on=Ot.context)==null?void 0:on.elements.floating)});if(vs(Pe,V.floating)||vs(Pe,V.domReference)||Vo)return;const dn=C?Mo(C.nodesRef.current,kt):[];if(dn.length>0){let Ot=!0;if(dn.forEach(on=>{var rn;(rn=on.context)==null||!rn.open||on.context.dataRef.current.__outsidePressBubbles||(Ot=!1)}),!Ot)return}U(!1,Pe,"outside-press")}),oe=Ft(Pe=>{var Ce;const Ne=()=>{var ge;pe(Pe),(ge=Qn(Pe))==null||ge.removeEventListener(be,Ne)};(Ce=Qn(Pe))==null||Ce.addEventListener(be,Ne)});G.useEffect(()=>{if(!B||!Z)return;se.current.__escapeKeyBubbles=we,se.current.__outsidePressBubbles=X;let Pe=-1;function Ce(Ae){U(!1,Ae,"ancestor-scroll")}function Ne(){window.clearTimeout(Pe),le.current=!0}function ge(){Pe=window.setTimeout(()=>{le.current=!1},Ta()?5:0)}const Se=Pt(V.floating);T&&(Se.addEventListener("keydown",ne?ye:he,ne),Se.addEventListener("compositionstart",Ne),Se.addEventListener("compositionend",ge)),R&&Se.addEventListener(be,te?oe:pe,te);let Me=[];return ke&&(Qe(V.domReference)&&(Me=co(V.domReference)),Qe(V.floating)&&(Me=Me.concat(co(V.floating))),!Qe(V.reference)&&V.reference&&V.reference.contextElement&&(Me=Me.concat(co(V.reference.contextElement)))),Me=Me.filter(Ae=>{var Ke;return Ae!==((Ke=Se.defaultView)==null?void 0:Ke.visualViewport)}),Me.forEach(Ae=>{Ae.addEventListener("scroll",Ce,{passive:!0})}),()=>{T&&(Se.removeEventListener("keydown",ne?ye:he,ne),Se.removeEventListener("compositionstart",Ne),Se.removeEventListener("compositionend",ge)),R&&Se.removeEventListener(be,te?oe:pe,te),Me.forEach(Ae=>{Ae.removeEventListener("scroll",Ce)}),window.clearTimeout(Pe)}},[se,V,T,R,be,B,U,ke,Z,we,X,he,ne,ye,pe,te,oe]),G.useEffect(()=>{$.current=!1},[R,be]);const Ee=G.useMemo(()=>({onKeyDown:he,[m1[Oe]]:Pe=>{Ie&&U(!1,Pe.nativeEvent,"reference-press")}}),[he,U,Ie,Oe]),Re=G.useMemo(()=>({onKeyDown:he,onMouseDown(){ce.current=!0},onMouseUp(){ce.current=!0},[g1[be]]:()=>{$.current=!0}}),[he,be]);return G.useMemo(()=>Z?{reference:Ee,floating:Re}:{},[Z,Ee,Re])}(F,{bubbles:!0}),ee=w1(F,{listRef:v,activeIndex:h,nested:j,onNavigate:m}),{getReferenceProps:q,getFloatingProps:ie,getItemProps:J}=function(O){O===void 0&&(O=[]);const I=O.map(T=>T==null?void 0:T.reference),B=O.map(T=>T==null?void 0:T.floating),U=O.map(T=>T==null?void 0:T.item),V=G.useCallback(T=>Es(T,O,"reference"),I),se=G.useCallback(T=>Es(T,O,"floating"),B),Z=G.useCallback(T=>Es(T,O,"item"),U);return G.useMemo(()=>({getReferenceProps:V,getFloatingProps:se,getItemProps:Z}),[V,se,Z])}([P,re,ae,z,ee]);g.useEffect(()=>{if(S)return S.events.on("click",O),S.events.on("menuopen",I),()=>{S.events.off("click",O),S.events.off("menuopen",I)};function O(){f(!1)}function I(B){B.nodeId!==b&&B.parentId===w&&f(!1)}},[S,b,w]),g.useEffect(()=>{u&&S&&S.events.emit("menuopen",{parentId:w,nodeId:b})},[S,u,b,w]);const W={activeIndex:h,setActiveIndex:m,getItemProps:J,setHasFocusInside:p,isOpen:u,setIsOpen:f},Q=g.useMemo(()=>W,[h,m,J,p,u]),Y=de("io-dropdown-menu-button",j&&"io-dropdown-menu-item",u&&!j&&"active",t),H=ap([M.setReference,E.ref,l]),L=x.activeIndex===E.index?0:-1;return c.jsxs(l1,{id:b,children:[c.jsx(Je,{className:Y,ref:H,variant:j?"link":n,tabIndex:j?L:void 0,role:j?"menuitem":void 0,"data-open":u?"":void 0,"data-nested":j?"":void 0,"data-focus-inside":d?"":void 0,text:r,icon:j?"chevron-right":e,iconSize:"10",iconRight:!!j||o,disabled:i,...q(x.getItemProps({onFocus(O){var I;(I=s.onFocus)==null||I.call(s,O),p(!1),x.setHasFocusInside(!0)},...s}))}),c.jsx(dc.Provider,{value:Q,children:c.jsx(s1,{elementsRef:v,labelsRef:y,children:u&&c.jsx(h1,{context:F,modal:!1,initialFocus:j?-1:0,returnFocus:!j,children:c.jsx("div",{ref:M.setFloating,className:"io-dropdown-menu",style:_,...ie(),children:a})})})})]})});fc.displayName="DropdownMenu";const hn=g.forwardRef(({...t},n)=>io()===null?c.jsx(u1,{children:c.jsx(fc,{ref:n,...t})}):c.jsx(fc,{ref:n,...t}));function gp({className:t,variant:n="default",size:e="16",src:o,alt:r,...i}){const a=de("io-image-icon",n==="grayscale"&&[`io-image-icon-${n}`],e&&[`io-image-icon-${e}`],t);return c.jsx("img",{className:a,style:{width:`${e}px`,filter:n==="grayscale"?"grayscale(100%)":"none"},src:o,alt:r,...i})}function C1({className:t,size:n="large",variant:e="default",align:o="up",text:r,...i}){const a=de("io-loader",{[`io-loader-${e}`]:e!=="default"},n==="normal"&&"io-loader-md",n==="small"&&"io-loader-sm",o&&[`direction-${o}`],t);return c.jsxs("div",{className:a,role:"status","aria-live":"polite",...i,children:[c.jsx("div",{className:"io-loader-icon"}),r&&c.jsx("div",{className:"io-loader-text",children:r})]})}function no({className:t,children:n,...e}){const o=de("io-panel-header",t);return c.jsx(Zt,{className:o,...e,children:n})}hn.displayName="DropdownMenu",hn.Item=mp,hn.Separator=gi,no.Title=Nn,no.ButtonGroup=Be,no.Button=Je,no.ButtonIcon=Ge,no.Dropdown=xe;const gr=g.forwardRef(({className:t,children:n,...e},o)=>{const r=de("io-panel-body",t);return c.jsx("div",{className:r,ref:o,"data-testid":"panel-body",...e,children:n})});function Qo({className:t,...n}){const e=de("io-panel-footer",t);return c.jsx(Io,{className:e,...n})}function qe({className:t,children:n,...e}){const o=de("io-panel",t);return c.jsx("div",{className:o,"data-testid":"panel",...e,children:n})}function Ra({className:t,variant:n="default",children:e,...o}){const r=de("io-pill",n!=="default"&&[`io-pill-${n}`],t);return c.jsx("div",{className:r,role:"status",...o,children:e})}function S1({className:t,variant:n="active",value:e=0,...o}){const r=de("io-progress",n,t);let i;return i=e<0?0:e>100?100:e,c.jsx("div",{className:r,role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,...o,children:c.jsx("div",{className:"io-progress-bar",style:{width:`${i}%`}})})}/*!
9
9
  * OverlayScrollbars
10
10
  * Version: 2.12.0
11
11
  *
@@ -13,34 +13,34 @@
13
13
  * https://github.com/KingSora
14
14
  *
15
15
  * Released under the MIT license.
16
- */mr.displayName="PanelBody",Xo.ButtonGroup=Be,Xo.Button=Je,Xo.ButtonIcon=Ge,Xo.Dropdown=xe,qe.Header=no,qe.Body=mr,qe.Footer=Xo,Ma.Icon=lt;const Kt=(t,n)=>{const{o:e,i:o,u:r}=t;let i,a=e;const s=(l,u)=>{const f=a,d=l,p=u||(o?!o(f,d):f!==d);return(p||r)&&(a=d,i=f),[a,p,i]};return[n?l=>s(n(a,i),l):s,l=>[a,!!l,i]]},Wt=typeof window<"u"&&typeof HTMLElement<"u"&&window.document?window:{},hp=Math.max,w1=Math.min,uc=Math.round,la=Math.abs,Ju=Math.sign,mp=Wt.cancelAnimationFrame,ll=Wt.requestAnimationFrame,ul=Wt.setTimeout,gp=Wt.clearTimeout,_a=t=>Wt[t]!==void 0?Wt[t]:void 0,x1=_a("MutationObserver"),Xu=_a("IntersectionObserver"),nr=_a("ResizeObserver"),Ur=_a("ScrollTimeline"),dl=t=>t===void 0,La=t=>t===null,Un=t=>typeof t=="number",gi=t=>typeof t=="string",Ra=t=>typeof t=="boolean",yn=t=>typeof t=="function",gn=t=>Array.isArray(t),ua=t=>typeof t=="object"&&!gn(t)&&!La(t),fl=t=>{const n=!!t&&t.length,e=Un(n)&&n>-1&&n%1==0;return!!(gn(t)||!yn(t)&&e)&&(!(n>0&&ua(t))||n-1 in t)},da=t=>!!t&&t.constructor===Object,fa=t=>t instanceof HTMLElement,Fa=t=>t instanceof Element;function Ze(t,n){if(fl(t))for(let e=0;e<t.length&&n(t[e],e,t)!==!1;e++);else t&&Ze(Object.keys(t),e=>n(t[e],e,t));return t}const vp=(t,n)=>t.indexOf(n)>=0,oi=(t,n)=>t.concat(n),nt=(t,n,e)=>(!gi(n)&&fl(n)?Array.prototype.push.apply(t,n):t.push(n),t),mo=t=>Array.from(t||[]),pl=t=>gn(t)?t:!gi(t)&&fl(t)?mo(t):[t],pa=t=>!!t&&!t.length,dc=t=>mo(new Set(t)),Qt=(t,n,e)=>{Ze(t,o=>!o||o.apply(void 0,n||[])),e||(t.length=0)},yp="paddingTop",bp="paddingRight",wp="paddingLeft",xp="paddingBottom",Cp="marginLeft",Sp="marginRight",kp="marginBottom",hl="overflowX",ml="overflowY",Ba="width",Ha="height",Wn="visible",mn="hidden",gr="scroll",$a=(t,n,e,o)=>{if(t&&n){let r=!0;return Ze(e,i=>{t[i]!==n[i]&&(r=!1)}),r}return!1},Ep=(t,n)=>$a(t,n,["w","h"]),Vi=(t,n)=>$a(t,n,["x","y"]),C1=(t,n)=>$a(t,n,["t","r","b","l"]),De=(t,...n)=>t.bind(0,...n),or=t=>{let n;const e=t?ul:ll,o=t?gp:mp;return[r=>{o(n),n=e(()=>r(),yn(t)?t():t)},()=>o(n)]},Qu=t=>{const n=yn(t)?t():t;if(Un(n)){const e=n?ul:ll,o=n?gp:mp;return r=>{const i=e(()=>r(),n);return()=>{o(i)}}}return n&&n._},ha=(t,n)=>{const{p:e,v:o,S:r,m:i}=n||{};let a,s,l,u;const f=function(m){s&&s(),a&&a(),u=s=a=l=void 0,t.apply(this,m)},d=m=>i&&l?i(l,m):m,p=()=>{s&&l&&f(d(l)||l)},h=function(){const m=mo(arguments),v=Qu(e);if(v){const y=Qu(o),w=d(m)||m,k=f.bind(0,w);s&&s(),r&&!u?(k(),u=!0,s=v(()=>u=void 0)):(s=v(k),y&&!a&&(a=y(p))),l=w}else f(m)};return h.O=p,h},jp=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),vn=t=>t?Object.keys(t):[],$e=(t,n,e,o,r,i,a)=>{const s=[n,e,o,r,i,a];return typeof t=="object"&&!La(t)||yn(t)||(t={}),Ze(s,l=>{Ze(l,(u,f)=>{const d=l[f];if(t===d)return!0;const p=gn(d);if(d&&da(d)){const h=t[f];let m=h;p&&!gn(h)?m=[]:p||da(h)||(m={}),t[f]=$e(m,d)}else t[f]=p?d.slice():d})}),t},Op=(t,n)=>Ze($e({},t),(e,o,r)=>{e===void 0?delete r[o]:e&&da(e)&&(r[o]=Op(e))}),gl=t=>!vn(t).length,ri=()=>{},Np=(t,n,e)=>hp(t,w1(n,e)),Mo=t=>dc((gn(t)?t:(t||"").split(" ")).filter(n=>n)),vl=(t,n)=>t&&t.getAttribute(n),ed=(t,n)=>t&&t.hasAttribute(n),Bn=(t,n,e)=>{Ze(Mo(n),o=>{t&&t.setAttribute(o,String(e||""))})},xn=(t,n)=>{Ze(Mo(n),e=>t&&t.removeAttribute(e))},Wa=(t,n)=>{const e=Mo(vl(t,n)),o=De(Bn,t,n),r=(i,a)=>{const s=new Set(e);return Ze(Mo(i),l=>{s[a](l)}),mo(s).join(" ")};return{C:i=>o(r(i,"delete")),$:i=>o(r(i,"add")),H:i=>{const a=Mo(i);return a.reduce((s,l)=>s&&e.includes(l),a.length>0)}}},Ip=(t,n,e)=>(Wa(t,n).C(e),De(yl,t,n,e)),yl=(t,n,e)=>(Wa(t,n).$(e),De(Ip,t,n,e)),ma=(t,n,e,o)=>(o?yl:Ip)(t,n,e),bl=(t,n,e)=>Wa(t,n).H(e),Pp=t=>Wa(t,"class"),Ap=(t,n)=>{Pp(t).C(n)},wl=(t,n)=>(Pp(t).$(n),De(Ap,t,n)),td=(t,n)=>{const e=n?Fa(n)&&n:document;return e?mo(e.querySelectorAll(t)):[]},fc=(t,n)=>Fa(t)&&t.matches(n),Tp=t=>fc(t,"body"),pc=t=>t?mo(t.childNodes):[],ii=t=>t&&t.parentElement,rr=(t,n)=>Fa(t)&&t.closest(n),hc=t=>document.activeElement,S1=(t,n,e)=>{const o=rr(t,n),r=t&&((a,s)=>{const l=s?Fa(s)&&s:document;return l&&l.querySelector(a)})(e,o),i=rr(r,n)===o;return!(!o||!r)&&(o===t||r===t||i&&rr(rr(t,e),n)!==o)},vr=t=>{Ze(pl(t),n=>{const e=ii(n);n&&e&&e.removeChild(n)})},$t=(t,n)=>De(vr,t&&n&&Ze(pl(n),e=>{e&&t.appendChild(e)}));let Dp;const cr=t=>{const n=document.createElement("div");return Bn(n,"class",t),n},Mp=t=>{const n=cr(),e=Dp,o=t.trim();return n.innerHTML=e?e.createHTML(o):o,Ze(pc(n),r=>vr(r))},nd=(t,n)=>t.getPropertyValue(n)||t[n]||"",_p=t=>{const n=t||0;return isFinite(n)?n:0},Ii=t=>_p(parseFloat(t||"")),mc=t=>Math.round(1e4*t)/1e4,Lp=t=>`${mc(_p(t))}px`;function ai(t,n){t&&n&&Ze(n,(e,o)=>{try{const r=t.style,i=La(e)||Ra(e)?"":Un(e)?Lp(e):e;o.indexOf("--")===0?r.setProperty(o,i):r[o]=i}catch{}})}function In(t,n,e){const o=gi(n);let r=o?"":{};if(t){const i=Wt.getComputedStyle(t,e)||t.style;r=o?nd(i,n):mo(n).reduce((a,s)=>(a[s]=nd(i,s),a),r)}return r}const od=(t,n,e)=>{const o=n?`${n}-`:"",r=e?`-${e}`:"",i=`${o}top${r}`,a=`${o}right${r}`,s=`${o}bottom${r}`,l=`${o}left${r}`,u=In(t,[i,a,s,l]);return{t:Ii(u[i]),r:Ii(u[a]),b:Ii(u[s]),l:Ii(u[l])}},ks=(t,n)=>"translate"+(ua(t)?`(${t.x},${t.y})`:`${n?"X":"Y"}(${t})`),k1={w:0,h:0},za=(t,n)=>n?{w:n[`${t}Width`],h:n[`${t}Height`]}:k1,E1=t=>za("inner",t||Wt),lr=De(za,"offset"),Rp=De(za,"client"),ga=De(za,"scroll"),xl=t=>{const n=parseFloat(In(t,Ba))||0,e=parseFloat(In(t,Ha))||0;return{w:n-uc(n),h:e-uc(e)}},Es=t=>t.getBoundingClientRect(),gc=t=>!(!t||!t[Ha]&&!t[Ba]),Fp=(t,n)=>{const e=gc(t);return!gc(n)&&e},rd=(t,n,e,o)=>{Ze(Mo(n),r=>{t&&t.removeEventListener(r,e,o)})},Xe=(t,n,e,o)=>{var r;const i=(r=o&&o.T)==null||r,a=o&&o.I||!1,s=o&&o.A||!1,l={passive:i,capture:a};return De(Qt,Mo(n).map(u=>{const f=s?d=>{rd(t,u,f,a),e&&e(d)}:e;return t&&t.addEventListener(u,f,l),De(rd,t,u,f,a)}))},Bp=t=>t.stopPropagation(),vc=t=>t.preventDefault(),Hp=t=>Bp(t)||vc(t),Sn=(t,n)=>{const{x:e,y:o}=Un(n)?{x:n,y:n}:n||{};Un(e)&&(t.scrollLeft=e),Un(o)&&(t.scrollTop=o)},qt=t=>({x:t.scrollLeft,y:t.scrollTop}),j1=(t,n)=>{const{D:e,M:o}=t,{w:r,h:i}=n,a=(d,p,h)=>{let m=Ju(d)*h,v=Ju(p)*h;if(m===v){const y=la(d),w=la(p);v=y>w?0:v,m=y<w?0:m}return m=m===v?0:m,[m+0,v+0]},[s,l]=a(e.x,o.x,r),[u,f]=a(e.y,o.y,i);return{D:{x:s,y:u},M:{x:l,y:f}}},js=({D:t,M:n})=>{const e=(o,r)=>o===0&&o<=r;return{x:e(t.x,n.x),y:e(t.y,n.y)}},id=({D:t,M:n},e)=>{const o=(r,i,a)=>Np(0,1,(r-a)/(r-i)||0);return{x:o(t.x,n.x,e.x),y:o(t.y,n.y,e.y)}},yc=t=>{t&&t.focus&&t.focus({preventScroll:!0})},ad=(t,n)=>{Ze(pl(n),t)},bc=t=>{const n=new Map,e=(r,i)=>{if(r){const a=n.get(r);ad(s=>{a&&a[s?"delete":"clear"](s)},i)}else n.forEach(a=>{a.clear()}),n.clear()},o=(r,i)=>{if(gi(r)){const l=n.get(r)||new Set;return n.set(r,l),ad(u=>{yn(u)&&l.add(u)},i),De(e,r,i)}Ra(i)&&i&&e();const a=vn(r),s=[];return Ze(a,l=>{const u=r[l];u&&nt(s,o(l,u))}),De(Qt,s)};return o(t||{}),[o,e,(r,i)=>{Ze(mo(n.get(r)),a=>{i&&!pa(i)?a.apply(0,i):a()})}]},$p={},Wp={},zp=(t,n,e)=>vn(t).map(o=>{const{static:r,instance:i}=t[o],[a,s,l]=e||[],u=e?i:r;if(u){const f=e?u(a,s,n):u(n);return(l||Wp)[o]=f}}),Er=t=>Wp[t],jr="data-overlayscrollbars",Yi="os-environment",Pi=`${Yi}-scrollbar-hidden`,Os=`${jr}-initialize`,Gi="noClipping",sd=`${jr}-body`,lo=jr,Hn=`${jr}-viewport`,O1=hl,N1=ml,Up="measuring",Vp="scrollbarHidden",wc=`${jr}-padding`,cd=`${jr}-content`,Cl="os-size-observer",I1=`${Cl}-appear`,P1=`${Cl}-listener`,nn="os-scrollbar",A1=`${nn}-rtl`,T1=`${nn}-horizontal`,D1=`${nn}-vertical`,Yp=`${nn}-track`,Sl=`${nn}-handle`,M1=`${nn}-visible`,_1=`${nn}-cornerless`,ld=`${nn}-interaction`,ud=`${nn}-unusable`,xc=`${nn}-auto-hide`,dd=`${xc}-hidden`,fd=`${nn}-wheel`,L1=`${Yp}-interactive`,R1=`${Sl}-interactive`,ir=t=>t.indexOf(Wn)===0,Cc=(t,n)=>{if(t==="auto")return n?gr:mn;const e=t||mn;return[mn,gr,Wn].includes(e)?e:mn},F1=(t,n)=>{const{overflowX:e,overflowY:o}=In(t,[hl,ml]);return{x:Cc(e,n.x),y:Cc(o,n.y)}},kl="__osScrollbarsHidingPlugin",pd=t=>JSON.stringify(t,(n,e)=>{if(yn(e))throw 0;return e}),hd=(t,n)=>t?`${n}`.split(".").reduce((e,o)=>e&&jp(e,o)?e[o]:void 0,t):void 0,B1={paddingAbsolute:!1,showNativeOverlaidScrollbars:!1,update:{elementEvents:[["img","load"]],debounce:[0,33],attributes:null,ignoreMutation:null},overflow:{x:"scroll",y:"scroll"},scrollbars:{theme:"os-theme-dark",visibility:"auto",autoHide:"never",autoHideDelay:1300,autoHideSuspend:!1,dragScroll:!0,clickScroll:!1,pointers:["mouse","touch","pen"]}},Gp=(t,n)=>{const e={};return Ze(oi(vn(n),vn(t)),o=>{const r=t[o],i=n[o];if(ua(r)&&ua(i))$e(e[o]={},Gp(r,i)),gl(e[o])&&delete e[o];else if(jp(n,o)&&i!==r){let a=!0;if(gn(r)||gn(i))try{pd(r)===pd(i)&&(a=!1)}catch{}a&&(e[o]=i)}}),e},md=(t,n,e)=>o=>[hd(t,o),e||hd(n,o)!==void 0];let Kp,Ns;const H1=()=>{const t=(w,k,x)=>{$t(document.body,w),$t(document.body,w);const b=Rp(w),E=lr(w),j=xl(k);return x&&vr(w),{x:E.h-b.h+j.h,y:E.w-b.w+j.w}},n=Mp(`<div class="${Yi}"><div></div><style>${`.${Yi}{scroll-behavior:auto!important;position:fixed;opacity:0;visibility:hidden;overflow:scroll;height:200px;width:200px;z-index:-1}.${Yi} div{width:200%;height:200%;margin:10px 0}.${Pi}{scrollbar-width:none!important}.${Pi}::-webkit-scrollbar,.${Pi}::-webkit-scrollbar-corner{appearance:none!important;display:none!important;width:0!important;height:0!important}`}</style></div>`)[0],e=n.firstChild,o=n.lastChild,r=Kp;r&&(o.nonce=r);const[i,,a]=bc(),[s,l]=Kt({o:t(n,e),i:Vi},De(t,n,e,!0)),[u]=l(),f=(w=>{let k=!1;const x=wl(w,Pi);try{k=In(w,"scrollbar-width")==="none"||In(w,"display","::-webkit-scrollbar")==="none"}catch{}return x(),k})(n),d={x:u.x===0,y:u.y===0},p={elements:{host:null,padding:!f,viewport:w=>f&&Tp(w)&&w,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},h=$e({},B1),m=De($e,{},h),v=De($e,{},p),y={P:u,k:d,U:f,J:!!Ur,G:De(i,"r"),K:v,Z:w=>$e(p,w)&&v(),tt:m,nt:w=>$e(h,w)&&m(),ot:$e({},p),st:$e({},h)};if(xn(n,"style"),vr(n),Xe(Wt,"resize",()=>{a("r",[])}),yn(Wt.matchMedia)&&!f&&(!d.x||!d.y)){const w=k=>{const x=Wt.matchMedia(`(resolution: ${Wt.devicePixelRatio}dppx)`);Xe(x,"change",()=>{k(),w(k)},{A:!0})};w(()=>{const[k,x]=s();$e(y.P,k),a("r",[x])})}return y},Pn=()=>(Ns||(Ns=H1()),Ns),gd=(t,n,e,o)=>{let r=!1;const{et:i,ct:a,rt:s,it:l,lt:u,ut:f}=o||{},d=ha(()=>r&&e(!0),{p:33,v:99}),[p,h]=((k,x,b)=>{let E=!1;const j=!!b&&new WeakMap,B=F=>{if(j&&b){const L=b.map(D=>{const[T,P]=D||[];return[P&&T?(F||td)(T,k):[],P]});Ze(L,D=>Ze(D[0],T=>{const P=D[1],re=j.get(T)||[];if(k.contains(T)&&P){const ae=Xe(T,P,z=>{E?(ae(),j.delete(T)):x(z)});j.set(T,nt(re,ae))}else Qt(re),j.delete(T)}))}};return B(),[()=>{E=!0},B]})(t,d,s),m=a||[],v=oi(i||[],m),y=(k,x)=>{if(!pa(x)){const b=u||ri,E=f||ri,j=[],B=[];let F=!1,L=!1;if(Ze(x,D=>{const{attributeName:T,target:P,type:re,oldValue:ae,addedNodes:z,removedNodes:ee}=D,q=re==="attributes",ie=re==="childList",J=t===P,W=q&&T,Q=W&&vl(P,T||""),Y=gi(Q)?Q:null,H=W&&ae!==Y,M=vp(m,T)&&H;if(n&&(ie||!J)){const O=q&&H,I=O&&l&&fc(P,l),R=(I?!b(P,T,ae,Y):!q||O)&&!E(D,!!I,t,o);Ze(z,U=>nt(j,U)),Ze(ee,U=>nt(j,U)),L=L||R}!n&&J&&H&&!b(P,T,ae,Y)&&(nt(B,T),F=F||M)}),h(D=>dc(j).reduce((T,P)=>(nt(T,td(D,P)),fc(P,D)?nt(T,P):T),[])),n)return!k&&L&&e(!1),[!1];if(!pa(B)||F){const D=[dc(B),F];return k||e.apply(0,D),D}}},w=new x1(De(y,!1));return[()=>(w.observe(t,{attributes:!0,attributeOldValue:!0,attributeFilter:v,subtree:n,childList:n,characterData:n}),r=!0,()=>{r&&(p(),w.disconnect(),r=!1)}),()=>{if(r)return d.O(),y(!0,w.takeRecords())}]};let bo=null;const Zp=(t,n,e)=>{const{ft:o}=e||{},r=Er("__osSizeObserverPlugin"),[i]=Kt({o:!1,u:!0});return()=>{const a=[],s=Mp(`<div class="${Cl}"><div class="${P1}"></div></div>`)[0],l=s.firstChild,u=f=>{let d=!1,p=!1;if(gn(f)&&!pa(f)){const h=f[0],[m,,v]=i(h.contentRect),y=gc(m);p=Fp(m,v),d=!p&&!y}else p=f===!0;d||n({_t:!0,ft:p})};if(nr){if(!Ra(bo)){const h=new nr(ri);h.observe(t,{get box(){bo=!0}}),bo=bo||!1,h.disconnect()}const f=ha(u,{p:0,v:0}),d=h=>f(h),p=new nr(d);if(p.observe(bo?t:l),nt(a,[()=>{p.disconnect()},!bo&&$t(t,s)]),bo){const h=new nr(d);h.observe(t,{box:"border-box"}),nt(a,()=>h.disconnect())}}else{if(!r)return ri;{const[f,d]=r(l,u,o);nt(a,oi([wl(s,I1),Xe(s,"animationstart",f),$t(t,s)],d))}}return De(Qt,a)}},$1=(t,n)=>{let e;const o=cr("os-trinsic-observer"),[r]=Kt({o:!1}),i=(s,l)=>{if(s){const u=r((d=>d.h===0||d.isIntersecting||d.intersectionRatio>0)(s)),[,f]=u;return f&&!l&&n(u)&&[u]}},a=(s,l)=>i(l.pop(),s);return[()=>{const s=[];if(Xu)e=new Xu(De(a,!1),{root:t}),e.observe(o),nt(s,()=>{e.disconnect()});else{const l=()=>{const u=lr(o);i(u)};nt(s,Zp(o,l)()),l()}return De(Qt,nt(s,$t(t,o)))},()=>e&&a(!0,e.takeRecords())]},W1=(t,n,e,o)=>{let r,i,a,s,l,u;const f=`[${lo}]`,d=`[${Hn}]`,p=["id","class","style","open","wrap","cols","rows"],{dt:h,vt:m,L:v,gt:y,ht:w,V:k,bt:x,wt:b,yt:E,St:j}=t,B=O=>In(O,"direction")==="rtl",F={Ot:!1,B:B(h)},L=Pn(),D=Er(kl),[T]=Kt({i:Ep,o:{w:0,h:0}},()=>{const O=D&&D.R(t,n,F,L,e).Y,I=!(x&&k)&&bl(m,lo,Gi),R=!k&&b("arrange"),U=R&&qt(y),V=U&&j(),se=E(Up,I),Z=R&&O&&O(),A=ga(v),me=xl(v);return Z&&Z(),Sn(y,U),V&&V(),I&&se(),{w:A.w+me.w,h:A.h+me.h}}),P=ha(o,{p:()=>r,v:()=>i,m(O,I){const[R]=O,[U]=I;return[oi(vn(R),vn(U)).reduce((V,se)=>(V[se]=R[se]||U[se],V),{})]}}),re=O=>{const I=B(h);$e(O,{Ct:u!==I}),$e(F,{B:I}),u=I},ae=(O,I)=>{const[R,U]=O,V={$t:U};return $e(F,{Ot:R}),I||o(V),V},z=({_t:O,ft:I})=>{const R=!(O&&!I)&&L.U?P:o,U={_t:O||I,ft:I};re(U),R(U)},ee=(O,I)=>{const[,R]=T(),U={xt:R};return re(U),R&&!I&&(O?o:P)(U),U},q=(O,I,R)=>{const U={Ht:I};return re(U),I&&!R&&P(U),U},[ie,J]=w?$1(m,ae):[],W=!k&&Zp(m,z,{ft:!0}),[Q,Y]=gd(m,!1,q,{ct:p,et:p}),H=k&&nr&&new nr(O=>{const I=O[O.length-1].contentRect;z({_t:!0,ft:Fp(I,l)}),l=I}),M=ha(()=>{const[,O]=T();o({xt:O,_t:x})},{p:222,S:!0});return[()=>{H&&H.observe(m);const O=W&&W(),I=ie&&ie(),R=Q(),U=L.G(V=>{V?P({Et:V}):M()});return()=>{H&&H.disconnect(),O&&O(),I&&I(),s&&s(),R(),U()}},({zt:O,Tt:I,It:R})=>{const U={},[V]=O("update.ignoreMutation"),[se,Z]=O("update.attributes"),[A,me]=O("update.elementEvents"),[we,Ie]=O("update.debounce"),Oe=I||R;if(me||Z){a&&a(),s&&s();const[ke,ue]=gd(w||v,!0,ee,{et:oi(p,se||[]),rt:A,it:f,ut:(S,C)=>{const{target:N,attributeName:_}=S;return!(C||!_||k)&&S1(N,f,d)||!!rr(N,`.${nn}`)||!!($=>yn(V)&&V($))(S)}});s=ke(),a=ue}if(Ie)if(P.O(),gn(we)){const ke=we[0],ue=we[1];r=Un(ke)&&ke,i=Un(ue)&&ue}else Un(we)?(r=we,i=!1):(r=!1,i=!1);if(Oe){const ke=Y(),ue=J&&J(),S=a&&a();ke&&$e(U,q(ke[0],ke[1],Oe)),ue&&$e(U,ae(ue[0],Oe)),S&&$e(U,ee(S[0],Oe))}return re(U),U},F]},qp=(t,n)=>yn(n)?n.apply(0,t):n,z1=(t,n,e,o)=>{const r=dl(o)?e:o;return qp(t,r)||n.apply(0,t)},Jp=(t,n,e,o)=>{const r=dl(o)?e:o,i=qp(t,r);return!!i&&(fa(i)?i:n.apply(0,t))},U1=(t,n,e,o)=>{const r="--os-viewport-percent",i="--os-scroll-percent",a="--os-scroll-direction",{K:s}=Pn(),{scrollbars:l}=s(),{slot:u}=l,{dt:f,vt:d,L:p,At:h,gt:m,bt:v,V:y}=n,{scrollbars:w}=h?{}:t,{slot:k}=w||{},x=[],b=[],E=[],j=Jp([f,d,p],()=>y&&v?f:d,u,k),B=z=>{if(Ur){let ee=null,q=[];const ie=new Ur({source:m,axis:z}),J=()=>{ee&&ee.cancel(),ee=null};return{kt:Q=>{const{Dt:Y}=e,H=js(Y)[z],M=z==="x",O=[ks(0,M),ks(`calc(100cq${M?"w":"h"} + -100%)`,M)],I=H?O:O.reverse();return q[0]===I[0]&&q[1]===I[1]||(J(),q=I,ee=Q.Mt.animate({clear:["left"],transform:I},{timeline:ie})),J}}}},F={x:B("x"),y:B("y")},L=(z,ee,q)=>{const ie=q?wl:Ap;Ze(z,J=>{ie(J.Lt,ee)})},D=(z,ee)=>{Ze(z,q=>{const[ie,J]=ee(q);ai(ie,J)})},T=(z,ee,q)=>{const ie=Ra(q),J=!ie||!q;(!ie||q)&&L(b,z,ee),J&&L(E,z,ee)},P=z=>{const ee=z?"x":"y",q=cr(`${nn} ${z?T1:D1}`),ie=cr(Yp),J=cr(Sl),W={Lt:q,Ut:ie,Mt:J},Q=F[ee];return nt(z?b:E,W),nt(x,[$t(q,ie),$t(ie,J),De(vr,q),Q&&Q.kt(W),o(W,T,z)]),W},re=De(P,!0),ae=De(P,!1);return re(),ae(),[{Pt:()=>{const z=(()=>{const{Rt:q,Vt:ie}=e,J=(W,Q)=>Np(0,1,W/(W+Q)||0);return{x:J(ie.x,q.x),y:J(ie.y,q.y)}})(),ee=q=>ie=>[ie.Lt,{[r]:mc(q)+""}];D(b,ee(z.x)),D(E,ee(z.y))},Nt:()=>{if(!Ur){const{Dt:z}=e,ee=id(z,qt(m)),q=ie=>J=>[J.Lt,{[i]:mc(ie)+""}];D(b,q(ee.x)),D(E,q(ee.y))}},qt:()=>{const{Dt:z}=e,ee=js(z),q=ie=>J=>[J.Lt,{[a]:ie?"0":"1"}];D(b,q(ee.x)),D(E,q(ee.y)),Ur&&(b.forEach(F.x.kt),E.forEach(F.y.kt))},Bt:()=>{if(y&&!v){const{Rt:z,Dt:ee}=e,q=js(ee),ie=id(ee,qt(m)),J=W=>{const{Lt:Q}=W,Y=ii(Q)===p&&Q,H=(M,O,I)=>{const R=O*M;return Lp(I?R:-R)};return[Y,Y&&{transform:ks({x:H(ie.x,z.x,q.x),y:H(ie.y,z.y,q.y)})}]};D(b,J),D(E,J)}},Ft:T,jt:{Xt:b,Yt:re,Wt:De(D,b)},Jt:{Xt:E,Yt:ae,Wt:De(D,E)}},()=>($t(j,b[0].Lt),$t(j,E[0].Lt),De(Qt,x))]},V1=(t,n,e,o)=>(r,i,a)=>{const{vt:s,L:l,V:u,gt:f,Gt:d,St:p}=n,{Lt:h,Ut:m,Mt:v}=r,[y,w]=or(333),[k,x]=or(444),b=j=>{yn(f.scrollBy)&&f.scrollBy({behavior:"smooth",left:j.x,top:j.y})};let E=!0;return De(Qt,[Xe(v,"pointermove pointerleave",o),Xe(h,"pointerenter",()=>{i(ld,!0)}),Xe(h,"pointerleave pointercancel",()=>{i(ld,!1)}),!u&&Xe(h,"mousedown",()=>{const j=hc();(ed(j,Hn)||ed(j,lo)||j===document.body)&&ul(De(yc,l),25)}),Xe(h,"wheel",j=>{const{deltaX:B,deltaY:F,deltaMode:L}=j;E&&L===0&&ii(h)===s&&b({x:B,y:F}),E=!1,i(fd,!0),y(()=>{E=!0,i(fd)}),vc(j)},{T:!1,I:!0}),Xe(h,"pointerdown",()=>{const j=Xe(d,"click",F=>{B(),Hp(F)},{A:!0,I:!0,T:!1}),B=Xe(d,"pointerup pointercancel",()=>{B(),setTimeout(j,150)},{I:!0,T:!0})},{I:!0,T:!0}),(()=>{const j="pointerup pointercancel lostpointercapture",B="client"+(a?"X":"Y"),F=a?Ba:Ha,L=a?"left":"top",D=a?"w":"h",T=a?"x":"y",P=(ae,z)=>ee=>{const{Rt:q}=e,ie=lr(m)[D]-lr(v)[D],J=z*ee/ie*q[T];Sn(f,{[T]:ae+J})},re=[];return Xe(m,"pointerdown",ae=>{const z=rr(ae.target,`.${Sl}`)===v,ee=z?v:m,q=t.scrollbars,ie=q[z?"dragScroll":"clickScroll"],{button:J,isPrimary:W,pointerType:Q}=ae,{pointers:Y}=q;if(J===0&&W&&ie&&(Y||[]).includes(Q)){Qt(re),x();const H=!z&&(ae.shiftKey||ie==="instant"),M=De(Es,v),O=De(Es,m),I=(C,N)=>(C||M())[L]-(N||O())[L],R=uc(Es(f)[F])/lr(f)[D]||1,U=P(qt(f)[T],1/R),V=ae[B],se=M(),Z=O(),A=se[F],me=I(se,Z)+A/2,we=V-Z[L],Ie=z?0:we-me,Oe=C=>{Qt(S),ee.releasePointerCapture(C.pointerId)},ke=z||H,ue=p(),S=[Xe(d,j,Oe),Xe(d,"selectstart",C=>vc(C),{T:!1}),Xe(m,j,Oe),ke&&Xe(m,"pointermove",C=>U(Ie+(C[B]-V))),ke&&(()=>{const C=qt(f);ue();const N=qt(f),_={x:N.x-C.x,y:N.y-C.y};(la(_.x)>3||la(_.y)>3)&&(p(),Sn(f,C),b(_),k(ue))})];if(ee.setPointerCapture(ae.pointerId),H)U(Ie);else if(!z){const C=Er("__osClickScrollPlugin");if(C){const N=C(U,Ie,A,_=>{_?ue():nt(S,ue)});nt(S,N),nt(re,De(N,!0))}}}})})(),w,x])},Y1=t=>{const n=Pn(),{K:e,U:o}=n,{elements:r}=e(),{padding:i,viewport:a,content:s}=r,l=fa(t),u=l?{}:t,{elements:f}=u,{padding:d,viewport:p,content:h}=f||{},m=l?t:u.target,v=Tp(m),y=m.ownerDocument,w=y.documentElement,k=()=>y.defaultView||Wt,x=De(z1,[m]),b=De(Jp,[m]),E=De(cr,""),j=De(x,E,a),B=De(b,E,s),F=j(p),L=F===m,D=L&&v,T=!L&&B(h),P=!L&&F===T,re=D?w:F,ae=D?re:m,z=!L&&b(E,i,d),ee=!P&&T,q=[ee,re,z,ae].map(Z=>fa(Z)&&!ii(Z)&&Z),ie=Z=>Z&&vp(q,Z),J=!ie(re)&&(Z=>{const A=lr(Z),me=ga(Z),we=In(Z,hl),Ie=In(Z,ml);return me.w-A.w>0&&!ir(we)||me.h-A.h>0&&!ir(Ie)})(re)?re:m,W=D?w:re,Q={dt:m,vt:ae,L:re,rn:z,ht:ee,gt:W,Kt:D?y:re,ln:v?w:J,Gt:y,bt:v,At:l,V:L,an:k,wt:Z=>bl(re,Hn,Z),yt:(Z,A)=>ma(re,Hn,Z,A),St:()=>ma(W,Hn,"scrolling",!0)},{dt:Y,vt:H,rn:M,L:O,ht:I}=Q,R=[()=>{xn(H,[lo,Os]),xn(Y,Os),v&&xn(w,[Os,lo])}];let U=pc([I,O,M,H,Y].find(Z=>Z&&!ie(Z)));const V=D?Y:I||O,se=De(Qt,R);return[Q,()=>{const Z=k(),A=hc(),me=ue=>{$t(ii(ue),pc(ue)),vr(ue)},we=ue=>Xe(ue,"focusin focusout focus blur",Hp,{I:!0,T:!1}),Ie="tabindex",Oe=vl(O,Ie),ke=we(A);return Bn(H,lo,L?"":"host"),Bn(M,wc,""),Bn(O,Hn,""),Bn(I,cd,""),L||(Bn(O,Ie,Oe||"-1"),v&&Bn(w,sd,"")),$t(V,U),$t(H,M),$t(M||H,!L&&O),$t(O,I),nt(R,[ke,()=>{const ue=hc(),S=ie(O),C=S&&ue===O?Y:ue,N=we(C);xn(M,wc),xn(I,cd),xn(O,Hn),v&&xn(w,sd),Oe?Bn(O,Ie,Oe):xn(O,Ie),ie(I)&&me(I),S&&me(O),ie(M)&&me(M),yc(C),N()}]),o&&!L&&(yl(O,Hn,Vp),nt(R,De(xn,O,Hn))),yc(!L&&v&&A===Y&&Z.top===Z?O:A),ke(),U=0,se},se]},G1=({ht:t})=>({Qt:n,un:e,It:o})=>{const{$t:r}=n||{},{Ot:i}=e;t&&(r||o)&&ai(t,{[Ha]:i&&"100%"})},K1=({vt:t,rn:n,L:e,V:o},r)=>{const[i,a]=Kt({i:C1,o:od()},De(od,t,"padding",""));return({zt:s,Qt:l,un:u,It:f})=>{let[d,p]=a(f);const{U:h}=Pn(),{_t:m,xt:v,Ct:y}=l||{},{B:w}=u,[k,x]=s("paddingAbsolute");(m||p||f||v)&&([d,p]=i(f));const b=!o&&(x||y||p);if(b){const E=!k||!n&&!h,j=d.r+d.l,B=d.t+d.b,F={[Sp]:E&&!w?-j:0,[kp]:E?-B:0,[Cp]:E&&w?-j:0,top:E?-d.t:0,right:E?w?-d.r:"auto":0,left:E?w?"auto":-d.l:0,[Ba]:E&&`calc(100% + ${j}px)`},L={[yp]:E?d.t:0,[bp]:E?d.r:0,[xp]:E?d.b:0,[wp]:E?d.l:0};ai(n||e,F),ai(e,L),$e(r,{rn:d,fn:!E,F:n?L:$e({},F,L)})}return{_n:b}}},Z1=(t,n)=>{const e=Pn(),{vt:o,rn:r,L:i,V:a,Kt:s,gt:l,bt:u,yt:f,an:d}=t,{U:p}=e,h=u&&a,m=De(hp,0),v={display:()=>!1,direction:H=>H!=="ltr",flexDirection:H=>H.endsWith("-reverse"),writingMode:H=>H!=="horizontal-tb"},y=vn(v),w={i:Ep,o:{w:0,h:0}},k={i:Vi,o:{}},x=H=>{f(Up,!h&&H)},b=H=>{if(!y.some(A=>{const me=H[A];return me&&v[A](me)}))return{D:{x:0,y:0},M:{x:1,y:1}};x(!0);const O=qt(l),I=f("noContent",!0),R=Xe(s,gr,A=>{const me=qt(l);A.isTrusted&&me.x===O.x&&me.y===O.y&&Bp(A)},{I:!0,A:!0});Sn(l,{x:0,y:0}),I();const U=qt(l),V=ga(l);Sn(l,{x:V.w,y:V.h});const se=qt(l);Sn(l,{x:se.x-U.x<1&&-V.w,y:se.y-U.y<1&&-V.h});const Z=qt(l);return Sn(l,O),ll(()=>R()),{D:U,M:Z}},E=(H,M)=>{const O=Wt.devicePixelRatio%1!=0?1:0,I={w:m(H.w-M.w),h:m(H.h-M.h)};return{w:I.w>O?I.w:0,h:I.h>O?I.h:0}},j=(H,M)=>{const O=(I,R,U,V)=>{const se=I===Wn?mn:(me=>me.replace(`${Wn}-`,""))(I),Z=ir(I),A=ir(U);return!R&&!V?mn:Z&&A?Wn:Z?R&&V?se:R?Wn:mn:R?se:A&&V?Wn:mn};return{x:O(M.x,H.x,M.y,H.y),y:O(M.y,H.y,M.x,H.x)}},B=H=>{const M=I=>[Wn,mn,gr].map(R=>Y(Cc(R),I)),O=M(!0).concat(M()).join(" ");f(O),f(vn(H).map(I=>Y(H[I],I==="x")).join(" "),!0)},[F,L]=Kt(w,De(xl,i)),[D,T]=Kt(w,De(ga,i)),[P,re]=Kt(w),[ae]=Kt(k),[z,ee]=Kt(w),[q]=Kt(k),[ie]=Kt({i:(H,M)=>$a(H,M,y),o:{}},()=>(H=>!!H&&(M=>!!(M.offsetWidth||M.offsetHeight||M.getClientRects().length))(H))(i)?In(i,y):{}),[J,W]=Kt({i:(H,M)=>Vi(H.D,M.D)&&Vi(H.M,M.M),o:{D:{x:0,y:0},M:{x:0,y:0}}}),Q=Er(kl),Y=(H,M)=>`${M?O1:N1}${(O=>{const I=String(O||"");return I?I[0].toUpperCase()+I.slice(1):""})(H)}`;return({zt:H,Qt:M,un:O,It:I},{_n:R})=>{const{_t:U,Ht:V,xt:se,Ct:Z,ft:A,Et:me}=M||{},we=Q&&Q.R(t,n,O,e,H),{X:Ie,Y:Oe,W:ke}=we||{},[ue,S]=((rn,qn)=>{const{k:Dn}=qn,[Jn,Mn]=rn("showNativeOverlaidScrollbars");return[Jn&&Dn.x&&Dn.y,Mn]})(H,e),[C,N]=H("overflow"),_=ir(C.x),$=ir(C.y),ce=U||R||se||Z||me||S;let be=L(I),X=T(I),ne=re(I),te=ee(I);if(S&&p&&f(Vp,!ue),ce){bl(o,lo,Gi)&&x(!0);const rn=Oe&&Oe(),[qn]=be=F(I),[Dn]=X=D(I),Jn=Rp(i),Mn=h&&E1(d()),us={w:m(Dn.w+qn.w),h:m(Dn.h+qn.h)},Si={w:m((Mn?Mn.w:Jn.w+m(Jn.w-Dn.w))+qn.w),h:m((Mn?Mn.h:Jn.h+m(Jn.h-Dn.h))+qn.h)};rn&&rn(),te=z(Si),ne=P(E(us,Si),I)}const[le,he]=te,[ye,pe]=ne,[oe,Ee]=X,[Re,Pe]=be,[Ce,Ne]=ae({x:ye.w>0,y:ye.h>0}),ge=_&&$&&(Ce.x||Ce.y)||_&&Ce.x&&!Ce.y||$&&Ce.y&&!Ce.x,Se=R||Z||me||Pe||Ee||he||pe||N||S||ce||V&&h,[Me,Ae]=ie(I),Ke=Z||A||Ae||Ne||I,[kt,Uo]=Ke?J(b(Me),I):W();let dn=j(Ce,C);x(!1),Se&&(B(dn),dn=F1(i,Ce),ke&&Ie&&(Ie(dn,oe,Re),ai(i,ke(dn))));const[Ot,on]=q(dn);return ma(o,lo,Gi,ge),ma(r,wc,Gi,ge),$e(n,{cn:Ot,Vt:{x:le.w,y:le.h},Rt:{x:ye.w,y:ye.h},j:Ce,Dt:j1(kt,ye)}),{sn:on,tn:he,nn:pe,en:Uo||pe}}},q1=t=>{const[n,e,o]=Y1(t),r={rn:{t:0,r:0,b:0,l:0},fn:!1,F:{[Sp]:0,[kp]:0,[Cp]:0,[yp]:0,[bp]:0,[xp]:0,[wp]:0},Vt:{x:0,y:0},Rt:{x:0,y:0},cn:{x:mn,y:mn},j:{x:!1,y:!1},Dt:{D:{x:0,y:0},M:{x:0,y:0}}},{dt:i,gt:a,V:s,St:l}=n,{U:u,k:f}=Pn(),d=!u&&(f.x||f.y),p=[G1(n),K1(n,r),Z1(n,r)];return[e,h=>{const m={},v=d&&qt(a),y=v&&l();return Ze(p,w=>{$e(m,w(h,m)||{})}),Sn(a,v),y&&y(),s||Sn(i,0),m},r,n,o]},J1=(t,n,e,o,r)=>{let i=!1;const a=md(n,{}),[s,l,u,f,d]=q1(t),[p,h,m]=W1(f,u,a,b=>{x({},b)}),[v,y,,w]=((b,E,j,B,F,L)=>{let D,T,P,re,ae,z=ri,ee=0;const q=["mouse","pen"],ie=$=>q.includes($.pointerType),[J,W]=or(),[Q,Y]=or(100),[H,M]=or(100),[O,I]=or(()=>ee),[R,U]=U1(b,F,B,V1(E,F,B,$=>ie($)&&ue())),{vt:V,Kt:se,bt:Z}=F,{Ft:A,Pt:me,Nt:we,qt:Ie,Bt:Oe}=R,ke=($,ce)=>{if(I(),$)A(dd);else{const be=De(A,dd,!0);ee>0&&!ce?O(be):be()}},ue=()=>{(P?D:re)||(ke(!0),Q(()=>{ke(!1)}))},S=$=>{A(xc,$,!0),A(xc,$,!1)},C=$=>{ie($)&&(D=P,P&&ke(!0))},N=[I,Y,M,W,()=>z(),Xe(V,"pointerover",C,{A:!0}),Xe(V,"pointerenter",C),Xe(V,"pointerleave",$=>{ie($)&&(D=!1,P&&ke(!1))}),Xe(V,"pointermove",$=>{ie($)&&T&&ue()}),Xe(se,"scroll",$=>{J(()=>{we(),ue()}),L($),Oe()})],_=Er(kl);return[()=>De(Qt,nt(N,U())),({zt:$,It:ce,Qt:be,Zt:X})=>{const{tn:ne,nn:te,sn:le,en:he}=X||{},{Ct:ye,ft:pe}=be||{},{B:oe}=j,{k:Ee,U:Re}=Pn(),{cn:Pe,j:Ce}=B,[Ne,ge]=$("showNativeOverlaidScrollbars"),[Se,Me]=$("scrollbars.theme"),[Ae,Ke]=$("scrollbars.visibility"),[kt,Uo]=$("scrollbars.autoHide"),[dn,Ot]=$("scrollbars.autoHideSuspend"),[on]=$("scrollbars.autoHideDelay"),[rn,qn]=$("scrollbars.dragScroll"),[Dn,Jn]=$("scrollbars.clickScroll"),[Mn,us]=$("overflow"),Si=pe&&!ce,cv=Ce.x||Ce.y,lv=ne||te||he||ye||ce,uv=le||Ke||us,dv=Ne&&Ee.x&&Ee.y,yu=!Re&&!_,fv=dv||yu,bu=(ds,fs,pv)=>{const wu=ds.includes(gr)&&(Ae===Wn||Ae==="auto"&&fs===gr);return A(M1,wu,pv),wu};if(ee=on,Si&&(dn&&cv?(S(!1),z(),H(()=>{z=Xe(se,"scroll",De(S,!0),{A:!0})})):S(!0)),(ge||yu)&&A("os-theme-none",fv),Me&&(A(ae),A(Se,!0),ae=Se),Ot&&!dn&&S(!0),Uo&&(T=kt==="move",P=kt==="leave",re=kt==="never",ke(re,!0)),qn&&A(R1,rn),Jn&&A(L1,!!Dn),uv){const ds=bu(Mn.x,Pe.x,!0),fs=bu(Mn.y,Pe.y,!1);A(_1,!(ds&&fs))}lv&&(we(),me(),Oe(),he&&Ie(),A(ud,!Ce.x,!0),A(ud,!Ce.y,!1),A(A1,oe&&!Z))},{},R]})(t,n,m,u,f,r),k=b=>vn(b).some(E=>!!b[E]),x=(b,E)=>{if(e())return!1;const{dn:j,It:B,Tt:F,pn:L}=b,D=j||{},T=!!B||!i,P={zt:md(n,D,T),dn:D,It:T};if(L)return y(P),!1;const re=E||h($e({},P,{Tt:F})),ae=l($e({},P,{un:m,Qt:re}));y($e({},P,{Qt:re,Zt:ae}));const z=k(re),ee=k(ae),q=z||ee||!gl(D)||T;return i=!0,q&&o(b,{Qt:re,Zt:ae}),q};return[()=>{const{ln:b,gt:E,St:j}=f,B=qt(b),F=[p(),s(),v()],L=j();return Sn(E,B),L(),De(Qt,F)},x,()=>({vn:m,gn:u}),{hn:f,bn:w},d]},Sc=new WeakMap,Xp=t=>Sc.get(t),fn=(t,n,e)=>{const{tt:o}=Pn(),r=fa(t),i=r?t:t.target,a=Xp(i);if(n&&!a){let s=!1;const l=[],u={},f=D=>{const T=Op(D),P=Er("__osOptionsValidationPlugin");return P?P(T,!0):T},d=$e({},o(),f(n)),[p,h,m]=bc(),[v,y,w]=bc(e),k=(D,T)=>{w(D,T),m(D,T)},[x,b,E,j,B]=J1(t,d,()=>s,({dn:D,It:T},{Qt:P,Zt:re})=>{const{_t:ae,Ct:z,$t:ee,xt:q,Ht:ie,ft:J}=P,{tn:W,nn:Q,sn:Y,en:H}=re;k("updated",[L,{updateHints:{sizeChanged:!!ae,directionChanged:!!z,heightIntrinsicChanged:!!ee,overflowEdgeChanged:!!W,overflowAmountChanged:!!Q,overflowStyleChanged:!!Y,scrollCoordinatesChanged:!!H,contentMutation:!!q,hostMutation:!!ie,appear:!!J},changedOptions:D||{},force:!!T}])},D=>k("scroll",[L,D])),F=D=>{(T=>{Sc.delete(T)})(i),Qt(l),s=!0,k("destroyed",[L,D]),h(),y()},L={options(D,T){if(D){const P=T?o():{},re=Gp(d,$e(P,f(D)));gl(re)||($e(d,re),b({dn:re}))}return $e({},d)},on:v,off:(D,T)=>{D&&T&&y(D,T)},state(){const{vn:D,gn:T}=E(),{B:P}=D,{Vt:re,Rt:ae,cn:z,j:ee,rn:q,fn:ie,Dt:J}=T;return $e({},{overflowEdge:re,overflowAmount:ae,overflowStyle:z,hasOverflow:ee,scrollCoordinates:{start:J.D,end:J.M},padding:q,paddingAbsolute:ie,directionRTL:P,destroyed:s})},elements(){const{dt:D,vt:T,rn:P,L:re,ht:ae,gt:z,Kt:ee}=j.hn,{jt:q,Jt:ie}=j.bn,J=Q=>{const{Mt:Y,Ut:H,Lt:M}=Q;return{scrollbar:M,track:H,handle:Y}},W=Q=>{const{Xt:Y,Yt:H}=Q,M=J(Y[0]);return $e({},M,{clone:()=>{const O=J(H());return b({pn:!0}),O}})};return $e({},{target:D,host:T,padding:P||re,viewport:re,content:ae||re,scrollOffsetElement:z,scrollEventElement:ee,scrollbarHorizontal:W(q),scrollbarVertical:W(ie)})},update:D=>b({It:D,Tt:!0}),destroy:De(F,!1),plugin:D=>u[vn(D)[0]]};return nt(l,[B]),((D,T)=>{Sc.set(D,T)})(i,L),zp($p,fn,[L,p,u]),((D,T)=>{const{nativeScrollbarsOverlaid:P,body:re}=T||{},{k:ae,U:z,K:ee}=Pn(),{nativeScrollbarsOverlaid:q,body:ie}=ee().cancel,J=P??q,W=dl(re)?ie:re,Q=(ae.x||ae.y)&&J,Y=D&&(La(W)?!z:W);return!!Q||!!Y})(j.hn.bt,!r&&t.cancel)?(F(!0),L):(nt(l,x()),k("initialized",[L]),L.update(),L)}return a};fn.plugin=t=>{const n=gn(t),e=n?t:[t],o=e.map(r=>zp(r,fn)[0]);return(r=>{Ze(r,i=>Ze(i,(a,s)=>{$p[s]=i[s]}))})(e),n?o:o[0]},fn.valid=t=>{const n=t&&t.elements,e=yn(n)&&n();return da(e)&&!!Xp(e.target)},fn.env=()=>{const{P:t,k:n,U:e,J:o,ot:r,st:i,K:a,Z:s,tt:l,nt:u}=Pn();return $e({},{scrollbarsSize:t,scrollbarsOverlaid:n,scrollbarsHiding:e,scrollTimeline:o,staticDefaultInitialization:r,staticDefaultOptions:i,getDefaultInitialization:a,setDefaultInitialization:s,getDefaultOptions:l,setDefaultOptions:u})},fn.nonce=t=>{Kp=t},fn.trustedTypePolicy=t=>{Dp=t};const X1=()=>{if(typeof window>"u"){const u=()=>{};return[u,u]}let t,n;const e=window,o=typeof e.requestIdleCallback=="function",r=e.requestAnimationFrame,i=e.cancelAnimationFrame,a=o?e.requestIdleCallback:r,s=o?e.cancelIdleCallback:i,l=()=>{s(t),i(n)};return[(u,f)=>{l(),t=a(o?()=>{l(),n=r(u)}:u,typeof f=="object"?f:{timeout:2233})},l]},Qp=t=>{const{options:n,events:e,defer:o}=t||{},[r,i]=g.useMemo(X1,[]),a=g.useRef(null),s=g.useRef(o),l=g.useRef(n),u=g.useRef(e);return g.useEffect(()=>{s.current=o},[o]),g.useEffect(()=>{const{current:f}=a;l.current=n,fn.valid(f)&&f.options(n||{},!0)},[n]),g.useEffect(()=>{const{current:f}=a;u.current=e,fn.valid(f)&&f.on(e||{},!0)},[e]),g.useEffect(()=>()=>{var f;i(),(f=a.current)==null||f.destroy()},[]),g.useMemo(()=>[f=>{const d=a.current;if(fn.valid(d))return;const p=s.current,h=l.current||{},m=u.current||{},v=()=>a.current=fn(f,h,m);p?r(v,p):v()},()=>a.current],[])};g.forwardRef((t,n)=>{const{element:e="div",options:o,events:r,defer:i,children:a,...s}=t,l=e,u=g.useRef(null),f=g.useRef(null),[d,p]=Qp({options:o,events:r,defer:i});return g.useEffect(()=>{const{current:h}=u,{current:m}=f;if(h)return d(e==="body"?{target:h,cancel:{body:null}}:{target:h,elements:{viewport:m,content:m}}),()=>{var v;return(v=p())==null?void 0:v.destroy()}},[d,e]),g.useImperativeHandle(n,()=>({osInstance:p,getElement:()=>u.current}),[]),g.createElement(l,{"data-overlayscrollbars-initialize":"",ref:u,...s},e==="body"?a:g.createElement("div",{"data-overlayscrollbars-contents":"",ref:f},a))});const $o=g.forwardRef((t,n)=>{const{children:e,element:o="div",elementProps:r,wrapperClassName:i}=t,a=g.useRef(null),s=g.useRef(null),[l,u]=Qp({options:{scrollbars:{autoHide:"leave",autoHideDelay:0}},defer:!0}),f=g.useCallback(d=>{s.current=d,typeof n=="function"?n(d):n!==null&&(n.current=d)},[n]);return g.useEffect(()=>{if(s.current&&a.current)return l({target:a.current,elements:{viewport:s.current,content:s.current}}),()=>{var d;return(d=u())==null?void 0:d.destroy()}},[l,u]),c.jsx("div",{"data-overlayscrollbars-initialize":"",ref:a,className:de("io-overlay-scrollbars-container",i),children:c.jsx(o,{"data-overlayscrollbars-contents":"",ref:f,...r,children:e})})});function Ua({text:t="Label",...n}){return c.jsx("label",{...n,children:t})}const Fo=g.forwardRef(({id:t="input",className:n,type:e="text",name:o="input",align:r="up",label:i,iconPrepend:a,iconPrependOnClick:s,iconAppend:l,iconAppendOnClick:u,placeholder:f,disabled:d,readOnly:p,errorMessage:h,errorDataTestId:m,...v},y)=>{const w=de("io-control-input",a&&"io-control-leading-icon",l&&"io-control-trailing-icon",d&&"io-control-disabled",p&&"io-control-readonly",h&&"io-control-error",r&&[`direction-${r}`],n),k=g.useCallback(b=>{d?b.preventDefault():s&&s(b)},[s,d]),x=g.useCallback(b=>{d?b.preventDefault():u&&u(b)},[u,d]);return c.jsxs("div",{className:w,children:[i&&c.jsx(Ua,{htmlFor:t,text:i}),a&&c.jsx(lt,{variant:a,onClick:b=>k(b)}),c.jsx("input",{id:t,className:"io-input",ref:y,type:e,name:o,tabIndex:0,placeholder:f??(()=>{switch(e){case"email":return"Enter your email here...";case"number":return"Enter number here...";case"password":return"Enter your password here...";case"tel":return"Enter your phone number here...";case"file":return"Select a file...";default:return"Enter text here..."}})(),"aria-label":i,disabled:d,readOnly:p,...h?{"aria-invalid":!0,"aria-describedby":`${t}-error`}:{},...v}),l&&c.jsx(lt,{variant:l,onClick:b=>x(b)}),h&&c.jsxs("div",{"data-testid":m,id:`${t}-error`,className:"io-input-error",children:[c.jsx(lt,{variant:"close"}),h]})]})});Fo.displayName="Input";const Va=g.forwardRef(({id:t="textarea",className:n,name:e="textarea",align:o="up",label:r,rows:i=4,placeholder:a="Enter text here...",disabled:s,readOnly:l,...u},f)=>{const d=de("io-control-textarea",s&&"io-control-disabled",l&&"io-control-readonly",o&&[`direction-${o}`],n);return c.jsxs("div",{className:d,children:[r&&c.jsx(Ua,{htmlFor:t,text:r}),c.jsx("textarea",{id:t,className:"io-textarea",ref:f,name:e,tabIndex:0,placeholder:a,"aria-label":r,disabled:s,readOnly:l,rows:i,...u})]})});Va.displayName="Textarea";const Ya=g.forwardRef(({id:t="checkbox",className:n,name:e="checkbox",align:o="left",label:r,checked:i,disabled:a,...s},l)=>{const u=de("io-control-checkbox",i&&"io-control-checked",a&&"io-control-disabled",o&&[`direction-${o}`],n);return c.jsxs("div",{className:u,children:[c.jsx("input",{type:"checkbox",id:t,className:"io-checkbox",ref:l,name:e,tabIndex:a?-1:0,checked:i,disabled:a,"aria-checked":i,...s}),r&&c.jsx(Ua,{htmlFor:t,text:r,"data-testid":s["data-testid"]?`${s["data-testid"]}-label`:void 0})]})});Ya.displayName="Checkbox";const Q1=g.forwardRef(({id:t="radio",className:n,name:e="radio",align:o="left",label:r,checked:i,disabled:a,...s},l)=>{const u=de("io-control-radio",i&&"io-control-checked",a&&"io-control-disabled",o&&[`direction-${o}`],n);return c.jsxs("div",{className:u,children:[c.jsx("input",{type:"radio",id:t,className:"io-radio",ref:l,name:e,tabIndex:a?-1:0,checked:i,disabled:a,"aria-checked":i,...s}),r&&c.jsx(Ua,{htmlFor:t,text:r})]})});Q1.displayName="Radio";var ey=g[typeof document<"u"&&document.createElement!==void 0?"useLayoutEffect":"useEffect"],eh=0,ty=()=>eh++,vd=0;const ny=typeof g.useId=="function"?g.useId:function(t,n){n===void 0&&(n="🅰");var[e,o]=g.useState(vd?ty:void 0);return ey(()=>{e===void 0&&o(eh++),vd=1},[]),t||(e===void 0?e:n+e)},vt=g.forwardRef(({id:t,className:n,name:e="toggle",align:o="left",label:r,checked:i,disabled:a,onKeyDown:s,"data-testid":l="toggle",...u},f)=>{const d=ny(),p=t||`toggle-${d}`,h=de("io-control-toggle",i&&"io-control-checked",a&&"io-control-disabled",o&&[`direction-${o}`],n);return c.jsx("div",{className:h,children:c.jsxs("label",{className:"io-toggle",htmlFor:p,tabIndex:a?-1:0,onKeyDown:s,"data-testid":`${l}-label`,children:[c.jsx("input",{type:"checkbox",id:p,className:"io-checkbox",ref:f,name:e,checked:i,disabled:a,"aria-checked":i,tabIndex:-1,"data-testid":l,...u}),c.jsx("span",{className:"slider","data-testid":`${l}-slider`}),r]})})});function th(t,n=500){const[e,o]=g.useState(t);return g.useEffect(()=>{const r=setTimeout(()=>{o(t)},n);return()=>clearTimeout(r)},[t,n]),e}function oy(t,n){g.useEffect(()=>{const e=o=>{o.code===t&&n()};return document.addEventListener("keyup",e),()=>document.removeEventListener("keyup",e)},[t,n])}vt.displayName="Toggle";const Ga=()=>window.glue42gd!==void 0||window.iodesktop!==void 0;function ze(){return g.useMemo(()=>typeof window=="object"&&Ga(),[])}const ry=()=>{const t=g.useContext(_e.IOConnectContext),[n,e]=g.useState(null),o=g.useCallback(r=>{var i;return(i=t==null?void 0:t.themes)==null?void 0:i.select(r)},[t]);return g.useEffect(()=>{var a,s;if(!t)return;let r=!1;const i=l=>{r||e(l)};return(a=t.themes)==null||a.onChanged(i),(s=t.themes)==null||s.getCurrent().then(i).catch(console.warn),()=>{r=!0}},[t]),{currentTheme:n,selectTheme:o}};g.createContext({theme:"dark"});const yd="io-connect-platform",Eo="___platform_prefs___",iy="_launchpad_collapsedSections",ay="_launchpad_favorites",sy="_launchpad_isLayoutsPanelOpen",cy="_launchpad_isCollapsed",kc="_launchpad_isPinned",nh="_launchpad_pinnedPosition",oh="_launchpad_allowDocking",rh="_launchpad_minimizeToTray",ih="_launchpad_autoCloseStartingAppsAndWorkspaces",ah="_launchpad_showTutorialOnStartup",sh="_layouts_restoreLastSaved",ch="_layouts_saveCurrentOnExit",lh="_layouts_showUnsavedChangesPrompt",uh="_layouts_showDeletePrompt",dh="_downloads_askForEachDownload",ly="_downloads_location",uy="_system_scheduleRestart",dy="_system_scheduleRestartTime",fy="_system_scheduleRestartFrequency",py="_system_scheduleRestartDay",hy="_system_scheduleShutdown",my="_system_scheduleShutdownTime",gy="_system_scheduleShutdownFrequency",vy="_system_scheduleShutdownDay",yy={[iy]:[],[ay]:[],[sy]:!1,[cy]:!1,[kc]:!1,[nh]:"Left",[oh]:!0,[rh]:!1,[ih]:!0,[ah]:!0,[sh]:!0,[ch]:!0,[lh]:!0,[uh]:!0,[dh]:!0,[ly]:"",[uy]:!1,[dy]:"12:00 AM",[fy]:"daily",[py]:"Monday",[hy]:!1,[my]:"12:00 AM",[gy]:"daily",[vy]:"Monday"},jo=t=>typeof t=="string"?t:t!=null&&t.message?typeof t.message=="string"?t.message:JSON.stringify(t.message):JSON.stringify(t),El="warning",by={success:5e3,warning:1e4};var bt=function(t){return{ok:!0,result:t}},ut=function(t){return{ok:!1,error:t}},bd=function(t,n,e){return n.ok===!1?n:e.ok===!1?e:bt(t(n.result,e.result))},Is=function(t,n){return n.ok===!0?n:ut(t(n.error))},Ec=function(){return Ec=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},Ec.apply(this,arguments)};function jc(t,n){if(t===n||t===null&&n===null)return!0;if(typeof t!=typeof n)return!1;if(typeof t=="object"){if(Array.isArray(t)){if(!Array.isArray(n)||t.length!==n.length)return!1;for(var e=0;e<t.length;e++)if(!jc(t[e],n[e]))return!1;return!0}var o=Object.keys(t);if(o.length!==Object.keys(n).length)return!1;for(e=0;e<o.length;e++)if(!n.hasOwnProperty(o[e])||!jc(t[o[e]],n[o[e]]))return!1;return!0}}var Vr=function(t){return Array.isArray(t)},Ai=function(t){return typeof t=="object"&&t!==null&&!Vr(t)},_n=function(t,n){return"expected "+t+", got "+function(e){switch(typeof e){case"string":return"a string";case"number":return"a number";case"boolean":return"a boolean";case"undefined":return"undefined";case"object":return e instanceof Array?"an array":e===null?"null":"an object";default:return JSON.stringify(e)}}(n)},Dr=function(t){return t.map(function(n){return typeof n=="string"?"."+n:"["+n+"]"}).join("")},Mr=function(t,n){var e=n.at,o=function(r,i){var a={};for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&i.indexOf(s)<0&&(a[s]=r[s]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function"){var l=0;for(s=Object.getOwnPropertySymbols(r);l<s.length;l++)i.indexOf(s[l])<0&&Object.prototype.propertyIsEnumerable.call(r,s[l])&&(a[s[l]]=r[s[l]])}return a}(n,["at"]);return Ec({at:t+(e||"")},o)},pt=function(){function t(n){var e=this;this.decode=n,this.run=function(o){return Is(function(r){return{kind:"DecoderError",input:o,at:"input"+(r.at||""),message:r.message||""}},e.decode(o))},this.runPromise=function(o){return function(r){return r.ok===!0?Promise.resolve(r.result):Promise.reject(r.error)}(e.run(o))},this.runWithException=function(o){return function(r){if(r.ok===!0)return r.result;throw r.error}(e.run(o))},this.map=function(o){return new t(function(r){return function(i,a){return a.ok===!0?bt(i(a.result)):a}(o,e.decode(r))})},this.andThen=function(o){return new t(function(r){return function(i,a){return a.ok===!0?i(a.result):a}(function(i){return o(i).decode(r)},e.decode(r))})},this.where=function(o,r){return e.andThen(function(i){return o(i)?t.succeed(i):t.fail(r)})}}return t.string=function(){return new t(function(n){return typeof n=="string"?bt(n):ut({message:_n("a string",n)})})},t.number=function(){return new t(function(n){return typeof n=="number"?bt(n):ut({message:_n("a number",n)})})},t.boolean=function(){return new t(function(n){return typeof n=="boolean"?bt(n):ut({message:_n("a boolean",n)})})},t.constant=function(n){return new t(function(e){return jc(e,n)?bt(n):ut({message:"expected "+JSON.stringify(n)+", got "+JSON.stringify(e)})})},t.object=function(n){return new t(function(e){if(Ai(e)&&n){var o={};for(var r in n)if(n.hasOwnProperty(r)){var i=n[r].decode(e[r]);if(i.ok!==!0)return e[r]===void 0?ut({message:"the key '"+r+"' is required but was not present"}):ut(Mr("."+r,i.error));i.result!==void 0&&(o[r]=i.result)}return bt(o)}return Ai(e)?bt(e):ut({message:_n("an object",e)})})},t.array=function(n){return new t(function(e){return Vr(e)&&n?e.reduce(function(o,r,i){return bd(function(a,s){return a.concat([s])},o,function(a,s){return Is(function(l){return Mr("["+s+"]",l)},n.decode(a))}(r,i))},bt([])):Vr(e)?bt(e):ut({message:_n("an array",e)})})},t.tuple=function(n){return new t(function(e){if(Vr(e)){if(e.length!==n.length)return ut({message:"expected a tuple of length "+n.length+", got one of length "+e.length});for(var o=[],r=0;r<n.length;r++){var i=n[r].decode(e[r]);if(!i.ok)return ut(Mr("["+r+"]",i.error));o[r]=i.result}return bt(o)}return ut({message:_n("a tuple of length "+n.length,e)})})},t.union=function(n,e){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];return t.oneOf.apply(t,[n,e].concat(o))},t.intersection=function(n,e){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];return new t(function(i){return[n,e].concat(o).reduce(function(a,s){return bd(Object.assign,a,s.decode(i))},bt({}))})},t.anyJson=function(){return new t(function(n){return bt(n)})},t.unknownJson=function(){return new t(function(n){return bt(n)})},t.dict=function(n){return new t(function(e){if(Ai(e)){var o={};for(var r in e)if(e.hasOwnProperty(r)){var i=n.decode(e[r]);if(i.ok!==!0)return ut(Mr("."+r,i.error));o[r]=i.result}return bt(o)}return ut({message:_n("an object",e)})})},t.optional=function(n){return new t(function(e){return e==null?bt(void 0):n.decode(e)})},t.oneOf=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return new t(function(o){for(var r=[],i=0;i<n.length;i++){var a=n[i].decode(o);if(a.ok===!0)return a;r[i]=a.error}var s=r.map(function(l){return"at error"+(l.at||"")+": "+l.message}).join('", "');return ut({message:'expected a value matching one of the decoders, got the errors ["'+s+'"]'})})},t.withDefault=function(n,e){return new t(function(o){return bt(function(r,i){return i.ok===!0?i.result:r}(n,e.decode(o)))})},t.valueAt=function(n,e){return new t(function(o){for(var r=o,i=0;i<n.length;i++){if(r===void 0)return ut({at:Dr(n.slice(0,i+1)),message:"path does not exist"});if(typeof n[i]=="string"&&!Ai(r))return ut({at:Dr(n.slice(0,i+1)),message:_n("an object",r)});if(typeof n[i]=="number"&&!Vr(r))return ut({at:Dr(n.slice(0,i+1)),message:_n("an array",r)});r=r[n[i]]}return Is(function(a){return r===void 0?{at:Dr(n),message:"path does not exist"}:Mr(Dr(n),a)},e.decode(r))})},t.succeed=function(n){return new t(function(e){return bt(n)})},t.fail=function(n){return new t(function(e){return ut({message:n})})},t.lazy=function(n){return new t(function(e){return n().decode(e)})},t}(),fh=pt.string;pt.number;var Rt=pt.boolean,ph=pt.anyJson;pt.unknownJson;var K=pt.constant,hh=pt.object,Oc=pt.array;pt.tuple,pt.dict;var Ye=pt.optional,Ka=pt.oneOf;pt.union,pt.intersection,pt.withDefault,pt.valueAt,pt.succeed,pt.fail,pt.lazy;const wd=["name","title","version","customProperties","icon","caption","type"],wy=["appId","name","type","details","version","title","tooltip","lang","description","categories","icons","screenshots","contactEmail","moreInfo","publisher","customConfig","hostManifests","interop","localizedVersions"];var wt=function(t){return{ok:!0,result:t}},dt=function(t){return{ok:!1,error:t}},xd=function(t,n,e){return n.ok===!1?n:e.ok===!1?e:wt(t(n.result,e.result))},Ps=function(t,n){return n.ok===!0?n:dt(t(n.error))},Nc=function(){return Nc=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},Nc.apply(this,arguments)};function Ic(t,n){if(t===n||t===null&&n===null)return!0;if(typeof t!=typeof n)return!1;if(typeof t=="object"){if(Array.isArray(t)){if(!Array.isArray(n)||t.length!==n.length)return!1;for(var e=0;e<t.length;e++)if(!Ic(t[e],n[e]))return!1;return!0}var o=Object.keys(t);if(o.length!==Object.keys(n).length)return!1;for(e=0;e<o.length;e++)if(!n.hasOwnProperty(o[e])||!Ic(t[o[e]],n[o[e]]))return!1;return!0}}var Yr=function(t){return Array.isArray(t)},Ti=function(t){return typeof t=="object"&&t!==null&&!Yr(t)},Ln=function(t,n){return"expected "+t+", got "+function(e){switch(typeof e){case"string":return"a string";case"number":return"a number";case"boolean":return"a boolean";case"undefined":return"undefined";case"object":return e instanceof Array?"an array":e===null?"null":"an object";default:return JSON.stringify(e)}}(n)},_r=function(t){return t.map(function(n){return typeof n=="string"?"."+n:"["+n+"]"}).join("")},Lr=function(t,n){var e=n.at,o=function(r,i){var a={};for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&i.indexOf(s)<0&&(a[s]=r[s]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function"){var l=0;for(s=Object.getOwnPropertySymbols(r);l<s.length;l++)i.indexOf(s[l])<0&&Object.prototype.propertyIsEnumerable.call(r,s[l])&&(a[s[l]]=r[s[l]])}return a}(n,["at"]);return Nc({at:t+(e||"")},o)},ht=function(){function t(n){var e=this;this.decode=n,this.run=function(o){return Ps(function(r){return{kind:"DecoderError",input:o,at:"input"+(r.at||""),message:r.message||""}},e.decode(o))},this.runPromise=function(o){return function(r){return r.ok===!0?Promise.resolve(r.result):Promise.reject(r.error)}(e.run(o))},this.runWithException=function(o){return function(r){if(r.ok===!0)return r.result;throw r.error}(e.run(o))},this.map=function(o){return new t(function(r){return function(i,a){return a.ok===!0?wt(i(a.result)):a}(o,e.decode(r))})},this.andThen=function(o){return new t(function(r){return function(i,a){return a.ok===!0?i(a.result):a}(function(i){return o(i).decode(r)},e.decode(r))})},this.where=function(o,r){return e.andThen(function(i){return o(i)?t.succeed(i):t.fail(r)})}}return t.string=function(){return new t(function(n){return typeof n=="string"?wt(n):dt({message:Ln("a string",n)})})},t.number=function(){return new t(function(n){return typeof n=="number"?wt(n):dt({message:Ln("a number",n)})})},t.boolean=function(){return new t(function(n){return typeof n=="boolean"?wt(n):dt({message:Ln("a boolean",n)})})},t.constant=function(n){return new t(function(e){return Ic(e,n)?wt(n):dt({message:"expected "+JSON.stringify(n)+", got "+JSON.stringify(e)})})},t.object=function(n){return new t(function(e){if(Ti(e)&&n){var o={};for(var r in n)if(n.hasOwnProperty(r)){var i=n[r].decode(e[r]);if(i.ok!==!0)return e[r]===void 0?dt({message:"the key '"+r+"' is required but was not present"}):dt(Lr("."+r,i.error));i.result!==void 0&&(o[r]=i.result)}return wt(o)}return Ti(e)?wt(e):dt({message:Ln("an object",e)})})},t.array=function(n){return new t(function(e){return Yr(e)&&n?e.reduce(function(o,r,i){return xd(function(a,s){return a.concat([s])},o,function(a,s){return Ps(function(l){return Lr("["+s+"]",l)},n.decode(a))}(r,i))},wt([])):Yr(e)?wt(e):dt({message:Ln("an array",e)})})},t.tuple=function(n){return new t(function(e){if(Yr(e)){if(e.length!==n.length)return dt({message:"expected a tuple of length "+n.length+", got one of length "+e.length});for(var o=[],r=0;r<n.length;r++){var i=n[r].decode(e[r]);if(!i.ok)return dt(Lr("["+r+"]",i.error));o[r]=i.result}return wt(o)}return dt({message:Ln("a tuple of length "+n.length,e)})})},t.union=function(n,e){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];return t.oneOf.apply(t,[n,e].concat(o))},t.intersection=function(n,e){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];return new t(function(i){return[n,e].concat(o).reduce(function(a,s){return xd(Object.assign,a,s.decode(i))},wt({}))})},t.anyJson=function(){return new t(function(n){return wt(n)})},t.unknownJson=function(){return new t(function(n){return wt(n)})},t.dict=function(n){return new t(function(e){if(Ti(e)){var o={};for(var r in e)if(e.hasOwnProperty(r)){var i=n.decode(e[r]);if(i.ok!==!0)return dt(Lr("."+r,i.error));o[r]=i.result}return wt(o)}return dt({message:Ln("an object",e)})})},t.optional=function(n){return new t(function(e){return e==null?wt(void 0):n.decode(e)})},t.oneOf=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return new t(function(o){for(var r=[],i=0;i<n.length;i++){var a=n[i].decode(o);if(a.ok===!0)return a;r[i]=a.error}var s=r.map(function(l){return"at error"+(l.at||"")+": "+l.message}).join('", "');return dt({message:'expected a value matching one of the decoders, got the errors ["'+s+'"]'})})},t.withDefault=function(n,e){return new t(function(o){return wt(function(r,i){return i.ok===!0?i.result:r}(n,e.decode(o)))})},t.valueAt=function(n,e){return new t(function(o){for(var r=o,i=0;i<n.length;i++){if(r===void 0)return dt({at:_r(n.slice(0,i+1)),message:"path does not exist"});if(typeof n[i]=="string"&&!Ti(r))return dt({at:_r(n.slice(0,i+1)),message:Ln("an object",r)});if(typeof n[i]=="number"&&!Yr(r))return dt({at:_r(n.slice(0,i+1)),message:Ln("an array",r)});r=r[n[i]]}return Ps(function(a){return r===void 0?{at:_r(n),message:"path does not exist"}:Lr(_r(n),a)},e.decode(r))})},t.succeed=function(n){return new t(function(e){return wt(n)})},t.fail=function(n){return new t(function(e){return dt({message:n})})},t.lazy=function(n){return new t(function(e){return n().decode(e)})},t}(),si=ht.string,Pc=ht.number,xy=ht.boolean,Vn=ht.anyJson;ht.unknownJson;var Rr=ht.constant,Et=ht.object,ct=ht.array;ht.tuple;var Ac=ht.dict,ve=ht.optional,mh=ht.oneOf;ht.union,ht.intersection,ht.withDefault,ht.valueAt,ht.succeed,ht.fail,ht.lazy;const je=si().where(t=>t.length>0,"Expected a non-empty string"),Tc=Pc().where(t=>t>=0,"Expected a non-negative number"),Cy=Vn().andThen(t=>t instanceof RegExp?Vn():fail("expected a regex, got a "+typeof t)),gh=Et({name:je,displayName:ve(si()),contexts:ve(ct(si())),customConfig:ve(Et())}),Sy=mh(Rr("web"),Rr("native"),Rr("citrix"),Rr("onlineNative"),Rr("other")),vh=Et({url:je}),yh=Et({src:je,size:ve(je),type:ve(je)}),bh=Et({src:je,size:ve(je),type:ve(je),label:ve(je)}),ky=Et({contexts:ct(je),displayName:ve(je),resultType:ve(je),customConfig:ve(Vn())}),Ey=Et({listensFor:ve(Ac(ky)),raises:ve(Ac(ct(je)))}),jy=Et({broadcasts:ve(ct(je)),listensFor:ve(ct(je))}),Oy=Et({name:je,description:ve(je),broadcasts:ve(ct(je)),listensFor:ve(ct(je))}),wh=Et({intents:ve(Ey),userChannels:ve(jy),appChannels:ve(ct(Oy))}),Ny=Et({url:ve(je),top:ve(Pc()),left:ve(Pc()),width:ve(Tc),height:ve(Tc)}),Iy=Et({name:ve(je),type:ve(je.where(t=>t==="window","Expected a value of window")),title:ve(je),version:ve(je),customProperties:ve(Vn()),icon:ve(si()),caption:ve(si()),details:ve(Ny),intents:ve(ct(gh)),hidden:ve(xy())}),xh=Et({name:je,appId:je,title:ve(je),version:ve(je),manifest:je,manifestType:je,tooltip:ve(je),description:ve(je),contactEmail:ve(je),supportEmail:ve(je),publisher:ve(je),images:ve(ct(Et({url:ve(je)}))),icons:ve(ct(Et({icon:ve(je)}))),customConfig:Vn(),intents:ve(ct(gh))}),Py=Et({appId:ve(je),name:ve(je),details:ve(vh),version:ve(je),title:ve(je),tooltip:ve(je),lang:ve(je),description:ve(je),categories:ve(ct(je)),icons:ve(ct(yh)),screenshots:ve(ct(bh)),contactEmail:ve(je),supportEmail:ve(je),moreInfo:ve(je),publisher:ve(je),customConfig:ve(ct(Vn())),hostManifests:ve(Vn()),interop:ve(wh)}),Ch=Et({appId:je,name:ve(je),type:Sy,details:vh,version:ve(je),title:ve(je),tooltip:ve(je),lang:ve(je),description:ve(je),categories:ve(ct(je)),icons:ve(ct(yh)),screenshots:ve(ct(bh)),contactEmail:ve(je),supportEmail:ve(je),moreInfo:ve(je),publisher:ve(je),customConfig:ve(ct(Vn())),hostManifests:ve(Vn()),interop:ve(wh),localizedVersions:ve(Ac(Py))}),Ki=mh(xh,Ch),Di=t=>`${t.kind} at ${t.at}: ${JSON.stringify(t.input)}. Reason - ${t.message}`;class Ay{constructor(){Lt(this,"fdc3ToDesktopDefinitionType",{web:"window",native:"exe",citrix:"citrix",onlineNative:"clickonce",other:"window"})}toApi(){return{isFdc3Definition:this.isFdc3Definition.bind(this),parseToBrowserBaseAppData:this.parseToBrowserBaseAppData.bind(this),parseToDesktopAppConfig:this.parseToDesktopAppConfig.bind(this)}}isFdc3Definition(n){const e=Ki.run(n);return e.ok?n.appId&&n.details?{isFdc3:!0,version:"2.0"}:n.manifest?{isFdc3:!0,version:"1.2"}:{isFdc3:!1,reason:"The passed definition is not FDC3"}:{isFdc3:!1,reason:Di(e.error)}}parseToBrowserBaseAppData(n){var f,d;const{isFdc3:e,version:o}=this.isFdc3Definition(n);if(!e)throw new Error("The passed definition is not FDC3");const r=Ki.run(n);if(!r.ok)throw new Error(`Invalid FDC3 ${o} definition. Error: ${Di(r.error)}`);const i=this.getUserPropertiesFromDefinition(n,o),a={url:this.getUrl(n,o)},s={name:n.appId,type:"window",createOptions:a,userProperties:{...i,intents:o==="1.2"?i.intents:this.getIntentsFromV2AppDefinition(n),details:a},title:n.title,version:n.version,icon:this.getIconFromDefinition(n,o),caption:n.description,fdc3:o==="2.0"?{...n,definitionVersion:"2.0"}:void 0},l=((f=n.hostManifests)==null?void 0:f.ioConnect)||((d=n.hostManifests)==null?void 0:d.Glue42);if(!l)return s;const u=Iy.run(l);if(!u.ok)throw new Error(`Invalid FDC3 ${o} definition. Error: ${Di(u.error)}`);return Object.keys(u.result).length?this.mergeBaseAppDataWithGlueManifest(s,u.result):s}parseToDesktopAppConfig(n){var l,u,f;const{isFdc3:e,version:o}=this.isFdc3Definition(n);if(!e)throw new Error("The passed definition is not FDC3");const r=Ki.run(n);if(!r.ok)throw new Error(`Invalid FDC3 ${o} definition. Error: ${Di(r.error)}`);if(o==="1.2"){const d=n;return{name:d.appId,type:"window",details:{url:this.getUrl(n,o)},version:d.version,title:d.title,tooltip:d.tooltip,caption:d.description,icon:(l=d.icons)==null?void 0:l[0].icon,intents:d.intents,customProperties:{manifestType:d.manifestType,images:d.images,contactEmail:d.contactEmail,supportEmail:d.supportEmail,publisher:d.publisher,icons:d.icons,customConfig:d.customConfig}}}const i=n,a={name:i.appId,type:this.fdc3ToDesktopDefinitionType[i.type],details:i.details,version:i.version,title:i.title,tooltip:i.tooltip,caption:i.description,icon:this.getIconFromDefinition(i,"2.0"),intents:this.getIntentsFromV2AppDefinition(i),fdc3:{...i,definitionVersion:"2.0"}},s=((u=n.hostManifests)==null?void 0:u.ioConnect)||((f=n.hostManifests)==null?void 0:f.Glue42);if(!s)return a;if(typeof s!="object"||Array.isArray(s))throw new Error(`Invalid '${n.hostManifests.ioConnect?"hostManifests.ioConnect":"hostManifests['Glue42']"}' key`);return this.mergeDesktopConfigWithGlueManifest(a,s)}getUserPropertiesFromDefinition(n,e){return Object.fromEntries(e==="1.2"?Object.entries(n).filter(([o])=>!wd.includes(o)):Object.entries(n).filter(([o])=>!wd.includes(o)&&!wy.includes(o)))}getUrl(n,e){var r,i;let o;if(e==="1.2"){const a=JSON.parse(n.manifest);o=((r=a.details)==null?void 0:r.url)||a.url}else o=(i=n.details)==null?void 0:i.url;if(!o||typeof o!="string")throw new Error(`Invalid FDC3 ${e} definition. Provide valid 'url' under '${e==="1.2"?"manifest":"details"}' key`);return o}getIntentsFromV2AppDefinition(n){var o,r;const e=(r=(o=n.interop)==null?void 0:o.intents)==null?void 0:r.listensFor;if(e)return Object.entries(e).map(i=>{const[a,s]=i;return{name:a,...s}})}getIconFromDefinition(n,e){var o,r,i,a;return e==="1.2"?((r=(o=n.icons)==null?void 0:o.find(s=>s.icon))==null?void 0:r.icon)||void 0:((a=(i=n.icons)==null?void 0:i.find(s=>s.src))==null?void 0:a.src)||void 0}mergeBaseAppDataWithGlueManifest(n,e){let o=n;if(e.customProperties&&(o.userProperties={...n.userProperties,...e.customProperties}),e.details){const r={...n.createOptions,...e.details};o.createOptions=r,o.userProperties.details=r}return Array.isArray(e.intents)&&(o.userProperties.intents=(o.userProperties.intents||[]).concat(e.intents)),o={...o,...e},delete o.details,delete o.intents,o}mergeDesktopConfigWithGlueManifest(n,e){const o=Object.assign({},n,e,{details:{...n.details,...e.details}});return Array.isArray(e.intents)&&(o.intents=(n.intents||[]).concat(e.intents)),o}}const Ty={common:{nonEmptyStringDecoder:je,nonNegativeNumberDecoder:Tc,regexDecoder:Cy},fdc3:{allDefinitionsDecoder:Ki,v1DefinitionDecoder:xh,v2DefinitionDecoder:Ch}};var Dc;(function(t){t.USER_CANCELLED="User Closed Intents Resolver UI without choosing a handler",t.CALLER_NOT_DEFINED="Caller Id is not defined",t.TIMEOUT_HIT="Timeout hit",t.INTENT_NOT_FOUND="Cannot find Intent",t.HANDLER_NOT_FOUND="Cannot find Intent Handler",t.TARGET_INSTANCE_UNAVAILABLE="Cannot start Target Instance",t.INTENT_DELIVERY_FAILED="Target Instance did not add a listener",t.RESOLVER_UNAVAILABLE="Intents Resolver UI unavailable",t.RESOLVER_TIMEOUT="User did not choose a handler",t.INVALID_RESOLVER_RESPONSE="Intents Resolver UI returned invalid response",t.INTENT_HANDLER_REJECTION="Intent Handler function processing the raised intent threw an error or rejected the promise it returned"})(Dc||(Dc={}));const jl=new class{constructor(){Lt(this,"_fdc3");Lt(this,"_decoders",Ty);Lt(this,"_errors",{intents:Dc})}get fdc3(){return this._fdc3||(this._fdc3=new Ay().toApi()),this._fdc3}get decoders(){return this._decoders}get errors(){return this._errors}};jl.fdc3;const Dy=jl.decoders;jl.errors;const Po=Dy.common.nonEmptyStringDecoder,My=Ka(K("add"),K("align-bottom"),K("align-bottom-solid"),K("align-left"),K("align-left-bottom"),K("align-left-bottom-solid"),K("align-left-solid"),K("align-left-top"),K("align-left-top-solid"),K("align-right"),K("align-right-bottom"),K("align-right-bottom-solid"),K("align-right-solid"),K("align-right-top"),K("align-right-top-solid"),K("align-top"),K("align-top-solid"),K("always-on-top"),K("always-on-top-on"),K("application"),K("arrow-down-long"),K("arrow-down-to-bracket"),K("arrow-left-long"),K("arrow-right-from-bracket"),K("arrow-right-long"),K("arrow-right"),K("arrow-up"),K("arrow-up-long"),K("ban"),K("bell"),K("bell-solid"),K("bookmark"),K("bullseye-pointer"),K("certificate"),K("check"),K("check-light"),K("check-solid"),K("chevron-down"),K("chevron-left"),K("chevron-right"),K("chevron-up"),K("circle-info"),K("circle-xmark"),K("circle-xmark-full"),K("clock"),K("clock-rotate-left"),K("clone"),K("close"),K("cog"),K("cog-solid"),K("collapse"),K("copy"),K("download"),K("delete-left"),K("dev-tools"),K("ellipsis"),K("ellipsis-vertical"),K("expand"),K("envelope"),K("envelope-open"),K("exclamation-mark"),K("expand"),K("feedback"),K("filter"),K("floppy"),K("floppy-disk-pen"),K("folder"),K("folder-open"),K("globe"),K("group"),K("hidden"),K("home"),K("house"),K("info"),K("keyboard"),K("layout"),K("link"),K("list-ul"),K("lock"),K("logo"),K("minimize"),K("minimize-down"),K("paper-plane-top"),K("paperclip"),K("pause"),K("pen-line"),K("pen-to-square"),K("pin"),K("play"),K("pop-in"),K("pop-in-widget"),K("pop-out"),K("power-off"),K("publish"),K("refresh"),K("resize"),K("restore"),K("rotate-right"),K("search"),K("search-filled"),K("sleep"),K("sliders"),K("snooze"),K("spinner"),K("square"),K("square-arrow-down"),K("square-arrow-up"),K("star"),K("star-full"),K("sticky-off"),K("sticky-off-hover"),K("sticky-on"),K("sticky-on-hover"),K("subscribe"),K("system-close"),K("system-maximize"),K("system-minimize"),K("thumbs-down"),K("thumbs-up"),K("trash"),K("trash-can"),K("triangle-exclamation"),K("unlock"),K("unpin"),K("up-to-line"),K("user"),K("user-gear"),K("visible"),K("workspace")),_y=hh({id:Po,title:Po,description:Ye(fh()),icon:Ye(My),iconSrc:Ye(Po),contextMenuActions:Ye(Oc(ph())),type:Po}),Ly=Ka(K("Left"),K("Right")),Cd=Ka(K("daily"),K("weekly")),Sd=Ka(K("Sunday"),K("Monday"),K("Tuesday"),K("Wednesday"),K("Thursday"),K("Friday"),K("Saturday")),Zi=hh({customPrefs:Ye(ph()),_launchpad_collapsedSections:Ye(Oc(Po)),_launchpad_favorites:Ye(Oc(_y)),_launchpad_isLayoutsPanelOpen:Ye(Rt()),_launchpad_isCollapsed:Ye(Rt()),_launchpad_isPinned:Ye(Rt()),_launchpad_pinnedPosition:Ye(Ly),_launchpad_allowDocking:Ye(Rt()),_launchpad_minimizeToTray:Ye(Rt()),_launchpad_autoCloseStartingAppsAndWorkspaces:Ye(Rt()),_launchpad_showTutorialOnStartup:Ye(Rt()),_layouts_restoreLastSaved:Ye(Rt()),_layouts_saveCurrentOnExit:Ye(Rt()),_layouts_showUnsavedChangesPrompt:Ye(Rt()),_layouts_showDeletePrompt:Ye(Rt()),_downloads_askForEachDownload:Ye(Rt()),_downloads_location:Ye(fh()),_system_scheduleRestart:Ye(Rt()),_system_scheduleRestartTime:Ye(Po),_system_scheduleRestartFrequency:Ye(Cd),_system_scheduleRestartDay:Ye(Sd),_system_scheduleShutdown:Ye(Rt()),_system_scheduleShutdownTime:Ye(Po),_system_scheduleShutdownFrequency:Ye(Cd),_system_scheduleShutdownDay:Ye(Sd)}),Sh=async t=>{const{io:n,variant:e,text:o,error:r}=t,i=jo(r);try{if(e===El&&n.logger.warn(i?`${o} ${i}`:o),!("modals"in n)||!n.modals)throw new Error("Modals are not enabled.");const a={text:o,variant:e,ttl:by[e]};await n.modals.alerts.request(a)}catch(a){console.warn("Failed to request alert. ",{error:a})}},Ol=g.createContext(void 0),Za=({children:t,launchpadMode:n})=>{const[e,o]=g.useState(),[r,i]=g.useState(!1),[a,s]=g.useState(),l=g.useContext(_e.IOConnectContext),u=g.useMemo(()=>({prefs:e,isInitialSetupCompleted:r,initialSetupError:a}),[e,r,a]);return g.useEffect(()=>{if(!l)return;let f=!1;const d=l.contexts.subscribe(Eo,p=>{if(f)return;const h=Zi.run(p);if(!h.ok)return void l.logger.warn(`The received data for context ${Eo} is with an invalid shape: ${jo(h.error.message)}`);const m=h.result;o(m),l.prefs.updateFor(yd,m).catch(v=>{l.logger.warn(`Failed to update platform prefs. Error: ${jo(v)}`)})});return()=>{f=!0,d.then(p=>{p()})}},[l]),g.useEffect(()=>{l&&(async()=>{var f;try{const d=await l.contexts.get(Eo),p=Zi.run(d);if(!p.ok)throw new Error(`The data in context ${Eo} is with an invalid shape: ${jo(p.error.message)}`);const h=p.result;if(Object.keys(h).length>0)return;const m=((f=await l.prefs.get(yd))==null?void 0:f.data)??{},v=Zi.run(m);if(!v.ok)throw new Error(`The stored platform prefs in io.prefs are with an invalid shape: ${jo(v.error.message)}`);const y={[kc]:n==="pinned"||(m[kc]??!1)},w={...yy,...v.result,...y};await l.contexts.set(Eo,w)}catch(d){s({message:jo(d)}),await Sh({io:l,variant:El,text:"Initial platform prefs setup failed.",error:d})}finally{i(!0)}})().catch(console.error)},[l,n]),c.jsx(Ol.Provider,{value:u,children:t})};function kh(){const t=g.useContext(Ol);if(t===void 0)throw new Error("usePlatformPrefs must be used within a PlatformPrefsProvider");return t}function Xt({prefKey:t}){var d;const n=g.useContext(_e.IOConnectContext),e=g.useContext(Ol),o=(d=e==null?void 0:e.prefs)==null?void 0:d[t],r=(e==null?void 0:e.isInitialSetupCompleted)??!1,[i,a]=g.useState(!r),[s,l]=g.useState(),u=g.useRef(0);g.useEffect(()=>{r&&u.current===0&&a(!1)},[r]);const f=g.useCallback(async p=>{if(!n)return;const h=++u.current;a(!0),l(void 0);const m=async y=>{y&&await Sh({io:n,variant:El,text:`Failed to update prefKey "${t}".`,error:y}),h===u.current&&(a(!1),y&&l({message:jo(y)}))};let v;if(p instanceof Function)try{v=p((await n.contexts.get(Eo))[t])}catch(y){return m(y)}else v=p;try{const y=Zi.runWithException({[t]:v});await n.contexts.update(Eo,y)}catch(y){return m(y)}await m()},[n,t]);if(e===void 0)throw new Error("usePlatformPref must be used within a PlatformPrefsProvider");return{error:s,isLoading:i,update:f,value:o}}const Ry="var(--io-neutrals-0)",As="var(--io-neutrals-900)";function Eh(t){var r;let n,e,o;if(t.startsWith("#")){let i=t.slice(1);i.length===3&&(i=i.split("").map(a=>a+a).join("")),n=parseInt(i.substring(0,2),16),e=parseInt(i.substring(2,4),16),o=parseInt(i.substring(4,6),16)}else{if(!t.startsWith("rgb")){const i=document.createElement("canvas").getContext("2d");return i?(i.fillStyle=t,Eh(i.fillStyle)):As}{const i=(r=t.match(/\d+/g))==null?void 0:r.map(Number);if(!i||i.length<3)return As;[n,e,o]=i}}return(.2126*n+.7152*e+.0722*o)/255>.5?As:Ry}function Fy({className:t,channel:n,...e}){const o=de("io-channel-badge",t),r=g.useMemo(()=>Eh(n.color),[n.color]);return c.jsx("div",{className:o,style:{color:r,backgroundColor:n.color},"data-testid":`channel-selector-badge-${n.color}`,...e,children:c.jsx("span",{className:"io-channel-selector-badge-label","data-testid":"channel-selector-label",children:n.label})})}function By(){return c.jsx(lt,{variant:"check","data-testid":"channel-selector-channel-selected"})}function Hy({channel:t,handleChannelRestricted:n,lockedChannelRestriction:e}){const o=(r,i)=>a=>{a.stopPropagation(),ho(a)&&(a.preventDefault(),i||n({...t,[r]:!t[r]}))};return c.jsxs(c.Fragment,{children:[c.jsx("div",{children:t.isSelected&&c.jsx("span",{"data-testid":"channel-selector-channel-selected",children:"Active"})}),c.jsx("div",{role:"button",onClick:r=>r.stopPropagation(),"data-testid":"channel-selector-publish-toggle-container",children:c.jsx(vt,{label:"Publish",checked:t.write,onChange:()=>{n({...t,write:!t.write})},onKeyDown:o("write",!t.isSelected||(e==null?void 0:e.write)),onClick:r=>r.stopPropagation(),disabled:!t.isSelected||(e==null?void 0:e.write)})}),c.jsx("div",{role:"button",onClick:r=>r.stopPropagation(),"data-testid":"channel-selector-subscribe-toggle-container",children:c.jsx(vt,{label:"Subscribe",checked:t.read,onChange:()=>{n({...t,read:!t.read})},onKeyDown:o("read",!t.isSelected||(e==null?void 0:e.read)),disabled:!t.isSelected||(e==null?void 0:e.read)})})]})}const jh=g.createContext({});function $y({channel:t,isSelected:n,onChannelSelect:e,onChannelRestrict:o,...r}){const{variant:i,selectedChannels:a,lockedChannelRestrictions:s}=g.useContext(jh),l=n||t.isSelected||(a==null?void 0:a.includes(t)),u=s==null?void 0:s.find(h=>h.name===t.name),f=g.useCallback(()=>e==null?void 0:e({...t,isSelected:!l}),[t,e,l]),d=g.useCallback(h=>{const m=h.target;m.closest(".io-toggle")||m.classList.contains("io-toggle")||ho(h)&&(h.preventDefault(),e==null||e({...t,isSelected:!l}))},[t,e,l]),p=g.useCallback(h=>{o==null||o(h)},[o]);return c.jsx(Oa,{prepend:c.jsx(Fy,{channel:t}),append:i==="single"||i==="multi"?l&&c.jsx(By,{}):c.jsx(Hy,{channel:t,handleChannelRestricted:p,lockedChannelRestriction:u}),isSelected:l,onClick:f,onKeyDown:d,...r,children:t.name},t.name)}function Wy({variant:t,onVariantChange:n,disabled:e=!1}){const o=t==="directionalSingle"||t==="directionalMulti",r=g.useCallback(()=>{n==null||n(!o)},[o,n]),i=g.useCallback(s=>{s.stopPropagation()},[]),a=g.useCallback(s=>{s.stopPropagation(),ho(s)&&(s.preventDefault(),e||r())},[e,r]);return c.jsx(vt,{label:"Directional",align:"right",checked:o,onChange:r,onClick:i,onKeyDown:a,disabled:e,"data-testid":`channel-selector-toggle-${t}`})}const zy=g.forwardRef(({className:t,variant:n="single",variantToggle:e=!1,channels:o=[],lockedChannelRestrictions:r=[],onVariantChange:i,onChannelSelect:a,onChannelRestrict:s,...l},u)=>{const f=de("io-list-channels","io-channel-selector-panel",(n==="directionalSingle"||n==="directionalMulti")&&"io-list-channels-directional io-channel-selector-panel-directional",t),d=g.useMemo(()=>({variant:n,selectedChannels:o.filter(p=>p.isSelected),lockedChannelRestrictions:r,onVariantChange:i,onChannelSelect:a,onChannelRestrict:s}),[o,n,r,i,a,s]);return c.jsx(jh.Provider,{value:d,children:c.jsx("div",{className:f,ref:u,children:c.jsxs(mt,{...l,children:[c.jsx(mt.ItemTitle,{"data-testid":"channel-selector-title",append:e&&c.jsx(Wy,{variant:n,onVariantChange:i}),children:{single:"Select Channel",directionalSingle:"Select Directional Channel",multi:"Select Channels",directionalMulti:"Select Directional Channels"}[n]}),o==null?void 0:o.map(p=>c.jsx($y,{channel:p,isSelected:p.isSelected,onChannelSelect:a,onChannelRestrict:s,"data-testid":`channel-selector-channel-${p.name}`},p.name))]})})})});zy.displayName="ChannelSelector";const Uy=g.forwardRef(({className:t,title:n,ariaLabel:e,onClick:o,onKeyDown:r,children:i,disabled:a=!1,...s},l)=>c.jsx("div",{ref:l,className:de(t,{disabled:a}),title:n,role:"button",tabIndex:a?-1:0,"aria-label":e,"aria-disabled":a,onClick:u=>{!a&&o&&o(u)},onKeyDown:u=>{!a&&r&&r(u)},...s,children:i}));Uy.displayName="ChannelSelectorButtonWrapper";g.createContext({config:{message:""},theme:"dark",setResult:()=>{}});function Oh({title:t="Downloads"}){const{ItemSearch:n,HeaderButtons:e}=vi();return c.jsxs("div",{className:"io-dm-header",children:[c.jsxs(Zt,{draggable:!0,children:[c.jsx(Zt.Title,{tag:"h1",text:t,size:"large"}),c.jsx(e,{className:"non-draggable"})]}),c.jsx(n,{})]})}const Vt=window.glue42gd,Nh=g.createContext({configuration:{},items:[],removeItem:()=>{},pauseResumeItem:()=>{},cancelItem:()=>{},clearItems:()=>{},showItemInFolder:()=>{},isSettingsVisible:!1,showSettings:()=>{},hideSettings:()=>{},searchQuery:"",setSearch:()=>{},itemsCount:0,setCount:()=>{},setDownloadLocation:()=>{},setDownloadLocationWithDialog:()=>{},sortItems:()=>[],downloadLocationList:[],isDownloadLocationDialogVisible:!1}),Gn=()=>g.useContext(Nh);function Ih({className:t,placeholder:n="Search",iconPrepend:e="search",iconAppend:o="close",...r}){const i=de("io-header-search",t),a=g.useRef(null),{searchQuery:s,setSearch:l,itemsCount:u}=Gn(),f=s.length>0,d=g.useCallback(()=>{l(""),a.current&&a.current.focus()},[l]);return c.jsxs("div",{className:i,children:[c.jsx(Fo,{ref:a,value:s,iconPrepend:e,iconAppend:f?o:void 0,iconAppendOnClick:f?d:void 0,placeholder:n,onChange:p=>l(p.target.value),...r}),f&&c.jsx("p",{className:"io-header-search-count",children:`${u} results`})]})}function Ph({className:t,...n}){const{MoreButton:e,CloseButton:o}=vi();return c.jsxs(Be,{className:t,align:"right",...n,children:[c.jsx(e,{}),c.jsx(o,{})]})}function Ah({icon:t="ellipsis-vertical",...n}){const{items:e,clearItems:o,showSettings:r}=Gn(),i=e.length===0;return c.jsxs(xe,{variant:"light",...n,children:[c.jsx(xe.ButtonIcon,{icon:t,variant:"circle",size:"32"}),c.jsx(xe.Content,{children:c.jsxs(xe.List,{children:[c.jsx(xe.Item,{onClick:a=>(s=>{i?s.stopPropagation():o()})(a),disabled:i,children:"Clear All"}),c.jsx(xe.Item,{onClick:r,children:"Settings"})]})})]})}const Vy={minimizeWindow:async function(t){var n;if(t)try{const e=(n=t.windows)==null?void 0:n.my();await(e==null?void 0:e.minimize())}catch(e){console.error("Failed to minimize window",e)}},closeWindow:async function(t,n){var e;if(t)try{const o=(e=t.windows)==null?void 0:e.my();await(o==null?void 0:o.close(n))}catch(o){console.error("Failed to close window",o)}},restartPlatform:async function(t,n=!0){if(t)try{await t.appManager.restart({autoSave:n,showDialog:!0})}catch(e){console.error("Failed to restart io.Connect Desktop",e)}},shutdownPlatform:async function(t,n=!0){if(t)try{await t.appManager.exit({autoSave:n,showDialog:!0})}catch(e){console.error("Failed to shutdown io.Connect Desktop",e)}}};function Th({icon:t="close",size:n="32",variant:e="circle",onClick:o,...r}){const i=g.useContext(_e.IOConnectContext);return c.jsx(Ge,{icon:t,size:n,variant:e,onClick:a=>{o?o(a):Vy.closeWindow(i).catch(s=>{console.error("Failed to close window:",s)})},...r})}function Yo(t,n=!1,e=!1,o=!1){const r=t.getDate(),i=["January","February","March","April","May","June","July","August","September","October","November","December"][t.getMonth()],a=t.getFullYear(),s=t.getHours(),l=t.getMinutes();let u="";return u=l<10?`0${l}`:`${l}`,n?n==="Today"?e?"Today":`Today at ${s}:${u}`:n==="Yesterday"?e?"Yesterday":`Yesterday at ${s}:${u}`:`${s}:${u}`:o?e?`${i} ${r}`:`${i} ${r} at ${s}:${u}`:e?`${i} ${r}, ${a}`:`${i} ${r}, ${a} at ${s}:${u}`}function Dh(t,n={showTime:!0}){const e=new Date(1e3*t),o=new Date,r=Math.round((o-e)/1e3),i=Math.round(r/60),a=o.toDateString()===e.toDateString(),s=new Date(o.setDate(o.getDate()-1)).toDateString()===e.toDateString(),l=o.getFullYear()===e.getFullYear();return n.showTime?r<5?"Just Now":r<60?`${r} seconds ago`:r<90?"about a minute ago":i<60?`${i} minutes ago`:a?Yo(e,"Today",!1,!0):s?Yo(e,"Yesterday",!1,!0):l?Yo(e,!1,!1,!0):Yo(e):a?"Today":s?"Yesterday":l?Yo(e,!1,!0,!0):Yo(e,!1,!0)}function Mh({className:t,...n}){const e=de("io-dm-body",t),{DownloadListEmpty:o,ItemGroup:r,Item:i}=vi(),{items:a,searchQuery:s,setCount:l,sortItems:u}=Gn(),f=u(a),d=th(s),p=g.useMemo(()=>f.filter(v=>v.displayInfo.filename.toLowerCase().includes(d.toLowerCase())||v.displayInfo.url.toLowerCase().includes(d.toLowerCase())),[f,d]),h=g.useMemo(()=>p.map(v=>({...v,displayInfo:{...v.displayInfo,startTime:Dh(v.displayInfo.startTime,{showTime:!1})}})),[p]),m=g.useMemo(()=>Object.values(h.reduce((v={},y)=>{var w;return v[y.displayInfo.startTime]=((w=v[y.displayInfo.startTime])==null?void 0:w.concat([]))??[],v[y.displayInfo.startTime].push(y),v},{})),[h]);return g.useEffect(()=>{l(p.length)},[p,l]),c.jsx("div",{className:e,...n,children:m&&m.length!==0?m.map(v=>c.jsx(r,{title:String(v[0].displayInfo.startTime)??null,children:v.map(y=>c.jsx(i,{item:y},y.id))},v[0].id??"")):c.jsx(o,{})})}function _h({className:t,icon:n="download",text:e="No downloads to display.",...o}){const r=de("io-dm-no-items",t);return c.jsxs("div",{className:r,...o,children:[c.jsx(lt,{variant:n}),c.jsx("p",{children:e})]})}function Lh({className:t,title:n,children:e,...o}){const r=de("io-dm-item-group",t);return c.jsxs("div",{className:r,...o,children:[n&&c.jsx("p",{children:n}),e]})}function Rh({className:t,item:n,...e}){const{ItemHeader:o,ItemBody:r,ItemFooter:i}=vi(),{state:a,url:s,filename:l,receivedBytes:u,totalBytes:f,speed:d,timeRemaining:p}=n.displayInfo;if(!n)return c.jsx(c.Fragment,{});const h=de("io-dm-item",n.displayInfo.state&&[a],t);return c.jsxs("div",{className:h,...e,children:[c.jsx(o,{itemID:n.id,filename:l,state:a}),c.jsx(r,{state:a,url:s,bytesReceived:u,bytesTotal:f,speed:d,timeRemaining:p}),c.jsx(i,{itemID:n.id,state:a})]})}function Nl({bytesReceived:t=0,bytesTotal:n=0,...e}){const o=g.useCallback(()=>t&&n?Math.round(t/n*100):0,[t,n]);return c.jsx(b1,{value:o(),...e})}function Fh({className:t,itemID:n,filename:e,state:o,cancel:r,remove:i,...a}){const s=de("io-dm-item-header",t),{cancelItem:l,removeItem:u}=Gn(),f=g.useCallback(p=>{r?r(p):l(p)},[r,l]),d=g.useCallback(p=>{i?i(p):u(p)},[i,u]);return c.jsxs("div",{className:s,...a,children:[c.jsx(Nn,{text:e,style:{textDecoration:o==="interrupted"||o==="cancelled"?"line-through":"none"}}),c.jsx(Ge,{icon:"close",iconSize:"12",onClick:()=>{o==="progressing"||o==="paused"?f(n):d(n)}})]})}function Bh({className:t,state:n,url:e,bytesReceived:o=0,bytesTotal:r=0,speed:i=0,timeRemaining:a=0,...s}){const l=de("io-dm-item-body",t),u=p=>{const h=["Bytes","KB","MB","GB","TB"];if(p===0)return"0";const m=Math.floor(Math.log(p)/Math.log(1024));return m===0?`${p}${h[m]}`:`${(p/1024**m).toFixed(1)}${h[m]}`};return c.jsxs("div",{className:l,...s,children:[c.jsx("p",{className:"io-text-small",children:e}),(d=n,d==="cancelled"||d==="interrupted"||d==="completed"?null:c.jsx(Nl,{variant:d==="paused"?"paused":"active",bytesReceived:o,bytesTotal:r})),c.jsx("p",{className:"io-text-default-lh16",children:n==="completed"?`${u(o??0)} - Done`:n==="cancelled"||n==="interrupted"?`${u(o??0)}/${u(r??0)} - Failed`:`${u(o??0)}/${u(r??0)} (${f=i,(f?`${(f/1e6/8).toFixed(2)}MB/s`:0)??0}) - ${(p=>{const h=Math.floor(p/3600),m=Math.floor(p%3600/60);let v="";return h>0&&(v+=`${h} hour${h>1?"s":""}, `),m>0&&(v+=`${m} min${m>1?"s":""}, `),((p=Math.floor(p%60))>0||v==="")&&(v+=`${p} sec${p!==1?"s":""}`),`${v.trim()} left`})(a)??0}`})]});var f,d}const Yy={success:"check-solid",warning:"exclamation-mark",critical:"exclamation-mark"};function Ts({className:t,variant:n,text:e}){const o=de("io-dm-item-status",`io-dm-item-status-${n}`,t);return c.jsxs("div",{className:o,children:[n&&c.jsx(lt,{variant:Yy[n],className:"icon-severity",size:"10"}),e&&c.jsx("p",{className:"io-text-smaller",children:e})]})}function Hh({className:t,itemID:n,state:e,pauseResume:o,showInFolder:r,cancel:i,...a}){const s=de("io-dm-item-footer",t),{pauseResumeItem:l,showItemInFolder:u,cancelItem:f}=Gn(),d=g.useCallback(m=>{o?o(m):l(m)},[o,l]),p=g.useCallback(m=>{r?r(m):u(m)},[r,u]),h=g.useCallback(m=>{i?i(m):f(m)},[i,f]);return c.jsx("div",{className:s,...a,children:(()=>{switch(e){case"progressing":return c.jsxs(Be,{align:"right",children:[c.jsx(Be.Button,{variant:"primary",text:"Pause",onClick:()=>d(n)}),c.jsx(Be.Button,{variant:"link",text:"Cancel",onClick:()=>h(n)})]});case"paused":return c.jsx(Be,{align:"right",children:c.jsx(Be.Button,{variant:"primary",text:"Resume",onClick:()=>d(n)})});case"completed":return c.jsxs(c.Fragment,{children:[c.jsx(Ts,{variant:"success",text:"Complete"}),c.jsx(Be,{align:"right",children:c.jsx(Be.Button,{variant:"primary",text:"Show in Folder",onClick:()=>p(n)})})]});case"cancelled":return c.jsx(Ts,{variant:"warning",text:"Cancelled"});case"interrupted":return c.jsxs(c.Fragment,{children:[c.jsx(Ts,{variant:"critical",text:"Failed"}),c.jsx(Be,{align:"right",children:c.jsx(Be.Button,{variant:"primary",text:"Retry",onClick:()=>d(n)})})]});default:return null}})()})}function $h({className:t,title:n="Download Settings",...e}){const o=de("io-dm-settings-panel",t),{configuration:{downloadFolder:r},hideSettings:i,setDownloadLocation:a,setDownloadLocationWithDialog:s,isDownloadLocationDialogVisible:l,downloadLocationList:u}=Gn();return c.jsxs(qe,{className:o,...e,children:[c.jsxs(qe.Header,{children:[c.jsx(qe.Header.Title,{size:"large",text:n,tag:"h1"}),c.jsx(qe.Header.ButtonGroup,{children:c.jsx(Ge,{variant:"circle",icon:"close",size:"32",onClick:()=>{i()},disabled:l})})]}),c.jsx(qe.Body,{children:c.jsxs(Be,{children:[c.jsxs(xe,{variant:"light",disabled:l,children:[c.jsx(xe.Button,{children:c.jsx("span",{className:"io-dm-settings-panel-download-location",children:r??u[0]})}),u.length>1&&c.jsx(xe.Content,{children:c.jsx(xe.List,{children:u.map((f,d)=>!f||d===0||d>3?null:c.jsx(xe.Item,{onClick:()=>{a(f)},children:f},f))})})]}),c.jsx(Je,{className:"io-btn io-dm-settings-panel-download-location-btn",text:"Browse",onClick:()=>{s()},disabled:l})]})})]})}const Wh={Header:Oh,ItemSearch:Ih,HeaderButtons:Ph,MoreButton:Ah,CloseButton:Th,Body:Mh,DownloadListEmpty:_h,ItemGroup:Lh,Item:Rh,ItemProgress:Nl,ItemHeader:Fh,ItemBody:Bh,ItemFooter:Hh,Settings:$h},zh=g.createContext(Wh),Uh=g.memo(({children:t,components:n})=>{const e=g.useMemo(()=>({...Wh,...n}),[n]);return c.jsx(zh.Provider,{value:e,children:t})});Uh.displayName="ComponentsStore";const vi=()=>g.useContext(zh);function Gy({className:t,...n}){const e=de("io-dm",t),{Header:o,Body:r,Settings:i}=vi(),{isSettingsVisible:a}=Gn();return c.jsxs(qe,{className:e,...n,children:[c.jsx(o,{}),c.jsx(r,{}),a&&c.jsx(i,{})]})}var Ky=Object.freeze({__proto__:null,Body:Mh,CloseButton:Th,DownloadListEmpty:_h,DownloadManager:function({components:t,...n}){return c.jsx(Uh,{components:t,children:c.jsx(Gy,{...n})})},DownloadManagerProvider:({children:t})=>{const{configuration:n,items:e,removeItem:o,pauseResumeItem:r,cancelItem:i,clearItems:a,showItemInFolder:s,isSettingsVisible:l,showSettings:u,hideSettings:f,searchQuery:d,setSearch:p,itemsCount:h,setCount:m,setDownloadLocation:v,setDownloadLocationWithDialog:y,sortItems:w,isDownloadLocationDialogVisible:k,downloadLocationList:x}=function(){const[E,j]=g.useState({}),[B,F]=g.useState([]),[L,D]=g.useState(0),[T,P]=g.useState([]),[re,ae]=g.useState(""),[z,ee]=g.useState(!1),[q,ie]=g.useState(!1),[J,W]=g.useState({filePaths:[],canceled:!1});g.useEffect(()=>{if(!Vt)return;const Y=Vt.downloads.onUpdate(M=>F(O=>Q(O,M))),H=Vt.downloads.onConfigurationChanged(M=>{j(M)});return Vt.downloads.list().then(F).catch(console.error),Vt.downloads.getSavePathList().then(M=>{M.pathList&&P(M.pathList)}).catch(console.error),()=>{Y(),H()}},[]),g.useEffect(()=>{ie(!1)},[J]);const Q=(Y,H)=>{const M=Y.findIndex(I=>I.id===H.id);if(M===-1)return[H,...Y];const O=[...Y];return O[M]=H,O};return{items:B,setCount:Y=>{D(Y)},sortItems:(Y,H=!0)=>Y.sort((M,O)=>H?M.displayInfo.startTime<O.displayInfo.startTime?1:-1:M.displayInfo.startTime>O.displayInfo.startTime?1:-1),setSearch:Y=>{ae(Y)},cancelItem:async Y=>{try{await Vt.downloads.cancel(Y)}catch(H){console.error(H)}},removeItem:async Y=>{try{F(H=>H.filter(M=>M.id!==Y)),await Vt.downloads.removeItem(Y)}catch(H){console.error(H)}},clearItems:async()=>{try{F([]),await Vt.downloads.clearDownloadList()}catch(Y){console.error(Y)}},itemsCount:L,searchQuery:re,showSettings:()=>{ee(!0)},hideSettings:()=>{ee(!1)},configuration:E,isSettingsVisible:z,pauseResumeItem:async Y=>{try{await Vt.downloads.pauseResume(Y)}catch(H){console.error(H)}},showItemInFolder:async Y=>{try{await Vt.downloads.showInFolder(Y)}catch(H){console.error(H)}},setDownloadLocation:async Y=>{try{await Vt.downloads.setSavePath(Y),P(H=>{if(H.includes(Y)){const M=H.filter(O=>O!==Y);return[Y,...M]}return[Y,...H]})}catch(H){console.error(H)}},downloadLocationList:T,isDownloadLocationDialogVisible:q,setDownloadLocationWithDialog:async()=>{ie(!0);try{const Y=await Vt.downloads.showOpenDialog();if(W(Y),!(Y!=null&&Y.filePaths)||Y.filePaths.length===0)return;await Vt.downloads.setSavePath(Y.filePaths[0]),P(H=>{if(H.includes(Y.filePaths[0])){const M=H.filter(O=>O!==Y.filePaths[0]);return[Y.filePaths[0],...M]}return[Y.filePaths[0],...H]})}catch(Y){console.error(Y)}}}}(),b=g.useMemo(()=>({configuration:n,items:e,removeItem:o,pauseResumeItem:r,cancelItem:i,clearItems:a,showItemInFolder:s,isSettingsVisible:l,showSettings:u,hideSettings:f,searchQuery:d,setSearch:p,itemsCount:h,setCount:m,setDownloadLocation:v,setDownloadLocationWithDialog:y,sortItems:w,isDownloadLocationDialogVisible:k,downloadLocationList:x}),[n,e,o,r,i,s,a,l,u,f,d,p,h,m,v,y,w,k,x]);return c.jsx(Nh.Provider,{value:b,children:t})},Header:Oh,HeaderButtons:Ph,Item:Rh,ItemBody:Bh,ItemFooter:Hh,ItemGroup:Lh,ItemHeader:Fh,ItemProgress:Nl,ItemSearch:Ih,MoreButton:Ah,Settings:$h,useDownloadManagerContext:Gn});function Mc(t){if(t&&t.errorHandling&&typeof t.errorHandling!="function"&&t.errorHandling!=="log"&&t.errorHandling!=="silent"&&t.errorHandling!=="throw")throw new Error('Invalid options passed to createRegistry. Prop errorHandling should be ["log" | "silent" | "throw" | (err) => void], but '+typeof t.errorHandling+" was passed");var n=t&&typeof t.errorHandling=="function"&&t.errorHandling,e={};function o(r,i){var a=r instanceof Error?r:new Error(r);if(n)n(a);else{var s='[ERROR] callback-registry: User callback for key "'+i+'" failed: '+a.stack;if(t)switch(t.errorHandling){case"log":return console.error(s);case"silent":return;case"throw":throw new Error(s)}console.error(s)}}return{add:function(r,i,a){var s=e[r];return s||(s=[],e[r]=s),s.push(i),a&&setTimeout(function(){a.forEach(function(l){var u;if(!((u=e[r])===null||u===void 0)&&u.includes(i))try{Array.isArray(l)?i.apply(void 0,l):i.apply(void 0,[l])}catch(f){o(f,r)}})},0),function(){var l=e[r];l&&(l=l.reduce(function(u,f,d){return f===i&&u.length===d||u.push(f),u},[]),l.length===0?delete e[r]:e[r]=l)}},execute:function(r){for(var i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];var s=e[r];if(!s||s.length===0)return[];var l=[];return s.forEach(function(u){try{var f=u.apply(void 0,i);l.push(f)}catch(d){l.push(void 0),o(d,r)}}),l},clear:function(){e={}},clearKey:function(r){e[r]&&delete e[r]}}}Mc.default=Mc;var Zy=Cf(Mc);const qy={env:"",region:"",version:"",buildVersion:"",theme:"",isError:!1,mailingList:"",createJiraTicket:!0,sendEmail:!1,attachments:[],applicationTitle:"",allowEditRecipients:!0,attachmentsViewMode:"category",environmentInfo:"",selectedCategories:[],errorMessage:"",showEnvironmentInfo:!1,context:{},technicalInfo:"",sendEmailClient:"Outlook"},Jy=g.createContext({config:qy,onThemeChanged:()=>{},openUrl:()=>{},submit:()=>Promise.resolve({}),setBounds:()=>{},close:()=>{},showMailingList:!0,setShowMailingList:()=>{},attachmentCategories:[],submitInProgress:!1,setSubmitInProgress:()=>{},submitStatus:{type:"success",title:"",text:""},setSubmitStatus:()=>{},submitCompleted:!1,setSubmitCompleted:()=>{},jiraTicketURL:"",setJiraTicketURL:()=>{},submitFeedback:()=>{}}),bn=()=>g.useContext(Jy);function Xy({...t}){const{config:n,close:e}=bn(),{applicationTitle:o}=n;return c.jsxs(Zt,{draggable:!0,...t,children:[c.jsx(Zt.Title,{tag:"h1",text:o?`Feedback Form - ${o}`:"Feedback Form",size:"large"}),c.jsx(Zt.ButtonGroup,{className:"non-draggable",children:c.jsx(Zt.ButtonIcon,{variant:"circle",icon:"close",size:"32",onClick:()=>e()})})]})}function Qy({className:t,handleSubmit:n,...e}){const o=de("io-panel-body",t),{config:r,submitFeedback:i}=bn(),{IntroField:a,DescriptionField:s,TechInfoField:l,EnvInfoField:u,FileAttachmentsField:f,CategoryAttachmentsField:d,SettingsField:p,MailListField:h}=qa(),m=n??i,v=`Your feedback will be submitted to the ${r.buildVersion} team and some additional information will be automatically included to help us examine your issue.`;return c.jsxs("form",{className:o,id:"feedback",onSubmit:y=>m(y),...e,children:[c.jsx(a,{children:c.jsx("p",{children:v})}),c.jsx(p,{}),c.jsx(h,{}),c.jsx(s,{}),c.jsx(l,{readOnly:!0}),c.jsx(u,{readOnly:!0}),r.attachmentsViewMode==="file"?c.jsx(f,{}):c.jsx(d,{})]})}function eb({...t}){const{FooterButtons:n}=qa(),{openUrl:e,submitInProgress:o,submitStatus:r,jiraTicketURL:i}=bn();return c.jsx(Io,{...t,children:c.jsxs("div",o?{className:"flex ai-center jc-between",children:[c.jsx(et,{children:c.jsx("p",{children:r.title})}),c.jsx(y1,{align:"right",size:"small"})]}:{className:"flex ai-center jc-between",children:[c.jsxs(et,{children:[c.jsx("p",{className:r.type==="error"?"io-text-error":"",children:r.title}),i&&c.jsx("a",{href:i,onClick:a=>{a.preventDefault(),e(i)},children:i})]}),c.jsx(n,{})]})})}function tb({className:t,...n}){const{CloseButton:e}=qa(),{close:o}=bn(),r=de("non-draggable",t);return c.jsx(Be,{className:r,...n,children:c.jsx(e,{onClick:()=>o()})})}function nb({className:t,...n}){const{SubmitButton:e,CancelButton:o,CloseButton:r}=qa(),{close:i,submitCompleted:a}=bn();return a?c.jsx(Be,{className:t,...n,children:c.jsx(r,{text:"Close",onClick:()=>i()})}):c.jsxs(Be,{className:t,...n,children:[c.jsx(e,{}),c.jsx(o,{onClick:()=>i()})]})}function ob({text:t="Submit",...n}){return c.jsx(Je,{form:"feedback",type:"submit",variant:"primary",text:t,...n})}function rb({text:t="Cancel",...n}){return c.jsx(Je,{variant:"link",text:t,...n})}function ib({...t}){return c.jsx(Je,{variant:"primary",...t})}function ab({showField:t=!0,className:n,title:e,hint:o,children:r,...i}){return t?c.jsx(et,{className:n,title:e,hint:o,...i,children:r}):null}function sb({showField:t=!0,className:n,title:e="Description",hint:o,readOnly:r=!1,disabled:i,...a}){return t?c.jsx(et,{className:n,hint:o,title:"",...a,children:c.jsx(Va,{id:"description",name:"description",label:e,readOnly:r,disabled:i})}):null}function cb({showField:t,className:n,title:e="Technical Information",hint:o,fieldValue:r,readOnly:i=!1,disabled:a,...s}){const{config:l}=bn(),u=t??l.errorMessage,f=r??l.errorMessage;return u&&f?c.jsx(et,{className:n,hint:o,...s,children:c.jsx(Va,{id:"errorMessage",name:"errorMessage",label:e,value:f,readOnly:i,disabled:a})}):null}function lb({showField:t,className:n,title:e="Environment Information",hint:o,fieldValue:r,readOnly:i=!1,disabled:a,...s}){const{config:l}=bn(),u=t??l.showEnvironmentInfo,f=r??l.environmentInfo;return u&&f?c.jsx(et,{className:n,hint:o,...s,children:c.jsx(Va,{id:"environmentInfo",name:"environmentInfo",label:e,value:f,readOnly:i,disabled:a})}):null}function ub({showField:t=!0,className:n,title:e="Attachments",hint:o,readOnly:r=!1,disabled:i,attachments:a,selectedCategories:s,...l}){const u=de("io-block-list-gap",n),{config:f}=bn(),d=a??f.attachments,p=s??f.selectedCategories,h=g.useCallback(m=>!!p&&p.indexOf(m)!==-1,[p]);return t?!d||d.length<=0?c.jsx(et,{title:"Attachments",children:c.jsx("p",{children:"No Attachments"})}):c.jsx(et,{className:u,title:e,hint:o,...l,children:c.jsx("div",{className:"file-attachments",children:d.map(m=>c.jsx(Ya,{id:m.id,name:m.id,label:m.name,readOnly:r,disabled:i,defaultChecked:h(m.category)},m.id))})}):null}function db({showField:t=!0,className:n,title:e="Attachments",hint:o,readOnly:r=!1,disabled:i,categories:a,selectedCategories:s,...l}){const{config:u,attachmentCategories:f}=bn(),d=a??f,p=s??u.selectedCategories,h=g.useCallback(m=>!!p&&p.indexOf(m)!==-1,[p]);return t?!d||d.length<=0?c.jsx("p",{children:"No Attachments"}):c.jsx(et,{className:n,title:e,hint:o,...l,children:c.jsx("div",{className:"category-attachments",children:d.map(m=>c.jsx(vt,{id:m,name:m,align:"right",label:m,readOnly:r,disabled:i,defaultChecked:h(m)},m))})}):null}function fb({className:t,title:n,hint:e,showField:o=!0,showJiraTicketField:r,jiraTicketLabel:i="Create Jira Ticket",showSendEmailField:a,sendEmailLabel:s="Send Email",readOnly:l=!1,disabled:u,...f}){const d=de("io-block-list-gap",t),{config:p,showMailingList:h,setShowMailingList:m}=bn();if(!o)return null;const v=r??p.createJiraTicket,y=a??p.sendEmail;return c.jsxs(et,{className:d,hint:e,title:n,...f,children:[v&&c.jsx(vt,{id:"createJiraTicket",name:"createJiraTicket",label:i,align:"right",readOnly:l,disabled:u,defaultChecked:v}),y&&c.jsx(vt,{onChange:()=>{m(!h)},id:"sendEmail",name:"sendEmail",label:s,align:"right",readOnly:l,disabled:u,defaultChecked:y})]})}function pb({showField:t=!0,className:n,title:e="Email List",hint:o="Separate with commas or semicolons.",placeholder:r="john.doe@somedomain.com; jane.doe@otherdomain.com",readOnly:i,disabled:a,...s}){const{config:l,showMailingList:u}=bn(),f=t??l.sendEmail,d=i??l.allowEditRecipients===!1;return f&&u?c.jsx(et,{className:n,hint:o,...s,children:c.jsx(Fo,{id:"mailingList",name:"mailingList",label:e,placeholder:r,readOnly:d,disabled:a,defaultValue:l.mailingList??""})}):null}const Vh={Header:Xy,Body:Qy,Footer:eb,HeaderButtons:tb,FooterButtons:nb,SubmitButton:ob,CancelButton:rb,CloseButton:ib,IntroField:ab,DescriptionField:sb,TechInfoField:cb,EnvInfoField:lb,FileAttachmentsField:ub,CategoryAttachmentsField:db,SettingsField:fb,MailListField:pb},Yh=g.createContext(Vh),hb=g.memo(({children:t,components:n})=>{const e=g.useMemo(()=>({...Vh,...n}),[n]);return c.jsx(Yh.Provider,{value:e,children:t})});function qa(t){return{...g.useContext(Yh),...t}}hb.displayName="ComponentsStore";function Gh({className:t,title:n="General",...e}){const o=de("io-notifications-settings-panel-general",t),{AllowNotifications:r,AllowNotificationToasts:i,ShowNotificationBadge:a,CloseNotificationOnClick:s,PanelAutoHide:l,HideToastsAfter:u}=Wo(),f=ze();return c.jsx("div",{className:o,...e,children:c.jsxs(et,{title:n,children:[f&&c.jsx(r,{}),f&&c.jsx(i,{}),c.jsx(a,{}),f&&c.jsx(l,{}),f&&c.jsx(s,{}),f&&c.jsx(u,{})]})})}var at=new class{constructor(){Lt(this,"subscribed",!1);Lt(this,"io");Lt(this,"registry",Zy());Lt(this,"logger");Lt(this,"isPanelVisible");Lt(this,"notifications",[]);Lt(this,"bulkActionsSupported",!1)}init(t){var r,i,a,s;if(this.subscribed)return;this.subscribed=!0,this.io=t,this.logger=this.io.logger.subLogger("notifications");const n=this.io.appManager.myApplication,e=((i=(r=n==null?void 0:n.userProperties)==null?void 0:r.logger)==null?void 0:i.publishLevel)??"error",o=((s=(a=n==null?void 0:n.userProperties)==null?void 0:a.logger)==null?void 0:s.consoleLevel)??"info";this.logger.publishLevel(e),this.logger.consoleLevel(o),this.logger.info("===== IO Notifications v.0.9.0 ====="),this.getBulkActionsSupport(),this.subscribe()}onPanelVisibilityChanged(t){return this.registry.add("on-panel-visibility-changed",t)}onConfigurationChanged(t){return this.registry.add("on-configuration-changed",t)}onNotificationsChanged(t){return this.registry.add("on-notifications-changed",t)}onCounterChanged(t){return this.registry.add("on-counter-changed",t)}async getNotificationsList(){var n;const t=await((n=this.io)==null?void 0:n.notifications.list());if(!t)throw new Error("io.notifications.list is not supported in this environment.");return t.map(e=>this.attachHandlers(e))}async getConfiguration(){if(this.io)return await this.io.notifications.getConfiguration();throw new Error("io.notifications.getConfiguration is not supported in this environment.")}showPanel(){var t;if(this.isDesktopEnvironment())return(t=this.io)==null?void 0:t.notifications.panel.show()}hidePanel(){var t;if(this.isDesktopEnvironment())return(t=this.io)==null?void 0:t.notifications.panel.hide()}clearAll(){var t,n;return(t=this.logger)==null||t.trace("clearing all notifications"),(n=this.io)==null?void 0:n.notifications.clearAll()}clearAllOld(){var t,n;return(t=this.logger)==null||t.trace("clearing all old notifications"),(n=this.io)==null?void 0:n.notifications.clearOld()}clearMany(t){var n,e,o,r;return typeof((n=this.io)==null?void 0:n.notifications).clearMany=="function"?t.length<1?((e=this.logger)==null||e.trace("no ids provided to clear notifications"),Promise.resolve()):((o=this.logger)==null||o.trace(`clearing notifications with ids ${JSON.stringify(t.join(", "))}`),((r=this.io)==null?void 0:r.notifications).clearMany(t)):Promise.reject(new Error("Bulk actions are not supported in this environment"))}close(t){var n,e;return(n=this.logger)==null||n.trace(`closing notification with id ${t}`),(e=this.io)==null?void 0:e.notifications.clear(t)}snooze(t,n){var e,o;return(e=this.logger)==null||e.trace(`snoozing notification with id ${t} for ${n}ms`),(o=this.io)==null?void 0:o.notifications.snooze(t,n)}snoozeMany(t,n){var e,o,r,i;return typeof((e=this.io)==null?void 0:e.notifications).snoozeMany=="function"?t.length<1?((o=this.logger)==null||o.trace("no ids provided to snooze notifications"),Promise.resolve()):((r=this.logger)==null||r.trace(`snoozing notifications with ids ${JSON.stringify(t.join(", "))} for ${n}ms`),((i=this.io)==null?void 0:i.notifications).snoozeMany(t,n)):Promise.reject(new Error("Bulk actions are not supported in this environment"))}setState(t,n){var e,o;return(e=this.logger)==null||e.trace(`setting state of ${t} to ${n}`),(o=this.io)==null?void 0:o.notifications.setState(t,n)}setStates(t,n){var e,o,r,i;return typeof((e=this.io)==null?void 0:e.notifications).setStates=="function"?t.length<1?((o=this.logger)==null||o.trace(`no ids provided to change state to ${n} for notifications`),Promise.resolve()):((r=this.logger)==null||r.trace(`setting state of ${JSON.stringify(t.join(", "))} to ${n}`),((i=this.io)==null?void 0:i.notifications).setStates(t,n)):Promise.reject(new Error("Bulk actions are not supported in this environment"))}getBulkActionsSupport(){var n,e,o;const t=typeof((n=this.io)==null?void 0:n.notifications).clearMany=="function"&&typeof((e=this.io)==null?void 0:e.notifications).setStates=="function"&&typeof((o=this.io)==null?void 0:o.notifications).snoozeMany=="function";this.bulkActionsSupported=t}setFilter(t){var n,e;return(n=this.logger)==null||n.trace(`setting filter to ${JSON.stringify(t)}`),(e=this.io)==null?void 0:e.notifications.setFilter(t)}configure(t){var n;return(n=this.io)==null?void 0:n.notifications.configure(t)}subscribe(){var t,n,e,o,r,i,a;(t=this.io)==null||t.notifications.onRaised(s=>{var l;(l=this.logger)==null||l.trace(`received event indicating notification raise: ${JSON.stringify(s)}`),this.attachHandlers(s),this.notifications.unshift(s),this.registry.execute("on-notifications-changed",[...this.notifications])}),(n=this.io)==null||n.notifications.onStateChanged(({id:s},l)=>{var u;(u=this.logger)==null||u.trace(`received event for notification state is changed - "${s}" - "${l==null?void 0:l.toString()}"`),this.notifications=this.notifications.map(f=>{var d;return f.id===s?((d=this.logger)==null||d.trace(`${f.id} - the state is changed from "${f.state}" to "${l==null?void 0:l.toString()}"`),Object.assign(f,{state:l})):f}),this.registry.execute("on-notifications-changed",this.notifications)}),(e=this.io)!=null&&e.notifications&&"onDataChanged"in this.io.notifications&&typeof this.io.notifications.onDataChanged=="function"&&((o=this.io)==null||o.notifications.onDataChanged((s,l)=>{var f;const u=s.id;(f=this.logger)==null||f.trace(`received event for notification data is changed - "${u}" - "${JSON.stringify(l)}"`),this.notifications=this.notifications.map(d=>{var p;return d.id===u?((p=this.logger)==null||p.trace(`${d.id} - the data is changed from "${JSON.stringify(d.data)}" to "${JSON.stringify(l)}"`),Object.assign(d,{data:l})):d}),this.registry.execute("on-notifications-changed",this.notifications)})),(r=this.io)==null||r.notifications.onClosed(({id:s})=>{var l;(l=this.logger)==null||l.trace(`received event for notification is closed - "${s}".`),this.notifications=this.notifications.filter(u=>u.id!==s),this.registry.execute("on-notifications-changed",this.notifications)}),(i=this.io)==null||i.notifications.onConfigurationChanged(s=>{var l;(l=this.logger)==null||l.trace(`received event for configuration changed - ${JSON.stringify(s)}.`),this.registry.execute("on-configuration-changed",s)}),this.isDesktopEnvironment()&&((a=this.io)==null||a.notifications.panel.onVisibilityChanged(s=>{var l;(l=this.logger)==null||l.trace(`received event for panel visibility changed to "${s}".`),this.isPanelVisible=s,this.registry.execute("on-panel-visibility-changed",s)}))}isDesktopEnvironment(){return typeof window=="object"&&(!!window.iodesktop||!!window.glue42gd)}attachHandlers(t){var e;return(e=t.actions)==null||e.forEach(o=>{Object.assign(o,{onClick:async r=>{var i,a,s;try{(i=this.logger)==null||i.info(`${t.id}/${o.action} - was clicked.`),await((a=this.io)==null?void 0:a.notifications.click(t.id,o.action,r))}catch(l){(s=this.logger)==null||s.error("Error while clicking on action:",l)}}})}),Object.assign(t,{snooze:async(o=1e4)=>{var r,i;(r=this.logger)==null||r.trace(`${t.id} - request to change the state from ${t.state} to Snoozed with duration ${o}ms`),await((i=this.io)==null?void 0:i.notifications.snooze(t.id,o))},updateState:async o=>{var r,i;return(r=this.logger)==null||r.trace(`${t.id} - request to change the state from ${t.state} to ${o}`),(i=this.io)==null?void 0:i.notifications.setState(t.id,o)},updateData:async o=>{var r,i;(r=this.logger)==null||r.trace(`${t.id} - request to change the data to ${JSON.stringify(o)}`),(i=this.io)!=null&&i.notifications&&"updateData"in this.io.notifications&&typeof this.io.notifications.updateData=="function"?await this.io.notifications.updateData(t.id,o):console.log("'updateData' method is not supported")},onClick:async o=>{var r,i,a;try{(r=this.logger)==null||r.info(`${t.id} - was clicked.`),await((i=this.io)==null?void 0:i.notifications.click(t.id,void 0,o))}catch(s){(a=this.logger)==null||a.error(`Error while clicking on Notification: ${t.id}`,s)}},onShow:()=>{},close:async()=>{var o;return(o=this.logger)==null||o.info(`${t.id} - was closed.`),this.close(t.id)}})}};function Il(t){const n=g.useContext(_e.IOConnectContext),e=n==null?void 0:n.appManager,o=ze(),[r,i]=g.useState([]),[a,s]=g.useState(0),l="Platform",u=g.useCallback((p="asc")=>{if(o===null)return[];const h=[...r].sort((m,v)=>{const y=(m.title??m.name).toLowerCase(),w=(v.title??v.name).toLowerCase();return p==="asc"?y.localeCompare(w):w.localeCompare(y)});if(!o){const m=h.findIndex(v=>v.name===l);if(m!==-1){const[v]=h.splice(m,1);h.unshift(v)}}return h},[r,o]),f=g.useMemo(()=>u("asc"),[u]),d=g.useMemo(()=>u("desc"),[u]);return g.useEffect(()=>{if(o===null||o)return;const p={title:"System",name:l,hidden:!1,userProperties:{hidden:!1}};i(h=>h.some(m=>m.name===p.name)?h:[...h,p])},[o]),g.useEffect(()=>{if(!e)return;const p=e.onAppAdded(v=>{i(y=>[...y,{title:v.title,name:v.name,hidden:v.hidden,userProperties:v.userProperties}])}),h=e.onAppRemoved(v=>{i(y=>y.filter(w=>w.name!==v.name))}),m=e.onAppChanged(v=>{i(y=>{const w=y.find(k=>k.name===v.name);return[...y.filter(k=>k.name!==v.name),{title:v.title,name:w==null?void 0:w.name,hidden:w==null?void 0:w.hidden,allowed:w==null?void 0:w.allowed,userProperties:w==null?void 0:w.userProperties}]})});return()=>{p(),h(),m()}},[e]),{apps:g.useMemo(()=>{if(!(t!=null&&t.sourceFilter)||!Array.isArray(r))return r;const{allowed:p=[],blocked:h=[]}=t.sourceFilter,m=p.includes("*"),v=h.includes("*");let y=0;const w=r.map(k=>{const x=m||p.includes(k.name),b=!v&&x;return b&&y++,{...k,allowed:b}});return s(y),w},[t,r]),allowedApps:a,sortedAppsAsc:f,sortedAppsDesc:d,sortAppsAlphabetically:u}}function Kh(t,n,e){var r;return{notificationStacks:g.useMemo(()=>{var u,f,d,p;if(!n.toastStacking)return[];const i=(a=n.stackBy)==="application"?"source":a==="severity"?"severity":"source";var a;const s=t.filter(h=>h.state==="Active"),l=new Map;for(const h of s){const m=h[i]??"";if(h.source&&((f=(u=e==null?void 0:e.sourceFilter)==null?void 0:u.muted)!=null&&f.includes(h.source))||(p=(d=e==null?void 0:e.sourceFilter)==null?void 0:d.muted)!=null&&p.includes("*"))continue;l.has(m)||l.set(m,{key:m,items:[]});const v=l.get(m);v&&v.items.unshift(h)}return Array.from(l.values()).filter(h=>h.items.some(m=>m.state==="Active"||m.state==="Stale"))},[t,n.toastStacking,n.stackBy,(r=e==null?void 0:e.sourceFilter)==null?void 0:r.muted])}}function Zh(t){const[n,e]=g.useState([]);return{selectedNotifications:n,selectNotification:(o,r)=>{const i=n;e(r?[...i,o]:i.filter(a=>a!==o))},selectAllNotifications:(o,r)=>{if(r){let i=[];switch(o){case"read":i=t.filter(a=>a.state==="Acknowledged"||a.state==="Seen").map(a=>a.id);break;case"unread":i=t.filter(a=>a.state==="Active"||a.state==="Stale").map(a=>a.id);break;case"snoozed":i=t.filter(a=>a.state==="Snoozed").map(a=>a.id);break;default:i=t.map(a=>a.id)}e(i)}else e([])}}}const kd=t=>{var n,e;return{enabledNotifications:t.enable,enabledToasts:t.enableToasts,toastStacking:((n=t.toasts)==null?void 0:n.mode)==="stacked",stackBy:(e=t.toasts)==null?void 0:e.stackBy,toastExpiry:t.toastExpiry,showNotificationBadge:t.showNotificationBadge,placement:t.placement,snooze:t.snooze,closeNotificationOnClick:t.closeNotificationOnClick,autoHidePanel:t.autoHidePanel}},Ed=t=>Array.from(t.reduce((n,e)=>n.set(e.id,e),new Map).values());function mb(){const t=g.useContext(_e.IOConnectContext),[n,e]=g.useState({}),[o,r]=g.useState({}),[i,a]=g.useState([]),[s,l]=g.useState(0),[u,f]=g.useState(!0),{apps:d,allowedApps:p}=Il(n),{notificationStacks:h}=Kh(i,{toastStacking:o.toastStacking??!1,stackBy:o.stackBy??"source"},{sourceFilter:n.sourceFilter}),{selectedNotifications:m,selectNotification:v,selectAllNotifications:y}=Zh(i);at.init(t),g.useEffect(()=>{(async()=>{await(async()=>{try{const x=await at.getConfiguration();e(x),r(b=>({...b,...kd(x)}))}catch(x){console.error("Error fetching configuration:",x)}})(),await(async()=>{try{const x=await at.getNotificationsList();a(Ed(x))}catch(x){console.error("Error fetching notifications:",x)}})()})().catch(x=>{console.error("Error in useNotifications fetch:",x)}),w()},[]),g.useEffect(()=>{const x=at.onNotificationsChanged(j=>{a(Ed(j))}),b=at.onConfigurationChanged(j=>{const B=kd(j);e(F=>({...F,...j})),r(F=>({...F,...B}))}),E=at.onCounterChanged(j=>{l(j)});return()=>{x(),b(),E()}},[]);const w=()=>{f(at.bulkActionsSupported)},k=async x=>{await at.setFilter(x)};return{close:x=>at.close(x),clearAll:()=>at.clearAll(),settings:o,hidePanel:async()=>{await at.hidePanel()},showPanel:async()=>{await at.showPanel()},saveFilter:k,clearAllOld:()=>at.clearAllOld(),saveSetting:async x=>{const b=((E,j)=>{const B=(D=>({enabledNotifications:T=>({enable:T}),enabledToasts:T=>({enableToasts:T}),toastStacking:T=>{var P;return{toasts:{mode:T?"stacked":"single",stackBy:(P=D.toasts)==null?void 0:P.stackBy}}},stackBy:T=>{var P;return{toasts:{mode:(P=D.toasts)==null?void 0:P.mode,stackBy:T}}},showNotificationBadge:T=>({showNotificationBadge:T}),toastExpiry:T=>({toastExpiry:T}),placement:T=>({placement:T}),snooze:T=>({snooze:T}),closeNotificationOnClick:T=>({closeNotificationOnClick:T}),autoHidePanel:T=>({autoHidePanel:T})}))(j),F=Object.keys(E)[0],L=E[F];return F&&L!==void 0&&B[F]?B[F](L):{}})(x,n);b&&await at.configure(b)},allApps:d,saveAllFilter:async x=>{"subscribe"in x?await k({allowed:x.subscribe?["*"]:[],blocked:x.subscribe?[]:["*"]}):"mute"in x&&await k({muted:x.mute?["*"]:[]})},configuration:n,notifications:i,notificationStacks:h,notificationsCount:s,allApplications:n.allApplications??0,allowedApplications:p,isBulkActionsSupported:u,selectedNotifications:m,selectNotification:v,selectAllNotifications:y,clearMany:async x=>{await at.clearMany(x)},snooze:async(x,b)=>{await at.snooze(x,b)},snoozeMany:async(x,b)=>{await at.snoozeMany(x,b)},setState:async(x,b)=>{await at.setState(x,b)},setStates:async(x,b)=>{await at.setStates(x,b)},setCount:x=>{l(x)},getNotificationsList:async()=>await at.getNotificationsList()}}const qh=g.createContext({allApps:[],settings:{},configuration:{},notifications:[],notificationsCount:0,onClose:()=>{},allApplications:0,clearAll:()=>{},showPanel:()=>{},hidePanel:()=>{},saveFilter:()=>{},clearAllOld:()=>{},notificationStacks:[],saveSetting:()=>{},allowedApplications:0,saveAllFilter:()=>{},isBulkActionsSupported:!1,selectedNotifications:[],selectNotification:()=>{},selectAllNotifications:()=>{},clearMany:()=>{},snooze:()=>{},snoozeMany:()=>{},setState:()=>{},setStates:()=>{},setCount:()=>{}}),Te=()=>g.useContext(qh);function Jh({label:t="Allow notifications",align:n="right",...e}){const{settings:o,saveSetting:r}=Te(),i=ze(),a=g.useCallback(s=>{r({enabledNotifications:s.target.checked})},[r]);return i?c.jsx(vt,{label:t,align:n,onChange:a,checked:o.enabledNotifications??!1,...e}):null}function Xh({label:t="Allow notification toasts",align:n="right",...e}){const{settings:o,saveSetting:r}=Te(),i=ze(),a=i&&!o.enabledNotifications,s=g.useCallback(l=>{r({enabledToasts:l.target.checked})},[r]);return i?c.jsx(vt,{label:t,align:n,onChange:s,checked:o.enabledToasts??!1,disabled:a,...e}):null}function Qh({label:t="Show notification badge",align:n="right",...e}){const{settings:o,saveSetting:r}=Te(),i=ze()&&!o.enabledNotifications,a=g.useCallback(s=>{r({showNotificationBadge:s.target.checked})},[r]);return c.jsx(vt,{label:t,align:n,onChange:a,checked:o.showNotificationBadge??!1,disabled:i,...e})}function em({label:t="Close notification on click",align:n="right",...e}){const{settings:o,saveSetting:r}=Te(),i=ze(),a=i&&!o.enabledNotifications,s=g.useCallback(l=>{r({closeNotificationOnClick:l.target.checked})},[r]);return i?c.jsx(vt,{label:t,align:n,onChange:s,checked:o.closeNotificationOnClick??!1,disabled:a,...e}):null}function tm({label:t="Auto hide panel",align:n="right",...e}){const{settings:o,saveSetting:r}=Te(),i=ze(),a=g.useCallback(s=>{r({autoHidePanel:s.target.checked})},[r]);return i?c.jsx(vt,{label:t,align:n,onChange:a,checked:o.autoHidePanel??!1,...e}):null}const jd=(t,n)=>t?`${t} ${n}${t!==1?"s":""}`:"",va=t=>{const n=Math.floor(t/60),e=t%60,o=jd(n,"minute"),r=jd(e,"second");return o+(o&&r?" ":"")+r};function nm({className:t,title:n="Hide toasts after",items:e=[15,30,45,60],...o}){const r=de("flex","jc-between","ai-center",t),{settings:i,saveSetting:a}=Te(),s=ze(),l=s&&!i.enabledNotifications,u=g.useCallback((f=15e3)=>{i.toastExpiry!==f&&a({toastExpiry:1e3*f})},[i.toastExpiry,a]);return s?c.jsxs("div",{className:r,...o,children:[c.jsx("div",{className:"io-text-clipper "+(l?"io-text-disabled":""),children:c.jsx("span",{children:n})}),c.jsxs(xe,{variant:"light",disabled:l,children:[c.jsx(xe.Button,{text:va((i.toastExpiry??0)/1e3)}),c.jsx(xe.Content,{children:c.jsx(xe.List,{variant:"single",children:e.map(f=>c.jsx(xe.Item,{onClick:()=>{u(f)},children:va(f)},f))})})]})]}):null}function om({className:t,title:n="Stacking",...e}){const o=de("io-notifications-settings-panel-stacking",t),{ToastStacking:r,ToastStackBy:i}=Wo();return ze()?c.jsx("div",{className:o,...e,children:c.jsxs(et,{title:n,children:[c.jsx(r,{}),c.jsx(i,{})]})}):null}function rm({label:t="Allow toast stacking",align:n="right",...e}){const{settings:o,saveSetting:r}=Te(),i=ze(),a=i&&!o.enabledNotifications,s=g.useCallback(l=>{r({toastStacking:l.target.checked})},[r]);return i?c.jsx(vt,{label:t,align:n,onChange:s,checked:o.toastStacking??!1,disabled:a,...e}):null}const _c={application:"Application",severity:"Priority"},gb=Object.fromEntries(Object.entries(_c).map(([t,n])=>[n,t]));function im({className:t,title:n="Group by",...e}){const o=de("flex","jc-between","ai-center",t),{settings:r,saveSetting:i}=Te(),a=ze(),s=a&&!r.enabledNotifications,l=g.useCallback((f="severity")=>{r.stackBy!==f&&i({stackBy:f.toLowerCase()})},[r.stackBy,i]);if(!a)return null;const u=Object.values(_c);return c.jsxs("div",{className:o,...e,children:[c.jsx("div",{className:de("io-text-clipper",{"io-text-disabled":s}),children:c.jsx("span",{children:n})}),c.jsxs(xe,{variant:"light",disabled:s,children:[c.jsx(xe.Button,{text:_c[r.stackBy??"severity"]}),c.jsx(xe.Content,{children:c.jsx(xe.List,{variant:"single",children:u.map(f=>c.jsx(xe.Item,{onClick:()=>{const d=gb[f];l(d)},children:f},f))})})]})]})}function am({className:t,title:n="Placement",...e}){const o=de("io-notifications-settings-panel-placement",t),{PlacementPanel:r,PlacementToasts:i}=Wo();return ze()?c.jsx("div",{className:o,...e,children:c.jsxs(et,{title:n,children:[c.jsx(r,{}),c.jsx(i,{})]})}):null}const sm=t=>t.replace(/(^|-)\w/g,n=>n.toUpperCase().replace("-"," "));function cm({className:t,title:n="Panel position",...e}){var l,u;const o=de("flex","jc-between","ai-center",t),{settings:r,saveSetting:i}=Te(),a=ze(),s=g.useCallback(f=>{var d;f||(f="right"),((d=r.placement)==null?void 0:d.panel)!==f&&i({placement:{...r.placement,panel:f.toLowerCase()}})},[r.placement,i]);return a?c.jsxs("div",{className:o,...e,children:[c.jsx("div",{className:"io-text-clipper",children:c.jsx("span",{children:n})}),c.jsxs(xe,{variant:"light",children:[c.jsx(xe.Button,{text:(l=r.placement)!=null&&l.panel?sm((u=r.placement)==null?void 0:u.panel):"Right"}),c.jsx(xe.Content,{children:c.jsx(xe.List,{variant:"single",children:["Right","Left"].map(f=>c.jsx(xe.Item,{onClick:()=>{s(f)},children:f},f))})})]})]}):null}function lm({className:t,title:n="Toasts position",...e}){var l,u;const o=de("flex","jc-between","ai-center",t),{settings:r,saveSetting:i}=Te(),a=ze(),s=g.useCallback(f=>{var p;if(f||(f="bottom-right"),((p=r.placement)==null?void 0:p.toasts)===f)return;const d=f.replace(/\s+/g,"-").toLowerCase();i({placement:{...r.placement,toasts:d}})},[r.placement,i]);return a?c.jsxs("div",{className:o,...e,children:[c.jsx("div",{className:"io-text-clipper",children:c.jsx("span",{children:n})}),c.jsxs(xe,{variant:"light",children:[c.jsx(xe.Button,{text:(l=r.placement)!=null&&l.toasts?sm((u=r.placement)==null?void 0:u.toasts):"Bottom Right"}),c.jsx(xe.Content,{children:c.jsx(xe.List,{variant:"single",children:["Top Right","Top Left","Bottom Right","Bottom Left"].map(f=>c.jsx(xe.Item,{onClick:()=>{s(f)},children:f},f))})})]})]}):null}function um({className:t,title:n="Snooze",...e}){var a;const o=de("io-notifications-settings-panel-snooze",t),{SnoozeDuration:r}=Wo(),{settings:i}=Te();return ze()&&((a=i.snooze)!=null&&a.enabled)?c.jsx("div",{className:o,...e,children:c.jsx(et,{title:n,children:c.jsx(r,{})})}):null}function dm({className:t,title:n="Default duration",items:e=[60,120,180,300],...o}){var f,d;const r=de("flex","jc-between","ai-center",t),{settings:i,saveSetting:a}=Te(),s=ze(),l=s&&!i.enabledNotifications,u=g.useCallback((p=6e4)=>{var h;i.snooze&&((h=i.snooze)==null?void 0:h.duration)!==p&&a({snooze:{...i.snooze,duration:1e3*p}})},[i.snooze,a]);return s&&((f=i.snooze)!=null&&f.enabled)?c.jsxs("div",{className:r,...o,children:[c.jsx("div",{className:de("io-text-clipper",{"io-text-disabled":l}),children:c.jsx("span",{children:n})}),c.jsxs(xe,{variant:"light",disabled:l,children:[c.jsx(xe.Button,{text:va((((d=i.snooze)==null?void 0:d.duration)??0)/1e3)}),c.jsx(xe.Content,{children:c.jsx(xe.List,{variant:"single",children:e.map(p=>c.jsx(xe.Item,{onClick:()=>{u(p)},children:va(p)},p))})})]})]}):null}function fm({className:t,title:n,...e}){const o=de("io-notifications-settings-panel-subscriptions",t),{SubscribeAll:r,SubscribeApp:i,SubscribeMuteAll:a,SubscribeMuteApp:s}=Wo(),{sortAppsAlphabetically:l}=Il(),u=ze(),f=l(),d="io-notifications-subscriptions-grid "+(u?"with-three-columns":"with-two-columns");return c.jsx("div",{className:o,...e,children:c.jsxs(et,{title:n??(u?"Subscribe & Mute":"Subscribe"),children:[c.jsxs("div",{className:d,children:[c.jsx("p",{className:"io-text-section",children:"Sources"}),c.jsx("p",{className:"io-text-section",children:"Subscribe"}),u&&c.jsx("p",{className:"io-text-section",children:"Mute"})]}),c.jsxs("div",{className:d,children:[c.jsx("p",{children:"All Sources"}),c.jsx(r,{label:""}),u&&c.jsx(a,{label:""})]}),f.map(p=>{var h;return!p||p.hidden||(h=p==null?void 0:p.userProperties)!=null&&h.hidden?null:c.jsxs("div",{className:d,children:[c.jsx("p",{children:p.title??p.name}),c.jsx(i,{app:p,label:""}),u&&c.jsx(s,{app:p,label:""})]},p.name)})]})})}function pm({label:t="All apps",align:n="right",...e}){var l,u,f,d;const{settings:o,configuration:r,saveAllFilter:i}=Te(),a=ze()&&!o.enabledNotifications,s=g.useCallback(p=>{i({subscribe:p.target.checked})},[i]);return c.jsx(vt,{align:n,label:t,onChange:s,checked:(((u=(l=r.sourceFilter)==null?void 0:l.allowed)==null?void 0:u.includes("*"))&&((d=(f=r.sourceFilter)==null?void 0:f.blocked)==null?void 0:d.length)===0)??!1,disabled:a,...e})}function hm({label:t="App",align:n="right",app:e,...o}){var f,d,p,h,m,v;const{allApps:r,settings:i,configuration:a,saveFilter:s}=Te(),l=ze()&&!i.enabledNotifications,u=g.useCallback((y,w)=>{var b,E,j,B,F,L;const k={...a.sourceFilter},x=(b=k.allowed)==null?void 0:b.indexOf("*");typeof x=="number"&&x>-1&&((E=k.allowed)==null||E.splice(x,1),r.forEach(D=>{var T;D.name!==w.name&&((T=k.allowed)==null||T.push(D.name))})),y?(k.allowed=[...new Set([...k.allowed??[],w.name])],k.blocked=(j=k.blocked)==null?void 0:j.filter(D=>D!==w.name)):(k.allowed=(B=k.allowed)==null?void 0:B.filter(D=>D!==w.name),k.blocked=[...new Set([...k.blocked??[],w.name])]),(F=k.allowed)!=null&&F.length&&((L=k.blocked)!=null&&L.includes("*"))&&k.blocked.splice(k.blocked.indexOf("*"),1),s(k)},[r,a.sourceFilter,s]);return c.jsx(vt,{id:e.name,label:t,align:n,onChange:y=>u(y.target.checked,e),checked:(((d=(f=a.sourceFilter)==null?void 0:f.allowed)==null?void 0:d.includes("*"))&&!((h=(p=a.sourceFilter)==null?void 0:p.blocked)!=null&&h.includes(e.name))||((v=(m=a.sourceFilter)==null?void 0:m.allowed)==null?void 0:v.includes(e.name)))??!1,disabled:l,...o})}function mm({label:t="Mute all",align:n="right",...e}){var u,f,d,p;const{settings:o,configuration:r,saveAllFilter:i}=Te(),a=ze(),s=a&&(!o.enabledNotifications||((f=(u=r.sourceFilter)==null?void 0:u.allowed)==null?void 0:f.indexOf("*"))===-1),l=g.useCallback(h=>{i({mute:h.target.checked})},[i]);return a?c.jsx(vt,{align:n,label:t,onChange:l,checked:((p=(d=r.sourceFilter)==null?void 0:d.muted)==null?void 0:p.includes("*"))??!1,disabled:s??!1,...e}):null}function gm({label:t="App",align:n="right",app:e,...o}){var d,p,h,m,v,y,w,k,x,b,E,j,B,F,L,D;const{allApps:r,settings:i,configuration:a,saveFilter:s}=Te(),l=ze(),u=l&&(!i.enabledNotifications||((p=(d=a.sourceFilter)==null?void 0:d.blocked)==null?void 0:p.includes("*"))||((m=(h=a.sourceFilter)==null?void 0:h.blocked)==null?void 0:m.includes(e.name))||((y=(v=a.sourceFilter)==null?void 0:v.allowed)==null?void 0:y.length)===0||((k=(w=a.sourceFilter)==null?void 0:w.allowed)==null?void 0:k.indexOf(e.name))===-1&&((b=(x=a.sourceFilter)==null?void 0:x.allowed)==null?void 0:b.indexOf("*"))===-1&&((j=(E=a.sourceFilter)==null?void 0:E.blocked)==null?void 0:j.length)===0),f=g.useCallback((T,P)=>{var z,ee,q,ie;const re={...a.sourceFilter},ae=(z=re==null?void 0:re.muted)==null?void 0:z.indexOf("*");typeof ae=="number"&&ae>-1&&((ee=re.muted)==null||ee.splice(ae,1),r.forEach(J=>{var W;J.name===P.name||J.hidden||((W=re.muted)==null||W.push(J.name))})),T?(q=re.muted)==null||q.push(P.name):re.muted=(ie=re.muted)==null?void 0:ie.filter(J=>J!==P.name),s(re)},[r,a.sourceFilter,s]);return!l||e.hidden?null:c.jsx(vt,{id:e.name,label:t,align:n,onChange:T=>f(T.target.checked,e),checked:(((F=(B=a.sourceFilter)==null?void 0:B.muted)==null?void 0:F.includes("*"))||((D=(L=a.sourceFilter)==null?void 0:L.muted)==null?void 0:D.includes(e.name)))??!1,disabled:u??!1,...o})}const vm={Body:t=>{const{General:n,Placement:e,Stacking:o,Snooze:r,Subscriptions:i}=Wo();return c.jsxs($o,{element:mr,elementProps:t,children:[c.jsx(n,{}),c.jsx(o,{}),c.jsx(e,{}),c.jsx(r,{}),c.jsx(i,{})]})},General:Gh,AllowNotifications:Jh,AllowNotificationToasts:Xh,ShowNotificationBadge:Qh,CloseNotificationOnClick:em,PanelAutoHide:tm,HideToastsAfter:nm,Stacking:om,ToastStacking:rm,ToastStackBy:im,Placement:am,PlacementPanel:cm,PlacementToasts:lm,Snooze:um,SnoozeDuration:dm,Subscriptions:fm,SubscribeAll:pm,SubscribeApp:hm,SubscribeMuteAll:mm,SubscribeMuteApp:gm},ym=g.createContext(vm),Pl=g.memo(({children:t,components:n})=>{const e=g.useMemo(()=>({...vm,...n}),[n]);return c.jsx(ym.Provider,{value:e,children:t})});Pl.displayName="NotificationsSettingsPanelComponentsStoreProvider";const Wo=()=>g.useContext(ym),vb=({className:t,onClose:n,title:e="Notification Settings",...o})=>{const{Body:r}=Wo();return c.jsxs(qe,{className:de("io-notifications-settings-panel",t),"data-testid":"notifications-settings-panel",...o,children:[c.jsxs(qe.Header,{children:[c.jsx(qe.Header.Title,{size:"large",text:e,tag:"h1"}),c.jsx(qe.Header.ButtonGroup,{children:c.jsx(qe.Header.ButtonIcon,{variant:"circle",icon:"close",size:"32",onClick:n})})]}),c.jsx(r,{})]})},Al=({components:t,...n})=>c.jsx(Pl,{components:t,children:c.jsx(vb,{...n})});function yb({isOpen:t,onClose:n,container:e}){return t?oo.createPortal(c.jsx(Al,{onClose:n}),e??document.querySelector("#root")??document.body):null}const bm=g.createContext({searchQuery:"",setSearch:()=>{},isPanelVisible:!1,sortNotificationsBy:"newest",setSortBy:()=>{},viewNotificationsBy:"all",setViewBy:()=>{},isBulkActionsVisible:!1,showBulkActions:()=>{},hideBulkActions:()=>{}}),Tt=()=>g.useContext(bm);function wm({title:t,onClose:n,onOpenSettings:e,...o}){const{HeaderCaptionTitle:r,HeaderCaptionCount:i,HeaderCaptionButtonSettings:a,HeaderCaptionButtonClose:s,HeaderActions:l,HeaderBulkActions:u,HeaderSearch:f}=Bo(),{isBulkActionsSupported:d,notificationsCount:p}=Te(),{isBulkActionsVisible:h}=Tt(),m=ze();return c.jsxs(no,{...o,children:[c.jsxs("div",{className:"io-panel-header-caption",children:[c.jsx(r,{title:t}),c.jsx(i,{}),c.jsxs(no.ButtonGroup,{children:[m&&c.jsx(a,{onClick:e}),c.jsx(s,{onClick:n})]})]}),c.jsx(f,{}),d?c.jsxs("div",{className:`io-panel-header-actions-wrapper ${h&&p>0?"io-panel-header-bulk-actions-opened":""} `,children:[c.jsx(l,{}),c.jsx(u,{})]}):c.jsx(l,{})]})}function xm({text:t="Notifications",counter:n,...e}){const{notificationsCount:o}=Te();return c.jsx(Nn,{text:t,size:"large",...e,children:(n??!0)&&c.jsxs("span",{children:["(",o,")"]})})}const Cm="newest",bb="oldest",wb="severity",Ds=["None","Low","Medium","High","Critical"],Od={key:Cm,descending:!0},Sm=t=>[...t].sort((n,e)=>(e.timestamp||0)-(n.timestamp||0)),km=t=>[...t].sort((n,e)=>(n.timestamp||0)-(e.timestamp||0)),Em=(t,n)=>{const e=Ds[0];return[...t].sort((o,r)=>{const i=Ds.indexOf(o.severity||e),a=Ds.indexOf(r.severity||e);return(n?-1:1)*(i-a)})},xb={[Cm]:Sm,[bb]:km,[wb]:Em},Cb={severity:"Priority",newest:"Newest",oldest:"Oldest"};function jm({...t}){const[n,e]=g.useState([]),{NotificationsList:o,Notification:r}=Bo(),{notifications:i,setCount:a,notificationsCount:s}=Te(),{sortNotificationsBy:l,viewNotificationsBy:u,searchQuery:f}=Tt(),d=g.useRef(null),p=th(f),h=g.useMemo(()=>((v,y)=>{if(!v)return[];switch(y){case"all":default:return v;case"unread":return v.filter(w=>w.state==="Active"||w.state==="Stale");case"read":return v.filter(w=>w.state==="Acknowledged"||w.state==="Seen");case"snoozed":return v.filter(w=>w.state==="Snoozed")}})(i,u).filter(v=>{var y,w;return v.title.toLowerCase().includes(p.toLowerCase())||((y=v.source)==null?void 0:y.toLowerCase().includes(p.toLowerCase()))||((w=v.body)==null?void 0:w.toLowerCase().includes(p.toLowerCase()))}),[p,i,u]);return g.useEffect(()=>{switch(l){case"newest":e(Sm(h));break;case"oldest":e(km(h));break;case"severity":e(Em(h,!0));break;default:e(h)}a(h.length)},[h,l,a]),g.useEffect(()=>{var m;d.current&&((m=d.current)==null||m.scrollTo({top:0,behavior:"smooth"}))},[p,s,l,u]),c.jsx($o,{ref:d,element:mr,elementProps:t,children:c.jsx(o,{notifications:n,Notification:r})})}function Om({...t}){const{FooterButtons:n}=Bo();return c.jsx(Xo,{...t,children:c.jsx(n,{})})}function Nm({className:t,...n}){const{FooterButtonClearAll:e,FooterButtonClearAllOld:o}=Bo(),{notifications:r}=Te(),[i,a]=g.useState(!1);return g.useEffect(()=>{r.filter(s=>s.state==="Stale"||s.state==="Acknowledged").length>0?a(!0):a(!1)},[r]),c.jsxs(Be,{className:t,align:"right",...n,children:[c.jsx(o,{disabled:!i}),c.jsx(e,{disabled:r.length<=0})]})}function Im({text:t="Clear All",...n}){const{clearAll:e}=Te();return c.jsx(Je,{text:t,onClick:()=>{e()},...n})}function Pm({text:t="Clear Old",...n}){const{clearAllOld:e}=Te();return c.jsx(Je,{text:t,onClick:()=>{e()},...n})}function Tl(t){const n=ze(),{onClose:e,settings:o}=Te(),{isPanelVisible:r}=Tt(),{id:i,onClick:a,updateState:s}=t,l=g.useCallback(async()=>{if(!a)return;if(!n){try{await a({close:!0})}catch(p){console.error(p)}return void e(i)}const f=(o==null?void 0:o.toastStacking)??!1;let d;d=r?(o==null?void 0:o.closeNotificationOnClick)??!0:!f&&null;try{d!==null?await a({close:d}):(await a({close:!1}),await s("Acknowledged"))}catch(p){console.error(p)}},[n,i,r,a,e,s,o==null?void 0:o.closeNotificationOnClick,o==null?void 0:o.toastStacking]),u=g.useCallback(async f=>{const d=f.target;d.closest("button")||d.closest("[role='button']")||d.closest("a")||d.closest(".io-dropdown-menu")||await l()},[l]);return{handleClick:l,handleWrapperClick:u}}function Am({className:t,notification:n,onClick:e,...o}){const r=de("io-notification-header",t),{HeaderCount:i,HeaderBadge:a,HeaderTitle:s,HeaderTimestamp:l,HeaderButtonSnooze:u,HeaderButtonClose:f}=Ja(),{handleWrapperClick:d}=Tl(n);return c.jsxs("div",{className:r,onClick:async p=>{await d(p),e==null||e(p)},...o,children:[c.jsx(a,{notification:n}),c.jsx(i,{notification:n}),c.jsx(s,{notification:n}),c.jsx(l,{notification:n}),c.jsxs(Be,{children:[c.jsx(u,{notification:n}),c.jsx(f,{notification:n})]})]})}function Tm({notification:t,...n}){const{settings:e,notificationStacks:o}=Te(),{isPanelVisible:r}=Tt(),{toastStacking:i,stackBy:a}=e,s=a==="application"?"source":a??"source";let l=0;if(i){const u=o.find(f=>f.key===t[s]);l=(u==null?void 0:u.items.length)??0}return r||!i||l<=1?null:c.jsx(Ma,{...n,children:l>9?"9+":l})}function Dm({className:t,notification:n,...e}){if(!(n!=null&&n.severity)||n.severity==="None")return null;const o=de("io-notification-header-badge",t);return c.jsx(Ma,{className:o,...e,children:n.severity})}function Mm({className:t,state:n,severity:e="None",icon:o,...r}){const i=de("io-notification-header-icon",t),{isPanelVisible:a}=Tt();return c.jsxs("div",{className:i,...r,children:[o&&c.jsx("span",{className:"io-notification-header-icon-image",children:c.jsx("img",{src:o,alt:`io-notification-header-icon-${o}`})}),c.jsx("span",{className:`io-notification-header-icon-badge color-${e.toLowerCase()}`,children:a&&n!=="Acknowledged"&&"New"})]})}function _m({className:t,notification:{appTitle:n},...e}){const o=de("io-notification-header-title",t);return c.jsx("div",{className:o,...e,children:n})}function Lm({className:t,notification:{timestamp:n,state:e,snooze:o},...r}){const i=de("io-notification-timestamp",t);return c.jsx("small",o&&e==="Snoozed"?{className:i,...r,children:"Snoozed"}:{className:i,...r,children:Dh(n??0)??"Just Now"})}function Rm({notification:{id:t,state:n},...e}){var a,s;const{settings:o,snooze:r}=Te(),i=g.useCallback(l=>{var u;l.stopPropagation(),r&&r(t,((u=o.snooze)==null?void 0:u.duration)??0)},[t,r,(a=o.snooze)==null?void 0:a.duration]);return r&&n!=="Snoozed"&&((s=o.snooze)!=null&&s.enabled)?c.jsx(Je,{icon:"snooze",variant:"link",text:"Snooze",tabIndex:-1,onClick:i,...e}):null}function Fm({notification:{id:t,updateState:n},...e}){const o=ze(),{onClose:r}=Te(),{isPanelVisible:i}=Tt(),a=g.useCallback(s=>{s.stopPropagation(),!o||i?r(t):n("Acknowledged").catch(console.error)},[o,t,r,i,n]);return c.jsx(Ge,{icon:"close",iconSize:"10",tabIndex:-1,onClick:a,...e})}function Bm({className:t,notification:n,...e}){const o=de("io-notification-body",t),{BodyIcon:r,BodyTitle:i,BodyDescription:a}=Ja(),{icon:s,title:l,body:u}=n,{handleClick:f}=Tl(n);return c.jsxs("div",{className:o,role:"button",tabIndex:0,onKeyDown:async d=>{ho(d)&&await f()},onClick:f,...e,children:[c.jsx(r,{icon:s}),c.jsxs("div",{className:"io-notification-body-content",children:[c.jsx(i,{text:l}),c.jsx(a,{text:u})]})]})}function Hm({className:t,icon:n,altText:e="notification icon",...o}){if(!n)return null;const r=de("io-notification-body-icon",t);return c.jsx("div",{className:r,...o,children:c.jsx("img",{src:n,alt:e})})}function $m({text:t,...n}){return c.jsx(Nn,{text:t,...n})}function Wm({className:t,text:n,...e}){const o=de("io-notification-body-description",t);return c.jsx("p",{className:o,...e,children:n})}function zm({className:t,notification:n}){const e=de("io-notification-footer",t),{FooterButton:o}=Ja(),{handleWrapperClick:r}=Tl(n),i=g.useMemo(()=>function(s){const l=[],u={};if(!s)return;s.forEach(d=>{var v;const{displayId:p,displayPath:h}=d,m={...d,children:[]};if(h&&h.length>0){let y;h.forEach((w,k)=>{var x;k===0?y=u[w]:y&&(y=(x=y.children)==null?void 0:x.find(b=>b.displayId===w))}),y&&((v=y.children)==null||v.push(m))}else p?(l.push(m),u[p]=m):l.push(m);p&&(u[p]=m)});const f=d=>{d.forEach(p=>{var h;((h=p.children)==null?void 0:h.length)===0?delete p.children:p.children&&f(p.children)})};return f(l),l}(n.actions),[n.actions]),a=(s,l)=>s.children?c.jsx(hn,{text:s.title,children:s.children.map(a)},`${s.title}-${l}`):((u,f)=>c.jsx(hn.Item,{children:c.jsx(o,{variant:"link",className:"io-dropdown-menu-item io-dropdown-menu-button",notificationAction:u})},`${u.title}-${f}`))(s,l);return c.jsx("div",{className:e,onClick:r,children:c.jsx(Be,{align:"right",children:i==null?void 0:i.map((s,l)=>s.children?c.jsxs(Be,{variant:"append",children:[c.jsx(o,{notificationAction:s,variant:l===0?"primary":"default"}),c.jsx(hn,{variant:l===0?"primary":"default",icon:"ellipsis",children:s.children.map(a)})]},`${s.title}-${l}`):c.jsx(o,{notificationAction:s,variant:l===0?"primary":"link"},`${s.title}-${l}`))})})}function Um({notificationAction:t,...n}){const e=g.useCallback(o=>{o.stopPropagation(),t.onClick({close:!0})},[t]);return c.jsx(Je,{text:t.title,onClick:e,...n})}const Vm={Header:Am,HeaderCount:Tm,HeaderBadge:Dm,HeaderIcon:Mm,HeaderTitle:_m,HeaderTimestamp:Lm,HeaderButtonSnooze:Rm,HeaderButtonClose:Fm,Body:Bm,BodyIcon:Hm,BodyTitle:$m,BodyDescription:Wm,Footer:zm,FooterButton:Um},Ym=g.createContext(Vm),Gm=g.memo(({children:t,components:n})=>{const e=g.useMemo(()=>({...Vm,...n}),[n]);return c.jsx(Ym.Provider,{value:e,children:t})});function Ja(t){return{...g.useContext(Ym),...t}}function Sb({className:t,notification:n,...e}){const{Header:o,Body:r,Footer:i}=Ja(),{severity:a}=n,s=de("io-notification",`severity-${(a==null?void 0:a.toLowerCase())??"none"}`,n.state!=="Acknowledged"&&"state-new",t);return c.jsxs("div",{className:s,...e,children:[c.jsx(o,{notification:n}),c.jsx(r,{notification:n}),c.jsx(i,{notification:n})]})}function Xa({components:t,notification:n,...e}){return c.jsx(Gm,{components:t,children:c.jsx(Sb,{notification:n,...e})})}function Km({className:t,notifications:n,...e}){const[o,r]=g.useState(!1),i=n.length>=3?"large":"normal",a=n.length===2?"small":i,s=n[0].severity,l=de("io-notification-stack",o&&"io-notification-stack-open",a!=="normal"&&[`io-notification-stack-${a}`],s&&s!=="None"&&[`io-notification-stack-${s.toLowerCase()}`],t),u=g.useCallback(()=>{r(!0)},[]),f=g.useCallback(d=>{d.stopPropagation(),n.forEach(p=>{p.close()})},[n]);return c.jsxs("div",{className:l,onClick:u,...e,children:[o&&a!=="normal"&&c.jsx("div",{className:"io-notification-stack-btn",children:c.jsx(Je,{icon:"close",onClick:d=>f(d),children:c.jsx("span",{className:"io-btn-text",children:"Clear Stack"})})}),n.map(d=>c.jsx(Xa,{notification:d},d.id))]})}function kb({...t}){const{notificationStacks:n}=Te();return c.jsx(c.Fragment,{children:n.map(e=>c.jsx(Km,{notifications:e.items,...t},e.key))})}Gm.displayName="ComponentsStoreProvider";const Eb=({notification:t,Notification:n,...e})=>{var h;const{configuration:o,isBulkActionsSupported:r,selectedNotifications:i,selectNotification:a}=Te(),{isPanelVisible:s,isBulkActionsVisible:l}=Tt(),u=((h=o.sourceFilter)==null?void 0:h.muted)??[],f=t.source&&u.includes(t.source)||u.includes("*");if(!s&&f)return null;const d=s&&r&&l,p=i.includes(t.id);return d?c.jsxs("div",{className:de("io-notification-list-bulk-action-item",{selected:p}),children:[c.jsx(Ya,{checked:p,onChange:m=>a(t.id,m.target.checked)}),c.jsx(n,{notification:t,...e})]}):c.jsx(n,{notification:t,...e})};function Dl({className:t,Notification:n,notifications:e=[],noNotificationText:o="No notifications to display",...r}){const i=de("io-notification-list",t),{settings:a}=Te(),{isPanelVisible:s}=Tt(),{toastStacking:l}=a,u=l&&!s,f=e.length>0;return c.jsxs("div",{className:i,...r,children:[u&&c.jsx(kb,{}),!u&&(f?e.map(d=>c.jsx(Eb,{notification:d,Notification:n,...r},d.id)):c.jsx("div",{className:"io-notification-list-no-notifications",children:o}))]})}const Zm={Header:wm,HeaderCaptionTitle:xm,HeaderCaptionCount:function({variant:t="primary",...n}){const{notificationsCount:e=0}=Te();return e===0?null:c.jsx(yv,{variant:t,...n,children:e>99?"99+":e})},HeaderCaptionButtonSettings:function({icon:t="cog",size:n="32",variant:e="circle",...o}){return ze()?c.jsx(Ge,{icon:t,size:n,variant:e,...o}):null},HeaderCaptionButtonClose:function({icon:t="close",size:n="32",variant:e="circle",onClick:o,...r}){const{hidePanel:i}=Te(),a=ze();return c.jsx(Ge,{icon:t,size:n,variant:e,onClick:s=>{o?o(s):a&&i()},...r})},HeaderActions:function({className:t,...n}){const e=de("io-panel-header-actions",t),{HeaderActionSort:o,HeaderActionView:r,HeaderActionClear:i,HeaderActionEdit:a}=Bo();return c.jsxs("div",{className:e,...n,children:[c.jsxs(Be,{children:[c.jsx(o,{}),c.jsx(r,{})]}),c.jsxs(Be,{children:[c.jsx(i,{}),c.jsx(a,{})]})]})},HeaderActionSort:function({text:t="Sort by",...n}){const{sortNotificationsBy:e,setSortBy:o}=Tt(),{onNotificationsSort:r}=(()=>{const{notifications:i}=Te(),[a,s]=g.useState(Od),{key:l,descending:u}=a,f=g.useMemo(()=>xb[l](i,u),[i,l,u]);return{onNotificationsSort:g.useCallback(p=>{s(h=>({key:p,descending:h.key!==p?Od.descending:!h.descending}))},[]),sortedNotifications:f}})();return c.jsxs(xe,{variant:"light",...n,children:[c.jsxs(xe.Button,{variant:"link",children:[t," ",c.jsx("strong",{children:Cb[e].toLowerCase()})]}),c.jsx(xe.Content,{children:c.jsx(xe.List,{variant:"single",checkIcon:"check",children:["Newest","Oldest","Priority"].map(i=>{const a=i==="Priority"?"severity":i.toLowerCase();return c.jsx(xe.Item,{isSelected:e===a,onClick:()=>{o(a),r(a)},children:i},i)})})})]})},HeaderActionView:function({text:t="View",...n}){var a;const{settings:e}=Te(),{viewNotificationsBy:o,setViewBy:r}=Tt(),i=(a=e.snooze)!=null&&a.enabled?["All","Read","Unread","Snoozed"]:["All","Read","Unread"];return c.jsxs(xe,{variant:"light",...n,children:[c.jsxs(xe.Button,{variant:"link",children:[t," ",c.jsx("strong",{children:o})]}),c.jsx(xe.Content,{children:c.jsx(xe.List,{variant:"single",checkIcon:"check",children:i.map(s=>c.jsx(xe.Item,{isSelected:o===s.toLowerCase(),onClick:()=>r(s.toLowerCase()),children:s},s))})})]})},HeaderActionClear:function({text:t="Clear All",...n}){const{clearAll:e,notificationsCount:o}=Te();return c.jsx(Je,{variant:"link",text:t,onClick:e,disabled:o===0,...n})},HeaderActionEdit:function({tooltip:t="Bulk Edit",...n}){const{isBulkActionsSupported:e,notificationsCount:o}=Te(),{showBulkActions:r}=Tt();return e?c.jsx(Ge,{icon:"pen-to-square",title:t,size:"32",onClick:r,disabled:o===0,...n}):null},HeaderBulkActions:function({className:t,...n}){const e=de("io-panel-header-bulk-actions",t),{HeaderBulkActionSelect:o,HeaderBulkActionSelectDropdown:r,HeaderBulkActionMarkAsRead:i,HeaderBulkActionMarkAsUnread:a,HeaderBulkActionSnooze:s,HeaderBulkActionClear:l,HeaderBulkActionClose:u}=Bo(),{isBulkActionsSupported:f}=Te();return f?c.jsx("div",{className:e,...n,children:c.jsxs(Be,{children:[c.jsx(o,{}),c.jsx(r,{}),c.jsx(i,{}),c.jsx(a,{}),c.jsx(s,{}),c.jsx(l,{}),c.jsx(u,{})]})}):null},HeaderBulkActionSelect:function({...t}){const{isBulkActionsSupported:n,selectedNotifications:e,selectAllNotifications:o,notificationsCount:r}=Te();return n?c.jsx(Ya,{checked:r===e.length&&r>0,onChange:i=>o("all",i.target.checked),disabled:r===0,...t}):null},HeaderBulkActionSelectDropdown:function({...t}){const{isBulkActionsSupported:n,selectAllNotifications:e,notificationsCount:o}=Te();return n?c.jsxs(xe,{variant:"light",...t,children:[c.jsx(xe.ButtonIcon,{variant:"default",icon:"chevron-down",size:"16",iconSize:"10",disabled:o===0}),c.jsx(jf,{children:c.jsxs(xe.List,{variant:"single",checkIcon:"check",children:[c.jsx(xe.ItemSection,{children:"Select"}),["All","Read","Unread","Snoozed"].map(r=>c.jsx(xe.Item,{onClick:()=>e(r.toLowerCase(),!0),children:r},r))]})})]}):null},HeaderBulkActionMarkAsRead:function({icon:t="envelope-open",size:n="32",variant:e="circle",tooltip:o="Mark as read",...r}){const{isBulkActionsSupported:i,selectedNotifications:a,setStates:s,notificationsCount:l}=Te(),u=g.useCallback(()=>{s(a,"Seen")},[a,s]);return i?c.jsx(Ge,{icon:t,size:n,variant:e,title:o,onClick:u,disabled:l===0,...r}):null},HeaderBulkActionMarkAsUnread:function({icon:t="envelope",size:n="32",variant:e="circle",tooltip:o="Mark as unread",...r}){const{isBulkActionsSupported:i,selectedNotifications:a,setStates:s,notificationsCount:l}=Te(),u=g.useCallback(()=>{s(a,"Active")},[a,s]);return i?c.jsx(Ge,{icon:t,size:n,variant:e,title:o,onClick:u,disabled:l===0,...r}):null},HeaderBulkActionSnooze:function({icon:t="snooze",size:n="32",variant:e="circle",tooltip:o="Snooze",...r}){var d,p;const{isBulkActionsSupported:i,selectedNotifications:a,snoozeMany:s,settings:l,notificationsCount:u}=Te(),f=g.useCallback(()=>{var h;s(a,((h=l.snooze)==null?void 0:h.duration)??0)},[a,s,(d=l.snooze)==null?void 0:d.duration]);return i&&((p=l.snooze)!=null&&p.enabled)?c.jsx(Ge,{icon:t,size:n,variant:e,title:o,onClick:f,disabled:u===0,...r}):null},HeaderBulkActionClear:function({icon:t="trash",size:n="32",variant:e="circle",tooltip:o="Clear",...r}){const{isBulkActionsSupported:i,selectedNotifications:a,clearMany:s,notificationsCount:l}=Te(),u=g.useCallback(()=>{s(a)},[a,s]);return i?c.jsx(Ge,{icon:t,size:n,variant:e,title:o,onClick:u,disabled:l===0,...r}):null},HeaderBulkActionClose:function({text:t="Done",variant:n="primary",...e}){const{isBulkActionsSupported:o,notificationsCount:r}=Te(),{hideBulkActions:i}=Tt();return o?c.jsx(Je,{variant:n,text:t,onClick:i,disabled:r===0,...e}):null},HeaderSearch:function({className:t,placeholder:n="Search",iconPrepend:e="search",iconAppend:o="close",...r}){const i=de("io-panel-header-search",t),a=g.useRef(null),{notificationsCount:s}=Te(),{searchQuery:l,setSearch:u}=Tt(),f=l.length>0,d=g.useCallback(()=>{u(""),a.current&&a.current.focus()},[u]);return c.jsxs("div",{className:i,children:[c.jsx(Fo,{ref:a,value:l,iconPrepend:e,iconAppend:f?o:void 0,iconAppendOnClick:f?d:void 0,placeholder:n,onChange:p=>u(p.target.value),...r}),f&&c.jsx("p",{className:"io-panel-header-search-count",children:`${s} results`})]})},Body:jm,Footer:Om,FooterButtons:Nm,FooterButtonClearAll:Im,FooterButtonClearAllOld:Pm,Notification:Xa,NotificationsList:Dl},qm=g.createContext(Zm),Jm=g.memo(({children:t,components:n})=>{const e=g.useMemo(()=>({...Zm,...n}),[n]);return c.jsx(qm.Provider,{value:e,children:t})});function Bo(t){return{...g.useContext(qm),...t}}function Xm(){var r,i;const t=g.useContext(_e.IOConnectContext),{settings:n}=Te(),e=ze(),o=g.useCallback(async()=>{var l;const a=t.windows.my();if(!t||!a||!e)return;const s=a.placementSettings;await a.place({...s,horizontalAlignment:(l=n.placement)==null?void 0:l.panel})},[t,e,(r=n.placement)==null?void 0:r.panel]);g.useEffect(()=>{var a;t&&((a=n.placement)!=null&&a.panel)&&e&&o().catch(console.error)},[t,e,o,(i=n.placement)==null?void 0:i.panel])}function jb({className:t,onClose:n,title:e="Notifications",...o}){var p,h;const{Header:r,Body:i}=Bo(),{settings:a}=Te(),{isPanelVisible:s}=Tt(),[l,u]=g.useState(!1),f=ze(),d=de("io-notifications-panel",((p=a.placement)==null?void 0:p.panel)==="left"&&"io-panel-left",((h=a.placement)==null?void 0:h.panel)==="right"&&"io-panel-right",t);return Xm(),g.useEffect(()=>{s||u(!1)},[s]),c.jsxs(c.Fragment,{children:[c.jsxs(qe,{className:d,...o,children:[c.jsx(r,{title:e,onClose:n,onOpenSettings:()=>u(!0)}),c.jsx(i,{})]}),f&&s&&c.jsx(yb,{isOpen:l,onClose:()=>u(!1)})]})}Jm.displayName="ComponentsStoreProvider";const Qm={Body:function({className:t,notifications:n,maxToasts:e=1,...o}){const r=de("io-toasts-body",t),{NotificationsList:i,Notification:a}=ng(),[s,l]=g.useState([]);return g.useEffect(()=>{const u=e<0?n.length:e,f=n.filter(d=>d.state==="Active").slice(0,u);for(const d of f)d.onShow();l(f)},[n,e]),c.jsx("div",{className:r,...o,children:c.jsx(i,{Notification:a,notifications:s,noNotificationText:""})})},Notification:Xa,NotificationsList:Dl},eg=g.createContext(Qm),tg=g.memo(({children:t,components:n})=>{const e=g.useMemo(()=>({...Qm,...n}),[n]);return c.jsx(eg.Provider,{value:e,children:t})});function ng(t){return{...g.useContext(eg),...t}}function og(){var o,r;const t=g.useContext(_e.IOConnectContext),{settings:n}=Te(),e=g.useCallback(async()=>{var s,l;const i=t.windows.my();if(!t||!i)return;const a=i.placementSettings;await i.place({...a,horizontalAlignment:((s=n.placement)==null?void 0:s.toasts)==="top-right"||((l=n.placement)==null?void 0:l.toasts)==="bottom-right"?"right":"left"})},[t,(o=n.placement)==null?void 0:o.toasts]);g.useEffect(()=>{var i;t&&((i=n.placement)!=null&&i.toasts)&&e().catch(console.error)},[t,e,(r=n.placement)==null?void 0:r.toasts])}function Ob({className:t,maxToasts:n=10,...e}){var u,f,d,p,h,m,v,y;const{Header:o,Body:r,Footer:i}=ng(),{notifications:a,settings:s}=Te(),l=de("io-toasts",(((u=s.placement)==null?void 0:u.toasts)==="top-left"||((f=s.placement)==null?void 0:f.toasts)==="top-right")&&"io-toasts-top",(((d=s.placement)==null?void 0:d.toasts)==="top-right"||((p=s.placement)==null?void 0:p.toasts)==="bottom-right")&&"io-toasts-right",(((h=s.placement)==null?void 0:h.toasts)==="bottom-left"||((m=s.placement)==null?void 0:m.toasts)==="bottom-right")&&"io-toasts-bottom",(((v=s.placement)==null?void 0:v.toasts)==="top-left"||((y=s.placement)==null?void 0:y.toasts)==="bottom-left")&&"io-toasts-left",t);return og(),c.jsxs("div",{className:l,...e,children:[o&&c.jsx(o,{}),c.jsx(r,{notifications:a,maxToasts:n}),i&&c.jsx(i,{})]})}tg.displayName="ComponentsStoreProvider";var Ml=Object.freeze({__proto__:null,Notification:Xa,NotificationBody:Bm,NotificationBodyDescription:Wm,NotificationBodyIcon:Hm,NotificationBodyTitle:$m,NotificationFooter:zm,NotificationFooterButton:Um,NotificationHeader:Am,NotificationHeaderBadge:Dm,NotificationHeaderButtonClose:Fm,NotificationHeaderButtonSnooze:Rm,NotificationHeaderCount:Tm,NotificationHeaderIcon:Mm,NotificationHeaderTimestamp:Lm,NotificationHeaderTitle:_m,NotificationStack:Km,NotificationsList:Dl,NotificationsPanelProvider:({children:t})=>{const{searchQuery:n,setSearch:e,isPanelVisible:o,sortNotificationsBy:r,setSortBy:i,viewNotificationsBy:a,setViewBy:s,isBulkActionsVisible:l,showBulkActions:u,hideBulkActions:f}=function(){const p=g.useContext(_e.IOConnectContext),[h,m]=g.useState(!1),[v,y]=g.useState("newest"),[w,k]=g.useState("all"),[x,b]=g.useState(""),[E,j]=g.useState(!1),B=ze(),{isBulkActionsSupported:F}=Te();return g.useEffect(()=>{const L=at.onPanelVisibilityChanged(D=>m(D));return()=>{L()}},[]),g.useEffect(()=>{B!==null&&B&&(async()=>{const L=await p.notifications.panel.isVisible();m(L)})()},[p.notifications.panel,B]),g.useEffect(()=>{h||(j(!1),k("all"))},[h]),{isPanelVisible:h,sortNotificationsBy:v,setSortBy:L=>{y(L)},viewNotificationsBy:w,setViewBy:L=>{k(L)},searchQuery:x,setSearch:L=>{b(L)},isBulkActionsVisible:E,showBulkActions:()=>{F&&j(!0)},hideBulkActions:()=>{F&&j(!1)}}}(),d=g.useMemo(()=>({searchQuery:n,setSearch:e,isPanelVisible:o,sortNotificationsBy:r,setSortBy:i,viewNotificationsBy:a,setViewBy:s,isBulkActionsVisible:l,showBulkActions:u,hideBulkActions:f}),[n,e,o,r,i,a,s,l,u,f]);return c.jsx(bm.Provider,{value:d,children:t})},NotificationsProvider:({children:t})=>{const{notifications:n,notificationStacks:e,notificationsCount:o,configuration:r,settings:i,allApplications:a,allApps:s,allowedApplications:l,clearAll:u,clearAllOld:f,close:d,hidePanel:p,showPanel:h,saveSetting:m,saveFilter:v,saveAllFilter:y,isBulkActionsSupported:w,selectedNotifications:k,selectNotification:x,selectAllNotifications:b,clearMany:E,snooze:j,snoozeMany:B,setState:F,setStates:L,setCount:D}=mb(),T=g.useMemo(()=>({notifications:n,notificationStacks:e,notificationsCount:o,configuration:r,settings:i,allApplications:a,allApps:s,allowedApplications:l,clearAll:u,clearAllOld:f,onClose:d,hidePanel:p,showPanel:h,saveSetting:m,saveFilter:v,saveAllFilter:y,isBulkActionsSupported:w,selectedNotifications:k,selectNotification:x,selectAllNotifications:b,clearMany:E,snooze:j,snoozeMany:B,setState:F,setStates:L,setCount:D}),[n,e,o,r,i,a,s,l,u,f,d,p,h,m,v,y,w,k,x,b,E,j,B,F,L,D]);return c.jsx(qh.Provider,{value:T,children:t})},Panel:function({components:t,settings:n,...e}){return c.jsx(Pl,{components:n,children:c.jsx(Jm,{components:t,children:c.jsx(jb,{...e})})})},PanelBody:jm,PanelFooter:Om,PanelFooterButtonClearAll:Im,PanelFooterButtonClearAllOld:Pm,PanelFooterButtons:Nm,PanelHeader:wm,PanelHeaderCaptionTitle:xm,SettingsAllowNotificationToasts:Xh,SettingsAllowNotifications:Jh,SettingsCloseNotificationOnClick:em,SettingsGeneral:Gh,SettingsHideToastsAfter:nm,SettingsPanel:Al,SettingsPanelAutoHide:tm,SettingsPlacement:am,SettingsPlacementPanel:cm,SettingsPlacementToasts:lm,SettingsShowNotificationBadge:Qh,SettingsSnooze:um,SettingsSnoozeDuration:dm,SettingsStacking:om,SettingsSubscribeAll:pm,SettingsSubscribeApp:hm,SettingsSubscribeMuteAll:mm,SettingsSubscribeMuteApp:gm,SettingsSubscriptions:fm,SettingsToastStackBy:im,SettingsToastStacking:rm,Toasts:function({components:t,...n}){return c.jsx(tg,{components:t,children:c.jsx(Ob,{...n})})},useAddRemoveApps:Il,useHidePanelOnFocusLost:function(t=!0){const n=g.useContext(_e.IOConnectContext),e=ze();return g.useEffect(()=>{var r;if(!n||!t||e===null||!e)return;const o=(r=n.windows.my())==null?void 0:r.onFocusChanged(i=>{i.isFocused||n.notifications.panel.hide().catch(a=>{console.error("Error hiding panel:",a)})});return()=>o==null?void 0:o()},[n,e,t]),n},useHidePanelOnKeyUp:function(t="Escape"){const{hidePanel:n}=Te();oy(t,n)},useNotificationStacking:Kh,useNotificationsContext:Te,useNotificationsPanelContext:Tt,usePanelWindowPlacement:Xm,useSelectNotifications:Zh,useShowHidePanelWindow:function(t=!0){const n=g.useContext(_e.IOConnectContext),e=n==null?void 0:n.windows.my(),o=ze(),{isPanelVisible:r}=Tt();return g.useEffect(()=>{n&&e&&o&&(r?e.show().then(()=>{t&&e.focus().catch(i=>{console.error("Error focusing window:",i)})}).catch(i=>console.error("Error showing window:",i)):e.hide().catch(i=>console.error("Error hiding window:",i)))},[n,e,o,r,t]),{myWindow:e}},useToastsWindowPlacement:og});const Nb=t=>{const{General:n,Layouts:e,Downloads:o,System:r}=Or();return c.jsxs($o,{element:mr,elementProps:t,children:[c.jsx(n,{}),c.jsx(e,{}),c.jsx(o,{}),c.jsx(r,{})]})},Ib=({title:t="General",...n})=>{const{Theme:e,PinnedPosition:o,MinimizeToTray:r,ShowTutorialOnStartup:i}=Or();return c.jsxs(et,{title:t,...n,children:[c.jsx(e,{}),c.jsx(o,{}),c.jsx(r,{}),c.jsx(i,{})]})},_l=({className:t,title:n="Theme",...e})=>{const{currentTheme:o,selectTheme:r}=ry(),i=(()=>{const a=g.useContext(_e.IOConnectContext),[s,l]=g.useState([]);return g.useEffect(()=>{var u;a&&((u=a.themes)==null||u.list().then(l).catch(console.warn))},[a]),s})();return c.jsxs("div",{className:de("flex jc-between ai-center",t),"data-testid":"theme-container",...e,children:[c.jsx("label",{className:"io-text-clipper","data-testid":"theme-label",children:n}),c.jsxs(xe,{variant:"light","data-testid":"theme-dropdown",children:[c.jsx(xe.Button,{text:(o==null?void 0:o.displayName)??"Dark","data-testid":"theme-dropdown-button"}),c.jsx(xe.Content,{"data-testid":"theme-dropdown-content",children:c.jsx(xe.List,{children:i.map(({displayName:a,name:s})=>c.jsx(xe.Item,{onClick:()=>r(s),"data-testid":`theme-dropdown-item-${s}`,children:a},s))})})]})]})},Pb=({prefKey:t,options:n,disabled:e,...o})=>{const{isLoading:r,value:i="Select option",update:a}=Xt({prefKey:t});return c.jsxs(xe,{variant:"light",disabled:r||e,...o,children:[c.jsx(xe.Button,{children:i}),c.jsx(xe.Content,{children:c.jsx(xe.List,{children:n.map(s=>c.jsx(xe.Item,{onClick:()=>(async l=>{if(l!==i)try{await a(l)}catch(u){console.error("Failed to update platform preference:",u)}})(s),children:s},s))})})]})},Ab=({className:t,label:n="Pinned position",...e})=>c.jsx(et,{className:de("io-block-list-gap",t),...e,children:c.jsxs("div",{className:"flex jc-between ai-center",children:[c.jsx("label",{className:"io-text-clipper",children:n}),c.jsx(Pb,{className:t,prefKey:nh,options:["Left","Right"],...e})]})}),Kn=({prefKey:t,...n})=>{const{isLoading:e,value:o=!1,update:r}=Xt({prefKey:t});return c.jsx(vt,{checked:o,disabled:e,onChange:i=>r(i.target.checked),...n})},Tb=({align:t="right",label:n="Allow docking",...e})=>c.jsx(Kn,{align:t,label:n,prefKey:oh,...e}),Db=({align:t="right",label:n="Minimize to tray",...e})=>c.jsx(Kn,{align:t,label:n,prefKey:rh,...e}),Mb=({align:t="right",label:n="Auto-close on starting apps and workspaces",...e})=>c.jsx(Kn,{align:t,label:n,prefKey:ih,disabled:!0,...e}),_b=({align:t="right",label:n="Show tutorial on startup",...e})=>c.jsx(Kn,{align:t,label:n,prefKey:ah,...e}),Lb=({title:t="Layouts",...n})=>{const{LayoutsSaveCurrentOnExit:e,LayoutsShowDeletePrompt:o,LayoutsShowUnsavedChangesPrompt:r}=Or();return c.jsxs(et,{title:t,...n,children:[c.jsx(e,{}),c.jsx(r,{}),c.jsx(o,{})]})},Rb=({align:t="right",label:n="Restore last saved on startup",...e})=>c.jsx(Kn,{align:t,label:n,prefKey:sh,...e}),Fb=({align:t="right",label:n="Save current on exit",...e})=>c.jsx(Kn,{align:t,label:n,prefKey:ch,...e}),Ll=({align:t="right",label:n="Show prompt for unsaved changes",...e})=>c.jsx(Kn,{align:t,label:n,prefKey:lh,"data-testid":"layouts-show-unsaved-changes-prompt-toggle-button",...e}),Rl=({align:t="right",label:n="Show prompt for deleting",...e})=>c.jsx(Kn,{align:t,label:n,prefKey:uh,"data-testid":"layouts-show-delete-prompt-toggle",...e}),Bb=({className:t,title:n="Downloads",...e})=>{const{DownloadsLocation:o}=Or();return c.jsx(et,{className:de("io-block-list-gap",t),title:n,...e,children:c.jsx(o,{})})},Hb=({align:t="right",label:n="Ask where to save each file before downloading",...e})=>c.jsx(Kn,{align:t,label:n,prefKey:dh,...e}),$b=({className:t,label:n="Location",...e})=>{const{configuration:{downloadFolder:o},setDownloadLocationWithDialog:r,isDownloadLocationDialogVisible:i,downloadLocationList:a}=Gn();return c.jsxs(et,{className:de("io-preferences-download-section",t),...e,children:[c.jsxs("div",{className:"flex jc-between ai-center",children:[c.jsx("label",{className:"io-text-clipper",children:n}),c.jsx(Je,{text:"Change",onClick:r,disabled:i})]}),c.jsx("p",{children:o??(a==null?void 0:a[0])??"Not set"})]})},Wb=({className:t,title:n="System",...e})=>{const{SystemRestartSection:o,SystemShutdownSection:r}=Or();return c.jsxs(et,{className:de("io-block-list-gap",t),title:n,...e,children:[c.jsx(o,{}),c.jsx(r,{})]})};var Ms=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],ur={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(t){return typeof console<"u"&&console.warn(t)},getWeek:function(t){var n=new Date(t.getTime());n.setHours(0,0,0,0),n.setDate(n.getDate()+3-(n.getDay()+6)%7);var e=new Date(n.getFullYear(),0,4);return 1+Math.round(((n.getTime()-e.getTime())/864e5-3+(e.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},ci={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(t){var n=t%100;if(n>3&&n<21)return"th";switch(n%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},Bt=function(t,n){return n===void 0&&(n=2),("000"+t).slice(-1*n)},an=function(t){return t===!0?1:0};function Nd(t,n){var e;return function(){var o=this,r=arguments;clearTimeout(e),e=setTimeout(function(){return t.apply(o,r)},n)}}var _s=function(t){return t instanceof Array?t:[t]};function Mt(t,n,e){if(e===!0)return t.classList.add(n);t.classList.remove(n)}function We(t,n,e){var o=window.document.createElement(t);return n=n||"",e=e||"",o.className=n,e!==void 0&&(o.textContent=e),o}function Mi(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function rg(t,n){return n(t)?t:t.parentNode?rg(t.parentNode,n):void 0}function _i(t,n){var e=We("div","numInputWrapper"),o=We("input","numInput "+t),r=We("span","arrowUp"),i=We("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?o.type="number":(o.type="text",o.pattern="\\d*"),n!==void 0)for(var a in n)o.setAttribute(a,n[a]);return e.appendChild(o),e.appendChild(r),e.appendChild(i),e}function Yt(t){try{return typeof t.composedPath=="function"?t.composedPath()[0]:t.target}catch{return t.target}}var Ls=function(){},ya=function(t,n,e){return e.months[n?"shorthand":"longhand"][t]},zb={D:Ls,F:function(t,n,e){t.setMonth(e.months.longhand.indexOf(n))},G:function(t,n){t.setHours((t.getHours()>=12?12:0)+parseFloat(n))},H:function(t,n){t.setHours(parseFloat(n))},J:function(t,n){t.setDate(parseFloat(n))},K:function(t,n,e){t.setHours(t.getHours()%12+12*an(new RegExp(e.amPM[1],"i").test(n)))},M:function(t,n,e){t.setMonth(e.months.shorthand.indexOf(n))},S:function(t,n){t.setSeconds(parseFloat(n))},U:function(t,n){return new Date(1e3*parseFloat(n))},W:function(t,n,e){var o=parseInt(n),r=new Date(t.getFullYear(),0,2+7*(o-1),0,0,0,0);return r.setDate(r.getDate()-r.getDay()+e.firstDayOfWeek),r},Y:function(t,n){t.setFullYear(parseFloat(n))},Z:function(t,n){return new Date(n)},d:function(t,n){t.setDate(parseFloat(n))},h:function(t,n){t.setHours((t.getHours()>=12?12:0)+parseFloat(n))},i:function(t,n){t.setMinutes(parseFloat(n))},j:function(t,n){t.setDate(parseFloat(n))},l:Ls,m:function(t,n){t.setMonth(parseFloat(n)-1)},n:function(t,n){t.setMonth(parseFloat(n)-1)},s:function(t,n){t.setSeconds(parseFloat(n))},u:function(t,n){return new Date(parseFloat(n))},w:Ls,y:function(t,n){t.setFullYear(2e3+parseFloat(n))}},Oo={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},qr={Z:function(t){return t.toISOString()},D:function(t,n,e){return n.weekdays.shorthand[qr.w(t,n,e)]},F:function(t,n,e){return ya(qr.n(t,n,e)-1,!1,n)},G:function(t,n,e){return Bt(qr.h(t,n,e))},H:function(t){return Bt(t.getHours())},J:function(t,n){return n.ordinal!==void 0?t.getDate()+n.ordinal(t.getDate()):t.getDate()},K:function(t,n){return n.amPM[an(t.getHours()>11)]},M:function(t,n){return ya(t.getMonth(),!0,n)},S:function(t){return Bt(t.getSeconds())},U:function(t){return t.getTime()/1e3},W:function(t,n,e){return e.getWeek(t)},Y:function(t){return Bt(t.getFullYear(),4)},d:function(t){return Bt(t.getDate())},h:function(t){return t.getHours()%12?t.getHours()%12:12},i:function(t){return Bt(t.getMinutes())},j:function(t){return t.getDate()},l:function(t,n){return n.weekdays.longhand[t.getDay()]},m:function(t){return Bt(t.getMonth()+1)},n:function(t){return t.getMonth()+1},s:function(t){return t.getSeconds()},u:function(t){return t.getTime()},w:function(t){return t.getDay()},y:function(t){return String(t.getFullYear()).substring(2)}},ig=function(t){var n=t.config,e=n===void 0?ur:n,o=t.l10n,r=o===void 0?ci:o,i=t.isMobile,a=i!==void 0&&i;return function(s,l,u){var f=u||r;return e.formatDate===void 0||a?l.split("").map(function(d,p,h){return qr[d]&&h[p-1]!=="\\"?qr[d](s,f,e):d!=="\\"?d:""}).join(""):e.formatDate(s,l,f)}},Lc=function(t){var n=t.config,e=n===void 0?ur:n,o=t.l10n,r=o===void 0?ci:o;return function(i,a,s,l){if(i===0||i){var u,f=l||r,d=i;if(i instanceof Date)u=new Date(i.getTime());else if(typeof i!="string"&&i.toFixed!==void 0)u=new Date(i);else if(typeof i=="string"){var p=a||(e||ur).dateFormat,h=String(i).trim();if(h==="today")u=new Date,s=!0;else if(e&&e.parseDate)u=e.parseDate(i,p);else if(/Z$/.test(h)||/GMT$/.test(h))u=new Date(i);else{for(var m=void 0,v=[],y=0,w=0,k="";y<p.length;y++){var x=p[y],b=x==="\\",E=p[y-1]==="\\"||b;if(Oo[x]&&!E){k+=Oo[x];var j=new RegExp(k).exec(i);j&&(m=!0)&&v[x!=="Y"?"push":"unshift"]({fn:zb[x],val:j[++w]})}else b||(k+=".")}u=e&&e.noCalendar?new Date(new Date().setHours(0,0,0,0)):new Date(new Date().getFullYear(),0,1,0,0,0,0),v.forEach(function(B){var F=B.fn,L=B.val;return u=F(u,L,f)||u}),u=m?u:void 0}}if(u instanceof Date&&!isNaN(u.getTime()))return s===!0&&u.setHours(0,0,0,0),u;e.errorHandler(new Error("Invalid date provided: "+d))}}};function Gt(t,n,e){return e===void 0&&(e=!0),e!==!1?new Date(t.getTime()).setHours(0,0,0,0)-new Date(n.getTime()).setHours(0,0,0,0):t.getTime()-n.getTime()}var Rs=function(t,n,e){return 3600*t+60*n+e},Ub=864e5;function Fs(t){var n=t.defaultHour,e=t.defaultMinute,o=t.defaultSeconds;if(t.minDate!==void 0){var r=t.minDate.getHours(),i=t.minDate.getMinutes(),a=t.minDate.getSeconds();n<r&&(n=r),n===r&&e<i&&(e=i),n===r&&e===i&&o<a&&(o=t.minDate.getSeconds())}if(t.maxDate!==void 0){var s=t.maxDate.getHours(),l=t.maxDate.getMinutes();(n=Math.min(n,s))===s&&(e=Math.min(l,e)),n===s&&e===l&&(o=t.maxDate.getSeconds())}return{hours:n,minutes:e,seconds:o}}typeof Object.assign!="function"&&(Object.assign=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];if(!t)throw TypeError("Cannot convert undefined or null to object");for(var o=function(a){a&&Object.keys(a).forEach(function(s){return t[s]=a[s]})},r=0,i=n;r<i.length;r++)o(i[r]);return t});var It=function(){return It=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},It.apply(this,arguments)},Id=function(){for(var t=0,n=0,e=arguments.length;n<e;n++)t+=arguments[n].length;var o=Array(t),r=0;for(n=0;n<e;n++)for(var i=arguments[n],a=0,s=i.length;a<s;a++,r++)o[r]=i[a];return o};function Vb(t,n){var e={config:It(It({},ur),st.defaultConfig),l10n:ci};function o(){var S;return((S=e.calendarContainer)===null||S===void 0?void 0:S.getRootNode()).activeElement||document.activeElement}function r(S){return S.bind(e)}function i(){var S=e.config;S.weekNumbers===!1&&S.showMonths===1||S.noCalendar!==!0&&window.requestAnimationFrame(function(){if(e.calendarContainer!==void 0&&(e.calendarContainer.style.visibility="hidden",e.calendarContainer.style.display="block"),e.daysContainer!==void 0){var C=(e.days.offsetWidth+1)*S.showMonths;e.daysContainer.style.width=C+"px",e.calendarContainer.style.width=C+(e.weekWrapper!==void 0?e.weekWrapper.offsetWidth:0)+"px",e.calendarContainer.style.removeProperty("visibility"),e.calendarContainer.style.removeProperty("display")}})}function a(S){if(e.selectedDates.length===0){var C=e.config.minDate===void 0||Gt(new Date,e.config.minDate)>=0?new Date:new Date(e.config.minDate.getTime()),N=Fs(e.config);C.setHours(N.hours,N.minutes,N.seconds,C.getMilliseconds()),e.selectedDates=[C],e.latestSelectedDateObj=C}S!==void 0&&S.type!=="blur"&&function($){$.preventDefault();var ce=$.type==="keydown",be=Yt($),X=be;e.amPM!==void 0&&be===e.amPM&&(e.amPM.textContent=e.l10n.amPM[an(e.amPM.textContent===e.l10n.amPM[0])]);var ne=parseFloat(X.getAttribute("min")),te=parseFloat(X.getAttribute("max")),le=parseFloat(X.getAttribute("step")),he=parseInt(X.value,10),ye=$.delta||(ce?$.which===38?1:-1:0),pe=he+le*ye;if(X.value!==void 0&&X.value.length===2){var oe=X===e.hourElement,Ee=X===e.minuteElement;pe<ne?(pe=te+pe+an(!oe)+(an(oe)&&an(!e.amPM)),Ee&&v(void 0,-1,e.hourElement)):pe>te&&(pe=X===e.hourElement?pe-te-an(!e.amPM):ne,Ee&&v(void 0,1,e.hourElement)),e.amPM&&oe&&(le===1?pe+he===23:Math.abs(pe-he)>le)&&(e.amPM.textContent=e.l10n.amPM[an(e.amPM.textContent===e.l10n.amPM[0])]),X.value=Bt(pe)}}(S);var _=e._input.value;s(),ke(),e._input.value!==_&&e._debouncedChange()}function s(){if(e.hourElement!==void 0&&e.minuteElement!==void 0){var S,C,N=(parseInt(e.hourElement.value.slice(-2),10)||0)%24,_=(parseInt(e.minuteElement.value,10)||0)%60,$=e.secondElement!==void 0?(parseInt(e.secondElement.value,10)||0)%60:0;e.amPM!==void 0&&(S=N,C=e.amPM.textContent,N=S%12+12*an(C===e.l10n.amPM[1]));var ce=e.config.minTime!==void 0||e.config.minDate&&e.minDateHasTime&&e.latestSelectedDateObj&&Gt(e.latestSelectedDateObj,e.config.minDate,!0)===0,be=e.config.maxTime!==void 0||e.config.maxDate&&e.maxDateHasTime&&e.latestSelectedDateObj&&Gt(e.latestSelectedDateObj,e.config.maxDate,!0)===0;if(e.config.maxTime!==void 0&&e.config.minTime!==void 0&&e.config.minTime>e.config.maxTime){var X=Rs(e.config.minTime.getHours(),e.config.minTime.getMinutes(),e.config.minTime.getSeconds()),ne=Rs(e.config.maxTime.getHours(),e.config.maxTime.getMinutes(),e.config.maxTime.getSeconds()),te=Rs(N,_,$);if(te>ne&&te<X){var le=function(pe){var oe=Math.floor(pe/3600),Ee=(pe-3600*oe)/60;return[oe,Ee,pe-3600*oe-60*Ee]}(X);N=le[0],_=le[1],$=le[2]}}else{if(be){var he=e.config.maxTime!==void 0?e.config.maxTime:e.config.maxDate;(N=Math.min(N,he.getHours()))===he.getHours()&&(_=Math.min(_,he.getMinutes())),_===he.getMinutes()&&($=Math.min($,he.getSeconds()))}if(ce){var ye=e.config.minTime!==void 0?e.config.minTime:e.config.minDate;(N=Math.max(N,ye.getHours()))===ye.getHours()&&_<ye.getMinutes()&&(_=ye.getMinutes()),_===ye.getMinutes()&&($=Math.max($,ye.getSeconds()))}}u(N,_,$)}}function l(S){var C=S||e.latestSelectedDateObj;C&&C instanceof Date&&u(C.getHours(),C.getMinutes(),C.getSeconds())}function u(S,C,N){e.latestSelectedDateObj!==void 0&&e.latestSelectedDateObj.setHours(S%24,C,N||0,0),e.hourElement&&e.minuteElement&&!e.isMobile&&(e.hourElement.value=Bt(e.config.time_24hr?S:(12+S)%12+12*an(S%12==0)),e.minuteElement.value=Bt(C),e.amPM!==void 0&&(e.amPM.textContent=e.l10n.amPM[an(S>=12)]),e.secondElement!==void 0&&(e.secondElement.value=Bt(N)))}function f(S){var C=Yt(S),N=parseInt(C.value)+(S.delta||0);(N/1e3>1||S.key==="Enter"&&!/[^\d]/.test(N.toString()))&&ae(N)}function d(S,C,N,_){return C instanceof Array?C.forEach(function($){return d(S,$,N,_)}):S instanceof Array?S.forEach(function($){return d($,C,N,_)}):(S.addEventListener(C,N,_),void e._handlers.push({remove:function(){return S.removeEventListener(C,N,_)}}))}function p(){A("onChange")}function h(S,C){var N=S!==void 0?e.parseDate(S):e.latestSelectedDateObj||(e.config.minDate&&e.config.minDate>e.now?e.config.minDate:e.config.maxDate&&e.config.maxDate<e.now?e.config.maxDate:e.now),_=e.currentYear,$=e.currentMonth;try{N!==void 0&&(e.currentYear=N.getFullYear(),e.currentMonth=N.getMonth())}catch(ce){ce.message="Invalid date supplied: "+N,e.config.errorHandler(ce)}C&&e.currentYear!==_&&(A("onYearChange"),j()),!C||e.currentYear===_&&e.currentMonth===$||A("onMonthChange"),e.redraw()}function m(S){var C=Yt(S);~C.className.indexOf("arrow")&&v(S,C.classList.contains("arrowUp")?1:-1)}function v(S,C,N){var _=S&&Yt(S),$=N||_&&_.parentNode&&_.parentNode.firstChild,ce=me("increment");ce.delta=C,$&&$.dispatchEvent(ce)}function y(S,C,N,_){var $=z(C,!0),ce=We("span",S,C.getDate().toString());return ce.dateObj=C,ce.$i=_,ce.setAttribute("aria-label",e.formatDate(C,e.config.ariaDateFormat)),S.indexOf("hidden")===-1&&Gt(C,e.now)===0&&(e.todayDateElem=ce,ce.classList.add("today"),ce.setAttribute("aria-current","date")),$?(ce.tabIndex=-1,we(C)&&(ce.classList.add("selected"),e.selectedDateElem=ce,e.config.mode==="range"&&(Mt(ce,"startRange",e.selectedDates[0]&&Gt(C,e.selectedDates[0],!0)===0),Mt(ce,"endRange",e.selectedDates[1]&&Gt(C,e.selectedDates[1],!0)===0),S==="nextMonthDay"&&ce.classList.add("inRange")))):ce.classList.add("flatpickr-disabled"),e.config.mode==="range"&&function(be){return!(e.config.mode!=="range"||e.selectedDates.length<2)&&Gt(be,e.selectedDates[0])>=0&&Gt(be,e.selectedDates[1])<=0}(C)&&!we(C)&&ce.classList.add("inRange"),e.weekNumbers&&e.config.showMonths===1&&S!=="prevMonthDay"&&_%7==6&&e.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+e.config.getWeek(C)+"</span>"),A("onDayCreate",ce),ce}function w(S){S.focus(),e.config.mode==="range"&&J(S)}function k(S){for(var C=S>0?0:e.config.showMonths-1,N=S>0?e.config.showMonths:-1,_=C;_!=N;_+=S)for(var $=e.daysContainer.children[_],ce=S>0?0:$.children.length-1,be=S>0?$.children.length:-1,X=ce;X!=be;X+=S){var ne=$.children[X];if(ne.className.indexOf("hidden")===-1&&z(ne.dateObj))return ne}}function x(S,C){var N=o(),_=ee(N||document.body),$=S!==void 0?S:_?N:e.selectedDateElem!==void 0&&ee(e.selectedDateElem)?e.selectedDateElem:e.todayDateElem!==void 0&&ee(e.todayDateElem)?e.todayDateElem:k(C>0?1:-1);$===void 0?e._input.focus():_?function(ce,be){for(var X=ce.className.indexOf("Month")===-1?ce.dateObj.getMonth():e.currentMonth,ne=be>0?e.config.showMonths:-1,te=be>0?1:-1,le=X-e.currentMonth;le!=ne;le+=te)for(var he=e.daysContainer.children[le],ye=X-e.currentMonth===le?ce.$i+be:be<0?he.children.length-1:0,pe=he.children.length,oe=ye;oe>=0&&oe<pe&&oe!=(be>0?pe:-1);oe+=te){var Ee=he.children[oe];if(Ee.className.indexOf("hidden")===-1&&z(Ee.dateObj)&&Math.abs(ce.$i-oe)>=Math.abs(be))return w(Ee)}e.changeMonth(te),x(k(te),0)}($,C):w($)}function b(S,C){for(var N=(new Date(S,C,1).getDay()-e.l10n.firstDayOfWeek+7)%7,_=e.utils.getDaysInMonth((C-1+12)%12,S),$=e.utils.getDaysInMonth(C,S),ce=window.document.createDocumentFragment(),be=e.config.showMonths>1,X=be?"prevMonthDay hidden":"prevMonthDay",ne=be?"nextMonthDay hidden":"nextMonthDay",te=_+1-N,le=0;te<=_;te++,le++)ce.appendChild(y("flatpickr-day "+X,new Date(S,C-1,te),0,le));for(te=1;te<=$;te++,le++)ce.appendChild(y("flatpickr-day",new Date(S,C,te),0,le));for(var he=$+1;he<=42-N&&(e.config.showMonths===1||le%7!=0);he++,le++)ce.appendChild(y("flatpickr-day "+ne,new Date(S,C+1,he%$),0,le));var ye=We("div","dayContainer");return ye.appendChild(ce),ye}function E(){if(e.daysContainer!==void 0){Mi(e.daysContainer),e.weekNumbers&&Mi(e.weekNumbers);for(var S=document.createDocumentFragment(),C=0;C<e.config.showMonths;C++){var N=new Date(e.currentYear,e.currentMonth,1);N.setMonth(e.currentMonth+C),S.appendChild(b(N.getFullYear(),N.getMonth()))}e.daysContainer.appendChild(S),e.days=e.daysContainer.firstChild,e.config.mode==="range"&&e.selectedDates.length===1&&J()}}function j(){if(!(e.config.showMonths>1||e.config.monthSelectorType!=="dropdown")){var S=function(_){return!(e.config.minDate!==void 0&&e.currentYear===e.config.minDate.getFullYear()&&_<e.config.minDate.getMonth())&&!(e.config.maxDate!==void 0&&e.currentYear===e.config.maxDate.getFullYear()&&_>e.config.maxDate.getMonth())};e.monthsDropdownContainer.tabIndex=-1,e.monthsDropdownContainer.innerHTML="";for(var C=0;C<12;C++)if(S(C)){var N=We("option","flatpickr-monthDropdown-month");N.value=new Date(e.currentYear,C).getMonth().toString(),N.textContent=ya(C,e.config.shorthandCurrentMonth,e.l10n),N.tabIndex=-1,e.currentMonth===C&&(N.selected=!0),e.monthsDropdownContainer.appendChild(N)}}}function B(){var S,C=We("div","flatpickr-month"),N=window.document.createDocumentFragment();e.config.showMonths>1||e.config.monthSelectorType==="static"?S=We("span","cur-month"):(e.monthsDropdownContainer=We("select","flatpickr-monthDropdown-months"),e.monthsDropdownContainer.setAttribute("aria-label",e.l10n.monthAriaLabel),d(e.monthsDropdownContainer,"change",function(be){var X=Yt(be),ne=parseInt(X.value,10);e.changeMonth(ne-e.currentMonth),A("onMonthChange")}),j(),S=e.monthsDropdownContainer);var _=_i("cur-year",{tabindex:"-1"}),$=_.getElementsByTagName("input")[0];$.setAttribute("aria-label",e.l10n.yearAriaLabel),e.config.minDate&&$.setAttribute("min",e.config.minDate.getFullYear().toString()),e.config.maxDate&&($.setAttribute("max",e.config.maxDate.getFullYear().toString()),$.disabled=!!e.config.minDate&&e.config.minDate.getFullYear()===e.config.maxDate.getFullYear());var ce=We("div","flatpickr-current-month");return ce.appendChild(S),ce.appendChild(_),N.appendChild(ce),C.appendChild(N),{container:C,yearElement:$,monthElement:S}}function F(){Mi(e.monthNav),e.monthNav.appendChild(e.prevMonthNav),e.config.showMonths&&(e.yearElements=[],e.monthElements=[]);for(var S=e.config.showMonths;S--;){var C=B();e.yearElements.push(C.yearElement),e.monthElements.push(C.monthElement),e.monthNav.appendChild(C.container)}e.monthNav.appendChild(e.nextMonthNav)}function L(){e.weekdayContainer?Mi(e.weekdayContainer):e.weekdayContainer=We("div","flatpickr-weekdays");for(var S=e.config.showMonths;S--;){var C=We("div","flatpickr-weekdaycontainer");e.weekdayContainer.appendChild(C)}return D(),e.weekdayContainer}function D(){if(e.weekdayContainer){var S=e.l10n.firstDayOfWeek,C=Id(e.l10n.weekdays.shorthand);S>0&&S<C.length&&(C=Id(C.splice(S,C.length),C.splice(0,S)));for(var N=e.config.showMonths;N--;)e.weekdayContainer.children[N].innerHTML=`
16
+ */gr.displayName="PanelBody",Qo.ButtonGroup=Be,Qo.Button=Je,Qo.ButtonIcon=Ge,Qo.Dropdown=xe,qe.Header=no,qe.Body=gr,qe.Footer=Qo,Ra.Icon=lt;const Kt=(t,n)=>{const{o:e,i:o,u:r}=t;let i,a=e;const s=(l,u)=>{const f=a,d=l,p=u||(o?!o(f,d):f!==d);return(p||r)&&(a=d,i=f),[a,p,i]};return[n?l=>s(n(a,i),l):s,l=>[a,!!l,i]]},Wt=typeof window<"u"&&typeof HTMLElement<"u"&&window.document?window:{},vp=Math.max,k1=Math.min,pc=Math.round,fa=Math.abs,ed=Math.sign,yp=Wt.cancelAnimationFrame,fl=Wt.requestAnimationFrame,pl=Wt.setTimeout,wp=Wt.clearTimeout,Fa=t=>Wt[t]!==void 0?Wt[t]:void 0,E1=Fa("MutationObserver"),td=Fa("IntersectionObserver"),or=Fa("ResizeObserver"),Vr=Fa("ScrollTimeline"),hl=t=>t===void 0,Ba=t=>t===null,Un=t=>typeof t=="number",vi=t=>typeof t=="string",Ha=t=>typeof t=="boolean",yn=t=>typeof t=="function",gn=t=>Array.isArray(t),pa=t=>typeof t=="object"&&!gn(t)&&!Ba(t),ml=t=>{const n=!!t&&t.length,e=Un(n)&&n>-1&&n%1==0;return!!(gn(t)||!yn(t)&&e)&&(!(n>0&&pa(t))||n-1 in t)},ha=t=>!!t&&t.constructor===Object,ma=t=>t instanceof HTMLElement,$a=t=>t instanceof Element;function Ze(t,n){if(ml(t))for(let e=0;e<t.length&&n(t[e],e,t)!==!1;e++);else t&&Ze(Object.keys(t),e=>n(t[e],e,t));return t}const bp=(t,n)=>t.indexOf(n)>=0,ri=(t,n)=>t.concat(n),nt=(t,n,e)=>(!vi(n)&&ml(n)?Array.prototype.push.apply(t,n):t.push(n),t),mo=t=>Array.from(t||[]),gl=t=>gn(t)?t:!vi(t)&&ml(t)?mo(t):[t],ga=t=>!!t&&!t.length,hc=t=>mo(new Set(t)),Qt=(t,n,e)=>{Ze(t,o=>!o||o.apply(void 0,n||[])),e||(t.length=0)},xp="paddingTop",Cp="paddingRight",Sp="paddingLeft",kp="paddingBottom",Ep="marginLeft",jp="marginRight",Op="marginBottom",vl="overflowX",yl="overflowY",Wa="width",za="height",Wn="visible",mn="hidden",vr="scroll",Ua=(t,n,e,o)=>{if(t&&n){let r=!0;return Ze(e,i=>{t[i]!==n[i]&&(r=!1)}),r}return!1},Np=(t,n)=>Ua(t,n,["w","h"]),Ki=(t,n)=>Ua(t,n,["x","y"]),j1=(t,n)=>Ua(t,n,["t","r","b","l"]),De=(t,...n)=>t.bind(0,...n),rr=t=>{let n;const e=t?pl:fl,o=t?wp:yp;return[r=>{o(n),n=e(()=>r(),yn(t)?t():t)},()=>o(n)]},nd=t=>{const n=yn(t)?t():t;if(Un(n)){const e=n?pl:fl,o=n?wp:yp;return r=>{const i=e(()=>r(),n);return()=>{o(i)}}}return n&&n._},va=(t,n)=>{const{p:e,v:o,S:r,m:i}=n||{};let a,s,l,u;const f=function(m){s&&s(),a&&a(),u=s=a=l=void 0,t.apply(this,m)},d=m=>i&&l?i(l,m):m,p=()=>{s&&l&&f(d(l)||l)},h=function(){const m=mo(arguments),v=nd(e);if(v){const y=nd(o),x=d(m)||m,S=f.bind(0,x);s&&s(),r&&!u?(S(),u=!0,s=v(()=>u=void 0)):(s=v(S),y&&!a&&(a=y(p))),l=x}else f(m)};return h.O=p,h},Ip=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),vn=t=>t?Object.keys(t):[],$e=(t,n,e,o,r,i,a)=>{const s=[n,e,o,r,i,a];return typeof t=="object"&&!Ba(t)||yn(t)||(t={}),Ze(s,l=>{Ze(l,(u,f)=>{const d=l[f];if(t===d)return!0;const p=gn(d);if(d&&ha(d)){const h=t[f];let m=h;p&&!gn(h)?m=[]:p||ha(h)||(m={}),t[f]=$e(m,d)}else t[f]=p?d.slice():d})}),t},Pp=(t,n)=>Ze($e({},t),(e,o,r)=>{e===void 0?delete r[o]:e&&ha(e)&&(r[o]=Pp(e))}),wl=t=>!vn(t).length,ii=()=>{},Ap=(t,n,e)=>vp(t,k1(n,e)),_o=t=>hc((gn(t)?t:(t||"").split(" ")).filter(n=>n)),bl=(t,n)=>t&&t.getAttribute(n),od=(t,n)=>t&&t.hasAttribute(n),Bn=(t,n,e)=>{Ze(_o(n),o=>{t&&t.setAttribute(o,String(e||""))})},xn=(t,n)=>{Ze(_o(n),e=>t&&t.removeAttribute(e))},Va=(t,n)=>{const e=_o(bl(t,n)),o=De(Bn,t,n),r=(i,a)=>{const s=new Set(e);return Ze(_o(i),l=>{s[a](l)}),mo(s).join(" ")};return{C:i=>o(r(i,"delete")),$:i=>o(r(i,"add")),H:i=>{const a=_o(i);return a.reduce((s,l)=>s&&e.includes(l),a.length>0)}}},Tp=(t,n,e)=>(Va(t,n).C(e),De(xl,t,n,e)),xl=(t,n,e)=>(Va(t,n).$(e),De(Tp,t,n,e)),ya=(t,n,e,o)=>(o?xl:Tp)(t,n,e),Cl=(t,n,e)=>Va(t,n).H(e),Dp=t=>Va(t,"class"),Mp=(t,n)=>{Dp(t).C(n)},Sl=(t,n)=>(Dp(t).$(n),De(Mp,t,n)),rd=(t,n)=>{const e=n?$a(n)&&n:document;return e?mo(e.querySelectorAll(t)):[]},mc=(t,n)=>$a(t)&&t.matches(n),_p=t=>mc(t,"body"),gc=t=>t?mo(t.childNodes):[],ai=t=>t&&t.parentElement,ir=(t,n)=>$a(t)&&t.closest(n),vc=t=>document.activeElement,O1=(t,n,e)=>{const o=ir(t,n),r=t&&((a,s)=>{const l=s?$a(s)&&s:document;return l&&l.querySelector(a)})(e,o),i=ir(r,n)===o;return!(!o||!r)&&(o===t||r===t||i&&ir(ir(t,e),n)!==o)},yr=t=>{Ze(gl(t),n=>{const e=ai(n);n&&e&&e.removeChild(n)})},$t=(t,n)=>De(yr,t&&n&&Ze(gl(n),e=>{e&&t.appendChild(e)}));let Lp;const lr=t=>{const n=document.createElement("div");return Bn(n,"class",t),n},Rp=t=>{const n=lr(),e=Lp,o=t.trim();return n.innerHTML=e?e.createHTML(o):o,Ze(gc(n),r=>yr(r))},id=(t,n)=>t.getPropertyValue(n)||t[n]||"",Fp=t=>{const n=t||0;return isFinite(n)?n:0},Pi=t=>Fp(parseFloat(t||"")),yc=t=>Math.round(1e4*t)/1e4,Bp=t=>`${yc(Fp(t))}px`;function si(t,n){t&&n&&Ze(n,(e,o)=>{try{const r=t.style,i=Ba(e)||Ha(e)?"":Un(e)?Bp(e):e;o.indexOf("--")===0?r.setProperty(o,i):r[o]=i}catch{}})}function In(t,n,e){const o=vi(n);let r=o?"":{};if(t){const i=Wt.getComputedStyle(t,e)||t.style;r=o?id(i,n):mo(n).reduce((a,s)=>(a[s]=id(i,s),a),r)}return r}const ad=(t,n,e)=>{const o=n?`${n}-`:"",r=e?`-${e}`:"",i=`${o}top${r}`,a=`${o}right${r}`,s=`${o}bottom${r}`,l=`${o}left${r}`,u=In(t,[i,a,s,l]);return{t:Pi(u[i]),r:Pi(u[a]),b:Pi(u[s]),l:Pi(u[l])}},Os=(t,n)=>"translate"+(pa(t)?`(${t.x},${t.y})`:`${n?"X":"Y"}(${t})`),N1={w:0,h:0},Ya=(t,n)=>n?{w:n[`${t}Width`],h:n[`${t}Height`]}:N1,I1=t=>Ya("inner",t||Wt),ur=De(Ya,"offset"),Hp=De(Ya,"client"),wa=De(Ya,"scroll"),kl=t=>{const n=parseFloat(In(t,Wa))||0,e=parseFloat(In(t,za))||0;return{w:n-pc(n),h:e-pc(e)}},Ns=t=>t.getBoundingClientRect(),wc=t=>!(!t||!t[za]&&!t[Wa]),$p=(t,n)=>{const e=wc(t);return!wc(n)&&e},sd=(t,n,e,o)=>{Ze(_o(n),r=>{t&&t.removeEventListener(r,e,o)})},Xe=(t,n,e,o)=>{var r;const i=(r=o&&o.T)==null||r,a=o&&o.I||!1,s=o&&o.A||!1,l={passive:i,capture:a};return De(Qt,_o(n).map(u=>{const f=s?d=>{sd(t,u,f,a),e&&e(d)}:e;return t&&t.addEventListener(u,f,l),De(sd,t,u,f,a)}))},Wp=t=>t.stopPropagation(),bc=t=>t.preventDefault(),zp=t=>Wp(t)||bc(t),Sn=(t,n)=>{const{x:e,y:o}=Un(n)?{x:n,y:n}:n||{};Un(e)&&(t.scrollLeft=e),Un(o)&&(t.scrollTop=o)},qt=t=>({x:t.scrollLeft,y:t.scrollTop}),P1=(t,n)=>{const{D:e,M:o}=t,{w:r,h:i}=n,a=(d,p,h)=>{let m=ed(d)*h,v=ed(p)*h;if(m===v){const y=fa(d),x=fa(p);v=y>x?0:v,m=y<x?0:m}return m=m===v?0:m,[m+0,v+0]},[s,l]=a(e.x,o.x,r),[u,f]=a(e.y,o.y,i);return{D:{x:s,y:u},M:{x:l,y:f}}},Is=({D:t,M:n})=>{const e=(o,r)=>o===0&&o<=r;return{x:e(t.x,n.x),y:e(t.y,n.y)}},cd=({D:t,M:n},e)=>{const o=(r,i,a)=>Ap(0,1,(r-a)/(r-i)||0);return{x:o(t.x,n.x,e.x),y:o(t.y,n.y,e.y)}},xc=t=>{t&&t.focus&&t.focus({preventScroll:!0})},ld=(t,n)=>{Ze(gl(n),t)},Cc=t=>{const n=new Map,e=(r,i)=>{if(r){const a=n.get(r);ld(s=>{a&&a[s?"delete":"clear"](s)},i)}else n.forEach(a=>{a.clear()}),n.clear()},o=(r,i)=>{if(vi(r)){const l=n.get(r)||new Set;return n.set(r,l),ld(u=>{yn(u)&&l.add(u)},i),De(e,r,i)}Ha(i)&&i&&e();const a=vn(r),s=[];return Ze(a,l=>{const u=r[l];u&&nt(s,o(l,u))}),De(Qt,s)};return o(t||{}),[o,e,(r,i)=>{Ze(mo(n.get(r)),a=>{i&&!ga(i)?a.apply(0,i):a()})}]},Up={},Vp={},Yp=(t,n,e)=>vn(t).map(o=>{const{static:r,instance:i}=t[o],[a,s,l]=e||[],u=e?i:r;if(u){const f=e?u(a,s,n):u(n);return(l||Vp)[o]=f}}),jr=t=>Vp[t],Or="data-overlayscrollbars",Zi="os-environment",Ai=`${Zi}-scrollbar-hidden`,Ps=`${Or}-initialize`,qi="noClipping",ud=`${Or}-body`,lo=Or,Hn=`${Or}-viewport`,A1=vl,T1=yl,Gp="measuring",Kp="scrollbarHidden",Sc=`${Or}-padding`,dd=`${Or}-content`,El="os-size-observer",D1=`${El}-appear`,M1=`${El}-listener`,nn="os-scrollbar",_1=`${nn}-rtl`,L1=`${nn}-horizontal`,R1=`${nn}-vertical`,Zp=`${nn}-track`,jl=`${nn}-handle`,F1=`${nn}-visible`,B1=`${nn}-cornerless`,fd=`${nn}-interaction`,pd=`${nn}-unusable`,kc=`${nn}-auto-hide`,hd=`${kc}-hidden`,md=`${nn}-wheel`,H1=`${Zp}-interactive`,$1=`${jl}-interactive`,ar=t=>t.indexOf(Wn)===0,Ec=(t,n)=>{if(t==="auto")return n?vr:mn;const e=t||mn;return[mn,vr,Wn].includes(e)?e:mn},W1=(t,n)=>{const{overflowX:e,overflowY:o}=In(t,[vl,yl]);return{x:Ec(e,n.x),y:Ec(o,n.y)}},Ol="__osScrollbarsHidingPlugin",gd=t=>JSON.stringify(t,(n,e)=>{if(yn(e))throw 0;return e}),vd=(t,n)=>t?`${n}`.split(".").reduce((e,o)=>e&&Ip(e,o)?e[o]:void 0,t):void 0,z1={paddingAbsolute:!1,showNativeOverlaidScrollbars:!1,update:{elementEvents:[["img","load"]],debounce:[0,33],attributes:null,ignoreMutation:null},overflow:{x:"scroll",y:"scroll"},scrollbars:{theme:"os-theme-dark",visibility:"auto",autoHide:"never",autoHideDelay:1300,autoHideSuspend:!1,dragScroll:!0,clickScroll:!1,pointers:["mouse","touch","pen"]}},qp=(t,n)=>{const e={};return Ze(ri(vn(n),vn(t)),o=>{const r=t[o],i=n[o];if(pa(r)&&pa(i))$e(e[o]={},qp(r,i)),wl(e[o])&&delete e[o];else if(Ip(n,o)&&i!==r){let a=!0;if(gn(r)||gn(i))try{gd(r)===gd(i)&&(a=!1)}catch{}a&&(e[o]=i)}}),e},yd=(t,n,e)=>o=>[vd(t,o),e||vd(n,o)!==void 0];let Jp,As;const U1=()=>{const t=(x,S,b)=>{$t(document.body,x),$t(document.body,x);const w=Hp(x),E=ur(x),j=kl(S);return b&&yr(x),{x:E.h-w.h+j.h,y:E.w-w.w+j.w}},n=Rp(`<div class="${Zi}"><div></div><style>${`.${Zi}{scroll-behavior:auto!important;position:fixed;opacity:0;visibility:hidden;overflow:scroll;height:200px;width:200px;z-index:-1}.${Zi} div{width:200%;height:200%;margin:10px 0}.${Ai}{scrollbar-width:none!important}.${Ai}::-webkit-scrollbar,.${Ai}::-webkit-scrollbar-corner{appearance:none!important;display:none!important;width:0!important;height:0!important}`}</style></div>`)[0],e=n.firstChild,o=n.lastChild,r=Jp;r&&(o.nonce=r);const[i,,a]=Cc(),[s,l]=Kt({o:t(n,e),i:Ki},De(t,n,e,!0)),[u]=l(),f=(x=>{let S=!1;const b=Sl(x,Ai);try{S=In(x,"scrollbar-width")==="none"||In(x,"display","::-webkit-scrollbar")==="none"}catch{}return b(),S})(n),d={x:u.x===0,y:u.y===0},p={elements:{host:null,padding:!f,viewport:x=>f&&_p(x)&&x,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},h=$e({},z1),m=De($e,{},h),v=De($e,{},p),y={P:u,k:d,U:f,J:!!Vr,G:De(i,"r"),K:v,Z:x=>$e(p,x)&&v(),tt:m,nt:x=>$e(h,x)&&m(),ot:$e({},p),st:$e({},h)};if(xn(n,"style"),yr(n),Xe(Wt,"resize",()=>{a("r",[])}),yn(Wt.matchMedia)&&!f&&(!d.x||!d.y)){const x=S=>{const b=Wt.matchMedia(`(resolution: ${Wt.devicePixelRatio}dppx)`);Xe(b,"change",()=>{S(),x(S)},{A:!0})};x(()=>{const[S,b]=s();$e(y.P,S),a("r",[b])})}return y},Pn=()=>(As||(As=U1()),As),wd=(t,n,e,o)=>{let r=!1;const{et:i,ct:a,rt:s,it:l,lt:u,ut:f}=o||{},d=va(()=>r&&e(!0),{p:33,v:99}),[p,h]=((S,b,w)=>{let E=!1;const j=!!w&&new WeakMap,_=M=>{if(j&&w){const F=w.map(D=>{const[A,P]=D||[];return[P&&A?(M||rd)(A,S):[],P]});Ze(F,D=>Ze(D[0],A=>{const P=D[1],re=j.get(A)||[];if(S.contains(A)&&P){const ae=Xe(A,P,z=>{E?(ae(),j.delete(A)):b(z)});j.set(A,nt(re,ae))}else Qt(re),j.delete(A)}))}};return _(),[()=>{E=!0},_]})(t,d,s),m=a||[],v=ri(i||[],m),y=(S,b)=>{if(!ga(b)){const w=u||ii,E=f||ii,j=[],_=[];let M=!1,F=!1;if(Ze(b,D=>{const{attributeName:A,target:P,type:re,oldValue:ae,addedNodes:z,removedNodes:ee}=D,q=re==="attributes",ie=re==="childList",J=t===P,W=q&&A,Q=W&&bl(P,A||""),Y=vi(Q)?Q:null,H=W&&ae!==Y,L=bp(m,A)&&H;if(n&&(ie||!J)){const O=q&&H,I=O&&l&&mc(P,l),B=(I?!w(P,A,ae,Y):!q||O)&&!E(D,!!I,t,o);Ze(z,U=>nt(j,U)),Ze(ee,U=>nt(j,U)),F=F||B}!n&&J&&H&&!w(P,A,ae,Y)&&(nt(_,A),M=M||L)}),h(D=>hc(j).reduce((A,P)=>(nt(A,rd(D,P)),mc(P,D)?nt(A,P):A),[])),n)return!S&&F&&e(!1),[!1];if(!ga(_)||M){const D=[hc(_),M];return S||e.apply(0,D),D}}},x=new E1(De(y,!1));return[()=>(x.observe(t,{attributes:!0,attributeOldValue:!0,attributeFilter:v,subtree:n,childList:n,characterData:n}),r=!0,()=>{r&&(p(),x.disconnect(),r=!1)}),()=>{if(r)return d.O(),y(!0,x.takeRecords())}]};let wo=null;const Xp=(t,n,e)=>{const{ft:o}=e||{},r=jr("__osSizeObserverPlugin"),[i]=Kt({o:!1,u:!0});return()=>{const a=[],s=Rp(`<div class="${El}"><div class="${M1}"></div></div>`)[0],l=s.firstChild,u=f=>{let d=!1,p=!1;if(gn(f)&&!ga(f)){const h=f[0],[m,,v]=i(h.contentRect),y=wc(m);p=$p(m,v),d=!p&&!y}else p=f===!0;d||n({_t:!0,ft:p})};if(or){if(!Ha(wo)){const h=new or(ii);h.observe(t,{get box(){wo=!0}}),wo=wo||!1,h.disconnect()}const f=va(u,{p:0,v:0}),d=h=>f(h),p=new or(d);if(p.observe(wo?t:l),nt(a,[()=>{p.disconnect()},!wo&&$t(t,s)]),wo){const h=new or(d);h.observe(t,{box:"border-box"}),nt(a,()=>h.disconnect())}}else{if(!r)return ii;{const[f,d]=r(l,u,o);nt(a,ri([Sl(s,D1),Xe(s,"animationstart",f),$t(t,s)],d))}}return De(Qt,a)}},V1=(t,n)=>{let e;const o=lr("os-trinsic-observer"),[r]=Kt({o:!1}),i=(s,l)=>{if(s){const u=r((d=>d.h===0||d.isIntersecting||d.intersectionRatio>0)(s)),[,f]=u;return f&&!l&&n(u)&&[u]}},a=(s,l)=>i(l.pop(),s);return[()=>{const s=[];if(td)e=new td(De(a,!1),{root:t}),e.observe(o),nt(s,()=>{e.disconnect()});else{const l=()=>{const u=ur(o);i(u)};nt(s,Xp(o,l)()),l()}return De(Qt,nt(s,$t(t,o)))},()=>e&&a(!0,e.takeRecords())]},Y1=(t,n,e,o)=>{let r,i,a,s,l,u;const f=`[${lo}]`,d=`[${Hn}]`,p=["id","class","style","open","wrap","cols","rows"],{dt:h,vt:m,L:v,gt:y,ht:x,V:S,bt:b,wt:w,yt:E,St:j}=t,_=O=>In(O,"direction")==="rtl",M={Ot:!1,B:_(h)},F=Pn(),D=jr(Ol),[A]=Kt({i:Np,o:{w:0,h:0}},()=>{const O=D&&D.R(t,n,M,F,e).Y,I=!(b&&S)&&Cl(m,lo,qi),B=!S&&w("arrange"),U=B&&qt(y),V=U&&j(),se=E(Gp,I),Z=B&&O&&O(),T=wa(v),me=kl(v);return Z&&Z(),Sn(y,U),V&&V(),I&&se(),{w:T.w+me.w,h:T.h+me.h}}),P=va(o,{p:()=>r,v:()=>i,m(O,I){const[B]=O,[U]=I;return[ri(vn(B),vn(U)).reduce((V,se)=>(V[se]=B[se]||U[se],V),{})]}}),re=O=>{const I=_(h);$e(O,{Ct:u!==I}),$e(M,{B:I}),u=I},ae=(O,I)=>{const[B,U]=O,V={$t:U};return $e(M,{Ot:B}),I||o(V),V},z=({_t:O,ft:I})=>{const B=!(O&&!I)&&F.U?P:o,U={_t:O||I,ft:I};re(U),B(U)},ee=(O,I)=>{const[,B]=A(),U={xt:B};return re(U),B&&!I&&(O?o:P)(U),U},q=(O,I,B)=>{const U={Ht:I};return re(U),I&&!B&&P(U),U},[ie,J]=x?V1(m,ae):[],W=!S&&Xp(m,z,{ft:!0}),[Q,Y]=wd(m,!1,q,{ct:p,et:p}),H=S&&or&&new or(O=>{const I=O[O.length-1].contentRect;z({_t:!0,ft:$p(I,l)}),l=I}),L=va(()=>{const[,O]=A();o({xt:O,_t:b})},{p:222,S:!0});return[()=>{H&&H.observe(m);const O=W&&W(),I=ie&&ie(),B=Q(),U=F.G(V=>{V?P({Et:V}):L()});return()=>{H&&H.disconnect(),O&&O(),I&&I(),s&&s(),B(),U()}},({zt:O,Tt:I,It:B})=>{const U={},[V]=O("update.ignoreMutation"),[se,Z]=O("update.attributes"),[T,me]=O("update.elementEvents"),[be,Ie]=O("update.debounce"),Oe=I||B;if(me||Z){a&&a(),s&&s();const[ke,ue]=wd(x||v,!0,ee,{et:ri(p,se||[]),rt:T,it:f,ut:(k,C)=>{const{target:N,attributeName:R}=k;return!(C||!R||S)&&O1(N,f,d)||!!ir(N,`.${nn}`)||!!($=>yn(V)&&V($))(k)}});s=ke(),a=ue}if(Ie)if(P.O(),gn(be)){const ke=be[0],ue=be[1];r=Un(ke)&&ke,i=Un(ue)&&ue}else Un(be)?(r=be,i=!1):(r=!1,i=!1);if(Oe){const ke=Y(),ue=J&&J(),k=a&&a();ke&&$e(U,q(ke[0],ke[1],Oe)),ue&&$e(U,ae(ue[0],Oe)),k&&$e(U,ee(k[0],Oe))}return re(U),U},M]},Qp=(t,n)=>yn(n)?n.apply(0,t):n,G1=(t,n,e,o)=>{const r=hl(o)?e:o;return Qp(t,r)||n.apply(0,t)},eh=(t,n,e,o)=>{const r=hl(o)?e:o,i=Qp(t,r);return!!i&&(ma(i)?i:n.apply(0,t))},K1=(t,n,e,o)=>{const r="--os-viewport-percent",i="--os-scroll-percent",a="--os-scroll-direction",{K:s}=Pn(),{scrollbars:l}=s(),{slot:u}=l,{dt:f,vt:d,L:p,At:h,gt:m,bt:v,V:y}=n,{scrollbars:x}=h?{}:t,{slot:S}=x||{},b=[],w=[],E=[],j=eh([f,d,p],()=>y&&v?f:d,u,S),_=z=>{if(Vr){let ee=null,q=[];const ie=new Vr({source:m,axis:z}),J=()=>{ee&&ee.cancel(),ee=null};return{kt:Q=>{const{Dt:Y}=e,H=Is(Y)[z],L=z==="x",O=[Os(0,L),Os(`calc(100cq${L?"w":"h"} + -100%)`,L)],I=H?O:O.reverse();return q[0]===I[0]&&q[1]===I[1]||(J(),q=I,ee=Q.Mt.animate({clear:["left"],transform:I},{timeline:ie})),J}}}},M={x:_("x"),y:_("y")},F=(z,ee,q)=>{const ie=q?Sl:Mp;Ze(z,J=>{ie(J.Lt,ee)})},D=(z,ee)=>{Ze(z,q=>{const[ie,J]=ee(q);si(ie,J)})},A=(z,ee,q)=>{const ie=Ha(q),J=!ie||!q;(!ie||q)&&F(w,z,ee),J&&F(E,z,ee)},P=z=>{const ee=z?"x":"y",q=lr(`${nn} ${z?L1:R1}`),ie=lr(Zp),J=lr(jl),W={Lt:q,Ut:ie,Mt:J},Q=M[ee];return nt(z?w:E,W),nt(b,[$t(q,ie),$t(ie,J),De(yr,q),Q&&Q.kt(W),o(W,A,z)]),W},re=De(P,!0),ae=De(P,!1);return re(),ae(),[{Pt:()=>{const z=(()=>{const{Rt:q,Vt:ie}=e,J=(W,Q)=>Ap(0,1,W/(W+Q)||0);return{x:J(ie.x,q.x),y:J(ie.y,q.y)}})(),ee=q=>ie=>[ie.Lt,{[r]:yc(q)+""}];D(w,ee(z.x)),D(E,ee(z.y))},Nt:()=>{if(!Vr){const{Dt:z}=e,ee=cd(z,qt(m)),q=ie=>J=>[J.Lt,{[i]:yc(ie)+""}];D(w,q(ee.x)),D(E,q(ee.y))}},qt:()=>{const{Dt:z}=e,ee=Is(z),q=ie=>J=>[J.Lt,{[a]:ie?"0":"1"}];D(w,q(ee.x)),D(E,q(ee.y)),Vr&&(w.forEach(M.x.kt),E.forEach(M.y.kt))},Bt:()=>{if(y&&!v){const{Rt:z,Dt:ee}=e,q=Is(ee),ie=cd(ee,qt(m)),J=W=>{const{Lt:Q}=W,Y=ai(Q)===p&&Q,H=(L,O,I)=>{const B=O*L;return Bp(I?B:-B)};return[Y,Y&&{transform:Os({x:H(ie.x,z.x,q.x),y:H(ie.y,z.y,q.y)})}]};D(w,J),D(E,J)}},Ft:A,jt:{Xt:w,Yt:re,Wt:De(D,w)},Jt:{Xt:E,Yt:ae,Wt:De(D,E)}},()=>($t(j,w[0].Lt),$t(j,E[0].Lt),De(Qt,b))]},Z1=(t,n,e,o)=>(r,i,a)=>{const{vt:s,L:l,V:u,gt:f,Gt:d,St:p}=n,{Lt:h,Ut:m,Mt:v}=r,[y,x]=rr(333),[S,b]=rr(444),w=j=>{yn(f.scrollBy)&&f.scrollBy({behavior:"smooth",left:j.x,top:j.y})};let E=!0;return De(Qt,[Xe(v,"pointermove pointerleave",o),Xe(h,"pointerenter",()=>{i(fd,!0)}),Xe(h,"pointerleave pointercancel",()=>{i(fd,!1)}),!u&&Xe(h,"mousedown",()=>{const j=vc();(od(j,Hn)||od(j,lo)||j===document.body)&&pl(De(xc,l),25)}),Xe(h,"wheel",j=>{const{deltaX:_,deltaY:M,deltaMode:F}=j;E&&F===0&&ai(h)===s&&w({x:_,y:M}),E=!1,i(md,!0),y(()=>{E=!0,i(md)}),bc(j)},{T:!1,I:!0}),Xe(h,"pointerdown",()=>{const j=Xe(d,"click",M=>{_(),zp(M)},{A:!0,I:!0,T:!1}),_=Xe(d,"pointerup pointercancel",()=>{_(),setTimeout(j,150)},{I:!0,T:!0})},{I:!0,T:!0}),(()=>{const j="pointerup pointercancel lostpointercapture",_="client"+(a?"X":"Y"),M=a?Wa:za,F=a?"left":"top",D=a?"w":"h",A=a?"x":"y",P=(ae,z)=>ee=>{const{Rt:q}=e,ie=ur(m)[D]-ur(v)[D],J=z*ee/ie*q[A];Sn(f,{[A]:ae+J})},re=[];return Xe(m,"pointerdown",ae=>{const z=ir(ae.target,`.${jl}`)===v,ee=z?v:m,q=t.scrollbars,ie=q[z?"dragScroll":"clickScroll"],{button:J,isPrimary:W,pointerType:Q}=ae,{pointers:Y}=q;if(J===0&&W&&ie&&(Y||[]).includes(Q)){Qt(re),b();const H=!z&&(ae.shiftKey||ie==="instant"),L=De(Ns,v),O=De(Ns,m),I=(C,N)=>(C||L())[F]-(N||O())[F],B=pc(Ns(f)[M])/ur(f)[D]||1,U=P(qt(f)[A],1/B),V=ae[_],se=L(),Z=O(),T=se[M],me=I(se,Z)+T/2,be=V-Z[F],Ie=z?0:be-me,Oe=C=>{Qt(k),ee.releasePointerCapture(C.pointerId)},ke=z||H,ue=p(),k=[Xe(d,j,Oe),Xe(d,"selectstart",C=>bc(C),{T:!1}),Xe(m,j,Oe),ke&&Xe(m,"pointermove",C=>U(Ie+(C[_]-V))),ke&&(()=>{const C=qt(f);ue();const N=qt(f),R={x:N.x-C.x,y:N.y-C.y};(fa(R.x)>3||fa(R.y)>3)&&(p(),Sn(f,C),w(R),S(ue))})];if(ee.setPointerCapture(ae.pointerId),H)U(Ie);else if(!z){const C=jr("__osClickScrollPlugin");if(C){const N=C(U,Ie,T,R=>{R?ue():nt(k,ue)});nt(k,N),nt(re,De(N,!0))}}}})})(),x,b])},q1=t=>{const n=Pn(),{K:e,U:o}=n,{elements:r}=e(),{padding:i,viewport:a,content:s}=r,l=ma(t),u=l?{}:t,{elements:f}=u,{padding:d,viewport:p,content:h}=f||{},m=l?t:u.target,v=_p(m),y=m.ownerDocument,x=y.documentElement,S=()=>y.defaultView||Wt,b=De(G1,[m]),w=De(eh,[m]),E=De(lr,""),j=De(b,E,a),_=De(w,E,s),M=j(p),F=M===m,D=F&&v,A=!F&&_(h),P=!F&&M===A,re=D?x:M,ae=D?re:m,z=!F&&w(E,i,d),ee=!P&&A,q=[ee,re,z,ae].map(Z=>ma(Z)&&!ai(Z)&&Z),ie=Z=>Z&&bp(q,Z),J=!ie(re)&&(Z=>{const T=ur(Z),me=wa(Z),be=In(Z,vl),Ie=In(Z,yl);return me.w-T.w>0&&!ar(be)||me.h-T.h>0&&!ar(Ie)})(re)?re:m,W=D?x:re,Q={dt:m,vt:ae,L:re,rn:z,ht:ee,gt:W,Kt:D?y:re,ln:v?x:J,Gt:y,bt:v,At:l,V:F,an:S,wt:Z=>Cl(re,Hn,Z),yt:(Z,T)=>ya(re,Hn,Z,T),St:()=>ya(W,Hn,"scrolling",!0)},{dt:Y,vt:H,rn:L,L:O,ht:I}=Q,B=[()=>{xn(H,[lo,Ps]),xn(Y,Ps),v&&xn(x,[Ps,lo])}];let U=gc([I,O,L,H,Y].find(Z=>Z&&!ie(Z)));const V=D?Y:I||O,se=De(Qt,B);return[Q,()=>{const Z=S(),T=vc(),me=ue=>{$t(ai(ue),gc(ue)),yr(ue)},be=ue=>Xe(ue,"focusin focusout focus blur",zp,{I:!0,T:!1}),Ie="tabindex",Oe=bl(O,Ie),ke=be(T);return Bn(H,lo,F?"":"host"),Bn(L,Sc,""),Bn(O,Hn,""),Bn(I,dd,""),F||(Bn(O,Ie,Oe||"-1"),v&&Bn(x,ud,"")),$t(V,U),$t(H,L),$t(L||H,!F&&O),$t(O,I),nt(B,[ke,()=>{const ue=vc(),k=ie(O),C=k&&ue===O?Y:ue,N=be(C);xn(L,Sc),xn(I,dd),xn(O,Hn),v&&xn(x,ud),Oe?Bn(O,Ie,Oe):xn(O,Ie),ie(I)&&me(I),k&&me(O),ie(L)&&me(L),xc(C),N()}]),o&&!F&&(xl(O,Hn,Kp),nt(B,De(xn,O,Hn))),xc(!F&&v&&T===Y&&Z.top===Z?O:T),ke(),U=0,se},se]},J1=({ht:t})=>({Qt:n,un:e,It:o})=>{const{$t:r}=n||{},{Ot:i}=e;t&&(r||o)&&si(t,{[za]:i&&"100%"})},X1=({vt:t,rn:n,L:e,V:o},r)=>{const[i,a]=Kt({i:j1,o:ad()},De(ad,t,"padding",""));return({zt:s,Qt:l,un:u,It:f})=>{let[d,p]=a(f);const{U:h}=Pn(),{_t:m,xt:v,Ct:y}=l||{},{B:x}=u,[S,b]=s("paddingAbsolute");(m||p||f||v)&&([d,p]=i(f));const w=!o&&(b||y||p);if(w){const E=!S||!n&&!h,j=d.r+d.l,_=d.t+d.b,M={[jp]:E&&!x?-j:0,[Op]:E?-_:0,[Ep]:E&&x?-j:0,top:E?-d.t:0,right:E?x?-d.r:"auto":0,left:E?x?"auto":-d.l:0,[Wa]:E&&`calc(100% + ${j}px)`},F={[xp]:E?d.t:0,[Cp]:E?d.r:0,[kp]:E?d.b:0,[Sp]:E?d.l:0};si(n||e,M),si(e,F),$e(r,{rn:d,fn:!E,F:n?F:$e({},M,F)})}return{_n:w}}},Q1=(t,n)=>{const e=Pn(),{vt:o,rn:r,L:i,V:a,Kt:s,gt:l,bt:u,yt:f,an:d}=t,{U:p}=e,h=u&&a,m=De(vp,0),v={display:()=>!1,direction:H=>H!=="ltr",flexDirection:H=>H.endsWith("-reverse"),writingMode:H=>H!=="horizontal-tb"},y=vn(v),x={i:Np,o:{w:0,h:0}},S={i:Ki,o:{}},b=H=>{f(Gp,!h&&H)},w=H=>{if(!y.some(T=>{const me=H[T];return me&&v[T](me)}))return{D:{x:0,y:0},M:{x:1,y:1}};b(!0);const O=qt(l),I=f("noContent",!0),B=Xe(s,vr,T=>{const me=qt(l);T.isTrusted&&me.x===O.x&&me.y===O.y&&Wp(T)},{I:!0,A:!0});Sn(l,{x:0,y:0}),I();const U=qt(l),V=wa(l);Sn(l,{x:V.w,y:V.h});const se=qt(l);Sn(l,{x:se.x-U.x<1&&-V.w,y:se.y-U.y<1&&-V.h});const Z=qt(l);return Sn(l,O),fl(()=>B()),{D:U,M:Z}},E=(H,L)=>{const O=Wt.devicePixelRatio%1!=0?1:0,I={w:m(H.w-L.w),h:m(H.h-L.h)};return{w:I.w>O?I.w:0,h:I.h>O?I.h:0}},j=(H,L)=>{const O=(I,B,U,V)=>{const se=I===Wn?mn:(me=>me.replace(`${Wn}-`,""))(I),Z=ar(I),T=ar(U);return!B&&!V?mn:Z&&T?Wn:Z?B&&V?se:B?Wn:mn:B?se:T&&V?Wn:mn};return{x:O(L.x,H.x,L.y,H.y),y:O(L.y,H.y,L.x,H.x)}},_=H=>{const L=I=>[Wn,mn,vr].map(B=>Y(Ec(B),I)),O=L(!0).concat(L()).join(" ");f(O),f(vn(H).map(I=>Y(H[I],I==="x")).join(" "),!0)},[M,F]=Kt(x,De(kl,i)),[D,A]=Kt(x,De(wa,i)),[P,re]=Kt(x),[ae]=Kt(S),[z,ee]=Kt(x),[q]=Kt(S),[ie]=Kt({i:(H,L)=>Ua(H,L,y),o:{}},()=>(H=>!!H&&(L=>!!(L.offsetWidth||L.offsetHeight||L.getClientRects().length))(H))(i)?In(i,y):{}),[J,W]=Kt({i:(H,L)=>Ki(H.D,L.D)&&Ki(H.M,L.M),o:{D:{x:0,y:0},M:{x:0,y:0}}}),Q=jr(Ol),Y=(H,L)=>`${L?A1:T1}${(O=>{const I=String(O||"");return I?I[0].toUpperCase()+I.slice(1):""})(H)}`;return({zt:H,Qt:L,un:O,It:I},{_n:B})=>{const{_t:U,Ht:V,xt:se,Ct:Z,ft:T,Et:me}=L||{},be=Q&&Q.R(t,n,O,e,H),{X:Ie,Y:Oe,W:ke}=be||{},[ue,k]=((rn,qn)=>{const{k:Dn}=qn,[Jn,Mn]=rn("showNativeOverlaidScrollbars");return[Jn&&Dn.x&&Dn.y,Mn]})(H,e),[C,N]=H("overflow"),R=ar(C.x),$=ar(C.y),ce=U||B||se||Z||me||k;let we=F(I),X=A(I),ne=re(I),te=ee(I);if(k&&p&&f(Kp,!ue),ce){Cl(o,lo,qi)&&b(!0);const rn=Oe&&Oe(),[qn]=we=M(I),[Dn]=X=D(I),Jn=Hp(i),Mn=h&&I1(d()),ps={w:m(Dn.w+qn.w),h:m(Dn.h+qn.h)},ki={w:m((Mn?Mn.w:Jn.w+m(Jn.w-Dn.w))+qn.w),h:m((Mn?Mn.h:Jn.h+m(Jn.h-Dn.h))+qn.h)};rn&&rn(),te=z(ki),ne=P(E(ps,ki),I)}const[le,he]=te,[ye,pe]=ne,[oe,Ee]=X,[Re,Pe]=we,[Ce,Ne]=ae({x:ye.w>0,y:ye.h>0}),ge=R&&$&&(Ce.x||Ce.y)||R&&Ce.x&&!Ce.y||$&&Ce.y&&!Ce.x,Se=B||Z||me||Pe||Ee||he||pe||N||k||ce||V&&h,[Me,Ae]=ie(I),Ke=Z||T||Ae||Ne||I,[kt,Vo]=Ke?J(w(Me),I):W();let dn=j(Ce,C);b(!1),Se&&(_(dn),dn=W1(i,Ce),ke&&Ie&&(Ie(dn,oe,Re),si(i,ke(dn))));const[Ot,on]=q(dn);return ya(o,lo,qi,ge),ya(r,Sc,qi,ge),$e(n,{cn:Ot,Vt:{x:le.w,y:le.h},Rt:{x:ye.w,y:ye.h},j:Ce,Dt:P1(kt,ye)}),{sn:on,tn:he,nn:pe,en:Vo||pe}}},ey=t=>{const[n,e,o]=q1(t),r={rn:{t:0,r:0,b:0,l:0},fn:!1,F:{[jp]:0,[Op]:0,[Ep]:0,[xp]:0,[Cp]:0,[kp]:0,[Sp]:0},Vt:{x:0,y:0},Rt:{x:0,y:0},cn:{x:mn,y:mn},j:{x:!1,y:!1},Dt:{D:{x:0,y:0},M:{x:0,y:0}}},{dt:i,gt:a,V:s,St:l}=n,{U:u,k:f}=Pn(),d=!u&&(f.x||f.y),p=[J1(n),X1(n,r),Q1(n,r)];return[e,h=>{const m={},v=d&&qt(a),y=v&&l();return Ze(p,x=>{$e(m,x(h,m)||{})}),Sn(a,v),y&&y(),s||Sn(i,0),m},r,n,o]},ty=(t,n,e,o,r)=>{let i=!1;const a=yd(n,{}),[s,l,u,f,d]=ey(t),[p,h,m]=Y1(f,u,a,w=>{b({},w)}),[v,y,,x]=((w,E,j,_,M,F)=>{let D,A,P,re,ae,z=ii,ee=0;const q=["mouse","pen"],ie=$=>q.includes($.pointerType),[J,W]=rr(),[Q,Y]=rr(100),[H,L]=rr(100),[O,I]=rr(()=>ee),[B,U]=K1(w,M,_,Z1(E,M,_,$=>ie($)&&ue())),{vt:V,Kt:se,bt:Z}=M,{Ft:T,Pt:me,Nt:be,qt:Ie,Bt:Oe}=B,ke=($,ce)=>{if(I(),$)T(hd);else{const we=De(T,hd,!0);ee>0&&!ce?O(we):we()}},ue=()=>{(P?D:re)||(ke(!0),Q(()=>{ke(!1)}))},k=$=>{T(kc,$,!0),T(kc,$,!1)},C=$=>{ie($)&&(D=P,P&&ke(!0))},N=[I,Y,L,W,()=>z(),Xe(V,"pointerover",C,{A:!0}),Xe(V,"pointerenter",C),Xe(V,"pointerleave",$=>{ie($)&&(D=!1,P&&ke(!1))}),Xe(V,"pointermove",$=>{ie($)&&A&&ue()}),Xe(se,"scroll",$=>{J(()=>{be(),ue()}),F($),Oe()})],R=jr(Ol);return[()=>De(Qt,nt(N,U())),({zt:$,It:ce,Qt:we,Zt:X})=>{const{tn:ne,nn:te,sn:le,en:he}=X||{},{Ct:ye,ft:pe}=we||{},{B:oe}=j,{k:Ee,U:Re}=Pn(),{cn:Pe,j:Ce}=_,[Ne,ge]=$("showNativeOverlaidScrollbars"),[Se,Me]=$("scrollbars.theme"),[Ae,Ke]=$("scrollbars.visibility"),[kt,Vo]=$("scrollbars.autoHide"),[dn,Ot]=$("scrollbars.autoHideSuspend"),[on]=$("scrollbars.autoHideDelay"),[rn,qn]=$("scrollbars.dragScroll"),[Dn,Jn]=$("scrollbars.clickScroll"),[Mn,ps]=$("overflow"),ki=pe&&!ce,fv=Ce.x||Ce.y,pv=ne||te||he||ye||ce,hv=le||Ke||ps,mv=Ne&&Ee.x&&Ee.y,xu=!Re&&!R,gv=mv||xu,Cu=(hs,ms,vv)=>{const Su=hs.includes(vr)&&(Ae===Wn||Ae==="auto"&&ms===vr);return T(F1,Su,vv),Su};if(ee=on,ki&&(dn&&fv?(k(!1),z(),H(()=>{z=Xe(se,"scroll",De(k,!0),{A:!0})})):k(!0)),(ge||xu)&&T("os-theme-none",gv),Me&&(T(ae),T(Se,!0),ae=Se),Ot&&!dn&&k(!0),Vo&&(A=kt==="move",P=kt==="leave",re=kt==="never",ke(re,!0)),qn&&T($1,rn),Jn&&T(H1,!!Dn),hv){const hs=Cu(Mn.x,Pe.x,!0),ms=Cu(Mn.y,Pe.y,!1);T(B1,!(hs&&ms))}pv&&(be(),me(),Oe(),he&&Ie(),T(pd,!Ce.x,!0),T(pd,!Ce.y,!1),T(_1,oe&&!Z))},{},B]})(t,n,m,u,f,r),S=w=>vn(w).some(E=>!!w[E]),b=(w,E)=>{if(e())return!1;const{dn:j,It:_,Tt:M,pn:F}=w,D=j||{},A=!!_||!i,P={zt:yd(n,D,A),dn:D,It:A};if(F)return y(P),!1;const re=E||h($e({},P,{Tt:M})),ae=l($e({},P,{un:m,Qt:re}));y($e({},P,{Qt:re,Zt:ae}));const z=S(re),ee=S(ae),q=z||ee||!wl(D)||A;return i=!0,q&&o(w,{Qt:re,Zt:ae}),q};return[()=>{const{ln:w,gt:E,St:j}=f,_=qt(w),M=[p(),s(),v()],F=j();return Sn(E,_),F(),De(Qt,M)},b,()=>({vn:m,gn:u}),{hn:f,bn:x},d]},jc=new WeakMap,th=t=>jc.get(t),fn=(t,n,e)=>{const{tt:o}=Pn(),r=ma(t),i=r?t:t.target,a=th(i);if(n&&!a){let s=!1;const l=[],u={},f=D=>{const A=Pp(D),P=jr("__osOptionsValidationPlugin");return P?P(A,!0):A},d=$e({},o(),f(n)),[p,h,m]=Cc(),[v,y,x]=Cc(e),S=(D,A)=>{x(D,A),m(D,A)},[b,w,E,j,_]=ty(t,d,()=>s,({dn:D,It:A},{Qt:P,Zt:re})=>{const{_t:ae,Ct:z,$t:ee,xt:q,Ht:ie,ft:J}=P,{tn:W,nn:Q,sn:Y,en:H}=re;S("updated",[F,{updateHints:{sizeChanged:!!ae,directionChanged:!!z,heightIntrinsicChanged:!!ee,overflowEdgeChanged:!!W,overflowAmountChanged:!!Q,overflowStyleChanged:!!Y,scrollCoordinatesChanged:!!H,contentMutation:!!q,hostMutation:!!ie,appear:!!J},changedOptions:D||{},force:!!A}])},D=>S("scroll",[F,D])),M=D=>{(A=>{jc.delete(A)})(i),Qt(l),s=!0,S("destroyed",[F,D]),h(),y()},F={options(D,A){if(D){const P=A?o():{},re=qp(d,$e(P,f(D)));wl(re)||($e(d,re),w({dn:re}))}return $e({},d)},on:v,off:(D,A)=>{D&&A&&y(D,A)},state(){const{vn:D,gn:A}=E(),{B:P}=D,{Vt:re,Rt:ae,cn:z,j:ee,rn:q,fn:ie,Dt:J}=A;return $e({},{overflowEdge:re,overflowAmount:ae,overflowStyle:z,hasOverflow:ee,scrollCoordinates:{start:J.D,end:J.M},padding:q,paddingAbsolute:ie,directionRTL:P,destroyed:s})},elements(){const{dt:D,vt:A,rn:P,L:re,ht:ae,gt:z,Kt:ee}=j.hn,{jt:q,Jt:ie}=j.bn,J=Q=>{const{Mt:Y,Ut:H,Lt:L}=Q;return{scrollbar:L,track:H,handle:Y}},W=Q=>{const{Xt:Y,Yt:H}=Q,L=J(Y[0]);return $e({},L,{clone:()=>{const O=J(H());return w({pn:!0}),O}})};return $e({},{target:D,host:A,padding:P||re,viewport:re,content:ae||re,scrollOffsetElement:z,scrollEventElement:ee,scrollbarHorizontal:W(q),scrollbarVertical:W(ie)})},update:D=>w({It:D,Tt:!0}),destroy:De(M,!1),plugin:D=>u[vn(D)[0]]};return nt(l,[_]),((D,A)=>{jc.set(D,A)})(i,F),Yp(Up,fn,[F,p,u]),((D,A)=>{const{nativeScrollbarsOverlaid:P,body:re}=A||{},{k:ae,U:z,K:ee}=Pn(),{nativeScrollbarsOverlaid:q,body:ie}=ee().cancel,J=P??q,W=hl(re)?ie:re,Q=(ae.x||ae.y)&&J,Y=D&&(Ba(W)?!z:W);return!!Q||!!Y})(j.hn.bt,!r&&t.cancel)?(M(!0),F):(nt(l,b()),S("initialized",[F]),F.update(),F)}return a};fn.plugin=t=>{const n=gn(t),e=n?t:[t],o=e.map(r=>Yp(r,fn)[0]);return(r=>{Ze(r,i=>Ze(i,(a,s)=>{Up[s]=i[s]}))})(e),n?o:o[0]},fn.valid=t=>{const n=t&&t.elements,e=yn(n)&&n();return ha(e)&&!!th(e.target)},fn.env=()=>{const{P:t,k:n,U:e,J:o,ot:r,st:i,K:a,Z:s,tt:l,nt:u}=Pn();return $e({},{scrollbarsSize:t,scrollbarsOverlaid:n,scrollbarsHiding:e,scrollTimeline:o,staticDefaultInitialization:r,staticDefaultOptions:i,getDefaultInitialization:a,setDefaultInitialization:s,getDefaultOptions:l,setDefaultOptions:u})},fn.nonce=t=>{Jp=t},fn.trustedTypePolicy=t=>{Lp=t};const ny=()=>{if(typeof window>"u"){const u=()=>{};return[u,u]}let t,n;const e=window,o=typeof e.requestIdleCallback=="function",r=e.requestAnimationFrame,i=e.cancelAnimationFrame,a=o?e.requestIdleCallback:r,s=o?e.cancelIdleCallback:i,l=()=>{s(t),i(n)};return[(u,f)=>{l(),t=a(o?()=>{l(),n=r(u)}:u,typeof f=="object"?f:{timeout:2233})},l]},nh=t=>{const{options:n,events:e,defer:o}=t||{},[r,i]=g.useMemo(ny,[]),a=g.useRef(null),s=g.useRef(o),l=g.useRef(n),u=g.useRef(e);return g.useEffect(()=>{s.current=o},[o]),g.useEffect(()=>{const{current:f}=a;l.current=n,fn.valid(f)&&f.options(n||{},!0)},[n]),g.useEffect(()=>{const{current:f}=a;u.current=e,fn.valid(f)&&f.on(e||{},!0)},[e]),g.useEffect(()=>()=>{var f;i(),(f=a.current)==null||f.destroy()},[]),g.useMemo(()=>[f=>{const d=a.current;if(fn.valid(d))return;const p=s.current,h=l.current||{},m=u.current||{},v=()=>a.current=fn(f,h,m);p?r(v,p):v()},()=>a.current],[])};g.forwardRef((t,n)=>{const{element:e="div",options:o,events:r,defer:i,children:a,...s}=t,l=e,u=g.useRef(null),f=g.useRef(null),[d,p]=nh({options:o,events:r,defer:i});return g.useEffect(()=>{const{current:h}=u,{current:m}=f;if(h)return d(e==="body"?{target:h,cancel:{body:null}}:{target:h,elements:{viewport:m,content:m}}),()=>{var v;return(v=p())==null?void 0:v.destroy()}},[d,e]),g.useImperativeHandle(n,()=>({osInstance:p,getElement:()=>u.current}),[]),g.createElement(l,{"data-overlayscrollbars-initialize":"",ref:u,...s},e==="body"?a:g.createElement("div",{"data-overlayscrollbars-contents":"",ref:f},a))});const Wo=g.forwardRef((t,n)=>{const{children:e,element:o="div",elementProps:r,wrapperClassName:i}=t,a=g.useRef(null),s=g.useRef(null),[l,u]=nh({options:{scrollbars:{autoHide:"leave",autoHideDelay:0}},defer:!0}),f=g.useCallback(d=>{s.current=d,typeof n=="function"?n(d):n!==null&&(n.current=d)},[n]);return g.useEffect(()=>{if(s.current&&a.current)return l({target:a.current,elements:{viewport:s.current,content:s.current}}),()=>{var d;return(d=u())==null?void 0:d.destroy()}},[l,u]),c.jsx("div",{"data-overlayscrollbars-initialize":"",ref:a,className:de("io-overlay-scrollbars-container",i),children:c.jsx(o,{"data-overlayscrollbars-contents":"",ref:f,...r,children:e})})});function Ga({text:t="Label",...n}){return c.jsx("label",{...n,children:t})}const Bo=g.forwardRef(({id:t="input",className:n,type:e="text",name:o="input",align:r="up",label:i,iconPrepend:a,iconPrependOnClick:s,iconAppend:l,iconAppendOnClick:u,placeholder:f,disabled:d,readOnly:p,errorMessage:h,errorDataTestId:m,...v},y)=>{const x=de("io-control-input",a&&"io-control-leading-icon",l&&"io-control-trailing-icon",d&&"io-control-disabled",p&&"io-control-readonly",h&&"io-control-error",r&&[`direction-${r}`],n),S=g.useCallback(w=>{d?w.preventDefault():s&&s(w)},[s,d]),b=g.useCallback(w=>{d?w.preventDefault():u&&u(w)},[u,d]);return c.jsxs("div",{className:x,children:[i&&c.jsx(Ga,{htmlFor:t,text:i}),a&&c.jsx(lt,{variant:a,onClick:w=>S(w)}),c.jsx("input",{id:t,className:"io-input",ref:y,type:e,name:o,tabIndex:0,placeholder:f??(()=>{switch(e){case"email":return"Enter your email here...";case"number":return"Enter number here...";case"password":return"Enter your password here...";case"tel":return"Enter your phone number here...";case"file":return"Select a file...";default:return"Enter text here..."}})(),"aria-label":i,disabled:d,readOnly:p,...h?{"aria-invalid":!0,"aria-describedby":`${t}-error`}:{},...v}),l&&c.jsx(lt,{variant:l,onClick:w=>b(w)}),h&&c.jsxs("div",{"data-testid":m,id:`${t}-error`,className:"io-input-error",children:[c.jsx(lt,{variant:"close"}),h]})]})});Bo.displayName="Input";const Ka=g.forwardRef(({id:t="textarea",className:n,name:e="textarea",align:o="up",label:r,rows:i=4,placeholder:a="Enter text here...",disabled:s,readOnly:l,...u},f)=>{const d=de("io-control-textarea",s&&"io-control-disabled",l&&"io-control-readonly",o&&[`direction-${o}`],n);return c.jsxs("div",{className:d,children:[r&&c.jsx(Ga,{htmlFor:t,text:r}),c.jsx("textarea",{id:t,className:"io-textarea",ref:f,name:e,tabIndex:0,placeholder:a,"aria-label":r,disabled:s,readOnly:l,rows:i,...u})]})});Ka.displayName="Textarea";const Za=g.forwardRef(({id:t="checkbox",className:n,name:e="checkbox",align:o="left",label:r,checked:i,disabled:a,...s},l)=>{const u=de("io-control-checkbox",i&&"io-control-checked",a&&"io-control-disabled",o&&[`direction-${o}`],n);return c.jsxs("div",{className:u,children:[c.jsx("input",{type:"checkbox",id:t,className:"io-checkbox",ref:l,name:e,tabIndex:a?-1:0,checked:i,disabled:a,"aria-checked":i,...s}),r&&c.jsx(Ga,{htmlFor:t,text:r,"data-testid":s["data-testid"]?`${s["data-testid"]}-label`:void 0})]})});Za.displayName="Checkbox";const oy=g.forwardRef(({id:t="radio",className:n,name:e="radio",align:o="left",label:r,checked:i,disabled:a,...s},l)=>{const u=de("io-control-radio",i&&"io-control-checked",a&&"io-control-disabled",o&&[`direction-${o}`],n);return c.jsxs("div",{className:u,children:[c.jsx("input",{type:"radio",id:t,className:"io-radio",ref:l,name:e,tabIndex:a?-1:0,checked:i,disabled:a,"aria-checked":i,...s}),r&&c.jsx(Ga,{htmlFor:t,text:r})]})});oy.displayName="Radio";var ry=g[typeof document<"u"&&document.createElement!==void 0?"useLayoutEffect":"useEffect"],oh=0,iy=()=>oh++,bd=0;const ay=typeof g.useId=="function"?g.useId:function(t,n){n===void 0&&(n="🅰");var[e,o]=g.useState(bd?iy:void 0);return ry(()=>{e===void 0&&o(oh++),bd=1},[]),t||(e===void 0?e:n+e)},vt=g.forwardRef(({id:t,className:n,name:e="toggle",align:o="left",label:r,checked:i,disabled:a,onKeyDown:s,"data-testid":l="toggle",...u},f)=>{const d=ay(),p=t||`toggle-${d}`,h=de("io-control-toggle",i&&"io-control-checked",a&&"io-control-disabled",o&&[`direction-${o}`],n);return c.jsx("div",{className:h,children:c.jsxs("label",{className:"io-toggle",htmlFor:p,tabIndex:a?-1:0,onKeyDown:s,"data-testid":`${l}-label`,children:[c.jsx("input",{type:"checkbox",id:p,className:"io-checkbox",ref:f,name:e,checked:i,disabled:a,"aria-checked":i,tabIndex:-1,"data-testid":l,...u}),c.jsx("span",{className:"slider","data-testid":`${l}-slider`}),r]})})});function rh(t,n=500){const[e,o]=g.useState(t);return g.useEffect(()=>{const r=setTimeout(()=>{o(t)},n);return()=>clearTimeout(r)},[t,n]),e}function sy(t,n){g.useEffect(()=>{const e=o=>{o.code===t&&n()};return document.addEventListener("keyup",e),()=>document.removeEventListener("keyup",e)},[t,n])}vt.displayName="Toggle";const qa=()=>window.glue42gd!==void 0||window.glue42alert!==void 0||window.glue42dialog!==void 0||window.iodesktop!==void 0;function ze(){return g.useMemo(()=>typeof window=="object"&&qa(),[])}const cy=()=>{const t=g.useContext(_e.IOConnectContext),[n,e]=g.useState(null),o=g.useCallback(r=>{var i;return(i=t==null?void 0:t.themes)==null?void 0:i.select(r)},[t]);return g.useEffect(()=>{var a,s;if(!t)return;let r=!1;const i=l=>{r||e(l)};return(a=t.themes)==null||a.onChanged(i),(s=t.themes)==null||s.getCurrent().then(i).catch(console.warn),()=>{r=!0}},[t]),{currentTheme:n,selectTheme:o}};g.createContext({theme:"dark"});const xd="io-connect-platform",Eo="___platform_prefs___",ly="_launchpad_collapsedSections",uy="_launchpad_favorites",dy="_launchpad_isLayoutsPanelOpen",fy="_launchpad_isCollapsed",Oc="_launchpad_isPinned",ih="_launchpad_pinnedPosition",ah="_launchpad_allowDocking",sh="_launchpad_minimizeToTray",ch="_launchpad_autoCloseStartingAppsAndWorkspaces",lh="_launchpad_showTutorialOnStartup",uh="_layouts_restoreLastSaved",dh="_layouts_saveCurrentOnExit",fh="_layouts_showUnsavedChangesPrompt",ph="_layouts_showDeletePrompt",hh="_downloads_askForEachDownload",py="_downloads_location",hy="_system_scheduleRestart",my="_system_scheduleRestartTime",gy="_system_scheduleRestartFrequency",vy="_system_scheduleRestartDay",yy="_system_scheduleShutdown",wy="_system_scheduleShutdownTime",by="_system_scheduleShutdownFrequency",xy="_system_scheduleShutdownDay",Cy={[ly]:[],[uy]:[],[dy]:!1,[fy]:!1,[Oc]:!1,[ih]:"Left",[ah]:!0,[sh]:!1,[ch]:!0,[lh]:!0,[uh]:!0,[dh]:!0,[fh]:!0,[ph]:!0,[hh]:!0,[py]:"",[hy]:!1,[my]:"12:00 AM",[gy]:"daily",[vy]:"Monday",[yy]:!1,[wy]:"12:00 AM",[by]:"daily",[xy]:"Monday"},jo=t=>typeof t=="string"?t:t!=null&&t.message?typeof t.message=="string"?t.message:JSON.stringify(t.message):JSON.stringify(t),Nl="warning",Sy={success:5e3,warning:1e4};var wt=function(t){return{ok:!0,result:t}},ut=function(t){return{ok:!1,error:t}},Cd=function(t,n,e){return n.ok===!1?n:e.ok===!1?e:wt(t(n.result,e.result))},Ts=function(t,n){return n.ok===!0?n:ut(t(n.error))},Nc=function(){return Nc=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},Nc.apply(this,arguments)};function Ic(t,n){if(t===n||t===null&&n===null)return!0;if(typeof t!=typeof n)return!1;if(typeof t=="object"){if(Array.isArray(t)){if(!Array.isArray(n)||t.length!==n.length)return!1;for(var e=0;e<t.length;e++)if(!Ic(t[e],n[e]))return!1;return!0}var o=Object.keys(t);if(o.length!==Object.keys(n).length)return!1;for(e=0;e<o.length;e++)if(!n.hasOwnProperty(o[e])||!Ic(t[o[e]],n[o[e]]))return!1;return!0}}var Yr=function(t){return Array.isArray(t)},Ti=function(t){return typeof t=="object"&&t!==null&&!Yr(t)},_n=function(t,n){return"expected "+t+", got "+function(e){switch(typeof e){case"string":return"a string";case"number":return"a number";case"boolean":return"a boolean";case"undefined":return"undefined";case"object":return e instanceof Array?"an array":e===null?"null":"an object";default:return JSON.stringify(e)}}(n)},Mr=function(t){return t.map(function(n){return typeof n=="string"?"."+n:"["+n+"]"}).join("")},_r=function(t,n){var e=n.at,o=function(r,i){var a={};for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&i.indexOf(s)<0&&(a[s]=r[s]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function"){var l=0;for(s=Object.getOwnPropertySymbols(r);l<s.length;l++)i.indexOf(s[l])<0&&Object.prototype.propertyIsEnumerable.call(r,s[l])&&(a[s[l]]=r[s[l]])}return a}(n,["at"]);return Nc({at:t+(e||"")},o)},pt=function(){function t(n){var e=this;this.decode=n,this.run=function(o){return Ts(function(r){return{kind:"DecoderError",input:o,at:"input"+(r.at||""),message:r.message||""}},e.decode(o))},this.runPromise=function(o){return function(r){return r.ok===!0?Promise.resolve(r.result):Promise.reject(r.error)}(e.run(o))},this.runWithException=function(o){return function(r){if(r.ok===!0)return r.result;throw r.error}(e.run(o))},this.map=function(o){return new t(function(r){return function(i,a){return a.ok===!0?wt(i(a.result)):a}(o,e.decode(r))})},this.andThen=function(o){return new t(function(r){return function(i,a){return a.ok===!0?i(a.result):a}(function(i){return o(i).decode(r)},e.decode(r))})},this.where=function(o,r){return e.andThen(function(i){return o(i)?t.succeed(i):t.fail(r)})}}return t.string=function(){return new t(function(n){return typeof n=="string"?wt(n):ut({message:_n("a string",n)})})},t.number=function(){return new t(function(n){return typeof n=="number"?wt(n):ut({message:_n("a number",n)})})},t.boolean=function(){return new t(function(n){return typeof n=="boolean"?wt(n):ut({message:_n("a boolean",n)})})},t.constant=function(n){return new t(function(e){return Ic(e,n)?wt(n):ut({message:"expected "+JSON.stringify(n)+", got "+JSON.stringify(e)})})},t.object=function(n){return new t(function(e){if(Ti(e)&&n){var o={};for(var r in n)if(n.hasOwnProperty(r)){var i=n[r].decode(e[r]);if(i.ok!==!0)return e[r]===void 0?ut({message:"the key '"+r+"' is required but was not present"}):ut(_r("."+r,i.error));i.result!==void 0&&(o[r]=i.result)}return wt(o)}return Ti(e)?wt(e):ut({message:_n("an object",e)})})},t.array=function(n){return new t(function(e){return Yr(e)&&n?e.reduce(function(o,r,i){return Cd(function(a,s){return a.concat([s])},o,function(a,s){return Ts(function(l){return _r("["+s+"]",l)},n.decode(a))}(r,i))},wt([])):Yr(e)?wt(e):ut({message:_n("an array",e)})})},t.tuple=function(n){return new t(function(e){if(Yr(e)){if(e.length!==n.length)return ut({message:"expected a tuple of length "+n.length+", got one of length "+e.length});for(var o=[],r=0;r<n.length;r++){var i=n[r].decode(e[r]);if(!i.ok)return ut(_r("["+r+"]",i.error));o[r]=i.result}return wt(o)}return ut({message:_n("a tuple of length "+n.length,e)})})},t.union=function(n,e){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];return t.oneOf.apply(t,[n,e].concat(o))},t.intersection=function(n,e){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];return new t(function(i){return[n,e].concat(o).reduce(function(a,s){return Cd(Object.assign,a,s.decode(i))},wt({}))})},t.anyJson=function(){return new t(function(n){return wt(n)})},t.unknownJson=function(){return new t(function(n){return wt(n)})},t.dict=function(n){return new t(function(e){if(Ti(e)){var o={};for(var r in e)if(e.hasOwnProperty(r)){var i=n.decode(e[r]);if(i.ok!==!0)return ut(_r("."+r,i.error));o[r]=i.result}return wt(o)}return ut({message:_n("an object",e)})})},t.optional=function(n){return new t(function(e){return e==null?wt(void 0):n.decode(e)})},t.oneOf=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return new t(function(o){for(var r=[],i=0;i<n.length;i++){var a=n[i].decode(o);if(a.ok===!0)return a;r[i]=a.error}var s=r.map(function(l){return"at error"+(l.at||"")+": "+l.message}).join('", "');return ut({message:'expected a value matching one of the decoders, got the errors ["'+s+'"]'})})},t.withDefault=function(n,e){return new t(function(o){return wt(function(r,i){return i.ok===!0?i.result:r}(n,e.decode(o)))})},t.valueAt=function(n,e){return new t(function(o){for(var r=o,i=0;i<n.length;i++){if(r===void 0)return ut({at:Mr(n.slice(0,i+1)),message:"path does not exist"});if(typeof n[i]=="string"&&!Ti(r))return ut({at:Mr(n.slice(0,i+1)),message:_n("an object",r)});if(typeof n[i]=="number"&&!Yr(r))return ut({at:Mr(n.slice(0,i+1)),message:_n("an array",r)});r=r[n[i]]}return Ts(function(a){return r===void 0?{at:Mr(n),message:"path does not exist"}:_r(Mr(n),a)},e.decode(r))})},t.succeed=function(n){return new t(function(e){return wt(n)})},t.fail=function(n){return new t(function(e){return ut({message:n})})},t.lazy=function(n){return new t(function(e){return n().decode(e)})},t}(),mh=pt.string;pt.number;var Rt=pt.boolean,gh=pt.anyJson;pt.unknownJson;var K=pt.constant,vh=pt.object,Pc=pt.array;pt.tuple,pt.dict;var Ye=pt.optional,Ja=pt.oneOf;pt.union,pt.intersection,pt.withDefault,pt.valueAt,pt.succeed,pt.fail,pt.lazy;const Sd=["name","title","version","customProperties","icon","caption","type"],ky=["appId","name","type","details","version","title","tooltip","lang","description","categories","icons","screenshots","contactEmail","moreInfo","publisher","customConfig","hostManifests","interop","localizedVersions"];var bt=function(t){return{ok:!0,result:t}},dt=function(t){return{ok:!1,error:t}},kd=function(t,n,e){return n.ok===!1?n:e.ok===!1?e:bt(t(n.result,e.result))},Ds=function(t,n){return n.ok===!0?n:dt(t(n.error))},Ac=function(){return Ac=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},Ac.apply(this,arguments)};function Tc(t,n){if(t===n||t===null&&n===null)return!0;if(typeof t!=typeof n)return!1;if(typeof t=="object"){if(Array.isArray(t)){if(!Array.isArray(n)||t.length!==n.length)return!1;for(var e=0;e<t.length;e++)if(!Tc(t[e],n[e]))return!1;return!0}var o=Object.keys(t);if(o.length!==Object.keys(n).length)return!1;for(e=0;e<o.length;e++)if(!n.hasOwnProperty(o[e])||!Tc(t[o[e]],n[o[e]]))return!1;return!0}}var Gr=function(t){return Array.isArray(t)},Di=function(t){return typeof t=="object"&&t!==null&&!Gr(t)},Ln=function(t,n){return"expected "+t+", got "+function(e){switch(typeof e){case"string":return"a string";case"number":return"a number";case"boolean":return"a boolean";case"undefined":return"undefined";case"object":return e instanceof Array?"an array":e===null?"null":"an object";default:return JSON.stringify(e)}}(n)},Lr=function(t){return t.map(function(n){return typeof n=="string"?"."+n:"["+n+"]"}).join("")},Rr=function(t,n){var e=n.at,o=function(r,i){var a={};for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&i.indexOf(s)<0&&(a[s]=r[s]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function"){var l=0;for(s=Object.getOwnPropertySymbols(r);l<s.length;l++)i.indexOf(s[l])<0&&Object.prototype.propertyIsEnumerable.call(r,s[l])&&(a[s[l]]=r[s[l]])}return a}(n,["at"]);return Ac({at:t+(e||"")},o)},ht=function(){function t(n){var e=this;this.decode=n,this.run=function(o){return Ds(function(r){return{kind:"DecoderError",input:o,at:"input"+(r.at||""),message:r.message||""}},e.decode(o))},this.runPromise=function(o){return function(r){return r.ok===!0?Promise.resolve(r.result):Promise.reject(r.error)}(e.run(o))},this.runWithException=function(o){return function(r){if(r.ok===!0)return r.result;throw r.error}(e.run(o))},this.map=function(o){return new t(function(r){return function(i,a){return a.ok===!0?bt(i(a.result)):a}(o,e.decode(r))})},this.andThen=function(o){return new t(function(r){return function(i,a){return a.ok===!0?i(a.result):a}(function(i){return o(i).decode(r)},e.decode(r))})},this.where=function(o,r){return e.andThen(function(i){return o(i)?t.succeed(i):t.fail(r)})}}return t.string=function(){return new t(function(n){return typeof n=="string"?bt(n):dt({message:Ln("a string",n)})})},t.number=function(){return new t(function(n){return typeof n=="number"?bt(n):dt({message:Ln("a number",n)})})},t.boolean=function(){return new t(function(n){return typeof n=="boolean"?bt(n):dt({message:Ln("a boolean",n)})})},t.constant=function(n){return new t(function(e){return Tc(e,n)?bt(n):dt({message:"expected "+JSON.stringify(n)+", got "+JSON.stringify(e)})})},t.object=function(n){return new t(function(e){if(Di(e)&&n){var o={};for(var r in n)if(n.hasOwnProperty(r)){var i=n[r].decode(e[r]);if(i.ok!==!0)return e[r]===void 0?dt({message:"the key '"+r+"' is required but was not present"}):dt(Rr("."+r,i.error));i.result!==void 0&&(o[r]=i.result)}return bt(o)}return Di(e)?bt(e):dt({message:Ln("an object",e)})})},t.array=function(n){return new t(function(e){return Gr(e)&&n?e.reduce(function(o,r,i){return kd(function(a,s){return a.concat([s])},o,function(a,s){return Ds(function(l){return Rr("["+s+"]",l)},n.decode(a))}(r,i))},bt([])):Gr(e)?bt(e):dt({message:Ln("an array",e)})})},t.tuple=function(n){return new t(function(e){if(Gr(e)){if(e.length!==n.length)return dt({message:"expected a tuple of length "+n.length+", got one of length "+e.length});for(var o=[],r=0;r<n.length;r++){var i=n[r].decode(e[r]);if(!i.ok)return dt(Rr("["+r+"]",i.error));o[r]=i.result}return bt(o)}return dt({message:Ln("a tuple of length "+n.length,e)})})},t.union=function(n,e){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];return t.oneOf.apply(t,[n,e].concat(o))},t.intersection=function(n,e){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];return new t(function(i){return[n,e].concat(o).reduce(function(a,s){return kd(Object.assign,a,s.decode(i))},bt({}))})},t.anyJson=function(){return new t(function(n){return bt(n)})},t.unknownJson=function(){return new t(function(n){return bt(n)})},t.dict=function(n){return new t(function(e){if(Di(e)){var o={};for(var r in e)if(e.hasOwnProperty(r)){var i=n.decode(e[r]);if(i.ok!==!0)return dt(Rr("."+r,i.error));o[r]=i.result}return bt(o)}return dt({message:Ln("an object",e)})})},t.optional=function(n){return new t(function(e){return e==null?bt(void 0):n.decode(e)})},t.oneOf=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return new t(function(o){for(var r=[],i=0;i<n.length;i++){var a=n[i].decode(o);if(a.ok===!0)return a;r[i]=a.error}var s=r.map(function(l){return"at error"+(l.at||"")+": "+l.message}).join('", "');return dt({message:'expected a value matching one of the decoders, got the errors ["'+s+'"]'})})},t.withDefault=function(n,e){return new t(function(o){return bt(function(r,i){return i.ok===!0?i.result:r}(n,e.decode(o)))})},t.valueAt=function(n,e){return new t(function(o){for(var r=o,i=0;i<n.length;i++){if(r===void 0)return dt({at:Lr(n.slice(0,i+1)),message:"path does not exist"});if(typeof n[i]=="string"&&!Di(r))return dt({at:Lr(n.slice(0,i+1)),message:Ln("an object",r)});if(typeof n[i]=="number"&&!Gr(r))return dt({at:Lr(n.slice(0,i+1)),message:Ln("an array",r)});r=r[n[i]]}return Ds(function(a){return r===void 0?{at:Lr(n),message:"path does not exist"}:Rr(Lr(n),a)},e.decode(r))})},t.succeed=function(n){return new t(function(e){return bt(n)})},t.fail=function(n){return new t(function(e){return dt({message:n})})},t.lazy=function(n){return new t(function(e){return n().decode(e)})},t}(),ci=ht.string,Dc=ht.number,Ey=ht.boolean,Vn=ht.anyJson;ht.unknownJson;var Fr=ht.constant,Et=ht.object,ct=ht.array;ht.tuple;var Mc=ht.dict,ve=ht.optional,yh=ht.oneOf;ht.union,ht.intersection,ht.withDefault,ht.valueAt,ht.succeed,ht.fail,ht.lazy;const je=ci().where(t=>t.length>0,"Expected a non-empty string"),_c=Dc().where(t=>t>=0,"Expected a non-negative number"),jy=Vn().andThen(t=>t instanceof RegExp?Vn():fail("expected a regex, got a "+typeof t)),wh=Et({name:je,displayName:ve(ci()),contexts:ve(ct(ci())),customConfig:ve(Et())}),Oy=yh(Fr("web"),Fr("native"),Fr("citrix"),Fr("onlineNative"),Fr("other")),bh=Et({url:je}),xh=Et({src:je,size:ve(je),type:ve(je)}),Ch=Et({src:je,size:ve(je),type:ve(je),label:ve(je)}),Ny=Et({contexts:ct(je),displayName:ve(je),resultType:ve(je),customConfig:ve(Vn())}),Iy=Et({listensFor:ve(Mc(Ny)),raises:ve(Mc(ct(je)))}),Py=Et({broadcasts:ve(ct(je)),listensFor:ve(ct(je))}),Ay=Et({name:je,description:ve(je),broadcasts:ve(ct(je)),listensFor:ve(ct(je))}),Sh=Et({intents:ve(Iy),userChannels:ve(Py),appChannels:ve(ct(Ay))}),Ty=Et({url:ve(je),top:ve(Dc()),left:ve(Dc()),width:ve(_c),height:ve(_c)}),Dy=Et({name:ve(je),type:ve(je.where(t=>t==="window","Expected a value of window")),title:ve(je),version:ve(je),customProperties:ve(Vn()),icon:ve(ci()),caption:ve(ci()),details:ve(Ty),intents:ve(ct(wh)),hidden:ve(Ey())}),kh=Et({name:je,appId:je,title:ve(je),version:ve(je),manifest:je,manifestType:je,tooltip:ve(je),description:ve(je),contactEmail:ve(je),supportEmail:ve(je),publisher:ve(je),images:ve(ct(Et({url:ve(je)}))),icons:ve(ct(Et({icon:ve(je)}))),customConfig:Vn(),intents:ve(ct(wh))}),My=Et({appId:ve(je),name:ve(je),details:ve(bh),version:ve(je),title:ve(je),tooltip:ve(je),lang:ve(je),description:ve(je),categories:ve(ct(je)),icons:ve(ct(xh)),screenshots:ve(ct(Ch)),contactEmail:ve(je),supportEmail:ve(je),moreInfo:ve(je),publisher:ve(je),customConfig:ve(ct(Vn())),hostManifests:ve(Vn()),interop:ve(Sh)}),Eh=Et({appId:je,name:ve(je),type:Oy,details:bh,version:ve(je),title:ve(je),tooltip:ve(je),lang:ve(je),description:ve(je),categories:ve(ct(je)),icons:ve(ct(xh)),screenshots:ve(ct(Ch)),contactEmail:ve(je),supportEmail:ve(je),moreInfo:ve(je),publisher:ve(je),customConfig:ve(ct(Vn())),hostManifests:ve(Vn()),interop:ve(Sh),localizedVersions:ve(Mc(My))}),Ji=yh(kh,Eh),Mi=t=>`${t.kind} at ${t.at}: ${JSON.stringify(t.input)}. Reason - ${t.message}`;class _y{constructor(){Mt(this,"fdc3ToDesktopDefinitionType",{web:"window",native:"exe",citrix:"citrix",onlineNative:"clickonce",other:"window"})}toApi(){return{isFdc3Definition:this.isFdc3Definition.bind(this),parseToBrowserBaseAppData:this.parseToBrowserBaseAppData.bind(this),parseToDesktopAppConfig:this.parseToDesktopAppConfig.bind(this)}}isFdc3Definition(n){const e=Ji.run(n);return e.ok?n.appId&&n.details?{isFdc3:!0,version:"2.0"}:n.manifest?{isFdc3:!0,version:"1.2"}:{isFdc3:!1,reason:"The passed definition is not FDC3"}:{isFdc3:!1,reason:Mi(e.error)}}parseToBrowserBaseAppData(n){var f,d;const{isFdc3:e,version:o}=this.isFdc3Definition(n);if(!e)throw new Error("The passed definition is not FDC3");const r=Ji.run(n);if(!r.ok)throw new Error(`Invalid FDC3 ${o} definition. Error: ${Mi(r.error)}`);const i=this.getUserPropertiesFromDefinition(n,o),a={url:this.getUrl(n,o)},s={name:n.appId,type:"window",createOptions:a,userProperties:{...i,intents:o==="1.2"?i.intents:this.getIntentsFromV2AppDefinition(n),details:a},title:n.title,version:n.version,icon:this.getIconFromDefinition(n,o),caption:n.description,fdc3:o==="2.0"?{...n,definitionVersion:"2.0"}:void 0},l=((f=n.hostManifests)==null?void 0:f.ioConnect)||((d=n.hostManifests)==null?void 0:d.Glue42);if(!l)return s;const u=Dy.run(l);if(!u.ok)throw new Error(`Invalid FDC3 ${o} definition. Error: ${Mi(u.error)}`);return Object.keys(u.result).length?this.mergeBaseAppDataWithGlueManifest(s,u.result):s}parseToDesktopAppConfig(n){var l,u,f;const{isFdc3:e,version:o}=this.isFdc3Definition(n);if(!e)throw new Error("The passed definition is not FDC3");const r=Ji.run(n);if(!r.ok)throw new Error(`Invalid FDC3 ${o} definition. Error: ${Mi(r.error)}`);if(o==="1.2"){const d=n;return{name:d.appId,type:"window",details:{url:this.getUrl(n,o)},version:d.version,title:d.title,tooltip:d.tooltip,caption:d.description,icon:(l=d.icons)==null?void 0:l[0].icon,intents:d.intents,customProperties:{manifestType:d.manifestType,images:d.images,contactEmail:d.contactEmail,supportEmail:d.supportEmail,publisher:d.publisher,icons:d.icons,customConfig:d.customConfig}}}const i=n,a={name:i.appId,type:this.fdc3ToDesktopDefinitionType[i.type],details:i.details,version:i.version,title:i.title,tooltip:i.tooltip,caption:i.description,icon:this.getIconFromDefinition(i,"2.0"),intents:this.getIntentsFromV2AppDefinition(i),fdc3:{...i,definitionVersion:"2.0"}},s=((u=n.hostManifests)==null?void 0:u.ioConnect)||((f=n.hostManifests)==null?void 0:f.Glue42);if(!s)return a;if(typeof s!="object"||Array.isArray(s))throw new Error(`Invalid '${n.hostManifests.ioConnect?"hostManifests.ioConnect":"hostManifests['Glue42']"}' key`);return this.mergeDesktopConfigWithGlueManifest(a,s)}getUserPropertiesFromDefinition(n,e){return Object.fromEntries(e==="1.2"?Object.entries(n).filter(([o])=>!Sd.includes(o)):Object.entries(n).filter(([o])=>!Sd.includes(o)&&!ky.includes(o)))}getUrl(n,e){var r,i;let o;if(e==="1.2"){const a=JSON.parse(n.manifest);o=((r=a.details)==null?void 0:r.url)||a.url}else o=(i=n.details)==null?void 0:i.url;if(!o||typeof o!="string")throw new Error(`Invalid FDC3 ${e} definition. Provide valid 'url' under '${e==="1.2"?"manifest":"details"}' key`);return o}getIntentsFromV2AppDefinition(n){var o,r;const e=(r=(o=n.interop)==null?void 0:o.intents)==null?void 0:r.listensFor;if(e)return Object.entries(e).map(i=>{const[a,s]=i;return{name:a,...s}})}getIconFromDefinition(n,e){var o,r,i,a;return e==="1.2"?((r=(o=n.icons)==null?void 0:o.find(s=>s.icon))==null?void 0:r.icon)||void 0:((a=(i=n.icons)==null?void 0:i.find(s=>s.src))==null?void 0:a.src)||void 0}mergeBaseAppDataWithGlueManifest(n,e){let o=n;if(e.customProperties&&(o.userProperties={...n.userProperties,...e.customProperties}),e.details){const r={...n.createOptions,...e.details};o.createOptions=r,o.userProperties.details=r}return Array.isArray(e.intents)&&(o.userProperties.intents=(o.userProperties.intents||[]).concat(e.intents)),o={...o,...e},delete o.details,delete o.intents,o}mergeDesktopConfigWithGlueManifest(n,e){const o=Object.assign({},n,e,{details:{...n.details,...e.details}});return Array.isArray(e.intents)&&(o.intents=(n.intents||[]).concat(e.intents)),o}}const Ly={common:{nonEmptyStringDecoder:je,nonNegativeNumberDecoder:_c,regexDecoder:jy},fdc3:{allDefinitionsDecoder:Ji,v1DefinitionDecoder:kh,v2DefinitionDecoder:Eh}};var Lc;(function(t){t.USER_CANCELLED="User Closed Intents Resolver UI without choosing a handler",t.CALLER_NOT_DEFINED="Caller Id is not defined",t.TIMEOUT_HIT="Timeout hit",t.INTENT_NOT_FOUND="Cannot find Intent",t.HANDLER_NOT_FOUND="Cannot find Intent Handler",t.TARGET_INSTANCE_UNAVAILABLE="Cannot start Target Instance",t.INTENT_DELIVERY_FAILED="Target Instance did not add a listener",t.RESOLVER_UNAVAILABLE="Intents Resolver UI unavailable",t.RESOLVER_TIMEOUT="User did not choose a handler",t.INVALID_RESOLVER_RESPONSE="Intents Resolver UI returned invalid response",t.INTENT_HANDLER_REJECTION="Intent Handler function processing the raised intent threw an error or rejected the promise it returned"})(Lc||(Lc={}));const Il=new class{constructor(){Mt(this,"_fdc3");Mt(this,"_decoders",Ly);Mt(this,"_errors",{intents:Lc})}get fdc3(){return this._fdc3||(this._fdc3=new _y().toApi()),this._fdc3}get decoders(){return this._decoders}get errors(){return this._errors}};Il.fdc3;const Ry=Il.decoders;Il.errors;const Po=Ry.common.nonEmptyStringDecoder,Fy=Ja(K("add"),K("align-bottom"),K("align-bottom-solid"),K("align-left"),K("align-left-bottom"),K("align-left-bottom-solid"),K("align-left-solid"),K("align-left-top"),K("align-left-top-solid"),K("align-right"),K("align-right-bottom"),K("align-right-bottom-solid"),K("align-right-solid"),K("align-right-top"),K("align-right-top-solid"),K("align-top"),K("align-top-solid"),K("always-on-top"),K("always-on-top-on"),K("application"),K("arrow-down-long"),K("arrow-down-to-bracket"),K("arrow-left-long"),K("arrow-right-from-bracket"),K("arrow-right-long"),K("arrow-right"),K("arrow-up"),K("arrow-up-long"),K("ban"),K("bell"),K("bell-solid"),K("bookmark"),K("bullseye-pointer"),K("certificate"),K("check"),K("check-light"),K("check-solid"),K("chevron-down"),K("chevron-left"),K("chevron-right"),K("chevron-up"),K("circle-info"),K("circle-xmark"),K("circle-xmark-full"),K("clock"),K("clock-rotate-left"),K("clone"),K("close"),K("cog"),K("cog-solid"),K("collapse"),K("copy"),K("download"),K("delete-left"),K("dev-tools"),K("ellipsis"),K("ellipsis-vertical"),K("expand"),K("envelope"),K("envelope-open"),K("exclamation-mark"),K("expand"),K("feedback"),K("filter"),K("floppy"),K("floppy-disk-pen"),K("folder"),K("folder-open"),K("globe"),K("group"),K("hidden"),K("home"),K("house"),K("info"),K("keyboard"),K("layout"),K("link"),K("list-ul"),K("lock"),K("logo"),K("minimize"),K("minimize-down"),K("paper-plane-top"),K("paperclip"),K("pause"),K("pen-line"),K("pen-to-square"),K("pin"),K("play"),K("pop-in"),K("pop-in-widget"),K("pop-out"),K("power-off"),K("publish"),K("refresh"),K("resize"),K("restore"),K("rotate-right"),K("search"),K("search-filled"),K("sleep"),K("sliders"),K("snooze"),K("spinner"),K("square"),K("square-arrow-down"),K("square-arrow-up"),K("star"),K("star-full"),K("sticky-off"),K("sticky-off-hover"),K("sticky-on"),K("sticky-on-hover"),K("subscribe"),K("system-close"),K("system-maximize"),K("system-minimize"),K("thumbs-down"),K("thumbs-up"),K("trash"),K("trash-can"),K("triangle-exclamation"),K("unlock"),K("unpin"),K("up-to-line"),K("user"),K("user-gear"),K("visible"),K("workspace")),By=vh({id:Po,title:Po,description:Ye(mh()),icon:Ye(Fy),iconSrc:Ye(Po),contextMenuActions:Ye(Pc(gh())),type:Po}),Hy=Ja(K("Left"),K("Right")),Ed=Ja(K("daily"),K("weekly")),jd=Ja(K("Sunday"),K("Monday"),K("Tuesday"),K("Wednesday"),K("Thursday"),K("Friday"),K("Saturday")),Xi=vh({customPrefs:Ye(gh()),_launchpad_collapsedSections:Ye(Pc(Po)),_launchpad_favorites:Ye(Pc(By)),_launchpad_isLayoutsPanelOpen:Ye(Rt()),_launchpad_isCollapsed:Ye(Rt()),_launchpad_isPinned:Ye(Rt()),_launchpad_pinnedPosition:Ye(Hy),_launchpad_allowDocking:Ye(Rt()),_launchpad_minimizeToTray:Ye(Rt()),_launchpad_autoCloseStartingAppsAndWorkspaces:Ye(Rt()),_launchpad_showTutorialOnStartup:Ye(Rt()),_layouts_restoreLastSaved:Ye(Rt()),_layouts_saveCurrentOnExit:Ye(Rt()),_layouts_showUnsavedChangesPrompt:Ye(Rt()),_layouts_showDeletePrompt:Ye(Rt()),_downloads_askForEachDownload:Ye(Rt()),_downloads_location:Ye(mh()),_system_scheduleRestart:Ye(Rt()),_system_scheduleRestartTime:Ye(Po),_system_scheduleRestartFrequency:Ye(Ed),_system_scheduleRestartDay:Ye(jd),_system_scheduleShutdown:Ye(Rt()),_system_scheduleShutdownTime:Ye(Po),_system_scheduleShutdownFrequency:Ye(Ed),_system_scheduleShutdownDay:Ye(jd)}),jh=async t=>{const{io:n,variant:e,text:o,error:r}=t,i=jo(r);try{if(e===Nl&&n.logger.warn(i?`${o} ${i}`:o),!("modals"in n)||!n.modals)throw new Error("Modals are not enabled.");const a={text:o,variant:e,ttl:Sy[e]};await n.modals.alerts.request(a)}catch(a){console.warn("Failed to request alert. ",{error:a})}},Pl=g.createContext(void 0),Xa=({children:t,launchpadMode:n})=>{const[e,o]=g.useState(),[r,i]=g.useState(!1),[a,s]=g.useState(),l=g.useContext(_e.IOConnectContext),u=g.useMemo(()=>({prefs:e,isInitialSetupCompleted:r,initialSetupError:a}),[e,r,a]);return g.useEffect(()=>{if(!l)return;let f=!1;const d=l.contexts.subscribe(Eo,p=>{if(f)return;const h=Xi.run(p);if(!h.ok)return void l.logger.warn(`The received data for context ${Eo} is with an invalid shape: ${jo(h.error.message)}`);const m=h.result;o(m),l.prefs.updateFor(xd,m).catch(v=>{l.logger.warn(`Failed to update platform prefs. Error: ${jo(v)}`)})});return()=>{f=!0,d.then(p=>{p()})}},[l]),g.useEffect(()=>{l&&(async()=>{var f;try{const d=await l.contexts.get(Eo),p=Xi.run(d);if(!p.ok)throw new Error(`The data in context ${Eo} is with an invalid shape: ${jo(p.error.message)}`);const h=p.result;if(Object.keys(h).length>0)return;const m=((f=await l.prefs.get(xd))==null?void 0:f.data)??{},v=Xi.run(m);if(!v.ok)throw new Error(`The stored platform prefs in io.prefs are with an invalid shape: ${jo(v.error.message)}`);const y={[Oc]:n==="pinned"||(m[Oc]??!1)},x={...Cy,...v.result,...y};await l.contexts.set(Eo,x)}catch(d){s({message:jo(d)}),await jh({io:l,variant:Nl,text:"Initial platform prefs setup failed.",error:d})}finally{i(!0)}})().catch(console.error)},[l,n]),c.jsx(Pl.Provider,{value:u,children:t})};function Oh(){const t=g.useContext(Pl);if(t===void 0)throw new Error("usePlatformPrefs must be used within a PlatformPrefsProvider");return t}function Xt({prefKey:t}){var d;const n=g.useContext(_e.IOConnectContext),e=g.useContext(Pl),o=(d=e==null?void 0:e.prefs)==null?void 0:d[t],r=(e==null?void 0:e.isInitialSetupCompleted)??!1,[i,a]=g.useState(!r),[s,l]=g.useState(),u=g.useRef(0);g.useEffect(()=>{r&&u.current===0&&a(!1)},[r]);const f=g.useCallback(async p=>{if(!n)return;const h=++u.current;a(!0),l(void 0);const m=async y=>{y&&await jh({io:n,variant:Nl,text:`Failed to update prefKey "${t}".`,error:y}),h===u.current&&(a(!1),y&&l({message:jo(y)}))};let v;if(p instanceof Function)try{v=p((await n.contexts.get(Eo))[t])}catch(y){return m(y)}else v=p;try{const y=Xi.runWithException({[t]:v});await n.contexts.update(Eo,y)}catch(y){return m(y)}await m()},[n,t]);if(e===void 0)throw new Error("usePlatformPref must be used within a PlatformPrefsProvider");return{error:s,isLoading:i,update:f,value:o}}function _i(t){return{name:t.name,title:t.title,hidden:t.isHidden,userProperties:t.customProperties}}function Li(t){return{name:t.name,title:t.title,hidden:t.hidden,userProperties:t.userProperties}}const Ao={getMyApplication:async function(t){var n,e;if(t)try{const o=t.apps;if(o){const i=(n=o.my)==null?void 0:n.appName;if(!i)return;const a=await o.registry.get({name:i});return a?_i(a):void 0}const r=(e=t.appManager)==null?void 0:e.myApplication;return r?Li(r):void 0}catch(o){return void console.error("Failed to get my application",o)}},getApplications:async function(t){var n,e;if(!t)return[];try{const o=(n=t.apps)==null?void 0:n.registry;return o?(await o.getMany()??[]).map(a=>_i(a)):(((e=t.appManager)==null?void 0:e.applications())??[]).map(i=>Li(i))}catch(o){console.error("Failed to get applications",o)}return[]},onAppAdded:async function(t,n){var e,o;if(t)try{const r=(e=t.apps)==null?void 0:e.registry;return r?await r.onAdded(({app:a})=>{const s=_i(a);n(s)}):(o=t.appManager)==null?void 0:o.onAppAdded(a=>{const s=Li(a);n(s)})}catch(r){return void console.error("Failed to subscribe to app added events",r)}},onAppRemoved:async function(t,n){var e,o;if(t)try{const r=(e=t.apps)==null?void 0:e.registry;return r?await r.onRemoved(({appName:a})=>{n({name:a})}):(o=t.appManager)==null?void 0:o.onAppRemoved(a=>{n({name:a.name})})}catch(r){return void console.error("Failed to subscribe to app removed events",r)}},onAppChanged:async function(t,n){var e,o;if(t)try{const r=(e=t.apps)==null?void 0:e.registry;return r?await r.onUpdated(a=>{const s=_i(a.app);n(s)}):(o=t.appManager)==null?void 0:o.onAppChanged(a=>{const s=Li(a);n(s)})}catch(r){return void console.error("Failed to subscribe to app changed events",r)}},restartPlatform:async function(t,n=!0){var o,r;if(!t)return;const e={autoSave:n,showDialog:!0};try{if((o=t.platform)!=null&&o.restart)return void await t.platform.restart(e);await((r=t.appManager)==null?void 0:r.restart(e))}catch(i){console.error("Failed to restart platform",i)}},shutdownPlatform:async function(t,n=!0){var o,r;if(!t)return;const e={autoSave:n,showDialog:!0};try{if((o=t.platform)!=null&&o.shutdown)return void await t.platform.shutdown(e);await((r=t.appManager)==null?void 0:r.exit(e))}catch(i){console.error("Failed to shutdown platform",i)}}},$y="var(--io-neutrals-0)",Ms="var(--io-neutrals-900)";function Nh(t){var r;let n,e,o;if(t.startsWith("#")){let i=t.slice(1);i.length===3&&(i=i.split("").map(a=>a+a).join("")),n=parseInt(i.substring(0,2),16),e=parseInt(i.substring(2,4),16),o=parseInt(i.substring(4,6),16)}else{if(!t.startsWith("rgb")){const i=document.createElement("canvas").getContext("2d");return i?(i.fillStyle=t,Nh(i.fillStyle)):Ms}{const i=(r=t.match(/\d+/g))==null?void 0:r.map(Number);if(!i||i.length<3)return Ms;[n,e,o]=i}}return(.2126*n+.7152*e+.0722*o)/255>.5?Ms:$y}function Wy({className:t,channel:n,...e}){const o=de("io-channel-badge",t),r=g.useMemo(()=>Nh(n.color),[n.color]);return c.jsx("div",{className:o,style:{color:r,backgroundColor:n.color},"data-testid":`channel-selector-badge-${n.color}`,...e,children:c.jsx("span",{className:"io-channel-selector-badge-label","data-testid":"channel-selector-label",children:n.label})})}function zy(){return c.jsx(lt,{variant:"check","data-testid":"channel-selector-channel-selected"})}function Uy({channel:t,handleChannelRestricted:n,lockedChannelRestriction:e}){const o=(r,i)=>a=>{a.stopPropagation(),ho(a)&&(a.preventDefault(),i||n({...t,[r]:!t[r]}))};return c.jsxs(c.Fragment,{children:[c.jsx("div",{children:t.isSelected&&c.jsx("span",{"data-testid":"channel-selector-channel-selected",children:"Active"})}),c.jsx("div",{role:"button",onClick:r=>r.stopPropagation(),"data-testid":"channel-selector-publish-toggle-container",children:c.jsx(vt,{label:"Publish",checked:t.write,onChange:()=>{n({...t,write:!t.write})},onKeyDown:o("write",!t.isSelected||(e==null?void 0:e.write)),onClick:r=>r.stopPropagation(),disabled:!t.isSelected||(e==null?void 0:e.write)})}),c.jsx("div",{role:"button",onClick:r=>r.stopPropagation(),"data-testid":"channel-selector-subscribe-toggle-container",children:c.jsx(vt,{label:"Subscribe",checked:t.read,onChange:()=>{n({...t,read:!t.read})},onKeyDown:o("read",!t.isSelected||(e==null?void 0:e.read)),disabled:!t.isSelected||(e==null?void 0:e.read)})})]})}const Ih=g.createContext({});function Vy({channel:t,isSelected:n,onChannelSelect:e,onChannelRestrict:o,...r}){const{variant:i,selectedChannels:a,lockedChannelRestrictions:s}=g.useContext(Ih),l=n||t.isSelected||(a==null?void 0:a.includes(t)),u=s==null?void 0:s.find(h=>h.name===t.name),f=g.useCallback(()=>e==null?void 0:e({...t,isSelected:!l}),[t,e,l]),d=g.useCallback(h=>{const m=h.target;m.closest(".io-toggle")||m.classList.contains("io-toggle")||ho(h)&&(h.preventDefault(),e==null||e({...t,isSelected:!l}))},[t,e,l]),p=g.useCallback(h=>{o==null||o(h)},[o]);return c.jsx(Pa,{prepend:c.jsx(Wy,{channel:t}),append:i==="single"||i==="multi"?l&&c.jsx(zy,{}):c.jsx(Uy,{channel:t,handleChannelRestricted:p,lockedChannelRestriction:u}),isSelected:l,onClick:f,onKeyDown:d,...r,children:t.name},t.name)}function Yy({variant:t,onVariantChange:n,disabled:e=!1}){const o=t==="directionalSingle"||t==="directionalMulti",r=g.useCallback(()=>{n==null||n(!o)},[o,n]),i=g.useCallback(s=>{s.stopPropagation()},[]),a=g.useCallback(s=>{s.stopPropagation(),ho(s)&&(s.preventDefault(),e||r())},[e,r]);return c.jsx(vt,{label:"Directional",align:"right",checked:o,onChange:r,onClick:i,onKeyDown:a,disabled:e,"data-testid":`channel-selector-toggle-${t}`})}const Gy=g.forwardRef(({className:t,variant:n="single",variantToggle:e=!1,channels:o=[],lockedChannelRestrictions:r=[],onVariantChange:i,onChannelSelect:a,onChannelRestrict:s,...l},u)=>{const f=de("io-list-channels","io-channel-selector-panel",(n==="directionalSingle"||n==="directionalMulti")&&"io-list-channels-directional io-channel-selector-panel-directional",t),d=g.useMemo(()=>({variant:n,selectedChannels:o.filter(p=>p.isSelected),lockedChannelRestrictions:r,onVariantChange:i,onChannelSelect:a,onChannelRestrict:s}),[o,n,r,i,a,s]);return c.jsx(Ih.Provider,{value:d,children:c.jsx("div",{className:f,ref:u,children:c.jsxs(mt,{...l,children:[c.jsx(mt.ItemTitle,{"data-testid":"channel-selector-title",append:e&&c.jsx(Yy,{variant:n,onVariantChange:i}),children:{single:"Select Channel",directionalSingle:"Select Directional Channel",multi:"Select Channels",directionalMulti:"Select Directional Channels"}[n]}),o==null?void 0:o.map(p=>c.jsx(Vy,{channel:p,isSelected:p.isSelected,onChannelSelect:a,onChannelRestrict:s,"data-testid":`channel-selector-channel-${p.name}`},p.name))]})})})});Gy.displayName="ChannelSelector";const Ky=g.forwardRef(({className:t,title:n,ariaLabel:e,onClick:o,onKeyDown:r,children:i,disabled:a=!1,...s},l)=>c.jsx("div",{ref:l,className:de(t,{disabled:a}),title:n,role:"button",tabIndex:a?-1:0,"aria-label":e,"aria-disabled":a,onClick:u=>{!a&&o&&o(u)},onKeyDown:u=>{!a&&r&&r(u)},...s,children:i}));Ky.displayName="ChannelSelectorButtonWrapper";g.createContext({config:{message:""},theme:"dark",setResult:()=>{}});function Ph({title:t="Downloads"}){const{ItemSearch:n,HeaderButtons:e}=yi();return c.jsxs("div",{className:"io-dm-header",children:[c.jsxs(Zt,{draggable:!0,children:[c.jsx(Zt.Title,{tag:"h1",text:t,size:"large"}),c.jsx(e,{className:"non-draggable"})]}),c.jsx(n,{})]})}const Vt=window.glue42gd,Ah=g.createContext({configuration:{},items:[],removeItem:()=>{},pauseResumeItem:()=>{},cancelItem:()=>{},clearItems:()=>{},showItemInFolder:()=>{},isSettingsVisible:!1,showSettings:()=>{},hideSettings:()=>{},searchQuery:"",setSearch:()=>{},itemsCount:0,setCount:()=>{},setDownloadLocation:()=>{},setDownloadLocationWithDialog:()=>{},sortItems:()=>[],downloadLocationList:[],isDownloadLocationDialogVisible:!1}),Gn=()=>g.useContext(Ah);function Th({className:t,placeholder:n="Search",iconPrepend:e="search",iconAppend:o="close",...r}){const i=de("io-header-search",t),a=g.useRef(null),{searchQuery:s,setSearch:l,itemsCount:u}=Gn(),f=s.length>0,d=g.useCallback(()=>{l(""),a.current&&a.current.focus()},[l]);return c.jsxs("div",{className:i,children:[c.jsx(Bo,{ref:a,value:s,iconPrepend:e,iconAppend:f?o:void 0,iconAppendOnClick:f?d:void 0,placeholder:n,onChange:p=>l(p.target.value),...r}),f&&c.jsx("p",{className:"io-header-search-count",children:`${u} results`})]})}function Dh({className:t,...n}){const{MoreButton:e,CloseButton:o}=yi();return c.jsxs(Be,{className:t,align:"right",...n,children:[c.jsx(e,{}),c.jsx(o,{})]})}function Mh({icon:t="ellipsis-vertical",...n}){const{items:e,clearItems:o,showSettings:r}=Gn(),i=e.length===0;return c.jsxs(xe,{variant:"light",...n,children:[c.jsx(xe.ButtonIcon,{icon:t,variant:"circle",size:"32"}),c.jsx(xe.Content,{children:c.jsxs(xe.List,{children:[c.jsx(xe.Item,{onClick:a=>(s=>{i?s.stopPropagation():o()})(a),disabled:i,children:"Clear All"}),c.jsx(xe.Item,{onClick:r,children:"Settings"})]})})]})}const Zy={minimizeWindow:async function(t){var n;if(t)try{const e=(n=t.windows)==null?void 0:n.my();await(e==null?void 0:e.minimize())}catch(e){console.error("Failed to minimize window",e)}},closeWindow:async function(t,n){var e;if(t)try{const o=(e=t.windows)==null?void 0:e.my();await(o==null?void 0:o.close(n))}catch(o){console.error("Failed to close window",o)}},restartPlatform:Ao.restartPlatform,shutdownPlatform:Ao.shutdownPlatform};function _h({icon:t="close",size:n="32",variant:e="circle",onClick:o,...r}){const i=g.useContext(_e.IOConnectContext);return c.jsx(Ge,{icon:t,size:n,variant:e,onClick:a=>{o?o(a):Zy.closeWindow(i).catch(s=>{console.error("Failed to close window:",s)})},...r})}function Go(t,n=!1,e=!1,o=!1){const r=t.getDate(),i=["January","February","March","April","May","June","July","August","September","October","November","December"][t.getMonth()],a=t.getFullYear(),s=t.getHours(),l=t.getMinutes();let u="";return u=l<10?`0${l}`:`${l}`,n?n==="Today"?e?"Today":`Today at ${s}:${u}`:n==="Yesterday"?e?"Yesterday":`Yesterday at ${s}:${u}`:`${s}:${u}`:o?e?`${i} ${r}`:`${i} ${r} at ${s}:${u}`:e?`${i} ${r}, ${a}`:`${i} ${r}, ${a} at ${s}:${u}`}function Lh(t,n={showTime:!0}){const e=new Date(1e3*t),o=new Date,r=Math.round((o-e)/1e3),i=Math.round(r/60),a=o.toDateString()===e.toDateString(),s=new Date(o.setDate(o.getDate()-1)).toDateString()===e.toDateString(),l=o.getFullYear()===e.getFullYear();return n.showTime?r<5?"Just Now":r<60?`${r} seconds ago`:r<90?"about a minute ago":i<60?`${i} minutes ago`:a?Go(e,"Today",!1,!0):s?Go(e,"Yesterday",!1,!0):l?Go(e,!1,!1,!0):Go(e):a?"Today":s?"Yesterday":l?Go(e,!1,!0,!0):Go(e,!1,!0)}function Rh({className:t,...n}){const e=de("io-dm-body",t),{DownloadListEmpty:o,ItemGroup:r,Item:i}=yi(),{items:a,searchQuery:s,setCount:l,sortItems:u}=Gn(),f=u(a),d=rh(s),p=g.useMemo(()=>f.filter(v=>v.displayInfo.filename.toLowerCase().includes(d.toLowerCase())||v.displayInfo.url.toLowerCase().includes(d.toLowerCase())),[f,d]),h=g.useMemo(()=>p.map(v=>({...v,displayInfo:{...v.displayInfo,startTime:Lh(v.displayInfo.startTime,{showTime:!1})}})),[p]),m=g.useMemo(()=>Object.values(h.reduce((v={},y)=>{var x;return v[y.displayInfo.startTime]=((x=v[y.displayInfo.startTime])==null?void 0:x.concat([]))??[],v[y.displayInfo.startTime].push(y),v},{})),[h]);return g.useEffect(()=>{l(p.length)},[p,l]),c.jsx("div",{className:e,...n,children:m&&m.length!==0?m.map(v=>c.jsx(r,{title:String(v[0].displayInfo.startTime)??null,children:v.map(y=>c.jsx(i,{item:y},y.id))},v[0].id??"")):c.jsx(o,{})})}function Fh({className:t,icon:n="download",text:e="No downloads to display.",...o}){const r=de("io-dm-no-items",t);return c.jsxs("div",{className:r,...o,children:[c.jsx(lt,{variant:n}),c.jsx("p",{children:e})]})}function Bh({className:t,title:n,children:e,...o}){const r=de("io-dm-item-group",t);return c.jsxs("div",{className:r,...o,children:[n&&c.jsx("p",{children:n}),e]})}function Hh({className:t,item:n,...e}){const{ItemHeader:o,ItemBody:r,ItemFooter:i}=yi(),{state:a,url:s,filename:l,receivedBytes:u,totalBytes:f,speed:d,timeRemaining:p}=n.displayInfo;if(!n)return c.jsx(c.Fragment,{});const h=de("io-dm-item",n.displayInfo.state&&[a],t);return c.jsxs("div",{className:h,...e,children:[c.jsx(o,{itemID:n.id,filename:l,state:a}),c.jsx(r,{state:a,url:s,bytesReceived:u,bytesTotal:f,speed:d,timeRemaining:p}),c.jsx(i,{itemID:n.id,state:a})]})}function Al({bytesReceived:t=0,bytesTotal:n=0,...e}){const o=g.useCallback(()=>t&&n?Math.round(t/n*100):0,[t,n]);return c.jsx(S1,{value:o(),...e})}function $h({className:t,itemID:n,filename:e,state:o,cancel:r,remove:i,...a}){const s=de("io-dm-item-header",t),{cancelItem:l,removeItem:u}=Gn(),f=g.useCallback(p=>{r?r(p):l(p)},[r,l]),d=g.useCallback(p=>{i?i(p):u(p)},[i,u]);return c.jsxs("div",{className:s,...a,children:[c.jsx(Nn,{text:e,style:{textDecoration:o==="interrupted"||o==="cancelled"?"line-through":"none"}}),c.jsx(Ge,{icon:"close",iconSize:"12",onClick:()=>{o==="progressing"||o==="paused"?f(n):d(n)}})]})}function Wh({className:t,state:n,url:e,bytesReceived:o=0,bytesTotal:r=0,speed:i=0,timeRemaining:a=0,...s}){const l=de("io-dm-item-body",t),u=p=>{const h=["Bytes","KB","MB","GB","TB"];if(p===0)return"0";const m=Math.floor(Math.log(p)/Math.log(1024));return m===0?`${p}${h[m]}`:`${(p/1024**m).toFixed(1)}${h[m]}`};return c.jsxs("div",{className:l,...s,children:[c.jsx("p",{className:"io-text-small",children:e}),(d=n,d==="cancelled"||d==="interrupted"||d==="completed"?null:c.jsx(Al,{variant:d==="paused"?"paused":"active",bytesReceived:o,bytesTotal:r})),c.jsx("p",{className:"io-text-default-lh16",children:n==="completed"?`${u(o??0)} - Done`:n==="cancelled"||n==="interrupted"?`${u(o??0)}/${u(r??0)} - Failed`:`${u(o??0)}/${u(r??0)} (${f=i,(f?`${(f/1e6/8).toFixed(2)}MB/s`:0)??0}) - ${(p=>{const h=Math.floor(p/3600),m=Math.floor(p%3600/60);let v="";return h>0&&(v+=`${h} hour${h>1?"s":""}, `),m>0&&(v+=`${m} min${m>1?"s":""}, `),((p=Math.floor(p%60))>0||v==="")&&(v+=`${p} sec${p!==1?"s":""}`),`${v.trim()} left`})(a)??0}`})]});var f,d}const qy={success:"check-solid",warning:"exclamation-mark",critical:"exclamation-mark"};function _s({className:t,variant:n,text:e}){const o=de("io-dm-item-status",`io-dm-item-status-${n}`,t);return c.jsxs("div",{className:o,children:[n&&c.jsx(lt,{variant:qy[n],className:"icon-severity",size:"10"}),e&&c.jsx("p",{className:"io-text-smaller",children:e})]})}function zh({className:t,itemID:n,state:e,pauseResume:o,showInFolder:r,cancel:i,...a}){const s=de("io-dm-item-footer",t),{pauseResumeItem:l,showItemInFolder:u,cancelItem:f}=Gn(),d=g.useCallback(m=>{o?o(m):l(m)},[o,l]),p=g.useCallback(m=>{r?r(m):u(m)},[r,u]),h=g.useCallback(m=>{i?i(m):f(m)},[i,f]);return c.jsx("div",{className:s,...a,children:(()=>{switch(e){case"progressing":return c.jsxs(Be,{align:"right",children:[c.jsx(Be.Button,{variant:"primary",text:"Pause",onClick:()=>d(n)}),c.jsx(Be.Button,{variant:"link",text:"Cancel",onClick:()=>h(n)})]});case"paused":return c.jsx(Be,{align:"right",children:c.jsx(Be.Button,{variant:"primary",text:"Resume",onClick:()=>d(n)})});case"completed":return c.jsxs(c.Fragment,{children:[c.jsx(_s,{variant:"success",text:"Complete"}),c.jsx(Be,{align:"right",children:c.jsx(Be.Button,{variant:"primary",text:"Show in Folder",onClick:()=>p(n)})})]});case"cancelled":return c.jsx(_s,{variant:"warning",text:"Cancelled"});case"interrupted":return c.jsxs(c.Fragment,{children:[c.jsx(_s,{variant:"critical",text:"Failed"}),c.jsx(Be,{align:"right",children:c.jsx(Be.Button,{variant:"primary",text:"Retry",onClick:()=>d(n)})})]});default:return null}})()})}function Uh({className:t,title:n="Download Settings",...e}){const o=de("io-dm-settings-panel",t),{configuration:{downloadFolder:r},hideSettings:i,setDownloadLocation:a,setDownloadLocationWithDialog:s,isDownloadLocationDialogVisible:l,downloadLocationList:u}=Gn();return c.jsxs(qe,{className:o,...e,children:[c.jsxs(qe.Header,{children:[c.jsx(qe.Header.Title,{size:"large",text:n,tag:"h1"}),c.jsx(qe.Header.ButtonGroup,{children:c.jsx(Ge,{variant:"circle",icon:"close",size:"32",onClick:()=>{i()},disabled:l})})]}),c.jsx(qe.Body,{children:c.jsxs(Be,{children:[c.jsxs(xe,{variant:"light",disabled:l,children:[c.jsx(xe.Button,{children:c.jsx("span",{className:"io-dm-settings-panel-download-location",children:r??u[0]})}),u.length>1&&c.jsx(xe.Content,{children:c.jsx(xe.List,{children:u.map((f,d)=>!f||d===0||d>3?null:c.jsx(xe.Item,{onClick:()=>{a(f)},children:f},f))})})]}),c.jsx(Je,{className:"io-btn io-dm-settings-panel-download-location-btn",text:"Browse",onClick:()=>{s()},disabled:l})]})})]})}const Vh={Header:Ph,ItemSearch:Th,HeaderButtons:Dh,MoreButton:Mh,CloseButton:_h,Body:Rh,DownloadListEmpty:Fh,ItemGroup:Bh,Item:Hh,ItemProgress:Al,ItemHeader:$h,ItemBody:Wh,ItemFooter:zh,Settings:Uh},Yh=g.createContext(Vh),Gh=g.memo(({children:t,components:n})=>{const e=g.useMemo(()=>({...Vh,...n}),[n]);return c.jsx(Yh.Provider,{value:e,children:t})});Gh.displayName="ComponentsStore";const yi=()=>g.useContext(Yh);function Jy({className:t,...n}){const e=de("io-dm",t),{Header:o,Body:r,Settings:i}=yi(),{isSettingsVisible:a}=Gn();return c.jsxs(qe,{className:e,...n,children:[c.jsx(o,{}),c.jsx(r,{}),a&&c.jsx(i,{})]})}var Xy=Object.freeze({__proto__:null,Body:Rh,CloseButton:_h,DownloadListEmpty:Fh,DownloadManager:function({components:t,...n}){return c.jsx(Gh,{components:t,children:c.jsx(Jy,{...n})})},DownloadManagerProvider:({children:t})=>{const{configuration:n,items:e,removeItem:o,pauseResumeItem:r,cancelItem:i,clearItems:a,showItemInFolder:s,isSettingsVisible:l,showSettings:u,hideSettings:f,searchQuery:d,setSearch:p,itemsCount:h,setCount:m,setDownloadLocation:v,setDownloadLocationWithDialog:y,sortItems:x,isDownloadLocationDialogVisible:S,downloadLocationList:b}=function(){const[E,j]=g.useState({}),[_,M]=g.useState([]),[F,D]=g.useState(0),[A,P]=g.useState([]),[re,ae]=g.useState(""),[z,ee]=g.useState(!1),[q,ie]=g.useState(!1),[J,W]=g.useState({filePaths:[],canceled:!1});g.useEffect(()=>{if(!Vt)return;const Y=Vt.downloads.onUpdate(L=>M(O=>Q(O,L))),H=Vt.downloads.onConfigurationChanged(L=>{j(L)});return Vt.downloads.list().then(M).catch(console.error),Vt.downloads.getSavePathList().then(L=>{L.pathList&&P(L.pathList)}).catch(console.error),()=>{Y(),H()}},[]),g.useEffect(()=>{ie(!1)},[J]);const Q=(Y,H)=>{const L=Y.findIndex(I=>I.id===H.id);if(L===-1)return[H,...Y];const O=[...Y];return O[L]=H,O};return{items:_,setCount:Y=>{D(Y)},sortItems:(Y,H=!0)=>Y.sort((L,O)=>H?L.displayInfo.startTime<O.displayInfo.startTime?1:-1:L.displayInfo.startTime>O.displayInfo.startTime?1:-1),setSearch:Y=>{ae(Y)},cancelItem:async Y=>{try{await Vt.downloads.cancel(Y)}catch(H){console.error(H)}},removeItem:async Y=>{try{M(H=>H.filter(L=>L.id!==Y)),await Vt.downloads.removeItem(Y)}catch(H){console.error(H)}},clearItems:async()=>{try{M([]),await Vt.downloads.clearDownloadList()}catch(Y){console.error(Y)}},itemsCount:F,searchQuery:re,showSettings:()=>{ee(!0)},hideSettings:()=>{ee(!1)},configuration:E,isSettingsVisible:z,pauseResumeItem:async Y=>{try{await Vt.downloads.pauseResume(Y)}catch(H){console.error(H)}},showItemInFolder:async Y=>{try{await Vt.downloads.showInFolder(Y)}catch(H){console.error(H)}},setDownloadLocation:async Y=>{try{await Vt.downloads.setSavePath(Y),P(H=>{if(H.includes(Y)){const L=H.filter(O=>O!==Y);return[Y,...L]}return[Y,...H]})}catch(H){console.error(H)}},downloadLocationList:A,isDownloadLocationDialogVisible:q,setDownloadLocationWithDialog:async()=>{ie(!0);try{const Y=await Vt.downloads.showOpenDialog();if(W(Y),!(Y!=null&&Y.filePaths)||Y.filePaths.length===0)return;await Vt.downloads.setSavePath(Y.filePaths[0]),P(H=>{if(H.includes(Y.filePaths[0])){const L=H.filter(O=>O!==Y.filePaths[0]);return[Y.filePaths[0],...L]}return[Y.filePaths[0],...H]})}catch(Y){console.error(Y)}}}}(),w=g.useMemo(()=>({configuration:n,items:e,removeItem:o,pauseResumeItem:r,cancelItem:i,clearItems:a,showItemInFolder:s,isSettingsVisible:l,showSettings:u,hideSettings:f,searchQuery:d,setSearch:p,itemsCount:h,setCount:m,setDownloadLocation:v,setDownloadLocationWithDialog:y,sortItems:x,isDownloadLocationDialogVisible:S,downloadLocationList:b}),[n,e,o,r,i,s,a,l,u,f,d,p,h,m,v,y,x,S,b]);return c.jsx(Ah.Provider,{value:w,children:t})},Header:Ph,HeaderButtons:Dh,Item:Hh,ItemBody:Wh,ItemFooter:zh,ItemGroup:Bh,ItemHeader:$h,ItemProgress:Al,ItemSearch:Th,MoreButton:Mh,Settings:Uh,useDownloadManagerContext:Gn});function Rc(t){if(t&&t.errorHandling&&typeof t.errorHandling!="function"&&t.errorHandling!=="log"&&t.errorHandling!=="silent"&&t.errorHandling!=="throw")throw new Error('Invalid options passed to createRegistry. Prop errorHandling should be ["log" | "silent" | "throw" | (err) => void], but '+typeof t.errorHandling+" was passed");var n=t&&typeof t.errorHandling=="function"&&t.errorHandling,e={};function o(r,i){var a=r instanceof Error?r:new Error(r);if(n)n(a);else{var s='[ERROR] callback-registry: User callback for key "'+i+'" failed: '+a.stack;if(t)switch(t.errorHandling){case"log":return console.error(s);case"silent":return;case"throw":throw new Error(s)}console.error(s)}}return{add:function(r,i,a){var s=e[r];return s||(s=[],e[r]=s),s.push(i),a&&setTimeout(function(){a.forEach(function(l){var u;if(!((u=e[r])===null||u===void 0)&&u.includes(i))try{Array.isArray(l)?i.apply(void 0,l):i.apply(void 0,[l])}catch(f){o(f,r)}})},0),function(){var l=e[r];l&&(l=l.reduce(function(u,f,d){return f===i&&u.length===d||u.push(f),u},[]),l.length===0?delete e[r]:e[r]=l)}},execute:function(r){for(var i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];var s=e[r];if(!s||s.length===0)return[];var l=[];return s.forEach(function(u){try{var f=u.apply(void 0,i);l.push(f)}catch(d){l.push(void 0),o(d,r)}}),l},clear:function(){e={}},clearKey:function(r){e[r]&&delete e[r]}}}Rc.default=Rc;var Qy=Ef(Rc);const ew={env:"",region:"",version:"",buildVersion:"",theme:"",isError:!1,mailingList:"",createJiraTicket:!0,sendEmail:!1,attachments:[],applicationTitle:"",allowEditRecipients:!0,attachmentsViewMode:"category",environmentInfo:"",selectedCategories:[],errorMessage:"",showEnvironmentInfo:!1,context:{},technicalInfo:"",sendEmailClient:"Outlook"},tw=g.createContext({config:ew,onThemeChanged:()=>{},openUrl:()=>{},submit:()=>Promise.resolve({}),setBounds:()=>{},close:()=>{},showMailingList:!0,setShowMailingList:()=>{},attachmentCategories:[],submitInProgress:!1,setSubmitInProgress:()=>{},submitStatus:{type:"success",title:"",text:""},setSubmitStatus:()=>{},submitCompleted:!1,setSubmitCompleted:()=>{},jiraTicketURL:"",setJiraTicketURL:()=>{},submitFeedback:()=>{}}),wn=()=>g.useContext(tw);function nw({...t}){const{config:n,close:e}=wn(),{applicationTitle:o}=n;return c.jsxs(Zt,{draggable:!0,...t,children:[c.jsx(Zt.Title,{tag:"h1",text:o?`Feedback Form - ${o}`:"Feedback Form",size:"large"}),c.jsx(Zt.ButtonGroup,{className:"non-draggable",children:c.jsx(Zt.ButtonIcon,{variant:"circle",icon:"close",size:"32",onClick:()=>e()})})]})}function ow({className:t,handleSubmit:n,...e}){const o=de("io-panel-body",t),{config:r,submitFeedback:i}=wn(),{IntroField:a,DescriptionField:s,TechInfoField:l,EnvInfoField:u,FileAttachmentsField:f,CategoryAttachmentsField:d,SettingsField:p,MailListField:h}=Qa(),m=n??i,v=`Your feedback will be submitted to the ${r.buildVersion} team and some additional information will be automatically included to help us examine your issue.`;return c.jsxs("form",{className:o,id:"feedback",onSubmit:y=>m(y),...e,children:[c.jsx(a,{children:c.jsx("p",{children:v})}),c.jsx(p,{}),c.jsx(h,{}),c.jsx(s,{}),c.jsx(l,{readOnly:!0}),c.jsx(u,{readOnly:!0}),r.attachmentsViewMode==="file"?c.jsx(f,{}):c.jsx(d,{})]})}function rw({...t}){const{FooterButtons:n}=Qa(),{openUrl:e,submitInProgress:o,submitStatus:r,jiraTicketURL:i}=wn();return c.jsx(Io,{...t,children:c.jsxs("div",o?{className:"flex ai-center jc-between",children:[c.jsx(et,{children:c.jsx("p",{children:r.title})}),c.jsx(C1,{align:"right",size:"small"})]}:{className:"flex ai-center jc-between",children:[c.jsxs(et,{children:[c.jsx("p",{className:r.type==="error"?"io-text-error":"",children:r.title}),i&&c.jsx("a",{href:i,onClick:a=>{a.preventDefault(),e(i)},children:i})]}),c.jsx(n,{})]})})}function iw({className:t,...n}){const{CloseButton:e}=Qa(),{close:o}=wn(),r=de("non-draggable",t);return c.jsx(Be,{className:r,...n,children:c.jsx(e,{onClick:()=>o()})})}function aw({className:t,...n}){const{SubmitButton:e,CancelButton:o,CloseButton:r}=Qa(),{close:i,submitCompleted:a}=wn();return a?c.jsx(Be,{className:t,...n,children:c.jsx(r,{text:"Close",onClick:()=>i()})}):c.jsxs(Be,{className:t,...n,children:[c.jsx(e,{}),c.jsx(o,{onClick:()=>i()})]})}function sw({text:t="Submit",...n}){return c.jsx(Je,{form:"feedback",type:"submit",variant:"primary",text:t,...n})}function cw({text:t="Cancel",...n}){return c.jsx(Je,{variant:"link",text:t,...n})}function lw({...t}){return c.jsx(Je,{variant:"primary",...t})}function uw({showField:t=!0,className:n,title:e,hint:o,children:r,...i}){return t?c.jsx(et,{className:n,title:e,hint:o,...i,children:r}):null}function dw({showField:t=!0,className:n,title:e="Description",hint:o,readOnly:r=!1,disabled:i,...a}){return t?c.jsx(et,{className:n,hint:o,title:"",...a,children:c.jsx(Ka,{id:"description",name:"description",label:e,readOnly:r,disabled:i})}):null}function fw({showField:t,className:n,title:e="Technical Information",hint:o,fieldValue:r,readOnly:i=!1,disabled:a,...s}){const{config:l}=wn(),u=t??l.errorMessage,f=r??l.errorMessage;return u&&f?c.jsx(et,{className:n,hint:o,...s,children:c.jsx(Ka,{id:"errorMessage",name:"errorMessage",label:e,value:f,readOnly:i,disabled:a})}):null}function pw({showField:t,className:n,title:e="Environment Information",hint:o,fieldValue:r,readOnly:i=!1,disabled:a,...s}){const{config:l}=wn(),u=t??l.showEnvironmentInfo,f=r??l.environmentInfo;return u&&f?c.jsx(et,{className:n,hint:o,...s,children:c.jsx(Ka,{id:"environmentInfo",name:"environmentInfo",label:e,value:f,readOnly:i,disabled:a})}):null}function hw({showField:t=!0,className:n,title:e="Attachments",hint:o,readOnly:r=!1,disabled:i,attachments:a,selectedCategories:s,...l}){const u=de("io-block-list-gap",n),{config:f}=wn(),d=a??f.attachments,p=s??f.selectedCategories,h=g.useCallback(m=>!!p&&p.indexOf(m)!==-1,[p]);return t?!d||d.length<=0?c.jsx(et,{title:"Attachments",children:c.jsx("p",{children:"No Attachments"})}):c.jsx(et,{className:u,title:e,hint:o,...l,children:c.jsx("div",{className:"file-attachments",children:d.map(m=>c.jsx(Za,{id:m.id,name:m.id,label:m.name,readOnly:r,disabled:i,defaultChecked:h(m.category)},m.id))})}):null}function mw({showField:t=!0,className:n,title:e="Attachments",hint:o,readOnly:r=!1,disabled:i,categories:a,selectedCategories:s,...l}){const{config:u,attachmentCategories:f}=wn(),d=a??f,p=s??u.selectedCategories,h=g.useCallback(m=>!!p&&p.indexOf(m)!==-1,[p]);return t?!d||d.length<=0?c.jsx("p",{children:"No Attachments"}):c.jsx(et,{className:n,title:e,hint:o,...l,children:c.jsx("div",{className:"category-attachments",children:d.map(m=>c.jsx(vt,{id:m,name:m,align:"right",label:m,readOnly:r,disabled:i,defaultChecked:h(m)},m))})}):null}function gw({className:t,title:n,hint:e,showField:o=!0,showJiraTicketField:r,jiraTicketLabel:i="Create Jira Ticket",showSendEmailField:a,sendEmailLabel:s="Send Email",readOnly:l=!1,disabled:u,...f}){const d=de("io-block-list-gap",t),{config:p,showMailingList:h,setShowMailingList:m}=wn();if(!o)return null;const v=r??p.createJiraTicket,y=a??p.sendEmail;return c.jsxs(et,{className:d,hint:e,title:n,...f,children:[v&&c.jsx(vt,{id:"createJiraTicket",name:"createJiraTicket",label:i,align:"right",readOnly:l,disabled:u,defaultChecked:v}),y&&c.jsx(vt,{onChange:()=>{m(!h)},id:"sendEmail",name:"sendEmail",label:s,align:"right",readOnly:l,disabled:u,defaultChecked:y})]})}function vw({showField:t=!0,className:n,title:e="Email List",hint:o="Separate with commas or semicolons.",placeholder:r="john.doe@somedomain.com; jane.doe@otherdomain.com",readOnly:i,disabled:a,...s}){const{config:l,showMailingList:u}=wn(),f=t??l.sendEmail,d=i??l.allowEditRecipients===!1;return f&&u?c.jsx(et,{className:n,hint:o,...s,children:c.jsx(Bo,{id:"mailingList",name:"mailingList",label:e,placeholder:r,readOnly:d,disabled:a,defaultValue:l.mailingList??""})}):null}const Kh={Header:nw,Body:ow,Footer:rw,HeaderButtons:iw,FooterButtons:aw,SubmitButton:sw,CancelButton:cw,CloseButton:lw,IntroField:uw,DescriptionField:dw,TechInfoField:fw,EnvInfoField:pw,FileAttachmentsField:hw,CategoryAttachmentsField:mw,SettingsField:gw,MailListField:vw},Zh=g.createContext(Kh),yw=g.memo(({children:t,components:n})=>{const e=g.useMemo(()=>({...Kh,...n}),[n]);return c.jsx(Zh.Provider,{value:e,children:t})});function Qa(t){return{...g.useContext(Zh),...t}}yw.displayName="ComponentsStore";function qh({className:t,title:n="General",...e}){const o=de("io-notifications-settings-panel-general",t),{AllowNotifications:r,AllowNotificationToasts:i,ShowNotificationBadge:a,CloseNotificationOnClick:s,PanelAutoHide:l,HideToastsAfter:u}=zo(),f=ze();return c.jsx("div",{className:o,...e,children:c.jsxs(et,{title:n,children:[f&&c.jsx(r,{}),f&&c.jsx(i,{}),c.jsx(a,{}),f&&c.jsx(l,{}),f&&c.jsx(s,{}),f&&c.jsx(u,{})]})})}var at=new class{constructor(){Mt(this,"subscribed",!1);Mt(this,"io");Mt(this,"registry",Qy());Mt(this,"logger");Mt(this,"isPanelVisible");Mt(this,"notifications",[]);Mt(this,"bulkActionsSupported",!1);Mt(this,"initPromise")}init(t){return this.initPromise!==void 0||(this.initPromise=(async()=>{var n;if(!this.subscribed){this.subscribed=!0,this.io=t,this.logger=this.io.logger.subLogger("notifications");try{await this.initializeLogger()}catch(e){console.error("Failed to initialize logger with app configuration",e)}this.getBulkActionsSupport();try{await this.subscribe()}catch(e){throw(n=this.logger)==null||n.error("Error during subscription:",e),e}}})()),this.initPromise}async initializeLogger(){var o,r,i,a,s,l;const t=await Ao.getMyApplication(this.io),n=((r=(o=t==null?void 0:t.userProperties)==null?void 0:o.logger)==null?void 0:r.publishLevel)??"error",e=((a=(i=t==null?void 0:t.userProperties)==null?void 0:i.logger)==null?void 0:a.consoleLevel)??"info";(s=this.logger)==null||s.publishLevel(n),(l=this.logger)==null||l.consoleLevel(e)}onPanelVisibilityChanged(t){return this.registry.add("on-panel-visibility-changed",t)}onConfigurationChanged(t){return this.registry.add("on-configuration-changed",t)}onNotificationsChanged(t){return this.registry.add("on-notifications-changed",t)}onCounterChanged(t){return this.registry.add("on-counter-changed",t)}async getNotificationsList(){var n;const t=await((n=this.io)==null?void 0:n.notifications.list());if(!t)throw new Error("io.notifications.list is not supported in this environment.");return t.map(e=>this.attachHandlers(e))}async getConfiguration(){if(this.io)return await this.io.notifications.getConfiguration();throw new Error("io.notifications.getConfiguration is not supported in this environment.")}showPanel(){var t;if(this.isDesktopEnvironment())return(t=this.io)==null?void 0:t.notifications.panel.show()}hidePanel(){var t;if(this.isDesktopEnvironment())return(t=this.io)==null?void 0:t.notifications.panel.hide()}clearAll(){var t,n;return(t=this.logger)==null||t.trace("clearing all notifications"),(n=this.io)==null?void 0:n.notifications.clearAll()}clearAllOld(){var t,n;return(t=this.logger)==null||t.trace("clearing all old notifications"),(n=this.io)==null?void 0:n.notifications.clearOld()}clearMany(t){var e,o,r,i;const n=(e=this.io)==null?void 0:e.notifications;return this.isBulkActionSupported("clearMany")?t.length<1?((o=this.logger)==null||o.trace("no ids provided to clear notifications"),Promise.resolve()):((r=this.logger)==null||r.trace(`clearing notifications with ids ${JSON.stringify(t.join(", "))}`),((i=n.clearMany)==null?void 0:i.call(n,t))??Promise.resolve()):Promise.reject(new Error("Bulk actions are not supported in this environment"))}close(t){var n,e;return(n=this.logger)==null||n.trace(`closing notification with id ${t}`),(e=this.io)==null?void 0:e.notifications.clear(t)}snooze(t,n){var e,o;return(e=this.logger)==null||e.trace(`snoozing notification with id ${t} for ${n}ms`),(o=this.io)==null?void 0:o.notifications.snooze(t,n)}snoozeMany(t,n){var o,r,i,a;const e=(o=this.io)==null?void 0:o.notifications;return this.isBulkActionSupported("snoozeMany")?t.length<1?((r=this.logger)==null||r.trace("no ids provided to snooze notifications"),Promise.resolve()):((i=this.logger)==null||i.trace(`snoozing notifications with ids ${JSON.stringify(t.join(", "))} for ${n}ms`),((a=e.snoozeMany)==null?void 0:a.call(e,t,n))??Promise.resolve()):Promise.reject(new Error("Bulk actions are not supported in this environment"))}setState(t,n){var e,o;return(e=this.logger)==null||e.trace(`setting state of ${t} to ${n}`),(o=this.io)==null?void 0:o.notifications.setState(t,n)}setStates(t,n){var o,r,i,a;const e=(o=this.io)==null?void 0:o.notifications;return this.isBulkActionSupported("setStates")?t.length<1?((r=this.logger)==null||r.trace(`no ids provided to change state to ${n} for notifications`),Promise.resolve()):((i=this.logger)==null||i.trace(`setting state of ${JSON.stringify(t.join(", "))} to ${n}`),((a=e.setStates)==null?void 0:a.call(e,t,n))??Promise.resolve()):Promise.reject(new Error("Bulk actions are not supported in this environment"))}getBulkActionsSupport(){this.bulkActionsSupported=this.isBulkActionSupported("clearMany")&&this.isBulkActionSupported("setStates")&&this.isBulkActionSupported("snoozeMany")}setFilter(t){var n,e;return(n=this.logger)==null||n.trace(`setting filter to ${JSON.stringify(t)}`),(e=this.io)==null?void 0:e.notifications.setFilter(t)}configure(t){var n;return(n=this.io)==null?void 0:n.notifications.configure(t)}async resyncNotifications(){var t,n;try{const e=await this.getNotificationsList();this.notifications=e,this.registry.execute("on-notifications-changed",[...this.notifications]),(t=this.logger)==null||t.trace(`resynced notifications array with ${this.notifications.length} notifications`)}catch(e){(n=this.logger)==null||n.error("Error resyncing notifications list:",e)}}async subscribe(){var n,e,o,r,i,a,s,l,u;(n=this.io)==null||n.notifications.onRaised(f=>{var d;(d=this.logger)==null||d.trace(`received event indicating notification raise: ${JSON.stringify(f)}`),this.attachHandlers(f),this.notifications.unshift(f),this.registry.execute("on-notifications-changed",[...this.notifications])}),(e=this.io)==null||e.notifications.onStateChanged(({id:f},d)=>{var p;(p=this.logger)==null||p.trace(`received event for notification state is changed - "${f}" - "${d==null?void 0:d.toString()}"`),this.notifications=this.notifications.map(h=>{var m;return h.id===f?((m=this.logger)==null||m.trace(`${h.id} - the state is changed from "${h.state}" to "${d==null?void 0:d.toString()}"`),{...h,state:d}):h}),this.registry.execute("on-notifications-changed",this.notifications)});const t=(o=this.io)==null?void 0:o.notifications;t!=null&&t.onDataChanged&&t.onDataChanged((f,d)=>{var h;const p=f.id;(h=this.logger)==null||h.trace(`received event for notification data is changed - "${p}" - "${JSON.stringify(d)}"`),this.notifications=this.notifications.map(m=>{var v;return m.id===p?((v=this.logger)==null||v.trace(`${m.id} - the data is changed from "${JSON.stringify(m.data)}" to "${JSON.stringify(d)}"`),{...m,data:d}):m}),this.registry.execute("on-notifications-changed",this.notifications)}),(r=this.io)==null||r.notifications.onClosed(({id:f})=>{var d;(d=this.logger)==null||d.trace(`received event for notification is closed - "${f}".`),this.notifications=this.notifications.filter(p=>p.id!==f),this.registry.execute("on-notifications-changed",this.notifications)});try{const f=await this.getNotificationsList(),d=new Set(f.map(h=>h.id)),p=this.notifications.filter(h=>!d.has(h.id));this.notifications=[...p,...f],(i=this.logger)==null||i.trace(`initialized with ${f.length} fetched + ${p.length} from events = ${this.notifications.length} total`)}catch(f){(a=this.logger)==null||a.error("Error fetching initial notifications list:",f),(s=this.logger)==null||s.trace(`continuing with ${this.notifications.length} notifications from events`)}(l=this.io)==null||l.notifications.onConfigurationChanged(f=>{var d;(d=this.logger)==null||d.trace(`received event for configuration changed - ${JSON.stringify(f)}.`),this.registry.execute("on-configuration-changed",f)}),this.isDesktopEnvironment()&&((u=this.io)==null||u.notifications.panel.onVisibilityChanged(f=>{var d;(d=this.logger)==null||d.trace(`received event for panel visibility changed to "${f}".`),this.isPanelVisible=f,f&&this.resyncNotifications().catch(p=>{var h;(h=this.logger)==null||h.error("Error resyncing notifications on panel visibility:",p)}),this.registry.execute("on-panel-visibility-changed",f)}))}isDesktopEnvironment(){return typeof globalThis.window=="object"&&(!!globalThis.window.iodesktop||!!globalThis.window.glue42gd)}isBulkActionSupported(t){var e;const n=(e=this.io)==null?void 0:e.notifications;return typeof(n==null?void 0:n[t])=="function"}attachHandlers(t){var e;return(e=t.actions)==null||e.forEach(o=>{Object.assign(o,{onClick:async r=>{var i,a,s;try{(i=this.logger)==null||i.info(`${t.id}/${o.action} - was clicked.`),await((a=this.io)==null?void 0:a.notifications.click(t.id,o.action,r))}catch(l){(s=this.logger)==null||s.error("Error while clicking on action:",l)}}})}),Object.assign(t,{snooze:async(o=1e4)=>{var r,i;(r=this.logger)==null||r.trace(`${t.id} - request to change the state from ${t.state} to Snoozed with duration ${o}ms`),await((i=this.io)==null?void 0:i.notifications.snooze(t.id,o))},updateState:async o=>{var r,i;return(r=this.logger)==null||r.trace(`${t.id} - request to change the state from ${t.state} to ${o}`),(i=this.io)==null?void 0:i.notifications.setState(t.id,o)},updateData:async o=>{var i,a,s;(i=this.logger)==null||i.trace(`${t.id} - request to change the data to ${JSON.stringify(o)}`);const r=(a=this.io)==null?void 0:a.notifications;r!=null&&r.updateData?await r.updateData(t.id,o):(s=this.logger)==null||s.warn("'updateData' method is not supported")},onClick:async o=>{var r,i,a;try{(r=this.logger)==null||r.info(`${t.id} - was clicked.`),await((i=this.io)==null?void 0:i.notifications.click(t.id,void 0,o))}catch(s){(a=this.logger)==null||a.error(`Error while clicking on Notification: ${t.id}`,s)}},onShow:()=>{},close:async()=>{var o;return(o=this.logger)==null||o.info(`${t.id} - was closed.`),this.close(t.id)}})}};function Tl(t){const n=g.useContext(_e.IOConnectContext),e=ze(),[o,r]=g.useState([]),[i,a]=g.useState(0),s="Platform",l=g.useCallback((d="asc")=>{if(e===null)return[];const p=[...o].sort((h,m)=>{const v=(h.title??h.name).toLowerCase(),y=(m.title??m.name).toLowerCase();return d==="asc"?v.localeCompare(y):y.localeCompare(v)});if(!e){const h=p.findIndex(m=>m.name===s);if(h!==-1){const[m]=p.splice(h,1);p.unshift(m)}}return p},[o,e]),u=g.useMemo(()=>l("asc"),[l]),f=g.useMemo(()=>l("desc"),[l]);return g.useEffect(()=>{if(e===null||e)return;const d={title:"System",name:s,hidden:!1,userProperties:{hidden:!1}};r(p=>p.some(h=>h.name===d.name)?p:[...p,d])},[e]),g.useEffect(()=>{if(!n)return;let d,p,h,m=!1;const v=S=>{r(b=>[...b.filter(w=>w.name!==S.name),{title:S.title??S.name,name:S.name,hidden:S.hidden,userProperties:S.userProperties}])},y=S=>{r(b=>b.filter(w=>w.name!==S.name))},x=S=>{r(b=>b.find(w=>w.name===S.name)?b.map(w=>w.name===S.name?{...w,title:S.title??w.title,hidden:S.hidden??w.hidden,userProperties:S.userProperties??w.userProperties}:w):b)};return(async()=>{const S=await Ao.getApplications(n);if(m)return;r(j=>{const _=new Map;return j.forEach(M=>_.set(M.name,M)),S.forEach(M=>{_.set(M.name,{title:M.title??M.name,name:M.name,hidden:M.hidden,userProperties:M.userProperties})}),Array.from(_.values())});const[b,w,E]=await Promise.all([Ao.onAppAdded(n,v),Ao.onAppRemoved(n,y),Ao.onAppChanged(n,x)]);if(m)return b==null||b(),w==null||w(),void(E==null?void 0:E());d=b,p=w,h=E})().catch(S=>{console.error("Failed to initialize apps",S)}),()=>{m=!0,d==null||d(),p==null||p(),h==null||h()}},[n]),{apps:g.useMemo(()=>{if(!(t!=null&&t.sourceFilter)||!Array.isArray(o))return o;const{allowed:d=[],blocked:p=[]}=t.sourceFilter,h=d.includes("*"),m=p.includes("*");let v=0;const y=o.map(x=>{const S=h||d.includes(x.name),b=!m&&S;return b&&v++,{...x,allowed:b}});return a(v),y},[t,o]),allowedApps:i,sortedAppsAsc:u,sortedAppsDesc:f,sortAppsAlphabetically:l}}function Jh(t,n,e){var r;return{notificationStacks:g.useMemo(()=>{var u,f,d,p;if(!n.toastStacking)return[];const i=(a=n.stackBy)==="application"?"source":a==="severity"?"severity":"source";var a;const s=t.filter(h=>h.state==="Active"),l=new Map;for(const h of s){const m=h[i]??"";if(h.source&&((f=(u=e==null?void 0:e.sourceFilter)==null?void 0:u.muted)!=null&&f.includes(h.source))||(p=(d=e==null?void 0:e.sourceFilter)==null?void 0:d.muted)!=null&&p.includes("*"))continue;l.has(m)||l.set(m,{key:m,items:[]});const v=l.get(m);v&&v.items.unshift(h)}return Array.from(l.values()).filter(h=>h.items.some(m=>m.state==="Active"||m.state==="Stale"))},[t,n.toastStacking,n.stackBy,(r=e==null?void 0:e.sourceFilter)==null?void 0:r.muted])}}function Xh(t){const[n,e]=g.useState([]);return{selectedNotifications:n,selectNotification:(o,r)=>{const i=n;e(r?[...i,o]:i.filter(a=>a!==o))},selectAllNotifications:(o,r)=>{if(r){let i=[];switch(o){case"read":i=t.filter(a=>a.state==="Acknowledged"||a.state==="Seen").map(a=>a.id);break;case"unread":i=t.filter(a=>a.state==="Active"||a.state==="Stale").map(a=>a.id);break;case"snoozed":i=t.filter(a=>a.state==="Snoozed").map(a=>a.id);break;default:i=t.map(a=>a.id)}e(i)}else e([])}}}const Od=t=>{var n,e;return{enabledNotifications:t.enable,enabledToasts:t.enableToasts,toastStacking:((n=t.toasts)==null?void 0:n.mode)==="stacked",stackBy:(e=t.toasts)==null?void 0:e.stackBy,toastExpiry:t.toastExpiry,showNotificationBadge:t.showNotificationBadge,placement:t.placement,snooze:t.snooze,closeNotificationOnClick:t.closeNotificationOnClick,autoHidePanel:t.autoHidePanel}},Nd=t=>Array.from(t.reduce((n,e)=>n.set(e.id,e),new Map).values());function ww(){const t=g.useContext(_e.IOConnectContext),[n,e]=g.useState({}),[o,r]=g.useState({}),[i,a]=g.useState([]),[s,l]=g.useState(0),[u,f]=g.useState(!0),{apps:d,allowedApps:p}=Tl(n),{notificationStacks:h}=Jh(i,{toastStacking:o.toastStacking??!1,stackBy:o.stackBy??"source"},{sourceFilter:n.sourceFilter}),{selectedNotifications:m,selectNotification:v,selectAllNotifications:y}=Xh(i);g.useEffect(()=>{(async()=>{await at.init(t),await(async()=>{try{const b=await at.getConfiguration();e(b),r(w=>({...w,...Od(b)}))}catch(b){console.error("Error fetching configuration:",b)}})(),await(async()=>{try{const b=await at.getNotificationsList();a(Nd(b))}catch(b){console.error("Error fetching notifications:",b)}})()})().catch(b=>{console.error("Error in useNotifications fetch:",b)}),x()},[t]),g.useEffect(()=>{const b=at.onNotificationsChanged(j=>{a(Nd(j))}),w=at.onConfigurationChanged(j=>{const _=Od(j);e(M=>({...M,...j})),r(M=>({...M,..._}))}),E=at.onCounterChanged(j=>{l(j)});return()=>{b(),w(),E()}},[]);const x=()=>{f(at.bulkActionsSupported)},S=async b=>{await at.setFilter(b)};return{close:b=>at.close(b),clearAll:()=>at.clearAll(),settings:o,hidePanel:async()=>{await at.hidePanel()},showPanel:async()=>{await at.showPanel()},saveFilter:S,clearAllOld:()=>at.clearAllOld(),saveSetting:async b=>{const w=((E,j)=>{const _=(D=>({enabledNotifications:A=>({enable:A}),enabledToasts:A=>({enableToasts:A}),toastStacking:A=>{var P;return{toasts:{mode:A?"stacked":"single",stackBy:(P=D.toasts)==null?void 0:P.stackBy}}},stackBy:A=>{var P;return{toasts:{mode:(P=D.toasts)==null?void 0:P.mode,stackBy:A}}},showNotificationBadge:A=>({showNotificationBadge:A}),toastExpiry:A=>({toastExpiry:A}),placement:A=>({placement:A}),snooze:A=>({snooze:A}),closeNotificationOnClick:A=>({closeNotificationOnClick:A}),autoHidePanel:A=>({autoHidePanel:A})}))(j),M=Object.keys(E)[0],F=E[M];return M&&F!==void 0&&_[M]?_[M](F):{}})(b,n);w&&await at.configure(w)},allApps:d,saveAllFilter:async b=>{"subscribe"in b?await S({allowed:b.subscribe?["*"]:[],blocked:b.subscribe?[]:["*"]}):"mute"in b&&await S({muted:b.mute?["*"]:[]})},configuration:n,notifications:i,notificationStacks:h,notificationsCount:s,allApplications:n.allApplications??0,allowedApplications:p,isBulkActionsSupported:u,selectedNotifications:m,selectNotification:v,selectAllNotifications:y,clearMany:async b=>{await at.clearMany(b)},snooze:async(b,w)=>{await at.snooze(b,w)},snoozeMany:async(b,w)=>{await at.snoozeMany(b,w)},setState:async(b,w)=>{await at.setState(b,w)},setStates:async(b,w)=>{await at.setStates(b,w)},setCount:b=>{l(b)},getNotificationsList:async()=>await at.getNotificationsList()}}const Qh=g.createContext({allApps:[],settings:{},configuration:{},notifications:[],notificationsCount:0,onClose:()=>{},allApplications:0,clearAll:()=>{},showPanel:()=>{},hidePanel:()=>{},saveFilter:()=>{},clearAllOld:()=>{},notificationStacks:[],saveSetting:()=>{},allowedApplications:0,saveAllFilter:()=>{},isBulkActionsSupported:!1,selectedNotifications:[],selectNotification:()=>{},selectAllNotifications:()=>{},clearMany:()=>{},snooze:()=>{},snoozeMany:()=>{},setState:()=>{},setStates:()=>{},setCount:()=>{}}),Te=()=>g.useContext(Qh);function em({label:t="Allow notifications",align:n="right",...e}){const{settings:o,saveSetting:r}=Te(),i=ze(),a=g.useCallback(s=>{r({enabledNotifications:s.target.checked})},[r]);return i?c.jsx(vt,{label:t,align:n,onChange:a,checked:o.enabledNotifications??!1,...e}):null}function tm({label:t="Allow notification toasts",align:n="right",...e}){const{settings:o,saveSetting:r}=Te(),i=ze(),a=i&&!o.enabledNotifications,s=g.useCallback(l=>{r({enabledToasts:l.target.checked})},[r]);return i?c.jsx(vt,{label:t,align:n,onChange:s,checked:o.enabledToasts??!1,disabled:a,...e}):null}function nm({label:t="Show notification badge",align:n="right",...e}){const{settings:o,saveSetting:r}=Te(),i=ze()&&!o.enabledNotifications,a=g.useCallback(s=>{r({showNotificationBadge:s.target.checked})},[r]);return c.jsx(vt,{label:t,align:n,onChange:a,checked:o.showNotificationBadge??!1,disabled:i,...e})}function om({label:t="Close notification on click",align:n="right",...e}){const{settings:o,saveSetting:r}=Te(),i=ze(),a=i&&!o.enabledNotifications,s=g.useCallback(l=>{r({closeNotificationOnClick:l.target.checked})},[r]);return i?c.jsx(vt,{label:t,align:n,onChange:s,checked:o.closeNotificationOnClick??!1,disabled:a,...e}):null}function rm({label:t="Auto hide panel",align:n="right",...e}){const{settings:o,saveSetting:r}=Te(),i=ze(),a=g.useCallback(s=>{r({autoHidePanel:s.target.checked})},[r]);return i?c.jsx(vt,{label:t,align:n,onChange:a,checked:o.autoHidePanel??!1,...e}):null}const Id=(t,n)=>t?`${t} ${n}${t!==1?"s":""}`:"",ba=t=>{const n=Math.floor(t/60),e=t%60,o=Id(n,"minute"),r=Id(e,"second");return o+(o&&r?" ":"")+r};function im({className:t,title:n="Hide toasts after",items:e=[15,30,45,60],...o}){const r=de("flex","jc-between","ai-center",t),{settings:i,saveSetting:a}=Te(),s=ze(),l=s&&!i.enabledNotifications,u=g.useCallback((f=15e3)=>{i.toastExpiry!==f&&a({toastExpiry:1e3*f})},[i.toastExpiry,a]);return s?c.jsxs("div",{className:r,...o,children:[c.jsx("div",{className:"io-text-clipper "+(l?"io-text-disabled":""),children:c.jsx("span",{children:n})}),c.jsxs(xe,{variant:"light",disabled:l,children:[c.jsx(xe.Button,{text:ba((i.toastExpiry??0)/1e3)}),c.jsx(xe.Content,{children:c.jsx(xe.List,{variant:"single",children:e.map(f=>c.jsx(xe.Item,{onClick:()=>{u(f)},children:ba(f)},f))})})]})]}):null}function am({className:t,title:n="Stacking",...e}){const o=de("io-notifications-settings-panel-stacking",t),{ToastStacking:r,ToastStackBy:i}=zo();return ze()?c.jsx("div",{className:o,...e,children:c.jsxs(et,{title:n,children:[c.jsx(r,{}),c.jsx(i,{})]})}):null}function sm({label:t="Allow toast stacking",align:n="right",...e}){const{settings:o,saveSetting:r}=Te(),i=ze(),a=i&&!o.enabledNotifications,s=g.useCallback(l=>{r({toastStacking:l.target.checked})},[r]);return i?c.jsx(vt,{label:t,align:n,onChange:s,checked:o.toastStacking??!1,disabled:a,...e}):null}const Fc={application:"Application",severity:"Priority"},bw=Object.fromEntries(Object.entries(Fc).map(([t,n])=>[n,t]));function cm({className:t,title:n="Group by",...e}){const o=de("flex","jc-between","ai-center",t),{settings:r,saveSetting:i}=Te(),a=ze(),s=a&&!r.enabledNotifications,l=g.useCallback((f="severity")=>{r.stackBy!==f&&i({stackBy:f.toLowerCase()})},[r.stackBy,i]);if(!a)return null;const u=Object.values(Fc);return c.jsxs("div",{className:o,...e,children:[c.jsx("div",{className:de("io-text-clipper",{"io-text-disabled":s}),children:c.jsx("span",{children:n})}),c.jsxs(xe,{variant:"light",disabled:s,children:[c.jsx(xe.Button,{text:Fc[r.stackBy??"severity"]}),c.jsx(xe.Content,{children:c.jsx(xe.List,{variant:"single",children:u.map(f=>c.jsx(xe.Item,{onClick:()=>{const d=bw[f];l(d)},children:f},f))})})]})]})}function lm({className:t,title:n="Placement",...e}){const o=de("io-notifications-settings-panel-placement",t),{PlacementPanel:r,PlacementToasts:i}=zo();return ze()?c.jsx("div",{className:o,...e,children:c.jsxs(et,{title:n,children:[c.jsx(r,{}),c.jsx(i,{})]})}):null}const um=t=>t.replace(/(^|-)\w/g,n=>n.toUpperCase().replace("-"," "));function dm({className:t,title:n="Panel position",...e}){var l,u;const o=de("flex","jc-between","ai-center",t),{settings:r,saveSetting:i}=Te(),a=ze(),s=g.useCallback(f=>{var d;f||(f="right"),((d=r.placement)==null?void 0:d.panel)!==f&&i({placement:{...r.placement,panel:f.toLowerCase()}})},[r.placement,i]);return a?c.jsxs("div",{className:o,...e,children:[c.jsx("div",{className:"io-text-clipper",children:c.jsx("span",{children:n})}),c.jsxs(xe,{variant:"light",children:[c.jsx(xe.Button,{text:(l=r.placement)!=null&&l.panel?um((u=r.placement)==null?void 0:u.panel):"Right"}),c.jsx(xe.Content,{children:c.jsx(xe.List,{variant:"single",children:["Right","Left"].map(f=>c.jsx(xe.Item,{onClick:()=>{s(f)},children:f},f))})})]})]}):null}function fm({className:t,title:n="Toasts position",...e}){var l,u;const o=de("flex","jc-between","ai-center",t),{settings:r,saveSetting:i}=Te(),a=ze(),s=g.useCallback(f=>{var p;if(f||(f="bottom-right"),((p=r.placement)==null?void 0:p.toasts)===f)return;const d=f.replace(/\s+/g,"-").toLowerCase();i({placement:{...r.placement,toasts:d}})},[r.placement,i]);return a?c.jsxs("div",{className:o,...e,children:[c.jsx("div",{className:"io-text-clipper",children:c.jsx("span",{children:n})}),c.jsxs(xe,{variant:"light",children:[c.jsx(xe.Button,{text:(l=r.placement)!=null&&l.toasts?um((u=r.placement)==null?void 0:u.toasts):"Bottom Right"}),c.jsx(xe.Content,{children:c.jsx(xe.List,{variant:"single",children:["Top Right","Top Left","Bottom Right","Bottom Left"].map(f=>c.jsx(xe.Item,{onClick:()=>{s(f)},children:f},f))})})]})]}):null}function pm({className:t,title:n="Snooze",...e}){var a;const o=de("io-notifications-settings-panel-snooze",t),{SnoozeDuration:r}=zo(),{settings:i}=Te();return ze()&&((a=i.snooze)!=null&&a.enabled)?c.jsx("div",{className:o,...e,children:c.jsx(et,{title:n,children:c.jsx(r,{})})}):null}function hm({className:t,title:n="Default duration",items:e=[60,120,180,300],...o}){var f,d;const r=de("flex","jc-between","ai-center",t),{settings:i,saveSetting:a}=Te(),s=ze(),l=s&&!i.enabledNotifications,u=g.useCallback((p=6e4)=>{var h;i.snooze&&((h=i.snooze)==null?void 0:h.duration)!==p&&a({snooze:{...i.snooze,duration:1e3*p}})},[i.snooze,a]);return s&&((f=i.snooze)!=null&&f.enabled)?c.jsxs("div",{className:r,...o,children:[c.jsx("div",{className:de("io-text-clipper",{"io-text-disabled":l}),children:c.jsx("span",{children:n})}),c.jsxs(xe,{variant:"light",disabled:l,children:[c.jsx(xe.Button,{text:ba((((d=i.snooze)==null?void 0:d.duration)??0)/1e3)}),c.jsx(xe.Content,{children:c.jsx(xe.List,{variant:"single",children:e.map(p=>c.jsx(xe.Item,{onClick:()=>{u(p)},children:ba(p)},p))})})]})]}):null}function mm({className:t,title:n,...e}){const o=de("io-notifications-settings-panel-subscriptions",t),{SubscribeAll:r,SubscribeApp:i,SubscribeMuteAll:a,SubscribeMuteApp:s}=zo(),{sortAppsAlphabetically:l}=Tl(),u=ze(),f=l(),d="io-notifications-subscriptions-grid "+(u?"with-three-columns":"with-two-columns");return c.jsx("div",{className:o,...e,children:c.jsxs(et,{title:n??(u?"Subscribe & Mute":"Subscribe"),children:[c.jsxs("div",{className:d,children:[c.jsx("p",{className:"io-text-section",children:"Sources"}),c.jsx("p",{className:"io-text-section",children:"Subscribe"}),u&&c.jsx("p",{className:"io-text-section",children:"Mute"})]}),c.jsxs("div",{className:d,children:[c.jsx("p",{children:"All Sources"}),c.jsx(r,{label:""}),u&&c.jsx(a,{label:""})]}),f.map(p=>{var h;return!p||p.hidden||(h=p==null?void 0:p.userProperties)!=null&&h.hidden?null:c.jsxs("div",{className:d,children:[c.jsx("p",{children:p.title??p.name}),c.jsx(i,{app:p,label:""}),u&&c.jsx(s,{app:p,label:""})]},p.name)})]})})}function gm({label:t="All apps",align:n="right",...e}){var l,u,f,d;const{settings:o,configuration:r,saveAllFilter:i}=Te(),a=ze()&&!o.enabledNotifications,s=g.useCallback(p=>{i({subscribe:p.target.checked})},[i]);return c.jsx(vt,{align:n,label:t,onChange:s,checked:(((u=(l=r.sourceFilter)==null?void 0:l.allowed)==null?void 0:u.includes("*"))&&((d=(f=r.sourceFilter)==null?void 0:f.blocked)==null?void 0:d.length)===0)??!1,disabled:a,...e})}function vm({label:t="App",align:n="right",app:e,...o}){var f,d,p,h,m,v;const{allApps:r,settings:i,configuration:a,saveFilter:s}=Te(),l=ze()&&!i.enabledNotifications,u=g.useCallback((y,x)=>{var w,E,j,_,M,F;const S={...a.sourceFilter},b=(w=S.allowed)==null?void 0:w.indexOf("*");typeof b=="number"&&b>-1&&((E=S.allowed)==null||E.splice(b,1),r.forEach(D=>{var A;D.name!==x.name&&((A=S.allowed)==null||A.push(D.name))})),y?(S.allowed=[...new Set([...S.allowed??[],x.name])],S.blocked=(j=S.blocked)==null?void 0:j.filter(D=>D!==x.name)):(S.allowed=(_=S.allowed)==null?void 0:_.filter(D=>D!==x.name),S.blocked=[...new Set([...S.blocked??[],x.name])]),(M=S.allowed)!=null&&M.length&&((F=S.blocked)!=null&&F.includes("*"))&&S.blocked.splice(S.blocked.indexOf("*"),1),s(S)},[r,a.sourceFilter,s]);return c.jsx(vt,{id:`subscribe-${e.name}`,label:t,align:n,onChange:y=>u(y.target.checked,e),checked:(((d=(f=a.sourceFilter)==null?void 0:f.allowed)==null?void 0:d.includes("*"))&&!((h=(p=a.sourceFilter)==null?void 0:p.blocked)!=null&&h.includes(e.name))||((v=(m=a.sourceFilter)==null?void 0:m.allowed)==null?void 0:v.includes(e.name)))??!1,disabled:l,...o})}function ym({label:t="Mute all",align:n="right",...e}){var u,f,d,p;const{settings:o,configuration:r,saveAllFilter:i}=Te(),a=ze(),s=a&&(!o.enabledNotifications||((f=(u=r.sourceFilter)==null?void 0:u.allowed)==null?void 0:f.indexOf("*"))===-1),l=g.useCallback(h=>{i({mute:h.target.checked})},[i]);return a?c.jsx(vt,{align:n,label:t,onChange:l,checked:((p=(d=r.sourceFilter)==null?void 0:d.muted)==null?void 0:p.includes("*"))??!1,disabled:s??!1,...e}):null}function wm({label:t="App",align:n="right",app:e,...o}){var d,p,h,m,v,y,x,S,b,w,E,j,_,M,F,D;const{allApps:r,settings:i,configuration:a,saveFilter:s}=Te(),l=ze(),u=l&&(!i.enabledNotifications||((p=(d=a.sourceFilter)==null?void 0:d.blocked)==null?void 0:p.includes("*"))||((m=(h=a.sourceFilter)==null?void 0:h.blocked)==null?void 0:m.includes(e.name))||((y=(v=a.sourceFilter)==null?void 0:v.allowed)==null?void 0:y.length)===0||((S=(x=a.sourceFilter)==null?void 0:x.allowed)==null?void 0:S.indexOf(e.name))===-1&&((w=(b=a.sourceFilter)==null?void 0:b.allowed)==null?void 0:w.indexOf("*"))===-1&&((j=(E=a.sourceFilter)==null?void 0:E.blocked)==null?void 0:j.length)===0),f=g.useCallback((A,P)=>{var z,ee,q,ie;const re={...a.sourceFilter},ae=(z=re==null?void 0:re.muted)==null?void 0:z.indexOf("*");typeof ae=="number"&&ae>-1&&((ee=re.muted)==null||ee.splice(ae,1),r.forEach(J=>{var W;J.name===P.name||J.hidden||((W=re.muted)==null||W.push(J.name))})),A?(q=re.muted)==null||q.push(P.name):re.muted=(ie=re.muted)==null?void 0:ie.filter(J=>J!==P.name),s(re)},[r,a.sourceFilter,s]);return!l||e.hidden?null:c.jsx(vt,{id:`mute-${e.name}`,label:t,align:n,onChange:A=>f(A.target.checked,e),checked:(((M=(_=a.sourceFilter)==null?void 0:_.muted)==null?void 0:M.includes("*"))||((D=(F=a.sourceFilter)==null?void 0:F.muted)==null?void 0:D.includes(e.name)))??!1,disabled:u??!1,...o})}const bm={Body:t=>{const{General:n,Placement:e,Stacking:o,Snooze:r,Subscriptions:i}=zo();return c.jsxs(Wo,{element:gr,elementProps:t,children:[c.jsx(n,{}),c.jsx(o,{}),c.jsx(e,{}),c.jsx(r,{}),c.jsx(i,{})]})},General:qh,AllowNotifications:em,AllowNotificationToasts:tm,ShowNotificationBadge:nm,CloseNotificationOnClick:om,PanelAutoHide:rm,HideToastsAfter:im,Stacking:am,ToastStacking:sm,ToastStackBy:cm,Placement:lm,PlacementPanel:dm,PlacementToasts:fm,Snooze:pm,SnoozeDuration:hm,Subscriptions:mm,SubscribeAll:gm,SubscribeApp:vm,SubscribeMuteAll:ym,SubscribeMuteApp:wm},xm=g.createContext(bm),Dl=g.memo(({children:t,components:n})=>{const e=g.useMemo(()=>({...bm,...n}),[n]);return c.jsx(xm.Provider,{value:e,children:t})});Dl.displayName="NotificationsSettingsPanelComponentsStoreProvider";const zo=()=>g.useContext(xm),xw=({className:t,onClose:n,title:e="Notification Settings",...o})=>{const{Body:r}=zo();return c.jsxs(qe,{className:de("io-notifications-settings-panel",t),"data-testid":"notifications-settings-panel",...o,children:[c.jsxs(qe.Header,{children:[c.jsx(qe.Header.Title,{size:"large",text:e,tag:"h1"}),c.jsx(qe.Header.ButtonGroup,{children:c.jsx(qe.Header.ButtonIcon,{className:"non-draggable",variant:"circle",icon:"close",size:"32",onClick:n})})]}),c.jsx(r,{})]})},Ml=({components:t,...n})=>c.jsx(Dl,{components:t,children:c.jsx(xw,{...n})});function Cw({isOpen:t,onClose:n,container:e}){return t?oo.createPortal(c.jsx(Ml,{onClose:n}),e??document.querySelector("#root")??document.body):null}const Cm=g.createContext({searchQuery:"",setSearch:()=>{},isPanelVisible:!1,sortNotificationsBy:"newest",setSortBy:()=>{},viewNotificationsBy:"all",setViewBy:()=>{},isBulkActionsVisible:!1,showBulkActions:()=>{},hideBulkActions:()=>{}}),Tt=()=>g.useContext(Cm);function Sm({title:t,onOpenSettings:n,onClose:e,...o}){const{HeaderCaptionTitle:r,HeaderCaptionCount:i,HeaderCaptionButtonSettings:a,HeaderCaptionButtonClose:s,HeaderActions:l,HeaderBulkActions:u,HeaderSearch:f}=Ho(),{isBulkActionsSupported:d,notificationsCount:p}=Te(),{isBulkActionsVisible:h}=Tt(),m=ze();return c.jsxs(no,{...o,children:[c.jsxs("div",{className:"io-panel-header-caption",children:[c.jsx(r,{title:t}),c.jsx(i,{}),c.jsxs(no.ButtonGroup,{children:[m&&c.jsx(a,{onClick:n}),c.jsx(s,{onClick:e})]})]}),c.jsx(f,{}),d?c.jsxs("div",{className:`io-panel-header-actions-wrapper ${h&&p>0?"io-panel-header-bulk-actions-opened":""} `,children:[c.jsx(l,{}),c.jsx(u,{})]}):c.jsx(l,{})]})}function km({text:t="Notifications",counter:n,...e}){const{notificationsCount:o}=Te();return c.jsx(Nn,{text:t,size:"large",...e,children:(n??!0)&&c.jsxs("span",{children:["(",o,")"]})})}const Em="newest",Sw="oldest",kw="severity",Ls=["None","Low","Medium","High","Critical"],Pd={key:Em,descending:!0},jm=t=>[...t].sort((n,e)=>(e.timestamp||0)-(n.timestamp||0)),Om=t=>[...t].sort((n,e)=>(n.timestamp||0)-(e.timestamp||0)),Nm=(t,n)=>{const e=Ls[0];return[...t].sort((o,r)=>{const i=Ls.indexOf(o.severity||e),a=Ls.indexOf(r.severity||e);return(n?-1:1)*(i-a)})},Ew={[Em]:jm,[Sw]:Om,[kw]:Nm},jw={severity:"Priority",newest:"Newest",oldest:"Oldest"};function Im({...t}){const[n,e]=g.useState([]),{NotificationsList:o,Notification:r}=Ho(),{notifications:i,setCount:a,notificationsCount:s}=Te(),{sortNotificationsBy:l,viewNotificationsBy:u,searchQuery:f}=Tt(),d=g.useRef(null),p=rh(f),h=g.useMemo(()=>((v,y)=>{if(!v)return[];switch(y){case"all":default:return v;case"unread":return v.filter(x=>x.state==="Active"||x.state==="Stale");case"read":return v.filter(x=>x.state==="Acknowledged"||x.state==="Seen");case"snoozed":return v.filter(x=>x.state==="Snoozed")}})(i,u).filter(v=>{var y,x;return v.title.toLowerCase().includes(p.toLowerCase())||((y=v.source)==null?void 0:y.toLowerCase().includes(p.toLowerCase()))||((x=v.body)==null?void 0:x.toLowerCase().includes(p.toLowerCase()))}),[p,i,u]);return g.useEffect(()=>{switch(l){case"newest":e(jm(h));break;case"oldest":e(Om(h));break;case"severity":e(Nm(h,!0));break;default:e(h)}a(h.length)},[h,l,a]),g.useEffect(()=>{var m;d.current&&((m=d.current)==null||m.scrollTo({top:0,behavior:"smooth"}))},[p,s,l,u]),c.jsx(Wo,{ref:d,element:gr,elementProps:t,children:c.jsx(o,{notifications:n,Notification:r})})}function Pm({...t}){const{FooterButtons:n}=Ho();return c.jsx(Qo,{...t,children:c.jsx(n,{})})}function Am({className:t,...n}){const{FooterButtonClearAll:e,FooterButtonClearAllOld:o}=Ho(),{notifications:r}=Te(),[i,a]=g.useState(!1);return g.useEffect(()=>{r.filter(s=>s.state==="Stale"||s.state==="Acknowledged").length>0?a(!0):a(!1)},[r]),c.jsxs(Be,{className:t,align:"right",...n,children:[c.jsx(o,{disabled:!i}),c.jsx(e,{disabled:r.length<=0})]})}function Tm({text:t="Clear All",...n}){const{clearAll:e}=Te();return c.jsx(Je,{text:t,onClick:()=>{e()},...n})}function Dm({text:t="Clear Old",...n}){const{clearAllOld:e}=Te();return c.jsx(Je,{text:t,onClick:()=>{e()},...n})}function _l(t){const n=ze(),{onClose:e,settings:o}=Te(),{isPanelVisible:r}=Tt(),{id:i,onClick:a,updateState:s}=t,l=g.useCallback(async()=>{if(!a)return;if(!n){try{await a({close:!0})}catch(p){console.error(p)}return void e(i)}const f=(o==null?void 0:o.toastStacking)??!1;let d;d=r?(o==null?void 0:o.closeNotificationOnClick)??!0:!f&&null;try{d!==null?await a({close:d}):(await a({close:!1}),await s("Acknowledged"))}catch(p){console.error(p)}},[n,i,r,a,e,s,o==null?void 0:o.closeNotificationOnClick,o==null?void 0:o.toastStacking]),u=g.useCallback(async f=>{const d=f.target;d.closest("button")||d.closest("[role='button']")||d.closest("a")||d.closest(".io-dropdown-menu")||await l()},[l]);return{handleClick:l,handleWrapperClick:u}}function Mm({className:t,notification:n,onClick:e,...o}){const r=de("io-notification-header",t),{HeaderCount:i,HeaderBadge:a,HeaderTitle:s,HeaderTimestamp:l,HeaderButtonSnooze:u,HeaderButtonClose:f}=es(),{handleWrapperClick:d}=_l(n);return c.jsxs("div",{className:r,onClick:async p=>{await d(p),e==null||e(p)},...o,children:[c.jsx(a,{notification:n}),c.jsx(i,{notification:n}),c.jsx(s,{notification:n}),c.jsx(l,{notification:n}),c.jsxs(Be,{children:[c.jsx(u,{notification:n}),c.jsx(f,{notification:n})]})]})}function _m({notification:t,...n}){const{settings:e,notificationStacks:o}=Te(),{isPanelVisible:r}=Tt(),{toastStacking:i,stackBy:a}=e,s=a==="application"?"source":a??"source";let l=0;if(i){const u=o.find(f=>f.key===t[s]);l=(u==null?void 0:u.items.length)??0}return r||!i||l<=1?null:c.jsx(Ra,{...n,children:l>9?"9+":l})}function Lm({className:t,notification:n,...e}){if(!(n!=null&&n.severity)||n.severity==="None")return null;const o=de("io-notification-header-badge",t);return c.jsx(Ra,{className:o,...e,children:n.severity})}function Rm({className:t,state:n,severity:e="None",icon:o,...r}){const i=de("io-notification-header-icon",t),{isPanelVisible:a}=Tt();return c.jsxs("div",{className:i,...r,children:[o&&c.jsx("span",{className:"io-notification-header-icon-image",children:c.jsx("img",{src:o,alt:`io-notification-header-icon-${o}`})}),c.jsx("span",{className:`io-notification-header-icon-badge color-${e.toLowerCase()}`,children:a&&n!=="Acknowledged"&&"New"})]})}function Fm({className:t,notification:{appTitle:n},...e}){const o=de("io-notification-header-title",t);return c.jsx("div",{className:o,...e,children:n})}function Bm({className:t,notification:{timestamp:n,state:e,snooze:o},...r}){const i=de("io-notification-timestamp",t);return c.jsx("small",o&&e==="Snoozed"?{className:i,...r,children:"Snoozed"}:{className:i,...r,children:Lh(n??0)??"Just Now"})}function Hm({notification:{id:t,state:n},...e}){var a,s;const{settings:o,snooze:r}=Te(),i=g.useCallback(l=>{var u;l.stopPropagation(),r&&r(t,((u=o.snooze)==null?void 0:u.duration)??0)},[t,r,(a=o.snooze)==null?void 0:a.duration]);return r&&n!=="Snoozed"&&((s=o.snooze)!=null&&s.enabled)?c.jsx(Je,{icon:"snooze",variant:"link",text:"Snooze",tabIndex:-1,onClick:i,...e}):null}function $m({notification:{id:t,updateState:n},...e}){const o=ze(),{onClose:r}=Te(),{isPanelVisible:i}=Tt(),a=g.useCallback(s=>{s.stopPropagation(),!o||i?r(t):n("Acknowledged").catch(console.error)},[o,t,r,i,n]);return c.jsx(Ge,{icon:"close",iconSize:"10",tabIndex:-1,onClick:a,...e})}function Wm({className:t,notification:n,...e}){const o=de("io-notification-body",t),{BodyIcon:r,BodyTitle:i,BodyDescription:a}=es(),{icon:s,title:l,body:u}=n,{handleClick:f}=_l(n);return c.jsxs("div",{className:o,role:"button",tabIndex:0,onKeyDown:async d=>{ho(d)&&await f()},onClick:f,...e,children:[c.jsx(r,{icon:s}),c.jsxs("div",{className:"io-notification-body-content",children:[c.jsx(i,{text:l}),c.jsx(a,{text:u})]})]})}function zm({className:t,icon:n,altText:e="notification icon",...o}){if(!n)return null;const r=de("io-notification-body-icon",t);return c.jsx("div",{className:r,...o,children:c.jsx("img",{src:n,alt:e})})}function Um({text:t,...n}){return c.jsx(Nn,{text:t,...n})}function Vm({className:t,text:n,...e}){const o=de("io-notification-body-description",t);return c.jsx("p",{className:o,...e,children:n})}function Ym({className:t,notification:n}){const e=de("io-notification-footer",t),{FooterButton:o}=es(),{handleWrapperClick:r}=_l(n),i=g.useMemo(()=>function(s){const l=[],u={};if(!s)return;s.forEach(d=>{var v;const{displayId:p,displayPath:h}=d,m={...d,children:[]};if(h&&h.length>0){let y;h.forEach((x,S)=>{var b;S===0?y=u[x]:y&&(y=(b=y.children)==null?void 0:b.find(w=>w.displayId===x))}),y&&((v=y.children)==null||v.push(m))}else p?(l.push(m),u[p]=m):l.push(m);p&&(u[p]=m)});const f=d=>{d.forEach(p=>{var h;((h=p.children)==null?void 0:h.length)===0?delete p.children:p.children&&f(p.children)})};return f(l),l}(n.actions),[n.actions]),a=(s,l)=>s.children?c.jsx(hn,{text:s.title,children:s.children.map(a)},`${s.title}-${l}`):((u,f)=>c.jsx(hn.Item,{children:c.jsx(o,{variant:"link",className:"io-dropdown-menu-item io-dropdown-menu-button",notificationAction:u})},`${u.title}-${f}`))(s,l);return c.jsx("div",{className:e,onClick:r,children:c.jsx(Be,{align:"right",children:i==null?void 0:i.map((s,l)=>s.children?c.jsxs(Be,{variant:"append",children:[c.jsx(o,{notificationAction:s,variant:l===0?"primary":"default"}),c.jsx(hn,{variant:l===0?"primary":"default",icon:"ellipsis",children:s.children.map(a)})]},`${s.title}-${l}`):c.jsx(o,{notificationAction:s,variant:l===0?"primary":"link"},`${s.title}-${l}`))})})}function Gm({notificationAction:t,...n}){const e=g.useCallback(o=>{o.stopPropagation(),t.onClick({close:!0})},[t]);return c.jsx(Je,{text:t.title,onClick:e,...n})}const Km={Header:Mm,HeaderCount:_m,HeaderBadge:Lm,HeaderIcon:Rm,HeaderTitle:Fm,HeaderTimestamp:Bm,HeaderButtonSnooze:Hm,HeaderButtonClose:$m,Body:Wm,BodyIcon:zm,BodyTitle:Um,BodyDescription:Vm,Footer:Ym,FooterButton:Gm},Zm=g.createContext(Km),qm=g.memo(({children:t,components:n})=>{const e=g.useMemo(()=>({...Km,...n}),[n]);return c.jsx(Zm.Provider,{value:e,children:t})});function es(t){return{...g.useContext(Zm),...t}}function Ow({className:t,notification:n,...e}){const{Header:o,Body:r,Footer:i}=es(),{severity:a}=n,s=de("io-notification",`severity-${(a==null?void 0:a.toLowerCase())??"none"}`,n.state!=="Acknowledged"&&"state-new",t);return c.jsxs("div",{className:s,...e,children:[c.jsx(o,{notification:n}),c.jsx(r,{notification:n}),c.jsx(i,{notification:n})]})}function ts({components:t,notification:n,...e}){return c.jsx(qm,{components:t,children:c.jsx(Ow,{notification:n,...e})})}function Jm({className:t,notifications:n,...e}){const[o,r]=g.useState(!1),i=n.length>=3?"large":"normal",a=n.length===2?"small":i,s=n[0].severity,l=de("io-notification-stack",o&&"io-notification-stack-open",a!=="normal"&&[`io-notification-stack-${a}`],s&&s!=="None"&&[`io-notification-stack-${s.toLowerCase()}`],t),u=g.useCallback(()=>{r(!0)},[]),f=g.useCallback(d=>{d.stopPropagation(),n.forEach(p=>{p.close()})},[n]);return c.jsxs("div",{className:l,onClick:u,...e,children:[o&&a!=="normal"&&c.jsx("div",{className:"io-notification-stack-btn",children:c.jsx(Je,{icon:"close",onClick:d=>f(d),children:c.jsx("span",{className:"io-btn-text",children:"Clear Stack"})})}),n.map(d=>c.jsx(ts,{notification:d},d.id))]})}function Nw({...t}){const{notificationStacks:n}=Te();return c.jsx(c.Fragment,{children:n.map(e=>c.jsx(Jm,{notifications:e.items,...t},e.key))})}qm.displayName="ComponentsStoreProvider";const Iw=({notification:t,Notification:n,...e})=>{var h;const{configuration:o,isBulkActionsSupported:r,selectedNotifications:i,selectNotification:a}=Te(),{isPanelVisible:s,isBulkActionsVisible:l}=Tt(),u=((h=o.sourceFilter)==null?void 0:h.muted)??[],f=t.source&&u.includes(t.source)||u.includes("*");if(!s&&f)return null;const d=s&&r&&l,p=i.includes(t.id);return d?c.jsxs("div",{className:de("io-notification-list-bulk-action-item",{selected:p}),children:[c.jsx(Za,{checked:p,onChange:m=>a(t.id,m.target.checked)}),c.jsx(n,{notification:t,...e})]}):c.jsx(n,{notification:t,...e})};function Ll({className:t,Notification:n,notifications:e=[],noNotificationText:o="No notifications to display",...r}){const i=de("io-notification-list",t),{settings:a}=Te(),{isPanelVisible:s}=Tt(),{toastStacking:l}=a,u=l&&!s,f=e.length>0;return c.jsxs("div",{className:i,...r,children:[u&&c.jsx(Nw,{}),!u&&(f?e.map(d=>c.jsx(Iw,{notification:d,Notification:n,...r},d.id)):c.jsx("div",{className:"io-notification-list-no-notifications",children:o}))]})}const Xm={Header:Sm,HeaderCaptionTitle:km,HeaderCaptionCount:function({variant:t="primary",...n}){const{notificationsCount:e=0}=Te();return e===0?null:c.jsx(Cv,{variant:t,...n,children:e>99?"99+":e})},HeaderCaptionButtonSettings:function({icon:t="cog",size:n="32",variant:e="circle",...o}){return ze()?c.jsx(Ge,{icon:t,size:n,variant:e,...o}):null},HeaderCaptionButtonClose:function({icon:t="close",size:n="32",variant:e="circle",onClick:o,...r}){const{hidePanel:i}=Te(),a=ze();return c.jsx(Ge,{icon:t,size:n,variant:e,onClick:s=>{o?o(s):a&&i()},...r})},HeaderActions:function({className:t,...n}){const e=de("io-panel-header-actions",t),{HeaderActionSort:o,HeaderActionView:r,HeaderActionClear:i,HeaderActionEdit:a}=Ho();return c.jsxs("div",{className:e,...n,children:[c.jsxs(Be,{children:[c.jsx(o,{}),c.jsx(r,{})]}),c.jsxs(Be,{children:[c.jsx(i,{}),c.jsx(a,{})]})]})},HeaderActionSort:function({text:t="Sort by",...n}){const{sortNotificationsBy:e,setSortBy:o}=Tt(),{onNotificationsSort:r}=(()=>{const{notifications:i}=Te(),[a,s]=g.useState(Pd),{key:l,descending:u}=a,f=g.useMemo(()=>Ew[l](i,u),[i,l,u]);return{onNotificationsSort:g.useCallback(p=>{s(h=>({key:p,descending:h.key!==p?Pd.descending:!h.descending}))},[]),sortedNotifications:f}})();return c.jsxs(xe,{variant:"light",...n,children:[c.jsxs(xe.Button,{variant:"link",children:[t," ",c.jsx("strong",{children:jw[e].toLowerCase()})]}),c.jsx(xe.Content,{children:c.jsx(xe.List,{variant:"single",checkIcon:"check",children:["Newest","Oldest","Priority"].map(i=>{const a=i==="Priority"?"severity":i.toLowerCase();return c.jsx(xe.Item,{isSelected:e===a,onClick:()=>{o(a),r(a)},children:i},i)})})})]})},HeaderActionView:function({text:t="View",...n}){var a;const{settings:e}=Te(),{viewNotificationsBy:o,setViewBy:r}=Tt(),i=(a=e.snooze)!=null&&a.enabled?["All","Read","Unread","Snoozed"]:["All","Read","Unread"];return c.jsxs(xe,{variant:"light",...n,children:[c.jsxs(xe.Button,{variant:"link",children:[t," ",c.jsx("strong",{children:o})]}),c.jsx(xe.Content,{children:c.jsx(xe.List,{variant:"single",checkIcon:"check",children:i.map(s=>c.jsx(xe.Item,{isSelected:o===s.toLowerCase(),onClick:()=>r(s.toLowerCase()),children:s},s))})})]})},HeaderActionClear:function({text:t="Clear All",...n}){const{clearAll:e,notificationsCount:o}=Te();return c.jsx(Je,{variant:"link",text:t,onClick:e,disabled:o===0,...n})},HeaderActionEdit:function({tooltip:t="Bulk Edit",...n}){const{isBulkActionsSupported:e,notificationsCount:o}=Te(),{showBulkActions:r}=Tt();return e?c.jsx(Ge,{icon:"pen-to-square",title:t,size:"32",onClick:r,disabled:o===0,...n}):null},HeaderBulkActions:function({className:t,...n}){const e=de("io-panel-header-bulk-actions",t),{HeaderBulkActionSelect:o,HeaderBulkActionSelectDropdown:r,HeaderBulkActionMarkAsRead:i,HeaderBulkActionMarkAsUnread:a,HeaderBulkActionSnooze:s,HeaderBulkActionClear:l,HeaderBulkActionClose:u}=Ho(),{isBulkActionsSupported:f}=Te();return f?c.jsx("div",{className:e,...n,children:c.jsxs(Be,{children:[c.jsx(o,{}),c.jsx(r,{}),c.jsx(i,{}),c.jsx(a,{}),c.jsx(s,{}),c.jsx(l,{}),c.jsx(u,{})]})}):null},HeaderBulkActionSelect:function({...t}){const{isBulkActionsSupported:n,selectedNotifications:e,selectAllNotifications:o,notificationsCount:r}=Te();return n?c.jsx(Za,{checked:r===e.length&&r>0,onChange:i=>o("all",i.target.checked),disabled:r===0,...t}):null},HeaderBulkActionSelectDropdown:function({...t}){const{isBulkActionsSupported:n,selectAllNotifications:e,notificationsCount:o}=Te();return n?c.jsxs(xe,{variant:"light",...t,children:[c.jsx(xe.ButtonIcon,{variant:"default",icon:"chevron-down",size:"16",iconSize:"10",disabled:o===0}),c.jsx(If,{children:c.jsxs(xe.List,{variant:"single",checkIcon:"check",children:[c.jsx(xe.ItemSection,{children:"Select"}),["All","Read","Unread","Snoozed"].map(r=>c.jsx(xe.Item,{onClick:()=>e(r.toLowerCase(),!0),children:r},r))]})})]}):null},HeaderBulkActionMarkAsRead:function({icon:t="envelope-open",size:n="32",variant:e="circle",tooltip:o="Mark as read",...r}){const{isBulkActionsSupported:i,selectedNotifications:a,setStates:s,notificationsCount:l}=Te(),u=g.useCallback(()=>{s(a,"Seen")},[a,s]);return i?c.jsx(Ge,{icon:t,size:n,variant:e,title:o,onClick:u,disabled:l===0,...r}):null},HeaderBulkActionMarkAsUnread:function({icon:t="envelope",size:n="32",variant:e="circle",tooltip:o="Mark as unread",...r}){const{isBulkActionsSupported:i,selectedNotifications:a,setStates:s,notificationsCount:l}=Te(),u=g.useCallback(()=>{s(a,"Active")},[a,s]);return i?c.jsx(Ge,{icon:t,size:n,variant:e,title:o,onClick:u,disabled:l===0,...r}):null},HeaderBulkActionSnooze:function({icon:t="snooze",size:n="32",variant:e="circle",tooltip:o="Snooze",...r}){var d,p;const{isBulkActionsSupported:i,selectedNotifications:a,snoozeMany:s,settings:l,notificationsCount:u}=Te(),f=g.useCallback(()=>{var h;s(a,((h=l.snooze)==null?void 0:h.duration)??0)},[a,s,(d=l.snooze)==null?void 0:d.duration]);return i&&((p=l.snooze)!=null&&p.enabled)?c.jsx(Ge,{icon:t,size:n,variant:e,title:o,onClick:f,disabled:u===0,...r}):null},HeaderBulkActionClear:function({icon:t="trash",size:n="32",variant:e="circle",tooltip:o="Clear",...r}){const{isBulkActionsSupported:i,selectedNotifications:a,clearMany:s,notificationsCount:l}=Te(),u=g.useCallback(()=>{s(a)},[a,s]);return i?c.jsx(Ge,{icon:t,size:n,variant:e,title:o,onClick:u,disabled:l===0,...r}):null},HeaderBulkActionClose:function({text:t="Done",variant:n="primary",...e}){const{isBulkActionsSupported:o,notificationsCount:r}=Te(),{hideBulkActions:i}=Tt();return o?c.jsx(Je,{variant:n,text:t,onClick:i,disabled:r===0,...e}):null},HeaderSearch:function({className:t,placeholder:n="Search",iconPrepend:e="search",iconAppend:o="close",...r}){const i=de("io-panel-header-search",t),a=g.useRef(null),{notificationsCount:s}=Te(),{searchQuery:l,setSearch:u}=Tt(),f=l.length>0,d=g.useCallback(()=>{u(""),a.current&&a.current.focus()},[u]);return c.jsxs("div",{className:i,children:[c.jsx(Bo,{ref:a,value:l,iconPrepend:e,iconAppend:f?o:void 0,iconAppendOnClick:f?d:void 0,placeholder:n,onChange:p=>u(p.target.value),...r}),f&&c.jsx("p",{className:"io-panel-header-search-count",children:`${s} results`})]})},Body:Im,Footer:Pm,FooterButtons:Am,FooterButtonClearAll:Tm,FooterButtonClearAllOld:Dm,Notification:ts,NotificationsList:Ll},Qm=g.createContext(Xm),eg=g.memo(({children:t,components:n})=>{const e=g.useMemo(()=>({...Xm,...n}),[n]);return c.jsx(Qm.Provider,{value:e,children:t})});function Ho(t){return{...g.useContext(Qm),...t}}eg.displayName="ComponentsStoreProvider";function tg(){var r,i;const t=g.useContext(_e.IOConnectContext),{settings:n}=Te(),e=ze(),o=g.useCallback(async()=>{var l,u,f;const a=t.windows.my();if(!t||!a||!e)return;const s=a.placementSettings;await a.place({...s,snapped:!0,top:12,left:((l=n.placement)==null?void 0:l.panel)==="left"?12:void 0,right:((u=n.placement)==null?void 0:u.panel)==="right"?12:void 0,bottom:12,width:400,horizontalAlignment:(f=n.placement)==null?void 0:f.panel})},[t,e,(r=n.placement)==null?void 0:r.panel]);g.useEffect(()=>{var a;t&&((a=n.placement)!=null&&a.panel)&&e&&o().catch(console.error)},[t,e,o,(i=n.placement)==null?void 0:i.panel])}function Pw({className:t,onClose:n,title:e="Notifications",...o}){var p,h;const{Header:r,Body:i}=Ho(),{settings:a}=Te(),{isPanelVisible:s}=Tt(),[l,u]=g.useState(!1),f=ze(),d=de("io-notifications-panel",((p=a.placement)==null?void 0:p.panel)==="left"&&"io-panel-left",((h=a.placement)==null?void 0:h.panel)==="right"&&"io-panel-right",t);return tg(),g.useEffect(()=>{s||u(!1)},[s]),c.jsxs(c.Fragment,{children:[c.jsxs(qe,{className:d,...o,children:[c.jsx(r,{title:e,onClose:n,onOpenSettings:()=>u(!0)}),c.jsx(i,{})]}),f&&s&&c.jsx(Cw,{isOpen:l,onClose:()=>u(!1)})]})}const ng=({className:t,notifications:n,maxToasts:e=1,...o})=>{const r=de("io-toasts-body",t),{NotificationsList:i,Notification:a}=ag(),[s,l]=g.useState([]);return g.useEffect(()=>{const u=e<0?n.length:e,f=n.filter(d=>d.state==="Active").slice(0,u);for(const d of f)d.onShow();l(f)},[n,e]),c.jsx("div",{className:r,...o,children:c.jsx(i,{Notification:a,notifications:s,noNotificationText:""})})};ng.displayName="Body";const og={Body:ng,Notification:ts,NotificationsList:Ll},rg=g.createContext(og),ig=g.memo(({children:t,components:n})=>{const e=g.useMemo(()=>({...og,...n}),[n]);return c.jsx(rg.Provider,{value:e,children:t})});function ag(t){return{...g.useContext(rg),...t}}ig.displayName="ComponentsStoreProvider";function sg(){var r;const t=g.useContext(_e.IOConnectContext),{settings:n}=Te(),e=(r=n.placement)==null?void 0:r.toasts,o=g.useCallback(async()=>{const i=t.windows.my();if(!t||!i)return;const a=i.placementSettings;await i.place({...a,snapped:!0,left:e==="top-left"||e==="bottom-left"?12:void 0,right:e==="top-right"||e==="bottom-right"?12:void 0,width:400,verticalAlignment:e==="top-left"||e==="top-right"?"top":"bottom",horizontalAlignment:e==="top-right"||e==="bottom-right"?"right":"left"})},[t,e]);g.useEffect(()=>{t&&e&&o().catch(console.error)},[t,o,e])}function Aw({className:t,maxToasts:n=10,...e}){var p;const{Header:o,Body:r,Footer:i}=ag(),{notifications:a,settings:s}=Te(),l=g.useRef(null),u=function(h){const m=g.useContext(_e.IOConnectContext),v=g.useRef(null),y=g.useRef(0),[x,S]=g.useState(!1),b=g.useCallback(async w=>{if(!m)return;const E=m.windows.my();if(!E)return;let j=1080;try{j=(await m.displays.getPrimary()).workArea.height}catch(M){console.warn("Could not get primary display, using fallback height:",M)}const _=Math.min(Math.max(w,92),j);if(S(w>=j),!(Math.abs(_-y.current)<5)){y.current=_;try{const M=E.placementSettings;await E.place({...M,height:_})}catch(M){console.error("Error updating toasts window height:",M)}}},[m]);return g.useEffect(()=>{if(!h.current||!m)return;const w=h.current,E=new ResizeObserver(j=>{const _=j.at(-1);if(!_)return;const{height:M}=_.contentRect,F=getComputedStyle(w),D=Number.parseInt(F.paddingTop,10),A=Number.parseInt(F.paddingBottom,10),P=(Number.isNaN(D)?0:D)+M+(Number.isNaN(A)?0:A);v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{b(P).catch(console.error)},100)});return E.observe(w),()=>{E.disconnect(),v.current&&clearTimeout(v.current)}},[m,b]),x}(l),f=(p=s.placement)==null?void 0:p.toasts,d=de("io-toasts",(f==="top-left"||f==="top-right")&&"io-toasts-top",(f==="top-right"||f==="bottom-right")&&"io-toasts-right",(f==="bottom-left"||f==="bottom-right")&&"io-toasts-bottom",(f==="top-left"||f==="bottom-left")&&"io-toasts-left",u&&"io-toasts-max-height",t);return sg(),c.jsxs("div",{className:d,...e,children:[o&&c.jsx(o,{}),c.jsx("div",{ref:l,children:c.jsx(r,{notifications:a,maxToasts:n})}),i&&c.jsx(i,{})]})}var Rl=Object.freeze({__proto__:null,Notification:ts,NotificationBody:Wm,NotificationBodyDescription:Vm,NotificationBodyIcon:zm,NotificationBodyTitle:Um,NotificationFooter:Ym,NotificationFooterButton:Gm,NotificationHeader:Mm,NotificationHeaderBadge:Lm,NotificationHeaderButtonClose:$m,NotificationHeaderButtonSnooze:Hm,NotificationHeaderCount:_m,NotificationHeaderIcon:Rm,NotificationHeaderTimestamp:Bm,NotificationHeaderTitle:Fm,NotificationStack:Jm,NotificationsList:Ll,NotificationsPanelProvider:({children:t})=>{const{searchQuery:n,setSearch:e,isPanelVisible:o,sortNotificationsBy:r,setSortBy:i,viewNotificationsBy:a,setViewBy:s,isBulkActionsVisible:l,showBulkActions:u,hideBulkActions:f}=function(){const p=g.useContext(_e.IOConnectContext),[h,m]=g.useState(!1),[v,y]=g.useState("newest"),[x,S]=g.useState("all"),[b,w]=g.useState(""),[E,j]=g.useState(!1),_=ze(),{isBulkActionsSupported:M}=Te();return g.useEffect(()=>{const F=at.onPanelVisibilityChanged(D=>m(D));return()=>{F()}},[]),g.useEffect(()=>{_!==null&&_&&(async()=>{const F=await p.notifications.panel.isVisible();m(F)})()},[p.notifications.panel,_]),g.useEffect(()=>{h||(j(!1),S("all"))},[h]),{isPanelVisible:h,sortNotificationsBy:v,setSortBy:F=>{y(F)},viewNotificationsBy:x,setViewBy:F=>{S(F)},searchQuery:b,setSearch:F=>{w(F)},isBulkActionsVisible:E,showBulkActions:()=>{M&&j(!0)},hideBulkActions:()=>{M&&j(!1)}}}(),d=g.useMemo(()=>({searchQuery:n,setSearch:e,isPanelVisible:o,sortNotificationsBy:r,setSortBy:i,viewNotificationsBy:a,setViewBy:s,isBulkActionsVisible:l,showBulkActions:u,hideBulkActions:f}),[n,e,o,r,i,a,s,l,u,f]);return c.jsx(Cm.Provider,{value:d,children:t})},NotificationsProvider:({children:t})=>{const{notifications:n,notificationStacks:e,notificationsCount:o,configuration:r,settings:i,allApplications:a,allApps:s,allowedApplications:l,clearAll:u,clearAllOld:f,close:d,hidePanel:p,showPanel:h,saveSetting:m,saveFilter:v,saveAllFilter:y,isBulkActionsSupported:x,selectedNotifications:S,selectNotification:b,selectAllNotifications:w,clearMany:E,snooze:j,snoozeMany:_,setState:M,setStates:F,setCount:D}=ww(),A=g.useMemo(()=>({notifications:n,notificationStacks:e,notificationsCount:o,configuration:r,settings:i,allApplications:a,allApps:s,allowedApplications:l,clearAll:u,clearAllOld:f,onClose:d,hidePanel:p,showPanel:h,saveSetting:m,saveFilter:v,saveAllFilter:y,isBulkActionsSupported:x,selectedNotifications:S,selectNotification:b,selectAllNotifications:w,clearMany:E,snooze:j,snoozeMany:_,setState:M,setStates:F,setCount:D}),[n,e,o,r,i,a,s,l,u,f,d,p,h,m,v,y,x,S,b,w,E,j,_,M,F,D]);return c.jsx(Qh.Provider,{value:A,children:t})},Panel:function({components:t,settings:n,...e}){return c.jsx(Dl,{components:n,children:c.jsx(eg,{components:t,children:c.jsx(Pw,{...e})})})},PanelBody:Im,PanelFooter:Pm,PanelFooterButtonClearAll:Tm,PanelFooterButtonClearAllOld:Dm,PanelFooterButtons:Am,PanelHeader:Sm,PanelHeaderCaptionTitle:km,SettingsAllowNotificationToasts:tm,SettingsAllowNotifications:em,SettingsCloseNotificationOnClick:om,SettingsGeneral:qh,SettingsHideToastsAfter:im,SettingsPanel:Ml,SettingsPanelAutoHide:rm,SettingsPlacement:lm,SettingsPlacementPanel:dm,SettingsPlacementToasts:fm,SettingsShowNotificationBadge:nm,SettingsSnooze:pm,SettingsSnoozeDuration:hm,SettingsStacking:am,SettingsSubscribeAll:gm,SettingsSubscribeApp:vm,SettingsSubscribeMuteAll:ym,SettingsSubscribeMuteApp:wm,SettingsSubscriptions:mm,SettingsToastStackBy:cm,SettingsToastStacking:sm,Toasts:function({components:t,...n}){return c.jsx(ig,{components:t,children:c.jsx(Aw,{...n})})},useAddRemoveApps:Tl,useHidePanelOnFocusLost:function(t=!0){const n=g.useContext(_e.IOConnectContext),e=ze();return g.useEffect(()=>{var r;if(!n||!t||e===null||!e)return;const o=(r=n.windows.my())==null?void 0:r.onFocusChanged(i=>{i.isFocused||n.notifications.panel.hide().catch(a=>{console.error("Error hiding panel:",a)})});return()=>o==null?void 0:o()},[n,e,t]),n},useHidePanelOnKeyUp:function(t="Escape"){const{hidePanel:n}=Te();sy(t,n)},useNotificationStacking:Jh,useNotificationsContext:Te,useNotificationsPanelContext:Tt,usePanelWindowPlacement:tg,useSelectNotifications:Xh,useShowHidePanelWindow:function(t=!0){const n=g.useContext(_e.IOConnectContext),e=n==null?void 0:n.windows.my(),o=ze(),{isPanelVisible:r}=Tt();return g.useEffect(()=>{n&&e&&o&&(r?e.show().then(()=>{t&&e.focus().catch(i=>{console.error("Error focusing window:",i)})}).catch(i=>console.error("Error showing window:",i)):e.hide().catch(i=>console.error("Error hiding window:",i)))},[n,e,o,r,t]),{myWindow:e}},useToastsWindowPlacement:sg});const Tw=t=>{const{General:n,Layouts:e,Downloads:o,System:r}=Nr();return c.jsxs(Wo,{element:gr,elementProps:t,children:[c.jsx(n,{}),c.jsx(e,{}),c.jsx(o,{}),c.jsx(r,{})]})},Dw=({title:t="General",...n})=>{const{Theme:e,PinnedPosition:o,MinimizeToTray:r,ShowTutorialOnStartup:i}=Nr();return c.jsxs(et,{title:t,...n,children:[c.jsx(e,{}),c.jsx(o,{}),c.jsx(r,{}),c.jsx(i,{})]})},Fl=({className:t,title:n="Theme",...e})=>{const{currentTheme:o,selectTheme:r}=cy(),i=(()=>{const a=g.useContext(_e.IOConnectContext),[s,l]=g.useState([]);return g.useEffect(()=>{var u;a&&((u=a.themes)==null||u.list().then(l).catch(console.warn))},[a]),s})();return c.jsxs("div",{className:de("flex jc-between ai-center",t),"data-testid":"theme-container",...e,children:[c.jsx("label",{className:"io-text-clipper","data-testid":"theme-label",children:n}),c.jsxs(xe,{variant:"light","data-testid":"theme-dropdown",children:[c.jsx(xe.Button,{text:(o==null?void 0:o.displayName)??"Dark","data-testid":"theme-dropdown-button"}),c.jsx(xe.Content,{"data-testid":"theme-dropdown-content",children:c.jsx(xe.List,{children:i.map(({displayName:a,name:s})=>c.jsx(xe.Item,{onClick:()=>r(s),"data-testid":`theme-dropdown-item-${s}`,children:a},s))})})]})]})},Mw=({prefKey:t,options:n,disabled:e,...o})=>{const{isLoading:r,value:i="Select option",update:a}=Xt({prefKey:t});return c.jsxs(xe,{variant:"light",disabled:r||e,...o,children:[c.jsx(xe.Button,{children:i}),c.jsx(xe.Content,{children:c.jsx(xe.List,{children:n.map(s=>c.jsx(xe.Item,{onClick:()=>(async l=>{if(l!==i)try{await a(l)}catch(u){console.error("Failed to update platform preference:",u)}})(s),children:s},s))})})]})},_w=({className:t,label:n="Pinned position",...e})=>c.jsx(et,{className:de("io-block-list-gap",t),...e,children:c.jsxs("div",{className:"flex jc-between ai-center",children:[c.jsx("label",{className:"io-text-clipper",children:n}),c.jsx(Mw,{className:t,prefKey:ih,options:["Left","Right"],...e})]})}),Kn=({prefKey:t,...n})=>{const{isLoading:e,value:o=!1,update:r}=Xt({prefKey:t});return c.jsx(vt,{checked:o,disabled:e,onChange:i=>r(i.target.checked),...n})},Lw=({align:t="right",label:n="Allow docking",...e})=>c.jsx(Kn,{align:t,label:n,prefKey:ah,...e}),Rw=({align:t="right",label:n="Minimize to tray",...e})=>c.jsx(Kn,{align:t,label:n,prefKey:sh,...e}),Fw=({align:t="right",label:n="Auto-close on starting apps and workspaces",...e})=>c.jsx(Kn,{align:t,label:n,prefKey:ch,disabled:!0,...e}),Bw=({align:t="right",label:n="Show tutorial on startup",...e})=>c.jsx(Kn,{align:t,label:n,prefKey:lh,...e}),Hw=({title:t="Layouts",...n})=>{const{LayoutsSaveCurrentOnExit:e,LayoutsShowDeletePrompt:o,LayoutsShowUnsavedChangesPrompt:r}=Nr();return c.jsxs(et,{title:t,...n,children:[c.jsx(e,{}),c.jsx(r,{}),c.jsx(o,{})]})},$w=({align:t="right",label:n="Restore last saved on startup",...e})=>c.jsx(Kn,{align:t,label:n,prefKey:uh,...e}),Ww=({align:t="right",label:n="Save current on exit",...e})=>c.jsx(Kn,{align:t,label:n,prefKey:dh,...e}),Bl=({align:t="right",label:n="Show prompt for unsaved changes",...e})=>c.jsx(Kn,{align:t,label:n,prefKey:fh,"data-testid":"layouts-show-unsaved-changes-prompt-toggle-button",...e}),Hl=({align:t="right",label:n="Show prompt for deleting",...e})=>c.jsx(Kn,{align:t,label:n,prefKey:ph,"data-testid":"layouts-show-delete-prompt-toggle",...e}),zw=({className:t,title:n="Downloads",...e})=>{const{DownloadsLocation:o}=Nr();return c.jsx(et,{className:de("io-block-list-gap",t),title:n,...e,children:c.jsx(o,{})})},Uw=({align:t="right",label:n="Ask where to save each file before downloading",...e})=>c.jsx(Kn,{align:t,label:n,prefKey:hh,...e}),Vw=({className:t,label:n="Location",...e})=>{const{configuration:{downloadFolder:o},setDownloadLocationWithDialog:r,isDownloadLocationDialogVisible:i,downloadLocationList:a}=Gn();return c.jsxs(et,{className:de("io-preferences-download-section",t),...e,children:[c.jsxs("div",{className:"flex jc-between ai-center",children:[c.jsx("label",{className:"io-text-clipper",children:n}),c.jsx(Je,{text:"Change",onClick:r,disabled:i})]}),c.jsx("p",{children:o??(a==null?void 0:a[0])??"Not set"})]})},Yw=({className:t,title:n="System",...e})=>{const{SystemRestartSection:o,SystemShutdownSection:r}=Nr();return c.jsxs(et,{className:de("io-block-list-gap",t),title:n,...e,children:[c.jsx(o,{}),c.jsx(r,{})]})};var Rs=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],dr={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(t){return typeof console<"u"&&console.warn(t)},getWeek:function(t){var n=new Date(t.getTime());n.setHours(0,0,0,0),n.setDate(n.getDate()+3-(n.getDay()+6)%7);var e=new Date(n.getFullYear(),0,4);return 1+Math.round(((n.getTime()-e.getTime())/864e5-3+(e.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},li={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(t){var n=t%100;if(n>3&&n<21)return"th";switch(n%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},Bt=function(t,n){return n===void 0&&(n=2),("000"+t).slice(-1*n)},an=function(t){return t===!0?1:0};function Ad(t,n){var e;return function(){var o=this,r=arguments;clearTimeout(e),e=setTimeout(function(){return t.apply(o,r)},n)}}var Fs=function(t){return t instanceof Array?t:[t]};function _t(t,n,e){if(e===!0)return t.classList.add(n);t.classList.remove(n)}function We(t,n,e){var o=window.document.createElement(t);return n=n||"",e=e||"",o.className=n,e!==void 0&&(o.textContent=e),o}function Ri(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function cg(t,n){return n(t)?t:t.parentNode?cg(t.parentNode,n):void 0}function Fi(t,n){var e=We("div","numInputWrapper"),o=We("input","numInput "+t),r=We("span","arrowUp"),i=We("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?o.type="number":(o.type="text",o.pattern="\\d*"),n!==void 0)for(var a in n)o.setAttribute(a,n[a]);return e.appendChild(o),e.appendChild(r),e.appendChild(i),e}function Yt(t){try{return typeof t.composedPath=="function"?t.composedPath()[0]:t.target}catch{return t.target}}var Bs=function(){},xa=function(t,n,e){return e.months[n?"shorthand":"longhand"][t]},Gw={D:Bs,F:function(t,n,e){t.setMonth(e.months.longhand.indexOf(n))},G:function(t,n){t.setHours((t.getHours()>=12?12:0)+parseFloat(n))},H:function(t,n){t.setHours(parseFloat(n))},J:function(t,n){t.setDate(parseFloat(n))},K:function(t,n,e){t.setHours(t.getHours()%12+12*an(new RegExp(e.amPM[1],"i").test(n)))},M:function(t,n,e){t.setMonth(e.months.shorthand.indexOf(n))},S:function(t,n){t.setSeconds(parseFloat(n))},U:function(t,n){return new Date(1e3*parseFloat(n))},W:function(t,n,e){var o=parseInt(n),r=new Date(t.getFullYear(),0,2+7*(o-1),0,0,0,0);return r.setDate(r.getDate()-r.getDay()+e.firstDayOfWeek),r},Y:function(t,n){t.setFullYear(parseFloat(n))},Z:function(t,n){return new Date(n)},d:function(t,n){t.setDate(parseFloat(n))},h:function(t,n){t.setHours((t.getHours()>=12?12:0)+parseFloat(n))},i:function(t,n){t.setMinutes(parseFloat(n))},j:function(t,n){t.setDate(parseFloat(n))},l:Bs,m:function(t,n){t.setMonth(parseFloat(n)-1)},n:function(t,n){t.setMonth(parseFloat(n)-1)},s:function(t,n){t.setSeconds(parseFloat(n))},u:function(t,n){return new Date(parseFloat(n))},w:Bs,y:function(t,n){t.setFullYear(2e3+parseFloat(n))}},Oo={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},Jr={Z:function(t){return t.toISOString()},D:function(t,n,e){return n.weekdays.shorthand[Jr.w(t,n,e)]},F:function(t,n,e){return xa(Jr.n(t,n,e)-1,!1,n)},G:function(t,n,e){return Bt(Jr.h(t,n,e))},H:function(t){return Bt(t.getHours())},J:function(t,n){return n.ordinal!==void 0?t.getDate()+n.ordinal(t.getDate()):t.getDate()},K:function(t,n){return n.amPM[an(t.getHours()>11)]},M:function(t,n){return xa(t.getMonth(),!0,n)},S:function(t){return Bt(t.getSeconds())},U:function(t){return t.getTime()/1e3},W:function(t,n,e){return e.getWeek(t)},Y:function(t){return Bt(t.getFullYear(),4)},d:function(t){return Bt(t.getDate())},h:function(t){return t.getHours()%12?t.getHours()%12:12},i:function(t){return Bt(t.getMinutes())},j:function(t){return t.getDate()},l:function(t,n){return n.weekdays.longhand[t.getDay()]},m:function(t){return Bt(t.getMonth()+1)},n:function(t){return t.getMonth()+1},s:function(t){return t.getSeconds()},u:function(t){return t.getTime()},w:function(t){return t.getDay()},y:function(t){return String(t.getFullYear()).substring(2)}},lg=function(t){var n=t.config,e=n===void 0?dr:n,o=t.l10n,r=o===void 0?li:o,i=t.isMobile,a=i!==void 0&&i;return function(s,l,u){var f=u||r;return e.formatDate===void 0||a?l.split("").map(function(d,p,h){return Jr[d]&&h[p-1]!=="\\"?Jr[d](s,f,e):d!=="\\"?d:""}).join(""):e.formatDate(s,l,f)}},Bc=function(t){var n=t.config,e=n===void 0?dr:n,o=t.l10n,r=o===void 0?li:o;return function(i,a,s,l){if(i===0||i){var u,f=l||r,d=i;if(i instanceof Date)u=new Date(i.getTime());else if(typeof i!="string"&&i.toFixed!==void 0)u=new Date(i);else if(typeof i=="string"){var p=a||(e||dr).dateFormat,h=String(i).trim();if(h==="today")u=new Date,s=!0;else if(e&&e.parseDate)u=e.parseDate(i,p);else if(/Z$/.test(h)||/GMT$/.test(h))u=new Date(i);else{for(var m=void 0,v=[],y=0,x=0,S="";y<p.length;y++){var b=p[y],w=b==="\\",E=p[y-1]==="\\"||w;if(Oo[b]&&!E){S+=Oo[b];var j=new RegExp(S).exec(i);j&&(m=!0)&&v[b!=="Y"?"push":"unshift"]({fn:Gw[b],val:j[++x]})}else w||(S+=".")}u=e&&e.noCalendar?new Date(new Date().setHours(0,0,0,0)):new Date(new Date().getFullYear(),0,1,0,0,0,0),v.forEach(function(_){var M=_.fn,F=_.val;return u=M(u,F,f)||u}),u=m?u:void 0}}if(u instanceof Date&&!isNaN(u.getTime()))return s===!0&&u.setHours(0,0,0,0),u;e.errorHandler(new Error("Invalid date provided: "+d))}}};function Gt(t,n,e){return e===void 0&&(e=!0),e!==!1?new Date(t.getTime()).setHours(0,0,0,0)-new Date(n.getTime()).setHours(0,0,0,0):t.getTime()-n.getTime()}var Hs=function(t,n,e){return 3600*t+60*n+e},Kw=864e5;function $s(t){var n=t.defaultHour,e=t.defaultMinute,o=t.defaultSeconds;if(t.minDate!==void 0){var r=t.minDate.getHours(),i=t.minDate.getMinutes(),a=t.minDate.getSeconds();n<r&&(n=r),n===r&&e<i&&(e=i),n===r&&e===i&&o<a&&(o=t.minDate.getSeconds())}if(t.maxDate!==void 0){var s=t.maxDate.getHours(),l=t.maxDate.getMinutes();(n=Math.min(n,s))===s&&(e=Math.min(l,e)),n===s&&e===l&&(o=t.maxDate.getSeconds())}return{hours:n,minutes:e,seconds:o}}typeof Object.assign!="function"&&(Object.assign=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];if(!t)throw TypeError("Cannot convert undefined or null to object");for(var o=function(a){a&&Object.keys(a).forEach(function(s){return t[s]=a[s]})},r=0,i=n;r<i.length;r++)o(i[r]);return t});var It=function(){return It=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},It.apply(this,arguments)},Td=function(){for(var t=0,n=0,e=arguments.length;n<e;n++)t+=arguments[n].length;var o=Array(t),r=0;for(n=0;n<e;n++)for(var i=arguments[n],a=0,s=i.length;a<s;a++,r++)o[r]=i[a];return o};function Zw(t,n){var e={config:It(It({},dr),st.defaultConfig),l10n:li};function o(){var k;return((k=e.calendarContainer)===null||k===void 0?void 0:k.getRootNode()).activeElement||document.activeElement}function r(k){return k.bind(e)}function i(){var k=e.config;k.weekNumbers===!1&&k.showMonths===1||k.noCalendar!==!0&&window.requestAnimationFrame(function(){if(e.calendarContainer!==void 0&&(e.calendarContainer.style.visibility="hidden",e.calendarContainer.style.display="block"),e.daysContainer!==void 0){var C=(e.days.offsetWidth+1)*k.showMonths;e.daysContainer.style.width=C+"px",e.calendarContainer.style.width=C+(e.weekWrapper!==void 0?e.weekWrapper.offsetWidth:0)+"px",e.calendarContainer.style.removeProperty("visibility"),e.calendarContainer.style.removeProperty("display")}})}function a(k){if(e.selectedDates.length===0){var C=e.config.minDate===void 0||Gt(new Date,e.config.minDate)>=0?new Date:new Date(e.config.minDate.getTime()),N=$s(e.config);C.setHours(N.hours,N.minutes,N.seconds,C.getMilliseconds()),e.selectedDates=[C],e.latestSelectedDateObj=C}k!==void 0&&k.type!=="blur"&&function($){$.preventDefault();var ce=$.type==="keydown",we=Yt($),X=we;e.amPM!==void 0&&we===e.amPM&&(e.amPM.textContent=e.l10n.amPM[an(e.amPM.textContent===e.l10n.amPM[0])]);var ne=parseFloat(X.getAttribute("min")),te=parseFloat(X.getAttribute("max")),le=parseFloat(X.getAttribute("step")),he=parseInt(X.value,10),ye=$.delta||(ce?$.which===38?1:-1:0),pe=he+le*ye;if(X.value!==void 0&&X.value.length===2){var oe=X===e.hourElement,Ee=X===e.minuteElement;pe<ne?(pe=te+pe+an(!oe)+(an(oe)&&an(!e.amPM)),Ee&&v(void 0,-1,e.hourElement)):pe>te&&(pe=X===e.hourElement?pe-te-an(!e.amPM):ne,Ee&&v(void 0,1,e.hourElement)),e.amPM&&oe&&(le===1?pe+he===23:Math.abs(pe-he)>le)&&(e.amPM.textContent=e.l10n.amPM[an(e.amPM.textContent===e.l10n.amPM[0])]),X.value=Bt(pe)}}(k);var R=e._input.value;s(),ke(),e._input.value!==R&&e._debouncedChange()}function s(){if(e.hourElement!==void 0&&e.minuteElement!==void 0){var k,C,N=(parseInt(e.hourElement.value.slice(-2),10)||0)%24,R=(parseInt(e.minuteElement.value,10)||0)%60,$=e.secondElement!==void 0?(parseInt(e.secondElement.value,10)||0)%60:0;e.amPM!==void 0&&(k=N,C=e.amPM.textContent,N=k%12+12*an(C===e.l10n.amPM[1]));var ce=e.config.minTime!==void 0||e.config.minDate&&e.minDateHasTime&&e.latestSelectedDateObj&&Gt(e.latestSelectedDateObj,e.config.minDate,!0)===0,we=e.config.maxTime!==void 0||e.config.maxDate&&e.maxDateHasTime&&e.latestSelectedDateObj&&Gt(e.latestSelectedDateObj,e.config.maxDate,!0)===0;if(e.config.maxTime!==void 0&&e.config.minTime!==void 0&&e.config.minTime>e.config.maxTime){var X=Hs(e.config.minTime.getHours(),e.config.minTime.getMinutes(),e.config.minTime.getSeconds()),ne=Hs(e.config.maxTime.getHours(),e.config.maxTime.getMinutes(),e.config.maxTime.getSeconds()),te=Hs(N,R,$);if(te>ne&&te<X){var le=function(pe){var oe=Math.floor(pe/3600),Ee=(pe-3600*oe)/60;return[oe,Ee,pe-3600*oe-60*Ee]}(X);N=le[0],R=le[1],$=le[2]}}else{if(we){var he=e.config.maxTime!==void 0?e.config.maxTime:e.config.maxDate;(N=Math.min(N,he.getHours()))===he.getHours()&&(R=Math.min(R,he.getMinutes())),R===he.getMinutes()&&($=Math.min($,he.getSeconds()))}if(ce){var ye=e.config.minTime!==void 0?e.config.minTime:e.config.minDate;(N=Math.max(N,ye.getHours()))===ye.getHours()&&R<ye.getMinutes()&&(R=ye.getMinutes()),R===ye.getMinutes()&&($=Math.max($,ye.getSeconds()))}}u(N,R,$)}}function l(k){var C=k||e.latestSelectedDateObj;C&&C instanceof Date&&u(C.getHours(),C.getMinutes(),C.getSeconds())}function u(k,C,N){e.latestSelectedDateObj!==void 0&&e.latestSelectedDateObj.setHours(k%24,C,N||0,0),e.hourElement&&e.minuteElement&&!e.isMobile&&(e.hourElement.value=Bt(e.config.time_24hr?k:(12+k)%12+12*an(k%12==0)),e.minuteElement.value=Bt(C),e.amPM!==void 0&&(e.amPM.textContent=e.l10n.amPM[an(k>=12)]),e.secondElement!==void 0&&(e.secondElement.value=Bt(N)))}function f(k){var C=Yt(k),N=parseInt(C.value)+(k.delta||0);(N/1e3>1||k.key==="Enter"&&!/[^\d]/.test(N.toString()))&&ae(N)}function d(k,C,N,R){return C instanceof Array?C.forEach(function($){return d(k,$,N,R)}):k instanceof Array?k.forEach(function($){return d($,C,N,R)}):(k.addEventListener(C,N,R),void e._handlers.push({remove:function(){return k.removeEventListener(C,N,R)}}))}function p(){T("onChange")}function h(k,C){var N=k!==void 0?e.parseDate(k):e.latestSelectedDateObj||(e.config.minDate&&e.config.minDate>e.now?e.config.minDate:e.config.maxDate&&e.config.maxDate<e.now?e.config.maxDate:e.now),R=e.currentYear,$=e.currentMonth;try{N!==void 0&&(e.currentYear=N.getFullYear(),e.currentMonth=N.getMonth())}catch(ce){ce.message="Invalid date supplied: "+N,e.config.errorHandler(ce)}C&&e.currentYear!==R&&(T("onYearChange"),j()),!C||e.currentYear===R&&e.currentMonth===$||T("onMonthChange"),e.redraw()}function m(k){var C=Yt(k);~C.className.indexOf("arrow")&&v(k,C.classList.contains("arrowUp")?1:-1)}function v(k,C,N){var R=k&&Yt(k),$=N||R&&R.parentNode&&R.parentNode.firstChild,ce=me("increment");ce.delta=C,$&&$.dispatchEvent(ce)}function y(k,C,N,R){var $=z(C,!0),ce=We("span",k,C.getDate().toString());return ce.dateObj=C,ce.$i=R,ce.setAttribute("aria-label",e.formatDate(C,e.config.ariaDateFormat)),k.indexOf("hidden")===-1&&Gt(C,e.now)===0&&(e.todayDateElem=ce,ce.classList.add("today"),ce.setAttribute("aria-current","date")),$?(ce.tabIndex=-1,be(C)&&(ce.classList.add("selected"),e.selectedDateElem=ce,e.config.mode==="range"&&(_t(ce,"startRange",e.selectedDates[0]&&Gt(C,e.selectedDates[0],!0)===0),_t(ce,"endRange",e.selectedDates[1]&&Gt(C,e.selectedDates[1],!0)===0),k==="nextMonthDay"&&ce.classList.add("inRange")))):ce.classList.add("flatpickr-disabled"),e.config.mode==="range"&&function(we){return!(e.config.mode!=="range"||e.selectedDates.length<2)&&Gt(we,e.selectedDates[0])>=0&&Gt(we,e.selectedDates[1])<=0}(C)&&!be(C)&&ce.classList.add("inRange"),e.weekNumbers&&e.config.showMonths===1&&k!=="prevMonthDay"&&R%7==6&&e.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+e.config.getWeek(C)+"</span>"),T("onDayCreate",ce),ce}function x(k){k.focus(),e.config.mode==="range"&&J(k)}function S(k){for(var C=k>0?0:e.config.showMonths-1,N=k>0?e.config.showMonths:-1,R=C;R!=N;R+=k)for(var $=e.daysContainer.children[R],ce=k>0?0:$.children.length-1,we=k>0?$.children.length:-1,X=ce;X!=we;X+=k){var ne=$.children[X];if(ne.className.indexOf("hidden")===-1&&z(ne.dateObj))return ne}}function b(k,C){var N=o(),R=ee(N||document.body),$=k!==void 0?k:R?N:e.selectedDateElem!==void 0&&ee(e.selectedDateElem)?e.selectedDateElem:e.todayDateElem!==void 0&&ee(e.todayDateElem)?e.todayDateElem:S(C>0?1:-1);$===void 0?e._input.focus():R?function(ce,we){for(var X=ce.className.indexOf("Month")===-1?ce.dateObj.getMonth():e.currentMonth,ne=we>0?e.config.showMonths:-1,te=we>0?1:-1,le=X-e.currentMonth;le!=ne;le+=te)for(var he=e.daysContainer.children[le],ye=X-e.currentMonth===le?ce.$i+we:we<0?he.children.length-1:0,pe=he.children.length,oe=ye;oe>=0&&oe<pe&&oe!=(we>0?pe:-1);oe+=te){var Ee=he.children[oe];if(Ee.className.indexOf("hidden")===-1&&z(Ee.dateObj)&&Math.abs(ce.$i-oe)>=Math.abs(we))return x(Ee)}e.changeMonth(te),b(S(te),0)}($,C):x($)}function w(k,C){for(var N=(new Date(k,C,1).getDay()-e.l10n.firstDayOfWeek+7)%7,R=e.utils.getDaysInMonth((C-1+12)%12,k),$=e.utils.getDaysInMonth(C,k),ce=window.document.createDocumentFragment(),we=e.config.showMonths>1,X=we?"prevMonthDay hidden":"prevMonthDay",ne=we?"nextMonthDay hidden":"nextMonthDay",te=R+1-N,le=0;te<=R;te++,le++)ce.appendChild(y("flatpickr-day "+X,new Date(k,C-1,te),0,le));for(te=1;te<=$;te++,le++)ce.appendChild(y("flatpickr-day",new Date(k,C,te),0,le));for(var he=$+1;he<=42-N&&(e.config.showMonths===1||le%7!=0);he++,le++)ce.appendChild(y("flatpickr-day "+ne,new Date(k,C+1,he%$),0,le));var ye=We("div","dayContainer");return ye.appendChild(ce),ye}function E(){if(e.daysContainer!==void 0){Ri(e.daysContainer),e.weekNumbers&&Ri(e.weekNumbers);for(var k=document.createDocumentFragment(),C=0;C<e.config.showMonths;C++){var N=new Date(e.currentYear,e.currentMonth,1);N.setMonth(e.currentMonth+C),k.appendChild(w(N.getFullYear(),N.getMonth()))}e.daysContainer.appendChild(k),e.days=e.daysContainer.firstChild,e.config.mode==="range"&&e.selectedDates.length===1&&J()}}function j(){if(!(e.config.showMonths>1||e.config.monthSelectorType!=="dropdown")){var k=function(R){return!(e.config.minDate!==void 0&&e.currentYear===e.config.minDate.getFullYear()&&R<e.config.minDate.getMonth())&&!(e.config.maxDate!==void 0&&e.currentYear===e.config.maxDate.getFullYear()&&R>e.config.maxDate.getMonth())};e.monthsDropdownContainer.tabIndex=-1,e.monthsDropdownContainer.innerHTML="";for(var C=0;C<12;C++)if(k(C)){var N=We("option","flatpickr-monthDropdown-month");N.value=new Date(e.currentYear,C).getMonth().toString(),N.textContent=xa(C,e.config.shorthandCurrentMonth,e.l10n),N.tabIndex=-1,e.currentMonth===C&&(N.selected=!0),e.monthsDropdownContainer.appendChild(N)}}}function _(){var k,C=We("div","flatpickr-month"),N=window.document.createDocumentFragment();e.config.showMonths>1||e.config.monthSelectorType==="static"?k=We("span","cur-month"):(e.monthsDropdownContainer=We("select","flatpickr-monthDropdown-months"),e.monthsDropdownContainer.setAttribute("aria-label",e.l10n.monthAriaLabel),d(e.monthsDropdownContainer,"change",function(we){var X=Yt(we),ne=parseInt(X.value,10);e.changeMonth(ne-e.currentMonth),T("onMonthChange")}),j(),k=e.monthsDropdownContainer);var R=Fi("cur-year",{tabindex:"-1"}),$=R.getElementsByTagName("input")[0];$.setAttribute("aria-label",e.l10n.yearAriaLabel),e.config.minDate&&$.setAttribute("min",e.config.minDate.getFullYear().toString()),e.config.maxDate&&($.setAttribute("max",e.config.maxDate.getFullYear().toString()),$.disabled=!!e.config.minDate&&e.config.minDate.getFullYear()===e.config.maxDate.getFullYear());var ce=We("div","flatpickr-current-month");return ce.appendChild(k),ce.appendChild(R),N.appendChild(ce),C.appendChild(N),{container:C,yearElement:$,monthElement:k}}function M(){Ri(e.monthNav),e.monthNav.appendChild(e.prevMonthNav),e.config.showMonths&&(e.yearElements=[],e.monthElements=[]);for(var k=e.config.showMonths;k--;){var C=_();e.yearElements.push(C.yearElement),e.monthElements.push(C.monthElement),e.monthNav.appendChild(C.container)}e.monthNav.appendChild(e.nextMonthNav)}function F(){e.weekdayContainer?Ri(e.weekdayContainer):e.weekdayContainer=We("div","flatpickr-weekdays");for(var k=e.config.showMonths;k--;){var C=We("div","flatpickr-weekdaycontainer");e.weekdayContainer.appendChild(C)}return D(),e.weekdayContainer}function D(){if(e.weekdayContainer){var k=e.l10n.firstDayOfWeek,C=Td(e.l10n.weekdays.shorthand);k>0&&k<C.length&&(C=Td(C.splice(k,C.length),C.splice(0,k)));for(var N=e.config.showMonths;N--;)e.weekdayContainer.children[N].innerHTML=`
17
17
  <span class='flatpickr-weekday'>
18
18
  `+C.join("</span><span class='flatpickr-weekday'>")+`
19
19
  </span>
20
- `}}function T(S,C){C===void 0&&(C=!0);var N=C?S:S-e.currentMonth;N<0&&e._hidePrevMonthArrow===!0||N>0&&e._hideNextMonthArrow===!0||(e.currentMonth+=N,(e.currentMonth<0||e.currentMonth>11)&&(e.currentYear+=e.currentMonth>11?1:-1,e.currentMonth=(e.currentMonth+12)%12,A("onYearChange"),j()),E(),A("onMonthChange"),Ie())}function P(S){return e.calendarContainer.contains(S)}function re(S){if(e.isOpen&&!e.config.inline){var C=Yt(S),N=P(C),_=!(C===e.input||C===e.altInput||e.element.contains(C)||S.path&&S.path.indexOf&&(~S.path.indexOf(e.input)||~S.path.indexOf(e.altInput)))&&!N&&!P(S.relatedTarget),$=!e.config.ignoredFocusElements.some(function(ce){return ce.contains(C)});_&&$&&(e.config.allowInput&&e.setDate(e._input.value,!1,e.config.altInput?e.config.altFormat:e.config.dateFormat),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0&&e.input.value!==""&&e.input.value!==void 0&&a(),e.close(),e.config&&e.config.mode==="range"&&e.selectedDates.length===1&&e.clear(!1))}}function ae(S){if(!(!S||e.config.minDate&&S<e.config.minDate.getFullYear()||e.config.maxDate&&S>e.config.maxDate.getFullYear())){var C=S,N=e.currentYear!==C;e.currentYear=C||e.currentYear,e.config.maxDate&&e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth=Math.min(e.config.maxDate.getMonth(),e.currentMonth):e.config.minDate&&e.currentYear===e.config.minDate.getFullYear()&&(e.currentMonth=Math.max(e.config.minDate.getMonth(),e.currentMonth)),N&&(e.redraw(),A("onYearChange"),j())}}function z(S,C){var N;C===void 0&&(C=!0);var _=e.parseDate(S,void 0,C);if(e.config.minDate&&_&&Gt(_,e.config.minDate,C!==void 0?C:!e.minDateHasTime)<0||e.config.maxDate&&_&&Gt(_,e.config.maxDate,C!==void 0?C:!e.maxDateHasTime)>0)return!1;if(!e.config.enable&&e.config.disable.length===0)return!0;if(_===void 0)return!1;for(var $=!!e.config.enable,ce=(N=e.config.enable)!==null&&N!==void 0?N:e.config.disable,be=0,X=void 0;be<ce.length;be++){if(typeof(X=ce[be])=="function"&&X(_)||X instanceof Date&&_!==void 0&&X.getTime()===_.getTime())return $;if(typeof X=="string"){var ne=e.parseDate(X,void 0,!0);return ne&&ne.getTime()===_.getTime()?$:!$}if(typeof X=="object"&&_!==void 0&&X.from&&X.to&&_.getTime()>=X.from.getTime()&&_.getTime()<=X.to.getTime())return $}return!$}function ee(S){return e.daysContainer!==void 0&&S.className.indexOf("hidden")===-1&&S.className.indexOf("flatpickr-disabled")===-1&&e.daysContainer.contains(S)}function q(S){var C=S.target===e._input,N=e._input.value.trimEnd()!==Oe();!C||!N||S.relatedTarget&&P(S.relatedTarget)||e.setDate(e._input.value,!0,S.target===e.altInput?e.config.altFormat:e.config.dateFormat)}function ie(S){var C=Yt(S),N=e.config.wrap?t.contains(C):C===e._input,_=e.config.allowInput,$=e.isOpen&&(!_||!N),ce=e.config.inline&&N&&!_;if(S.keyCode===13&&N){if(_)return e.setDate(e._input.value,!0,C===e.altInput?e.config.altFormat:e.config.dateFormat),e.close(),C.blur();e.open()}else if(P(C)||$||ce){var be=!!e.timeContainer&&e.timeContainer.contains(C);switch(S.keyCode){case 13:be?(S.preventDefault(),a(),I()):R(S);break;case 27:S.preventDefault(),I();break;case 8:case 46:N&&!e.config.allowInput&&(S.preventDefault(),e.clear());break;case 37:case 39:if(be||N)e.hourElement&&e.hourElement.focus();else{S.preventDefault();var X=o();if(e.daysContainer!==void 0&&(_===!1||X&&ee(X))){var ne=S.keyCode===39?1:-1;S.ctrlKey?(S.stopPropagation(),T(ne),x(k(1),0)):x(void 0,ne)}}break;case 38:case 40:S.preventDefault();var te=S.keyCode===40?1:-1;e.daysContainer&&C.$i!==void 0||C===e.input||C===e.altInput?S.ctrlKey?(S.stopPropagation(),ae(e.currentYear-te),x(k(1),0)):be||x(void 0,7*te):C===e.currentYearElement?ae(e.currentYear-te):e.config.enableTime&&(!be&&e.hourElement&&e.hourElement.focus(),a(S),e._debouncedChange());break;case 9:if(be){var le=[e.hourElement,e.minuteElement,e.secondElement,e.amPM].concat(e.pluginElements).filter(function(pe){return pe}),he=le.indexOf(C);if(he!==-1){var ye=le[he+(S.shiftKey?-1:1)];S.preventDefault(),(ye||e._input).focus()}}else!e.config.noCalendar&&e.daysContainer&&e.daysContainer.contains(C)&&S.shiftKey&&(S.preventDefault(),e._input.focus())}}if(e.amPM!==void 0&&C===e.amPM)switch(S.key){case e.l10n.amPM[0].charAt(0):case e.l10n.amPM[0].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[0],s(),ke();break;case e.l10n.amPM[1].charAt(0):case e.l10n.amPM[1].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[1],s(),ke()}(N||P(C))&&A("onKeyDown",S)}function J(S,C){if(C===void 0&&(C="flatpickr-day"),e.selectedDates.length===1&&(!S||S.classList.contains(C)&&!S.classList.contains("flatpickr-disabled"))){for(var N=S?S.dateObj.getTime():e.days.firstElementChild.dateObj.getTime(),_=e.parseDate(e.selectedDates[0],void 0,!0).getTime(),$=Math.min(N,e.selectedDates[0].getTime()),ce=Math.max(N,e.selectedDates[0].getTime()),be=!1,X=0,ne=0,te=$;te<ce;te+=Ub)z(new Date(te),!0)||(be=be||te>$&&te<ce,te<_&&(!X||te>X)?X=te:te>_&&(!ne||te<ne)&&(ne=te));Array.from(e.rContainer.querySelectorAll("*:nth-child(-n+"+e.config.showMonths+") > ."+C)).forEach(function(le){var he,ye,pe,oe=le.dateObj.getTime(),Ee=X>0&&oe<X||ne>0&&oe>ne;if(Ee)return le.classList.add("notAllowed"),void["inRange","startRange","endRange"].forEach(function(Re){le.classList.remove(Re)});be&&!Ee||(["startRange","inRange","endRange","notAllowed"].forEach(function(Re){le.classList.remove(Re)}),S!==void 0&&(S.classList.add(N<=e.selectedDates[0].getTime()?"startRange":"endRange"),_<N&&oe===_?le.classList.add("startRange"):_>N&&oe===_&&le.classList.add("endRange"),oe>=X&&(ne===0||oe<=ne)&&(ye=_,pe=N,(he=oe)>Math.min(ye,pe)&&he<Math.max(ye,pe))&&le.classList.add("inRange")))})}}function W(){!e.isOpen||e.config.static||e.config.inline||M()}function Q(S){return function(C){var N=e.config["_"+S+"Date"]=e.parseDate(C,e.config.dateFormat),_=e.config["_"+(S==="min"?"max":"min")+"Date"];N!==void 0&&(e[S==="min"?"minDateHasTime":"maxDateHasTime"]=N.getHours()>0||N.getMinutes()>0||N.getSeconds()>0),e.selectedDates&&(e.selectedDates=e.selectedDates.filter(function($){return z($)}),e.selectedDates.length||S!=="min"||l(N),ke()),e.daysContainer&&(O(),N!==void 0?e.currentYearElement[S]=N.getFullYear().toString():e.currentYearElement.removeAttribute(S),e.currentYearElement.disabled=!!_&&N!==void 0&&_.getFullYear()===N.getFullYear())}}function Y(){return e.config.wrap?t.querySelector("[data-input]"):t}function H(){typeof e.config.locale!="object"&&st.l10ns[e.config.locale]===void 0&&e.config.errorHandler(new Error("flatpickr: invalid locale "+e.config.locale)),e.l10n=It(It({},st.l10ns.default),typeof e.config.locale=="object"?e.config.locale:e.config.locale!=="default"?st.l10ns[e.config.locale]:void 0),Oo.D="("+e.l10n.weekdays.shorthand.join("|")+")",Oo.l="("+e.l10n.weekdays.longhand.join("|")+")",Oo.M="("+e.l10n.months.shorthand.join("|")+")",Oo.F="("+e.l10n.months.longhand.join("|")+")",Oo.K="("+e.l10n.amPM[0]+"|"+e.l10n.amPM[1]+"|"+e.l10n.amPM[0].toLowerCase()+"|"+e.l10n.amPM[1].toLowerCase()+")",It(It({},n),JSON.parse(JSON.stringify(t.dataset||{}))).time_24hr===void 0&&st.defaultConfig.time_24hr===void 0&&(e.config.time_24hr=e.l10n.time_24hr),e.formatDate=ig(e),e.parseDate=Lc({config:e.config,l10n:e.l10n})}function M(S){if(typeof e.config.position!="function"){if(e.calendarContainer!==void 0){A("onPreCalendarPosition");var C=S||e._positionElement,N=Array.prototype.reduce.call(e.calendarContainer.children,function(Me,Ae){return Me+Ae.offsetHeight},0),_=e.calendarContainer.offsetWidth,$=e.config.position.split(" "),ce=$[0],be=$.length>1?$[1]:null,X=C.getBoundingClientRect(),ne=window.innerHeight-X.bottom,te=ce==="above"||ce!=="below"&&ne<N&&X.top>N,le=window.pageYOffset+X.top+(te?-N-2:C.offsetHeight+2);if(Mt(e.calendarContainer,"arrowTop",!te),Mt(e.calendarContainer,"arrowBottom",te),!e.config.inline){var he=window.pageXOffset+X.left,ye=!1,pe=!1;be==="center"?(he-=(_-X.width)/2,ye=!0):be==="right"&&(he-=_-X.width,pe=!0),Mt(e.calendarContainer,"arrowLeft",!ye&&!pe),Mt(e.calendarContainer,"arrowCenter",ye),Mt(e.calendarContainer,"arrowRight",pe);var oe=window.document.body.offsetWidth-(window.pageXOffset+X.right),Ee=he+_>window.document.body.offsetWidth,Re=oe+_>window.document.body.offsetWidth;if(Mt(e.calendarContainer,"rightMost",Ee),!e.config.static)if(e.calendarContainer.style.top=le+"px",Ee)if(Re){var Pe=function(){for(var Me=null,Ae=0;Ae<document.styleSheets.length;Ae++){var Ke=document.styleSheets[Ae];if(Ke.cssRules){try{Ke.cssRules}catch{continue}Me=Ke;break}}return Me??(kt=document.createElement("style"),document.head.appendChild(kt),kt.sheet);var kt}();if(Pe===void 0)return;var Ce=window.document.body.offsetWidth,Ne=Math.max(0,Ce/2-_/2),ge=Pe.cssRules.length,Se="{left:"+X.left+"px;right:auto;}";Mt(e.calendarContainer,"rightMost",!1),Mt(e.calendarContainer,"centerMost",!0),Pe.insertRule(".flatpickr-calendar.centerMost:before,.flatpickr-calendar.centerMost:after"+Se,ge),e.calendarContainer.style.left=Ne+"px",e.calendarContainer.style.right="auto"}else e.calendarContainer.style.left="auto",e.calendarContainer.style.right=oe+"px";else e.calendarContainer.style.left=he+"px",e.calendarContainer.style.right="auto"}}}else e.config.position(e,S)}function O(){e.config.noCalendar||e.isMobile||(j(),Ie(),E())}function I(){e._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(e.close,0):e.close()}function R(S){S.preventDefault(),S.stopPropagation();var C=rg(Yt(S),function(te){return te.classList&&te.classList.contains("flatpickr-day")&&!te.classList.contains("flatpickr-disabled")&&!te.classList.contains("notAllowed")});if(C!==void 0){var N=C,_=e.latestSelectedDateObj=new Date(N.dateObj.getTime()),$=(_.getMonth()<e.currentMonth||_.getMonth()>e.currentMonth+e.config.showMonths-1)&&e.config.mode!=="range";if(e.selectedDateElem=N,e.config.mode==="single")e.selectedDates=[_];else if(e.config.mode==="multiple"){var ce=we(_);ce?e.selectedDates.splice(parseInt(ce),1):e.selectedDates.push(_)}else e.config.mode==="range"&&(e.selectedDates.length===2&&e.clear(!1,!1),e.latestSelectedDateObj=_,e.selectedDates.push(_),Gt(_,e.selectedDates[0],!0)!==0&&e.selectedDates.sort(function(te,le){return te.getTime()-le.getTime()}));if(s(),$){var be=e.currentYear!==_.getFullYear();e.currentYear=_.getFullYear(),e.currentMonth=_.getMonth(),be&&(A("onYearChange"),j()),A("onMonthChange")}if(Ie(),E(),ke(),$||e.config.mode==="range"||e.config.showMonths!==1?e.selectedDateElem!==void 0&&e.hourElement===void 0&&e.selectedDateElem&&e.selectedDateElem.focus():w(N),e.hourElement!==void 0&&e.hourElement!==void 0&&e.hourElement.focus(),e.config.closeOnSelect){var X=e.config.mode==="single"&&!e.config.enableTime,ne=e.config.mode==="range"&&e.selectedDates.length===2&&!e.config.enableTime;(X||ne)&&I()}p()}}e.parseDate=Lc({config:e.config,l10n:e.l10n}),e._handlers=[],e.pluginElements=[],e.loadedPlugins=[],e._bind=d,e._setHoursFromDate=l,e._positionCalendar=M,e.changeMonth=T,e.changeYear=ae,e.clear=function(S,C){if(S===void 0&&(S=!0),C===void 0&&(C=!0),e.input.value="",e.altInput!==void 0&&(e.altInput.value=""),e.mobileInput!==void 0&&(e.mobileInput.value=""),e.selectedDates=[],e.latestSelectedDateObj=void 0,C===!0&&(e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth()),e.config.enableTime===!0){var N=Fs(e.config);u(N.hours,N.minutes,N.seconds)}e.redraw(),S&&A("onChange")},e.close=function(){e.isOpen=!1,e.isMobile||(e.calendarContainer!==void 0&&e.calendarContainer.classList.remove("open"),e._input!==void 0&&e._input.classList.remove("active")),A("onClose")},e.onMouseOver=J,e._createElement=We,e.createDay=y,e.destroy=function(){e.config!==void 0&&A("onDestroy");for(var S=e._handlers.length;S--;)e._handlers[S].remove();if(e._handlers=[],e.mobileInput)e.mobileInput.parentNode&&e.mobileInput.parentNode.removeChild(e.mobileInput),e.mobileInput=void 0;else if(e.calendarContainer&&e.calendarContainer.parentNode)if(e.config.static&&e.calendarContainer.parentNode){var C=e.calendarContainer.parentNode;if(C.lastChild&&C.removeChild(C.lastChild),C.parentNode){for(;C.firstChild;)C.parentNode.insertBefore(C.firstChild,C);C.parentNode.removeChild(C)}}else e.calendarContainer.parentNode.removeChild(e.calendarContainer);e.altInput&&(e.input.type="text",e.altInput.parentNode&&e.altInput.parentNode.removeChild(e.altInput),delete e.altInput),e.input&&(e.input.type=e.input._type,e.input.classList.remove("flatpickr-input"),e.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(N){try{delete e[N]}catch{}})},e.isEnabled=z,e.jumpToDate=h,e.updateValue=ke,e.open=function(S,C){if(C===void 0&&(C=e._positionElement),e.isMobile===!0){if(S){S.preventDefault();var N=Yt(S);N&&N.blur()}return e.mobileInput!==void 0&&(e.mobileInput.focus(),e.mobileInput.click()),void A("onOpen")}if(!(e._input.disabled||e.config.inline)){var _=e.isOpen;e.isOpen=!0,_||(e.calendarContainer.classList.add("open"),e._input.classList.add("active"),A("onOpen"),M(C)),e.config.enableTime===!0&&e.config.noCalendar===!0&&(e.config.allowInput!==!1||S!==void 0&&e.timeContainer.contains(S.relatedTarget)||setTimeout(function(){return e.hourElement.select()},50))}},e.redraw=O,e.set=function(S,C){if(S!==null&&typeof S=="object")for(var N in Object.assign(e.config,S),S)U[N]!==void 0&&U[N].forEach(function(_){return _()});else e.config[S]=C,U[S]!==void 0?U[S].forEach(function(_){return _()}):Ms.indexOf(S)>-1&&(e.config[S]=_s(C));e.redraw(),ke(!0)},e.setDate=function(S,C,N){if(C===void 0&&(C=!1),N===void 0&&(N=e.config.dateFormat),S!==0&&!S||S instanceof Array&&S.length===0)return e.clear(C);V(S,N),e.latestSelectedDateObj=e.selectedDates[e.selectedDates.length-1],e.redraw(),h(void 0,C),l(),e.selectedDates.length===0&&e.clear(!1),ke(C),C&&A("onChange")},e.toggle=function(S){if(e.isOpen===!0)return e.close();e.open(S)};var U={locale:[H,D],showMonths:[F,i,L],minDate:[h],maxDate:[h],positionElement:[Z],clickOpens:[function(){e.config.clickOpens===!0?(d(e._input,"focus",e.open),d(e._input,"click",e.open)):(e._input.removeEventListener("focus",e.open),e._input.removeEventListener("click",e.open))}]};function V(S,C){var N=[];if(S instanceof Array)N=S.map(function(_){return e.parseDate(_,C)});else if(S instanceof Date||typeof S=="number")N=[e.parseDate(S,C)];else if(typeof S=="string")switch(e.config.mode){case"single":case"time":N=[e.parseDate(S,C)];break;case"multiple":N=S.split(e.config.conjunction).map(function(_){return e.parseDate(_,C)});break;case"range":N=S.split(e.l10n.rangeSeparator).map(function(_){return e.parseDate(_,C)})}else e.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(S)));e.selectedDates=e.config.allowInvalidPreload?N:N.filter(function(_){return _ instanceof Date&&z(_,!1)}),e.config.mode==="range"&&e.selectedDates.sort(function(_,$){return _.getTime()-$.getTime()})}function se(S){return S.slice().map(function(C){return typeof C=="string"||typeof C=="number"||C instanceof Date?e.parseDate(C,void 0,!0):C&&typeof C=="object"&&C.from&&C.to?{from:e.parseDate(C.from,void 0),to:e.parseDate(C.to,void 0)}:C}).filter(function(C){return C})}function Z(){e._positionElement=e.config.positionElement||e._input}function A(S,C){if(e.config!==void 0){var N=e.config[S];if(N!==void 0&&N.length>0)for(var _=0;N[_]&&_<N.length;_++)N[_](e.selectedDates,e.input.value,e,C);S==="onChange"&&(e.input.dispatchEvent(me("change")),e.input.dispatchEvent(me("input")))}}function me(S){var C=document.createEvent("Event");return C.initEvent(S,!0,!0),C}function we(S){for(var C=0;C<e.selectedDates.length;C++){var N=e.selectedDates[C];if(N instanceof Date&&Gt(N,S)===0)return""+C}return!1}function Ie(){e.config.noCalendar||e.isMobile||!e.monthNav||(e.yearElements.forEach(function(S,C){var N=new Date(e.currentYear,e.currentMonth,1);N.setMonth(e.currentMonth+C),e.config.showMonths>1||e.config.monthSelectorType==="static"?e.monthElements[C].textContent=ya(N.getMonth(),e.config.shorthandCurrentMonth,e.l10n)+" ":e.monthsDropdownContainer.value=N.getMonth().toString(),S.value=N.getFullYear().toString()}),e._hidePrevMonthArrow=e.config.minDate!==void 0&&(e.currentYear===e.config.minDate.getFullYear()?e.currentMonth<=e.config.minDate.getMonth():e.currentYear<e.config.minDate.getFullYear()),e._hideNextMonthArrow=e.config.maxDate!==void 0&&(e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth+1>e.config.maxDate.getMonth():e.currentYear>e.config.maxDate.getFullYear()))}function Oe(S){var C=S||(e.config.altInput?e.config.altFormat:e.config.dateFormat);return e.selectedDates.map(function(N){return e.formatDate(N,C)}).filter(function(N,_,$){return e.config.mode!=="range"||e.config.enableTime||$.indexOf(N)===_}).join(e.config.mode!=="range"?e.config.conjunction:e.l10n.rangeSeparator)}function ke(S){S===void 0&&(S=!0),e.mobileInput!==void 0&&e.mobileFormatStr&&(e.mobileInput.value=e.latestSelectedDateObj!==void 0?e.formatDate(e.latestSelectedDateObj,e.mobileFormatStr):""),e.input.value=Oe(e.config.dateFormat),e.altInput!==void 0&&(e.altInput.value=Oe(e.config.altFormat)),S!==!1&&A("onValueUpdate")}function ue(S){var C=Yt(S),N=e.prevMonthNav.contains(C),_=e.nextMonthNav.contains(C);N||_?T(N?-1:1):e.yearElements.indexOf(C)>=0?C.select():C.classList.contains("arrowUp")?e.changeYear(e.currentYear+1):C.classList.contains("arrowDown")&&e.changeYear(e.currentYear-1)}return function(){e.element=e.input=t,e.isOpen=!1,function(){var C=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],N=It(It({},JSON.parse(JSON.stringify(t.dataset||{}))),n),_={};e.config.parseDate=N.parseDate,e.config.formatDate=N.formatDate,Object.defineProperty(e.config,"enable",{get:function(){return e.config._enable},set:function(he){e.config._enable=se(he)}}),Object.defineProperty(e.config,"disable",{get:function(){return e.config._disable},set:function(he){e.config._disable=se(he)}});var $=N.mode==="time";if(!N.dateFormat&&(N.enableTime||$)){var ce=st.defaultConfig.dateFormat||ur.dateFormat;_.dateFormat=N.noCalendar||$?"H:i"+(N.enableSeconds?":S":""):ce+" H:i"+(N.enableSeconds?":S":"")}if(N.altInput&&(N.enableTime||$)&&!N.altFormat){var be=st.defaultConfig.altFormat||ur.altFormat;_.altFormat=N.noCalendar||$?"h:i"+(N.enableSeconds?":S K":" K"):be+" h:i"+(N.enableSeconds?":S":"")+" K"}Object.defineProperty(e.config,"minDate",{get:function(){return e.config._minDate},set:Q("min")}),Object.defineProperty(e.config,"maxDate",{get:function(){return e.config._maxDate},set:Q("max")});var X=function(he){return function(ye){e.config[he==="min"?"_minTime":"_maxTime"]=e.parseDate(ye,"H:i:S")}};Object.defineProperty(e.config,"minTime",{get:function(){return e.config._minTime},set:X("min")}),Object.defineProperty(e.config,"maxTime",{get:function(){return e.config._maxTime},set:X("max")}),N.mode==="time"&&(e.config.noCalendar=!0,e.config.enableTime=!0),Object.assign(e.config,_,N);for(var ne=0;ne<C.length;ne++)e.config[C[ne]]=e.config[C[ne]]===!0||e.config[C[ne]]==="true";for(Ms.filter(function(he){return e.config[he]!==void 0}).forEach(function(he){e.config[he]=_s(e.config[he]||[]).map(r)}),e.isMobile=!e.config.disableMobile&&!e.config.inline&&e.config.mode==="single"&&!e.config.disable.length&&!e.config.enable&&!e.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),ne=0;ne<e.config.plugins.length;ne++){var te=e.config.plugins[ne](e)||{};for(var le in te)Ms.indexOf(le)>-1?e.config[le]=_s(te[le]).map(r).concat(e.config[le]):N[le]===void 0&&(e.config[le]=te[le])}N.altInputClass||(e.config.altInputClass=Y().className+" "+e.config.altInputClass),A("onParseConfig")}(),H(),function(){if(e.input=Y(),!e.input)return void e.config.errorHandler(new Error("Invalid input element specified"));e.input._type=e.input.type,e.input.type="text",e.input.classList.add("flatpickr-input"),e._input=e.input,e.config.altInput&&(e.altInput=We(e.input.nodeName,e.config.altInputClass),e._input=e.altInput,e.altInput.placeholder=e.input.placeholder,e.altInput.disabled=e.input.disabled,e.altInput.required=e.input.required,e.altInput.tabIndex=e.input.tabIndex,e.altInput.type="text",e.input.setAttribute("type","hidden"),!e.config.static&&e.input.parentNode&&e.input.parentNode.insertBefore(e.altInput,e.input.nextSibling)),e.config.allowInput||e._input.setAttribute("readonly","readonly"),Z()}(),function(){e.selectedDates=[],e.now=e.parseDate(e.config.now)||new Date;var C=e.config.defaultDate||(e.input.nodeName!=="INPUT"&&e.input.nodeName!=="TEXTAREA"||!e.input.placeholder||e.input.value!==e.input.placeholder?e.input.value:null);C&&V(C,e.config.dateFormat),e._initialDate=e.selectedDates.length>0?e.selectedDates[0]:e.config.minDate&&e.config.minDate.getTime()>e.now.getTime()?e.config.minDate:e.config.maxDate&&e.config.maxDate.getTime()<e.now.getTime()?e.config.maxDate:e.now,e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth(),e.selectedDates.length>0&&(e.latestSelectedDateObj=e.selectedDates[0]),e.config.minTime!==void 0&&(e.config.minTime=e.parseDate(e.config.minTime,"H:i")),e.config.maxTime!==void 0&&(e.config.maxTime=e.parseDate(e.config.maxTime,"H:i")),e.minDateHasTime=!!e.config.minDate&&(e.config.minDate.getHours()>0||e.config.minDate.getMinutes()>0||e.config.minDate.getSeconds()>0),e.maxDateHasTime=!!e.config.maxDate&&(e.config.maxDate.getHours()>0||e.config.maxDate.getMinutes()>0||e.config.maxDate.getSeconds()>0)}(),e.utils={getDaysInMonth:function(C,N){return C===void 0&&(C=e.currentMonth),N===void 0&&(N=e.currentYear),C===1&&(N%4==0&&N%100!=0||N%400==0)?29:e.l10n.daysInMonth[C]}},e.isMobile||function(){var C=window.document.createDocumentFragment();if(e.calendarContainer=We("div","flatpickr-calendar"),e.calendarContainer.tabIndex=-1,!e.config.noCalendar){if(C.appendChild((e.monthNav=We("div","flatpickr-months"),e.yearElements=[],e.monthElements=[],e.prevMonthNav=We("span","flatpickr-prev-month"),e.prevMonthNav.innerHTML=e.config.prevArrow,e.nextMonthNav=We("span","flatpickr-next-month"),e.nextMonthNav.innerHTML=e.config.nextArrow,F(),Object.defineProperty(e,"_hidePrevMonthArrow",{get:function(){return e.__hidePrevMonthArrow},set:function(X){e.__hidePrevMonthArrow!==X&&(Mt(e.prevMonthNav,"flatpickr-disabled",X),e.__hidePrevMonthArrow=X)}}),Object.defineProperty(e,"_hideNextMonthArrow",{get:function(){return e.__hideNextMonthArrow},set:function(X){e.__hideNextMonthArrow!==X&&(Mt(e.nextMonthNav,"flatpickr-disabled",X),e.__hideNextMonthArrow=X)}}),e.currentYearElement=e.yearElements[0],Ie(),e.monthNav)),e.innerContainer=We("div","flatpickr-innerContainer"),e.config.weekNumbers){var N=function(){e.calendarContainer.classList.add("hasWeeks");var X=We("div","flatpickr-weekwrapper");X.appendChild(We("span","flatpickr-weekday",e.l10n.weekAbbreviation));var ne=We("div","flatpickr-weeks");return X.appendChild(ne),{weekWrapper:X,weekNumbers:ne}}(),_=N.weekWrapper,$=N.weekNumbers;e.innerContainer.appendChild(_),e.weekNumbers=$,e.weekWrapper=_}e.rContainer=We("div","flatpickr-rContainer"),e.rContainer.appendChild(L()),e.daysContainer||(e.daysContainer=We("div","flatpickr-days"),e.daysContainer.tabIndex=-1),E(),e.rContainer.appendChild(e.daysContainer),e.innerContainer.appendChild(e.rContainer),C.appendChild(e.innerContainer)}e.config.enableTime&&C.appendChild(function(){e.calendarContainer.classList.add("hasTime"),e.config.noCalendar&&e.calendarContainer.classList.add("noCalendar");var X=Fs(e.config);e.timeContainer=We("div","flatpickr-time"),e.timeContainer.tabIndex=-1;var ne=We("span","flatpickr-time-separator",":"),te=_i("flatpickr-hour",{"aria-label":e.l10n.hourAriaLabel});e.hourElement=te.getElementsByTagName("input")[0];var le=_i("flatpickr-minute",{"aria-label":e.l10n.minuteAriaLabel});if(e.minuteElement=le.getElementsByTagName("input")[0],e.hourElement.tabIndex=e.minuteElement.tabIndex=-1,e.hourElement.value=Bt(e.latestSelectedDateObj?e.latestSelectedDateObj.getHours():e.config.time_24hr?X.hours:function(ye){switch(ye%24){case 0:case 12:return 12;default:return ye%12}}(X.hours)),e.minuteElement.value=Bt(e.latestSelectedDateObj?e.latestSelectedDateObj.getMinutes():X.minutes),e.hourElement.setAttribute("step",e.config.hourIncrement.toString()),e.minuteElement.setAttribute("step",e.config.minuteIncrement.toString()),e.hourElement.setAttribute("min",e.config.time_24hr?"0":"1"),e.hourElement.setAttribute("max",e.config.time_24hr?"23":"12"),e.hourElement.setAttribute("maxlength","2"),e.minuteElement.setAttribute("min","0"),e.minuteElement.setAttribute("max","59"),e.minuteElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(te),e.timeContainer.appendChild(ne),e.timeContainer.appendChild(le),e.config.time_24hr&&e.timeContainer.classList.add("time24hr"),e.config.enableSeconds){e.timeContainer.classList.add("hasSeconds");var he=_i("flatpickr-second");e.secondElement=he.getElementsByTagName("input")[0],e.secondElement.value=Bt(e.latestSelectedDateObj?e.latestSelectedDateObj.getSeconds():X.seconds),e.secondElement.setAttribute("step",e.minuteElement.getAttribute("step")),e.secondElement.setAttribute("min","0"),e.secondElement.setAttribute("max","59"),e.secondElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(We("span","flatpickr-time-separator",":")),e.timeContainer.appendChild(he)}return e.config.time_24hr||(e.amPM=We("span","flatpickr-am-pm",e.l10n.amPM[an((e.latestSelectedDateObj?e.hourElement.value:e.config.defaultHour)>11)]),e.amPM.title=e.l10n.toggleTitle,e.amPM.tabIndex=-1,e.timeContainer.appendChild(e.amPM)),e.timeContainer}()),Mt(e.calendarContainer,"rangeMode",e.config.mode==="range"),Mt(e.calendarContainer,"animate",e.config.animate===!0),Mt(e.calendarContainer,"multiMonth",e.config.showMonths>1),e.calendarContainer.appendChild(C);var ce=e.config.appendTo!==void 0&&e.config.appendTo.nodeType!==void 0;if((e.config.inline||e.config.static)&&(e.calendarContainer.classList.add(e.config.inline?"inline":"static"),e.config.inline&&(!ce&&e.element.parentNode?e.element.parentNode.insertBefore(e.calendarContainer,e._input.nextSibling):e.config.appendTo!==void 0&&e.config.appendTo.appendChild(e.calendarContainer)),e.config.static)){var be=We("div","flatpickr-wrapper");e.element.parentNode&&e.element.parentNode.insertBefore(be,e.element),be.appendChild(e.element),e.altInput&&be.appendChild(e.altInput),be.appendChild(e.calendarContainer)}e.config.static||e.config.inline||(e.config.appendTo!==void 0?e.config.appendTo:window.document.body).appendChild(e.calendarContainer)}(),function(){if(e.config.wrap&&["open","close","toggle","clear"].forEach(function(_){Array.prototype.forEach.call(e.element.querySelectorAll("[data-"+_+"]"),function($){return d($,"click",e[_])})}),e.isMobile)return void function(){var _=e.config.enableTime?e.config.noCalendar?"time":"datetime-local":"date";e.mobileInput=We("input",e.input.className+" flatpickr-mobile"),e.mobileInput.tabIndex=1,e.mobileInput.type=_,e.mobileInput.disabled=e.input.disabled,e.mobileInput.required=e.input.required,e.mobileInput.placeholder=e.input.placeholder,e.mobileFormatStr=_==="datetime-local"?"Y-m-d\\TH:i:S":_==="date"?"Y-m-d":"H:i:S",e.selectedDates.length>0&&(e.mobileInput.defaultValue=e.mobileInput.value=e.formatDate(e.selectedDates[0],e.mobileFormatStr)),e.config.minDate&&(e.mobileInput.min=e.formatDate(e.config.minDate,"Y-m-d")),e.config.maxDate&&(e.mobileInput.max=e.formatDate(e.config.maxDate,"Y-m-d")),e.input.getAttribute("step")&&(e.mobileInput.step=String(e.input.getAttribute("step"))),e.input.type="hidden",e.altInput!==void 0&&(e.altInput.type="hidden");try{e.input.parentNode&&e.input.parentNode.insertBefore(e.mobileInput,e.input.nextSibling)}catch{}d(e.mobileInput,"change",function($){e.setDate(Yt($).value,!1,e.mobileFormatStr),A("onChange"),A("onClose")})}();var C=Nd(W,50);if(e._debouncedChange=Nd(p,300),e.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&d(e.daysContainer,"mouseover",function(_){e.config.mode==="range"&&J(Yt(_))}),d(e._input,"keydown",ie),e.calendarContainer!==void 0&&d(e.calendarContainer,"keydown",ie),e.config.inline||e.config.static||d(window,"resize",C),window.ontouchstart!==void 0?d(window.document,"touchstart",re):d(window.document,"mousedown",re),d(window.document,"focus",re,{capture:!0}),e.config.clickOpens===!0&&(d(e._input,"focus",e.open),d(e._input,"click",e.open)),e.daysContainer!==void 0&&(d(e.monthNav,"click",ue),d(e.monthNav,["keyup","increment"],f),d(e.daysContainer,"click",R)),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0){var N=function(_){return Yt(_).select()};d(e.timeContainer,["increment"],a),d(e.timeContainer,"blur",a,{capture:!0}),d(e.timeContainer,"click",m),d([e.hourElement,e.minuteElement],["focus","click"],N),e.secondElement!==void 0&&d(e.secondElement,"focus",function(){return e.secondElement&&e.secondElement.select()}),e.amPM!==void 0&&d(e.amPM,"click",function(_){a(_)})}e.config.allowInput&&d(e._input,"blur",q)}(),(e.selectedDates.length||e.config.noCalendar)&&(e.config.enableTime&&l(e.config.noCalendar?e.latestSelectedDateObj:void 0),ke(!1)),i();var S=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!e.isMobile&&S&&M(),A("onReady")}(),e}function dr(t,n){for(var e=Array.prototype.slice.call(t).filter(function(a){return a instanceof HTMLElement}),o=[],r=0;r<e.length;r++){var i=e[r];try{if(i.getAttribute("data-fp-omit")!==null)continue;i._flatpickr!==void 0&&(i._flatpickr.destroy(),i._flatpickr=void 0),i._flatpickr=Vb(i,n||{}),o.push(i._flatpickr)}catch(a){console.error(a)}}return o.length===1?o[0]:o}typeof HTMLElement<"u"&&typeof HTMLCollection<"u"&&typeof NodeList<"u"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(t){return dr(this,t)},HTMLElement.prototype.flatpickr=function(t){return dr([this],t)});var st=function(t,n){return typeof t=="string"?dr(window.document.querySelectorAll(t),n):t instanceof Node?dr([t],n):dr(t,n)};st.defaultConfig={},st.l10ns={en:It({},ci),default:It({},ci)},st.localize=function(t){st.l10ns.default=It(It({},st.l10ns.default),t)},st.setDefaults=function(t){st.defaultConfig=It(It({},st.defaultConfig),t)},st.parseDate=Lc({}),st.formatDate=ig({}),st.compareDates=Gt,typeof jQuery<"u"&&jQuery.fn!==void 0&&(jQuery.fn.flatpickr=function(t){return dr(this,t)}),Date.prototype.fp_incr=function(t){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof t=="string"?parseInt(t,10):t))},typeof window<"u"&&(window.flatpickr=st);const Yb=["onCreate","onDestroy"],Bs=["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"],Gb=t=>{const n=g.useMemo(()=>({...t}),[t]),{defaultValue:e,options:o={},value:r,children:i,render:a,onCreate:s,onDestroy:l}=n,u=g.useMemo(()=>((m,v)=>(Bs.forEach(y=>{const w=v[y],k=m[y];if(w){k&&!Array.isArray(k)?m[y]=[m[y]]:m[y]||(m[y]=[]);const x=Array.isArray(w)?w:[w];m[y].length===0?m[y]=x:m[y].push(...x)}}),Bs.forEach(y=>{delete v[y]}),Yb.forEach(y=>{delete v[y]}),m))(o,n),[o,n]),f=g.useRef(null),d=g.useRef(void 0);g.useImperativeHandle(t.ref,()=>({get flatpickr(){return d.current}}),[]),g.useEffect(()=>((()=>{var m;u.onClose=u.onClose||(()=>{var v;(v=f.current)!=null&&v.blur&&f.current.blur()}),d.current=(((m=st)==null?void 0:m.default)||st)(f.current,u),s==null||s(d.current)})(),()=>{l==null||l(d.current),d.current&&d.current.destroy(),d.current=void 0}),[u,s,l]),g.useEffect(()=>{var m;if(d.current){const v=Object.getOwnPropertyNames(u);for(let y=v.length-1;y>=0;y--){const w=v[y];let k=u[w];(k==null?void 0:k.toString())!==((m=d.current.config[w])==null?void 0:m.toString())&&(Bs.includes(w)&&!Array.isArray(k)&&(k=[k]),d.current.set(w,k))}r!==void 0&&r!==d.current.input.value&&d.current.setDate(r,!1)}},[u,r]);const p=g.useCallback(m=>{f.current=m},[]);if(a)return a({...n,defaultValue:e,value:r},p);const h=g.useCallback(m=>{var v,y;t&&t.onChange&&(Array.isArray(t==null?void 0:t.onChange)?(v=t==null?void 0:t.onChange)==null||v.forEach(()=>[new Date(m.target.value)],(r==null?void 0:r.toString())||""):typeof t.onChange=="function"&&((y=t==null?void 0:t.onChange)==null||y.call(t,[new Date(m.target.value)],(r==null?void 0:r.toString())||"",d.current)))},[t,r]);return o.wrap?c.jsx("div",{className:"flatpickr",ref:p,children:i}):c.jsx("input",{onChange:h,...n,value:r==null?void 0:r.toString(),defaultValue:e,ref:p})},Pd="T42.GD.Execute",ag=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],sg=(t,n)=>t in n;function Kb({time:t,frequency:n,day:e}){const o=new Date(`01/01/2000 ${t}`),r=o.getMinutes(),i=o.getHours();let a="*";return n==="weekly"&&e&&(a=function(s){const l={Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6};if(!sg(s,l))throw new Error(`Invalid day: ${s}`);return l[s]}(e).toString()),`${r} ${i} * * ${a}`}function Zb(t){const n=g.useContext(_e.IOConnectContext),{value:e,update:o}=Xt({prefKey:Li(t)}),{value:r,update:i}=Xt({prefKey:Li(t,"Time")}),{value:a,update:s}=Xt({prefKey:Li(t,"Frequency")}),{value:l,update:u}=Xt({prefKey:Li(t,"Day")}),f=g.useCallback(async()=>{try{await n.interop.invoke(Pd,{command:`cancel-${t}`})}catch(p){console.error(p)}},[n,t]),d=g.useCallback(async()=>{try{const p=Kb({time:r??"12:00 AM",frequency:a??"daily",day:a==="weekly"?l:"*"});await n.interop.invoke(Pd,{command:`schedule-${t}`,args:{cronTime:p,discardUnsavedLayoutChanges:!1}})}catch(p){console.error(`Failed to update cron job for ${t}:`,p)}},[n,t,r,a,l]);return g.useEffect(()=>{n&&e&&d()},[n,e,d]),{enabled:e??!1,time:r??"12:00 AM",frequency:a??"daily",day:l??"Monday",setEnabled:async p=>{p||await f();try{await o(p)}catch(h){console.error("Failed to update enabled state:",h)}},setTime:async p=>{try{await i(p)}catch(h){console.error("Failed to update time:",h)}},setFrequency:async p=>{try{await s(p),p==="daily"&&await u(void 0)}catch(h){console.error("Failed to update frequency:",h)}},setDay:async p=>{var h;if(h=p,ag.includes(h))try{await u(p)}catch(m){console.error("Failed to update day:",m)}else console.error("Invalid day provided")}}}function Li(t,n){const e=t==="restart"?"_system_scheduleRestart":"_system_scheduleShutdown";return n?`${e}${n}`:e}function cg({className:t,variant:n,...e}){const o=de("io-block-list-gap",n,t),{enabled:r,time:i,frequency:a,day:s,setEnabled:l,setTime:u,setFrequency:f,setDay:d}=Zb(n);return c.jsxs(et,{className:o,...e,children:[c.jsx(vt,{label:`Schedule ${n}`,align:"right",onChange:p=>l(p.target.checked),checked:r}),c.jsxs("div",{className:"scheduler-controls",children:[c.jsxs("div",{className:"io-control-input io-control-leading-icon direction-up",children:[c.jsx(lt,{variant:"clock"}),c.jsx(Gb,{className:"io-input",options:{enableTime:!0,noCalendar:!0,dateFormat:"h:i K",defaultDate:i,clickOpens:!0},value:i,onClose:async([p])=>{const h=p.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!0});await u(h)}})]}),c.jsxs(hn,{text:a.charAt(0).toUpperCase()+a.slice(1),icon:"chevron-down",iconRight:!0,children:[c.jsx(hn.Item,{onClick:()=>f("daily"),children:"Daily"}),c.jsx(hn.Item,{onClick:()=>f("weekly"),children:"Weekly"})]}),a==="weekly"&&c.jsx(hn,{text:s,icon:"chevron-down",iconRight:!0,children:ag.map(p=>c.jsx(hn.Item,{onClick:()=>d(p),children:p},p))})]})]})}function qb({className:t,...n}){return c.jsx(cg,{...n,className:t,variant:"restart"})}function Jb({className:t,...n}){return c.jsx(cg,{...n,className:t,variant:"shutdown"})}const lg={Body:Nb,General:Ib,Theme:_l,PinnedPosition:Ab,AllowDocking:Tb,MinimizeToTray:Db,AutoClose:Mb,ShowTutorialOnStartup:_b,Layouts:Lb,LayoutsRestoreLastSaved:Rb,LayoutsSaveCurrentOnExit:Fb,LayoutsShowUnsavedChangesPrompt:Ll,LayoutsShowDeletePrompt:Rl,Downloads:Bb,DownloadsAskForEachDownload:Hb,DownloadsLocation:$b,System:Wb,SystemRestartSection:qb,SystemShutdownSection:Jb},ug=g.createContext(lg),dg=g.memo(({children:t,components:n})=>{const e=g.useMemo(()=>({...lg,...n}),[n]);return c.jsx(ug.Provider,{value:e,children:t})});dg.displayName="PreferencesPanelComponentsStoreProvider";const Or=()=>g.useContext(ug),fg=({className:t,onClose:n,title:e="Platform Preferences",children:o,...r})=>c.jsxs(qe,{className:de("io-preferences-panel",t),"data-testid":"preferences-panel",...r,children:[c.jsxs(qe.Header,{"data-testid":"preferences-panel-header",children:[c.jsx(qe.Header.Title,{size:"large",text:e,tag:"h1","data-testid":"preferences-panel-title"}),c.jsx(qe.Header.ButtonGroup,{children:c.jsx(qe.Header.ButtonIcon,{variant:"circle",icon:"close",size:"32",onClick:n,"data-testid":"preferences-panel-close-button"})})]}),o]}),Xb=({onClose:t,title:n="Platform Preferences",...e})=>{const{Body:o}=Or();return c.jsx(fg,{title:n,onClose:t,...e,children:c.jsx(o,{})})},Qb=({components:t,...n})=>c.jsx(dg,{components:t,children:c.jsx(Xb,{...n})}),pg=t=>{const{General:n,Layouts:e}=Qa();return c.jsxs($o,{element:mr,elementProps:t,children:[c.jsx(n,{}),c.jsx(e,{})]})},hg=({title:t="General",...n})=>{const{Theme:e}=Qa();return c.jsx(et,{title:t,"data-testid":"preferences-panel-general-block",...n,children:c.jsx(e,{})})},mg=({title:t="Layouts",...n})=>{const{LayoutsShowDeletePrompt:e}=Qa();return c.jsx(et,{title:t,"data-testid":"preferences-panel-layouts-block",...n,children:c.jsx(e,{})})},gg={Body:pg,General:hg,Theme:_l,Layouts:mg,LayoutsShowUnsavedChangesPrompt:Ll,LayoutsShowDeletePrompt:Rl},vg=g.createContext(gg),yg=g.memo(({children:t,components:n})=>{const e=g.useMemo(()=>({...gg,...n}),[n]);return c.jsx(vg.Provider,{value:e,children:t})});yg.displayName="PreferencesPanelComponentsStoreProvider";const Qa=()=>g.useContext(vg),ew=({onClose:t,title:n="Platform Preferences",...e})=>{const{Body:o}=Qa();return c.jsx(fg,{title:n,onClose:t,...e,children:c.jsx(o,{})})};var tw=Object.freeze({__proto__:null,General:hg,Layouts:mg,LayoutsShowDeletePrompt:Rl,LayoutsShowUnsavedChangesPrompt:Ll,Panel:({components:t,...n})=>c.jsx(yg,{components:t,children:c.jsx(ew,{...n})}),PanelBody:pg,Theme:_l});const nw=({name:t,value:n})=>c.jsxs("div",{className:"io-profile-section-item",children:[c.jsx("div",{className:"io-profile-section-item-name",children:t}),c.jsx("div",{className:"io-profile-section-item-value",children:n})]}),bg=({className:t,items:n,title:e})=>c.jsxs("div",{className:de("io-profile-section-body",t),children:[e&&c.jsx(Nn,{className:"io-profile-section-title",text:e}),n.map(({name:o,value:r})=>c.jsx(nw,{name:o,value:r},o))]}),Fl=({className:t,items:n,title:e})=>c.jsxs("section",{className:de("io-profile-section",t),children:[c.jsx(bg,{items:n,title:e}),c.jsx(mi,{className:"mt-8"})]}),wg=({title:t="License",...n})=>c.jsx(Fl,{title:t,...n}),xg=({title:t="Version",...n})=>c.jsx(Fl,{title:t,...n}),Cg=({title:t="Plugins",...n})=>c.jsx(Fl,{title:t,...n}),Sg=({className:t})=>{const n=Ga()?"io.Connect Desktop":"io.Connect Browser";return c.jsxs("div",{className:de("io-trademark-container",t),children:[c.jsx("h4",{className:"io-trademark-title",children:n}),c.jsxs("p",{className:"io-trademark-text",children:[n,"® is a registered trademark of"," ",c.jsx("a",{href:"https://www.interop.io",rel:"noreferrer",target:"_blank",children:"Interop Inc©"})," ",new Date().getFullYear(),". All rights reserved."]})]})},kg=({avatarInitials:t=Ga()?"CD":"CB",className:n,items:e,onLogout:o,title:r})=>c.jsxs("section",{className:de("io-profile-section",n),children:[c.jsxs("div",{className:"io-user-details-container",children:[c.jsx("div",{className:"io-user-avatar",children:t}),c.jsx(bg,{className:"mt-12",items:e,title:r})]}),o&&c.jsx(Je,{className:"io-log-out-button",onClick:o,variant:"primary",icon:"arrow-right-from-bracket",children:"Log out"}),c.jsx(mi,{className:"mt-8"})]}),Eg={LicenseSection:wg,ProductsInfoSection:xg,PluginsSection:Cg,Trademark:Sg,UserSection:kg},jg=g.createContext(Eg),Og=g.memo(({children:t,components:n})=>{const e=g.useMemo(()=>({...Eg,...n}),[n]);return c.jsx(jg.Provider,{value:e,children:t})});Og.displayName="ProfilePanelComponentsStoreProvider";const ow=t=>{const n=new Date(t);return[{day:"numeric"},{month:"short"},{year:"numeric"}].map(e=>n.toLocaleDateString("en",e)).join(" ")},rw=t=>{if(!t)return{items:[]};const n=[...t.email?[{name:"Email",value:t.email}]:[],...t.type?[{name:"User Type",value:t.type}]:[],...t.role?[{name:"User Role",value:t.role}]:[],{name:"User ID",value:t.id}];if(t.firstName||t.lastName){const e=[t.firstName,t.lastName].filter(o=>!!o);return{avatarInitials:e.map(o=>o.charAt(0)).join(""),items:n,title:e.join(" ")}}return t.username?{avatarInitials:t.username.charAt(0),items:n,title:t.username}:t.email?{avatarInitials:t.email.charAt(0),items:n}:{items:n}},iw=t=>{const n=new Date(2023,5,6),e=t.expiration<n.getTime()?1e3:1;return{items:[{name:"Type",value:t.type},{name:"Expiration Date",value:ow(t.expiration*e)}]}},aw=t=>({items:t.map(n=>({name:n.name,value:n.version}))}),sw=t=>{var e;const n={"@interopio/workspaces-ui-react":"Workspaces React Frame","@interopio/workspaces-ui-web-components":"Workspaces Web Components Frame"};return{items:[{name:"io.Connect Browser platform",value:t.platform.apiVersion},{name:"io.Connect Browser client",value:t.client.apiVersion},...t.workspaces?[{name:"Workspaces API",value:t.workspaces.apiVersion}]:[],...(e=t.workspaces)!=null&&e.container&&sg(t.workspaces.container.type,n)?[{name:n[t.workspaces.container.type],value:t.workspaces.container.version}]:[],...t.home?[{name:"Home UI",value:t.home.version}]:[],...t.search?[{name:"Search API",value:t.search.apiVersion}]:[],...t.modals?[{name:"Modals API",value:t.modals.apiVersion}]:[]]}},cw=()=>{const t=window.glue42gd??window.iodesktop;if(!t)throw new Error("both window.glue42gd and window.iodesktop are not available");const{user:n,env:e}=t,o=[{name:"Environment",value:e.env},{name:"Region",value:e.region}];return n?{avatarInitials:n.charAt(0),items:o,title:n}:{items:o}},lw=t=>({items:Object.entries(t??{}).map(([e,o])=>({name:e,value:o}))}),uw=t=>({items:t.map(({product:e,version:o})=>({name:e,value:o}))}),dw=t=>Ga()?(async n=>{const{licInfo:e,productInfo:o}=(await n.interop.invoke("T42.GD.GetInfo")).returned;return{user:cw(),license:lw(e),productsInfo:uw(o)}})(t):(async()=>{if(!window.iobrowser)throw new Error("window.iobrowser is not available");const n=await window.iobrowser.system.getProfileData();return{user:rw(n.user),license:iw(n.license),plugins:aw(n.plugins),productsInfo:sw(n.productsInfo)}})(),fw=({className:t,onClose:n,onLogout:e,title:o="Profile",...r})=>{var h;const{LicenseSection:i,ProductsInfoSection:a,PluginsSection:s,Trademark:l,UserSection:u}=g.useContext(jg),f=g.useContext(_e.IOConnectContext),[d,p]=g.useState(null);return g.useEffect(()=>{f&&(async()=>{const m=await dw(f);p(m)})().catch(console.error)},[f]),c.jsxs(qe,{className:de("io-profile-panel",t),"data-testid":"profile-panel",...r,children:[c.jsxs(qe.Header,{children:[c.jsx(qe.Header.Title,{size:"large",text:o}),c.jsx(qe.Header.ButtonGroup,{children:c.jsx(qe.Header.ButtonIcon,{variant:"circle",icon:"close",size:"32",onClick:n})})]}),c.jsxs($o,{element:qe.Body,children:[d!=null&&d.user.items.length||d!=null&&d.user.title?c.jsx(u,{avatarInitials:d.user.avatarInitials,items:d.user.items,onLogout:e,title:d.user.title}):null,c.jsxs("div",{className:"io-profile-sections-container",children:[d!=null&&d.license.items.length?c.jsx(i,{items:d.license.items}):null,d!=null&&d.productsInfo.items.length?c.jsx(a,{items:d.productsInfo.items}):null,(h=d==null?void 0:d.plugins)!=null&&h.items.length?c.jsx(s,{items:d.plugins.items}):null]}),c.jsx(l,{className:"mt-auto"})]})]})},Ng=({components:t,...n})=>c.jsx(Og,{components:t,children:c.jsx(fw,{...n})});var pw=Object.freeze({__proto__:null,LicenseSection:wg,Panel:Ng,PluginsSection:Cg,ProductsInfoSection:xg,Trademark:Sg,UserSection:kg});const Ig=g.createContext(void 0),Ad=()=>{const t=g.useContext(Ig);if(!t)throw new Error("usePanelManagerContext must be used within a PanelManagerContext.Provider");return t},hw=document.querySelector("#root")??document.body,mw={preferences:Qb,"notification-settings":Al,profile:Ng};var gw=Object.freeze({__proto__:null,ActivePanelRenderer:()=>{const{panel:t,deselectPanel:n}=Ad();Xs(()=>{t&&n()},["Escape"]);const e=t?mw[t]:null;return e?oo.createPortal(c.jsx("div",{className:"io-panel-overlay",children:c.jsx(e,{onClose:n})}),hw):null},PanelManagerProvider:({children:t})=>{const[n,e]=g.useState(null),o=g.useCallback(a=>{e(a)},[]),r=g.useCallback(()=>{e(null)},[]),i=g.useMemo(()=>({panel:n,selectPanel:o,deselectPanel:r}),[n,o,r]);return c.jsx(Ig.Provider,{value:i,children:t})},usePanelManagerContext:Ad});const vw=tw,Jr=t=>"items"in t,jt={APPLICATION:"application",WORKSPACE:"workspace",LAYOUT:"layout",ACTION_BUTTON:"action-button"},Rc=t=>typeof t=="string"?t:t!=null&&t.message?typeof t.message=="string"?t.message:JSON.stringify(t.message):JSON.stringify(t),Pg=()=>typeof window.glue42gd<"u"||typeof window.glue42alert<"u"||typeof window.glue42dialog<"u"||typeof window.iodesktop<"u",ba={OPEN_IN_NEW_WINDOW:"openInNewWindow",OPEN_IN_NEW_WORKSPACE:"openInNewWorkspace"},Ag=Pg()?[]:[{name:ba.OPEN_IN_NEW_WINDOW,displayName:"Open in a new window",icon:"pop-out"},{name:ba.OPEN_IN_NEW_WORKSPACE,displayName:"Open in a new Workspace",icon:"pop-out"}],wa={OPEN_IN_NEW_WINDOW:"openInNewWindow",DELETE:"delete"},Tg=[{name:wa.OPEN_IN_NEW_WINDOW,displayName:"Open in a new window",icon:"pop-out",separatorAfter:!0},{name:wa.DELETE,displayName:"Delete",icon:"trash-can"}],li={ASCENDING:"ascending",DESCENDING:"descending",DISABLED:"disabled"},es=new Intl.Collator(void 0,{sensitivity:"base"}),Dg=(t,n)=>es.compare(t.title,n.title),Mg=(t,n)=>es.compare(n.title,t.title),Bl=t=>{const{items:n,sortOrder:e,ascendingCompare:o,descendingCompare:r}=t;if(e===li.DISABLED)return n;const i=e===li.ASCENDING?o:r;return[...n].sort(i)},fr={FAVORITES:"favorites-section",WORKSPACES:"workspaces-section",APPLICATIONS:"applications-section"},Fc=(t,n,e,o)=>{const{isFolderCollapsible:r}=o,i="/",[a,...s]=e.split(i),l=t.findIndex(f=>Jr(f)&&f.title===a),u=l!==-1?t[l]:null;return u?[...t.slice(0,l),{...u,items:s.length>0?Fc(u.items,n,s.join(i),o):[...u.items,n]},...t.slice(l+1)]:[...t,{id:a,title:a,items:s.length>0?Fc([],n,s.join(i),o):[n],isCollapsible:r}]},xa=t=>{const{title:n,userProperties:e}=t,{folder:o}=e;return o?`${o}/${n}`:n},yw=(t,n)=>es.compare(xa(t),xa(n)),bw=(t,n)=>es.compare(xa(n),xa(t)),ww=(t,n,e)=>{const{isSectionCollapsible:o,sortOrder:r=li.ASCENDING}=e,a=Bl({items:t,sortOrder:r,ascendingCompare:yw,descendingCompare:bw}).reduce((s,l)=>{var d;const u={id:l.id,title:l.title,description:l.caption,type:jt.APPLICATION,icon:"application",iconSrc:l.icon,openInstances:(d=n[l.name])==null?void 0:d.length,contextMenuActions:Ag},f=l.userProperties.folder;return f?Fc(s,u,f,e):[...s,u]},[]);return{id:fr.APPLICATIONS,title:"Apps",items:a,isCollapsible:o}};var xw=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ts(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Bc={exports:{}},Ri={exports:{}},Ue={};/** @license React v16.13.1
20
+ `}}function A(k,C){C===void 0&&(C=!0);var N=C?k:k-e.currentMonth;N<0&&e._hidePrevMonthArrow===!0||N>0&&e._hideNextMonthArrow===!0||(e.currentMonth+=N,(e.currentMonth<0||e.currentMonth>11)&&(e.currentYear+=e.currentMonth>11?1:-1,e.currentMonth=(e.currentMonth+12)%12,T("onYearChange"),j()),E(),T("onMonthChange"),Ie())}function P(k){return e.calendarContainer.contains(k)}function re(k){if(e.isOpen&&!e.config.inline){var C=Yt(k),N=P(C),R=!(C===e.input||C===e.altInput||e.element.contains(C)||k.path&&k.path.indexOf&&(~k.path.indexOf(e.input)||~k.path.indexOf(e.altInput)))&&!N&&!P(k.relatedTarget),$=!e.config.ignoredFocusElements.some(function(ce){return ce.contains(C)});R&&$&&(e.config.allowInput&&e.setDate(e._input.value,!1,e.config.altInput?e.config.altFormat:e.config.dateFormat),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0&&e.input.value!==""&&e.input.value!==void 0&&a(),e.close(),e.config&&e.config.mode==="range"&&e.selectedDates.length===1&&e.clear(!1))}}function ae(k){if(!(!k||e.config.minDate&&k<e.config.minDate.getFullYear()||e.config.maxDate&&k>e.config.maxDate.getFullYear())){var C=k,N=e.currentYear!==C;e.currentYear=C||e.currentYear,e.config.maxDate&&e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth=Math.min(e.config.maxDate.getMonth(),e.currentMonth):e.config.minDate&&e.currentYear===e.config.minDate.getFullYear()&&(e.currentMonth=Math.max(e.config.minDate.getMonth(),e.currentMonth)),N&&(e.redraw(),T("onYearChange"),j())}}function z(k,C){var N;C===void 0&&(C=!0);var R=e.parseDate(k,void 0,C);if(e.config.minDate&&R&&Gt(R,e.config.minDate,C!==void 0?C:!e.minDateHasTime)<0||e.config.maxDate&&R&&Gt(R,e.config.maxDate,C!==void 0?C:!e.maxDateHasTime)>0)return!1;if(!e.config.enable&&e.config.disable.length===0)return!0;if(R===void 0)return!1;for(var $=!!e.config.enable,ce=(N=e.config.enable)!==null&&N!==void 0?N:e.config.disable,we=0,X=void 0;we<ce.length;we++){if(typeof(X=ce[we])=="function"&&X(R)||X instanceof Date&&R!==void 0&&X.getTime()===R.getTime())return $;if(typeof X=="string"){var ne=e.parseDate(X,void 0,!0);return ne&&ne.getTime()===R.getTime()?$:!$}if(typeof X=="object"&&R!==void 0&&X.from&&X.to&&R.getTime()>=X.from.getTime()&&R.getTime()<=X.to.getTime())return $}return!$}function ee(k){return e.daysContainer!==void 0&&k.className.indexOf("hidden")===-1&&k.className.indexOf("flatpickr-disabled")===-1&&e.daysContainer.contains(k)}function q(k){var C=k.target===e._input,N=e._input.value.trimEnd()!==Oe();!C||!N||k.relatedTarget&&P(k.relatedTarget)||e.setDate(e._input.value,!0,k.target===e.altInput?e.config.altFormat:e.config.dateFormat)}function ie(k){var C=Yt(k),N=e.config.wrap?t.contains(C):C===e._input,R=e.config.allowInput,$=e.isOpen&&(!R||!N),ce=e.config.inline&&N&&!R;if(k.keyCode===13&&N){if(R)return e.setDate(e._input.value,!0,C===e.altInput?e.config.altFormat:e.config.dateFormat),e.close(),C.blur();e.open()}else if(P(C)||$||ce){var we=!!e.timeContainer&&e.timeContainer.contains(C);switch(k.keyCode){case 13:we?(k.preventDefault(),a(),I()):B(k);break;case 27:k.preventDefault(),I();break;case 8:case 46:N&&!e.config.allowInput&&(k.preventDefault(),e.clear());break;case 37:case 39:if(we||N)e.hourElement&&e.hourElement.focus();else{k.preventDefault();var X=o();if(e.daysContainer!==void 0&&(R===!1||X&&ee(X))){var ne=k.keyCode===39?1:-1;k.ctrlKey?(k.stopPropagation(),A(ne),b(S(1),0)):b(void 0,ne)}}break;case 38:case 40:k.preventDefault();var te=k.keyCode===40?1:-1;e.daysContainer&&C.$i!==void 0||C===e.input||C===e.altInput?k.ctrlKey?(k.stopPropagation(),ae(e.currentYear-te),b(S(1),0)):we||b(void 0,7*te):C===e.currentYearElement?ae(e.currentYear-te):e.config.enableTime&&(!we&&e.hourElement&&e.hourElement.focus(),a(k),e._debouncedChange());break;case 9:if(we){var le=[e.hourElement,e.minuteElement,e.secondElement,e.amPM].concat(e.pluginElements).filter(function(pe){return pe}),he=le.indexOf(C);if(he!==-1){var ye=le[he+(k.shiftKey?-1:1)];k.preventDefault(),(ye||e._input).focus()}}else!e.config.noCalendar&&e.daysContainer&&e.daysContainer.contains(C)&&k.shiftKey&&(k.preventDefault(),e._input.focus())}}if(e.amPM!==void 0&&C===e.amPM)switch(k.key){case e.l10n.amPM[0].charAt(0):case e.l10n.amPM[0].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[0],s(),ke();break;case e.l10n.amPM[1].charAt(0):case e.l10n.amPM[1].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[1],s(),ke()}(N||P(C))&&T("onKeyDown",k)}function J(k,C){if(C===void 0&&(C="flatpickr-day"),e.selectedDates.length===1&&(!k||k.classList.contains(C)&&!k.classList.contains("flatpickr-disabled"))){for(var N=k?k.dateObj.getTime():e.days.firstElementChild.dateObj.getTime(),R=e.parseDate(e.selectedDates[0],void 0,!0).getTime(),$=Math.min(N,e.selectedDates[0].getTime()),ce=Math.max(N,e.selectedDates[0].getTime()),we=!1,X=0,ne=0,te=$;te<ce;te+=Kw)z(new Date(te),!0)||(we=we||te>$&&te<ce,te<R&&(!X||te>X)?X=te:te>R&&(!ne||te<ne)&&(ne=te));Array.from(e.rContainer.querySelectorAll("*:nth-child(-n+"+e.config.showMonths+") > ."+C)).forEach(function(le){var he,ye,pe,oe=le.dateObj.getTime(),Ee=X>0&&oe<X||ne>0&&oe>ne;if(Ee)return le.classList.add("notAllowed"),void["inRange","startRange","endRange"].forEach(function(Re){le.classList.remove(Re)});we&&!Ee||(["startRange","inRange","endRange","notAllowed"].forEach(function(Re){le.classList.remove(Re)}),k!==void 0&&(k.classList.add(N<=e.selectedDates[0].getTime()?"startRange":"endRange"),R<N&&oe===R?le.classList.add("startRange"):R>N&&oe===R&&le.classList.add("endRange"),oe>=X&&(ne===0||oe<=ne)&&(ye=R,pe=N,(he=oe)>Math.min(ye,pe)&&he<Math.max(ye,pe))&&le.classList.add("inRange")))})}}function W(){!e.isOpen||e.config.static||e.config.inline||L()}function Q(k){return function(C){var N=e.config["_"+k+"Date"]=e.parseDate(C,e.config.dateFormat),R=e.config["_"+(k==="min"?"max":"min")+"Date"];N!==void 0&&(e[k==="min"?"minDateHasTime":"maxDateHasTime"]=N.getHours()>0||N.getMinutes()>0||N.getSeconds()>0),e.selectedDates&&(e.selectedDates=e.selectedDates.filter(function($){return z($)}),e.selectedDates.length||k!=="min"||l(N),ke()),e.daysContainer&&(O(),N!==void 0?e.currentYearElement[k]=N.getFullYear().toString():e.currentYearElement.removeAttribute(k),e.currentYearElement.disabled=!!R&&N!==void 0&&R.getFullYear()===N.getFullYear())}}function Y(){return e.config.wrap?t.querySelector("[data-input]"):t}function H(){typeof e.config.locale!="object"&&st.l10ns[e.config.locale]===void 0&&e.config.errorHandler(new Error("flatpickr: invalid locale "+e.config.locale)),e.l10n=It(It({},st.l10ns.default),typeof e.config.locale=="object"?e.config.locale:e.config.locale!=="default"?st.l10ns[e.config.locale]:void 0),Oo.D="("+e.l10n.weekdays.shorthand.join("|")+")",Oo.l="("+e.l10n.weekdays.longhand.join("|")+")",Oo.M="("+e.l10n.months.shorthand.join("|")+")",Oo.F="("+e.l10n.months.longhand.join("|")+")",Oo.K="("+e.l10n.amPM[0]+"|"+e.l10n.amPM[1]+"|"+e.l10n.amPM[0].toLowerCase()+"|"+e.l10n.amPM[1].toLowerCase()+")",It(It({},n),JSON.parse(JSON.stringify(t.dataset||{}))).time_24hr===void 0&&st.defaultConfig.time_24hr===void 0&&(e.config.time_24hr=e.l10n.time_24hr),e.formatDate=lg(e),e.parseDate=Bc({config:e.config,l10n:e.l10n})}function L(k){if(typeof e.config.position!="function"){if(e.calendarContainer!==void 0){T("onPreCalendarPosition");var C=k||e._positionElement,N=Array.prototype.reduce.call(e.calendarContainer.children,function(Me,Ae){return Me+Ae.offsetHeight},0),R=e.calendarContainer.offsetWidth,$=e.config.position.split(" "),ce=$[0],we=$.length>1?$[1]:null,X=C.getBoundingClientRect(),ne=window.innerHeight-X.bottom,te=ce==="above"||ce!=="below"&&ne<N&&X.top>N,le=window.pageYOffset+X.top+(te?-N-2:C.offsetHeight+2);if(_t(e.calendarContainer,"arrowTop",!te),_t(e.calendarContainer,"arrowBottom",te),!e.config.inline){var he=window.pageXOffset+X.left,ye=!1,pe=!1;we==="center"?(he-=(R-X.width)/2,ye=!0):we==="right"&&(he-=R-X.width,pe=!0),_t(e.calendarContainer,"arrowLeft",!ye&&!pe),_t(e.calendarContainer,"arrowCenter",ye),_t(e.calendarContainer,"arrowRight",pe);var oe=window.document.body.offsetWidth-(window.pageXOffset+X.right),Ee=he+R>window.document.body.offsetWidth,Re=oe+R>window.document.body.offsetWidth;if(_t(e.calendarContainer,"rightMost",Ee),!e.config.static)if(e.calendarContainer.style.top=le+"px",Ee)if(Re){var Pe=function(){for(var Me=null,Ae=0;Ae<document.styleSheets.length;Ae++){var Ke=document.styleSheets[Ae];if(Ke.cssRules){try{Ke.cssRules}catch{continue}Me=Ke;break}}return Me??(kt=document.createElement("style"),document.head.appendChild(kt),kt.sheet);var kt}();if(Pe===void 0)return;var Ce=window.document.body.offsetWidth,Ne=Math.max(0,Ce/2-R/2),ge=Pe.cssRules.length,Se="{left:"+X.left+"px;right:auto;}";_t(e.calendarContainer,"rightMost",!1),_t(e.calendarContainer,"centerMost",!0),Pe.insertRule(".flatpickr-calendar.centerMost:before,.flatpickr-calendar.centerMost:after"+Se,ge),e.calendarContainer.style.left=Ne+"px",e.calendarContainer.style.right="auto"}else e.calendarContainer.style.left="auto",e.calendarContainer.style.right=oe+"px";else e.calendarContainer.style.left=he+"px",e.calendarContainer.style.right="auto"}}}else e.config.position(e,k)}function O(){e.config.noCalendar||e.isMobile||(j(),Ie(),E())}function I(){e._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(e.close,0):e.close()}function B(k){k.preventDefault(),k.stopPropagation();var C=cg(Yt(k),function(te){return te.classList&&te.classList.contains("flatpickr-day")&&!te.classList.contains("flatpickr-disabled")&&!te.classList.contains("notAllowed")});if(C!==void 0){var N=C,R=e.latestSelectedDateObj=new Date(N.dateObj.getTime()),$=(R.getMonth()<e.currentMonth||R.getMonth()>e.currentMonth+e.config.showMonths-1)&&e.config.mode!=="range";if(e.selectedDateElem=N,e.config.mode==="single")e.selectedDates=[R];else if(e.config.mode==="multiple"){var ce=be(R);ce?e.selectedDates.splice(parseInt(ce),1):e.selectedDates.push(R)}else e.config.mode==="range"&&(e.selectedDates.length===2&&e.clear(!1,!1),e.latestSelectedDateObj=R,e.selectedDates.push(R),Gt(R,e.selectedDates[0],!0)!==0&&e.selectedDates.sort(function(te,le){return te.getTime()-le.getTime()}));if(s(),$){var we=e.currentYear!==R.getFullYear();e.currentYear=R.getFullYear(),e.currentMonth=R.getMonth(),we&&(T("onYearChange"),j()),T("onMonthChange")}if(Ie(),E(),ke(),$||e.config.mode==="range"||e.config.showMonths!==1?e.selectedDateElem!==void 0&&e.hourElement===void 0&&e.selectedDateElem&&e.selectedDateElem.focus():x(N),e.hourElement!==void 0&&e.hourElement!==void 0&&e.hourElement.focus(),e.config.closeOnSelect){var X=e.config.mode==="single"&&!e.config.enableTime,ne=e.config.mode==="range"&&e.selectedDates.length===2&&!e.config.enableTime;(X||ne)&&I()}p()}}e.parseDate=Bc({config:e.config,l10n:e.l10n}),e._handlers=[],e.pluginElements=[],e.loadedPlugins=[],e._bind=d,e._setHoursFromDate=l,e._positionCalendar=L,e.changeMonth=A,e.changeYear=ae,e.clear=function(k,C){if(k===void 0&&(k=!0),C===void 0&&(C=!0),e.input.value="",e.altInput!==void 0&&(e.altInput.value=""),e.mobileInput!==void 0&&(e.mobileInput.value=""),e.selectedDates=[],e.latestSelectedDateObj=void 0,C===!0&&(e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth()),e.config.enableTime===!0){var N=$s(e.config);u(N.hours,N.minutes,N.seconds)}e.redraw(),k&&T("onChange")},e.close=function(){e.isOpen=!1,e.isMobile||(e.calendarContainer!==void 0&&e.calendarContainer.classList.remove("open"),e._input!==void 0&&e._input.classList.remove("active")),T("onClose")},e.onMouseOver=J,e._createElement=We,e.createDay=y,e.destroy=function(){e.config!==void 0&&T("onDestroy");for(var k=e._handlers.length;k--;)e._handlers[k].remove();if(e._handlers=[],e.mobileInput)e.mobileInput.parentNode&&e.mobileInput.parentNode.removeChild(e.mobileInput),e.mobileInput=void 0;else if(e.calendarContainer&&e.calendarContainer.parentNode)if(e.config.static&&e.calendarContainer.parentNode){var C=e.calendarContainer.parentNode;if(C.lastChild&&C.removeChild(C.lastChild),C.parentNode){for(;C.firstChild;)C.parentNode.insertBefore(C.firstChild,C);C.parentNode.removeChild(C)}}else e.calendarContainer.parentNode.removeChild(e.calendarContainer);e.altInput&&(e.input.type="text",e.altInput.parentNode&&e.altInput.parentNode.removeChild(e.altInput),delete e.altInput),e.input&&(e.input.type=e.input._type,e.input.classList.remove("flatpickr-input"),e.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(N){try{delete e[N]}catch{}})},e.isEnabled=z,e.jumpToDate=h,e.updateValue=ke,e.open=function(k,C){if(C===void 0&&(C=e._positionElement),e.isMobile===!0){if(k){k.preventDefault();var N=Yt(k);N&&N.blur()}return e.mobileInput!==void 0&&(e.mobileInput.focus(),e.mobileInput.click()),void T("onOpen")}if(!(e._input.disabled||e.config.inline)){var R=e.isOpen;e.isOpen=!0,R||(e.calendarContainer.classList.add("open"),e._input.classList.add("active"),T("onOpen"),L(C)),e.config.enableTime===!0&&e.config.noCalendar===!0&&(e.config.allowInput!==!1||k!==void 0&&e.timeContainer.contains(k.relatedTarget)||setTimeout(function(){return e.hourElement.select()},50))}},e.redraw=O,e.set=function(k,C){if(k!==null&&typeof k=="object")for(var N in Object.assign(e.config,k),k)U[N]!==void 0&&U[N].forEach(function(R){return R()});else e.config[k]=C,U[k]!==void 0?U[k].forEach(function(R){return R()}):Rs.indexOf(k)>-1&&(e.config[k]=Fs(C));e.redraw(),ke(!0)},e.setDate=function(k,C,N){if(C===void 0&&(C=!1),N===void 0&&(N=e.config.dateFormat),k!==0&&!k||k instanceof Array&&k.length===0)return e.clear(C);V(k,N),e.latestSelectedDateObj=e.selectedDates[e.selectedDates.length-1],e.redraw(),h(void 0,C),l(),e.selectedDates.length===0&&e.clear(!1),ke(C),C&&T("onChange")},e.toggle=function(k){if(e.isOpen===!0)return e.close();e.open(k)};var U={locale:[H,D],showMonths:[M,i,F],minDate:[h],maxDate:[h],positionElement:[Z],clickOpens:[function(){e.config.clickOpens===!0?(d(e._input,"focus",e.open),d(e._input,"click",e.open)):(e._input.removeEventListener("focus",e.open),e._input.removeEventListener("click",e.open))}]};function V(k,C){var N=[];if(k instanceof Array)N=k.map(function(R){return e.parseDate(R,C)});else if(k instanceof Date||typeof k=="number")N=[e.parseDate(k,C)];else if(typeof k=="string")switch(e.config.mode){case"single":case"time":N=[e.parseDate(k,C)];break;case"multiple":N=k.split(e.config.conjunction).map(function(R){return e.parseDate(R,C)});break;case"range":N=k.split(e.l10n.rangeSeparator).map(function(R){return e.parseDate(R,C)})}else e.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(k)));e.selectedDates=e.config.allowInvalidPreload?N:N.filter(function(R){return R instanceof Date&&z(R,!1)}),e.config.mode==="range"&&e.selectedDates.sort(function(R,$){return R.getTime()-$.getTime()})}function se(k){return k.slice().map(function(C){return typeof C=="string"||typeof C=="number"||C instanceof Date?e.parseDate(C,void 0,!0):C&&typeof C=="object"&&C.from&&C.to?{from:e.parseDate(C.from,void 0),to:e.parseDate(C.to,void 0)}:C}).filter(function(C){return C})}function Z(){e._positionElement=e.config.positionElement||e._input}function T(k,C){if(e.config!==void 0){var N=e.config[k];if(N!==void 0&&N.length>0)for(var R=0;N[R]&&R<N.length;R++)N[R](e.selectedDates,e.input.value,e,C);k==="onChange"&&(e.input.dispatchEvent(me("change")),e.input.dispatchEvent(me("input")))}}function me(k){var C=document.createEvent("Event");return C.initEvent(k,!0,!0),C}function be(k){for(var C=0;C<e.selectedDates.length;C++){var N=e.selectedDates[C];if(N instanceof Date&&Gt(N,k)===0)return""+C}return!1}function Ie(){e.config.noCalendar||e.isMobile||!e.monthNav||(e.yearElements.forEach(function(k,C){var N=new Date(e.currentYear,e.currentMonth,1);N.setMonth(e.currentMonth+C),e.config.showMonths>1||e.config.monthSelectorType==="static"?e.monthElements[C].textContent=xa(N.getMonth(),e.config.shorthandCurrentMonth,e.l10n)+" ":e.monthsDropdownContainer.value=N.getMonth().toString(),k.value=N.getFullYear().toString()}),e._hidePrevMonthArrow=e.config.minDate!==void 0&&(e.currentYear===e.config.minDate.getFullYear()?e.currentMonth<=e.config.minDate.getMonth():e.currentYear<e.config.minDate.getFullYear()),e._hideNextMonthArrow=e.config.maxDate!==void 0&&(e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth+1>e.config.maxDate.getMonth():e.currentYear>e.config.maxDate.getFullYear()))}function Oe(k){var C=k||(e.config.altInput?e.config.altFormat:e.config.dateFormat);return e.selectedDates.map(function(N){return e.formatDate(N,C)}).filter(function(N,R,$){return e.config.mode!=="range"||e.config.enableTime||$.indexOf(N)===R}).join(e.config.mode!=="range"?e.config.conjunction:e.l10n.rangeSeparator)}function ke(k){k===void 0&&(k=!0),e.mobileInput!==void 0&&e.mobileFormatStr&&(e.mobileInput.value=e.latestSelectedDateObj!==void 0?e.formatDate(e.latestSelectedDateObj,e.mobileFormatStr):""),e.input.value=Oe(e.config.dateFormat),e.altInput!==void 0&&(e.altInput.value=Oe(e.config.altFormat)),k!==!1&&T("onValueUpdate")}function ue(k){var C=Yt(k),N=e.prevMonthNav.contains(C),R=e.nextMonthNav.contains(C);N||R?A(N?-1:1):e.yearElements.indexOf(C)>=0?C.select():C.classList.contains("arrowUp")?e.changeYear(e.currentYear+1):C.classList.contains("arrowDown")&&e.changeYear(e.currentYear-1)}return function(){e.element=e.input=t,e.isOpen=!1,function(){var C=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],N=It(It({},JSON.parse(JSON.stringify(t.dataset||{}))),n),R={};e.config.parseDate=N.parseDate,e.config.formatDate=N.formatDate,Object.defineProperty(e.config,"enable",{get:function(){return e.config._enable},set:function(he){e.config._enable=se(he)}}),Object.defineProperty(e.config,"disable",{get:function(){return e.config._disable},set:function(he){e.config._disable=se(he)}});var $=N.mode==="time";if(!N.dateFormat&&(N.enableTime||$)){var ce=st.defaultConfig.dateFormat||dr.dateFormat;R.dateFormat=N.noCalendar||$?"H:i"+(N.enableSeconds?":S":""):ce+" H:i"+(N.enableSeconds?":S":"")}if(N.altInput&&(N.enableTime||$)&&!N.altFormat){var we=st.defaultConfig.altFormat||dr.altFormat;R.altFormat=N.noCalendar||$?"h:i"+(N.enableSeconds?":S K":" K"):we+" h:i"+(N.enableSeconds?":S":"")+" K"}Object.defineProperty(e.config,"minDate",{get:function(){return e.config._minDate},set:Q("min")}),Object.defineProperty(e.config,"maxDate",{get:function(){return e.config._maxDate},set:Q("max")});var X=function(he){return function(ye){e.config[he==="min"?"_minTime":"_maxTime"]=e.parseDate(ye,"H:i:S")}};Object.defineProperty(e.config,"minTime",{get:function(){return e.config._minTime},set:X("min")}),Object.defineProperty(e.config,"maxTime",{get:function(){return e.config._maxTime},set:X("max")}),N.mode==="time"&&(e.config.noCalendar=!0,e.config.enableTime=!0),Object.assign(e.config,R,N);for(var ne=0;ne<C.length;ne++)e.config[C[ne]]=e.config[C[ne]]===!0||e.config[C[ne]]==="true";for(Rs.filter(function(he){return e.config[he]!==void 0}).forEach(function(he){e.config[he]=Fs(e.config[he]||[]).map(r)}),e.isMobile=!e.config.disableMobile&&!e.config.inline&&e.config.mode==="single"&&!e.config.disable.length&&!e.config.enable&&!e.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),ne=0;ne<e.config.plugins.length;ne++){var te=e.config.plugins[ne](e)||{};for(var le in te)Rs.indexOf(le)>-1?e.config[le]=Fs(te[le]).map(r).concat(e.config[le]):N[le]===void 0&&(e.config[le]=te[le])}N.altInputClass||(e.config.altInputClass=Y().className+" "+e.config.altInputClass),T("onParseConfig")}(),H(),function(){if(e.input=Y(),!e.input)return void e.config.errorHandler(new Error("Invalid input element specified"));e.input._type=e.input.type,e.input.type="text",e.input.classList.add("flatpickr-input"),e._input=e.input,e.config.altInput&&(e.altInput=We(e.input.nodeName,e.config.altInputClass),e._input=e.altInput,e.altInput.placeholder=e.input.placeholder,e.altInput.disabled=e.input.disabled,e.altInput.required=e.input.required,e.altInput.tabIndex=e.input.tabIndex,e.altInput.type="text",e.input.setAttribute("type","hidden"),!e.config.static&&e.input.parentNode&&e.input.parentNode.insertBefore(e.altInput,e.input.nextSibling)),e.config.allowInput||e._input.setAttribute("readonly","readonly"),Z()}(),function(){e.selectedDates=[],e.now=e.parseDate(e.config.now)||new Date;var C=e.config.defaultDate||(e.input.nodeName!=="INPUT"&&e.input.nodeName!=="TEXTAREA"||!e.input.placeholder||e.input.value!==e.input.placeholder?e.input.value:null);C&&V(C,e.config.dateFormat),e._initialDate=e.selectedDates.length>0?e.selectedDates[0]:e.config.minDate&&e.config.minDate.getTime()>e.now.getTime()?e.config.minDate:e.config.maxDate&&e.config.maxDate.getTime()<e.now.getTime()?e.config.maxDate:e.now,e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth(),e.selectedDates.length>0&&(e.latestSelectedDateObj=e.selectedDates[0]),e.config.minTime!==void 0&&(e.config.minTime=e.parseDate(e.config.minTime,"H:i")),e.config.maxTime!==void 0&&(e.config.maxTime=e.parseDate(e.config.maxTime,"H:i")),e.minDateHasTime=!!e.config.minDate&&(e.config.minDate.getHours()>0||e.config.minDate.getMinutes()>0||e.config.minDate.getSeconds()>0),e.maxDateHasTime=!!e.config.maxDate&&(e.config.maxDate.getHours()>0||e.config.maxDate.getMinutes()>0||e.config.maxDate.getSeconds()>0)}(),e.utils={getDaysInMonth:function(C,N){return C===void 0&&(C=e.currentMonth),N===void 0&&(N=e.currentYear),C===1&&(N%4==0&&N%100!=0||N%400==0)?29:e.l10n.daysInMonth[C]}},e.isMobile||function(){var C=window.document.createDocumentFragment();if(e.calendarContainer=We("div","flatpickr-calendar"),e.calendarContainer.tabIndex=-1,!e.config.noCalendar){if(C.appendChild((e.monthNav=We("div","flatpickr-months"),e.yearElements=[],e.monthElements=[],e.prevMonthNav=We("span","flatpickr-prev-month"),e.prevMonthNav.innerHTML=e.config.prevArrow,e.nextMonthNav=We("span","flatpickr-next-month"),e.nextMonthNav.innerHTML=e.config.nextArrow,M(),Object.defineProperty(e,"_hidePrevMonthArrow",{get:function(){return e.__hidePrevMonthArrow},set:function(X){e.__hidePrevMonthArrow!==X&&(_t(e.prevMonthNav,"flatpickr-disabled",X),e.__hidePrevMonthArrow=X)}}),Object.defineProperty(e,"_hideNextMonthArrow",{get:function(){return e.__hideNextMonthArrow},set:function(X){e.__hideNextMonthArrow!==X&&(_t(e.nextMonthNav,"flatpickr-disabled",X),e.__hideNextMonthArrow=X)}}),e.currentYearElement=e.yearElements[0],Ie(),e.monthNav)),e.innerContainer=We("div","flatpickr-innerContainer"),e.config.weekNumbers){var N=function(){e.calendarContainer.classList.add("hasWeeks");var X=We("div","flatpickr-weekwrapper");X.appendChild(We("span","flatpickr-weekday",e.l10n.weekAbbreviation));var ne=We("div","flatpickr-weeks");return X.appendChild(ne),{weekWrapper:X,weekNumbers:ne}}(),R=N.weekWrapper,$=N.weekNumbers;e.innerContainer.appendChild(R),e.weekNumbers=$,e.weekWrapper=R}e.rContainer=We("div","flatpickr-rContainer"),e.rContainer.appendChild(F()),e.daysContainer||(e.daysContainer=We("div","flatpickr-days"),e.daysContainer.tabIndex=-1),E(),e.rContainer.appendChild(e.daysContainer),e.innerContainer.appendChild(e.rContainer),C.appendChild(e.innerContainer)}e.config.enableTime&&C.appendChild(function(){e.calendarContainer.classList.add("hasTime"),e.config.noCalendar&&e.calendarContainer.classList.add("noCalendar");var X=$s(e.config);e.timeContainer=We("div","flatpickr-time"),e.timeContainer.tabIndex=-1;var ne=We("span","flatpickr-time-separator",":"),te=Fi("flatpickr-hour",{"aria-label":e.l10n.hourAriaLabel});e.hourElement=te.getElementsByTagName("input")[0];var le=Fi("flatpickr-minute",{"aria-label":e.l10n.minuteAriaLabel});if(e.minuteElement=le.getElementsByTagName("input")[0],e.hourElement.tabIndex=e.minuteElement.tabIndex=-1,e.hourElement.value=Bt(e.latestSelectedDateObj?e.latestSelectedDateObj.getHours():e.config.time_24hr?X.hours:function(ye){switch(ye%24){case 0:case 12:return 12;default:return ye%12}}(X.hours)),e.minuteElement.value=Bt(e.latestSelectedDateObj?e.latestSelectedDateObj.getMinutes():X.minutes),e.hourElement.setAttribute("step",e.config.hourIncrement.toString()),e.minuteElement.setAttribute("step",e.config.minuteIncrement.toString()),e.hourElement.setAttribute("min",e.config.time_24hr?"0":"1"),e.hourElement.setAttribute("max",e.config.time_24hr?"23":"12"),e.hourElement.setAttribute("maxlength","2"),e.minuteElement.setAttribute("min","0"),e.minuteElement.setAttribute("max","59"),e.minuteElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(te),e.timeContainer.appendChild(ne),e.timeContainer.appendChild(le),e.config.time_24hr&&e.timeContainer.classList.add("time24hr"),e.config.enableSeconds){e.timeContainer.classList.add("hasSeconds");var he=Fi("flatpickr-second");e.secondElement=he.getElementsByTagName("input")[0],e.secondElement.value=Bt(e.latestSelectedDateObj?e.latestSelectedDateObj.getSeconds():X.seconds),e.secondElement.setAttribute("step",e.minuteElement.getAttribute("step")),e.secondElement.setAttribute("min","0"),e.secondElement.setAttribute("max","59"),e.secondElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(We("span","flatpickr-time-separator",":")),e.timeContainer.appendChild(he)}return e.config.time_24hr||(e.amPM=We("span","flatpickr-am-pm",e.l10n.amPM[an((e.latestSelectedDateObj?e.hourElement.value:e.config.defaultHour)>11)]),e.amPM.title=e.l10n.toggleTitle,e.amPM.tabIndex=-1,e.timeContainer.appendChild(e.amPM)),e.timeContainer}()),_t(e.calendarContainer,"rangeMode",e.config.mode==="range"),_t(e.calendarContainer,"animate",e.config.animate===!0),_t(e.calendarContainer,"multiMonth",e.config.showMonths>1),e.calendarContainer.appendChild(C);var ce=e.config.appendTo!==void 0&&e.config.appendTo.nodeType!==void 0;if((e.config.inline||e.config.static)&&(e.calendarContainer.classList.add(e.config.inline?"inline":"static"),e.config.inline&&(!ce&&e.element.parentNode?e.element.parentNode.insertBefore(e.calendarContainer,e._input.nextSibling):e.config.appendTo!==void 0&&e.config.appendTo.appendChild(e.calendarContainer)),e.config.static)){var we=We("div","flatpickr-wrapper");e.element.parentNode&&e.element.parentNode.insertBefore(we,e.element),we.appendChild(e.element),e.altInput&&we.appendChild(e.altInput),we.appendChild(e.calendarContainer)}e.config.static||e.config.inline||(e.config.appendTo!==void 0?e.config.appendTo:window.document.body).appendChild(e.calendarContainer)}(),function(){if(e.config.wrap&&["open","close","toggle","clear"].forEach(function(R){Array.prototype.forEach.call(e.element.querySelectorAll("[data-"+R+"]"),function($){return d($,"click",e[R])})}),e.isMobile)return void function(){var R=e.config.enableTime?e.config.noCalendar?"time":"datetime-local":"date";e.mobileInput=We("input",e.input.className+" flatpickr-mobile"),e.mobileInput.tabIndex=1,e.mobileInput.type=R,e.mobileInput.disabled=e.input.disabled,e.mobileInput.required=e.input.required,e.mobileInput.placeholder=e.input.placeholder,e.mobileFormatStr=R==="datetime-local"?"Y-m-d\\TH:i:S":R==="date"?"Y-m-d":"H:i:S",e.selectedDates.length>0&&(e.mobileInput.defaultValue=e.mobileInput.value=e.formatDate(e.selectedDates[0],e.mobileFormatStr)),e.config.minDate&&(e.mobileInput.min=e.formatDate(e.config.minDate,"Y-m-d")),e.config.maxDate&&(e.mobileInput.max=e.formatDate(e.config.maxDate,"Y-m-d")),e.input.getAttribute("step")&&(e.mobileInput.step=String(e.input.getAttribute("step"))),e.input.type="hidden",e.altInput!==void 0&&(e.altInput.type="hidden");try{e.input.parentNode&&e.input.parentNode.insertBefore(e.mobileInput,e.input.nextSibling)}catch{}d(e.mobileInput,"change",function($){e.setDate(Yt($).value,!1,e.mobileFormatStr),T("onChange"),T("onClose")})}();var C=Ad(W,50);if(e._debouncedChange=Ad(p,300),e.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&d(e.daysContainer,"mouseover",function(R){e.config.mode==="range"&&J(Yt(R))}),d(e._input,"keydown",ie),e.calendarContainer!==void 0&&d(e.calendarContainer,"keydown",ie),e.config.inline||e.config.static||d(window,"resize",C),window.ontouchstart!==void 0?d(window.document,"touchstart",re):d(window.document,"mousedown",re),d(window.document,"focus",re,{capture:!0}),e.config.clickOpens===!0&&(d(e._input,"focus",e.open),d(e._input,"click",e.open)),e.daysContainer!==void 0&&(d(e.monthNav,"click",ue),d(e.monthNav,["keyup","increment"],f),d(e.daysContainer,"click",B)),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0){var N=function(R){return Yt(R).select()};d(e.timeContainer,["increment"],a),d(e.timeContainer,"blur",a,{capture:!0}),d(e.timeContainer,"click",m),d([e.hourElement,e.minuteElement],["focus","click"],N),e.secondElement!==void 0&&d(e.secondElement,"focus",function(){return e.secondElement&&e.secondElement.select()}),e.amPM!==void 0&&d(e.amPM,"click",function(R){a(R)})}e.config.allowInput&&d(e._input,"blur",q)}(),(e.selectedDates.length||e.config.noCalendar)&&(e.config.enableTime&&l(e.config.noCalendar?e.latestSelectedDateObj:void 0),ke(!1)),i();var k=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!e.isMobile&&k&&L(),T("onReady")}(),e}function fr(t,n){for(var e=Array.prototype.slice.call(t).filter(function(a){return a instanceof HTMLElement}),o=[],r=0;r<e.length;r++){var i=e[r];try{if(i.getAttribute("data-fp-omit")!==null)continue;i._flatpickr!==void 0&&(i._flatpickr.destroy(),i._flatpickr=void 0),i._flatpickr=Zw(i,n||{}),o.push(i._flatpickr)}catch(a){console.error(a)}}return o.length===1?o[0]:o}typeof HTMLElement<"u"&&typeof HTMLCollection<"u"&&typeof NodeList<"u"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(t){return fr(this,t)},HTMLElement.prototype.flatpickr=function(t){return fr([this],t)});var st=function(t,n){return typeof t=="string"?fr(window.document.querySelectorAll(t),n):t instanceof Node?fr([t],n):fr(t,n)};st.defaultConfig={},st.l10ns={en:It({},li),default:It({},li)},st.localize=function(t){st.l10ns.default=It(It({},st.l10ns.default),t)},st.setDefaults=function(t){st.defaultConfig=It(It({},st.defaultConfig),t)},st.parseDate=Bc({}),st.formatDate=lg({}),st.compareDates=Gt,typeof jQuery<"u"&&jQuery.fn!==void 0&&(jQuery.fn.flatpickr=function(t){return fr(this,t)}),Date.prototype.fp_incr=function(t){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof t=="string"?parseInt(t,10):t))},typeof window<"u"&&(window.flatpickr=st);const qw=["onCreate","onDestroy"],Ws=["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"],Jw=t=>{const n=g.useMemo(()=>({...t}),[t]),{defaultValue:e,options:o={},value:r,children:i,render:a,onCreate:s,onDestroy:l}=n,u=g.useMemo(()=>((m,v)=>(Ws.forEach(y=>{const x=v[y],S=m[y];if(x){S&&!Array.isArray(S)?m[y]=[m[y]]:m[y]||(m[y]=[]);const b=Array.isArray(x)?x:[x];m[y].length===0?m[y]=b:m[y].push(...b)}}),Ws.forEach(y=>{delete v[y]}),qw.forEach(y=>{delete v[y]}),m))(o,n),[o,n]),f=g.useRef(null),d=g.useRef(void 0);g.useImperativeHandle(t.ref,()=>({get flatpickr(){return d.current}}),[]),g.useEffect(()=>((()=>{var m;u.onClose=u.onClose||(()=>{var v;(v=f.current)!=null&&v.blur&&f.current.blur()}),d.current=(((m=st)==null?void 0:m.default)||st)(f.current,u),s==null||s(d.current)})(),()=>{l==null||l(d.current),d.current&&d.current.destroy(),d.current=void 0}),[u,s,l]),g.useEffect(()=>{var m;if(d.current){const v=Object.getOwnPropertyNames(u);for(let y=v.length-1;y>=0;y--){const x=v[y];let S=u[x];(S==null?void 0:S.toString())!==((m=d.current.config[x])==null?void 0:m.toString())&&(Ws.includes(x)&&!Array.isArray(S)&&(S=[S]),d.current.set(x,S))}r!==void 0&&r!==d.current.input.value&&d.current.setDate(r,!1)}},[u,r]);const p=g.useCallback(m=>{f.current=m},[]);if(a)return a({...n,defaultValue:e,value:r},p);const h=g.useCallback(m=>{var v,y;t&&t.onChange&&(Array.isArray(t==null?void 0:t.onChange)?(v=t==null?void 0:t.onChange)==null||v.forEach(()=>[new Date(m.target.value)],(r==null?void 0:r.toString())||""):typeof t.onChange=="function"&&((y=t==null?void 0:t.onChange)==null||y.call(t,[new Date(m.target.value)],(r==null?void 0:r.toString())||"",d.current)))},[t,r]);return o.wrap?c.jsx("div",{className:"flatpickr",ref:p,children:i}):c.jsx("input",{onChange:h,...n,value:r==null?void 0:r.toString(),defaultValue:e,ref:p})},Dd="T42.GD.Execute",ug=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dg=(t,n)=>t in n;function Xw({time:t,frequency:n,day:e}){const o=new Date(`01/01/2000 ${t}`),r=o.getMinutes(),i=o.getHours();let a="*";return n==="weekly"&&e&&(a=function(s){const l={Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6};if(!dg(s,l))throw new Error(`Invalid day: ${s}`);return l[s]}(e).toString()),`${r} ${i} * * ${a}`}function Qw(t){const n=g.useContext(_e.IOConnectContext),{value:e,update:o}=Xt({prefKey:Bi(t)}),{value:r,update:i}=Xt({prefKey:Bi(t,"Time")}),{value:a,update:s}=Xt({prefKey:Bi(t,"Frequency")}),{value:l,update:u}=Xt({prefKey:Bi(t,"Day")}),f=g.useCallback(async()=>{try{await n.interop.invoke(Dd,{command:`cancel-${t}`})}catch(p){console.error(p)}},[n,t]),d=g.useCallback(async()=>{try{const p=Xw({time:r??"12:00 AM",frequency:a??"daily",day:a==="weekly"?l:"*"});await n.interop.invoke(Dd,{command:`schedule-${t}`,args:{cronTime:p,discardUnsavedLayoutChanges:!1}})}catch(p){console.error(`Failed to update cron job for ${t}:`,p)}},[n,t,r,a,l]);return g.useEffect(()=>{n&&e&&d()},[n,e,d]),{enabled:e??!1,time:r??"12:00 AM",frequency:a??"daily",day:l??"Monday",setEnabled:async p=>{p||await f();try{await o(p)}catch(h){console.error("Failed to update enabled state:",h)}},setTime:async p=>{try{await i(p)}catch(h){console.error("Failed to update time:",h)}},setFrequency:async p=>{try{await s(p),p==="daily"&&await u(void 0)}catch(h){console.error("Failed to update frequency:",h)}},setDay:async p=>{var h;if(h=p,ug.includes(h))try{await u(p)}catch(m){console.error("Failed to update day:",m)}else console.error("Invalid day provided")}}}function Bi(t,n){const e=t==="restart"?"_system_scheduleRestart":"_system_scheduleShutdown";return n?`${e}${n}`:e}function fg({className:t,variant:n,...e}){const o=de("io-block-list-gap",n,t),{enabled:r,time:i,frequency:a,day:s,setEnabled:l,setTime:u,setFrequency:f,setDay:d}=Qw(n);return c.jsxs(et,{className:o,...e,children:[c.jsx(vt,{label:`Schedule ${n}`,align:"right",onChange:p=>l(p.target.checked),checked:r}),c.jsxs("div",{className:"scheduler-controls",children:[c.jsxs("div",{className:"io-control-input io-control-leading-icon direction-up",children:[c.jsx(lt,{variant:"clock"}),c.jsx(Jw,{className:"io-input",options:{enableTime:!0,noCalendar:!0,dateFormat:"h:i K",defaultDate:i,clickOpens:!0},value:i,onClose:async([p])=>{const h=p.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!0});await u(h)}})]}),c.jsxs(hn,{text:a.charAt(0).toUpperCase()+a.slice(1),icon:"chevron-down",iconRight:!0,children:[c.jsx(hn.Item,{onClick:()=>f("daily"),children:"Daily"}),c.jsx(hn.Item,{onClick:()=>f("weekly"),children:"Weekly"})]}),a==="weekly"&&c.jsx(hn,{text:s,icon:"chevron-down",iconRight:!0,children:ug.map(p=>c.jsx(hn.Item,{onClick:()=>d(p),children:p},p))})]})]})}function eb({className:t,...n}){return c.jsx(fg,{...n,className:t,variant:"restart"})}function tb({className:t,...n}){return c.jsx(fg,{...n,className:t,variant:"shutdown"})}const pg={Body:Tw,General:Dw,Theme:Fl,PinnedPosition:_w,AllowDocking:Lw,MinimizeToTray:Rw,AutoClose:Fw,ShowTutorialOnStartup:Bw,Layouts:Hw,LayoutsRestoreLastSaved:$w,LayoutsSaveCurrentOnExit:Ww,LayoutsShowUnsavedChangesPrompt:Bl,LayoutsShowDeletePrompt:Hl,Downloads:zw,DownloadsAskForEachDownload:Uw,DownloadsLocation:Vw,System:Yw,SystemRestartSection:eb,SystemShutdownSection:tb},hg=g.createContext(pg),mg=g.memo(({children:t,components:n})=>{const e=g.useMemo(()=>({...pg,...n}),[n]);return c.jsx(hg.Provider,{value:e,children:t})});mg.displayName="PreferencesPanelComponentsStoreProvider";const Nr=()=>g.useContext(hg),gg=({className:t,onClose:n,title:e="Platform Preferences",children:o,...r})=>c.jsxs(qe,{className:de("io-preferences-panel",t),"data-testid":"preferences-panel",...r,children:[c.jsxs(qe.Header,{"data-testid":"preferences-panel-header",children:[c.jsx(qe.Header.Title,{size:"large",text:e,tag:"h1","data-testid":"preferences-panel-title"}),c.jsx(qe.Header.ButtonGroup,{children:c.jsx(qe.Header.ButtonIcon,{variant:"circle",icon:"close",size:"32",onClick:n,"data-testid":"preferences-panel-close-button"})})]}),o]}),nb=({onClose:t,title:n="Platform Preferences",...e})=>{const{Body:o}=Nr();return c.jsx(gg,{title:n,onClose:t,...e,children:c.jsx(o,{})})},ob=({components:t,...n})=>c.jsx(mg,{components:t,children:c.jsx(nb,{...n})}),vg=t=>{const{General:n,Layouts:e}=ns();return c.jsxs(Wo,{element:gr,elementProps:t,children:[c.jsx(n,{}),c.jsx(e,{})]})},yg=({title:t="General",...n})=>{const{Theme:e}=ns();return c.jsx(et,{title:t,"data-testid":"preferences-panel-general-block",...n,children:c.jsx(e,{})})},wg=({title:t="Layouts",...n})=>{const{LayoutsShowDeletePrompt:e}=ns();return c.jsx(et,{title:t,"data-testid":"preferences-panel-layouts-block",...n,children:c.jsx(e,{})})},bg={Body:vg,General:yg,Theme:Fl,Layouts:wg,LayoutsShowUnsavedChangesPrompt:Bl,LayoutsShowDeletePrompt:Hl},xg=g.createContext(bg),Cg=g.memo(({children:t,components:n})=>{const e=g.useMemo(()=>({...bg,...n}),[n]);return c.jsx(xg.Provider,{value:e,children:t})});Cg.displayName="PreferencesPanelComponentsStoreProvider";const ns=()=>g.useContext(xg),rb=({onClose:t,title:n="Platform Preferences",...e})=>{const{Body:o}=ns();return c.jsx(gg,{title:n,onClose:t,...e,children:c.jsx(o,{})})};var ib=Object.freeze({__proto__:null,General:yg,Layouts:wg,LayoutsShowDeletePrompt:Hl,LayoutsShowUnsavedChangesPrompt:Bl,Panel:({components:t,...n})=>c.jsx(Cg,{components:t,children:c.jsx(rb,{...n})}),PanelBody:vg,Theme:Fl});const ab=({name:t,value:n})=>c.jsxs("div",{className:"io-profile-section-item",children:[c.jsx("div",{className:"io-profile-section-item-name",children:t}),c.jsx("div",{className:"io-profile-section-item-value",children:n})]}),Sg=({className:t,items:n,title:e})=>c.jsxs("div",{className:de("io-profile-section-body",t),children:[e&&c.jsx(Nn,{className:"io-profile-section-title",text:e}),n.map(({name:o,value:r})=>c.jsx(ab,{name:o,value:r},o))]}),$l=({className:t,items:n,title:e})=>c.jsxs("section",{className:de("io-profile-section",t),children:[c.jsx(Sg,{items:n,title:e}),c.jsx(gi,{className:"mt-8"})]}),kg=({title:t="License",...n})=>c.jsx($l,{title:t,...n}),Eg=({title:t="Version",...n})=>c.jsx($l,{title:t,...n}),jg=({title:t="Plugins",...n})=>c.jsx($l,{title:t,...n}),Og=({className:t})=>{const n=qa()?"io.Connect Desktop":"io.Connect Browser";return c.jsxs("div",{className:de("io-trademark-container",t),children:[c.jsx("h4",{className:"io-trademark-title",children:n}),c.jsxs("p",{className:"io-trademark-text",children:[n,"® is a registered trademark of"," ",c.jsx("a",{href:"https://www.interop.io",rel:"noreferrer",target:"_blank",children:"Interop Inc©"})," ",new Date().getFullYear(),". All rights reserved."]})]})},Ng=({avatarInitials:t=qa()?"CD":"CB",className:n,items:e,onLogout:o,title:r})=>c.jsxs("section",{className:de("io-profile-section",n),children:[c.jsxs("div",{className:"io-user-details-container",children:[c.jsx("div",{className:"io-user-avatar",children:t}),c.jsx(Sg,{className:"mt-12",items:e,title:r})]}),o&&c.jsx(Je,{className:"io-log-out-button",onClick:o,variant:"primary",icon:"arrow-right-from-bracket",children:"Log out"}),c.jsx(gi,{className:"mt-8"})]}),Ig={LicenseSection:kg,ProductsInfoSection:Eg,PluginsSection:jg,Trademark:Og,UserSection:Ng},Pg=g.createContext(Ig),Ag=g.memo(({children:t,components:n})=>{const e=g.useMemo(()=>({...Ig,...n}),[n]);return c.jsx(Pg.Provider,{value:e,children:t})});Ag.displayName="ProfilePanelComponentsStoreProvider";const sb=t=>{const n=new Date(t);return[{day:"numeric"},{month:"short"},{year:"numeric"}].map(e=>n.toLocaleDateString("en",e)).join(" ")},cb=t=>{if(!t)return{items:[]};const n=[...t.email?[{name:"Email",value:t.email}]:[],...t.type?[{name:"User Type",value:t.type}]:[],...t.role?[{name:"User Role",value:t.role}]:[],{name:"User ID",value:t.id}];if(t.firstName||t.lastName){const e=[t.firstName,t.lastName].filter(o=>!!o);return{avatarInitials:e.map(o=>o.charAt(0)).join(""),items:n,title:e.join(" ")}}return t.username?{avatarInitials:t.username.charAt(0),items:n,title:t.username}:t.email?{avatarInitials:t.email.charAt(0),items:n}:{items:n}},lb=t=>{const n=new Date(2023,5,6),e=t.expiration<n.getTime()?1e3:1;return{items:[{name:"Type",value:t.type},{name:"Expiration Date",value:sb(t.expiration*e)}]}},ub=t=>({items:t.map(n=>({name:n.name,value:n.version}))}),db=t=>{var e;const n={"@interopio/workspaces-ui-react":"Workspaces React Frame","@interopio/workspaces-ui-web-components":"Workspaces Web Components Frame"};return{items:[{name:"io.Connect Browser platform",value:t.platform.apiVersion},{name:"io.Connect Browser client",value:t.client.apiVersion},...t.workspaces?[{name:"Workspaces API",value:t.workspaces.apiVersion}]:[],...(e=t.workspaces)!=null&&e.container&&dg(t.workspaces.container.type,n)?[{name:n[t.workspaces.container.type],value:t.workspaces.container.version}]:[],...t.home?[{name:"Home UI",value:t.home.version}]:[],...t.search?[{name:"Search API",value:t.search.apiVersion}]:[],...t.modals?[{name:"Modals API",value:t.modals.apiVersion}]:[]]}},fb=()=>{const t=window.glue42gd??window.iodesktop;if(!t)throw new Error("both window.glue42gd and window.iodesktop are not available");const{user:n,env:e}=t,o=[{name:"Environment",value:e.env},{name:"Region",value:e.region}];return n?{avatarInitials:n.charAt(0),items:o,title:n}:{items:o}},pb=t=>({items:Object.entries(t??{}).map(([e,o])=>({name:e,value:o}))}),hb=t=>({items:t.map(({product:n,version:e})=>({name:n,value:e}))}),mb=t=>qa()?(async n=>{const{licInfo:e,productInfo:o}=(await n.interop.invoke("T42.GD.GetInfo")).returned;return{user:fb(),license:pb(e),productsInfo:hb(o)}})(t):(async()=>{if(!window.iobrowser)throw new Error("window.iobrowser is not available");const n=await window.iobrowser.system.getProfileData();return{user:cb(n.user),license:lb(n.license),plugins:ub(n.plugins),productsInfo:db(n.productsInfo)}})(),gb=({className:t,onClose:n,onLogout:e,title:o="Profile",...r})=>{var h;const{LicenseSection:i,ProductsInfoSection:a,PluginsSection:s,Trademark:l,UserSection:u}=g.useContext(Pg),f=g.useContext(_e.IOConnectContext),[d,p]=g.useState(null);return g.useEffect(()=>{f&&(async()=>{const m=await mb(f);p(m)})().catch(console.error)},[f]),c.jsxs(qe,{className:de("io-profile-panel",t),"data-testid":"profile-panel",...r,children:[c.jsxs(qe.Header,{children:[c.jsx(qe.Header.Title,{size:"large",text:o}),c.jsx(qe.Header.ButtonGroup,{children:c.jsx(qe.Header.ButtonIcon,{variant:"circle",icon:"close",size:"32",onClick:n})})]}),c.jsxs(Wo,{element:qe.Body,children:[d!=null&&d.user.items.length||d!=null&&d.user.title?c.jsx(u,{avatarInitials:d.user.avatarInitials,items:d.user.items,onLogout:e,title:d.user.title}):null,c.jsxs("div",{className:"io-profile-sections-container",children:[d!=null&&d.license.items.length?c.jsx(i,{items:d.license.items}):null,d!=null&&d.productsInfo.items.length?c.jsx(a,{items:d.productsInfo.items}):null,(h=d==null?void 0:d.plugins)!=null&&h.items.length?c.jsx(s,{items:d.plugins.items}):null]}),c.jsx(l,{className:"mt-auto"})]})]})},Tg=({components:t,...n})=>c.jsx(Ag,{components:t,children:c.jsx(gb,{...n})});var vb=Object.freeze({__proto__:null,LicenseSection:kg,Panel:Tg,PluginsSection:jg,ProductsInfoSection:Eg,Trademark:Og,UserSection:Ng});const Dg=g.createContext(void 0),Md=()=>{const t=g.useContext(Dg);if(!t)throw new Error("usePanelManagerContext must be used within a PanelManagerContext.Provider");return t},yb=document.querySelector("#root")??document.body,wb={preferences:ob,"notification-settings":Ml,profile:Tg};var bb=Object.freeze({__proto__:null,ActivePanelRenderer:()=>{const{panel:t,deselectPanel:n}=Md();tc(()=>{t&&n()},["Escape"]);const e=t?wb[t]:null;return e?oo.createPortal(c.jsx("div",{className:"io-panel-overlay",children:c.jsx(e,{onClose:n})}),yb):null},PanelManagerProvider:({children:t})=>{const[n,e]=g.useState(null),o=g.useCallback(a=>{e(a)},[]),r=g.useCallback(()=>{e(null)},[]),i=g.useMemo(()=>({panel:n,selectPanel:o,deselectPanel:r}),[n,o,r]);return c.jsx(Dg.Provider,{value:i,children:t})},usePanelManagerContext:Md});const xb=ib,Xr=t=>"items"in t,jt={APPLICATION:"application",WORKSPACE:"workspace",LAYOUT:"layout",ACTION_BUTTON:"action-button"},Hc=t=>typeof t=="string"?t:t!=null&&t.message?typeof t.message=="string"?t.message:JSON.stringify(t.message):JSON.stringify(t),Mg=()=>typeof window.glue42gd<"u"||typeof window.glue42alert<"u"||typeof window.glue42dialog<"u"||typeof window.iodesktop<"u",Ca={OPEN_IN_NEW_WINDOW:"openInNewWindow",OPEN_IN_NEW_WORKSPACE:"openInNewWorkspace"},_g=Mg()?[]:[{name:Ca.OPEN_IN_NEW_WINDOW,displayName:"Open in a new window",icon:"pop-out"},{name:Ca.OPEN_IN_NEW_WORKSPACE,displayName:"Open in a new Workspace",icon:"pop-out"}],Sa={OPEN_IN_NEW_WINDOW:"openInNewWindow",DELETE:"delete"},Lg=[{name:Sa.OPEN_IN_NEW_WINDOW,displayName:"Open in a new window",icon:"pop-out",separatorAfter:!0},{name:Sa.DELETE,displayName:"Delete",icon:"trash-can"}],ui={ASCENDING:"ascending",DESCENDING:"descending",DISABLED:"disabled"},os=new Intl.Collator(void 0,{sensitivity:"base"}),Rg=(t,n)=>os.compare(t.title,n.title),Fg=(t,n)=>os.compare(n.title,t.title),Wl=t=>{const{items:n,sortOrder:e,ascendingCompare:o,descendingCompare:r}=t;if(e===ui.DISABLED)return n;const i=e===ui.ASCENDING?o:r;return[...n].sort(i)},pr={FAVORITES:"favorites-section",WORKSPACES:"workspaces-section",APPLICATIONS:"applications-section"},$c=(t,n,e,o)=>{const{isFolderCollapsible:r}=o,i="/",[a,...s]=e.split(i),l=t.findIndex(f=>Xr(f)&&f.title===a),u=l!==-1?t[l]:null;return u?[...t.slice(0,l),{...u,items:s.length>0?$c(u.items,n,s.join(i),o):[...u.items,n]},...t.slice(l+1)]:[...t,{id:a,title:a,items:s.length>0?$c([],n,s.join(i),o):[n],isCollapsible:r}]},ka=t=>{const{title:n,userProperties:e}=t,{folder:o}=e;return o?`${o}/${n}`:n},Cb=(t,n)=>os.compare(ka(t),ka(n)),Sb=(t,n)=>os.compare(ka(n),ka(t)),kb=(t,n,e)=>{const{isSectionCollapsible:o,sortOrder:r=ui.ASCENDING}=e,a=Wl({items:t,sortOrder:r,ascendingCompare:Cb,descendingCompare:Sb}).reduce((s,l)=>{var d;const u={id:l.id,title:l.title,description:l.caption,type:jt.APPLICATION,icon:"application",iconSrc:l.icon,openInstances:(d=n[l.name])==null?void 0:d.length,contextMenuActions:_g},f=l.userProperties.folder;return f?$c(s,u,f,e):[...s,u]},[]);return{id:pr.APPLICATIONS,title:"Apps",items:a,isCollapsible:o}};var Eb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Wc={exports:{}},Hi={exports:{}},Ue={};/** @license React v16.13.1
21
21
  * react-is.production.min.js
22
22
  *
23
23
  * Copyright (c) Facebook, Inc. and its affiliates.
24
24
  *
25
25
  * This source code is licensed under the MIT license found in the
26
26
  * LICENSE file in the root directory of this source tree.
27
- */var Td;function Cw(){if(Td)return Ue;Td=1;var t=typeof Symbol=="function"&&Symbol.for,n=t?Symbol.for("react.element"):60103,e=t?Symbol.for("react.portal"):60106,o=t?Symbol.for("react.fragment"):60107,r=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,a=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,d=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,m=t?Symbol.for("react.lazy"):60116,v=t?Symbol.for("react.block"):60121,y=t?Symbol.for("react.fundamental"):60117,w=t?Symbol.for("react.responder"):60118,k=t?Symbol.for("react.scope"):60119;function x(E){if(typeof E=="object"&&E!==null){var j=E.$$typeof;switch(j){case n:switch(E=E.type,E){case l:case u:case o:case i:case r:case d:return E;default:switch(E=E&&E.$$typeof,E){case s:case f:case m:case h:case a:return E;default:return j}}case e:return j}}}function b(E){return x(E)===u}return Ue.AsyncMode=l,Ue.ConcurrentMode=u,Ue.ContextConsumer=s,Ue.ContextProvider=a,Ue.Element=n,Ue.ForwardRef=f,Ue.Fragment=o,Ue.Lazy=m,Ue.Memo=h,Ue.Portal=e,Ue.Profiler=i,Ue.StrictMode=r,Ue.Suspense=d,Ue.isAsyncMode=function(E){return b(E)||x(E)===l},Ue.isConcurrentMode=b,Ue.isContextConsumer=function(E){return x(E)===s},Ue.isContextProvider=function(E){return x(E)===a},Ue.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===n},Ue.isForwardRef=function(E){return x(E)===f},Ue.isFragment=function(E){return x(E)===o},Ue.isLazy=function(E){return x(E)===m},Ue.isMemo=function(E){return x(E)===h},Ue.isPortal=function(E){return x(E)===e},Ue.isProfiler=function(E){return x(E)===i},Ue.isStrictMode=function(E){return x(E)===r},Ue.isSuspense=function(E){return x(E)===d},Ue.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===o||E===u||E===i||E===r||E===d||E===p||typeof E=="object"&&E!==null&&(E.$$typeof===m||E.$$typeof===h||E.$$typeof===a||E.$$typeof===s||E.$$typeof===f||E.$$typeof===y||E.$$typeof===w||E.$$typeof===k||E.$$typeof===v)},Ue.typeOf=x,Ue}var Ve={};/** @license React v16.13.1
27
+ */var _d;function jb(){if(_d)return Ue;_d=1;var t=typeof Symbol=="function"&&Symbol.for,n=t?Symbol.for("react.element"):60103,e=t?Symbol.for("react.portal"):60106,o=t?Symbol.for("react.fragment"):60107,r=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,a=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,d=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,m=t?Symbol.for("react.lazy"):60116,v=t?Symbol.for("react.block"):60121,y=t?Symbol.for("react.fundamental"):60117,x=t?Symbol.for("react.responder"):60118,S=t?Symbol.for("react.scope"):60119;function b(E){if(typeof E=="object"&&E!==null){var j=E.$$typeof;switch(j){case n:switch(E=E.type,E){case l:case u:case o:case i:case r:case d:return E;default:switch(E=E&&E.$$typeof,E){case s:case f:case m:case h:case a:return E;default:return j}}case e:return j}}}function w(E){return b(E)===u}return Ue.AsyncMode=l,Ue.ConcurrentMode=u,Ue.ContextConsumer=s,Ue.ContextProvider=a,Ue.Element=n,Ue.ForwardRef=f,Ue.Fragment=o,Ue.Lazy=m,Ue.Memo=h,Ue.Portal=e,Ue.Profiler=i,Ue.StrictMode=r,Ue.Suspense=d,Ue.isAsyncMode=function(E){return w(E)||b(E)===l},Ue.isConcurrentMode=w,Ue.isContextConsumer=function(E){return b(E)===s},Ue.isContextProvider=function(E){return b(E)===a},Ue.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===n},Ue.isForwardRef=function(E){return b(E)===f},Ue.isFragment=function(E){return b(E)===o},Ue.isLazy=function(E){return b(E)===m},Ue.isMemo=function(E){return b(E)===h},Ue.isPortal=function(E){return b(E)===e},Ue.isProfiler=function(E){return b(E)===i},Ue.isStrictMode=function(E){return b(E)===r},Ue.isSuspense=function(E){return b(E)===d},Ue.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===o||E===u||E===i||E===r||E===d||E===p||typeof E=="object"&&E!==null&&(E.$$typeof===m||E.$$typeof===h||E.$$typeof===a||E.$$typeof===s||E.$$typeof===f||E.$$typeof===y||E.$$typeof===x||E.$$typeof===S||E.$$typeof===v)},Ue.typeOf=b,Ue}var Ve={};/** @license React v16.13.1
28
28
  * react-is.development.js
29
29
  *
30
30
  * Copyright (c) Facebook, Inc. and its affiliates.
31
31
  *
32
32
  * This source code is licensed under the MIT license found in the
33
33
  * LICENSE file in the root directory of this source tree.
34
- */var Dd;function Sw(){return Dd||(Dd=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,n=t?Symbol.for("react.element"):60103,e=t?Symbol.for("react.portal"):60106,o=t?Symbol.for("react.fragment"):60107,r=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,a=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,d=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,m=t?Symbol.for("react.lazy"):60116,v=t?Symbol.for("react.block"):60121,y=t?Symbol.for("react.fundamental"):60117,w=t?Symbol.for("react.responder"):60118,k=t?Symbol.for("react.scope"):60119;function x(A){return typeof A=="string"||typeof A=="function"||A===o||A===u||A===i||A===r||A===d||A===p||typeof A=="object"&&A!==null&&(A.$$typeof===m||A.$$typeof===h||A.$$typeof===a||A.$$typeof===s||A.$$typeof===f||A.$$typeof===y||A.$$typeof===w||A.$$typeof===k||A.$$typeof===v)}function b(A){if(typeof A=="object"&&A!==null){var me=A.$$typeof;switch(me){case n:var we=A.type;switch(we){case l:case u:case o:case i:case r:case d:return we;default:var Ie=we&&we.$$typeof;switch(Ie){case s:case f:case m:case h:case a:return Ie;default:return me}}case e:return me}}}var E=l,j=u,B=s,F=a,L=n,D=f,T=o,P=m,re=h,ae=e,z=i,ee=r,q=d,ie=!1;function J(A){return ie||(ie=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),W(A)||b(A)===l}function W(A){return b(A)===u}function Q(A){return b(A)===s}function Y(A){return b(A)===a}function H(A){return typeof A=="object"&&A!==null&&A.$$typeof===n}function M(A){return b(A)===f}function O(A){return b(A)===o}function I(A){return b(A)===m}function R(A){return b(A)===h}function U(A){return b(A)===e}function V(A){return b(A)===i}function se(A){return b(A)===r}function Z(A){return b(A)===d}Ve.AsyncMode=E,Ve.ConcurrentMode=j,Ve.ContextConsumer=B,Ve.ContextProvider=F,Ve.Element=L,Ve.ForwardRef=D,Ve.Fragment=T,Ve.Lazy=P,Ve.Memo=re,Ve.Portal=ae,Ve.Profiler=z,Ve.StrictMode=ee,Ve.Suspense=q,Ve.isAsyncMode=J,Ve.isConcurrentMode=W,Ve.isContextConsumer=Q,Ve.isContextProvider=Y,Ve.isElement=H,Ve.isForwardRef=M,Ve.isFragment=O,Ve.isLazy=I,Ve.isMemo=R,Ve.isPortal=U,Ve.isProfiler=V,Ve.isStrictMode=se,Ve.isSuspense=Z,Ve.isValidElementType=x,Ve.typeOf=b}()),Ve}var Md;function _g(){return Md||(Md=1,process.env.NODE_ENV==="production"?Ri.exports=Cw():Ri.exports=Sw()),Ri.exports}/*
34
+ */var Ld;function Ob(){return Ld||(Ld=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,n=t?Symbol.for("react.element"):60103,e=t?Symbol.for("react.portal"):60106,o=t?Symbol.for("react.fragment"):60107,r=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,a=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,d=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,m=t?Symbol.for("react.lazy"):60116,v=t?Symbol.for("react.block"):60121,y=t?Symbol.for("react.fundamental"):60117,x=t?Symbol.for("react.responder"):60118,S=t?Symbol.for("react.scope"):60119;function b(T){return typeof T=="string"||typeof T=="function"||T===o||T===u||T===i||T===r||T===d||T===p||typeof T=="object"&&T!==null&&(T.$$typeof===m||T.$$typeof===h||T.$$typeof===a||T.$$typeof===s||T.$$typeof===f||T.$$typeof===y||T.$$typeof===x||T.$$typeof===S||T.$$typeof===v)}function w(T){if(typeof T=="object"&&T!==null){var me=T.$$typeof;switch(me){case n:var be=T.type;switch(be){case l:case u:case o:case i:case r:case d:return be;default:var Ie=be&&be.$$typeof;switch(Ie){case s:case f:case m:case h:case a:return Ie;default:return me}}case e:return me}}}var E=l,j=u,_=s,M=a,F=n,D=f,A=o,P=m,re=h,ae=e,z=i,ee=r,q=d,ie=!1;function J(T){return ie||(ie=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),W(T)||w(T)===l}function W(T){return w(T)===u}function Q(T){return w(T)===s}function Y(T){return w(T)===a}function H(T){return typeof T=="object"&&T!==null&&T.$$typeof===n}function L(T){return w(T)===f}function O(T){return w(T)===o}function I(T){return w(T)===m}function B(T){return w(T)===h}function U(T){return w(T)===e}function V(T){return w(T)===i}function se(T){return w(T)===r}function Z(T){return w(T)===d}Ve.AsyncMode=E,Ve.ConcurrentMode=j,Ve.ContextConsumer=_,Ve.ContextProvider=M,Ve.Element=F,Ve.ForwardRef=D,Ve.Fragment=A,Ve.Lazy=P,Ve.Memo=re,Ve.Portal=ae,Ve.Profiler=z,Ve.StrictMode=ee,Ve.Suspense=q,Ve.isAsyncMode=J,Ve.isConcurrentMode=W,Ve.isContextConsumer=Q,Ve.isContextProvider=Y,Ve.isElement=H,Ve.isForwardRef=L,Ve.isFragment=O,Ve.isLazy=I,Ve.isMemo=B,Ve.isPortal=U,Ve.isProfiler=V,Ve.isStrictMode=se,Ve.isSuspense=Z,Ve.isValidElementType=b,Ve.typeOf=w}()),Ve}var Rd;function Bg(){return Rd||(Rd=1,process.env.NODE_ENV==="production"?Hi.exports=jb():Hi.exports=Ob()),Hi.exports}/*
35
35
  object-assign
36
36
  (c) Sindre Sorhus
37
37
  @license MIT
38
- */var Hs,_d;function kw(){if(_d)return Hs;_d=1;var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,e=Object.prototype.propertyIsEnumerable;function o(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function r(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(a).map(function(f){return a[f]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(f){u[f]=f}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Hs=r()?Object.assign:function(i,a){for(var s,l=o(i),u,f=1;f<arguments.length;f++){s=Object(arguments[f]);for(var d in s)n.call(s,d)&&(l[d]=s[d]);if(t){u=t(s);for(var p=0;p<u.length;p++)e.call(s,u[p])&&(l[u[p]]=s[u[p]])}}return l},Hs}var $s,Ld;function Hl(){if(Ld)return $s;Ld=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return $s=t,$s}var Ws,Rd;function Lg(){return Rd||(Rd=1,Ws=Function.call.bind(Object.prototype.hasOwnProperty)),Ws}var zs,Fd;function Ew(){if(Fd)return zs;Fd=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var n=Hl(),e={},o=Lg();t=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function r(i,a,s,l,u){if(process.env.NODE_ENV!=="production"){for(var f in i)if(o(i,f)){var d;try{if(typeof i[f]!="function"){var p=Error((l||"React class")+": "+s+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}d=i[f](a,f,l,s,null,n)}catch(m){d=m}if(d&&!(d instanceof Error)&&t((l||"React class")+": type specification of "+s+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in e)){e[d.message]=!0;var h=u?u():"";t("Failed "+s+" type: "+d.message+(h??""))}}}}return r.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(e={})},zs=r,zs}var Us,Bd;function jw(){if(Bd)return Us;Bd=1;var t=_g(),n=kw(),e=Hl(),o=Lg(),r=Ew(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return Us=function(s,l){var u=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function d(W){var Q=W&&(u&&W[u]||W[f]);if(typeof Q=="function")return Q}var p="<<anonymous>>",h={array:w("array"),bigint:w("bigint"),bool:w("boolean"),func:w("function"),number:w("number"),object:w("object"),string:w("string"),symbol:w("symbol"),any:k(),arrayOf:x,element:b(),elementType:E(),instanceOf:j,node:D(),objectOf:F,oneOf:B,oneOfType:L,shape:P,exact:re};function m(W,Q){return W===Q?W!==0||1/W===1/Q:W!==W&&Q!==Q}function v(W,Q){this.message=W,this.data=Q&&typeof Q=="object"?Q:{},this.stack=""}v.prototype=Error.prototype;function y(W){if(process.env.NODE_ENV!=="production")var Q={},Y=0;function H(O,I,R,U,V,se,Z){if(U=U||p,se=se||R,Z!==e){if(l){var A=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw A.name="Invariant Violation",A}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var me=U+":"+R;!Q[me]&&Y<3&&(i("You are manually calling a React.PropTypes validation function for the `"+se+"` prop on `"+U+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),Q[me]=!0,Y++)}}return I[R]==null?O?I[R]===null?new v("The "+V+" `"+se+"` is marked as required "+("in `"+U+"`, but its value is `null`.")):new v("The "+V+" `"+se+"` is marked as required in "+("`"+U+"`, but its value is `undefined`.")):null:W(I,R,U,V,se)}var M=H.bind(null,!1);return M.isRequired=H.bind(null,!0),M}function w(W){function Q(Y,H,M,O,I,R){var U=Y[H],V=ee(U);if(V!==W){var se=q(U);return new v("Invalid "+O+" `"+I+"` of type "+("`"+se+"` supplied to `"+M+"`, expected ")+("`"+W+"`."),{expectedType:W})}return null}return y(Q)}function k(){return y(a)}function x(W){function Q(Y,H,M,O,I){if(typeof W!="function")return new v("Property `"+I+"` of component `"+M+"` has invalid PropType notation inside arrayOf.");var R=Y[H];if(!Array.isArray(R)){var U=ee(R);return new v("Invalid "+O+" `"+I+"` of type "+("`"+U+"` supplied to `"+M+"`, expected an array."))}for(var V=0;V<R.length;V++){var se=W(R,V,M,O,I+"["+V+"]",e);if(se instanceof Error)return se}return null}return y(Q)}function b(){function W(Q,Y,H,M,O){var I=Q[Y];if(!s(I)){var R=ee(I);return new v("Invalid "+M+" `"+O+"` of type "+("`"+R+"` supplied to `"+H+"`, expected a single ReactElement."))}return null}return y(W)}function E(){function W(Q,Y,H,M,O){var I=Q[Y];if(!t.isValidElementType(I)){var R=ee(I);return new v("Invalid "+M+" `"+O+"` of type "+("`"+R+"` supplied to `"+H+"`, expected a single ReactElement type."))}return null}return y(W)}function j(W){function Q(Y,H,M,O,I){if(!(Y[H]instanceof W)){var R=W.name||p,U=J(Y[H]);return new v("Invalid "+O+" `"+I+"` of type "+("`"+U+"` supplied to `"+M+"`, expected ")+("instance of `"+R+"`."))}return null}return y(Q)}function B(W){if(!Array.isArray(W))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function Q(Y,H,M,O,I){for(var R=Y[H],U=0;U<W.length;U++)if(m(R,W[U]))return null;var V=JSON.stringify(W,function(Z,A){var me=q(A);return me==="symbol"?String(A):A});return new v("Invalid "+O+" `"+I+"` of value `"+String(R)+"` "+("supplied to `"+M+"`, expected one of "+V+"."))}return y(Q)}function F(W){function Q(Y,H,M,O,I){if(typeof W!="function")return new v("Property `"+I+"` of component `"+M+"` has invalid PropType notation inside objectOf.");var R=Y[H],U=ee(R);if(U!=="object")return new v("Invalid "+O+" `"+I+"` of type "+("`"+U+"` supplied to `"+M+"`, expected an object."));for(var V in R)if(o(R,V)){var se=W(R,V,M,O,I+"."+V,e);if(se instanceof Error)return se}return null}return y(Q)}function L(W){if(!Array.isArray(W))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var Q=0;Q<W.length;Q++){var Y=W[Q];if(typeof Y!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ie(Y)+" at index "+Q+"."),a}function H(M,O,I,R,U){for(var V=[],se=0;se<W.length;se++){var Z=W[se],A=Z(M,O,I,R,U,e);if(A==null)return null;A.data&&o(A.data,"expectedType")&&V.push(A.data.expectedType)}var me=V.length>0?", expected one of type ["+V.join(", ")+"]":"";return new v("Invalid "+R+" `"+U+"` supplied to "+("`"+I+"`"+me+"."))}return y(H)}function D(){function W(Q,Y,H,M,O){return ae(Q[Y])?null:new v("Invalid "+M+" `"+O+"` supplied to "+("`"+H+"`, expected a ReactNode."))}return y(W)}function T(W,Q,Y,H,M){return new v((W||"React class")+": "+Q+" type `"+Y+"."+H+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+M+"`.")}function P(W){function Q(Y,H,M,O,I){var R=Y[H],U=ee(R);if(U!=="object")return new v("Invalid "+O+" `"+I+"` of type `"+U+"` "+("supplied to `"+M+"`, expected `object`."));for(var V in W){var se=W[V];if(typeof se!="function")return T(M,O,I,V,q(se));var Z=se(R,V,M,O,I+"."+V,e);if(Z)return Z}return null}return y(Q)}function re(W){function Q(Y,H,M,O,I){var R=Y[H],U=ee(R);if(U!=="object")return new v("Invalid "+O+" `"+I+"` of type `"+U+"` "+("supplied to `"+M+"`, expected `object`."));var V=n({},Y[H],W);for(var se in V){var Z=W[se];if(o(W,se)&&typeof Z!="function")return T(M,O,I,se,q(Z));if(!Z)return new v("Invalid "+O+" `"+I+"` key `"+se+"` supplied to `"+M+"`.\nBad object: "+JSON.stringify(Y[H],null," ")+`
39
- Valid keys: `+JSON.stringify(Object.keys(W),null," "));var A=Z(R,se,M,O,I+"."+se,e);if(A)return A}return null}return y(Q)}function ae(W){switch(typeof W){case"number":case"string":case"undefined":return!0;case"boolean":return!W;case"object":if(Array.isArray(W))return W.every(ae);if(W===null||s(W))return!0;var Q=d(W);if(Q){var Y=Q.call(W),H;if(Q!==W.entries){for(;!(H=Y.next()).done;)if(!ae(H.value))return!1}else for(;!(H=Y.next()).done;){var M=H.value;if(M&&!ae(M[1]))return!1}}else return!1;return!0;default:return!1}}function z(W,Q){return W==="symbol"?!0:Q?Q["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Q instanceof Symbol:!1}function ee(W){var Q=typeof W;return Array.isArray(W)?"array":W instanceof RegExp?"object":z(Q,W)?"symbol":Q}function q(W){if(typeof W>"u"||W===null)return""+W;var Q=ee(W);if(Q==="object"){if(W instanceof Date)return"date";if(W instanceof RegExp)return"regexp"}return Q}function ie(W){var Q=q(W);switch(Q){case"array":case"object":return"an "+Q;case"boolean":case"date":case"regexp":return"a "+Q;default:return Q}}function J(W){return!W.constructor||!W.constructor.name?p:W.constructor.name}return h.checkPropTypes=r,h.resetWarningCache=r.resetWarningCache,h.PropTypes=h,h},Us}var Vs,Hd;function Ow(){if(Hd)return Vs;Hd=1;var t=Hl();function n(){}function e(){}return e.resetWarningCache=n,Vs=function(){function o(a,s,l,u,f,d){if(d!==t){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}o.isRequired=o;function r(){return o}var i={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:r,element:o,elementType:o,instanceOf:r,node:o,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:e,resetWarningCache:n};return i.PropTypes=i,i},Vs}if(process.env.NODE_ENV!=="production"){var Nw=_g(),Iw=!0;Bc.exports=jw()(Nw.isElement,Iw)}else Bc.exports=Ow()();var Pw=Bc.exports;const fe=ts(Pw);var Rg={exports:{}};/*!
38
+ */var zs,Fd;function Nb(){if(Fd)return zs;Fd=1;var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,e=Object.prototype.propertyIsEnumerable;function o(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function r(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(a).map(function(f){return a[f]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(f){u[f]=f}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return zs=r()?Object.assign:function(i,a){for(var s,l=o(i),u,f=1;f<arguments.length;f++){s=Object(arguments[f]);for(var d in s)n.call(s,d)&&(l[d]=s[d]);if(t){u=t(s);for(var p=0;p<u.length;p++)e.call(s,u[p])&&(l[u[p]]=s[u[p]])}}return l},zs}var Us,Bd;function zl(){if(Bd)return Us;Bd=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Us=t,Us}var Vs,Hd;function Hg(){return Hd||(Hd=1,Vs=Function.call.bind(Object.prototype.hasOwnProperty)),Vs}var Ys,$d;function Ib(){if($d)return Ys;$d=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var n=zl(),e={},o=Hg();t=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function r(i,a,s,l,u){if(process.env.NODE_ENV!=="production"){for(var f in i)if(o(i,f)){var d;try{if(typeof i[f]!="function"){var p=Error((l||"React class")+": "+s+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}d=i[f](a,f,l,s,null,n)}catch(m){d=m}if(d&&!(d instanceof Error)&&t((l||"React class")+": type specification of "+s+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in e)){e[d.message]=!0;var h=u?u():"";t("Failed "+s+" type: "+d.message+(h??""))}}}}return r.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(e={})},Ys=r,Ys}var Gs,Wd;function Pb(){if(Wd)return Gs;Wd=1;var t=Bg(),n=Nb(),e=zl(),o=Hg(),r=Ib(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return Gs=function(s,l){var u=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function d(W){var Q=W&&(u&&W[u]||W[f]);if(typeof Q=="function")return Q}var p="<<anonymous>>",h={array:x("array"),bigint:x("bigint"),bool:x("boolean"),func:x("function"),number:x("number"),object:x("object"),string:x("string"),symbol:x("symbol"),any:S(),arrayOf:b,element:w(),elementType:E(),instanceOf:j,node:D(),objectOf:M,oneOf:_,oneOfType:F,shape:P,exact:re};function m(W,Q){return W===Q?W!==0||1/W===1/Q:W!==W&&Q!==Q}function v(W,Q){this.message=W,this.data=Q&&typeof Q=="object"?Q:{},this.stack=""}v.prototype=Error.prototype;function y(W){if(process.env.NODE_ENV!=="production")var Q={},Y=0;function H(O,I,B,U,V,se,Z){if(U=U||p,se=se||B,Z!==e){if(l){var T=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw T.name="Invariant Violation",T}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var me=U+":"+B;!Q[me]&&Y<3&&(i("You are manually calling a React.PropTypes validation function for the `"+se+"` prop on `"+U+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),Q[me]=!0,Y++)}}return I[B]==null?O?I[B]===null?new v("The "+V+" `"+se+"` is marked as required "+("in `"+U+"`, but its value is `null`.")):new v("The "+V+" `"+se+"` is marked as required in "+("`"+U+"`, but its value is `undefined`.")):null:W(I,B,U,V,se)}var L=H.bind(null,!1);return L.isRequired=H.bind(null,!0),L}function x(W){function Q(Y,H,L,O,I,B){var U=Y[H],V=ee(U);if(V!==W){var se=q(U);return new v("Invalid "+O+" `"+I+"` of type "+("`"+se+"` supplied to `"+L+"`, expected ")+("`"+W+"`."),{expectedType:W})}return null}return y(Q)}function S(){return y(a)}function b(W){function Q(Y,H,L,O,I){if(typeof W!="function")return new v("Property `"+I+"` of component `"+L+"` has invalid PropType notation inside arrayOf.");var B=Y[H];if(!Array.isArray(B)){var U=ee(B);return new v("Invalid "+O+" `"+I+"` of type "+("`"+U+"` supplied to `"+L+"`, expected an array."))}for(var V=0;V<B.length;V++){var se=W(B,V,L,O,I+"["+V+"]",e);if(se instanceof Error)return se}return null}return y(Q)}function w(){function W(Q,Y,H,L,O){var I=Q[Y];if(!s(I)){var B=ee(I);return new v("Invalid "+L+" `"+O+"` of type "+("`"+B+"` supplied to `"+H+"`, expected a single ReactElement."))}return null}return y(W)}function E(){function W(Q,Y,H,L,O){var I=Q[Y];if(!t.isValidElementType(I)){var B=ee(I);return new v("Invalid "+L+" `"+O+"` of type "+("`"+B+"` supplied to `"+H+"`, expected a single ReactElement type."))}return null}return y(W)}function j(W){function Q(Y,H,L,O,I){if(!(Y[H]instanceof W)){var B=W.name||p,U=J(Y[H]);return new v("Invalid "+O+" `"+I+"` of type "+("`"+U+"` supplied to `"+L+"`, expected ")+("instance of `"+B+"`."))}return null}return y(Q)}function _(W){if(!Array.isArray(W))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function Q(Y,H,L,O,I){for(var B=Y[H],U=0;U<W.length;U++)if(m(B,W[U]))return null;var V=JSON.stringify(W,function(Z,T){var me=q(T);return me==="symbol"?String(T):T});return new v("Invalid "+O+" `"+I+"` of value `"+String(B)+"` "+("supplied to `"+L+"`, expected one of "+V+"."))}return y(Q)}function M(W){function Q(Y,H,L,O,I){if(typeof W!="function")return new v("Property `"+I+"` of component `"+L+"` has invalid PropType notation inside objectOf.");var B=Y[H],U=ee(B);if(U!=="object")return new v("Invalid "+O+" `"+I+"` of type "+("`"+U+"` supplied to `"+L+"`, expected an object."));for(var V in B)if(o(B,V)){var se=W(B,V,L,O,I+"."+V,e);if(se instanceof Error)return se}return null}return y(Q)}function F(W){if(!Array.isArray(W))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var Q=0;Q<W.length;Q++){var Y=W[Q];if(typeof Y!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ie(Y)+" at index "+Q+"."),a}function H(L,O,I,B,U){for(var V=[],se=0;se<W.length;se++){var Z=W[se],T=Z(L,O,I,B,U,e);if(T==null)return null;T.data&&o(T.data,"expectedType")&&V.push(T.data.expectedType)}var me=V.length>0?", expected one of type ["+V.join(", ")+"]":"";return new v("Invalid "+B+" `"+U+"` supplied to "+("`"+I+"`"+me+"."))}return y(H)}function D(){function W(Q,Y,H,L,O){return ae(Q[Y])?null:new v("Invalid "+L+" `"+O+"` supplied to "+("`"+H+"`, expected a ReactNode."))}return y(W)}function A(W,Q,Y,H,L){return new v((W||"React class")+": "+Q+" type `"+Y+"."+H+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+L+"`.")}function P(W){function Q(Y,H,L,O,I){var B=Y[H],U=ee(B);if(U!=="object")return new v("Invalid "+O+" `"+I+"` of type `"+U+"` "+("supplied to `"+L+"`, expected `object`."));for(var V in W){var se=W[V];if(typeof se!="function")return A(L,O,I,V,q(se));var Z=se(B,V,L,O,I+"."+V,e);if(Z)return Z}return null}return y(Q)}function re(W){function Q(Y,H,L,O,I){var B=Y[H],U=ee(B);if(U!=="object")return new v("Invalid "+O+" `"+I+"` of type `"+U+"` "+("supplied to `"+L+"`, expected `object`."));var V=n({},Y[H],W);for(var se in V){var Z=W[se];if(o(W,se)&&typeof Z!="function")return A(L,O,I,se,q(Z));if(!Z)return new v("Invalid "+O+" `"+I+"` key `"+se+"` supplied to `"+L+"`.\nBad object: "+JSON.stringify(Y[H],null," ")+`
39
+ Valid keys: `+JSON.stringify(Object.keys(W),null," "));var T=Z(B,se,L,O,I+"."+se,e);if(T)return T}return null}return y(Q)}function ae(W){switch(typeof W){case"number":case"string":case"undefined":return!0;case"boolean":return!W;case"object":if(Array.isArray(W))return W.every(ae);if(W===null||s(W))return!0;var Q=d(W);if(Q){var Y=Q.call(W),H;if(Q!==W.entries){for(;!(H=Y.next()).done;)if(!ae(H.value))return!1}else for(;!(H=Y.next()).done;){var L=H.value;if(L&&!ae(L[1]))return!1}}else return!1;return!0;default:return!1}}function z(W,Q){return W==="symbol"?!0:Q?Q["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Q instanceof Symbol:!1}function ee(W){var Q=typeof W;return Array.isArray(W)?"array":W instanceof RegExp?"object":z(Q,W)?"symbol":Q}function q(W){if(typeof W>"u"||W===null)return""+W;var Q=ee(W);if(Q==="object"){if(W instanceof Date)return"date";if(W instanceof RegExp)return"regexp"}return Q}function ie(W){var Q=q(W);switch(Q){case"array":case"object":return"an "+Q;case"boolean":case"date":case"regexp":return"a "+Q;default:return Q}}function J(W){return!W.constructor||!W.constructor.name?p:W.constructor.name}return h.checkPropTypes=r,h.resetWarningCache=r.resetWarningCache,h.PropTypes=h,h},Gs}var Ks,zd;function Ab(){if(zd)return Ks;zd=1;var t=zl();function n(){}function e(){}return e.resetWarningCache=n,Ks=function(){function o(a,s,l,u,f,d){if(d!==t){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}o.isRequired=o;function r(){return o}var i={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:r,element:o,elementType:o,instanceOf:r,node:o,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:e,resetWarningCache:n};return i.PropTypes=i,i},Ks}if(process.env.NODE_ENV!=="production"){var Tb=Bg(),Db=!0;Wc.exports=Pb()(Tb.isElement,Db)}else Wc.exports=Ab()();var Mb=Wc.exports;const fe=rs(Mb);var $g={exports:{}};/*!
40
40
  Copyright (c) 2018 Jed Watson.
41
41
  Licensed under the MIT License (MIT), see
42
42
  http://jedwatson.github.io/classnames
43
- */(function(t){(function(){var n={}.hasOwnProperty;function e(){for(var i="",a=0;a<arguments.length;a++){var s=arguments[a];s&&(i=r(i,o(s)))}return i}function o(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return e.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var a="";for(var s in i)n.call(i,s)&&i[s]&&(a=r(a,s));return a}function r(i,a){return a?i?i+" "+a:i+a:i}t.exports?(e.default=e,t.exports=e):window.classNames=e})()})(Rg);var Aw=Rg.exports;const it=ts(Aw);function Hc(t){"@babel/helpers - typeof";return Hc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Hc(t)}var Tw;function ns(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Tw;return n?t.split(" ").map(function(e){return n[e]||e}).join(" "):t}function Dw(t,n){var e={};return Object.keys(t).forEach(function(o){n.indexOf(o)===-1&&(e[o]=t[o])}),e}function Mw(t,n){for(var e=Array.isArray(n)?n:[n],o=e.length,r,i={};o>0;)o-=1,r=e[o],i[r]=t[r];return i}var _w=(typeof window>"u"?"undefined":Hc(window))==="object"&&window.Element||function(){};function Lw(t,n,e){if(!(t[n]instanceof _w))return new Error("Invalid prop `"+n+"` supplied to `"+e+"`. Expected prop to be an instance of Element. Validation failed.")}fe.oneOfType([fe.string,fe.func,Lw,fe.shape({current:fe.any})]);var $l=fe.oneOfType([fe.func,fe.string,fe.shape({$$typeof:fe.symbol,render:fe.func}),fe.arrayOf(fe.oneOfType([fe.func,fe.string,fe.shape({$$typeof:fe.symbol,render:fe.func})]))]),Rw={Fade:150,Collapse:350,Modal:300,Carousel:600,Offcanvas:300},$d=["in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],Fi={ENTERING:"entering",ENTERED:"entered",EXITING:"exiting",EXITED:"exited"},Fw=["className","cssModule","variant","innerRef"];function $c(){return $c=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},$c.apply(this,arguments)}function Wd(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,o)}return e}function Bw(t){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?Wd(Object(e),!0).forEach(function(o){Hw(t,o,e[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Wd(Object(e)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(e,o))})}return t}function Hw(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function $w(t,n){if(t==null)return{};var e=Ww(t,n),o,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)o=i[r],!(n.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(t,o)&&(e[o]=t[o])}return e}function Ww(t,n){if(t==null)return{};var e={},o=Object.keys(t),r,i;for(i=0;i<o.length;i++)r=o[i],!(n.indexOf(r)>=0)&&(e[r]=t[r]);return e}var zw={active:fe.bool,"aria-label":fe.string,onClick:fe.func,variant:fe.oneOf(["white"]),className:fe.string,cssModule:fe.object,innerRef:fe.oneOfType([fe.object,fe.string,fe.func])};function Fg(t){var n=t.className;t.cssModule;var e=t.variant,o=t.innerRef,r=$w(t,Fw),i=ns(it(n,"btn-close",e&&"btn-close-".concat(e)));return g.createElement("button",$c({ref:o,type:"button",className:i},Bw({"aria-label":"close"},r)))}Fg.propTypes=zw;var Uw=["active","aria-label","block","className","close","cssModule","color","outline","size","tag","innerRef"];function Wc(){return Wc=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},Wc.apply(this,arguments)}function Vw(t,n){if(t==null)return{};var e=Yw(t,n),o,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)o=i[r],!(n.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(t,o)&&(e[o]=t[o])}return e}function Yw(t,n){if(t==null)return{};var e={},o=Object.keys(t),r,i;for(i=0;i<o.length;i++)r=o[i],!(n.indexOf(r)>=0)&&(e[r]=t[r]);return e}var Gw={active:fe.bool,"aria-label":fe.string,block:fe.bool,children:fe.node,className:fe.string,cssModule:fe.object,close:fe.bool,color:fe.string,disabled:fe.bool,innerRef:fe.oneOfType([fe.object,fe.func,fe.string]),onClick:fe.func,outline:fe.bool,size:fe.string,tag:$l};function Ca(t){var n=g.useCallback(function(k){if(t.disabled){k.preventDefault();return}if(t.onClick)return t.onClick(k)},[t.onClick,t.disabled]),e=t.active,o=t["aria-label"],r=t.block,i=t.className,a=t.close,s=t.cssModule,l=t.color,u=l===void 0?"secondary":l,f=t.outline,d=t.size,p=t.tag,h=p===void 0?"button":p,m=t.innerRef,v=Vw(t,Uw);if(a)return g.createElement(Fg,v);var y="btn".concat(f?"-outline":"","-").concat(u),w=ns(it(i,"btn",y,d?"btn-".concat(d):!1,r?"d-block w-100":!1,{active:e,disabled:t.disabled}),s);return v.href&&h==="button"&&(h="a"),g.createElement(h,Wc({type:h==="button"&&v.onClick?"button":void 0},v,{className:w,ref:m,onClick:n,"aria-label":o}))}Ca.propTypes=Gw;var zd=function(n){return n.reduce(function(e,o){var r=o[0],i=o[1];return e[r]=i,e},{})},Ud=typeof window<"u"&&window.document&&window.document.createElement?G.useLayoutEffect:G.useEffect,zt="top",ln="bottom",un="right",Ut="left",Wl="auto",yi=[zt,ln,un,Ut],yr="start",ui="end",Kw="clippingParents",Bg="viewport",Fr="popper",Zw="reference",Vd=yi.reduce(function(t,n){return t.concat([n+"-"+yr,n+"-"+ui])},[]),Hg=[].concat(yi,[Wl]).reduce(function(t,n){return t.concat([n,n+"-"+yr,n+"-"+ui])},[]),qw="beforeRead",Jw="read",Xw="afterRead",Qw="beforeMain",e2="main",t2="afterMain",n2="beforeWrite",o2="write",r2="afterWrite",i2=[qw,Jw,Xw,Qw,e2,t2,n2,o2,r2];function An(t){return t?(t.nodeName||"").toLowerCase():null}function en(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function Ho(t){var n=en(t).Element;return t instanceof n||t instanceof Element}function cn(t){var n=en(t).HTMLElement;return t instanceof n||t instanceof HTMLElement}function zl(t){if(typeof ShadowRoot>"u")return!1;var n=en(t).ShadowRoot;return t instanceof n||t instanceof ShadowRoot}function a2(t){var n=t.state;Object.keys(n.elements).forEach(function(e){var o=n.styles[e]||{},r=n.attributes[e]||{},i=n.elements[e];!cn(i)||!An(i)||(Object.assign(i.style,o),Object.keys(r).forEach(function(a){var s=r[a];s===!1?i.removeAttribute(a):i.setAttribute(a,s===!0?"":s)}))})}function s2(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow),function(){Object.keys(n.elements).forEach(function(o){var r=n.elements[o],i=n.attributes[o]||{},a=Object.keys(n.styles.hasOwnProperty(o)?n.styles[o]:e[o]),s=a.reduce(function(l,u){return l[u]="",l},{});!cn(r)||!An(r)||(Object.assign(r.style,s),Object.keys(i).forEach(function(l){r.removeAttribute(l)}))})}}const c2={name:"applyStyles",enabled:!0,phase:"write",fn:a2,effect:s2,requires:["computeStyles"]};function On(t){return t.split("-")[0]}var _o=Math.max,Sa=Math.min,br=Math.round;function zc(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(n){return n.brand+"/"+n.version}).join(" "):navigator.userAgent}function $g(){return!/^((?!chrome|android).)*safari/i.test(zc())}function wr(t,n,e){n===void 0&&(n=!1),e===void 0&&(e=!1);var o=t.getBoundingClientRect(),r=1,i=1;n&&cn(t)&&(r=t.offsetWidth>0&&br(o.width)/t.offsetWidth||1,i=t.offsetHeight>0&&br(o.height)/t.offsetHeight||1);var a=Ho(t)?en(t):window,s=a.visualViewport,l=!$g()&&e,u=(o.left+(l&&s?s.offsetLeft:0))/r,f=(o.top+(l&&s?s.offsetTop:0))/i,d=o.width/r,p=o.height/i;return{width:d,height:p,top:f,right:u+d,bottom:f+p,left:u,x:u,y:f}}function Ul(t){var n=wr(t),e=t.offsetWidth,o=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-o)<=1&&(o=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:o}}function Wg(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&zl(e)){var o=n;do{if(o&&t.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function Yn(t){return en(t).getComputedStyle(t)}function l2(t){return["table","td","th"].indexOf(An(t))>=0}function go(t){return((Ho(t)?t.ownerDocument:t.document)||window.document).documentElement}function os(t){return An(t)==="html"?t:t.assignedSlot||t.parentNode||(zl(t)?t.host:null)||go(t)}function Yd(t){return!cn(t)||Yn(t).position==="fixed"?null:t.offsetParent}function u2(t){var n=/firefox/i.test(zc()),e=/Trident/i.test(zc());if(e&&cn(t)){var o=Yn(t);if(o.position==="fixed")return null}var r=os(t);for(zl(r)&&(r=r.host);cn(r)&&["html","body"].indexOf(An(r))<0;){var i=Yn(r);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||n&&i.willChange==="filter"||n&&i.filter&&i.filter!=="none")return r;r=r.parentNode}return null}function bi(t){for(var n=en(t),e=Yd(t);e&&l2(e)&&Yn(e).position==="static";)e=Yd(e);return e&&(An(e)==="html"||An(e)==="body"&&Yn(e).position==="static")?n:e||u2(t)||n}function Vl(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Xr(t,n,e){return _o(t,Sa(n,e))}function d2(t,n,e){var o=Xr(t,n,e);return o>e?e:o}function zg(){return{top:0,right:0,bottom:0,left:0}}function Ug(t){return Object.assign({},zg(),t)}function Vg(t,n){return n.reduce(function(e,o){return e[o]=t,e},{})}var f2=function(n,e){return n=typeof n=="function"?n(Object.assign({},e.rects,{placement:e.placement})):n,Ug(typeof n!="number"?n:Vg(n,yi))};function p2(t){var n,e=t.state,o=t.name,r=t.options,i=e.elements.arrow,a=e.modifiersData.popperOffsets,s=On(e.placement),l=Vl(s),u=[Ut,un].indexOf(s)>=0,f=u?"height":"width";if(!(!i||!a)){var d=f2(r.padding,e),p=Ul(i),h=l==="y"?zt:Ut,m=l==="y"?ln:un,v=e.rects.reference[f]+e.rects.reference[l]-a[l]-e.rects.popper[f],y=a[l]-e.rects.reference[l],w=bi(i),k=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,x=v/2-y/2,b=d[h],E=k-p[f]-d[m],j=k/2-p[f]/2+x,B=Xr(b,j,E),F=l;e.modifiersData[o]=(n={},n[F]=B,n.centerOffset=B-j,n)}}function h2(t){var n=t.state,e=t.options,o=e.element,r=o===void 0?"[data-popper-arrow]":o;r!=null&&(typeof r=="string"&&(r=n.elements.popper.querySelector(r),!r)||Wg(n.elements.popper,r)&&(n.elements.arrow=r))}const m2={name:"arrow",enabled:!0,phase:"main",fn:p2,effect:h2,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function xr(t){return t.split("-")[1]}var g2={top:"auto",right:"auto",bottom:"auto",left:"auto"};function v2(t,n){var e=t.x,o=t.y,r=n.devicePixelRatio||1;return{x:br(e*r)/r||0,y:br(o*r)/r||0}}function Gd(t){var n,e=t.popper,o=t.popperRect,r=t.placement,i=t.variation,a=t.offsets,s=t.position,l=t.gpuAcceleration,u=t.adaptive,f=t.roundOffsets,d=t.isFixed,p=a.x,h=p===void 0?0:p,m=a.y,v=m===void 0?0:m,y=typeof f=="function"?f({x:h,y:v}):{x:h,y:v};h=y.x,v=y.y;var w=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),x=Ut,b=zt,E=window;if(u){var j=bi(e),B="clientHeight",F="clientWidth";if(j===en(e)&&(j=go(e),Yn(j).position!=="static"&&s==="absolute"&&(B="scrollHeight",F="scrollWidth")),j=j,r===zt||(r===Ut||r===un)&&i===ui){b=ln;var L=d&&j===E&&E.visualViewport?E.visualViewport.height:j[B];v-=L-o.height,v*=l?1:-1}if(r===Ut||(r===zt||r===ln)&&i===ui){x=un;var D=d&&j===E&&E.visualViewport?E.visualViewport.width:j[F];h-=D-o.width,h*=l?1:-1}}var T=Object.assign({position:s},u&&g2),P=f===!0?v2({x:h,y:v},en(e)):{x:h,y:v};if(h=P.x,v=P.y,l){var re;return Object.assign({},T,(re={},re[b]=k?"0":"",re[x]=w?"0":"",re.transform=(E.devicePixelRatio||1)<=1?"translate("+h+"px, "+v+"px)":"translate3d("+h+"px, "+v+"px, 0)",re))}return Object.assign({},T,(n={},n[b]=k?v+"px":"",n[x]=w?h+"px":"",n.transform="",n))}function y2(t){var n=t.state,e=t.options,o=e.gpuAcceleration,r=o===void 0?!0:o,i=e.adaptive,a=i===void 0?!0:i,s=e.roundOffsets,l=s===void 0?!0:s,u={placement:On(n.placement),variation:xr(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:r,isFixed:n.options.strategy==="fixed"};n.modifiersData.popperOffsets!=null&&(n.styles.popper=Object.assign({},n.styles.popper,Gd(Object.assign({},u,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:a,roundOffsets:l})))),n.modifiersData.arrow!=null&&(n.styles.arrow=Object.assign({},n.styles.arrow,Gd(Object.assign({},u,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})}const b2={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:y2,data:{}};var Bi={passive:!0};function w2(t){var n=t.state,e=t.instance,o=t.options,r=o.scroll,i=r===void 0?!0:r,a=o.resize,s=a===void 0?!0:a,l=en(n.elements.popper),u=[].concat(n.scrollParents.reference,n.scrollParents.popper);return i&&u.forEach(function(f){f.addEventListener("scroll",e.update,Bi)}),s&&l.addEventListener("resize",e.update,Bi),function(){i&&u.forEach(function(f){f.removeEventListener("scroll",e.update,Bi)}),s&&l.removeEventListener("resize",e.update,Bi)}}const x2={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:w2,data:{}};var C2={left:"right",right:"left",bottom:"top",top:"bottom"};function qi(t){return t.replace(/left|right|bottom|top/g,function(n){return C2[n]})}var S2={start:"end",end:"start"};function Kd(t){return t.replace(/start|end/g,function(n){return S2[n]})}function Yl(t){var n=en(t),e=n.pageXOffset,o=n.pageYOffset;return{scrollLeft:e,scrollTop:o}}function Gl(t){return wr(go(t)).left+Yl(t).scrollLeft}function k2(t,n){var e=en(t),o=go(t),r=e.visualViewport,i=o.clientWidth,a=o.clientHeight,s=0,l=0;if(r){i=r.width,a=r.height;var u=$g();(u||!u&&n==="fixed")&&(s=r.offsetLeft,l=r.offsetTop)}return{width:i,height:a,x:s+Gl(t),y:l}}function E2(t){var n,e=go(t),o=Yl(t),r=(n=t.ownerDocument)==null?void 0:n.body,i=_o(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=_o(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-o.scrollLeft+Gl(t),l=-o.scrollTop;return Yn(r||e).direction==="rtl"&&(s+=_o(e.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}function Kl(t){var n=Yn(t),e=n.overflow,o=n.overflowX,r=n.overflowY;return/auto|scroll|overlay|hidden/.test(e+r+o)}function Yg(t){return["html","body","#document"].indexOf(An(t))>=0?t.ownerDocument.body:cn(t)&&Kl(t)?t:Yg(os(t))}function Qr(t,n){var e;n===void 0&&(n=[]);var o=Yg(t),r=o===((e=t.ownerDocument)==null?void 0:e.body),i=en(o),a=r?[i].concat(i.visualViewport||[],Kl(o)?o:[]):o,s=n.concat(a);return r?s:s.concat(Qr(os(a)))}function Uc(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function j2(t,n){var e=wr(t,!1,n==="fixed");return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function Zd(t,n,e){return n===Bg?Uc(k2(t,e)):Ho(n)?j2(n,e):Uc(E2(go(t)))}function O2(t){var n=Qr(os(t)),e=["absolute","fixed"].indexOf(Yn(t).position)>=0,o=e&&cn(t)?bi(t):t;return Ho(o)?n.filter(function(r){return Ho(r)&&Wg(r,o)&&An(r)!=="body"}):[]}function N2(t,n,e,o){var r=n==="clippingParents"?O2(t):[].concat(n),i=[].concat(r,[e]),a=i[0],s=i.reduce(function(l,u){var f=Zd(t,u,o);return l.top=_o(f.top,l.top),l.right=Sa(f.right,l.right),l.bottom=Sa(f.bottom,l.bottom),l.left=_o(f.left,l.left),l},Zd(t,a,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Gg(t){var n=t.reference,e=t.element,o=t.placement,r=o?On(o):null,i=o?xr(o):null,a=n.x+n.width/2-e.width/2,s=n.y+n.height/2-e.height/2,l;switch(r){case zt:l={x:a,y:n.y-e.height};break;case ln:l={x:a,y:n.y+n.height};break;case un:l={x:n.x+n.width,y:s};break;case Ut:l={x:n.x-e.width,y:s};break;default:l={x:n.x,y:n.y}}var u=r?Vl(r):null;if(u!=null){var f=u==="y"?"height":"width";switch(i){case yr:l[u]=l[u]-(n[f]/2-e[f]/2);break;case ui:l[u]=l[u]+(n[f]/2-e[f]/2);break}}return l}function di(t,n){n===void 0&&(n={});var e=n,o=e.placement,r=o===void 0?t.placement:o,i=e.strategy,a=i===void 0?t.strategy:i,s=e.boundary,l=s===void 0?Kw:s,u=e.rootBoundary,f=u===void 0?Bg:u,d=e.elementContext,p=d===void 0?Fr:d,h=e.altBoundary,m=h===void 0?!1:h,v=e.padding,y=v===void 0?0:v,w=Ug(typeof y!="number"?y:Vg(y,yi)),k=p===Fr?Zw:Fr,x=t.rects.popper,b=t.elements[m?k:p],E=N2(Ho(b)?b:b.contextElement||go(t.elements.popper),l,f,a),j=wr(t.elements.reference),B=Gg({reference:j,element:x,strategy:"absolute",placement:r}),F=Uc(Object.assign({},x,B)),L=p===Fr?F:j,D={top:E.top-L.top+w.top,bottom:L.bottom-E.bottom+w.bottom,left:E.left-L.left+w.left,right:L.right-E.right+w.right},T=t.modifiersData.offset;if(p===Fr&&T){var P=T[r];Object.keys(D).forEach(function(re){var ae=[un,ln].indexOf(re)>=0?1:-1,z=[zt,ln].indexOf(re)>=0?"y":"x";D[re]+=P[z]*ae})}return D}function I2(t,n){n===void 0&&(n={});var e=n,o=e.placement,r=e.boundary,i=e.rootBoundary,a=e.padding,s=e.flipVariations,l=e.allowedAutoPlacements,u=l===void 0?Hg:l,f=xr(o),d=f?s?Vd:Vd.filter(function(m){return xr(m)===f}):yi,p=d.filter(function(m){return u.indexOf(m)>=0});p.length===0&&(p=d);var h=p.reduce(function(m,v){return m[v]=di(t,{placement:v,boundary:r,rootBoundary:i,padding:a})[On(v)],m},{});return Object.keys(h).sort(function(m,v){return h[m]-h[v]})}function P2(t){if(On(t)===Wl)return[];var n=qi(t);return[Kd(t),n,Kd(n)]}function A2(t){var n=t.state,e=t.options,o=t.name;if(!n.modifiersData[o]._skip){for(var r=e.mainAxis,i=r===void 0?!0:r,a=e.altAxis,s=a===void 0?!0:a,l=e.fallbackPlacements,u=e.padding,f=e.boundary,d=e.rootBoundary,p=e.altBoundary,h=e.flipVariations,m=h===void 0?!0:h,v=e.allowedAutoPlacements,y=n.options.placement,w=On(y),k=w===y,x=l||(k||!m?[qi(y)]:P2(y)),b=[y].concat(x).reduce(function(M,O){return M.concat(On(O)===Wl?I2(n,{placement:O,boundary:f,rootBoundary:d,padding:u,flipVariations:m,allowedAutoPlacements:v}):O)},[]),E=n.rects.reference,j=n.rects.popper,B=new Map,F=!0,L=b[0],D=0;D<b.length;D++){var T=b[D],P=On(T),re=xr(T)===yr,ae=[zt,ln].indexOf(P)>=0,z=ae?"width":"height",ee=di(n,{placement:T,boundary:f,rootBoundary:d,altBoundary:p,padding:u}),q=ae?re?un:Ut:re?ln:zt;E[z]>j[z]&&(q=qi(q));var ie=qi(q),J=[];if(i&&J.push(ee[P]<=0),s&&J.push(ee[q]<=0,ee[ie]<=0),J.every(function(M){return M})){L=T,F=!1;break}B.set(T,J)}if(F)for(var W=m?3:1,Q=function(O){var I=b.find(function(R){var U=B.get(R);if(U)return U.slice(0,O).every(function(V){return V})});if(I)return L=I,"break"},Y=W;Y>0;Y--){var H=Q(Y);if(H==="break")break}n.placement!==L&&(n.modifiersData[o]._skip=!0,n.placement=L,n.reset=!0)}}const T2={name:"flip",enabled:!0,phase:"main",fn:A2,requiresIfExists:["offset"],data:{_skip:!1}};function qd(t,n,e){return e===void 0&&(e={x:0,y:0}),{top:t.top-n.height-e.y,right:t.right-n.width+e.x,bottom:t.bottom-n.height+e.y,left:t.left-n.width-e.x}}function Jd(t){return[zt,un,ln,Ut].some(function(n){return t[n]>=0})}function D2(t){var n=t.state,e=t.name,o=n.rects.reference,r=n.rects.popper,i=n.modifiersData.preventOverflow,a=di(n,{elementContext:"reference"}),s=di(n,{altBoundary:!0}),l=qd(a,o),u=qd(s,r,i),f=Jd(l),d=Jd(u);n.modifiersData[e]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:f,hasPopperEscaped:d},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":d})}const M2={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:D2};function _2(t,n,e){var o=On(t),r=[Ut,zt].indexOf(o)>=0?-1:1,i=typeof e=="function"?e(Object.assign({},n,{placement:t})):e,a=i[0],s=i[1];return a=a||0,s=(s||0)*r,[Ut,un].indexOf(o)>=0?{x:s,y:a}:{x:a,y:s}}function L2(t){var n=t.state,e=t.options,o=t.name,r=e.offset,i=r===void 0?[0,0]:r,a=Hg.reduce(function(f,d){return f[d]=_2(d,n.rects,i),f},{}),s=a[n.placement],l=s.x,u=s.y;n.modifiersData.popperOffsets!=null&&(n.modifiersData.popperOffsets.x+=l,n.modifiersData.popperOffsets.y+=u),n.modifiersData[o]=a}const R2={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:L2};function F2(t){var n=t.state,e=t.name;n.modifiersData[e]=Gg({reference:n.rects.reference,element:n.rects.popper,strategy:"absolute",placement:n.placement})}const B2={name:"popperOffsets",enabled:!0,phase:"read",fn:F2,data:{}};function H2(t){return t==="x"?"y":"x"}function $2(t){var n=t.state,e=t.options,o=t.name,r=e.mainAxis,i=r===void 0?!0:r,a=e.altAxis,s=a===void 0?!1:a,l=e.boundary,u=e.rootBoundary,f=e.altBoundary,d=e.padding,p=e.tether,h=p===void 0?!0:p,m=e.tetherOffset,v=m===void 0?0:m,y=di(n,{boundary:l,rootBoundary:u,padding:d,altBoundary:f}),w=On(n.placement),k=xr(n.placement),x=!k,b=Vl(w),E=H2(b),j=n.modifiersData.popperOffsets,B=n.rects.reference,F=n.rects.popper,L=typeof v=="function"?v(Object.assign({},n.rects,{placement:n.placement})):v,D=typeof L=="number"?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),T=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,P={x:0,y:0};if(j){if(i){var re,ae=b==="y"?zt:Ut,z=b==="y"?ln:un,ee=b==="y"?"height":"width",q=j[b],ie=q+y[ae],J=q-y[z],W=h?-F[ee]/2:0,Q=k===yr?B[ee]:F[ee],Y=k===yr?-F[ee]:-B[ee],H=n.elements.arrow,M=h&&H?Ul(H):{width:0,height:0},O=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:zg(),I=O[ae],R=O[z],U=Xr(0,B[ee],M[ee]),V=x?B[ee]/2-W-U-I-D.mainAxis:Q-U-I-D.mainAxis,se=x?-B[ee]/2+W+U+R+D.mainAxis:Y+U+R+D.mainAxis,Z=n.elements.arrow&&bi(n.elements.arrow),A=Z?b==="y"?Z.clientTop||0:Z.clientLeft||0:0,me=(re=T==null?void 0:T[b])!=null?re:0,we=q+V-me-A,Ie=q+se-me,Oe=Xr(h?Sa(ie,we):ie,q,h?_o(J,Ie):J);j[b]=Oe,P[b]=Oe-q}if(s){var ke,ue=b==="x"?zt:Ut,S=b==="x"?ln:un,C=j[E],N=E==="y"?"height":"width",_=C+y[ue],$=C-y[S],ce=[zt,Ut].indexOf(w)!==-1,be=(ke=T==null?void 0:T[E])!=null?ke:0,X=ce?_:C-B[N]-F[N]-be+D.altAxis,ne=ce?C+B[N]+F[N]-be-D.altAxis:$,te=h&&ce?d2(X,C,ne):Xr(h?X:_,C,h?ne:$);j[E]=te,P[E]=te-C}n.modifiersData[o]=P}}const W2={name:"preventOverflow",enabled:!0,phase:"main",fn:$2,requiresIfExists:["offset"]};function z2(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function U2(t){return t===en(t)||!cn(t)?Yl(t):z2(t)}function V2(t){var n=t.getBoundingClientRect(),e=br(n.width)/t.offsetWidth||1,o=br(n.height)/t.offsetHeight||1;return e!==1||o!==1}function Y2(t,n,e){e===void 0&&(e=!1);var o=cn(n),r=cn(n)&&V2(n),i=go(n),a=wr(t,r,e),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(o||!o&&!e)&&((An(n)!=="body"||Kl(i))&&(s=U2(n)),cn(n)?(l=wr(n,!0),l.x+=n.clientLeft,l.y+=n.clientTop):i&&(l.x=Gl(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function G2(t){var n=new Map,e=new Set,o=[];t.forEach(function(i){n.set(i.name,i)});function r(i){e.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(s){if(!e.has(s)){var l=n.get(s);l&&r(l)}}),o.push(i)}return t.forEach(function(i){e.has(i.name)||r(i)}),o}function K2(t){var n=G2(t);return i2.reduce(function(e,o){return e.concat(n.filter(function(r){return r.phase===o}))},[])}function Z2(t){var n;return function(){return n||(n=new Promise(function(e){Promise.resolve().then(function(){n=void 0,e(t())})})),n}}function q2(t){var n=t.reduce(function(e,o){var r=e[o.name];return e[o.name]=r?Object.assign({},r,o,{options:Object.assign({},r.options,o.options),data:Object.assign({},r.data,o.data)}):o,e},{});return Object.keys(n).map(function(e){return n[e]})}var Xd={placement:"bottom",modifiers:[],strategy:"absolute"};function Qd(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return!n.some(function(o){return!(o&&typeof o.getBoundingClientRect=="function")})}function J2(t){t===void 0&&(t={});var n=t,e=n.defaultModifiers,o=e===void 0?[]:e,r=n.defaultOptions,i=r===void 0?Xd:r;return function(s,l,u){u===void 0&&(u=i);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},Xd,i),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],p=!1,h={state:f,setOptions:function(w){var k=typeof w=="function"?w(f.options):w;v(),f.options=Object.assign({},i,f.options,k),f.scrollParents={reference:Ho(s)?Qr(s):s.contextElement?Qr(s.contextElement):[],popper:Qr(l)};var x=K2(q2([].concat(o,f.options.modifiers)));return f.orderedModifiers=x.filter(function(b){return b.enabled}),m(),h.update()},forceUpdate:function(){if(!p){var w=f.elements,k=w.reference,x=w.popper;if(Qd(k,x)){f.rects={reference:Y2(k,bi(x),f.options.strategy==="fixed"),popper:Ul(x)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(D){return f.modifiersData[D.name]=Object.assign({},D.data)});for(var b=0;b<f.orderedModifiers.length;b++){if(f.reset===!0){f.reset=!1,b=-1;continue}var E=f.orderedModifiers[b],j=E.fn,B=E.options,F=B===void 0?{}:B,L=E.name;typeof j=="function"&&(f=j({state:f,options:F,name:L,instance:h})||f)}}}},update:Z2(function(){return new Promise(function(y){h.forceUpdate(),y(f)})}),destroy:function(){v(),p=!0}};if(!Qd(s,l))return h;h.setOptions(u).then(function(y){!p&&u.onFirstUpdate&&u.onFirstUpdate(y)});function m(){f.orderedModifiers.forEach(function(y){var w=y.name,k=y.options,x=k===void 0?{}:k,b=y.effect;if(typeof b=="function"){var E=b({state:f,name:w,instance:h,options:x}),j=function(){};d.push(E||j)}})}function v(){d.forEach(function(y){return y()}),d=[]}return h}}var X2=[x2,B2,b2,c2,R2,T2,W2,m2,M2],Q2=J2({defaultModifiers:X2}),ex=typeof Element<"u",tx=typeof Map=="function",nx=typeof Set=="function",ox=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Ji(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var e,o,r;if(Array.isArray(t)){if(e=t.length,e!=n.length)return!1;for(o=e;o--!==0;)if(!Ji(t[o],n[o]))return!1;return!0}var i;if(tx&&t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(i=t.entries();!(o=i.next()).done;)if(!n.has(o.value[0]))return!1;for(i=t.entries();!(o=i.next()).done;)if(!Ji(o.value[1],n.get(o.value[0])))return!1;return!0}if(nx&&t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(i=t.entries();!(o=i.next()).done;)if(!n.has(o.value[0]))return!1;return!0}if(ox&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if(e=t.length,e!=n.length)return!1;for(o=e;o--!==0;)if(t[o]!==n[o])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf&&typeof t.valueOf=="function"&&typeof n.valueOf=="function")return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString&&typeof t.toString=="function"&&typeof n.toString=="function")return t.toString()===n.toString();if(r=Object.keys(t),e=r.length,e!==Object.keys(n).length)return!1;for(o=e;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,r[o]))return!1;if(ex&&t instanceof Element)return!1;for(o=e;o--!==0;)if(!((r[o]==="_owner"||r[o]==="__v"||r[o]==="__o")&&t.$$typeof)&&!Ji(t[r[o]],n[r[o]]))return!1;return!0}return t!==t&&n!==n}var rx=function(n,e){try{return Ji(n,e)}catch(o){if((o.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw o}};const ix=ts(rx);var ax=[],sx=function(n,e,o){o===void 0&&(o={});var r=G.useRef(null),i={onFirstUpdate:o.onFirstUpdate,placement:o.placement||"bottom",strategy:o.strategy||"absolute",modifiers:o.modifiers||ax},a=G.useState({styles:{popper:{position:i.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=a[0],l=a[1],u=G.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(h){var m=h.state,v=Object.keys(m.elements);xf.flushSync(function(){l({styles:zd(v.map(function(y){return[y,m.styles[y]||{}]})),attributes:zd(v.map(function(y){return[y,m.attributes[y]]}))})})},requires:["computeStyles"]}},[]),f=G.useMemo(function(){var p={onFirstUpdate:i.onFirstUpdate,placement:i.placement,strategy:i.strategy,modifiers:[].concat(i.modifiers,[u,{name:"applyStyles",enabled:!1}])};return ix(r.current,p)?r.current||p:(r.current=p,p)},[i.onFirstUpdate,i.placement,i.strategy,i.modifiers,u]),d=G.useRef();return Ud(function(){d.current&&d.current.setOptions(f)},[f]),Ud(function(){if(!(n==null||e==null)){var p=o.createPopper||Q2,h=p(n,e,f);return d.current=h,function(){h.destroy(),d.current=null}}},[n,e,o.createPopper]),{state:d.current?d.current.state:null,styles:s.styles,attributes:s.attributes,update:d.current?d.current.update:null,forceUpdate:d.current?d.current.forceUpdate:null}},cx=["className","cssModule","size","vertical","tag"];function Vc(){return Vc=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},Vc.apply(this,arguments)}function ef(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,o)}return e}function lx(t){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?ef(Object(e),!0).forEach(function(o){ux(t,o,e[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):ef(Object(e)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(e,o))})}return t}function ux(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function dx(t,n){if(t==null)return{};var e=fx(t,n),o,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)o=i[r],!(n.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(t,o)&&(e[o]=t[o])}return e}function fx(t,n){if(t==null)return{};var e={},o=Object.keys(t),r,i;for(i=0;i<o.length;i++)r=o[i],!(n.indexOf(r)>=0)&&(e[r]=t[r]);return e}var px={"aria-label":fe.string,className:fe.string,cssModule:fe.object,role:fe.string,size:fe.string,tag:$l,vertical:fe.bool};function Kg(t){var n=t.className,e=t.cssModule,o=t.size,r=t.vertical,i=t.tag,a=i===void 0?"div":i,s=dx(t,cx),l=ns(it(n,o?"btn-group-"+o:!1,r?"btn-group-vertical":"btn-group"),e);return g.createElement(a,Vc({},lx({role:"group"},s),{className:l}))}Kg.propTypes=px;function hx(t,n){if(t==null)return{};var e={};for(var o in t)if({}.hasOwnProperty.call(t,o)){if(n.indexOf(o)!==-1)continue;e[o]=t[o]}return e}function Yc(t,n){return Yc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,o){return e.__proto__=o,e},Yc(t,n)}function mx(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,Yc(t,n)}const tf={disabled:!1};var gx=process.env.NODE_ENV!=="production"?fe.oneOfType([fe.number,fe.shape({enter:fe.number,exit:fe.number,appear:fe.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&fe.oneOfType([fe.string,fe.shape({enter:fe.string,exit:fe.string,active:fe.string}),fe.shape({enter:fe.string,enterDone:fe.string,enterActive:fe.string,exit:fe.string,exitDone:fe.string,exitActive:fe.string})]);const Zg=g.createContext(null);var vx=function(n){return n.scrollTop},Gr="unmounted",xo="exited",Co="entering",Qo="entered",Gc="exiting",Zn=function(t){mx(n,t);function n(o,r){var i;i=t.call(this,o,r)||this;var a=r,s=a&&!a.isMounting?o.enter:o.appear,l;return i.appearStatus=null,o.in?s?(l=xo,i.appearStatus=Co):l=Qo:o.unmountOnExit||o.mountOnEnter?l=Gr:l=xo,i.state={status:l},i.nextCallback=null,i}n.getDerivedStateFromProps=function(r,i){var a=r.in;return a&&i.status===Gr?{status:xo}:null};var e=n.prototype;return e.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},e.componentDidUpdate=function(r){var i=null;if(r!==this.props){var a=this.state.status;this.props.in?a!==Co&&a!==Qo&&(i=Co):(a===Co||a===Qo)&&(i=Gc)}this.updateStatus(!1,i)},e.componentWillUnmount=function(){this.cancelNextCallback()},e.getTimeouts=function(){var r=this.props.timeout,i,a,s;return i=a=s=r,r!=null&&typeof r!="number"&&(i=r.exit,a=r.enter,s=r.appear!==void 0?r.appear:a),{exit:i,enter:a,appear:s}},e.updateStatus=function(r,i){if(r===void 0&&(r=!1),i!==null)if(this.cancelNextCallback(),i===Co){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:oo.findDOMNode(this);a&&vx(a)}this.performEnter(r)}else this.performExit();else this.props.unmountOnExit&&this.state.status===xo&&this.setState({status:Gr})},e.performEnter=function(r){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:r,l=this.props.nodeRef?[s]:[oo.findDOMNode(this),s],u=l[0],f=l[1],d=this.getTimeouts(),p=s?d.appear:d.enter;if(!r&&!a||tf.disabled){this.safeSetState({status:Qo},function(){i.props.onEntered(u)});return}this.props.onEnter(u,f),this.safeSetState({status:Co},function(){i.props.onEntering(u,f),i.onTransitionEnd(p,function(){i.safeSetState({status:Qo},function(){i.props.onEntered(u,f)})})})},e.performExit=function(){var r=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:oo.findDOMNode(this);if(!i||tf.disabled){this.safeSetState({status:xo},function(){r.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:Gc},function(){r.props.onExiting(s),r.onTransitionEnd(a.exit,function(){r.safeSetState({status:xo},function(){r.props.onExited(s)})})})},e.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},e.safeSetState=function(r,i){i=this.setNextCallback(i),this.setState(r,i)},e.setNextCallback=function(r){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,r(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},e.onTransitionEnd=function(r,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:oo.findDOMNode(this),s=r==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],f=l[1];this.props.addEndListener(u,f)}r!=null&&setTimeout(this.nextCallback,r)},e.render=function(){var r=this.state.status;if(r===Gr)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=hx(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return g.createElement(Zg.Provider,{value:null},typeof a=="function"?a(r,s):g.cloneElement(g.Children.only(a),s))},n}(g.Component);Zn.contextType=Zg;Zn.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:fe.shape({current:typeof Element>"u"?fe.any:function(t,n,e,o,r,i){var a=t[n];return fe.instanceOf(a&&"ownerDocument"in a?a.ownerDocument.defaultView.Element:Element)(t,n,e,o,r,i)}}),children:fe.oneOfType([fe.func.isRequired,fe.element.isRequired]).isRequired,in:fe.bool,mountOnEnter:fe.bool,unmountOnExit:fe.bool,appear:fe.bool,enter:fe.bool,exit:fe.bool,timeout:function(n){var e=gx;n.addEndListener||(e=e.isRequired);for(var o=arguments.length,r=new Array(o>1?o-1:0),i=1;i<o;i++)r[i-1]=arguments[i];return e.apply(void 0,[n].concat(r))},addEndListener:fe.func,onEnter:fe.func,onEntering:fe.func,onEntered:fe.func,onExit:fe.func,onExiting:fe.func,onExited:fe.func}:{};function Go(){}Zn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Go,onEntering:Go,onEntered:Go,onExit:Go,onExiting:Go,onExited:Go};Zn.UNMOUNTED=Gr;Zn.EXITED=xo;Zn.ENTERING=Co;Zn.ENTERED=Qo;Zn.EXITING=Gc;const Zl=Zn;function Kc(t){"@babel/helpers - typeof";return Kc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Kc(t)}var yx=["tag","horizontal","isOpen","className","navbar","cssModule","children","innerRef"],Ko;function ka(){return ka=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},ka.apply(this,arguments)}function bx(t,n){if(t==null)return{};var e=wx(t,n),o,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)o=i[r],!(n.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(t,o)&&(e[o]=t[o])}return e}function wx(t,n){if(t==null)return{};var e={},o=Object.keys(t),r,i;for(i=0;i<o.length;i++)r=o[i],!(n.indexOf(r)>=0)&&(e[r]=t[r]);return e}function xx(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function nf(t,n){for(var e=0;e<n.length;e++){var o=n[e];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function Cx(t,n,e){return n&&nf(t.prototype,n),e&&nf(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Sx(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&Zc(t,n)}function Zc(t,n){return Zc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,r){return o.__proto__=r,o},Zc(t,n)}function kx(t){var n=jx();return function(){var o=Ea(t),r;if(n){var i=Ea(this).constructor;r=Reflect.construct(o,arguments,i)}else r=o.apply(this,arguments);return Ex(this,r)}}function Ex(t,n){if(n&&(Kc(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qg(t)}function qg(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function jx(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ea(t){return Ea=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ea(t)}function of(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,o)}return e}function Cr(t){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?of(Object(e),!0).forEach(function(o){ar(t,o,e[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):of(Object(e)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(e,o))})}return t}function ar(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var Ox=Cr(Cr({},Zl.propTypes),{},{horizontal:fe.bool,isOpen:fe.bool,children:fe.oneOfType([fe.arrayOf(fe.node),fe.node]),tag:$l,className:fe.node,navbar:fe.bool,cssModule:fe.object,innerRef:fe.shape({current:fe.object})}),Nx=Cr(Cr({},Zl.defaultProps),{},{horizontal:!1,isOpen:!1,appear:!1,enter:!0,exit:!0,tag:"div",timeout:Rw.Collapse}),Ix=(Ko={},ar(Ko,Fi.ENTERING,"collapsing"),ar(Ko,Fi.ENTERED,"collapse show"),ar(Ko,Fi.EXITING,"collapsing"),ar(Ko,Fi.EXITED,"collapse"),Ko);function Px(t){return Ix[t]||"collapse"}var ql=function(t){Sx(e,t);var n=kx(e);function e(o){var r;return xx(this,e),r=n.call(this,o),r.state={dimension:null},r.nodeRef=o.innerRef||g.createRef(),["onEntering","onEntered","onExit","onExiting","onExited"].forEach(function(i){r[i]=r[i].bind(qg(r))}),r}return Cx(e,[{key:"onEntering",value:function(r,i){var a=this.getNode();this.setState({dimension:this.getDimension(a)}),this.props.onEntering(a,i)}},{key:"onEntered",value:function(r,i){var a=this.getNode();this.setState({dimension:null}),this.props.onEntered(a,i)}},{key:"onExit",value:function(){var r=this.getNode();this.setState({dimension:this.getDimension(r)}),this.props.onExit(r)}},{key:"onExiting",value:function(){var r=this.getNode();this.getDimension(r),this.setState({dimension:0}),this.props.onExiting(r)}},{key:"onExited",value:function(){var r=this.getNode();this.setState({dimension:null}),this.props.onExited(r)}},{key:"getNode",value:function(){return this.nodeRef.current}},{key:"getDimension",value:function(r){return this.props.horizontal?r.scrollWidth:r.scrollHeight}},{key:"render",value:function(){var r=this,i=this.props,a=i.tag,s=i.horizontal,l=i.isOpen,u=i.className,f=i.navbar,d=i.cssModule,p=i.children;i.innerRef;var h=bx(i,yx),m=this.state.dimension,v=Mw(h,$d),y=Dw(h,$d);return g.createElement(Zl,ka({},v,{in:l,nodeRef:this.nodeRef,onEntering:this.onEntering,onEntered:this.onEntered,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}),function(w){var k=Px(w),x=ns(it(u,s&&"collapse-horizontal",k,f&&"navbar-collapse"),d),b=m===null?null:ar({},s?"width":"height",m);return g.createElement(a,ka({},y,{style:Cr(Cr({},y.style),b),className:x,ref:r.nodeRef}),p)})}}]),e}(g.Component);ql.propTypes=Ox;ql.defaultProps=Nx;const Jg=ql,Ax=t=>{const{className:n,isOpen:e,showCollapseIcon:o,showFolderIcon:r,title:i,...a}=t;return c.jsx(mt.ItemHeader,{className:it("io-base-section-header",n),prepend:r&&c.jsx(lt,{size:"16",variant:e?"folder-open":"folder","data-testid":"base-section-header-folder-icon"}),append:o&&c.jsx(Ge,{className:it("collapse-icon",!e&&"collapsed"),iconSize:"10",size:"16",icon:"expand","data-testid":"base-section-header-collapse-icon"}),tooltip:i,...a,children:i})},Xg=()=>{const[t,n]=g.useState([]),e=g.useContext(_e.IOConnectContext);return g.useEffect(()=>{if(!e)return;const o=l=>{const{name:u,title:f,caption:d,icon:p,userProperties:h}=l;return{id:u,name:u,title:f??u,caption:d,icon:p,userProperties:h}},r=e.appManager.onAppAdded(l=>{if(l.userProperties.hidden||"hidden"in l&&l.hidden)return;const u=o(l);n(f=>[...f,u])}),i=e.appManager.onAppChanged(l=>{if(l.userProperties.hidden||"hidden"in l&&l.hidden)return;const u=o(l);n(f=>[...f.filter(d=>d.id!==u.id),u])}),a=e.appManager.onAppRemoved(l=>{const u=o(l);n(f=>f.filter(d=>d.id!==u.id))}),s=[r,a,i];return()=>s.forEach(l=>l())},[e]),t},Tx=()=>{const[t,n]=g.useState({}),e=g.useContext(_e.IOConnectContext);return g.useEffect(()=>{if(!e)return;const o=e.appManager.onInstanceStarted(a=>{n(s=>{const l=s[a.application.name]??[];return{...s,[a.application.name]:[...l,a.id]}})}),r=e.appManager.onInstanceStopped(a=>{n(s=>{const l=s[a.application.name];return l?{...s,[a.application.name]:l.filter(u=>u!==a.id)}:s})}),i=[o,r];return()=>i.forEach(a=>a())},[e]),t},Dx=t=>{g.useEffect(()=>{var e;if(!((e=window.iobrowser)!=null&&e.platformStarted)||t)return;const n=o=>{o.preventDefault(),o.returnValue=!0};return window.addEventListener("beforeunload",n),()=>window.removeEventListener("beforeunload",n)},[t])},Jl=()=>{const[t,n]=g.useState(),e=g.useContext(_e.IOConnectContext);return g.useEffect(()=>{var o;try{const i=!((o=e.windows.my())!=null&&o.name)?pr.getFrameId():void 0;n(i)}catch(r){console.error("Failed to get the current frame ID ",{error:r})}},[e,pr.getFrameId,n]),t},Fe={SUCCESS:"success",WARNING:"warning"},Mx={success:5*1e3,warning:10*1e3},He=async t=>{const{io:n,variant:e,text:o,error:r}=t,i=Rc(r);try{if(e===Fe.WARNING&&n.logger.warn(i?`${o} ${i}`:o),!("modals"in n&&n.modals))throw new Error("Modals are not enabled.");const a={text:o,variant:e,ttl:Mx[e]};await n.modals.alerts.request(a)}catch(a){n.logger.warn(`Failed to request alert. ${Rc(a)}`)}},_x=async t=>{var o;const{io:n,item:e}=t;try{await((o=n.appManager.application(e.id))==null?void 0:o.start())}catch(r){await He({io:n,variant:Fe.WARNING,text:`Failed to start app "${e.title}" in a new window.`,error:r})}},Lx=async t=>{const{io:n,item:e,frameId:o}=t;if(!n.workspaces)return;const r={type:"workspace",definition:{frame:o?{reuseFrameId:o}:{newFrame:!0}}},i=n.workspaces.getBuilder(r);i.addGroup().addWindow({appName:e.id});try{await i.create()}catch(a){await He({io:n,variant:Fe.WARNING,text:`Failed to start app "${e.title}" in a new Workspace.`,error:a})}},Rx={[ba.OPEN_IN_NEW_WINDOW]:_x,[ba.OPEN_IN_NEW_WORKSPACE]:Lx},Qg=()=>{const t=g.useContext(_e.IOConnectContext),n=Jl();return(e,o)=>{Rx[o]({io:t,item:e,frameId:n})}},Nr={NO_INPUTS_CONFIRMATION_DIALOG:"noInputsConfirmationDialog",SINGLE_CHECKBOX_DIALOG:"singleCheckboxDialog",SINGLE_TEXT_INPUT_DIALOG:"singleTextInputDialog"},Xl="(.|\\s)*\\S(.|\\s)*",Fx=async t=>{var i;const{io:n,layout:e,showDeletePromptPref:o,updateShowDeletePromptPref:r}=t;if("modals"in n&&n.modals&&o){const a="delete",s="do-not-ask-again",{isEnterPressed:l,responseButtonClicked:u,inputs:f}=await n.modals.dialogs.request({templateName:Nr.SINGLE_CHECKBOX_DIALOG,variables:{heading:`Delete Layout "${e.name}"`,text:"Are you sure you want to delete this Layout?",checkbox:{id:s,label:"Don't ask me again"},actionButtons:[{variant:"critical",text:"Delete",id:a},{variant:"outline",text:"Cancel",id:"cancel",autofocus:!0}]}});if(((i=f==null?void 0:f.find(h=>h.id===s))==null?void 0:i.checked)&&r(!1),!(l||(u==null?void 0:u.id)===a))return}try{await n.layouts.remove("Global",e.name),e.isDefault&&await n.layouts.clearDefaultGlobal(),await He({io:n,variant:Fe.SUCCESS,text:`Layout "${e.name}" was successfully deleted.`})}catch(a){await He({io:n,variant:Fe.WARNING,text:`Failed to delete Layout "${e.name}".`,error:a})}},Bx=async t=>{var d;const{io:n,layout:e,setDefaultLayout:o}=t;if(!("modals"in n&&n.modals)){console.error("Cannot rename Layout because io dialogs are not enabled");return}const r="rename",i="new-layout-name",{isEnterPressed:a,responseButtonClicked:s,inputs:l}=await n.modals.dialogs.request({templateName:Nr.SINGLE_TEXT_INPUT_DIALOG,variables:{heading:`Rename "${e.name}"`,input:{id:i,initialValue:e.name,validation:{disabledButtonIds:[r],errorMessage:"Please provide a Layout name",regexPattern:Xl}},actionButtons:[{variant:"primary",text:"Rename",id:r},{variant:"outline",text:"Cancel",id:"cancel"}]}}),u=(d=l==null?void 0:l.find(p=>p.id===i))==null?void 0:d.value;if(a||(s==null?void 0:s.id)===r){if(u===e.name){await He({io:n,variant:Fe.WARNING,text:`Failed to rename Layout "${e.name}". The new Layout name must be different from the current one.`});return}try{if((await n.layouts.getAll("Global")).find(m=>m.name===u)){await He({io:n,variant:Fe.WARNING,text:`Failed to rename Layout "${e.name}" to "${u}". A Layout with name "${u}" already exists.`});return}const h=await n.layouts.get(e.name,"Global");if(!h){await He({io:n,variant:Fe.WARNING,text:`Failed to rename Layout "${e.name}". The Layout wasn't found.`});return}await n.layouts.rename(h,u),e.isDefault&&await o({name:u}),await He({io:n,variant:Fe.SUCCESS,text:`Layout "${e.name}" was successfully renamed to "${u}".`})}catch(p){await He({io:n,variant:Fe.WARNING,text:`Failed to rename Layout "${e.name}".`,error:p})}}},Hx=async t=>{const{io:n,layout:e}=t;try{await n.layouts.save({name:e.name,type:"Global"}),await He({io:n,variant:Fe.SUCCESS,text:`Layout "${e.name}" was saved successfully.`})}catch(o){await He({io:n,variant:Fe.WARNING,text:`Failed to save Layout "${e.name}".`,error:o})}},$x=async t=>{var d;const{io:n,layout:e,setActiveLayout:o}=t;if(!("modals"in n&&n.modals)){console.error("Cannot save Layout under a new name because io dialogs are not enabled");return}const r="save-as",i="layout-name",{isEnterPressed:a,responseButtonClicked:s,inputs:l}=await n.modals.dialogs.request({templateName:Nr.SINGLE_TEXT_INPUT_DIALOG,variables:{heading:`Save Layout "${e.name}" as`,input:{id:i,initialValue:e.name,validation:{disabledButtonIds:[r],errorMessage:"Please provide a Layout name",regexPattern:Xl}},actionButtons:[{variant:"primary",text:"Save as",id:r},{variant:"outline",text:"Cancel",id:"cancel"}]}}),u=(d=l==null?void 0:l.find(p=>p.id===i))==null?void 0:d.value;if(a||(s==null?void 0:s.id)===r){if(u===e.name){await He({io:n,variant:Fe.WARNING,text:`Failed to save Layout as "${u}". The new Layout must have a unique name.`});return}try{if((await n.layouts.getAll("Global")).find(m=>m.name===u)){await He({io:n,variant:Fe.WARNING,text:`Failed to save Layout as "${u}". A Layout with this name already exists.`});return}const h=await n.layouts.get(e.name,"Global");if(!h){await He({io:n,variant:Fe.WARNING,text:`Failed to save Layout "${e.name}". The Layout wasn't found.`});return}await n.layouts.import([{...h,name:u}],"merge"),e.isActive&&o({name:u}),await He({io:n,variant:Fe.SUCCESS,text:`The Layout was successfully saved as "${u}".`})}catch(p){await He({io:n,variant:Fe.WARNING,text:`Failed to save Layout "${u}".`,error:p})}}},Wx=async t=>{const{io:n,layout:e,setDefaultLayout:o}=t;try{await o({name:e.name}),await He({io:n,variant:Fe.SUCCESS,text:`Layout "${e.name}" was successfully set as the default Layout.`})}catch{await He({io:n,variant:Fe.WARNING,text:`Failed to set Layout "${e.name}" as the default Layout.`})}},zx=async t=>{const{io:n,layout:e,closeLaunchpad:o}=t;try{await n.layouts.restore({name:e.name}),o(),await He({io:n,variant:Fe.SUCCESS,text:`Layout "${e.name}" was loaded successfully.`})}catch(r){await He({io:n,variant:Fe.WARNING,text:`Failed to load Layout "${e.name}".`,error:r})}},Ux={delete:Fx,rename:Bx,save:Hx,saveAs:$x,setAsDefault:Wx,load:zx},Vx="interopio_home_ui_auth0_validation_error",Yx="interopio_home_ui_user",Gx="interopio_home_ui_platform_window",wi="interopio_home_ui_platform_setup",e0="interopio_home_ui_active_layout";var xt=function(t){return{ok:!0,result:t}},ft=function(t){return{ok:!1,error:t}},Kx=function(t){return t.ok===!0?Promise.resolve(t.result):Promise.reject(t.error)},Zx=function(t,n){return n.ok===!0?n.result:t},qx=function(t){if(t.ok===!0)return t.result;throw t.error},Jx=function(t,n){return n.ok===!0?xt(t(n.result)):n},rf=function(t,n,e){return n.ok===!1?n:e.ok===!1?e:xt(t(n.result,e.result))},Ys=function(t,n){return n.ok===!0?n:ft(t(n.error))},Xx=function(t,n){return n.ok===!0?t(n.result):n};/*! *****************************************************************************
43
+ */(function(t){(function(){var n={}.hasOwnProperty;function e(){for(var i="",a=0;a<arguments.length;a++){var s=arguments[a];s&&(i=r(i,o(s)))}return i}function o(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return e.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var a="";for(var s in i)n.call(i,s)&&i[s]&&(a=r(a,s));return a}function r(i,a){return a?i?i+" "+a:i+a:i}t.exports?(e.default=e,t.exports=e):window.classNames=e})()})($g);var _b=$g.exports;const it=rs(_b);function zc(t){"@babel/helpers - typeof";return zc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},zc(t)}var Lb;function is(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Lb;return n?t.split(" ").map(function(e){return n[e]||e}).join(" "):t}function Rb(t,n){var e={};return Object.keys(t).forEach(function(o){n.indexOf(o)===-1&&(e[o]=t[o])}),e}function Fb(t,n){for(var e=Array.isArray(n)?n:[n],o=e.length,r,i={};o>0;)o-=1,r=e[o],i[r]=t[r];return i}var Bb=(typeof window>"u"?"undefined":zc(window))==="object"&&window.Element||function(){};function Hb(t,n,e){if(!(t[n]instanceof Bb))return new Error("Invalid prop `"+n+"` supplied to `"+e+"`. Expected prop to be an instance of Element. Validation failed.")}fe.oneOfType([fe.string,fe.func,Hb,fe.shape({current:fe.any})]);var Ul=fe.oneOfType([fe.func,fe.string,fe.shape({$$typeof:fe.symbol,render:fe.func}),fe.arrayOf(fe.oneOfType([fe.func,fe.string,fe.shape({$$typeof:fe.symbol,render:fe.func})]))]),$b={Fade:150,Collapse:350,Modal:300,Carousel:600,Offcanvas:300},Ud=["in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],$i={ENTERING:"entering",ENTERED:"entered",EXITING:"exiting",EXITED:"exited"},Wb=["className","cssModule","variant","innerRef"];function Uc(){return Uc=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},Uc.apply(this,arguments)}function Vd(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,o)}return e}function zb(t){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?Vd(Object(e),!0).forEach(function(o){Ub(t,o,e[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Vd(Object(e)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(e,o))})}return t}function Ub(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function Vb(t,n){if(t==null)return{};var e=Yb(t,n),o,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)o=i[r],!(n.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(t,o)&&(e[o]=t[o])}return e}function Yb(t,n){if(t==null)return{};var e={},o=Object.keys(t),r,i;for(i=0;i<o.length;i++)r=o[i],!(n.indexOf(r)>=0)&&(e[r]=t[r]);return e}var Gb={active:fe.bool,"aria-label":fe.string,onClick:fe.func,variant:fe.oneOf(["white"]),className:fe.string,cssModule:fe.object,innerRef:fe.oneOfType([fe.object,fe.string,fe.func])};function Wg(t){var n=t.className;t.cssModule;var e=t.variant,o=t.innerRef,r=Vb(t,Wb),i=is(it(n,"btn-close",e&&"btn-close-".concat(e)));return g.createElement("button",Uc({ref:o,type:"button",className:i},zb({"aria-label":"close"},r)))}Wg.propTypes=Gb;var Kb=["active","aria-label","block","className","close","cssModule","color","outline","size","tag","innerRef"];function Vc(){return Vc=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},Vc.apply(this,arguments)}function Zb(t,n){if(t==null)return{};var e=qb(t,n),o,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)o=i[r],!(n.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(t,o)&&(e[o]=t[o])}return e}function qb(t,n){if(t==null)return{};var e={},o=Object.keys(t),r,i;for(i=0;i<o.length;i++)r=o[i],!(n.indexOf(r)>=0)&&(e[r]=t[r]);return e}var Jb={active:fe.bool,"aria-label":fe.string,block:fe.bool,children:fe.node,className:fe.string,cssModule:fe.object,close:fe.bool,color:fe.string,disabled:fe.bool,innerRef:fe.oneOfType([fe.object,fe.func,fe.string]),onClick:fe.func,outline:fe.bool,size:fe.string,tag:Ul};function Ea(t){var n=g.useCallback(function(S){if(t.disabled){S.preventDefault();return}if(t.onClick)return t.onClick(S)},[t.onClick,t.disabled]),e=t.active,o=t["aria-label"],r=t.block,i=t.className,a=t.close,s=t.cssModule,l=t.color,u=l===void 0?"secondary":l,f=t.outline,d=t.size,p=t.tag,h=p===void 0?"button":p,m=t.innerRef,v=Zb(t,Kb);if(a)return g.createElement(Wg,v);var y="btn".concat(f?"-outline":"","-").concat(u),x=is(it(i,"btn",y,d?"btn-".concat(d):!1,r?"d-block w-100":!1,{active:e,disabled:t.disabled}),s);return v.href&&h==="button"&&(h="a"),g.createElement(h,Vc({type:h==="button"&&v.onClick?"button":void 0},v,{className:x,ref:m,onClick:n,"aria-label":o}))}Ea.propTypes=Jb;var Yd=function(n){return n.reduce(function(e,o){var r=o[0],i=o[1];return e[r]=i,e},{})},Gd=typeof window<"u"&&window.document&&window.document.createElement?G.useLayoutEffect:G.useEffect,zt="top",ln="bottom",un="right",Ut="left",Vl="auto",wi=[zt,ln,un,Ut],wr="start",di="end",Xb="clippingParents",zg="viewport",Br="popper",Qb="reference",Kd=wi.reduce(function(t,n){return t.concat([n+"-"+wr,n+"-"+di])},[]),Ug=[].concat(wi,[Vl]).reduce(function(t,n){return t.concat([n,n+"-"+wr,n+"-"+di])},[]),e2="beforeRead",t2="read",n2="afterRead",o2="beforeMain",r2="main",i2="afterMain",a2="beforeWrite",s2="write",c2="afterWrite",l2=[e2,t2,n2,o2,r2,i2,a2,s2,c2];function An(t){return t?(t.nodeName||"").toLowerCase():null}function en(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function $o(t){var n=en(t).Element;return t instanceof n||t instanceof Element}function cn(t){var n=en(t).HTMLElement;return t instanceof n||t instanceof HTMLElement}function Yl(t){if(typeof ShadowRoot>"u")return!1;var n=en(t).ShadowRoot;return t instanceof n||t instanceof ShadowRoot}function u2(t){var n=t.state;Object.keys(n.elements).forEach(function(e){var o=n.styles[e]||{},r=n.attributes[e]||{},i=n.elements[e];!cn(i)||!An(i)||(Object.assign(i.style,o),Object.keys(r).forEach(function(a){var s=r[a];s===!1?i.removeAttribute(a):i.setAttribute(a,s===!0?"":s)}))})}function d2(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow),function(){Object.keys(n.elements).forEach(function(o){var r=n.elements[o],i=n.attributes[o]||{},a=Object.keys(n.styles.hasOwnProperty(o)?n.styles[o]:e[o]),s=a.reduce(function(l,u){return l[u]="",l},{});!cn(r)||!An(r)||(Object.assign(r.style,s),Object.keys(i).forEach(function(l){r.removeAttribute(l)}))})}}const f2={name:"applyStyles",enabled:!0,phase:"write",fn:u2,effect:d2,requires:["computeStyles"]};function On(t){return t.split("-")[0]}var Lo=Math.max,ja=Math.min,br=Math.round;function Yc(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(n){return n.brand+"/"+n.version}).join(" "):navigator.userAgent}function Vg(){return!/^((?!chrome|android).)*safari/i.test(Yc())}function xr(t,n,e){n===void 0&&(n=!1),e===void 0&&(e=!1);var o=t.getBoundingClientRect(),r=1,i=1;n&&cn(t)&&(r=t.offsetWidth>0&&br(o.width)/t.offsetWidth||1,i=t.offsetHeight>0&&br(o.height)/t.offsetHeight||1);var a=$o(t)?en(t):window,s=a.visualViewport,l=!Vg()&&e,u=(o.left+(l&&s?s.offsetLeft:0))/r,f=(o.top+(l&&s?s.offsetTop:0))/i,d=o.width/r,p=o.height/i;return{width:d,height:p,top:f,right:u+d,bottom:f+p,left:u,x:u,y:f}}function Gl(t){var n=xr(t),e=t.offsetWidth,o=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-o)<=1&&(o=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:o}}function Yg(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&Yl(e)){var o=n;do{if(o&&t.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function Yn(t){return en(t).getComputedStyle(t)}function p2(t){return["table","td","th"].indexOf(An(t))>=0}function go(t){return(($o(t)?t.ownerDocument:t.document)||window.document).documentElement}function as(t){return An(t)==="html"?t:t.assignedSlot||t.parentNode||(Yl(t)?t.host:null)||go(t)}function Zd(t){return!cn(t)||Yn(t).position==="fixed"?null:t.offsetParent}function h2(t){var n=/firefox/i.test(Yc()),e=/Trident/i.test(Yc());if(e&&cn(t)){var o=Yn(t);if(o.position==="fixed")return null}var r=as(t);for(Yl(r)&&(r=r.host);cn(r)&&["html","body"].indexOf(An(r))<0;){var i=Yn(r);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||n&&i.willChange==="filter"||n&&i.filter&&i.filter!=="none")return r;r=r.parentNode}return null}function bi(t){for(var n=en(t),e=Zd(t);e&&p2(e)&&Yn(e).position==="static";)e=Zd(e);return e&&(An(e)==="html"||An(e)==="body"&&Yn(e).position==="static")?n:e||h2(t)||n}function Kl(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Qr(t,n,e){return Lo(t,ja(n,e))}function m2(t,n,e){var o=Qr(t,n,e);return o>e?e:o}function Gg(){return{top:0,right:0,bottom:0,left:0}}function Kg(t){return Object.assign({},Gg(),t)}function Zg(t,n){return n.reduce(function(e,o){return e[o]=t,e},{})}var g2=function(n,e){return n=typeof n=="function"?n(Object.assign({},e.rects,{placement:e.placement})):n,Kg(typeof n!="number"?n:Zg(n,wi))};function v2(t){var n,e=t.state,o=t.name,r=t.options,i=e.elements.arrow,a=e.modifiersData.popperOffsets,s=On(e.placement),l=Kl(s),u=[Ut,un].indexOf(s)>=0,f=u?"height":"width";if(!(!i||!a)){var d=g2(r.padding,e),p=Gl(i),h=l==="y"?zt:Ut,m=l==="y"?ln:un,v=e.rects.reference[f]+e.rects.reference[l]-a[l]-e.rects.popper[f],y=a[l]-e.rects.reference[l],x=bi(i),S=x?l==="y"?x.clientHeight||0:x.clientWidth||0:0,b=v/2-y/2,w=d[h],E=S-p[f]-d[m],j=S/2-p[f]/2+b,_=Qr(w,j,E),M=l;e.modifiersData[o]=(n={},n[M]=_,n.centerOffset=_-j,n)}}function y2(t){var n=t.state,e=t.options,o=e.element,r=o===void 0?"[data-popper-arrow]":o;r!=null&&(typeof r=="string"&&(r=n.elements.popper.querySelector(r),!r)||Yg(n.elements.popper,r)&&(n.elements.arrow=r))}const w2={name:"arrow",enabled:!0,phase:"main",fn:v2,effect:y2,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Cr(t){return t.split("-")[1]}var b2={top:"auto",right:"auto",bottom:"auto",left:"auto"};function x2(t,n){var e=t.x,o=t.y,r=n.devicePixelRatio||1;return{x:br(e*r)/r||0,y:br(o*r)/r||0}}function qd(t){var n,e=t.popper,o=t.popperRect,r=t.placement,i=t.variation,a=t.offsets,s=t.position,l=t.gpuAcceleration,u=t.adaptive,f=t.roundOffsets,d=t.isFixed,p=a.x,h=p===void 0?0:p,m=a.y,v=m===void 0?0:m,y=typeof f=="function"?f({x:h,y:v}):{x:h,y:v};h=y.x,v=y.y;var x=a.hasOwnProperty("x"),S=a.hasOwnProperty("y"),b=Ut,w=zt,E=window;if(u){var j=bi(e),_="clientHeight",M="clientWidth";if(j===en(e)&&(j=go(e),Yn(j).position!=="static"&&s==="absolute"&&(_="scrollHeight",M="scrollWidth")),j=j,r===zt||(r===Ut||r===un)&&i===di){w=ln;var F=d&&j===E&&E.visualViewport?E.visualViewport.height:j[_];v-=F-o.height,v*=l?1:-1}if(r===Ut||(r===zt||r===ln)&&i===di){b=un;var D=d&&j===E&&E.visualViewport?E.visualViewport.width:j[M];h-=D-o.width,h*=l?1:-1}}var A=Object.assign({position:s},u&&b2),P=f===!0?x2({x:h,y:v},en(e)):{x:h,y:v};if(h=P.x,v=P.y,l){var re;return Object.assign({},A,(re={},re[w]=S?"0":"",re[b]=x?"0":"",re.transform=(E.devicePixelRatio||1)<=1?"translate("+h+"px, "+v+"px)":"translate3d("+h+"px, "+v+"px, 0)",re))}return Object.assign({},A,(n={},n[w]=S?v+"px":"",n[b]=x?h+"px":"",n.transform="",n))}function C2(t){var n=t.state,e=t.options,o=e.gpuAcceleration,r=o===void 0?!0:o,i=e.adaptive,a=i===void 0?!0:i,s=e.roundOffsets,l=s===void 0?!0:s,u={placement:On(n.placement),variation:Cr(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:r,isFixed:n.options.strategy==="fixed"};n.modifiersData.popperOffsets!=null&&(n.styles.popper=Object.assign({},n.styles.popper,qd(Object.assign({},u,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:a,roundOffsets:l})))),n.modifiersData.arrow!=null&&(n.styles.arrow=Object.assign({},n.styles.arrow,qd(Object.assign({},u,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})}const S2={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:C2,data:{}};var Wi={passive:!0};function k2(t){var n=t.state,e=t.instance,o=t.options,r=o.scroll,i=r===void 0?!0:r,a=o.resize,s=a===void 0?!0:a,l=en(n.elements.popper),u=[].concat(n.scrollParents.reference,n.scrollParents.popper);return i&&u.forEach(function(f){f.addEventListener("scroll",e.update,Wi)}),s&&l.addEventListener("resize",e.update,Wi),function(){i&&u.forEach(function(f){f.removeEventListener("scroll",e.update,Wi)}),s&&l.removeEventListener("resize",e.update,Wi)}}const E2={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:k2,data:{}};var j2={left:"right",right:"left",bottom:"top",top:"bottom"};function Qi(t){return t.replace(/left|right|bottom|top/g,function(n){return j2[n]})}var O2={start:"end",end:"start"};function Jd(t){return t.replace(/start|end/g,function(n){return O2[n]})}function Zl(t){var n=en(t),e=n.pageXOffset,o=n.pageYOffset;return{scrollLeft:e,scrollTop:o}}function ql(t){return xr(go(t)).left+Zl(t).scrollLeft}function N2(t,n){var e=en(t),o=go(t),r=e.visualViewport,i=o.clientWidth,a=o.clientHeight,s=0,l=0;if(r){i=r.width,a=r.height;var u=Vg();(u||!u&&n==="fixed")&&(s=r.offsetLeft,l=r.offsetTop)}return{width:i,height:a,x:s+ql(t),y:l}}function I2(t){var n,e=go(t),o=Zl(t),r=(n=t.ownerDocument)==null?void 0:n.body,i=Lo(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=Lo(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-o.scrollLeft+ql(t),l=-o.scrollTop;return Yn(r||e).direction==="rtl"&&(s+=Lo(e.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}function Jl(t){var n=Yn(t),e=n.overflow,o=n.overflowX,r=n.overflowY;return/auto|scroll|overlay|hidden/.test(e+r+o)}function qg(t){return["html","body","#document"].indexOf(An(t))>=0?t.ownerDocument.body:cn(t)&&Jl(t)?t:qg(as(t))}function ei(t,n){var e;n===void 0&&(n=[]);var o=qg(t),r=o===((e=t.ownerDocument)==null?void 0:e.body),i=en(o),a=r?[i].concat(i.visualViewport||[],Jl(o)?o:[]):o,s=n.concat(a);return r?s:s.concat(ei(as(a)))}function Gc(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function P2(t,n){var e=xr(t,!1,n==="fixed");return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function Xd(t,n,e){return n===zg?Gc(N2(t,e)):$o(n)?P2(n,e):Gc(I2(go(t)))}function A2(t){var n=ei(as(t)),e=["absolute","fixed"].indexOf(Yn(t).position)>=0,o=e&&cn(t)?bi(t):t;return $o(o)?n.filter(function(r){return $o(r)&&Yg(r,o)&&An(r)!=="body"}):[]}function T2(t,n,e,o){var r=n==="clippingParents"?A2(t):[].concat(n),i=[].concat(r,[e]),a=i[0],s=i.reduce(function(l,u){var f=Xd(t,u,o);return l.top=Lo(f.top,l.top),l.right=ja(f.right,l.right),l.bottom=ja(f.bottom,l.bottom),l.left=Lo(f.left,l.left),l},Xd(t,a,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Jg(t){var n=t.reference,e=t.element,o=t.placement,r=o?On(o):null,i=o?Cr(o):null,a=n.x+n.width/2-e.width/2,s=n.y+n.height/2-e.height/2,l;switch(r){case zt:l={x:a,y:n.y-e.height};break;case ln:l={x:a,y:n.y+n.height};break;case un:l={x:n.x+n.width,y:s};break;case Ut:l={x:n.x-e.width,y:s};break;default:l={x:n.x,y:n.y}}var u=r?Kl(r):null;if(u!=null){var f=u==="y"?"height":"width";switch(i){case wr:l[u]=l[u]-(n[f]/2-e[f]/2);break;case di:l[u]=l[u]+(n[f]/2-e[f]/2);break}}return l}function fi(t,n){n===void 0&&(n={});var e=n,o=e.placement,r=o===void 0?t.placement:o,i=e.strategy,a=i===void 0?t.strategy:i,s=e.boundary,l=s===void 0?Xb:s,u=e.rootBoundary,f=u===void 0?zg:u,d=e.elementContext,p=d===void 0?Br:d,h=e.altBoundary,m=h===void 0?!1:h,v=e.padding,y=v===void 0?0:v,x=Kg(typeof y!="number"?y:Zg(y,wi)),S=p===Br?Qb:Br,b=t.rects.popper,w=t.elements[m?S:p],E=T2($o(w)?w:w.contextElement||go(t.elements.popper),l,f,a),j=xr(t.elements.reference),_=Jg({reference:j,element:b,strategy:"absolute",placement:r}),M=Gc(Object.assign({},b,_)),F=p===Br?M:j,D={top:E.top-F.top+x.top,bottom:F.bottom-E.bottom+x.bottom,left:E.left-F.left+x.left,right:F.right-E.right+x.right},A=t.modifiersData.offset;if(p===Br&&A){var P=A[r];Object.keys(D).forEach(function(re){var ae=[un,ln].indexOf(re)>=0?1:-1,z=[zt,ln].indexOf(re)>=0?"y":"x";D[re]+=P[z]*ae})}return D}function D2(t,n){n===void 0&&(n={});var e=n,o=e.placement,r=e.boundary,i=e.rootBoundary,a=e.padding,s=e.flipVariations,l=e.allowedAutoPlacements,u=l===void 0?Ug:l,f=Cr(o),d=f?s?Kd:Kd.filter(function(m){return Cr(m)===f}):wi,p=d.filter(function(m){return u.indexOf(m)>=0});p.length===0&&(p=d);var h=p.reduce(function(m,v){return m[v]=fi(t,{placement:v,boundary:r,rootBoundary:i,padding:a})[On(v)],m},{});return Object.keys(h).sort(function(m,v){return h[m]-h[v]})}function M2(t){if(On(t)===Vl)return[];var n=Qi(t);return[Jd(t),n,Jd(n)]}function _2(t){var n=t.state,e=t.options,o=t.name;if(!n.modifiersData[o]._skip){for(var r=e.mainAxis,i=r===void 0?!0:r,a=e.altAxis,s=a===void 0?!0:a,l=e.fallbackPlacements,u=e.padding,f=e.boundary,d=e.rootBoundary,p=e.altBoundary,h=e.flipVariations,m=h===void 0?!0:h,v=e.allowedAutoPlacements,y=n.options.placement,x=On(y),S=x===y,b=l||(S||!m?[Qi(y)]:M2(y)),w=[y].concat(b).reduce(function(L,O){return L.concat(On(O)===Vl?D2(n,{placement:O,boundary:f,rootBoundary:d,padding:u,flipVariations:m,allowedAutoPlacements:v}):O)},[]),E=n.rects.reference,j=n.rects.popper,_=new Map,M=!0,F=w[0],D=0;D<w.length;D++){var A=w[D],P=On(A),re=Cr(A)===wr,ae=[zt,ln].indexOf(P)>=0,z=ae?"width":"height",ee=fi(n,{placement:A,boundary:f,rootBoundary:d,altBoundary:p,padding:u}),q=ae?re?un:Ut:re?ln:zt;E[z]>j[z]&&(q=Qi(q));var ie=Qi(q),J=[];if(i&&J.push(ee[P]<=0),s&&J.push(ee[q]<=0,ee[ie]<=0),J.every(function(L){return L})){F=A,M=!1;break}_.set(A,J)}if(M)for(var W=m?3:1,Q=function(O){var I=w.find(function(B){var U=_.get(B);if(U)return U.slice(0,O).every(function(V){return V})});if(I)return F=I,"break"},Y=W;Y>0;Y--){var H=Q(Y);if(H==="break")break}n.placement!==F&&(n.modifiersData[o]._skip=!0,n.placement=F,n.reset=!0)}}const L2={name:"flip",enabled:!0,phase:"main",fn:_2,requiresIfExists:["offset"],data:{_skip:!1}};function Qd(t,n,e){return e===void 0&&(e={x:0,y:0}),{top:t.top-n.height-e.y,right:t.right-n.width+e.x,bottom:t.bottom-n.height+e.y,left:t.left-n.width-e.x}}function ef(t){return[zt,un,ln,Ut].some(function(n){return t[n]>=0})}function R2(t){var n=t.state,e=t.name,o=n.rects.reference,r=n.rects.popper,i=n.modifiersData.preventOverflow,a=fi(n,{elementContext:"reference"}),s=fi(n,{altBoundary:!0}),l=Qd(a,o),u=Qd(s,r,i),f=ef(l),d=ef(u);n.modifiersData[e]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:f,hasPopperEscaped:d},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":d})}const F2={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:R2};function B2(t,n,e){var o=On(t),r=[Ut,zt].indexOf(o)>=0?-1:1,i=typeof e=="function"?e(Object.assign({},n,{placement:t})):e,a=i[0],s=i[1];return a=a||0,s=(s||0)*r,[Ut,un].indexOf(o)>=0?{x:s,y:a}:{x:a,y:s}}function H2(t){var n=t.state,e=t.options,o=t.name,r=e.offset,i=r===void 0?[0,0]:r,a=Ug.reduce(function(f,d){return f[d]=B2(d,n.rects,i),f},{}),s=a[n.placement],l=s.x,u=s.y;n.modifiersData.popperOffsets!=null&&(n.modifiersData.popperOffsets.x+=l,n.modifiersData.popperOffsets.y+=u),n.modifiersData[o]=a}const $2={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:H2};function W2(t){var n=t.state,e=t.name;n.modifiersData[e]=Jg({reference:n.rects.reference,element:n.rects.popper,strategy:"absolute",placement:n.placement})}const z2={name:"popperOffsets",enabled:!0,phase:"read",fn:W2,data:{}};function U2(t){return t==="x"?"y":"x"}function V2(t){var n=t.state,e=t.options,o=t.name,r=e.mainAxis,i=r===void 0?!0:r,a=e.altAxis,s=a===void 0?!1:a,l=e.boundary,u=e.rootBoundary,f=e.altBoundary,d=e.padding,p=e.tether,h=p===void 0?!0:p,m=e.tetherOffset,v=m===void 0?0:m,y=fi(n,{boundary:l,rootBoundary:u,padding:d,altBoundary:f}),x=On(n.placement),S=Cr(n.placement),b=!S,w=Kl(x),E=U2(w),j=n.modifiersData.popperOffsets,_=n.rects.reference,M=n.rects.popper,F=typeof v=="function"?v(Object.assign({},n.rects,{placement:n.placement})):v,D=typeof F=="number"?{mainAxis:F,altAxis:F}:Object.assign({mainAxis:0,altAxis:0},F),A=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,P={x:0,y:0};if(j){if(i){var re,ae=w==="y"?zt:Ut,z=w==="y"?ln:un,ee=w==="y"?"height":"width",q=j[w],ie=q+y[ae],J=q-y[z],W=h?-M[ee]/2:0,Q=S===wr?_[ee]:M[ee],Y=S===wr?-M[ee]:-_[ee],H=n.elements.arrow,L=h&&H?Gl(H):{width:0,height:0},O=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:Gg(),I=O[ae],B=O[z],U=Qr(0,_[ee],L[ee]),V=b?_[ee]/2-W-U-I-D.mainAxis:Q-U-I-D.mainAxis,se=b?-_[ee]/2+W+U+B+D.mainAxis:Y+U+B+D.mainAxis,Z=n.elements.arrow&&bi(n.elements.arrow),T=Z?w==="y"?Z.clientTop||0:Z.clientLeft||0:0,me=(re=A==null?void 0:A[w])!=null?re:0,be=q+V-me-T,Ie=q+se-me,Oe=Qr(h?ja(ie,be):ie,q,h?Lo(J,Ie):J);j[w]=Oe,P[w]=Oe-q}if(s){var ke,ue=w==="x"?zt:Ut,k=w==="x"?ln:un,C=j[E],N=E==="y"?"height":"width",R=C+y[ue],$=C-y[k],ce=[zt,Ut].indexOf(x)!==-1,we=(ke=A==null?void 0:A[E])!=null?ke:0,X=ce?R:C-_[N]-M[N]-we+D.altAxis,ne=ce?C+_[N]+M[N]-we-D.altAxis:$,te=h&&ce?m2(X,C,ne):Qr(h?X:R,C,h?ne:$);j[E]=te,P[E]=te-C}n.modifiersData[o]=P}}const Y2={name:"preventOverflow",enabled:!0,phase:"main",fn:V2,requiresIfExists:["offset"]};function G2(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function K2(t){return t===en(t)||!cn(t)?Zl(t):G2(t)}function Z2(t){var n=t.getBoundingClientRect(),e=br(n.width)/t.offsetWidth||1,o=br(n.height)/t.offsetHeight||1;return e!==1||o!==1}function q2(t,n,e){e===void 0&&(e=!1);var o=cn(n),r=cn(n)&&Z2(n),i=go(n),a=xr(t,r,e),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(o||!o&&!e)&&((An(n)!=="body"||Jl(i))&&(s=K2(n)),cn(n)?(l=xr(n,!0),l.x+=n.clientLeft,l.y+=n.clientTop):i&&(l.x=ql(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function J2(t){var n=new Map,e=new Set,o=[];t.forEach(function(i){n.set(i.name,i)});function r(i){e.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(s){if(!e.has(s)){var l=n.get(s);l&&r(l)}}),o.push(i)}return t.forEach(function(i){e.has(i.name)||r(i)}),o}function X2(t){var n=J2(t);return l2.reduce(function(e,o){return e.concat(n.filter(function(r){return r.phase===o}))},[])}function Q2(t){var n;return function(){return n||(n=new Promise(function(e){Promise.resolve().then(function(){n=void 0,e(t())})})),n}}function ex(t){var n=t.reduce(function(e,o){var r=e[o.name];return e[o.name]=r?Object.assign({},r,o,{options:Object.assign({},r.options,o.options),data:Object.assign({},r.data,o.data)}):o,e},{});return Object.keys(n).map(function(e){return n[e]})}var tf={placement:"bottom",modifiers:[],strategy:"absolute"};function nf(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return!n.some(function(o){return!(o&&typeof o.getBoundingClientRect=="function")})}function tx(t){t===void 0&&(t={});var n=t,e=n.defaultModifiers,o=e===void 0?[]:e,r=n.defaultOptions,i=r===void 0?tf:r;return function(s,l,u){u===void 0&&(u=i);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},tf,i),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],p=!1,h={state:f,setOptions:function(x){var S=typeof x=="function"?x(f.options):x;v(),f.options=Object.assign({},i,f.options,S),f.scrollParents={reference:$o(s)?ei(s):s.contextElement?ei(s.contextElement):[],popper:ei(l)};var b=X2(ex([].concat(o,f.options.modifiers)));return f.orderedModifiers=b.filter(function(w){return w.enabled}),m(),h.update()},forceUpdate:function(){if(!p){var x=f.elements,S=x.reference,b=x.popper;if(nf(S,b)){f.rects={reference:q2(S,bi(b),f.options.strategy==="fixed"),popper:Gl(b)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(D){return f.modifiersData[D.name]=Object.assign({},D.data)});for(var w=0;w<f.orderedModifiers.length;w++){if(f.reset===!0){f.reset=!1,w=-1;continue}var E=f.orderedModifiers[w],j=E.fn,_=E.options,M=_===void 0?{}:_,F=E.name;typeof j=="function"&&(f=j({state:f,options:M,name:F,instance:h})||f)}}}},update:Q2(function(){return new Promise(function(y){h.forceUpdate(),y(f)})}),destroy:function(){v(),p=!0}};if(!nf(s,l))return h;h.setOptions(u).then(function(y){!p&&u.onFirstUpdate&&u.onFirstUpdate(y)});function m(){f.orderedModifiers.forEach(function(y){var x=y.name,S=y.options,b=S===void 0?{}:S,w=y.effect;if(typeof w=="function"){var E=w({state:f,name:x,instance:h,options:b}),j=function(){};d.push(E||j)}})}function v(){d.forEach(function(y){return y()}),d=[]}return h}}var nx=[E2,z2,S2,f2,$2,L2,Y2,w2,F2],ox=tx({defaultModifiers:nx}),rx=typeof Element<"u",ix=typeof Map=="function",ax=typeof Set=="function",sx=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function ea(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var e,o,r;if(Array.isArray(t)){if(e=t.length,e!=n.length)return!1;for(o=e;o--!==0;)if(!ea(t[o],n[o]))return!1;return!0}var i;if(ix&&t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(i=t.entries();!(o=i.next()).done;)if(!n.has(o.value[0]))return!1;for(i=t.entries();!(o=i.next()).done;)if(!ea(o.value[1],n.get(o.value[0])))return!1;return!0}if(ax&&t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(i=t.entries();!(o=i.next()).done;)if(!n.has(o.value[0]))return!1;return!0}if(sx&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if(e=t.length,e!=n.length)return!1;for(o=e;o--!==0;)if(t[o]!==n[o])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf&&typeof t.valueOf=="function"&&typeof n.valueOf=="function")return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString&&typeof t.toString=="function"&&typeof n.toString=="function")return t.toString()===n.toString();if(r=Object.keys(t),e=r.length,e!==Object.keys(n).length)return!1;for(o=e;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,r[o]))return!1;if(rx&&t instanceof Element)return!1;for(o=e;o--!==0;)if(!((r[o]==="_owner"||r[o]==="__v"||r[o]==="__o")&&t.$$typeof)&&!ea(t[r[o]],n[r[o]]))return!1;return!0}return t!==t&&n!==n}var cx=function(n,e){try{return ea(n,e)}catch(o){if((o.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw o}};const lx=rs(cx);var ux=[],dx=function(n,e,o){o===void 0&&(o={});var r=G.useRef(null),i={onFirstUpdate:o.onFirstUpdate,placement:o.placement||"bottom",strategy:o.strategy||"absolute",modifiers:o.modifiers||ux},a=G.useState({styles:{popper:{position:i.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=a[0],l=a[1],u=G.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(h){var m=h.state,v=Object.keys(m.elements);kf.flushSync(function(){l({styles:Yd(v.map(function(y){return[y,m.styles[y]||{}]})),attributes:Yd(v.map(function(y){return[y,m.attributes[y]]}))})})},requires:["computeStyles"]}},[]),f=G.useMemo(function(){var p={onFirstUpdate:i.onFirstUpdate,placement:i.placement,strategy:i.strategy,modifiers:[].concat(i.modifiers,[u,{name:"applyStyles",enabled:!1}])};return lx(r.current,p)?r.current||p:(r.current=p,p)},[i.onFirstUpdate,i.placement,i.strategy,i.modifiers,u]),d=G.useRef();return Gd(function(){d.current&&d.current.setOptions(f)},[f]),Gd(function(){if(!(n==null||e==null)){var p=o.createPopper||ox,h=p(n,e,f);return d.current=h,function(){h.destroy(),d.current=null}}},[n,e,o.createPopper]),{state:d.current?d.current.state:null,styles:s.styles,attributes:s.attributes,update:d.current?d.current.update:null,forceUpdate:d.current?d.current.forceUpdate:null}},fx=["className","cssModule","size","vertical","tag"];function Kc(){return Kc=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},Kc.apply(this,arguments)}function of(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,o)}return e}function px(t){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?of(Object(e),!0).forEach(function(o){hx(t,o,e[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):of(Object(e)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(e,o))})}return t}function hx(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function mx(t,n){if(t==null)return{};var e=gx(t,n),o,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)o=i[r],!(n.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(t,o)&&(e[o]=t[o])}return e}function gx(t,n){if(t==null)return{};var e={},o=Object.keys(t),r,i;for(i=0;i<o.length;i++)r=o[i],!(n.indexOf(r)>=0)&&(e[r]=t[r]);return e}var vx={"aria-label":fe.string,className:fe.string,cssModule:fe.object,role:fe.string,size:fe.string,tag:Ul,vertical:fe.bool};function Xg(t){var n=t.className,e=t.cssModule,o=t.size,r=t.vertical,i=t.tag,a=i===void 0?"div":i,s=mx(t,fx),l=is(it(n,o?"btn-group-"+o:!1,r?"btn-group-vertical":"btn-group"),e);return g.createElement(a,Kc({},px({role:"group"},s),{className:l}))}Xg.propTypes=vx;function yx(t,n){if(t==null)return{};var e={};for(var o in t)if({}.hasOwnProperty.call(t,o)){if(n.indexOf(o)!==-1)continue;e[o]=t[o]}return e}function Zc(t,n){return Zc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,o){return e.__proto__=o,e},Zc(t,n)}function wx(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,Zc(t,n)}const rf={disabled:!1};var bx=process.env.NODE_ENV!=="production"?fe.oneOfType([fe.number,fe.shape({enter:fe.number,exit:fe.number,appear:fe.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&fe.oneOfType([fe.string,fe.shape({enter:fe.string,exit:fe.string,active:fe.string}),fe.shape({enter:fe.string,enterDone:fe.string,enterActive:fe.string,exit:fe.string,exitDone:fe.string,exitActive:fe.string})]);const Qg=g.createContext(null);var xx=function(n){return n.scrollTop},Kr="unmounted",xo="exited",Co="entering",er="entered",qc="exiting",Zn=function(t){wx(n,t);function n(o,r){var i;i=t.call(this,o,r)||this;var a=r,s=a&&!a.isMounting?o.enter:o.appear,l;return i.appearStatus=null,o.in?s?(l=xo,i.appearStatus=Co):l=er:o.unmountOnExit||o.mountOnEnter?l=Kr:l=xo,i.state={status:l},i.nextCallback=null,i}n.getDerivedStateFromProps=function(r,i){var a=r.in;return a&&i.status===Kr?{status:xo}:null};var e=n.prototype;return e.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},e.componentDidUpdate=function(r){var i=null;if(r!==this.props){var a=this.state.status;this.props.in?a!==Co&&a!==er&&(i=Co):(a===Co||a===er)&&(i=qc)}this.updateStatus(!1,i)},e.componentWillUnmount=function(){this.cancelNextCallback()},e.getTimeouts=function(){var r=this.props.timeout,i,a,s;return i=a=s=r,r!=null&&typeof r!="number"&&(i=r.exit,a=r.enter,s=r.appear!==void 0?r.appear:a),{exit:i,enter:a,appear:s}},e.updateStatus=function(r,i){if(r===void 0&&(r=!1),i!==null)if(this.cancelNextCallback(),i===Co){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:oo.findDOMNode(this);a&&xx(a)}this.performEnter(r)}else this.performExit();else this.props.unmountOnExit&&this.state.status===xo&&this.setState({status:Kr})},e.performEnter=function(r){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:r,l=this.props.nodeRef?[s]:[oo.findDOMNode(this),s],u=l[0],f=l[1],d=this.getTimeouts(),p=s?d.appear:d.enter;if(!r&&!a||rf.disabled){this.safeSetState({status:er},function(){i.props.onEntered(u)});return}this.props.onEnter(u,f),this.safeSetState({status:Co},function(){i.props.onEntering(u,f),i.onTransitionEnd(p,function(){i.safeSetState({status:er},function(){i.props.onEntered(u,f)})})})},e.performExit=function(){var r=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:oo.findDOMNode(this);if(!i||rf.disabled){this.safeSetState({status:xo},function(){r.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:qc},function(){r.props.onExiting(s),r.onTransitionEnd(a.exit,function(){r.safeSetState({status:xo},function(){r.props.onExited(s)})})})},e.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},e.safeSetState=function(r,i){i=this.setNextCallback(i),this.setState(r,i)},e.setNextCallback=function(r){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,r(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},e.onTransitionEnd=function(r,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:oo.findDOMNode(this),s=r==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],f=l[1];this.props.addEndListener(u,f)}r!=null&&setTimeout(this.nextCallback,r)},e.render=function(){var r=this.state.status;if(r===Kr)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=yx(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return g.createElement(Qg.Provider,{value:null},typeof a=="function"?a(r,s):g.cloneElement(g.Children.only(a),s))},n}(g.Component);Zn.contextType=Qg;Zn.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:fe.shape({current:typeof Element>"u"?fe.any:function(t,n,e,o,r,i){var a=t[n];return fe.instanceOf(a&&"ownerDocument"in a?a.ownerDocument.defaultView.Element:Element)(t,n,e,o,r,i)}}),children:fe.oneOfType([fe.func.isRequired,fe.element.isRequired]).isRequired,in:fe.bool,mountOnEnter:fe.bool,unmountOnExit:fe.bool,appear:fe.bool,enter:fe.bool,exit:fe.bool,timeout:function(n){var e=bx;n.addEndListener||(e=e.isRequired);for(var o=arguments.length,r=new Array(o>1?o-1:0),i=1;i<o;i++)r[i-1]=arguments[i];return e.apply(void 0,[n].concat(r))},addEndListener:fe.func,onEnter:fe.func,onEntering:fe.func,onEntered:fe.func,onExit:fe.func,onExiting:fe.func,onExited:fe.func}:{};function Ko(){}Zn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ko,onEntering:Ko,onEntered:Ko,onExit:Ko,onExiting:Ko,onExited:Ko};Zn.UNMOUNTED=Kr;Zn.EXITED=xo;Zn.ENTERING=Co;Zn.ENTERED=er;Zn.EXITING=qc;const Xl=Zn;function Jc(t){"@babel/helpers - typeof";return Jc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Jc(t)}var Cx=["tag","horizontal","isOpen","className","navbar","cssModule","children","innerRef"],Zo;function Oa(){return Oa=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},Oa.apply(this,arguments)}function Sx(t,n){if(t==null)return{};var e=kx(t,n),o,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)o=i[r],!(n.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(t,o)&&(e[o]=t[o])}return e}function kx(t,n){if(t==null)return{};var e={},o=Object.keys(t),r,i;for(i=0;i<o.length;i++)r=o[i],!(n.indexOf(r)>=0)&&(e[r]=t[r]);return e}function Ex(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function af(t,n){for(var e=0;e<n.length;e++){var o=n[e];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function jx(t,n,e){return n&&af(t.prototype,n),e&&af(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ox(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&Xc(t,n)}function Xc(t,n){return Xc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,r){return o.__proto__=r,o},Xc(t,n)}function Nx(t){var n=Px();return function(){var o=Na(t),r;if(n){var i=Na(this).constructor;r=Reflect.construct(o,arguments,i)}else r=o.apply(this,arguments);return Ix(this,r)}}function Ix(t,n){if(n&&(Jc(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return e0(t)}function e0(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Px(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Na(t){return Na=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Na(t)}function sf(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,o)}return e}function Sr(t){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?sf(Object(e),!0).forEach(function(o){sr(t,o,e[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):sf(Object(e)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(e,o))})}return t}function sr(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var Ax=Sr(Sr({},Xl.propTypes),{},{horizontal:fe.bool,isOpen:fe.bool,children:fe.oneOfType([fe.arrayOf(fe.node),fe.node]),tag:Ul,className:fe.node,navbar:fe.bool,cssModule:fe.object,innerRef:fe.shape({current:fe.object})}),Tx=Sr(Sr({},Xl.defaultProps),{},{horizontal:!1,isOpen:!1,appear:!1,enter:!0,exit:!0,tag:"div",timeout:$b.Collapse}),Dx=(Zo={},sr(Zo,$i.ENTERING,"collapsing"),sr(Zo,$i.ENTERED,"collapse show"),sr(Zo,$i.EXITING,"collapsing"),sr(Zo,$i.EXITED,"collapse"),Zo);function Mx(t){return Dx[t]||"collapse"}var Ql=function(t){Ox(e,t);var n=Nx(e);function e(o){var r;return Ex(this,e),r=n.call(this,o),r.state={dimension:null},r.nodeRef=o.innerRef||g.createRef(),["onEntering","onEntered","onExit","onExiting","onExited"].forEach(function(i){r[i]=r[i].bind(e0(r))}),r}return jx(e,[{key:"onEntering",value:function(r,i){var a=this.getNode();this.setState({dimension:this.getDimension(a)}),this.props.onEntering(a,i)}},{key:"onEntered",value:function(r,i){var a=this.getNode();this.setState({dimension:null}),this.props.onEntered(a,i)}},{key:"onExit",value:function(){var r=this.getNode();this.setState({dimension:this.getDimension(r)}),this.props.onExit(r)}},{key:"onExiting",value:function(){var r=this.getNode();this.getDimension(r),this.setState({dimension:0}),this.props.onExiting(r)}},{key:"onExited",value:function(){var r=this.getNode();this.setState({dimension:null}),this.props.onExited(r)}},{key:"getNode",value:function(){return this.nodeRef.current}},{key:"getDimension",value:function(r){return this.props.horizontal?r.scrollWidth:r.scrollHeight}},{key:"render",value:function(){var r=this,i=this.props,a=i.tag,s=i.horizontal,l=i.isOpen,u=i.className,f=i.navbar,d=i.cssModule,p=i.children;i.innerRef;var h=Sx(i,Cx),m=this.state.dimension,v=Fb(h,Ud),y=Rb(h,Ud);return g.createElement(Xl,Oa({},v,{in:l,nodeRef:this.nodeRef,onEntering:this.onEntering,onEntered:this.onEntered,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}),function(x){var S=Mx(x),b=is(it(u,s&&"collapse-horizontal",S,f&&"navbar-collapse"),d),w=m===null?null:sr({},s?"width":"height",m);return g.createElement(a,Oa({},y,{style:Sr(Sr({},y.style),w),className:b,ref:r.nodeRef}),p)})}}]),e}(g.Component);Ql.propTypes=Ax;Ql.defaultProps=Tx;const t0=Ql,_x=t=>{const{className:n,isOpen:e,showCollapseIcon:o,showFolderIcon:r,title:i,...a}=t;return c.jsx(mt.ItemHeader,{className:it("io-base-section-header",n),prepend:r&&c.jsx(lt,{size:"16",variant:e?"folder-open":"folder","data-testid":"base-section-header-folder-icon"}),append:o&&c.jsx(Ge,{className:it("collapse-icon",!e&&"collapsed"),iconSize:"10",size:"16",icon:"expand","data-testid":"base-section-header-collapse-icon"}),tooltip:i,...a,children:i})},n0=()=>{const[t,n]=g.useState([]),e=g.useContext(_e.IOConnectContext);return g.useEffect(()=>{if(!e)return;const o=l=>{const{name:u,title:f,caption:d,icon:p,userProperties:h}=l;return{id:u,name:u,title:f??u,caption:d,icon:p,userProperties:h}},r=e.appManager.onAppAdded(l=>{if(l.userProperties.hidden||"hidden"in l&&l.hidden)return;const u=o(l);n(f=>[...f,u])}),i=e.appManager.onAppChanged(l=>{if(l.userProperties.hidden||"hidden"in l&&l.hidden)return;const u=o(l);n(f=>[...f.filter(d=>d.id!==u.id),u])}),a=e.appManager.onAppRemoved(l=>{const u=o(l);n(f=>f.filter(d=>d.id!==u.id))}),s=[r,a,i];return()=>s.forEach(l=>l())},[e]),t},Lx=()=>{const[t,n]=g.useState({}),e=g.useContext(_e.IOConnectContext);return g.useEffect(()=>{if(!e)return;const o=e.appManager.onInstanceStarted(a=>{n(s=>{const l=s[a.application.name]??[];return{...s,[a.application.name]:[...l,a.id]}})}),r=e.appManager.onInstanceStopped(a=>{n(s=>{const l=s[a.application.name];return l?{...s,[a.application.name]:l.filter(u=>u!==a.id)}:s})}),i=[o,r];return()=>i.forEach(a=>a())},[e]),t},Rx=t=>{g.useEffect(()=>{var e;if(!((e=window.iobrowser)!=null&&e.platformStarted)||t)return;const n=o=>{o.preventDefault(),o.returnValue=!0};return window.addEventListener("beforeunload",n),()=>window.removeEventListener("beforeunload",n)},[t])},eu=()=>{const[t,n]=g.useState(),e=g.useContext(_e.IOConnectContext);return g.useEffect(()=>{var o;try{const i=!((o=e.windows.my())!=null&&o.name)?hr.getFrameId():void 0;n(i)}catch(r){console.error("Failed to get the current frame ID ",{error:r})}},[e,hr.getFrameId,n]),t},Fe={SUCCESS:"success",WARNING:"warning"},Fx={success:5*1e3,warning:10*1e3},He=async t=>{const{io:n,variant:e,text:o,error:r}=t,i=Hc(r);try{if(e===Fe.WARNING&&n.logger.warn(i?`${o} ${i}`:o),!("modals"in n&&n.modals))throw new Error("Modals are not enabled.");const a={text:o,variant:e,ttl:Fx[e]};await n.modals.alerts.request(a)}catch(a){n.logger.warn(`Failed to request alert. ${Hc(a)}`)}},Bx=async t=>{var o;const{io:n,item:e}=t;try{await((o=n.appManager.application(e.id))==null?void 0:o.start())}catch(r){await He({io:n,variant:Fe.WARNING,text:`Failed to start app "${e.title}" in a new window.`,error:r})}},Hx=async t=>{const{io:n,item:e,frameId:o}=t;if(!n.workspaces)return;const r={type:"workspace",definition:{frame:o?{reuseFrameId:o}:{newFrame:!0}}},i=n.workspaces.getBuilder(r);i.addGroup().addWindow({appName:e.id});try{await i.create()}catch(a){await He({io:n,variant:Fe.WARNING,text:`Failed to start app "${e.title}" in a new Workspace.`,error:a})}},$x={[Ca.OPEN_IN_NEW_WINDOW]:Bx,[Ca.OPEN_IN_NEW_WORKSPACE]:Hx},o0=()=>{const t=g.useContext(_e.IOConnectContext),n=eu();return(e,o)=>{$x[o]({io:t,item:e,frameId:n})}},Ir={NO_INPUTS_CONFIRMATION_DIALOG:"noInputsConfirmationDialog",SINGLE_CHECKBOX_DIALOG:"singleCheckboxDialog",SINGLE_TEXT_INPUT_DIALOG:"singleTextInputDialog"},tu="(.|\\s)*\\S(.|\\s)*",Wx=async t=>{var i;const{io:n,layout:e,showDeletePromptPref:o,updateShowDeletePromptPref:r}=t;if("modals"in n&&n.modals&&o){const a="delete",s="do-not-ask-again",{isEnterPressed:l,responseButtonClicked:u,inputs:f}=await n.modals.dialogs.request({templateName:Ir.SINGLE_CHECKBOX_DIALOG,variables:{heading:`Delete Layout "${e.name}"`,text:"Are you sure you want to delete this Layout?",checkbox:{id:s,label:"Don't ask me again"},actionButtons:[{variant:"critical",text:"Delete",id:a},{variant:"outline",text:"Cancel",id:"cancel",autofocus:!0}]}});if(((i=f==null?void 0:f.find(h=>h.id===s))==null?void 0:i.checked)&&r(!1),!(l||(u==null?void 0:u.id)===a))return}try{await n.layouts.remove("Global",e.name),e.isDefault&&await n.layouts.clearDefaultGlobal(),await He({io:n,variant:Fe.SUCCESS,text:`Layout "${e.name}" was successfully deleted.`})}catch(a){await He({io:n,variant:Fe.WARNING,text:`Failed to delete Layout "${e.name}".`,error:a})}},zx=async t=>{var d;const{io:n,layout:e,setDefaultLayout:o}=t;if(!("modals"in n&&n.modals)){console.error("Cannot rename Layout because io dialogs are not enabled");return}const r="rename",i="new-layout-name",{isEnterPressed:a,responseButtonClicked:s,inputs:l}=await n.modals.dialogs.request({templateName:Ir.SINGLE_TEXT_INPUT_DIALOG,variables:{heading:`Rename "${e.name}"`,input:{id:i,initialValue:e.name,validation:{disabledButtonIds:[r],errorMessage:"Please provide a Layout name",regexPattern:tu}},actionButtons:[{variant:"primary",text:"Rename",id:r},{variant:"outline",text:"Cancel",id:"cancel"}]}}),u=(d=l==null?void 0:l.find(p=>p.id===i))==null?void 0:d.value;if(a||(s==null?void 0:s.id)===r){if(u===e.name){await He({io:n,variant:Fe.WARNING,text:`Failed to rename Layout "${e.name}". The new Layout name must be different from the current one.`});return}try{if((await n.layouts.getAll("Global")).find(m=>m.name===u)){await He({io:n,variant:Fe.WARNING,text:`Failed to rename Layout "${e.name}" to "${u}". A Layout with name "${u}" already exists.`});return}const h=await n.layouts.get(e.name,"Global");if(!h){await He({io:n,variant:Fe.WARNING,text:`Failed to rename Layout "${e.name}". The Layout wasn't found.`});return}await n.layouts.rename(h,u),e.isDefault&&await o({name:u}),await He({io:n,variant:Fe.SUCCESS,text:`Layout "${e.name}" was successfully renamed to "${u}".`})}catch(p){await He({io:n,variant:Fe.WARNING,text:`Failed to rename Layout "${e.name}".`,error:p})}}},Ux=async t=>{const{io:n,layout:e}=t;try{await n.layouts.save({name:e.name,type:"Global"}),await He({io:n,variant:Fe.SUCCESS,text:`Layout "${e.name}" was saved successfully.`})}catch(o){await He({io:n,variant:Fe.WARNING,text:`Failed to save Layout "${e.name}".`,error:o})}},Vx=async t=>{var d;const{io:n,layout:e,setActiveLayout:o}=t;if(!("modals"in n&&n.modals)){console.error("Cannot save Layout under a new name because io dialogs are not enabled");return}const r="save-as",i="layout-name",{isEnterPressed:a,responseButtonClicked:s,inputs:l}=await n.modals.dialogs.request({templateName:Ir.SINGLE_TEXT_INPUT_DIALOG,variables:{heading:`Save Layout "${e.name}" as`,input:{id:i,initialValue:e.name,validation:{disabledButtonIds:[r],errorMessage:"Please provide a Layout name",regexPattern:tu}},actionButtons:[{variant:"primary",text:"Save as",id:r},{variant:"outline",text:"Cancel",id:"cancel"}]}}),u=(d=l==null?void 0:l.find(p=>p.id===i))==null?void 0:d.value;if(a||(s==null?void 0:s.id)===r){if(u===e.name){await He({io:n,variant:Fe.WARNING,text:`Failed to save Layout as "${u}". The new Layout must have a unique name.`});return}try{if((await n.layouts.getAll("Global")).find(m=>m.name===u)){await He({io:n,variant:Fe.WARNING,text:`Failed to save Layout as "${u}". A Layout with this name already exists.`});return}const h=await n.layouts.get(e.name,"Global");if(!h){await He({io:n,variant:Fe.WARNING,text:`Failed to save Layout "${e.name}". The Layout wasn't found.`});return}await n.layouts.import([{...h,name:u}],"merge"),e.isActive&&o({name:u}),await He({io:n,variant:Fe.SUCCESS,text:`The Layout was successfully saved as "${u}".`})}catch(p){await He({io:n,variant:Fe.WARNING,text:`Failed to save Layout "${u}".`,error:p})}}},Yx=async t=>{const{io:n,layout:e,setDefaultLayout:o}=t;try{await o({name:e.name}),await He({io:n,variant:Fe.SUCCESS,text:`Layout "${e.name}" was successfully set as the default Layout.`})}catch{await He({io:n,variant:Fe.WARNING,text:`Failed to set Layout "${e.name}" as the default Layout.`})}},Gx=async t=>{const{io:n,layout:e,closeLaunchpad:o}=t;try{await n.layouts.restore({name:e.name}),o(),await He({io:n,variant:Fe.SUCCESS,text:`Layout "${e.name}" was loaded successfully.`})}catch(r){await He({io:n,variant:Fe.WARNING,text:`Failed to load Layout "${e.name}".`,error:r})}},Kx={delete:Wx,rename:zx,save:Ux,saveAs:Vx,setAsDefault:Yx,load:Gx},Zx="interopio_home_ui_auth0_validation_error",qx="interopio_home_ui_user",Jx="interopio_home_ui_platform_window",xi="interopio_home_ui_platform_setup",r0="interopio_home_ui_active_layout";var xt=function(t){return{ok:!0,result:t}},ft=function(t){return{ok:!1,error:t}},Xx=function(t){return t.ok===!0?Promise.resolve(t.result):Promise.reject(t.error)},Qx=function(t,n){return n.ok===!0?n.result:t},eC=function(t){if(t.ok===!0)return t.result;throw t.error},tC=function(t,n){return n.ok===!0?xt(t(n.result)):n},cf=function(t,n,e){return n.ok===!1?n:e.ok===!1?e:xt(t(n.result,e.result))},Zs=function(t,n){return n.ok===!0?n:ft(t(n.error))},nC=function(t,n){return n.ok===!0?t(n.result):n};/*! *****************************************************************************
44
44
  Copyright (c) Microsoft Corporation.
45
45
 
46
46
  Permission to use, copy, modify, and/or distribute this software for any
@@ -53,17 +53,17 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
53
53
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
54
54
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
55
55
  PERFORMANCE OF THIS SOFTWARE.
56
- ***************************************************************************** */var qc=function(){return qc=Object.assign||function(n){for(var e,o=1,r=arguments.length;o<r;o++){e=arguments[o];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}return n},qc.apply(this,arguments)};function Qx(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(e[o[r]]=t[o[r]]);return e}function Jc(t,n){if(t===n||t===null&&n===null)return!0;if(typeof t!=typeof n)return!1;if(typeof t=="object"){if(Array.isArray(t)){if(!Array.isArray(n)||t.length!==n.length)return!1;for(var e=0;e<t.length;e++)if(!Jc(t[e],n[e]))return!1;return!0}var o=Object.keys(t);if(o.length!==Object.keys(n).length)return!1;for(var e=0;e<o.length;e++)if(!n.hasOwnProperty(o[e])||!Jc(t[o[e]],n[o[e]]))return!1;return!0}}var Kr=function(t){return Array.isArray(t)},Hi=function(t){return typeof t=="object"&&t!==null&&!Kr(t)},eC=function(t){switch(typeof t){case"string":return"a string";case"number":return"a number";case"boolean":return"a boolean";case"undefined":return"undefined";case"object":return t instanceof Array?"an array":t===null?"null":"an object";default:return JSON.stringify(t)}},Rn=function(t,n){return"expected "+t+", got "+eC(n)},Br=function(t){return t.map(function(n){return typeof n=="string"?"."+n:"["+n+"]"}).join("")},Hr=function(t,n){var e=n.at,o=Qx(n,["at"]);return qc({at:t+(e||"")},o)},yt=function(){function t(n){var e=this;this.decode=n,this.run=function(o){return Ys(function(r){return{kind:"DecoderError",input:o,at:"input"+(r.at||""),message:r.message||""}},e.decode(o))},this.runPromise=function(o){return Kx(e.run(o))},this.runWithException=function(o){return qx(e.run(o))},this.map=function(o){return new t(function(r){return Jx(o,e.decode(r))})},this.andThen=function(o){return new t(function(r){return Xx(function(i){return o(i).decode(r)},e.decode(r))})},this.where=function(o,r){return e.andThen(function(i){return o(i)?t.succeed(i):t.fail(r)})}}return t.string=function(){return new t(function(n){return typeof n=="string"?xt(n):ft({message:Rn("a string",n)})})},t.number=function(){return new t(function(n){return typeof n=="number"?xt(n):ft({message:Rn("a number",n)})})},t.boolean=function(){return new t(function(n){return typeof n=="boolean"?xt(n):ft({message:Rn("a boolean",n)})})},t.constant=function(n){return new t(function(e){return Jc(e,n)?xt(n):ft({message:"expected "+JSON.stringify(n)+", got "+JSON.stringify(e)})})},t.object=function(n){return new t(function(e){if(Hi(e)&&n){var o={};for(var r in n)if(n.hasOwnProperty(r)){var i=n[r].decode(e[r]);if(i.ok===!0)i.result!==void 0&&(o[r]=i.result);else return e[r]===void 0?ft({message:"the key '"+r+"' is required but was not present"}):ft(Hr("."+r,i.error))}return xt(o)}else return Hi(e)?xt(e):ft({message:Rn("an object",e)})})},t.array=function(n){return new t(function(e){if(Kr(e)&&n){var o=function(r,i){return Ys(function(a){return Hr("["+i+"]",a)},n.decode(r))};return e.reduce(function(r,i,a){return rf(function(s,l){return s.concat([l])},r,o(i,a))},xt([]))}else return Kr(e)?xt(e):ft({message:Rn("an array",e)})})},t.tuple=function(n){return new t(function(e){if(Kr(e)){if(e.length!==n.length)return ft({message:"expected a tuple of length "+n.length+", got one of length "+e.length});for(var o=[],r=0;r<n.length;r++){var i=n[r].decode(e[r]);if(i.ok)o[r]=i.result;else return ft(Hr("["+r+"]",i.error))}return xt(o)}else return ft({message:Rn("a tuple of length "+n.length,e)})})},t.union=function(n,e){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];return t.oneOf.apply(t,[n,e].concat(o))},t.intersection=function(n,e){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];return new t(function(i){return[n,e].concat(o).reduce(function(a,s){return rf(Object.assign,a,s.decode(i))},xt({}))})},t.anyJson=function(){return new t(function(n){return xt(n)})},t.unknownJson=function(){return new t(function(n){return xt(n)})},t.dict=function(n){return new t(function(e){if(Hi(e)){var o={};for(var r in e)if(e.hasOwnProperty(r)){var i=n.decode(e[r]);if(i.ok===!0)o[r]=i.result;else return ft(Hr("."+r,i.error))}return xt(o)}else return ft({message:Rn("an object",e)})})},t.optional=function(n){return new t(function(e){return e==null?xt(void 0):n.decode(e)})},t.oneOf=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return new t(function(o){for(var r=[],i=0;i<n.length;i++){var a=n[i].decode(o);if(a.ok===!0)return a;r[i]=a.error}var s=r.map(function(l){return"at error"+(l.at||"")+": "+l.message}).join('", "');return ft({message:'expected a value matching one of the decoders, got the errors ["'+s+'"]'})})},t.withDefault=function(n,e){return new t(function(o){return xt(Zx(n,e.decode(o)))})},t.valueAt=function(n,e){return new t(function(o){for(var r=o,i=0;i<n.length;i++){if(r===void 0)return ft({at:Br(n.slice(0,i+1)),message:"path does not exist"});if(typeof n[i]=="string"&&!Hi(r))return ft({at:Br(n.slice(0,i+1)),message:Rn("an object",r)});if(typeof n[i]=="number"&&!Kr(r))return ft({at:Br(n.slice(0,i+1)),message:Rn("an array",r)});r=r[n[i]]}return Ys(function(a){return r===void 0?{at:Br(n),message:"path does not exist"}:Hr(Br(n),a)},e.decode(r))})},t.succeed=function(n){return new t(function(e){return xt(n)})},t.fail=function(n){return new t(function(e){return ft({message:n})})},t.lazy=function(n){return new t(function(e){return n().decode(e)})},t}(),tC=yt.string,nC=yt.number,Sr=yt.boolean,Dt=yt.anyJson;yt.unknownJson;var po=yt.constant,ot=yt.object,oC=yt.array;yt.tuple;yt.dict;var Le=yt.optional,fi=yt.oneOf;yt.union;yt.intersection;yt.withDefault;yt.valueAt;yt.succeed;var rC=yt.fail;yt.lazy;const Ht=tC().where(t=>t.length>0,"Expected a non-empty string"),iC=nC().where(t=>t>=0,"Expected a non-negative number");Sr();const tn=(t,n)=>{const e=typeof t;return e==="function"?Dt():rC(`The provided argument as ${n} should be of type function, provided: ${typeof e}`)},t0=ot({name:Ht}),aC="Welcome",sC=t=>t.components.reduce((e,o)=>{if(o.type==="workspaceFrame"){const r=o.state.workspaces.map(i=>i.config.name);e.push(...r)}return e},[]),n0=t=>t.trim().length>0,cC=(t,n)=>{const[e,o]=g.useState(void 0),[r,i]=Tn("sessionStorage",e0,t0),a=g.useRef(!1),s=ru(),l=iu(),u=g.useContext(_e.IOConnectContext),f=g.useCallback(async({name:d})=>{try{await u.layouts.setDefaultGlobal(d)}catch(p){console.error("Failed to set default Layout: ",{error:p})}},[u]);return g.useEffect(()=>{if(u)return u.layouts.onDefaultGlobalChanged(d=>{o(d)})},[u]),g.useEffect(()=>{if(u)return u.layouts.onRestored(d=>{i({name:d.name})})},[u]),g.useEffect(()=>{if(u)return u.layouts.onRemoved(d=>{(d==null?void 0:d.name)===(r==null?void 0:r.name)&&i(null)})},[u,r]),g.useEffect(()=>{if(u)return u.layouts.onRenamed((d,p)=>{(p==null?void 0:p.name)===(r==null?void 0:r.name)&&i({name:d.name})})},[u,r]),g.useEffect(()=>{var p;if(!u||!((p=window.iobrowser)!=null&&p.platformStarted)||a.current)return;(async()=>{var w;a.current=!0;const h=await u.layouts.getDefaultGlobal()??(await u.layouts.getAll("Global")).find(k=>k.name===aC);if(!h||(o({name:h.name}),r))return;if(t(!0),n){await s(h.name),t(!1);return}const m=await((w=u.workspaces)==null?void 0:w.getWorkspace(k=>k.children.length===0)),v=await u.layouts.get(h.name,"Global");if(!v)throw new Error("Default Global Layout not found.");const y=sC(v);Promise.all(y.map((k,x)=>l({id:k,reuseWorkspaceId:x===0?m==null?void 0:m.id:void 0}))),t(!1)})().catch(h=>console.error("Initial Global Layout setup failed. ",Rc(h)))},[u,r,s,l,n]),{defaultLayout:e,activeLayout:r,setDefaultLayout:f,setActiveLayout:i}},o0=g.createContext(void 0),wn=()=>{const t=g.useContext(o0);if(t===void 0)throw new Error("useLaunchpadAPI must be used within a LaunchpadAPIProvider");return t},lC=({children:t,close:n,isOpen:e,isGlobalLayoutsAvailable:o})=>{const[r,i]=g.useState(!1),{defaultLayout:a,activeLayout:s,setDefaultLayout:l,setActiveLayout:u}=cC(i,o),f=g.useMemo(()=>({close:n,isOpen:e,defaultLayout:a,activeLayout:s,setDefaultLayout:l,setActiveLayout:u,isLayoutOperationBlocked:r,setIsLayoutOperationBlocked:i,isGlobalLayoutsAvailable:o}),[n,e,a,s,l,u,r,o]);return c.jsx(o0.Provider,{value:f,children:t})},Ir={CUSTOM_PREFS:"customPrefs",COLLAPSED_SECTIONS:"_launchpad_collapsedSections",FAVORITES:"_launchpad_favorites",IS_LAYOUTS_PANEL_OPEN:"_launchpad_isLayoutsPanelOpen",IS_LAUNCHPAD_COLLAPSED:"_launchpad_isCollapsed",IS_LAUNCHPAD_PINNED:"_launchpad_isPinned",LAYOUTS_SHOW_DELETE_PROMPT:"_layouts_showDeletePrompt"},zo=()=>{const{value:t,update:n,isLoading:e,error:o}=Xt({prefKey:Ir.IS_LAUNCHPAD_PINNED}),r=g.useCallback(()=>n(i=>!i),[n]);return{error:o,isLaunchpadPinned:t,isLoading:e,toggle:r}},r0=()=>{const t=g.useContext(_e.IOConnectContext),{setActiveLayout:n,setDefaultLayout:e,close:o}=wn(),{isLaunchpadPinned:r}=zo(),{value:i,update:a}=Xt({prefKey:Ir.LAYOUTS_SHOW_DELETE_PROMPT}),s=()=>{r||o==null||o()};return g.useCallback(async u=>{const{layout:f,actionName:d}=u;return await Ux[d]({io:t,layout:f,setActiveLayout:n,setDefaultLayout:e,closeLaunchpad:s,showDeletePromptPref:i,updateShowDeletePromptPref:a})},[t,e,n,o,i,a])},Pr=()=>{const{isLayoutOperationBlocked:t,setIsLayoutOperationBlocked:n}=wn();return async e=>{if(!t){n(!0);try{await e()}catch(o){console.error("Layout operation failed: ",{error:o})}n(!1)}}},i0={CREATE_WORKSPACE:"createWorkspace"},uC=async t=>{const{io:n,item:e}=t;if(n.workspaces)try{await n.workspaces.restoreWorkspace(e.id,{newFrame:!0})}catch(o){await He({io:n,variant:Fe.WARNING,text:`Failed to load Workspace "${e.title}".`,error:o})}},dC=async t=>{const{io:n,item:e,removeFavorite:o}=t;if(n.workspaces){if("modals"in n&&n.modals){const r="delete",{isEnterPressed:i,responseButtonClicked:a}=await n.modals.dialogs.request({templateName:Nr.NO_INPUTS_CONFIRMATION_DIALOG,variables:{heading:`Delete "${e.title}"`,text:"Are you sure you want to delete this Workspace?",actionButtons:[{variant:"critical",text:"Delete",id:r},{variant:"outline",text:"Cancel",id:"cancel",autofocus:!0}]}});if(!(i||(a==null?void 0:a.id)===r))return}try{await n.workspaces.layouts.delete(e.id),await o(e),await He({io:n,variant:Fe.SUCCESS,text:`"Workspace ${e.title}" was successfully deleted.`})}catch(r){await He({io:n,variant:Fe.WARNING,text:`Failed to delete Workspace "${e.title}".`,error:r})}}},fC=async t=>{const{io:n}=t;if(n.workspaces)try{await n.workspaces.createWorkspace({children:[],frame:{newFrame:!0}})}catch(e){await He({io:n,variant:Fe.WARNING,text:"Failed to create a new Workspace.",error:e})}},pC={[wa.OPEN_IN_NEW_WINDOW]:uC,[wa.DELETE]:dC,[i0.CREATE_WORKSPACE]:fC};class a0{constructor(){Lt(this,"queue",[]);Lt(this,"isExecutingQueue",!1)}enqueue(n){return new Promise((e,o)=>{this.queue.push({action:n,resolve:e,reject:o}),this.executeQueue()})}async executeQueue(){if(!this.isExecutingQueue){for(this.isExecutingQueue=!0;this.queue.length;){const n=this.queue.shift();if(!n){this.isExecutingQueue=!1;return}try{const e=await n.action();n.resolve(e)}catch(e){n.reject(e)}await this.intervalBreak()}this.isExecutingQueue=!1}}intervalBreak(){return new Promise(n=>setTimeout(n,0))}}const s0=()=>{const[t,n]=g.useState([]),e=g.useContext(_e.IOConnectContext);return g.useEffect(()=>{if(!(e!=null&&e.workspaces))return;let o=!1;const r=e.workspaces.layouts.onSaved(({name:a})=>{o||t.find(({id:s})=>s===a)||n(s=>[...s,{id:a,title:a}])}),i=e.workspaces.layouts.onRemoved(({name:a})=>{o||n(s=>s.filter(({title:l})=>l!==a))});return()=>{o=!0,[r,i].forEach(async a=>{try{(await a)()}catch(s){console.error(s)}})}},[e,t]),t},af=new a0,rs=()=>{const{value:t,update:n,isLoading:e}=Xt({prefKey:Ir.FAVORITES}),o=Xg(),r=s0(),i=g.useMemo(()=>(t??[]).filter(l=>l.type===jt.APPLICATION?o.some(u=>u.id===l.id):l.type===jt.WORKSPACE?r.some(u=>u.id===l.id):!0),[t,o,r]),a=g.useCallback(({openInstances:l,...u})=>af.enqueue(()=>n((f=[])=>{const d=f.find(p=>p.id===u.id&&p.type&&u.type);return d?f.filter(p=>p!==d):[u,...f]})),[n]),s=g.useCallback(l=>af.enqueue(()=>n((u=[])=>u.filter(f=>!(f.id===l.id&&f.type===l.type)))),[n]);return{favorites:i,toggleFavorite:a,removeFavorite:s,isLoading:e}},c0=()=>{const t=g.useContext(_e.IOConnectContext),{removeFavorite:n}=rs();return(e,o)=>{pC[o]({io:t,item:e,removeFavorite:n})}},hC=()=>{const t=g.useContext(_e.IOConnectContext);return async n=>t.interop.methods().every(e=>e.name!==(n==null?void 0:n.method))?console.error("Interop method not found."):await t.interop.invoke(n.method,n.params,n.target).catch(e=>console.error({error:e}))},mC=()=>{const[t,n]=g.useState(!1),e=g.useContext(_e.IOConnectContext);return g.useEffect(()=>{if(!e)return;let o;return(async()=>{var r;try{o=await((r=e.workspaces)==null?void 0:r.onWorkspaceOpened(()=>n(!0)))}catch(i){console.error(i)}})(),()=>o==null?void 0:o()},[e]),t},Ql=()=>{const{value:t,update:n,isLoading:e,error:o}=Xt({prefKey:Ir.IS_LAUNCHPAD_COLLAPSED});return{error:o,isLaunchpadCollapsed:t,setIsLaunchpadCollapsed:n,isLoading:e}};var Xc={exports:{}};(function(t,n){(function(e,o){var r="1.0.40",i="",a="?",s="function",l="undefined",u="object",f="string",d="major",p="model",h="name",m="type",v="vendor",y="version",w="architecture",k="console",x="mobile",b="tablet",E="smarttv",j="wearable",B="embedded",F=500,L="Amazon",D="Apple",T="ASUS",P="BlackBerry",re="Browser",ae="Chrome",z="Edge",ee="Firefox",q="Google",ie="Huawei",J="LG",W="Microsoft",Q="Motorola",Y="Opera",H="Samsung",M="Sharp",O="Sony",I="Xiaomi",R="Zebra",U="Facebook",V="Chromium OS",se="Mac OS",Z=" Browser",A=function(X,ne){var te={};for(var le in X)ne[le]&&ne[le].length%2===0?te[le]=ne[le].concat(X[le]):te[le]=X[le];return te},me=function(X){for(var ne={},te=0;te<X.length;te++)ne[X[te].toUpperCase()]=X[te];return ne},we=function(X,ne){return typeof X===f?Ie(ne).indexOf(Ie(X))!==-1:!1},Ie=function(X){return X.toLowerCase()},Oe=function(X){return typeof X===f?X.replace(/[^\d\.]/g,i).split(".")[0]:o},ke=function(X,ne){if(typeof X===f)return X=X.replace(/^\s\s*/,i),typeof ne===l?X:X.substring(0,F)},ue=function(X,ne){for(var te=0,le,he,ye,pe,oe,Ee;te<ne.length&&!oe;){var Re=ne[te],Pe=ne[te+1];for(le=he=0;le<Re.length&&!oe&&Re[le];)if(oe=Re[le++].exec(X),oe)for(ye=0;ye<Pe.length;ye++)Ee=oe[++he],pe=Pe[ye],typeof pe===u&&pe.length>0?pe.length===2?typeof pe[1]==s?this[pe[0]]=pe[1].call(this,Ee):this[pe[0]]=pe[1]:pe.length===3?typeof pe[1]===s&&!(pe[1].exec&&pe[1].test)?this[pe[0]]=Ee?pe[1].call(this,Ee,pe[2]):o:this[pe[0]]=Ee?Ee.replace(pe[1],pe[2]):o:pe.length===4&&(this[pe[0]]=Ee?pe[3].call(this,Ee.replace(pe[1],pe[2])):o):this[pe]=Ee||o;te+=2}},S=function(X,ne){for(var te in ne)if(typeof ne[te]===u&&ne[te].length>0){for(var le=0;le<ne[te].length;le++)if(we(ne[te][le],X))return te===a?o:te}else if(we(ne[te],X))return te===a?o:te;return ne.hasOwnProperty("*")?ne["*"]:X},C={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},N={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},_={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[y,[h,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[y,[h,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[h,y],[/opios[\/ ]+([\w\.]+)/i],[y,[h,Y+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[y,[h,Y+" GX"]],[/\bopr\/([\w\.]+)/i],[y,[h,Y]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[y,[h,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[y,[h,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[h,y],[/quark(?:pc)?\/([-\w\.]+)/i],[y,[h,"Quark"]],[/\bddg\/([\w\.]+)/i],[y,[h,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[y,[h,"UC"+re]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[y,[h,"WeChat"]],[/konqueror\/([\w\.]+)/i],[y,[h,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[y,[h,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[y,[h,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[y,[h,"Smart Lenovo "+re]],[/(avast|avg)\/([\w\.]+)/i],[[h,/(.+)/,"$1 Secure "+re],y],[/\bfocus\/([\w\.]+)/i],[y,[h,ee+" Focus"]],[/\bopt\/([\w\.]+)/i],[y,[h,Y+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[y,[h,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[y,[h,"Dolphin"]],[/coast\/([\w\.]+)/i],[y,[h,Y+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[y,[h,"MIUI"+Z]],[/fxios\/([\w\.-]+)/i],[y,[h,ee]],[/\bqihoobrowser\/?([\w\.]*)/i],[y,[h,"360"]],[/\b(qq)\/([\w\.]+)/i],[[h,/(.+)/,"$1Browser"],y],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[h,/(.+)/,"$1"+Z],y],[/samsungbrowser\/([\w\.]+)/i],[y,[h,H+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[y,[h,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[h,"Sogou Mobile"],y],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[h,y],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[h],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[y,h],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[h,U],y],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[h,y],[/\bgsa\/([\w\.]+) .*safari\//i],[y,[h,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[y,[h,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[y,[h,ae+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[h,ae+" WebView"],y],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[y,[h,"Android "+re]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[h,y],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[y,[h,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[y,h],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[h,[y,S,C]],[/(webkit|khtml)\/([\w\.]+)/i],[h,y],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[h,"Netscape"],y],[/(wolvic|librewolf)\/([\w\.]+)/i],[h,y],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[y,[h,ee+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[h,[y,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[h,[y,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[w,"amd64"]],[/(ia32(?=;))/i],[[w,Ie]],[/((?:i[346]|x)86)[;\)]/i],[[w,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[w,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[w,"armhf"]],[/windows (ce|mobile); ppc;/i],[[w,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[w,/ower/,i,Ie]],[/(sun4\w)[;\)]/i],[[w,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[w,Ie]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[p,[v,H],[m,b]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[p,[v,H],[m,x]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[p,[v,D],[m,x]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[p,[v,D],[m,b]],[/(macintosh);/i],[p,[v,D]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[p,[v,M],[m,x]],[/(?:honor)([-\w ]+)[;\)]/i],[p,[v,"Honor"],[m,x]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[p,[v,ie],[m,b]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[p,[v,ie],[m,x]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[p,/_/g," "],[v,I],[m,x]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[p,/_/g," "],[v,I],[m,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[p,[v,"OPPO"],[m,x]],[/\b(opd2\d{3}a?) bui/i],[p,[v,"OPPO"],[m,b]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[p,[v,"Vivo"],[m,x]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[p,[v,"Realme"],[m,x]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[p,[v,Q],[m,x]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[p,[v,Q],[m,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[p,[v,J],[m,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[p,[v,J],[m,x]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[p,[v,"Lenovo"],[m,b]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[p,/_/g," "],[v,"Nokia"],[m,x]],[/(pixel c)\b/i],[p,[v,q],[m,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[p,[v,q],[m,x]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[p,[v,O],[m,x]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[p,"Xperia Tablet"],[v,O],[m,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[p,[v,"OnePlus"],[m,x]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[p,[v,L],[m,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[p,/(.+)/g,"Fire Phone $1"],[v,L],[m,x]],[/(playbook);[-\w\),; ]+(rim)/i],[p,v,[m,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[p,[v,P],[m,x]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[p,[v,T],[m,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[p,[v,T],[m,x]],[/(nexus 9)/i],[p,[v,"HTC"],[m,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[v,[p,/_/g," "],[m,x]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[p,[v,"TCL"],[m,b]],[/(itel) ((\w+))/i],[[v,Ie],p,[m,S,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[p,[v,"Acer"],[m,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[p,[v,"Meizu"],[m,x]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[p,[v,"Ulefone"],[m,x]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[p,[v,"Energizer"],[m,x]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[p,[v,"Cat"],[m,x]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[p,[v,"Smartfren"],[m,x]],[/droid.+; (a(?:015|06[35]|142p?))/i],[p,[v,"Nothing"],[m,x]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[v,p,[m,x]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[v,p,[m,b]],[/(surface duo)/i],[p,[v,W],[m,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[p,[v,"Fairphone"],[m,x]],[/(u304aa)/i],[p,[v,"AT&T"],[m,x]],[/\bsie-(\w*)/i],[p,[v,"Siemens"],[m,x]],[/\b(rct\w+) b/i],[p,[v,"RCA"],[m,b]],[/\b(venue[\d ]{2,7}) b/i],[p,[v,"Dell"],[m,b]],[/\b(q(?:mv|ta)\w+) b/i],[p,[v,"Verizon"],[m,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[p,[v,"Barnes & Noble"],[m,b]],[/\b(tm\d{3}\w+) b/i],[p,[v,"NuVision"],[m,b]],[/\b(k88) b/i],[p,[v,"ZTE"],[m,b]],[/\b(nx\d{3}j) b/i],[p,[v,"ZTE"],[m,x]],[/\b(gen\d{3}) b.+49h/i],[p,[v,"Swiss"],[m,x]],[/\b(zur\d{3}) b/i],[p,[v,"Swiss"],[m,b]],[/\b((zeki)?tb.*\b) b/i],[p,[v,"Zeki"],[m,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[v,"Dragon Touch"],p,[m,b]],[/\b(ns-?\w{0,9}) b/i],[p,[v,"Insignia"],[m,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[p,[v,"NextBook"],[m,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[v,"Voice"],p,[m,x]],[/\b(lvtel\-)?(v1[12]) b/i],[[v,"LvTel"],p,[m,x]],[/\b(ph-1) /i],[p,[v,"Essential"],[m,x]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[p,[v,"Envizen"],[m,b]],[/\b(trio[-\w\. ]+) b/i],[p,[v,"MachSpeed"],[m,b]],[/\btu_(1491) b/i],[p,[v,"Rotor"],[m,b]],[/(shield[\w ]+) b/i],[p,[v,"Nvidia"],[m,b]],[/(sprint) (\w+)/i],[v,p,[m,x]],[/(kin\.[onetw]{3})/i],[[p,/\./g," "],[v,W],[m,x]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[p,[v,R],[m,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[p,[v,R],[m,x]],[/smart-tv.+(samsung)/i],[v,[m,E]],[/hbbtv.+maple;(\d+)/i],[[p,/^/,"SmartTV"],[v,H],[m,E]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[v,J],[m,E]],[/(apple) ?tv/i],[v,[p,D+" TV"],[m,E]],[/crkey/i],[[p,ae+"cast"],[v,q],[m,E]],[/droid.+aft(\w+)( bui|\))/i],[p,[v,L],[m,E]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[p,[v,M],[m,E]],[/(bravia[\w ]+)( bui|\))/i],[p,[v,O],[m,E]],[/(mitv-\w{5}) bui/i],[p,[v,I],[m,E]],[/Hbbtv.*(technisat) (.*);/i],[v,p,[m,E]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[v,ke],[p,ke],[m,E]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[m,E]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[v,p,[m,k]],[/droid.+; (shield) bui/i],[p,[v,"Nvidia"],[m,k]],[/(playstation [345portablevi]+)/i],[p,[v,O],[m,k]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[p,[v,W],[m,k]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[p,[v,H],[m,j]],[/((pebble))app/i],[v,p,[m,j]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[p,[v,D],[m,j]],[/droid.+; (glass) \d/i],[p,[v,q],[m,j]],[/droid.+; (wt63?0{2,3})\)/i],[p,[v,R],[m,j]],[/droid.+; (glass) \d/i],[p,[v,q],[m,j]],[/(pico) (4|neo3(?: link|pro)?)/i],[v,p,[m,j]],[/; (quest( \d| pro)?)/i],[p,[v,U],[m,j]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[v,[m,B]],[/(aeobc)\b/i],[p,[v,L],[m,B]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[p,[m,x]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[p,[m,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[m,b]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[m,x]],[/(android[-\w\. ]{0,9});.+buil/i],[p,[v,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[y,[h,z+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[h,y],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[y,[h,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[h,y],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[y,h]],os:[[/microsoft (windows) (vista|xp)/i],[h,y],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[h,[y,S,N]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[y,S,N],[h,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[y,/_/g,"."],[h,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[h,se],[y,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[y,h],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[h,y],[/\(bb(10);/i],[y,[h,P]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[y,[h,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[y,[h,ee+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[y,[h,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[y,[h,"watchOS"]],[/crkey\/([\d\.]+)/i],[y,[h,ae+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[h,V],y],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[h,y],[/(sunos) ?([\w\.\d]*)/i],[[h,"Solaris"],y],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[h,y]]},$=function(X,ne){if(typeof X===u&&(ne=X,X=o),!(this instanceof $))return new $(X,ne).getResult();var te=typeof e!==l&&e.navigator?e.navigator:o,le=X||(te&&te.userAgent?te.userAgent:i),he=te&&te.userAgentData?te.userAgentData:o,ye=ne?A(_,ne):_,pe=te&&te.userAgent==le;return this.getBrowser=function(){var oe={};return oe[h]=o,oe[y]=o,ue.call(oe,le,ye.browser),oe[d]=Oe(oe[y]),pe&&te&&te.brave&&typeof te.brave.isBrave==s&&(oe[h]="Brave"),oe},this.getCPU=function(){var oe={};return oe[w]=o,ue.call(oe,le,ye.cpu),oe},this.getDevice=function(){var oe={};return oe[v]=o,oe[p]=o,oe[m]=o,ue.call(oe,le,ye.device),pe&&!oe[m]&&he&&he.mobile&&(oe[m]=x),pe&&oe[p]=="Macintosh"&&te&&typeof te.standalone!==l&&te.maxTouchPoints&&te.maxTouchPoints>2&&(oe[p]="iPad",oe[m]=b),oe},this.getEngine=function(){var oe={};return oe[h]=o,oe[y]=o,ue.call(oe,le,ye.engine),oe},this.getOS=function(){var oe={};return oe[h]=o,oe[y]=o,ue.call(oe,le,ye.os),pe&&!oe[h]&&he&&he.platform&&he.platform!="Unknown"&&(oe[h]=he.platform.replace(/chrome os/i,V).replace(/macos/i,se)),oe},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return le},this.setUA=function(oe){return le=typeof oe===f&&oe.length>F?ke(oe,F):oe,this},this.setUA(le),this};$.VERSION=r,$.BROWSER=me([h,y,d]),$.CPU=me([w]),$.DEVICE=me([p,v,m,k,x,E,b,j,B]),$.ENGINE=$.OS=me([h,y]),t.exports&&(n=t.exports=$),n.UAParser=$;var ce=typeof e!==l&&(e.jQuery||e.Zepto);if(ce&&!ce.ua){var be=new $;ce.ua=be.getResult(),ce.ua.get=function(){return be.getUA()},ce.ua.set=function(X){be.setUA(X);var ne=be.getResult();for(var te in ne)ce.ua[te]=ne[te]}}})(typeof window=="object"?window:xw)})(Xc,Xc.exports);var gC=Xc.exports;const So=new gC.UAParser,vC=()=>G.useMemo(()=>({os:So.getOS(),browser:So.getBrowser(),cpu:So.getCPU(),device:So.getDevice(),engine:So.getEngine(),ua:So.getUA()}),[]),yC=()=>G.useMemo(()=>So.getBrowser(),[]),eu=()=>{const{ua:t}=vC();return t.includes("io-connect-desktop")},l0=()=>{const[t,n]=g.useState([]),[e,o]=g.useState(!1),r=g.useContext(_e.IOConnectContext);return g.useEffect(()=>{if(!r)return;let i=!1;const a=[],s=r.layouts.onAdded(f=>{if(f.type!=="Global"||i)return;o(!0);const{name:d}=f;n(p=>[...p,{name:d}])}),l=r.layouts.onRemoved(f=>{f.type!=="Global"||i||n(d=>d.filter(p=>p.name!==f.name))}),u=r.layouts.onRenamed((f,d)=>{if(f.type!=="Global"||i)return;const{name:p}=f;n(h=>{const m=h.findIndex(v=>v.name===(d==null?void 0:d.name));return m===-1?h:[...h.slice(0,m),{name:p},...h.slice(m+1)]})});return a.push(s,l,u),()=>{i=!0,a.forEach(f=>f())}},[r]),{layouts:t,isInitialized:e}},u0=()=>{const[t,n]=g.useState([]),e=g.useContext(_e.IOConnectContext);return g.useEffect(()=>{if(!e)return;const o=e.notifications.onRaised(a=>n(s=>[...s,a])),r=e.notifications.onClosed(a=>n(s=>s.filter(l=>l.id!==a.id))),i=e.notifications.onStateChanged(({id:a},s)=>{n(l=>{const u=l.findIndex(f=>f.id===a);return u===-1?l:[...l.slice(0,u),{...l[u],state:s},...l.slice(u+1)]})});return e.notifications.list().then(n).catch(console.error),()=>{o(),r(),i()}},[e]),t},bC=()=>{const[t,n]=g.useState({}),e=g.useContext(_e.IOConnectContext);return g.useEffect(()=>{if(!e)return;const o=e.notifications.onConfigurationChanged(r=>n(r));return()=>{o()}},[e]),t},tu=t=>{const{handler:n,skip:e}=t;g.useEffect(()=>{if(e)return;const o=r=>{setTimeout(()=>{var i;((i=document.activeElement)==null?void 0:i.nodeName)==="IFRAME"&&n(r)},0)};return window.addEventListener("blur",o,!0),()=>{window.removeEventListener("blur",o,!0)}},[n,e])},nu=t=>{const{eventType:n,handler:e,ref:o,skip:r}=t;g.useEffect(()=>{if(r)return;const i=a=>{const s=a.target;(Array.isArray(o)?o.every(u=>u.current&&!u.current.contains(s)):o.current&&!o.current.contains(s))&&e(a)};return document.addEventListener(n,i,!0),()=>{document.removeEventListener(n,i,!0)}},[n,e,o,r])},wC=ot({name:Ht}),xi=ot({isCompleted:Sr()}),Tn=(t,n,e)=>{const[o,r]=g.useState(()=>{try{const s=window[t].getItem(n);return s?JSON.parse(s):null}catch(s){return console.log(s),null}}),i=`${t}-${n}`;g.useEffect(()=>{const s=l=>{r(l.detail)};return window.addEventListener(i,s),()=>{window.removeEventListener(i,s)}},[i]);const a=g.useCallback(s=>{try{if(!s){window[t].removeItem(n),r(null);return}const l=e.run(s);if(!l.ok){console.warn(`Error validating the value to be stored: ${l.error.message}`);return}const u=l.result;r(u),window[t].setItem(n,JSON.stringify(u)),window.dispatchEvent(new CustomEvent(i,{detail:u}))}catch(l){console.log(l)}},[n,t,i,e]);return[o,a]},ou=()=>{const[t,n]=Tn("sessionStorage",Gx,wC);return{isPlatformWindow:!t||window.name===t.name,setPlatformWindow:n}},d0=()=>{const[t,n]=g.useState([]);return g.useEffect(()=>{const e=({key:i})=>{n(a=>a.includes(i)?a:a.concat(i))},o=i=>{n(a=>a.filter(s=>s!==i.key))},r=()=>{n([])};return document.addEventListener("keydown",e),document.addEventListener("keyup",o),window.addEventListener("blur",r),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",o),window.removeEventListener("blur",r)}},[]),t.length===1?t[0]:null},ru=()=>{const t=g.useContext(_e.IOConnectContext);return g.useCallback(async(n,e)=>{if(t)try{await t.layouts.restore({name:n}),e==null||e({name:n}),await He({io:t,variant:Fe.SUCCESS,text:`Layout "${n}" was loaded successfully.`})}catch(o){await He({io:t,variant:Fe.WARNING,text:`Failed to load Layout "${n}".`,error:o})}},[t])},is={CONTROL:"Control",SHIFT:"Shift"},iu=()=>{const t=g.useContext(_e.IOConnectContext),n=Jl();return async({id:e,modifier:o,reuseWorkspaceId:r})=>{var i;try{const a=o===is.CONTROL?{newFrame:!0}:{frameId:n,reuseWorkspaceId:r};await((i=t.workspaces)==null?void 0:i.restoreWorkspace(e,a))}catch(a){await He({io:t,variant:Fe.WARNING,text:`Failed to load Workspace "${e}".`,error:a})}}},xC=t=>{const[n,e]=g.useState([]),[o,r]=g.useState(!0),i=g.useRef(null),a=g.useContext(_e.IOConnectContext);return g.useEffect(()=>{const s=a==null?void 0:a.search;if(!s)return;const l=[],u=[];return(async d=>{r(!0),e([]);const p=await s.query({search:d.trim(),providerLimits:{maxResults:100,maxResultsPerType:5}});if(p===i.current)return;i.current=p;const h=p.onResults(y=>{y.results.forEach(w=>{u.find(x=>x.id===w.id&&x.type.name===w.type.name)||u.push(w)}),r(!1),e([...u])}),m=p.onCompleted(()=>{r(!1)}),v=p.onError(y=>{console.error(`Query failed. Provider: ${y.provider}; Error: ${y.error}`)});l.push(h,m,v)})(t),()=>{l.forEach(d=>d())}},[a,t]),{resultsToRender:n,isLoading:o}},f0=()=>{const t=g.useContext(_e.IOConnectContext),n=async({id:o})=>{var r;await((r=t.appManager.application(o))==null?void 0:r.start())},e=async({id:o,modifier:r})=>{var u,f;const i=await((u=t.workspaces)==null?void 0:u.getWorkspace(d=>d.isSelected===!0)),a=i==null?void 0:i.children[0];if(r===is.CONTROL||!i||(a==null?void 0:a.type)==="window"){await((f=t.appManager.application(o))==null?void 0:f.start());return}await((a==null?void 0:a.type)==="group"?a:await(a??i).addGroup()).addWindow({appName:o})};return async o=>{try{await(Pg()?n:e)(o)}catch(r){await He({io:t,variant:Fe.WARNING,text:`Failed to start app "${o.title}".`,error:r})}}},CC=()=>{const[t,n]=g.useState({}),e=g.useContext(_e.IOConnectContext);return g.useEffect(()=>{const o=e.workspaces,r=[];if(o)return(async()=>{try{const i=await o.onWorkspaceOpened(s=>n(l=>{const u={...l};return u[s.title]=u[s.title]??new Set,u[s.title].add(s.id),u})),a=await o.onWorkspaceClosed(({workspaceId:s})=>n(l=>{const u={...l};for(const f in u)if(u[f].has(s)){u[f].delete(s);break}return u}));r.push(i,a)}catch(i){console.error(i)}})(),()=>r.forEach(i=>i==null?void 0:i())},[e]),t},p0=t=>t.key==="Enter"||t.key===" ",as=(t,n)=>typeof t>"u"?{}:{tabIndex:0,onClick:t,onKeyDown:e=>{p0(e)&&(e.preventDefault(),t==null||t(e)),n==null||n(e)}},h0=({event:t,currentIndex:n,moveFocus:e,min:o,max:r,onClose:i})=>{switch(t.key){case"ArrowUp":{e(Math.max(n-1,o));break}case"ArrowDown":{e(Math.min(n+1,r));break}case"Home":{e(o);break}case"End":{e(r);break}case"Escape":{if(i){i();break}return}default:return}t.stopPropagation(),t.preventDefault()};const SC=g.forwardRef((t,n)=>{const{title:e,actions:o,className:r,onClose:i,onActionItemClick:a,"data-testid":s="context-menu",...l}=t,u=g.useRef({}),[f,d]=g.useState(0),p=h=>{var m;(m=u.current[h])==null||m.focus(),d(h)};return g.useEffect(()=>{var h;(h=u.current[f])==null||h.focus()},[]),c.jsxs(mt,{ref:n,className:it(r,"context-menu"),onClick:h=>h.stopPropagation(),onKeyDown:h=>h0({event:h,currentIndex:f,min:0,max:o.length-1,moveFocus:p,onClose:i}),"data-testid":s,...l,children:[e&&c.jsx(mt.ItemSection,{children:e}),o.map((h,m)=>{const v=h.displayName||h.name,y=h.iconSrc?c.jsx(pp,{size:"16",src:h.iconSrc,alt:`${v} icon`}):h.icon&&c.jsx(lt,{size:"16",variant:h.icon});return c.jsxs(g.Fragment,{children:[c.jsx(mt.Item,{ref:w=>u.current[m]=w,prepend:y,disabled:h.disabled,tabIndex:-1,...as(w=>a(w,h)),"data-testid":`${s}-item-${h.name}`,children:v}),h.separatorAfter&&c.jsx("li",{className:"context-menu-separator","aria-hidden":!0,"data-testid":`${s}-separator`})]},h.name)})]})});function au(t){const{title:n,buttonSize:e="16",icon:o="ellipsis-vertical",iconSize:r="12",actions:i,isTabStop:a,onActionItemClick:s,buttonVariant:l,placement:u,strategy:f,offset:d,shouldCloseOnOutsideScroll:p=!1,shouldCloseOnWindowBlur:h=!1,shouldCloseOnWindowResize:m=!1,"data-testid":v,contextMenuDataTestId:y}=t,[w,k]=g.useState(!1),[x,b]=g.useState(null),[E,j]=g.useState(null),B=g.useRef(null),F=g.useRef(null),L=g.useMemo(()=>[F,B],[]),D=g.useCallback(()=>k(!1),[]),{styles:T,attributes:P}=sx(x,E,{placement:u,strategy:f,modifiers:[{name:"offset",options:{offset:d}}]});g.useEffect(()=>{B.current=x},[x]),g.useEffect(()=>{F.current=E},[E]),nu({eventType:"mouseup",handler:D,ref:L,skip:!w}),tu({handler:D,skip:!w}),g.useEffect(()=>{if(!(!h||!w))return window.addEventListener("blur",D),()=>{window.removeEventListener("blur",D)}},[D,w,h]),g.useEffect(()=>{if(!p||!E)return;const z=ee=>{if(E.contains(ee.target)){ee.preventDefault();return}D()};return document.addEventListener("touchmove",z,{passive:!1}),document.addEventListener("wheel",z,{passive:!1}),()=>{document.removeEventListener("touchmove",z),document.removeEventListener("wheel",z)}},[D,E,p]),g.useEffect(()=>{if(!(!m||!w))return window.addEventListener("resize",D),()=>{window.removeEventListener("resize",D)}},[D,w,m]);const re=z=>{z.stopPropagation(),k(ee=>!ee),E==null||E.focus()},ae=(z,ee)=>{z.stopPropagation(),s(z,ee),D()};return c.jsxs(c.Fragment,{children:[c.jsx(Ge,{ref:b,size:e,icon:o,iconSize:r,variant:l,...as(re),tabIndex:a?0:-1,"data-testid":v}),w&&c.jsx(SC,{ref:j,title:n,actions:i,onActionItemClick:ae,onClose:()=>{x==null||x.focus(),D()},style:T.popper,"data-testid":y,...P.popper})]})}const kC=t=>{const{isFavoritismEnabled:n=!0,item:e,onClick:o,onKeyDown:r,isFocused:i,liRef:a,...s}=t,{favorites:l,toggleFavorite:u,isLoading:f}=rs(),{description:d,icon:p="application",iconSrc:h,openInstances:m=0,title:v,tooltip:y,className:w,contextMenuActions:k=[]}=e,x=n&&l.some(B=>B.type===e.type&&B.title===e.title),b=B=>{if(p0(B)){o(B),B.preventDefault(),B.stopPropagation();return}r(B)},E=h?c.jsx(pp,{size:"16",src:h,alt:`${v} icon`,"data-testid":"base-section-item-icon"}):c.jsx(lt,{size:"16",variant:p,"data-testid":"base-section-item-icon"}),j=c.jsxs(c.Fragment,{children:[m!==0&&c.jsx("span",{className:"open-instances io-text-smaller","data-testid":"base-section-item-open-instances",children:m===1?"Opened":`${m} opened`}),(n||k.length>0)&&c.jsxs(Be,{className:"item-actions",children:[n&&c.jsx(Ge,{...as(B=>{B.stopPropagation(),u(e)}),tabIndex:i?0:-1,size:"24",iconSize:"12",icon:x?"star-full":"star",disabled:f,"data-testid":"base-section-item-favorite-button"}),k.length>0&&c.jsx(au,{buttonSize:"24",iconSize:"12",icon:"ellipsis-vertical",title:v,actions:k,onActionItemClick:o,isTabStop:i,placement:"bottom-end",offset:[0,0],shouldCloseOnOutsideScroll:!0,shouldCloseOnWindowBlur:!0,shouldCloseOnWindowResize:!0,"data-testid":"base-section-item-context-menu-button"})]})]});return c.jsx(mt.Item,{ref:a,tabIndex:i?0:-1,className:it("io-base-section-item",w),onKeyDown:b,onClick:o,prepend:E,append:j,description:d,tooltip:y??v,"data-testid":`base-section-item-${e.id}`,...s,children:v})},EC=new a0,jC=()=>{const{value:t,update:n}=Xt({prefKey:Ir.COLLAPSED_SECTIONS}),e=g.useCallback(o=>EC.enqueue(()=>n((r=[])=>r.includes(o)?r.filter(a=>a!==o):[...r,o])),[n]);return{collapsedSections:t,toggleSection:e}},su=t=>{const{config:n,level:e=1,path:o=n.id,onItemClick:r}=t,{isCollapsible:i=!0}=n,a=d0(),[s,l]=g.useState(0),u=g.useRef({}),{collapsedSections:f,toggleSection:d}=jC(),p=i?!(f!=null&&f.includes(o)):!0,h=n.items.filter(b=>Jr(b)),m=n.items.filter(b=>!Jr(b)),v=[...h,...m],y=16,w=24,k=b=>{var E,j;(j=(E=u.current[b])==null?void 0:E.querySelector("[tabIndex]"))==null||j.focus(),l(b)},x=async()=>{i&&await d(o)};return c.jsxs(mt.ItemWithSubItems,{className:e===1?"main-section":void 0,"data-testid":`base-section-${n.id}`,children:[c.jsx(Ax,{className:e===1?"io-list-item-title main-section-header":void 0,isOpen:p,onClick:x,showCollapseIcon:i,showFolderIcon:e!==1,style:{paddingLeft:`${y+w*Math.max(0,e-2)}px`},"data-testid":`base-section-header-${n.id}`,title:n.title}),c.jsx(Jg,{isOpen:p,tag:mt,children:v.map((b,E)=>Jr(b)?c.jsx(su,{config:b,level:e+1,onItemClick:r,path:`${o}/${b.id}`},b.id):c.jsx(kC,{style:{paddingLeft:`${y+w*(e-1)}px`},liRef:j=>u.current[E]=j,isFavoritismEnabled:b.type===jt.APPLICATION||b.type===jt.WORKSPACE,item:b,onClick:(j,B)=>r==null?void 0:r(j,{item:b,modifier:a,selectedContextMenuActionName:B==null?void 0:B.name}),onKeyDown:j=>{h0({event:j,moveFocus:k,currentIndex:s,min:0,max:v.length-1})},isFocused:s===E},b.id))})]})},m0=t=>`${t.type}-${t.id}`,OC=(t,n)=>g0(t)[n],g0=t=>t.reduce((n,e)=>Jr(e)?{...n,...g0(e.items)}:{...n,[m0(e)]:e},{}),v0=g.createContext(void 0),NC=()=>{const t=g.useContext(v0);if(t===void 0)throw new Error("useSection must be used within a SectionProvider");return t},IC=({children:t})=>{const[n,e]=g.useState(null),o=g.useMemo(()=>[n,e],[n]);return c.jsx(v0.Provider,{value:o,children:t})},ss=({config:t,onItemClick:n})=>{const[e,o]=NC(),r=wn(),{isLaunchpadPinned:i}=zo(),a=(s,l)=>{const{item:u,modifier:f,selectedContextMenuActionName:d}=l;o({itemName:m0(u),modifier:f,selectedContextMenuActionName:d})};return g.useEffect(()=>{var d;if(!n||!e)return;const{itemName:s,modifier:l,selectedContextMenuActionName:u}=e,f=OC(t.items,s);f&&(n({item:f,modifier:l,selectedContextMenuActionName:u}),o(null),!(l===is.SHIFT||i)&&((d=r.close)==null||d.call(r)))},[e,t.items,r,n,o,i]),c.jsx(su,{config:t,onItemClick:a})};function y0(t){const{isFolderCollapsible:n,isSectionCollapsible:e,sortOrder:o}=t,r=Xg(),i=Tx(),a=f0(),s=Qg(),l=g.useMemo(()=>ww(r,i,{isFolderCollapsible:n,isSectionCollapsible:e,sortOrder:o}),[r,i,n,e,o]),u=f=>{const{item:d,modifier:p,selectedContextMenuActionName:h}=f;if(!h)return a({id:d.id,title:d.title,modifier:p});s(d,h)};return c.jsx(ss,{config:l,onItemClick:u})}const PC=(t,n)=>{const{isSectionCollapsible:e,sortOrder:o=li.DISABLED}=n,r=Bl({items:t,sortOrder:o,ascendingCompare:Dg,descendingCompare:Mg});return{id:fr.FAVORITES,title:"Favorites",items:r,isCollapsible:e}},b0=t=>{const{isSectionCollapsible:n,sortOrder:e}=t,{favorites:o}=rs(),r=g.useMemo(()=>PC(o,{isSectionCollapsible:n,sortOrder:e}),[o,n,e]);return o.length>0?c.jsx(ss,{config:r}):null},AC=t=>{const{active:n,className:e,...o}=t;return c.jsx(Ge,{className:it("launchpad-button",{active:n},e),"aria-label":"Launchpad",icon:"logo",variant:"circle",size:"32",title:n?"Close Launchpad":"Open Launchpad","data-testid":"launchpad-button",...o})};var TC=function(n){return DC(n)&&!MC(n)};function DC(t){return!!t&&typeof t=="object"}function MC(t){var n=Object.prototype.toString.call(t);return n==="[object RegExp]"||n==="[object Date]"||RC(t)}var _C=typeof Symbol=="function"&&Symbol.for,LC=_C?Symbol.for("react.element"):60103;function RC(t){return t.$$typeof===LC}function FC(t){return Array.isArray(t)?[]:{}}function pi(t,n){return n.clone!==!1&&n.isMergeableObject(t)?kr(FC(t),t,n):t}function BC(t,n,e){return t.concat(n).map(function(o){return pi(o,e)})}function HC(t,n){if(!n.customMerge)return kr;var e=n.customMerge(t);return typeof e=="function"?e:kr}function $C(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(n){return Object.propertyIsEnumerable.call(t,n)}):[]}function sf(t){return Object.keys(t).concat($C(t))}function w0(t,n){try{return n in t}catch{return!1}}function WC(t,n){return w0(t,n)&&!(Object.hasOwnProperty.call(t,n)&&Object.propertyIsEnumerable.call(t,n))}function zC(t,n,e){var o={};return e.isMergeableObject(t)&&sf(t).forEach(function(r){o[r]=pi(t[r],e)}),sf(n).forEach(function(r){WC(t,r)||(w0(t,r)&&e.isMergeableObject(n[r])?o[r]=HC(r,e)(t[r],n[r],e):o[r]=pi(n[r],e))}),o}function kr(t,n,e){e=e||{},e.arrayMerge=e.arrayMerge||BC,e.isMergeableObject=e.isMergeableObject||TC,e.cloneUnlessOtherwiseSpecified=pi;var o=Array.isArray(n),r=Array.isArray(t),i=o===r;return i?o?e.arrayMerge(t,n,e):zC(t,n,e):pi(n,e)}kr.all=function(n,e){if(!Array.isArray(n))throw new Error("first argument should be an array");return n.reduce(function(o,r){return kr(o,r,e)},{})};var UC=kr,VC=UC;const YC=ts(VC),GC={header:{showHeader:!0,showSearch:!0},mode:"default"},uo={WINDOW_MANAGEMENT:"window-management",NOTIFICATIONS:"notifications"},cs="getScreenDetails"in window,x0=g.createContext(void 0),C0=()=>{const t=g.useContext(x0);if(t===void 0)throw new Error("useLaunchpadConfig must be used within an LaunchpadConfigProvider");return t},KC=({children:t,settings:n,components:e})=>{const o=g.useMemo(()=>({settings:n,components:e}),[n,e]);return c.jsx(x0.Provider,{value:o,children:t})},S0=g.createContext(void 0),k0=()=>{const t=g.useContext(S0);if(t===void 0)throw new Error("useLaunchpadSearch must be used within a LaunchpadSearchProvider");return t},ZC=({children:t})=>{const[n,e]=g.useState(""),o=g.useMemo(()=>({searchTerm:n,setSearchTerm:e}),[n]);return c.jsx(S0.Provider,{value:o,children:t})},E0=({settings:t={},components:n={},isOpen:e=!0,onClose:o,windowManagementPermissionState:r="granted",children:i,className:a,...s})=>{const l=cs&&r==="granted",u=g.useMemo(()=>YC(GC,t),[t]);return c.jsx(lC,{close:o,isOpen:e,isGlobalLayoutsAvailable:l,children:c.jsx(KC,{settings:u,components:n,children:c.jsx(ZC,{children:c.jsx("div",{className:it("launchpad",a),"data-testid":"launchpad",...s,children:i})})})})},qC=g.forwardRef((t,n)=>{const{onSearch:e,searchTerm:o,onClear:r,className:i}=t,a=g.useContext(_e.IOConnectContext);return g.useEffect(()=>{a!=null&&a.search&&a.search.setDebounceMS(450)},[a]),c.jsx(Fo,{id:"search-input",className:it("search-bar",i),ref:n,placeholder:"Find anything",value:o,onChange:e,autoComplete:"off",iconPrepend:"search",iconAppend:o.length?"close":void 0,iconAppendOnClick:r})}),j0=({className:t})=>{const{isLaunchpadPinned:n,isLoading:e,toggle:o}=zo();return c.jsx(Ge,{className:t,size:"32",variant:"circle",icon:n?"unpin":"pin",onClick:o,disabled:e})},O0=({className:t})=>{const n=Jl(),{isOpen:e}=wn(),{settings:o,components:r}=C0(),{isLaunchpadPinned:i}=zo(),{isLaunchpadCollapsed:a,setIsLaunchpadCollapsed:s}=Ql(),{searchTerm:l,setSearchTerm:u}=k0(),f=g.useRef(null),{showSearch:d,showHeader:p}=o.header??{},{BeforeSearch:h,AfterSearch:m}=r.header??{};g.useEffect(()=>{var w;e&&((w=f.current)==null||w.focus())},[e]),g.useEffect(()=>{i&&s(!1)},[s,i]);const v=w=>{const k=w.target.value;n0(k)&&a&&s(!1),u(k)},y=()=>{var w;u(""),(w=f.current)==null||w.focus()};return p?c.jsxs("div",{className:it("launchpad-header",n||i?void 0:"draggable",t),"data-testid":"launchpad-header",children:[h&&c.jsx(h,{}),d&&c.jsx(qC,{ref:f,searchTerm:l,onSearch:v,onClear:y,className:n?void 0:"non-draggable"}),m&&c.jsx(m,{}),m===void 0&&(o==null?void 0:o.mode)!=="pinned"&&c.jsx(j0,{className:"ms-auto"})]}):null},JC=(t,n,e)=>{const{isSectionCollapsible:o,sortOrder:r=li.ASCENDING}=e,a=Bl({items:t,sortOrder:r,ascendingCompare:Dg,descendingCompare:Mg}).map(s=>{var l;return{...s,type:jt.WORKSPACE,icon:"workspace",openInstances:(l=n[s.title])==null?void 0:l.size,contextMenuActions:Tg}});return{id:fr.WORKSPACES,title:"Workspaces",items:[...a,{id:i0.CREATE_WORKSPACE,icon:"add",title:"Create Workspace",type:jt.ACTION_BUTTON,tooltip:"Create an empty Workspace in a new window",className:"create-workspace-btn"}],isCollapsible:o}},N0=t=>{const{isSectionCollapsible:n,sortOrder:e}=t,o=s0(),r=CC(),i=iu(),a=c0(),s=g.useMemo(()=>JC(o,r,{isSectionCollapsible:n,sortOrder:e}),[o,r,n,e]),l=u=>{const{item:f,modifier:d,selectedContextMenuActionName:p}=u;return p?a(f,p):f.type===jt.ACTION_BUTTON?a(f,f.id):i({id:f.id,modifier:d})};return c.jsx(ss,{config:s,onItemClick:l})},XC=[{placementId:fr.FAVORITES,Component:b0},{placementId:fr.WORKSPACES,Component:N0},{placementId:fr.APPLICATIONS,Component:y0}],I0=()=>{const{defaultLayout:t,activeLayout:n}=wn();return e=>({name:e,isDefault:e===(t==null?void 0:t.name),isActive:e===(n==null?void 0:n.name)})},QC=()=>{const t=r0(),n=I0(),e=Pr();return async(o,r)=>{const{id:i}=o,a=n(i);await e(()=>t({layout:a,actionName:r}))}},e3=()=>{const t=Qg(),n=c0(),e=QC();return o=>{if(o===jt.APPLICATION)return t;if(o===jt.WORKSPACE)return n;if(o===jt.LAYOUT)return e}},Zo={RENAME:"rename",SAVE:"save",SAVE_AS:"saveAs",DELETE:"delete",SET_AS_DEFAULT:"setAsDefault",LOAD:"load"},P0=t=>[{name:Zo.RENAME,displayName:"Rename",icon:"pen-line"},{name:Zo.SAVE,displayName:"Save",disabled:!t.isActive,icon:"floppy"},{name:Zo.SAVE_AS,displayName:"Save as",icon:"floppy-disk-pen",separatorAfter:!0},{name:Zo.DELETE,displayName:"Delete",icon:"trash-can",separatorAfter:!0},{name:Zo.SET_AS_DEFAULT,displayName:"Set as Default",disabled:t.isDefault,icon:"user-gear",separatorAfter:!0},{name:Zo.LOAD,displayName:"Load",icon:"spinner"}],t3=t=>{const n=I0();return t.reduce((e,o)=>{const{type:r}=o,i=o.id||o.displayName;if(!i)return e;let a=[];if(r.name===jt.APPLICATION)a=Ag;else if(r.name===jt.WORKSPACE)a=Tg;else if(r.name===jt.LAYOUT){const f=n(i);a=P0(f)}else o.secondaryActions&&(a=o.secondaryActions.map(({name:f,method:d,params:p,target:h})=>({name:f,interopParams:{method:d,params:p,target:h}})));const s={id:i,title:o.displayName||i,description:o.description,type:r.name,iconSrc:o.iconURL,mainAction:o.action,contextMenuActions:a},l=e.findIndex(({title:f})=>r.displayName?f===r.displayName:f===r.name),u=e[l];return u?[...e.slice(0,l),{...u,items:[...u.items,s]},...e.slice(l+1)]:[...e,{id:r.name,title:r.displayName||r.name,items:[s]}]},[])};function n3(t){const{resultsToRender:n,isLoading:e}=xC(t.searchTerm),{close:o}=wn(),r=hC(),i=iu(),a=f0(),s=ru(),l=e3(),u=t3(n),f=Pr(),{isLaunchpadPinned:d}=zo(),p=(m,v)=>{const y=l(m.type);y==null||y(m,v)},h=async(m,v)=>{var F;const{item:y,modifier:w,selectedContextMenuActionName:k}=v,{type:x,id:b,title:E,mainAction:j}=y,B=k?(F=y.contextMenuActions)==null?void 0:F.find(L=>L.name===k):null;B!=null&&B.interopParams?r(B.interopParams):k?p(y,k):j?r(j):x===jt.APPLICATION?a({id:b,title:E,modifier:w}):x===jt.WORKSPACE?i({id:b,modifier:w}):x===jt.LAYOUT&&f(()=>s(b)),!(w===is.SHIFT||d)&&(o==null||o())};return e?c.jsx("p",{className:"search-loading",children:"Loading..."}):n.length===0?c.jsx("p",{className:"search-no-results",children:"No results found. Try searching by app name, workspace title, or keywords."}):c.jsx(mt,{children:u.map((m,v)=>c.jsx(su,{config:m,onItemClick:h},m.id||v))})}const o3=()=>{const{value:t,update:n,isLoading:e,error:o}=Xt({prefKey:Ir.IS_LAYOUTS_PANEL_OPEN});return{error:o,isLayoutsPanelOpen:t,setIsLayoutsPanelOpen:n,isLoading:e}},r3=({layoutName:t})=>{const n=g.useContext(_e.IOConnectContext),e=Pr(),o=r=>{r.stopPropagation(),e(async()=>{try{await n.layouts.save({name:t,type:"Global"}),await He({io:n,variant:Fe.SUCCESS,text:`Layout "${t}" was saved successfully.`})}catch(a){await He({io:n,variant:Fe.WARNING,text:`Failed to save Layout "${t}".`,error:a})}})};return c.jsx(Ge,{icon:"floppy",size:"24",iconSize:"12",onClick:o,title:"Save Layout","data-testid":"save-layout-button"})},i3=({layout:t})=>{const n=r0(),e=Pr(),o=async(r,i)=>{r.stopPropagation(),await e(()=>n({layout:t,actionName:i.name}))};return c.jsx(au,{buttonSize:"24",iconSize:"12",title:t.name,icon:"ellipsis-vertical",actions:P0(t),onActionItemClick:o,placement:"top-end",strategy:"fixed",offset:[4,0],shouldCloseOnOutsideScroll:!0,shouldCloseOnWindowBlur:!0,shouldCloseOnWindowResize:!0,"data-testid":"layout-context-menu-button",contextMenuDataTestId:"layout-context-menu"})};const A0=({layouts:t,className:n,...e})=>{const{isLaunchpadPinned:o}=zo(),{close:r}=wn(),i=ru(),a=Pr(),s=()=>{o||r==null||r()},l=u=>a(()=>i(u.name,s));return c.jsx($o,{element:mt,elementProps:{className:it("layouts-list",n),variant:"single",checkIcon:{variant:"check",tooltip:"Active Layout"},...e},wrapperClassName:"layouts-list-scrollable-container",children:t.map(u=>c.jsx(mt.Item,{className:"layouts-list-item",onClick:()=>l(u),append:c.jsxs(c.Fragment,{children:[u.isDefault&&c.jsx(Ma,{variant:"default",title:"Default Layout","data-testid":"default-layout-pill",children:"Default"}),c.jsxs(Kg,{children:[u.isActive&&c.jsx(r3,{layoutName:u.name}),c.jsx(i3,{layout:u})]})]}),isSelected:u.isActive,tooltip:u.name,"data-testid":`layout-item-${u.name}`,children:u.name},u.name))})},a3=()=>{const{layouts:t}=l0(),{activeLayout:n,defaultLayout:e}=wn(),o=g.useMemo(()=>t.map(r=>({...r,isActive:r.name===(n==null?void 0:n.name),isDefault:r.name===(e==null?void 0:e.name)})),[t,n,e]);return c.jsx(A0,{layouts:o,"data-testid":"all-layouts"})},s3=()=>{const{defaultLayout:t,activeLayout:n}=wn();return n?c.jsx(A0,{layouts:[{...n,isDefault:n.name===(t==null?void 0:t.name),isActive:!0}],"data-testid":"active-layout"}):c.jsx("p",{className:"io-text-small no-active-layout","data-testid":"choose-layout-message",children:"Choose which Layout to load"})},c3=()=>{const t=g.useContext(_e.IOConnectContext),{setActiveLayout:n}=wn(),e=Pr(),o=async()=>{var d;if(!("modals"in t&&t.modals)){console.error("Cannot create Layout because io dialogs are not enabled");return}const r="create",i="layout-name",{isEnterPressed:a,responseButtonClicked:s,inputs:l}=await t.modals.dialogs.request({templateName:Nr.SINGLE_TEXT_INPUT_DIALOG,variables:{heading:"Create Layout",input:{id:i,initialValue:"Create Layout",validation:{disabledButtonIds:[r],errorMessage:"Please provide a Layout name",regexPattern:Xl}},actionButtons:[{variant:"primary",text:"Create",id:r},{variant:"outline",text:"Cancel",id:"cancel"}]}}),u=(d=l==null?void 0:l.find(p=>p.id===i))==null?void 0:d.value;if(a||(s==null?void 0:s.id)===r)try{if((await t.layouts.getAll("Global")).find(h=>h.name===u)){await He({io:t,variant:Fe.WARNING,text:`Failed to create Layout "${u}". A Layout with this name already exists.`});return}await t.layouts.save({name:u}),n({name:u}),await He({io:t,variant:Fe.SUCCESS,text:`Layout "${u}" was created successfully.`})}catch(p){await He({io:t,variant:Fe.WARNING,text:`Failed to create Layout "${u}".`,error:p})}};return c.jsx(Be,{variant:"fullwidth",className:"create-layout-btn-group",children:c.jsx(Je,{variant:"primary",text:"Create Layout",onClick:()=>e(o),"data-testid":"create-layout-button"})})};const l3=()=>{const t=g.useRef(null),{layouts:n,isInitialized:e}=l0(),{isLayoutsPanelOpen:o,setIsLayoutsPanelOpen:r}=o3();g.useEffect(()=>{!e||n.length>0||!o||r(!1)},[n,e,o,r]);const i=g.useCallback(()=>r(a=>!a),[r]);return c.jsxs("footer",{className:"layouts-panel",ref:t,"data-testid":"layouts-panel",children:[c.jsx(mi,{className:"layouts-panel-separator"}),c.jsxs("div",{className:"layouts-panel-header","aria-label":"Layouts panel","aria-expanded":o,role:"button","data-testid":"layouts-panel-header",...as(n.length?i:void 0),children:[c.jsx(Nn,{tag:"h2",size:"normal",text:n.length>0?"Layouts":"Start using Layouts"}),n.length>0&&c.jsx(Ge,{className:it("layouts-panel-toggle-button",{"layouts-panel-toggle-button-rotated":o}),icon:"expand",iconSize:"12",size:"24","data-testid":"layouts-panel-toggle-button"})]}),c.jsx(Jg,{isOpen:o,tag:"div",children:c.jsx(a3,{})}),n.length>0&&!o?c.jsx(s3,{}):c.jsx(c3,{})]})},T0=({className:t})=>{const{isLaunchpadCollapsed:n}=Ql(),{isGlobalLayoutsAvailable:e}=wn(),{components:o}=C0(),{searchTerm:r}=k0(),{sections:i=XC}=o;return c.jsxs("div",{className:it("launchpad-body",n?"collapsed":void 0,t),children:[c.jsx($o,{wrapperClassName:"launchpad-main-scrollable-container",element:"main",elementProps:{className:"launchpad-main"},children:n0(r)?c.jsx(n3,{searchTerm:r}):c.jsx(IC,{children:c.jsx(mt,{children:i.map(({Component:a,placementId:s})=>c.jsx(a,{},s))})})}),e&&c.jsx(l3,{})]})};const D0=t=>c.jsxs(E0,{...t,children:[c.jsx(O0,{}),c.jsx(T0,{})]}),M0=g.createContext(void 0),_0=()=>{const t=g.useContext(M0);if(t===void 0)throw new Error("useWorkspaceComponentsContext must be used within an WorkspaceComponentsContextProvider");return t},u3=()=>{const t=cs?[uo.NOTIFICATIONS,uo.WINDOW_MANAGEMENT]:[uo.NOTIFICATIONS];return Promise.all(t.map(async n=>{const e=await navigator.permissions.query({name:n});return e.stableName=n,e}))},L0=g.createContext(void 0),vo=()=>{const t=g.useContext(L0);if(t===void 0)throw new Error("useIOConnectHome must be used within an IOConnectHomeProvider");return t},d3=({children:t})=>{const[n,e]=Tn("localStorage",wi,xi),[o,r]=g.useState([]),i=g.useMemo(()=>o.reduce((d,p)=>({...d,[p.stableName]:{state:p.state}}),{}),[o]),a={isLoading:o.length===0,statuses:i},[s,l]=g.useState(!1),u={isLoggingOut:s,setIsLoggingOut:l};g.useEffect(()=>{let d=!1;const p=u3().then(h=>{if(d)return;r(h);const m=[];let v=!1;return h.forEach((y,w)=>{const k=x=>{if(d||!x.target||v)return;const b=x.target;if(b.state==="prompt")return e({isCompleted:!1}),v=!0,window.location.reload();r(j=>[...j.slice(0,w),b,...j.slice(w+1)])};y.addEventListener("change",k),m.push(()=>y.removeEventListener("change",k))}),m}).catch(console.warn);return()=>{d=!0,p.then(h=>{h==null||h.forEach(m=>m())})}},[e]);const f=g.useMemo(()=>({permission:a,login:u}),[a,u]);return c.jsx(L0.Provider,{value:f,children:t})},f3=t=>c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:170,height:134,fill:"none",...t,children:[c.jsxs("g",{clipPath:"url(#a)",children:[c.jsxs("g",{clipPath:"url(#b)",children:[c.jsx("path",{fill:"url(#c)",d:"M0 0h170v114H0z"}),c.jsx("rect",{width:42.821,height:15,x:.5,y:-.5,fill:"#3C3E3F",rx:7.5,transform:"matrix(1 0 0 -1 117 103.85)"}),c.jsx("rect",{width:42.821,height:15,x:.5,y:-.5,stroke:"#4B4E4F",strokeMiterlimit:10,rx:7.5,transform:"matrix(1 0 0 -1 117 103.85)"}),c.jsx("path",{fill:"#36A86B",d:"M125.31 100.086c-1.656 0-3-1.41-3-3.149 0-1.74 1.344-3.15 3-3.15 1.657 0 3 1.41 3 3.15s-1.343 3.149-3 3.149Z"}),c.jsx("rect",{width:21.694,height:6.057,fill:"#AAB0B0",rx:3.028,transform:"matrix(1 0 0 -1 132.72 99.844)"}),c.jsx("mask",{id:"d",fill:"#fff",children:c.jsx("path",{d:"M0 114h170v20H0v-20Z"})}),c.jsx("path",{fill:"#3C3E3F",d:"M0 114h170v20H0v-20Z"}),c.jsx("path",{fill:"#5D5D5D",d:"M0 115h170v-2H0v2Z",mask:"url(#d)"})]}),c.jsx("rect",{width:169,height:133,x:.5,y:.5,stroke:"#5D5D5D",rx:5.5}),c.jsx("rect",{width:64,height:64,x:53,y:24,fill:"#36AA6C",rx:32}),c.jsx("path",{fill:"#fff",d:"M84.068 42.02c0-.466.408-.932.932-.932.466 0 .932.466.932.932v.99c4.66.467 8.388 4.428 8.388 9.262v1.748a9.57 9.57 0 0 0 2.796 6.756l.174.175c.466.466.758 1.165.758 1.806a2.61 2.61 0 0 1-2.621 2.621H74.514c-1.456-.058-2.563-1.165-2.563-2.621 0-.7.233-1.34.758-1.806l.116-.175c1.806-1.805 2.854-4.252 2.854-6.757v-1.747a9.3 9.3 0 0 1 8.388-9.261v-.99ZM85 44.816c-4.136 0-7.456 3.379-7.456 7.456v1.748c0 3.028-1.223 5.94-3.378 8.096l-.175.117a.94.94 0 0 0-.175.524c0 .408.291.699.7.699h20.91c.408 0 .758-.291.758-.7 0-.174-.117-.349-.233-.523l-.175-.117a11.502 11.502 0 0 1-3.378-8.155v-1.689c0-4.077-3.32-7.456-7.456-7.456H85Zm-1.806 23.008c.291.758.99 1.224 1.806 1.224.757 0 1.456-.466 1.747-1.224.175-.466.7-.757 1.165-.582a.976.976 0 0 1 .583 1.223A3.717 3.717 0 0 1 85 70.912c-1.631 0-3.029-.99-3.553-2.447a.976.976 0 0 1 .582-1.223c.466-.175.99.116 1.165.582Z"}),c.jsx("path",{fill:"#36A86B",d:"M113.791 86.146c-1.922 0-3.48-1.62-3.48-3.62 0-1.999 1.558-3.62 3.48-3.62s3.481 1.621 3.481 3.62c0 2-1.559 3.62-3.481 3.62Z"})]}),c.jsxs("defs",{children:[c.jsx("clipPath",{id:"a",children:c.jsx("path",{fill:"#fff",d:"M0 0h170v134H0z"})}),c.jsx("clipPath",{id:"b",children:c.jsx("rect",{width:170,height:134,fill:"#fff",rx:6})}),c.jsxs("linearGradient",{id:"c",x1:20.715,x2:62.592,y1:6.956,y2:110.839,gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{stopColor:"#313131"}),c.jsx("stop",{offset:1,stopColor:"#1B1B1B"})]})]})]}),p3=t=>c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:170,height:134,fill:"none",...t,children:[c.jsxs("g",{clipPath:"url(#a)",children:[c.jsxs("g",{clipPath:"url(#b)",children:[c.jsx("path",{fill:"url(#c)",d:"M0 0h170v94H0z",transform:"translate(0 20)"}),c.jsx("mask",{id:"d",fill:"#fff",children:c.jsx("path",{d:"M0 114h170v20H0v-20Z"})}),c.jsx("path",{fill:"#3C3E3F",d:"M0 114h170v20H0v-20Z"}),c.jsx("path",{fill:"#5D5D5D",d:"M0 115h170v-2H0v2Z",mask:"url(#d)"})]}),c.jsx("rect",{width:169,height:113,x:.5,y:20.5,stroke:"#5D5D5D",rx:5.5}),c.jsx("path",{fill:"#3C3E3F",stroke:"#5D5D5D",strokeMiterlimit:10,d:"M22.338.5h125.324c2.746 0 4.941 2.144 4.941 4.75v76.938c0 2.608-2.195 4.751-4.941 4.751H22.338c-2.746 0-4.94-2.143-4.94-4.75V5.25c0-2.607 2.194-4.751 4.94-4.751Z"}),c.jsx("path",{fill:"#fff",fillOpacity:.3,d:"M116.905 16.552a2.766 2.766 0 1 0 0-5.533 2.766 2.766 0 0 0 0 5.533ZM127.206 16.552a2.766 2.766 0 1 0 0-5.533 2.766 2.766 0 0 0 0 5.533Z"}),c.jsx("path",{fill:"#F0F6FE",d:"M137.505 16.552a2.766 2.766 0 1 0 0-5.533 2.766 2.766 0 0 0 0 5.533Z"}),c.jsx("circle",{cx:46.208,cy:58.882,r:20.294,fill:"#36AA6C"}),c.jsx("path",{fill:"#fff",fillRule:"evenodd",d:"M45.501 53.17a1 1 0 0 1 1.414 0l6.364 6.363a1 1 0 0 1-1.414 1.415l-4.657-4.657v48.23a1 1 0 0 1-2 0v-48.23l-4.657 4.657a1 1 0 0 1-1.414-1.415l6.364-6.364Z",clipRule:"evenodd"})]}),c.jsxs("defs",{children:[c.jsx("clipPath",{id:"a",children:c.jsx("path",{fill:"#fff",d:"M0 0h170v134H0z"})}),c.jsx("clipPath",{id:"b",children:c.jsx("rect",{width:170,height:114,y:20,fill:"#fff",rx:6})}),c.jsxs("linearGradient",{id:"c",x1:20.715,x2:50.521,y1:5.735,y2:95.406,gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{stopColor:"#313131"}),c.jsx("stop",{offset:1,stopColor:"#1B1B1B"})]})]})]}),h3=t=>c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:170,height:134,fill:"none",...t,children:[c.jsxs("g",{clipPath:"url(#a)",children:[c.jsxs("g",{clipPath:"url(#b)",children:[c.jsx("path",{fill:"url(#c)",d:"M0 0h170v114H0z"}),c.jsx("mask",{id:"d",fill:"#fff",children:c.jsx("path",{d:"M0 114h170v20H0v-20Z"})}),c.jsx("path",{fill:"#3C3E3F",d:"M0 114h170v20H0v-20Z"}),c.jsx("path",{fill:"#5D5D5D",d:"M0 115h170v-2H0v2Z",mask:"url(#d)"})]}),c.jsx("rect",{width:169,height:133,x:.5,y:.5,stroke:"#5D5D5D",rx:5.5}),c.jsx("path",{stroke:"#5D5D5D",strokeDasharray:"2 2",strokeLinejoin:"round",strokeMiterlimit:10,d:"M27.449 103.584a2.008 2.008 0 0 1-1.083-1.083l.462-.191a1.495 1.495 0 0 1-.114-.574v-1.011h-.5v-2.02h.5v-2.021h-.5v-2.021h.5v-2.021h-.5v-2.02h.5V88.6h-.5v-2.02h.5v-2.022h-.5v-2.02h.5v-2.021h-.5v-2.021h.5v-2.02h-.5v-2.022h.5v-2.02h-.5v-2.022h.5v-2.02h-.5V66.37h.5V64.35h-.5v-2.021h.5v-2.02h-.5v-2.022h.5v-2.02h-.5v-2.022h.5v-2.02h-.5v-2.021h.5v-2.021h-.5v-2.021h.5v-2.02h-.5V42.12h.5V40.1h-.5v-2.022h.5v-2.02h-.5v-2.021h.5v-2.021h-.5v-2.02h.5v-2.022h-.5v-2.02h.5v-2.021h-.5v-2.021h.5V19.89h-.5V17.87h.5v-2.021h-.5v-2.02h.5v-1.011c0-.205.04-.398.114-.574l-.462-.192c.203-.489.594-.88 1.083-1.083l.191.462c.176-.073.37-.113.574-.113h1.014v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h1.014c.204 0 .398.04.574.113l.191-.462c.489.203.88.594 1.083 1.083l-.462.192c.073.176.114.37.114.574v1.01h.5v2.021h-.5v2.02h.5v2.022h-.5v2.02h.5v2.021h-.5v2.021h.5v2.021h-.5v2.021h.5v2.02h-.5v2.022h.5v2.02h-.5v2.021h.5V40.1h-.5v2.021h.5v2.021h-.5v2.021h.5v2.02h-.5v2.022h.5v2.02h-.5v2.022h.5v2.02h-.5v2.021h.5v2.021h-.5v2.021h.5v2.02h-.5v2.022h.5v2.02h-.5v2.021h.5v2.021h-.5v2.021h.5v2.021h-.5v2.02h.5v2.022h-.5v2.02h.5v2.021h-.5v2.021h.5V88.6h-.5v2.021h.5v2.021h-.5v2.02h.5v2.022h-.5v2.02h.5v2.021h-.5v1.011c0 .204-.041.398-.114.574l.462.191a2.01 2.01 0 0 1-1.083 1.083l-.191-.462c-.176.073-.37.114-.574.114h-1.014v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.029v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.029v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5H90.07v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5H79.93v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5H69.79v-.5H67.76v.5h-2.028v-.5h-2.028v.5h-2.028v-.5H59.65v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5H47.48v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5H37.34v-.5h-2.029v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-1.014c-.204 0-.398-.041-.574-.114l-.191.462Z"}),c.jsx("path",{fill:"#5A5C5C",d:"M128 83c0 8.284 6.716 15 15 15 8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15-8.284 0-15 6.716-15 15Z"}),c.jsx("path",{fill:"#DDD",d:"M143.015 89.758a6.667 6.667 0 0 0 5.823-3.379c1.237-2.082 1.237-4.646 0-6.758-1.207-2.082-3.409-3.38-5.823-3.38a6.742 6.742 0 0 0-5.853 3.38c-1.237 2.112-1.237 4.676 0 6.758 1.207 2.112 3.409 3.38 5.853 3.38Zm0-14.482c2.746 0 5.28 1.479 6.668 3.862 1.388 2.414 1.388 5.34 0 7.724a7.666 7.666 0 0 1-6.668 3.862 7.678 7.678 0 0 1-6.698-3.862c-1.388-2.384-1.388-5.31 0-7.724a7.741 7.741 0 0 1 6.698-3.862Zm.724 2.897a.715.715 0 0 1-.724.724.697.697 0 0 1-.724-.724c0-.392.302-.724.724-.724.392 0 .724.332.724.724Zm-1.689 7.723c0 .543.422.966.965.966a.973.973 0 0 0 .966-.966.993.993 0 0 0-.966-.965.972.972 0 0 0-.965.965Zm-.966 0c0-1.056.845-1.93 1.931-1.93.513 0 .996.21 1.328.573l3.228-1.931a.478.478 0 0 1 .664.15c.15.242.06.544-.151.664l-3.228 1.931c.06.181.09.362.09.543 0 1.087-.875 1.931-1.931 1.931a1.906 1.906 0 0 1-1.931-1.93Zm6.034-6.275a.715.715 0 0 1-.724.724.697.697 0 0 1-.724-.724c0-.392.302-.724.724-.724.392 0 .724.332.724.724Zm-8.93 2.655c.392 0 .724.332.724.724a.715.715 0 0 1-.724.724.697.697 0 0 1-.724-.724c0-.392.301-.724.724-.724Zm2.172-2.655a.715.715 0 0 1-.724.724.697.697 0 0 1-.724-.724c0-.392.302-.724.724-.724.392 0 .724.332.724.724Z"}),c.jsx("path",{fill:"#5A5C5C",d:"M12 83c0 8.284 6.716 15 15 15 8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15-8.284 0-15 6.716-15 15Z"}),c.jsx("path",{fill:"#DDD",d:"M27.351 76.62a.804.804 0 0 0-.73 0L21.45 78.81c-.322.117-.556.438-.526.789 0 2.746 1.139 7.596 5.697 9.787a.804.804 0 0 0 .73 0c4.558-2.19 5.697-7.04 5.727-9.787a.855.855 0 0 0-.556-.789l-5.17-2.191Zm-1.08-.877a1.816 1.816 0 0 1 1.46 0l5.142 2.192c.643.292 1.14.905 1.14 1.665-.03 2.922-1.228 8.21-6.253 10.635a1.798 1.798 0 0 1-1.548 0c-5.026-2.425-6.223-7.713-6.223-10.635-.03-.76.467-1.373 1.11-1.665l5.171-2.192Z"}),c.jsx("rect",{width:30,height:30,fill:"#5A5C5C",rx:15,transform:"matrix(1 0 0 -1 12 45.46)"}),c.jsx("path",{fill:"#DDD",d:"M18.653 23.886c.132-.184.422-.237.58-.079l16.033 12.657a.394.394 0 0 1 .08.58c-.133.185-.396.212-.58.08L18.732 24.466a.42.42 0 0 1-.08-.58Zm10.416 6.065-1.45-1.16a7.74 7.74 0 0 1 4.746 2.189c.159.184.159.448 0 .606a.447.447 0 0 1-.606 0 6.555 6.555 0 0 0-2.69-1.635Zm-5.01.343a6.346 6.346 0 0 0-1.82 1.292.447.447 0 0 1-.606 0 .414.414 0 0 1 0-.58 7.975 7.975 0 0 1 1.688-1.292l.738.58Zm-.184-4.43-.791-.633a11.395 11.395 0 0 1 3.928-.686c3.218 0 6.17 1.319 8.307 3.428.158.159.158.422 0 .607-.158.158-.422.158-.607 0a10.84 10.84 0 0 0-7.7-3.19c-1.107 0-2.135.157-3.137.474ZM19.84 26.97l.686.528c-.449.343-.844.685-1.24 1.08a.447.447 0 0 1-.606 0c-.159-.184-.159-.447 0-.606.369-.369.765-.685 1.16-1.002Zm5.801 8.702a1.699 1.699 0 0 1-.21-1.687c.263-.554.79-.95 1.397-1.002a1.662 1.662 0 0 1 1.53.712c.369.5.448 1.134.21 1.687-.263.554-.79.95-1.397 1.002a1.662 1.662 0 0 1-1.53-.712Zm2.215-1.002a.868.868 0 0 0-.844-.843.85.85 0 0 0-.843.843c0 .475.369.844.843.844a.85.85 0 0 0 .844-.844Z"}),c.jsx("path",{fill:"#5A5C5C",d:"M128 30c0 8.284 6.716 15 15 15 8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15-8.284 0-15 6.716-15 15Z"}),c.jsx("path",{fill:"#DDD",d:"m142.001 23.885-.424 1.457c-.091.364-.364.637-.668.789-.243.121-.455.242-.667.364a1.232 1.232 0 0 1-1.032.212l-1.456-.364h-.122a3.276 3.276 0 0 0-.455.668l-.152.212a7.838 7.838 0 0 0-.333.728c0 .03.03.091.06.122l1.062 1.061c.243.273.364.668.334 1.002v.758c.03.334-.091.698-.334.971l-1.062 1.092a.231.231 0 0 0-.06.122c.091.242.212.485.333.728l.122.212c.152.213.303.456.455.668h.152l1.456-.364c.364-.091.759 0 1.032.182.212.151.424.273.667.394.304.152.577.425.668.79l.424 1.456c0 .03.031.06.061.09.304.061.607.061.941.061.303 0 .607 0 .91-.06.03-.03.061-.061.061-.091l.424-1.457c.091-.364.364-.637.668-.789a4.79 4.79 0 0 0 .667-.394c.304-.182.668-.273 1.032-.182l1.456.364h.152c.152-.212.304-.455.455-.668l.122-.212c.121-.243.242-.486.333-.728 0-.03-.03-.091-.06-.122l-1.062-1.092a1.316 1.316 0 0 1-.334-.97c0-.122.03-.244.03-.395 0-.122-.03-.243-.03-.364-.03-.334.091-.729.334-1.002l1.062-1.061c.03-.03.06-.092.06-.122a7.838 7.838 0 0 0-.333-.728l-.122-.212a12.155 12.155 0 0 0-.455-.668h-.152l-1.456.364c-.364.091-.728 0-1.032-.182a4.789 4.789 0 0 0-.667-.394c-.304-.152-.577-.425-.668-.79l-.424-1.456a.233.233 0 0 0-.061-.121 9.146 9.146 0 0 0-.91-.06c-.334 0-.637.03-.941.06a.233.233 0 0 0-.061.121Zm1.002-1.153c.394 0 .758.03 1.153.091.06.03.091.03.151.061.273.152.516.425.607.728l.425 1.457c0 .06.061.151.152.182.273.121.546.273.789.455.091.06.182.09.242.06l1.487-.364c.303-.09.668-.03.941.152l.121.122c.212.242.394.546.576.849l.152.212v.03c.152.304.304.608.425.911.03.06.03.091.03.152.031.334-.091.667-.333.91l-1.062 1.092c-.031.03-.061.122-.061.213 0 .151.03.303.03.455 0 .151-.03.303-.03.455 0 .121.03.212.061.243l1.062 1.092c.242.243.364.576.333.91 0 .03 0 .091-.03.152-.121.303-.273.607-.425.91l-.152.243a5.476 5.476 0 0 1-.606.85c-.031.06-.061.09-.091.12a1.206 1.206 0 0 1-.971.152l-1.457-.364c-.06-.03-.151 0-.242.061-.243.152-.516.303-.789.455-.091.03-.152.121-.152.182l-.425 1.426a1.277 1.277 0 0 1-.607.759c-.06.03-.091.03-.151.06-.395.03-.759.061-1.153.061-.395 0-.789-.03-1.184-.06-.06-.03-.091-.03-.151-.061a1.277 1.277 0 0 1-.607-.759l-.425-1.426c0-.06-.061-.151-.152-.182a4.11 4.11 0 0 1-.789-.455c-.091-.06-.182-.06-.242-.06l-1.457.363c-.333.091-.667.03-.94-.151-.061-.03-.091-.06-.122-.091-.242-.273-.424-.577-.606-.88l-.122-.213-.03-.03a11.98 11.98 0 0 1-.425-.91c0-.06-.03-.091-.03-.152 0-.334.091-.667.334-.91l1.061-1.092c.031-.03.061-.122.061-.243v-.91c0-.091-.03-.182-.061-.213l-1.061-1.092c-.243-.243-.334-.576-.334-.91 0-.061.03-.091.03-.152.121-.303.273-.607.425-.91l.03-.03.122-.213a6.09 6.09 0 0 1 .606-.85.24.24 0 0 1 .122-.12c.273-.183.607-.244.94-.153l1.457.364c.06.03.151 0 .242-.06.243-.152.516-.334.789-.455.091-.03.152-.122.152-.182l.425-1.457c.091-.303.334-.576.607-.728.06-.03.091-.03.151-.06.395-.061.789-.092 1.184-.092Zm-1.699 7.768c0 .637.303 1.183.849 1.486.516.304 1.153.304 1.699 0 .516-.303.85-.85.85-1.486 0-.607-.334-1.153-.85-1.457-.546-.303-1.183-.303-1.699 0-.546.304-.849.85-.849 1.457Zm4.369 0c0 .97-.516 1.85-1.335 2.336a2.781 2.781 0 0 1-2.67 0c-.85-.485-1.335-1.365-1.335-2.336 0-.94.485-1.82 1.335-2.306a2.781 2.781 0 0 1 2.67 0 2.702 2.702 0 0 1 1.335 2.306Z"}),c.jsx("circle",{cx:85,cy:57.277,r:32,fill:"#36AA6C"}),c.jsx("path",{fill:"#fff",d:"M72.313 42.777h9.968v1.812h-9.969c-1.019 0-1.812.85-1.812 1.813v16.312a1.79 1.79 0 0 0 1.813 1.813h25.374c.963 0 1.813-.793 1.813-1.813V46.402c0-.963-.85-1.813-1.813-1.813H87.72v-1.812h9.969c1.982 0 3.624 1.642 3.624 3.625v16.312a3.613 3.613 0 0 1-3.624 3.625H89.19l.623 3.625h3.342c.453 0 .906.453.906.907 0 .51-.453.906-.906.906H76.844a.895.895 0 0 1-.906-.906c0-.454.396-.907.906-.907h3.285l.623-3.625h-8.44c-2.039 0-3.624-1.586-3.624-3.625V46.402a3.614 3.614 0 0 1 3.624-3.625Zm10.251 23.562-.623 3.625h6.061l-.623-3.625h-4.815Zm3.342-22.656v12.348l2.946-3.002c.34-.34.962-.34 1.302 0 .34.34.34.963 0 1.302l-4.531 4.532c-.34.34-.963.34-1.303 0l-4.53-4.532c-.34-.34-.34-.962 0-1.302.339-.34.962-.34 1.302 0l3.002 3.002V43.683c0-.453.396-.906.906-.906.453 0 .906.453.906.906Z"})]}),c.jsxs("defs",{children:[c.jsx("clipPath",{id:"a",children:c.jsx("path",{fill:"#fff",d:"M0 0h170v134H0z"})}),c.jsx("clipPath",{id:"b",children:c.jsx("rect",{width:170,height:134,fill:"#fff",rx:6})}),c.jsxs("linearGradient",{id:"c",x1:20.715,x2:62.592,y1:6.956,y2:110.839,gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{stopColor:"#313131"}),c.jsx("stop",{offset:1,stopColor:"#1B1B1B"})]})]})]}),m3=t=>c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:170,height:134,fill:"none",...t,children:[c.jsxs("g",{clipPath:"url(#a)",children:[c.jsxs("g",{clipPath:"url(#b)",children:[c.jsx("path",{fill:"url(#c)",d:"M0 0h170v114H0z"}),c.jsx("path",{stroke:"#5D5D5D",strokeDasharray:"2 2",strokeMiterlimit:10,d:"M27.449 103.138a2.008 2.008 0 0 1-1.083-1.083l.462-.191a1.493 1.493 0 0 1-.114-.574v-1.011h-.5v-2.02h.5v-2.021h-.5v-2.021h.5v-2.021h-.5v-2.02h.5v-2.022h-.5v-2.02h.5v-2.022h-.5v-2.02h.5V80.07h-.5V78.05h.5v-2.021h-.5v-2.02h.5v-2.022h-.5v-2.02h.5v-2.021h-.5v-2.021h.5v-2.021h-.5v-2.021h.5v-2.02h-.5V57.84h.5v-2.02h-.5V53.8h.5v-2.021h-.5v-2.021h.5v-2.021h-.5v-2.021h.5v-2.02h-.5v-2.022h.5v-2.02h-.5v-2.022h.5v-2.02h-.5V33.59h.5V31.57h-.5v-2.021h.5v-2.02h-.5v-2.022h.5v-2.02h-.5v-2.021h.5v-2.021h-.5v-2.021h.5v-2.021h-.5v-2.02h.5v-1.011c0-.205.04-.398.114-.574l-.462-.192c.203-.489.594-.88 1.083-1.083l.191.462c.176-.073.37-.113.574-.113h1.014v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h1.014c.204 0 .398.04.574.113l.191-.462c.489.203.88.594 1.083 1.083l-.462.192c.073.176.114.37.114.574v1.01h.5v2.021h-.5v2.02h.5v2.022h-.5v2.02h.5v2.021h-.5v2.021h.5v2.021h-.5v2.021h.5v2.02h-.5v2.022h.5v2.02h-.5v2.022h.5v2.02h-.5v2.021h.5v2.021h-.5v2.021h.5v2.02h-.5v2.022h.5v2.02h-.5V53.8h.5v2.021h-.5v2.021h.5v2.021h-.5v2.02h.5v2.022h-.5v2.02h.5v2.021h-.5v2.021h.5v2.021h-.5v2.021h.5v2.021h-.5v2.02h.5v2.022h-.5v2.02h.5v2.022h-.5v2.02h.5v2.021h-.5v2.021h.5v2.021h-.5v2.02h.5v2.022h-.5v2.02h.5v2.021h-.5v1.011c0 .204-.041.398-.114.574l.462.191a2.01 2.01 0 0 1-1.083 1.083l-.191-.462c-.176.073-.37.114-.574.114h-1.014v.5h-2.028v-.5h-2.028v.5h-2.029v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.029v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5H90.07v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5H79.93v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5H69.79v-.5H67.76v.5h-2.028v-.5h-2.028v.5h-2.028v-.5H59.65v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5H47.48v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5H37.34v-.5h-2.029v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-1.014c-.204 0-.398-.041-.574-.114l-.191.462Z"}),c.jsx("mask",{id:"d",fill:"#fff",children:c.jsx("path",{d:"M0 114h170v20H0v-20Z"})}),c.jsx("path",{fill:"#3C3E3F",d:"M0 114h170v20H0v-20Z"}),c.jsx("path",{fill:"#5D5D5D",d:"M0 115h170v-2H0v2Z",mask:"url(#d)"})]}),c.jsx("rect",{width:169,height:133,x:.5,y:.5,stroke:"#5D5D5D",rx:5.5}),c.jsx("path",{fill:"#36AA6C",d:"M114.756 28.708H55.244c-1.427 0-2.584 1.512-2.584 3.377v49.491c0 1.866 1.157 3.378 2.584 3.378h59.512c1.427 0 2.584-1.512 2.584-3.378v-49.49c0-1.866-1.157-3.378-2.584-3.378Z"}),c.jsx("path",{fill:"#fff",fillOpacity:.3,d:"M98.8 37.185a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833ZM104.076 37.185a1.417 1.417 0 1 0 0-2.834 1.417 1.417 0 0 0 0 2.834Z"}),c.jsx("path",{fill:"#F0F6FE",d:"M109.351 37.185a1.417 1.417 0 1 0 0-2.834 1.417 1.417 0 0 0 0 2.834Z"}),c.jsx("path",{fill:"#3C3E3F",stroke:"#4B4E4F",strokeMiterlimit:10,d:"M10.804 18.367H43.32c.192 0 .409.105.595.358s.316.627.316 1.061v28.126c0 .434-.13.808-.316 1.06-.186.254-.403.36-.595.36H10.803c-.193 0-.41-.106-.595-.36-.186-.252-.317-.626-.317-1.06V19.786c0-.434.13-.808.317-1.06.186-.254.402-.36.595-.36Z"}),c.jsx("path",{fill:"#fff",fillOpacity:.3,d:"M26.192 26.344a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833ZM31.468 26.344a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),c.jsx("path",{fill:"#F0F6FE",d:"M36.743 26.344a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),c.jsx("path",{fill:"#3C3E3F",stroke:"#4B4E4F",strokeMiterlimit:10,d:"M126.63 18.367h32.517c.192 0 .409.105.595.358s.316.627.316 1.061v28.126c0 .434-.13.808-.316 1.06-.186.254-.403.36-.595.36H126.63c-.193 0-.409-.106-.595-.36-.186-.252-.317-.626-.317-1.06V19.786c0-.434.131-.808.317-1.06.186-.254.402-.36.595-.36Z"}),c.jsx("path",{fill:"#fff",fillOpacity:.3,d:"M142.019 26.344a1.416 1.416 0 1 0 0-2.832 1.416 1.416 0 0 0 0 2.832ZM147.294 26.344a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),c.jsx("path",{fill:"#F0F6FE",d:"M152.569 26.344a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),c.jsx("path",{fill:"#3C3E3F",stroke:"#4B4E4F",strokeMiterlimit:10,d:"M10.804 63.694H43.32c.192 0 .409.106.595.359s.316.626.316 1.061v28.125c0 .435-.13.808-.316 1.061-.186.254-.403.359-.595.359H10.803c-.193 0-.41-.106-.595-.359-.186-.253-.317-.626-.317-1.06V65.113c0-.435.13-.808.317-1.061.186-.253.402-.358.595-.358Z"}),c.jsx("path",{fill:"#fff",fillOpacity:.3,d:"M27.192 71.672a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833ZM32.468 71.672a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),c.jsx("path",{fill:"#F0F6FE",d:"M37.743 71.672a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),c.jsx("path",{fill:"#3C3E3F",stroke:"#4B4E4F",strokeMiterlimit:10,d:"M126.63 63.694h32.517c.192 0 .409.106.595.359s.316.626.316 1.061v28.125c0 .435-.13.808-.316 1.061-.186.254-.403.359-.595.359H126.63c-.193 0-.409-.106-.595-.359s-.317-.626-.317-1.06V65.113c0-.435.131-.808.317-1.061.186-.253.402-.358.595-.358Z"}),c.jsx("path",{fill:"#fff",fillOpacity:.3,d:"M143.019 71.672a1.416 1.416 0 1 0 0-2.833 1.416 1.416 0 0 0 0 2.833ZM148.294 71.672a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),c.jsx("path",{fill:"#F0F6FE",d:"M153.569 71.672a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),c.jsx("path",{fill:"#fff",d:"M49.318 40.488h5.836a.486.486 0 1 0 0-.973h-5.836a.486.486 0 1 0 0 .973Z"}),c.jsx("path",{fill:"#fff",d:"M44.318 40.488h5.836a.486.486 0 1 0 0-.973h-5.836a.486.486 0 1 0 0 .973Z"}),c.jsx("path",{fill:"#fff",d:"M44.482 40.488h-5.836a.486.486 0 1 1 0-.973h5.836a.486.486 0 1 1 0 .973ZM60.597 40.004l-3.255-3.255a.486.486 0 1 1 .688-.688l3.6 3.6c.19.19.19.497 0 .687l-3.594 3.593a.486.486 0 1 1-.688-.688l3.25-3.249Z"}),c.jsx("path",{fill:"#3BB272",d:"M32.147 36.709a3.375 3.375 0 1 1 0 6.75 3.375 3.375 0 0 1 0-6.75Z"}),c.jsx("path",{fill:"#fff",d:"M134.062 65.808v-5.836a.487.487 0 0 0-.973 0v5.836a.486.486 0 1 0 .973 0Z"}),c.jsx("path",{fill:"#fff",d:"M134.062 70.808v-5.836a.487.487 0 0 0-.973 0v5.837a.486.486 0 1 0 .973 0Z"}),c.jsx("path",{fill:"#fff",d:"M134.062 70.644v5.836a.487.487 0 0 1-.973 0v-5.836a.486.486 0 1 1 .973 0ZM133.578 54.529l-3.255 3.255a.487.487 0 0 1-.688-.688l3.599-3.599c.19-.19.498-.19.688 0l3.593 3.593a.486.486 0 1 1-.688.688l-3.249-3.249Z"}),c.jsx("path",{fill:"#AAB0B0",d:"M130.282 82.98a3.376 3.376 0 1 1 6.752 0 3.376 3.376 0 0 1-6.752 0Z"})]}),c.jsxs("defs",{children:[c.jsx("clipPath",{id:"a",children:c.jsx("path",{fill:"#fff",d:"M0 0h170v134H0z"})}),c.jsx("clipPath",{id:"b",children:c.jsx("rect",{width:170,height:134,fill:"#fff",rx:6})}),c.jsxs("linearGradient",{id:"c",x1:20.715,x2:62.592,y1:6.956,y2:110.839,gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{stopColor:"#313131"}),c.jsx("stop",{offset:1,stopColor:"#1B1B1B"})]})]})]}),g3=t=>c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:170,height:134,fill:"none",...t,children:[c.jsxs("g",{clipPath:"url(#a)",children:[c.jsxs("g",{clipPath:"url(#b)",children:[c.jsx("path",{fill:"url(#c)",d:"M0 0h170v114H0z"}),c.jsx("mask",{id:"d",fill:"#fff",children:c.jsx("path",{d:"M0 114h170v20H0v-20Z"})}),c.jsx("path",{fill:"#3C3E3F",d:"M0 114h170v20H0v-20Z"}),c.jsx("path",{fill:"#5D5D5D",d:"M0 115h170v-2H0v2Z",mask:"url(#d)"})]}),c.jsx("rect",{width:169,height:133,x:.5,y:.5,stroke:"#5D5D5D",rx:5.5}),c.jsx("path",{fill:"#DE2122",d:"M79.593 28.399c2.403-4.163 8.411-4.163 10.814 0l29.741 51.512c2.403 4.162-.601 9.366-5.407 9.366H55.259c-4.806 0-7.81-5.204-5.407-9.366l29.74-51.512Z"}),c.jsx("path",{fill:"#fff",fillRule:"evenodd",d:"M81.84 42.528h6.321a1 1 0 0 1 .994 1.113l-2.691 23.67a1 1 0 0 1-.994.887h-1.033a1 1 0 0 1-.994-.89l-2.596-23.671a1 1 0 0 1 .994-1.11Zm3.128 30.366a3.547 3.547 0 1 0 0 7.093 3.547 3.547 0 0 0 0-7.093Z",clipRule:"evenodd"}),c.jsx("path",{fill:"#5A5C5C",d:"M115.69 27.082 132.459.185l17.514-.151-25.545 24.389 17.858 23.176-25.076 13.678L131.267 47.6 115.69 27.082Z"})]}),c.jsxs("defs",{children:[c.jsx("clipPath",{id:"a",children:c.jsx("path",{fill:"#fff",d:"M0 0h170v134H0z"})}),c.jsx("clipPath",{id:"b",children:c.jsx("rect",{width:170,height:134,fill:"#fff",rx:6})}),c.jsxs("linearGradient",{id:"c",x1:20.715,x2:62.592,y1:6.956,y2:110.839,gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{stopColor:"#313131"}),c.jsx("stop",{offset:1,stopColor:"#1B1B1B"})]})]})]}),v3={edgeNotificationsPermissionTimeout:15e3},rt={WINDOW_MANAGEMENT:uo.WINDOW_MANAGEMENT,NOTIFICATIONS:uo.NOTIFICATIONS,POPUPS:"popups",PWA_INSTALL:"pwa-install"},y3={name:rt.WINDOW_MANAGEMENT,label:`Allow window management${cs?"":" (not available in your browser)"}`,heading:"Allow Window Management",description:`By granting this permission you will be able to load layouts containing multiple
56
+ ***************************************************************************** */var Qc=function(){return Qc=Object.assign||function(n){for(var e,o=1,r=arguments.length;o<r;o++){e=arguments[o];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}return n},Qc.apply(this,arguments)};function oC(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(e[o[r]]=t[o[r]]);return e}function el(t,n){if(t===n||t===null&&n===null)return!0;if(typeof t!=typeof n)return!1;if(typeof t=="object"){if(Array.isArray(t)){if(!Array.isArray(n)||t.length!==n.length)return!1;for(var e=0;e<t.length;e++)if(!el(t[e],n[e]))return!1;return!0}var o=Object.keys(t);if(o.length!==Object.keys(n).length)return!1;for(var e=0;e<o.length;e++)if(!n.hasOwnProperty(o[e])||!el(t[o[e]],n[o[e]]))return!1;return!0}}var Zr=function(t){return Array.isArray(t)},zi=function(t){return typeof t=="object"&&t!==null&&!Zr(t)},rC=function(t){switch(typeof t){case"string":return"a string";case"number":return"a number";case"boolean":return"a boolean";case"undefined":return"undefined";case"object":return t instanceof Array?"an array":t===null?"null":"an object";default:return JSON.stringify(t)}},Rn=function(t,n){return"expected "+t+", got "+rC(n)},Hr=function(t){return t.map(function(n){return typeof n=="string"?"."+n:"["+n+"]"}).join("")},$r=function(t,n){var e=n.at,o=oC(n,["at"]);return Qc({at:t+(e||"")},o)},yt=function(){function t(n){var e=this;this.decode=n,this.run=function(o){return Zs(function(r){return{kind:"DecoderError",input:o,at:"input"+(r.at||""),message:r.message||""}},e.decode(o))},this.runPromise=function(o){return Xx(e.run(o))},this.runWithException=function(o){return eC(e.run(o))},this.map=function(o){return new t(function(r){return tC(o,e.decode(r))})},this.andThen=function(o){return new t(function(r){return nC(function(i){return o(i).decode(r)},e.decode(r))})},this.where=function(o,r){return e.andThen(function(i){return o(i)?t.succeed(i):t.fail(r)})}}return t.string=function(){return new t(function(n){return typeof n=="string"?xt(n):ft({message:Rn("a string",n)})})},t.number=function(){return new t(function(n){return typeof n=="number"?xt(n):ft({message:Rn("a number",n)})})},t.boolean=function(){return new t(function(n){return typeof n=="boolean"?xt(n):ft({message:Rn("a boolean",n)})})},t.constant=function(n){return new t(function(e){return el(e,n)?xt(n):ft({message:"expected "+JSON.stringify(n)+", got "+JSON.stringify(e)})})},t.object=function(n){return new t(function(e){if(zi(e)&&n){var o={};for(var r in n)if(n.hasOwnProperty(r)){var i=n[r].decode(e[r]);if(i.ok===!0)i.result!==void 0&&(o[r]=i.result);else return e[r]===void 0?ft({message:"the key '"+r+"' is required but was not present"}):ft($r("."+r,i.error))}return xt(o)}else return zi(e)?xt(e):ft({message:Rn("an object",e)})})},t.array=function(n){return new t(function(e){if(Zr(e)&&n){var o=function(r,i){return Zs(function(a){return $r("["+i+"]",a)},n.decode(r))};return e.reduce(function(r,i,a){return cf(function(s,l){return s.concat([l])},r,o(i,a))},xt([]))}else return Zr(e)?xt(e):ft({message:Rn("an array",e)})})},t.tuple=function(n){return new t(function(e){if(Zr(e)){if(e.length!==n.length)return ft({message:"expected a tuple of length "+n.length+", got one of length "+e.length});for(var o=[],r=0;r<n.length;r++){var i=n[r].decode(e[r]);if(i.ok)o[r]=i.result;else return ft($r("["+r+"]",i.error))}return xt(o)}else return ft({message:Rn("a tuple of length "+n.length,e)})})},t.union=function(n,e){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];return t.oneOf.apply(t,[n,e].concat(o))},t.intersection=function(n,e){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];return new t(function(i){return[n,e].concat(o).reduce(function(a,s){return cf(Object.assign,a,s.decode(i))},xt({}))})},t.anyJson=function(){return new t(function(n){return xt(n)})},t.unknownJson=function(){return new t(function(n){return xt(n)})},t.dict=function(n){return new t(function(e){if(zi(e)){var o={};for(var r in e)if(e.hasOwnProperty(r)){var i=n.decode(e[r]);if(i.ok===!0)o[r]=i.result;else return ft($r("."+r,i.error))}return xt(o)}else return ft({message:Rn("an object",e)})})},t.optional=function(n){return new t(function(e){return e==null?xt(void 0):n.decode(e)})},t.oneOf=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return new t(function(o){for(var r=[],i=0;i<n.length;i++){var a=n[i].decode(o);if(a.ok===!0)return a;r[i]=a.error}var s=r.map(function(l){return"at error"+(l.at||"")+": "+l.message}).join('", "');return ft({message:'expected a value matching one of the decoders, got the errors ["'+s+'"]'})})},t.withDefault=function(n,e){return new t(function(o){return xt(Qx(n,e.decode(o)))})},t.valueAt=function(n,e){return new t(function(o){for(var r=o,i=0;i<n.length;i++){if(r===void 0)return ft({at:Hr(n.slice(0,i+1)),message:"path does not exist"});if(typeof n[i]=="string"&&!zi(r))return ft({at:Hr(n.slice(0,i+1)),message:Rn("an object",r)});if(typeof n[i]=="number"&&!Zr(r))return ft({at:Hr(n.slice(0,i+1)),message:Rn("an array",r)});r=r[n[i]]}return Zs(function(a){return r===void 0?{at:Hr(n),message:"path does not exist"}:$r(Hr(n),a)},e.decode(r))})},t.succeed=function(n){return new t(function(e){return xt(n)})},t.fail=function(n){return new t(function(e){return ft({message:n})})},t.lazy=function(n){return new t(function(e){return n().decode(e)})},t}(),iC=yt.string,aC=yt.number,kr=yt.boolean,Dt=yt.anyJson;yt.unknownJson;var po=yt.constant,ot=yt.object,sC=yt.array;yt.tuple;yt.dict;var Le=yt.optional,pi=yt.oneOf;yt.union;yt.intersection;yt.withDefault;yt.valueAt;yt.succeed;var cC=yt.fail;yt.lazy;const Ht=iC().where(t=>t.length>0,"Expected a non-empty string"),lC=aC().where(t=>t>=0,"Expected a non-negative number");kr();const tn=(t,n)=>{const e=typeof t;return e==="function"?Dt():cC(`The provided argument as ${n} should be of type function, provided: ${typeof e}`)},i0=ot({name:Ht}),uC="Welcome",dC=t=>t.components.reduce((e,o)=>{if(o.type==="workspaceFrame"){const r=o.state.workspaces.map(i=>i.config.name);e.push(...r)}return e},[]),a0=t=>t.trim().length>0,fC=(t,n)=>{const[e,o]=g.useState(void 0),[r,i]=Tn("sessionStorage",r0,i0),a=g.useRef(!1),s=su(),l=cu(),u=g.useContext(_e.IOConnectContext),f=g.useCallback(async({name:d})=>{try{await u.layouts.setDefaultGlobal(d)}catch(p){console.error("Failed to set default Layout: ",{error:p})}},[u]);return g.useEffect(()=>{if(u)return u.layouts.onDefaultGlobalChanged(d=>{o(d)})},[u]),g.useEffect(()=>{if(u)return u.layouts.onRestored(d=>{i({name:d.name})})},[u]),g.useEffect(()=>{if(u)return u.layouts.onRemoved(d=>{(d==null?void 0:d.name)===(r==null?void 0:r.name)&&i(null)})},[u,r]),g.useEffect(()=>{if(u)return u.layouts.onRenamed((d,p)=>{(p==null?void 0:p.name)===(r==null?void 0:r.name)&&i({name:d.name})})},[u,r]),g.useEffect(()=>{var p;if(!u||!((p=window.iobrowser)!=null&&p.platformStarted)||a.current)return;(async()=>{var x;a.current=!0;const h=await u.layouts.getDefaultGlobal()??(await u.layouts.getAll("Global")).find(S=>S.name===uC);if(!h||(o({name:h.name}),r))return;if(t(!0),n){await s(h.name),t(!1);return}const m=await((x=u.workspaces)==null?void 0:x.getWorkspace(S=>S.children.length===0)),v=await u.layouts.get(h.name,"Global");if(!v)throw new Error("Default Global Layout not found.");const y=dC(v);Promise.all(y.map((S,b)=>l({id:S,reuseWorkspaceId:b===0?m==null?void 0:m.id:void 0}))),t(!1)})().catch(h=>console.error("Initial Global Layout setup failed. ",Hc(h)))},[u,r,s,l,n]),{defaultLayout:e,activeLayout:r,setDefaultLayout:f,setActiveLayout:i}},s0=g.createContext(void 0),bn=()=>{const t=g.useContext(s0);if(t===void 0)throw new Error("useLaunchpadAPI must be used within a LaunchpadAPIProvider");return t},pC=({children:t,close:n,isOpen:e,isGlobalLayoutsAvailable:o})=>{const[r,i]=g.useState(!1),{defaultLayout:a,activeLayout:s,setDefaultLayout:l,setActiveLayout:u}=fC(i,o),f=g.useMemo(()=>({close:n,isOpen:e,defaultLayout:a,activeLayout:s,setDefaultLayout:l,setActiveLayout:u,isLayoutOperationBlocked:r,setIsLayoutOperationBlocked:i,isGlobalLayoutsAvailable:o}),[n,e,a,s,l,u,r,o]);return c.jsx(s0.Provider,{value:f,children:t})},Pr={CUSTOM_PREFS:"customPrefs",COLLAPSED_SECTIONS:"_launchpad_collapsedSections",FAVORITES:"_launchpad_favorites",IS_LAYOUTS_PANEL_OPEN:"_launchpad_isLayoutsPanelOpen",IS_LAUNCHPAD_COLLAPSED:"_launchpad_isCollapsed",IS_LAUNCHPAD_PINNED:"_launchpad_isPinned",LAYOUTS_SHOW_DELETE_PROMPT:"_layouts_showDeletePrompt"},Uo=()=>{const{value:t,update:n,isLoading:e,error:o}=Xt({prefKey:Pr.IS_LAUNCHPAD_PINNED}),r=g.useCallback(()=>n(i=>!i),[n]);return{error:o,isLaunchpadPinned:t,isLoading:e,toggle:r}},c0=()=>{const t=g.useContext(_e.IOConnectContext),{setActiveLayout:n,setDefaultLayout:e,close:o}=bn(),{isLaunchpadPinned:r}=Uo(),{value:i,update:a}=Xt({prefKey:Pr.LAYOUTS_SHOW_DELETE_PROMPT}),s=()=>{r||o==null||o()};return g.useCallback(async u=>{const{layout:f,actionName:d}=u;return await Kx[d]({io:t,layout:f,setActiveLayout:n,setDefaultLayout:e,closeLaunchpad:s,showDeletePromptPref:i,updateShowDeletePromptPref:a})},[t,e,n,o,i,a])},Ar=()=>{const{isLayoutOperationBlocked:t,setIsLayoutOperationBlocked:n}=bn();return async e=>{if(!t){n(!0);try{await e()}catch(o){console.error("Layout operation failed: ",{error:o})}n(!1)}}},l0={CREATE_WORKSPACE:"createWorkspace"},hC=async t=>{const{io:n,item:e}=t;if(n.workspaces)try{await n.workspaces.restoreWorkspace(e.id,{newFrame:!0})}catch(o){await He({io:n,variant:Fe.WARNING,text:`Failed to load Workspace "${e.title}".`,error:o})}},mC=async t=>{const{io:n,item:e,removeFavorite:o}=t;if(n.workspaces){if("modals"in n&&n.modals){const r="delete",{isEnterPressed:i,responseButtonClicked:a}=await n.modals.dialogs.request({templateName:Ir.NO_INPUTS_CONFIRMATION_DIALOG,variables:{heading:`Delete "${e.title}"`,text:"Are you sure you want to delete this Workspace?",actionButtons:[{variant:"critical",text:"Delete",id:r},{variant:"outline",text:"Cancel",id:"cancel",autofocus:!0}]}});if(!(i||(a==null?void 0:a.id)===r))return}try{await n.workspaces.layouts.delete(e.id),await o(e),await He({io:n,variant:Fe.SUCCESS,text:`"Workspace ${e.title}" was successfully deleted.`})}catch(r){await He({io:n,variant:Fe.WARNING,text:`Failed to delete Workspace "${e.title}".`,error:r})}}},gC=async t=>{const{io:n}=t;if(n.workspaces)try{await n.workspaces.createWorkspace({children:[],frame:{newFrame:!0}})}catch(e){await He({io:n,variant:Fe.WARNING,text:"Failed to create a new Workspace.",error:e})}},vC={[Sa.OPEN_IN_NEW_WINDOW]:hC,[Sa.DELETE]:mC,[l0.CREATE_WORKSPACE]:gC};class u0{constructor(){Mt(this,"queue",[]);Mt(this,"isExecutingQueue",!1)}enqueue(n){return new Promise((e,o)=>{this.queue.push({action:n,resolve:e,reject:o}),this.executeQueue()})}async executeQueue(){if(!this.isExecutingQueue){for(this.isExecutingQueue=!0;this.queue.length;){const n=this.queue.shift();if(!n){this.isExecutingQueue=!1;return}try{const e=await n.action();n.resolve(e)}catch(e){n.reject(e)}await this.intervalBreak()}this.isExecutingQueue=!1}}intervalBreak(){return new Promise(n=>setTimeout(n,0))}}const d0=()=>{const[t,n]=g.useState([]),e=g.useContext(_e.IOConnectContext);return g.useEffect(()=>{if(!(e!=null&&e.workspaces))return;let o=!1;const r=e.workspaces.layouts.onSaved(({name:a})=>{o||t.find(({id:s})=>s===a)||n(s=>[...s,{id:a,title:a}])}),i=e.workspaces.layouts.onRemoved(({name:a})=>{o||n(s=>s.filter(({title:l})=>l!==a))});return()=>{o=!0,[r,i].forEach(async a=>{try{(await a)()}catch(s){console.error(s)}})}},[e,t]),t},lf=new u0,ss=()=>{const{value:t,update:n,isLoading:e}=Xt({prefKey:Pr.FAVORITES}),o=n0(),r=d0(),i=g.useMemo(()=>(t??[]).filter(l=>l.type===jt.APPLICATION?o.some(u=>u.id===l.id):l.type===jt.WORKSPACE?r.some(u=>u.id===l.id):!0),[t,o,r]),a=g.useCallback(({openInstances:l,...u})=>lf.enqueue(()=>n((f=[])=>{const d=f.find(p=>p.id===u.id&&p.type&&u.type);return d?f.filter(p=>p!==d):[u,...f]})),[n]),s=g.useCallback(l=>lf.enqueue(()=>n((u=[])=>u.filter(f=>!(f.id===l.id&&f.type===l.type)))),[n]);return{favorites:i,toggleFavorite:a,removeFavorite:s,isLoading:e}},f0=()=>{const t=g.useContext(_e.IOConnectContext),{removeFavorite:n}=ss();return(e,o)=>{vC[o]({io:t,item:e,removeFavorite:n})}},yC=()=>{const t=g.useContext(_e.IOConnectContext);return async n=>t.interop.methods().every(e=>e.name!==(n==null?void 0:n.method))?console.error("Interop method not found."):await t.interop.invoke(n.method,n.params,n.target).catch(e=>console.error({error:e}))},wC=()=>{const[t,n]=g.useState(!1),e=g.useContext(_e.IOConnectContext);return g.useEffect(()=>{if(!e)return;let o;return(async()=>{var r;try{o=await((r=e.workspaces)==null?void 0:r.onWorkspaceOpened(()=>n(!0)))}catch(i){console.error(i)}})(),()=>o==null?void 0:o()},[e]),t},nu=()=>{const{value:t,update:n,isLoading:e,error:o}=Xt({prefKey:Pr.IS_LAUNCHPAD_COLLAPSED});return{error:o,isLaunchpadCollapsed:t,setIsLaunchpadCollapsed:n,isLoading:e}};var tl={exports:{}};(function(t,n){(function(e,o){var r="1.0.40",i="",a="?",s="function",l="undefined",u="object",f="string",d="major",p="model",h="name",m="type",v="vendor",y="version",x="architecture",S="console",b="mobile",w="tablet",E="smarttv",j="wearable",_="embedded",M=500,F="Amazon",D="Apple",A="ASUS",P="BlackBerry",re="Browser",ae="Chrome",z="Edge",ee="Firefox",q="Google",ie="Huawei",J="LG",W="Microsoft",Q="Motorola",Y="Opera",H="Samsung",L="Sharp",O="Sony",I="Xiaomi",B="Zebra",U="Facebook",V="Chromium OS",se="Mac OS",Z=" Browser",T=function(X,ne){var te={};for(var le in X)ne[le]&&ne[le].length%2===0?te[le]=ne[le].concat(X[le]):te[le]=X[le];return te},me=function(X){for(var ne={},te=0;te<X.length;te++)ne[X[te].toUpperCase()]=X[te];return ne},be=function(X,ne){return typeof X===f?Ie(ne).indexOf(Ie(X))!==-1:!1},Ie=function(X){return X.toLowerCase()},Oe=function(X){return typeof X===f?X.replace(/[^\d\.]/g,i).split(".")[0]:o},ke=function(X,ne){if(typeof X===f)return X=X.replace(/^\s\s*/,i),typeof ne===l?X:X.substring(0,M)},ue=function(X,ne){for(var te=0,le,he,ye,pe,oe,Ee;te<ne.length&&!oe;){var Re=ne[te],Pe=ne[te+1];for(le=he=0;le<Re.length&&!oe&&Re[le];)if(oe=Re[le++].exec(X),oe)for(ye=0;ye<Pe.length;ye++)Ee=oe[++he],pe=Pe[ye],typeof pe===u&&pe.length>0?pe.length===2?typeof pe[1]==s?this[pe[0]]=pe[1].call(this,Ee):this[pe[0]]=pe[1]:pe.length===3?typeof pe[1]===s&&!(pe[1].exec&&pe[1].test)?this[pe[0]]=Ee?pe[1].call(this,Ee,pe[2]):o:this[pe[0]]=Ee?Ee.replace(pe[1],pe[2]):o:pe.length===4&&(this[pe[0]]=Ee?pe[3].call(this,Ee.replace(pe[1],pe[2])):o):this[pe]=Ee||o;te+=2}},k=function(X,ne){for(var te in ne)if(typeof ne[te]===u&&ne[te].length>0){for(var le=0;le<ne[te].length;le++)if(be(ne[te][le],X))return te===a?o:te}else if(be(ne[te],X))return te===a?o:te;return ne.hasOwnProperty("*")?ne["*"]:X},C={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},N={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},R={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[y,[h,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[y,[h,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[h,y],[/opios[\/ ]+([\w\.]+)/i],[y,[h,Y+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[y,[h,Y+" GX"]],[/\bopr\/([\w\.]+)/i],[y,[h,Y]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[y,[h,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[y,[h,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[h,y],[/quark(?:pc)?\/([-\w\.]+)/i],[y,[h,"Quark"]],[/\bddg\/([\w\.]+)/i],[y,[h,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[y,[h,"UC"+re]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[y,[h,"WeChat"]],[/konqueror\/([\w\.]+)/i],[y,[h,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[y,[h,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[y,[h,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[y,[h,"Smart Lenovo "+re]],[/(avast|avg)\/([\w\.]+)/i],[[h,/(.+)/,"$1 Secure "+re],y],[/\bfocus\/([\w\.]+)/i],[y,[h,ee+" Focus"]],[/\bopt\/([\w\.]+)/i],[y,[h,Y+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[y,[h,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[y,[h,"Dolphin"]],[/coast\/([\w\.]+)/i],[y,[h,Y+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[y,[h,"MIUI"+Z]],[/fxios\/([\w\.-]+)/i],[y,[h,ee]],[/\bqihoobrowser\/?([\w\.]*)/i],[y,[h,"360"]],[/\b(qq)\/([\w\.]+)/i],[[h,/(.+)/,"$1Browser"],y],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[h,/(.+)/,"$1"+Z],y],[/samsungbrowser\/([\w\.]+)/i],[y,[h,H+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[y,[h,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[h,"Sogou Mobile"],y],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[h,y],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[h],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[y,h],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[h,U],y],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[h,y],[/\bgsa\/([\w\.]+) .*safari\//i],[y,[h,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[y,[h,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[y,[h,ae+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[h,ae+" WebView"],y],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[y,[h,"Android "+re]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[h,y],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[y,[h,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[y,h],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[h,[y,k,C]],[/(webkit|khtml)\/([\w\.]+)/i],[h,y],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[h,"Netscape"],y],[/(wolvic|librewolf)\/([\w\.]+)/i],[h,y],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[y,[h,ee+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[h,[y,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[h,[y,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[x,"amd64"]],[/(ia32(?=;))/i],[[x,Ie]],[/((?:i[346]|x)86)[;\)]/i],[[x,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[x,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[x,"armhf"]],[/windows (ce|mobile); ppc;/i],[[x,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[x,/ower/,i,Ie]],[/(sun4\w)[;\)]/i],[[x,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[x,Ie]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[p,[v,H],[m,w]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[p,[v,H],[m,b]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[p,[v,D],[m,b]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[p,[v,D],[m,w]],[/(macintosh);/i],[p,[v,D]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[p,[v,L],[m,b]],[/(?:honor)([-\w ]+)[;\)]/i],[p,[v,"Honor"],[m,b]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[p,[v,ie],[m,w]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[p,[v,ie],[m,b]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[p,/_/g," "],[v,I],[m,b]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[p,/_/g," "],[v,I],[m,w]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[p,[v,"OPPO"],[m,b]],[/\b(opd2\d{3}a?) bui/i],[p,[v,"OPPO"],[m,w]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[p,[v,"Vivo"],[m,b]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[p,[v,"Realme"],[m,b]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[p,[v,Q],[m,b]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[p,[v,Q],[m,w]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[p,[v,J],[m,w]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[p,[v,J],[m,b]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[p,[v,"Lenovo"],[m,w]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[p,/_/g," "],[v,"Nokia"],[m,b]],[/(pixel c)\b/i],[p,[v,q],[m,w]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[p,[v,q],[m,b]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[p,[v,O],[m,b]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[p,"Xperia Tablet"],[v,O],[m,w]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[p,[v,"OnePlus"],[m,b]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[p,[v,F],[m,w]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[p,/(.+)/g,"Fire Phone $1"],[v,F],[m,b]],[/(playbook);[-\w\),; ]+(rim)/i],[p,v,[m,w]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[p,[v,P],[m,b]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[p,[v,A],[m,w]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[p,[v,A],[m,b]],[/(nexus 9)/i],[p,[v,"HTC"],[m,w]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[v,[p,/_/g," "],[m,b]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[p,[v,"TCL"],[m,w]],[/(itel) ((\w+))/i],[[v,Ie],p,[m,k,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[p,[v,"Acer"],[m,w]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[p,[v,"Meizu"],[m,b]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[p,[v,"Ulefone"],[m,b]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[p,[v,"Energizer"],[m,b]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[p,[v,"Cat"],[m,b]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[p,[v,"Smartfren"],[m,b]],[/droid.+; (a(?:015|06[35]|142p?))/i],[p,[v,"Nothing"],[m,b]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[v,p,[m,b]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[v,p,[m,w]],[/(surface duo)/i],[p,[v,W],[m,w]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[p,[v,"Fairphone"],[m,b]],[/(u304aa)/i],[p,[v,"AT&T"],[m,b]],[/\bsie-(\w*)/i],[p,[v,"Siemens"],[m,b]],[/\b(rct\w+) b/i],[p,[v,"RCA"],[m,w]],[/\b(venue[\d ]{2,7}) b/i],[p,[v,"Dell"],[m,w]],[/\b(q(?:mv|ta)\w+) b/i],[p,[v,"Verizon"],[m,w]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[p,[v,"Barnes & Noble"],[m,w]],[/\b(tm\d{3}\w+) b/i],[p,[v,"NuVision"],[m,w]],[/\b(k88) b/i],[p,[v,"ZTE"],[m,w]],[/\b(nx\d{3}j) b/i],[p,[v,"ZTE"],[m,b]],[/\b(gen\d{3}) b.+49h/i],[p,[v,"Swiss"],[m,b]],[/\b(zur\d{3}) b/i],[p,[v,"Swiss"],[m,w]],[/\b((zeki)?tb.*\b) b/i],[p,[v,"Zeki"],[m,w]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[v,"Dragon Touch"],p,[m,w]],[/\b(ns-?\w{0,9}) b/i],[p,[v,"Insignia"],[m,w]],[/\b((nxa|next)-?\w{0,9}) b/i],[p,[v,"NextBook"],[m,w]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[v,"Voice"],p,[m,b]],[/\b(lvtel\-)?(v1[12]) b/i],[[v,"LvTel"],p,[m,b]],[/\b(ph-1) /i],[p,[v,"Essential"],[m,b]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[p,[v,"Envizen"],[m,w]],[/\b(trio[-\w\. ]+) b/i],[p,[v,"MachSpeed"],[m,w]],[/\btu_(1491) b/i],[p,[v,"Rotor"],[m,w]],[/(shield[\w ]+) b/i],[p,[v,"Nvidia"],[m,w]],[/(sprint) (\w+)/i],[v,p,[m,b]],[/(kin\.[onetw]{3})/i],[[p,/\./g," "],[v,W],[m,b]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[p,[v,B],[m,w]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[p,[v,B],[m,b]],[/smart-tv.+(samsung)/i],[v,[m,E]],[/hbbtv.+maple;(\d+)/i],[[p,/^/,"SmartTV"],[v,H],[m,E]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[v,J],[m,E]],[/(apple) ?tv/i],[v,[p,D+" TV"],[m,E]],[/crkey/i],[[p,ae+"cast"],[v,q],[m,E]],[/droid.+aft(\w+)( bui|\))/i],[p,[v,F],[m,E]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[p,[v,L],[m,E]],[/(bravia[\w ]+)( bui|\))/i],[p,[v,O],[m,E]],[/(mitv-\w{5}) bui/i],[p,[v,I],[m,E]],[/Hbbtv.*(technisat) (.*);/i],[v,p,[m,E]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[v,ke],[p,ke],[m,E]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[m,E]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[v,p,[m,S]],[/droid.+; (shield) bui/i],[p,[v,"Nvidia"],[m,S]],[/(playstation [345portablevi]+)/i],[p,[v,O],[m,S]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[p,[v,W],[m,S]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[p,[v,H],[m,j]],[/((pebble))app/i],[v,p,[m,j]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[p,[v,D],[m,j]],[/droid.+; (glass) \d/i],[p,[v,q],[m,j]],[/droid.+; (wt63?0{2,3})\)/i],[p,[v,B],[m,j]],[/droid.+; (glass) \d/i],[p,[v,q],[m,j]],[/(pico) (4|neo3(?: link|pro)?)/i],[v,p,[m,j]],[/; (quest( \d| pro)?)/i],[p,[v,U],[m,j]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[v,[m,_]],[/(aeobc)\b/i],[p,[v,F],[m,_]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[p,[m,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[p,[m,w]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[m,w]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[m,b]],[/(android[-\w\. ]{0,9});.+buil/i],[p,[v,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[y,[h,z+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[h,y],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[y,[h,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[h,y],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[y,h]],os:[[/microsoft (windows) (vista|xp)/i],[h,y],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[h,[y,k,N]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[y,k,N],[h,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[y,/_/g,"."],[h,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[h,se],[y,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[y,h],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[h,y],[/\(bb(10);/i],[y,[h,P]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[y,[h,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[y,[h,ee+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[y,[h,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[y,[h,"watchOS"]],[/crkey\/([\d\.]+)/i],[y,[h,ae+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[h,V],y],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[h,y],[/(sunos) ?([\w\.\d]*)/i],[[h,"Solaris"],y],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[h,y]]},$=function(X,ne){if(typeof X===u&&(ne=X,X=o),!(this instanceof $))return new $(X,ne).getResult();var te=typeof e!==l&&e.navigator?e.navigator:o,le=X||(te&&te.userAgent?te.userAgent:i),he=te&&te.userAgentData?te.userAgentData:o,ye=ne?T(R,ne):R,pe=te&&te.userAgent==le;return this.getBrowser=function(){var oe={};return oe[h]=o,oe[y]=o,ue.call(oe,le,ye.browser),oe[d]=Oe(oe[y]),pe&&te&&te.brave&&typeof te.brave.isBrave==s&&(oe[h]="Brave"),oe},this.getCPU=function(){var oe={};return oe[x]=o,ue.call(oe,le,ye.cpu),oe},this.getDevice=function(){var oe={};return oe[v]=o,oe[p]=o,oe[m]=o,ue.call(oe,le,ye.device),pe&&!oe[m]&&he&&he.mobile&&(oe[m]=b),pe&&oe[p]=="Macintosh"&&te&&typeof te.standalone!==l&&te.maxTouchPoints&&te.maxTouchPoints>2&&(oe[p]="iPad",oe[m]=w),oe},this.getEngine=function(){var oe={};return oe[h]=o,oe[y]=o,ue.call(oe,le,ye.engine),oe},this.getOS=function(){var oe={};return oe[h]=o,oe[y]=o,ue.call(oe,le,ye.os),pe&&!oe[h]&&he&&he.platform&&he.platform!="Unknown"&&(oe[h]=he.platform.replace(/chrome os/i,V).replace(/macos/i,se)),oe},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return le},this.setUA=function(oe){return le=typeof oe===f&&oe.length>M?ke(oe,M):oe,this},this.setUA(le),this};$.VERSION=r,$.BROWSER=me([h,y,d]),$.CPU=me([x]),$.DEVICE=me([p,v,m,S,b,E,w,j,_]),$.ENGINE=$.OS=me([h,y]),t.exports&&(n=t.exports=$),n.UAParser=$;var ce=typeof e!==l&&(e.jQuery||e.Zepto);if(ce&&!ce.ua){var we=new $;ce.ua=we.getResult(),ce.ua.get=function(){return we.getUA()},ce.ua.set=function(X){we.setUA(X);var ne=we.getResult();for(var te in ne)ce.ua[te]=ne[te]}}})(typeof window=="object"?window:Eb)})(tl,tl.exports);var bC=tl.exports;const So=new bC.UAParser,xC=()=>G.useMemo(()=>({os:So.getOS(),browser:So.getBrowser(),cpu:So.getCPU(),device:So.getDevice(),engine:So.getEngine(),ua:So.getUA()}),[]),CC=()=>G.useMemo(()=>So.getBrowser(),[]),ou=()=>{const{ua:t}=xC();return t.includes("io-connect-desktop")},p0=()=>{const[t,n]=g.useState([]),[e,o]=g.useState(!1),r=g.useContext(_e.IOConnectContext);return g.useEffect(()=>{if(!r)return;let i=!1;const a=[],s=r.layouts.onAdded(f=>{if(f.type!=="Global"||i)return;o(!0);const{name:d}=f;n(p=>[...p,{name:d}])}),l=r.layouts.onRemoved(f=>{f.type!=="Global"||i||n(d=>d.filter(p=>p.name!==f.name))}),u=r.layouts.onRenamed((f,d)=>{if(f.type!=="Global"||i)return;const{name:p}=f;n(h=>{const m=h.findIndex(v=>v.name===(d==null?void 0:d.name));return m===-1?h:[...h.slice(0,m),{name:p},...h.slice(m+1)]})});return a.push(s,l,u),()=>{i=!0,a.forEach(f=>f())}},[r]),{layouts:t,isInitialized:e}},h0=()=>{const[t,n]=g.useState([]),e=g.useContext(_e.IOConnectContext);return g.useEffect(()=>{if(!e)return;const o=e.notifications.onRaised(a=>n(s=>[...s,a])),r=e.notifications.onClosed(a=>n(s=>s.filter(l=>l.id!==a.id))),i=e.notifications.onStateChanged(({id:a},s)=>{n(l=>{const u=l.findIndex(f=>f.id===a);return u===-1?l:[...l.slice(0,u),{...l[u],state:s},...l.slice(u+1)]})});return e.notifications.list().then(n).catch(console.error),()=>{o(),r(),i()}},[e]),t},SC=()=>{const[t,n]=g.useState({}),e=g.useContext(_e.IOConnectContext);return g.useEffect(()=>{if(!e)return;const o=e.notifications.onConfigurationChanged(r=>n(r));return()=>{o()}},[e]),t},ru=t=>{const{handler:n,skip:e}=t;g.useEffect(()=>{if(e)return;const o=r=>{setTimeout(()=>{var i;((i=document.activeElement)==null?void 0:i.nodeName)==="IFRAME"&&n(r)},0)};return window.addEventListener("blur",o,!0),()=>{window.removeEventListener("blur",o,!0)}},[n,e])},iu=t=>{const{eventType:n,handler:e,ref:o,skip:r}=t;g.useEffect(()=>{if(r)return;const i=a=>{const s=a.target;(Array.isArray(o)?o.every(u=>u.current&&!u.current.contains(s)):o.current&&!o.current.contains(s))&&e(a)};return document.addEventListener(n,i,!0),()=>{document.removeEventListener(n,i,!0)}},[n,e,o,r])},kC=ot({name:Ht}),Ci=ot({isCompleted:kr()}),Tn=(t,n,e)=>{const[o,r]=g.useState(()=>{try{const s=window[t].getItem(n);return s?JSON.parse(s):null}catch(s){return console.log(s),null}}),i=`${t}-${n}`;g.useEffect(()=>{const s=l=>{r(l.detail)};return window.addEventListener(i,s),()=>{window.removeEventListener(i,s)}},[i]);const a=g.useCallback(s=>{try{if(!s){window[t].removeItem(n),r(null);return}const l=e.run(s);if(!l.ok){console.warn(`Error validating the value to be stored: ${l.error.message}`);return}const u=l.result;r(u),window[t].setItem(n,JSON.stringify(u)),window.dispatchEvent(new CustomEvent(i,{detail:u}))}catch(l){console.log(l)}},[n,t,i,e]);return[o,a]},au=()=>{const[t,n]=Tn("sessionStorage",Jx,kC);return{isPlatformWindow:!t||window.name===t.name,setPlatformWindow:n}},m0=()=>{const[t,n]=g.useState([]);return g.useEffect(()=>{const e=({key:i})=>{n(a=>a.includes(i)?a:a.concat(i))},o=i=>{n(a=>a.filter(s=>s!==i.key))},r=()=>{n([])};return document.addEventListener("keydown",e),document.addEventListener("keyup",o),window.addEventListener("blur",r),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",o),window.removeEventListener("blur",r)}},[]),t.length===1?t[0]:null},su=()=>{const t=g.useContext(_e.IOConnectContext);return g.useCallback(async(n,e)=>{if(t)try{await t.layouts.restore({name:n}),e==null||e({name:n}),await He({io:t,variant:Fe.SUCCESS,text:`Layout "${n}" was loaded successfully.`})}catch(o){await He({io:t,variant:Fe.WARNING,text:`Failed to load Layout "${n}".`,error:o})}},[t])},cs={CONTROL:"Control",SHIFT:"Shift"},cu=()=>{const t=g.useContext(_e.IOConnectContext),n=eu();return async({id:e,modifier:o,reuseWorkspaceId:r})=>{var i;try{const a=o===cs.CONTROL?{newFrame:!0}:{frameId:n,reuseWorkspaceId:r};await((i=t.workspaces)==null?void 0:i.restoreWorkspace(e,a))}catch(a){await He({io:t,variant:Fe.WARNING,text:`Failed to load Workspace "${e}".`,error:a})}}},EC=t=>{const[n,e]=g.useState([]),[o,r]=g.useState(!0),i=g.useRef(null),a=g.useContext(_e.IOConnectContext);return g.useEffect(()=>{const s=a==null?void 0:a.search;if(!s)return;const l=[],u=[];return(async d=>{r(!0),e([]);const p=await s.query({search:d.trim(),providerLimits:{maxResults:100,maxResultsPerType:5}});if(p===i.current)return;i.current=p;const h=p.onResults(y=>{y.results.forEach(x=>{u.find(b=>b.id===x.id&&b.type.name===x.type.name)||u.push(x)}),r(!1),e([...u])}),m=p.onCompleted(()=>{r(!1)}),v=p.onError(y=>{console.error(`Query failed. Provider: ${y.provider}; Error: ${y.error}`)});l.push(h,m,v)})(t),()=>{l.forEach(d=>d())}},[a,t]),{resultsToRender:n,isLoading:o}},g0=()=>{const t=g.useContext(_e.IOConnectContext),n=async({id:o})=>{var r;await((r=t.appManager.application(o))==null?void 0:r.start())},e=async({id:o,modifier:r})=>{var u,f;const i=await((u=t.workspaces)==null?void 0:u.getWorkspace(d=>d.isSelected===!0)),a=i==null?void 0:i.children[0];if(r===cs.CONTROL||!i||(a==null?void 0:a.type)==="window"){await((f=t.appManager.application(o))==null?void 0:f.start());return}await((a==null?void 0:a.type)==="group"?a:await(a??i).addGroup()).addWindow({appName:o})};return async o=>{try{await(Mg()?n:e)(o)}catch(r){await He({io:t,variant:Fe.WARNING,text:`Failed to start app "${o.title}".`,error:r})}}},jC=()=>{const[t,n]=g.useState({}),e=g.useContext(_e.IOConnectContext);return g.useEffect(()=>{const o=e.workspaces,r=[];if(o)return(async()=>{try{const i=await o.onWorkspaceOpened(s=>n(l=>{const u={...l};return u[s.title]=u[s.title]??new Set,u[s.title].add(s.id),u})),a=await o.onWorkspaceClosed(({workspaceId:s})=>n(l=>{const u={...l};for(const f in u)if(u[f].has(s)){u[f].delete(s);break}return u}));r.push(i,a)}catch(i){console.error(i)}})(),()=>r.forEach(i=>i==null?void 0:i())},[e]),t},v0=t=>t.key==="Enter"||t.key===" ",ls=(t,n)=>typeof t>"u"?{}:{tabIndex:0,onClick:t,onKeyDown:e=>{v0(e)&&(e.preventDefault(),t==null||t(e)),n==null||n(e)}},y0=({event:t,currentIndex:n,moveFocus:e,min:o,max:r,onClose:i})=>{switch(t.key){case"ArrowUp":{e(Math.max(n-1,o));break}case"ArrowDown":{e(Math.min(n+1,r));break}case"Home":{e(o);break}case"End":{e(r);break}case"Escape":{if(i){i();break}return}default:return}t.stopPropagation(),t.preventDefault()};const OC=g.forwardRef((t,n)=>{const{title:e,actions:o,className:r,onClose:i,onActionItemClick:a,"data-testid":s="context-menu",...l}=t,u=g.useRef({}),[f,d]=g.useState(0),p=h=>{var m;(m=u.current[h])==null||m.focus(),d(h)};return g.useEffect(()=>{var h;(h=u.current[f])==null||h.focus()},[]),c.jsxs(mt,{ref:n,className:it(r,"context-menu"),onClick:h=>h.stopPropagation(),onKeyDown:h=>y0({event:h,currentIndex:f,min:0,max:o.length-1,moveFocus:p,onClose:i}),"data-testid":s,...l,children:[e&&c.jsx(mt.ItemSection,{children:e}),o.map((h,m)=>{const v=h.displayName||h.name,y=h.iconSrc?c.jsx(gp,{size:"16",src:h.iconSrc,alt:`${v} icon`}):h.icon&&c.jsx(lt,{size:"16",variant:h.icon});return c.jsxs(g.Fragment,{children:[c.jsx(mt.Item,{ref:x=>u.current[m]=x,prepend:y,disabled:h.disabled,tabIndex:-1,...ls(x=>a(x,h)),"data-testid":`${s}-item-${h.name}`,children:v}),h.separatorAfter&&c.jsx("li",{className:"context-menu-separator","aria-hidden":!0,"data-testid":`${s}-separator`})]},h.name)})]})});function lu(t){const{title:n,buttonSize:e="16",icon:o="ellipsis-vertical",iconSize:r="12",actions:i,isTabStop:a,onActionItemClick:s,buttonVariant:l,placement:u,strategy:f,offset:d,shouldCloseOnOutsideScroll:p=!1,shouldCloseOnWindowBlur:h=!1,shouldCloseOnWindowResize:m=!1,"data-testid":v,contextMenuDataTestId:y}=t,[x,S]=g.useState(!1),[b,w]=g.useState(null),[E,j]=g.useState(null),_=g.useRef(null),M=g.useRef(null),F=g.useMemo(()=>[M,_],[]),D=g.useCallback(()=>S(!1),[]),{styles:A,attributes:P}=dx(b,E,{placement:u,strategy:f,modifiers:[{name:"offset",options:{offset:d}}]});g.useEffect(()=>{_.current=b},[b]),g.useEffect(()=>{M.current=E},[E]),iu({eventType:"mouseup",handler:D,ref:F,skip:!x}),ru({handler:D,skip:!x}),g.useEffect(()=>{if(!(!h||!x))return window.addEventListener("blur",D),()=>{window.removeEventListener("blur",D)}},[D,x,h]),g.useEffect(()=>{if(!p||!E)return;const z=ee=>{if(E.contains(ee.target)){ee.preventDefault();return}D()};return document.addEventListener("touchmove",z,{passive:!1}),document.addEventListener("wheel",z,{passive:!1}),()=>{document.removeEventListener("touchmove",z),document.removeEventListener("wheel",z)}},[D,E,p]),g.useEffect(()=>{if(!(!m||!x))return window.addEventListener("resize",D),()=>{window.removeEventListener("resize",D)}},[D,x,m]);const re=z=>{z.stopPropagation(),S(ee=>!ee),E==null||E.focus()},ae=(z,ee)=>{z.stopPropagation(),s(z,ee),D()};return c.jsxs(c.Fragment,{children:[c.jsx(Ge,{ref:w,size:e,icon:o,iconSize:r,variant:l,...ls(re),tabIndex:a?0:-1,"data-testid":v}),x&&c.jsx(OC,{ref:j,title:n,actions:i,onActionItemClick:ae,onClose:()=>{b==null||b.focus(),D()},style:A.popper,"data-testid":y,...P.popper})]})}const NC=t=>{const{isFavoritismEnabled:n=!0,item:e,onClick:o,onKeyDown:r,isFocused:i,liRef:a,...s}=t,{favorites:l,toggleFavorite:u,isLoading:f}=ss(),{description:d,icon:p="application",iconSrc:h,openInstances:m=0,title:v,tooltip:y,className:x,contextMenuActions:S=[]}=e,b=n&&l.some(_=>_.type===e.type&&_.title===e.title),w=_=>{if(v0(_)){o(_),_.preventDefault(),_.stopPropagation();return}r(_)},E=h?c.jsx(gp,{size:"16",src:h,alt:`${v} icon`,"data-testid":"base-section-item-icon"}):c.jsx(lt,{size:"16",variant:p,"data-testid":"base-section-item-icon"}),j=c.jsxs(c.Fragment,{children:[m!==0&&c.jsx("span",{className:"open-instances io-text-smaller","data-testid":"base-section-item-open-instances",children:m===1?"Opened":`${m} opened`}),(n||S.length>0)&&c.jsxs(Be,{className:"item-actions",children:[n&&c.jsx(Ge,{...ls(_=>{_.stopPropagation(),u(e)}),tabIndex:i?0:-1,size:"24",iconSize:"12",icon:b?"star-full":"star",disabled:f,"data-testid":"base-section-item-favorite-button"}),S.length>0&&c.jsx(lu,{buttonSize:"24",iconSize:"12",icon:"ellipsis-vertical",title:v,actions:S,onActionItemClick:o,isTabStop:i,placement:"bottom-end",offset:[0,0],shouldCloseOnOutsideScroll:!0,shouldCloseOnWindowBlur:!0,shouldCloseOnWindowResize:!0,"data-testid":"base-section-item-context-menu-button"})]})]});return c.jsx(mt.Item,{ref:a,tabIndex:i?0:-1,className:it("io-base-section-item",x),onKeyDown:w,onClick:o,prepend:E,append:j,description:d,tooltip:y??v,"data-testid":`base-section-item-${e.id}`,...s,children:v})},IC=new u0,PC=()=>{const{value:t,update:n}=Xt({prefKey:Pr.COLLAPSED_SECTIONS}),e=g.useCallback(o=>IC.enqueue(()=>n((r=[])=>r.includes(o)?r.filter(a=>a!==o):[...r,o])),[n]);return{collapsedSections:t,toggleSection:e}},uu=t=>{const{config:n,level:e=1,path:o=n.id,onItemClick:r}=t,{isCollapsible:i=!0}=n,a=m0(),[s,l]=g.useState(0),u=g.useRef({}),{collapsedSections:f,toggleSection:d}=PC(),p=i?!(f!=null&&f.includes(o)):!0,h=n.items.filter(w=>Xr(w)),m=n.items.filter(w=>!Xr(w)),v=[...h,...m],y=16,x=24,S=w=>{var E,j;(j=(E=u.current[w])==null?void 0:E.querySelector("[tabIndex]"))==null||j.focus(),l(w)},b=async()=>{i&&await d(o)};return c.jsxs(mt.ItemWithSubItems,{className:e===1?"main-section":void 0,"data-testid":`base-section-${n.id}`,children:[c.jsx(_x,{className:e===1?"io-list-item-title main-section-header":void 0,isOpen:p,onClick:b,showCollapseIcon:i,showFolderIcon:e!==1,style:{paddingLeft:`${y+x*Math.max(0,e-2)}px`},"data-testid":`base-section-header-${n.id}`,title:n.title}),c.jsx(t0,{isOpen:p,tag:mt,children:v.map((w,E)=>Xr(w)?c.jsx(uu,{config:w,level:e+1,onItemClick:r,path:`${o}/${w.id}`},w.id):c.jsx(NC,{style:{paddingLeft:`${y+x*(e-1)}px`},liRef:j=>u.current[E]=j,isFavoritismEnabled:w.type===jt.APPLICATION||w.type===jt.WORKSPACE,item:w,onClick:(j,_)=>r==null?void 0:r(j,{item:w,modifier:a,selectedContextMenuActionName:_==null?void 0:_.name}),onKeyDown:j=>{y0({event:j,moveFocus:S,currentIndex:s,min:0,max:v.length-1})},isFocused:s===E},w.id))})]})},w0=t=>`${t.type}-${t.id}`,AC=(t,n)=>b0(t)[n],b0=t=>t.reduce((n,e)=>Xr(e)?{...n,...b0(e.items)}:{...n,[w0(e)]:e},{}),x0=g.createContext(void 0),TC=()=>{const t=g.useContext(x0);if(t===void 0)throw new Error("useSection must be used within a SectionProvider");return t},DC=({children:t})=>{const[n,e]=g.useState(null),o=g.useMemo(()=>[n,e],[n]);return c.jsx(x0.Provider,{value:o,children:t})},us=({config:t,onItemClick:n})=>{const[e,o]=TC(),r=bn(),{isLaunchpadPinned:i}=Uo(),a=(s,l)=>{const{item:u,modifier:f,selectedContextMenuActionName:d}=l;o({itemName:w0(u),modifier:f,selectedContextMenuActionName:d})};return g.useEffect(()=>{var d;if(!n||!e)return;const{itemName:s,modifier:l,selectedContextMenuActionName:u}=e,f=AC(t.items,s);f&&(n({item:f,modifier:l,selectedContextMenuActionName:u}),o(null),!(l===cs.SHIFT||i)&&((d=r.close)==null||d.call(r)))},[e,t.items,r,n,o,i]),c.jsx(uu,{config:t,onItemClick:a})};function C0(t){const{isFolderCollapsible:n,isSectionCollapsible:e,sortOrder:o}=t,r=n0(),i=Lx(),a=g0(),s=o0(),l=g.useMemo(()=>kb(r,i,{isFolderCollapsible:n,isSectionCollapsible:e,sortOrder:o}),[r,i,n,e,o]),u=f=>{const{item:d,modifier:p,selectedContextMenuActionName:h}=f;if(!h)return a({id:d.id,title:d.title,modifier:p});s(d,h)};return c.jsx(us,{config:l,onItemClick:u})}const MC=(t,n)=>{const{isSectionCollapsible:e,sortOrder:o=ui.DISABLED}=n,r=Wl({items:t,sortOrder:o,ascendingCompare:Rg,descendingCompare:Fg});return{id:pr.FAVORITES,title:"Favorites",items:r,isCollapsible:e}},S0=t=>{const{isSectionCollapsible:n,sortOrder:e}=t,{favorites:o}=ss(),r=g.useMemo(()=>MC(o,{isSectionCollapsible:n,sortOrder:e}),[o,n,e]);return o.length>0?c.jsx(us,{config:r}):null},_C=t=>{const{active:n,className:e,...o}=t;return c.jsx(Ge,{className:it("launchpad-button",{active:n},e),"aria-label":"Launchpad",icon:"logo",variant:"circle",size:"32",title:n?"Close Launchpad":"Open Launchpad","data-testid":"launchpad-button",...o})};var LC=function(n){return RC(n)&&!FC(n)};function RC(t){return!!t&&typeof t=="object"}function FC(t){var n=Object.prototype.toString.call(t);return n==="[object RegExp]"||n==="[object Date]"||$C(t)}var BC=typeof Symbol=="function"&&Symbol.for,HC=BC?Symbol.for("react.element"):60103;function $C(t){return t.$$typeof===HC}function WC(t){return Array.isArray(t)?[]:{}}function hi(t,n){return n.clone!==!1&&n.isMergeableObject(t)?Er(WC(t),t,n):t}function zC(t,n,e){return t.concat(n).map(function(o){return hi(o,e)})}function UC(t,n){if(!n.customMerge)return Er;var e=n.customMerge(t);return typeof e=="function"?e:Er}function VC(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(n){return Object.propertyIsEnumerable.call(t,n)}):[]}function uf(t){return Object.keys(t).concat(VC(t))}function k0(t,n){try{return n in t}catch{return!1}}function YC(t,n){return k0(t,n)&&!(Object.hasOwnProperty.call(t,n)&&Object.propertyIsEnumerable.call(t,n))}function GC(t,n,e){var o={};return e.isMergeableObject(t)&&uf(t).forEach(function(r){o[r]=hi(t[r],e)}),uf(n).forEach(function(r){YC(t,r)||(k0(t,r)&&e.isMergeableObject(n[r])?o[r]=UC(r,e)(t[r],n[r],e):o[r]=hi(n[r],e))}),o}function Er(t,n,e){e=e||{},e.arrayMerge=e.arrayMerge||zC,e.isMergeableObject=e.isMergeableObject||LC,e.cloneUnlessOtherwiseSpecified=hi;var o=Array.isArray(n),r=Array.isArray(t),i=o===r;return i?o?e.arrayMerge(t,n,e):GC(t,n,e):hi(n,e)}Er.all=function(n,e){if(!Array.isArray(n))throw new Error("first argument should be an array");return n.reduce(function(o,r){return Er(o,r,e)},{})};var KC=Er,ZC=KC;const qC=rs(ZC),JC={header:{showHeader:!0,showSearch:!0},mode:"default"},uo={WINDOW_MANAGEMENT:"window-management",NOTIFICATIONS:"notifications"},ds="getScreenDetails"in window,E0=g.createContext(void 0),j0=()=>{const t=g.useContext(E0);if(t===void 0)throw new Error("useLaunchpadConfig must be used within an LaunchpadConfigProvider");return t},XC=({children:t,settings:n,components:e})=>{const o=g.useMemo(()=>({settings:n,components:e}),[n,e]);return c.jsx(E0.Provider,{value:o,children:t})},O0=g.createContext(void 0),N0=()=>{const t=g.useContext(O0);if(t===void 0)throw new Error("useLaunchpadSearch must be used within a LaunchpadSearchProvider");return t},QC=({children:t})=>{const[n,e]=g.useState(""),o=g.useMemo(()=>({searchTerm:n,setSearchTerm:e}),[n]);return c.jsx(O0.Provider,{value:o,children:t})},I0=({settings:t={},components:n={},isOpen:e=!0,onClose:o,windowManagementPermissionState:r="granted",children:i,className:a,...s})=>{const l=ds&&r==="granted",u=g.useMemo(()=>qC(JC,t),[t]);return c.jsx(pC,{close:o,isOpen:e,isGlobalLayoutsAvailable:l,children:c.jsx(XC,{settings:u,components:n,children:c.jsx(QC,{children:c.jsx("div",{className:it("launchpad",a),"data-testid":"launchpad",...s,children:i})})})})},e3=g.forwardRef((t,n)=>{const{onSearch:e,searchTerm:o,onClear:r,className:i}=t,a=g.useContext(_e.IOConnectContext);return g.useEffect(()=>{a!=null&&a.search&&a.search.setDebounceMS(450)},[a]),c.jsx(Bo,{id:"search-input",className:it("search-bar",i),ref:n,placeholder:"Find anything",value:o,onChange:e,autoComplete:"off",iconPrepend:"search",iconAppend:o.length?"close":void 0,iconAppendOnClick:r})}),P0=({className:t})=>{const{isLaunchpadPinned:n,isLoading:e,toggle:o}=Uo();return c.jsx(Ge,{className:t,size:"32",variant:"circle",icon:n?"unpin":"pin",onClick:o,disabled:e})},A0=({className:t})=>{const n=eu(),{isOpen:e}=bn(),{settings:o,components:r}=j0(),{isLaunchpadPinned:i}=Uo(),{isLaunchpadCollapsed:a,setIsLaunchpadCollapsed:s}=nu(),{searchTerm:l,setSearchTerm:u}=N0(),f=g.useRef(null),{showSearch:d,showHeader:p}=o.header??{},{BeforeSearch:h,AfterSearch:m}=r.header??{};g.useEffect(()=>{var x;e&&((x=f.current)==null||x.focus())},[e]),g.useEffect(()=>{i&&s(!1)},[s,i]);const v=x=>{const S=x.target.value;a0(S)&&a&&s(!1),u(S)},y=()=>{var x;u(""),(x=f.current)==null||x.focus()};return p?c.jsxs("div",{className:it("launchpad-header",n||i?void 0:"draggable",t),"data-testid":"launchpad-header",children:[h&&c.jsx(h,{}),d&&c.jsx(e3,{ref:f,searchTerm:l,onSearch:v,onClear:y,className:n?void 0:"non-draggable"}),m&&c.jsx(m,{}),m===void 0&&(o==null?void 0:o.mode)!=="pinned"&&c.jsx(P0,{className:"ms-auto"})]}):null},t3=(t,n,e)=>{const{isSectionCollapsible:o,sortOrder:r=ui.ASCENDING}=e,a=Wl({items:t,sortOrder:r,ascendingCompare:Rg,descendingCompare:Fg}).map(s=>{var l;return{...s,type:jt.WORKSPACE,icon:"workspace",openInstances:(l=n[s.title])==null?void 0:l.size,contextMenuActions:Lg}});return{id:pr.WORKSPACES,title:"Workspaces",items:[...a,{id:l0.CREATE_WORKSPACE,icon:"add",title:"Create Workspace",type:jt.ACTION_BUTTON,tooltip:"Create an empty Workspace in a new window",className:"create-workspace-btn"}],isCollapsible:o}},T0=t=>{const{isSectionCollapsible:n,sortOrder:e}=t,o=d0(),r=jC(),i=cu(),a=f0(),s=g.useMemo(()=>t3(o,r,{isSectionCollapsible:n,sortOrder:e}),[o,r,n,e]),l=u=>{const{item:f,modifier:d,selectedContextMenuActionName:p}=u;return p?a(f,p):f.type===jt.ACTION_BUTTON?a(f,f.id):i({id:f.id,modifier:d})};return c.jsx(us,{config:s,onItemClick:l})},n3=[{placementId:pr.FAVORITES,Component:S0},{placementId:pr.WORKSPACES,Component:T0},{placementId:pr.APPLICATIONS,Component:C0}],D0=()=>{const{defaultLayout:t,activeLayout:n}=bn();return e=>({name:e,isDefault:e===(t==null?void 0:t.name),isActive:e===(n==null?void 0:n.name)})},o3=()=>{const t=c0(),n=D0(),e=Ar();return async(o,r)=>{const{id:i}=o,a=n(i);await e(()=>t({layout:a,actionName:r}))}},r3=()=>{const t=o0(),n=f0(),e=o3();return o=>{if(o===jt.APPLICATION)return t;if(o===jt.WORKSPACE)return n;if(o===jt.LAYOUT)return e}},qo={RENAME:"rename",SAVE:"save",SAVE_AS:"saveAs",DELETE:"delete",SET_AS_DEFAULT:"setAsDefault",LOAD:"load"},M0=t=>[{name:qo.RENAME,displayName:"Rename",icon:"pen-line"},{name:qo.SAVE,displayName:"Save",disabled:!t.isActive,icon:"floppy"},{name:qo.SAVE_AS,displayName:"Save as",icon:"floppy-disk-pen",separatorAfter:!0},{name:qo.DELETE,displayName:"Delete",icon:"trash-can",separatorAfter:!0},{name:qo.SET_AS_DEFAULT,displayName:"Set as Default",disabled:t.isDefault,icon:"user-gear",separatorAfter:!0},{name:qo.LOAD,displayName:"Load",icon:"spinner"}],i3=t=>{const n=D0();return t.reduce((e,o)=>{const{type:r}=o,i=o.id||o.displayName;if(!i)return e;let a=[];if(r.name===jt.APPLICATION)a=_g;else if(r.name===jt.WORKSPACE)a=Lg;else if(r.name===jt.LAYOUT){const f=n(i);a=M0(f)}else o.secondaryActions&&(a=o.secondaryActions.map(({name:f,method:d,params:p,target:h})=>({name:f,interopParams:{method:d,params:p,target:h}})));const s={id:i,title:o.displayName||i,description:o.description,type:r.name,iconSrc:o.iconURL,mainAction:o.action,contextMenuActions:a},l=e.findIndex(({title:f})=>r.displayName?f===r.displayName:f===r.name),u=e[l];return u?[...e.slice(0,l),{...u,items:[...u.items,s]},...e.slice(l+1)]:[...e,{id:r.name,title:r.displayName||r.name,items:[s]}]},[])};function a3(t){const{resultsToRender:n,isLoading:e}=EC(t.searchTerm),{close:o}=bn(),r=yC(),i=cu(),a=g0(),s=su(),l=r3(),u=i3(n),f=Ar(),{isLaunchpadPinned:d}=Uo(),p=(m,v)=>{const y=l(m.type);y==null||y(m,v)},h=async(m,v)=>{var M;const{item:y,modifier:x,selectedContextMenuActionName:S}=v,{type:b,id:w,title:E,mainAction:j}=y,_=S?(M=y.contextMenuActions)==null?void 0:M.find(F=>F.name===S):null;_!=null&&_.interopParams?r(_.interopParams):S?p(y,S):j?r(j):b===jt.APPLICATION?a({id:w,title:E,modifier:x}):b===jt.WORKSPACE?i({id:w,modifier:x}):b===jt.LAYOUT&&f(()=>s(w)),!(x===cs.SHIFT||d)&&(o==null||o())};return e?c.jsx("p",{className:"search-loading",children:"Loading..."}):n.length===0?c.jsx("p",{className:"search-no-results",children:"No results found. Try searching by app name, workspace title, or keywords."}):c.jsx(mt,{children:u.map((m,v)=>c.jsx(uu,{config:m,onItemClick:h},m.id||v))})}const s3=()=>{const{value:t,update:n,isLoading:e,error:o}=Xt({prefKey:Pr.IS_LAYOUTS_PANEL_OPEN});return{error:o,isLayoutsPanelOpen:t,setIsLayoutsPanelOpen:n,isLoading:e}},c3=({layoutName:t})=>{const n=g.useContext(_e.IOConnectContext),e=Ar(),o=r=>{r.stopPropagation(),e(async()=>{try{await n.layouts.save({name:t,type:"Global"}),await He({io:n,variant:Fe.SUCCESS,text:`Layout "${t}" was saved successfully.`})}catch(a){await He({io:n,variant:Fe.WARNING,text:`Failed to save Layout "${t}".`,error:a})}})};return c.jsx(Ge,{icon:"floppy",size:"24",iconSize:"12",onClick:o,title:"Save Layout","data-testid":"save-layout-button"})},l3=({layout:t})=>{const n=c0(),e=Ar(),o=async(r,i)=>{r.stopPropagation(),await e(()=>n({layout:t,actionName:i.name}))};return c.jsx(lu,{buttonSize:"24",iconSize:"12",title:t.name,icon:"ellipsis-vertical",actions:M0(t),onActionItemClick:o,placement:"top-end",strategy:"fixed",offset:[4,0],shouldCloseOnOutsideScroll:!0,shouldCloseOnWindowBlur:!0,shouldCloseOnWindowResize:!0,"data-testid":"layout-context-menu-button",contextMenuDataTestId:"layout-context-menu"})};const _0=({layouts:t,className:n,...e})=>{const{isLaunchpadPinned:o}=Uo(),{close:r}=bn(),i=su(),a=Ar(),s=()=>{o||r==null||r()},l=u=>a(()=>i(u.name,s));return c.jsx(Wo,{element:mt,elementProps:{className:it("layouts-list",n),variant:"single",checkIcon:{variant:"check",tooltip:"Active Layout"},...e},wrapperClassName:"layouts-list-scrollable-container",children:t.map(u=>c.jsx(mt.Item,{className:"layouts-list-item",onClick:()=>l(u),append:c.jsxs(c.Fragment,{children:[u.isDefault&&c.jsx(Ra,{variant:"default",title:"Default Layout","data-testid":"default-layout-pill",children:"Default"}),c.jsxs(Xg,{children:[u.isActive&&c.jsx(c3,{layoutName:u.name}),c.jsx(l3,{layout:u})]})]}),isSelected:u.isActive,tooltip:u.name,"data-testid":`layout-item-${u.name}`,children:u.name},u.name))})},u3=()=>{const{layouts:t}=p0(),{activeLayout:n,defaultLayout:e}=bn(),o=g.useMemo(()=>t.map(r=>({...r,isActive:r.name===(n==null?void 0:n.name),isDefault:r.name===(e==null?void 0:e.name)})),[t,n,e]);return c.jsx(_0,{layouts:o,"data-testid":"all-layouts"})},d3=()=>{const{defaultLayout:t,activeLayout:n}=bn();return n?c.jsx(_0,{layouts:[{...n,isDefault:n.name===(t==null?void 0:t.name),isActive:!0}],"data-testid":"active-layout"}):c.jsx("p",{className:"io-text-small no-active-layout","data-testid":"choose-layout-message",children:"Choose which Layout to load"})},f3=()=>{const t=g.useContext(_e.IOConnectContext),{setActiveLayout:n}=bn(),e=Ar(),o=async()=>{var d;if(!("modals"in t&&t.modals)){console.error("Cannot create Layout because io dialogs are not enabled");return}const r="create",i="layout-name",{isEnterPressed:a,responseButtonClicked:s,inputs:l}=await t.modals.dialogs.request({templateName:Ir.SINGLE_TEXT_INPUT_DIALOG,variables:{heading:"Create Layout",input:{id:i,initialValue:"Create Layout",validation:{disabledButtonIds:[r],errorMessage:"Please provide a Layout name",regexPattern:tu}},actionButtons:[{variant:"primary",text:"Create",id:r},{variant:"outline",text:"Cancel",id:"cancel"}]}}),u=(d=l==null?void 0:l.find(p=>p.id===i))==null?void 0:d.value;if(a||(s==null?void 0:s.id)===r)try{if((await t.layouts.getAll("Global")).find(h=>h.name===u)){await He({io:t,variant:Fe.WARNING,text:`Failed to create Layout "${u}". A Layout with this name already exists.`});return}await t.layouts.save({name:u}),n({name:u}),await He({io:t,variant:Fe.SUCCESS,text:`Layout "${u}" was created successfully.`})}catch(p){await He({io:t,variant:Fe.WARNING,text:`Failed to create Layout "${u}".`,error:p})}};return c.jsx(Be,{variant:"fullwidth",className:"create-layout-btn-group",children:c.jsx(Je,{variant:"primary",text:"Create Layout",onClick:()=>e(o),"data-testid":"create-layout-button"})})};const p3=()=>{const t=g.useRef(null),{layouts:n,isInitialized:e}=p0(),{isLayoutsPanelOpen:o,setIsLayoutsPanelOpen:r}=s3();g.useEffect(()=>{!e||n.length>0||!o||r(!1)},[n,e,o,r]);const i=g.useCallback(()=>r(a=>!a),[r]);return c.jsxs("footer",{className:"layouts-panel",ref:t,"data-testid":"layouts-panel",children:[c.jsx(gi,{className:"layouts-panel-separator"}),c.jsxs("div",{className:"layouts-panel-header","aria-label":"Layouts panel","aria-expanded":o,role:"button","data-testid":"layouts-panel-header",...ls(n.length?i:void 0),children:[c.jsx(Nn,{tag:"h2",size:"normal",text:n.length>0?"Layouts":"Start using Layouts"}),n.length>0&&c.jsx(Ge,{className:it("layouts-panel-toggle-button",{"layouts-panel-toggle-button-rotated":o}),icon:"expand",iconSize:"12",size:"24","data-testid":"layouts-panel-toggle-button"})]}),c.jsx(t0,{isOpen:o,tag:"div",children:c.jsx(u3,{})}),n.length>0&&!o?c.jsx(d3,{}):c.jsx(f3,{})]})},L0=({className:t})=>{const{isLaunchpadCollapsed:n}=nu(),{isGlobalLayoutsAvailable:e}=bn(),{components:o}=j0(),{searchTerm:r}=N0(),{sections:i=n3}=o;return c.jsxs("div",{className:it("launchpad-body",n?"collapsed":void 0,t),children:[c.jsx(Wo,{wrapperClassName:"launchpad-main-scrollable-container",element:"main",elementProps:{className:"launchpad-main"},children:a0(r)?c.jsx(a3,{searchTerm:r}):c.jsx(DC,{children:c.jsx(mt,{children:i.map(({Component:a,placementId:s})=>c.jsx(a,{},s))})})}),e&&c.jsx(p3,{})]})};const R0=t=>c.jsxs(I0,{...t,children:[c.jsx(A0,{}),c.jsx(L0,{})]}),F0=g.createContext(void 0),B0=()=>{const t=g.useContext(F0);if(t===void 0)throw new Error("useWorkspaceComponentsContext must be used within an WorkspaceComponentsContextProvider");return t},h3=()=>{const t=ds?[uo.NOTIFICATIONS,uo.WINDOW_MANAGEMENT]:[uo.NOTIFICATIONS];return Promise.all(t.map(async n=>{const e=await navigator.permissions.query({name:n});return e.stableName=n,e}))},H0=g.createContext(void 0),vo=()=>{const t=g.useContext(H0);if(t===void 0)throw new Error("useIOConnectHome must be used within an IOConnectHomeProvider");return t},m3=({children:t})=>{const[n,e]=Tn("localStorage",xi,Ci),[o,r]=g.useState([]),i=g.useMemo(()=>o.reduce((d,p)=>({...d,[p.stableName]:{state:p.state}}),{}),[o]),a={isLoading:o.length===0,statuses:i},[s,l]=g.useState(!1),u={isLoggingOut:s,setIsLoggingOut:l};g.useEffect(()=>{let d=!1;const p=h3().then(h=>{if(d)return;r(h);const m=[];let v=!1;return h.forEach((y,x)=>{const S=b=>{if(d||!b.target||v)return;const w=b.target;if(w.state==="prompt")return e({isCompleted:!1}),v=!0,window.location.reload();r(j=>[...j.slice(0,x),w,...j.slice(x+1)])};y.addEventListener("change",S),m.push(()=>y.removeEventListener("change",S))}),m}).catch(console.warn);return()=>{d=!0,p.then(h=>{h==null||h.forEach(m=>m())})}},[e]);const f=g.useMemo(()=>({permission:a,login:u}),[a,u]);return c.jsx(H0.Provider,{value:f,children:t})},g3=t=>c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:170,height:134,fill:"none",...t,children:[c.jsxs("g",{clipPath:"url(#a)",children:[c.jsxs("g",{clipPath:"url(#b)",children:[c.jsx("path",{fill:"url(#c)",d:"M0 0h170v114H0z"}),c.jsx("rect",{width:42.821,height:15,x:.5,y:-.5,fill:"#3C3E3F",rx:7.5,transform:"matrix(1 0 0 -1 117 103.85)"}),c.jsx("rect",{width:42.821,height:15,x:.5,y:-.5,stroke:"#4B4E4F",strokeMiterlimit:10,rx:7.5,transform:"matrix(1 0 0 -1 117 103.85)"}),c.jsx("path",{fill:"#36A86B",d:"M125.31 100.086c-1.656 0-3-1.41-3-3.149 0-1.74 1.344-3.15 3-3.15 1.657 0 3 1.41 3 3.15s-1.343 3.149-3 3.149Z"}),c.jsx("rect",{width:21.694,height:6.057,fill:"#AAB0B0",rx:3.028,transform:"matrix(1 0 0 -1 132.72 99.844)"}),c.jsx("mask",{id:"d",fill:"#fff",children:c.jsx("path",{d:"M0 114h170v20H0v-20Z"})}),c.jsx("path",{fill:"#3C3E3F",d:"M0 114h170v20H0v-20Z"}),c.jsx("path",{fill:"#5D5D5D",d:"M0 115h170v-2H0v2Z",mask:"url(#d)"})]}),c.jsx("rect",{width:169,height:133,x:.5,y:.5,stroke:"#5D5D5D",rx:5.5}),c.jsx("rect",{width:64,height:64,x:53,y:24,fill:"#36AA6C",rx:32}),c.jsx("path",{fill:"#fff",d:"M84.068 42.02c0-.466.408-.932.932-.932.466 0 .932.466.932.932v.99c4.66.467 8.388 4.428 8.388 9.262v1.748a9.57 9.57 0 0 0 2.796 6.756l.174.175c.466.466.758 1.165.758 1.806a2.61 2.61 0 0 1-2.621 2.621H74.514c-1.456-.058-2.563-1.165-2.563-2.621 0-.7.233-1.34.758-1.806l.116-.175c1.806-1.805 2.854-4.252 2.854-6.757v-1.747a9.3 9.3 0 0 1 8.388-9.261v-.99ZM85 44.816c-4.136 0-7.456 3.379-7.456 7.456v1.748c0 3.028-1.223 5.94-3.378 8.096l-.175.117a.94.94 0 0 0-.175.524c0 .408.291.699.7.699h20.91c.408 0 .758-.291.758-.7 0-.174-.117-.349-.233-.523l-.175-.117a11.502 11.502 0 0 1-3.378-8.155v-1.689c0-4.077-3.32-7.456-7.456-7.456H85Zm-1.806 23.008c.291.758.99 1.224 1.806 1.224.757 0 1.456-.466 1.747-1.224.175-.466.7-.757 1.165-.582a.976.976 0 0 1 .583 1.223A3.717 3.717 0 0 1 85 70.912c-1.631 0-3.029-.99-3.553-2.447a.976.976 0 0 1 .582-1.223c.466-.175.99.116 1.165.582Z"}),c.jsx("path",{fill:"#36A86B",d:"M113.791 86.146c-1.922 0-3.48-1.62-3.48-3.62 0-1.999 1.558-3.62 3.48-3.62s3.481 1.621 3.481 3.62c0 2-1.559 3.62-3.481 3.62Z"})]}),c.jsxs("defs",{children:[c.jsx("clipPath",{id:"a",children:c.jsx("path",{fill:"#fff",d:"M0 0h170v134H0z"})}),c.jsx("clipPath",{id:"b",children:c.jsx("rect",{width:170,height:134,fill:"#fff",rx:6})}),c.jsxs("linearGradient",{id:"c",x1:20.715,x2:62.592,y1:6.956,y2:110.839,gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{stopColor:"#313131"}),c.jsx("stop",{offset:1,stopColor:"#1B1B1B"})]})]})]}),v3=t=>c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:170,height:134,fill:"none",...t,children:[c.jsxs("g",{clipPath:"url(#a)",children:[c.jsxs("g",{clipPath:"url(#b)",children:[c.jsx("path",{fill:"url(#c)",d:"M0 0h170v94H0z",transform:"translate(0 20)"}),c.jsx("mask",{id:"d",fill:"#fff",children:c.jsx("path",{d:"M0 114h170v20H0v-20Z"})}),c.jsx("path",{fill:"#3C3E3F",d:"M0 114h170v20H0v-20Z"}),c.jsx("path",{fill:"#5D5D5D",d:"M0 115h170v-2H0v2Z",mask:"url(#d)"})]}),c.jsx("rect",{width:169,height:113,x:.5,y:20.5,stroke:"#5D5D5D",rx:5.5}),c.jsx("path",{fill:"#3C3E3F",stroke:"#5D5D5D",strokeMiterlimit:10,d:"M22.338.5h125.324c2.746 0 4.941 2.144 4.941 4.75v76.938c0 2.608-2.195 4.751-4.941 4.751H22.338c-2.746 0-4.94-2.143-4.94-4.75V5.25c0-2.607 2.194-4.751 4.94-4.751Z"}),c.jsx("path",{fill:"#fff",fillOpacity:.3,d:"M116.905 16.552a2.766 2.766 0 1 0 0-5.533 2.766 2.766 0 0 0 0 5.533ZM127.206 16.552a2.766 2.766 0 1 0 0-5.533 2.766 2.766 0 0 0 0 5.533Z"}),c.jsx("path",{fill:"#F0F6FE",d:"M137.505 16.552a2.766 2.766 0 1 0 0-5.533 2.766 2.766 0 0 0 0 5.533Z"}),c.jsx("circle",{cx:46.208,cy:58.882,r:20.294,fill:"#36AA6C"}),c.jsx("path",{fill:"#fff",fillRule:"evenodd",d:"M45.501 53.17a1 1 0 0 1 1.414 0l6.364 6.363a1 1 0 0 1-1.414 1.415l-4.657-4.657v48.23a1 1 0 0 1-2 0v-48.23l-4.657 4.657a1 1 0 0 1-1.414-1.415l6.364-6.364Z",clipRule:"evenodd"})]}),c.jsxs("defs",{children:[c.jsx("clipPath",{id:"a",children:c.jsx("path",{fill:"#fff",d:"M0 0h170v134H0z"})}),c.jsx("clipPath",{id:"b",children:c.jsx("rect",{width:170,height:114,y:20,fill:"#fff",rx:6})}),c.jsxs("linearGradient",{id:"c",x1:20.715,x2:50.521,y1:5.735,y2:95.406,gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{stopColor:"#313131"}),c.jsx("stop",{offset:1,stopColor:"#1B1B1B"})]})]})]}),y3=t=>c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:170,height:134,fill:"none",...t,children:[c.jsxs("g",{clipPath:"url(#a)",children:[c.jsxs("g",{clipPath:"url(#b)",children:[c.jsx("path",{fill:"url(#c)",d:"M0 0h170v114H0z"}),c.jsx("mask",{id:"d",fill:"#fff",children:c.jsx("path",{d:"M0 114h170v20H0v-20Z"})}),c.jsx("path",{fill:"#3C3E3F",d:"M0 114h170v20H0v-20Z"}),c.jsx("path",{fill:"#5D5D5D",d:"M0 115h170v-2H0v2Z",mask:"url(#d)"})]}),c.jsx("rect",{width:169,height:133,x:.5,y:.5,stroke:"#5D5D5D",rx:5.5}),c.jsx("path",{stroke:"#5D5D5D",strokeDasharray:"2 2",strokeLinejoin:"round",strokeMiterlimit:10,d:"M27.449 103.584a2.008 2.008 0 0 1-1.083-1.083l.462-.191a1.495 1.495 0 0 1-.114-.574v-1.011h-.5v-2.02h.5v-2.021h-.5v-2.021h.5v-2.021h-.5v-2.02h.5V88.6h-.5v-2.02h.5v-2.022h-.5v-2.02h.5v-2.021h-.5v-2.021h.5v-2.02h-.5v-2.022h.5v-2.02h-.5v-2.022h.5v-2.02h-.5V66.37h.5V64.35h-.5v-2.021h.5v-2.02h-.5v-2.022h.5v-2.02h-.5v-2.022h.5v-2.02h-.5v-2.021h.5v-2.021h-.5v-2.021h.5v-2.02h-.5V42.12h.5V40.1h-.5v-2.022h.5v-2.02h-.5v-2.021h.5v-2.021h-.5v-2.02h.5v-2.022h-.5v-2.02h.5v-2.021h-.5v-2.021h.5V19.89h-.5V17.87h.5v-2.021h-.5v-2.02h.5v-1.011c0-.205.04-.398.114-.574l-.462-.192c.203-.489.594-.88 1.083-1.083l.191.462c.176-.073.37-.113.574-.113h1.014v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h1.014c.204 0 .398.04.574.113l.191-.462c.489.203.88.594 1.083 1.083l-.462.192c.073.176.114.37.114.574v1.01h.5v2.021h-.5v2.02h.5v2.022h-.5v2.02h.5v2.021h-.5v2.021h.5v2.021h-.5v2.021h.5v2.02h-.5v2.022h.5v2.02h-.5v2.021h.5V40.1h-.5v2.021h.5v2.021h-.5v2.021h.5v2.02h-.5v2.022h.5v2.02h-.5v2.022h.5v2.02h-.5v2.021h.5v2.021h-.5v2.021h.5v2.02h-.5v2.022h.5v2.02h-.5v2.021h.5v2.021h-.5v2.021h.5v2.021h-.5v2.02h.5v2.022h-.5v2.02h.5v2.021h-.5v2.021h.5V88.6h-.5v2.021h.5v2.021h-.5v2.02h.5v2.022h-.5v2.02h.5v2.021h-.5v1.011c0 .204-.041.398-.114.574l.462.191a2.01 2.01 0 0 1-1.083 1.083l-.191-.462c-.176.073-.37.114-.574.114h-1.014v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.029v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.029v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5H90.07v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5H79.93v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5H69.79v-.5H67.76v.5h-2.028v-.5h-2.028v.5h-2.028v-.5H59.65v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5H47.48v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5H37.34v-.5h-2.029v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-1.014c-.204 0-.398-.041-.574-.114l-.191.462Z"}),c.jsx("path",{fill:"#5A5C5C",d:"M128 83c0 8.284 6.716 15 15 15 8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15-8.284 0-15 6.716-15 15Z"}),c.jsx("path",{fill:"#DDD",d:"M143.015 89.758a6.667 6.667 0 0 0 5.823-3.379c1.237-2.082 1.237-4.646 0-6.758-1.207-2.082-3.409-3.38-5.823-3.38a6.742 6.742 0 0 0-5.853 3.38c-1.237 2.112-1.237 4.676 0 6.758 1.207 2.112 3.409 3.38 5.853 3.38Zm0-14.482c2.746 0 5.28 1.479 6.668 3.862 1.388 2.414 1.388 5.34 0 7.724a7.666 7.666 0 0 1-6.668 3.862 7.678 7.678 0 0 1-6.698-3.862c-1.388-2.384-1.388-5.31 0-7.724a7.741 7.741 0 0 1 6.698-3.862Zm.724 2.897a.715.715 0 0 1-.724.724.697.697 0 0 1-.724-.724c0-.392.302-.724.724-.724.392 0 .724.332.724.724Zm-1.689 7.723c0 .543.422.966.965.966a.973.973 0 0 0 .966-.966.993.993 0 0 0-.966-.965.972.972 0 0 0-.965.965Zm-.966 0c0-1.056.845-1.93 1.931-1.93.513 0 .996.21 1.328.573l3.228-1.931a.478.478 0 0 1 .664.15c.15.242.06.544-.151.664l-3.228 1.931c.06.181.09.362.09.543 0 1.087-.875 1.931-1.931 1.931a1.906 1.906 0 0 1-1.931-1.93Zm6.034-6.275a.715.715 0 0 1-.724.724.697.697 0 0 1-.724-.724c0-.392.302-.724.724-.724.392 0 .724.332.724.724Zm-8.93 2.655c.392 0 .724.332.724.724a.715.715 0 0 1-.724.724.697.697 0 0 1-.724-.724c0-.392.301-.724.724-.724Zm2.172-2.655a.715.715 0 0 1-.724.724.697.697 0 0 1-.724-.724c0-.392.302-.724.724-.724.392 0 .724.332.724.724Z"}),c.jsx("path",{fill:"#5A5C5C",d:"M12 83c0 8.284 6.716 15 15 15 8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15-8.284 0-15 6.716-15 15Z"}),c.jsx("path",{fill:"#DDD",d:"M27.351 76.62a.804.804 0 0 0-.73 0L21.45 78.81c-.322.117-.556.438-.526.789 0 2.746 1.139 7.596 5.697 9.787a.804.804 0 0 0 .73 0c4.558-2.19 5.697-7.04 5.727-9.787a.855.855 0 0 0-.556-.789l-5.17-2.191Zm-1.08-.877a1.816 1.816 0 0 1 1.46 0l5.142 2.192c.643.292 1.14.905 1.14 1.665-.03 2.922-1.228 8.21-6.253 10.635a1.798 1.798 0 0 1-1.548 0c-5.026-2.425-6.223-7.713-6.223-10.635-.03-.76.467-1.373 1.11-1.665l5.171-2.192Z"}),c.jsx("rect",{width:30,height:30,fill:"#5A5C5C",rx:15,transform:"matrix(1 0 0 -1 12 45.46)"}),c.jsx("path",{fill:"#DDD",d:"M18.653 23.886c.132-.184.422-.237.58-.079l16.033 12.657a.394.394 0 0 1 .08.58c-.133.185-.396.212-.58.08L18.732 24.466a.42.42 0 0 1-.08-.58Zm10.416 6.065-1.45-1.16a7.74 7.74 0 0 1 4.746 2.189c.159.184.159.448 0 .606a.447.447 0 0 1-.606 0 6.555 6.555 0 0 0-2.69-1.635Zm-5.01.343a6.346 6.346 0 0 0-1.82 1.292.447.447 0 0 1-.606 0 .414.414 0 0 1 0-.58 7.975 7.975 0 0 1 1.688-1.292l.738.58Zm-.184-4.43-.791-.633a11.395 11.395 0 0 1 3.928-.686c3.218 0 6.17 1.319 8.307 3.428.158.159.158.422 0 .607-.158.158-.422.158-.607 0a10.84 10.84 0 0 0-7.7-3.19c-1.107 0-2.135.157-3.137.474ZM19.84 26.97l.686.528c-.449.343-.844.685-1.24 1.08a.447.447 0 0 1-.606 0c-.159-.184-.159-.447 0-.606.369-.369.765-.685 1.16-1.002Zm5.801 8.702a1.699 1.699 0 0 1-.21-1.687c.263-.554.79-.95 1.397-1.002a1.662 1.662 0 0 1 1.53.712c.369.5.448 1.134.21 1.687-.263.554-.79.95-1.397 1.002a1.662 1.662 0 0 1-1.53-.712Zm2.215-1.002a.868.868 0 0 0-.844-.843.85.85 0 0 0-.843.843c0 .475.369.844.843.844a.85.85 0 0 0 .844-.844Z"}),c.jsx("path",{fill:"#5A5C5C",d:"M128 30c0 8.284 6.716 15 15 15 8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15-8.284 0-15 6.716-15 15Z"}),c.jsx("path",{fill:"#DDD",d:"m142.001 23.885-.424 1.457c-.091.364-.364.637-.668.789-.243.121-.455.242-.667.364a1.232 1.232 0 0 1-1.032.212l-1.456-.364h-.122a3.276 3.276 0 0 0-.455.668l-.152.212a7.838 7.838 0 0 0-.333.728c0 .03.03.091.06.122l1.062 1.061c.243.273.364.668.334 1.002v.758c.03.334-.091.698-.334.971l-1.062 1.092a.231.231 0 0 0-.06.122c.091.242.212.485.333.728l.122.212c.152.213.303.456.455.668h.152l1.456-.364c.364-.091.759 0 1.032.182.212.151.424.273.667.394.304.152.577.425.668.79l.424 1.456c0 .03.031.06.061.09.304.061.607.061.941.061.303 0 .607 0 .91-.06.03-.03.061-.061.061-.091l.424-1.457c.091-.364.364-.637.668-.789a4.79 4.79 0 0 0 .667-.394c.304-.182.668-.273 1.032-.182l1.456.364h.152c.152-.212.304-.455.455-.668l.122-.212c.121-.243.242-.486.333-.728 0-.03-.03-.091-.06-.122l-1.062-1.092a1.316 1.316 0 0 1-.334-.97c0-.122.03-.244.03-.395 0-.122-.03-.243-.03-.364-.03-.334.091-.729.334-1.002l1.062-1.061c.03-.03.06-.092.06-.122a7.838 7.838 0 0 0-.333-.728l-.122-.212a12.155 12.155 0 0 0-.455-.668h-.152l-1.456.364c-.364.091-.728 0-1.032-.182a4.789 4.789 0 0 0-.667-.394c-.304-.152-.577-.425-.668-.79l-.424-1.456a.233.233 0 0 0-.061-.121 9.146 9.146 0 0 0-.91-.06c-.334 0-.637.03-.941.06a.233.233 0 0 0-.061.121Zm1.002-1.153c.394 0 .758.03 1.153.091.06.03.091.03.151.061.273.152.516.425.607.728l.425 1.457c0 .06.061.151.152.182.273.121.546.273.789.455.091.06.182.09.242.06l1.487-.364c.303-.09.668-.03.941.152l.121.122c.212.242.394.546.576.849l.152.212v.03c.152.304.304.608.425.911.03.06.03.091.03.152.031.334-.091.667-.333.91l-1.062 1.092c-.031.03-.061.122-.061.213 0 .151.03.303.03.455 0 .151-.03.303-.03.455 0 .121.03.212.061.243l1.062 1.092c.242.243.364.576.333.91 0 .03 0 .091-.03.152-.121.303-.273.607-.425.91l-.152.243a5.476 5.476 0 0 1-.606.85c-.031.06-.061.09-.091.12a1.206 1.206 0 0 1-.971.152l-1.457-.364c-.06-.03-.151 0-.242.061-.243.152-.516.303-.789.455-.091.03-.152.121-.152.182l-.425 1.426a1.277 1.277 0 0 1-.607.759c-.06.03-.091.03-.151.06-.395.03-.759.061-1.153.061-.395 0-.789-.03-1.184-.06-.06-.03-.091-.03-.151-.061a1.277 1.277 0 0 1-.607-.759l-.425-1.426c0-.06-.061-.151-.152-.182a4.11 4.11 0 0 1-.789-.455c-.091-.06-.182-.06-.242-.06l-1.457.363c-.333.091-.667.03-.94-.151-.061-.03-.091-.06-.122-.091-.242-.273-.424-.577-.606-.88l-.122-.213-.03-.03a11.98 11.98 0 0 1-.425-.91c0-.06-.03-.091-.03-.152 0-.334.091-.667.334-.91l1.061-1.092c.031-.03.061-.122.061-.243v-.91c0-.091-.03-.182-.061-.213l-1.061-1.092c-.243-.243-.334-.576-.334-.91 0-.061.03-.091.03-.152.121-.303.273-.607.425-.91l.03-.03.122-.213a6.09 6.09 0 0 1 .606-.85.24.24 0 0 1 .122-.12c.273-.183.607-.244.94-.153l1.457.364c.06.03.151 0 .242-.06.243-.152.516-.334.789-.455.091-.03.152-.122.152-.182l.425-1.457c.091-.303.334-.576.607-.728.06-.03.091-.03.151-.06.395-.061.789-.092 1.184-.092Zm-1.699 7.768c0 .637.303 1.183.849 1.486.516.304 1.153.304 1.699 0 .516-.303.85-.85.85-1.486 0-.607-.334-1.153-.85-1.457-.546-.303-1.183-.303-1.699 0-.546.304-.849.85-.849 1.457Zm4.369 0c0 .97-.516 1.85-1.335 2.336a2.781 2.781 0 0 1-2.67 0c-.85-.485-1.335-1.365-1.335-2.336 0-.94.485-1.82 1.335-2.306a2.781 2.781 0 0 1 2.67 0 2.702 2.702 0 0 1 1.335 2.306Z"}),c.jsx("circle",{cx:85,cy:57.277,r:32,fill:"#36AA6C"}),c.jsx("path",{fill:"#fff",d:"M72.313 42.777h9.968v1.812h-9.969c-1.019 0-1.812.85-1.812 1.813v16.312a1.79 1.79 0 0 0 1.813 1.813h25.374c.963 0 1.813-.793 1.813-1.813V46.402c0-.963-.85-1.813-1.813-1.813H87.72v-1.812h9.969c1.982 0 3.624 1.642 3.624 3.625v16.312a3.613 3.613 0 0 1-3.624 3.625H89.19l.623 3.625h3.342c.453 0 .906.453.906.907 0 .51-.453.906-.906.906H76.844a.895.895 0 0 1-.906-.906c0-.454.396-.907.906-.907h3.285l.623-3.625h-8.44c-2.039 0-3.624-1.586-3.624-3.625V46.402a3.614 3.614 0 0 1 3.624-3.625Zm10.251 23.562-.623 3.625h6.061l-.623-3.625h-4.815Zm3.342-22.656v12.348l2.946-3.002c.34-.34.962-.34 1.302 0 .34.34.34.963 0 1.302l-4.531 4.532c-.34.34-.963.34-1.303 0l-4.53-4.532c-.34-.34-.34-.962 0-1.302.339-.34.962-.34 1.302 0l3.002 3.002V43.683c0-.453.396-.906.906-.906.453 0 .906.453.906.906Z"})]}),c.jsxs("defs",{children:[c.jsx("clipPath",{id:"a",children:c.jsx("path",{fill:"#fff",d:"M0 0h170v134H0z"})}),c.jsx("clipPath",{id:"b",children:c.jsx("rect",{width:170,height:134,fill:"#fff",rx:6})}),c.jsxs("linearGradient",{id:"c",x1:20.715,x2:62.592,y1:6.956,y2:110.839,gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{stopColor:"#313131"}),c.jsx("stop",{offset:1,stopColor:"#1B1B1B"})]})]})]}),w3=t=>c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:170,height:134,fill:"none",...t,children:[c.jsxs("g",{clipPath:"url(#a)",children:[c.jsxs("g",{clipPath:"url(#b)",children:[c.jsx("path",{fill:"url(#c)",d:"M0 0h170v114H0z"}),c.jsx("path",{stroke:"#5D5D5D",strokeDasharray:"2 2",strokeMiterlimit:10,d:"M27.449 103.138a2.008 2.008 0 0 1-1.083-1.083l.462-.191a1.493 1.493 0 0 1-.114-.574v-1.011h-.5v-2.02h.5v-2.021h-.5v-2.021h.5v-2.021h-.5v-2.02h.5v-2.022h-.5v-2.02h.5v-2.022h-.5v-2.02h.5V80.07h-.5V78.05h.5v-2.021h-.5v-2.02h.5v-2.022h-.5v-2.02h.5v-2.021h-.5v-2.021h.5v-2.021h-.5v-2.021h.5v-2.02h-.5V57.84h.5v-2.02h-.5V53.8h.5v-2.021h-.5v-2.021h.5v-2.021h-.5v-2.021h.5v-2.02h-.5v-2.022h.5v-2.02h-.5v-2.022h.5v-2.02h-.5V33.59h.5V31.57h-.5v-2.021h.5v-2.02h-.5v-2.022h.5v-2.02h-.5v-2.021h.5v-2.021h-.5v-2.021h.5v-2.021h-.5v-2.02h.5v-1.011c0-.205.04-.398.114-.574l-.462-.192c.203-.489.594-.88 1.083-1.083l.191.462c.176-.073.37-.113.574-.113h1.014v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h1.014c.204 0 .398.04.574.113l.191-.462c.489.203.88.594 1.083 1.083l-.462.192c.073.176.114.37.114.574v1.01h.5v2.021h-.5v2.02h.5v2.022h-.5v2.02h.5v2.021h-.5v2.021h.5v2.021h-.5v2.021h.5v2.02h-.5v2.022h.5v2.02h-.5v2.022h.5v2.02h-.5v2.021h.5v2.021h-.5v2.021h.5v2.02h-.5v2.022h.5v2.02h-.5V53.8h.5v2.021h-.5v2.021h.5v2.021h-.5v2.02h.5v2.022h-.5v2.02h.5v2.021h-.5v2.021h.5v2.021h-.5v2.021h.5v2.021h-.5v2.02h.5v2.022h-.5v2.02h.5v2.022h-.5v2.02h.5v2.021h-.5v2.021h.5v2.021h-.5v2.02h.5v2.022h-.5v2.02h.5v2.021h-.5v1.011c0 .204-.041.398-.114.574l.462.191a2.01 2.01 0 0 1-1.083 1.083l-.191-.462c-.176.073-.37.114-.574.114h-1.014v.5h-2.028v-.5h-2.028v.5h-2.029v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.029v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5H90.07v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5H79.93v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5H69.79v-.5H67.76v.5h-2.028v-.5h-2.028v.5h-2.028v-.5H59.65v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5H47.48v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5H37.34v-.5h-2.029v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-1.014c-.204 0-.398-.041-.574-.114l-.191.462Z"}),c.jsx("mask",{id:"d",fill:"#fff",children:c.jsx("path",{d:"M0 114h170v20H0v-20Z"})}),c.jsx("path",{fill:"#3C3E3F",d:"M0 114h170v20H0v-20Z"}),c.jsx("path",{fill:"#5D5D5D",d:"M0 115h170v-2H0v2Z",mask:"url(#d)"})]}),c.jsx("rect",{width:169,height:133,x:.5,y:.5,stroke:"#5D5D5D",rx:5.5}),c.jsx("path",{fill:"#36AA6C",d:"M114.756 28.708H55.244c-1.427 0-2.584 1.512-2.584 3.377v49.491c0 1.866 1.157 3.378 2.584 3.378h59.512c1.427 0 2.584-1.512 2.584-3.378v-49.49c0-1.866-1.157-3.378-2.584-3.378Z"}),c.jsx("path",{fill:"#fff",fillOpacity:.3,d:"M98.8 37.185a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833ZM104.076 37.185a1.417 1.417 0 1 0 0-2.834 1.417 1.417 0 0 0 0 2.834Z"}),c.jsx("path",{fill:"#F0F6FE",d:"M109.351 37.185a1.417 1.417 0 1 0 0-2.834 1.417 1.417 0 0 0 0 2.834Z"}),c.jsx("path",{fill:"#3C3E3F",stroke:"#4B4E4F",strokeMiterlimit:10,d:"M10.804 18.367H43.32c.192 0 .409.105.595.358s.316.627.316 1.061v28.126c0 .434-.13.808-.316 1.06-.186.254-.403.36-.595.36H10.803c-.193 0-.41-.106-.595-.36-.186-.252-.317-.626-.317-1.06V19.786c0-.434.13-.808.317-1.06.186-.254.402-.36.595-.36Z"}),c.jsx("path",{fill:"#fff",fillOpacity:.3,d:"M26.192 26.344a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833ZM31.468 26.344a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),c.jsx("path",{fill:"#F0F6FE",d:"M36.743 26.344a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),c.jsx("path",{fill:"#3C3E3F",stroke:"#4B4E4F",strokeMiterlimit:10,d:"M126.63 18.367h32.517c.192 0 .409.105.595.358s.316.627.316 1.061v28.126c0 .434-.13.808-.316 1.06-.186.254-.403.36-.595.36H126.63c-.193 0-.409-.106-.595-.36-.186-.252-.317-.626-.317-1.06V19.786c0-.434.131-.808.317-1.06.186-.254.402-.36.595-.36Z"}),c.jsx("path",{fill:"#fff",fillOpacity:.3,d:"M142.019 26.344a1.416 1.416 0 1 0 0-2.832 1.416 1.416 0 0 0 0 2.832ZM147.294 26.344a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),c.jsx("path",{fill:"#F0F6FE",d:"M152.569 26.344a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),c.jsx("path",{fill:"#3C3E3F",stroke:"#4B4E4F",strokeMiterlimit:10,d:"M10.804 63.694H43.32c.192 0 .409.106.595.359s.316.626.316 1.061v28.125c0 .435-.13.808-.316 1.061-.186.254-.403.359-.595.359H10.803c-.193 0-.41-.106-.595-.359-.186-.253-.317-.626-.317-1.06V65.113c0-.435.13-.808.317-1.061.186-.253.402-.358.595-.358Z"}),c.jsx("path",{fill:"#fff",fillOpacity:.3,d:"M27.192 71.672a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833ZM32.468 71.672a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),c.jsx("path",{fill:"#F0F6FE",d:"M37.743 71.672a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),c.jsx("path",{fill:"#3C3E3F",stroke:"#4B4E4F",strokeMiterlimit:10,d:"M126.63 63.694h32.517c.192 0 .409.106.595.359s.316.626.316 1.061v28.125c0 .435-.13.808-.316 1.061-.186.254-.403.359-.595.359H126.63c-.193 0-.409-.106-.595-.359s-.317-.626-.317-1.06V65.113c0-.435.131-.808.317-1.061.186-.253.402-.358.595-.358Z"}),c.jsx("path",{fill:"#fff",fillOpacity:.3,d:"M143.019 71.672a1.416 1.416 0 1 0 0-2.833 1.416 1.416 0 0 0 0 2.833ZM148.294 71.672a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),c.jsx("path",{fill:"#F0F6FE",d:"M153.569 71.672a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),c.jsx("path",{fill:"#fff",d:"M49.318 40.488h5.836a.486.486 0 1 0 0-.973h-5.836a.486.486 0 1 0 0 .973Z"}),c.jsx("path",{fill:"#fff",d:"M44.318 40.488h5.836a.486.486 0 1 0 0-.973h-5.836a.486.486 0 1 0 0 .973Z"}),c.jsx("path",{fill:"#fff",d:"M44.482 40.488h-5.836a.486.486 0 1 1 0-.973h5.836a.486.486 0 1 1 0 .973ZM60.597 40.004l-3.255-3.255a.486.486 0 1 1 .688-.688l3.6 3.6c.19.19.19.497 0 .687l-3.594 3.593a.486.486 0 1 1-.688-.688l3.25-3.249Z"}),c.jsx("path",{fill:"#3BB272",d:"M32.147 36.709a3.375 3.375 0 1 1 0 6.75 3.375 3.375 0 0 1 0-6.75Z"}),c.jsx("path",{fill:"#fff",d:"M134.062 65.808v-5.836a.487.487 0 0 0-.973 0v5.836a.486.486 0 1 0 .973 0Z"}),c.jsx("path",{fill:"#fff",d:"M134.062 70.808v-5.836a.487.487 0 0 0-.973 0v5.837a.486.486 0 1 0 .973 0Z"}),c.jsx("path",{fill:"#fff",d:"M134.062 70.644v5.836a.487.487 0 0 1-.973 0v-5.836a.486.486 0 1 1 .973 0ZM133.578 54.529l-3.255 3.255a.487.487 0 0 1-.688-.688l3.599-3.599c.19-.19.498-.19.688 0l3.593 3.593a.486.486 0 1 1-.688.688l-3.249-3.249Z"}),c.jsx("path",{fill:"#AAB0B0",d:"M130.282 82.98a3.376 3.376 0 1 1 6.752 0 3.376 3.376 0 0 1-6.752 0Z"})]}),c.jsxs("defs",{children:[c.jsx("clipPath",{id:"a",children:c.jsx("path",{fill:"#fff",d:"M0 0h170v134H0z"})}),c.jsx("clipPath",{id:"b",children:c.jsx("rect",{width:170,height:134,fill:"#fff",rx:6})}),c.jsxs("linearGradient",{id:"c",x1:20.715,x2:62.592,y1:6.956,y2:110.839,gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{stopColor:"#313131"}),c.jsx("stop",{offset:1,stopColor:"#1B1B1B"})]})]})]}),b3=t=>c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:170,height:134,fill:"none",...t,children:[c.jsxs("g",{clipPath:"url(#a)",children:[c.jsxs("g",{clipPath:"url(#b)",children:[c.jsx("path",{fill:"url(#c)",d:"M0 0h170v114H0z"}),c.jsx("mask",{id:"d",fill:"#fff",children:c.jsx("path",{d:"M0 114h170v20H0v-20Z"})}),c.jsx("path",{fill:"#3C3E3F",d:"M0 114h170v20H0v-20Z"}),c.jsx("path",{fill:"#5D5D5D",d:"M0 115h170v-2H0v2Z",mask:"url(#d)"})]}),c.jsx("rect",{width:169,height:133,x:.5,y:.5,stroke:"#5D5D5D",rx:5.5}),c.jsx("path",{fill:"#DE2122",d:"M79.593 28.399c2.403-4.163 8.411-4.163 10.814 0l29.741 51.512c2.403 4.162-.601 9.366-5.407 9.366H55.259c-4.806 0-7.81-5.204-5.407-9.366l29.74-51.512Z"}),c.jsx("path",{fill:"#fff",fillRule:"evenodd",d:"M81.84 42.528h6.321a1 1 0 0 1 .994 1.113l-2.691 23.67a1 1 0 0 1-.994.887h-1.033a1 1 0 0 1-.994-.89l-2.596-23.671a1 1 0 0 1 .994-1.11Zm3.128 30.366a3.547 3.547 0 1 0 0 7.093 3.547 3.547 0 0 0 0-7.093Z",clipRule:"evenodd"}),c.jsx("path",{fill:"#5A5C5C",d:"M115.69 27.082 132.459.185l17.514-.151-25.545 24.389 17.858 23.176-25.076 13.678L131.267 47.6 115.69 27.082Z"})]}),c.jsxs("defs",{children:[c.jsx("clipPath",{id:"a",children:c.jsx("path",{fill:"#fff",d:"M0 0h170v134H0z"})}),c.jsx("clipPath",{id:"b",children:c.jsx("rect",{width:170,height:134,fill:"#fff",rx:6})}),c.jsxs("linearGradient",{id:"c",x1:20.715,x2:62.592,y1:6.956,y2:110.839,gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{stopColor:"#313131"}),c.jsx("stop",{offset:1,stopColor:"#1B1B1B"})]})]})]}),x3={edgeNotificationsPermissionTimeout:15e3},rt={WINDOW_MANAGEMENT:uo.WINDOW_MANAGEMENT,NOTIFICATIONS:uo.NOTIFICATIONS,POPUPS:"popups",PWA_INSTALL:"pwa-install"},C3={name:rt.WINDOW_MANAGEMENT,label:`Allow window management${ds?"":" (not available in your browser)"}`,heading:"Allow Window Management",description:`By granting this permission you will be able to load layouts containing multiple
57
57
  windows and share context data between opened windows.`,instructions:{initial:"Click “Allow” when the browser prompt appears.",additional:`It seems that you closed the permission prompt.
58
58
  Click the "Open permissions prompt" button again and grant the Window Management
59
- permission to allow the platform to function properly.`},Image:m3,actionBtnText:"Open permission prompt"},b3={name:rt.NOTIFICATIONS,label:"Allow browser notifications",heading:"Allow Browser Notifications",description:`By granting this permission you will be able to receive platform notifications in the notification center of your
59
+ permission to allow the platform to function properly.`},Image:w3,actionBtnText:"Open permission prompt"},S3={name:rt.NOTIFICATIONS,label:"Allow browser notifications",heading:"Allow Browser Notifications",description:`By granting this permission you will be able to receive platform notifications in the notification center of your
60
60
  operating system.`,instructions:{initial:"Click “Allow” when the browser prompt appears.",additional:`It seems that you closed the permission prompt or your browser automatically blocks notifications.
61
61
  To allow browser notifications, go to your browser settings or click the "Bell" icon
62
- in the address bar and allow notifications for this site.`},Image:f3,actionBtnText:"Open permission prompt"},w3={name:rt.POPUPS,label:"Allow pop-ups",heading:"Allow Pop-ups",description:"By granting this permission you will be able to eject apps from Workspaces and save them as part of a Layout.",instructions:{initial:`Click the "Test Pop-Up Settings" button. It should open two pop-ups in order to test the
62
+ in the address bar and allow notifications for this site.`},Image:g3,actionBtnText:"Open permission prompt"},k3={name:rt.POPUPS,label:"Allow pop-ups",heading:"Allow Pop-ups",description:"By granting this permission you will be able to eject apps from Workspaces and save them as part of a Layout.",instructions:{initial:`Click the "Test Pop-Up Settings" button. It should open two pop-ups in order to test the
63
63
  browser pop-up settings.`,additional:`It seems that pop-ups are disabled in your browser.
64
64
  To allow pop-ups, go to your browser settings or click the "Pop-up blocked" icon
65
- in the address bar and allow pop-ups for this site.`},Image:p3,actionBtnText:"Test pop-up settings"},x3={name:rt.PWA_INSTALL,label:"Install as a PWA",heading:"Install as a PWA (optional)",description:"By installing the platform as a Progressive Web App you will get a similar experience as with native desktop apps.",instructions:{initial:"If your browser supports Progressive Web Apps, you can now install the platform as a PWA."},Image:h3,actionBtnText:"Continue to the platform"},Xi=[y3,b3,w3,x3],$i={isCompleted:!1,state:"prompt"},C3={[rt.WINDOW_MANAGEMENT]:$i,[rt.NOTIFICATIONS]:$i,[rt.POPUPS]:$i,[rt.PWA_INSTALL]:$i},S3=({isOpen:t,onClose:n})=>{var a;const{launchpadComponents:e,launchpadSettings:o}=_0(),{permission:r}=vo(),i=(a=r.statuses[rt.WINDOW_MANAGEMENT])==null?void 0:a.state;return c.jsx(D0,{components:e,isOpen:t,onClose:n,settings:o,windowManagementPermissionState:i})};const R0=g.forwardRef((t,n)=>{const{className:e,isOpen:o,onClose:r,Panel:i,pinned:a=!1,position:s="left"}=t;return o&&!i&&console.error('Invalid use of PanelWrapper component. Please provide Panel component when "isOpen" is "true".'),c.jsx("div",{className:it(e,"panel-wrapper",s,{open:o,pinned:a}),ref:n,children:i&&c.jsx(i,{isOpen:o,onClose:r})})}),cu=t=>{const{Button:n,Panel:e,panelWrapperClassName:o,pinned:r=!1,position:i="left",tag:a="div",onClose:s}=t,[l,u]=g.useState(!1),f=g.useRef(null),d=g.useCallback(async()=>{u(!1),await(s==null?void 0:s())},[s]),p=()=>{if(l){d();return}u(!0)},h=!l||r;return nu({eventType:"mouseup",handler:d,ref:f,skip:h}),tu({handler:d,skip:h}),c.jsxs(a,{ref:f,children:[c.jsx(n,{active:l,onClick:p}),c.jsx(R0,{className:o,isOpen:l,onClose:d,Panel:e,pinned:r,position:i})]})};const F0=({Button:t=AC})=>{const{isLaunchpadPinned:n}=zo();return c.jsx(cu,{Button:t,Panel:S3,panelWrapperClassName:"launchpad-panel-wrapper",pinned:n})};var Qc=function(t,n){return Qc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])},Qc(t,n)};function k3(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");Qc(t,n);function e(){this.constructor=t}t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}var St=function(){return St=Object.assign||function(n){for(var e,o=1,r=arguments.length;o<r;o++){e=arguments[o];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}return n},St.apply(this,arguments)};function E3(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(e[o[r]]=t[o[r]]);return e}function qo(t,n,e,o){function r(i){return i instanceof e?i:new e(function(a){a(i)})}return new(e||(e=Promise))(function(i,a){function s(f){try{u(o.next(f))}catch(d){a(d)}}function l(f){try{u(o.throw(f))}catch(d){a(d)}}function u(f){f.done?i(f.value):r(f.value).then(s,l)}u((o=o.apply(t,n||[])).next())})}function Jo(t,n){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,r,i,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(f){return l([u,f])}}function l(u){if(o)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(e=0)),e;)try{if(o=1,r&&(i=u[0]&2?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return e.label++,{value:u[1],done:!1};case 5:e.label++,r=u[1],u=[0];continue;case 7:u=e.ops.pop(),e.trys.pop();continue;default:if(i=e.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){e.label=u[1];break}if(u[0]===6&&e.label<i[1]){e.label=i[1],i=u;break}if(i&&e.label<i[2]){e.label=i[2],e.ops.push(u);break}i[2]&&e.ops.pop(),e.trys.pop();continue}u=n.call(t,e)}catch(f){u=[6,f],r=0}finally{o=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function j3(t,n,e){if(e||arguments.length===2)for(var o=0,r=n.length,i;o<r;o++)(i||!(o in n))&&(i||(i=Array.prototype.slice.call(n,0,o)),i[o]=n[o]);return t.concat(i||Array.prototype.slice.call(n))}function Cn(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function"){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(e[o[r]]=t[o[r]])}return e}var No=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function lu(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function uu(t,n){return t(n={exports:{}},n.exports),n.exports}var ko=uu(function(t,n){Object.defineProperty(n,"__esModule",{value:!0});var e=function(){function o(){var r=this;this.locked=new Map,this.addToLocked=function(i,a){var s=r.locked.get(i);s===void 0?a===void 0?r.locked.set(i,[]):r.locked.set(i,[a]):a!==void 0&&(s.unshift(a),r.locked.set(i,s))},this.isLocked=function(i){return r.locked.has(i)},this.lock=function(i){return new Promise(function(a,s){r.isLocked(i)?r.addToLocked(i,a):(r.addToLocked(i),a())})},this.unlock=function(i){var a=r.locked.get(i);if(a!==void 0&&a.length!==0){var s=a.pop();r.locked.set(i,a),s!==void 0&&setTimeout(s,0)}else r.locked.delete(i)}}return o.getInstance=function(){return o.instance===void 0&&(o.instance=new o),o.instance},o}();n.default=function(){return e.getInstance()}});lu(ko);var O3=lu(uu(function(t,n){var e=No&&No.__awaiter||function(f,d,p,h){return new(p||(p=Promise))(function(m,v){function y(x){try{k(h.next(x))}catch(b){v(b)}}function w(x){try{k(h.throw(x))}catch(b){v(b)}}function k(x){x.done?m(x.value):new p(function(b){b(x.value)}).then(y,w)}k((h=h.apply(f,d||[])).next())})},o=No&&No.__generator||function(f,d){var p,h,m,v,y={label:0,sent:function(){if(1&m[0])throw m[1];return m[1]},trys:[],ops:[]};return v={next:w(0),throw:w(1),return:w(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function w(k){return function(x){return function(b){if(p)throw new TypeError("Generator is already executing.");for(;y;)try{if(p=1,h&&(m=2&b[0]?h.return:b[0]?h.throw||((m=h.return)&&m.call(h),0):h.next)&&!(m=m.call(h,b[1])).done)return m;switch(h=0,m&&(b=[2&b[0],m.value]),b[0]){case 0:case 1:m=b;break;case 4:return y.label++,{value:b[1],done:!1};case 5:y.label++,h=b[1],b=[0];continue;case 7:b=y.ops.pop(),y.trys.pop();continue;default:if(m=y.trys,!((m=m.length>0&&m[m.length-1])||b[0]!==6&&b[0]!==2)){y=0;continue}if(b[0]===3&&(!m||b[1]>m[0]&&b[1]<m[3])){y.label=b[1];break}if(b[0]===6&&y.label<m[1]){y.label=m[1],m=b;break}if(m&&y.label<m[2]){y.label=m[2],y.ops.push(b);break}m[2]&&y.ops.pop(),y.trys.pop();continue}b=d.call(f,y)}catch(E){b=[6,E],h=0}finally{p=m=0}if(5&b[0])throw b[1];return{value:b[0]?b[1]:void 0,done:!0}}([k,x])}}},r=No;Object.defineProperty(n,"__esModule",{value:!0});var i="browser-tabs-lock-key",a={key:function(f){return e(r,void 0,void 0,function(){return o(this,function(d){throw new Error("Unsupported")})})},getItem:function(f){return e(r,void 0,void 0,function(){return o(this,function(d){throw new Error("Unsupported")})})},clear:function(){return e(r,void 0,void 0,function(){return o(this,function(f){return[2,window.localStorage.clear()]})})},removeItem:function(f){return e(r,void 0,void 0,function(){return o(this,function(d){throw new Error("Unsupported")})})},setItem:function(f,d){return e(r,void 0,void 0,function(){return o(this,function(p){throw new Error("Unsupported")})})},keySync:function(f){return window.localStorage.key(f)},getItemSync:function(f){return window.localStorage.getItem(f)},clearSync:function(){return window.localStorage.clear()},removeItemSync:function(f){return window.localStorage.removeItem(f)},setItemSync:function(f,d){return window.localStorage.setItem(f,d)}};function s(f){return new Promise(function(d){return setTimeout(d,f)})}function l(f){for(var d="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",p="",h=0;h<f;h++)p+=d[Math.floor(Math.random()*d.length)];return p}var u=function(){function f(d){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Date.now().toString()+l(15),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),this.storageHandler=d,f.waiters===void 0&&(f.waiters=[])}return f.prototype.acquireLock=function(d,p){return p===void 0&&(p=5e3),e(this,void 0,void 0,function(){var h,m,v,y,w,k,x;return o(this,function(b){switch(b.label){case 0:h=Date.now()+l(4),m=Date.now()+p,v=i+"-"+d,y=this.storageHandler===void 0?a:this.storageHandler,b.label=1;case 1:return Date.now()<m?[4,s(30)]:[3,8];case 2:return b.sent(),y.getItemSync(v)!==null?[3,5]:(w=this.id+"-"+d+"-"+h,[4,s(Math.floor(25*Math.random()))]);case 3:return b.sent(),y.setItemSync(v,JSON.stringify({id:this.id,iat:h,timeoutKey:w,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,s(30)];case 4:return b.sent(),(k=y.getItemSync(v))!==null&&(x=JSON.parse(k)).id===this.id&&x.iat===h?(this.acquiredIatSet.add(h),this.refreshLockWhileAcquired(v,h),[2,!0]):[3,7];case 5:return f.lockCorrector(this.storageHandler===void 0?a:this.storageHandler),[4,this.waitForSomethingToChange(m)];case 6:b.sent(),b.label=7;case 7:return h=Date.now()+l(4),[3,1];case 8:return[2,!1]}})})},f.prototype.refreshLockWhileAcquired=function(d,p){return e(this,void 0,void 0,function(){var h=this;return o(this,function(m){return setTimeout(function(){return e(h,void 0,void 0,function(){var v,y,w;return o(this,function(k){switch(k.label){case 0:return[4,ko.default().lock(p)];case 1:return k.sent(),this.acquiredIatSet.has(p)?(v=this.storageHandler===void 0?a:this.storageHandler,(y=v.getItemSync(d))===null?(ko.default().unlock(p),[2]):((w=JSON.parse(y)).timeRefreshed=Date.now(),v.setItemSync(d,JSON.stringify(w)),ko.default().unlock(p),this.refreshLockWhileAcquired(d,p),[2])):(ko.default().unlock(p),[2])}})})},1e3),[2]})})},f.prototype.waitForSomethingToChange=function(d){return e(this,void 0,void 0,function(){return o(this,function(p){switch(p.label){case 0:return[4,new Promise(function(h){var m=!1,v=Date.now(),y=!1;function w(){if(y||(window.removeEventListener("storage",w),f.removeFromWaiting(w),clearTimeout(k),y=!0),!m){m=!0;var x=50-(Date.now()-v);x>0?setTimeout(h,x):h(null)}}window.addEventListener("storage",w),f.addToWaiting(w);var k=setTimeout(w,Math.max(0,d-Date.now()))})];case 1:return p.sent(),[2]}})})},f.addToWaiting=function(d){this.removeFromWaiting(d),f.waiters!==void 0&&f.waiters.push(d)},f.removeFromWaiting=function(d){f.waiters!==void 0&&(f.waiters=f.waiters.filter(function(p){return p!==d}))},f.notifyWaiters=function(){f.waiters!==void 0&&f.waiters.slice().forEach(function(d){return d()})},f.prototype.releaseLock=function(d){return e(this,void 0,void 0,function(){return o(this,function(p){switch(p.label){case 0:return[4,this.releaseLock__private__(d)];case 1:return[2,p.sent()]}})})},f.prototype.releaseLock__private__=function(d){return e(this,void 0,void 0,function(){var p,h,m,v;return o(this,function(y){switch(y.label){case 0:return p=this.storageHandler===void 0?a:this.storageHandler,h=i+"-"+d,(m=p.getItemSync(h))===null?[2]:(v=JSON.parse(m)).id!==this.id?[3,2]:[4,ko.default().lock(v.iat)];case 1:y.sent(),this.acquiredIatSet.delete(v.iat),p.removeItemSync(h),ko.default().unlock(v.iat),f.notifyWaiters(),y.label=2;case 2:return[2]}})})},f.lockCorrector=function(d){for(var p=Date.now()-5e3,h=d,m=[],v=0;;){var y=h.keySync(v);if(y===null)break;m.push(y),v++}for(var w=!1,k=0;k<m.length;k++){var x=m[k];if(x.includes(i)){var b=h.getItemSync(x);if(b!==null){var E=JSON.parse(b);(E.timeRefreshed===void 0&&E.timeAcquired<p||E.timeRefreshed!==void 0&&E.timeRefreshed<p)&&(h.removeItemSync(x),w=!0)}}}w&&f.notifyWaiters()},f.waiters=void 0,f}();n.default=u}));const N3={timeoutInSeconds:60},B0={name:"auth0-spa-js",version:"2.3.0"},H0=()=>Date.now();class At extends Error{constructor(n,e){super(e),this.error=n,this.error_description=e,Object.setPrototypeOf(this,At.prototype)}static fromPayload({error:n,error_description:e}){return new At(n,e)}}class du extends At{constructor(n,e,o,r=null){super(n,e),this.state=o,this.appState=r,Object.setPrototypeOf(this,du.prototype)}}class hi extends At{constructor(){super("timeout","Timeout"),Object.setPrototypeOf(this,hi.prototype)}}class fu extends hi{constructor(n){super(),this.popup=n,Object.setPrototypeOf(this,fu.prototype)}}class pu extends At{constructor(n){super("cancelled","Popup closed"),this.popup=n,Object.setPrototypeOf(this,pu.prototype)}}class hu extends At{constructor(n,e,o){super(n,e),this.mfa_token=o,Object.setPrototypeOf(this,hu.prototype)}}class ls extends At{constructor(n,e){super("missing_refresh_token",`Missing Refresh Token (audience: '${cf(n,["default"])}', scope: '${cf(e)}')`),this.audience=n,this.scope=e,Object.setPrototypeOf(this,ls.prototype)}}function cf(t,n=[]){return t&&!n.includes(t)?t:""}const Qi=()=>window.crypto,Gs=()=>{const t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.";let n="";return Array.from(Qi().getRandomValues(new Uint8Array(43))).forEach(e=>n+=t[e%t.length]),n},lf=t=>btoa(t),el=t=>{var{clientId:n}=t,e=Cn(t,["clientId"]);return new URLSearchParams((o=>Object.keys(o).filter(r=>o[r]!==void 0).reduce((r,i)=>Object.assign(Object.assign({},r),{[i]:o[i]}),{}))(Object.assign({client_id:n},e))).toString()},uf=t=>(n=>decodeURIComponent(atob(n).split("").map(e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)).join("")))(t.replace(/_/g,"/").replace(/-/g,"+")),I3=async(t,n)=>{const e=await fetch(t,n);return{ok:e.ok,json:await e.json()}},P3=async(t,n,e)=>{const o=new AbortController;let r;return n.signal=o.signal,Promise.race([I3(t,n),new Promise((i,a)=>{r=setTimeout(()=>{o.abort(),a(new Error("Timeout when executing 'fetch'"))},e)})]).finally(()=>{clearTimeout(r)})},A3=async(t,n,e,o,r,i,a)=>{return s={auth:{audience:n,scope:e},timeout:r,fetchUrl:t,fetchOptions:o,useFormData:a},l=i,new Promise(function(u,f){const d=new MessageChannel;d.port1.onmessage=function(p){p.data.error?f(new Error(p.data.error)):u(p.data),d.port1.close()},l.postMessage(s,[d.port2])});var s,l},T3=async(t,n,e,o,r,i,a=1e4)=>r?A3(t,n,e,o,a,r,i):P3(t,o,a);async function D3(t,n){var{baseUrl:e,timeout:o,audience:r,scope:i,auth0Client:a,useFormData:s}=t,l=Cn(t,["baseUrl","timeout","audience","scope","auth0Client","useFormData"]);const u=l.grant_type==="urn:ietf:params:oauth:grant-type:token-exchange",f=Object.assign(Object.assign(Object.assign({},l),u&&r&&{audience:r}),u&&i&&{scope:i}),d=s?el(f):JSON.stringify(f);return await async function(p,h,m,v,y,w,k){let x,b=null;for(let D=0;D<3;D++)try{x=await T3(p,m,v,y,w,k,h),b=null;break}catch(T){b=T}if(b)throw b;const E=x.json,{error:j,error_description:B}=E,F=Cn(E,["error","error_description"]),{ok:L}=x;if(!L){const D=B||`HTTP error. Unable to fetch ${p}`;throw j==="mfa_required"?new hu(j,D,F.mfa_token):j==="missing_refresh_token"?new ls(m,v):new At(j||"request_error",D)}return F}(`${e}/oauth/token`,o,r||"default",i,{method:"POST",body:d,headers:{"Content-Type":s?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(a||B0))}},n,s)}const $r=(...t)=>{return(n=t.filter(Boolean).join(" ").trim().split(/\s+/),Array.from(new Set(n))).join(" ");var n};class kn{constructor(n,e="@@auth0spajs@@",o){this.prefix=e,this.suffix=o,this.clientId=n.clientId,this.scope=n.scope,this.audience=n.audience}toKey(){return[this.prefix,this.clientId,this.audience,this.scope,this.suffix].filter(Boolean).join("::")}static fromKey(n){const[e,o,r,i]=n.split("::");return new kn({clientId:o,scope:i,audience:r},e)}static fromCacheEntry(n){const{scope:e,audience:o,client_id:r}=n;return new kn({scope:e,audience:o,clientId:r})}}class M3{set(n,e){localStorage.setItem(n,JSON.stringify(e))}get(n){const e=window.localStorage.getItem(n);if(e)try{return JSON.parse(e)}catch{return}}remove(n){localStorage.removeItem(n)}allKeys(){return Object.keys(window.localStorage).filter(n=>n.startsWith("@@auth0spajs@@"))}}class $0{constructor(){this.enclosedCache=function(){let n={};return{set(e,o){n[e]=o},get(e){const o=n[e];if(o)return o},remove(e){delete n[e]},allKeys:()=>Object.keys(n)}}()}}class _3{constructor(n,e,o){this.cache=n,this.keyManifest=e,this.nowProvider=o||H0}async setIdToken(n,e,o){var r;const i=this.getIdTokenCacheKey(n);await this.cache.set(i,{id_token:e,decodedToken:o}),await((r=this.keyManifest)===null||r===void 0?void 0:r.add(i))}async getIdToken(n){const e=await this.cache.get(this.getIdTokenCacheKey(n.clientId));if(!e&&n.scope&&n.audience){const o=await this.get(n);return!o||!o.id_token||!o.decodedToken?void 0:{id_token:o.id_token,decodedToken:o.decodedToken}}if(e)return{id_token:e.id_token,decodedToken:e.decodedToken}}async get(n,e=0){var o;let r=await this.cache.get(n.toKey());if(!r){const s=await this.getCacheKeys();if(!s)return;const l=this.matchExistingCacheKey(n,s);l&&(r=await this.cache.get(l))}if(!r)return;const i=await this.nowProvider(),a=Math.floor(i/1e3);return r.expiresAt-e<a?r.body.refresh_token?(r.body={refresh_token:r.body.refresh_token},await this.cache.set(n.toKey(),r),r.body):(await this.cache.remove(n.toKey()),void await((o=this.keyManifest)===null||o===void 0?void 0:o.remove(n.toKey()))):r.body}async set(n){var e;const o=new kn({clientId:n.client_id,scope:n.scope,audience:n.audience}),r=await this.wrapCacheEntry(n);await this.cache.set(o.toKey(),r),await((e=this.keyManifest)===null||e===void 0?void 0:e.add(o.toKey()))}async clear(n){var e;const o=await this.getCacheKeys();o&&(await o.filter(r=>!n||r.includes(n)).reduce(async(r,i)=>{await r,await this.cache.remove(i)},Promise.resolve()),await((e=this.keyManifest)===null||e===void 0?void 0:e.clear()))}async wrapCacheEntry(n){const e=await this.nowProvider();return{body:n,expiresAt:Math.floor(e/1e3)+n.expires_in}}async getCacheKeys(){var n;return this.keyManifest?(n=await this.keyManifest.get())===null||n===void 0?void 0:n.keys:this.cache.allKeys?this.cache.allKeys():void 0}getIdTokenCacheKey(n){return new kn({clientId:n},"@@auth0spajs@@","@@user@@").toKey()}matchExistingCacheKey(n,e){return e.filter(o=>{var r;const i=kn.fromKey(o),a=new Set(i.scope&&i.scope.split(" ")),s=((r=n.scope)===null||r===void 0?void 0:r.split(" "))||[],l=i.scope&&s.reduce((u,f)=>u&&a.has(f),!0);return i.prefix==="@@auth0spajs@@"&&i.clientId===n.clientId&&i.audience===n.audience&&l})[0]}}class L3{constructor(n,e,o){this.storage=n,this.clientId=e,this.cookieDomain=o,this.storageKey=`a0.spajs.txs.${this.clientId}`}create(n){this.storage.save(this.storageKey,n,{daysUntilExpire:1,cookieDomain:this.cookieDomain})}get(){return this.storage.get(this.storageKey)}remove(){this.storage.remove(this.storageKey,{cookieDomain:this.cookieDomain})}}const Wr=t=>typeof t=="number",R3=["iss","aud","exp","nbf","iat","jti","azp","nonce","auth_time","at_hash","c_hash","acr","amr","sub_jwk","cnf","sip_from_tag","sip_date","sip_callid","sip_cseq_num","sip_via_branch","orig","dest","mky","events","toe","txn","rph","sid","vot","vtm"],F3=t=>{if(!t.id_token)throw new Error("ID token is required but missing");const n=(i=>{const a=i.split("."),[s,l,u]=a;if(a.length!==3||!s||!l||!u)throw new Error("ID token could not be decoded");const f=JSON.parse(uf(l)),d={__raw:i},p={};return Object.keys(f).forEach(h=>{d[h]=f[h],R3.includes(h)||(p[h]=f[h])}),{encoded:{header:s,payload:l,signature:u},header:JSON.parse(uf(s)),claims:d,user:p}})(t.id_token);if(!n.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(n.claims.iss!==t.iss)throw new Error(`Issuer (iss) claim mismatch in the ID token; expected "${t.iss}", found "${n.claims.iss}"`);if(!n.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if(n.header.alg!=="RS256")throw new Error(`Signature algorithm of "${n.header.alg}" is not supported. Expected the ID token to be signed with "RS256".`);if(!n.claims.aud||typeof n.claims.aud!="string"&&!Array.isArray(n.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(n.claims.aud)){if(!n.claims.aud.includes(t.aud))throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${t.aud}" but was not one of "${n.claims.aud.join(", ")}"`);if(n.claims.aud.length>1){if(!n.claims.azp)throw new Error("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values");if(n.claims.azp!==t.aud)throw new Error(`Authorized Party (azp) claim mismatch in the ID token; expected "${t.aud}", found "${n.claims.azp}"`)}}else if(n.claims.aud!==t.aud)throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${t.aud}" but found "${n.claims.aud}"`);if(t.nonce){if(!n.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(n.claims.nonce!==t.nonce)throw new Error(`Nonce (nonce) claim mismatch in the ID token; expected "${t.nonce}", found "${n.claims.nonce}"`)}if(t.max_age&&!Wr(n.claims.auth_time))throw new Error("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified");if(n.claims.exp==null||!Wr(n.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!Wr(n.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");const e=t.leeway||60,o=new Date(t.now||Date.now()),r=new Date(0);if(r.setUTCSeconds(n.claims.exp+e),o>r)throw new Error(`Expiration Time (exp) claim error in the ID token; current time (${o}) is after expiration time (${r})`);if(n.claims.nbf!=null&&Wr(n.claims.nbf)){const i=new Date(0);if(i.setUTCSeconds(n.claims.nbf-e),o<i)throw new Error(`Not Before time (nbf) claim in the ID token indicates that this token can't be used just yet. Current time (${o}) is before ${i}`)}if(n.claims.auth_time!=null&&Wr(n.claims.auth_time)){const i=new Date(0);if(i.setUTCSeconds(parseInt(n.claims.auth_time)+t.max_age+e),o>i)throw new Error(`Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time (${o}) is after last auth at ${i}`)}if(t.organization){const i=t.organization.trim();if(i.startsWith("org_")){const a=i;if(!n.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(a!==n.claims.org_id)throw new Error(`Organization ID (org_id) claim mismatch in the ID token; expected "${a}", found "${n.claims.org_id}"`)}else{const a=i.toLowerCase();if(!n.claims.org_name)throw new Error("Organization Name (org_name) claim must be a string present in the ID token");if(a!==n.claims.org_name)throw new Error(`Organization Name (org_name) claim mismatch in the ID token; expected "${a}", found "${n.claims.org_name}"`)}}return n};var Ao=uu(function(t,n){var e=No&&No.__assign||function(){return e=Object.assign||function(l){for(var u,f=1,d=arguments.length;f<d;f++)for(var p in u=arguments[f])Object.prototype.hasOwnProperty.call(u,p)&&(l[p]=u[p]);return l},e.apply(this,arguments)};function o(l,u){if(!u)return"";var f="; "+l;return u===!0?f:f+"="+u}function r(l,u,f){return encodeURIComponent(l).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(u).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(d){if(typeof d.expires=="number"){var p=new Date;p.setMilliseconds(p.getMilliseconds()+864e5*d.expires),d.expires=p}return o("Expires",d.expires?d.expires.toUTCString():"")+o("Domain",d.domain)+o("Path",d.path)+o("Secure",d.secure)+o("SameSite",d.sameSite)}(f)}function i(l){for(var u={},f=l?l.split("; "):[],d=/(%[\dA-F]{2})+/gi,p=0;p<f.length;p++){var h=f[p].split("="),m=h.slice(1).join("=");m.charAt(0)==='"'&&(m=m.slice(1,-1));try{u[h[0].replace(d,decodeURIComponent)]=m.replace(d,decodeURIComponent)}catch{}}return u}function a(){return i(document.cookie)}function s(l,u,f){document.cookie=r(l,u,e({path:"/"},f))}n.__esModule=!0,n.encode=r,n.parse=i,n.getAll=a,n.get=function(l){return a()[l]},n.set=s,n.remove=function(l,u){s(l,"",e(e({},u),{expires:-1}))}});lu(Ao),Ao.encode,Ao.parse,Ao.getAll;var B3=Ao.get,W0=Ao.set,z0=Ao.remove;const er={get(t){const n=B3(t);if(n!==void 0)return JSON.parse(n)},save(t,n,e){let o={};window.location.protocol==="https:"&&(o={secure:!0,sameSite:"none"}),e!=null&&e.daysUntilExpire&&(o.expires=e.daysUntilExpire),e!=null&&e.cookieDomain&&(o.domain=e.cookieDomain),W0(t,JSON.stringify(n),o)},remove(t,n){let e={};n!=null&&n.cookieDomain&&(e.domain=n.cookieDomain),z0(t,e)}},H3={get(t){return er.get(t)||er.get(`_legacy_${t}`)},save(t,n,e){let o={};window.location.protocol==="https:"&&(o={secure:!0}),e!=null&&e.daysUntilExpire&&(o.expires=e.daysUntilExpire),e!=null&&e.cookieDomain&&(o.domain=e.cookieDomain),W0(`_legacy_${t}`,JSON.stringify(n),o),er.save(t,n,e)},remove(t,n){let e={};n!=null&&n.cookieDomain&&(e.domain=n.cookieDomain),z0(t,e),er.remove(t,n),er.remove(`_legacy_${t}`,n)}},$3={get(t){if(typeof sessionStorage>"u")return;const n=sessionStorage.getItem(t);return n!=null?JSON.parse(n):void 0},save(t,n){sessionStorage.setItem(t,JSON.stringify(n))},remove(t){sessionStorage.removeItem(t)}};function W3(t,n,e){var o=n===void 0?null:n,r=function(l,u){var f=atob(l);if(u){for(var d=new Uint8Array(f.length),p=0,h=f.length;p<h;++p)d[p]=f.charCodeAt(p);return String.fromCharCode.apply(null,new Uint16Array(d.buffer))}return f}(t,e!==void 0&&e),i=r.indexOf(`
66
- `,10)+1,a=r.substring(i)+(o?"//# sourceMappingURL="+o:""),s=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(s)}var df,ff,pf,Ks,z3=(df="Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+YCR7ZX18JHt0fWA7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jKHtkYXRhOnt0aW1lb3V0OmUsYXV0aDpyLGZldGNoVXJsOmksZmV0Y2hPcHRpb25zOmMsdXNlRm9ybURhdGE6YX0scG9ydHM6W3BdfSk9PntsZXQgZjtjb25zdHthdWRpZW5jZTp1LHNjb3BlOmx9PXJ8fHt9O3RyeXtjb25zdCByPWE/KGU9Pntjb25zdCB0PW5ldyBVUkxTZWFyY2hQYXJhbXMoZSkscj17fTtyZXR1cm4gdC5mb3JFYWNoKCgoZSx0KT0+e3JbdF09ZX0pKSxyfSkoYy5ib2R5KTpKU09OLnBhcnNlKGMuYm9keSk7aWYoIXIucmVmcmVzaF90b2tlbiYmInJlZnJlc2hfdG9rZW4iPT09ci5ncmFudF90eXBlKXtjb25zdCBlPSgoZSx0KT0+b1tuKGUsdCldKSh1LGwpO2lmKCFlKXRocm93IG5ldyB0KHUsbCk7Yy5ib2R5PWE/cyhPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKTpKU09OLnN0cmluZ2lmeShPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKX1sZXQgaCxnOyJmdW5jdGlvbiI9PXR5cGVvZiBBYm9ydENvbnRyb2xsZXImJihoPW5ldyBBYm9ydENvbnRyb2xsZXIsYy5zaWduYWw9aC5zaWduYWwpO3RyeXtnPWF3YWl0IFByb21pc2UucmFjZShbKGQ9ZSxuZXcgUHJvbWlzZSgoZT0+c2V0VGltZW91dChlLGQpKSkpLGZldGNoKGksT2JqZWN0LmFzc2lnbih7fSxjKSldKX1jYXRjaChlKXtyZXR1cm4gdm9pZCBwLnBvc3RNZXNzYWdlKHtlcnJvcjplLm1lc3NhZ2V9KX1pZighZylyZXR1cm4gaCYmaC5hYm9ydCgpLHZvaWQgcC5wb3N0TWVzc2FnZSh7ZXJyb3I6IlRpbWVvdXQgd2hlbiBleGVjdXRpbmcgJ2ZldGNoJyJ9KTtmPWF3YWl0IGcuanNvbigpLGYucmVmcmVzaF90b2tlbj8oKChlLHQscik9PntvW24odCxyKV09ZX0pKGYucmVmcmVzaF90b2tlbix1LGwpLGRlbGV0ZSBmLnJlZnJlc2hfdG9rZW4pOigoZSx0KT0+e2RlbGV0ZSBvW24oZSx0KV19KSh1LGwpLHAucG9zdE1lc3NhZ2Uoe29rOmcub2ssanNvbjpmfSl9Y2F0Y2goZSl7cC5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3I6ZS5lcnJvcixlcnJvcl9kZXNjcmlwdGlvbjplLm1lc3NhZ2V9fSl9dmFyIGR9KSl9KCk7Cgo=",ff=null,pf=!1,function(t){return Ks=Ks||W3(df,ff,pf),new Worker(Ks,t)});const Zs={};class U3{constructor(n,e){this.cache=n,this.clientId=e,this.manifestKey=this.createManifestKeyFrom(this.clientId)}async add(n){var e;const o=new Set(((e=await this.cache.get(this.manifestKey))===null||e===void 0?void 0:e.keys)||[]);o.add(n),await this.cache.set(this.manifestKey,{keys:[...o]})}async remove(n){const e=await this.cache.get(this.manifestKey);if(e){const o=new Set(e.keys);return o.delete(n),o.size>0?await this.cache.set(this.manifestKey,{keys:[...o]}):await this.cache.remove(this.manifestKey)}}get(){return this.cache.get(this.manifestKey)}clear(){return this.cache.remove(this.manifestKey)}createManifestKeyFrom(n){return`@@auth0spajs@@::${n}`}}const V3={memory:()=>new $0().enclosedCache,localstorage:()=>new M3},hf=t=>V3[t],mf=t=>{const{openUrl:n,onRedirect:e}=t,o=Cn(t,["openUrl","onRedirect"]);return Object.assign(Object.assign({},o),{openUrl:n===!1||n?n:e})},qs=new O3;class Y3{constructor(n){let e,o;if(this.userCache=new $0().enclosedCache,this.defaultOptions={authorizationParams:{scope:"openid profile email"},useRefreshTokensFallback:!1,useFormData:!0},this._releaseLockOnPageHide=async()=>{await qs.releaseLock("auth0.lock.getTokenSilently"),window.removeEventListener("pagehide",this._releaseLockOnPageHide)},this.options=Object.assign(Object.assign(Object.assign({},this.defaultOptions),n),{authorizationParams:Object.assign(Object.assign({},this.defaultOptions.authorizationParams),n.authorizationParams)}),typeof window<"u"&&(()=>{if(!Qi())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(Qi().subtle===void 0)throw new Error(`
65
+ in the address bar and allow pop-ups for this site.`},Image:v3,actionBtnText:"Test pop-up settings"},E3={name:rt.PWA_INSTALL,label:"Install as a PWA",heading:"Install as a PWA (optional)",description:"By installing the platform as a Progressive Web App you will get a similar experience as with native desktop apps.",instructions:{initial:"If your browser supports Progressive Web Apps, you can now install the platform as a PWA."},Image:y3,actionBtnText:"Continue to the platform"},ta=[C3,S3,k3,E3],Ui={isCompleted:!1,state:"prompt"},j3={[rt.WINDOW_MANAGEMENT]:Ui,[rt.NOTIFICATIONS]:Ui,[rt.POPUPS]:Ui,[rt.PWA_INSTALL]:Ui},O3=({isOpen:t,onClose:n})=>{var a;const{launchpadComponents:e,launchpadSettings:o}=B0(),{permission:r}=vo(),i=(a=r.statuses[rt.WINDOW_MANAGEMENT])==null?void 0:a.state;return c.jsx(R0,{components:e,isOpen:t,onClose:n,settings:o,windowManagementPermissionState:i})};const $0=g.forwardRef((t,n)=>{const{className:e,isOpen:o,onClose:r,Panel:i,pinned:a=!1,position:s="left"}=t;return o&&!i&&console.error('Invalid use of PanelWrapper component. Please provide Panel component when "isOpen" is "true".'),c.jsx("div",{className:it(e,"panel-wrapper",s,{open:o,pinned:a}),ref:n,children:i&&c.jsx(i,{isOpen:o,onClose:r})})}),du=t=>{const{Button:n,Panel:e,panelWrapperClassName:o,pinned:r=!1,position:i="left",tag:a="div",onClose:s}=t,[l,u]=g.useState(!1),f=g.useRef(null),d=g.useCallback(async()=>{u(!1),await(s==null?void 0:s())},[s]),p=()=>{if(l){d();return}u(!0)},h=!l||r;return iu({eventType:"mouseup",handler:d,ref:f,skip:h}),ru({handler:d,skip:h}),c.jsxs(a,{ref:f,children:[c.jsx(n,{active:l,onClick:p}),c.jsx($0,{className:o,isOpen:l,onClose:d,Panel:e,pinned:r,position:i})]})};const W0=({Button:t=_C})=>{const{isLaunchpadPinned:n}=Uo();return c.jsx(du,{Button:t,Panel:O3,panelWrapperClassName:"launchpad-panel-wrapper",pinned:n})};var nl=function(t,n){return nl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])},nl(t,n)};function N3(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");nl(t,n);function e(){this.constructor=t}t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}var St=function(){return St=Object.assign||function(n){for(var e,o=1,r=arguments.length;o<r;o++){e=arguments[o];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}return n},St.apply(this,arguments)};function I3(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(e[o[r]]=t[o[r]]);return e}function Jo(t,n,e,o){function r(i){return i instanceof e?i:new e(function(a){a(i)})}return new(e||(e=Promise))(function(i,a){function s(f){try{u(o.next(f))}catch(d){a(d)}}function l(f){try{u(o.throw(f))}catch(d){a(d)}}function u(f){f.done?i(f.value):r(f.value).then(s,l)}u((o=o.apply(t,n||[])).next())})}function Xo(t,n){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,r,i,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(f){return l([u,f])}}function l(u){if(o)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(e=0)),e;)try{if(o=1,r&&(i=u[0]&2?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return e.label++,{value:u[1],done:!1};case 5:e.label++,r=u[1],u=[0];continue;case 7:u=e.ops.pop(),e.trys.pop();continue;default:if(i=e.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){e.label=u[1];break}if(u[0]===6&&e.label<i[1]){e.label=i[1],i=u;break}if(i&&e.label<i[2]){e.label=i[2],e.ops.push(u);break}i[2]&&e.ops.pop(),e.trys.pop();continue}u=n.call(t,e)}catch(f){u=[6,f],r=0}finally{o=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function P3(t,n,e){if(e||arguments.length===2)for(var o=0,r=n.length,i;o<r;o++)(i||!(o in n))&&(i||(i=Array.prototype.slice.call(n,0,o)),i[o]=n[o]);return t.concat(i||Array.prototype.slice.call(n))}function Cn(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function"){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(e[o[r]]=t[o[r]])}return e}var No=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fu(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function pu(t,n){return t(n={exports:{}},n.exports),n.exports}var ko=pu(function(t,n){Object.defineProperty(n,"__esModule",{value:!0});var e=function(){function o(){var r=this;this.locked=new Map,this.addToLocked=function(i,a){var s=r.locked.get(i);s===void 0?a===void 0?r.locked.set(i,[]):r.locked.set(i,[a]):a!==void 0&&(s.unshift(a),r.locked.set(i,s))},this.isLocked=function(i){return r.locked.has(i)},this.lock=function(i){return new Promise(function(a,s){r.isLocked(i)?r.addToLocked(i,a):(r.addToLocked(i),a())})},this.unlock=function(i){var a=r.locked.get(i);if(a!==void 0&&a.length!==0){var s=a.pop();r.locked.set(i,a),s!==void 0&&setTimeout(s,0)}else r.locked.delete(i)}}return o.getInstance=function(){return o.instance===void 0&&(o.instance=new o),o.instance},o}();n.default=function(){return e.getInstance()}});fu(ko);var A3=fu(pu(function(t,n){var e=No&&No.__awaiter||function(f,d,p,h){return new(p||(p=Promise))(function(m,v){function y(b){try{S(h.next(b))}catch(w){v(w)}}function x(b){try{S(h.throw(b))}catch(w){v(w)}}function S(b){b.done?m(b.value):new p(function(w){w(b.value)}).then(y,x)}S((h=h.apply(f,d||[])).next())})},o=No&&No.__generator||function(f,d){var p,h,m,v,y={label:0,sent:function(){if(1&m[0])throw m[1];return m[1]},trys:[],ops:[]};return v={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function x(S){return function(b){return function(w){if(p)throw new TypeError("Generator is already executing.");for(;y;)try{if(p=1,h&&(m=2&w[0]?h.return:w[0]?h.throw||((m=h.return)&&m.call(h),0):h.next)&&!(m=m.call(h,w[1])).done)return m;switch(h=0,m&&(w=[2&w[0],m.value]),w[0]){case 0:case 1:m=w;break;case 4:return y.label++,{value:w[1],done:!1};case 5:y.label++,h=w[1],w=[0];continue;case 7:w=y.ops.pop(),y.trys.pop();continue;default:if(m=y.trys,!((m=m.length>0&&m[m.length-1])||w[0]!==6&&w[0]!==2)){y=0;continue}if(w[0]===3&&(!m||w[1]>m[0]&&w[1]<m[3])){y.label=w[1];break}if(w[0]===6&&y.label<m[1]){y.label=m[1],m=w;break}if(m&&y.label<m[2]){y.label=m[2],y.ops.push(w);break}m[2]&&y.ops.pop(),y.trys.pop();continue}w=d.call(f,y)}catch(E){w=[6,E],h=0}finally{p=m=0}if(5&w[0])throw w[1];return{value:w[0]?w[1]:void 0,done:!0}}([S,b])}}},r=No;Object.defineProperty(n,"__esModule",{value:!0});var i="browser-tabs-lock-key",a={key:function(f){return e(r,void 0,void 0,function(){return o(this,function(d){throw new Error("Unsupported")})})},getItem:function(f){return e(r,void 0,void 0,function(){return o(this,function(d){throw new Error("Unsupported")})})},clear:function(){return e(r,void 0,void 0,function(){return o(this,function(f){return[2,window.localStorage.clear()]})})},removeItem:function(f){return e(r,void 0,void 0,function(){return o(this,function(d){throw new Error("Unsupported")})})},setItem:function(f,d){return e(r,void 0,void 0,function(){return o(this,function(p){throw new Error("Unsupported")})})},keySync:function(f){return window.localStorage.key(f)},getItemSync:function(f){return window.localStorage.getItem(f)},clearSync:function(){return window.localStorage.clear()},removeItemSync:function(f){return window.localStorage.removeItem(f)},setItemSync:function(f,d){return window.localStorage.setItem(f,d)}};function s(f){return new Promise(function(d){return setTimeout(d,f)})}function l(f){for(var d="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",p="",h=0;h<f;h++)p+=d[Math.floor(Math.random()*d.length)];return p}var u=function(){function f(d){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Date.now().toString()+l(15),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),this.storageHandler=d,f.waiters===void 0&&(f.waiters=[])}return f.prototype.acquireLock=function(d,p){return p===void 0&&(p=5e3),e(this,void 0,void 0,function(){var h,m,v,y,x,S,b;return o(this,function(w){switch(w.label){case 0:h=Date.now()+l(4),m=Date.now()+p,v=i+"-"+d,y=this.storageHandler===void 0?a:this.storageHandler,w.label=1;case 1:return Date.now()<m?[4,s(30)]:[3,8];case 2:return w.sent(),y.getItemSync(v)!==null?[3,5]:(x=this.id+"-"+d+"-"+h,[4,s(Math.floor(25*Math.random()))]);case 3:return w.sent(),y.setItemSync(v,JSON.stringify({id:this.id,iat:h,timeoutKey:x,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,s(30)];case 4:return w.sent(),(S=y.getItemSync(v))!==null&&(b=JSON.parse(S)).id===this.id&&b.iat===h?(this.acquiredIatSet.add(h),this.refreshLockWhileAcquired(v,h),[2,!0]):[3,7];case 5:return f.lockCorrector(this.storageHandler===void 0?a:this.storageHandler),[4,this.waitForSomethingToChange(m)];case 6:w.sent(),w.label=7;case 7:return h=Date.now()+l(4),[3,1];case 8:return[2,!1]}})})},f.prototype.refreshLockWhileAcquired=function(d,p){return e(this,void 0,void 0,function(){var h=this;return o(this,function(m){return setTimeout(function(){return e(h,void 0,void 0,function(){var v,y,x;return o(this,function(S){switch(S.label){case 0:return[4,ko.default().lock(p)];case 1:return S.sent(),this.acquiredIatSet.has(p)?(v=this.storageHandler===void 0?a:this.storageHandler,(y=v.getItemSync(d))===null?(ko.default().unlock(p),[2]):((x=JSON.parse(y)).timeRefreshed=Date.now(),v.setItemSync(d,JSON.stringify(x)),ko.default().unlock(p),this.refreshLockWhileAcquired(d,p),[2])):(ko.default().unlock(p),[2])}})})},1e3),[2]})})},f.prototype.waitForSomethingToChange=function(d){return e(this,void 0,void 0,function(){return o(this,function(p){switch(p.label){case 0:return[4,new Promise(function(h){var m=!1,v=Date.now(),y=!1;function x(){if(y||(window.removeEventListener("storage",x),f.removeFromWaiting(x),clearTimeout(S),y=!0),!m){m=!0;var b=50-(Date.now()-v);b>0?setTimeout(h,b):h(null)}}window.addEventListener("storage",x),f.addToWaiting(x);var S=setTimeout(x,Math.max(0,d-Date.now()))})];case 1:return p.sent(),[2]}})})},f.addToWaiting=function(d){this.removeFromWaiting(d),f.waiters!==void 0&&f.waiters.push(d)},f.removeFromWaiting=function(d){f.waiters!==void 0&&(f.waiters=f.waiters.filter(function(p){return p!==d}))},f.notifyWaiters=function(){f.waiters!==void 0&&f.waiters.slice().forEach(function(d){return d()})},f.prototype.releaseLock=function(d){return e(this,void 0,void 0,function(){return o(this,function(p){switch(p.label){case 0:return[4,this.releaseLock__private__(d)];case 1:return[2,p.sent()]}})})},f.prototype.releaseLock__private__=function(d){return e(this,void 0,void 0,function(){var p,h,m,v;return o(this,function(y){switch(y.label){case 0:return p=this.storageHandler===void 0?a:this.storageHandler,h=i+"-"+d,(m=p.getItemSync(h))===null?[2]:(v=JSON.parse(m)).id!==this.id?[3,2]:[4,ko.default().lock(v.iat)];case 1:y.sent(),this.acquiredIatSet.delete(v.iat),p.removeItemSync(h),ko.default().unlock(v.iat),f.notifyWaiters(),y.label=2;case 2:return[2]}})})},f.lockCorrector=function(d){for(var p=Date.now()-5e3,h=d,m=[],v=0;;){var y=h.keySync(v);if(y===null)break;m.push(y),v++}for(var x=!1,S=0;S<m.length;S++){var b=m[S];if(b.includes(i)){var w=h.getItemSync(b);if(w!==null){var E=JSON.parse(w);(E.timeRefreshed===void 0&&E.timeAcquired<p||E.timeRefreshed!==void 0&&E.timeRefreshed<p)&&(h.removeItemSync(b),x=!0)}}}x&&f.notifyWaiters()},f.waiters=void 0,f}();n.default=u}));const T3={timeoutInSeconds:60},z0={name:"auth0-spa-js",version:"2.3.0"},U0=()=>Date.now();class At extends Error{constructor(n,e){super(e),this.error=n,this.error_description=e,Object.setPrototypeOf(this,At.prototype)}static fromPayload({error:n,error_description:e}){return new At(n,e)}}class hu extends At{constructor(n,e,o,r=null){super(n,e),this.state=o,this.appState=r,Object.setPrototypeOf(this,hu.prototype)}}class mi extends At{constructor(){super("timeout","Timeout"),Object.setPrototypeOf(this,mi.prototype)}}class mu extends mi{constructor(n){super(),this.popup=n,Object.setPrototypeOf(this,mu.prototype)}}class gu extends At{constructor(n){super("cancelled","Popup closed"),this.popup=n,Object.setPrototypeOf(this,gu.prototype)}}class vu extends At{constructor(n,e,o){super(n,e),this.mfa_token=o,Object.setPrototypeOf(this,vu.prototype)}}class fs extends At{constructor(n,e){super("missing_refresh_token",`Missing Refresh Token (audience: '${df(n,["default"])}', scope: '${df(e)}')`),this.audience=n,this.scope=e,Object.setPrototypeOf(this,fs.prototype)}}function df(t,n=[]){return t&&!n.includes(t)?t:""}const na=()=>window.crypto,qs=()=>{const t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.";let n="";return Array.from(na().getRandomValues(new Uint8Array(43))).forEach(e=>n+=t[e%t.length]),n},ff=t=>btoa(t),ol=t=>{var{clientId:n}=t,e=Cn(t,["clientId"]);return new URLSearchParams((o=>Object.keys(o).filter(r=>o[r]!==void 0).reduce((r,i)=>Object.assign(Object.assign({},r),{[i]:o[i]}),{}))(Object.assign({client_id:n},e))).toString()},pf=t=>(n=>decodeURIComponent(atob(n).split("").map(e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)).join("")))(t.replace(/_/g,"/").replace(/-/g,"+")),D3=async(t,n)=>{const e=await fetch(t,n);return{ok:e.ok,json:await e.json()}},M3=async(t,n,e)=>{const o=new AbortController;let r;return n.signal=o.signal,Promise.race([D3(t,n),new Promise((i,a)=>{r=setTimeout(()=>{o.abort(),a(new Error("Timeout when executing 'fetch'"))},e)})]).finally(()=>{clearTimeout(r)})},_3=async(t,n,e,o,r,i,a)=>{return s={auth:{audience:n,scope:e},timeout:r,fetchUrl:t,fetchOptions:o,useFormData:a},l=i,new Promise(function(u,f){const d=new MessageChannel;d.port1.onmessage=function(p){p.data.error?f(new Error(p.data.error)):u(p.data),d.port1.close()},l.postMessage(s,[d.port2])});var s,l},L3=async(t,n,e,o,r,i,a=1e4)=>r?_3(t,n,e,o,a,r,i):M3(t,o,a);async function R3(t,n){var{baseUrl:e,timeout:o,audience:r,scope:i,auth0Client:a,useFormData:s}=t,l=Cn(t,["baseUrl","timeout","audience","scope","auth0Client","useFormData"]);const u=l.grant_type==="urn:ietf:params:oauth:grant-type:token-exchange",f=Object.assign(Object.assign(Object.assign({},l),u&&r&&{audience:r}),u&&i&&{scope:i}),d=s?ol(f):JSON.stringify(f);return await async function(p,h,m,v,y,x,S){let b,w=null;for(let D=0;D<3;D++)try{b=await L3(p,m,v,y,x,S,h),w=null;break}catch(A){w=A}if(w)throw w;const E=b.json,{error:j,error_description:_}=E,M=Cn(E,["error","error_description"]),{ok:F}=b;if(!F){const D=_||`HTTP error. Unable to fetch ${p}`;throw j==="mfa_required"?new vu(j,D,M.mfa_token):j==="missing_refresh_token"?new fs(m,v):new At(j||"request_error",D)}return M}(`${e}/oauth/token`,o,r||"default",i,{method:"POST",body:d,headers:{"Content-Type":s?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(a||z0))}},n,s)}const Wr=(...t)=>{return(n=t.filter(Boolean).join(" ").trim().split(/\s+/),Array.from(new Set(n))).join(" ");var n};class kn{constructor(n,e="@@auth0spajs@@",o){this.prefix=e,this.suffix=o,this.clientId=n.clientId,this.scope=n.scope,this.audience=n.audience}toKey(){return[this.prefix,this.clientId,this.audience,this.scope,this.suffix].filter(Boolean).join("::")}static fromKey(n){const[e,o,r,i]=n.split("::");return new kn({clientId:o,scope:i,audience:r},e)}static fromCacheEntry(n){const{scope:e,audience:o,client_id:r}=n;return new kn({scope:e,audience:o,clientId:r})}}class F3{set(n,e){localStorage.setItem(n,JSON.stringify(e))}get(n){const e=window.localStorage.getItem(n);if(e)try{return JSON.parse(e)}catch{return}}remove(n){localStorage.removeItem(n)}allKeys(){return Object.keys(window.localStorage).filter(n=>n.startsWith("@@auth0spajs@@"))}}class V0{constructor(){this.enclosedCache=function(){let n={};return{set(e,o){n[e]=o},get(e){const o=n[e];if(o)return o},remove(e){delete n[e]},allKeys:()=>Object.keys(n)}}()}}class B3{constructor(n,e,o){this.cache=n,this.keyManifest=e,this.nowProvider=o||U0}async setIdToken(n,e,o){var r;const i=this.getIdTokenCacheKey(n);await this.cache.set(i,{id_token:e,decodedToken:o}),await((r=this.keyManifest)===null||r===void 0?void 0:r.add(i))}async getIdToken(n){const e=await this.cache.get(this.getIdTokenCacheKey(n.clientId));if(!e&&n.scope&&n.audience){const o=await this.get(n);return!o||!o.id_token||!o.decodedToken?void 0:{id_token:o.id_token,decodedToken:o.decodedToken}}if(e)return{id_token:e.id_token,decodedToken:e.decodedToken}}async get(n,e=0){var o;let r=await this.cache.get(n.toKey());if(!r){const s=await this.getCacheKeys();if(!s)return;const l=this.matchExistingCacheKey(n,s);l&&(r=await this.cache.get(l))}if(!r)return;const i=await this.nowProvider(),a=Math.floor(i/1e3);return r.expiresAt-e<a?r.body.refresh_token?(r.body={refresh_token:r.body.refresh_token},await this.cache.set(n.toKey(),r),r.body):(await this.cache.remove(n.toKey()),void await((o=this.keyManifest)===null||o===void 0?void 0:o.remove(n.toKey()))):r.body}async set(n){var e;const o=new kn({clientId:n.client_id,scope:n.scope,audience:n.audience}),r=await this.wrapCacheEntry(n);await this.cache.set(o.toKey(),r),await((e=this.keyManifest)===null||e===void 0?void 0:e.add(o.toKey()))}async clear(n){var e;const o=await this.getCacheKeys();o&&(await o.filter(r=>!n||r.includes(n)).reduce(async(r,i)=>{await r,await this.cache.remove(i)},Promise.resolve()),await((e=this.keyManifest)===null||e===void 0?void 0:e.clear()))}async wrapCacheEntry(n){const e=await this.nowProvider();return{body:n,expiresAt:Math.floor(e/1e3)+n.expires_in}}async getCacheKeys(){var n;return this.keyManifest?(n=await this.keyManifest.get())===null||n===void 0?void 0:n.keys:this.cache.allKeys?this.cache.allKeys():void 0}getIdTokenCacheKey(n){return new kn({clientId:n},"@@auth0spajs@@","@@user@@").toKey()}matchExistingCacheKey(n,e){return e.filter(o=>{var r;const i=kn.fromKey(o),a=new Set(i.scope&&i.scope.split(" ")),s=((r=n.scope)===null||r===void 0?void 0:r.split(" "))||[],l=i.scope&&s.reduce((u,f)=>u&&a.has(f),!0);return i.prefix==="@@auth0spajs@@"&&i.clientId===n.clientId&&i.audience===n.audience&&l})[0]}}class H3{constructor(n,e,o){this.storage=n,this.clientId=e,this.cookieDomain=o,this.storageKey=`a0.spajs.txs.${this.clientId}`}create(n){this.storage.save(this.storageKey,n,{daysUntilExpire:1,cookieDomain:this.cookieDomain})}get(){return this.storage.get(this.storageKey)}remove(){this.storage.remove(this.storageKey,{cookieDomain:this.cookieDomain})}}const zr=t=>typeof t=="number",$3=["iss","aud","exp","nbf","iat","jti","azp","nonce","auth_time","at_hash","c_hash","acr","amr","sub_jwk","cnf","sip_from_tag","sip_date","sip_callid","sip_cseq_num","sip_via_branch","orig","dest","mky","events","toe","txn","rph","sid","vot","vtm"],W3=t=>{if(!t.id_token)throw new Error("ID token is required but missing");const n=(i=>{const a=i.split("."),[s,l,u]=a;if(a.length!==3||!s||!l||!u)throw new Error("ID token could not be decoded");const f=JSON.parse(pf(l)),d={__raw:i},p={};return Object.keys(f).forEach(h=>{d[h]=f[h],$3.includes(h)||(p[h]=f[h])}),{encoded:{header:s,payload:l,signature:u},header:JSON.parse(pf(s)),claims:d,user:p}})(t.id_token);if(!n.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(n.claims.iss!==t.iss)throw new Error(`Issuer (iss) claim mismatch in the ID token; expected "${t.iss}", found "${n.claims.iss}"`);if(!n.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if(n.header.alg!=="RS256")throw new Error(`Signature algorithm of "${n.header.alg}" is not supported. Expected the ID token to be signed with "RS256".`);if(!n.claims.aud||typeof n.claims.aud!="string"&&!Array.isArray(n.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(n.claims.aud)){if(!n.claims.aud.includes(t.aud))throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${t.aud}" but was not one of "${n.claims.aud.join(", ")}"`);if(n.claims.aud.length>1){if(!n.claims.azp)throw new Error("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values");if(n.claims.azp!==t.aud)throw new Error(`Authorized Party (azp) claim mismatch in the ID token; expected "${t.aud}", found "${n.claims.azp}"`)}}else if(n.claims.aud!==t.aud)throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${t.aud}" but found "${n.claims.aud}"`);if(t.nonce){if(!n.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(n.claims.nonce!==t.nonce)throw new Error(`Nonce (nonce) claim mismatch in the ID token; expected "${t.nonce}", found "${n.claims.nonce}"`)}if(t.max_age&&!zr(n.claims.auth_time))throw new Error("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified");if(n.claims.exp==null||!zr(n.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!zr(n.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");const e=t.leeway||60,o=new Date(t.now||Date.now()),r=new Date(0);if(r.setUTCSeconds(n.claims.exp+e),o>r)throw new Error(`Expiration Time (exp) claim error in the ID token; current time (${o}) is after expiration time (${r})`);if(n.claims.nbf!=null&&zr(n.claims.nbf)){const i=new Date(0);if(i.setUTCSeconds(n.claims.nbf-e),o<i)throw new Error(`Not Before time (nbf) claim in the ID token indicates that this token can't be used just yet. Current time (${o}) is before ${i}`)}if(n.claims.auth_time!=null&&zr(n.claims.auth_time)){const i=new Date(0);if(i.setUTCSeconds(parseInt(n.claims.auth_time)+t.max_age+e),o>i)throw new Error(`Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time (${o}) is after last auth at ${i}`)}if(t.organization){const i=t.organization.trim();if(i.startsWith("org_")){const a=i;if(!n.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(a!==n.claims.org_id)throw new Error(`Organization ID (org_id) claim mismatch in the ID token; expected "${a}", found "${n.claims.org_id}"`)}else{const a=i.toLowerCase();if(!n.claims.org_name)throw new Error("Organization Name (org_name) claim must be a string present in the ID token");if(a!==n.claims.org_name)throw new Error(`Organization Name (org_name) claim mismatch in the ID token; expected "${a}", found "${n.claims.org_name}"`)}}return n};var To=pu(function(t,n){var e=No&&No.__assign||function(){return e=Object.assign||function(l){for(var u,f=1,d=arguments.length;f<d;f++)for(var p in u=arguments[f])Object.prototype.hasOwnProperty.call(u,p)&&(l[p]=u[p]);return l},e.apply(this,arguments)};function o(l,u){if(!u)return"";var f="; "+l;return u===!0?f:f+"="+u}function r(l,u,f){return encodeURIComponent(l).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(u).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(d){if(typeof d.expires=="number"){var p=new Date;p.setMilliseconds(p.getMilliseconds()+864e5*d.expires),d.expires=p}return o("Expires",d.expires?d.expires.toUTCString():"")+o("Domain",d.domain)+o("Path",d.path)+o("Secure",d.secure)+o("SameSite",d.sameSite)}(f)}function i(l){for(var u={},f=l?l.split("; "):[],d=/(%[\dA-F]{2})+/gi,p=0;p<f.length;p++){var h=f[p].split("="),m=h.slice(1).join("=");m.charAt(0)==='"'&&(m=m.slice(1,-1));try{u[h[0].replace(d,decodeURIComponent)]=m.replace(d,decodeURIComponent)}catch{}}return u}function a(){return i(document.cookie)}function s(l,u,f){document.cookie=r(l,u,e({path:"/"},f))}n.__esModule=!0,n.encode=r,n.parse=i,n.getAll=a,n.get=function(l){return a()[l]},n.set=s,n.remove=function(l,u){s(l,"",e(e({},u),{expires:-1}))}});fu(To),To.encode,To.parse,To.getAll;var z3=To.get,Y0=To.set,G0=To.remove;const tr={get(t){const n=z3(t);if(n!==void 0)return JSON.parse(n)},save(t,n,e){let o={};window.location.protocol==="https:"&&(o={secure:!0,sameSite:"none"}),e!=null&&e.daysUntilExpire&&(o.expires=e.daysUntilExpire),e!=null&&e.cookieDomain&&(o.domain=e.cookieDomain),Y0(t,JSON.stringify(n),o)},remove(t,n){let e={};n!=null&&n.cookieDomain&&(e.domain=n.cookieDomain),G0(t,e)}},U3={get(t){return tr.get(t)||tr.get(`_legacy_${t}`)},save(t,n,e){let o={};window.location.protocol==="https:"&&(o={secure:!0}),e!=null&&e.daysUntilExpire&&(o.expires=e.daysUntilExpire),e!=null&&e.cookieDomain&&(o.domain=e.cookieDomain),Y0(`_legacy_${t}`,JSON.stringify(n),o),tr.save(t,n,e)},remove(t,n){let e={};n!=null&&n.cookieDomain&&(e.domain=n.cookieDomain),G0(t,e),tr.remove(t,n),tr.remove(`_legacy_${t}`,n)}},V3={get(t){if(typeof sessionStorage>"u")return;const n=sessionStorage.getItem(t);return n!=null?JSON.parse(n):void 0},save(t,n){sessionStorage.setItem(t,JSON.stringify(n))},remove(t){sessionStorage.removeItem(t)}};function Y3(t,n,e){var o=n===void 0?null:n,r=function(l,u){var f=atob(l);if(u){for(var d=new Uint8Array(f.length),p=0,h=f.length;p<h;++p)d[p]=f.charCodeAt(p);return String.fromCharCode.apply(null,new Uint16Array(d.buffer))}return f}(t,e!==void 0&&e),i=r.indexOf(`
66
+ `,10)+1,a=r.substring(i)+(o?"//# sourceMappingURL="+o:""),s=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(s)}var hf,mf,gf,Js,G3=(hf="Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+YCR7ZX18JHt0fWA7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jKHtkYXRhOnt0aW1lb3V0OmUsYXV0aDpyLGZldGNoVXJsOmksZmV0Y2hPcHRpb25zOmMsdXNlRm9ybURhdGE6YX0scG9ydHM6W3BdfSk9PntsZXQgZjtjb25zdHthdWRpZW5jZTp1LHNjb3BlOmx9PXJ8fHt9O3RyeXtjb25zdCByPWE/KGU9Pntjb25zdCB0PW5ldyBVUkxTZWFyY2hQYXJhbXMoZSkscj17fTtyZXR1cm4gdC5mb3JFYWNoKCgoZSx0KT0+e3JbdF09ZX0pKSxyfSkoYy5ib2R5KTpKU09OLnBhcnNlKGMuYm9keSk7aWYoIXIucmVmcmVzaF90b2tlbiYmInJlZnJlc2hfdG9rZW4iPT09ci5ncmFudF90eXBlKXtjb25zdCBlPSgoZSx0KT0+b1tuKGUsdCldKSh1LGwpO2lmKCFlKXRocm93IG5ldyB0KHUsbCk7Yy5ib2R5PWE/cyhPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKTpKU09OLnN0cmluZ2lmeShPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKX1sZXQgaCxnOyJmdW5jdGlvbiI9PXR5cGVvZiBBYm9ydENvbnRyb2xsZXImJihoPW5ldyBBYm9ydENvbnRyb2xsZXIsYy5zaWduYWw9aC5zaWduYWwpO3RyeXtnPWF3YWl0IFByb21pc2UucmFjZShbKGQ9ZSxuZXcgUHJvbWlzZSgoZT0+c2V0VGltZW91dChlLGQpKSkpLGZldGNoKGksT2JqZWN0LmFzc2lnbih7fSxjKSldKX1jYXRjaChlKXtyZXR1cm4gdm9pZCBwLnBvc3RNZXNzYWdlKHtlcnJvcjplLm1lc3NhZ2V9KX1pZighZylyZXR1cm4gaCYmaC5hYm9ydCgpLHZvaWQgcC5wb3N0TWVzc2FnZSh7ZXJyb3I6IlRpbWVvdXQgd2hlbiBleGVjdXRpbmcgJ2ZldGNoJyJ9KTtmPWF3YWl0IGcuanNvbigpLGYucmVmcmVzaF90b2tlbj8oKChlLHQscik9PntvW24odCxyKV09ZX0pKGYucmVmcmVzaF90b2tlbix1LGwpLGRlbGV0ZSBmLnJlZnJlc2hfdG9rZW4pOigoZSx0KT0+e2RlbGV0ZSBvW24oZSx0KV19KSh1LGwpLHAucG9zdE1lc3NhZ2Uoe29rOmcub2ssanNvbjpmfSl9Y2F0Y2goZSl7cC5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3I6ZS5lcnJvcixlcnJvcl9kZXNjcmlwdGlvbjplLm1lc3NhZ2V9fSl9dmFyIGR9KSl9KCk7Cgo=",mf=null,gf=!1,function(t){return Js=Js||Y3(hf,mf,gf),new Worker(Js,t)});const Xs={};class K3{constructor(n,e){this.cache=n,this.clientId=e,this.manifestKey=this.createManifestKeyFrom(this.clientId)}async add(n){var e;const o=new Set(((e=await this.cache.get(this.manifestKey))===null||e===void 0?void 0:e.keys)||[]);o.add(n),await this.cache.set(this.manifestKey,{keys:[...o]})}async remove(n){const e=await this.cache.get(this.manifestKey);if(e){const o=new Set(e.keys);return o.delete(n),o.size>0?await this.cache.set(this.manifestKey,{keys:[...o]}):await this.cache.remove(this.manifestKey)}}get(){return this.cache.get(this.manifestKey)}clear(){return this.cache.remove(this.manifestKey)}createManifestKeyFrom(n){return`@@auth0spajs@@::${n}`}}const Z3={memory:()=>new V0().enclosedCache,localstorage:()=>new F3},vf=t=>Z3[t],yf=t=>{const{openUrl:n,onRedirect:e}=t,o=Cn(t,["openUrl","onRedirect"]);return Object.assign(Object.assign({},o),{openUrl:n===!1||n?n:e})},Qs=new A3;class q3{constructor(n){let e,o;if(this.userCache=new V0().enclosedCache,this.defaultOptions={authorizationParams:{scope:"openid profile email"},useRefreshTokensFallback:!1,useFormData:!0},this._releaseLockOnPageHide=async()=>{await Qs.releaseLock("auth0.lock.getTokenSilently"),window.removeEventListener("pagehide",this._releaseLockOnPageHide)},this.options=Object.assign(Object.assign(Object.assign({},this.defaultOptions),n),{authorizationParams:Object.assign(Object.assign({},this.defaultOptions.authorizationParams),n.authorizationParams)}),typeof window<"u"&&(()=>{if(!na())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(na().subtle===void 0)throw new Error(`
67
67
  auth0-spa-js must run on a secure origin. See https://github.com/auth0/auth0-spa-js/blob/main/FAQ.md#why-do-i-get-auth0-spa-js-must-run-on-a-secure-origin for more information.
68
- `)})(),n.cache&&n.cacheLocation&&console.warn("Both `cache` and `cacheLocation` options have been specified in the Auth0Client configuration; ignoring `cacheLocation` and using `cache`."),n.cache)o=n.cache;else{if(e=n.cacheLocation||"memory",!hf(e))throw new Error(`Invalid cache location "${e}"`);o=hf(e)()}this.httpTimeoutMs=n.httpTimeoutInSeconds?1e3*n.httpTimeoutInSeconds:1e4,this.cookieStorage=n.legacySameSiteCookie===!1?er:H3,this.orgHintCookieName=`auth0.${this.options.clientId}.organization_hint`,this.isAuthenticatedCookieName=(a=>`auth0.${a}.is.authenticated`)(this.options.clientId),this.sessionCheckExpiryDays=n.sessionCheckExpiryDays||1;const r=n.useCookiesForTransactions?this.cookieStorage:$3;var i;this.scope=$r("openid",this.options.authorizationParams.scope,this.options.useRefreshTokens?"offline_access":""),this.transactionManager=new L3(r,this.options.clientId,this.options.cookieDomain),this.nowProvider=this.options.nowProvider||H0,this.cacheManager=new _3(o,o.allKeys?void 0:new U3(o,this.options.clientId),this.nowProvider),this.domainUrl=(i=this.options.domain,/^https?:\/\//.test(i)?i:`https://${i}`),this.tokenIssuer=((a,s)=>a?a.startsWith("https://")?a:`https://${a}/`:`${s}/`)(this.options.issuer,this.domainUrl),typeof window<"u"&&window.Worker&&this.options.useRefreshTokens&&e==="memory"&&(this.options.workerUrl?this.worker=new Worker(this.options.workerUrl):this.worker=new z3)}_url(n){const e=encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client||B0)));return`${this.domainUrl}${n}&auth0Client=${e}`}_authorizeUrl(n){return this._url(`/authorize?${el(n)}`)}async _verifyIdToken(n,e,o){const r=await this.nowProvider();return F3({iss:this.tokenIssuer,aud:this.options.clientId,id_token:n,nonce:e,organization:o,leeway:this.options.leeway,max_age:(i=this.options.authorizationParams.max_age,typeof i!="string"?i:parseInt(i,10)||void 0),now:r});var i}_processOrgHint(n){n?this.cookieStorage.save(this.orgHintCookieName,n,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}):this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain})}async _prepareAuthorizeUrl(n,e,o){const r=lf(Gs()),i=lf(Gs()),a=Gs(),s=(f=>{const d=new Uint8Array(f);return(p=>{const h={"+":"-","/":"_","=":""};return p.replace(/[+/=]/g,m=>h[m])})(window.btoa(String.fromCharCode(...Array.from(d))))})(await(async f=>await Qi().subtle.digest({name:"SHA-256"},new TextEncoder().encode(f)))(a)),l=((f,d,p,h,m,v,y,w)=>Object.assign(Object.assign(Object.assign({client_id:f.clientId},f.authorizationParams),p),{scope:$r(d,p.scope),response_type:"code",response_mode:w||"query",state:h,nonce:m,redirect_uri:y||f.authorizationParams.redirect_uri,code_challenge:v,code_challenge_method:"S256"}))(this.options,this.scope,n,r,i,s,n.redirect_uri||this.options.authorizationParams.redirect_uri||o,e==null?void 0:e.response_mode),u=this._authorizeUrl(l);return{nonce:i,code_verifier:a,scope:l.scope,audience:l.audience||"default",redirect_uri:l.redirect_uri,state:r,url:u}}async loginWithPopup(n,e){var o;if(n=n||{},!(e=e||{}).popup&&(e.popup=(s=>{const l=window.screenX+(window.innerWidth-400)/2,u=window.screenY+(window.innerHeight-600)/2;return window.open(s,"auth0:authorize:popup",`left=${l},top=${u},width=400,height=600,resizable,scrollbars=yes,status=1`)})(""),!e.popup))throw new Error("Unable to open a popup for loginWithPopup - window.open returned `null`");const r=await this._prepareAuthorizeUrl(n.authorizationParams||{},{response_mode:"web_message"},window.location.origin);e.popup.location.href=r.url;const i=await(s=>new Promise((l,u)=>{let f;const d=setInterval(()=>{s.popup&&s.popup.closed&&(clearInterval(d),clearTimeout(p),window.removeEventListener("message",f,!1),u(new pu(s.popup)))},1e3),p=setTimeout(()=>{clearInterval(d),u(new fu(s.popup)),window.removeEventListener("message",f,!1)},1e3*(s.timeoutInSeconds||60));f=function(h){if(h.data&&h.data.type==="authorization_response"){if(clearTimeout(p),clearInterval(d),window.removeEventListener("message",f,!1),s.popup.close(),h.data.response.error)return u(At.fromPayload(h.data.response));l(h.data.response)}},window.addEventListener("message",f)}))(Object.assign(Object.assign({},e),{timeoutInSeconds:e.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}));if(r.state!==i.state)throw new At("state_mismatch","Invalid state");const a=((o=n.authorizationParams)===null||o===void 0?void 0:o.organization)||this.options.authorizationParams.organization;await this._requestToken({audience:r.audience,scope:r.scope,code_verifier:r.code_verifier,grant_type:"authorization_code",code:i.code,redirect_uri:r.redirect_uri},{nonceIn:r.nonce,organization:a})}async getUser(){var n;const e=await this._getIdTokenFromCache();return(n=e==null?void 0:e.decodedToken)===null||n===void 0?void 0:n.user}async getIdTokenClaims(){var n;const e=await this._getIdTokenFromCache();return(n=e==null?void 0:e.decodedToken)===null||n===void 0?void 0:n.claims}async loginWithRedirect(n={}){var e;const o=mf(n),{openUrl:r,fragment:i,appState:a}=o,s=Cn(o,["openUrl","fragment","appState"]),l=((e=s.authorizationParams)===null||e===void 0?void 0:e.organization)||this.options.authorizationParams.organization,u=await this._prepareAuthorizeUrl(s.authorizationParams||{}),{url:f}=u,d=Cn(u,["url"]);this.transactionManager.create(Object.assign(Object.assign(Object.assign({},d),{appState:a}),l&&{organization:l}));const p=i?`${f}#${i}`:f;r?await r(p):window.location.assign(p)}async handleRedirectCallback(n=window.location.href){const e=n.split("?").slice(1);if(e.length===0)throw new Error("There are no query params available for parsing.");const{state:o,code:r,error:i,error_description:a}=(d=>{d.indexOf("#")>-1&&(d=d.substring(0,d.indexOf("#")));const p=new URLSearchParams(d);return{state:p.get("state"),code:p.get("code")||void 0,error:p.get("error")||void 0,error_description:p.get("error_description")||void 0}})(e.join("")),s=this.transactionManager.get();if(!s)throw new At("missing_transaction","Invalid state");if(this.transactionManager.remove(),i)throw new du(i,a||i,o,s.appState);if(!s.code_verifier||s.state&&s.state!==o)throw new At("state_mismatch","Invalid state");const l=s.organization,u=s.nonce,f=s.redirect_uri;return await this._requestToken(Object.assign({audience:s.audience,scope:s.scope,code_verifier:s.code_verifier,grant_type:"authorization_code",code:r},f?{redirect_uri:f}:{}),{nonceIn:u,organization:l}),{appState:s.appState}}async checkSession(n){if(!this.cookieStorage.get(this.isAuthenticatedCookieName)){if(!this.cookieStorage.get("auth0.is.authenticated"))return;this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove("auth0.is.authenticated")}try{await this.getTokenSilently(n)}catch{}}async getTokenSilently(n={}){var e;const o=Object.assign(Object.assign({cacheMode:"on"},n),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),n.authorizationParams),{scope:$r(this.scope,(e=n.authorizationParams)===null||e===void 0?void 0:e.scope)})}),r=await((i,a)=>{let s=Zs[a];return s||(s=i().finally(()=>{delete Zs[a],s=null}),Zs[a]=s),s})(()=>this._getTokenSilently(o),`${this.options.clientId}::${o.authorizationParams.audience}::${o.authorizationParams.scope}`);return n.detailedResponse?r:r==null?void 0:r.access_token}async _getTokenSilently(n){const{cacheMode:e}=n,o=Cn(n,["cacheMode"]);if(e!=="off"){const r=await this._getEntryFromCache({scope:o.authorizationParams.scope,audience:o.authorizationParams.audience||"default",clientId:this.options.clientId});if(r)return r}if(e!=="cache-only"){if(!await(async(r,i=3)=>{for(let a=0;a<i;a++)if(await r())return!0;return!1})(()=>qs.acquireLock("auth0.lock.getTokenSilently",5e3),10))throw new hi;try{if(window.addEventListener("pagehide",this._releaseLockOnPageHide),e!=="off"){const u=await this._getEntryFromCache({scope:o.authorizationParams.scope,audience:o.authorizationParams.audience||"default",clientId:this.options.clientId});if(u)return u}const r=this.options.useRefreshTokens?await this._getTokenUsingRefreshToken(o):await this._getTokenFromIFrame(o),{id_token:i,access_token:a,oauthTokenScope:s,expires_in:l}=r;return Object.assign(Object.assign({id_token:i,access_token:a},s?{scope:s}:null),{expires_in:l})}finally{await qs.releaseLock("auth0.lock.getTokenSilently"),window.removeEventListener("pagehide",this._releaseLockOnPageHide)}}}async getTokenWithPopup(n={},e={}){var o;const r=Object.assign(Object.assign({},n),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),n.authorizationParams),{scope:$r(this.scope,(o=n.authorizationParams)===null||o===void 0?void 0:o.scope)})});return e=Object.assign(Object.assign({},N3),e),await this.loginWithPopup(r,e),(await this.cacheManager.get(new kn({scope:r.authorizationParams.scope,audience:r.authorizationParams.audience||"default",clientId:this.options.clientId}))).access_token}async isAuthenticated(){return!!await this.getUser()}_buildLogoutUrl(n){n.clientId!==null?n.clientId=n.clientId||this.options.clientId:delete n.clientId;const e=n.logoutParams||{},{federated:o}=e,r=Cn(e,["federated"]),i=o?"&federated":"";return this._url(`/v2/logout?${el(Object.assign({clientId:n.clientId},r))}`)+i}async logout(n={}){const e=mf(n),{openUrl:o}=e,r=Cn(e,["openUrl"]);n.clientId===null?await this.cacheManager.clear():await this.cacheManager.clear(n.clientId||this.options.clientId),this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(this.isAuthenticatedCookieName,{cookieDomain:this.options.cookieDomain}),this.userCache.remove("@@user@@");const i=this._buildLogoutUrl(r);o?await o(i):o!==!1&&window.location.assign(i)}async _getTokenFromIFrame(n){const e=Object.assign(Object.assign({},n.authorizationParams),{prompt:"none"}),o=this.cookieStorage.get(this.orgHintCookieName);o&&!e.organization&&(e.organization=o);const{url:r,state:i,nonce:a,code_verifier:s,redirect_uri:l,scope:u,audience:f}=await this._prepareAuthorizeUrl(e,{response_mode:"web_message"},window.location.origin);try{if(window.crossOriginIsolated)throw new At("login_required","The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");const d=n.timeoutInSeconds||this.options.authorizeTimeoutInSeconds;let p;try{p=new URL(this.domainUrl).origin}catch{p=this.domainUrl}const h=await((v,y,w=60)=>new Promise((k,x)=>{const b=window.document.createElement("iframe");b.setAttribute("width","0"),b.setAttribute("height","0"),b.style.display="none";const E=()=>{window.document.body.contains(b)&&(window.document.body.removeChild(b),window.removeEventListener("message",j,!1))};let j;const B=setTimeout(()=>{x(new hi),E()},1e3*w);j=function(F){if(F.origin!=y||!F.data||F.data.type!=="authorization_response")return;const L=F.source;L&&L.close(),F.data.response.error?x(At.fromPayload(F.data.response)):k(F.data.response),clearTimeout(B),window.removeEventListener("message",j,!1),setTimeout(E,2e3)},window.addEventListener("message",j,!1),window.document.body.appendChild(b),b.setAttribute("src",v)}))(r,p,d);if(i!==h.state)throw new At("state_mismatch","Invalid state");const m=await this._requestToken(Object.assign(Object.assign({},n.authorizationParams),{code_verifier:s,code:h.code,grant_type:"authorization_code",redirect_uri:l,timeout:n.authorizationParams.timeout||this.httpTimeoutMs}),{nonceIn:a,organization:e.organization});return Object.assign(Object.assign({},m),{scope:u,oauthTokenScope:m.scope,audience:f})}catch(d){throw d.error==="login_required"&&this.logout({openUrl:!1}),d}}async _getTokenUsingRefreshToken(n){const e=await this.cacheManager.get(new kn({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId}));if(!(e&&e.refresh_token||this.worker)){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(n);throw new ls(n.authorizationParams.audience||"default",n.authorizationParams.scope)}const o=n.authorizationParams.redirect_uri||this.options.authorizationParams.redirect_uri||window.location.origin,r=typeof n.timeoutInSeconds=="number"?1e3*n.timeoutInSeconds:null;try{const i=await this._requestToken(Object.assign(Object.assign(Object.assign({},n.authorizationParams),{grant_type:"refresh_token",refresh_token:e&&e.refresh_token,redirect_uri:o}),r&&{timeout:r}));return Object.assign(Object.assign({},i),{scope:n.authorizationParams.scope,oauthTokenScope:i.scope,audience:n.authorizationParams.audience||"default"})}catch(i){if((i.message.indexOf("Missing Refresh Token")>-1||i.message&&i.message.indexOf("invalid refresh token")>-1)&&this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(n);throw i}}async _saveEntryInCache(n){const{id_token:e,decodedToken:o}=n,r=Cn(n,["id_token","decodedToken"]);this.userCache.set("@@user@@",{id_token:e,decodedToken:o}),await this.cacheManager.setIdToken(this.options.clientId,n.id_token,n.decodedToken),await this.cacheManager.set(r)}async _getIdTokenFromCache(){const n=this.options.authorizationParams.audience||"default",e=await this.cacheManager.getIdToken(new kn({clientId:this.options.clientId,audience:n,scope:this.scope})),o=this.userCache.get("@@user@@");return e&&e.id_token===(o==null?void 0:o.id_token)?o:(this.userCache.set("@@user@@",e),e)}async _getEntryFromCache({scope:n,audience:e,clientId:o}){const r=await this.cacheManager.get(new kn({scope:n,audience:e,clientId:o}),60);if(r&&r.access_token){const{access_token:i,oauthTokenScope:a,expires_in:s}=r,l=await this._getIdTokenFromCache();return l&&Object.assign(Object.assign({id_token:l.id_token,access_token:i},a?{scope:a}:null),{expires_in:s})}}async _requestToken(n,e){const{nonceIn:o,organization:r}=e||{},i=await D3(Object.assign({baseUrl:this.domainUrl,client_id:this.options.clientId,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs},n),this.worker),a=await this._verifyIdToken(i.id_token,o,r);return await this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({},i),{decodedToken:a,scope:n.scope,audience:n.audience||"default"}),i.scope?{oauthTokenScope:i.scope}:null),{client_id:this.options.clientId})),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgHint(r||a.claims.org_id),Object.assign(Object.assign({},i),{decodedToken:a})}async exchangeToken(n){return this._requestToken({grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",subject_token:n.subject_token,subject_token_type:n.subject_token_type,scope:$r(n.scope,this.scope),audience:n.audience||this.options.authorizationParams.audience})}}var U0={isAuthenticated:!1,isLoading:!0,error:void 0,user:void 0},Fn=function(){throw new Error("You forgot to wrap your component in <Auth0Provider>.")},G3=St(St({},U0),{buildAuthorizeUrl:Fn,buildLogoutUrl:Fn,getAccessTokenSilently:Fn,getAccessTokenWithPopup:Fn,getIdTokenClaims:Fn,loginWithRedirect:Fn,loginWithPopup:Fn,logout:Fn,handleRedirectCallback:Fn}),V0=g.createContext(G3),gf=function(t){k3(n,t);function n(e,o){var r=t.call(this,o??e)||this;return r.error=e,r.error_description=o,Object.setPrototypeOf(r,n.prototype),r}return n}(Error),K3=/[?&]code=[^&]+/,Z3=/[?&]state=[^&]+/,q3=/[?&]error=[^&]+/,J3=function(t){return t===void 0&&(t=window.location.search),(K3.test(t)||q3.test(t))&&Z3.test(t)},Y0=function(t){return function(n){return n instanceof Error?n:n!==null&&typeof n=="object"&&"error"in n&&typeof n.error=="string"?"error_description"in n&&typeof n.error_description=="string"?new gf(n.error,n.error_description):new gf(n.error):new Error(t)}},vf=Y0("Login failed"),Js=Y0("Get access token failed"),G0=function(t){var n,e;t!=null&&t.redirectUri&&(console.warn("Using `redirectUri` has been deprecated, please use `authorizationParams.redirect_uri` instead as `redirectUri` will be no longer supported in a future version"),t.authorizationParams=(n=t.authorizationParams)!==null&&n!==void 0?n:{},t.authorizationParams.redirect_uri=t.redirectUri,delete t.redirectUri),!((e=t==null?void 0:t.authorizationParams)===null||e===void 0)&&e.redirectUri&&(console.warn("Using `authorizationParams.redirectUri` has been deprecated, please use `authorizationParams.redirect_uri` instead as `authorizationParams.redirectUri` will be removed in a future version"),t.authorizationParams.redirect_uri=t.authorizationParams.redirectUri,delete t.authorizationParams.redirectUri)},X3=function(t,n){switch(n.type){case"LOGIN_POPUP_STARTED":return St(St({},t),{isLoading:!0});case"LOGIN_POPUP_COMPLETE":case"INITIALISED":return St(St({},t),{isAuthenticated:!!n.user,user:n.user,isLoading:!1,error:void 0});case"HANDLE_REDIRECT_COMPLETE":case"GET_ACCESS_TOKEN_COMPLETE":return t.user===n.user?t:St(St({},t),{isAuthenticated:!!n.user,user:n.user});case"LOGOUT":return St(St({},t),{isAuthenticated:!1,user:void 0});case"ERROR":return St(St({},t),{isLoading:!1,error:n.error})}},Q3=function(t){return G0(t),St(St({},t),{auth0Client:{name:"auth0-react",version:"2.4.0"}})},e5=function(t){var n;window.history.replaceState({},document.title,(n=t==null?void 0:t.returnTo)!==null&&n!==void 0?n:window.location.pathname)},t5=function(t){var n=t.children,e=t.skipRedirectCallback,o=t.onRedirectCallback,r=o===void 0?e5:o,i=t.context,a=i===void 0?V0:i,s=E3(t,["children","skipRedirectCallback","onRedirectCallback","context"]),l=g.useState(function(){return new Y3(Q3(s))})[0],u=g.useReducer(X3,U0),f=u[0],d=u[1],p=g.useRef(!1),h=g.useCallback(function(j){return d({type:"ERROR",error:j}),j},[]);g.useEffect(function(){p.current||(p.current=!0,function(){return qo(void 0,void 0,void 0,function(){var j,B,F;return Jo(this,function(L){switch(L.label){case 0:return L.trys.push([0,7,,8]),j=void 0,J3()&&!e?[4,l.handleRedirectCallback()]:[3,3];case 1:return B=L.sent().appState,[4,l.getUser()];case 2:return j=L.sent(),r(B,j),[3,6];case 3:return[4,l.checkSession()];case 4:return L.sent(),[4,l.getUser()];case 5:j=L.sent(),L.label=6;case 6:return d({type:"INITIALISED",user:j}),[3,8];case 7:return F=L.sent(),h(vf(F)),[3,8];case 8:return[2]}})})}())},[l,r,e,h]);var m=g.useCallback(function(j){return G0(j),l.loginWithRedirect(j)},[l]),v=g.useCallback(function(j,B){return qo(void 0,void 0,void 0,function(){var F,L;return Jo(this,function(D){switch(D.label){case 0:d({type:"LOGIN_POPUP_STARTED"}),D.label=1;case 1:return D.trys.push([1,3,,4]),[4,l.loginWithPopup(j,B)];case 2:return D.sent(),[3,4];case 3:return F=D.sent(),h(vf(F)),[2];case 4:return[4,l.getUser()];case 5:return L=D.sent(),d({type:"LOGIN_POPUP_COMPLETE",user:L}),[2]}})})},[l,h]),y=g.useCallback(function(){for(var j=[],B=0;B<arguments.length;B++)j[B]=arguments[B];return qo(void 0,j3([],j,!0),void 0,function(F){return F===void 0&&(F={}),Jo(this,function(L){switch(L.label){case 0:return[4,l.logout(F)];case 1:return L.sent(),(F.openUrl||F.openUrl===!1)&&d({type:"LOGOUT"}),[2]}})})},[l]),w=g.useCallback(function(j){return qo(void 0,void 0,void 0,function(){var B,F,L,D;return Jo(this,function(T){switch(T.label){case 0:return T.trys.push([0,2,3,5]),[4,l.getTokenSilently(j)];case 1:return B=T.sent(),[3,5];case 2:throw F=T.sent(),Js(F);case 3:return L=d,D={type:"GET_ACCESS_TOKEN_COMPLETE"},[4,l.getUser()];case 4:return L.apply(void 0,[(D.user=T.sent(),D)]),[7];case 5:return[2,B]}})})},[l]),k=g.useCallback(function(j,B){return qo(void 0,void 0,void 0,function(){var F,L,D,T;return Jo(this,function(P){switch(P.label){case 0:return P.trys.push([0,2,3,5]),[4,l.getTokenWithPopup(j,B)];case 1:return F=P.sent(),[3,5];case 2:throw L=P.sent(),Js(L);case 3:return D=d,T={type:"GET_ACCESS_TOKEN_COMPLETE"},[4,l.getUser()];case 4:return D.apply(void 0,[(T.user=P.sent(),T)]),[7];case 5:return[2,F]}})})},[l]),x=g.useCallback(function(){return l.getIdTokenClaims()},[l]),b=g.useCallback(function(j){return qo(void 0,void 0,void 0,function(){var B,F,L;return Jo(this,function(D){switch(D.label){case 0:return D.trys.push([0,2,3,5]),[4,l.handleRedirectCallback(j)];case 1:return[2,D.sent()];case 2:throw B=D.sent(),Js(B);case 3:return F=d,L={type:"HANDLE_REDIRECT_COMPLETE"},[4,l.getUser()];case 4:return F.apply(void 0,[(L.user=D.sent(),L)]),[7];case 5:return[2]}})})},[l]),E=g.useMemo(function(){return St(St({},f),{getAccessTokenSilently:w,getAccessTokenWithPopup:k,getIdTokenClaims:x,loginWithRedirect:m,loginWithPopup:v,logout:y,handleRedirectCallback:b})},[f,w,k,x,m,v,y,b]);return g.createElement(a.Provider,{value:E},n)},K0=function(t){return t===void 0&&(t=V0),g.useContext(t)};const Z0=({className:t,children:n,Logo:e})=>c.jsxs("div",{className:it("info-page-container",t),children:[c.jsx(e,{className:"info-page-logo"}),c.jsx("div",{className:"info-page-wrapper",children:n})]}),n5={value:"data:image/svg+xml,%3Csvg width='5041' height='1232' viewBox='0 0 5041 1232' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_879_362)'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M548.6 178H439.6C368.7 178 310 199.5 269.3 244.5C228.6 289.3 206.7 356 206.7 444.3C206.7 532.6 228.6 599.5 269.3 644.2C310.2 689.2 368.7 710.7 439.6 710.7H548.6C619 710.7 677.6 689.2 718.6 644.2C759.5 599.4 781.6 532.6 781.6 444.2C781.6 355.8 759.5 289 718.6 244.2C677.7 199.3 619 177.7 548.6 177.7V178ZM449.5 293.8H538.9C582.2 293.8 611.9 305.2 631.1 328.3C650.5 351.8 660.5 389.2 660.5 444.4C660.5 499.6 650.5 536.7 631.1 560C612 583 582.2 594.1 538.9 594.1H449.5C405.6 594.1 375.9 583 356.9 560C337.6 536.8 327.7 499.7 327.7 444.5C327.7 389.3 337.4 351.9 356.8 328.4C375.9 305.2 405.6 293.8 449.5 293.8Z' fill='white'/%3E%3Cpath d='M0.700195 189.8C0.700195 183.1 6.10017 177.7 12.8002 177.7H108.6C115.3 177.7 120.7 183.1 120.7 189.8V698.6C120.7 705.3 115.3 710.7 108.6 710.7H12.8002C6.10017 710.7 0.700195 705.3 0.700195 698.6V189.8Z' fill='white'/%3E%3Cpath d='M0.700195 11.9002C0.700195 5.7002 5.70018 0.700195 11.9002 0.700195H109.6C115.7 0.700195 120.7 5.7002 120.7 11.9002V109.5C120.7 115.7 115.7 120.7 109.5 120.7H11.9002C5.70018 120.7 0.700195 115.7 0.700195 109.5V11.9002Z' fill='%23007BE5'/%3E%3Cpath d='M827.7 601.9C827.7 595.7 832.7 590.7 838.9 590.7H936.6C942.8 590.7 947.8 595.7 947.8 601.9V699.5C947.8 705.7 942.8 710.7 936.6 710.7H838.9C832.7 710.7 827.7 705.7 827.7 699.5V601.9Z' fill='%23007BE5'/%3E%3Cpath d='M4363.9 293.2C4320.2 293.2 4290.6 304.6 4271.6 327.8C4252.3 351.4 4242.5 388.8 4242.5 444C4242.5 499.2 4252.3 536.4 4271.5 559.7C4290.5 582.6 4320 593.8 4363.8 593.8H4614.7C4622.4 593.8 4628.7 600.1 4628.7 607.8V696.7C4628.7 704.4 4622.4 710.7 4614.7 710.7H4354.1C4283.3 710.7 4224.9 689.1 4184.1 644.1C4143.5 599.3 4121.6 532.4 4121.6 444C4121.6 355.6 4143.5 288.7 4184.1 243.9C4224.8 199 4283.3 177.3 4354.1 177.3H4614.7C4622.4 177.3 4628.7 183.6 4628.7 191.3V279.3C4628.7 287 4622.4 293.3 4614.7 293.3H4363.9V293.2Z' fill='white'/%3E%3Cpath d='M1302.6 165.3C1240.1 165.3 1197 180.9 1169.3 213.3C1141.3 246 1127.4 297.6 1127.4 372.9C1127.4 447.7 1141.1 499 1169 531.6C1196.6 563.9 1239.7 579.5 1302.7 579.5H1552.5C1560.2 579.5 1566.5 585.8 1566.5 593.5V697.1C1566.5 704.8 1560.2 711.1 1552.5 711.1H1302.7C1204.7 711.1 1127.5 683.4 1075 626.4C1022.4 569.7 995.7 484.8 995.7 372.9C995.7 260.5 1022.7 175.4 1075.2 118.4C1127.9 61.3001 1205 33.6001 1302.6 33.6001H1552.4C1560.1 33.6001 1566.4 39.9001 1566.4 47.6001V151.2C1566.4 158.9 1560.1 165.2 1552.4 165.2H1302.6V165.3Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M1953.6 177.7H1844.8C1774 177.7 1715.6 199.3 1674.8 244.3C1634.2 289.1 1612.3 356 1612.3 444.4C1612.3 532.8 1634.2 599.7 1674.8 644.5C1715.5 689.4 1774 711.1 1844.8 711.1H1953.6C2023.9 711.1 2082.4 689.5 2123.2 644.5C2163.9 599.7 2186 532.8 2186 444.3C2186 355.8 2163.9 289 2123.2 244.1C2082.3 199.3 2023.9 177.7 1953.6 177.7ZM1854.6 293.7H1943.8C1987 293.7 2016.6 305.1 2035.8 328.3C2055.2 351.9 2065.2 389.3 2065.2 444.5C2065.2 499.7 2055.2 536.8 2035.8 560.2C2016.7 583.2 1987.1 594.3 1943.8 594.3H1854.6C1810.8 594.3 1781.3 583.1 1762.3 560.2C1743 536.9 1733.3 499.8 1733.3 444.5C1733.3 389.3 1743.1 351.9 1762.4 328.3C1781.3 305 1810.9 293.7 1854.6 293.7Z' fill='white'/%3E%3Cpath d='M2679.7 411.6C2679.7 372.5 2668.5 343.5 2645.4 324C2622.1 304.3 2585.3 293.2 2531.9 293.2H2378.4C2375.5 293.2 2374.9 293.9 2374.8 294C2374.5 294.4 2373.6 295.8 2373.6 299.8V696.7C2373.6 704.4 2367.3 710.7 2359.6 710.7H2267.7C2260 710.7 2253.7 704.4 2253.7 696.7V265.6C2253.7 234.7 2258.8 212 2272.6 197.2C2286.5 182.2 2307.5 177.3 2334.2 177.3H2531.8C2620.7 177.3 2688 198.4 2733.3 238.9C2778.7 279.5 2800.5 338.6 2800.5 411.7V696.7C2800.5 704.4 2794.2 710.7 2786.5 710.7H2693.7C2686 710.7 2679.7 704.4 2679.7 696.7V411.6Z' fill='white'/%3E%3Cpath d='M3304.7 411.6C3304.7 372.5 3293.5 343.5 3270.4 324C3247.1 304.3 3210.3 293.2 3156.9 293.2H3003.4C3000.5 293.2 2999.9 293.9 2999.8 294C2999.5 294.4 2998.6 295.8 2998.6 299.8V696.7C2998.6 704.4 2992.3 710.7 2984.6 710.7H2892.7C2885 710.7 2878.7 704.4 2878.7 696.7V265.6C2878.7 234.7 2883.8 212 2897.6 197.2C2911.5 182.2 2932.5 177.3 2959.2 177.3H3156.8C3245.7 177.3 3313 198.4 3358.3 238.9C3403.7 279.5 3425.5 338.6 3425.5 411.7V696.7C3425.5 704.4 3419.2 710.7 3411.5 710.7H3318.7C3311 710.7 3304.7 704.4 3304.7 696.7V411.6Z' fill='white'/%3E%3Cpath d='M4906.1 292.2C4898.4 292.2 4892.1 298.5 4892.1 306.2V529.2C4892.1 557.5 4897.2 574.3 4906.4 584.1C4915.4 593.8 4930 598.6 4953.7 598.6H5019.2C5026.9 598.6 5033.2 604.9 5033.2 612.6V695.7C5033.2 703.4 5026.9 709.7 5019.2 709.7H4932.1C4877.9 709.7 4836.8 698.8 4809.7 668.6C4782.8 638.6 4771.3 591.5 4771.3 523.4V306.2C4771.3 298.5 4765 292.2 4757.3 292.2H4714.7C4707 292.2 4700.7 285.9 4700.7 278.2V190.2C4700.7 182.5 4707 176.2 4714.7 176.2H4757.3C4765 176.2 4771.3 169.9 4771.3 162.2V67.7002C4771.3 60.0002 4777.6 53.7002 4785.3 53.7002H4878.2C4885.9 53.7002 4892.2 60.0002 4892.2 67.7002V162.2C4892.2 169.9 4898.5 176.2 4906.2 176.2H5021.3C5029 176.2 5035.3 182.5 5035.3 190.2V278.2C5035.3 285.9 5029 292.2 5021.3 292.2H4906.1Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4024.4 607.2C4024.4 599.5 4018.1 593.2 4010.4 593.2H3699.9C3672.9 593.2 3655.3 586 3644.6 575.2C3633.8 564.4 3628.6 548.8 3628.6 529.7V514.5C3628.6 506.8 3634.9 500.5 3642.6 500.5H3866.6C3931.2 500.5 3977.4 486.9 4007.5 459.6C4037.7 432.2 4050.1 392.3 4050.1 343.5C4050.1 292.2 4036.8 250.1 4006.4 220.9C3976.1 191.7 3930.1 176.8 3867.7 176.8H3700.1C3633.9 176.8 3586.5 195.4 3555.6 227.8C3524.8 260.1 3511.8 305 3511.8 355.3V531.7C3511.8 582 3524.9 626.9 3555.6 659.2C3586.5 691.6 3633.9 710.2 3700.1 710.2H4010.6C4018.3 710.2 4024.6 703.9 4024.6 696.2V607.2H4024.4ZM3863.5 403.1H3642.5C3634.8 403.1 3628.5 396.8 3628.5 389.1V356.2C3628.5 337.6 3633.7 321.9 3644.6 311C3655.4 300.1 3672.9 292.7 3699.9 292.7H3866.5C3890.7 292.7 3906.9 298.8 3916.9 308.2C3926.9 317.5 3932 331.3 3932 349.4C3932 367.1 3927.3 380 3917.4 388.6C3907.4 397.4 3890.5 403.1 3863.5 403.1Z' fill='white'/%3E%3Cpath d='M2918.9 872.3C3001.9 872.3 3036.9 909.9 3036.9 966.3C3036.9 1012.2 3013.9 1036.8 2973.2 1047.2C3014.4 1058.2 3037.9 1083.7 3037.9 1129.7C3037.9 1186.1 3003.5 1224.7 2920.5 1224.7H2755.6C2741.5 1224.7 2734.2 1217.9 2734.2 1203.8V893.2C2734.2 879.1 2741.5 872.3 2755.6 872.3H2918.9ZM2765.4 1033.1H2918.9C2976.8 1033.1 3005 1014.8 3005 970.5C3005 929.8 2979.4 903.7 2919.4 903.7H2771.2C2767.5 903.7 2765.5 905.3 2765.5 909.4V1033.1H2765.4ZM2765.4 1187.6C2765.4 1191.8 2767.5 1193.3 2771.1 1193.3H2921C2979.5 1193.3 3006.1 1168.2 3006.1 1125.4C3006.1 1081 2976.9 1060.2 2921 1060.2H2765.5V1187.6H2765.4Z' fill='white'/%3E%3Cpath d='M3294 956.9V985.6H3182.8C3148.9 985.6 3135.3 1000.7 3135.3 1033.6V1224.6H3106.1V1029.9C3106.1 979.8 3125.4 956.8 3176.6 956.8H3294V956.9Z' fill='white'/%3E%3Cpath d='M3489.1 956.9C3562.2 956.9 3608.6 1001.3 3608.6 1091C3608.6 1181.3 3562.1 1224.6 3489.1 1224.6H3431.2C3357.6 1224.6 3311.7 1181.3 3311.7 1091C3311.7 1001.2 3357.6 956.9 3431.2 956.9H3489.1ZM3433.3 985.6C3374.3 985.6 3340.9 1019 3340.9 1091C3340.9 1163.5 3374.3 1196.4 3433.3 1196.4H3487.1C3546.1 1196.4 3579.5 1163.5 3579.5 1091C3579.5 1019 3546.1 985.6 3487.1 985.6H3433.3Z' fill='white'/%3E%3Cpath d='M3674.4 956.9L3706.8 1176.6C3709.4 1195.4 3716.2 1204.3 3737.1 1204.3C3758.5 1204.3 3767.4 1195.4 3771.5 1180.3L3821.6 995.5C3829.4 966.8 3849.3 951.7 3884.2 951.7C3919.1 951.7 3937.4 966.8 3945.3 995.5L3994.9 1180.3C3999.1 1195.4 4007.9 1204.3 4029.3 1204.3C4050.2 1204.3 4056.4 1195.4 4059.6 1176.6L4093.5 956.9H4125.3L4089.3 1179.8C4084.6 1210.6 4069.5 1231 4028.2 1231C3992.7 1231 3975 1216.4 3966.6 1185.1L3917 1000.9C3912.8 985.2 3900.8 978.5 3883.6 978.5C3865.9 978.5 3854.9 985.3 3850.7 1000.9L3799.6 1185.1C3790.7 1216.4 3773.5 1231 3737.5 1231C3695.2 1231 3682.2 1210.1 3677.5 1179.8L3643.1 956.9H3674.4Z' fill='white'/%3E%3Cpath d='M4417.6 956.9V985.6H4260C4219.8 985.6 4203.6 1003.3 4203.6 1032.1C4203.6 1057.2 4216.1 1077.5 4263.6 1077.5H4338.8C4410.8 1077.5 4428.6 1110.9 4428.6 1149.5C4428.6 1194.9 4404.6 1224.7 4344 1224.7H4178V1196.5H4344C4384.2 1196.5 4399.8 1178.2 4399.8 1149.5C4399.8 1124.4 4387.8 1103.6 4339.8 1103.6H4264.6C4193.1 1103.6 4174.8 1069.2 4174.8 1030C4174.8 985.1 4198.8 956.9 4259.4 956.9H4417.6Z' fill='white'/%3E%3Cpath d='M4685.4 956.9C4749.1 956.9 4775.7 986.6 4775.7 1036.8C4775.7 1084.8 4751.2 1111.4 4684.9 1111.4H4526.2V1135.9C4526.2 1170.3 4545 1196.4 4593.5 1196.4H4762.1V1224.6H4593.5C4524.6 1224.6 4497.5 1187.5 4497.5 1136.4V1045.1C4497.5 995 4524.6 956.9 4593.5 956.9H4685.4ZM4526.2 1087.4H4684.3C4729.7 1087.4 4746.9 1069.7 4746.9 1037.8C4746.9 1005.4 4728.6 985.6 4685.3 985.6H4593.4C4544.9 985.6 4526.1 1011.2 4526.1 1045.6V1087.4H4526.2Z' fill='white'/%3E%3Cpath d='M5040.3 956.9V985.6H4929.1C4895.2 985.6 4881.6 1000.7 4881.6 1033.6V1224.6H4852.4V1029.9C4852.4 979.8 4871.7 956.8 4922.9 956.8H5040.3V956.9Z' fill='white'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_879_362'%3E%3Crect width='5041' height='1231' fill='white' transform='translate(0 0.700195)'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A"},o5={loginPageLogo:n5},r5="200px",Ci=({logoSrc:t=o5.loginPageLogo.value,width:n=r5,className:e="logo"})=>c.jsx("img",{width:n,src:t,className:e,alt:"Login logo"}),q0=()=>c.jsx("span",{className:"spinner"});const yo=({Logo:t=Ci,text:n="Loading..."})=>c.jsx("div",{className:"system-loader-background",children:c.jsxs("div",{className:"system-loader-container flex flex-column ai-center",children:[c.jsx(t,{}),c.jsx("h1",{className:"system-loader-text io-title",children:n}),c.jsx(q0,{})]})});const J0=({children:t,description:n,heading:e,Image:o,title:r,className:i})=>c.jsxs("div",{className:it("info-card",i),children:[r&&c.jsx("h1",{className:"info-card-title io-title-large",children:r}),o&&c.jsx("div",{className:"info-card-image",children:c.jsx(o,{})}),e&&c.jsx("h3",{className:"info-card-heading io-title",children:e}),c.jsx("p",{className:"info-card-description io-text-default-lh16",children:n}),t]}),i5=({activeStepName:t,showWarnIcon:n,stepsStatuses:e})=>c.jsx("ul",{className:"setup-flow-list io-text-default-lh16",children:Xi.map(({name:o,label:r},i)=>{const a=o===t,s=e[o].state,l=n&&a?c.jsx(lt,{variant:"exclamation-mark",size:"12"}):c.jsxs("span",{children:[i+1,"."]});return c.jsx("li",{className:it(a&&"active"),children:c.jsxs("div",{className:"setup-flow-list-item",children:[c.jsxs("div",{className:"setup-flow-list-item-icon-wrapper",children:[s==="prompt"&&l,s==="granted"&&c.jsx(lt,{variant:"check-solid",size:"12"}),s==="denied"&&c.jsx(lt,{variant:"close",size:"12"})]}),r]})},o)})}),a5=({edgeNotificationsPermissionTimeout:t,isNotificationsPermissionPromptOpen:n})=>{const{name:e}=yC(),[o,r]=g.useState(!1);return g.useEffect(()=>{if(!n||e!=="Edge")return;const i=setTimeout(()=>r(!0),t);return()=>clearTimeout(i)},[e,t,n]),g.useEffect(()=>{n&&!o||r(!1)},[n,o,r]),{hasEdgeNotificationsPermissionError:o}},s5=(t,n)=>{const{type:e,payload:o}=n;switch(e){case"completed":return{...t,[o.stepName]:{...t[o.stepName],isCompleted:!0}};case"skipped":return{...t,[o.stepName]:{isCompleted:!0,state:"denied"}};case"stateUpdated":{if(!o.state)throw Error('"stateUpdated" action invoked without state in payload');return{...t,[o.stepName]:{isCompleted:o.stepName===rt.POPUPS?o.state==="granted":o.state!=="prompt",state:o.state}}}default:throw Error("Unknown action: "+e)}},c5=t=>{const{handleDeferredStep:n,handleOperationComplete:e}=t;window.getScreenDetails().catch(async()=>{const{state:o}=await navigator.permissions.query({name:uo.WINDOW_MANAGEMENT});o==="prompt"&&n()}).finally(e)},l5=t=>{const{handleDeferredStep:n,handleOperationComplete:e}=t;Notification.requestPermission().then(async()=>{const{state:o}=await navigator.permissions.query({name:uo.NOTIFICATIONS});o==="prompt"&&n()}).finally(e)},u5=t=>{const{handleDeferredStep:n,handleOperationComplete:e,dispatchAction:o}=t,r="about:blank",i="popup,width=1,height=1,top=9999,left=9999",a=window.open(r,void 0,i),s=window.open(r,void 0,i);a==null||a.close(),s==null||s.close();const l=!(a&&s);l&&n(),o({type:"stateUpdated",payload:{stepName:rt.POPUPS,state:l?"denied":"granted"}}),e()},d5=t=>{const{dispatchAction:n}=t;n({type:"completed",payload:{stepName:rt.PWA_INSTALL}})},f5={[rt.WINDOW_MANAGEMENT]:c5,[rt.NOTIFICATIONS]:l5,[rt.POPUPS]:u5,[rt.PWA_INSTALL]:d5},p5=({settings:t})=>{const{permission:n}=vo(),[e,o]=Tn("localStorage",wi,xi),[r,i]=g.useReducer(s5,C3),[a,s]=g.useState(!1),[l,u]=g.useState(!1),f=Xi.find(y=>!r[y.name].isCompleted);if(!f)throw new Error("All setup steps are completed. The SetupSteps component should not be used in such case.");const d=f.name,p=Xi[Xi.length-1].name,{hasEdgeNotificationsPermissionError:h}=a5({edgeNotificationsPermissionTimeout:t.edgeNotificationsPermissionTimeout,isNotificationsPermissionPromptOpen:l&&d===uo.NOTIFICATIONS}),m=()=>{s(!1),u(!0),f5[d]({handleDeferredStep:()=>s(!0),handleOperationComplete:()=>u(!1),dispatchAction:y=>i(y)}),d===p&&o({isCompleted:!0})},v=()=>{s(!1),i({type:"skipped",payload:{stepName:d}})};return g.useEffect(()=>{h&&(u(!1),s(!0))},[h]),g.useEffect(()=>{var y,w;s(!1),i({type:"stateUpdated",payload:{stepName:rt.WINDOW_MANAGEMENT,state:cs?(y=n.statuses[rt.WINDOW_MANAGEMENT])==null?void 0:y.state:"denied"}}),i({type:"stateUpdated",payload:{stepName:rt.NOTIFICATIONS,state:(w=n.statuses[rt.NOTIFICATIONS])==null?void 0:w.state}})},[n.statuses]),c.jsxs(J0,{description:f.description,heading:f.heading,Image:f.Image,title:"Platform Setup",children:[c.jsx(i5,{activeStepName:d,showWarnIcon:a&&d!==rt.POPUPS,stepsStatuses:r}),c.jsx("p",{className:"io-text-default-lh16",children:a?f.instructions.additional:f.instructions.initial}),c.jsxs(Be,{children:[c.jsx(Ca,{className:"io-btn io-btn-lg io-btn-primary setup-flow-btn",disabled:l,onClick:m,children:f.actionBtnText}),d!==p&&d!==rt.WINDOW_MANAGEMENT&&c.jsx(Ca,{className:"io-btn io-btn-lg io-btn-outline setup-flow-btn",disabled:l,onClick:v,children:"Skip"})]}),l&&c.jsx(q0,{})]})};const mu=({components:{Logo:t=Ci,Loader:n=yo}={},settings:e={}})=>{const{permission:o}=vo();return o.isLoading?c.jsx(n,{text:"Checking browser permissions..."}):c.jsx(Z0,{Logo:t,children:c.jsx(p5,{settings:{...v3,...e}})})};const gu=({errorMessage:t})=>{const n="https://support.interop.io",e=c.jsxs(c.Fragment,{children:["It seems that the following error prevents io.Connect Browser",c.jsx("br",{}),"from operating properly:",c.jsxs("span",{className:"browser-start-failed-error",children:["“",t,"”"]}),c.jsxs("span",{className:"help-center-info",children:["For further assistance, visit our"," ",c.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:"help center"}),"."]}),c.jsx("span",{className:"thank-you",children:"Thank you for your cooperation."})]});return c.jsx(Z0,{Logo:Ci,children:c.jsx(J0,{className:"io-init-error-card",heading:"Oops! io.Connect Browser couldn't start...",description:e,Image:g3,children:c.jsx(Ca,{className:"io-btn io-btn-lg io-btn-primary",onClick:()=>window.open(n,"_blank","noopener,noreferrer"),children:"Visit the interop.io Help Center"})})})},X0=()=>c.jsxs(c.Fragment,{children:[c.jsx(Nn,{tag:"h1",className:"login-title",text:"Making Your Work Flow",size:"large"}),c.jsxs("p",{className:"io-text-default-lh16 login-description",children:["Integrate apps, simplify user experiences and accelerate",c.jsx("br",{}),"digital transformation."]})]}),Q0=({Logo:t,children:n,className:e})=>c.jsx("div",{className:"login-page-background",children:c.jsxs("div",{className:it(e,"login-form-container flex flex-column ai-center"),children:[c.jsx(t,{}),n]})}),h5=({onLogin:t,isLoading:n,validationError:e,components:{Logo:o=Ci,Heading:r=X0,Loader:i=yo}={}})=>n?c.jsx(i,{text:"Verifying credentials..."}):c.jsxs(Q0,{Logo:o,children:[c.jsx(r,{}),c.jsx(Je,{className:"auth0-login-btn",onClick:t,size:"large",variant:"primary",children:"Log In"}),e&&c.jsx(vv,{variant:"critical",text:e.message})]}),yf=(t,n)=>{const e=n.value,o=e.trim().length>3;return{value:e,isValid:o}},m5=({onLogin:t,setIsLoading:n,loginError:e,setLoginError:o,userInputName:r="email"})=>{const[i,a]=g.useReducer(yf,{value:"",isValid:!1}),[s,l]=g.useReducer(yf,{value:"",isValid:!1}),[u,f]=g.useState(!1),[d,p]=g.useState(!1),{isValid:h}=i,{isValid:m}=s,v=h&&m,y=E=>a({value:E.target.value}),w=E=>l({value:E.target.value}),k=()=>{h||f(!0)},x=()=>{m||p(!0)},b=async E=>{if(E.preventDefault(),!!v){n(!0);try{await t(i.value,s.value)}catch(j){o(j)}n(!1)}};return c.jsxs("form",{className:"simple-login-form",onSubmit:b,children:[c.jsx(Fo,{id:"user",errorMessage:u?`The ${r} is too short`:void 0,autoFocus:!0,autoComplete:"off",type:"text",placeholder:`Enter your ${r}`,value:i.value,onChange:y,onBlur:k,onFocus:()=>f(!1)}),c.jsx(Fo,{id:"password",errorMessage:d?"The password is too short":void 0,autoComplete:"off",type:"password",placeholder:"Enter your password",value:s.value,onChange:w,onBlur:x,onFocus:()=>p(!1)}),c.jsx(Je,{type:"submit",size:"large",variant:"primary",children:"Log In"}),e&&c.jsxs("div",{className:"login-error-feedback",children:[c.jsx(lt,{className:"error-icon",variant:"close",size:"12"}),e.message]})]})};const g5=({onLogin:t,userInputName:n,components:{Logo:e=Ci,Heading:o=X0,Loader:r=yo}={}})=>{const[i,a]=g.useState(!1),[s,l]=g.useState(null);return i?c.jsx(r,{text:"Verifying credentials..."}):c.jsxs(Q0,{Logo:e,children:[c.jsx(o,{}),c.jsx(m5,{onLogin:t,setIsLoading:a,loginError:s,setLoginError:l,userInputName:n})]})};function v5(t,n){const[e,o]=g.useState(!0),r=g.useContext(_e.IOConnectContext);return g.useEffect(()=>{let i;return(async()=>{if(!r.workspaces)return;let a;try{a=await r.workspaces.getWorkspaceById(t)}catch(l){console.warn(l);return}const s=a.getAllGroups().find(l=>l.id===n);s&&(i=await s.onLockConfigurationChanged(({showAddWindowButton:l})=>{l!==void 0&&o(l)}),o(!!s.showAddWindowButton))})(),()=>i==null?void 0:i()},[t,n,r.workspaces]),e}const y5=({groupId:t,workspaceId:n})=>{const e=v5(n,t),o=g.useCallback(r=>{pr.showAddApplicationPopup({bounds:r,groupId:t,workspaceId:n})},[t,n]);return e&&c.jsx(pr.AddWindowButton,{title:"Add App",visible:e,showPopup:o})},b5=t=>c.jsx(pr.GroupHeaderButtons,{...t,addWindow:{visible:!1,showPopup:t.addWindow.showPopup}}),w5=()=>null;const ev=({className:t,components:n,onClose:e,title:o})=>{const{NotificationsProvider:r,NotificationsPanelProvider:i,SettingsPanel:a}=Ml;return c.jsx(r,{children:c.jsx(i,{children:c.jsx(a,{className:t,components:n,onClose:e,title:o})})})};const tv=vw.Panel;const nv=({className:t,components:n,onClose:e,title:o})=>{const r=g.useContext(_e.IOConnectContext),{onLogout:i}=_0(),[a,s]=Tn("sessionStorage",e0,t0),{login:{setIsLoggingOut:l}}=vo(),u=g.useCallback(async()=>{var f;if("modals"in r&&r.modals){const d="log-out",{isEnterPressed:p,responseButtonClicked:h}=await r.modals.dialogs.request({templateName:Nr.NO_INPUTS_CONFIRMATION_DIALOG,variables:{heading:"Logging out of io.Connect Browser",text:"This will terminate your session.",actionButtons:[{variant:"primary",text:"Log out",id:d,autofocus:!0},{variant:"outline",text:"Cancel",id:"cancel"}]}});if(!(p||(h==null?void 0:h.id)===d))return}oo.flushSync(()=>l(!0)),s(null),await((f=r.webPlatform)==null?void 0:f.system.shutdown());try{i==null||i()}catch(d){console.error(d)}},[r,i]);return c.jsx(pw.Panel,{className:t,components:n,onClose:e,onLogout:u,title:o})},x5=[{name:"platformPreferences",displayName:"Platform Preferences",icon:"cog",onClick:t=>t(tv)},{name:"notificationSettings",displayName:"Notification Settings",icon:"bell",onClick:t=>t(ev),separatorAfter:!0},{name:"profile",displayName:"Profile",icon:"user",onClick:t=>t(nv)}],C5=t=>({onClose:n})=>c.jsx(t,{className:"system-menu-panel",onClose:n});const ov=({actions:t,panelWrapperClassName:n})=>{const[e,o]=g.useState(),r=g.useRef(null),i=d0(),a=g.useCallback(()=>o(void 0),[]),s=!!e;g.useEffect(()=>{!s||i!=="Escape"||a()},[s,i]);const l=g.useCallback((u,f)=>{const d=t.find(({name:h})=>h===f.name);if(!d){console.error(`Action named ${f.name} is not part of the provided list of actions: ${JSON.stringify(t)}!`);return}const p=h=>{const m=C5(h);o(()=>m)};d.onClick(p)},[t]);return nu({eventType:"mouseup",handler:a,ref:r,skip:!s}),tu({handler:a,skip:!s}),c.jsxs(c.Fragment,{children:[c.jsx(au,{buttonSize:"32",iconSize:"16",actions:t,onActionItemClick:l,icon:"ellipsis-vertical",buttonVariant:"circle",placement:"bottom-end",offset:[0,8],"data-testid":"system-menu-button",contextMenuDataTestId:"system-menu"}),c.jsx(R0,{className:it("system-menu-panel-wrapper",n),isOpen:s,onClose:a,Panel:e,position:"right",ref:r})]})},S5=()=>c.jsx("li",{className:"default-header-system-menu",children:c.jsx(ov,{actions:x5})}),k5=()=>{const{showNotificationBadge:t}=bC(),n=u0(),o=g.useMemo(()=>n.filter(({state:r})=>r==="Active"||r==="Stale"),[n]).length;return o>0&&t?c.jsx("div",{className:"io-badge io-badge-primary notifications-badge",children:o<100?o:"99+"}):null};const rv=t=>{const{className:n,active:e,...o}=t;return c.jsxs("div",{className:it(n,"notifications-panel-button"),...o,children:[c.jsx(Ge,{icon:"bell",size:"32",iconSize:"16",variant:"circle"}),c.jsx(k5,{})]})},iv=({className:t,components:n,onClose:e,settings:o,title:r})=>{const{NotificationsProvider:i,NotificationsPanelProvider:a,Panel:s}=Ml;return c.jsx(i,{children:c.jsx(a,{children:c.jsx(s,{className:t,components:n,onClose:e,settings:o,title:r})})})},av=({Button:t=rv,Panel:n=iv,position:e="right",...o})=>{const r=u0(),i=g.useContext(_e.IOConnectContext),a=g.useCallback(async()=>{await Promise.all(r.map(({id:s})=>i.notifications.setState(s,"Seen")))},[r]);return c.jsx(cu,{Button:t,Panel:n,position:e,onClose:a,...o})};const E5=()=>c.jsxs(c.Fragment,{children:[c.jsx(av,{tag:"li"}),c.jsx(S5,{})]}),vu=({onLogout:t,workspaces:n,launchpad:e,Loader:o=yo,isBeforeunloadDialogEnabled:r})=>{var v,y,w,k;const{LogoComponent:i,SystemButtonsComponent:a}=((v=n==null?void 0:n.components)==null?void 0:v.header)??{},{setPlatformWindow:s}=ou(),{isInitialSetupCompleted:l}=kh(),u=(y=window.iobrowser)==null?void 0:y.platformStarted,f=i??(u?F0:w5),d=a??(u?E5:void 0),p=mC(),{login:{isLoggingOut:h}}=vo();Dx(r===!1||h),g.useEffect(()=>{u&&s({name:window.name})},[u,s]);const m=g.useMemo(()=>({onLogout:t,launchpadSettings:e==null?void 0:e.settings,launchpadComponents:e==null?void 0:e.components}),[t,e==null?void 0:e.settings,e==null?void 0:e.components]);return c.jsxs(M0.Provider,{value:m,children:[(!p||!l)&&c.jsx(o,{text:"Loading io.Connect Home..."}),c.jsx(pr,{components:{...n==null?void 0:n.components,header:{...(w=n==null?void 0:n.components)==null?void 0:w.header,LogoComponent:f,SystemButtonsComponent:d},groupHeader:{AfterTabsComponent:y5,ButtonsComponent:b5,...(k=n==null?void 0:n.components)==null?void 0:k.groupHeader}}})]})},j5=ot({id:Ht,username:Le(Ht),email:Le(Ht),firstName:Le(Ht),lastName:Le(Ht),token:Le(Ht),password:Le(Ht)}),O5=({config:t})=>{var w,k,x,b;const{setupFlow:n,login:e,workspaces:o,launchpad:r,getIOConnectConfig:i}=t,[a,s]=Tn("localStorage",Yx,j5),[l]=Tn("localStorage",wi,xi),[u,f]=g.useState(null),{login:{isLoggingOut:d}}=vo(),p=eu(),h=((w=t.components)==null?void 0:w.SystemLoader)??yo,m=((k=t.components)==null?void 0:k.IOInitErrorScreen)??gu,v=g.useCallback(async(E,j)=>{const B=await e.onLogin(E,j);s(B)},[e,s]),y=g.useCallback(()=>{var E;(E=e.onLogout)==null||E.call(e),s(null),window.location.reload()},[e.onLogout,s]);return d?c.jsx(h,{text:"Logging out..."}):a?!(l!=null&&l.isCompleted)&&(n==null?void 0:n.enabled)!==!1&&!p?c.jsx(mu,{settings:n==null?void 0:n.settings,components:{...n==null?void 0:n.components,Loader:h}}):u&&!u.message.includes("has already been started")?c.jsx(m,{errorMessage:u.message}):c.jsx(_e.IOConnectProvider,{settings:i({type:"simple",user:a}),onInitError:f,fallback:c.jsx(h,{text:"Initializing the platform..."}),children:c.jsx(Za,{launchpadMode:(x=r==null?void 0:r.settings)==null?void 0:x.mode,children:c.jsx(vu,{workspaces:o,launchpad:r,onLogout:y,isBeforeunloadDialogEnabled:(b=t.settings)==null?void 0:b.isBeforeunloadDialogEnabled,Loader:h})})}):c.jsx(g5,{onLogin:v,userInputName:e.userInputName,components:{...e.components,Loader:h}})},N5=ot({message:Ht}),I5=t=>{const n=K0(),[e,o]=g.useState(void 0),[r,i]=Tn("sessionStorage",Vx,N5),a=g.useMemo(()=>n.user?(t==null?void 0:t(n.user))??{ok:!0}:null,[n.user,t]),s=(a==null?void 0:a.ok)===!1,l=n.isLoading||n.isAuthenticated&&!e,u=s||l,f=g.useMemo(()=>{var d;return a!=null&&a.ok&&((d=n.user)!=null&&d.email)&&e?{username:n.user.name,id:n.user.email,token:e}:null},[n.user,e,a==null?void 0:a.ok]);return g.useEffect(()=>{n.isAuthenticated&&n.getAccessTokenSilently().then(o).catch(console.warn)},[n]),g.useEffect(()=>{if(a){if(a.ok){i(null);return}i({message:a.message}),n.logout()}},[n,i,a]),{isLoading:u,validationError:r,user:f}},tl={POPUP:"popup",REDIRECT:"redirect"},P5=({config:t})=>{var x,b,E,j;const n=K0(),{setupFlow:e,login:o,launchpad:r,workspaces:i,getIOConnectConfig:a}=t,{isLoading:s,validationError:l,user:u}=I5(o.validateUser),d=(o.loginType??tl.REDIRECT)===tl.REDIRECT?n.loginWithRedirect:n.loginWithPopup,[p]=Tn("localStorage",wi,xi),[h,m]=g.useState(null),{login:{isLoggingOut:v}}=vo(),y=eu(),w=((x=t.components)==null?void 0:x.SystemLoader)??yo,k=((b=t.components)==null?void 0:b.IOInitErrorScreen)??gu;return v?c.jsx(w,{text:"Logging out..."}):u?!(p!=null&&p.isCompleted)&&(e==null?void 0:e.enabled)!==!1&&!y?c.jsx(mu,{settings:e==null?void 0:e.settings,components:{...e==null?void 0:e.components,Loader:w}}):h&&!h.message.includes("has already been started")?c.jsx(k,{errorMessage:h.message}):c.jsx(_e.IOConnectProvider,{settings:a({type:"auth0",user:{...n.user,id:u.id,token:u.token}}),onInitError:m,fallback:c.jsx(w,{text:"Initializing the platform..."}),children:c.jsx(Za,{launchpadMode:(E=r==null?void 0:r.settings)==null?void 0:E.mode,children:c.jsx(vu,{workspaces:i,launchpad:r,onLogout:n.logout,isBeforeunloadDialogEnabled:(j=t.settings)==null?void 0:j.isBeforeunloadDialogEnabled,Loader:w})})}):c.jsx(h5,{onLogin:d,isLoading:s,validationError:l,components:{...o.components,Loader:w}})},bf=({config:t})=>{var v,y,w,k;const{setupFlow:n,launchpad:e,workspaces:o,getIOConnectConfig:r}=t,{onLogout:i,user:a}=t.login??{},{isPlatformWindow:s}=ou(),[l]=Tn("localStorage",wi,xi),[u,f]=g.useState(null),{login:{isLoggingOut:d}}=vo(),p=eu(),h=((v=t.components)==null?void 0:v.SystemLoader)??yo,m=((y=t.components)==null?void 0:y.IOInitErrorScreen)??gu;return d?c.jsx(h,{text:"Logging out..."}):!(l!=null&&l.isCompleted)&&(n==null?void 0:n.enabled)!==!1&&s&&!p?c.jsx(mu,{settings:n==null?void 0:n.settings,components:{...n==null?void 0:n.components,Loader:h}}):u&&!u.message.includes("has already been started")?c.jsx(m,{errorMessage:u.message}):c.jsx(_e.IOConnectProvider,{settings:r({type:"custom",user:a}),onInitError:f,fallback:c.jsx(h,{text:"Initializing the platform..."}),children:c.jsx(Za,{launchpadMode:(w=e==null?void 0:e.settings)==null?void 0:w.mode,children:c.jsx(vu,{workspaces:o,launchpad:e,onLogout:i,isBeforeunloadDialogEnabled:(k=t.settings)==null?void 0:k.isBeforeunloadDialogEnabled,Loader:h})})})},sv=ot({Logo:Le(Dt().andThen(t=>tn(t,"Logo"))),Heading:Le(Dt().andThen(t=>tn(t,"Heading")))}),A5=fi(...Object.values(tl).map(t=>po(t))),T5=ot({type:po("auth0"),validateUser:Le(Dt().andThen(t=>tn(t,"validateUser"))),loginType:Le(A5),providerOptions:Dt(),components:Le(sv)}),D5=ot({type:po("simple"),onLogin:Dt().andThen(t=>tn(t,"onLogin")),onLogout:Le(Dt().andThen(t=>tn(t,"onLogout"))),userInputName:Le(Ht),components:Le(sv)}),M5=ot({id:Ht,username:Ht}),_5=ot({type:po("custom"),onLogout:Dt().andThen(t=>tn(t,"onLogout")),user:M5}),L5=fi(T5,D5,_5),R5=ot({edgeNotificationsPermissionTimeout:Le(iC)}),F5=ot({Logo:Le(Dt().andThen(t=>tn(t,"Logo")))}),B5=ot({enabled:Le(Sr()),components:Le(F5),settings:Le(R5)}),H5=ot({components:Le(Dt())}),$5=ot({BeforeSearch:fi(po(null),Le(Dt().andThen(t=>tn(t,"BeforeSearch")))),AfterSearch:fi(po(null),Le(Dt().andThen(t=>tn(t,"AfterSearch"))))}),W5=ot({Component:Dt().andThen(t=>tn(t,"Component")),placementId:Ht}),z5=ot({header:Le($5),sections:Le(oC(W5))}),U5=ot({showHeader:Le(Sr()),showSearch:Le(Sr())}),V5=ot({header:Le(U5),mode:Le(fi(po("pinned"),po("default")))}),Y5=ot({components:Le(z5),settings:Le(V5)}),G5=ot({SystemLoader:Le(Dt().andThen(t=>tn(t,"SystemLoader"))),IOInitErrorScreen:Le(Dt().andThen(t=>tn(t,"IOInitErrorScreen")))}),K5=ot({isBeforeunloadDialogEnabled:Le(Sr())}),Z5=ot({getIOConnectConfig:Dt().andThen(t=>tn(t,"getIOConnectConfig")),login:Le(L5),setupFlow:Le(B5),workspaces:Le(H5),launchpad:Le(Y5),components:Le(G5),settings:Le(K5)}),q5=({config:t})=>{var i;const n=g.useMemo(()=>Z5.runWithException(t),[t]),e=n.login,{isPlatformWindow:o}=ou();if(!e||!o){const{login:a,...s}=n;return c.jsx(bf,{config:s})}if(e.type==="custom")return c.jsx(bf,{config:n});if(e.type==="simple")return c.jsx(O5,{config:n});const{providerOptions:r}=e;return c.jsx(t5,{...r,authorizationParams:{...r.authorizationParams,redirect_uri:((i=r.authorizationParams)==null?void 0:i.redirect_uri)??window.location.origin},children:c.jsx(P5,{config:n})})};const J5=({config:t})=>c.jsx(d3,{children:c.jsx(q5,{config:t})});exports.ApplicationsSection=y0;exports.FavoritesSection=b0;exports.IOActivePanelRenderer=gw;exports.IOConnectHome=J5;exports.IODownloadManager=Ky;exports.IONotifications=Ml;exports.Launchpad=D0;exports.LaunchpadAccess=F0;exports.LaunchpadBody=T0;exports.LaunchpadContentsContainer=E0;exports.LaunchpadHeader=O0;exports.LaunchpadPinButton=j0;exports.NotificationSettingsPanel=ev;exports.NotificationsPanel=iv;exports.NotificationsPanelButton=rv;exports.NotificationsPanelWithToggleButton=av;exports.PanelWithToggleButton=cu;exports.PlatformPrefsProvider=Za;exports.PreferencesPanel=tv;exports.ProfilePanel=nv;exports.Section=ss;exports.SystemLoader=yo;exports.SystemMenu=ov;exports.WorkspacesSection=N0;exports.useFavorites=rs;exports.useIsLaunchpadCollapsed=Ql;exports.usePlatformPref=Xt;exports.usePlatformPrefs=kh;
68
+ `)})(),n.cache&&n.cacheLocation&&console.warn("Both `cache` and `cacheLocation` options have been specified in the Auth0Client configuration; ignoring `cacheLocation` and using `cache`."),n.cache)o=n.cache;else{if(e=n.cacheLocation||"memory",!vf(e))throw new Error(`Invalid cache location "${e}"`);o=vf(e)()}this.httpTimeoutMs=n.httpTimeoutInSeconds?1e3*n.httpTimeoutInSeconds:1e4,this.cookieStorage=n.legacySameSiteCookie===!1?tr:U3,this.orgHintCookieName=`auth0.${this.options.clientId}.organization_hint`,this.isAuthenticatedCookieName=(a=>`auth0.${a}.is.authenticated`)(this.options.clientId),this.sessionCheckExpiryDays=n.sessionCheckExpiryDays||1;const r=n.useCookiesForTransactions?this.cookieStorage:V3;var i;this.scope=Wr("openid",this.options.authorizationParams.scope,this.options.useRefreshTokens?"offline_access":""),this.transactionManager=new H3(r,this.options.clientId,this.options.cookieDomain),this.nowProvider=this.options.nowProvider||U0,this.cacheManager=new B3(o,o.allKeys?void 0:new K3(o,this.options.clientId),this.nowProvider),this.domainUrl=(i=this.options.domain,/^https?:\/\//.test(i)?i:`https://${i}`),this.tokenIssuer=((a,s)=>a?a.startsWith("https://")?a:`https://${a}/`:`${s}/`)(this.options.issuer,this.domainUrl),typeof window<"u"&&window.Worker&&this.options.useRefreshTokens&&e==="memory"&&(this.options.workerUrl?this.worker=new Worker(this.options.workerUrl):this.worker=new G3)}_url(n){const e=encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client||z0)));return`${this.domainUrl}${n}&auth0Client=${e}`}_authorizeUrl(n){return this._url(`/authorize?${ol(n)}`)}async _verifyIdToken(n,e,o){const r=await this.nowProvider();return W3({iss:this.tokenIssuer,aud:this.options.clientId,id_token:n,nonce:e,organization:o,leeway:this.options.leeway,max_age:(i=this.options.authorizationParams.max_age,typeof i!="string"?i:parseInt(i,10)||void 0),now:r});var i}_processOrgHint(n){n?this.cookieStorage.save(this.orgHintCookieName,n,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}):this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain})}async _prepareAuthorizeUrl(n,e,o){const r=ff(qs()),i=ff(qs()),a=qs(),s=(f=>{const d=new Uint8Array(f);return(p=>{const h={"+":"-","/":"_","=":""};return p.replace(/[+/=]/g,m=>h[m])})(window.btoa(String.fromCharCode(...Array.from(d))))})(await(async f=>await na().subtle.digest({name:"SHA-256"},new TextEncoder().encode(f)))(a)),l=((f,d,p,h,m,v,y,x)=>Object.assign(Object.assign(Object.assign({client_id:f.clientId},f.authorizationParams),p),{scope:Wr(d,p.scope),response_type:"code",response_mode:x||"query",state:h,nonce:m,redirect_uri:y||f.authorizationParams.redirect_uri,code_challenge:v,code_challenge_method:"S256"}))(this.options,this.scope,n,r,i,s,n.redirect_uri||this.options.authorizationParams.redirect_uri||o,e==null?void 0:e.response_mode),u=this._authorizeUrl(l);return{nonce:i,code_verifier:a,scope:l.scope,audience:l.audience||"default",redirect_uri:l.redirect_uri,state:r,url:u}}async loginWithPopup(n,e){var o;if(n=n||{},!(e=e||{}).popup&&(e.popup=(s=>{const l=window.screenX+(window.innerWidth-400)/2,u=window.screenY+(window.innerHeight-600)/2;return window.open(s,"auth0:authorize:popup",`left=${l},top=${u},width=400,height=600,resizable,scrollbars=yes,status=1`)})(""),!e.popup))throw new Error("Unable to open a popup for loginWithPopup - window.open returned `null`");const r=await this._prepareAuthorizeUrl(n.authorizationParams||{},{response_mode:"web_message"},window.location.origin);e.popup.location.href=r.url;const i=await(s=>new Promise((l,u)=>{let f;const d=setInterval(()=>{s.popup&&s.popup.closed&&(clearInterval(d),clearTimeout(p),window.removeEventListener("message",f,!1),u(new gu(s.popup)))},1e3),p=setTimeout(()=>{clearInterval(d),u(new mu(s.popup)),window.removeEventListener("message",f,!1)},1e3*(s.timeoutInSeconds||60));f=function(h){if(h.data&&h.data.type==="authorization_response"){if(clearTimeout(p),clearInterval(d),window.removeEventListener("message",f,!1),s.popup.close(),h.data.response.error)return u(At.fromPayload(h.data.response));l(h.data.response)}},window.addEventListener("message",f)}))(Object.assign(Object.assign({},e),{timeoutInSeconds:e.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}));if(r.state!==i.state)throw new At("state_mismatch","Invalid state");const a=((o=n.authorizationParams)===null||o===void 0?void 0:o.organization)||this.options.authorizationParams.organization;await this._requestToken({audience:r.audience,scope:r.scope,code_verifier:r.code_verifier,grant_type:"authorization_code",code:i.code,redirect_uri:r.redirect_uri},{nonceIn:r.nonce,organization:a})}async getUser(){var n;const e=await this._getIdTokenFromCache();return(n=e==null?void 0:e.decodedToken)===null||n===void 0?void 0:n.user}async getIdTokenClaims(){var n;const e=await this._getIdTokenFromCache();return(n=e==null?void 0:e.decodedToken)===null||n===void 0?void 0:n.claims}async loginWithRedirect(n={}){var e;const o=yf(n),{openUrl:r,fragment:i,appState:a}=o,s=Cn(o,["openUrl","fragment","appState"]),l=((e=s.authorizationParams)===null||e===void 0?void 0:e.organization)||this.options.authorizationParams.organization,u=await this._prepareAuthorizeUrl(s.authorizationParams||{}),{url:f}=u,d=Cn(u,["url"]);this.transactionManager.create(Object.assign(Object.assign(Object.assign({},d),{appState:a}),l&&{organization:l}));const p=i?`${f}#${i}`:f;r?await r(p):window.location.assign(p)}async handleRedirectCallback(n=window.location.href){const e=n.split("?").slice(1);if(e.length===0)throw new Error("There are no query params available for parsing.");const{state:o,code:r,error:i,error_description:a}=(d=>{d.indexOf("#")>-1&&(d=d.substring(0,d.indexOf("#")));const p=new URLSearchParams(d);return{state:p.get("state"),code:p.get("code")||void 0,error:p.get("error")||void 0,error_description:p.get("error_description")||void 0}})(e.join("")),s=this.transactionManager.get();if(!s)throw new At("missing_transaction","Invalid state");if(this.transactionManager.remove(),i)throw new hu(i,a||i,o,s.appState);if(!s.code_verifier||s.state&&s.state!==o)throw new At("state_mismatch","Invalid state");const l=s.organization,u=s.nonce,f=s.redirect_uri;return await this._requestToken(Object.assign({audience:s.audience,scope:s.scope,code_verifier:s.code_verifier,grant_type:"authorization_code",code:r},f?{redirect_uri:f}:{}),{nonceIn:u,organization:l}),{appState:s.appState}}async checkSession(n){if(!this.cookieStorage.get(this.isAuthenticatedCookieName)){if(!this.cookieStorage.get("auth0.is.authenticated"))return;this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove("auth0.is.authenticated")}try{await this.getTokenSilently(n)}catch{}}async getTokenSilently(n={}){var e;const o=Object.assign(Object.assign({cacheMode:"on"},n),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),n.authorizationParams),{scope:Wr(this.scope,(e=n.authorizationParams)===null||e===void 0?void 0:e.scope)})}),r=await((i,a)=>{let s=Xs[a];return s||(s=i().finally(()=>{delete Xs[a],s=null}),Xs[a]=s),s})(()=>this._getTokenSilently(o),`${this.options.clientId}::${o.authorizationParams.audience}::${o.authorizationParams.scope}`);return n.detailedResponse?r:r==null?void 0:r.access_token}async _getTokenSilently(n){const{cacheMode:e}=n,o=Cn(n,["cacheMode"]);if(e!=="off"){const r=await this._getEntryFromCache({scope:o.authorizationParams.scope,audience:o.authorizationParams.audience||"default",clientId:this.options.clientId});if(r)return r}if(e!=="cache-only"){if(!await(async(r,i=3)=>{for(let a=0;a<i;a++)if(await r())return!0;return!1})(()=>Qs.acquireLock("auth0.lock.getTokenSilently",5e3),10))throw new mi;try{if(window.addEventListener("pagehide",this._releaseLockOnPageHide),e!=="off"){const u=await this._getEntryFromCache({scope:o.authorizationParams.scope,audience:o.authorizationParams.audience||"default",clientId:this.options.clientId});if(u)return u}const r=this.options.useRefreshTokens?await this._getTokenUsingRefreshToken(o):await this._getTokenFromIFrame(o),{id_token:i,access_token:a,oauthTokenScope:s,expires_in:l}=r;return Object.assign(Object.assign({id_token:i,access_token:a},s?{scope:s}:null),{expires_in:l})}finally{await Qs.releaseLock("auth0.lock.getTokenSilently"),window.removeEventListener("pagehide",this._releaseLockOnPageHide)}}}async getTokenWithPopup(n={},e={}){var o;const r=Object.assign(Object.assign({},n),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),n.authorizationParams),{scope:Wr(this.scope,(o=n.authorizationParams)===null||o===void 0?void 0:o.scope)})});return e=Object.assign(Object.assign({},T3),e),await this.loginWithPopup(r,e),(await this.cacheManager.get(new kn({scope:r.authorizationParams.scope,audience:r.authorizationParams.audience||"default",clientId:this.options.clientId}))).access_token}async isAuthenticated(){return!!await this.getUser()}_buildLogoutUrl(n){n.clientId!==null?n.clientId=n.clientId||this.options.clientId:delete n.clientId;const e=n.logoutParams||{},{federated:o}=e,r=Cn(e,["federated"]),i=o?"&federated":"";return this._url(`/v2/logout?${ol(Object.assign({clientId:n.clientId},r))}`)+i}async logout(n={}){const e=yf(n),{openUrl:o}=e,r=Cn(e,["openUrl"]);n.clientId===null?await this.cacheManager.clear():await this.cacheManager.clear(n.clientId||this.options.clientId),this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(this.isAuthenticatedCookieName,{cookieDomain:this.options.cookieDomain}),this.userCache.remove("@@user@@");const i=this._buildLogoutUrl(r);o?await o(i):o!==!1&&window.location.assign(i)}async _getTokenFromIFrame(n){const e=Object.assign(Object.assign({},n.authorizationParams),{prompt:"none"}),o=this.cookieStorage.get(this.orgHintCookieName);o&&!e.organization&&(e.organization=o);const{url:r,state:i,nonce:a,code_verifier:s,redirect_uri:l,scope:u,audience:f}=await this._prepareAuthorizeUrl(e,{response_mode:"web_message"},window.location.origin);try{if(window.crossOriginIsolated)throw new At("login_required","The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");const d=n.timeoutInSeconds||this.options.authorizeTimeoutInSeconds;let p;try{p=new URL(this.domainUrl).origin}catch{p=this.domainUrl}const h=await((v,y,x=60)=>new Promise((S,b)=>{const w=window.document.createElement("iframe");w.setAttribute("width","0"),w.setAttribute("height","0"),w.style.display="none";const E=()=>{window.document.body.contains(w)&&(window.document.body.removeChild(w),window.removeEventListener("message",j,!1))};let j;const _=setTimeout(()=>{b(new mi),E()},1e3*x);j=function(M){if(M.origin!=y||!M.data||M.data.type!=="authorization_response")return;const F=M.source;F&&F.close(),M.data.response.error?b(At.fromPayload(M.data.response)):S(M.data.response),clearTimeout(_),window.removeEventListener("message",j,!1),setTimeout(E,2e3)},window.addEventListener("message",j,!1),window.document.body.appendChild(w),w.setAttribute("src",v)}))(r,p,d);if(i!==h.state)throw new At("state_mismatch","Invalid state");const m=await this._requestToken(Object.assign(Object.assign({},n.authorizationParams),{code_verifier:s,code:h.code,grant_type:"authorization_code",redirect_uri:l,timeout:n.authorizationParams.timeout||this.httpTimeoutMs}),{nonceIn:a,organization:e.organization});return Object.assign(Object.assign({},m),{scope:u,oauthTokenScope:m.scope,audience:f})}catch(d){throw d.error==="login_required"&&this.logout({openUrl:!1}),d}}async _getTokenUsingRefreshToken(n){const e=await this.cacheManager.get(new kn({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId}));if(!(e&&e.refresh_token||this.worker)){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(n);throw new fs(n.authorizationParams.audience||"default",n.authorizationParams.scope)}const o=n.authorizationParams.redirect_uri||this.options.authorizationParams.redirect_uri||window.location.origin,r=typeof n.timeoutInSeconds=="number"?1e3*n.timeoutInSeconds:null;try{const i=await this._requestToken(Object.assign(Object.assign(Object.assign({},n.authorizationParams),{grant_type:"refresh_token",refresh_token:e&&e.refresh_token,redirect_uri:o}),r&&{timeout:r}));return Object.assign(Object.assign({},i),{scope:n.authorizationParams.scope,oauthTokenScope:i.scope,audience:n.authorizationParams.audience||"default"})}catch(i){if((i.message.indexOf("Missing Refresh Token")>-1||i.message&&i.message.indexOf("invalid refresh token")>-1)&&this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(n);throw i}}async _saveEntryInCache(n){const{id_token:e,decodedToken:o}=n,r=Cn(n,["id_token","decodedToken"]);this.userCache.set("@@user@@",{id_token:e,decodedToken:o}),await this.cacheManager.setIdToken(this.options.clientId,n.id_token,n.decodedToken),await this.cacheManager.set(r)}async _getIdTokenFromCache(){const n=this.options.authorizationParams.audience||"default",e=await this.cacheManager.getIdToken(new kn({clientId:this.options.clientId,audience:n,scope:this.scope})),o=this.userCache.get("@@user@@");return e&&e.id_token===(o==null?void 0:o.id_token)?o:(this.userCache.set("@@user@@",e),e)}async _getEntryFromCache({scope:n,audience:e,clientId:o}){const r=await this.cacheManager.get(new kn({scope:n,audience:e,clientId:o}),60);if(r&&r.access_token){const{access_token:i,oauthTokenScope:a,expires_in:s}=r,l=await this._getIdTokenFromCache();return l&&Object.assign(Object.assign({id_token:l.id_token,access_token:i},a?{scope:a}:null),{expires_in:s})}}async _requestToken(n,e){const{nonceIn:o,organization:r}=e||{},i=await R3(Object.assign({baseUrl:this.domainUrl,client_id:this.options.clientId,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs},n),this.worker),a=await this._verifyIdToken(i.id_token,o,r);return await this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({},i),{decodedToken:a,scope:n.scope,audience:n.audience||"default"}),i.scope?{oauthTokenScope:i.scope}:null),{client_id:this.options.clientId})),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgHint(r||a.claims.org_id),Object.assign(Object.assign({},i),{decodedToken:a})}async exchangeToken(n){return this._requestToken({grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",subject_token:n.subject_token,subject_token_type:n.subject_token_type,scope:Wr(n.scope,this.scope),audience:n.audience||this.options.authorizationParams.audience})}}var K0={isAuthenticated:!1,isLoading:!0,error:void 0,user:void 0},Fn=function(){throw new Error("You forgot to wrap your component in <Auth0Provider>.")},J3=St(St({},K0),{buildAuthorizeUrl:Fn,buildLogoutUrl:Fn,getAccessTokenSilently:Fn,getAccessTokenWithPopup:Fn,getIdTokenClaims:Fn,loginWithRedirect:Fn,loginWithPopup:Fn,logout:Fn,handleRedirectCallback:Fn}),Z0=g.createContext(J3),wf=function(t){N3(n,t);function n(e,o){var r=t.call(this,o??e)||this;return r.error=e,r.error_description=o,Object.setPrototypeOf(r,n.prototype),r}return n}(Error),X3=/[?&]code=[^&]+/,Q3=/[?&]state=[^&]+/,e5=/[?&]error=[^&]+/,t5=function(t){return t===void 0&&(t=window.location.search),(X3.test(t)||e5.test(t))&&Q3.test(t)},q0=function(t){return function(n){return n instanceof Error?n:n!==null&&typeof n=="object"&&"error"in n&&typeof n.error=="string"?"error_description"in n&&typeof n.error_description=="string"?new wf(n.error,n.error_description):new wf(n.error):new Error(t)}},bf=q0("Login failed"),ec=q0("Get access token failed"),J0=function(t){var n,e;t!=null&&t.redirectUri&&(console.warn("Using `redirectUri` has been deprecated, please use `authorizationParams.redirect_uri` instead as `redirectUri` will be no longer supported in a future version"),t.authorizationParams=(n=t.authorizationParams)!==null&&n!==void 0?n:{},t.authorizationParams.redirect_uri=t.redirectUri,delete t.redirectUri),!((e=t==null?void 0:t.authorizationParams)===null||e===void 0)&&e.redirectUri&&(console.warn("Using `authorizationParams.redirectUri` has been deprecated, please use `authorizationParams.redirect_uri` instead as `authorizationParams.redirectUri` will be removed in a future version"),t.authorizationParams.redirect_uri=t.authorizationParams.redirectUri,delete t.authorizationParams.redirectUri)},n5=function(t,n){switch(n.type){case"LOGIN_POPUP_STARTED":return St(St({},t),{isLoading:!0});case"LOGIN_POPUP_COMPLETE":case"INITIALISED":return St(St({},t),{isAuthenticated:!!n.user,user:n.user,isLoading:!1,error:void 0});case"HANDLE_REDIRECT_COMPLETE":case"GET_ACCESS_TOKEN_COMPLETE":return t.user===n.user?t:St(St({},t),{isAuthenticated:!!n.user,user:n.user});case"LOGOUT":return St(St({},t),{isAuthenticated:!1,user:void 0});case"ERROR":return St(St({},t),{isLoading:!1,error:n.error})}},o5=function(t){return J0(t),St(St({},t),{auth0Client:{name:"auth0-react",version:"2.4.0"}})},r5=function(t){var n;window.history.replaceState({},document.title,(n=t==null?void 0:t.returnTo)!==null&&n!==void 0?n:window.location.pathname)},i5=function(t){var n=t.children,e=t.skipRedirectCallback,o=t.onRedirectCallback,r=o===void 0?r5:o,i=t.context,a=i===void 0?Z0:i,s=I3(t,["children","skipRedirectCallback","onRedirectCallback","context"]),l=g.useState(function(){return new q3(o5(s))})[0],u=g.useReducer(n5,K0),f=u[0],d=u[1],p=g.useRef(!1),h=g.useCallback(function(j){return d({type:"ERROR",error:j}),j},[]);g.useEffect(function(){p.current||(p.current=!0,function(){return Jo(void 0,void 0,void 0,function(){var j,_,M;return Xo(this,function(F){switch(F.label){case 0:return F.trys.push([0,7,,8]),j=void 0,t5()&&!e?[4,l.handleRedirectCallback()]:[3,3];case 1:return _=F.sent().appState,[4,l.getUser()];case 2:return j=F.sent(),r(_,j),[3,6];case 3:return[4,l.checkSession()];case 4:return F.sent(),[4,l.getUser()];case 5:j=F.sent(),F.label=6;case 6:return d({type:"INITIALISED",user:j}),[3,8];case 7:return M=F.sent(),h(bf(M)),[3,8];case 8:return[2]}})})}())},[l,r,e,h]);var m=g.useCallback(function(j){return J0(j),l.loginWithRedirect(j)},[l]),v=g.useCallback(function(j,_){return Jo(void 0,void 0,void 0,function(){var M,F;return Xo(this,function(D){switch(D.label){case 0:d({type:"LOGIN_POPUP_STARTED"}),D.label=1;case 1:return D.trys.push([1,3,,4]),[4,l.loginWithPopup(j,_)];case 2:return D.sent(),[3,4];case 3:return M=D.sent(),h(bf(M)),[2];case 4:return[4,l.getUser()];case 5:return F=D.sent(),d({type:"LOGIN_POPUP_COMPLETE",user:F}),[2]}})})},[l,h]),y=g.useCallback(function(){for(var j=[],_=0;_<arguments.length;_++)j[_]=arguments[_];return Jo(void 0,P3([],j,!0),void 0,function(M){return M===void 0&&(M={}),Xo(this,function(F){switch(F.label){case 0:return[4,l.logout(M)];case 1:return F.sent(),(M.openUrl||M.openUrl===!1)&&d({type:"LOGOUT"}),[2]}})})},[l]),x=g.useCallback(function(j){return Jo(void 0,void 0,void 0,function(){var _,M,F,D;return Xo(this,function(A){switch(A.label){case 0:return A.trys.push([0,2,3,5]),[4,l.getTokenSilently(j)];case 1:return _=A.sent(),[3,5];case 2:throw M=A.sent(),ec(M);case 3:return F=d,D={type:"GET_ACCESS_TOKEN_COMPLETE"},[4,l.getUser()];case 4:return F.apply(void 0,[(D.user=A.sent(),D)]),[7];case 5:return[2,_]}})})},[l]),S=g.useCallback(function(j,_){return Jo(void 0,void 0,void 0,function(){var M,F,D,A;return Xo(this,function(P){switch(P.label){case 0:return P.trys.push([0,2,3,5]),[4,l.getTokenWithPopup(j,_)];case 1:return M=P.sent(),[3,5];case 2:throw F=P.sent(),ec(F);case 3:return D=d,A={type:"GET_ACCESS_TOKEN_COMPLETE"},[4,l.getUser()];case 4:return D.apply(void 0,[(A.user=P.sent(),A)]),[7];case 5:return[2,M]}})})},[l]),b=g.useCallback(function(){return l.getIdTokenClaims()},[l]),w=g.useCallback(function(j){return Jo(void 0,void 0,void 0,function(){var _,M,F;return Xo(this,function(D){switch(D.label){case 0:return D.trys.push([0,2,3,5]),[4,l.handleRedirectCallback(j)];case 1:return[2,D.sent()];case 2:throw _=D.sent(),ec(_);case 3:return M=d,F={type:"HANDLE_REDIRECT_COMPLETE"},[4,l.getUser()];case 4:return M.apply(void 0,[(F.user=D.sent(),F)]),[7];case 5:return[2]}})})},[l]),E=g.useMemo(function(){return St(St({},f),{getAccessTokenSilently:x,getAccessTokenWithPopup:S,getIdTokenClaims:b,loginWithRedirect:m,loginWithPopup:v,logout:y,handleRedirectCallback:w})},[f,x,S,b,m,v,y,w]);return g.createElement(a.Provider,{value:E},n)},X0=function(t){return t===void 0&&(t=Z0),g.useContext(t)};const Q0=({className:t,children:n,Logo:e})=>c.jsxs("div",{className:it("info-page-container",t),children:[c.jsx(e,{className:"info-page-logo"}),c.jsx("div",{className:"info-page-wrapper",children:n})]}),a5={value:"data:image/svg+xml,%3Csvg width='5041' height='1232' viewBox='0 0 5041 1232' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_879_362)'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M548.6 178H439.6C368.7 178 310 199.5 269.3 244.5C228.6 289.3 206.7 356 206.7 444.3C206.7 532.6 228.6 599.5 269.3 644.2C310.2 689.2 368.7 710.7 439.6 710.7H548.6C619 710.7 677.6 689.2 718.6 644.2C759.5 599.4 781.6 532.6 781.6 444.2C781.6 355.8 759.5 289 718.6 244.2C677.7 199.3 619 177.7 548.6 177.7V178ZM449.5 293.8H538.9C582.2 293.8 611.9 305.2 631.1 328.3C650.5 351.8 660.5 389.2 660.5 444.4C660.5 499.6 650.5 536.7 631.1 560C612 583 582.2 594.1 538.9 594.1H449.5C405.6 594.1 375.9 583 356.9 560C337.6 536.8 327.7 499.7 327.7 444.5C327.7 389.3 337.4 351.9 356.8 328.4C375.9 305.2 405.6 293.8 449.5 293.8Z' fill='white'/%3E%3Cpath d='M0.700195 189.8C0.700195 183.1 6.10017 177.7 12.8002 177.7H108.6C115.3 177.7 120.7 183.1 120.7 189.8V698.6C120.7 705.3 115.3 710.7 108.6 710.7H12.8002C6.10017 710.7 0.700195 705.3 0.700195 698.6V189.8Z' fill='white'/%3E%3Cpath d='M0.700195 11.9002C0.700195 5.7002 5.70018 0.700195 11.9002 0.700195H109.6C115.7 0.700195 120.7 5.7002 120.7 11.9002V109.5C120.7 115.7 115.7 120.7 109.5 120.7H11.9002C5.70018 120.7 0.700195 115.7 0.700195 109.5V11.9002Z' fill='%23007BE5'/%3E%3Cpath d='M827.7 601.9C827.7 595.7 832.7 590.7 838.9 590.7H936.6C942.8 590.7 947.8 595.7 947.8 601.9V699.5C947.8 705.7 942.8 710.7 936.6 710.7H838.9C832.7 710.7 827.7 705.7 827.7 699.5V601.9Z' fill='%23007BE5'/%3E%3Cpath d='M4363.9 293.2C4320.2 293.2 4290.6 304.6 4271.6 327.8C4252.3 351.4 4242.5 388.8 4242.5 444C4242.5 499.2 4252.3 536.4 4271.5 559.7C4290.5 582.6 4320 593.8 4363.8 593.8H4614.7C4622.4 593.8 4628.7 600.1 4628.7 607.8V696.7C4628.7 704.4 4622.4 710.7 4614.7 710.7H4354.1C4283.3 710.7 4224.9 689.1 4184.1 644.1C4143.5 599.3 4121.6 532.4 4121.6 444C4121.6 355.6 4143.5 288.7 4184.1 243.9C4224.8 199 4283.3 177.3 4354.1 177.3H4614.7C4622.4 177.3 4628.7 183.6 4628.7 191.3V279.3C4628.7 287 4622.4 293.3 4614.7 293.3H4363.9V293.2Z' fill='white'/%3E%3Cpath d='M1302.6 165.3C1240.1 165.3 1197 180.9 1169.3 213.3C1141.3 246 1127.4 297.6 1127.4 372.9C1127.4 447.7 1141.1 499 1169 531.6C1196.6 563.9 1239.7 579.5 1302.7 579.5H1552.5C1560.2 579.5 1566.5 585.8 1566.5 593.5V697.1C1566.5 704.8 1560.2 711.1 1552.5 711.1H1302.7C1204.7 711.1 1127.5 683.4 1075 626.4C1022.4 569.7 995.7 484.8 995.7 372.9C995.7 260.5 1022.7 175.4 1075.2 118.4C1127.9 61.3001 1205 33.6001 1302.6 33.6001H1552.4C1560.1 33.6001 1566.4 39.9001 1566.4 47.6001V151.2C1566.4 158.9 1560.1 165.2 1552.4 165.2H1302.6V165.3Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M1953.6 177.7H1844.8C1774 177.7 1715.6 199.3 1674.8 244.3C1634.2 289.1 1612.3 356 1612.3 444.4C1612.3 532.8 1634.2 599.7 1674.8 644.5C1715.5 689.4 1774 711.1 1844.8 711.1H1953.6C2023.9 711.1 2082.4 689.5 2123.2 644.5C2163.9 599.7 2186 532.8 2186 444.3C2186 355.8 2163.9 289 2123.2 244.1C2082.3 199.3 2023.9 177.7 1953.6 177.7ZM1854.6 293.7H1943.8C1987 293.7 2016.6 305.1 2035.8 328.3C2055.2 351.9 2065.2 389.3 2065.2 444.5C2065.2 499.7 2055.2 536.8 2035.8 560.2C2016.7 583.2 1987.1 594.3 1943.8 594.3H1854.6C1810.8 594.3 1781.3 583.1 1762.3 560.2C1743 536.9 1733.3 499.8 1733.3 444.5C1733.3 389.3 1743.1 351.9 1762.4 328.3C1781.3 305 1810.9 293.7 1854.6 293.7Z' fill='white'/%3E%3Cpath d='M2679.7 411.6C2679.7 372.5 2668.5 343.5 2645.4 324C2622.1 304.3 2585.3 293.2 2531.9 293.2H2378.4C2375.5 293.2 2374.9 293.9 2374.8 294C2374.5 294.4 2373.6 295.8 2373.6 299.8V696.7C2373.6 704.4 2367.3 710.7 2359.6 710.7H2267.7C2260 710.7 2253.7 704.4 2253.7 696.7V265.6C2253.7 234.7 2258.8 212 2272.6 197.2C2286.5 182.2 2307.5 177.3 2334.2 177.3H2531.8C2620.7 177.3 2688 198.4 2733.3 238.9C2778.7 279.5 2800.5 338.6 2800.5 411.7V696.7C2800.5 704.4 2794.2 710.7 2786.5 710.7H2693.7C2686 710.7 2679.7 704.4 2679.7 696.7V411.6Z' fill='white'/%3E%3Cpath d='M3304.7 411.6C3304.7 372.5 3293.5 343.5 3270.4 324C3247.1 304.3 3210.3 293.2 3156.9 293.2H3003.4C3000.5 293.2 2999.9 293.9 2999.8 294C2999.5 294.4 2998.6 295.8 2998.6 299.8V696.7C2998.6 704.4 2992.3 710.7 2984.6 710.7H2892.7C2885 710.7 2878.7 704.4 2878.7 696.7V265.6C2878.7 234.7 2883.8 212 2897.6 197.2C2911.5 182.2 2932.5 177.3 2959.2 177.3H3156.8C3245.7 177.3 3313 198.4 3358.3 238.9C3403.7 279.5 3425.5 338.6 3425.5 411.7V696.7C3425.5 704.4 3419.2 710.7 3411.5 710.7H3318.7C3311 710.7 3304.7 704.4 3304.7 696.7V411.6Z' fill='white'/%3E%3Cpath d='M4906.1 292.2C4898.4 292.2 4892.1 298.5 4892.1 306.2V529.2C4892.1 557.5 4897.2 574.3 4906.4 584.1C4915.4 593.8 4930 598.6 4953.7 598.6H5019.2C5026.9 598.6 5033.2 604.9 5033.2 612.6V695.7C5033.2 703.4 5026.9 709.7 5019.2 709.7H4932.1C4877.9 709.7 4836.8 698.8 4809.7 668.6C4782.8 638.6 4771.3 591.5 4771.3 523.4V306.2C4771.3 298.5 4765 292.2 4757.3 292.2H4714.7C4707 292.2 4700.7 285.9 4700.7 278.2V190.2C4700.7 182.5 4707 176.2 4714.7 176.2H4757.3C4765 176.2 4771.3 169.9 4771.3 162.2V67.7002C4771.3 60.0002 4777.6 53.7002 4785.3 53.7002H4878.2C4885.9 53.7002 4892.2 60.0002 4892.2 67.7002V162.2C4892.2 169.9 4898.5 176.2 4906.2 176.2H5021.3C5029 176.2 5035.3 182.5 5035.3 190.2V278.2C5035.3 285.9 5029 292.2 5021.3 292.2H4906.1Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4024.4 607.2C4024.4 599.5 4018.1 593.2 4010.4 593.2H3699.9C3672.9 593.2 3655.3 586 3644.6 575.2C3633.8 564.4 3628.6 548.8 3628.6 529.7V514.5C3628.6 506.8 3634.9 500.5 3642.6 500.5H3866.6C3931.2 500.5 3977.4 486.9 4007.5 459.6C4037.7 432.2 4050.1 392.3 4050.1 343.5C4050.1 292.2 4036.8 250.1 4006.4 220.9C3976.1 191.7 3930.1 176.8 3867.7 176.8H3700.1C3633.9 176.8 3586.5 195.4 3555.6 227.8C3524.8 260.1 3511.8 305 3511.8 355.3V531.7C3511.8 582 3524.9 626.9 3555.6 659.2C3586.5 691.6 3633.9 710.2 3700.1 710.2H4010.6C4018.3 710.2 4024.6 703.9 4024.6 696.2V607.2H4024.4ZM3863.5 403.1H3642.5C3634.8 403.1 3628.5 396.8 3628.5 389.1V356.2C3628.5 337.6 3633.7 321.9 3644.6 311C3655.4 300.1 3672.9 292.7 3699.9 292.7H3866.5C3890.7 292.7 3906.9 298.8 3916.9 308.2C3926.9 317.5 3932 331.3 3932 349.4C3932 367.1 3927.3 380 3917.4 388.6C3907.4 397.4 3890.5 403.1 3863.5 403.1Z' fill='white'/%3E%3Cpath d='M2918.9 872.3C3001.9 872.3 3036.9 909.9 3036.9 966.3C3036.9 1012.2 3013.9 1036.8 2973.2 1047.2C3014.4 1058.2 3037.9 1083.7 3037.9 1129.7C3037.9 1186.1 3003.5 1224.7 2920.5 1224.7H2755.6C2741.5 1224.7 2734.2 1217.9 2734.2 1203.8V893.2C2734.2 879.1 2741.5 872.3 2755.6 872.3H2918.9ZM2765.4 1033.1H2918.9C2976.8 1033.1 3005 1014.8 3005 970.5C3005 929.8 2979.4 903.7 2919.4 903.7H2771.2C2767.5 903.7 2765.5 905.3 2765.5 909.4V1033.1H2765.4ZM2765.4 1187.6C2765.4 1191.8 2767.5 1193.3 2771.1 1193.3H2921C2979.5 1193.3 3006.1 1168.2 3006.1 1125.4C3006.1 1081 2976.9 1060.2 2921 1060.2H2765.5V1187.6H2765.4Z' fill='white'/%3E%3Cpath d='M3294 956.9V985.6H3182.8C3148.9 985.6 3135.3 1000.7 3135.3 1033.6V1224.6H3106.1V1029.9C3106.1 979.8 3125.4 956.8 3176.6 956.8H3294V956.9Z' fill='white'/%3E%3Cpath d='M3489.1 956.9C3562.2 956.9 3608.6 1001.3 3608.6 1091C3608.6 1181.3 3562.1 1224.6 3489.1 1224.6H3431.2C3357.6 1224.6 3311.7 1181.3 3311.7 1091C3311.7 1001.2 3357.6 956.9 3431.2 956.9H3489.1ZM3433.3 985.6C3374.3 985.6 3340.9 1019 3340.9 1091C3340.9 1163.5 3374.3 1196.4 3433.3 1196.4H3487.1C3546.1 1196.4 3579.5 1163.5 3579.5 1091C3579.5 1019 3546.1 985.6 3487.1 985.6H3433.3Z' fill='white'/%3E%3Cpath d='M3674.4 956.9L3706.8 1176.6C3709.4 1195.4 3716.2 1204.3 3737.1 1204.3C3758.5 1204.3 3767.4 1195.4 3771.5 1180.3L3821.6 995.5C3829.4 966.8 3849.3 951.7 3884.2 951.7C3919.1 951.7 3937.4 966.8 3945.3 995.5L3994.9 1180.3C3999.1 1195.4 4007.9 1204.3 4029.3 1204.3C4050.2 1204.3 4056.4 1195.4 4059.6 1176.6L4093.5 956.9H4125.3L4089.3 1179.8C4084.6 1210.6 4069.5 1231 4028.2 1231C3992.7 1231 3975 1216.4 3966.6 1185.1L3917 1000.9C3912.8 985.2 3900.8 978.5 3883.6 978.5C3865.9 978.5 3854.9 985.3 3850.7 1000.9L3799.6 1185.1C3790.7 1216.4 3773.5 1231 3737.5 1231C3695.2 1231 3682.2 1210.1 3677.5 1179.8L3643.1 956.9H3674.4Z' fill='white'/%3E%3Cpath d='M4417.6 956.9V985.6H4260C4219.8 985.6 4203.6 1003.3 4203.6 1032.1C4203.6 1057.2 4216.1 1077.5 4263.6 1077.5H4338.8C4410.8 1077.5 4428.6 1110.9 4428.6 1149.5C4428.6 1194.9 4404.6 1224.7 4344 1224.7H4178V1196.5H4344C4384.2 1196.5 4399.8 1178.2 4399.8 1149.5C4399.8 1124.4 4387.8 1103.6 4339.8 1103.6H4264.6C4193.1 1103.6 4174.8 1069.2 4174.8 1030C4174.8 985.1 4198.8 956.9 4259.4 956.9H4417.6Z' fill='white'/%3E%3Cpath d='M4685.4 956.9C4749.1 956.9 4775.7 986.6 4775.7 1036.8C4775.7 1084.8 4751.2 1111.4 4684.9 1111.4H4526.2V1135.9C4526.2 1170.3 4545 1196.4 4593.5 1196.4H4762.1V1224.6H4593.5C4524.6 1224.6 4497.5 1187.5 4497.5 1136.4V1045.1C4497.5 995 4524.6 956.9 4593.5 956.9H4685.4ZM4526.2 1087.4H4684.3C4729.7 1087.4 4746.9 1069.7 4746.9 1037.8C4746.9 1005.4 4728.6 985.6 4685.3 985.6H4593.4C4544.9 985.6 4526.1 1011.2 4526.1 1045.6V1087.4H4526.2Z' fill='white'/%3E%3Cpath d='M5040.3 956.9V985.6H4929.1C4895.2 985.6 4881.6 1000.7 4881.6 1033.6V1224.6H4852.4V1029.9C4852.4 979.8 4871.7 956.8 4922.9 956.8H5040.3V956.9Z' fill='white'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_879_362'%3E%3Crect width='5041' height='1231' fill='white' transform='translate(0 0.700195)'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A"},s5={loginPageLogo:a5},c5="200px",Si=({logoSrc:t=s5.loginPageLogo.value,width:n=c5,className:e="logo"})=>c.jsx("img",{width:n,src:t,className:e,alt:"Login logo"}),ev=()=>c.jsx("span",{className:"spinner"});const yo=({Logo:t=Si,text:n="Loading..."})=>c.jsx("div",{className:"system-loader-background",children:c.jsxs("div",{className:"system-loader-container flex flex-column ai-center",children:[c.jsx(t,{}),c.jsx("h1",{className:"system-loader-text io-title",children:n}),c.jsx(ev,{})]})});const tv=({children:t,description:n,heading:e,Image:o,title:r,className:i})=>c.jsxs("div",{className:it("info-card",i),children:[r&&c.jsx("h1",{className:"info-card-title io-title-large",children:r}),o&&c.jsx("div",{className:"info-card-image",children:c.jsx(o,{})}),e&&c.jsx("h3",{className:"info-card-heading io-title",children:e}),c.jsx("p",{className:"info-card-description io-text-default-lh16",children:n}),t]}),l5=({activeStepName:t,showWarnIcon:n,stepsStatuses:e})=>c.jsx("ul",{className:"setup-flow-list io-text-default-lh16",children:ta.map(({name:o,label:r},i)=>{const a=o===t,s=e[o].state,l=n&&a?c.jsx(lt,{variant:"exclamation-mark",size:"12"}):c.jsxs("span",{children:[i+1,"."]});return c.jsx("li",{className:it(a&&"active"),children:c.jsxs("div",{className:"setup-flow-list-item",children:[c.jsxs("div",{className:"setup-flow-list-item-icon-wrapper",children:[s==="prompt"&&l,s==="granted"&&c.jsx(lt,{variant:"check-solid",size:"12"}),s==="denied"&&c.jsx(lt,{variant:"close",size:"12"})]}),r]})},o)})}),u5=({edgeNotificationsPermissionTimeout:t,isNotificationsPermissionPromptOpen:n})=>{const{name:e}=CC(),[o,r]=g.useState(!1);return g.useEffect(()=>{if(!n||e!=="Edge")return;const i=setTimeout(()=>r(!0),t);return()=>clearTimeout(i)},[e,t,n]),g.useEffect(()=>{n&&!o||r(!1)},[n,o,r]),{hasEdgeNotificationsPermissionError:o}},d5=(t,n)=>{const{type:e,payload:o}=n;switch(e){case"completed":return{...t,[o.stepName]:{...t[o.stepName],isCompleted:!0}};case"skipped":return{...t,[o.stepName]:{isCompleted:!0,state:"denied"}};case"stateUpdated":{if(!o.state)throw Error('"stateUpdated" action invoked without state in payload');return{...t,[o.stepName]:{isCompleted:o.stepName===rt.POPUPS?o.state==="granted":o.state!=="prompt",state:o.state}}}default:throw Error("Unknown action: "+e)}},f5=t=>{const{handleDeferredStep:n,handleOperationComplete:e}=t;window.getScreenDetails().catch(async()=>{const{state:o}=await navigator.permissions.query({name:uo.WINDOW_MANAGEMENT});o==="prompt"&&n()}).finally(e)},p5=t=>{const{handleDeferredStep:n,handleOperationComplete:e}=t;Notification.requestPermission().then(async()=>{const{state:o}=await navigator.permissions.query({name:uo.NOTIFICATIONS});o==="prompt"&&n()}).finally(e)},h5=t=>{const{handleDeferredStep:n,handleOperationComplete:e,dispatchAction:o}=t,r="about:blank",i="popup,width=1,height=1,top=9999,left=9999",a=window.open(r,void 0,i),s=window.open(r,void 0,i);a==null||a.close(),s==null||s.close();const l=!(a&&s);l&&n(),o({type:"stateUpdated",payload:{stepName:rt.POPUPS,state:l?"denied":"granted"}}),e()},m5=t=>{const{dispatchAction:n}=t;n({type:"completed",payload:{stepName:rt.PWA_INSTALL}})},g5={[rt.WINDOW_MANAGEMENT]:f5,[rt.NOTIFICATIONS]:p5,[rt.POPUPS]:h5,[rt.PWA_INSTALL]:m5},v5=({settings:t})=>{const{permission:n}=vo(),[e,o]=Tn("localStorage",xi,Ci),[r,i]=g.useReducer(d5,j3),[a,s]=g.useState(!1),[l,u]=g.useState(!1),f=ta.find(y=>!r[y.name].isCompleted);if(!f)throw new Error("All setup steps are completed. The SetupSteps component should not be used in such case.");const d=f.name,p=ta[ta.length-1].name,{hasEdgeNotificationsPermissionError:h}=u5({edgeNotificationsPermissionTimeout:t.edgeNotificationsPermissionTimeout,isNotificationsPermissionPromptOpen:l&&d===uo.NOTIFICATIONS}),m=()=>{s(!1),u(!0),g5[d]({handleDeferredStep:()=>s(!0),handleOperationComplete:()=>u(!1),dispatchAction:y=>i(y)}),d===p&&o({isCompleted:!0})},v=()=>{s(!1),i({type:"skipped",payload:{stepName:d}})};return g.useEffect(()=>{h&&(u(!1),s(!0))},[h]),g.useEffect(()=>{var y,x;s(!1),i({type:"stateUpdated",payload:{stepName:rt.WINDOW_MANAGEMENT,state:ds?(y=n.statuses[rt.WINDOW_MANAGEMENT])==null?void 0:y.state:"denied"}}),i({type:"stateUpdated",payload:{stepName:rt.NOTIFICATIONS,state:(x=n.statuses[rt.NOTIFICATIONS])==null?void 0:x.state}})},[n.statuses]),c.jsxs(tv,{description:f.description,heading:f.heading,Image:f.Image,title:"Platform Setup",children:[c.jsx(l5,{activeStepName:d,showWarnIcon:a&&d!==rt.POPUPS,stepsStatuses:r}),c.jsx("p",{className:"io-text-default-lh16",children:a?f.instructions.additional:f.instructions.initial}),c.jsxs(Be,{children:[c.jsx(Ea,{className:"io-btn io-btn-lg io-btn-primary setup-flow-btn",disabled:l,onClick:m,children:f.actionBtnText}),d!==p&&d!==rt.WINDOW_MANAGEMENT&&c.jsx(Ea,{className:"io-btn io-btn-lg io-btn-outline setup-flow-btn",disabled:l,onClick:v,children:"Skip"})]}),l&&c.jsx(ev,{})]})};const yu=({components:{Logo:t=Si,Loader:n=yo}={},settings:e={}})=>{const{permission:o}=vo();return o.isLoading?c.jsx(n,{text:"Checking browser permissions..."}):c.jsx(Q0,{Logo:t,children:c.jsx(v5,{settings:{...x3,...e}})})};const wu=({errorMessage:t})=>{const n="https://support.interop.io",e=c.jsxs(c.Fragment,{children:["It seems that the following error prevents io.Connect Browser",c.jsx("br",{}),"from operating properly:",c.jsxs("span",{className:"browser-start-failed-error",children:["“",t,"”"]}),c.jsxs("span",{className:"help-center-info",children:["For further assistance, visit our"," ",c.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:"help center"}),"."]}),c.jsx("span",{className:"thank-you",children:"Thank you for your cooperation."})]});return c.jsx(Q0,{Logo:Si,children:c.jsx(tv,{className:"io-init-error-card",heading:"Oops! io.Connect Browser couldn't start...",description:e,Image:b3,children:c.jsx(Ea,{className:"io-btn io-btn-lg io-btn-primary",onClick:()=>window.open(n,"_blank","noopener,noreferrer"),children:"Visit the interop.io Help Center"})})})},nv=()=>c.jsxs(c.Fragment,{children:[c.jsx(Nn,{tag:"h1",className:"login-title",text:"Making Your Work Flow",size:"large"}),c.jsxs("p",{className:"io-text-default-lh16 login-description",children:["Integrate apps, simplify user experiences and accelerate",c.jsx("br",{}),"digital transformation."]})]}),ov=({Logo:t,children:n,className:e})=>c.jsx("div",{className:"login-page-background",children:c.jsxs("div",{className:it(e,"login-form-container flex flex-column ai-center"),children:[c.jsx(t,{}),n]})}),y5=({onLogin:t,isLoading:n,validationError:e,components:{Logo:o=Si,Heading:r=nv,Loader:i=yo}={}})=>n?c.jsx(i,{text:"Verifying credentials..."}):c.jsxs(ov,{Logo:o,children:[c.jsx(r,{}),c.jsx(Je,{className:"auth0-login-btn",onClick:t,size:"large",variant:"primary",children:"Log In"}),e&&c.jsx(xv,{variant:"critical",text:e.message})]}),xf=(t,n)=>{const e=n.value,o=e.trim().length>3;return{value:e,isValid:o}},w5=({onLogin:t,setIsLoading:n,loginError:e,setLoginError:o,userInputName:r="email"})=>{const[i,a]=g.useReducer(xf,{value:"",isValid:!1}),[s,l]=g.useReducer(xf,{value:"",isValid:!1}),[u,f]=g.useState(!1),[d,p]=g.useState(!1),{isValid:h}=i,{isValid:m}=s,v=h&&m,y=E=>a({value:E.target.value}),x=E=>l({value:E.target.value}),S=()=>{h||f(!0)},b=()=>{m||p(!0)},w=async E=>{if(E.preventDefault(),!!v){n(!0);try{await t(i.value,s.value)}catch(j){o(j)}n(!1)}};return c.jsxs("form",{className:"simple-login-form",onSubmit:w,children:[c.jsx(Bo,{id:"user",errorMessage:u?`The ${r} is too short`:void 0,autoFocus:!0,autoComplete:"off",type:"text",placeholder:`Enter your ${r}`,value:i.value,onChange:y,onBlur:S,onFocus:()=>f(!1)}),c.jsx(Bo,{id:"password",errorMessage:d?"The password is too short":void 0,autoComplete:"off",type:"password",placeholder:"Enter your password",value:s.value,onChange:x,onBlur:b,onFocus:()=>p(!1)}),c.jsx(Je,{type:"submit",size:"large",variant:"primary",children:"Log In"}),e&&c.jsxs("div",{className:"login-error-feedback",children:[c.jsx(lt,{className:"error-icon",variant:"close",size:"12"}),e.message]})]})};const b5=({onLogin:t,userInputName:n,components:{Logo:e=Si,Heading:o=nv,Loader:r=yo}={}})=>{const[i,a]=g.useState(!1),[s,l]=g.useState(null);return i?c.jsx(r,{text:"Verifying credentials..."}):c.jsxs(ov,{Logo:e,children:[c.jsx(o,{}),c.jsx(w5,{onLogin:t,setIsLoading:a,loginError:s,setLoginError:l,userInputName:n})]})};function x5(t,n){const[e,o]=g.useState(!0),r=g.useContext(_e.IOConnectContext);return g.useEffect(()=>{let i;return(async()=>{if(!r.workspaces)return;let a;try{a=await r.workspaces.getWorkspaceById(t)}catch(l){console.warn(l);return}const s=a.getAllGroups().find(l=>l.id===n);s&&(i=await s.onLockConfigurationChanged(({showAddWindowButton:l})=>{l!==void 0&&o(l)}),o(!!s.showAddWindowButton))})(),()=>i==null?void 0:i()},[t,n,r.workspaces]),e}const C5=({groupId:t,workspaceId:n})=>{const e=x5(n,t),o=g.useCallback(r=>{hr.showAddApplicationPopup({bounds:r,groupId:t,workspaceId:n})},[t,n]);return e&&c.jsx(hr.AddWindowButton,{title:"Add App",visible:e,showPopup:o})},S5=t=>c.jsx(hr.GroupHeaderButtons,{...t,addWindow:{visible:!1,showPopup:t.addWindow.showPopup}}),k5=()=>null;const rv=({className:t,components:n,onClose:e,title:o})=>{const{NotificationsProvider:r,NotificationsPanelProvider:i,SettingsPanel:a}=Rl;return c.jsx(r,{children:c.jsx(i,{children:c.jsx(a,{className:t,components:n,onClose:e,title:o})})})};const iv=xb.Panel;const av=({className:t,components:n,onClose:e,title:o})=>{const r=g.useContext(_e.IOConnectContext),{onLogout:i}=B0(),[a,s]=Tn("sessionStorage",r0,i0),{login:{setIsLoggingOut:l}}=vo(),u=g.useCallback(async()=>{var f;if("modals"in r&&r.modals){const d="log-out",{isEnterPressed:p,responseButtonClicked:h}=await r.modals.dialogs.request({templateName:Ir.NO_INPUTS_CONFIRMATION_DIALOG,variables:{heading:"Logging out of io.Connect Browser",text:"This will terminate your session.",actionButtons:[{variant:"primary",text:"Log out",id:d,autofocus:!0},{variant:"outline",text:"Cancel",id:"cancel"}]}});if(!(p||(h==null?void 0:h.id)===d))return}oo.flushSync(()=>l(!0)),s(null),await((f=r.webPlatform)==null?void 0:f.system.shutdown());try{i==null||i()}catch(d){console.error(d)}},[r,i]);return c.jsx(vb.Panel,{className:t,components:n,onClose:e,onLogout:u,title:o})},E5=[{name:"platformPreferences",displayName:"Platform Preferences",icon:"cog",onClick:t=>t(iv)},{name:"notificationSettings",displayName:"Notification Settings",icon:"bell",onClick:t=>t(rv),separatorAfter:!0},{name:"profile",displayName:"Profile",icon:"user",onClick:t=>t(av)}],j5=t=>({onClose:n})=>c.jsx(t,{className:"system-menu-panel",onClose:n});const sv=({actions:t,panelWrapperClassName:n})=>{const[e,o]=g.useState(),r=g.useRef(null),i=m0(),a=g.useCallback(()=>o(void 0),[]),s=!!e;g.useEffect(()=>{!s||i!=="Escape"||a()},[s,i]);const l=g.useCallback((u,f)=>{const d=t.find(({name:h})=>h===f.name);if(!d){console.error(`Action named ${f.name} is not part of the provided list of actions: ${JSON.stringify(t)}!`);return}const p=h=>{const m=j5(h);o(()=>m)};d.onClick(p)},[t]);return iu({eventType:"mouseup",handler:a,ref:r,skip:!s}),ru({handler:a,skip:!s}),c.jsxs(c.Fragment,{children:[c.jsx(lu,{buttonSize:"32",iconSize:"16",actions:t,onActionItemClick:l,icon:"ellipsis-vertical",buttonVariant:"circle",placement:"bottom-end",offset:[0,8],"data-testid":"system-menu-button",contextMenuDataTestId:"system-menu"}),c.jsx($0,{className:it("system-menu-panel-wrapper",n),isOpen:s,onClose:a,Panel:e,position:"right",ref:r})]})},O5=()=>c.jsx("li",{className:"default-header-system-menu",children:c.jsx(sv,{actions:E5})}),N5=()=>{const{showNotificationBadge:t}=SC(),n=h0(),o=g.useMemo(()=>n.filter(({state:r})=>r==="Active"||r==="Stale"),[n]).length;return o>0&&t?c.jsx("div",{className:"io-badge io-badge-primary notifications-badge",children:o<100?o:"99+"}):null};const cv=t=>{const{className:n,active:e,...o}=t;return c.jsxs("div",{className:it(n,"notifications-panel-button"),...o,children:[c.jsx(Ge,{icon:"bell",size:"32",iconSize:"16",variant:"circle"}),c.jsx(N5,{})]})},lv=({className:t,components:n,onClose:e,settings:o,title:r})=>{const{NotificationsProvider:i,NotificationsPanelProvider:a,Panel:s}=Rl;return c.jsx(i,{children:c.jsx(a,{children:c.jsx(s,{className:t,components:n,onClose:e,settings:o,title:r})})})},uv=({Button:t=cv,Panel:n=lv,position:e="right",...o})=>{const r=h0(),i=g.useContext(_e.IOConnectContext),a=g.useCallback(async()=>{await Promise.all(r.map(({id:s})=>i.notifications.setState(s,"Seen")))},[r]);return c.jsx(du,{Button:t,Panel:n,position:e,onClose:a,...o})};const I5=()=>c.jsxs(c.Fragment,{children:[c.jsx(uv,{tag:"li"}),c.jsx(O5,{})]}),bu=({onLogout:t,workspaces:n,launchpad:e,Loader:o=yo,isBeforeunloadDialogEnabled:r})=>{var v,y,x,S;const{LogoComponent:i,SystemButtonsComponent:a}=((v=n==null?void 0:n.components)==null?void 0:v.header)??{},{setPlatformWindow:s}=au(),{isInitialSetupCompleted:l}=Oh(),u=(y=window.iobrowser)==null?void 0:y.platformStarted,f=i??(u?W0:k5),d=a??(u?I5:void 0),p=wC(),{login:{isLoggingOut:h}}=vo();Rx(r===!1||h),g.useEffect(()=>{u&&s({name:window.name})},[u,s]);const m=g.useMemo(()=>({onLogout:t,launchpadSettings:e==null?void 0:e.settings,launchpadComponents:e==null?void 0:e.components}),[t,e==null?void 0:e.settings,e==null?void 0:e.components]);return c.jsxs(F0.Provider,{value:m,children:[(!p||!l)&&c.jsx(o,{text:"Loading io.Connect Home..."}),c.jsx(hr,{components:{...n==null?void 0:n.components,header:{...(x=n==null?void 0:n.components)==null?void 0:x.header,LogoComponent:f,SystemButtonsComponent:d},groupHeader:{AfterTabsComponent:C5,ButtonsComponent:S5,...(S=n==null?void 0:n.components)==null?void 0:S.groupHeader}}})]})},P5=ot({id:Ht,username:Le(Ht),email:Le(Ht),firstName:Le(Ht),lastName:Le(Ht),token:Le(Ht),password:Le(Ht)}),A5=({config:t})=>{var x,S,b,w;const{setupFlow:n,login:e,workspaces:o,launchpad:r,getIOConnectConfig:i}=t,[a,s]=Tn("localStorage",qx,P5),[l]=Tn("localStorage",xi,Ci),[u,f]=g.useState(null),{login:{isLoggingOut:d}}=vo(),p=ou(),h=((x=t.components)==null?void 0:x.SystemLoader)??yo,m=((S=t.components)==null?void 0:S.IOInitErrorScreen)??wu,v=g.useCallback(async(E,j)=>{const _=await e.onLogin(E,j);s(_)},[e,s]),y=g.useCallback(()=>{var E;(E=e.onLogout)==null||E.call(e),s(null),window.location.reload()},[e.onLogout,s]);return d?c.jsx(h,{text:"Logging out..."}):a?!(l!=null&&l.isCompleted)&&(n==null?void 0:n.enabled)!==!1&&!p?c.jsx(yu,{settings:n==null?void 0:n.settings,components:{...n==null?void 0:n.components,Loader:h}}):u&&!u.message.includes("has already been started")?c.jsx(m,{errorMessage:u.message}):c.jsx(_e.IOConnectProvider,{settings:i({type:"simple",user:a}),onInitError:f,fallback:c.jsx(h,{text:"Initializing the platform..."}),children:c.jsx(Xa,{launchpadMode:(b=r==null?void 0:r.settings)==null?void 0:b.mode,children:c.jsx(bu,{workspaces:o,launchpad:r,onLogout:y,isBeforeunloadDialogEnabled:(w=t.settings)==null?void 0:w.isBeforeunloadDialogEnabled,Loader:h})})}):c.jsx(b5,{onLogin:v,userInputName:e.userInputName,components:{...e.components,Loader:h}})},T5=ot({message:Ht}),D5=t=>{const n=X0(),[e,o]=g.useState(void 0),[r,i]=Tn("sessionStorage",Zx,T5),a=g.useMemo(()=>n.user?(t==null?void 0:t(n.user))??{ok:!0}:null,[n.user,t]),s=(a==null?void 0:a.ok)===!1,l=n.isLoading||n.isAuthenticated&&!e,u=s||l,f=g.useMemo(()=>{var d;return a!=null&&a.ok&&((d=n.user)!=null&&d.email)&&e?{username:n.user.name,id:n.user.email,token:e}:null},[n.user,e,a==null?void 0:a.ok]);return g.useEffect(()=>{n.isAuthenticated&&n.getAccessTokenSilently().then(o).catch(console.warn)},[n]),g.useEffect(()=>{if(a){if(a.ok){i(null);return}i({message:a.message}),n.logout()}},[n,i,a]),{isLoading:u,validationError:r,user:f}},rl={POPUP:"popup",REDIRECT:"redirect"},M5=({config:t})=>{var b,w,E,j;const n=X0(),{setupFlow:e,login:o,launchpad:r,workspaces:i,getIOConnectConfig:a}=t,{isLoading:s,validationError:l,user:u}=D5(o.validateUser),d=(o.loginType??rl.REDIRECT)===rl.REDIRECT?n.loginWithRedirect:n.loginWithPopup,[p]=Tn("localStorage",xi,Ci),[h,m]=g.useState(null),{login:{isLoggingOut:v}}=vo(),y=ou(),x=((b=t.components)==null?void 0:b.SystemLoader)??yo,S=((w=t.components)==null?void 0:w.IOInitErrorScreen)??wu;return v?c.jsx(x,{text:"Logging out..."}):u?!(p!=null&&p.isCompleted)&&(e==null?void 0:e.enabled)!==!1&&!y?c.jsx(yu,{settings:e==null?void 0:e.settings,components:{...e==null?void 0:e.components,Loader:x}}):h&&!h.message.includes("has already been started")?c.jsx(S,{errorMessage:h.message}):c.jsx(_e.IOConnectProvider,{settings:a({type:"auth0",user:{...n.user,id:u.id,token:u.token}}),onInitError:m,fallback:c.jsx(x,{text:"Initializing the platform..."}),children:c.jsx(Xa,{launchpadMode:(E=r==null?void 0:r.settings)==null?void 0:E.mode,children:c.jsx(bu,{workspaces:i,launchpad:r,onLogout:n.logout,isBeforeunloadDialogEnabled:(j=t.settings)==null?void 0:j.isBeforeunloadDialogEnabled,Loader:x})})}):c.jsx(y5,{onLogin:d,isLoading:s,validationError:l,components:{...o.components,Loader:x}})},Cf=({config:t})=>{var v,y,x,S;const{setupFlow:n,launchpad:e,workspaces:o,getIOConnectConfig:r}=t,{onLogout:i,user:a}=t.login??{},{isPlatformWindow:s}=au(),[l]=Tn("localStorage",xi,Ci),[u,f]=g.useState(null),{login:{isLoggingOut:d}}=vo(),p=ou(),h=((v=t.components)==null?void 0:v.SystemLoader)??yo,m=((y=t.components)==null?void 0:y.IOInitErrorScreen)??wu;return d?c.jsx(h,{text:"Logging out..."}):!(l!=null&&l.isCompleted)&&(n==null?void 0:n.enabled)!==!1&&s&&!p?c.jsx(yu,{settings:n==null?void 0:n.settings,components:{...n==null?void 0:n.components,Loader:h}}):u&&!u.message.includes("has already been started")?c.jsx(m,{errorMessage:u.message}):c.jsx(_e.IOConnectProvider,{settings:r({type:"custom",user:a}),onInitError:f,fallback:c.jsx(h,{text:"Initializing the platform..."}),children:c.jsx(Xa,{launchpadMode:(x=e==null?void 0:e.settings)==null?void 0:x.mode,children:c.jsx(bu,{workspaces:o,launchpad:e,onLogout:i,isBeforeunloadDialogEnabled:(S=t.settings)==null?void 0:S.isBeforeunloadDialogEnabled,Loader:h})})})},dv=ot({Logo:Le(Dt().andThen(t=>tn(t,"Logo"))),Heading:Le(Dt().andThen(t=>tn(t,"Heading")))}),_5=pi(...Object.values(rl).map(t=>po(t))),L5=ot({type:po("auth0"),validateUser:Le(Dt().andThen(t=>tn(t,"validateUser"))),loginType:Le(_5),providerOptions:Dt(),components:Le(dv)}),R5=ot({type:po("simple"),onLogin:Dt().andThen(t=>tn(t,"onLogin")),onLogout:Le(Dt().andThen(t=>tn(t,"onLogout"))),userInputName:Le(Ht),components:Le(dv)}),F5=ot({id:Ht,username:Ht}),B5=ot({type:po("custom"),onLogout:Dt().andThen(t=>tn(t,"onLogout")),user:F5}),H5=pi(L5,R5,B5),$5=ot({edgeNotificationsPermissionTimeout:Le(lC)}),W5=ot({Logo:Le(Dt().andThen(t=>tn(t,"Logo")))}),z5=ot({enabled:Le(kr()),components:Le(W5),settings:Le($5)}),U5=ot({components:Le(Dt())}),V5=ot({BeforeSearch:pi(po(null),Le(Dt().andThen(t=>tn(t,"BeforeSearch")))),AfterSearch:pi(po(null),Le(Dt().andThen(t=>tn(t,"AfterSearch"))))}),Y5=ot({Component:Dt().andThen(t=>tn(t,"Component")),placementId:Ht}),G5=ot({header:Le(V5),sections:Le(sC(Y5))}),K5=ot({showHeader:Le(kr()),showSearch:Le(kr())}),Z5=ot({header:Le(K5),mode:Le(pi(po("pinned"),po("default")))}),q5=ot({components:Le(G5),settings:Le(Z5)}),J5=ot({SystemLoader:Le(Dt().andThen(t=>tn(t,"SystemLoader"))),IOInitErrorScreen:Le(Dt().andThen(t=>tn(t,"IOInitErrorScreen")))}),X5=ot({isBeforeunloadDialogEnabled:Le(kr())}),Q5=ot({getIOConnectConfig:Dt().andThen(t=>tn(t,"getIOConnectConfig")),login:Le(H5),setupFlow:Le(z5),workspaces:Le(U5),launchpad:Le(q5),components:Le(J5),settings:Le(X5)}),eS=({config:t})=>{var i;const n=g.useMemo(()=>Q5.runWithException(t),[t]),e=n.login,{isPlatformWindow:o}=au();if(!e||!o){const{login:a,...s}=n;return c.jsx(Cf,{config:s})}if(e.type==="custom")return c.jsx(Cf,{config:n});if(e.type==="simple")return c.jsx(A5,{config:n});const{providerOptions:r}=e;return c.jsx(i5,{...r,authorizationParams:{...r.authorizationParams,redirect_uri:((i=r.authorizationParams)==null?void 0:i.redirect_uri)??window.location.origin},children:c.jsx(M5,{config:n})})};const tS=({config:t})=>c.jsx(m3,{children:c.jsx(eS,{config:t})});exports.ApplicationsSection=C0;exports.FavoritesSection=S0;exports.IOActivePanelRenderer=bb;exports.IOConnectHome=tS;exports.IODownloadManager=Xy;exports.IONotifications=Rl;exports.Launchpad=R0;exports.LaunchpadAccess=W0;exports.LaunchpadBody=L0;exports.LaunchpadContentsContainer=I0;exports.LaunchpadHeader=A0;exports.LaunchpadPinButton=P0;exports.NotificationSettingsPanel=rv;exports.NotificationsPanel=lv;exports.NotificationsPanelButton=cv;exports.NotificationsPanelWithToggleButton=uv;exports.PanelWithToggleButton=du;exports.PlatformPrefsProvider=Xa;exports.PreferencesPanel=iv;exports.ProfilePanel=av;exports.Section=us;exports.SystemLoader=yo;exports.SystemMenu=sv;exports.WorkspacesSection=T0;exports.useFavorites=ss;exports.useIsLaunchpadCollapsed=nu;exports.usePlatformPref=Xt;exports.usePlatformPrefs=Oh;
69
69
  //# sourceMappingURL=index.js.map