@vinay.kumar.ha/videosdk-ui-toolkit 2.3.5-1.1 → 2.3.5-1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19098,7 +19098,7 @@ function $_e(e, t) {
19098
19098
  n();
19099
19099
  });
19100
19100
  }
19101
- var K_e = { UIKIT_VERSION: '"2.3.5-1"', TAILWIND_VERSION: '"^3.4.17"' };
19101
+ var K_e = { UIKIT_VERSION: '"2.3.5-1.1"', TAILWIND_VERSION: '"^3.4.17"' };
19102
19102
  const IJ = K_e.UIKIT_VERSION.replace(/"/g, ""), Yqe = K_e.TAILWIND_VERSION.replace(/"/g, "").replace("^", ""), Jqe = "zoom.us";
19103
19103
  let z1 = `https://source.${Jqe}/uitoolkit/image`;
19104
19104
  document.getElementById("aria-notify-area");
@@ -125313,7 +125313,7 @@ function D5t() {
125313
125313
  }
125314
125314
  var B5t = D5t();
125315
125315
  const dre = /* @__PURE__ */ kh(B5t);
125316
- var tEe = { NODE_ENV: '"production"', UIKIT_VERSION: '"2.3.5-1"', TAILWIND_VERSION: '"^3.4.17"' };
125316
+ var tEe = { NODE_ENV: '"production"', UIKIT_VERSION: '"2.3.5-1.1"', TAILWIND_VERSION: '"^3.4.17"' };
125317
125317
  const k5t = "react-tooltip-core-styles", P5t = "react-tooltip-base-styles", rEe = { core: !1, base: !1 };
125318
125318
  function nEe({ css: e, id: t = P5t, type: r = "base", ref: n }) {
125319
125319
  var i, a;
@@ -159,7 +159,7 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
159
159
  10.59L10 14.17L17.59 6.58L19 8L10 17Z`}))},Zze=function(){return wa.createElement(KL,null,wa.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},eQe=function(){return wa.createElement(KL,null,wa.createElement("path",{d:`M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,
160
160
  6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,
161
161
  13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z`}))},tQe=function(){return wa.createElement(KL,null,wa.createElement("path",{d:`M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,
162
- 0 22,12A10,10 0 0,0 12,2Z`}))},rQe={default:void 0,success:wa.createElement(Xze,null),warning:wa.createElement(Zze,null),error:wa.createElement(eQe,null),info:wa.createElement(tQe,null)},jw={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:rQe,anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:Jle,transitionDuration:{enter:225,exit:195}},nQe=function(t,r){var n=function(a){return typeof a=="number"||a===null};return n(t)?t:n(r)?r:jw.autoHideDuration},iQe=function(t,r){var n=function(a,o){return o.some(function(s){return typeof a===s})};return n(t,["string","number"])?t:n(t,["object"])?nl({},jw.transitionDuration,{},n(r,["object"])&&r,{},t):n(r,["string","number"])?r:n(r,["object"])?nl({},jw.transitionDuration,{},r):jw.transitionDuration},aQe=function(t,r){return function(n,i){return i===void 0&&(i=!1),i?nl({},jw[n],{},r[n],{},t[n]):n==="autoHideDuration"?nQe(t.autoHideDuration,r.autoHideDuration):n==="transitionDuration"?iQe(t.transitionDuration,r.transitionDuration):t[n]||r[n]||jw[n]}};function I_(e){return Object.entries(e).reduce(function(t,r){var n,i=r[0],a=r[1];return nl({},t,(n={},n[i]=v8(a),n))},{})}var uE={SnackbarContainer:"notistack-SnackbarContainer",Snackbar:"notistack-Snackbar",CollapseWrapper:"notistack-CollapseWrapper",MuiContent:"notistack-MuiContent",MuiContentVariant:function(t){return"notistack-MuiContent-"+t}},Xle=I_({root:{height:0},entered:{height:"auto"}}),C8="0px",E8=175,Zle=E.forwardRef(function(e,t){var r=e.children,n=e.in,i=e.onExited,a=E.useRef(null),o=E.useRef(null),s=w8(t,o),l=function(){return a.current?a.current.clientHeight:0},u=function(m){m.style.height=C8},c=function(m){var y=l(),C=WL({timeout:E8,mode:"enter"}),T=C.duration,R=C.easing;m.style.transitionDuration=typeof T=="string"?T:T+"ms",m.style.height=y+"px",m.style.transitionTimingFunction=R||""},f=function(m){m.style.height="auto"},p=function(m){m.style.height=l()+"px"},h=function(m){Kle(m);var y=WL({timeout:E8,mode:"exit"}),C=y.duration,T=y.easing;m.style.transitionDuration=typeof C=="string"?C:C+"ms",m.style.height=C8,m.style.transitionTimingFunction=T||""};return E.createElement(b8,{in:n,unmountOnExit:!0,onEnter:u,onEntered:f,onEntering:c,onExit:p,onExited:i,onExiting:h,nodeRef:o,timeout:E8},function(g,m){return E.createElement("div",Object.assign({ref:s,className:Bw(Xle.root,g==="entered"&&Xle.entered),style:nl({pointerEvents:"all",overflow:"hidden",minHeight:C8,transition:lE("height")},g==="entered"&&{overflow:"visible"},{},g==="exited"&&!n&&{visibility:"hidden"})},m),E.createElement("div",{ref:a,className:uE.CollapseWrapper,style:{display:"flex",width:"100%"}},r))})});Zle.displayName="Collapse";var eue={right:"left",left:"right",bottom:"up",top:"down"},oQe=function(t){return t.horizontal!=="center"?eue[t.horizontal]:eue[t.vertical]},sQe=function(t){return"anchorOrigin"+y8(t)},lQe=function(t){t===void 0&&(t={});var r={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(t).filter(function(n){return!r[n]}).reduce(function(n,i){var a;return nl({},n,(a={},a[i]=t[i],a))},{})},uQe=function(){};function T_(e,t){return e.reduce(function(r,n){return n==null?r:function(){for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];var l=[].concat(o);t&&l.indexOf(t)===-1&&l.push(t),r.apply(this,l),n.apply(this,l)}},uQe)}var cQe=typeof window<"u"?E.useLayoutEffect:E.useEffect;function tue(e){var t=E.useRef(e);return cQe(function(){t.current=e}),E.useCallback(function(){return t.current.apply(void 0,arguments)},[])}var rue=E.forwardRef(function(e,t){var r=e.children,n=e.className,i=e.autoHideDuration,a=e.disableWindowBlurListener,o=a===void 0?!1:a,s=e.onClose,l=e.id,u=e.open,c=e.SnackbarProps,f=c===void 0?{}:c,p=E.useRef(),h=tue(function(){s&&s.apply(void 0,arguments)}),g=tue(function(R){!s||R==null||(p.current&&clearTimeout(p.current),p.current=setTimeout(function(){h(null,"timeout",l)},R))});E.useEffect(function(){return u&&g(i),function(){p.current&&clearTimeout(p.current)}},[u,i,g]);var m=function(){p.current&&clearTimeout(p.current)},y=E.useCallback(function(){i!=null&&g(i*.5)},[i,g]),C=function(O){f.onMouseEnter&&f.onMouseEnter(O),m()},T=function(O){f.onMouseLeave&&f.onMouseLeave(O),y()};return E.useEffect(function(){if(!o&&u)return window.addEventListener("focus",y),window.addEventListener("blur",m),function(){window.removeEventListener("focus",y),window.removeEventListener("blur",m)}},[o,y,u]),E.createElement("div",Object.assign({ref:t},f,{className:Bw(uE.Snackbar,n),onMouseEnter:C,onMouseLeave:T}),r)});rue.displayName="Snackbar";var x8,dQe=I_({root:(x8={display:"flex",flexWrap:"wrap",flexGrow:1},x8[Pw.upSm]={flexGrow:"initial",minWidth:"288px"},x8)}),nue=E.forwardRef(function(e,t){var r=e.className,n=E_(e,["className"]);return wa.createElement("div",Object.assign({ref:t,className:Bw(dQe.root,r)},n))});nue.displayName="SnackbarContent";var __=I_({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:8*2.5+"px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),iue="notistack-snackbar",aue=E.forwardRef(function(e,t){var r=e.id,n=e.message,i=e.action,a=e.iconVariant,o=e.variant,s=e.hideIconVariant,l=e.style,u=e.className,c=a[o],f=i;return typeof f=="function"&&(f=f(r)),wa.createElement(nue,{ref:t,role:"alert","aria-describedby":iue,style:l,className:Bw(uE.MuiContent,uE.MuiContentVariant(o),__.root,__[o],u,!s&&c&&__.lessPadding)},wa.createElement("div",{id:iue,className:__.message},s?null:c,n),f&&wa.createElement("div",{className:__.action},f))});aue.displayName="MaterialDesignContent";var fQe=E.memo(aue),AQe=I_({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),hQe=function(t){var r=E.useRef(),n=E.useState(!0),i=n[0],a=n[1],o=T_([t.snack.onClose,t.onClose]),s=function(){t.snack.requestClose&&o(null,"instructed",t.snack.id)},l=E.useCallback(function(){r.current=setTimeout(function(){a(function(z){return!z})},125)},[]);E.useEffect(function(){return function(){r.current&&clearTimeout(r.current)}},[]);var u=t.snack,c=t.classes,f=t.Component,p=f===void 0?fQe:f,h=E.useMemo(function(){return lQe(c)},[c]),g=u.open,m=u.SnackbarProps,y=u.TransitionComponent,C=u.TransitionProps,T=u.transitionDuration,R=u.disableWindowBlurListener,O=u.content,N=E_(u,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),k=nl({direction:oQe(N.anchorOrigin),timeout:T},C),j=O;typeof j=="function"&&(j=j(N.id,N.message));var V=["onEnter","onEntered","onExit","onExited"].reduce(function(z,q){var $;return nl({},z,($={},$[q]=T_([t.snack[q],t[q]],N.id),$))},{});return wa.createElement(Zle,{in:i,onExited:V.onExited},wa.createElement(rue,{open:g,id:N.id,disableWindowBlurListener:R,autoHideDuration:N.autoHideDuration,className:Bw(AQe.wrappedRoot,h.root,h[sQe(N.anchorOrigin)]),SnackbarProps:m,onClose:o},wa.createElement(y,Object.assign({},k,{appear:!0,in:g,onExit:V.onExit,onExited:l,onEnter:V.onEnter,onEntered:T_([V.onEntered,s],N.id)}),j||wa.createElement(p,Object.assign({},N)))))},R_,I8,qL,YL,T8,y0={view:{default:20},snackbar:{default:6,dense:2}},oue="."+uE.CollapseWrapper,_8=16,JL=I_({root:(R_={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:lE(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"},R_[oue]={padding:y0.snackbar.default+"px 0px",transition:"padding 300ms ease 0ms"},R_.maxWidth="calc(100% - "+y0.view.default*2+"px)",R_[Pw.downXs]={width:"100%",maxWidth:"calc(100% - "+_8*2+"px)"},R_),rootDense:(I8={},I8[oue]={padding:y0.snackbar.dense+"px 0px"},I8),top:{top:y0.view.default-y0.snackbar.default+"px",flexDirection:"column"},bottom:{bottom:y0.view.default-y0.snackbar.default+"px",flexDirection:"column-reverse"},left:(qL={left:y0.view.default+"px"},qL[Pw.upSm]={alignItems:"flex-start"},qL[Pw.downXs]={left:_8+"px"},qL),right:(YL={right:y0.view.default+"px"},YL[Pw.upSm]={alignItems:"flex-end"},YL[Pw.downXs]={right:_8+"px"},YL),center:(T8={left:"50%",transform:"translateX(-50%)"},T8[Pw.upSm]={alignItems:"center"},T8)}),pQe=function(t){var r=t.classes,n=r===void 0?{}:r,i=t.anchorOrigin,a=t.dense,o=t.children,s=Bw(uE.SnackbarContainer,JL[i.vertical],JL[i.horizontal],JL.root,n.containerRoot,n["containerAnchorOrigin"+y8(i)],a&&JL.rootDense);return wa.createElement("div",{className:s},o)},gQe=E.memo(pQe),mQe={NO_PERSIST_ALL:"Reached maxSnack while all enqueued snackbars have 'persist' flag. Notistack will dismiss the oldest snackbar anyway to allow other ones in the queue to be presented."},vQe=(function(e){var t=mQe[e];typeof console<"u"&&console.error("WARNING - notistack: "+t);try{throw new Error(t)}catch{}}),sue=function(t){var r=typeof t=="string"||E.isValidElement(t);return!r},uc,R8,yQe=(function(e){Hle(t,e);function t(n){var i;return i=e.call(this,n)||this,i.enqueueSnackbar=function(a,o){if(o===void 0&&(o={}),a==null)throw new Error("enqueueSnackbar called with invalid argument");var s=sue(a)?a:o,l=sue(a)?a.message:a,u=s.key,c=s.preventDuplicate,f=E_(s,["key","preventDuplicate"]),p=QL(u),h=p?u:new Date().getTime()+Math.random(),g=aQe(f,i.props),m=nl({id:h},f,{message:l,open:!0,entered:!1,requestClose:!1,persist:g("persist"),action:g("action"),content:g("content"),variant:g("variant"),anchorOrigin:g("anchorOrigin"),disableWindowBlurListener:g("disableWindowBlurListener"),autoHideDuration:g("autoHideDuration"),hideIconVariant:g("hideIconVariant"),TransitionComponent:g("TransitionComponent"),transitionDuration:g("transitionDuration"),TransitionProps:g("TransitionProps",!0),iconVariant:g("iconVariant",!0),style:g("style",!0),SnackbarProps:g("SnackbarProps",!0),className:Bw(i.props.className,f.className)});return m.persist&&(m.autoHideDuration=void 0),i.setState(function(y){if(c===void 0&&i.props.preventDuplicate||c){var C=function(N){return p?N.id===h:N.message===l},T=y.queue.findIndex(C)>-1,R=y.snacks.findIndex(C)>-1;if(T||R)return y}return i.handleDisplaySnack(nl({},y,{queue:[].concat(y.queue,[m])}))}),h},i.handleDisplaySnack=function(a){var o=a.snacks;return o.length>=i.maxSnack?i.handleDismissOldest(a):i.processQueue(a)},i.processQueue=function(a){var o=a.queue,s=a.snacks;return o.length>0?nl({},a,{snacks:[].concat(s,[o[0]]),queue:o.slice(1,o.length)}):a},i.handleDismissOldest=function(a){if(a.snacks.some(function(c){return!c.open||c.requestClose}))return a;var o=!1,s=!1,l=a.snacks.reduce(function(c,f){return c+(f.open&&f.persist?1:0)},0);l===i.maxSnack&&(vQe("NO_PERSIST_ALL"),s=!0);var u=a.snacks.map(function(c){return!o&&(!c.persist||s)?(o=!0,c.entered?(c.onClose&&c.onClose(null,"maxsnack",c.id),i.props.onClose&&i.props.onClose(null,"maxsnack",c.id),nl({},c,{open:!1})):nl({},c,{requestClose:!0})):nl({},c)});return nl({},a,{snacks:u})},i.handleEnteredSnack=function(a,o,s){if(!QL(s))throw new Error("handleEnteredSnack Cannot be called with undefined key");i.setState(function(l){var u=l.snacks;return{snacks:u.map(function(c){return c.id===s?nl({},c,{entered:!0}):nl({},c)})}})},i.handleCloseSnack=function(a,o,s){i.props.onClose&&i.props.onClose(a,o,s);var l=s===void 0;i.setState(function(u){var c=u.snacks,f=u.queue;return{snacks:c.map(function(p){return!l&&p.id!==s?nl({},p):p.entered?nl({},p,{open:!1}):nl({},p,{requestClose:!0})}),queue:f.filter(function(p){return p.id!==s})}})},i.closeSnackbar=function(a){var o=i.state.snacks.find(function(s){return s.id===a});QL(a)&&o&&o.onClose&&o.onClose(null,"instructed",a),i.handleCloseSnack(null,"instructed",a)},i.handleExitedSnack=function(a,o){if(!QL(o))throw new Error("handleExitedSnack Cannot be called with undefined key");i.setState(function(s){var l=i.processQueue(nl({},s,{snacks:s.snacks.filter(function(u){return u.id!==o})}));return l.queue.length===0?l:i.handleDismissOldest(l)})},uc=i.enqueueSnackbar,R8=i.closeSnackbar,i.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:i.enqueueSnackbar.bind(Vle(i)),closeSnackbar:i.closeSnackbar.bind(Vle(i))}},i}var r=t.prototype;return r.render=function(){var i=this,a=this.state.contextValue,o=this.props,s=o.domRoot,l=o.children,u=o.dense,c=u===void 0?!1:u,f=o.Components,p=f===void 0?{}:f,h=o.classes,g=this.state.snacks.reduce(function(y,C){var T,R=y8(C.anchorOrigin),O=y[R]||[];return nl({},y,(T={},T[R]=[].concat(O,[C]),T))},{}),m=Object.keys(g).map(function(y){var C=g[y],T=C[0];return wa.createElement(gQe,{key:y,dense:c,anchorOrigin:T.anchorOrigin,classes:h},C.map(function(R){return wa.createElement(hQe,{key:R.id,snack:R,classes:h,Component:p[R.variant],onClose:i.handleCloseSnack,onEnter:i.props.onEnter,onExit:i.props.onExit,onExited:T_([i.handleExitedSnack,i.props.onExited],R.id),onEntered:T_([i.handleEnteredSnack,i.props.onEntered],R.id)})}))});return wa.createElement(Qle.Provider,{value:a},l,s?Dw.createPortal(m,s):m)},Ule(t,[{key:"maxSnack",get:function(){return this.props.maxSnack||jw.maxSnack}}]),t})(E.Component),Mg=(function(){return E.useContext(Qle)});function oy(e){E.useEffect(()=>{e()},[])}function lue(e,t){const r=E.useRef(t);r.current=t;const n=E.useCallback(()=>{const i=e.getAllUser();r.current?.(i)},[e]);E.useEffect(()=>(e.on("user-added",n),e.on("user-removed",n),e.on("user-updated",n),()=>{e.off("user-added",n),e.off("user-removed",n),e.off("user-updated",n)}),[e,n]),oy(()=>{n()})}var uue={UIKIT_VERSION:'"2.3.5-1"',TAILWIND_VERSION:'"^3.4.17"'};const M8=uue.UIKIT_VERSION.replace(/"/g,""),bQe=uue.TAILWIND_VERSION.replace(/"/g,"").replace("^","");let b0="https://source.zoom.us/uitoolkit/image";document.getElementById("aria-notify-area");const wQe=()=>/edge\/(\d+)/i.test(navigator.userAgent)||/edg\/(\d+)/i.test(navigator.userAgent),SQe=()=>/opera|opr\/[\d]+/i.test(navigator.userAgent);function CQe(){const{userAgent:e}=navigator;return/iPad/.test(e)?!0:/Macintosh/.test(e)&&/Safari/.test(e)?"ontouchend"in document:!1}const EQe=()=>{const{userAgent:e}=navigator;return!SQe()&&!wQe()&&/chrome/i.test(e)&&/webkit/i.test(e)},O8=()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function xQe(){const e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return`ie/${parseInt(e.substring(t+5,e.indexOf(".",t)),10)}`;if(e.indexOf("Trident/")>0){const a=e.indexOf("rv:");return`ie/${parseInt(e.substring(a+3,e.indexOf(".",a)),10)}`}const n=e.indexOf("Edge/"),i=e.indexOf("Edg/");return i>0?`edge/${parseInt(e.substring(i+4,e.indexOf(".",i)),10)}`:n>0?`edge/${parseInt(e.substring(n+5,e.indexOf(".",n)),10)}`:!1}function IQe(){const e=navigator.userAgent.toLowerCase(),t=/firefox\/[\d.]+/gi,r=/chrome\/[\d.]+/gi,n=/ipad; cpu os (\d+_\d+)/gi,i=/version\/[\d.]+/gi,a=/safari\/[\d.]+/gi,o=/opr\/[\d.]+/gi;if(e.indexOf("firefox")>0)return e?.match(t)?.toString();if(e.indexOf("safari")>0&&e.indexOf("chrome")<0){let l;l="safari/unknow";let u;return e.indexOf("ipad")>0?l=e?.match(n)?.toString().replace("ipad; cpu os ","ipados/"):(l=e.match(i),u=e.match(a),l&&(l=l.toString().replace("version","safari")),u&&(l=u.toString().replace("version","safari"))),l}if(e.indexOf(" opr")>0){let l;return l=e.match(o),l=l.toString().replace("opr","opera"),l}const s=xQe();return s||(e.indexOf("chrome")>0?e?.match(r)?.toString():"other/")}const cue=()=>{IQe();const{userAgent:e}=navigator;let t=!1,r=!1;return/iPad/.test(e)?(t=!0,/iPad Pro/.test(e)&&(r=!0)):/Macintosh/.test(e)&&/Safari/.test(e)&&"ontouchend"in document&&(t=!0,window.screen&&window.screen.width>=1024&&window.screen.height>=1366&&(r=!0)),(t||r)&&O8()},Hl=()=>!!(navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/webOS/i)||navigator.userAgent.match(/iPhone/i)||CQe()||navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/BlackBerry/i)||navigator.userAgent.match(/Windows Phone/i)),Hu=()=>Hl()&&!cue();function due(){return b0}const TQe=e=>e==="image/jpg"||e==="image/png"||e==="image/jpeg"||e==="image/gif"||e==="image/webp",Oc=()=>window.innerHeight>window.innerWidth,fue=()=>!Oc(),_Qe=()=>Hu()&&fue(),Aue=e=>!Hl()&&e,cE=e=>!Hl()&&e,RQe=e=>cE(e);function Nc(e){const t=E.useRef(null);return E.useEffect(()=>{t.current=e},[e]),t.current}function MQe(e){const t=E.useRef(e);t.current=e,E.useEffect(()=>()=>{t.current&&t.current()},[])}const OQe=({isOpen:e,title:t,okText:r="OK",cancelText:n,onOk:i,onCancel:a,children:o,okButtonProps:s,themeName:l})=>e?C_.createPortal(w.jsx("div",{className:"zoom-ui-toolkit-root",children:w.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-theme-surface",children:w.jsxs("div",{className:"rounded-lg shadow-lg max-w-lg w-full p-6 bg-theme-surface border-solid border",children:[w.jsx("div",{className:"font-bold text-2xl text-theme-text",children:w.jsx("span",{children:t})}),w.jsx("div",{className:"my-2",children:o}),w.jsxs("div",{className:"flex justify-end",children:[n&&a&&w.jsx("button",{className:"rounded mx-1 px-2 py-1 bg-gray-400 text-theme-text-button hover:opacity-70 transition-opacity flex justify-center items-center",onClick:()=>a(),children:n}),r&&i&&w.jsx("button",{onClick:i,disabled:s?.disabled,className:`${s?.className||""} rounded mx-1 px-2 py-1 bg-blue-500 text-theme-text-button opacity-70 hover:opacity-100 transition-opacity flex justify-center items-center`,children:r})]})]})})}),document.body):null,Wo=wa.createContext(null);function hue(e){return{all:e=e||new Map,on:function(t,r){var n=e.get(t);n?n.push(r):e.set(t,[r])},off:function(t,r){var n=e.get(t);n&&(r?n.splice(n.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var n=e.get(t);n&&n.slice().map(function(i){i(r)}),(n=e.get("*"))&&n.slice().map(function(i){i(t,r)})}}}const N8=hue(),Jm=(e,t)=>{N8.emit(e,t)},XL=(e,t)=>{N8.on(e,t)},ZL=(e,t)=>{N8.off(e,t)};var Lc=(e=>(e.EVENT_CONNECTION_CHANGE="connection-change",e.EVENT_AUDIO_STATISTIC_DATA_CHANGE="audio-statistic-data-change",e.EVENT_VIDEO_STATISTIC_DATA_CHANGE="video-statistic-data-change",e.EVENT_SHARE_STATISTIC_DATA_CHANGE="share-statistic-data-change",e.EVENT_CAPTION_MESSAGE="caption-message",e.EVENT_RECORDING_CHANGE="recording-change",e.EVENT_LOCAL_RECORDING_CHANGE="local-recording-change",e.EVENT_USER_ADDED="user-added",e.EVENT_USER_REMOVED="user-removed",e.EVENT_USER_UPDATED="user-updated",e.EVENT_VIEW_TYPE_CHANGE="view-type-change",e.EVENT_PEER_SHARE_STATE_CHANGE="peer-share-state-change",e.EVENT_ACTIVE_SPEAKER="active-speaker",e.EVENT_ROOM_STATE_CHANGE="room-state-change",e.EVENT_MAIN_SESSION_USER_UPDATED="main-session-user-updated",e.EVENT_BROADCAST_MESSAGE="broadcast-message",e.EVENT_MEDIA_CAPTURE_STATUE_CHANGE="media-capture-status-change",e.EVENT_MEDIA_CAPTURE_PERMISSION_CHANGE="media-capture-permission-change",e.EVENT_NETWORK_QUALITY_CHANGE="network-quality-change",e.EVENT_SESSION_JOINED="uikit-session-joined",e.EVENT_SESSION_CLOSED="uikit-session-closed",e.EVENT_SESSION_CLICK_JOIN="uikit-session-click-join",e.EVENT_SESSION_DESTROYED="uikit-session-destroyed",e.EVENT_SESSION_RECONNECTING="uikit-session-reconnecting",e.EVENT_SESSION_FAILED="uikit-session-failed",e.EVENT_FAR_END_CAMERA_REQUEST_CONTROL="far-end-camera-request-control",e.EVENT_FAR_END_CAMERA_RESPONSE_CONTROL="far-end-camera-response-control",e.EVENT_FAR_END_CAMERA_IN_CONTROL_CHANGE="far-end-camera-in-control-change",e.EVENT_FAR_END_CAMERA_CAPABILITY_CHANGE="far-end-camera-capability-change",e))(Lc||{});Object.values(Lc);const NQe=({setIsJoined:e})=>{const[t,r]=E.useState(null),n=E.useContext(Wo),i=E.useCallback(s=>{r(s.target?.value)},[]),a=E.useCallback(async()=>{t&&(n&&await n.getLoggerClient().reportRating(Number(t)),e(),Jm(Lc.EVENT_SESSION_DESTROYED,"closed"))},[n,t,e]),o=s=>({1:"Terrible",2:"Poor",3:"Okay",4:"Good",5:"Great"})[s];return w.jsx(OQe,{isOpen:!0,title:"",okText:"Submit",onOk:s=>{a(),s.preventDefault()},okButtonProps:{disabled:!t,className:t?"":"opacity-50 cursor-not-allowed"},children:w.jsxs("div",{className:"space-y-6 px-2",children:[w.jsx("p",{className:"text-[20px] text-gray-600 text-center font-medium text-theme-text",children:"How was your session experience?"}),w.jsx("div",{className:"flex justify-center py-4",children:w.jsx("div",{className:"w-full max-w-[320px] flex justify-between items-center ",children:[1,2,3,4,5].map(s=>w.jsxs("div",{className:"flex flex-col items-center gap-2 transition-transform hover:scale-110",onClick:()=>r(String(s)),children:[w.jsxs("div",{className:`
162
+ 0 22,12A10,10 0 0,0 12,2Z`}))},rQe={default:void 0,success:wa.createElement(Xze,null),warning:wa.createElement(Zze,null),error:wa.createElement(eQe,null),info:wa.createElement(tQe,null)},jw={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:rQe,anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:Jle,transitionDuration:{enter:225,exit:195}},nQe=function(t,r){var n=function(a){return typeof a=="number"||a===null};return n(t)?t:n(r)?r:jw.autoHideDuration},iQe=function(t,r){var n=function(a,o){return o.some(function(s){return typeof a===s})};return n(t,["string","number"])?t:n(t,["object"])?nl({},jw.transitionDuration,{},n(r,["object"])&&r,{},t):n(r,["string","number"])?r:n(r,["object"])?nl({},jw.transitionDuration,{},r):jw.transitionDuration},aQe=function(t,r){return function(n,i){return i===void 0&&(i=!1),i?nl({},jw[n],{},r[n],{},t[n]):n==="autoHideDuration"?nQe(t.autoHideDuration,r.autoHideDuration):n==="transitionDuration"?iQe(t.transitionDuration,r.transitionDuration):t[n]||r[n]||jw[n]}};function I_(e){return Object.entries(e).reduce(function(t,r){var n,i=r[0],a=r[1];return nl({},t,(n={},n[i]=v8(a),n))},{})}var uE={SnackbarContainer:"notistack-SnackbarContainer",Snackbar:"notistack-Snackbar",CollapseWrapper:"notistack-CollapseWrapper",MuiContent:"notistack-MuiContent",MuiContentVariant:function(t){return"notistack-MuiContent-"+t}},Xle=I_({root:{height:0},entered:{height:"auto"}}),C8="0px",E8=175,Zle=E.forwardRef(function(e,t){var r=e.children,n=e.in,i=e.onExited,a=E.useRef(null),o=E.useRef(null),s=w8(t,o),l=function(){return a.current?a.current.clientHeight:0},u=function(m){m.style.height=C8},c=function(m){var y=l(),C=WL({timeout:E8,mode:"enter"}),T=C.duration,R=C.easing;m.style.transitionDuration=typeof T=="string"?T:T+"ms",m.style.height=y+"px",m.style.transitionTimingFunction=R||""},f=function(m){m.style.height="auto"},p=function(m){m.style.height=l()+"px"},h=function(m){Kle(m);var y=WL({timeout:E8,mode:"exit"}),C=y.duration,T=y.easing;m.style.transitionDuration=typeof C=="string"?C:C+"ms",m.style.height=C8,m.style.transitionTimingFunction=T||""};return E.createElement(b8,{in:n,unmountOnExit:!0,onEnter:u,onEntered:f,onEntering:c,onExit:p,onExited:i,onExiting:h,nodeRef:o,timeout:E8},function(g,m){return E.createElement("div",Object.assign({ref:s,className:Bw(Xle.root,g==="entered"&&Xle.entered),style:nl({pointerEvents:"all",overflow:"hidden",minHeight:C8,transition:lE("height")},g==="entered"&&{overflow:"visible"},{},g==="exited"&&!n&&{visibility:"hidden"})},m),E.createElement("div",{ref:a,className:uE.CollapseWrapper,style:{display:"flex",width:"100%"}},r))})});Zle.displayName="Collapse";var eue={right:"left",left:"right",bottom:"up",top:"down"},oQe=function(t){return t.horizontal!=="center"?eue[t.horizontal]:eue[t.vertical]},sQe=function(t){return"anchorOrigin"+y8(t)},lQe=function(t){t===void 0&&(t={});var r={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(t).filter(function(n){return!r[n]}).reduce(function(n,i){var a;return nl({},n,(a={},a[i]=t[i],a))},{})},uQe=function(){};function T_(e,t){return e.reduce(function(r,n){return n==null?r:function(){for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];var l=[].concat(o);t&&l.indexOf(t)===-1&&l.push(t),r.apply(this,l),n.apply(this,l)}},uQe)}var cQe=typeof window<"u"?E.useLayoutEffect:E.useEffect;function tue(e){var t=E.useRef(e);return cQe(function(){t.current=e}),E.useCallback(function(){return t.current.apply(void 0,arguments)},[])}var rue=E.forwardRef(function(e,t){var r=e.children,n=e.className,i=e.autoHideDuration,a=e.disableWindowBlurListener,o=a===void 0?!1:a,s=e.onClose,l=e.id,u=e.open,c=e.SnackbarProps,f=c===void 0?{}:c,p=E.useRef(),h=tue(function(){s&&s.apply(void 0,arguments)}),g=tue(function(R){!s||R==null||(p.current&&clearTimeout(p.current),p.current=setTimeout(function(){h(null,"timeout",l)},R))});E.useEffect(function(){return u&&g(i),function(){p.current&&clearTimeout(p.current)}},[u,i,g]);var m=function(){p.current&&clearTimeout(p.current)},y=E.useCallback(function(){i!=null&&g(i*.5)},[i,g]),C=function(O){f.onMouseEnter&&f.onMouseEnter(O),m()},T=function(O){f.onMouseLeave&&f.onMouseLeave(O),y()};return E.useEffect(function(){if(!o&&u)return window.addEventListener("focus",y),window.addEventListener("blur",m),function(){window.removeEventListener("focus",y),window.removeEventListener("blur",m)}},[o,y,u]),E.createElement("div",Object.assign({ref:t},f,{className:Bw(uE.Snackbar,n),onMouseEnter:C,onMouseLeave:T}),r)});rue.displayName="Snackbar";var x8,dQe=I_({root:(x8={display:"flex",flexWrap:"wrap",flexGrow:1},x8[Pw.upSm]={flexGrow:"initial",minWidth:"288px"},x8)}),nue=E.forwardRef(function(e,t){var r=e.className,n=E_(e,["className"]);return wa.createElement("div",Object.assign({ref:t,className:Bw(dQe.root,r)},n))});nue.displayName="SnackbarContent";var __=I_({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:8*2.5+"px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),iue="notistack-snackbar",aue=E.forwardRef(function(e,t){var r=e.id,n=e.message,i=e.action,a=e.iconVariant,o=e.variant,s=e.hideIconVariant,l=e.style,u=e.className,c=a[o],f=i;return typeof f=="function"&&(f=f(r)),wa.createElement(nue,{ref:t,role:"alert","aria-describedby":iue,style:l,className:Bw(uE.MuiContent,uE.MuiContentVariant(o),__.root,__[o],u,!s&&c&&__.lessPadding)},wa.createElement("div",{id:iue,className:__.message},s?null:c,n),f&&wa.createElement("div",{className:__.action},f))});aue.displayName="MaterialDesignContent";var fQe=E.memo(aue),AQe=I_({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),hQe=function(t){var r=E.useRef(),n=E.useState(!0),i=n[0],a=n[1],o=T_([t.snack.onClose,t.onClose]),s=function(){t.snack.requestClose&&o(null,"instructed",t.snack.id)},l=E.useCallback(function(){r.current=setTimeout(function(){a(function(z){return!z})},125)},[]);E.useEffect(function(){return function(){r.current&&clearTimeout(r.current)}},[]);var u=t.snack,c=t.classes,f=t.Component,p=f===void 0?fQe:f,h=E.useMemo(function(){return lQe(c)},[c]),g=u.open,m=u.SnackbarProps,y=u.TransitionComponent,C=u.TransitionProps,T=u.transitionDuration,R=u.disableWindowBlurListener,O=u.content,N=E_(u,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),k=nl({direction:oQe(N.anchorOrigin),timeout:T},C),j=O;typeof j=="function"&&(j=j(N.id,N.message));var V=["onEnter","onEntered","onExit","onExited"].reduce(function(z,q){var $;return nl({},z,($={},$[q]=T_([t.snack[q],t[q]],N.id),$))},{});return wa.createElement(Zle,{in:i,onExited:V.onExited},wa.createElement(rue,{open:g,id:N.id,disableWindowBlurListener:R,autoHideDuration:N.autoHideDuration,className:Bw(AQe.wrappedRoot,h.root,h[sQe(N.anchorOrigin)]),SnackbarProps:m,onClose:o},wa.createElement(y,Object.assign({},k,{appear:!0,in:g,onExit:V.onExit,onExited:l,onEnter:V.onEnter,onEntered:T_([V.onEntered,s],N.id)}),j||wa.createElement(p,Object.assign({},N)))))},R_,I8,qL,YL,T8,y0={view:{default:20},snackbar:{default:6,dense:2}},oue="."+uE.CollapseWrapper,_8=16,JL=I_({root:(R_={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:lE(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"},R_[oue]={padding:y0.snackbar.default+"px 0px",transition:"padding 300ms ease 0ms"},R_.maxWidth="calc(100% - "+y0.view.default*2+"px)",R_[Pw.downXs]={width:"100%",maxWidth:"calc(100% - "+_8*2+"px)"},R_),rootDense:(I8={},I8[oue]={padding:y0.snackbar.dense+"px 0px"},I8),top:{top:y0.view.default-y0.snackbar.default+"px",flexDirection:"column"},bottom:{bottom:y0.view.default-y0.snackbar.default+"px",flexDirection:"column-reverse"},left:(qL={left:y0.view.default+"px"},qL[Pw.upSm]={alignItems:"flex-start"},qL[Pw.downXs]={left:_8+"px"},qL),right:(YL={right:y0.view.default+"px"},YL[Pw.upSm]={alignItems:"flex-end"},YL[Pw.downXs]={right:_8+"px"},YL),center:(T8={left:"50%",transform:"translateX(-50%)"},T8[Pw.upSm]={alignItems:"center"},T8)}),pQe=function(t){var r=t.classes,n=r===void 0?{}:r,i=t.anchorOrigin,a=t.dense,o=t.children,s=Bw(uE.SnackbarContainer,JL[i.vertical],JL[i.horizontal],JL.root,n.containerRoot,n["containerAnchorOrigin"+y8(i)],a&&JL.rootDense);return wa.createElement("div",{className:s},o)},gQe=E.memo(pQe),mQe={NO_PERSIST_ALL:"Reached maxSnack while all enqueued snackbars have 'persist' flag. Notistack will dismiss the oldest snackbar anyway to allow other ones in the queue to be presented."},vQe=(function(e){var t=mQe[e];typeof console<"u"&&console.error("WARNING - notistack: "+t);try{throw new Error(t)}catch{}}),sue=function(t){var r=typeof t=="string"||E.isValidElement(t);return!r},uc,R8,yQe=(function(e){Hle(t,e);function t(n){var i;return i=e.call(this,n)||this,i.enqueueSnackbar=function(a,o){if(o===void 0&&(o={}),a==null)throw new Error("enqueueSnackbar called with invalid argument");var s=sue(a)?a:o,l=sue(a)?a.message:a,u=s.key,c=s.preventDuplicate,f=E_(s,["key","preventDuplicate"]),p=QL(u),h=p?u:new Date().getTime()+Math.random(),g=aQe(f,i.props),m=nl({id:h},f,{message:l,open:!0,entered:!1,requestClose:!1,persist:g("persist"),action:g("action"),content:g("content"),variant:g("variant"),anchorOrigin:g("anchorOrigin"),disableWindowBlurListener:g("disableWindowBlurListener"),autoHideDuration:g("autoHideDuration"),hideIconVariant:g("hideIconVariant"),TransitionComponent:g("TransitionComponent"),transitionDuration:g("transitionDuration"),TransitionProps:g("TransitionProps",!0),iconVariant:g("iconVariant",!0),style:g("style",!0),SnackbarProps:g("SnackbarProps",!0),className:Bw(i.props.className,f.className)});return m.persist&&(m.autoHideDuration=void 0),i.setState(function(y){if(c===void 0&&i.props.preventDuplicate||c){var C=function(N){return p?N.id===h:N.message===l},T=y.queue.findIndex(C)>-1,R=y.snacks.findIndex(C)>-1;if(T||R)return y}return i.handleDisplaySnack(nl({},y,{queue:[].concat(y.queue,[m])}))}),h},i.handleDisplaySnack=function(a){var o=a.snacks;return o.length>=i.maxSnack?i.handleDismissOldest(a):i.processQueue(a)},i.processQueue=function(a){var o=a.queue,s=a.snacks;return o.length>0?nl({},a,{snacks:[].concat(s,[o[0]]),queue:o.slice(1,o.length)}):a},i.handleDismissOldest=function(a){if(a.snacks.some(function(c){return!c.open||c.requestClose}))return a;var o=!1,s=!1,l=a.snacks.reduce(function(c,f){return c+(f.open&&f.persist?1:0)},0);l===i.maxSnack&&(vQe("NO_PERSIST_ALL"),s=!0);var u=a.snacks.map(function(c){return!o&&(!c.persist||s)?(o=!0,c.entered?(c.onClose&&c.onClose(null,"maxsnack",c.id),i.props.onClose&&i.props.onClose(null,"maxsnack",c.id),nl({},c,{open:!1})):nl({},c,{requestClose:!0})):nl({},c)});return nl({},a,{snacks:u})},i.handleEnteredSnack=function(a,o,s){if(!QL(s))throw new Error("handleEnteredSnack Cannot be called with undefined key");i.setState(function(l){var u=l.snacks;return{snacks:u.map(function(c){return c.id===s?nl({},c,{entered:!0}):nl({},c)})}})},i.handleCloseSnack=function(a,o,s){i.props.onClose&&i.props.onClose(a,o,s);var l=s===void 0;i.setState(function(u){var c=u.snacks,f=u.queue;return{snacks:c.map(function(p){return!l&&p.id!==s?nl({},p):p.entered?nl({},p,{open:!1}):nl({},p,{requestClose:!0})}),queue:f.filter(function(p){return p.id!==s})}})},i.closeSnackbar=function(a){var o=i.state.snacks.find(function(s){return s.id===a});QL(a)&&o&&o.onClose&&o.onClose(null,"instructed",a),i.handleCloseSnack(null,"instructed",a)},i.handleExitedSnack=function(a,o){if(!QL(o))throw new Error("handleExitedSnack Cannot be called with undefined key");i.setState(function(s){var l=i.processQueue(nl({},s,{snacks:s.snacks.filter(function(u){return u.id!==o})}));return l.queue.length===0?l:i.handleDismissOldest(l)})},uc=i.enqueueSnackbar,R8=i.closeSnackbar,i.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:i.enqueueSnackbar.bind(Vle(i)),closeSnackbar:i.closeSnackbar.bind(Vle(i))}},i}var r=t.prototype;return r.render=function(){var i=this,a=this.state.contextValue,o=this.props,s=o.domRoot,l=o.children,u=o.dense,c=u===void 0?!1:u,f=o.Components,p=f===void 0?{}:f,h=o.classes,g=this.state.snacks.reduce(function(y,C){var T,R=y8(C.anchorOrigin),O=y[R]||[];return nl({},y,(T={},T[R]=[].concat(O,[C]),T))},{}),m=Object.keys(g).map(function(y){var C=g[y],T=C[0];return wa.createElement(gQe,{key:y,dense:c,anchorOrigin:T.anchorOrigin,classes:h},C.map(function(R){return wa.createElement(hQe,{key:R.id,snack:R,classes:h,Component:p[R.variant],onClose:i.handleCloseSnack,onEnter:i.props.onEnter,onExit:i.props.onExit,onExited:T_([i.handleExitedSnack,i.props.onExited],R.id),onEntered:T_([i.handleEnteredSnack,i.props.onEntered],R.id)})}))});return wa.createElement(Qle.Provider,{value:a},l,s?Dw.createPortal(m,s):m)},Ule(t,[{key:"maxSnack",get:function(){return this.props.maxSnack||jw.maxSnack}}]),t})(E.Component),Mg=(function(){return E.useContext(Qle)});function oy(e){E.useEffect(()=>{e()},[])}function lue(e,t){const r=E.useRef(t);r.current=t;const n=E.useCallback(()=>{const i=e.getAllUser();r.current?.(i)},[e]);E.useEffect(()=>(e.on("user-added",n),e.on("user-removed",n),e.on("user-updated",n),()=>{e.off("user-added",n),e.off("user-removed",n),e.off("user-updated",n)}),[e,n]),oy(()=>{n()})}var uue={UIKIT_VERSION:'"2.3.5-1.1"',TAILWIND_VERSION:'"^3.4.17"'};const M8=uue.UIKIT_VERSION.replace(/"/g,""),bQe=uue.TAILWIND_VERSION.replace(/"/g,"").replace("^","");let b0="https://source.zoom.us/uitoolkit/image";document.getElementById("aria-notify-area");const wQe=()=>/edge\/(\d+)/i.test(navigator.userAgent)||/edg\/(\d+)/i.test(navigator.userAgent),SQe=()=>/opera|opr\/[\d]+/i.test(navigator.userAgent);function CQe(){const{userAgent:e}=navigator;return/iPad/.test(e)?!0:/Macintosh/.test(e)&&/Safari/.test(e)?"ontouchend"in document:!1}const EQe=()=>{const{userAgent:e}=navigator;return!SQe()&&!wQe()&&/chrome/i.test(e)&&/webkit/i.test(e)},O8=()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function xQe(){const e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return`ie/${parseInt(e.substring(t+5,e.indexOf(".",t)),10)}`;if(e.indexOf("Trident/")>0){const a=e.indexOf("rv:");return`ie/${parseInt(e.substring(a+3,e.indexOf(".",a)),10)}`}const n=e.indexOf("Edge/"),i=e.indexOf("Edg/");return i>0?`edge/${parseInt(e.substring(i+4,e.indexOf(".",i)),10)}`:n>0?`edge/${parseInt(e.substring(n+5,e.indexOf(".",n)),10)}`:!1}function IQe(){const e=navigator.userAgent.toLowerCase(),t=/firefox\/[\d.]+/gi,r=/chrome\/[\d.]+/gi,n=/ipad; cpu os (\d+_\d+)/gi,i=/version\/[\d.]+/gi,a=/safari\/[\d.]+/gi,o=/opr\/[\d.]+/gi;if(e.indexOf("firefox")>0)return e?.match(t)?.toString();if(e.indexOf("safari")>0&&e.indexOf("chrome")<0){let l;l="safari/unknow";let u;return e.indexOf("ipad")>0?l=e?.match(n)?.toString().replace("ipad; cpu os ","ipados/"):(l=e.match(i),u=e.match(a),l&&(l=l.toString().replace("version","safari")),u&&(l=u.toString().replace("version","safari"))),l}if(e.indexOf(" opr")>0){let l;return l=e.match(o),l=l.toString().replace("opr","opera"),l}const s=xQe();return s||(e.indexOf("chrome")>0?e?.match(r)?.toString():"other/")}const cue=()=>{IQe();const{userAgent:e}=navigator;let t=!1,r=!1;return/iPad/.test(e)?(t=!0,/iPad Pro/.test(e)&&(r=!0)):/Macintosh/.test(e)&&/Safari/.test(e)&&"ontouchend"in document&&(t=!0,window.screen&&window.screen.width>=1024&&window.screen.height>=1366&&(r=!0)),(t||r)&&O8()},Hl=()=>!!(navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/webOS/i)||navigator.userAgent.match(/iPhone/i)||CQe()||navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/BlackBerry/i)||navigator.userAgent.match(/Windows Phone/i)),Hu=()=>Hl()&&!cue();function due(){return b0}const TQe=e=>e==="image/jpg"||e==="image/png"||e==="image/jpeg"||e==="image/gif"||e==="image/webp",Oc=()=>window.innerHeight>window.innerWidth,fue=()=>!Oc(),_Qe=()=>Hu()&&fue(),Aue=e=>!Hl()&&e,cE=e=>!Hl()&&e,RQe=e=>cE(e);function Nc(e){const t=E.useRef(null);return E.useEffect(()=>{t.current=e},[e]),t.current}function MQe(e){const t=E.useRef(e);t.current=e,E.useEffect(()=>()=>{t.current&&t.current()},[])}const OQe=({isOpen:e,title:t,okText:r="OK",cancelText:n,onOk:i,onCancel:a,children:o,okButtonProps:s,themeName:l})=>e?C_.createPortal(w.jsx("div",{className:"zoom-ui-toolkit-root",children:w.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-theme-surface",children:w.jsxs("div",{className:"rounded-lg shadow-lg max-w-lg w-full p-6 bg-theme-surface border-solid border",children:[w.jsx("div",{className:"font-bold text-2xl text-theme-text",children:w.jsx("span",{children:t})}),w.jsx("div",{className:"my-2",children:o}),w.jsxs("div",{className:"flex justify-end",children:[n&&a&&w.jsx("button",{className:"rounded mx-1 px-2 py-1 bg-gray-400 text-theme-text-button hover:opacity-70 transition-opacity flex justify-center items-center",onClick:()=>a(),children:n}),r&&i&&w.jsx("button",{onClick:i,disabled:s?.disabled,className:`${s?.className||""} rounded mx-1 px-2 py-1 bg-blue-500 text-theme-text-button opacity-70 hover:opacity-100 transition-opacity flex justify-center items-center`,children:r})]})]})})}),document.body):null,Wo=wa.createContext(null);function hue(e){return{all:e=e||new Map,on:function(t,r){var n=e.get(t);n?n.push(r):e.set(t,[r])},off:function(t,r){var n=e.get(t);n&&(r?n.splice(n.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var n=e.get(t);n&&n.slice().map(function(i){i(r)}),(n=e.get("*"))&&n.slice().map(function(i){i(t,r)})}}}const N8=hue(),Jm=(e,t)=>{N8.emit(e,t)},XL=(e,t)=>{N8.on(e,t)},ZL=(e,t)=>{N8.off(e,t)};var Lc=(e=>(e.EVENT_CONNECTION_CHANGE="connection-change",e.EVENT_AUDIO_STATISTIC_DATA_CHANGE="audio-statistic-data-change",e.EVENT_VIDEO_STATISTIC_DATA_CHANGE="video-statistic-data-change",e.EVENT_SHARE_STATISTIC_DATA_CHANGE="share-statistic-data-change",e.EVENT_CAPTION_MESSAGE="caption-message",e.EVENT_RECORDING_CHANGE="recording-change",e.EVENT_LOCAL_RECORDING_CHANGE="local-recording-change",e.EVENT_USER_ADDED="user-added",e.EVENT_USER_REMOVED="user-removed",e.EVENT_USER_UPDATED="user-updated",e.EVENT_VIEW_TYPE_CHANGE="view-type-change",e.EVENT_PEER_SHARE_STATE_CHANGE="peer-share-state-change",e.EVENT_ACTIVE_SPEAKER="active-speaker",e.EVENT_ROOM_STATE_CHANGE="room-state-change",e.EVENT_MAIN_SESSION_USER_UPDATED="main-session-user-updated",e.EVENT_BROADCAST_MESSAGE="broadcast-message",e.EVENT_MEDIA_CAPTURE_STATUE_CHANGE="media-capture-status-change",e.EVENT_MEDIA_CAPTURE_PERMISSION_CHANGE="media-capture-permission-change",e.EVENT_NETWORK_QUALITY_CHANGE="network-quality-change",e.EVENT_SESSION_JOINED="uikit-session-joined",e.EVENT_SESSION_CLOSED="uikit-session-closed",e.EVENT_SESSION_CLICK_JOIN="uikit-session-click-join",e.EVENT_SESSION_DESTROYED="uikit-session-destroyed",e.EVENT_SESSION_RECONNECTING="uikit-session-reconnecting",e.EVENT_SESSION_FAILED="uikit-session-failed",e.EVENT_FAR_END_CAMERA_REQUEST_CONTROL="far-end-camera-request-control",e.EVENT_FAR_END_CAMERA_RESPONSE_CONTROL="far-end-camera-response-control",e.EVENT_FAR_END_CAMERA_IN_CONTROL_CHANGE="far-end-camera-in-control-change",e.EVENT_FAR_END_CAMERA_CAPABILITY_CHANGE="far-end-camera-capability-change",e))(Lc||{});Object.values(Lc);const NQe=({setIsJoined:e})=>{const[t,r]=E.useState(null),n=E.useContext(Wo),i=E.useCallback(s=>{r(s.target?.value)},[]),a=E.useCallback(async()=>{t&&(n&&await n.getLoggerClient().reportRating(Number(t)),e(),Jm(Lc.EVENT_SESSION_DESTROYED,"closed"))},[n,t,e]),o=s=>({1:"Terrible",2:"Poor",3:"Okay",4:"Good",5:"Great"})[s];return w.jsx(OQe,{isOpen:!0,title:"",okText:"Submit",onOk:s=>{a(),s.preventDefault()},okButtonProps:{disabled:!t,className:t?"":"opacity-50 cursor-not-allowed"},children:w.jsxs("div",{className:"space-y-6 px-2",children:[w.jsx("p",{className:"text-[20px] text-gray-600 text-center font-medium text-theme-text",children:"How was your session experience?"}),w.jsx("div",{className:"flex justify-center py-4",children:w.jsx("div",{className:"w-full max-w-[320px] flex justify-between items-center ",children:[1,2,3,4,5].map(s=>w.jsxs("div",{className:"flex flex-col items-center gap-2 transition-transform hover:scale-110",onClick:()=>r(String(s)),children:[w.jsxs("div",{className:`
163
163
  p-3 rounded-full cursor-pointer transition-all
164
164
  ${t===String(s)?"bg-blue-50 shadow-sm scale-110":"hover:bg-gray-50"}
165
165
  `,children:[s===1&&w.jsx(g7e,{size:28,color:"#FF3B30"}),s===2&&w.jsx(I7e,{size:28,color:"#FF9500"}),s===3&&w.jsx(N7e,{size:28,color:"#FFCC00"}),s===4&&w.jsx(ule,{size:28,color:"#34C759"}),s===5&&w.jsx(_7e,{size:28,color:"#30D158"})]}),w.jsx("input",{type:"radio",id:`rating-${s}`,name:"rating",checked:t===String(s),value:s,onChange:i,className:"hidden"}),w.jsx("span",{className:`text-xs font-medium ${t===String(s)?"text-theme-text":"text-gray-400"}`,children:o(String(s))})]},s))})})]})})},LQe=e=>{const{t}=Ym(),{reason:r,isEnableFeedback:n,setIsJoined:i}=e,a=Nc(r),{enqueueSnackbar:o}=Mg(),s=E.useCallback(l=>{setTimeout(()=>{l||Jm(Lc.EVENT_SESSION_DESTROYED,"closed")},0)},[]);return E.useEffect(()=>{if(r===a||r==="")return;let l="error",u="";switch(r){case void 0:{l="info",u=`${t("session_disconnected")}: ${t("leave_session")}`;break}case"ended by host":{l="info",u=t("dialog.host_end_meeting",{name:"jack"});break}default:{const c=dle(l8,r||"")?.toString()||"errorcodes_fail";u=t(c)}}o(u,{variant:l,onExit:()=>s(n),autoHideDuration:2e3})},[o,a,r,t,n,s]),n?w.jsx(NQe,{setIsJoined:i}):null},e3=52,es="text-theme-text bg-theme-primary text-theme-background bg-theme-surface",DQe="text-theme-text text-theme-background",BQe=()=>w.jsx("div",{className:`${es} fixed inset-0 flex items-center justify-center`,children:w.jsxs("div",{className:"text-center",children:[w.jsx(R7e,{className:"w-16 h-16 animate-spin mx-auto mb-4"}),w.jsx("h2",{className:"text-2xl font-semibold mb-2",children:"SSSSJoining Session"}),w.jsx("p",{className:"",children:"Please wait while we set up your connection..."})]})});var ou=(e=>(e.Default="",e.Closed="Closed",e.Connected="Connected",e.Reconnecting="Reconnecting",e.Fail="Fail",e))(ou||{}),Od=(e=>(e.Recording="Recording",e.Paused="Paused",e.Stopped="Stopped",e.Ask="Ask",e.Accept="Accept",e.Decline="Decline",e))(Od||{});const pl={Minimized:"minimized",Speaker:"speaker",Gallery:"gallery"};var Jn={},pue;function kQe(){if(pue)return Jn;pue=1;var e={};e.userAgent=!1;var t={},r="11.1.0",n="jsrsasign(all) 11.1.0 (2024-02-01) (c) 2010-2023 Kenji Urushima | kjur.github.io/jsrsasign/license";var i=i||(function(v,I){var x={},B=x.lib={},H=B.Base=(function(){function X(){}return{extend:function(ie){X.prototype=this;var te=new X;return ie&&te.mixIn(ie),te.hasOwnProperty("init")||(te.init=function(){te.$super.init.apply(this,arguments)}),te.init.prototype=te,te.$super=this,te},create:function(){var ie=this.extend();return ie.init.apply(ie,arguments),ie},init:function(){},mixIn:function(ie){for(var te in ie)ie.hasOwnProperty(te)&&(this[te]=ie[te]);ie.hasOwnProperty("toString")&&(this.toString=ie.toString)},clone:function(){return this.init.prototype.extend(this)}}})(),U=B.WordArray=H.extend({init:function(X,ie){X=this.words=X||[],ie!=I?this.sigBytes=ie:this.sigBytes=X.length*4},toString:function(X){return(X||Z).stringify(this)},concat:function(X){var ie=this.words,te=X.words,ue=this.sigBytes,ge=X.sigBytes;if(this.clamp(),ue%4)for(var Fe=0;Fe<ge;Fe++){var mt=te[Fe>>>2]>>>24-Fe%4*8&255;ie[ue+Fe>>>2]|=mt<<24-(ue+Fe)%4*8}else for(var Fe=0;Fe<ge;Fe+=4)ie[ue+Fe>>>2]=te[Fe>>>2];return this.sigBytes+=ge,this},clamp:function(){var X=this.words,ie=this.sigBytes;X[ie>>>2]&=4294967295<<32-ie%4*8,X.length=v.ceil(ie/4)},clone:function(){var X=H.clone.call(this);return X.words=this.words.slice(0),X},random:function(X){for(var ie=[],te=0;te<X;te+=4)ie.push(v.random()*4294967296|0);return new U.init(ie,X)}}),ee=x.enc={},Z=ee.Hex={stringify:function(X){for(var ie=X.words,te=X.sigBytes,ue=[],ge=0;ge<te;ge++){var Fe=ie[ge>>>2]>>>24-ge%4*8&255;ue.push((Fe>>>4).toString(16)),ue.push((Fe&15).toString(16))}return ue.join("")},parse:function(X){for(var ie=X.length,te=[],ue=0;ue<ie;ue+=2)te[ue>>>3]|=parseInt(X.substr(ue,2),16)<<24-ue%8*4;return new U.init(te,ie/2)}},Ae=ee.Latin1={stringify:function(X){for(var ie=X.words,te=X.sigBytes,ue=[],ge=0;ge<te;ge++){var Fe=ie[ge>>>2]>>>24-ge%4*8&255;ue.push(String.fromCharCode(Fe))}return ue.join("")},parse:function(X){for(var ie=X.length,te=[],ue=0;ue<ie;ue++)te[ue>>>2]|=(X.charCodeAt(ue)&255)<<24-ue%4*8;return new U.init(te,ie)}},ne=ee.Utf8={stringify:function(X){try{return decodeURIComponent(escape(Ae.stringify(X)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(X){return Ae.parse(unescape(encodeURIComponent(X)))}},Ie=B.BufferedBlockAlgorithm=H.extend({reset:function(){this._data=new U.init,this._nDataBytes=0},_append:function(X){typeof X=="string"&&(X=ne.parse(X)),this._data.concat(X),this._nDataBytes+=X.sigBytes},_process:function(X){var ie=this._data,te=ie.words,ue=ie.sigBytes,ge=this.blockSize,Fe=ge*4,mt=ue/Fe;X?mt=v.ceil(mt):mt=v.max((mt|0)-this._minBufferSize,0);var Dt=mt*ge,Bt=v.min(Dt*4,ue);if(Dt){for(var Pt=0;Pt<Dt;Pt+=ge)this._doProcessBlock(te,Pt);var Ue=te.splice(0,Dt);ie.sigBytes-=Bt}return new U.init(Ue,Bt)},clone:function(){var X=H.clone.call(this);return X._data=this._data.clone(),X},_minBufferSize:0});B.Hasher=Ie.extend({cfg:H.extend(),init:function(X){this.cfg=this.cfg.extend(X),this.reset()},reset:function(){Ie.reset.call(this),this._doReset()},update:function(X){return this._append(X),this._process(),this},finalize:function(X){X&&this._append(X);var ie=this._doFinalize();return ie},blockSize:512/32,_createHelper:function(X){return function(ie,te){return new X.init(te).finalize(ie)}},_createHmacHelper:function(X){return function(ie,te){return new ye.HMAC.init(X,te).finalize(ie)}}});var ye=x.algo={};return x})(Math);(function(v){var H=i,I=H.lib,x=I.Base,B=I.WordArray,H=H.x64={};H.Word=x.extend({init:function(U,ee){this.high=U,this.low=ee}}),H.WordArray=x.extend({init:function(U,ee){U=this.words=U||[],this.sigBytes=ee!=v?ee:8*U.length},toX32:function(){for(var U=this.words,ee=U.length,Z=[],Ae=0;Ae<ee;Ae++){var ne=U[Ae];Z.push(ne.high),Z.push(ne.low)}return B.create(Z,this.sigBytes)},clone:function(){for(var U=x.clone.call(this),ee=U.words=this.words.slice(0),Z=ee.length,Ae=0;Ae<Z;Ae++)ee[Ae]=ee[Ae].clone();return U}})})(),i.lib.Cipher||(function(v){var ie=i,I=ie.lib,x=I.Base,B=I.WordArray,H=I.BufferedBlockAlgorithm,U=ie.enc.Base64,ee=ie.algo.EvpKDF,Z=I.Cipher=H.extend({cfg:x.extend(),createEncryptor:function(ue,ge){return this.create(this._ENC_XFORM_MODE,ue,ge)},createDecryptor:function(ue,ge){return this.create(this._DEC_XFORM_MODE,ue,ge)},init:function(ue,ge,Fe){this.cfg=this.cfg.extend(Fe),this._xformMode=ue,this._key=ge,this.reset()},reset:function(){H.reset.call(this),this._doReset()},process:function(ue){return this._append(ue),this._process()},finalize:function(ue){return ue&&this._append(ue),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(ue){return{encrypt:function(ge,Fe,mt){return(typeof Fe=="string"?te:X).encrypt(ue,ge,Fe,mt)},decrypt:function(ge,Fe,mt){return(typeof Fe=="string"?te:X).decrypt(ue,ge,Fe,mt)}}}});I.StreamCipher=Z.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var ye=ie.mode={},Ae=function(ue,ge,Fe){var mt=this._iv;mt?this._iv=v:mt=this._prevBlock;for(var Dt=0;Dt<Fe;Dt++)ue[ge+Dt]^=mt[Dt]},ne=(I.BlockCipherMode=x.extend({createEncryptor:function(ue,ge){return this.Encryptor.create(ue,ge)},createDecryptor:function(ue,ge){return this.Decryptor.create(ue,ge)},init:function(ue,ge){this._cipher=ue,this._iv=ge}})).extend();ne.Encryptor=ne.extend({processBlock:function(ue,ge){var Fe=this._cipher,mt=Fe.blockSize;Ae.call(this,ue,ge,mt),Fe.encryptBlock(ue,ge),this._prevBlock=ue.slice(ge,ge+mt)}}),ne.Decryptor=ne.extend({processBlock:function(ue,ge){var Fe=this._cipher,mt=Fe.blockSize,Dt=ue.slice(ge,ge+mt);Fe.decryptBlock(ue,ge),Ae.call(this,ue,ge,mt),this._prevBlock=Dt}}),ye=ye.CBC=ne,ne=(ie.pad={}).Pkcs7={pad:function(ue,ge){for(var Fe=4*ge,Fe=Fe-ue.sigBytes%Fe,mt=Fe<<24|Fe<<16|Fe<<8|Fe,Dt=[],Bt=0;Bt<Fe;Bt+=4)Dt.push(mt);Fe=B.create(Dt,Fe),ue.concat(Fe)},unpad:function(ue){ue.sigBytes-=ue.words[ue.sigBytes-1>>>2]&255}},I.BlockCipher=Z.extend({cfg:Z.cfg.extend({mode:ye,padding:ne}),reset:function(){Z.reset.call(this);var ge=this.cfg,ue=ge.iv,ge=ge.mode;if(this._xformMode==this._ENC_XFORM_MODE)var Fe=ge.createEncryptor;else Fe=ge.createDecryptor,this._minBufferSize=1;this._mode=Fe.call(ge,this,ue&&ue.words)},_doProcessBlock:function(ue,ge){this._mode.processBlock(ue,ge)},_doFinalize:function(){var ue=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){ue.pad(this._data,this.blockSize);var ge=this._process(!0)}else ge=this._process(!0),ue.unpad(ge);return ge},blockSize:4});var Ie=I.CipherParams=x.extend({init:function(ue){this.mixIn(ue)},toString:function(ue){return(ue||this.formatter).stringify(this)}}),ye=(ie.format={}).OpenSSL={stringify:function(ue){var ge=ue.ciphertext;return ue=ue.salt,(ue?B.create([1398893684,1701076831]).concat(ue).concat(ge):ge).toString(U)},parse:function(ue){ue=U.parse(ue);var ge=ue.words;if(ge[0]==1398893684&&ge[1]==1701076831){var Fe=B.create(ge.slice(2,4));ge.splice(0,4),ue.sigBytes-=16}return Ie.create({ciphertext:ue,salt:Fe})}},X=I.SerializableCipher=x.extend({cfg:x.extend({format:ye}),encrypt:function(ue,ge,Fe,mt){mt=this.cfg.extend(mt);var Dt=ue.createEncryptor(Fe,mt);return ge=Dt.finalize(ge),Dt=Dt.cfg,Ie.create({ciphertext:ge,key:Fe,iv:Dt.iv,algorithm:ue,mode:Dt.mode,padding:Dt.padding,blockSize:ue.blockSize,formatter:mt.format})},decrypt:function(ue,ge,Fe,mt){return mt=this.cfg.extend(mt),ge=this._parse(ge,mt.format),ue.createDecryptor(Fe,mt).finalize(ge.ciphertext)},_parse:function(ue,ge){return typeof ue=="string"?ge.parse(ue,this):ue}}),ie=(ie.kdf={}).OpenSSL={execute:function(ue,ge,Fe,mt){return mt||(mt=B.random(8)),ue=ee.create({keySize:ge+Fe}).compute(ue,mt),Fe=B.create(ue.words.slice(ge),4*Fe),ue.sigBytes=4*ge,Ie.create({key:ue,iv:Fe,salt:mt})}},te=I.PasswordBasedCipher=X.extend({cfg:X.cfg.extend({kdf:ie}),encrypt:function(ue,ge,Fe,mt){return mt=this.cfg.extend(mt),Fe=mt.kdf.execute(Fe,ue.keySize,ue.ivSize),mt.iv=Fe.iv,ue=X.encrypt.call(this,ue,ge,Fe.key,mt),ue.mixIn(Fe),ue},decrypt:function(ue,ge,Fe,mt){return mt=this.cfg.extend(mt),ge=this._parse(ge,mt.format),Fe=mt.kdf.execute(Fe,ue.keySize,ue.ivSize,ge.salt),mt.iv=Fe.iv,X.decrypt.call(this,ue,ge,Fe.key,mt)}})})(),(function(){for(var v=i,I=v.lib.BlockCipher,Ue=v.algo,x=[],B=[],H=[],U=[],ee=[],Z=[],Ae=[],ne=[],Ie=[],ye=[],X=[],ie=0;256>ie;ie++)X[ie]=128>ie?ie<<1:ie<<1^283;for(var te=0,ue=0,ie=0;256>ie;ie++){var ge=ue^ue<<1^ue<<2^ue<<3^ue<<4,ge=ge>>>8^ge&255^99;x[te]=ge,B[ge]=te;var Fe=X[te],mt=X[Fe],Dt=X[mt],Bt=257*X[ge]^16843008*ge;H[te]=Bt<<24|Bt>>>8,U[te]=Bt<<16|Bt>>>16,ee[te]=Bt<<8|Bt>>>24,Z[te]=Bt,Bt=16843009*Dt^65537*mt^257*Fe^16843008*te,Ae[ge]=Bt<<24|Bt>>>8,ne[ge]=Bt<<16|Bt>>>16,Ie[ge]=Bt<<8|Bt>>>24,ye[ge]=Bt,te?(te=Fe^X[X[X[Dt^Fe]]],ue^=X[X[ue]]):te=ue=1}var Pt=[0,1,2,4,8,16,32,64,128,27,54],Ue=Ue.AES=I.extend({_doReset:function(){for(var He=this._key,$e=He.words,Ze=He.sigBytes/4,He=4*((this._nRounds=Ze+6)+1),pt=this._keySchedule=[],jt=0;jt<He;jt++)if(jt<Ze)pt[jt]=$e[jt];else{var Yt=pt[jt-1];jt%Ze?6<Ze&&jt%Ze==4&&(Yt=x[Yt>>>24]<<24|x[Yt>>>16&255]<<16|x[Yt>>>8&255]<<8|x[Yt&255]):(Yt=Yt<<8|Yt>>>24,Yt=x[Yt>>>24]<<24|x[Yt>>>16&255]<<16|x[Yt>>>8&255]<<8|x[Yt&255],Yt^=Pt[jt/Ze|0]<<24),pt[jt]=pt[jt-Ze]^Yt}for($e=this._invKeySchedule=[],Ze=0;Ze<He;Ze++)jt=He-Ze,Yt=Ze%4?pt[jt]:pt[jt-4],$e[Ze]=4>Ze||4>=jt?Yt:Ae[x[Yt>>>24]]^ne[x[Yt>>>16&255]]^Ie[x[Yt>>>8&255]]^ye[x[Yt&255]]},encryptBlock:function($e,Ze){this._doCryptBlock($e,Ze,this._keySchedule,H,U,ee,Z,x)},decryptBlock:function($e,Ze){var He=$e[Ze+1];$e[Ze+1]=$e[Ze+3],$e[Ze+3]=He,this._doCryptBlock($e,Ze,this._invKeySchedule,Ae,ne,Ie,ye,B),He=$e[Ze+1],$e[Ze+1]=$e[Ze+3],$e[Ze+3]=He},_doCryptBlock:function($e,Ze,He,pt,jt,Yt,en,$t){for(var or=this._nRounds,Zo=$e[Ze]^He[0],Pl=$e[Ze+1]^He[1],Hs=$e[Ze+2]^He[2],ms=$e[Ze+3]^He[3],Vr=4,vn=1;vn<or;vn++)var ac=pt[Zo>>>24]^jt[Pl>>>16&255]^Yt[Hs>>>8&255]^en[ms&255]^He[Vr++],Us=pt[Pl>>>24]^jt[Hs>>>16&255]^Yt[ms>>>8&255]^en[Zo&255]^He[Vr++],Co=pt[Hs>>>24]^jt[ms>>>16&255]^Yt[Zo>>>8&255]^en[Pl&255]^He[Vr++],ms=pt[ms>>>24]^jt[Zo>>>16&255]^Yt[Pl>>>8&255]^en[Hs&255]^He[Vr++],Zo=ac,Pl=Us,Hs=Co;ac=($t[Zo>>>24]<<24|$t[Pl>>>16&255]<<16|$t[Hs>>>8&255]<<8|$t[ms&255])^He[Vr++],Us=($t[Pl>>>24]<<24|$t[Hs>>>16&255]<<16|$t[ms>>>8&255]<<8|$t[Zo&255])^He[Vr++],Co=($t[Hs>>>24]<<24|$t[ms>>>16&255]<<16|$t[Zo>>>8&255]<<8|$t[Pl&255])^He[Vr++],ms=($t[ms>>>24]<<24|$t[Zo>>>16&255]<<16|$t[Pl>>>8&255]<<8|$t[Hs&255])^He[Vr++],$e[Ze]=ac,$e[Ze+1]=Us,$e[Ze+2]=Co,$e[Ze+3]=ms},keySize:8});v.AES=I._createHelper(Ue)})(),(function(){function v(X,ie){var te=(this._lBlock>>>X^this._rBlock)&ie;this._rBlock^=te,this._lBlock^=te<<X}function I(X,ie){var te=(this._rBlock>>>X^this._lBlock)&ie;this._lBlock^=te,this._rBlock^=te<<X}var x=i,H=x.lib,B=H.WordArray,H=H.BlockCipher,U=x.algo,ee=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],Z=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],Ae=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],ne=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],Ie=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],ye=U.DES=H.extend({_doReset:function(){for(var X=this._key.words,ie=[],te=0;56>te;te++){var ue=ee[te]-1;ie[te]=X[ue>>>5]>>>31-ue%32&1}for(X=this._subKeys=[],ue=0;16>ue;ue++){for(var ge=X[ue]=[],Fe=Ae[ue],te=0;24>te;te++)ge[te/6|0]|=ie[(Z[te]-1+Fe)%28]<<31-te%6,ge[4+(te/6|0)]|=ie[28+(Z[te+24]-1+Fe)%28]<<31-te%6;for(ge[0]=ge[0]<<1|ge[0]>>>31,te=1;7>te;te++)ge[te]>>>=4*(te-1)+3;ge[7]=ge[7]<<5|ge[7]>>>27}for(ie=this._invSubKeys=[],te=0;16>te;te++)ie[te]=X[15-te]},encryptBlock:function(X,ie){this._doCryptBlock(X,ie,this._subKeys)},decryptBlock:function(X,ie){this._doCryptBlock(X,ie,this._invSubKeys)},_doCryptBlock:function(X,ie,te){this._lBlock=X[ie],this._rBlock=X[ie+1],v.call(this,4,252645135),v.call(this,16,65535),I.call(this,2,858993459),I.call(this,8,16711935),v.call(this,1,1431655765);for(var ue=0;16>ue;ue++){for(var ge=te[ue],Fe=this._lBlock,mt=this._rBlock,Dt=0,Bt=0;8>Bt;Bt++)Dt|=ne[Bt][((mt^ge[Bt])&Ie[Bt])>>>0];this._lBlock=mt,this._rBlock=Fe^Dt}te=this._lBlock,this._lBlock=this._rBlock,this._rBlock=te,v.call(this,1,1431655765),I.call(this,8,16711935),I.call(this,2,858993459),v.call(this,16,65535),v.call(this,4,252645135),X[ie]=this._lBlock,X[ie+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});x.DES=H._createHelper(ye),U=U.TripleDES=H.extend({_doReset:function(){var X=this._key.words;this._des1=ye.createEncryptor(B.create(X.slice(0,2))),this._des2=ye.createEncryptor(B.create(X.slice(2,4))),this._des3=ye.createEncryptor(B.create(X.slice(4,6)))},encryptBlock:function(X,ie){this._des1.encryptBlock(X,ie),this._des2.decryptBlock(X,ie),this._des3.encryptBlock(X,ie)},decryptBlock:function(X,ie){this._des3.decryptBlock(X,ie),this._des2.encryptBlock(X,ie),this._des1.decryptBlock(X,ie)},keySize:6,ivSize:2,blockSize:2}),x.TripleDES=H._createHelper(U)})(),(function(){var v=i,I=v.lib.WordArray;v.enc.Base64={stringify:function(x){var B=x.words,H=x.sigBytes,U=this._map;x.clamp(),x=[];for(var ee=0;ee<H;ee+=3)for(var Z=(B[ee>>>2]>>>24-8*(ee%4)&255)<<16|(B[ee+1>>>2]>>>24-8*((ee+1)%4)&255)<<8|B[ee+2>>>2]>>>24-8*((ee+2)%4)&255,Ae=0;4>Ae&&ee+.75*Ae<H;Ae++)x.push(U.charAt(Z>>>6*(3-Ae)&63));if(B=U.charAt(64))for(;x.length%4;)x.push(B);return x.join("")},parse:function(x){var B=x.length,H=this._map,U=H.charAt(64);U&&(U=x.indexOf(U),U!=-1&&(B=U));for(var U=[],ee=0,Z=0;Z<B;Z++)if(Z%4){var Ae=H.indexOf(x.charAt(Z-1))<<2*(Z%4),ne=H.indexOf(x.charAt(Z))>>>6-2*(Z%4);U[ee>>>2]|=(Ae|ne)<<24-8*(ee%4),ee++}return I.create(U,ee)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})(),(function(v){function I(ye,X,ie,te,ue,ge,Fe){return ye=ye+(X&ie|~X&te)+ue+Fe,(ye<<ge|ye>>>32-ge)+X}function x(ye,X,ie,te,ue,ge,Fe){return ye=ye+(X&te|ie&~te)+ue+Fe,(ye<<ge|ye>>>32-ge)+X}function B(ye,X,ie,te,ue,ge,Fe){return ye=ye+(X^ie^te)+ue+Fe,(ye<<ge|ye>>>32-ge)+X}function H(ye,X,ie,te,ue,ge,Fe){return ye=ye+(ie^(X|~te))+ue+Fe,(ye<<ge|ye>>>32-ge)+X}for(var U=i,Ae=U.lib,ee=Ae.WordArray,Z=Ae.Hasher,Ae=U.algo,ne=[],Ie=0;64>Ie;Ie++)ne[Ie]=4294967296*v.abs(v.sin(Ie+1))|0;Ae=Ae.MD5=Z.extend({_doReset:function(){this._hash=new ee.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(ye,X){for(var ie=0;16>ie;ie++){var te=X+ie,ue=ye[te];ye[te]=(ue<<8|ue>>>24)&16711935|(ue<<24|ue>>>8)&4278255360}var ie=this._hash.words,te=ye[X+0],ue=ye[X+1],ge=ye[X+2],Fe=ye[X+3],mt=ye[X+4],Dt=ye[X+5],Bt=ye[X+6],Pt=ye[X+7],Ue=ye[X+8],$e=ye[X+9],Ze=ye[X+10],He=ye[X+11],pt=ye[X+12],jt=ye[X+13],Yt=ye[X+14],en=ye[X+15],$t=ie[0],vn=ie[1],Vr=ie[2],or=ie[3],$t=I($t,vn,Vr,or,te,7,ne[0]),or=I(or,$t,vn,Vr,ue,12,ne[1]),Vr=I(Vr,or,$t,vn,ge,17,ne[2]),vn=I(vn,Vr,or,$t,Fe,22,ne[3]),$t=I($t,vn,Vr,or,mt,7,ne[4]),or=I(or,$t,vn,Vr,Dt,12,ne[5]),Vr=I(Vr,or,$t,vn,Bt,17,ne[6]),vn=I(vn,Vr,or,$t,Pt,22,ne[7]),$t=I($t,vn,Vr,or,Ue,7,ne[8]),or=I(or,$t,vn,Vr,$e,12,ne[9]),Vr=I(Vr,or,$t,vn,Ze,17,ne[10]),vn=I(vn,Vr,or,$t,He,22,ne[11]),$t=I($t,vn,Vr,or,pt,7,ne[12]),or=I(or,$t,vn,Vr,jt,12,ne[13]),Vr=I(Vr,or,$t,vn,Yt,17,ne[14]),vn=I(vn,Vr,or,$t,en,22,ne[15]),$t=x($t,vn,Vr,or,ue,5,ne[16]),or=x(or,$t,vn,Vr,Bt,9,ne[17]),Vr=x(Vr,or,$t,vn,He,14,ne[18]),vn=x(vn,Vr,or,$t,te,20,ne[19]),$t=x($t,vn,Vr,or,Dt,5,ne[20]),or=x(or,$t,vn,Vr,Ze,9,ne[21]),Vr=x(Vr,or,$t,vn,en,14,ne[22]),vn=x(vn,Vr,or,$t,mt,20,ne[23]),$t=x($t,vn,Vr,or,$e,5,ne[24]),or=x(or,$t,vn,Vr,Yt,9,ne[25]),Vr=x(Vr,or,$t,vn,Fe,14,ne[26]),vn=x(vn,Vr,or,$t,Ue,20,ne[27]),$t=x($t,vn,Vr,or,jt,5,ne[28]),or=x(or,$t,vn,Vr,ge,9,ne[29]),Vr=x(Vr,or,$t,vn,Pt,14,ne[30]),vn=x(vn,Vr,or,$t,pt,20,ne[31]),$t=B($t,vn,Vr,or,Dt,4,ne[32]),or=B(or,$t,vn,Vr,Ue,11,ne[33]),Vr=B(Vr,or,$t,vn,He,16,ne[34]),vn=B(vn,Vr,or,$t,Yt,23,ne[35]),$t=B($t,vn,Vr,or,ue,4,ne[36]),or=B(or,$t,vn,Vr,mt,11,ne[37]),Vr=B(Vr,or,$t,vn,Pt,16,ne[38]),vn=B(vn,Vr,or,$t,Ze,23,ne[39]),$t=B($t,vn,Vr,or,jt,4,ne[40]),or=B(or,$t,vn,Vr,te,11,ne[41]),Vr=B(Vr,or,$t,vn,Fe,16,ne[42]),vn=B(vn,Vr,or,$t,Bt,23,ne[43]),$t=B($t,vn,Vr,or,$e,4,ne[44]),or=B(or,$t,vn,Vr,pt,11,ne[45]),Vr=B(Vr,or,$t,vn,en,16,ne[46]),vn=B(vn,Vr,or,$t,ge,23,ne[47]),$t=H($t,vn,Vr,or,te,6,ne[48]),or=H(or,$t,vn,Vr,Pt,10,ne[49]),Vr=H(Vr,or,$t,vn,Yt,15,ne[50]),vn=H(vn,Vr,or,$t,Dt,21,ne[51]),$t=H($t,vn,Vr,or,pt,6,ne[52]),or=H(or,$t,vn,Vr,Fe,10,ne[53]),Vr=H(Vr,or,$t,vn,Ze,15,ne[54]),vn=H(vn,Vr,or,$t,ue,21,ne[55]),$t=H($t,vn,Vr,or,Ue,6,ne[56]),or=H(or,$t,vn,Vr,en,10,ne[57]),Vr=H(Vr,or,$t,vn,Bt,15,ne[58]),vn=H(vn,Vr,or,$t,jt,21,ne[59]),$t=H($t,vn,Vr,or,mt,6,ne[60]),or=H(or,$t,vn,Vr,He,10,ne[61]),Vr=H(Vr,or,$t,vn,ge,15,ne[62]),vn=H(vn,Vr,or,$t,$e,21,ne[63]);ie[0]=ie[0]+$t|0,ie[1]=ie[1]+vn|0,ie[2]=ie[2]+Vr|0,ie[3]=ie[3]+or|0},_doFinalize:function(){var ye=this._data,X=ye.words,ie=8*this._nDataBytes,te=8*ye.sigBytes;X[te>>>5]|=128<<24-te%32;var ue=v.floor(ie/4294967296);for(X[(te+64>>>9<<4)+15]=(ue<<8|ue>>>24)&16711935|(ue<<24|ue>>>8)&4278255360,X[(te+64>>>9<<4)+14]=(ie<<8|ie>>>24)&16711935|(ie<<24|ie>>>8)&4278255360,ye.sigBytes=4*(X.length+1),this._process(),ye=this._hash,X=ye.words,ie=0;4>ie;ie++)te=X[ie],X[ie]=(te<<8|te>>>24)&16711935|(te<<24|te>>>8)&4278255360;return ye},clone:function(){var ye=Z.clone.call(this);return ye._hash=this._hash.clone(),ye}}),U.MD5=Z._createHelper(Ae),U.HmacMD5=Z._createHmacHelper(Ae)})(Math),(function(){var v=i,H=v.lib,I=H.WordArray,x=H.Hasher,B=[],H=v.algo.SHA1=x.extend({_doReset:function(){this._hash=new I.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(U,ee){for(var Z=this._hash.words,Ae=Z[0],ne=Z[1],Ie=Z[2],ye=Z[3],X=Z[4],ie=0;80>ie;ie++){if(16>ie)B[ie]=U[ee+ie]|0;else{var te=B[ie-3]^B[ie-8]^B[ie-14]^B[ie-16];B[ie]=te<<1|te>>>31}te=(Ae<<5|Ae>>>27)+X+B[ie],te=20>ie?te+((ne&Ie|~ne&ye)+1518500249):40>ie?te+((ne^Ie^ye)+1859775393):60>ie?te+((ne&Ie|ne&ye|Ie&ye)-1894007588):te+((ne^Ie^ye)-899497514),X=ye,ye=Ie,Ie=ne<<30|ne>>>2,ne=Ae,Ae=te}Z[0]=Z[0]+Ae|0,Z[1]=Z[1]+ne|0,Z[2]=Z[2]+Ie|0,Z[3]=Z[3]+ye|0,Z[4]=Z[4]+X|0},_doFinalize:function(){var U=this._data,ee=U.words,Z=8*this._nDataBytes,Ae=8*U.sigBytes;return ee[Ae>>>5]|=128<<24-Ae%32,ee[(Ae+64>>>9<<4)+14]=Math.floor(Z/4294967296),ee[(Ae+64>>>9<<4)+15]=Z,U.sigBytes=4*ee.length,this._process(),this._hash},clone:function(){var U=x.clone.call(this);return U._hash=this._hash.clone(),U}});v.SHA1=x._createHelper(H),v.HmacSHA1=x._createHmacHelper(H)})(),(function(v){for(var I=i,ie=I.lib,x=ie.WordArray,B=ie.Hasher,ie=I.algo,H=[],U=[],ee=function(ue){return 4294967296*(ue-(ue|0))|0},Z=2,Ae=0;64>Ae;){var ne;e:{ne=Z;for(var Ie=v.sqrt(ne),ye=2;ye<=Ie;ye++)if(!(ne%ye)){ne=!1;break e}ne=!0}ne&&(8>Ae&&(H[Ae]=ee(v.pow(Z,.5))),U[Ae]=ee(v.pow(Z,1/3)),Ae++),Z++}var X=[],ie=ie.SHA256=B.extend({_doReset:function(){this._hash=new x.init(H.slice(0))},_doProcessBlock:function(te,ue){for(var ge=this._hash.words,Fe=ge[0],mt=ge[1],Dt=ge[2],Bt=ge[3],Pt=ge[4],Ue=ge[5],$e=ge[6],Ze=ge[7],He=0;64>He;He++){if(16>He)X[He]=te[ue+He]|0;else{var pt=X[He-15],jt=X[He-2];X[He]=((pt<<25|pt>>>7)^(pt<<14|pt>>>18)^pt>>>3)+X[He-7]+((jt<<15|jt>>>17)^(jt<<13|jt>>>19)^jt>>>10)+X[He-16]}pt=Ze+((Pt<<26|Pt>>>6)^(Pt<<21|Pt>>>11)^(Pt<<7|Pt>>>25))+(Pt&Ue^~Pt&$e)+U[He]+X[He],jt=((Fe<<30|Fe>>>2)^(Fe<<19|Fe>>>13)^(Fe<<10|Fe>>>22))+(Fe&mt^Fe&Dt^mt&Dt),Ze=$e,$e=Ue,Ue=Pt,Pt=Bt+pt|0,Bt=Dt,Dt=mt,mt=Fe,Fe=pt+jt|0}ge[0]=ge[0]+Fe|0,ge[1]=ge[1]+mt|0,ge[2]=ge[2]+Dt|0,ge[3]=ge[3]+Bt|0,ge[4]=ge[4]+Pt|0,ge[5]=ge[5]+Ue|0,ge[6]=ge[6]+$e|0,ge[7]=ge[7]+Ze|0},_doFinalize:function(){var te=this._data,ue=te.words,ge=8*this._nDataBytes,Fe=8*te.sigBytes;return ue[Fe>>>5]|=128<<24-Fe%32,ue[(Fe+64>>>9<<4)+14]=v.floor(ge/4294967296),ue[(Fe+64>>>9<<4)+15]=ge,te.sigBytes=4*ue.length,this._process(),this._hash},clone:function(){var te=B.clone.call(this);return te._hash=this._hash.clone(),te}});I.SHA256=B._createHelper(ie),I.HmacSHA256=B._createHmacHelper(ie)})(Math),(function(){var v=i,I=v.lib.WordArray,B=v.algo,x=B.SHA256,B=B.SHA224=x.extend({_doReset:function(){this._hash=new I.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var H=x._doFinalize.call(this);return H.sigBytes-=4,H}});v.SHA224=x._createHelper(B),v.HmacSHA224=x._createHmacHelper(B)})(),(function(){function v(){return B.create.apply(B,arguments)}for(var I=i,x=I.lib.Hasher,U=I.x64,B=U.Word,H=U.WordArray,U=I.algo,ee=[v(1116352408,3609767458),v(1899447441,602891725),v(3049323471,3964484399),v(3921009573,2173295548),v(961987163,4081628472),v(1508970993,3053834265),v(2453635748,2937671579),v(2870763221,3664609560),v(3624381080,2734883394),v(310598401,1164996542),v(607225278,1323610764),v(1426881987,3590304994),v(1925078388,4068182383),v(2162078206,991336113),v(2614888103,633803317),v(3248222580,3479774868),v(3835390401,2666613458),v(4022224774,944711139),v(264347078,2341262773),v(604807628,2007800933),v(770255983,1495990901),v(1249150122,1856431235),v(1555081692,3175218132),v(1996064986,2198950837),v(2554220882,3999719339),v(2821834349,766784016),v(2952996808,2566594879),v(3210313671,3203337956),v(3336571891,1034457026),v(3584528711,2466948901),v(113926993,3758326383),v(338241895,168717936),v(666307205,1188179964),v(773529912,1546045734),v(1294757372,1522805485),v(1396182291,2643833823),v(1695183700,2343527390),v(1986661051,1014477480),v(2177026350,1206759142),v(2456956037,344077627),v(2730485921,1290863460),v(2820302411,3158454273),v(3259730800,3505952657),v(3345764771,106217008),v(3516065817,3606008344),v(3600352804,1432725776),v(4094571909,1467031594),v(275423344,851169720),v(430227734,3100823752),v(506948616,1363258195),v(659060556,3750685593),v(883997877,3785050280),v(958139571,3318307427),v(1322822218,3812723403),v(1537002063,2003034995),v(1747873779,3602036899),v(1955562222,1575990012),v(2024104815,1125592928),v(2227730452,2716904306),v(2361852424,442776044),v(2428436474,593698344),v(2756734187,3733110249),v(3204031479,2999351573),v(3329325298,3815920427),v(3391569614,3928383900),v(3515267271,566280711),v(3940187606,3454069534),v(4118630271,4000239992),v(116418474,1914138554),v(174292421,2731055270),v(289380356,3203993006),v(460393269,320620315),v(685471733,587496836),v(852142971,1086792851),v(1017036298,365543100),v(1126000580,2618297676),v(1288033470,3409855158),v(1501505948,4234509866),v(1607167915,987167468),v(1816402316,1246189591)],Z=[],Ae=0;80>Ae;Ae++)Z[Ae]=v();U=U.SHA512=x.extend({_doReset:function(){this._hash=new H.init([new B.init(1779033703,4089235720),new B.init(3144134277,2227873595),new B.init(1013904242,4271175723),new B.init(2773480762,1595750129),new B.init(1359893119,2917565137),new B.init(2600822924,725511199),new B.init(528734635,4215389547),new B.init(1541459225,327033209)])},_doProcessBlock:function(ne,Ie){for(var mt=this._hash.words,ye=mt[0],X=mt[1],ie=mt[2],te=mt[3],ue=mt[4],ge=mt[5],Fe=mt[6],mt=mt[7],Dt=ye.high,Bt=ye.low,Pt=X.high,Ue=X.low,$e=ie.high,Ze=ie.low,He=te.high,pt=te.low,jt=ue.high,Yt=ue.low,en=ge.high,$t=ge.low,or=Fe.high,Vr=Fe.low,vn=mt.high,ac=mt.low,Us=Dt,Co=Bt,ms=Pt,Zo=Ue,Pl=$e,Hs=Ze,Xd=He,eu=pt,Pa=jt,ao=Yt,vs=en,Lo=$t,Vs=or,Do=Vr,xm=vn,Tf=ac,fl=0;80>fl;fl++){var Va=Z[fl];if(16>fl)var ys=Va.high=ne[Ie+2*fl]|0,lo=Va.low=ne[Ie+2*fl+1]|0;else{var ys=Z[fl-15],lo=ys.high,fi=ys.low,ys=(lo>>>1|fi<<31)^(lo>>>8|fi<<24)^lo>>>7,fi=(fi>>>1|lo<<31)^(fi>>>8|lo<<24)^(fi>>>7|lo<<25),ya=Z[fl-2],lo=ya.high,yo=ya.low,ya=(lo>>>19|yo<<13)^(lo<<3|yo>>>29)^lo>>>6,yo=(yo>>>19|lo<<13)^(yo<<3|lo>>>29)^(yo>>>6|lo<<26),lo=Z[fl-7],nt=lo.high,wd=Z[fl-16],tl=wd.high,wd=wd.low,lo=fi+lo.low,ys=ys+nt+(lo>>>0<fi>>>0?1:0),lo=lo+yo,ys=ys+ya+(lo>>>0<yo>>>0?1:0),lo=lo+wd,ys=ys+tl+(lo>>>0<wd>>>0?1:0);Va.high=ys,Va.low=lo}var nt=Pa&vs^~Pa&Vs,wd=ao&Lo^~ao&Do,Va=Us&ms^Us&Pl^ms&Pl,Im=Co&Zo^Co&Hs^Zo&Hs,fi=(Us>>>28|Co<<4)^(Us<<30|Co>>>2)^(Us<<25|Co>>>7),ya=(Co>>>28|Us<<4)^(Co<<30|Us>>>2)^(Co<<25|Us>>>7),yo=ee[fl],El=yo.high,vo=yo.low,yo=Tf+((ao>>>14|Pa<<18)^(ao>>>18|Pa<<14)^(ao<<23|Pa>>>9)),tl=xm+((Pa>>>14|ao<<18)^(Pa>>>18|ao<<14)^(Pa<<23|ao>>>9))+(yo>>>0<Tf>>>0?1:0),yo=yo+wd,tl=tl+nt+(yo>>>0<wd>>>0?1:0),yo=yo+vo,tl=tl+El+(yo>>>0<vo>>>0?1:0),yo=yo+lo,tl=tl+ys+(yo>>>0<lo>>>0?1:0),lo=ya+Im,Va=fi+Va+(lo>>>0<ya>>>0?1:0),xm=Vs,Tf=Do,Vs=vs,Do=Lo,vs=Pa,Lo=ao,ao=eu+yo|0,Pa=Xd+tl+(ao>>>0<eu>>>0?1:0)|0,Xd=Pl,eu=Hs,Pl=ms,Hs=Zo,ms=Us,Zo=Co,Co=yo+lo|0,Us=tl+Va+(Co>>>0<yo>>>0?1:0)|0}Bt=ye.low=Bt+Co,ye.high=Dt+Us+(Bt>>>0<Co>>>0?1:0),Ue=X.low=Ue+Zo,X.high=Pt+ms+(Ue>>>0<Zo>>>0?1:0),Ze=ie.low=Ze+Hs,ie.high=$e+Pl+(Ze>>>0<Hs>>>0?1:0),pt=te.low=pt+eu,te.high=He+Xd+(pt>>>0<eu>>>0?1:0),Yt=ue.low=Yt+ao,ue.high=jt+Pa+(Yt>>>0<ao>>>0?1:0),$t=ge.low=$t+Lo,ge.high=en+vs+($t>>>0<Lo>>>0?1:0),Vr=Fe.low=Vr+Do,Fe.high=or+Vs+(Vr>>>0<Do>>>0?1:0),ac=mt.low=ac+Tf,mt.high=vn+xm+(ac>>>0<Tf>>>0?1:0)},_doFinalize:function(){var ne=this._data,Ie=ne.words,ye=8*this._nDataBytes,X=8*ne.sigBytes;return Ie[X>>>5]|=128<<24-X%32,Ie[(X+128>>>10<<5)+30]=Math.floor(ye/4294967296),Ie[(X+128>>>10<<5)+31]=ye,ne.sigBytes=4*Ie.length,this._process(),this._hash.toX32()},clone:function(){var ne=x.clone.call(this);return ne._hash=this._hash.clone(),ne},blockSize:32}),I.SHA512=x._createHelper(U),I.HmacSHA512=x._createHmacHelper(U)})(),(function(){var v=i,H=v.x64,I=H.Word,x=H.WordArray,H=v.algo,B=H.SHA512,H=H.SHA384=B.extend({_doReset:function(){this._hash=new x.init([new I.init(3418070365,3238371032),new I.init(1654270250,914150663),new I.init(2438529370,812702999),new I.init(355462360,4144912697),new I.init(1731405415,4290775857),new I.init(2394180231,1750603025),new I.init(3675008525,1694076839),new I.init(1203062813,3204075428)])},_doFinalize:function(){var U=B._doFinalize.call(this);return U.sigBytes-=16,U}});v.SHA384=B._createHelper(H),v.HmacSHA384=B._createHmacHelper(H)})(),(function(){var v=i,ne=v.lib,I=ne.WordArray,x=ne.Hasher,ne=v.algo,B=I.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),H=I.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),U=I.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),ee=I.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),Z=I.create([0,1518500249,1859775393,2400959708,2840853838]),Ae=I.create([1352829926,1548603684,1836072691,2053994217,0]),ne=ne.RIPEMD160=x.extend({_doReset:function(){this._hash=I.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(Ie,ye){for(var X=0;16>X;X++){var ie=ye+X,te=Ie[ie];Ie[ie]=(te<<8|te>>>24)&16711935|(te<<24|te>>>8)&4278255360}var ie=this._hash.words,te=Z.words,ue=Ae.words,ge=B.words,Fe=H.words,mt=U.words,Dt=ee.words,Bt,Pt,Ue,$e,Ze,He,pt,jt,Yt,en;He=Bt=ie[0],pt=Pt=ie[1],jt=Ue=ie[2],Yt=$e=ie[3],en=Ze=ie[4];for(var $t,X=0;80>X;X+=1)$t=Bt+Ie[ye+ge[X]]|0,$t=16>X?$t+((Pt^Ue^$e)+te[0]):32>X?$t+((Pt&Ue|~Pt&$e)+te[1]):48>X?$t+(((Pt|~Ue)^$e)+te[2]):64>X?$t+((Pt&$e|Ue&~$e)+te[3]):$t+((Pt^(Ue|~$e))+te[4]),$t|=0,$t=$t<<mt[X]|$t>>>32-mt[X],$t=$t+Ze|0,Bt=Ze,Ze=$e,$e=Ue<<10|Ue>>>22,Ue=Pt,Pt=$t,$t=He+Ie[ye+Fe[X]]|0,$t=16>X?$t+((pt^(jt|~Yt))+ue[0]):32>X?$t+((pt&Yt|jt&~Yt)+ue[1]):48>X?$t+(((pt|~jt)^Yt)+ue[2]):64>X?$t+((pt&jt|~pt&Yt)+ue[3]):$t+((pt^jt^Yt)+ue[4]),$t|=0,$t=$t<<Dt[X]|$t>>>32-Dt[X],$t=$t+en|0,He=en,en=Yt,Yt=jt<<10|jt>>>22,jt=pt,pt=$t;$t=ie[1]+Ue+Yt|0,ie[1]=ie[2]+$e+en|0,ie[2]=ie[3]+Ze+He|0,ie[3]=ie[4]+Bt+pt|0,ie[4]=ie[0]+Pt+jt|0,ie[0]=$t},_doFinalize:function(){var Ie=this._data,ye=Ie.words,X=8*this._nDataBytes,ie=8*Ie.sigBytes;for(ye[ie>>>5]|=128<<24-ie%32,ye[(ie+64>>>9<<4)+14]=(X<<8|X>>>24)&16711935|(X<<24|X>>>8)&4278255360,Ie.sigBytes=4*(ye.length+1),this._process(),Ie=this._hash,ye=Ie.words,X=0;5>X;X++)ie=ye[X],ye[X]=(ie<<8|ie>>>24)&16711935|(ie<<24|ie>>>8)&4278255360;return Ie},clone:function(){var Ie=x.clone.call(this);return Ie._hash=this._hash.clone(),Ie}});v.RIPEMD160=x._createHelper(ne),v.HmacRIPEMD160=x._createHmacHelper(ne)})(),(function(){var v=i,I=v.enc.Utf8;v.algo.HMAC=v.lib.Base.extend({init:function(x,B){x=this._hasher=new x.init,typeof B=="string"&&(B=I.parse(B));var H=x.blockSize,U=4*H;B.sigBytes>U&&(B=x.finalize(B)),B.clamp();for(var ee=this._oKey=B.clone(),Z=this._iKey=B.clone(),Ae=ee.words,ne=Z.words,Ie=0;Ie<H;Ie++)Ae[Ie]^=1549556828,ne[Ie]^=909522486;ee.sigBytes=Z.sigBytes=U,this.reset()},reset:function(){var x=this._hasher;x.reset(),x.update(this._iKey)},update:function(x){return this._hasher.update(x),this},finalize:function(x){var B=this._hasher;return x=B.finalize(x),B.reset(),B.finalize(this._oKey.clone().concat(x))}})})(),(function(){var v=i,B=v.lib,I=B.Base,x=B.WordArray,B=v.algo,H=B.HMAC,U=B.PBKDF2=I.extend({cfg:I.extend({keySize:4,hasher:B.SHA1,iterations:1}),init:function(ee){this.cfg=this.cfg.extend(ee)},compute:function(ee,Z){for(var te=this.cfg,Ae=H.create(te.hasher,ee),ne=x.create(),Ie=x.create([1]),ye=ne.words,X=Ie.words,ie=te.keySize,te=te.iterations;ye.length<ie;){var ue=Ae.update(Z).finalize(Ie);Ae.reset();for(var ge=ue.words,Fe=ge.length,mt=ue,Dt=1;Dt<te;Dt++){mt=Ae.finalize(mt),Ae.reset();for(var Bt=mt.words,Pt=0;Pt<Fe;Pt++)ge[Pt]^=Bt[Pt]}ne.concat(ue),X[0]++}return ne.sigBytes=4*ie,ne}});v.PBKDF2=function(ee,Z,Ae){return U.create(Ae).compute(ee,Z)}})();var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o="=";function s(v){var I,x,B="";for(I=0;I+3<=v.length;I+=3)x=parseInt(v.substring(I,I+3),16),B+=a.charAt(x>>6)+a.charAt(x&63);for(I+1==v.length?(x=parseInt(v.substring(I,I+1),16),B+=a.charAt(x<<2)):I+2==v.length&&(x=parseInt(v.substring(I,I+2),16),B+=a.charAt(x>>2)+a.charAt((x&3)<<4));(B.length&3)>0;)B+=o;return B}function l(v){var I="",x,B=0,H,U;for(x=0;x<v.length&&v.charAt(x)!=o;++x)U=a.indexOf(v.charAt(x)),!(U<0)&&(B==0?(I+=N(U>>2),H=U&3,B=1):B==1?(I+=N(H<<2|U>>4),H=U&15,B=2):B==2?(I+=N(H),I+=N(U>>2),H=U&3,B=3):(I+=N(H<<2|U>>4),I+=N(U&15),B=0));return B==1&&(I+=N(H<<2)),I}function u(v){var I=l(v),x,B=new Array;for(x=0;2*x<I.length;++x)B[x]=parseInt(I.substring(2*x,2*x+2),16);return B}var c;function f(v,I,x){v!=null&&(typeof v=="number"?this.fromNumber(v,I,x):I==null&&typeof v!="string"?this.fromString(v,256):this.fromString(v,I))}function p(){return new f(null)}function h(v,I,x,B,H,U){for(;--U>=0;){var ee=I*this[v++]+x[B]+H;H=Math.floor(ee/67108864),x[B++]=ee&67108863}return H}function g(v,I,x,B,H,U){for(var ee=I&32767,Z=I>>15;--U>=0;){var Ae=this[v]&32767,ne=this[v++]>>15,Ie=Z*Ae+ne*ee;Ae=ee*Ae+((Ie&32767)<<15)+x[B]+(H&1073741823),H=(Ae>>>30)+(Ie>>>15)+Z*ne+(H>>>30),x[B++]=Ae&1073741823}return H}function m(v,I,x,B,H,U){for(var ee=I&16383,Z=I>>14;--U>=0;){var Ae=this[v]&16383,ne=this[v++]>>14,Ie=Z*Ae+ne*ee;Ae=ee*Ae+((Ie&16383)<<14)+x[B]+H,H=(Ae>>28)+(Ie>>14)+Z*ne,x[B++]=Ae&268435455}return H}e.appName=="Microsoft Internet Explorer"?(f.prototype.am=g,c=30):e.appName!="Netscape"?(f.prototype.am=h,c=26):(f.prototype.am=m,c=28),f.prototype.DB=c,f.prototype.DM=(1<<c)-1,f.prototype.DV=1<<c;var y=52;f.prototype.FV=Math.pow(2,y),f.prototype.F1=y-c,f.prototype.F2=2*c-y;var C="0123456789abcdefghijklmnopqrstuvwxyz",T=new Array,R,O;for(R=48,O=0;O<=9;++O)T[R++]=O;for(R=97,O=10;O<36;++O)T[R++]=O;for(R=65,O=10;O<36;++O)T[R++]=O;function N(v){return C.charAt(v)}function k(v,I){var x=T[v.charCodeAt(I)];return x??-1}function j(v){for(var I=this.t-1;I>=0;--I)v[I]=this[I];v.t=this.t,v.s=this.s}function V(v){this.t=1,this.s=v<0?-1:0,v>0?this[0]=v:v<-1?this[0]=v+this.DV:this.t=0}function z(v){var I=p();return I.fromInt(v),I}function q(v,I){var x;if(I==16)x=4;else if(I==8)x=3;else if(I==256)x=8;else if(I==2)x=1;else if(I==32)x=5;else if(I==4)x=2;else{this.fromRadix(v,I);return}this.t=0,this.s=0;for(var B=v.length,H=!1,U=0;--B>=0;){var ee=x==8?v[B]&255:k(v,B);if(ee<0){v.charAt(B)=="-"&&(H=!0);continue}H=!1,U==0?this[this.t++]=ee:U+x>this.DB?(this[this.t-1]|=(ee&(1<<this.DB-U)-1)<<U,this[this.t++]=ee>>this.DB-U):this[this.t-1]|=ee<<U,U+=x,U>=this.DB&&(U-=this.DB)}x==8&&(v[0]&128)!=0&&(this.s=-1,U>0&&(this[this.t-1]|=(1<<this.DB-U)-1<<U)),this.clamp(),H&&f.ZERO.subTo(this,this)}function $(){for(var v=this.s&this.DM;this.t>0&&this[this.t-1]==v;)--this.t}function Y(v){if(this.s<0)return"-"+this.negate().toString(v);var I;if(v==16)I=4;else if(v==8)I=3;else if(v==2)I=1;else if(v==32)I=5;else if(v==4)I=2;else return this.toRadix(v);var x=(1<<I)-1,B,H=!1,U="",ee=this.t,Z=this.DB-ee*this.DB%I;if(ee-- >0)for(Z<this.DB&&(B=this[ee]>>Z)>0&&(H=!0,U=N(B));ee>=0;)Z<I?(B=(this[ee]&(1<<Z)-1)<<I-Z,B|=this[--ee]>>(Z+=this.DB-I)):(B=this[ee]>>(Z-=I)&x,Z<=0&&(Z+=this.DB,--ee)),B>0&&(H=!0),H&&(U+=N(B));return H?U:"0"}function re(){var v=p();return f.ZERO.subTo(this,v),v}function se(){return this.s<0?this.negate():this}function me(v){var I=this.s-v.s;if(I!=0)return I;var x=this.t;if(I=x-v.t,I!=0)return this.s<0?-I:I;for(;--x>=0;)if((I=this[x]-v[x])!=0)return I;return 0}function Te(v){var I=1,x;return(x=v>>>16)!=0&&(v=x,I+=16),(x=v>>8)!=0&&(v=x,I+=8),(x=v>>4)!=0&&(v=x,I+=4),(x=v>>2)!=0&&(v=x,I+=2),(x=v>>1)!=0&&(v=x,I+=1),I}function fe(){return this.t<=0?0:this.DB*(this.t-1)+Te(this[this.t-1]^this.s&this.DM)}function Ce(v,I){var x;for(x=this.t-1;x>=0;--x)I[x+v]=this[x];for(x=v-1;x>=0;--x)I[x]=0;I.t=this.t+v,I.s=this.s}function Oe(v,I){for(var x=v;x<this.t;++x)I[x-v]=this[x];I.t=Math.max(this.t-v,0),I.s=this.s}function Ve(v,I){var x=v%this.DB,B=this.DB-x,H=(1<<B)-1,U=Math.floor(v/this.DB),ee=this.s<<x&this.DM,Z;for(Z=this.t-1;Z>=0;--Z)I[Z+U+1]=this[Z]>>B|ee,ee=(this[Z]&H)<<x;for(Z=U-1;Z>=0;--Z)I[Z]=0;I[U]=ee,I.t=this.t+U+1,I.s=this.s,I.clamp()}function Ge(v,I){I.s=this.s;var x=Math.floor(v/this.DB);if(x>=this.t){I.t=0;return}var B=v%this.DB,H=this.DB-B,U=(1<<B)-1;I[0]=this[x]>>B;for(var ee=x+1;ee<this.t;++ee)I[ee-x-1]|=(this[ee]&U)<<H,I[ee-x]=this[ee]>>B;B>0&&(I[this.t-x-1]|=(this.s&U)<<H),I.t=this.t-x,I.clamp()}function ce(v,I){for(var x=0,B=0,H=Math.min(v.t,this.t);x<H;)B+=this[x]-v[x],I[x++]=B&this.DM,B>>=this.DB;if(v.t<this.t){for(B-=v.s;x<this.t;)B+=this[x],I[x++]=B&this.DM,B>>=this.DB;B+=this.s}else{for(B+=this.s;x<v.t;)B-=v[x],I[x++]=B&this.DM,B>>=this.DB;B-=v.s}I.s=B<0?-1:0,B<-1?I[x++]=this.DV+B:B>0&&(I[x++]=B),I.t=x,I.clamp()}function Ne(v,I){var x=this.abs(),B=v.abs(),H=x.t;for(I.t=H+B.t;--H>=0;)I[H]=0;for(H=0;H<B.t;++H)I[H+x.t]=x.am(0,B[H],I,H,0,x.t);I.s=0,I.clamp(),this.s!=v.s&&f.ZERO.subTo(I,I)}function ke(v){for(var I=this.abs(),x=v.t=2*I.t;--x>=0;)v[x]=0;for(x=0;x<I.t-1;++x){var B=I.am(x,I[x],v,2*x,0,1);(v[x+I.t]+=I.am(x+1,2*I[x],v,2*x+1,B,I.t-x-1))>=I.DV&&(v[x+I.t]-=I.DV,v[x+I.t+1]=1)}v.t>0&&(v[v.t-1]+=I.am(x,I[x],v,2*x,0,1)),v.s=0,v.clamp()}function De(v,I,x){var B=v.abs();if(!(B.t<=0)){var H=this.abs();if(H.t<B.t){I?.fromInt(0),x!=null&&this.copyTo(x);return}x==null&&(x=p());var U=p(),ee=this.s,Z=v.s,Ae=this.DB-Te(B[B.t-1]);Ae>0?(B.lShiftTo(Ae,U),H.lShiftTo(Ae,x)):(B.copyTo(U),H.copyTo(x));var ne=U.t,Ie=U[ne-1];if(Ie!=0){var ye=Ie*(1<<this.F1)+(ne>1?U[ne-2]>>this.F2:0),X=this.FV/ye,ie=(1<<this.F1)/ye,te=1<<this.F2,ue=x.t,ge=ue-ne,Fe=I??p();for(U.dlShiftTo(ge,Fe),x.compareTo(Fe)>=0&&(x[x.t++]=1,x.subTo(Fe,x)),f.ONE.dlShiftTo(ne,Fe),Fe.subTo(U,U);U.t<ne;)U[U.t++]=0;for(;--ge>=0;){var mt=x[--ue]==Ie?this.DM:Math.floor(x[ue]*X+(x[ue-1]+te)*ie);if((x[ue]+=U.am(0,mt,x,ge,0,ne))<mt)for(U.dlShiftTo(ge,Fe),x.subTo(Fe,x);x[ue]<--mt;)x.subTo(Fe,x)}I!=null&&(x.drShiftTo(ne,I),ee!=Z&&f.ZERO.subTo(I,I)),x.t=ne,x.clamp(),Ae>0&&x.rShiftTo(Ae,x),ee<0&&f.ZERO.subTo(x,x)}}}function Pe(v){var I=p();return this.abs().divRemTo(v,null,I),this.s<0&&I.compareTo(f.ZERO)>0&&v.subTo(I,I),I}function Je(v){this.m=v}function vt(v){return v.s<0||v.compareTo(this.m)>=0?v.mod(this.m):v}function qe(v){return v}function St(v){v.divRemTo(this.m,null,v)}function It(v,I,x){v.multiplyTo(I,x),this.reduce(x)}function at(v,I){v.squareTo(I),this.reduce(I)}Je.prototype.convert=vt,Je.prototype.revert=qe,Je.prototype.reduce=St,Je.prototype.mulTo=It,Je.prototype.sqrTo=at;function kt(){if(this.t<1)return 0;var v=this[0];if((v&1)==0)return 0;var I=v&3;return I=I*(2-(v&15)*I)&15,I=I*(2-(v&255)*I)&255,I=I*(2-((v&65535)*I&65535))&65535,I=I*(2-v*I%this.DV)%this.DV,I>0?this.DV-I:-I}function Et(v){this.m=v,this.mp=v.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<v.DB-15)-1,this.mt2=2*v.t}function ve(v){var I=p();return v.abs().dlShiftTo(this.m.t,I),I.divRemTo(this.m,null,I),v.s<0&&I.compareTo(f.ZERO)>0&&this.m.subTo(I,I),I}function Ht(v){var I=p();return v.copyTo(I),this.reduce(I),I}function Rr(v){for(;v.t<=this.mt2;)v[v.t++]=0;for(var I=0;I<this.m.t;++I){var x=v[I]&32767,B=x*this.mpl+((x*this.mph+(v[I]>>15)*this.mpl&this.um)<<15)&v.DM;for(x=I+this.m.t,v[x]+=this.m.am(0,B,v,I,0,this.m.t);v[x]>=v.DV;)v[x]-=v.DV,v[++x]++}v.clamp(),v.drShiftTo(this.m.t,v),v.compareTo(this.m)>=0&&v.subTo(this.m,v)}function ar(v,I){v.squareTo(I),this.reduce(I)}function Cr(v,I,x){v.multiplyTo(I,x),this.reduce(x)}Et.prototype.convert=ve,Et.prototype.revert=Ht,Et.prototype.reduce=Rr,Et.prototype.mulTo=Cr,Et.prototype.sqrTo=ar;function Xr(){return(this.t>0?this[0]&1:this.s)==0}function lr(v,I){if(v>4294967295||v<1)return f.ONE;var x=p(),B=p(),H=I.convert(this),U=Te(v)-1;for(H.copyTo(x);--U>=0;)if(I.sqrTo(x,B),(v&1<<U)>0)I.mulTo(B,H,x);else{var ee=x;x=B,B=ee}return I.revert(x)}function Yr(v,I){var x;return v<256||I.isEven()?x=new Je(I):x=new Et(I),this.exp(v,x)}f.prototype.copyTo=j,f.prototype.fromInt=V,f.prototype.fromString=q,f.prototype.clamp=$,f.prototype.dlShiftTo=Ce,f.prototype.drShiftTo=Oe,f.prototype.lShiftTo=Ve,f.prototype.rShiftTo=Ge,f.prototype.subTo=ce,f.prototype.multiplyTo=Ne,f.prototype.squareTo=ke,f.prototype.divRemTo=De,f.prototype.invDigit=kt,f.prototype.isEven=Xr,f.prototype.exp=lr,f.prototype.toString=Y,f.prototype.negate=re,f.prototype.abs=se,f.prototype.compareTo=me,f.prototype.bitLength=fe,f.prototype.mod=Pe,f.prototype.modPowInt=Yr,f.ZERO=z(0),f.ONE=z(1);function nn(){var v=p();return this.copyTo(v),v}function Zt(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function Lr(){return this.t==0?this.s:this[0]<<24>>24}function Ur(){return this.t==0?this.s:this[0]<<16>>16}function qt(v){return Math.floor(Math.LN2*this.DB/Math.log(v))}function _r(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1}function wn(v){if(v==null&&(v=10),this.signum()==0||v<2||v>36)return"0";var I=this.chunkSize(v),x=Math.pow(v,I),B=z(x),H=p(),U=p(),ee="";for(this.divRemTo(B,H,U);H.signum()>0;)ee=(x+U.intValue()).toString(v).substr(1)+ee,H.divRemTo(B,H,U);return U.intValue().toString(v)+ee}function mr(v,I){this.fromInt(0),I==null&&(I=10);for(var x=this.chunkSize(I),B=Math.pow(I,x),H=!1,U=0,ee=0,Z=0;Z<v.length;++Z){var Ae=k(v,Z);if(Ae<0){v.charAt(Z)=="-"&&this.signum()==0&&(H=!0);continue}ee=I*ee+Ae,++U>=x&&(this.dMultiply(B),this.dAddOffset(ee,0),U=0,ee=0)}U>0&&(this.dMultiply(Math.pow(I,U)),this.dAddOffset(ee,0)),H&&f.ZERO.subTo(this,this)}function ur(v,I,x){if(typeof I=="number")if(v<2)this.fromInt(1);else for(this.fromNumber(v,x),this.testBit(v-1)||this.bitwiseTo(f.ONE.shiftLeft(v-1),_n,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(I);)this.dAddOffset(2,0),this.bitLength()>v&&this.subTo(f.ONE.shiftLeft(v-1),this);else{var B=new Array,H=v&7;B.length=(v>>3)+1,I.nextBytes(B),H>0?B[0]&=(1<<H)-1:B[0]=0,this.fromString(B,256)}}function Un(){var v=this.t,I=new Array;I[0]=this.s;var x=this.DB-v*this.DB%8,B,H=0;if(v-- >0)for(x<this.DB&&(B=this[v]>>x)!=(this.s&this.DM)>>x&&(I[H++]=B|this.s<<this.DB-x);v>=0;)x<8?(B=(this[v]&(1<<x)-1)<<8-x,B|=this[--v]>>(x+=this.DB-8)):(B=this[v]>>(x-=8)&255,x<=0&&(x+=this.DB,--v)),(B&128)!=0&&(B|=-256),H==0&&(this.s&128)!=(B&128)&&++H,(H>0||B!=this.s)&&(I[H++]=B);return I}function Rn(v){return this.compareTo(v)==0}function xn(v){return this.compareTo(v)<0?this:v}function Sn(v){return this.compareTo(v)>0?this:v}function Yn(v,I,x){var B,H,U=Math.min(v.t,this.t);for(B=0;B<U;++B)x[B]=I(this[B],v[B]);if(v.t<this.t){for(H=v.s&this.DM,B=U;B<this.t;++B)x[B]=I(this[B],H);x.t=this.t}else{for(H=this.s&this.DM,B=U;B<v.t;++B)x[B]=I(H,v[B]);x.t=v.t}x.s=I(this.s,v.s),x.clamp()}function Dn(v,I){return v&I}function gi(v){var I=p();return this.bitwiseTo(v,Dn,I),I}function _n(v,I){return v|I}function En(v){var I=p();return this.bitwiseTo(v,_n,I),I}function Bi(v,I){return v^I}function Mn(v){var I=p();return this.bitwiseTo(v,Bi,I),I}function ti(v,I){return v&~I}function Yi(v){var I=p();return this.bitwiseTo(v,ti,I),I}function ei(){for(var v=p(),I=0;I<this.t;++I)v[I]=this.DM&~this[I];return v.t=this.t,v.s=~this.s,v}function ii(v){var I=p();return v<0?this.rShiftTo(-v,I):this.lShiftTo(v,I),I}function Ra(v){var I=p();return v<0?this.lShiftTo(-v,I):this.rShiftTo(v,I),I}function li(v){if(v==0)return-1;var I=0;return(v&65535)==0&&(v>>=16,I+=16),(v&255)==0&&(v>>=8,I+=8),(v&15)==0&&(v>>=4,I+=4),(v&3)==0&&(v>>=2,I+=2),(v&1)==0&&++I,I}function kr(){for(var v=0;v<this.t;++v)if(this[v]!=0)return v*this.DB+li(this[v]);return this.s<0?this.t*this.DB:-1}function Ii(v){for(var I=0;v!=0;)v&=v-1,++I;return I}function Ji(){for(var v=0,I=this.s&this.DM,x=0;x<this.t;++x)v+=Ii(this[x]^I);return v}function Wr(v){var I=Math.floor(v/this.DB);return I>=this.t?this.s!=0:(this[I]&1<<v%this.DB)!=0}function zn(v,I){var x=f.ONE.shiftLeft(v);return this.bitwiseTo(x,I,x),x}function pn(v){return this.changeBit(v,_n)}function yi(v){return this.changeBit(v,ti)}function ta(v){return this.changeBit(v,Bi)}function _t(v,I){for(var x=0,B=0,H=Math.min(v.t,this.t);x<H;)B+=this[x]+v[x],I[x++]=B&this.DM,B>>=this.DB;if(v.t<this.t){for(B+=v.s;x<this.t;)B+=this[x],I[x++]=B&this.DM,B>>=this.DB;B+=this.s}else{for(B+=this.s;x<v.t;)B+=v[x],I[x++]=B&this.DM,B>>=this.DB;B+=v.s}I.s=B<0?-1:0,B>0?I[x++]=B:B<-1&&(I[x++]=this.DV+B),I.t=x,I.clamp()}function Hr(v){var I=p();return this.addTo(v,I),I}function fn(v){var I=p();return this.subTo(v,I),I}function bn(v){var I=p();return this.multiplyTo(v,I),I}function Wn(){var v=p();return this.squareTo(v),v}function ui(v){var I=p();return this.divRemTo(v,I,null),I}function Ti(v){var I=p();return this.divRemTo(v,null,I),I}function Fi(v){var I=p(),x=p();return this.divRemTo(v,I,x),new Array(I,x)}function Ma(v){this[this.t]=this.am(0,v-1,this,0,0,this.t),++this.t,this.clamp()}function gn(v,I){if(v!=0){for(;this.t<=I;)this[this.t++]=0;for(this[I]+=v;this[I]>=this.DV;)this[I]-=this.DV,++I>=this.t&&(this[this.t++]=0),++this[I]}}function Mt(){}function Tr(v){return v}function Hn(v,I,x){v.multiplyTo(I,x)}function oi(v,I){v.squareTo(I)}Mt.prototype.convert=Tr,Mt.prototype.revert=Tr,Mt.prototype.mulTo=Hn,Mt.prototype.sqrTo=oi;function wi(v){return this.exp(v,new Mt)}function Xn(v,I,x){var B=Math.min(this.t+v.t,I);for(x.s=0,x.t=B;B>0;)x[--B]=0;var H;for(H=x.t-this.t;B<H;++B)x[B+this.t]=this.am(0,v[B],x,B,0,this.t);for(H=Math.min(v.t,I);B<H;++B)this.am(0,v[B],x,B,0,I-B);x.clamp()}function $i(v,I,x){--I;var B=x.t=this.t+v.t-I;for(x.s=0;--B>=0;)x[B]=0;for(B=Math.max(I-this.t,0);B<v.t;++B)x[this.t+B-I]=this.am(I-B,v[B],x,0,0,this.t+B-I);x.clamp(),x.drShiftTo(1,x)}function Xi(v){this.r2=p(),this.q3=p(),f.ONE.dlShiftTo(2*v.t,this.r2),this.mu=this.r2.divide(v),this.m=v}function Jo(v){if(v.s<0||v.t>2*this.m.t)return v.mod(this.m);if(v.compareTo(this.m)<0)return v;var I=p();return v.copyTo(I),this.reduce(I),I}function Xo(v){return v}function ha(v){for(v.drShiftTo(this.m.t-1,this.r2),v.t>this.m.t+1&&(v.t=this.m.t+1,v.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);v.compareTo(this.r2)<0;)v.dAddOffset(1,this.m.t+1);for(v.subTo(this.r2,v);v.compareTo(this.m)>=0;)v.subTo(this.m,v)}function Uo(v,I){v.squareTo(I),this.reduce(I)}function Ao(v,I,x){v.multiplyTo(I,x),this.reduce(x)}Xi.prototype.convert=Jo,Xi.prototype.revert=Xo,Xi.prototype.reduce=ha,Xi.prototype.mulTo=Ao,Xi.prototype.sqrTo=Uo;function io(v,I){var x=v.bitLength(),B,H=z(1),U;if(x<=0)return H;x<18?B=1:x<48?B=3:x<144?B=4:x<768?B=5:B=6,x<8?U=new Je(I):I.isEven()?U=new Xi(I):U=new Et(I);var ee=new Array,Z=3,Ae=B-1,ne=(1<<B)-1;if(ee[1]=U.convert(this),B>1){var Ie=p();for(U.sqrTo(ee[1],Ie);Z<=ne;)ee[Z]=p(),U.mulTo(Ie,ee[Z-2],ee[Z]),Z+=2}var ye=v.t-1,X,ie=!0,te=p(),ue;for(x=Te(v[ye])-1;ye>=0;){for(x>=Ae?X=v[ye]>>x-Ae&ne:(X=(v[ye]&(1<<x+1)-1)<<Ae-x,ye>0&&(X|=v[ye-1]>>this.DB+x-Ae)),Z=B;(X&1)==0;)X>>=1,--Z;if((x-=Z)<0&&(x+=this.DB,--ye),ie)ee[X].copyTo(H),ie=!1;else{for(;Z>1;)U.sqrTo(H,te),U.sqrTo(te,H),Z-=2;Z>0?U.sqrTo(H,te):(ue=H,H=te,te=ue),U.mulTo(te,ee[X],H)}for(;ye>=0&&(v[ye]&1<<x)==0;)U.sqrTo(H,te),ue=H,H=te,te=ue,--x<0&&(x=this.DB-1,--ye)}return U.revert(H)}function Ho(v){var I=this.s<0?this.negate():this.clone(),x=v.s<0?v.negate():v.clone();if(I.compareTo(x)<0){var B=I;I=x,x=B}var H=I.getLowestSetBit(),U=x.getLowestSetBit();if(U<0)return I;for(H<U&&(U=H),U>0&&(I.rShiftTo(U,I),x.rShiftTo(U,x));I.signum()>0;)(H=I.getLowestSetBit())>0&&I.rShiftTo(H,I),(H=x.getLowestSetBit())>0&&x.rShiftTo(H,x),I.compareTo(x)>=0?(I.subTo(x,I),I.rShiftTo(1,I)):(x.subTo(I,x),x.rShiftTo(1,x));return U>0&&x.lShiftTo(U,x),x}function gs(v){if(v<=0)return 0;var I=this.DV%v,x=this.s<0?v-1:0;if(this.t>0)if(I==0)x=this[0]%v;else for(var B=this.t-1;B>=0;--B)x=(I*x+this[B])%v;return x}function Ic(v){var I=v.isEven();if(this.isEven()&&I||v.signum()==0)return f.ZERO;for(var x=v.clone(),B=this.clone(),H=z(1),U=z(0),ee=z(0),Z=z(1);x.signum()!=0;){for(;x.isEven();)x.rShiftTo(1,x),I?((!H.isEven()||!U.isEven())&&(H.addTo(this,H),U.subTo(v,U)),H.rShiftTo(1,H)):U.isEven()||U.subTo(v,U),U.rShiftTo(1,U);for(;B.isEven();)B.rShiftTo(1,B),I?((!ee.isEven()||!Z.isEven())&&(ee.addTo(this,ee),Z.subTo(v,Z)),ee.rShiftTo(1,ee)):Z.isEven()||Z.subTo(v,Z),Z.rShiftTo(1,Z);x.compareTo(B)>=0?(x.subTo(B,x),I&&H.subTo(ee,H),U.subTo(Z,U)):(B.subTo(x,B),I&&ee.subTo(H,ee),Z.subTo(U,Z))}if(B.compareTo(f.ONE)!=0)return f.ZERO;if(Z.compareTo(v)>=0)return Z.subtract(v);if(Z.signum()<0)Z.addTo(v,Z);else return Z;return Z.signum()<0?Z.add(v):Z}var oa=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],wl=(1<<26)/oa[oa.length-1];function Vo(v){var I,x=this.abs();if(x.t==1&&x[0]<=oa[oa.length-1]){for(I=0;I<oa.length;++I)if(x[0]==oa[I])return!0;return!1}if(x.isEven())return!1;for(I=1;I<oa.length;){for(var B=oa[I],H=I+1;H<oa.length&&B<wl;)B*=oa[H++];for(B=x.modInt(B);I<H;)if(B%oa[I++]==0)return!1}return x.millerRabin(v)}function vu(v){var I=this.subtract(f.ONE),x=I.getLowestSetBit();if(x<=0)return!1;var B=I.shiftRight(x);v=v+1>>1,v>oa.length&&(v=oa.length);for(var H=p(),U=0;U<v;++U){H.fromInt(oa[Math.floor(Math.random()*oa.length)]);var ee=H.modPow(B,this);if(ee.compareTo(f.ONE)!=0&&ee.compareTo(I)!=0){for(var Z=1;Z++<x&&ee.compareTo(I)!=0;)if(ee=ee.modPowInt(2,this),ee.compareTo(f.ONE)==0)return!1;if(ee.compareTo(I)!=0)return!1}}return!0}f.prototype.chunkSize=qt,f.prototype.toRadix=wn,f.prototype.fromRadix=mr,f.prototype.fromNumber=ur,f.prototype.bitwiseTo=Yn,f.prototype.changeBit=zn,f.prototype.addTo=_t,f.prototype.dMultiply=Ma,f.prototype.dAddOffset=gn,f.prototype.multiplyLowerTo=Xn,f.prototype.multiplyUpperTo=$i,f.prototype.modInt=gs,f.prototype.millerRabin=vu,f.prototype.clone=nn,f.prototype.intValue=Zt,f.prototype.byteValue=Lr,f.prototype.shortValue=Ur,f.prototype.signum=_r,f.prototype.toByteArray=Un,f.prototype.equals=Rn,f.prototype.min=xn,f.prototype.max=Sn,f.prototype.and=gi,f.prototype.or=En,f.prototype.xor=Mn,f.prototype.andNot=Yi,f.prototype.not=ei,f.prototype.shiftLeft=ii,f.prototype.shiftRight=Ra,f.prototype.getLowestSetBit=kr,f.prototype.bitCount=Ji,f.prototype.testBit=Wr,f.prototype.setBit=pn,f.prototype.clearBit=yi,f.prototype.flipBit=ta,f.prototype.add=Hr,f.prototype.subtract=fn,f.prototype.multiply=bn,f.prototype.divide=ui,f.prototype.remainder=Ti,f.prototype.divideAndRemainder=Fi,f.prototype.modPow=io,f.prototype.modInverse=Ic,f.prototype.pow=wi,f.prototype.gcd=Ho,f.prototype.isProbablePrime=Vo,f.prototype.square=Wn;function el(){this.i=0,this.j=0,this.S=new Array}function Es(v){var I,x,B;for(I=0;I<256;++I)this.S[I]=I;for(x=0,I=0;I<256;++I)x=x+this.S[I]+v[I%v.length]&255,B=this.S[I],this.S[I]=this.S[x],this.S[x]=B;this.i=0,this.j=0}function go(){var v;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,v=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=v,this.S[v+this.S[this.i]&255]}el.prototype.init=Es,el.prototype.next=go;function ul(){return new el}var ku=256;var kl,Ds,Za;function Sl(v){Ds[Za++]^=v&255,Ds[Za++]^=v>>8&255,Ds[Za++]^=v>>16&255,Ds[Za++]^=v>>24&255,Za>=ku&&(Za-=ku)}function de(){Sl(new Date().getTime())}if(Ds==null){Ds=new Array,Za=0;var F;if(t!==void 0&&(t.crypto!==void 0||t.msCrypto!==void 0)){var K=t.crypto||t.msCrypto;if(K.getRandomValues){var pe=new Uint8Array(32);for(K.getRandomValues(pe),F=0;F<32;++F)Ds[Za++]=pe[F]}else if(e.appName=="Netscape"&&e.appVersion<"5"){var Re=t.crypto.random(32);for(F=0;F<Re.length;++F)Ds[Za++]=Re.charCodeAt(F)&255}}for(;Za<ku;)F=Math.floor(65536*Math.random()),Ds[Za++]=F>>>8,Ds[Za++]=F&255;Za=0,de()}function Be(){if(kl==null){for(de(),kl=ul(),kl.init(Ds),Za=0;Za<Ds.length;++Za)Ds[Za]=0;Za=0}return kl.next()}function Qe(v){var I;for(I=0;I<v.length;++I)v[I]=Be()}function Xe(){}Xe.prototype.nextBytes=Qe;function ht(v,I){return new f(v,I)}function ut(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}function Tt(v,I){if(this.isPublic=!0,this.isPrivate=!1,typeof v!="string")this.n=v,this.e=I;else if(v!=null&&I!=null&&v.length>0&&I.length>0)this.n=ht(v,16),this.e=parseInt(I,16);else throw"Invalid RSA public key"}function Jt(v){return v.modPowInt(this.e,this.n)}ut.prototype.doPublic=Jt,ut.prototype.setPublic=Tt,ut.prototype.type="RSA";function Pr(v,I,x){if(this.isPrivate=!0,typeof v!="string")this.n=v,this.e=I,this.d=x;else if(v!=null&&I!=null&&v.length>0&&I.length>0)this.n=ht(v,16),this.e=parseInt(I,16),this.d=ht(x,16);else throw"Invalid RSA private key"}function Rt(v,I,x,B,H,U,ee,Z){if(this.isPrivate=!0,this.isPublic=!1,v==null)throw"RSASetPrivateEx N == null";if(I==null)throw"RSASetPrivateEx E == null";if(v.length==0)throw"RSASetPrivateEx N.length == 0";if(I.length==0)throw"RSASetPrivateEx E.length == 0";if(v!=null&&I!=null&&v.length>0&&I.length>0)this.n=ht(v,16),this.e=parseInt(I,16),this.d=ht(x,16),this.p=ht(B,16),this.q=ht(H,16),this.dmp1=ht(U,16),this.dmq1=ht(ee,16),this.coeff=ht(Z,16);else throw"Invalid RSA private key in RSASetPrivateEx"}function be(v,I){var x=new Xe,B=v>>1;this.e=parseInt(I,16);for(var H=new f(I,16),U=v/2-100,ee=f.ONE.shiftLeft(U);;){for(;this.p=new f(v-B,1,x),!(this.p.subtract(f.ONE).gcd(H).compareTo(f.ONE)==0&&this.p.isProbablePrime(10)););for(;this.q=new f(B,1,x),!(this.q.subtract(f.ONE).gcd(H).compareTo(f.ONE)==0&&this.q.isProbablePrime(10)););if(this.p.compareTo(this.q)<=0){var Z=this.p;this.p=this.q,this.q=Z}var Ae=this.q.subtract(this.p).abs();if(!(Ae.bitLength()<U||Ae.compareTo(ee)<=0)){var ne=this.p.subtract(f.ONE),Ie=this.q.subtract(f.ONE),ye=ne.multiply(Ie);if(ye.gcd(H).compareTo(f.ONE)==0&&(this.n=this.p.multiply(this.q),this.n.bitLength()==v)){this.d=H.modInverse(ye),this.dmp1=this.d.mod(ne),this.dmq1=this.d.mod(Ie),this.coeff=this.q.modInverse(this.p);break}}}this.isPrivate=!0}function Se(v){if(this.p==null||this.q==null)return v.modPow(this.d,this.n);for(var I=v.mod(this.p).modPow(this.dmp1,this.p),x=v.mod(this.q).modPow(this.dmq1,this.q);I.compareTo(x)<0;)I=I.add(this.p);return I.subtract(x).multiply(this.coeff).mod(this.p).multiply(this.q).add(x)}ut.prototype.doPrivate=Se,ut.prototype.setPrivate=Pr,ut.prototype.setPrivateEx=Rt,ut.prototype.generate=be;function oe(v,I){this.x=I,this.q=v}function Me(v){return v==this?!0:this.q.equals(v.q)&&this.x.equals(v.x)}function Le(){return this.x}function Ye(){return new oe(this.q,this.x.negate().mod(this.q))}function gt(v){return new oe(this.q,this.x.add(v.toBigInteger()).mod(this.q))}function bt(v){return new oe(this.q,this.x.subtract(v.toBigInteger()).mod(this.q))}function Ot(v){return new oe(this.q,this.x.multiply(v.toBigInteger()).mod(this.q))}function Gt(){return new oe(this.q,this.x.square().mod(this.q))}function vr(v){return new oe(this.q,this.x.multiply(v.toBigInteger().modInverse(this.q)).mod(this.q))}oe.prototype.equals=Me,oe.prototype.toBigInteger=Le,oe.prototype.negate=Ye,oe.prototype.add=gt,oe.prototype.subtract=bt,oe.prototype.multiply=Ot,oe.prototype.square=Gt,oe.prototype.divide=vr,oe.prototype.sqrt=function(){return new oe(this.q,this.x.sqrt().mod(this.q))};function Ar(v,I,x,B){this.curve=v,this.x=I,this.y=x,B==null?this.z=f.ONE:this.z=B,this.zinv=null}function zt(){return this.zinv==null&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q))}function Or(){return this.zinv==null&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q))}function cr(v){if(v==this)return!0;if(this.isInfinity())return v.isInfinity();if(v.isInfinity())return this.isInfinity();var I,x;return I=v.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(v.z)).mod(this.curve.q),I.equals(f.ZERO)?(x=v.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(v.z)).mod(this.curve.q),x.equals(f.ZERO)):!1}function Sr(){return this.x==null&&this.y==null?!0:this.z.equals(f.ZERO)&&!this.y.toBigInteger().equals(f.ZERO)}function $r(){return new Ar(this.curve,this.x,this.y.negate(),this.z)}function jn(v){if(this.isInfinity())return v;if(v.isInfinity())return this;var I=v.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(v.z)).mod(this.curve.q),x=v.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(v.z)).mod(this.curve.q);if(f.ZERO.equals(x))return f.ZERO.equals(I)?this.twice():this.curve.getInfinity();var B=new f("3"),H=this.x.toBigInteger(),U=this.y.toBigInteger();v.x.toBigInteger(),v.y.toBigInteger();var ee=x.square(),Z=ee.multiply(x),Ae=H.multiply(ee),ne=I.square().multiply(this.z),Ie=ne.subtract(Ae.shiftLeft(1)).multiply(v.z).subtract(Z).multiply(x).mod(this.curve.q),ye=Ae.multiply(B).multiply(I).subtract(U.multiply(Z)).subtract(ne.multiply(I)).multiply(v.z).add(I.multiply(Z)).mod(this.curve.q),X=Z.multiply(this.z).multiply(v.z).mod(this.curve.q);return new Ar(this.curve,this.curve.fromBigInteger(Ie),this.curve.fromBigInteger(ye),X)}function Wa(){if(this.isInfinity())return this;if(this.y.toBigInteger().signum()==0)return this.curve.getInfinity();var v=new f("3"),I=this.x.toBigInteger(),x=this.y.toBigInteger(),B=x.multiply(this.z),H=B.multiply(x).mod(this.curve.q),U=this.curve.a.toBigInteger(),ee=I.square().multiply(v);f.ZERO.equals(U)||(ee=ee.add(this.z.square().multiply(U))),ee=ee.mod(this.curve.q);var Z=ee.square().subtract(I.shiftLeft(3).multiply(H)).shiftLeft(1).multiply(B).mod(this.curve.q),Ae=ee.multiply(v).multiply(I).subtract(H.shiftLeft(1)).shiftLeft(2).multiply(H).subtract(ee.square().multiply(ee)).mod(this.curve.q),ne=B.square().multiply(B).shiftLeft(3).mod(this.curve.q);return new Ar(this.curve,this.curve.fromBigInteger(Z),this.curve.fromBigInteger(Ae),ne)}function zr(v){if(this.isInfinity())return this;if(v.signum()==0)return this.curve.getInfinity();var I=v,x=I.multiply(new f("3")),B=this.negate(),H=this,U=this.curve.q.subtract(v),ee=U.multiply(new f("3")),Z=new Ar(this.curve,this.x,this.y),Ae=Z.negate(),ne;for(ne=x.bitLength()-2;ne>0;--ne){H=H.twice();var Ie=x.testBit(ne),ye=I.testBit(ne);Ie!=ye&&(H=H.add(Ie?this:B))}for(ne=ee.bitLength()-2;ne>0;--ne){Z=Z.twice();var X=ee.testBit(ne),ie=U.testBit(ne);X!=ie&&(Z=Z.add(X?Z:Ae))}return H}function _e(v,I,x){var B;v.bitLength()>x.bitLength()?B=v.bitLength()-1:B=x.bitLength()-1;for(var H=this.curve.getInfinity(),U=this.add(I);B>=0;)H=H.twice(),v.testBit(B)?x.testBit(B)?H=H.add(U):H=H.add(this):x.testBit(B)&&(H=H.add(I)),--B;return H}Ar.prototype.getX=zt,Ar.prototype.getY=Or,Ar.prototype.equals=cr,Ar.prototype.isInfinity=Sr,Ar.prototype.negate=$r,Ar.prototype.add=jn,Ar.prototype.twice=Wa,Ar.prototype.multiply=zr,Ar.prototype.multiplyTwo=_e;function ot(v,I,x){this.q=v,this.a=this.fromBigInteger(I),this.b=this.fromBigInteger(x),this.infinity=new Ar(this,null,null)}function ir(){return this.q}function er(){return this.a}function Qr(){return this.b}function $n(v){return v==this?!0:this.q.equals(v.q)&&this.a.equals(v.a)&&this.b.equals(v.b)}function Kn(){return this.infinity}function qn(v){return new oe(this.q,v)}function kn(v){switch(parseInt(v.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:var I=v.substr(0,2);v.substr(2);var x=this.fromBigInteger(new f(Ae,16)),B=this.getA(),H=this.getB(),U=x.square().add(B).multiply(x).add(H),ee=U.sqrt();return I=="03"&&(ee=ee.negate()),new Ar(this,x,ee);case 4:case 6:case 7:var Z=(v.length-2)/2,Ae=v.substr(2,Z),ne=v.substr(Z+2,Z);return new Ar(this,this.fromBigInteger(new f(Ae,16)),this.fromBigInteger(new f(ne,16)));default:return null}}ot.prototype.getQ=ir,ot.prototype.getA=er,ot.prototype.getB=Qr,ot.prototype.equals=$n,ot.prototype.getInfinity=Kn,ot.prototype.fromBigInteger=qn,ot.prototype.decodePointHex=kn;oe.prototype.getByteLength=function(){return Math.floor((this.toBigInteger().bitLength()+7)/8)},Ar.prototype.getEncoded=function(v){var I=function(U,ee){var Z=U.toByteArrayUnsigned();if(ee<Z.length)Z=Z.slice(Z.length-ee);else for(;ee>Z.length;)Z.unshift(0);return Z},x=this.getX().toBigInteger(),B=this.getY().toBigInteger(),H=I(x,32);return v?B.isEven()?H.unshift(2):H.unshift(3):(H.unshift(4),H=H.concat(I(B,32))),H},Ar.decodeFrom=function(v,I){I[0];var x=I.length-1,B=I.slice(1,1+x/2),H=I.slice(1+x/2,1+x);B.unshift(0),H.unshift(0);var U=new f(B),ee=new f(H);return new Ar(v,v.fromBigInteger(U),v.fromBigInteger(ee))},Ar.decodeFromHex=function(v,I){I.substr(0,2);var x=I.length-2,B=I.substr(2,x/2),H=I.substr(2+x/2,x/2),U=new f(B,16),ee=new f(H,16);return new Ar(v,v.fromBigInteger(U),v.fromBigInteger(ee))},Ar.prototype.add2D=function(v){if(this.isInfinity())return v;if(v.isInfinity())return this;if(this.x.equals(v.x))return this.y.equals(v.y)?this.twice():this.curve.getInfinity();var I=v.x.subtract(this.x),x=v.y.subtract(this.y),B=x.divide(I),H=B.square().subtract(this.x).subtract(v.x),U=B.multiply(this.x.subtract(H)).subtract(this.y);return new Ar(this.curve,H,U)},Ar.prototype.twice2D=function(){if(this.isInfinity())return this;if(this.y.toBigInteger().signum()==0)return this.curve.getInfinity();var v=this.curve.fromBigInteger(f.valueOf(2)),I=this.curve.fromBigInteger(f.valueOf(3)),x=this.x.square().multiply(I).add(this.curve.a).divide(this.y.multiply(v)),B=x.square().subtract(this.x.multiply(v)),H=x.multiply(this.x.subtract(B)).subtract(this.y);return new Ar(this.curve,B,H)},Ar.prototype.multiply2D=function(v){if(this.isInfinity())return this;if(v.signum()==0)return this.curve.getInfinity();var I=v,x=I.multiply(new f("3")),B=this.negate(),H=this,U;for(U=x.bitLength()-2;U>0;--U){H=H.twice();var ee=x.testBit(U),Z=I.testBit(U);ee!=Z&&(H=H.add2D(ee?this:B))}return H},Ar.prototype.isOnCurve=function(){var v=this.getX().toBigInteger(),I=this.getY().toBigInteger(),x=this.curve.getA().toBigInteger(),B=this.curve.getB().toBigInteger(),H=this.curve.getQ(),U=I.multiply(I).mod(H),ee=v.multiply(v).multiply(v).add(x.multiply(v)).add(B).mod(H);return U.equals(ee)},Ar.prototype.toString=function(){return"("+this.getX().toBigInteger().toString()+","+this.getY().toBigInteger().toString()+")"},Ar.prototype.validate=function(){var v=this.curve.getQ();if(this.isInfinity())throw new Error("Point is at infinity.");var I=this.getX().toBigInteger(),x=this.getY().toBigInteger();if(I.compareTo(f.ONE)<0||I.compareTo(v.subtract(f.ONE))>0)throw new Error("x coordinate out of bounds");if(x.compareTo(f.ONE)<0||x.compareTo(v.subtract(f.ONE))>0)throw new Error("y coordinate out of bounds");if(!this.isOnCurve())throw new Error("Point is not on the curve.");if(this.multiply(v).isInfinity())throw new Error("Point is not a scalar multiple of G.");return!0};var J=(function(){var v="(?:-?\\b(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\\b)",I='(?:[^\\0-\\x08\\x0a-\\x1f"\\\\]|\\\\(?:["/\\\\bfnrt]|u[0-9A-Fa-f]{4}))',x='(?:"'+I+'*")',B=new RegExp("(?:false|true|null|[\\{\\}\\[\\]]|"+v+"|"+x+")","g"),H=new RegExp("\\\\(?:([^u])|u(.{4}))","g"),U={'"':'"',"/":"/","\\":"\\",b:"\b",f:"\f",n:`
@@ -605,7 +605,7 @@ function print() { __p += __j.call(arguments, '') }
605
605
  .c{fill:none;}
606
606
  .d{fill:none;stroke:${r};stroke-miterlimit:10;stroke-width:18px;}
607
607
  .e{fill:gray;}`})}),w.jsxs("g",{className:"a",children:[w.jsx("rect",{className:"c",x:"7.84",y:"7.84",width:"503",height:"503",rx:"89.7"}),w.jsx("circle",{className:"d",cx:"267.84",cy:"259.84",r:"175"}),w.jsx("circle",{className:"e",cx:"268.34",cy:"260.34",r:"131.5"})]})]})},kNt=({orientation:e="horizontal"})=>{const t=E.useContext(Wo),r=si(),{featuresOptions:n,config:i}=nr(Ei),{themeName:a}=nr(Vi),o=i?.featuresOptions,s=UQe(n,o,"recording")||!1,{isHostOrManager:l,startRecording:u,stopRecording:c,pauseRecording:f,recordingStatus:p,resumeRecording:h,isRecordingSessionActive:g}=HX();x5e(t,r);const m=()=>{p===Od.Stopped?u():p===Od.Paused?h():p===Od.Recording&&f()},y=()=>{const C={isActive:!0,onClick:m,disabled:!l,isLoading:!1,className:"hover:bg-theme-background w-9",iconColor:a==="dark"?"white":"black"};switch(p){case Od.Recording:return{...C,icon:o8,iconColor:"red",title:"Pause"};case Od.Paused:return{...C,icon:$se,title:"Resume"};default:return{...C,icon:BNt,iconColor:"text-theme-text",title:"Start Recording",className:"bg-transparent"}}};return s?w.jsx("div",{className:"relative",children:w.jsxs("div",{className:`flex items-center ${e==="vertical"?"rounded-lg w-full justify-center hover:bg-theme-background":"rounded-full"} overflow-hidden bg-theme-surface border border-theme-border`,children:[w.jsx(Hb,{...y(),hoverColor:"hover:bg-theme-background",id:`uikit-footer-record-${y().title.toLowerCase()}`,orientation:e}),g&&w.jsx("div",{className:"w-px h-4 border border-theme-border"}),g&&w.jsx(Hb,{icon:Ow,isActive:!0,onClick:c,disabled:!l,isLoading:!1,iconColor:a==="dark"?"white":"black",className:"hover:bg-theme-background w-9",title:"Stop",id:"uikit-footer-record-stop",orientation:e})]})}):null},NO=E.forwardRef(({icon:e,count:t,isActive:r,onClick:n,id:i="",countId:a="",themName:o="light",iconSize:s=20,className:l="",orientation:u="horizontal"},c)=>{const[f,p]=E.useState(!1),h=t>99?"99+":t,g=o==="dark"?"white":"black";return w.jsxs("button",{className:`flex items-center space-x-1 px-3 py-2 ${u==="vertical"?"rounded-lg w-full justify-center":"rounded-full"} transition-all duration-300 border border-theme-border bg-theme-surface
608
- ${r?"bg-blue-500 hover:bg-blue-600 text-theme-text":f?"hover:bg-theme-background":"text-theme-background"} ${l}`,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),onClick:n,id:i,ref:c,children:[w.jsx(e,{size:s,color:g}),t>0&&w.jsx("span",{className:`text-sm font-medium text-${g}`,id:a,children:h})]})}),I5e=()=>{const e=si(),{sessionInfo:t}=nr(Ei);return{openExportDialog:E.useCallback((n=!0)=>{const i={format:Vb.PDF,name:`${t.topic}-whiteboard-${new Date().toISOString().split("T")[0]}`,includeComments:!0,shouldCloseAfterExport:n};e(Hx(i)),e(CR(!0))},[e,t.topic])}},PNt=()=>{const{whiteboardClient:e}=E.useContext(Xs),t=si(),r=nr(Vi),n=jc(),i=nr(vv),{isWhiteboardExportConfirmOpen:a,whiteboardExportOptions:o}=r,s=E.useCallback(async()=>{if(t(CR(!1)),o)try{t(G6(!0)),await e.exportWhiteboard(Vb.PDF,o.name,o.includeComments),o.shouldCloseAfterExport&&await e.stopWhiteboardScreen()}catch(g){console.error("Failed to export whiteboard:",g),o.shouldCloseAfterExport&&await e.stopWhiteboardScreen().catch(()=>{})}finally{t(G6(!1))}t(Hx(null))},[e,o,t]),l=E.useCallback(async()=>{if(t(CR(!1)),o)try{t(G6(!0)),await e.exportWhiteboard(Vb.PDF,o.name,o.includeComments)}catch(g){console.error("Failed to export whiteboard:",g)}finally{t(G6(!1))}t(Hx(null))},[e,o,t]),u=E.useCallback(async()=>{t(CR(!1)),t(Hx(null));try{await e.stopWhiteboardScreen()}catch(g){console.error("Failed to close whiteboard:",g)}},[e,t]),c=E.useCallback(()=>{t(CR(!1)),t(Hx(null))},[t]),f=E.useCallback(g=>{o&&t(Hx({...o,...g}))},[o,t]),p=o?.shouldCloseAfterExport===!1,h=i.presenterID===n?.userId;return!a||!o?null:w.jsx(TA,{icon:w.jsx(A_,{size:26,className:"text-blue-500 drop-shadow-sm",strokeWidth:1.5}),iconClassName:"bg-blue-50 dark:bg-blue-950/30",onCancel:c,cancelText:"Cancel",onClose:p?l:s,closeText:p?"Export":"Export & Close",closeVariant:"primary",closeIcon:w.jsx(A_,{}),title:p?"Export Whiteboard":"Export Whiteboard?",message:p?"Export the current whiteboard content.":"You can't reopen the whiteboard after closing. Please export the whiteboard content before closing.",confirmText:h?p?"Cancel":"Close":"",onConfirm:p?c:u,confirmVariant:p?"secondary":"danger",id:"uikit-whiteboard-export-confirm-dialog",children:w.jsxs("div",{className:"space-y-4 mt-4",children:[w.jsx("div",{children:w.jsx("div",{className:"flex gap-2",children:w.jsxs("button",{type:"button",onClick:()=>f({format:Vb.PDF}),className:`flex items-center gap-2 px-3 py-2 rounded-md text-sm font-medium transition-colors ${o.format==="pdf"?"bg-blue-500 text-white hover:bg-blue-600":"bg-theme-surface hover:bg-theme-background text-theme-text border border-theme-border"}`,children:[w.jsx(n8,{size:16}),"PDF"]})})}),w.jsxs("div",{children:[w.jsx("label",{className:"block text-sm font-medium text-theme-text mb-2",children:"File Name"}),w.jsx("input",{type:"text",value:o.name,onChange:g=>f({name:g.target.value}),className:"w-full px-3 py-2 border border-theme-border rounded-md bg-theme-surface text-theme-text focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"Enter file name"})]}),w.jsx("div",{className:"space-y-2",children:w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsx("input",{type:"checkbox",id:"includeComments",checked:o.includeComments&&o.format===Vb.PDF,disabled:o.format!==Vb.PDF,onChange:g=>f({includeComments:g.target.checked}),className:"w-4 h-4 text-blue-600 bg-theme-surface border-theme-border rounded focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed"}),w.jsx("label",{htmlFor:"includeComments",className:`text-sm font-medium ${o.format!==Vb.PDF?"text-theme-text":"text-theme-text/50"}`,children:"Include Comments"})]})})]})})},T5e=({isHostOrManager:e,orientation:t="horizontal"})=>{const r=E.useContext(Wo),n=nr(Ei),{subsessionClient:i}=E.useContext(Xs),{currentSubRoom:a,subStatus:o,subsessionOptions:s}=nr(zp),l=nr(vv),u=jc(),{openExportDialog:c}=I5e(),f=o===Rs.InProgress&&a.userStatus===kA.InSubsession,[p,h]=E.useState(!1),g=u&&l.presenterID===u.userId,m=!l.isDisableExport&&g,y=l?.status===VA.InProgress,C=E.useCallback(V=>{if(m&&y){c(!0),h(!1);return}n.isHost,r.leave(V),h(!1)},[r,n.isHost,m,y,c]),T=()=>{h(!p)},R="w-full px-4 py-2 text-left text-red-500 hover:bg-gray-100 transition-colors duration-200 rounded-lg",O="w-full px-4 py-2 text-left text-theme-text-button bg-red-500 hover:bg-red-600 transition-colors duration-200",N=w.jsxs(w.Fragment,{children:[!f&&n.isManager&&w.jsx("button",{className:O,onClick:()=>{r.reclaimHost()},id:"reclaim-host-button",children:"Reclaim Host"}),n.isHost&&w.jsx("button",{className:O,onClick:()=>{C(!0)},id:"end-for-all-button",children:"End Session"})]}),k=f&&(e||s?.isBackToMainSessionEnabled)&&w.jsx("button",{className:"w-full px-4 py-2 text-left text-theme-text-button bg-blue-500 hover:bg-blue-600 transition-colors duration-200",onClick:()=>{i.leaveSubsession(),h(!1)},id:"leave-subsession-button",children:"Leave Subsession"}),j=E.useRef(null);return w.jsxs("div",{className:"relative",children:[w.jsx("button",{className:`h-10 ${t==="vertical"?"rounded-lg w-full justify-center":"rounded-full w-10"} flex items-center justify-center transition-all duration-200 border border-theme-border bg-red-500 shadow-md hover:bg-red-600 hover:shadow-lg active:bg-red-800 active:shadow-inner`,onClick:T,id:"leave-button",ref:j,children:w.jsx(ele,{size:24,className:"text-white"})}),w.jsx(pCe,{isOpen:p,buttonRef:j,position:t==="vertical"?"bottom-end":"top-end",wrapperClass:`${t==="vertical"?"rounded-lg":"rounded-full"}`,onClickOutside:()=>h(!1),children:w.jsxs("div",{className:"bg-white rounded-lg bg-theme-surface border border-theme-border shadow-xl overflow-hidden",style:{width:"200px"},children:[N,w.jsx("button",{className:R,onClick:()=>{C(!1)},id:"leave-meeting-button",children:"Leave Session"}),k]})})]})},zb={en:"English",zh:"Chinese",ja:"Japanese",de:"German",fr:"French",ru:"Russian",pt:"Portuguese",es:"Spanish",ko:"Korean",it:"Italian",en1:"Reserved",vi:"Vietnamese",nl:"Dutch",uk:"Ukrainian",ar:"Arabic",bn:"Bengali","zh-hant":"Chinese (Traditional)",cs:"Czech",et:"Estonian",fi:"Finnish",el:"Greek",he:"Hebrew",hi:"Hindi",hu:"Hungarian",id:"Indonesian",ms:"Malay",fa:"Persian (Farsi)",pl:"Polish",ro:"Romanian",sv:"Swedish",ta:"Tamil",te:"Telugu",tl:"Tagalog",tr:"Turkish",da:"Danish",th:"Thai","fr-ca":"Canadian French","zh-yue":"Cantonese (Yue)"},jNt="absolute bottom-full left-0 mb-2 w-72 rounded-lg shadow-lg z-20 text-gray-800 overflow-hidden bg-theme-surface border border-theme-border",_5e="w-full px-4 py-3 text-left hover:bg-gray-100 transition-colors duration-150 ease-in-out",R5e=({languages:e,setShowLanguagesMenu:t,selectedLanguage:r,handleLanguageSelect:n})=>w.jsxs("div",{className:jNt,children:[w.jsxs("div",{className:"flex items-center p-2",children:[w.jsx("button",{className:" rounded-full hover:bg-theme-background/50 transition-colors duration-150 ease-in-out",onClick:()=>t(!1),children:w.jsx(Gse,{size:24,className:"text-theme-text"})}),w.jsx("h3",{className:"text-xl font-semibold ml-2 text-theme-text",children:"Select Language"})]}),w.jsx("div",{className:"max-h-96 overflow-y-auto uikit-custom-scrollbar",children:e.map(i=>w.jsxs("button",{className:`${_5e} flex items-center text-theme-text hover:bg-theme-background justify-between`,onClick:()=>{n(i),t(!1)},children:[zb[i],r===i&&w.jsx(Mw,{size:20,className:"text-blue-500"})]},i))})]}),M5e=({languages:e,setShowLanguagesMenu:t,selectedLanguage:r,handleLanguageSelect:n})=>w.jsx("div",{className:"max-h-96 overflow-y-auto uikit-custom-scrollbar",children:e.map(i=>w.jsxs("button",{className:`${_5e} flex items-center justify-between`,onClick:()=>{n(i),t(!1)},children:[zb[i],r===i&&w.jsx(Mw,{size:20,className:"text-blue-500"})]},i))}),O5e=Cu({name:"caption",initialState:{isTranscriptionFeatureEnabled:!1,isTranslationFeatureEnabled:!1,isHostDisableCaptions:!1,isTranscriptionInitiated:!1,isTranslationOn:!1,currentSpeakingLanguage:null,currentTranslationLanguage:void 0,initialTranslationLanguage:void 0},reducers:{setIsTranscriptionFeatureEnabled:(e,t)=>{e.isTranscriptionFeatureEnabled=t.payload},setIsTranslationFeatureEnabled:(e,t)=>{e.isTranslationFeatureEnabled=t.payload},setIsHostDisableCaptions:(e,t)=>{e.isHostDisableCaptions=t.payload},setIsTranscriptionInitiated:(e,t)=>{e.isTranscriptionInitiated=t.payload},setInitialTranslationLanguage:(e,t)=>{e.initialTranslationLanguage=t.payload},setCurrentTranslationLanguage:(e,t)=>{e.currentTranslationLanguage=t.payload},setIsTranslationOn:(e,t)=>{e.isTranslationOn=t.payload},setCurrentSpeakingLanguage:(e,t)=>{e.currentSpeakingLanguage=t.payload}}}),{setIsTranscriptionFeatureEnabled:FNt,setIsTranslationFeatureEnabled:UNt,setIsHostDisableCaptions:VX,setIsTranscriptionInitiated:zX,setInitialTranslationLanguage:N5e,setCurrentTranslationLanguage:Gv,setIsTranslationOn:Y9t,setCurrentSpeakingLanguage:LO}=O5e.actions,HNt=O5e.reducer,L5e=e=>{const{captionClient:t}=E.useContext(Xs),r=si(),{isTranslationFeatureEnabled:n,isTranscriptionInitiated:i,currentSpeakingLanguage:a,currentTranslationLanguage:o}=nr(JS),[s,l]=E.useState(!1),[u,c]=E.useState(!1),f=E.useCallback(()=>{if(!t)return[];const{transcriptionLanguage:y}=t.getLiveTranscriptionStatus();return y?y.split(";").filter(Boolean):[]},[t]),p=E.useCallback(y=>{if(!t)return[];const{translationLanguage:C}=t.getLiveTranscriptionStatus();if(!C)return[];const T=C.find(R=>R.speakingLanguage===y);return T?T.translatedToLanguage.split(";").filter(Boolean):[]},[t]),h=E.useCallback(async y=>{if(!i){r(em(!0)),e(!1);return}if(r(Gv(void 0)),r(LO(y)),n)try{await t?.setTranslationLanguage(void 0)}catch(C){r(Gv(o)),r(LO(a)),uc(C.reason,{variant:"error",autoHideDuration:5e3});return}try{await t?.setSpeakingLanguage(y)}catch(C){r(LO(a)),uc(C.reason,{variant:"error",autoHideDuration:5e3})}},[i,r,n,e,t,o,a]),g=E.useCallback(async y=>{r(Gv(y));try{await t?.setTranslationLanguage(y)}catch(C){r(Gv(o)),uc(C.reason,{variant:"error",autoHideDuration:5e3})}},[t,o,r]),m=E.useCallback(async()=>{if(!i){r(em(!0)),e(!1);return}if(o!==void 0)try{r(Gv(void 0)),await t?.setTranslationLanguage(void 0)}catch(y){r(Gv(o)),uc(y.reason,{variant:"error",autoHideDuration:5e3})}else try{r(Gv(p(a)[0])),await t?.setTranslationLanguage(p(a)[0])}catch(y){r(Gv(void 0)),uc(y.reason,{variant:"error",autoHideDuration:5e3})}},[t,a,o,r,p,i,e]);return{isTranslationFeatureEnabled:n,isTranscriptionInitiated:i,currentSpeakingLanguage:a,currentTranslationLanguage:o,showSpeakingLanguagesMenu:s,showTranslateLanguagesMenu:u,setShowSpeakingLanguagesMenu:l,setShowTranslateLanguagesMenu:c,getSpeakingLanguagesList:f,getTranslationLanguagesList:p,handleSpeakingLanguageSelect:h,handleTranslateToLanguageSelect:g,toggleIsTranslationOn:m}},VNt="absolute bottom-full left-0 mb-1 w-72 rounded-lg shadow-lg z-30 bg-theme-surface border border-theme-border text-theme-text overflow-hidden",D5e="border-b border-theme-border",zNt=`text-xl font-semibold px-3 pt-2 pb-1 text-theme-text ${D5e}`,W6="w-full px-3 py-2.5 text-left hover:bg-theme-background transition-colors duration-200 flex items-center gap-3 text-sm",DO=`${W6} ${D5e}`,QNt=({setIsMenuOpen:e,onViewTranscript:t,onCaptionSettings:r})=>{const n=si(),{isHost:i}=nr(Ei),{isTranslationFeatureEnabled:a,isTranscriptionInitiated:o,currentSpeakingLanguage:s,currentTranslationLanguage:l,showSpeakingLanguagesMenu:u,showTranslateLanguagesMenu:c,setShowSpeakingLanguagesMenu:f,setShowTranslateLanguagesMenu:p,getSpeakingLanguagesList:h,getTranslationLanguagesList:g,handleSpeakingLanguageSelect:m,handleTranslateToLanguageSelect:y,toggleIsTranslationOn:C}=L5e(e);return u?w.jsx(R5e,{languages:h(),setShowLanguagesMenu:f,selectedLanguage:s,handleLanguageSelect:m}):a&&c?w.jsx(R5e,{languages:g(s),setShowLanguagesMenu:p,selectedLanguage:l,handleLanguageSelect:y}):w.jsx("div",{id:"uikit-caption-menu",className:VNt,children:w.jsxs("div",{className:"py-1 px-2",children:[w.jsx("h3",{className:zNt,children:"Captions"}),w.jsxs("button",{id:"uikit-caption-menu-speaking-language",className:DO,onClick:()=>{if(!o){n(em(!0)),e(!1);return}f(!0)},children:[w.jsxs("div",{className:"flex-1",children:[w.jsx("div",{className:"text-theme-text/70",children:"Speaking language"}),w.jsx("div",{className:"font-medium",children:zb[s]})]}),w.jsx(Z9,{size:16,className:"text-theme-text/50"})]}),l!==void 0&&w.jsxs("button",{id:"uikit-caption-menu-translate-language",className:DO,onClick:()=>p(!0),children:[w.jsxs("div",{className:"flex-1",children:[w.jsx("div",{className:"text-theme-text/70",children:"Translate to"}),w.jsx("div",{className:"font-medium",children:zb[l]})]}),w.jsx(Z9,{size:16,className:"text-theme-text/50"})]}),w.jsx("button",{id:"uikit-caption-menu-transcript",className:i||a?DO:W6,onClick:t,children:"View full transcript"}),a&&g(s).length>0&&w.jsx("button",{id:"uikit-caption-menu-toggle-translation",className:i?DO:W6,onClick:C,children:l!==void 0?"Turn off translation":"Turn on translation"}),i&&w.jsx("button",{id:"uikit-caption-menu-host-settings",className:W6,onClick:r,children:"Host caption control settings"})]})})},GNt=({isCaptionOn:e,handleCaptionClick:t,onViewTranscript:r,onCaptionSettings:n,orientation:i="horizontal"})=>{const[a,o]=E.useState(!1),s=E.useRef(null),{themeName:l}=nr(Vi),{isHostDisableCaptions:u}=nr(JS);E.useEffect(()=>{const p=h=>{s.current&&!s.current.contains(h.target)&&o(!1)};return document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[]);const c=a&&w.jsx(QNt,{setIsMenuOpen:o,onViewTranscript:()=>{r(),o(!1)},onCaptionSettings:()=>{n(),o(!1)}}),f=l==="dark"?"white":"black";return w.jsx(IO,{id:"uikit-footer-caption",isShowChevron:!u,ref:s,icon:ny,themeName:l,isActive:e,onClick:t,onChevronUpClick:()=>o(!a),menuContent:c,title:"show-captions",bgColor:e?"bg-blue-500":"",iconColor:f,chevronUpColor:f,hoverColor:e?"hover:bg-blue-600":"hover:bg-theme-background",orientation:i})},WNt=({isSettingsOpen:e,onOpenSettings:t,themeName:r,orientation:n="horizontal"})=>{const[i,a]=E.useState(!1),{liveStreamClient:o}=E.useContext(Xs),{isHost:s,featuresOptions:l,isSendingScreenShare:u}=nr(Ei),{isShowLiveStreamPanel:c}=nr(Vi),f=E.useRef(null),p=E.useRef(null),h=si(),{startCameraShare:g,stopShare:m}=TO(),y=l?.livestream?.enable;E.useEffect(()=>{const R=O=>{f.current&&!f.current.contains(O.target)&&!p.current?.contains(O.target)&&a(!1)};return document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R)},[]);const C=E.useCallback(()=>{a(!1),t(!0)},[t]),T=E.useMemo(()=>[{title:"Settings",onClick:()=>C()},y&&s&&o?.isLiveStreamEnabled()&&{title:"Live streaming",onClick:()=>h(RG(!c))},l?.cameraShare?.enable&&!u&&{title:"Share camera",onClick:()=>g()},u&&{title:"Stop share",onClick:()=>m()}].filter(Boolean),[C,s,o,c,h,y,u,g,m,l]);return w.jsxs("div",{className:"relative",children:[w.jsx(NO,{icon:Yse,isActive:i,onClick:()=>{a(!i)},ref:p,id:"footer-more-button",themName:r,iconSize:24,orientation:n,className:n==="vertical"?"w-10":""}),i&&w.jsx("div",{ref:f,className:`absolute bottom-full ${n==="vertical"?"left-0 mb-1":"right-0 mb-1"} bg-theme-surface z-30 border border-theme-border text-theme-text rounded-lg shadow-xl overflow-hidden bg-theme-surface`,style:{width:"200px"},children:T.map((R,O)=>w.jsx("button",{className:"w-full px-4 py-2 text-left text-theme-text hover:bg-theme-background transition-colors duration-200",onClick:R.onClick,children:R.title},O))})]})},QX=({cameraList:e,changeCamera:t,orientation:r="horizontal",autoClose:n=!0})=>{const i=si(),{t:a}=Ym(),o=nr(Vi),{videoPlaybackFile:s,config:{featuresOptions:{playback:{audioVideoPlaybacks:l,enable:u}}}}=nr(Ei),[c,f]=E.useState(!1),p=E.useRef(null),{enqueueSnackbar:h}=Mg(),g=Nc(o.isShowVideoWarning),[m,y]=E.useState(!1),C=E.useContext(Wo),T=C.getCurrentUserInfo(),[R,O]=E.useState(T?.bVideoOn||!1),{stream:N,video:{encode:k,decode:j}}=E.useContext(Ro),{updateMirrorVideo:V,canMirrorVideo:z}=Kxe(),[q,$]=E.useState(!1);let Y="";o.isShowAudioWarning&&o.isShowVideoWarning?Y=a("join_media_preview_warning_denied_both"):o.isShowAudioWarning?Y=a("join_media_preview_warning_denied_mic"):o.isShowVideoWarning?Y=a("join_media_preview_warning_denied_camera"):Y=a("join_media_preview_warning_denied"),E.useEffect(()=>{g!==o.isShowVideoWarning&&o.isShowVideoWarning&&h(Y,{variant:"error"})},[h,g,o.isShowVideoWarning,Y]);const re=E.useCallback(Ne=>{if(f(!1),i(att(!0)),Ne?.type==="VIDEO_USER_FORBIDDEN_CAPTURE")throw Ne;{const ke=c5e(Ne,"Start video failed");throw h(ke,{variant:"error"}),Ne}},[i,h]),se=E.useCallback(async()=>{if(o.isShowVideoWarning){i(K0(!0)),f(!1);return}if(f(!0),T?.bVideoOn)try{await N?.stopVideo(),i(BSe(!1)),f(!1)}catch(Ne){re(Ne)}else{const Ne={hd:!0,cameraId:o.activeCamera,mirrored:o.isMirrorVideo};o.isSupportVB&&o.activeVbImage&&Object.assign(Ne,{virtualBackground:{imageUrl:o.activeVbImage}});try{await N?.startVideo(Ne),i(BSe(!0)),f(!1)}catch(ke){re(ke)}}},[T?.bVideoOn,i,o,N,re]);E.useEffect(()=>{O(C.getCurrentUserInfo()?.bVideoOn)},[C,T?.bVideoOn]);const me=E.useCallback(()=>{y(!1),i($0("video")),i(Qp(!0))},[i,y]),Te=E.useCallback(()=>{y(!1),i($0("playback")),i(Qp(!0))},[i,y]),fe=E.useCallback(()=>{y(!1),i($0("statistics")),i(oCe("video")),i(Qp(!0))},[i,y]),Ce=E.useCallback(()=>{y(!1),i($0("background")),i(Qp(!0))},[i,y]),Oe=E.useCallback(async()=>{if(!q){$(!0);try{await V(!o.isMirrorVideo),y(!1)}catch(Ne){console.error("Failed to toggle mirror setting",Ne),h("Unable to update mirror setting. Please try again.",{variant:"error"})}finally{$(!1)}}},[h,q,o.isMirrorVideo,V]),Ve=!k||!j||c,Ge=Nc(Ve);E.useEffect(()=>{o.previewStatus.isCameraOn&&Ge&&!Ve&&!R&&setTimeout(()=>{document.getElementById("uikit-footer-video-button")?.click(),i(wR({isCameraOn:!1}))},2e3)},[o.previewStatus,e,Ve,Ge,R,i]);const ce=o.themeName==="dark"?"white":"black";return w.jsx(w.Fragment,{children:w.jsx(IO,{id:"uikit-footer-video",ref:p,icon:o?.isShowVideoWarning?m_:R?Nw:v_,isActive:R,onClick:se,isLoading:Ve,iconColor:ce,themeName:o.themeName,chevronUpColor:ce,hoverColor:"hover:bg-theme-background",isShowChevron:o.viewType!==pl.Minimized,onChevronUpClick:Ne=>{y(!m),Ne.stopPropagation()},isWarning:o.isShowVideoWarning,title:"video",disabled:s!=="",orientation:r,menuContent:w.jsx(u5e,{autoClose:n,title:"Video settings",orientation:r,activeDevice:{Camera:o.activeCamera},setSettings:Ne=>{Ne!==o.activeCamera&&(f(!0),t(Ne).then(()=>{f(!1)})),y(!1)},options:{Camera:e},menuName:"camera-list",labels:{Camera:"Select a camera"},isOpen:m,setIsOpen:Ne=>{y(Ne)},excludeRefs:[p],clickSettingsLink:me,otherButtons:[{text:"Mirror my video",click:Oe,key:"footer-video-menu-mirror",checked:o.isMirrorVideo,disabled:!z||q},{text:"Select video playback",click:Te,key:"footer-video-menu-select-video-playback",checked:!1,disabled:!cE(R)||l?.length===0||!u},{text:"Blur your background",click:Ce,key:"footer-video-menu-blur",checked:!1,disabled:!o.isSupportVB},{text:"Video statistics",click:()=>{fe(),y(!1)},key:"footer-video-menu-video-statistics",checked:!1,disabled:!R}].filter(Ne=>!Ne?.disabled)})})})};function $Nt(){const e=E.useContext(Wo),{enqueueSnackbar:t}=Mg(),r="The host muted you",n="The host muted everyone",i=E.useCallback(a=>{a.action===cy.Muted&&a.source===dh.PassiveByMuteOne&&t(r,{variant:"info"}),a.action===cy.Muted&&a.source===dh.PassiveByMuteAll&&t(n,{variant:"info"})},[t,r,n]);E.useEffect(()=>(e.on("current-audio-change",i),()=>{e.off("current-audio-change",i)}),[e,i])}const GX=E.forwardRef(({color:e="black",size:t=24,strokeWidth:r=2},n)=>w.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"transform rotate-45",children:[w.jsx("path",{d:"M5.5 8.5 9 12l-3.5 3.5L2 12l3.5-3.5Z"}),w.jsx("path",{d:"m12 2 3.5 3.5L12 9 8.5 5.5 12 2Z"}),w.jsx("path",{d:"M18.5 8.5 22 12l-3.5 3.5L15 12l3.5-3.5Z"}),w.jsx("path",{d:"m12 15 3.5 3.5L12 22l-3.5-3.5L12 15Z"})]}));GX.displayName="SubsessionIcon";const B5e=({setIsSettingsOpen:e,isSettingsOpen:t,cameraList:r,microphoneList:n,speakerList:i,changeCamera:a,changeMicrophone:o,changeSpeaker:s,orientation:l="horizontal",autoClose:u=!0})=>{const{participantSize:c,isParticipantsPoppedOut:f,isChatPoppedOut:p,isSubsessionPoppedOut:h,activeSidePanel:g,isShowCaption:m,isShowCaptionHistory:y,isShowHostCaptionSettings:C,isJoinSubsessionConfirm:T,isAskSubsessionHelpConfirm:R,themeName:O}=nr(Vi),{isHost:N,isManager:k,config:{featuresOptions:{leave:{enable:j},audio:{enable:V},video:{enable:z},chat:{enable:q},users:{enable:$},share:{enable:Y},whiteboard:{enable:re},subsession:{enable:se},settings:{enable:me}}},status:Te}=nr(Ei),fe=N||k,[Ce,Oe]=E.useState(!1),{currentSubRoom:Ve,subUserStatus:Ge,subsessionType:ce,subsessionOptions:{isSubsessionSelectionEnabled:Ne},subStatus:ke,isSubsessionEnabled:De}=nr(zp),{enabled:Pe}=nr(vv),Je=Ve&&Ge===kA.InSubsession,{isTranscriptionInitiated:vt,isTranscriptionFeatureEnabled:qe,isHostDisableCaptions:St}=nr(JS),It=si(),{subsessionClient:at}=E.useContext(Xs),[kt,Et]=E.useState(!1),{unreadCount:ve}=nr(Ox),[Ht,Rr]=E.useState(!1),[ar,Cr]=E.useState(!1);$Nt();const Xr=E.useCallback(async()=>{if(N&&St){It(Dx(!0));return}if(!vt){It(em(!0));return}It(Bx(!m))},[It,N,St,m,vt]),lr=()=>{It(XS(!f)),It(q0("Participants"))},Yr=()=>{It(ZS(!p)),It(q0("Chat"))},nn=()=>{fe?(It(Lx(!h)),It(q0("Subsession"))):Ne?It(Lx(!h)):(It(SR(!0)),It(ib(!0)))},Zt=()=>{It(kx(!R))},Lr=l==="vertical"?"fixed left-0 top-1/2 -translate-y-1/2 flex flex-col py-4 px-2 border rounded-lg border-theme-border shadow-lg bg-theme-surface":`py-2 px-6 border-t border-theme-border shadow-lg bg-theme-surface ${es}`,Ur=l==="vertical"?"flex flex-col space-y-4":"max-w-7xl mx-auto flex justify-between items-center",qt=l==="vertical"?"flex flex-col space-y-4":"flex space-x-4",_r=l==="vertical"?"flex flex-col space-y-2":"flex";return Te!==ou.Connected?null:w.jsx("footer",{className:`uikit-footer ${Lr}`,id:"zoom-ui-toolkit-controls",children:w.jsxs("div",{className:Ur,children:[w.jsxs("div",{className:_r,children:[V&&w.jsx("div",{className:l==="vertical"?"mb-2":"px-1",children:w.jsx(BX,{changeMicrophone:o,changeSpeaker:s,microphoneList:n,speakerList:i,id:"uikit-footer-audio",orientation:l,autoClose:u})}),z&&w.jsx("div",{className:l==="vertical"?"mb-2":"px-1",children:w.jsx(QX,{cameraList:r,changeCamera:a,orientation:l,autoClose:u})})]}),w.jsxs("div",{className:qt,children:[Y&&!Hl()&&w.jsx(NNt,{isMenuOpen:Ht,setIsMenuOpen:Rr,orientation:l}),re&&Pe&&!Hl()&&w.jsx(DNt,{isMenuOpen:ar,setIsMenuOpen:Cr,orientation:l}),fe&&!Je&&w.jsx(kNt,{orientation:l}),$&&w.jsx(NO,{icon:nE,count:c,isActive:f||g==="participants",onClick:lr,id:"uikit-footer-participants-button",countId:"uikit-footer-participant-size",themName:O,orientation:l}),q&&w.jsx(NO,{icon:a8,count:ve,isActive:p||g==="chat",onClick:Yr,id:"uikit-footer-chat-button",countId:"uikit-footer-chat-unread",themName:O,orientation:l}),qe&&(!St||N)&&w.jsx(GNt,{isCaptionOn:m,handleCaptionClick:Xr,onViewTranscript:()=>{It(bG(!y))},onCaptionSettings:()=>{It(Dx(!C))},orientation:l}),(fe||Ne&&ke===Rs.InProgress||Ge===kA.Invited&&ke===Rs.InProgress)&&se&&De&&w.jsx(NO,{icon:GX,isActive:h,onClick:nn,id:"uikit-footer-subsession-button",themName:O,orientation:l}),Je&&!fe&&se&&w.jsx(NO,{icon:X9,isActive:R,onClick:Zt,id:"uikit-footer-subsession-help-button",themName:O,orientation:l,className:"hover:bg-gray-100 transition-colors"}),me&&w.jsx(WNt,{onOpenSettings:()=>{e(!0),It(q0("More"))},isSettingsOpen:t,themeName:O,orientation:l})]}),j&&w.jsx("div",{className:l==="vertical"?"mt-auto":"",children:w.jsx(T5e,{isHostOrManager:fe,orientation:l})}),Ce&&w.jsx(MX,{message:"Please contract your administrator to purchase the caption plan.",type:"error",onClose:()=>Oe(!1),isVisible:!0})]})})};var WX={exports:{}};var k5e;function KNt(){return k5e||(k5e=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var a="",o=0;o<arguments.length;o++){var s=arguments[o];s&&(a=i(a,n(s)))}return a}function n(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return r.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var o="";for(var s in a)t.call(a,s)&&a[s]&&(o=i(o,s));return o}function i(a,o){return o?a?a+" "+o:a+o:a}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(WX)),WX.exports}var qNt=KNt();const $X=uh(qNt);var P5e={NODE_ENV:'"production"',UIKIT_VERSION:'"2.3.5-1"',TAILWIND_VERSION:'"^3.4.17"'};const YNt="react-tooltip-core-styles",JNt="react-tooltip-base-styles",j5e={core:!1,base:!1};function F5e({css:e,id:t=JNt,type:r="base",ref:n}){var i,a;if(!e||typeof document>"u"||j5e[r]||r==="core"&&typeof process<"u"&&(!((i=process==null?void 0:P5e)===null||i===void 0)&&i.REACT_TOOLTIP_DISABLE_CORE_STYLES)||r!=="base"&&typeof process<"u"&&(!((a=process==null?void 0:P5e)===null||a===void 0)&&a.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;r==="core"&&(t=YNt),n||(n={});const{insertAt:o}=n;if(document.getElementById(t))return;const s=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.id=t,l.type="text/css",o==="top"&&s.firstChild?s.insertBefore(l,s.firstChild):s.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e)),j5e[r]=!0}const U5e=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:r=null,place:n="top",offset:i=10,strategy:a="absolute",middlewares:o=[znt(Number(i)),Gnt({fallbackAxisSideDirection:"start"}),Qnt({padding:5})],border:s,arrowSize:l=8})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:n};if(t===null)return{tooltipStyles:{},tooltipArrowStyles:{},place:n};const u=o;return r?(u.push(Wnt({element:r,padding:5})),b2e(e,t,{placement:n,strategy:a,middleware:u}).then((({x:c,y:f,placement:p,middlewareData:h})=>{var g,m;const y={left:`${c}px`,top:`${f}px`,border:s},{x:C,y:T}=(g=h.arrow)!==null&&g!==void 0?g:{x:0,y:0},R=(m={top:"bottom",right:"left",bottom:"top",left:"right"}[p.split("-")[0]])!==null&&m!==void 0?m:"bottom",O=s&&{borderBottom:s,borderRight:s};let N=0;if(s){const k=`${s}`.match(/(\d+)px/);N=k?.[1]?Number(k[1]):1}return{tooltipStyles:y,tooltipArrowStyles:{left:C!=null?`${C}px`:"",top:T!=null?`${T}px`:"",right:"",bottom:"",...O,[R]:`-${l/2+N}px`},place:p}}))):b2e(e,t,{placement:"bottom",strategy:a,middleware:u}).then((({x:c,y:f,placement:p})=>({tooltipStyles:{left:`${c}px`,top:`${f}px`},tooltipArrowStyles:{},place:p})))},H5e=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),V5e=(e,t,r)=>{let n=null;const i=function(...a){const o=()=>{n=null};!n&&(e.apply(this,a),n=setTimeout(o,t))};return i.cancel=()=>{n&&(clearTimeout(n),n=null)},i},z5e=e=>e!==null&&!Array.isArray(e)&&typeof e=="object",KX=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((i,a)=>KX(i,t[a])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!z5e(e)||!z5e(t))return e===t;const r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every((i=>KX(e[i],t[i])))},XNt=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((r=>{const n=t.getPropertyValue(r);return n==="auto"||n==="scroll"}))},Q5e=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(XNt(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},ZNt=typeof window<"u"?E.useLayoutEffect:E.useEffect,cg=e=>{e.current&&(clearTimeout(e.current),e.current=null)},eLt="DEFAULT_TOOLTIP_ID",tLt={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},rLt=E.createContext({getTooltipData:()=>tLt});function G5e(e=eLt){return E.useContext(rLt).getTooltipData(e)}var YI={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},qX={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const nLt=({forwardRef:e,id:t,className:r,classNameArrow:n,variant:i="dark",anchorId:a,anchorSelect:o,place:s="top",offset:l=10,events:u=["hover"],openOnClick:c=!1,positionStrategy:f="absolute",middlewares:p,wrapper:h,delayShow:g=0,delayHide:m=0,float:y=!1,hidden:C=!1,noArrow:T=!1,clickable:R=!1,closeOnEsc:O=!1,closeOnScroll:N=!1,closeOnResize:k=!1,openEvents:j,closeEvents:V,globalCloseEvents:z,imperativeModeOnly:q,style:$,position:Y,afterShow:re,afterHide:se,disableTooltip:me,content:Te,contentWrapperRef:fe,isOpen:Ce,defaultIsOpen:Oe=!1,setIsOpen:Ve,previousActiveAnchor:Ge,activeAnchor:ce,setActiveAnchor:Ne,border:ke,opacity:De,arrowColor:Pe,arrowSize:Je=8,role:vt="tooltip"})=>{var qe;const St=E.useRef(null),It=E.useRef(null),at=E.useRef(null),kt=E.useRef(null),Et=E.useRef(null),[ve,Ht]=E.useState({tooltipStyles:{},tooltipArrowStyles:{},place:s}),[Rr,ar]=E.useState(!1),[Cr,Xr]=E.useState(!1),[lr,Yr]=E.useState(null),nn=E.useRef(!1),Zt=E.useRef(null),{anchorRefs:Lr,setActiveAnchor:Ur}=G5e(t),qt=E.useRef(!1),[_r,wn]=E.useState([]),mr=E.useRef(!1),ur=c||u.includes("click"),Un=ur||j?.click||j?.dblclick||j?.mousedown,Rn=j?{...j}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!j&&ur&&Object.assign(Rn,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const xn=V?{...V}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!V&&ur&&Object.assign(xn,{mouseleave:!1,blur:!1,mouseout:!1});const Sn=z?{...z}:{escape:O||!1,scroll:N||!1,resize:k||!1,clickOutsideAnchor:Un||!1};q&&(Object.assign(Rn,{mouseover:!1,focus:!1,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(xn,{mouseout:!1,blur:!1,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Sn,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),ZNt((()=>(mr.current=!0,()=>{mr.current=!1})),[]);const Yn=Wr=>{mr.current&&(Wr&&Xr(!0),setTimeout((()=>{mr.current&&(Ve?.(Wr),Ce===void 0&&ar(Wr))}),10))};E.useEffect((()=>{if(t){if(Rr){zn(Ge);const pn=Wr(ce),yi=[...new Set([...pn,t])].filter(Boolean).join(" ");ce?.setAttribute("aria-describedby",yi)}else zn(ce);return()=>{zn(ce),zn(Ge)}}function Wr(pn){var yi;return((yi=pn?.getAttribute("aria-describedby"))===null||yi===void 0?void 0:yi.split(" "))||[]}function zn(pn){const yi=Wr(pn).filter((ta=>ta!==t));yi.length?pn?.setAttribute("aria-describedby",yi.join(" ")):pn?.removeAttribute("aria-describedby")}}),[ce,Rr,t,Ge]),E.useEffect((()=>{if(Ce===void 0)return()=>null;Ce&&Xr(!0);const Wr=setTimeout((()=>{ar(Ce)}),10);return()=>{clearTimeout(Wr)}}),[Ce]),E.useEffect((()=>{if(Rr!==nn.current)if(cg(Et),nn.current=Rr,Rr)re?.();else{const Wr=(zn=>{const pn=zn.match(/^([\d.]+)(ms|s)$/);if(!pn)return 0;const[,yi,ta]=pn;return Number(yi)*(ta==="ms"?1:1e3)})(getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay"));Et.current=setTimeout((()=>{Xr(!1),Yr(null),se?.()}),Wr+25)}}),[Rr]);const Dn=Wr=>{Ht((zn=>KX(zn,Wr)?zn:Wr))},gi=(Wr=g)=>{cg(at),Cr?Yn(!0):at.current=setTimeout((()=>{Yn(!0)}),Wr)},_n=(Wr=m)=>{cg(kt),kt.current=setTimeout((()=>{qt.current||Yn(!1)}),Wr)},En=Wr=>{var zn;if(!Wr)return;const pn=(zn=Wr.currentTarget)!==null&&zn!==void 0?zn:Wr.target;if(!pn?.isConnected)return Ne(null),void Ur({current:null});g?gi():Yn(!0),Ne(pn),Ur({current:pn}),cg(kt)},Bi=()=>{R?_n(m||100):m?_n():Yn(!1),cg(at)},Mn=({x:Wr,y:zn})=>{var pn;const yi={getBoundingClientRect:()=>({x:Wr,y:zn,width:0,height:0,top:zn,left:Wr,right:Wr,bottom:zn})};U5e({place:(pn=lr?.place)!==null&&pn!==void 0?pn:s,offset:l,elementReference:yi,tooltipReference:St.current,tooltipArrowReference:It.current,strategy:f,middlewares:p,border:ke,arrowSize:Je}).then((ta=>{Dn(ta)}))},ti=Wr=>{if(!Wr)return;const zn=Wr,pn={x:zn.clientX,y:zn.clientY};Mn(pn),Zt.current=pn},Yi=Wr=>{var zn;if(!Rr)return;const pn=Wr.target;pn.isConnected&&(!((zn=St.current)===null||zn===void 0)&&zn.contains(pn)||[document.querySelector(`[id='${a}']`),..._r].some((yi=>yi?.contains(pn)))||(Yn(!1),cg(at)))},ei=V5e(En,50),ii=V5e(Bi,50),Ra=Wr=>{ii.cancel(),ei(Wr)},li=()=>{ei.cancel(),ii()},kr=E.useCallback((()=>{var Wr,zn;const pn=(Wr=lr?.position)!==null&&Wr!==void 0?Wr:Y;pn?Mn(pn):y?Zt.current&&Mn(Zt.current):ce?.isConnected&&U5e({place:(zn=lr?.place)!==null&&zn!==void 0?zn:s,offset:l,elementReference:ce,tooltipReference:St.current,tooltipArrowReference:It.current,strategy:f,middlewares:p,border:ke,arrowSize:Je}).then((yi=>{mr.current&&Dn(yi)}))}),[Rr,ce,Te,$,s,lr?.place,l,f,Y,lr?.position,y,Je]);E.useEffect((()=>{var Wr,zn;const pn=new Set(Lr);_r.forEach((oi=>{me?.(oi)||pn.add({current:oi})}));const yi=document.querySelector(`[id='${a}']`);yi&&!me?.(yi)&&pn.add({current:yi});const ta=()=>{Yn(!1)},_t=Q5e(ce),Hr=Q5e(St.current);Sn.scroll&&(window.addEventListener("scroll",ta),_t?.addEventListener("scroll",ta),Hr?.addEventListener("scroll",ta));let fn=null;Sn.resize?window.addEventListener("resize",ta):ce&&St.current&&(fn=y2e(ce,St.current,kr,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const bn=oi=>{oi.key==="Escape"&&Yn(!1)};Sn.escape&&window.addEventListener("keydown",bn),Sn.clickOutsideAnchor&&window.addEventListener("click",Yi);const Wn=[],ui=oi=>!!(oi?.target&&ce?.contains(oi.target)),Ti=oi=>{Rr&&ui(oi)||En(oi)},Fi=oi=>{Rr&&ui(oi)&&Bi()},Ma=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],gn=["click","dblclick","mousedown","mouseup"];Object.entries(Rn).forEach((([oi,wi])=>{wi&&(Ma.includes(oi)?Wn.push({event:oi,listener:Ra}):gn.includes(oi)&&Wn.push({event:oi,listener:Ti}))})),Object.entries(xn).forEach((([oi,wi])=>{wi&&(Ma.includes(oi)?Wn.push({event:oi,listener:li}):gn.includes(oi)&&Wn.push({event:oi,listener:Fi}))})),y&&Wn.push({event:"pointermove",listener:ti});const Mt=()=>{qt.current=!0},Tr=()=>{qt.current=!1,Bi()},Hn=R&&(xn.mouseout||xn.mouseleave);return Hn&&((Wr=St.current)===null||Wr===void 0||Wr.addEventListener("mouseover",Mt),(zn=St.current)===null||zn===void 0||zn.addEventListener("mouseout",Tr)),Wn.forEach((({event:oi,listener:wi})=>{pn.forEach((Xn=>{var $i;($i=Xn.current)===null||$i===void 0||$i.addEventListener(oi,wi)}))})),()=>{var oi,wi;Sn.scroll&&(window.removeEventListener("scroll",ta),_t?.removeEventListener("scroll",ta),Hr?.removeEventListener("scroll",ta)),Sn.resize?window.removeEventListener("resize",ta):fn?.(),Sn.clickOutsideAnchor&&window.removeEventListener("click",Yi),Sn.escape&&window.removeEventListener("keydown",bn),Hn&&((oi=St.current)===null||oi===void 0||oi.removeEventListener("mouseover",Mt),(wi=St.current)===null||wi===void 0||wi.removeEventListener("mouseout",Tr)),Wn.forEach((({event:Xn,listener:$i})=>{pn.forEach((Xi=>{var Jo;(Jo=Xi.current)===null||Jo===void 0||Jo.removeEventListener(Xn,$i)}))}))}}),[ce,kr,Cr,Lr,_r,j,V,z,ur,g,m]),E.useEffect((()=>{var Wr,zn;let pn=(zn=(Wr=lr?.anchorSelect)!==null&&Wr!==void 0?Wr:o)!==null&&zn!==void 0?zn:"";!pn&&t&&(pn=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);const yi=new MutationObserver((ta=>{const _t=[],Hr=[];ta.forEach((fn=>{if(fn.type==="attributes"&&fn.attributeName==="data-tooltip-id"&&(fn.target.getAttribute("data-tooltip-id")===t?_t.push(fn.target):fn.oldValue===t&&Hr.push(fn.target)),fn.type==="childList"){if(ce){const bn=[...fn.removedNodes].filter((Wn=>Wn.nodeType===1));if(pn)try{Hr.push(...bn.filter((Wn=>Wn.matches(pn)))),Hr.push(...bn.flatMap((Wn=>[...Wn.querySelectorAll(pn)])))}catch{}bn.some((Wn=>{var ui;return!!(!((ui=Wn?.contains)===null||ui===void 0)&&ui.call(Wn,ce))&&(Xr(!1),Yn(!1),Ne(null),cg(at),cg(kt),!0)}))}if(pn)try{const bn=[...fn.addedNodes].filter((Wn=>Wn.nodeType===1));_t.push(...bn.filter((Wn=>Wn.matches(pn)))),_t.push(...bn.flatMap((Wn=>[...Wn.querySelectorAll(pn)])))}catch{}}})),(_t.length||Hr.length)&&wn((fn=>[...fn.filter((bn=>!Hr.includes(bn))),..._t]))}));return yi.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{yi.disconnect()}}),[t,o,lr?.anchorSelect,ce]),E.useEffect((()=>{kr()}),[kr]),E.useEffect((()=>{if(!fe?.current)return()=>null;const Wr=new ResizeObserver((()=>{setTimeout((()=>kr()))}));return Wr.observe(fe.current),()=>{Wr.disconnect()}}),[Te,fe?.current]),E.useEffect((()=>{var Wr;const zn=document.querySelector(`[id='${a}']`),pn=[..._r,zn];ce&&pn.includes(ce)||Ne((Wr=_r[0])!==null&&Wr!==void 0?Wr:zn)}),[a,_r,ce]),E.useEffect((()=>(Oe&&Yn(!0),()=>{cg(at),cg(kt)})),[]),E.useEffect((()=>{var Wr;let zn=(Wr=lr?.anchorSelect)!==null&&Wr!==void 0?Wr:o;if(!zn&&t&&(zn=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),zn)try{const pn=Array.from(document.querySelectorAll(zn));wn(pn)}catch{wn([])}}),[t,o,lr?.anchorSelect]),E.useEffect((()=>{at.current&&(cg(at),gi(g))}),[g]);const Ii=(qe=lr?.content)!==null&&qe!==void 0?qe:Te,Ji=Rr&&Object.keys(ve.tooltipStyles).length>0;return E.useImperativeHandle(e,(()=>({open:Wr=>{if(Wr?.anchorSelect)try{document.querySelector(Wr.anchorSelect)}catch{return void console.warn(`[react-tooltip] "${Wr.anchorSelect}" is not a valid CSS selector`)}Yr(Wr??null),Wr?.delay?gi(Wr.delay):Yn(!0)},close:Wr=>{Wr?.delay?_n(Wr.delay):Yn(!1)},activeAnchor:ce,place:ve.place,isOpen:!!(Cr&&!C&&Ii&&Ji)}))),Cr&&!C&&Ii?wa.createElement(h,{id:t,role:vt,className:$X("react-tooltip",YI.tooltip,qX.tooltip,qX[i],r,`react-tooltip__place-${ve.place}`,YI[Ji?"show":"closing"],Ji?"react-tooltip__show":"react-tooltip__closing",f==="fixed"&&YI.fixed,R&&YI.clickable),onTransitionEnd:Wr=>{cg(Et),Rr||Wr.propertyName!=="opacity"||(Xr(!1),Yr(null),se?.())},style:{...$,...ve.tooltipStyles,opacity:De!==void 0&&Ji?De:void 0},ref:St},Ii,wa.createElement(h,{className:$X("react-tooltip-arrow",YI.arrow,qX.arrow,n,T&&YI.noArrow),style:{...ve.tooltipArrowStyles,background:Pe?`linear-gradient(to right bottom, transparent 50%, ${Pe} 50%)`:void 0,"--rt-arrow-size":`${Je}px`},ref:It})):null},iLt=({content:e})=>wa.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),W5e=wa.forwardRef((({id:e,anchorId:t,anchorSelect:r,content:n,html:i,render:a,className:o,classNameArrow:s,variant:l="dark",place:u="top",offset:c=10,wrapper:f="div",children:p=null,events:h=["hover"],openOnClick:g=!1,positionStrategy:m="absolute",middlewares:y,delayShow:C=0,delayHide:T=0,float:R=!1,hidden:O=!1,noArrow:N=!1,clickable:k=!1,closeOnEsc:j=!1,closeOnScroll:V=!1,closeOnResize:z=!1,openEvents:q,closeEvents:$,globalCloseEvents:Y,imperativeModeOnly:re=!1,style:se,position:me,isOpen:Te,defaultIsOpen:fe=!1,disableStyleInjection:Ce=!1,border:Oe,opacity:Ve,arrowColor:Ge,arrowSize:ce,setIsOpen:Ne,afterShow:ke,afterHide:De,disableTooltip:Pe,role:Je="tooltip"},vt)=>{const[qe,St]=E.useState(n),[It,at]=E.useState(i),[kt,Et]=E.useState(u),[ve,Ht]=E.useState(l),[Rr,ar]=E.useState(c),[Cr,Xr]=E.useState(C),[lr,Yr]=E.useState(T),[nn,Zt]=E.useState(R),[Lr,Ur]=E.useState(O),[qt,_r]=E.useState(f),[wn,mr]=E.useState(h),[ur,Un]=E.useState(m),[Rn,xn]=E.useState(null),[Sn,Yn]=E.useState(null),Dn=E.useRef(null),gi=E.useRef(Ce),{anchorRefs:_n,activeAnchor:En}=G5e(e),Bi=ii=>ii?.getAttributeNames().reduce(((Ra,li)=>{var kr;return li.startsWith("data-tooltip-")&&(Ra[li.replace(/^data-tooltip-/,"")]=(kr=ii?.getAttribute(li))!==null&&kr!==void 0?kr:null),Ra}),{}),Mn=ii=>{const Ra={place:li=>{var kr;Et((kr=li)!==null&&kr!==void 0?kr:u)},content:li=>{St(li??n)},html:li=>{at(li??i)},variant:li=>{var kr;Ht((kr=li)!==null&&kr!==void 0?kr:l)},offset:li=>{ar(li===null?c:Number(li))},wrapper:li=>{var kr;_r((kr=li)!==null&&kr!==void 0?kr:f)},events:li=>{const kr=li?.split(" ");mr(kr??h)},"position-strategy":li=>{var kr;Un((kr=li)!==null&&kr!==void 0?kr:m)},"delay-show":li=>{Xr(li===null?C:Number(li))},"delay-hide":li=>{Yr(li===null?T:Number(li))},float:li=>{Zt(li===null?R:li==="true")},hidden:li=>{Ur(li===null?O:li==="true")},"class-name":li=>{xn(li)}};Object.values(Ra).forEach((li=>li(null))),Object.entries(ii).forEach((([li,kr])=>{var Ii;(Ii=Ra[li])===null||Ii===void 0||Ii.call(Ra,kr)}))};E.useEffect((()=>{St(n)}),[n]),E.useEffect((()=>{at(i)}),[i]),E.useEffect((()=>{Et(u)}),[u]),E.useEffect((()=>{Ht(l)}),[l]),E.useEffect((()=>{ar(c)}),[c]),E.useEffect((()=>{Xr(C)}),[C]),E.useEffect((()=>{Yr(T)}),[T]),E.useEffect((()=>{Zt(R)}),[R]),E.useEffect((()=>{Ur(O)}),[O]),E.useEffect((()=>{Un(m)}),[m]),E.useEffect((()=>{gi.current!==Ce&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[Ce]),E.useEffect((()=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:Ce==="core",disableBase:Ce}}))}),[]),E.useEffect((()=>{var ii;const Ra=new Set(_n);let li=r;if(!li&&e&&(li=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),li)try{document.querySelectorAll(li).forEach((zn=>{Ra.add({current:zn})}))}catch{console.warn(`[react-tooltip] "${li}" is not a valid CSS selector`)}const kr=document.querySelector(`[id='${t}']`);if(kr&&Ra.add({current:kr}),!Ra.size)return()=>null;const Ii=(ii=Sn??kr)!==null&&ii!==void 0?ii:En.current,Ji=new MutationObserver((zn=>{zn.forEach((pn=>{var yi;if(!Ii||pn.type!=="attributes"||!(!((yi=pn.attributeName)===null||yi===void 0)&&yi.startsWith("data-tooltip-")))return;const ta=Bi(Ii);Mn(ta)}))})),Wr={attributes:!0,childList:!1,subtree:!1};if(Ii){const zn=Bi(Ii);Mn(zn),Ji.observe(Ii,Wr)}return()=>{Ji.disconnect()}}),[_n,En,Sn,t,r]),E.useEffect((()=>{se?.border&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),Oe&&!H5e("border",`${Oe}`)&&console.warn(`[react-tooltip] "${Oe}" is not a valid \`border\`.`),se?.opacity&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),Ve&&!H5e("opacity",`${Ve}`)&&console.warn(`[react-tooltip] "${Ve}" is not a valid \`opacity\`.`)}),[]);let ti=p;const Yi=E.useRef(null);if(a){const ii=a({content:Sn?.getAttribute("data-tooltip-content")||qe||null,activeAnchor:Sn});ti=ii?wa.createElement("div",{ref:Yi,className:"react-tooltip-content-wrapper"},ii):null}else qe&&(ti=qe);It&&(ti=wa.createElement(iLt,{content:It}));const ei={forwardRef:vt,id:e,anchorId:t,anchorSelect:r,className:$X(o,Rn),classNameArrow:s,content:ti,contentWrapperRef:Yi,place:kt,variant:ve,offset:Rr,wrapper:qt,events:wn,openOnClick:g,positionStrategy:ur,middlewares:y,delayShow:Cr,delayHide:lr,float:nn,hidden:Lr,noArrow:N,clickable:k,closeOnEsc:j,closeOnScroll:V,closeOnResize:z,openEvents:q,closeEvents:$,globalCloseEvents:Y,imperativeModeOnly:re,style:se,position:me,isOpen:Te,defaultIsOpen:fe,border:Oe,opacity:Ve,arrowColor:Ge,arrowSize:ce,setIsOpen:Ne,afterShow:ke,afterHide:De,disableTooltip:Pe,activeAnchor:Sn,previousActiveAnchor:Dn.current,setActiveAnchor:ii=>{Yn((Ra=>(ii?.isSameNode(Ra)||(Dn.current=Ra),ii)))},role:Je};return wa.createElement(nLt,{...ei})}));typeof window<"u"&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||F5e({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s;--rt-arrow-size:8px}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit;z-index:-1}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||F5e({css:`
608
+ ${r?"bg-blue-500 hover:bg-blue-600 text-theme-text":f?"hover:bg-theme-background":"text-theme-background"} ${l}`,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),onClick:n,id:i,ref:c,children:[w.jsx(e,{size:s,color:g}),t>0&&w.jsx("span",{className:`text-sm font-medium text-${g}`,id:a,children:h})]})}),I5e=()=>{const e=si(),{sessionInfo:t}=nr(Ei);return{openExportDialog:E.useCallback((n=!0)=>{const i={format:Vb.PDF,name:`${t.topic}-whiteboard-${new Date().toISOString().split("T")[0]}`,includeComments:!0,shouldCloseAfterExport:n};e(Hx(i)),e(CR(!0))},[e,t.topic])}},PNt=()=>{const{whiteboardClient:e}=E.useContext(Xs),t=si(),r=nr(Vi),n=jc(),i=nr(vv),{isWhiteboardExportConfirmOpen:a,whiteboardExportOptions:o}=r,s=E.useCallback(async()=>{if(t(CR(!1)),o)try{t(G6(!0)),await e.exportWhiteboard(Vb.PDF,o.name,o.includeComments),o.shouldCloseAfterExport&&await e.stopWhiteboardScreen()}catch(g){console.error("Failed to export whiteboard:",g),o.shouldCloseAfterExport&&await e.stopWhiteboardScreen().catch(()=>{})}finally{t(G6(!1))}t(Hx(null))},[e,o,t]),l=E.useCallback(async()=>{if(t(CR(!1)),o)try{t(G6(!0)),await e.exportWhiteboard(Vb.PDF,o.name,o.includeComments)}catch(g){console.error("Failed to export whiteboard:",g)}finally{t(G6(!1))}t(Hx(null))},[e,o,t]),u=E.useCallback(async()=>{t(CR(!1)),t(Hx(null));try{await e.stopWhiteboardScreen()}catch(g){console.error("Failed to close whiteboard:",g)}},[e,t]),c=E.useCallback(()=>{t(CR(!1)),t(Hx(null))},[t]),f=E.useCallback(g=>{o&&t(Hx({...o,...g}))},[o,t]),p=o?.shouldCloseAfterExport===!1,h=i.presenterID===n?.userId;return!a||!o?null:w.jsx(TA,{icon:w.jsx(A_,{size:26,className:"text-blue-500 drop-shadow-sm",strokeWidth:1.5}),iconClassName:"bg-blue-50 dark:bg-blue-950/30",onCancel:c,cancelText:"Cancel",onClose:p?l:s,closeText:p?"Export":"Export & Close",closeVariant:"primary",closeIcon:w.jsx(A_,{}),title:p?"Export Whiteboard":"Export Whiteboard?",message:p?"Export the current whiteboard content.":"You can't reopen the whiteboard after closing. Please export the whiteboard content before closing.",confirmText:h?p?"Cancel":"Close":"",onConfirm:p?c:u,confirmVariant:p?"secondary":"danger",id:"uikit-whiteboard-export-confirm-dialog",children:w.jsxs("div",{className:"space-y-4 mt-4",children:[w.jsx("div",{children:w.jsx("div",{className:"flex gap-2",children:w.jsxs("button",{type:"button",onClick:()=>f({format:Vb.PDF}),className:`flex items-center gap-2 px-3 py-2 rounded-md text-sm font-medium transition-colors ${o.format==="pdf"?"bg-blue-500 text-white hover:bg-blue-600":"bg-theme-surface hover:bg-theme-background text-theme-text border border-theme-border"}`,children:[w.jsx(n8,{size:16}),"PDF"]})})}),w.jsxs("div",{children:[w.jsx("label",{className:"block text-sm font-medium text-theme-text mb-2",children:"File Name"}),w.jsx("input",{type:"text",value:o.name,onChange:g=>f({name:g.target.value}),className:"w-full px-3 py-2 border border-theme-border rounded-md bg-theme-surface text-theme-text focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"Enter file name"})]}),w.jsx("div",{className:"space-y-2",children:w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsx("input",{type:"checkbox",id:"includeComments",checked:o.includeComments&&o.format===Vb.PDF,disabled:o.format!==Vb.PDF,onChange:g=>f({includeComments:g.target.checked}),className:"w-4 h-4 text-blue-600 bg-theme-surface border-theme-border rounded focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed"}),w.jsx("label",{htmlFor:"includeComments",className:`text-sm font-medium ${o.format!==Vb.PDF?"text-theme-text":"text-theme-text/50"}`,children:"Include Comments"})]})})]})})},T5e=({isHostOrManager:e,orientation:t="horizontal"})=>{const r=E.useContext(Wo),n=nr(Ei),{subsessionClient:i}=E.useContext(Xs),{currentSubRoom:a,subStatus:o,subsessionOptions:s}=nr(zp),l=nr(vv),u=jc(),{openExportDialog:c}=I5e(),f=o===Rs.InProgress&&a.userStatus===kA.InSubsession,[p,h]=E.useState(!1),g=u&&l.presenterID===u.userId,m=!l.isDisableExport&&g,y=l?.status===VA.InProgress,C=E.useCallback(V=>{if(m&&y){c(!0),h(!1);return}n.isHost,r.leave(V),h(!1)},[r,n.isHost,m,y,c]),T=()=>{h(!p)},R="w-full px-4 py-2 text-left text-red-500 hover:bg-gray-100 transition-colors duration-200 rounded-lg",O="w-full px-4 py-2 text-left text-theme-text-button bg-red-500 hover:bg-red-600 transition-colors duration-200",N=w.jsxs(w.Fragment,{children:[!f&&n.isManager&&w.jsx("button",{className:O,onClick:()=>{r.reclaimHost()},id:"reclaim-host-button",children:"Reclaim Host"}),n.isHost&&w.jsx("button",{className:O,onClick:()=>{C(!0)},id:"end-for-all-button",children:"End Session"})]}),k=f&&(e||s?.isBackToMainSessionEnabled)&&w.jsx("button",{className:"w-full px-4 py-2 text-left text-theme-text-button bg-blue-500 hover:bg-blue-600 transition-colors duration-200",onClick:()=>{i.leaveSubsession(),h(!1)},id:"leave-subsession-button",children:"Leave Subsession"}),j=E.useRef(null);return w.jsxs("div",{className:"relative",children:[w.jsx("button",{className:`h-10 ${t==="vertical"?"rounded-lg w-full justify-center":"rounded-full w-10"} flex items-center justify-center transition-all duration-200 border border-theme-border bg-red-500 shadow-md hover:bg-red-600 hover:shadow-lg active:bg-red-800 active:shadow-inner`,onClick:T,id:"leave-button",ref:j,children:w.jsx(ele,{size:24,className:"text-white"})}),w.jsx(pCe,{isOpen:p,buttonRef:j,position:t==="vertical"?"bottom-end":"top-end",wrapperClass:`${t==="vertical"?"rounded-lg":"rounded-full"}`,onClickOutside:()=>h(!1),children:w.jsxs("div",{className:"bg-white rounded-lg bg-theme-surface border border-theme-border shadow-xl overflow-hidden",style:{width:"200px"},children:[N,w.jsx("button",{className:R,onClick:()=>{C(!1)},id:"leave-meeting-button",children:"Leave Session"}),k]})})]})},zb={en:"English",zh:"Chinese",ja:"Japanese",de:"German",fr:"French",ru:"Russian",pt:"Portuguese",es:"Spanish",ko:"Korean",it:"Italian",en1:"Reserved",vi:"Vietnamese",nl:"Dutch",uk:"Ukrainian",ar:"Arabic",bn:"Bengali","zh-hant":"Chinese (Traditional)",cs:"Czech",et:"Estonian",fi:"Finnish",el:"Greek",he:"Hebrew",hi:"Hindi",hu:"Hungarian",id:"Indonesian",ms:"Malay",fa:"Persian (Farsi)",pl:"Polish",ro:"Romanian",sv:"Swedish",ta:"Tamil",te:"Telugu",tl:"Tagalog",tr:"Turkish",da:"Danish",th:"Thai","fr-ca":"Canadian French","zh-yue":"Cantonese (Yue)"},jNt="absolute bottom-full left-0 mb-2 w-72 rounded-lg shadow-lg z-20 text-gray-800 overflow-hidden bg-theme-surface border border-theme-border",_5e="w-full px-4 py-3 text-left hover:bg-gray-100 transition-colors duration-150 ease-in-out",R5e=({languages:e,setShowLanguagesMenu:t,selectedLanguage:r,handleLanguageSelect:n})=>w.jsxs("div",{className:jNt,children:[w.jsxs("div",{className:"flex items-center p-2",children:[w.jsx("button",{className:" rounded-full hover:bg-theme-background/50 transition-colors duration-150 ease-in-out",onClick:()=>t(!1),children:w.jsx(Gse,{size:24,className:"text-theme-text"})}),w.jsx("h3",{className:"text-xl font-semibold ml-2 text-theme-text",children:"Select Language"})]}),w.jsx("div",{className:"max-h-96 overflow-y-auto uikit-custom-scrollbar",children:e.map(i=>w.jsxs("button",{className:`${_5e} flex items-center text-theme-text hover:bg-theme-background justify-between`,onClick:()=>{n(i),t(!1)},children:[zb[i],r===i&&w.jsx(Mw,{size:20,className:"text-blue-500"})]},i))})]}),M5e=({languages:e,setShowLanguagesMenu:t,selectedLanguage:r,handleLanguageSelect:n})=>w.jsx("div",{className:"max-h-96 overflow-y-auto uikit-custom-scrollbar",children:e.map(i=>w.jsxs("button",{className:`${_5e} flex items-center justify-between`,onClick:()=>{n(i),t(!1)},children:[zb[i],r===i&&w.jsx(Mw,{size:20,className:"text-blue-500"})]},i))}),O5e=Cu({name:"caption",initialState:{isTranscriptionFeatureEnabled:!1,isTranslationFeatureEnabled:!1,isHostDisableCaptions:!1,isTranscriptionInitiated:!1,isTranslationOn:!1,currentSpeakingLanguage:null,currentTranslationLanguage:void 0,initialTranslationLanguage:void 0},reducers:{setIsTranscriptionFeatureEnabled:(e,t)=>{e.isTranscriptionFeatureEnabled=t.payload},setIsTranslationFeatureEnabled:(e,t)=>{e.isTranslationFeatureEnabled=t.payload},setIsHostDisableCaptions:(e,t)=>{e.isHostDisableCaptions=t.payload},setIsTranscriptionInitiated:(e,t)=>{e.isTranscriptionInitiated=t.payload},setInitialTranslationLanguage:(e,t)=>{e.initialTranslationLanguage=t.payload},setCurrentTranslationLanguage:(e,t)=>{e.currentTranslationLanguage=t.payload},setIsTranslationOn:(e,t)=>{e.isTranslationOn=t.payload},setCurrentSpeakingLanguage:(e,t)=>{e.currentSpeakingLanguage=t.payload}}}),{setIsTranscriptionFeatureEnabled:FNt,setIsTranslationFeatureEnabled:UNt,setIsHostDisableCaptions:VX,setIsTranscriptionInitiated:zX,setInitialTranslationLanguage:N5e,setCurrentTranslationLanguage:Gv,setIsTranslationOn:Y9t,setCurrentSpeakingLanguage:LO}=O5e.actions,HNt=O5e.reducer,L5e=e=>{const{captionClient:t}=E.useContext(Xs),r=si(),{isTranslationFeatureEnabled:n,isTranscriptionInitiated:i,currentSpeakingLanguage:a,currentTranslationLanguage:o}=nr(JS),[s,l]=E.useState(!1),[u,c]=E.useState(!1),f=E.useCallback(()=>{if(!t)return[];const{transcriptionLanguage:y}=t.getLiveTranscriptionStatus();return y?y.split(";").filter(Boolean):[]},[t]),p=E.useCallback(y=>{if(!t)return[];const{translationLanguage:C}=t.getLiveTranscriptionStatus();if(!C)return[];const T=C.find(R=>R.speakingLanguage===y);return T?T.translatedToLanguage.split(";").filter(Boolean):[]},[t]),h=E.useCallback(async y=>{if(!i){r(em(!0)),e(!1);return}if(r(Gv(void 0)),r(LO(y)),n)try{await t?.setTranslationLanguage(void 0)}catch(C){r(Gv(o)),r(LO(a)),uc(C.reason,{variant:"error",autoHideDuration:5e3});return}try{await t?.setSpeakingLanguage(y)}catch(C){r(LO(a)),uc(C.reason,{variant:"error",autoHideDuration:5e3})}},[i,r,n,e,t,o,a]),g=E.useCallback(async y=>{r(Gv(y));try{await t?.setTranslationLanguage(y)}catch(C){r(Gv(o)),uc(C.reason,{variant:"error",autoHideDuration:5e3})}},[t,o,r]),m=E.useCallback(async()=>{if(!i){r(em(!0)),e(!1);return}if(o!==void 0)try{r(Gv(void 0)),await t?.setTranslationLanguage(void 0)}catch(y){r(Gv(o)),uc(y.reason,{variant:"error",autoHideDuration:5e3})}else try{r(Gv(p(a)[0])),await t?.setTranslationLanguage(p(a)[0])}catch(y){r(Gv(void 0)),uc(y.reason,{variant:"error",autoHideDuration:5e3})}},[t,a,o,r,p,i,e]);return{isTranslationFeatureEnabled:n,isTranscriptionInitiated:i,currentSpeakingLanguage:a,currentTranslationLanguage:o,showSpeakingLanguagesMenu:s,showTranslateLanguagesMenu:u,setShowSpeakingLanguagesMenu:l,setShowTranslateLanguagesMenu:c,getSpeakingLanguagesList:f,getTranslationLanguagesList:p,handleSpeakingLanguageSelect:h,handleTranslateToLanguageSelect:g,toggleIsTranslationOn:m}},VNt="absolute bottom-full left-0 mb-1 w-72 rounded-lg shadow-lg z-30 bg-theme-surface border border-theme-border text-theme-text overflow-hidden",D5e="border-b border-theme-border",zNt=`text-xl font-semibold px-3 pt-2 pb-1 text-theme-text ${D5e}`,W6="w-full px-3 py-2.5 text-left hover:bg-theme-background transition-colors duration-200 flex items-center gap-3 text-sm",DO=`${W6} ${D5e}`,QNt=({setIsMenuOpen:e,onViewTranscript:t,onCaptionSettings:r})=>{const n=si(),{isHost:i}=nr(Ei),{isTranslationFeatureEnabled:a,isTranscriptionInitiated:o,currentSpeakingLanguage:s,currentTranslationLanguage:l,showSpeakingLanguagesMenu:u,showTranslateLanguagesMenu:c,setShowSpeakingLanguagesMenu:f,setShowTranslateLanguagesMenu:p,getSpeakingLanguagesList:h,getTranslationLanguagesList:g,handleSpeakingLanguageSelect:m,handleTranslateToLanguageSelect:y,toggleIsTranslationOn:C}=L5e(e);return u?w.jsx(R5e,{languages:h(),setShowLanguagesMenu:f,selectedLanguage:s,handleLanguageSelect:m}):a&&c?w.jsx(R5e,{languages:g(s),setShowLanguagesMenu:p,selectedLanguage:l,handleLanguageSelect:y}):w.jsx("div",{id:"uikit-caption-menu",className:VNt,children:w.jsxs("div",{className:"py-1 px-2",children:[w.jsx("h3",{className:zNt,children:"Captions"}),w.jsxs("button",{id:"uikit-caption-menu-speaking-language",className:DO,onClick:()=>{if(!o){n(em(!0)),e(!1);return}f(!0)},children:[w.jsxs("div",{className:"flex-1",children:[w.jsx("div",{className:"text-theme-text/70",children:"Speaking language"}),w.jsx("div",{className:"font-medium",children:zb[s]})]}),w.jsx(Z9,{size:16,className:"text-theme-text/50"})]}),l!==void 0&&w.jsxs("button",{id:"uikit-caption-menu-translate-language",className:DO,onClick:()=>p(!0),children:[w.jsxs("div",{className:"flex-1",children:[w.jsx("div",{className:"text-theme-text/70",children:"Translate to"}),w.jsx("div",{className:"font-medium",children:zb[l]})]}),w.jsx(Z9,{size:16,className:"text-theme-text/50"})]}),w.jsx("button",{id:"uikit-caption-menu-transcript",className:i||a?DO:W6,onClick:t,children:"View full transcript"}),a&&g(s).length>0&&w.jsx("button",{id:"uikit-caption-menu-toggle-translation",className:i?DO:W6,onClick:C,children:l!==void 0?"Turn off translation":"Turn on translation"}),i&&w.jsx("button",{id:"uikit-caption-menu-host-settings",className:W6,onClick:r,children:"Host caption control settings"})]})})},GNt=({isCaptionOn:e,handleCaptionClick:t,onViewTranscript:r,onCaptionSettings:n,orientation:i="horizontal"})=>{const[a,o]=E.useState(!1),s=E.useRef(null),{themeName:l}=nr(Vi),{isHostDisableCaptions:u}=nr(JS);E.useEffect(()=>{const p=h=>{s.current&&!s.current.contains(h.target)&&o(!1)};return document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[]);const c=a&&w.jsx(QNt,{setIsMenuOpen:o,onViewTranscript:()=>{r(),o(!1)},onCaptionSettings:()=>{n(),o(!1)}}),f=l==="dark"?"white":"black";return w.jsx(IO,{id:"uikit-footer-caption",isShowChevron:!u,ref:s,icon:ny,themeName:l,isActive:e,onClick:t,onChevronUpClick:()=>o(!a),menuContent:c,title:"show-captions",bgColor:e?"bg-blue-500":"",iconColor:f,chevronUpColor:f,hoverColor:e?"hover:bg-blue-600":"hover:bg-theme-background",orientation:i})},WNt=({isSettingsOpen:e,onOpenSettings:t,themeName:r,orientation:n="horizontal"})=>{const[i,a]=E.useState(!1),{liveStreamClient:o}=E.useContext(Xs),{isHost:s,featuresOptions:l,isSendingScreenShare:u}=nr(Ei),{isShowLiveStreamPanel:c}=nr(Vi),f=E.useRef(null),p=E.useRef(null),h=si(),{startCameraShare:g,stopShare:m}=TO(),y=l?.livestream?.enable;E.useEffect(()=>{const R=O=>{f.current&&!f.current.contains(O.target)&&!p.current?.contains(O.target)&&a(!1)};return document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R)},[]);const C=E.useCallback(()=>{a(!1),t(!0)},[t]),T=E.useMemo(()=>[{title:"Settings",onClick:()=>C()},y&&s&&o?.isLiveStreamEnabled()&&{title:"Live streaming",onClick:()=>h(RG(!c))},l?.cameraShare?.enable&&!u&&{title:"Share camera",onClick:()=>g()},u&&{title:"Stop share",onClick:()=>m()}].filter(Boolean),[C,s,o,c,h,y,u,g,m,l]);return w.jsxs("div",{className:"relative",children:[w.jsx(NO,{icon:Yse,isActive:i,onClick:()=>{a(!i)},ref:p,id:"footer-more-button",themName:r,iconSize:24,orientation:n,className:n==="vertical"?"w-10":""}),i&&w.jsx("div",{ref:f,className:`absolute bottom-full ${n==="vertical"?"left-0 mb-1":"right-0 mb-1"} bg-theme-surface z-30 border border-theme-border text-theme-text rounded-lg shadow-xl overflow-hidden bg-theme-surface`,style:{width:"200px"},children:T.map((R,O)=>w.jsx("button",{className:"w-full px-4 py-2 text-left text-theme-text hover:bg-theme-background transition-colors duration-200",onClick:R.onClick,children:R.title},O))})]})},QX=({cameraList:e,changeCamera:t,orientation:r="horizontal",autoClose:n=!0})=>{const i=si(),{t:a}=Ym(),o=nr(Vi),{videoPlaybackFile:s,config:{featuresOptions:{playback:{audioVideoPlaybacks:l,enable:u}}}}=nr(Ei),[c,f]=E.useState(!1),p=E.useRef(null),{enqueueSnackbar:h}=Mg(),g=Nc(o.isShowVideoWarning),[m,y]=E.useState(!1),C=E.useContext(Wo),T=C.getCurrentUserInfo(),[R,O]=E.useState(T?.bVideoOn||!1),{stream:N,video:{encode:k,decode:j}}=E.useContext(Ro),{updateMirrorVideo:V,canMirrorVideo:z}=Kxe(),[q,$]=E.useState(!1);let Y="";o.isShowAudioWarning&&o.isShowVideoWarning?Y=a("join_media_preview_warning_denied_both"):o.isShowAudioWarning?Y=a("join_media_preview_warning_denied_mic"):o.isShowVideoWarning?Y=a("join_media_preview_warning_denied_camera"):Y=a("join_media_preview_warning_denied"),E.useEffect(()=>{g!==o.isShowVideoWarning&&o.isShowVideoWarning&&h(Y,{variant:"error"})},[h,g,o.isShowVideoWarning,Y]);const re=E.useCallback(Ne=>{if(f(!1),i(att(!0)),Ne?.type==="VIDEO_USER_FORBIDDEN_CAPTURE")throw Ne;{const ke=c5e(Ne,"Start video failed");throw h(ke,{variant:"error"}),Ne}},[i,h]),se=E.useCallback(async()=>{if(o.isShowVideoWarning){i(K0(!0)),f(!1);return}if(f(!0),T?.bVideoOn)try{await N?.stopVideo(),i(BSe(!1)),f(!1)}catch(Ne){re(Ne)}else{const Ne={hd:!0,cameraId:o.activeCamera,mirrored:o.isMirrorVideo};o.isSupportVB&&o.activeVbImage&&Object.assign(Ne,{virtualBackground:{imageUrl:o.activeVbImage}});try{await N?.startVideo(Ne),i(BSe(!0)),f(!1)}catch(ke){re(ke)}}},[T?.bVideoOn,i,o,N,re]);E.useEffect(()=>{O(C.getCurrentUserInfo()?.bVideoOn)},[C,T?.bVideoOn]);const me=E.useCallback(()=>{y(!1),i($0("video")),i(Qp(!0))},[i,y]),Te=E.useCallback(()=>{y(!1),i($0("playback")),i(Qp(!0))},[i,y]),fe=E.useCallback(()=>{y(!1),i($0("statistics")),i(oCe("video")),i(Qp(!0))},[i,y]),Ce=E.useCallback(()=>{y(!1),i($0("background")),i(Qp(!0))},[i,y]),Oe=E.useCallback(async()=>{if(!q){$(!0);try{await V(!o.isMirrorVideo),y(!1)}catch(Ne){console.error("Failed to toggle mirror setting",Ne),h("Unable to update mirror setting. Please try again.",{variant:"error"})}finally{$(!1)}}},[h,q,o.isMirrorVideo,V]),Ve=!k||!j||c,Ge=Nc(Ve);E.useEffect(()=>{o.previewStatus.isCameraOn&&Ge&&!Ve&&!R&&setTimeout(()=>{document.getElementById("uikit-footer-video-button")?.click(),i(wR({isCameraOn:!1}))},2e3)},[o.previewStatus,e,Ve,Ge,R,i]);const ce=o.themeName==="dark"?"white":"black";return w.jsx(w.Fragment,{children:w.jsx(IO,{id:"uikit-footer-video",ref:p,icon:o?.isShowVideoWarning?m_:R?Nw:v_,isActive:R,onClick:se,isLoading:Ve,iconColor:ce,themeName:o.themeName,chevronUpColor:ce,hoverColor:"hover:bg-theme-background",isShowChevron:o.viewType!==pl.Minimized,onChevronUpClick:Ne=>{y(!m),Ne.stopPropagation()},isWarning:o.isShowVideoWarning,title:"video",disabled:s!=="",orientation:r,menuContent:w.jsx(u5e,{autoClose:n,title:"Video settings",orientation:r,activeDevice:{Camera:o.activeCamera},setSettings:Ne=>{Ne!==o.activeCamera&&(f(!0),t(Ne).then(()=>{f(!1)})),y(!1)},options:{Camera:e},menuName:"camera-list",labels:{Camera:"Select a camera"},isOpen:m,setIsOpen:Ne=>{y(Ne)},excludeRefs:[p],clickSettingsLink:me,otherButtons:[{text:"Mirror my video",click:Oe,key:"footer-video-menu-mirror",checked:o.isMirrorVideo,disabled:!z||q},{text:"Select video playback",click:Te,key:"footer-video-menu-select-video-playback",checked:!1,disabled:!cE(R)||l?.length===0||!u},{text:"Blur your background",click:Ce,key:"footer-video-menu-blur",checked:!1,disabled:!o.isSupportVB},{text:"Video statistics",click:()=>{fe(),y(!1)},key:"footer-video-menu-video-statistics",checked:!1,disabled:!R}].filter(Ne=>!Ne?.disabled)})})})};function $Nt(){const e=E.useContext(Wo),{enqueueSnackbar:t}=Mg(),r="The host muted you",n="The host muted everyone",i=E.useCallback(a=>{a.action===cy.Muted&&a.source===dh.PassiveByMuteOne&&t(r,{variant:"info"}),a.action===cy.Muted&&a.source===dh.PassiveByMuteAll&&t(n,{variant:"info"})},[t,r,n]);E.useEffect(()=>(e.on("current-audio-change",i),()=>{e.off("current-audio-change",i)}),[e,i])}const GX=E.forwardRef(({color:e="black",size:t=24,strokeWidth:r=2},n)=>w.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"transform rotate-45",children:[w.jsx("path",{d:"M5.5 8.5 9 12l-3.5 3.5L2 12l3.5-3.5Z"}),w.jsx("path",{d:"m12 2 3.5 3.5L12 9 8.5 5.5 12 2Z"}),w.jsx("path",{d:"M18.5 8.5 22 12l-3.5 3.5L15 12l3.5-3.5Z"}),w.jsx("path",{d:"m12 15 3.5 3.5L12 22l-3.5-3.5L12 15Z"})]}));GX.displayName="SubsessionIcon";const B5e=({setIsSettingsOpen:e,isSettingsOpen:t,cameraList:r,microphoneList:n,speakerList:i,changeCamera:a,changeMicrophone:o,changeSpeaker:s,orientation:l="horizontal",autoClose:u=!0})=>{const{participantSize:c,isParticipantsPoppedOut:f,isChatPoppedOut:p,isSubsessionPoppedOut:h,activeSidePanel:g,isShowCaption:m,isShowCaptionHistory:y,isShowHostCaptionSettings:C,isJoinSubsessionConfirm:T,isAskSubsessionHelpConfirm:R,themeName:O}=nr(Vi),{isHost:N,isManager:k,config:{featuresOptions:{leave:{enable:j},audio:{enable:V},video:{enable:z},chat:{enable:q},users:{enable:$},share:{enable:Y},whiteboard:{enable:re},subsession:{enable:se},settings:{enable:me}}},status:Te}=nr(Ei),fe=N||k,[Ce,Oe]=E.useState(!1),{currentSubRoom:Ve,subUserStatus:Ge,subsessionType:ce,subsessionOptions:{isSubsessionSelectionEnabled:Ne},subStatus:ke,isSubsessionEnabled:De}=nr(zp),{enabled:Pe}=nr(vv),Je=Ve&&Ge===kA.InSubsession,{isTranscriptionInitiated:vt,isTranscriptionFeatureEnabled:qe,isHostDisableCaptions:St}=nr(JS),It=si(),{subsessionClient:at}=E.useContext(Xs),[kt,Et]=E.useState(!1),{unreadCount:ve}=nr(Ox),[Ht,Rr]=E.useState(!1),[ar,Cr]=E.useState(!1);$Nt();const Xr=E.useCallback(async()=>{if(N&&St){It(Dx(!0));return}if(!vt){It(em(!0));return}It(Bx(!m))},[It,N,St,m,vt]),lr=()=>{It(XS(!f)),It(q0("Participants"))},Yr=()=>{It(ZS(!p)),It(q0("Chat"))},nn=()=>{fe?(It(Lx(!h)),It(q0("Subsession"))):Ne?It(Lx(!h)):(It(SR(!0)),It(ib(!0)))},Zt=()=>{It(kx(!R))},Lr=l==="vertical"?"fixed left-0 top-1/2 -translate-y-1/2 flex flex-col py-4 px-2 border rounded-lg border-theme-border shadow-lg bg-theme-surface":`py-2 px-6 border-t border-theme-border shadow-lg bg-theme-surface ${es}`,Ur=l==="vertical"?"flex flex-col space-y-4":"max-w-7xl mx-auto flex justify-between items-center",qt=l==="vertical"?"flex flex-col space-y-4":"flex space-x-4",_r=l==="vertical"?"flex flex-col space-y-2":"flex";return Te!==ou.Connected?null:w.jsx("footer",{className:`uikit-footer ${Lr}`,id:"zoom-ui-toolkit-controls",children:w.jsxs("div",{className:Ur,children:[w.jsxs("div",{className:_r,children:[V&&w.jsx("div",{className:l==="vertical"?"mb-2":"px-1",children:w.jsx(BX,{changeMicrophone:o,changeSpeaker:s,microphoneList:n,speakerList:i,id:"uikit-footer-audio",orientation:l,autoClose:u})}),z&&w.jsx("div",{className:l==="vertical"?"mb-2":"px-1",children:w.jsx(QX,{cameraList:r,changeCamera:a,orientation:l,autoClose:u})})]}),w.jsxs("div",{className:qt,children:[Y&&!Hl()&&w.jsx(NNt,{isMenuOpen:Ht,setIsMenuOpen:Rr,orientation:l}),re&&Pe&&!Hl()&&w.jsx(DNt,{isMenuOpen:ar,setIsMenuOpen:Cr,orientation:l}),fe&&!Je&&w.jsx(kNt,{orientation:l}),$&&w.jsx(NO,{icon:nE,count:c,isActive:f||g==="participants",onClick:lr,id:"uikit-footer-participants-button",countId:"uikit-footer-participant-size",themName:O,orientation:l}),q&&w.jsx(NO,{icon:a8,count:ve,isActive:p||g==="chat",onClick:Yr,id:"uikit-footer-chat-button",countId:"uikit-footer-chat-unread",themName:O,orientation:l}),qe&&(!St||N)&&w.jsx(GNt,{isCaptionOn:m,handleCaptionClick:Xr,onViewTranscript:()=>{It(bG(!y))},onCaptionSettings:()=>{It(Dx(!C))},orientation:l}),(fe||Ne&&ke===Rs.InProgress||Ge===kA.Invited&&ke===Rs.InProgress)&&se&&De&&w.jsx(NO,{icon:GX,isActive:h,onClick:nn,id:"uikit-footer-subsession-button",themName:O,orientation:l}),Je&&!fe&&se&&w.jsx(NO,{icon:X9,isActive:R,onClick:Zt,id:"uikit-footer-subsession-help-button",themName:O,orientation:l,className:"hover:bg-gray-100 transition-colors"}),me&&w.jsx(WNt,{onOpenSettings:()=>{e(!0),It(q0("More"))},isSettingsOpen:t,themeName:O,orientation:l})]}),j&&w.jsx("div",{className:l==="vertical"?"mt-auto":"",children:w.jsx(T5e,{isHostOrManager:fe,orientation:l})}),Ce&&w.jsx(MX,{message:"Please contract your administrator to purchase the caption plan.",type:"error",onClose:()=>Oe(!1),isVisible:!0})]})})};var WX={exports:{}};var k5e;function KNt(){return k5e||(k5e=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var a="",o=0;o<arguments.length;o++){var s=arguments[o];s&&(a=i(a,n(s)))}return a}function n(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return r.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var o="";for(var s in a)t.call(a,s)&&a[s]&&(o=i(o,s));return o}function i(a,o){return o?a?a+" "+o:a+o:a}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(WX)),WX.exports}var qNt=KNt();const $X=uh(qNt);var P5e={NODE_ENV:'"production"',UIKIT_VERSION:'"2.3.5-1.1"',TAILWIND_VERSION:'"^3.4.17"'};const YNt="react-tooltip-core-styles",JNt="react-tooltip-base-styles",j5e={core:!1,base:!1};function F5e({css:e,id:t=JNt,type:r="base",ref:n}){var i,a;if(!e||typeof document>"u"||j5e[r]||r==="core"&&typeof process<"u"&&(!((i=process==null?void 0:P5e)===null||i===void 0)&&i.REACT_TOOLTIP_DISABLE_CORE_STYLES)||r!=="base"&&typeof process<"u"&&(!((a=process==null?void 0:P5e)===null||a===void 0)&&a.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;r==="core"&&(t=YNt),n||(n={});const{insertAt:o}=n;if(document.getElementById(t))return;const s=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.id=t,l.type="text/css",o==="top"&&s.firstChild?s.insertBefore(l,s.firstChild):s.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e)),j5e[r]=!0}const U5e=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:r=null,place:n="top",offset:i=10,strategy:a="absolute",middlewares:o=[znt(Number(i)),Gnt({fallbackAxisSideDirection:"start"}),Qnt({padding:5})],border:s,arrowSize:l=8})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:n};if(t===null)return{tooltipStyles:{},tooltipArrowStyles:{},place:n};const u=o;return r?(u.push(Wnt({element:r,padding:5})),b2e(e,t,{placement:n,strategy:a,middleware:u}).then((({x:c,y:f,placement:p,middlewareData:h})=>{var g,m;const y={left:`${c}px`,top:`${f}px`,border:s},{x:C,y:T}=(g=h.arrow)!==null&&g!==void 0?g:{x:0,y:0},R=(m={top:"bottom",right:"left",bottom:"top",left:"right"}[p.split("-")[0]])!==null&&m!==void 0?m:"bottom",O=s&&{borderBottom:s,borderRight:s};let N=0;if(s){const k=`${s}`.match(/(\d+)px/);N=k?.[1]?Number(k[1]):1}return{tooltipStyles:y,tooltipArrowStyles:{left:C!=null?`${C}px`:"",top:T!=null?`${T}px`:"",right:"",bottom:"",...O,[R]:`-${l/2+N}px`},place:p}}))):b2e(e,t,{placement:"bottom",strategy:a,middleware:u}).then((({x:c,y:f,placement:p})=>({tooltipStyles:{left:`${c}px`,top:`${f}px`},tooltipArrowStyles:{},place:p})))},H5e=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),V5e=(e,t,r)=>{let n=null;const i=function(...a){const o=()=>{n=null};!n&&(e.apply(this,a),n=setTimeout(o,t))};return i.cancel=()=>{n&&(clearTimeout(n),n=null)},i},z5e=e=>e!==null&&!Array.isArray(e)&&typeof e=="object",KX=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((i,a)=>KX(i,t[a])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!z5e(e)||!z5e(t))return e===t;const r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every((i=>KX(e[i],t[i])))},XNt=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((r=>{const n=t.getPropertyValue(r);return n==="auto"||n==="scroll"}))},Q5e=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(XNt(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},ZNt=typeof window<"u"?E.useLayoutEffect:E.useEffect,cg=e=>{e.current&&(clearTimeout(e.current),e.current=null)},eLt="DEFAULT_TOOLTIP_ID",tLt={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},rLt=E.createContext({getTooltipData:()=>tLt});function G5e(e=eLt){return E.useContext(rLt).getTooltipData(e)}var YI={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},qX={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const nLt=({forwardRef:e,id:t,className:r,classNameArrow:n,variant:i="dark",anchorId:a,anchorSelect:o,place:s="top",offset:l=10,events:u=["hover"],openOnClick:c=!1,positionStrategy:f="absolute",middlewares:p,wrapper:h,delayShow:g=0,delayHide:m=0,float:y=!1,hidden:C=!1,noArrow:T=!1,clickable:R=!1,closeOnEsc:O=!1,closeOnScroll:N=!1,closeOnResize:k=!1,openEvents:j,closeEvents:V,globalCloseEvents:z,imperativeModeOnly:q,style:$,position:Y,afterShow:re,afterHide:se,disableTooltip:me,content:Te,contentWrapperRef:fe,isOpen:Ce,defaultIsOpen:Oe=!1,setIsOpen:Ve,previousActiveAnchor:Ge,activeAnchor:ce,setActiveAnchor:Ne,border:ke,opacity:De,arrowColor:Pe,arrowSize:Je=8,role:vt="tooltip"})=>{var qe;const St=E.useRef(null),It=E.useRef(null),at=E.useRef(null),kt=E.useRef(null),Et=E.useRef(null),[ve,Ht]=E.useState({tooltipStyles:{},tooltipArrowStyles:{},place:s}),[Rr,ar]=E.useState(!1),[Cr,Xr]=E.useState(!1),[lr,Yr]=E.useState(null),nn=E.useRef(!1),Zt=E.useRef(null),{anchorRefs:Lr,setActiveAnchor:Ur}=G5e(t),qt=E.useRef(!1),[_r,wn]=E.useState([]),mr=E.useRef(!1),ur=c||u.includes("click"),Un=ur||j?.click||j?.dblclick||j?.mousedown,Rn=j?{...j}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!j&&ur&&Object.assign(Rn,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const xn=V?{...V}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!V&&ur&&Object.assign(xn,{mouseleave:!1,blur:!1,mouseout:!1});const Sn=z?{...z}:{escape:O||!1,scroll:N||!1,resize:k||!1,clickOutsideAnchor:Un||!1};q&&(Object.assign(Rn,{mouseover:!1,focus:!1,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(xn,{mouseout:!1,blur:!1,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Sn,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),ZNt((()=>(mr.current=!0,()=>{mr.current=!1})),[]);const Yn=Wr=>{mr.current&&(Wr&&Xr(!0),setTimeout((()=>{mr.current&&(Ve?.(Wr),Ce===void 0&&ar(Wr))}),10))};E.useEffect((()=>{if(t){if(Rr){zn(Ge);const pn=Wr(ce),yi=[...new Set([...pn,t])].filter(Boolean).join(" ");ce?.setAttribute("aria-describedby",yi)}else zn(ce);return()=>{zn(ce),zn(Ge)}}function Wr(pn){var yi;return((yi=pn?.getAttribute("aria-describedby"))===null||yi===void 0?void 0:yi.split(" "))||[]}function zn(pn){const yi=Wr(pn).filter((ta=>ta!==t));yi.length?pn?.setAttribute("aria-describedby",yi.join(" ")):pn?.removeAttribute("aria-describedby")}}),[ce,Rr,t,Ge]),E.useEffect((()=>{if(Ce===void 0)return()=>null;Ce&&Xr(!0);const Wr=setTimeout((()=>{ar(Ce)}),10);return()=>{clearTimeout(Wr)}}),[Ce]),E.useEffect((()=>{if(Rr!==nn.current)if(cg(Et),nn.current=Rr,Rr)re?.();else{const Wr=(zn=>{const pn=zn.match(/^([\d.]+)(ms|s)$/);if(!pn)return 0;const[,yi,ta]=pn;return Number(yi)*(ta==="ms"?1:1e3)})(getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay"));Et.current=setTimeout((()=>{Xr(!1),Yr(null),se?.()}),Wr+25)}}),[Rr]);const Dn=Wr=>{Ht((zn=>KX(zn,Wr)?zn:Wr))},gi=(Wr=g)=>{cg(at),Cr?Yn(!0):at.current=setTimeout((()=>{Yn(!0)}),Wr)},_n=(Wr=m)=>{cg(kt),kt.current=setTimeout((()=>{qt.current||Yn(!1)}),Wr)},En=Wr=>{var zn;if(!Wr)return;const pn=(zn=Wr.currentTarget)!==null&&zn!==void 0?zn:Wr.target;if(!pn?.isConnected)return Ne(null),void Ur({current:null});g?gi():Yn(!0),Ne(pn),Ur({current:pn}),cg(kt)},Bi=()=>{R?_n(m||100):m?_n():Yn(!1),cg(at)},Mn=({x:Wr,y:zn})=>{var pn;const yi={getBoundingClientRect:()=>({x:Wr,y:zn,width:0,height:0,top:zn,left:Wr,right:Wr,bottom:zn})};U5e({place:(pn=lr?.place)!==null&&pn!==void 0?pn:s,offset:l,elementReference:yi,tooltipReference:St.current,tooltipArrowReference:It.current,strategy:f,middlewares:p,border:ke,arrowSize:Je}).then((ta=>{Dn(ta)}))},ti=Wr=>{if(!Wr)return;const zn=Wr,pn={x:zn.clientX,y:zn.clientY};Mn(pn),Zt.current=pn},Yi=Wr=>{var zn;if(!Rr)return;const pn=Wr.target;pn.isConnected&&(!((zn=St.current)===null||zn===void 0)&&zn.contains(pn)||[document.querySelector(`[id='${a}']`),..._r].some((yi=>yi?.contains(pn)))||(Yn(!1),cg(at)))},ei=V5e(En,50),ii=V5e(Bi,50),Ra=Wr=>{ii.cancel(),ei(Wr)},li=()=>{ei.cancel(),ii()},kr=E.useCallback((()=>{var Wr,zn;const pn=(Wr=lr?.position)!==null&&Wr!==void 0?Wr:Y;pn?Mn(pn):y?Zt.current&&Mn(Zt.current):ce?.isConnected&&U5e({place:(zn=lr?.place)!==null&&zn!==void 0?zn:s,offset:l,elementReference:ce,tooltipReference:St.current,tooltipArrowReference:It.current,strategy:f,middlewares:p,border:ke,arrowSize:Je}).then((yi=>{mr.current&&Dn(yi)}))}),[Rr,ce,Te,$,s,lr?.place,l,f,Y,lr?.position,y,Je]);E.useEffect((()=>{var Wr,zn;const pn=new Set(Lr);_r.forEach((oi=>{me?.(oi)||pn.add({current:oi})}));const yi=document.querySelector(`[id='${a}']`);yi&&!me?.(yi)&&pn.add({current:yi});const ta=()=>{Yn(!1)},_t=Q5e(ce),Hr=Q5e(St.current);Sn.scroll&&(window.addEventListener("scroll",ta),_t?.addEventListener("scroll",ta),Hr?.addEventListener("scroll",ta));let fn=null;Sn.resize?window.addEventListener("resize",ta):ce&&St.current&&(fn=y2e(ce,St.current,kr,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const bn=oi=>{oi.key==="Escape"&&Yn(!1)};Sn.escape&&window.addEventListener("keydown",bn),Sn.clickOutsideAnchor&&window.addEventListener("click",Yi);const Wn=[],ui=oi=>!!(oi?.target&&ce?.contains(oi.target)),Ti=oi=>{Rr&&ui(oi)||En(oi)},Fi=oi=>{Rr&&ui(oi)&&Bi()},Ma=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],gn=["click","dblclick","mousedown","mouseup"];Object.entries(Rn).forEach((([oi,wi])=>{wi&&(Ma.includes(oi)?Wn.push({event:oi,listener:Ra}):gn.includes(oi)&&Wn.push({event:oi,listener:Ti}))})),Object.entries(xn).forEach((([oi,wi])=>{wi&&(Ma.includes(oi)?Wn.push({event:oi,listener:li}):gn.includes(oi)&&Wn.push({event:oi,listener:Fi}))})),y&&Wn.push({event:"pointermove",listener:ti});const Mt=()=>{qt.current=!0},Tr=()=>{qt.current=!1,Bi()},Hn=R&&(xn.mouseout||xn.mouseleave);return Hn&&((Wr=St.current)===null||Wr===void 0||Wr.addEventListener("mouseover",Mt),(zn=St.current)===null||zn===void 0||zn.addEventListener("mouseout",Tr)),Wn.forEach((({event:oi,listener:wi})=>{pn.forEach((Xn=>{var $i;($i=Xn.current)===null||$i===void 0||$i.addEventListener(oi,wi)}))})),()=>{var oi,wi;Sn.scroll&&(window.removeEventListener("scroll",ta),_t?.removeEventListener("scroll",ta),Hr?.removeEventListener("scroll",ta)),Sn.resize?window.removeEventListener("resize",ta):fn?.(),Sn.clickOutsideAnchor&&window.removeEventListener("click",Yi),Sn.escape&&window.removeEventListener("keydown",bn),Hn&&((oi=St.current)===null||oi===void 0||oi.removeEventListener("mouseover",Mt),(wi=St.current)===null||wi===void 0||wi.removeEventListener("mouseout",Tr)),Wn.forEach((({event:Xn,listener:$i})=>{pn.forEach((Xi=>{var Jo;(Jo=Xi.current)===null||Jo===void 0||Jo.removeEventListener(Xn,$i)}))}))}}),[ce,kr,Cr,Lr,_r,j,V,z,ur,g,m]),E.useEffect((()=>{var Wr,zn;let pn=(zn=(Wr=lr?.anchorSelect)!==null&&Wr!==void 0?Wr:o)!==null&&zn!==void 0?zn:"";!pn&&t&&(pn=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);const yi=new MutationObserver((ta=>{const _t=[],Hr=[];ta.forEach((fn=>{if(fn.type==="attributes"&&fn.attributeName==="data-tooltip-id"&&(fn.target.getAttribute("data-tooltip-id")===t?_t.push(fn.target):fn.oldValue===t&&Hr.push(fn.target)),fn.type==="childList"){if(ce){const bn=[...fn.removedNodes].filter((Wn=>Wn.nodeType===1));if(pn)try{Hr.push(...bn.filter((Wn=>Wn.matches(pn)))),Hr.push(...bn.flatMap((Wn=>[...Wn.querySelectorAll(pn)])))}catch{}bn.some((Wn=>{var ui;return!!(!((ui=Wn?.contains)===null||ui===void 0)&&ui.call(Wn,ce))&&(Xr(!1),Yn(!1),Ne(null),cg(at),cg(kt),!0)}))}if(pn)try{const bn=[...fn.addedNodes].filter((Wn=>Wn.nodeType===1));_t.push(...bn.filter((Wn=>Wn.matches(pn)))),_t.push(...bn.flatMap((Wn=>[...Wn.querySelectorAll(pn)])))}catch{}}})),(_t.length||Hr.length)&&wn((fn=>[...fn.filter((bn=>!Hr.includes(bn))),..._t]))}));return yi.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{yi.disconnect()}}),[t,o,lr?.anchorSelect,ce]),E.useEffect((()=>{kr()}),[kr]),E.useEffect((()=>{if(!fe?.current)return()=>null;const Wr=new ResizeObserver((()=>{setTimeout((()=>kr()))}));return Wr.observe(fe.current),()=>{Wr.disconnect()}}),[Te,fe?.current]),E.useEffect((()=>{var Wr;const zn=document.querySelector(`[id='${a}']`),pn=[..._r,zn];ce&&pn.includes(ce)||Ne((Wr=_r[0])!==null&&Wr!==void 0?Wr:zn)}),[a,_r,ce]),E.useEffect((()=>(Oe&&Yn(!0),()=>{cg(at),cg(kt)})),[]),E.useEffect((()=>{var Wr;let zn=(Wr=lr?.anchorSelect)!==null&&Wr!==void 0?Wr:o;if(!zn&&t&&(zn=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),zn)try{const pn=Array.from(document.querySelectorAll(zn));wn(pn)}catch{wn([])}}),[t,o,lr?.anchorSelect]),E.useEffect((()=>{at.current&&(cg(at),gi(g))}),[g]);const Ii=(qe=lr?.content)!==null&&qe!==void 0?qe:Te,Ji=Rr&&Object.keys(ve.tooltipStyles).length>0;return E.useImperativeHandle(e,(()=>({open:Wr=>{if(Wr?.anchorSelect)try{document.querySelector(Wr.anchorSelect)}catch{return void console.warn(`[react-tooltip] "${Wr.anchorSelect}" is not a valid CSS selector`)}Yr(Wr??null),Wr?.delay?gi(Wr.delay):Yn(!0)},close:Wr=>{Wr?.delay?_n(Wr.delay):Yn(!1)},activeAnchor:ce,place:ve.place,isOpen:!!(Cr&&!C&&Ii&&Ji)}))),Cr&&!C&&Ii?wa.createElement(h,{id:t,role:vt,className:$X("react-tooltip",YI.tooltip,qX.tooltip,qX[i],r,`react-tooltip__place-${ve.place}`,YI[Ji?"show":"closing"],Ji?"react-tooltip__show":"react-tooltip__closing",f==="fixed"&&YI.fixed,R&&YI.clickable),onTransitionEnd:Wr=>{cg(Et),Rr||Wr.propertyName!=="opacity"||(Xr(!1),Yr(null),se?.())},style:{...$,...ve.tooltipStyles,opacity:De!==void 0&&Ji?De:void 0},ref:St},Ii,wa.createElement(h,{className:$X("react-tooltip-arrow",YI.arrow,qX.arrow,n,T&&YI.noArrow),style:{...ve.tooltipArrowStyles,background:Pe?`linear-gradient(to right bottom, transparent 50%, ${Pe} 50%)`:void 0,"--rt-arrow-size":`${Je}px`},ref:It})):null},iLt=({content:e})=>wa.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),W5e=wa.forwardRef((({id:e,anchorId:t,anchorSelect:r,content:n,html:i,render:a,className:o,classNameArrow:s,variant:l="dark",place:u="top",offset:c=10,wrapper:f="div",children:p=null,events:h=["hover"],openOnClick:g=!1,positionStrategy:m="absolute",middlewares:y,delayShow:C=0,delayHide:T=0,float:R=!1,hidden:O=!1,noArrow:N=!1,clickable:k=!1,closeOnEsc:j=!1,closeOnScroll:V=!1,closeOnResize:z=!1,openEvents:q,closeEvents:$,globalCloseEvents:Y,imperativeModeOnly:re=!1,style:se,position:me,isOpen:Te,defaultIsOpen:fe=!1,disableStyleInjection:Ce=!1,border:Oe,opacity:Ve,arrowColor:Ge,arrowSize:ce,setIsOpen:Ne,afterShow:ke,afterHide:De,disableTooltip:Pe,role:Je="tooltip"},vt)=>{const[qe,St]=E.useState(n),[It,at]=E.useState(i),[kt,Et]=E.useState(u),[ve,Ht]=E.useState(l),[Rr,ar]=E.useState(c),[Cr,Xr]=E.useState(C),[lr,Yr]=E.useState(T),[nn,Zt]=E.useState(R),[Lr,Ur]=E.useState(O),[qt,_r]=E.useState(f),[wn,mr]=E.useState(h),[ur,Un]=E.useState(m),[Rn,xn]=E.useState(null),[Sn,Yn]=E.useState(null),Dn=E.useRef(null),gi=E.useRef(Ce),{anchorRefs:_n,activeAnchor:En}=G5e(e),Bi=ii=>ii?.getAttributeNames().reduce(((Ra,li)=>{var kr;return li.startsWith("data-tooltip-")&&(Ra[li.replace(/^data-tooltip-/,"")]=(kr=ii?.getAttribute(li))!==null&&kr!==void 0?kr:null),Ra}),{}),Mn=ii=>{const Ra={place:li=>{var kr;Et((kr=li)!==null&&kr!==void 0?kr:u)},content:li=>{St(li??n)},html:li=>{at(li??i)},variant:li=>{var kr;Ht((kr=li)!==null&&kr!==void 0?kr:l)},offset:li=>{ar(li===null?c:Number(li))},wrapper:li=>{var kr;_r((kr=li)!==null&&kr!==void 0?kr:f)},events:li=>{const kr=li?.split(" ");mr(kr??h)},"position-strategy":li=>{var kr;Un((kr=li)!==null&&kr!==void 0?kr:m)},"delay-show":li=>{Xr(li===null?C:Number(li))},"delay-hide":li=>{Yr(li===null?T:Number(li))},float:li=>{Zt(li===null?R:li==="true")},hidden:li=>{Ur(li===null?O:li==="true")},"class-name":li=>{xn(li)}};Object.values(Ra).forEach((li=>li(null))),Object.entries(ii).forEach((([li,kr])=>{var Ii;(Ii=Ra[li])===null||Ii===void 0||Ii.call(Ra,kr)}))};E.useEffect((()=>{St(n)}),[n]),E.useEffect((()=>{at(i)}),[i]),E.useEffect((()=>{Et(u)}),[u]),E.useEffect((()=>{Ht(l)}),[l]),E.useEffect((()=>{ar(c)}),[c]),E.useEffect((()=>{Xr(C)}),[C]),E.useEffect((()=>{Yr(T)}),[T]),E.useEffect((()=>{Zt(R)}),[R]),E.useEffect((()=>{Ur(O)}),[O]),E.useEffect((()=>{Un(m)}),[m]),E.useEffect((()=>{gi.current!==Ce&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[Ce]),E.useEffect((()=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:Ce==="core",disableBase:Ce}}))}),[]),E.useEffect((()=>{var ii;const Ra=new Set(_n);let li=r;if(!li&&e&&(li=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),li)try{document.querySelectorAll(li).forEach((zn=>{Ra.add({current:zn})}))}catch{console.warn(`[react-tooltip] "${li}" is not a valid CSS selector`)}const kr=document.querySelector(`[id='${t}']`);if(kr&&Ra.add({current:kr}),!Ra.size)return()=>null;const Ii=(ii=Sn??kr)!==null&&ii!==void 0?ii:En.current,Ji=new MutationObserver((zn=>{zn.forEach((pn=>{var yi;if(!Ii||pn.type!=="attributes"||!(!((yi=pn.attributeName)===null||yi===void 0)&&yi.startsWith("data-tooltip-")))return;const ta=Bi(Ii);Mn(ta)}))})),Wr={attributes:!0,childList:!1,subtree:!1};if(Ii){const zn=Bi(Ii);Mn(zn),Ji.observe(Ii,Wr)}return()=>{Ji.disconnect()}}),[_n,En,Sn,t,r]),E.useEffect((()=>{se?.border&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),Oe&&!H5e("border",`${Oe}`)&&console.warn(`[react-tooltip] "${Oe}" is not a valid \`border\`.`),se?.opacity&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),Ve&&!H5e("opacity",`${Ve}`)&&console.warn(`[react-tooltip] "${Ve}" is not a valid \`opacity\`.`)}),[]);let ti=p;const Yi=E.useRef(null);if(a){const ii=a({content:Sn?.getAttribute("data-tooltip-content")||qe||null,activeAnchor:Sn});ti=ii?wa.createElement("div",{ref:Yi,className:"react-tooltip-content-wrapper"},ii):null}else qe&&(ti=qe);It&&(ti=wa.createElement(iLt,{content:It}));const ei={forwardRef:vt,id:e,anchorId:t,anchorSelect:r,className:$X(o,Rn),classNameArrow:s,content:ti,contentWrapperRef:Yi,place:kt,variant:ve,offset:Rr,wrapper:qt,events:wn,openOnClick:g,positionStrategy:ur,middlewares:y,delayShow:Cr,delayHide:lr,float:nn,hidden:Lr,noArrow:N,clickable:k,closeOnEsc:j,closeOnScroll:V,closeOnResize:z,openEvents:q,closeEvents:$,globalCloseEvents:Y,imperativeModeOnly:re,style:se,position:me,isOpen:Te,defaultIsOpen:fe,border:Oe,opacity:Ve,arrowColor:Ge,arrowSize:ce,setIsOpen:Ne,afterShow:ke,afterHide:De,disableTooltip:Pe,activeAnchor:Sn,previousActiveAnchor:Dn.current,setActiveAnchor:ii=>{Yn((Ra=>(ii?.isSameNode(Ra)||(Dn.current=Ra),ii)))},role:Je};return wa.createElement(nLt,{...ei})}));typeof window<"u"&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||F5e({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s;--rt-arrow-size:8px}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit;z-index:-1}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||F5e({css:`
609
609
  .styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:var(--rt-arrow-size);height:var(--rt-arrow-size)}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}`,type:"base"})}));const aLt=({value:e=0,onChange:t=R=>{},min:r=0,max:n=100,threshold:i=null,width:a=200,height:o=200,radius:s=null,strokeWidth:l=12,knobRadius:u=16,trackColor:c="#e5e7eb",progressColor:f="url(#gradient)",thresholdColor:p="#ef4444",knobColor:h="white",knobStrokeColor:g="#3b82f6",showValue:m=!0,showThreshold:y=!1,disabled:C=!1,valueText:T=null})=>{const[R,O]=E.useState(!1),N=E.useRef(null),k=a/2,j=o/2,V=s||Math.min(a,o)/2-l-u,z=ke=>(ke-r)/(n-r)*360-90,q=ke=>{let De=(ke+90)%360;De<0&&(De+=360);const Pe=De/360,Je=r+Pe*(n-r);return Number(Je.toFixed(2))},$=ke=>{const De=ke*Math.PI/180;return{x:k+V*Math.cos(De),y:j+V*Math.sin(De)}},Y=(ke,De)=>{if(!N.current||C)return;const Pe=N.current.getBoundingClientRect(),Je=ke-Pe.left-k,vt=De-Pe.top-j,qe=Math.atan2(vt,Je)*(180/Math.PI);let St=q(qe);i!=null&&(St=Math.min(St,i)),t(St)},re=ke=>{C||(O(!0),Y(ke.clientX,ke.clientY))},se=ke=>{!R||C||Y(ke.clientX,ke.clientY)},me=()=>{O(!1)},Te=ke=>{if(C)return;O(!0);const De=ke.touches[0];Y(De.clientX,De.clientY)},fe=ke=>{if(!R||C)return;const De=ke.touches[0];Y(De.clientX,De.clientY)},Ce=()=>{O(!1)};E.useEffect(()=>{if(R)return window.addEventListener("mousemove",se),window.addEventListener("mouseup",me),window.addEventListener("touchmove",fe),window.addEventListener("touchend",Ce),()=>{window.removeEventListener("mousemove",se),window.removeEventListener("mouseup",me),window.removeEventListener("touchmove",fe),window.removeEventListener("touchend",Ce)}},[R]);const Oe=z(e),Ve=$(Oe),Ge=i!=null?z(i):null,ce=Ge!==null?$(Ge):null,Ne=()=>{const De=Oe,Pe=Math.abs(De- -90)>180?1:0,Je=$(-90),vt=$(De);return Math.abs(De- -90)<.01?"":`M ${Je.x} ${Je.y} A ${V} ${V} 0 ${Pe} 1 ${vt.x} ${vt.y}`};return w.jsxs("svg",{ref:N,width:a,height:o,className:`select-none ${C?"opacity-50":"cursor-pointer"}`,onMouseDown:re,onTouchStart:Te,children:[w.jsx("circle",{cx:k,cy:j,r:V,fill:"none",stroke:c,strokeWidth:l,strokeLinecap:"round"}),w.jsx("path",{d:Ne(),fill:"none",stroke:f,strokeWidth:l,strokeLinecap:"round"}),y&&i!==null&&i!==void 0&&ce&&w.jsx(w.Fragment,{children:w.jsx("circle",{cx:ce.x,cy:ce.y,r:4,fill:p})}),w.jsx("defs",{children:w.jsxs("linearGradient",{id:"gradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[w.jsx("stop",{offset:"0%",stopColor:"#3b82f6"}),w.jsx("stop",{offset:"100%",stopColor:"#8b5cf6"})]})}),w.jsx("circle",{cx:Ve.x,cy:Ve.y,r:u,fill:h,stroke:g,strokeWidth:"3",className:`${R&&!C?"scale-110":""} transition-transform drop-shadow-lg`,style:{cursor:C?"default":R?"grabbing":"grab"}}),m&&w.jsxs("text",{x:k,y:j,textAnchor:"middle",dominantBaseline:"middle",className:T?"text-xs font-bold pointer-events-none":"text-3xl font-bold pointer-events-none",fill:"var(--color-text)",style:T?{fontSize:`${Math.min(a,o)/15}px`}:{fontSize:`${Math.min(a,o)/6}px`},children:[!T&&w.jsx("tspan",{x:k,dy:"0em",children:e.toFixed(2)}),T&&w.jsxs(w.Fragment,{children:[w.jsx("tspan",{x:k,dy:"-0.6em",children:T}),w.jsx("tspan",{x:k,dy:"1.2em",children:e.toFixed(2)})]})]})]})},$5e=({position:e})=>{const{stream:t}=E.useContext(Ro),r=si(),n=E.useMemo(()=>Object.keys(po).length>0&&Object.keys(Gw).length>0,[]),{isToolBarExpanded:i,activeAnnotationOption:a,showShapeMenu:o,showColorMenu:s,showClearMenu:l,showTimerMenu:u,selectedShape:c,selectedColorIdx:f,selectedWidthIdx:p,canUndo:h,canRedo:g,showPencilMenu:m,annotationOptions:y}=nr(Et=>Et.ui),{isAnnotationStarted:C,isHost:T,userId:R,activeShareId:O,isScreenSharePaused:N,isSendingScreenShare:k}=nr(Et=>Et.session),{displayTime:j,vanishingTime:V}=y.vanishingToolTimer,z=E.useMemo(()=>{try{if(t&&typeof t.getAnnotationController=="function")return t.getAnnotationController()}catch{}return null},[t]),q=E.useRef(null),$=E.useRef(null),Y=E.useRef(null),re=E.useRef(null),se=E.useRef(null),me=E.useMemo(()=>[{id:"mouse",anchorId:"uikit-annotation-mouse",icon:P7e,label:"Mouse",color:"bg-gray-700"},{id:"eraser",anchorId:"uikit-annotation-eraser",icon:S7e,label:"Erase",color:"bg-gray-700"},{id:"undo",anchorId:"uikit-annotation-undo",icon:X7e,label:"Undo",color:"bg-gray-500"},{id:"redo",anchorId:"uikit-annotation-redo",icon:Q7e,label:"Redo",color:"bg-gray-500"},{id:"pencil",anchorId:"uikit-annotation-pencil",icon:U7e,label:"Pen",color:"bg-green-500"},{id:"color",anchorId:"uikit-annotation-color",icon:H7e,label:"Color",color:"bg-gray-100"},k&&{id:"timer",anchorId:"uikit-annotation-timer",icon:Y7e,label:"Vanishing tool timer",color:"bg-gray-600"},{id:"shape",anchorId:"uikit-annotation-shape",icon:Ow,label:"Shapes",color:"bg-blue-500"},{id:"clear",anchorId:"uikit-annotation-clear",icon:C7e,label:"Clear",color:"bg-white"}].filter(Boolean),[k]),{shapeButtonIndex:Te,colorButtonIndex:fe,clearButtonIndex:Ce,timerButtonIndex:Oe}=E.useMemo(()=>({shapeButtonIndex:me.findIndex(Et=>Et.id==="shape"),colorButtonIndex:me.findIndex(Et=>Et.id==="color"),clearButtonIndex:me.findIndex(Et=>Et.id==="clear"),timerButtonIndex:me.findIndex(Et=>Et.id==="timer")}),[me]),Ve=E.useMemo(()=>n?[{id:"line",label:"Line",toolType:po.Line},{id:"arrow",label:"Arrow",toolType:po.Arrow1},k&&{id:"spotlight",label:"Spotlight",toolType:po.Spotlight},{id:"arrow_name",label:"Name Arrow",toolType:po.Arrow},{id:"rectangle",label:"Rectangle",toolType:po.Rectangle},{id:"rectangle_semi_fill",label:"Rectangle (Semi Fill)",toolType:po.RectangleSemiFill},{id:"ellipse",label:"Ellipse",toolType:po.Ellipse},{id:"ellipse_semi_fill",label:"Ellipse (Semi Fill)",toolType:po.EllipseSemiFill},{id:"double_arrow",label:"Double Arrow",toolType:po.DoubleArrow},{id:"rectangle_fill",label:"Rectangle (Fill)",toolType:po.RectangleFill},{id:"ellipse_fill",label:"Ellipse (Fill)",toolType:po.EllipseFill},{id:"diamond",label:"Diamond",toolType:po.Diamond},{id:"diamond_semi_fill",label:"Diamond (Semi Fill)",toolType:po.DiamondSemiFill},{id:"diamond_fill",label:"Diamond (Fill)",toolType:po.DiamondFill},{id:"stamp_arrow",label:"Stamp Arrow",toolType:po.StampArrow},{id:"stamp_check",label:"Stamp Check",toolType:po.StampCheck},{id:"stamp_x",label:"Stamp X",toolType:po.StampX},{id:"stamp_star",label:"Stamp Star",toolType:po.StampStar},{id:"stamp_heart",label:"Stamp Heart",toolType:po.StampHeart},{id:"stamp_question",label:"Stamp Question",toolType:po.StampQuestionMark},{id:"vanishing_pen",label:"Vanishing pen",toolType:po.VanishingPen},{id:"vanishing_rectangle",label:"Vanishing rectangle",toolType:po.VanishingRectangle},{id:"vanishing_ellipse",label:"Vanishing ellipse",toolType:po.VanishingEllipse},{id:"vanishing_diamond",label:"Vanishing diamond",toolType:po.VanishingDiamond},{id:"vanishing_arrow",label:"Vanishing arrow",toolType:po.VanishingArrow},{id:"vanishing_double_arrow",label:"Vanishing double arrow",toolType:po.VanishingDoubleArrow}].filter(Boolean):[],[k,n]),Ge=E.useMemo(()=>{if(!n)return[];const Et=[{id:"clear_mine",value:Gw.Mine,label:"Clear mine"}];return R===O&&Et.push({id:"clear_viewer",value:Gw.Viewer,label:"Clear viewer"}),(T||R===O)&&Et.push({id:"clear_all",value:Gw.All,label:"Clear all"}),Et},[T,R,O,n]),ce=E.useMemo(()=>[{id:"black",value:"0xff000000",displayColor:"#000000"},{id:"red",value:"0xffff1919",displayColor:"#ff1919"},{id:"blue",value:"0xff2e8cff",displayColor:"#2e8cff"},{id:"green",value:"0xff82c786",displayColor:"#82c786"},{id:"yellow",value:"0xffffde32",displayColor:"#ffde32"},{id:"orange",value:"0xffff8a00",displayColor:"#ff8a00"},{id:"pink",value:"0xffff38c7",displayColor:"#ff38c7"},{id:"light_purple",value:"0xffb479ff",displayColor:"#b479ff"}],[]),Ne=E.useMemo(()=>[{id:"thin",value:2},{id:"medium",value:8},{id:"thick",value:16}],[]),ke=E.useCallback(async()=>{try{if(N||!n)return;C?i?(t&&typeof t.stopAnnotation=="function"&&await t.stopAnnotation(),r(MG(!1)),r(rb(!1)),r(Ux())):r(MG(!0)):i||(t&&typeof t.startAnnotation=="function"&&await t.startAnnotation(),r(MG(!0)),r(rb(!0)))}catch(Et){console.error(Et)}},[C,i,t,r,N,n]),De=E.useCallback(Et=>{r(mtt(Et)),Et!=="shape"&&r(Uk(!1)),Et!=="color"&&r(Hk(!1))},[r]),Pe=E.useCallback(async Et=>{const ve=Ve.find(Ht=>Ht.id===Et);if(ve&&z){await z.setToolType(ve.toolType);const Ht=await z.getToolColor(),Rr=ce.findIndex(ar=>parseInt(ar.value,16)===Ht);r(NG(Rr)),r(cCe(Et)),r(Uk(!1))}},[Ve,z,ce,r]),Je=E.useCallback(async Et=>{if(z){const ve=parseInt(ce[Et].value,16);await z.setToolColor(ve),r(NG(Et)),r(Hk(!1))}},[ce,z,r]),vt=E.useCallback(async Et=>{try{if(!n||!z)return;await z.clear(Et),r(OG(!1))}catch(ve){console.error("Failed to clear annotation:",ve)}},[z,r,n]),qe=E.useCallback(async Et=>{if(z){const ve=Ne[Et].value;await z.setToolWidth(ve),r(btt(Et)),r(LG(!1))}},[Ne,z,r]),St=E.useCallback(async()=>{try{h&&z&&await z.undo()}catch(Et){console.error("Failed to undo annotation:",Et)}},[z,h]),It=E.useCallback(async()=>{try{g&&z&&await z.redo()}catch(Et){console.error("Failed to redo annotation:",Et)}},[z,g]),at=E.useCallback(async(Et,ve)=>{De(ve.id);try{if(!n||!z){console.warn("Annotation is not supported in this VideoSDK version");return}switch(ve.id){case"mouse":await z.setToolType(po.None);break;case"shape":r(Uk(!o));break;case"color":r(Hk(!s));break;case"pencil":{await z.setToolType(po.Pen);const Ht=await z.getToolColor(),Rr=ce.findIndex(ar=>parseInt(ar.value,16)===Ht);r(NG(Rr)),r(cCe(null)),r(LG(!m));break}case"clear":r(OG(!l));break;case"eraser":await z.setToolType(po.Eraser);break;case"undo":await St();break;case"redo":await It();break;case"timer":r(uCe(!u));break;default:break}}catch(Ht){console.error("Error handling toolbar button click:",Ht)}},[De,o,s,m,l,u,z,St,It,ce,r,n]),kt=E.useCallback(async(Et,ve)=>{z&&(await z?.setVanishingToolTimer({displayTime:Et,vanishingTime:ve}),r(wtt({vanishingToolTimer:{displayTime:Et,vanishingTime:ve}})))},[z,r]);return E.useEffect(()=>{const Et=ve=>{q.current&&!q.current.contains(ve.target)&&r(Uk(!1)),$.current&&!$.current.contains(ve.target)&&r(Hk(!1)),re.current&&!re.current.contains(ve.target)&&r(LG(!1)),Y.current&&!Y.current.contains(ve.target)&&r(OG(!1)),se.current&&!se.current.contains(ve.target)&&r(uCe(!1))};return document.addEventListener("mousedown",Et),()=>{document.removeEventListener("mousedown",Et)}},[r]),n?w.jsx("div",{className:`uikit-annotation-toolbar flex items-end justify-center h-[280px] bg-transparent rounded-lg ${e}`,children:w.jsxs("div",{className:"relative",children:[w.jsx("button",{id:"uikit-annotation-toolbar-button",onClick:ke,className:`flex items-center justify-center rounded-full shadow-lg transition-all duration-500 z-10
610
610
  ${i?"bg-red-500 rotate-45":"bg-green-600"}
611
611
  ${N||!n?"opacity-50 cursor-not-allowed":"hover:bg-opacity-90"}`,style:{width:i?"24px":"28px",height:i?"24px":"28px",paddingBottom:i?"4px":"0px"},disabled:N||!n,children:i?w.jsx("span",{className:"text-white text-2xl font-bold",children:"+"}):w.jsx(ile,{className:"w-3 h-3 text-white"})}),w.jsx(W5e,{anchorSelect:"#uikit-annotation-toolbar-button",content:n?i?"Close":"Annotate":"Annotation not supported in this VideoSDK version",place:"right",style:{fontSize:"10px",padding:"0 5px"},noArrow:!0}),w.jsx("div",{className:"absolute bottom-0 left-1/2 transform -translate-x-1/2",children:me.map((Et,ve)=>w.jsxs("div",{className:"relative",children:[w.jsx("button",{id:Et.anchorId,onClick:Ht=>at(Ht,Et),className:`absolute left-1/2 -translate-x-1/2 flex items-center justify-center rounded-full text-white shadow-md transition-all ${Et.color} ${a===Et.id?"ring-2 ring-white":""} ${Et.id==="undo"&&!h||Et.id==="redo"&&!g?"opacity-50 cursor-not-allowed":""}`,style:{width:"24px",height:"24px",opacity:i?1:0,bottom:i?`${(ve+1)*30}px`:"0px",pointerEvents:i?"auto":"none"},disabled:Et.id==="undo"&&!h||Et.id==="redo"&&!g,children:Et.id==="shape"?w.jsx(Ow,{className:"w-3 h-3"}):Et.id==="color"?w.jsx(Et.icon,{color:ce[f].displayColor,className:"w-3 h-3"}):Et.id==="clear"?w.jsx(Et.icon,{color:"red",className:"w-3 h-3"}):w.jsx(Et.icon,{className:"w-3 h-3"})}),w.jsx(W5e,{anchorSelect:`#${Et.anchorId}`,content:Et.label,place:"right",style:{fontSize:"10px",padding:"0 5px"},noArrow:!0}),Et.id==="shape"&&o&&i&&w.jsx("div",{ref:q,className:"absolute left-5 rounded-lg shadow-lg p-2 z-20 transition-all duration-300 bg-theme-surface",style:{bottom:`${(Te+1)*30-200+24}px`,opacity:1,transform:"scale(1)",transformOrigin:"left center"},children:w.jsx("div",{className:"flex flex-col w-[200px] text-sm text-theme-text dark:text-gray-200 max-h-[200px] overflow-y-auto uikit-custom-scrollbar",children:Ve.map(Ht=>w.jsx("button",{onClick:()=>Pe(Ht.id),className:`p-2 text-left rounded transition-colors ${c===Ht.id?"bg-blue-100 dark:bg-blue-900 text-blue-700 dark:text-blue-200":"hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:Ht.label},Ht.id))})}),Et.id==="color"&&s&&i&&w.jsx("div",{ref:$,className:"absolute left-5 rounded-lg shadow-lg p-2 z-20 transition-all duration-300 flex justify-center bg-theme-surface",style:{bottom:`${(fe+1)*30-64+24}px`,opacity:1,transform:"scale(1)",transformOrigin:"left center"},children:w.jsx("div",{className:"grid grid-cols-4 gap-4 w-[120px] text-theme-tex",children:ce.map((Ht,Rr)=>w.jsx("button",{onClick:()=>Je(Rr),children:w.jsx(Kse,{fill:Ht.displayColor,color:Ht.displayColor,className:"w-4 h-4"})},Ht.id))})}),Et.id==="clear"&&l&&i&&w.jsx("div",{ref:Y,className:"absolute left-5 rounded-lg shadow-lg p-2 z-20 transition-all duration-300 bg-theme-surface",style:{bottom:`${(Ce+1)*30-100*Ge?.length/3+24}px`,opacity:1,transform:"scale(1)",transformOrigin:"left center"},children:w.jsx("div",{className:"flex flex-col w-[100px] text-sm text-theme-tex",children:Ge.map(Ht=>w.jsx("button",{onClick:()=>vt(Ht.value),className:"flex items-center space-x-1 p-1 hover:bg-gray-100 rounded transition-colors",children:w.jsx("span",{children:Ht.label})},Ht.id))})}),Et.id==="pencil"&&m&&i&&w.jsx("div",{ref:re,className:"absolute left-5 rounded-lg shadow-lg p-2 z-20 transition-all duration-300 bg-theme-surface",style:{bottom:`${(ve+1)*30-36+24}px`,opacity:1,transform:"scale(1)",transformOrigin:"left center"},children:w.jsx("div",{className:"flex gap-2 items-center",children:Ne.map((Ht,Rr)=>w.jsx("button",{onClick:()=>qe(Rr),className:`p-1 rounded-md transition-colors ${p===Rr?"bg-blue-100 dark:bg-blue-900":"hover:bg-gray-100 dark:hover:bg-gray-700"}`,children:w.jsx("div",{className:`rounded-full ${p===Rr?"dark:bg-blue-400":"dark:bg-gray-200"}`,style:{width:`${Ht.value}px`,height:`${Ht.value}px`,backgroundColor:`${ce[f].displayColor}`}})},Ht.id))})}),Et.id==="timer"&&u&&i&&w.jsx("div",{ref:se,className:"absolute left-5 rounded-lg shadow-lg p-2 z-20 transition-all duration-300 bg-theme-surface",style:{bottom:`${(Oe+1)*30-175-16+24}px`,opacity:1,transform:"scale(1)",transformOrigin:"left center"},children:w.jsxs("div",{className:"flex flex-col justify-center items-center w-[130px] h-[175px] text-sm text-gray-700 dark:text-gray-200",children:[w.jsx("span",{className:"text-xs font-semibold text-theme-text",children:"Vanishing Tool Timer"}),w.jsx(aLt,{width:120,height:120,min:0,max:(j+V)/1e3,knobRadius:8,value:j/1e3,onChange:async Ht=>{await kt(Ht*1e3,j+V-Ht*1e3)},threshold:(j+V)/1e3-1,showThreshold:!0,valueText:"Display time(s)"}),w.jsx("span",{className:"text-xs font-semibold text-theme-text mt-1",children:"Total duration(s)"}),w.jsx("div",{className:"flex items-center space-x-1 bg-theme-surface",children:w.jsx("input",{type:"number",min:"1",max:"15",value:(j+V)/1e3,onChange:async Ht=>{const Rr=parseInt(Ht.target.value||"1"),ar=Math.min(Math.max(Rr,1),15),Cr=Math.max(ar-j/1e3,1),Xr=ar-Cr;await kt(Xr*1e3,Cr*1e3)},className:"w-[60px] px-2 py-1 border border-gray-300 rounded bg-theme-surface text-theme-text text-sm",id:"uikit-annotation-vanishing-timer-input"})})]})})]},Et.id))})]})}):null},K5e=()=>{const e=E.useContext(Wo),{stream:t}=E.useContext(Ro),r=si(),{isAnnotationStarted:n,isReceivingScreenShare:i}=nr(Ei),a=E.useCallback(u=>{const{status:c}=u;r(vtt(c))},[r]),o=E.useCallback(u=>{const{status:c}=u;r(ytt(c))},[r]),s=E.useCallback(async()=>{if(!n)try{await t?.startAnnotation(),r(rb(!0))}catch(u){console.error("Failed to start annotation:",u)}},[r,n,t]),l=E.useCallback(async u=>{const{isAnnotationEnabled:c}=u;t&&i&&(r(sb(t?.canDoAnnotation())),n&&!c&&(await t?.stopAnnotation(),r(rb(!1)),r(Ux())))},[r,n,i,t]);E.useEffect(()=>(e.on("annotation-undo-status",a),e.on("annotation-redo-status",o),e.on("annotation-viewer-draw-request",s),e.on("annotation-privilege-change",l),()=>{e.off("annotation-undo-status",a),e.off("annotation-redo-status",o),e.off("annotation-viewer-draw-request",s),e.off("annotation-privilege-change",l)}),[e,l,s,o,a])},oLt=e=>{const{isStartShareScreenWithVideoElement:t,isSendingScreenShare:r,isReceivingScreenShare:n,mainContentHeight:i,mainContentWidth:a,isOriginalSize:o}=e,s=E.useRef(null),l=E.useRef(null),u=E.useRef(null),{shareContentDimension:c}=b5e(),[f,p]=E.useState({x:0,y:0});E.useEffect(()=>{const y=Math.min(i*.8,a*.8/16*9),C=y/9*16,T=Math.max(c.width/C,c.height/y);if(r&&s.current){const R=c.height/T,O=c.width/T;s.current.style.width=`${O}px`,s.current.style.height=`${R}px`,l.current.style.height="0px",l.current.style.width="0px"}if(n&&(l.current&&(l.current.style.height=`${y}px`,l.current.style.width=`${y/9*16}px`),u.current)){const R=o?c.height:c.height/T,O=o?c.width:c.width/T;u.current.style.width=`${O}px`,u.current.style.height=`${R}px`}},[n,r,i,a,c,o]);const h=E.useCallback(y=>({display:y?"block":"none",height:y?"100%":0}),[]),g=E.useMemo(()=>{const y=Math.min(i*.8,a*.8/16*9);return{width:y/9*16,height:y}},[i,a]),m=E.useCallback((y,C)=>{let T=C.x,R=C.y;C.x>0&&(T=0),C.x<-(c.width-g.width)&&(T=-(c.width-g.width)),C.y>(c.height-g.height)/2&&(R=(c.height-g.height)/2),C.y<-(c.height-g.height)/2&&(R=-(c.height-g.height)/2),p({x:T,y:R})},[g,c]);return E.useEffect(()=>{p({x:0,y:0})},[o]),t?w.jsxs(w.Fragment,{children:[w.jsx("video",{ref:s,id:"ZOOM_VIDEO_SDK_SELF_SHARE_CANVAS",className:"aspect-[16/9] rounded-[12px]",style:h(r)}),w.jsx("div",{className:`relative overflow-hidden flex items-center rounded-lg ${o?"":"justify-center"}`,ref:l,children:w.jsx(wv,{nodeRef:u,onDrag:m,position:f,disabled:!o,children:w.jsx("canvas",{ref:u,id:"ZOOM_VIDEO_SDK_RECEIVE_SHARE_CANVAS",className:`rounded-[12px] ${o?"cursor-move":"cursor-default"}`,style:h(n)})})})]}):w.jsxs(w.Fragment,{children:[w.jsx("canvas",{ref:s,id:"ZOOM_VIDEO_SDK_SELF_SHARE_CANVAS",className:"aspect-[16/9] rounded-[12px]",style:h(r)}),w.jsx("div",{className:`relative overflow-hidden flex items-center rounded-lg ${o?"":"justify-center"}`,ref:l,children:w.jsx(wv,{nodeRef:u,onDrag:m,position:f,disabled:!o,children:w.jsx("canvas",{ref:u,id:"ZOOM_VIDEO_SDK_RECEIVE_SHARE_CANVAS",className:`rounded-[12px] ${o?"cursor-move":"cursor-default"}`,style:h(n)})})})]})},sLt=({mainContentHeight:e,mainContentWidth:t})=>{const{isSendingScreenShare:r,isReceivingScreenShare:n,userId:i,activeShareId:a,activeSharerName:o}=nr(Ei),{isOriginalShareContentSize:s,canDoAnnotation:l}=nr(Vi),u=E.useMemo(()=>r||n,[n,r]),{stream:c}=E.useContext(Ro),f=!!c?.isStartShareScreenWithVideoElement(),p=E.useRef(null);K5e(),E.useEffect(()=>{if(p.current){const R=Math.min(e*.8,t*.8/16*9);p.current.style.height=`${R}px`,p.current.style.width=`${R/9*16}px`}},[e,t]);const h=E.useMemo(()=>i===a?`${o}'s (myself)`:`${o}'s`,[a,o,i]),[g,m]=E.useState(!1),{featuresOptions:y}=nr(Ei),C=y?.screenshot?.share?.enable,T=E.useCallback(async()=>{if(!(!c||!C||a===void 0)){m(!0);try{const R=await c.screenshotShareView();if(!(R instanceof Blob)){console.error("Screenshot failed:",R);return}const O=URL.createObjectURL(R),N=document.createElement("a");N.href=O,N.download="screenshot.png",N.click(),URL.revokeObjectURL(O)}catch(R){console.error("Screenshot threw",R)}finally{m(!1)}}},[a,C,c]);return w.jsx("div",{className:"m-2 w-full h-full flex items-center justify-center",style:{visibility:u?"visible":"hidden",height:u?"85%":0},children:w.jsxs("div",{ref:p,className:"relative flex items-center justify-center rounded-lg bg-black bg-opacity-50 group",children:[C&&n&&!g&&w.jsx("div",{className:"absolute top-2 right-2 z-30 pointer-events-auto opacity-0 group-hover:opacity-100 transition-opacity",children:w.jsx("button",{onClick:T,className:"bg-gray-800/80 hover:bg-gray-700/90 p-1 rounded-full focus:outline-none focus:ring-2 focus:ring-blue-500",title:"Screenshot share",children:w.jsx(Qse,{size:18,className:"text-white"})})}),w.jsx(oLt,{isStartShareScreenWithVideoElement:f,isSendingScreenShare:r,isReceivingScreenShare:n,mainContentHeight:e,mainContentWidth:t,isOriginalSize:s}),o&&w.jsxs("div",{className:"absolute left-[10px] bottom-[10px] bg-gray-900 bg-opacity-50 rounded flex items-center",children:[w.jsx("div",{className:"text-theme-text-button pl-2 max-w-[250px] truncate",children:w.jsx("span",{children:`${h}`})}),w.jsx("span",{className:"text-theme-text-button px-2",children:"content"})]}),l&&w.jsx($5e,{position:"absolute left-[10px] bottom-[40px] z-10"})]})})},q5e={"180p":1,"360p":2,"720p":3},lLt=({participant:e,bgColor:t,isActiveSpeaker:r,isSpeakerCell:n,debug:i,updateVideoResolution:a})=>{const[o,s]=E.useState(""),[l,u]=E.useState(!1),{userId:c,isHost:f,isManager:p,spotlightUserList:h,networkQualityMap:g}=nr(Ei),{stream:m}=E.useContext(Ro),y=jc(),C=e?.userId===c,T=E.useMemo(()=>r?`${t} rounded-lg aspect-video relative overflow-hidden border-2 border-green-500 ${n?"col-span-2 row-span-2":""}`:`${t} rounded-lg aspect-video relative overflow-hidden ${n?"col-span-2 row-span-2":""}`,[t,r,n]),R=E.useCallback(async(V,z)=>{const q=q5e[z];i&&a&&await a(V,q),s(z)},[i,a]),O=E.useMemo(()=>h.some(V=>V.userId===e?.userId),[e,h]),N=E.useCallback(async()=>{await m?.removeSpotlightedVideo(e?.userId)},[e,m]),k=E.useCallback(V=>V<2?w.jsx(ole,{size:16,className:"text-red-500"}):V<3?w.jsx(sle,{size:16,className:"text-yellow-500"}):w.jsx(lle,{size:16,className:"text-green-500"}),[]),{menuItems:j}=fCe(e,y);return w.jsxs("div",{className:T,onMouseEnter:()=>u(!0),onMouseLeave:()=>{u(!1)},children:[w.jsxs("div",{className:"absolute top-2 w-full px-2 flex justify-between items-center w-10",children:[(f||p)&&O&&w.jsx("button",{className:"bg-black bg-opacity-50 hover:bg-opacity-70 rounded-full px-3 py-1 text-theme-text-button text-sm",onClick:N,children:"Remove spotlight"}),l&&j.length>0&&w.jsx(eC,{menuItems:j,wrapperClass:"bg-blue-500 bg-opacity-90 hover:bg-opacity-70 rounded-full p-1 ml-auto",trigger:w.jsx(jL,{color:"white",size:14}),position:"bottom-start"})]}),w.jsx("div",{className:"absolute bottom-0 left-0 right-0 text-theme-text-button px-2 py-1",children:w.jsxs("div",{className:"flex items-center justify-between",children:[i&&l&&e?.bVideoOn&&!C&&w.jsx("div",{className:"absolute bottom-10 left-0 right-0 bg-gray-900 bg-opacity-75 p-2 bg-black bg-opacity-50",children:w.jsx("div",{className:"flex justify-center space-x-2",children:Object.keys(q5e).map(V=>w.jsx("button",{onClick:()=>R(e?.userId,V),className:`px-2 py-1 text-xs rounded ${o===V?"bg-blue-500 text-white":"bg-gray-700 text-gray-300 hover:bg-gray-600"}`,children:V},V))})}),w.jsxs("div",{className:"flex space-x-1 px-2 py-1 rounded-lg bg-black bg-opacity-50 w-auto max-w-full",children:[w.jsxs("div",{className:"flex items-center space-x-1",children:[e?.bVideoOn&&g[e?.userId]!==void 0&&w.jsx("div",{className:"text-theme-text-button rounded",children:k(g[e?.userId].level)}),e?.audio===""&&w.jsx("div",{className:"text-theme-text-button rounded",children:w.jsx(h_,{size:16,className:"text-red-500"})}),e?.muted===!0&&w.jsx("div",{className:"text-theme-text-button rounded",children:w.jsx(g_,{size:16,className:"text-red-500 fill-red-500 "})}),!e?.bVideoOn&&w.jsx("div",{className:"text-theme-text-button rounded",children:w.jsx(v_,{size:16,className:"text-red-500 fill-red-500"})})]}),w.jsx("span",{className:"text-md pl-1 truncate w-auto",children:e?.displayName}),e?.userId&&i&&w.jsx("div",{className:"text-red-500 text-md",children:e.userId})]})]})})]})},uLt=({isSidePanelOpen:e,mainContentHeight:t})=>{const r=si(),n=E.useRef({}),{isSendingScreenShare:i,isReceivingScreenShare:a,avatarUrl:o,debug:s,activeSpeakerId:l}=nr(Ei),{viewType:u}=nr(Vi),c=nr(vv),f=E.useMemo(()=>i||a,[a,i]),p=E.useMemo(()=>c.isLoading||c.isWhiteboardOpen,[c.isLoading,c.isWhiteboardOpen]),{currentPage:h,totalPages:g,currentParticipants:m,goToNextPage:y,goToPreviousPage:C}=Wxe();jc();const T=E.useMemo(()=>m.filter(q=>q?.bVideoOn),[m]),R=E.useMemo(()=>m.length===1?"grid gap-2 sm:gap-4 justify-center content-center auto-rows-min grid-cols-1":u==="gallery"&&m.length<=4?"grid gap-2 sm:gap-4 justify-center content-center auto-rows-min grid-cols-2":"grid gap-2 sm:gap-4 justify-center content-center auto-rows-min grid-cols-3",[m,u]),O="grid grid-cols-6 gap-4 justify-center content-center",N=E.useMemo(()=>f||p?O:R,[R,f,p]),k=t/9*16;E.useMemo(()=>f||p?40:m.length===1?160:m.length<=4?120:80,[m,f,p]);const j=E.useMemo(()=>u==="speaker"?m.length===1||h===g-1:h===g-1||g===0,[h,m,g,u]);E.useEffect(()=>{r(Nx(0))},[r,f,p]);const V=(q,$)=>{$&&(n.current[`${q}`]=$)},{updateVideoResolution:z}=Qxe(T,n.current);return Gxe(),$xe(),w.jsxs("div",{className:`flex-grow flex items-center justify-between ${es} ${e?"p-4":"p-2"}`,children:[w.jsxs("div",{className:"flex flex-col items-center",style:{visibility:h===0?"hidden":"visible"},children:[w.jsx("button",{onClick:C,disabled:h===0,className:`p-1 rounded-full shadow-md bg-theme-surface text-theme-text hover:bg-theme-background ${h===0?"cursor-not-allowed":""} transition duration-300 ease-in-out`,children:w.jsx(Gse,{size:24})}),w.jsx("span",{className:"text-xs text-theme-text mt-1",children:`${h+1} / ${g}`})]}),w.jsx("div",{className:`flex flex-col items-center ${e?"w-4/5 max-w-4xl":"w-full max-w-full"}`,children:w.jsx("div",{className:"w-full overflow-hidden relative",style:{maxWidth:`${k-50}px`},children:w.jsxs("video-player-container",{children:[w.jsx("div",{className:N,children:m.map((q,$)=>{const Y=u===pl.Speaker&&$===0;return w.jsx("div",{className:q?.bVideoOn?`bg-transparent rounded-lg aspect-video relative overflow-hidden ${Y?"col-span-2 row-span-2":""}`:`bg-neutral-400 rounded-lg aspect-video relative overflow-hidden flex justify-center items-center ${Y?"col-span-2 row-span-2":""}`,children:q?.bVideoOn?w.jsx("div",{children:w.jsx("video-player",{className:"rounded-lg aspect-video relative overflow-hidden",style:{aspectRatio:"16/9"},ref:re=>V(q.userId,re)})}):w.jsx(Z7e,{size:40,color:"#ffffff"})},`${q?.userId}`)})}),w.jsx("div",{className:`${N} absolute top-0 left-0 right-0`,children:m.map((q,$)=>w.jsx(lLt,{participant:q,bgColor:"bg-transparent",isSpeakerCell:u===pl.Speaker&&$===0,isActiveSpeaker:q?.userId===l&&m.length>1,debug:s,updateVideoResolution:z},`${q?.userId}-wrapper`))})]})})}),w.jsxs("div",{className:"flex flex-col items-center",style:{visibility:j?"hidden":"visible"},children:[w.jsx("button",{onClick:y,disabled:j,className:`p-1 rounded-full shadow-md bg-theme-surface text-theme-text hover:bg-theme-background ${h===g-1?"cursor-not-allowed":""} transition duration-300 ease-in-out`,children:w.jsx(Z9,{size:24})}),w.jsx("span",{className:"text-xs text-theme-text mt-1",children:`${h+1} / ${g}`})]})]})},cLt=()=>{const e=Dk(),t=E.useContext(Wo),r=Bk(a=>a.whiteboard),n=Bk(a=>a.session),{whiteboardClient:i}=E.useContext(Xs);E.useEffect(()=>{(async()=>n.status!==ou.Connected||!t||!i||i.isWhiteboardEnabled())()},[t,i,r.status,n.status,n.featuresOptions]),E.useEffect(()=>()=>{e(E5e())},[e])},dLt=(e,t)=>{const r=Dk(),{isLoading:n,isDisableExport:i}=nr(vv);E.useEffect(()=>{if(!e||!t)return;const a=s=>{switch(s){case VA.Pending:r(MO(VA.Pending)),r(pm(!0));break;case VA.InProgress:{r(MO(VA.InProgress)),r(pm(!1)),r(UX(!0));const l=t.getWhiteboardPresenter();r(FX({presenterID:l.userId}));break}case VA.Closed:r(MO(VA.Closed)),r(UX(!1)),r(pm(!1)),r(FX({presenterID:0,docId:"",docName:""}));break}},o=async s=>{const{action:l,userId:u}=s;l==="Start"?await t.startWhiteboardView(document.getElementById(RO),u,{isDisableExport:i}):l==="Stop"&&(await t.stopWhiteboardView(),r(MO(VA.Closed)),r(UX(!1)),r(pm(!1)),r(FX({presenterID:0,docId:"",docName:""})))};try{return e.on("whiteboard-status-change",a),e.on("peer-whiteboard-state-change",o),()=>{e.off("whiteboard-status-change",a),e.off("peer-whiteboard-state-change",o)}}catch{}},[e,r,t,n,i])},fLt=()=>{const{config:{featuresOptions:{whiteboard:{enableExport:e,enableViewerUserExport:t}}}}=nr(Ei),{whiteboardClient:r}=E.useContext(Xs),{participants:n}=nr(W0),i=nr(vv),a=jc(),{openExportDialog:o}=I5e(),s=E.useRef(null),l=a?i.presenterID===a.userId:!1,u=a?i.presenterID!==a.userId:!1,c=a?a.isHost||a.isManager:!1,f=E.useCallback(()=>{o(!1)},[o]),p=async()=>{l&&(e?o(!0):await r.stopWhiteboardScreen())};if(!a)return null;const h=n.find(g=>g.userId===i.presenterID);return w.jsx("div",{className:"fixed z-40",children:w.jsx(wv,{bounds:"body",defaultPosition:{x:(window.innerWidth-400)/2,y:220},nodeRef:s,cancel:".uikit-whiteboard-bar-no-drag",children:w.jsxs("div",{className:"flex items-center gap-2 bg-theme-surface rounded-lg py-2 px-4 shadow-[0_0_15px_rgba(0,0,0,0.2)] bg-opacity-70 backdrop-blur-sm border border-theme-border cursor-move",ref:s,children:[l&&w.jsx(z7e,{size:12,className:"text-green-600 uikit-whiteboard-bar-no-drag"}),w.jsx("div",{className:"flex text-sm font-medium text-theme-text",children:l?w.jsx("span",{children:"You are presenting whiteboard"}):w.jsxs(w.Fragment,{children:[h?.isHost&&w.jsx("span",{className:"text-xs flex items-center",children:w.jsx(r8,{size:10,className:"mr-1"})}),h?.isManager&&w.jsx("span",{className:"text-xs flex items-center",children:w.jsx(FL,{size:10,className:"mr-1"})}),w.jsx("span",{className:"whitespace-nowrap max-w-[150px] truncate",title:h?.displayName||"Unknown",children:h?.displayName||"Unknown"}),w.jsx("span",{children:" 's whiteboard"})]})}),i.docName&&w.jsx("span",{className:"text-xs bg-green-600 text-white px-2 py-1 rounded",children:i.docName}),u&&(t||c&&e)&&w.jsxs("button",{onClick:f,className:"uikit-whiteboard-bar-no-drag rounded-lg bg-green-600 hover:bg-green-700 px-3 py-1 text-xs font-medium text-white flex items-center gap-1 transition-colors border border-green-700 cursor-pointer",children:[w.jsx(A_,{size:12}),w.jsx("span",{children:"Export"})]}),l&&w.jsxs("button",{onClick:p,className:"uikit-whiteboard-bar-no-drag rounded-lg bg-red-600 hover:bg-red-700 px-3 py-1 text-xs font-medium text-white flex items-center gap-1 transition-colors border border-red-700 cursor-pointer",disabled:i.isLoading,children:[w.jsx(Ip,{size:12}),w.jsx("span",{children:"Stop"})]})]})})})},YX=({children:e,isWhiteboardOpen:t})=>w.jsxs("div",{id:RNt,className:"whiteboard-container whiteboard-sdk-css relative inset-0 flex items-center justify-center flex z-10",style:{visibility:t?"visible":"hidden",height:t?"75%":0},children:[e,w.jsx("div",{id:RO,style:{height:"100%",width:"100%",visibility:t?"visible":"hidden"}})]}),ALt=({mainContentHeight:e,mainContentWidth:t})=>{const r=E.useRef(null),n=nr(vv);cLt();const i=jc(),[a,o]=E.useState(!1),s=E.useMemo(()=>n.isLoading||n.isWhiteboardOpen,[n.isLoading,n.isWhiteboardOpen]),l=n.isWhiteboardOpen||n.status===VA.InProgress||n.status===VA.Pending;return E.useEffect(()=>{if(l&&r.current&&!a){const u=r.current;u.style.width="100%",u.style.height="100%",u.style.position="relative",o(!0)}},[l,a]),i?l?w.jsxs(YX,{isWhiteboardOpen:s,children:[n?.error?.errorMessage&&w.jsx("div",{className:"absolute top-4 right-4 bg-red-600 text-white px-3 py-2 rounded-lg z-20",children:w.jsxs("div",{className:"text-sm",children:["Error: ",n?.error?.errorMessage]})}),n.isLoading&&!n?.error?.errorMessage&&w.jsx("div",{className:"absolute inset-0 bg-black bg-opacity-50 flex items-center justify-center z-30",children:w.jsxs("div",{className:"bg-white rounded-lg p-6 flex flex-col items-center",children:[w.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600 mb-3"}),w.jsx("div",{className:"text-gray-700",children:"Loading Whiteboard..."})]})}),n.isExporting&&w.jsx("div",{className:"absolute inset-0 bg-black bg-opacity-50 flex items-center justify-center z-30",children:w.jsxs("div",{className:"bg-white rounded-lg p-6 flex flex-col items-center",children:[w.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600 mb-3"}),w.jsx("div",{className:"text-gray-700",children:"Exporting Whiteboard..."})]})})]}):w.jsx(YX,{isWhiteboardOpen:s,children:null}):w.jsx(YX,{isWhiteboardOpen:s,children:null})},hLt=`${b0}/av/chrome-operation.jpg`,pLt=`${b0}/av/safari-operation1.png`,gLt=`${b0}/av/safari-operation2.png`,mLt=`${b0}/av/ios/ios-permission-ask.png`,vLt=`${b0}/av/android/android-permission-ask.png`,yLt=`${b0}/av/android/android-permission-1.png`,bLt=`${b0}/av/android/android-permission-2.png`,wLt=`${b0}/av/android/android-permission-3.png`,JX=({open:e,handleClose:t})=>{const{t:r}=Ym();return e?w.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center text-black ",children:w.jsxs("div",{className:"bg-white rounded-lg max-w-md w-full",children:[w.jsxs("div",{className:"flex justify-between items-center border-b p-4",children:[w.jsx("h2",{className:"text-lg font-semibold",children:r("how_to_allow")}),w.jsx("button",{onClick:t,className:"text-gray-500 hover:text-gray-700",children:w.jsx("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),w.jsxs("div",{className:"p-4 max-h-[70vh] overflow-y-auto uikit-custom-scrollbar",children:[!Hl()&&w.jsxs(w.Fragment,{children:[w.jsxs("p",{className:"mb-2",children:["1. ",r("click_address_bar")]}),w.jsxs("p",{className:"mb-2",children:["2. ",r("click_microphone_camera_option")]}),w.jsxs("p",{className:"mb-4",children:["3. ",r("select_allow")]})]}),!Hl()&&EQe()&&w.jsx("img",{src:hLt,className:"w-full h-auto",alt:"permission instruction"}),!Hl()&&O8()&&w.jsxs(w.Fragment,{children:[w.jsx("img",{src:pLt,className:"w-full h-auto",alt:"permission instruction"}),w.jsx("img",{src:gLt,className:"w-full h-auto",alt:"permission instruction"})]}),Hl()&&yNt()&&w.jsxs(w.Fragment,{children:[w.jsx("p",{className:"mb-2",children:"1. Allow when asked for microphone and camera access"}),w.jsx("img",{src:vLt,className:"w-full h-auto",alt:"permission instruction"}),w.jsx("p",{className:"mb-2",children:"2. If not allowed, go to Settings and allow access"}),w.jsx("img",{src:yLt,className:"w-full h-auto",alt:"permission instruction"}),w.jsx("img",{src:bLt,className:"w-full h-auto",alt:"permission instruction"}),w.jsx("img",{src:wLt,className:"w-full h-auto",alt:"permission instruction"})]}),Hl()&&O8()&&w.jsx(w.Fragment,{children:w.jsx("img",{src:mLt,className:"w-full h-auto",alt:"permission instruction"})})]})]})}):null},SLt=e=>E.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},E.createElement("path",{d:"M5 1C4.44772 1 4 1.44772 4 2C4 2.55228 4.44772 3 5 3C5.55228 3 6 2.55228 6 2C6 1.44772 5.55228 1 5 1Z",fill:"currentColor",fillOpacity:.6}),E.createElement("path",{d:"M11 1C10.4477 1 10 1.44772 10 2C10 2.55228 10.4477 3 11 3C11.5523 3 12 2.55228 12 2C12 1.44772 11.5523 1 11 1Z",fill:"currentColor",fillOpacity:.6}),E.createElement("path",{d:"M4 6C4 5.44772 4.44772 5 5 5C5.55228 5 6 5.44772 6 6C6 6.55228 5.55228 7 5 7C4.44772 7 4 6.55228 4 6Z",fill:"currentColor",fillOpacity:.6}),E.createElement("path",{d:"M11 5C10.4477 5 10 5.44772 10 6C10 6.55228 10.4477 7 11 7C11.5523 7 12 6.55228 12 6C12 5.44772 11.5523 5 11 5Z",fill:"currentColor",fillOpacity:.6}),E.createElement("path",{d:"M4 10C4 9.44771 4.44772 9 5 9C5.55228 9 6 9.44771 6 10C6 10.5523 5.55228 11 5 11C4.44772 11 4 10.5523 4 10Z",fill:"currentColor",fillOpacity:.6}),E.createElement("path",{d:"M5 13C4.44772 13 4 13.4477 4 14C4 14.5523 4.44772 15 5 15C5.55228 15 6 14.5523 6 14C6 13.4477 5.55228 13 5 13Z",fill:"currentColor",fillOpacity:.6}),E.createElement("path",{d:"M10 10C10 9.44771 10.4477 9 11 9C11.5523 9 12 9.44771 12 10C12 10.5523 11.5523 11 11 11C10.4477 11 10 10.5523 10 10Z",fill:"currentColor",fillOpacity:.6}),E.createElement("path",{d:"M11 13C10.4477 13 10 13.4477 10 14C10 14.5523 10.4477 15 11 15C11.5523 15 12 14.5523 12 14C12 13.4477 11.5523 13 11 13Z",fill:"currentColor",fillOpacity:.6})),CLt=(e,t)=>{const[r,n]=E.useState({x:0,y:0}),[i,a]=E.useState(!1),[o,s]=E.useState({x:0,y:0}),[l,u]=E.useState({width:0,height:0}),[c,f]=E.useState({width:0,height:0});E.useEffect(()=>{const m=()=>{if(e.current){const y=e.current.offsetWidth,C=e.current.offsetHeight,T=window.innerWidth,R=window.innerHeight;u({width:T,height:R}),f({width:y,height:C}),n({x:t?.x||(T-y)/2,y:t?.y||(R-C)/2})}};return m(),window.addEventListener("resize",m),()=>window.removeEventListener("resize",m)},[e,t]);const p=m=>{a(!0),s({x:m.clientX-r.x,y:m.clientY-r.y})},h=E.useCallback(m=>{if(i){let y=m.clientX-o.x,C=m.clientY-o.y;y<0?y=0:y>l.width-c.width&&(y=l.width-c.width),C<0?C=0:C>l.height-c.height&&(C=l.height-c.height),n({x:y,y:C})}},[o,i,l,c]),g=()=>{a(!1)};return E.useEffect(()=>(document.addEventListener("mousemove",h),document.addEventListener("mouseup",g),()=>{document.removeEventListener("mousemove",h),document.removeEventListener("mouseup",g)}),[h,i]),{position:r,handleMouseDown:p}},ELt=()=>{const{stream:e}=E.useContext(Ro),{isScreenSharePaused:t,isEnableViewerAnnotation:r,sharePrivilege:n}=nr(Ei),i=si(),[a,o]=E.useState(!1),[s,l]=E.useState(!1),u=E.useRef(null),{canDoAnnotation:c}=nr(Vi),{toggleScreenShare:f}=TO(),{position:p,handleMouseDown:h}=CLt(u,{y:100}),g=E.useCallback(async()=>{if(e)try{t?(await e.resumeShareScreen(),i(mR(!1))):(await e.pauseShareScreen(),i(mR(!0)))}catch(O){console.warn(O)}},[i,t,e]),m=E.useCallback(async()=>{e&&(s?(await e.enableOptimizeForSharedVideo(!1),l(e.isOptimizeForSharedVideoEnabled())):(await e.enableOptimizeForSharedVideo(!0),l(e.isOptimizeForSharedVideoEnabled())))},[s,e]),y=E.useCallback(async()=>{await e?.changeAnnotationPrivilege(!r),i(Tet(!r))},[i,r,e]);E.useEffect(()=>{e&&o(e.isSupportOptimizedForSharedVideo())},[e]);const C=t?"You screen sharing is paused":"You're screen sharing",T="Stop sharing",R=t?"bg-blue-500 hover:bg-blue-600 text-theme-text-button py-2 px-4 rounded-lg text-sm":"bg-gray-200 hover:bg-gray-300 text-gray-800 py-2 px-4 rounded-lg text-sm";return C_.createPortal(w.jsx("div",{className:"zoom-ui-toolkit-root",children:w.jsxs("div",{className:"fixed flex items-center justify-between bg-theme-background rounded-lg shadow-lg p-2 w-[650px] z-50",id:"screen-share-bar",ref:u,style:{left:`${p.x}px`,top:`${p.y}px`},children:[w.jsxs("div",{className:"flex items-center space-x-3",children:[w.jsx("button",{className:"text-gray-600 hover:text-gray-800 p-1 cursor-move",onMouseDown:h,children:w.jsx("svg",{className:"w-4 h-4 text-theme-text",children:w.jsx(SLt,{})})}),w.jsx("span",{className:"text-sm font-semibold text-theme-text",id:"share-bar-text",children:C})]}),w.jsxs("div",{className:"flex space-x-2 items-center",children:[e?.isSupportOptimizedForSharedVideo()&&n!==vue.MultipleShare&&w.jsxs("div",{className:"flex space-x-2 items-center text-sm text-gray-700",children:[w.jsx("input",{type:"checkbox",name:"optimize video",id:"share-bar-optimize-video",checked:s,onChange:m,disabled:t}),w.jsx("label",{htmlFor:"optimize video",className:"text-theme-text",children:"Optimize video"})]}),c&&w.jsx("button",{onClick:y,className:`relative w-12 h-8 rounded-full transition-colors duration-100 ${r?"bg-green-200":"bg-gray-300"}`,children:w.jsx("div",{className:`absolute top-0 left-0 w-8 h-8 rounded-full shadow-md flex items-center justify-center transform transition-transform duration-100 text-theme-text ${r?"translate-x-4 bg-green-500 hover:bg-green-600":"translate-x-0 bg-gray-300 hover:bg-gray-400"}`,style:{boxShadow:r?"-4px 0 8px rgba(0, 0, 0, 0.25)":"4px 0 8px rgba(0, 0, 0, 0.25)"},children:r?w.jsx(ile,{size:15}):w.jsx(F7e,{size:15})})}),w.jsx("button",{className:R,onClick:g,id:"pause-screen-share-btn",children:t?w.jsx(V7e,{size:20}):w.jsx(o8,{size:20})}),w.jsx("button",{className:"bg-red-500 hover:bg-red-600 text-theme-text-button py-2 px-4 rounded-lg text-sm",id:"stop-screen-share-btn",onClick:()=>f(),children:T})]})]})}),document.body)},Y5e={Unmute:"Unmute",Spotlight:"Spotlight"};function xLt(){const e=E.useContext(Wo),t=si(),{isStartedAudio:r}=nr(Ei),n="The host would like you to unmute",i="Unmute",a="Stay muted",[o,s]=E.useState(n),[l,u]=E.useState(""),[c,f]=E.useState(""),[p,h]=E.useState(i),[g,m]=E.useState(a),y=E.useCallback(C=>{switch(C?.reason){case Y5e.Unmute:u("");break;case Y5e.Spotlight:r?(u("The host has spotlighted your video for everyone. Would you like to unmute your microphone to speak?"),h("Unmute myself")):(u("The host has spotlighted your video for everyone. Would you like to join audio to speak?"),h("Join Audio")),m("Later");break;default:s("The host would like you to unmute"),h("Unmute"),m("Stay muted")}t(gG(!0))},[t,r]);return E.useEffect(()=>(e.on("host-ask-unmute-audio",y),()=>{e.off("host-ask-unmute-audio",y)}),[e,y]),{title:o,content:l,content2:c,okText:p,cancelText:g}}const $6=({isOpen:e,onClose:t,width:r=400,height:n=250,children:i,timeout:a,icon:o,allowClose:s=!1,id:l})=>{const[u,c]=E.useState(a),f=E.useRef(null);if(E.useEffect(()=>{let h;return e&&a&&(c(a),h=setInterval(()=>{c(g=>g<=1e3?(clearInterval(h),t(),0):g-1e3)},1e3)),()=>{h&&clearInterval(h)}},[e,a,t]),E.useEffect(()=>{const h=g=>{if(g.key==="Tab"&&f.current){const m=f.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),y=m[0],C=m[m.length-1];g.shiftKey?document.activeElement===y&&(C.focus(),g.preventDefault()):document.activeElement===C&&(y.focus(),g.preventDefault())}};return document.addEventListener("keydown",h),()=>{document.removeEventListener("keydown",h)}},[e]),E.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),!e)return null;const p=()=>{const h={width:`min(${r}px, calc(100vw - 2rem))`,maxWidth:"min(90vw, 600px)",maxHeight:"calc(100vh - 4rem)",wordWrap:"break-word",overflowWrap:"break-word"};return n==="auto"?{...h,minHeight:"180px"}:{...h,height:typeof n=="number"?`${n}px`:n}};return w.jsx("div",{ref:f,className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50 p-4",onMouseDown:h=>h.target===f.current&&s&&t(),children:w.jsxs("div",{className:"rounded-lg shadow-lg relative bg-theme-surface border-solid border overflow-hidden w-full",id:l,style:p(),children:[s&&w.jsx("button",{onClick:t,className:"absolute top-2 right-2 z-10",children:w.jsx(Ip,{size:20})}),w.jsxs("div",{className:"p-4 sm:p-6 flex h-full min-h-0 overflow-hidden",children:[o&&w.jsx(o,{className:"text-orange-500 mr-3 sm:mr-4 flex-shrink-0 mt-1",size:24}),w.jsx("div",{className:"flex-grow ml-2 min-h-0 flex flex-col w-full overflow-hidden",children:i})]}),a&&w.jsxs("div",{className:"absolute bottom-2 left-2 text-xs ",children:["Closing in ",Math.ceil(u/1e3),"s"]})]})})},J5e=()=>{const{isShowUnmuteConsent:e}=nr(Vi),{title:t,content:r,content2:n,okText:i,cancelText:a}=xLt(),o=si(),s=NX(),l=async()=>{await s(),o(gG(!1))},u=()=>{o(gG(!1))};return w.jsx($6,{isOpen:e,onClose:u,width:400,height:200,children:w.jsxs("div",{className:"flex flex-col h-full justify-center space-y-4 pt-8",children:[w.jsx("h2",{className:"text-lg font-semibold text-theme-text",children:t}),w.jsx("p",{className:"text-sm text-theme-text",children:r}),n&&w.jsx("p",{className:"text-sm text-theme-text",children:n}),w.jsxs("div",{className:"flex justify-end space-x-2 mt-2",children:[w.jsx("button",{className:"px-4 py-2 text-theme-text bg-theme-background rounded hover:bg-theme-background-hover transition-colors border border-theme-border",onClick:u,children:a}),w.jsx("button",{className:"px-4 py-2 bg-blue-600 text-theme-text-button rounded hover:bg-blue-700 transition-colors border border-theme-border",onClick:l,children:i})]})]})})},ILt=()=>{const{isHost:e,isManager:t,recordingStatus:r}=nr(Ei),{hasShowRecordingAlert:n}=nr(Vi),{recordingClient:i}=E.useContext(Xs),a=e||t,o=r===Od.Recording,s=r===Od.Paused,l=E.useMemo(()=>a&&!o&&!s,[a,s,o]),u=E.useMemo(()=>a&&o,[a,o]),c=E.useMemo(()=>a&&s,[a,s]),f=E.useMemo(()=>a&&(o||s),[a,s,o]),p=E.useMemo(()=>[u&&{text:"Pause Recording",onClick:()=>i?.pauseCloudRecording()},c&&{text:"Resume Recording",onClick:()=>i?.startCloudRecording()},f&&{text:"Stop Recording",onClick:()=>i?.stopCloudRecording()}].filter(Boolean),[u,c,f,i]);return{isShowRecordButton:l,isShowPauseRecording:u,isShowResumeRecording:c,isShowStopRecording:f,recordingControlsMenu:p}},X5e=()=>{const[e,t]=E.useState(!1),r=E.useRef(null),{recordingStatus:n,hasPreconsented:i,isHost:a,isManager:o}=nr(Ei),{hasShowRecordingAlert:s}=nr(Vi),{isShowRecordButton:l}=ILt(),u=si(),c=E.useContext(Wo),f=n===Od.Recording,p=a||o;E.useEffect(()=>(r.current=setTimeout(()=>{t(!0)},1e3),()=>{r.current&&clearTimeout(r.current)}),[]);const h=e&&(i||s)&&f&&!l&&!p,g=E.useCallback(()=>{u(iCe(!1))},[u]),m=E.useCallback(()=>{c?.leave(!1)},[c]);return h?w.jsx(TA,{title:"This meeting is being recorded",message:"By staying in the meeting, you consent to being recorded. After the meeting ends, the recording file will be sent to the meeting host and participants who have recording permissions.",icon:w.jsx(t8,{size:26,className:"text-red-500 drop-shadow-sm",strokeWidth:1.5}),iconClassName:"bg-red-50 dark:bg-red-950/30",onCancel:m,cancelText:"Leave",cancelVariant:"secondary",onConfirm:g,confirmText:"Stay",confirmVariant:"primary",id:"uikit-recording-notification"}):null},TLt=()=>{const e=si(),{isShowShareScreenToSubsessionModal:t,shareScreenToSubsessionDontShowAgain:r}=nr(Vi),{startScreenShare:n}=TO(),{stream:i}=E.useContext(Ro),a=()=>{e(sCe(!1))},o=async()=>{await n(!0),e(sb(i?.canDoAnnotation())),a()},s=l=>{e(htt(l.target.checked))};return w.jsx($6,{isOpen:t,onClose:a,width:480,height:"auto",allowClose:!0,children:w.jsxs("div",{className:`space-y-4 ${DQe} text-theme-text`,children:[w.jsx("h2",{className:"text-lg font-semibold text-theme-text",children:"Share screen to all subsessions"}),w.jsxs("ul",{className:"space-y-3 list-disc pl-5 ",children:[w.jsx("li",{children:"Your screen will be shared in the main session and in all subsessions"}),w.jsx("li",{children:"Your video and audio will not be shared with subsessions"}),w.jsx("li",{children:"Screens that others are sharing in the rooms will be stopped"})]}),w.jsxs("div",{className:"flex items-center justify-between mt-4",children:[w.jsxs("div",{className:"flex items-center ",children:[w.jsx("input",{type:"checkbox",id:"dontShowAgain",checked:r,onChange:s,className:"mr-2"}),w.jsx("label",{htmlFor:"dontShowAgain",className:"select-none",children:"Don't show this again"})]}),w.jsxs("div",{className:"flex space-x-2",children:[w.jsx("button",{onClick:a,className:"px-4 py-2 rounded border border-theme-border text-theme-text hover:bg-theme-background",children:"Cancel"}),w.jsx("button",{onClick:o,className:"px-4 py-2 rounded bg-blue-600 text-theme-text-button hover:bg-blue-700 border border-theme-border",children:"Share"})]})]})]})})},Z5e=({type:e,onPermissionChange:t,onPromptDismiss:r,onPromptAction:n,className:i="",style:a})=>{const o=E.useRef(null);return E.useEffect(()=>{const s=o.current;if(!s)return;const l=()=>{r?.()},u=async()=>{if(n?.(),t)try{const c=await s.permissionStatus;c&&t(c.state)}catch(c){console.error("Error querying permission status:",c)}};return s.addEventListener("promptdismiss",l),s.addEventListener("promptaction",u),()=>{s.removeEventListener("promptdismiss",l),s.removeEventListener("promptaction",u)}},[e,t,r,n]),w.jsx("permission",{ref:o,type:e,className:i,style:a})},_Lt=({isOpen:e,onClose:t,onConsent:r,title:n="Do you want people to see you in the session?",subtitle:i="You can still turn off your microphone and camera anytime in the session"})=>{const[a,o]=E.useState({camera:{state:"prompt"},microphone:{state:"prompt"}}),[s,l]=E.useState(!1),u=E.useCallback(async()=>{try{const y=await navigator.permissions.query({name:"camera"}),C=await navigator.permissions.query({name:"microphone"});o({camera:{state:y.state},microphone:{state:C.state}}),y.addEventListener("change",()=>{o(T=>({...T,camera:{state:y.state}}))}),C.addEventListener("change",()=>{o(T=>({...T,microphone:{state:C.state}}))})}catch(y){console.warn("Failed to check PEPC permission status:",y)}},[]);E.useEffect(()=>{e&&u()},[e,u]),E.useEffect(()=>{e&&a.camera.state==="granted"&&a.microphone.state==="granted"&&l(!0)},[e,a]);const c=()=>{r({camera:!1,microphone:!1})},f=()=>{r({camera:!0,microphone:!0})},p=()=>{r({camera:!1,microphone:!1})},h=w.jsxs("div",{className:"flex flex-col h-full justify-between bg-theme-surface p-1",children:[w.jsxs("div",{className:"space-y-3",children:[w.jsx("h2",{className:"text-xl font-medium text-theme-text",id:"uikit-join-audio-consent-title",children:"Enable Audio"}),w.jsx("p",{className:"leading-relaxed text-theme-text",id:"uikit-join-audio-consent-content",children:"Would you like to enable audio for this session?"})]}),w.jsxs("div",{className:"flex justify-end space-x-3",children:[w.jsx("button",{className:"px-5 py-2 text-sm font-medium rounded-lg transition-colors duration-200 hover:bg-theme-background text-theme-text border border-theme-border",onClick:p,id:"uikit-join-audio-consent-not-now",children:"Not Now"}),w.jsx("button",{className:"px-4 py-2 bg-blue-600 text-theme-text-button rounded hover:bg-blue-700 transition-colors",onClick:f,id:"uikit-join-audio-consent-enable",autoFocus:!0,children:"Enable"})]})]}),g=w.jsxs("div",{className:"space-y-6",children:[w.jsx("div",{className:"text-center space-y-4",children:w.jsxs("div",{children:[w.jsx("h3",{className:"text-lg font-semibold text-theme-text mb-2",children:n}),w.jsx("p",{className:"text-sm text-theme-text leading-relaxed opacity-75",children:i})]})}),w.jsx("div",{className:"border-t border-theme-divider"}),w.jsxs("div",{className:"space-y-3",children:[w.jsx("h4",{className:"text-xs font-medium text-theme-text opacity-60 uppercase tracking-wider",children:"Current Permissions"}),w.jsxs("div",{className:"space-y-3",children:[w.jsxs("div",{className:"flex items-center justify-between p-4 bg-theme-surface-elevated rounded-xl border border-theme-divider shadow-sm",children:[w.jsxs("div",{className:"flex items-center space-x-3",children:[w.jsx("div",{className:"flex items-center justify-center w-10 h-10 bg-blue-500 bg-opacity-15 rounded-lg",children:w.jsx("svg",{className:"w-5 h-5 text-blue-600 dark:text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})})}),w.jsx("span",{className:"text-sm font-medium text-theme-text",children:"Camera"})]}),w.jsx("span",{className:"px-3 py-1 text-xs font-medium bg-orange-500 bg-opacity-20 text-orange-600 dark:text-orange-400 rounded capitalize",children:a.camera.state})]}),w.jsxs("div",{className:"flex items-center justify-between p-4 bg-theme-surface-elevated rounded-xl border border-theme-divider shadow-sm",children:[w.jsxs("div",{className:"flex items-center space-x-3",children:[w.jsx("div",{className:"flex items-center justify-center w-10 h-10 bg-blue-500 bg-opacity-15 rounded-lg",children:w.jsx("svg",{className:"w-5 h-5 text-blue-600 dark:text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11a7 7 0 01-7 7m0 0a7 7 0 01-7-7m7 7v4m0 0H8m4 0h4m-4-8a3 3 0 01-3-3V5a3 3 0 116 0v6a3 3 0 01-3 3z"})})}),w.jsx("span",{className:"text-sm font-medium text-theme-text",children:"Microphone"})]}),w.jsx("span",{className:"px-3 py-1 text-xs font-medium bg-orange-500 bg-opacity-20 text-orange-600 dark:text-orange-400 rounded capitalize",children:a.microphone.state})]})]})]}),w.jsxs("div",{className:"space-y-3",children:[w.jsx("div",{className:"space-y-2",children:w.jsx(Z5e,{type:"camera microphone",onPermissionChange:y=>{y==="granted"&&l(!0)},style:{width:"100%",backgroundColor:"rgb(37, 99, 235)",color:"rgb(255, 255, 255)",padding:"12px 16px",borderRadius:"8px",fontWeight:"500",fontSize:"14px",border:"1px solid rgb(37, 99, 235)"}})}),w.jsx("button",{onClick:c,className:"w-full px-4 py-2 bg-theme-surface-elevated border border-theme-divider text-blue-600 dark:text-blue-400 hover:bg-theme-background rounded-lg font-medium transition-colors",children:"Continue without microphone and camera"})]}),w.jsx("div",{className:"text-xs text-theme-text opacity-60 text-center",children:w.jsx("p",{children:"Permissions granted will last for this browser session and can be revoked anytime."})})]}),m=s?h:g;return w.jsx($6,{isOpen:e,onClose:()=>{},allowClose:!1,width:s?360:450,height:s?190:"auto",children:m})},ePe=()=>{const{isShowJoinAudioConsent:e,isAudioConsentInitialized:t,previewStatus:{isAudioOn:r,isCheckedPEPC:n,isMicMuted:i}}=nr(Vi),{featuresOptions:{audio:{joinAudioConsent:a,muteEntry:o}}}=nr(Ei),s=si(),l=NX(),[u,c]=E.useState(!1);E.useEffect(()=>{!t&&!r&&a!==e&&(s(Px(a)),s(Att(!0)))},[t,r,a,e,s]),E.useEffect(()=>{const g=async()=>{const m=await DX();c(m)};e&&(R8(),g())},[e]);const f=async g=>{g.microphone&&(i?await l():await l(o)),s(Px(!1))},p=async()=>{await l(o),s(Px(!1))},h=()=>{s(Px(!1))};return e?u&&!n?w.jsx(_Lt,{isOpen:e,onClose:h,onConsent:f}):w.jsx($6,{isOpen:e,onClose:()=>{},allowClose:!1,width:360,height:190,children:w.jsxs("div",{className:"flex flex-col h-full justify-between bg-theme-surface p-1",children:[w.jsxs("div",{className:"space-y-3",children:[w.jsx("h2",{className:"text-xl font-medium text-theme-text",id:"uikit-join-audio-consent-title",children:"Enable Audio"}),w.jsx("p",{className:"leading-relaxed text-theme-text",id:"uikit-join-audio-consent-content",children:"Would you like to enable audio for this session?"})]}),w.jsxs("div",{className:"flex justify-end space-x-3",children:[w.jsx("button",{className:"px-5 py-2 text-sm font-medium rounded-lg transition-colors duration-200 hover:bg-theme-background text-theme-text border border-theme-border",onClick:h,id:"uikit-join-audio-consent-not-now",children:"Not Now"}),w.jsx("button",{className:"px-4 py-2 bg-blue-600 text-theme-text-button rounded hover:bg-blue-700 transition-colors",onClick:p,id:"uikit-join-audio-consent-enable",autoFocus:!0,children:"Enable"})]})]})}):null},BO=({label:e,className:t="",...r})=>w.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[w.jsx("input",{type:"checkbox",className:`form-checkbox h-5 w-5 bg-theme-surface text-blue-600 transition duration-150 ease-in-out ${t}`,...r}),w.jsx("span",{className:"text-theme-text w-[95%]",children:e})]}),K6=({label:e,className:t="",disableAutofill:r,...n})=>{const i=r?{autoComplete:"off"}:{};return w.jsxs("div",{className:"flex flex-col space-y-1",children:[e&&w.jsx("label",{className:"text-sm font-medium text-theme-text",children:e}),w.jsx("input",{className:`form-input px-3 py-2 border border-theme-border bg-theme-background rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 ${t}`,...i,...n})]})},QC=({themeName:e})=>({menu:t=>({...t,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",position:"absolute",zIndex:9999,width:"100%",color:e==="dark"?"gray":"black"}),menuPortal:t=>({...t,zIndex:9999})}),RLt=({isOpen:e,onClose:t,themeName:r})=>{const n=E.useRef(null),[i,a]=E.useState(!1),{subsessionOptions:o,subsessionType:s}=nr(zp),l=si(),[u,c]=E.useState({isBackToMainSessionEnabled:o.isBackToMainSessionEnabled,isAutoJoinSubsession:o.isAutoJoinSubsession,isAutoMoveBackToMainSession:o.isAutoMoveBackToMainSession,isTimerAutoEnabled:o.isTimerAutoEnabled,timerDuration:o.timerDuration,waitSeconds:o.waitSeconds}),f=y=>{c({...u,[y]:!u[y]}),l(_O({...o,[y]:!u[y]}))},p=(y,C)=>{c({...u,[y]:C}),l(_O({...o,[y]:C}))},g=ER({callback:y=>{y&&t(!1)},excludeRefs:[n]}),m=[{value:30,label:"30 seconds"},{value:60,label:"60 seconds"},{value:90,label:"90 seconds"}];return e?w.jsx("div",{className:"absolute flex bottom-10 text-theme-text sm:justify-center space-x-2 w-full p-4 left-0 bg-theme-surface border border-theme-border rounded-md shadow-lg",ref:g,title:"Subsession Rooms Settings",id:"uikit-subsession-rooms-settings-dialog",children:w.jsxs("div",{className:"space-y-4",children:[w.jsx(BO,{checked:u.isBackToMainSessionEnabled,onChange:()=>f("isBackToMainSessionEnabled"),label:"Allow participants to return to the main session at any time",id:"uikit-subsession-rooms-settings-dialog-back-to-main-session-checkbox"}),w.jsx(BO,{checked:u.isAutoJoinSubsession,onChange:()=>f("isAutoJoinSubsession"),label:"Automatically move all assigned participants into subsession rooms",id:"uikit-subsession-rooms-settings-dialog-auto-join-subsession-checkbox"}),w.jsx(BO,{checked:u.isAutoMoveBackToMainSession,onChange:()=>f("isAutoMoveBackToMainSession"),label:"Automatically move all selected participants in subsession rooms to main meeting",id:"uikit-subsession-rooms-settings-dialog-auto-move-back-to-main-session-checkbox"}),w.jsxs("div",{className:"flex items-center space-x-2",children:[w.jsx(BO,{checked:u.isTimerAutoEnabled,onChange:()=>f("isTimerAutoEnabled"),label:"Auto close subsession rooms after",id:"uikit-subsession-rooms-settings-dialog-auto-close-subsession-rooms-checkbox"}),w.jsx(K6,{type:"number",value:u.timerDuration,onChange:y=>p("timerDuration",y.target.value),className:"w-20",id:"uikit-subsession-rooms-settings-dialog-auto-close-subsession-rooms-input"}),w.jsx("span",{children:"minutes"})]}),w.jsx(BO,{checked:u.waitSeconds!==0,onChange:({target:y})=>{p("waitSeconds",y.checked?30:0)},label:"Countdown after closing subsession room",id:"uikit-subsession-rooms-settings-dialog-countdown-after-closing-subsession-room-checkbox"}),u.waitSeconds!==0&&w.jsxs("div",{className:"flex items-center space-x-2 ml-6",children:[w.jsx("span",{children:"Set Countdown timer"}),w.jsx(im,{value:m.find(y=>y.value===u.waitSeconds),onChange:y=>p("waitSeconds",y.value),options:m,className:"w-40",classNamePrefix:"react-select",id:"uikit-subsession-rooms-settings-dialog-countdown-after-closing-subsession-room-select",styles:QC({themeName:r})})]})]})}):null},MLt=({isOpen:e,onClose:t,initialRoomCount:r,onSubmit:n,subsessionType:i})=>{const[a,o]=E.useState(r),[s,l]=E.useState(i);if(!e)return null;const u=()=>{n(a,s)};return w.jsxs(w.Fragment,{children:[w.jsxs("div",{className:"p-6 space-y-6 text-lg",children:[w.jsxs("div",{className:"flex items-center space-x-2",children:[w.jsx("span",{className:"text-xl font-semibold",children:"Create"}),w.jsx("input",{type:"number",min:"1",max:"100",value:a,onChange:c=>{const f=parseInt(c.target.value);o(Math.min(Math.max(f,1),100))},className:"w-16 px-2 py-1 border border-gray-300 rounded bg-theme-background",id:"uikit-subsession-choice-room-count-input"}),w.jsx("span",{className:"text-xl font-semibold",children:"subsession rooms"})]}),w.jsxs("div",{className:"space-y-2",children:[w.jsxs("label",{className:"flex items-center space-x-2",children:[w.jsx("input",{type:"radio",name:"assignment",value:$d.Automatically,checked:s===$d.Automatically,onChange:()=>l($d.Automatically),id:"uikit-subsession-choice-automatically-radio"}),w.jsx("span",{children:"Assign automatically"})]}),w.jsxs("label",{className:"flex items-center space-x-2",children:[w.jsx("input",{type:"radio",name:"assignment",value:$d.Manually,checked:s===$d.Manually,onChange:()=>l($d.Manually),id:"uikit-subsession-choice-manually-radio"}),w.jsx("span",{children:"Assign manually"})]}),w.jsxs("label",{className:"flex items-center space-x-2",children:[w.jsx("input",{type:"radio",name:"assignment",value:$d.SelfSelect,checked:s===$d.SelfSelect,onChange:()=>l($d.SelfSelect),id:"uikit-subsession-choice-self-select-radio"}),w.jsx("span",{children:"Let participants choose subsession room"})]})]})]}),w.jsxs("div",{className:"absolute bottom-4 right-4 space-x-2",children:[w.jsx(Po,{variant:"secondary",onClick:t,id:"uikit-subsession-choice-cancel-button",children:"Cancel"}),w.jsx(Po,{variant:"primary",onClick:u,id:"uikit-subsession-choice-create-button",children:"Create"})]})]})},OLt=({isOpen:e,onClose:t,onConfirm:r,roomName:n,action:i})=>{const a=E.useRef(null);return E.useEffect(()=>{const o=s=>{a.current&&!a.current.contains(s.target)&&t()};return e&&document.addEventListener("mousedown",o),()=>{document.removeEventListener("mousedown",o)}},[e,t]),e?w.jsxs("div",{ref:a,className:"relative right-0 border border-gray-200 rounded-md shadow-lg p-4 z-10 w-full justify-center",children:[w.jsxs("p",{className:"mb-4",children:[i," ",n,"?"]}),w.jsxs("div",{className:"flex justify-end space-x-2",children:[w.jsx(Po,{variant:"outline",size:"sm",onClick:t,id:"uikit-subsession-room-confirm-cancel-button",children:"Cancel"}),w.jsx(Po,{variant:"primary",size:"sm",onClick:r,id:"uikit-subsession-room-confirm-confirm-button",children:i})]})]}):null},tPe=({id:e,title:t,onClose:r,options:n,onAssign:i,isMulti:a=!1,placeholder:o="Select an option",noOptionsMessage:s="No options available",themeName:l="light"})=>{const[u,c]=E.useState(null),f=E.useRef(null),p=E.useRef(null),h=ER({callback:()=>{},excludeRefs:[f,p]}),g=()=>{u&&(i(u),r())};return w.jsx("div",{ref:h,className:"fixed m-0 w-full h-full rounded-lg inset-0 backdrop-blur-sm flex items-center justify-center z-50 border-solid border border-theme-border ",style:{marginLeft:0},children:w.jsxs("div",{className:"bg-theme-surface p-6 rounded-2xl shadow-lg w-96 max-w-[90%] border-solid border border-theme-border",children:[w.jsx("h3",{className:"text-xl font-semibold mb-4",children:t}),w.jsx(im,{ref:p,isMulti:a,isClearable:!0,name:"assign-select",className:"basic-multi-select mb-4",classNamePrefix:"uikit-custom-scrollbar",onChange:m=>{Array.isArray(m)?c(m):c(m||null)},id:e,options:n,placeholder:o,noOptionsMessage:()=>s,styles:QC({themeName:l})}),w.jsxs("div",{className:"flex justify-end space-x-3",children:[w.jsx(Po,{variant:"secondary",size:"sm",onClick:r,id:`${e}-cancel-button`,children:"Cancel"}),w.jsx(Po,{variant:"primary",size:"sm",onClick:g,disabled:!u,id:`${e}-assign-button`,children:"Assign"})]})]})})},NLt=({roomId:e,roomName:t,onClose:r,rooms:n,assignRoom:i,themeName:a})=>{const o=n.map(l=>({value:l.subsessionId,label:l.subsessionName})),s=l=>{l.value&&i(l.value)};return w.jsx(tPe,{id:"uikit-subsession-assign-rooms-modal",title:"Move Participant to another room",onClose:r,options:o,onAssign:s,isMulti:!1,placeholder:"Select a room",noOptionsMessage:"No rooms available",themeName:a})},rPe=({participant:e,style:t,rooms:r,isUnassigned:n,roomId:i,assignRoom:a,isJoinSubsession:o,themeName:s})=>{const[l,u]=E.useState(!1),[c,f]=E.useState(!1);return w.jsx("div",{style:t,children:w.jsx("div",{className:"py-2 px-3 hover:bg-theme-background transition duration-150 ease-in-out relative border-b border-theme-border",onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),id:`uikit-subsession-participant-item-${e.userId}`,children:w.jsxs("div",{className:"flex items-center",children:[w.jsx("div",{className:`flex-shrink-0 w-8 h-8 rounded-lg flex items-center justify-center text-theme-text-button text-sm font-semibold ${kG(e?.userId)}`,children:L8(e.displayName)}),w.jsxs("div",{className:"ml-3 flex-grow w-3/5 overflow-hidden",children:[w.jsxs("p",{className:"text-sm font-medium w-full text-ellipsis overflow-hidden",children:[e.displayName,!o&&w.jsx("span",{className:"text-xs ml-2",children:" (No Join)"})]}),e.isHost&&w.jsxs("p",{className:"text-xs flex items-center",children:[w.jsx(r8,{size:10,className:"mr-1"}),"Host"]}),e.isManager&&!e.isHost&&w.jsxs("p",{className:"text-xs flex items-center",children:[w.jsx(FL,{size:10,className:"mr-1"}),"Manager"]})]}),w.jsxs("div",{className:"flex items-center space-x-2 w-20 justify-end",children:[!l&&w.jsx(w.Fragment,{}),l&&w.jsx(w.Fragment,{children:w.jsx(Po,{variant:"secondary",size:"sm",onClick:()=>{f(!0)},className:"mr-2",id:`uikit-subsession-participant-item-${e.userId}-assign-button`,children:n?"Assign":"Move to"})}),c&&w.jsx(NLt,{roomId:i,roomName:"",onClose:()=>f(!1),rooms:r,assignRoom:a,themeName:s})]})]})})})},LLt=({roomId:e,roomName:t,onClose:r,unassignedParticipants:n,assignParticipant:i,themeName:a})=>{const o=n.map(l=>({value:l.userId,label:l.displayName})),s=l=>{if(Array.isArray(l)){const u=l.map(c=>c.value);i(u,e)}else"value"in l&&l.value!==null&&i(l.value,e)};return w.jsx(tPe,{id:"uikit-subsession-assign-participants-modal",title:`Assign Participants to ${t}`,placeholder:"Select participants",noOptionsMessage:"No other participants",onClose:r,options:o,onAssign:s,isMulti:!0,themeName:a})},DLt=({handleActionClick:e,confirmationState:t,setConfirmationState:r,handleConfirmAction:n,inProgress:i,participants:a,isHostOrManager:o,themeName:s,rooms:l,unassignedParticipants:u,localAssignOrMoveUserToRoom:c,localUnassignUserInRoom:f,addLocalRooms:p,removeLocalRoom:h,renameLocalRoom:g})=>{const[m,y]=E.useState(new Set),[C,T]=E.useState(null),[R,O]=E.useState(null),[N,k]=E.useState(""),j=E.useRef(null),V=E.useRef(null),[z,q]=E.useState(null),[$,Y]=E.useState(""),[re,se]=E.useState(!1),{subsessionClient:me}=E.useContext(Xs);E.useEffect(()=>{R&&j.current&&j.current.focus()},[R]),E.useEffect(()=>{re&&V.current&&V.current.focus()},[re]),E.useEffect(()=>{R&&j.current&&j.current.focus()},[R]);const Te=Pe=>{y(Je=>{const vt=new Set(Je);return vt.has(Pe)?vt.delete(Pe):vt.add(Pe),vt})},fe=Pe=>{T(Pe)},Ce=Pe=>{const Je=l[Pe];Je&&(O(Je.subsessionId),k(Je.subsessionName))},Oe=Pe=>{const Je=l[Pe];Je&&(O(Je.subsessionId),g(Pe,N),O(null))},Ve=()=>{O(null)},Ge=Pe=>{l[Pe]&&h(Pe)},ce=()=>{Y(""),V.current&&V.current.focus()},Ne=Pe=>Pe.filter(Je=>Je.displayName.toLowerCase().includes($.toLowerCase()));[...u,...l.flatMap(Pe=>Pe.userList)];const ke=E.useCallback(async(Pe,Je)=>{i?u.some(vt=>vt.userId===Pe)?me.assignUserToSubsession(Pe,Je):me.moveUserToSubsession(Pe,Je):c(Pe,Je)},[i,u,me,c]),De=({room:Pe,index:Je,inProgress:vt,isHostOrManager:qe,handleRename:St,handleDelete:It,handleAssignClick:at,handleActionClick:kt})=>{const Et=qe&&!vt;return Hu()&&Oc()?w.jsx(eC,{position:"bottom-start",menuItems:[Et&&{label:"Rename",onClick:()=>St(Je)},Et&&{label:"Delete",onClick:()=>It(Je)},{label:"Assign",onClick:()=>at(Pe)},vt&&{label:"Join",onClick:()=>kt(Pe.subsessionId,"Join")}]}):w.jsxs(w.Fragment,{children:[Et&&z&&z?.subsessionId===Pe.subsessionId&&R!==Pe.subsessionId&&w.jsxs(w.Fragment,{children:[w.jsx(Po,{variant:"secondary",size:"sm",onClick:()=>St(Je),className:"mr-2",children:"Rename"}),w.jsx(Po,{variant:"secondary",size:"sm",onClick:()=>It(Je),className:"mr-2",children:"Delete"})]}),qe&&w.jsx(Po,{variant:"secondary",size:"sm",onClick:()=>at(Pe),className:"mr-2",children:"Assign"}),vt&&w.jsx(Po,{variant:"secondary",size:"sm",onClick:()=>kt(Pe.subsessionId,"Join"),children:"Join"})]})};return w.jsxs("div",{className:`w-full flex flex-col ${Hu()?fue()?"h-[86%]":"h-[95%]":"h-[89%]"} overflow-y-auto ${es}`,id:"uikit-subsession-rooms-view",children:[w.jsx("div",{className:"p-0 border-b border-gray-200",children:w.jsx(dC,{tabs:[{name:"collapse",title:"Collapse All",id:"uikit-subsession-rooms-view-collapse-tab"},{name:"expand",title:"Expand All",id:"uikit-subsession-rooms-view-expand-tab"},{name:"search",title:"Search",id:"uikit-subsession-rooms-view-search-tab"}],orientation:"horizontal",activeTab:re?"search":m.size===l.length+1?"expand":"collapse",setActiveTab:Pe=>{Pe==="search"?(y(new Set([...l.map(Je=>Je.subsessionId),"unassigned"])),se(!0)):Pe==="collapse"?(y(new Set),se(!1)):Pe==="expand"&&(y(new Set([...l.map(Je=>Je.subsessionId),"unassigned"])),se(!1))},className:"justify-center p-0"})}),re&&w.jsxs("div",{className:"p-2 ml-2 mr-4 pb-0 relative",children:[w.jsx("input",{ref:V,type:"text",placeholder:"Search participants...",value:$,onChange:Pe=>Y(Pe.target.value),className:"w-full px-3 py-2 pr-8 border border-gray-300 text-theme-text rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 bg-theme-surface",id:"uikit-subsession-rooms-view-search-input"}),$&&w.jsx("button",{onClick:ce,className:"absolute right-4 top-1/2 mt-1 transform -translate-y-1/2 text-gray-400 hover:text-gray-600",id:"uikit-subsession-rooms-view-search-clear-button",children:w.jsx(b7e,{size:20,className:"text-theme-text"})})]}),w.jsxs("div",{className:"flex-grow overflow-y-auto uikit-custom-scrollbar p-4 space-y-4",children:[w.jsxs("div",{className:"rounded-lg shadow-sm overflow-hidden",onMouseEnter:()=>q("unassigned"),onMouseLeave:()=>q(null),children:[o&&w.jsxs("div",{className:"flex justify-between items-center p-4 border-b border-theme-border",children:[w.jsxs("div",{className:"flex items-center cursor-pointer",onClick:()=>Te("unassigned"),id:"uikit-subsession-rooms-view-unassigned-expand-button",children:[m.has("unassigned")?w.jsx(xp,{className:"w-5 h-5 mr-3 text-theme-text"}):w.jsx(e8,{className:"w-5 h-5 mr-3 text-theme-text"}),w.jsx("span",{className:"text-base font-medium",children:"Unassigned Participants"})]}),w.jsxs("div",{className:"flex items-center",children:[w.jsx(nE,{className:"w-5 h-5 mr-2 text-theme-text"}),w.jsx("span",{className:"mr-4 text-sm text-theme-text",children:u.length})]})]}),m.has("unassigned")&&w.jsx("div",{className:" p-4 border-t",children:w.jsx("ul",{className:"space-y-1",children:Ne(u).map(Pe=>w.jsx(rPe,{roomId:"unassigned",participant:Pe,style:{},rooms:l,isUnassigned:!0,isJoinSubsession:!1,assignRoom:Je=>{ke(Pe.userId,Je)},themeName:s},Pe.userId))})})]}),l.map((Pe,Je)=>w.jsxs("div",{className:"rounded-lg shadow-sm overflow-hidden",onMouseEnter:()=>q(Pe),onMouseLeave:()=>q(null),children:[w.jsxs("div",{className:"flex justify-between items-center p-4 border-b border-theme-border",children:[w.jsxs("div",{className:"flex items-center cursor-pointer",onClick:()=>Te(Pe.subsessionId),children:[m.has(Pe.subsessionId)?w.jsx(xp,{className:"w-5 h-5 mr-3 text-theme-text"}):w.jsx(e8,{className:"w-5 h-5 mr-3 text-theme-text"}),R===Pe.subsessionId?w.jsxs("div",{className:"flex items-center",children:[w.jsx("input",{ref:j,type:"text",value:N,onChange:vt=>k(vt.target.value),className:"text-base font-medium px-2 py-0 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 bg-theme-surface"}),w.jsx("button",{onClick:vt=>{vt.stopPropagation(),Oe(Je)},className:`ml-2 text-green-600 hover:text-green-700 ${N===Pe.subsessionName?"opacity-50 cursor-not-allowed":""}`,disabled:N===Pe.subsessionName,title:N===Pe.subsessionName?"Room name not changed":"",children:w.jsx(Mw,{size:20})}),w.jsx("button",{onClick:vt=>{vt.stopPropagation(),Ve()},className:"ml-2 text-red-600 hover:text-red-700",children:w.jsx(Ip,{size:20})})]}):w.jsx("span",{className:"text-base font-medium",children:Pe.subsessionName})]}),w.jsxs("div",{className:"flex items-center",children:[w.jsx(nE,{className:"w-5 h-5 mr-2 text-theme-text"}),w.jsx("span",{className:"mr-4 text-sm text-theme-text",children:Pe.userList.length}),w.jsx(De,{room:Pe,index:Je,inProgress:i,isHostOrManager:o,handleRename:Ce,handleDelete:Ge,handleAssignClick:fe,handleActionClick:e})]})]}),m.has(Pe.subsessionId)&&w.jsx("div",{className:"p-4 border-t border-gray-200",children:w.jsx("ul",{className:"space-y-1",children:Ne(Pe.userList).map(vt=>w.jsx(rPe,{participant:vt,style:{},rooms:l,isUnassigned:!1,roomId:Pe.subsessionId,isJoinSubsession:vt?.isInSubsession,assignRoom:qe=>{ke(vt.userId,qe)},themeName:s},vt.userId))})}),t.isOpen&&t.subsessionId===Pe.subsessionId&&w.jsx(OLt,{isOpen:!0,onClose:()=>r({isOpen:!1,subsessionId:null,action:""}),onConfirm:n,roomName:Pe.subsessionName,action:t.action})]},Pe.subsessionId))]}),C&&w.jsx(LLt,{roomId:C.subsessionId,roomName:C.subsessionName,onClose:()=>T(null),unassignedParticipants:u,assignParticipant:c,themeName:s})]})},BLt=({isOpen:e,onClose:t,onSend:r})=>{const[n,i]=E.useState("");return e?w.jsxs("div",{className:"relative bottom-full left-0 bg-theme-surface border border-theme-border text-theme-text rounded-md shadow-lg p-4 z-10 w-full pb-2",children:[w.jsx("h4",{className:"font-semibold mb-2",children:"Broadcast Message"}),w.jsx("textarea",{className:"w-full h-24 p-2 border border-theme-border text-theme-text bg-theme-background rounded-md mb-2",value:n,onChange:a=>i(a.target.value),placeholder:"Type your message here...",id:"uikit-subsession-broadcast-dialog-message-input"}),w.jsxs("div",{className:"flex justify-center space-x-2",children:[w.jsx(Po,{variant:"outline",size:"sm",onClick:t,id:"uikit-subsession-broadcast-dialog-cancel-button",children:"Cancel"}),w.jsx(Po,{variant:"primary",size:"sm",onClick:()=>r(n),id:"uikit-subsession-broadcast-dialog-send-button",children:"Send"})]})]}):null},kLt=()=>{const{participants:e}=nr(W0),t=jc(),{subRoomList:r,subUnassignedUsers:n,subStatus:i}=nr(zp),[a,o]=E.useState([]),[s,l]=E.useState([]),[u,c]=E.useState(Rs.NotStarted),f=Nc(e),p=Nc(r),h=E.useCallback(()=>{r&&o(r),n&&l(n)},[r,n]);E.useEffect(()=>{h()},[r,h]),oy(()=>{h(),c(i)}),E.useEffect(()=>{u!==i&&((u===Rs.InProgress||u===Rs.Closing)&&(i===Rs.Closed||i===Rs.NotStarted)&&h(),c(i))},[u,i,h]),E.useEffect(()=>{if((i===Rs.Closed||i===Rs.NotStarted)&&e&&f){if(e.length>f.length){const R=new Set;a.forEach(({userList:N})=>{N.forEach(({userId:k})=>R.add(k))});const O=e.filter(({userId:N})=>!R.has(N)&&N!==t.userId);l(O)}else if(e.length<f.length){const R=new Set;e.forEach(({userId:k})=>R.add(k));const O=a.map(k=>({...k,userList:k.userList.filter(({userId:j})=>R.has(j))})),N=s.filter(({userId:k})=>R.has(k));o(O),l(N)}}},[t?.userId,a,s,e,f,i]),E.useEffect(()=>{p!==r&&(i===Rs.Closed||i===Rs.NotStarted)&&h()},[r,a,p,h,i]);const g=E.useCallback((R,O)=>{const N=Array.isArray(R)?R:[R],k=a.map(V=>{const{userList:z}=V;let q=z?[...z]:[];return V.subsessionId!==O&&(q=z.filter(({userId:$})=>!N.includes($))),V.subsessionId===O&&N.forEach($=>{if(!z.find(Y=>Y.userId===$)){const Y=e.find(re=>re.userId===$);Y&&q.push({userId:$,displayName:Y.displayName,avatar:Y.avatar})}}),{...V,userList:q}}),j=s.filter(V=>!N.includes(V.userId));o(k),l(j)},[a,s,e]),m=E.useCallback(async R=>{const O=a.map(N=>{const{userList:k}=N;if(k.find(j=>j.userId===R)){const j=k.filter(({userId:V})=>V!==R);return{...N,userList:j}}return N});if(o(O),!s.some(N=>N.userId===R)){const N=e.find(k=>k.userId===R);if(N){const k=s?[...s]:[];k.push(N),l(k)}}},[a,s,e]),y=E.useCallback(R=>{o([...a,...R])},[a]),C=E.useCallback(R=>{const{userList:O}=a[R],N=xNt(e,O),k=s?[...s]:[];k.push(...N);const j=a.filter((V,z)=>z!==R);o(j),l(k)},[a,s,e]),T=E.useCallback((R,O)=>{const N=a.map((k,j)=>j===R?{...k,subsessionName:O}:k);o(N)},[a]);return{localSubsessionRoomList:a,localSubsessionUnassignedUsers:s,localAssignOrMoveUserToRoom:g,localUnassignUserInRoom:m,addLocalRooms:y,removeLocalRoom:C,renameLocalRoom:T}},PLt=()=>{const{subsessionClient:e}=E.useContext(Xs),{subsessionOptions:t,subOptionsNeedCountdown:r,subsessionType:n,isSelectedType:i}=nr(zp);$d.SelfSelect;const a=si(),o=E.useCallback(async(u,c,f,p,h)=>{if(e){let g;if(f){if(u===p.length)g=p?.map(m=>({...m,userList:[]}));else if(u>p.length){const m=await e.createSubsessions(u-p.length,c);g=[...p.map(y=>({...y,userList:[]})),...m]}else g=p?.slice(0,u).map(m=>({...m,userList:[]}));if(c===$d.Automatically&&h){const m=Math.floor(h.length/g.length),y=h.length%g.length;let C=0;g=g.map((T,R)=>{const O=R<y?m+1:m,N=h.slice(C,C+O);return C+=O,{...T,userList:N}}),a(KI(g)),a(qI([]))}else a(KI(g)),a(qI(h))}else g=await e.createSubsessions(u,c),a(KI(g)),a(qI(e.getUnassignedUserList()))}},[e,a]),s=E.useCallback(async u=>{try{await e.openSubsessions(u,{...t,waitSeconds:r?t.waitSeconds:0})}catch(c){console.warn("Error opening subsession rooms",c)}},[e,t,r]),l=E.useCallback(async()=>{if(e)try{await e.closeAllSubsessions()}catch(u){console.warn("Error closing subsession rooms",u)}},[e]);return{handleCreateSubsession:o,handleOpenSubsession:s,handleCloseSubsession:l}},jLt=()=>{const e=E.useContext(Wo),{subsessionClient:t}=E.useContext(Xs),{subUserStatus:r,subStatus:n,currentSubRoom:i}=nr(zp),a=si(),o=E.useCallback(({status:g})=>{if(a(Q6(g)),t){const m=t.getUserStatus(),y=t.getCurrentSubsession();a(KI(t.getSubsessionList())),a(qI(t.getUnassignedUserList())),m!==r&&a(h5e(m)),y!==i&&a(p5e(t.getCurrentSubsession()));const C=t.getSubsessionOptions();C&&(a(_O(C)),C.isSubsessionSelectionEnabled&&a(m5e($d.SelfSelect))),m===kA.Invited&&y.subsessionId!==i.subsessionId&&a(nCe(!0)),n!==Rs.Closing&&g===Rs.Closing&&m===kA.InSubsession&&a(nCe(!0))}},[a,t,r,i,n]),s=E.useCallback(()=>{t&&a(KI(t.getSubsessionList()))},[t,a]),l=E.useCallback(({countdown:g})=>{a(g5e(g)),g===0&&setTimeout(()=>t?.leaveSubsession(),500)},[t,a]),u=E.useCallback(({message:g})=>{a(utt(g)),a(stt(!0))},[a]),c=E.useCallback(({inviterId:g,inviterGuid:m,inviterName:y})=>{a(kX({inviterId:g,inviterGuid:m,inviterName:y})),a(ltt(!0))},[a]),f=E.useCallback(({subsessionId:g,subsessionName:m})=>{i.userStatus===kA.Invited&&a(ib(!0)),i.subsessionId!==g&&a(ib(!0))},[i.subsessionId,i.userStatus,a]);lue(e,s);const p=E.useCallback(({userId:g,displayName:m,subsessionName:y,subsessionId:C})=>{a(kX({inviterId:g,inviterName:m,inviterSubsessionName:y,inviterSubsessionId:C})),a(kx(!0))},[a]),h=E.useCallback(({result:g})=>{switch(g){case kp.Received:uc("Help Requested",{variant:"info"});break;case kp.Busy:uc("The manager is currently busy and cannot join your subsession.",{variant:"info"});break;case kp.Ignore:uc("The manager has ignored your help request.",{variant:"info"});break;case kp.AlreadyInRoom:uc("The manager is already in the room.",{variant:"info"});break}},[]);E.useEffect(()=>(e.on("room-state-change",o),e.on("subsession-ask-for-help",p),e.on("subsession-ask-for-help-response",h),e.on("subsession-invite-to-join",f),e.on("main-session-user-updated",s),e.on("room-countdown",l),e.on("closing-room-countdown",l),e.on("broadcast-message",u),e.on("invite-back-to-main-session",c),()=>{e.off("room-state-change",o),e.off("main-session-user-updated",s),e.off("room-countdown",l),e.off("closing-room-countdown",l),e.off("broadcast-message",u),e.off("invite-back-to-main-session",c),e.off("subsession-invite-to-join",f),e.off("subsession-ask-for-help",p),e.off("subsession-ask-for-help-response",h)}),[e,o,s,l,u,c,p,h,f])},nPe=({participants:e})=>{const t=si(),{subsessionClient:r}=E.useContext(Xs),{isHost:n,isManager:i,userId:a}=nr(Ei),o=n||i;PX(),jLt();const{localAssignOrMoveUserToRoom:s,localUnassignUserInRoom:l,addLocalRooms:u,removeLocalRoom:c,renameLocalRoom:f,localSubsessionUnassignedUsers:p,localSubsessionRoomList:h}=kLt(),{handleCreateSubsession:g,handleOpenSubsession:m,handleCloseSubsession:y}=PLt(),{isSubsessionPoppedOut:C,isShowSubsessionBroadcast:T,subsessionBroadcastMsg:R,themeName:O}=nr(Vi),{subStatus:N,isSelectedType:k,subsessionType:j,currentSubRoom:V,subUserStatus:z,subsessionOptions:q,subRoomCountdown:$,isRecreate:Y,isOpenByYourself:re}=nr(zp),se=N===Rs.InProgress,me=Nc(N),[Te,fe]=E.useState(!1),[Ce,Oe]=E.useState({isOpen:!1,subsessionId:null,action:""}),[Ve,Ge]=E.useState(!1);E.useEffect(()=>{V.userStatus===kA.Invited&&N===Rs.InProgress&&t(ib(!0)),N===Rs.Closed&&t(TNt(!0)),me!==N&&N===Rs.Closed&&t(y5e(!1))},[V.userStatus,N,t,re,me]),E.useEffect(()=>{T&&uc(R,{variant:"info",autoHideDuration:5e3})},[T,R]);const ce=async()=>{try{const qe=await r.createSubsessions(1,q.isSubsessionSelectionEnabled?$d.Manually:j);u(qe)}catch(qe){console.warn(qe)}},Ne=async()=>{try{t(y5e(!0)),await m(h),t(Q6(Rs.InProgress))}catch{uc("Failed to open subsession rooms",{variant:"error"})}},ke=async()=>{try{await y(),t(Q6(Rs.Closed))}catch{uc("Failed to close subsession rooms",{variant:"error"})}},De=(qe,St)=>{Oe({isOpen:!0,subsessionId:qe,action:St})},Pe=()=>{Ce.action==="Join"&&r.joinSubsession(Ce.subsessionId),Oe({isOpen:!1,subsessionId:null,action:""})},Je=qe=>{r.broadcast(qe),Ge(!1)},vt=k||se?w.jsxs(w.Fragment,{children:[w.jsx(DLt,{handleActionClick:De,confirmationState:Ce,setConfirmationState:Oe,handleConfirmAction:Pe,inProgress:se,participants:e,isHostOrManager:o,themeName:O,rooms:h,localAssignOrMoveUserToRoom:s,localUnassignUserInRoom:l,addLocalRooms:u,removeLocalRoom:c,renameLocalRoom:f,unassignedParticipants:p}),w.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-center border-gray-200 space-y-2 sm:space-y-0 flex-shrink-0 absolute bottom-0 w-full",children:[!se&&o&&w.jsx(w.Fragment,{children:w.jsxs("div",{className:"flex justify-between items-center p-2 border-t border-gray-200 w-full",children:[w.jsx(Po,{variant:"outline",size:"sm",className:"inline-flex",color:"blue",onClick:()=>fe(!Te),id:"uikit-subsession-settings-button",children:"Settings"}),w.jsxs("div",{className:`flex space-x-3 ${es}`,children:[w.jsx(Po,{variant:"outline",size:"sm",className:"inline-flex",color:"blue",onClick:()=>{t(v5e(!1))},id:"uikit-subsession-recreate-button",children:"Recreate"}),w.jsx(Po,{variant:"outline",size:"sm",className:"inline-flex",color:"blue",onClick:ce,id:"uikit-subsession-add-room-button",children:"Add Room"}),w.jsx(Po,{variant:"primary",size:"sm",className:"inline-flex",color:"blue",onClick:Ne,id:"uikit-subsession-open-all-rooms-button",children:"Open All Rooms"})]})]})}),se&&o&&!Ve&&w.jsxs("div",{className:"flex flex-col justify-center sm:flex-row gap-2 w-full p-2",children:[w.jsx(Po,{variant:"outline",size:"sm",className:"w-full sm:w-auto",onClick:()=>Ge(!0),id:"uikit-subsession-broadcast-button",children:"Broadcast"}),w.jsx(Po,{variant:"danger",size:"sm",className:"w-full sm:w-auto",onClick:ke,id:"uikit-subsession-close-all-rooms-button",children:"Close All Rooms"})]}),Ve&&w.jsx(BLt,{isOpen:Ve,onClose:()=>Ge(!1),onSend:Je})]})]}):null;return w.jsx(w.Fragment,{children:w.jsxs(Sv,{isOpen:C,onClose:()=>t(Lx(!1)),title:`Subsession Rooms - ${se?"In Progress":"Not Started"}`,width:500,height:500,id:"uikit-subsession-popper",children:[vt,!se&&!k&&w.jsx(MLt,{isOpen:C&&!se&&!k,onClose:()=>t(Lx(!1)),initialRoomCount:$,subsessionType:j,onSubmit:async(qe,St)=>{t(v5e(!0)),t(m5e(St)),t(g5e(qe));const It=St===$d.SelfSelect;if(t(_O({isSubsessionSelectionEnabled:It})),It)try{await g(qe,$d.Manually,Y,h,e.filter(at=>at.userId!==a))}catch(at){console.warn("Error creating subsession rooms",at)}else try{await g(qe,St,Y,h,e.filter(at=>at.userId!==a))}catch(at){console.warn("Error creating subsession rooms",at)}}}),o&&w.jsx(RLt,{isOpen:Te,onClose:()=>fe(!1),themeName:O})]})})},FLt=()=>{const{captionClient:e}=E.useContext(Xs),{isShowHostCaptionSettings:t}=nr(Vi),{isHostDisableCaptions:r}=nr(JS),n=si(),i=E.useCallback(async()=>{try{n(VX(!r)),await e?.disableCaptions(!r)}catch(a){n(VX(r)),uc(a.reason,{variant:"error",autoHideDuration:5e3})}},[e,n,r]);return w.jsx(Sv,{isOpen:t,onClose:()=>n(Dx(!1)),title:"Host Captions Control Settings",width:500,height:280,children:w.jsxs("div",{className:"p-6 max-w-md mx-auto",children:[w.jsxs("div",{className:"flex items-center justify-between mb-6",children:[w.jsx("span",{className:"font-medium",children:"Allow Closed Captioning for this session"}),w.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[w.jsx("input",{type:"checkbox",className:"sr-only peer",checked:!r,onChange:i}),w.jsx("div",{className:"w-10 h-6 rounded-full peer-checked:bg-blue-500 peer-focus:ring-2 peer-focus:ring-blue-500 transition-all"}),w.jsx("div",{className:"absolute left-1 top-1 w-4 h-4 bg-white rounded-full transition-transform peer-checked:translate-x-4"})]})]}),w.jsx("p",{className:"text-sm mb-6",children:"When this setting is disabled, nobody can use Closed Captioning in the session."}),w.jsx("div",{className:"flex justify-end",children:w.jsx("button",{className:"px-10 py-2 bg-blue-500 text-theme-text-button font-medium rounded-lg hover:bg-blue-600 transition",onClick:()=>n(Dx(!1)),children:"OK"})})]})})},ULt=()=>{const e=E.useContext(Wo),{currentTranslationLanguage:t}=nr(JS),r=si(),[n,i]=E.useState(null),a=E.useRef(null),o=E.useRef(null),s=window.innerWidth<768?window.innerWidth*.9:800,[l,u]=E.useState({x:0,y:0}),c=E.useMemo(()=>{const m=(window.innerWidth-s)/2,y=window.innerHeight-(window.innerWidth<768?100:150);return{x:m,y}},[s]),f=E.useRef(null);E.useEffect(()=>{f.current&&(f.current.scrollTop=f.current.scrollHeight)},[n]);const p=E.useCallback(m=>{t!==void 0?m.language!==400&&i(m):m.language===400&&i(m),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{i(null)},8e3)},[t]);E.useEffect(()=>{u(c)},[c]),E.useEffect(()=>(e.on("caption-message",p),()=>{e.off("caption-message",p),a.current&&clearTimeout(a.current)}),[e,p]);const h=m=>{m.stopPropagation(),r(Bx(!1))},g=m=>m?m.charAt(0).toUpperCase():"";return n?.text&&w.jsx(wv,{nodeRef:o,bounds:"parent",position:l,onStop:(m,y)=>u({x:y.x,y:y.y}),handle:".drag-handle",children:w.jsxs("div",{id:"uikit-caption-container",ref:o,className:"absolute bg-black z-10 bg-opacity-75 text-theme-text-button p-2 rounded w-4/5 max-w-[500px] select-none",children:[w.jsx("button",{onClick:h,className:"absolute -top-2 -right-2 bg-red-500 rounded-full p-1 hover:bg-red-600 transition-colors",children:w.jsx(Ip,{size:16})}),w.jsx("div",{className:"drag-handle cursor-move absolute inset-0"}),w.jsxs("div",{className:"flex items-start pt-1",children:[w.jsx("div",{className:"w-8 h-8 rounded-full bg-blue-500 flex items-center justify-center mr-2 flex-shrink-0",children:g(n.displayName)}),w.jsx("div",{className:"max-h-[60px] overflow-y-auto",ref:f,children:w.jsx("div",{className:`text-sm${n.language!==400?" text-yellow-300":""}`,children:n.text})})]})]})})},HLt=()=>{const{isShowCaptionHistory:e}=nr(Vi),t=E.useContext(Wo),{captionClient:r}=E.useContext(Xs),[n,i]=E.useState(r?.getFullTranscriptionHistory()),a=E.useRef(n),[o,s]=E.useState(!0),[l,u]=E.useState(!0),c=si(),f=E.useRef(null),p=()=>{if(!f.current)return;const{scrollTop:m,scrollHeight:y,clientHeight:C}=f.current,T=y-m-C<5;s(T)},h=E.useCallback(()=>{f.current&&(f.current.scrollTop=f.current.scrollHeight)},[]);E.useEffect(()=>{if(o)h(),u(!1);else{const m=n.length>0?n[n.length-1].text:null,y=a.current.length>0?a.current[a.current.length-1].text:null;m!==y&&u(!0)}a.current=n},[n,o,h]);const g=E.useCallback(()=>{const m=setTimeout(()=>{const y=r?.getFullTranscriptionHistory();i(y)},0);return()=>clearTimeout(m)},[r]);return E.useEffect(()=>(t.on("caption-message",g),()=>{t.off("caption-message",g)}),[t,g]),w.jsxs(Sv,{id:"uikit-caption-full-transcript-window",isOpen:e,onClose:()=>{c(bG(!1))},title:"Caption History",width:400,height:500,children:[w.jsx("div",{ref:f,className:"h-full overflow-y-auto p-4 space-y-4 uikit-custom-scrollbar",onScroll:p,children:n.map(m=>w.jsxs("div",{className:"group transition-all duration-200 ease-in-out",children:[w.jsxs("div",{className:"flex items-center justify-between text-xs text-theme-text/40 mb-1",children:[w.jsx("span",{className:"font-medium",children:m.displayName}),w.jsx("span",{children:new Date(m.timestamp).toLocaleTimeString()})]}),w.jsx("div",{className:`bg-theme-background/50 backdrop-blur-sm rounded-lg p-3.5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vinay.kumar.ha/videosdk-ui-toolkit",
3
- "version": "2.3.5-1.1",
3
+ "version": "2.3.5-1.2",
4
4
  "description": "The Zoom Video SDK UI toolkit is a prebuilt video chat user interface powered by the Zoom Video SDK.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",