streamlit-webrtc 0.62.2__py3-none-any.whl → 0.62.3__py3-none-any.whl
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.
- streamlit_webrtc/component.py +33 -40
- streamlit_webrtc/frontend/dist/assets/{index-Cz1nSw2-.js → index-DuUNdoqd.js} +1 -1
- streamlit_webrtc/frontend/dist/index.html +1 -1
- {streamlit_webrtc-0.62.2.dist-info → streamlit_webrtc-0.62.3.dist-info}/METADATA +1 -1
- {streamlit_webrtc-0.62.2.dist-info → streamlit_webrtc-0.62.3.dist-info}/RECORD +7 -7
- {streamlit_webrtc-0.62.2.dist-info → streamlit_webrtc-0.62.3.dist-info}/WHEEL +0 -0
- {streamlit_webrtc-0.62.2.dist-info → streamlit_webrtc-0.62.3.dist-info}/licenses/LICENSE +0 -0
streamlit_webrtc/component.py
CHANGED
@@ -563,40 +563,24 @@ def webrtc_streamer(
|
|
563
563
|
sdp_offer = component_value.get("sdpOffer")
|
564
564
|
ice_candidates = component_value.get("iceCandidates")
|
565
565
|
|
566
|
-
webrtc_worker = context._get_worker()
|
567
|
-
|
568
566
|
if not context.state.playing and not context.state.signalling:
|
569
567
|
LOGGER.debug(
|
570
|
-
"
|
571
|
-
'neither playing nor signalling (key="%s").',
|
568
|
+
"The frontend state is neither playing nor signalling (key=%s).",
|
572
569
|
key,
|
573
570
|
)
|
574
571
|
|
575
572
|
context._frontend_rtc_configuration = None
|
576
573
|
|
577
|
-
|
578
|
-
|
574
|
+
webrtc_worker_to_stop = context._get_worker()
|
575
|
+
if webrtc_worker_to_stop:
|
576
|
+
LOGGER.debug("Stop the worker (key=%s).", key)
|
577
|
+
webrtc_worker_to_stop.stop()
|
579
578
|
context._set_worker(None)
|
580
579
|
context._is_sdp_answer_sent = False
|
581
580
|
context._sdp_answer_json = None
|
582
|
-
webrtc_worker = None
|
583
581
|
# Rerun to unset the SDP answer from the frontend args
|
584
582
|
rerun()
|
585
583
|
|
586
|
-
if webrtc_worker:
|
587
|
-
if video_frame_callback or queued_video_frames_callback or on_video_ended:
|
588
|
-
webrtc_worker.update_video_callbacks(
|
589
|
-
frame_callback=video_frame_callback,
|
590
|
-
queued_frames_callback=queued_video_frames_callback,
|
591
|
-
on_ended=on_video_ended,
|
592
|
-
)
|
593
|
-
if audio_frame_callback or queued_audio_frames_callback or on_audio_ended:
|
594
|
-
webrtc_worker.update_audio_callbacks(
|
595
|
-
frame_callback=audio_frame_callback,
|
596
|
-
queued_frames_callback=queued_audio_frames_callback,
|
597
|
-
on_ended=on_audio_ended,
|
598
|
-
)
|
599
|
-
|
600
584
|
with context._worker_creation_lock: # This point can be reached in parallel so we need to use a lock to make the worker creation process atomic.
|
601
585
|
if not context._get_worker() and sdp_offer:
|
602
586
|
LOGGER.debug(
|
@@ -651,27 +635,36 @@ def webrtc_streamer(
|
|
651
635
|
context._set_worker(worker_created_in_this_run)
|
652
636
|
|
653
637
|
webrtc_worker = context._get_worker()
|
638
|
+
if webrtc_worker:
|
639
|
+
if webrtc_worker.pc.localDescription and not context._is_sdp_answer_sent:
|
640
|
+
context._sdp_answer_json = json.dumps(
|
641
|
+
{
|
642
|
+
"sdp": webrtc_worker.pc.localDescription.sdp,
|
643
|
+
"type": webrtc_worker.pc.localDescription.type,
|
644
|
+
}
|
645
|
+
)
|
654
646
|
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
{
|
662
|
-
"sdp": webrtc_worker.pc.localDescription.sdp,
|
663
|
-
"type": webrtc_worker.pc.localDescription.type,
|
664
|
-
}
|
665
|
-
)
|
647
|
+
LOGGER.debug("Rerun to send the SDP answer to frontend")
|
648
|
+
# NOTE: rerun() may not work if it's called in the lock when the `runner.fastReruns` config is enabled
|
649
|
+
# because the `ScriptRequests._state` is set to `ScriptRequestType.STOP` by the rerun request from the frontend sent during awaiting the lock,
|
650
|
+
# which makes the rerun request refused.
|
651
|
+
# So we call rerun() here. It can be called even in a different thread(run) from the one where the worker is created as long as the condition is met.
|
652
|
+
rerun()
|
666
653
|
|
667
|
-
|
668
|
-
|
669
|
-
# because the `ScriptRequests._state` is set to `ScriptRequestType.STOP` by the rerun request from the frontend sent during awaiting the lock,
|
670
|
-
# which makes the rerun request refused.
|
671
|
-
# So we call rerun() here. It can be called even in a different thread(run) from the one where the worker is created as long as the condition is met.
|
672
|
-
rerun()
|
654
|
+
if ice_candidates:
|
655
|
+
webrtc_worker.set_ice_candidates_from_offerer(ice_candidates)
|
673
656
|
|
674
|
-
|
675
|
-
|
657
|
+
if video_frame_callback or queued_video_frames_callback or on_video_ended:
|
658
|
+
webrtc_worker.update_video_callbacks(
|
659
|
+
frame_callback=video_frame_callback,
|
660
|
+
queued_frames_callback=queued_video_frames_callback,
|
661
|
+
on_ended=on_video_ended,
|
662
|
+
)
|
663
|
+
if audio_frame_callback or queued_audio_frames_callback or on_audio_ended:
|
664
|
+
webrtc_worker.update_audio_callbacks(
|
665
|
+
frame_callback=audio_frame_callback,
|
666
|
+
queued_frames_callback=queued_audio_frames_callback,
|
667
|
+
on_ended=on_audio_ended,
|
668
|
+
)
|
676
669
|
|
677
670
|
return context
|
@@ -221,7 +221,7 @@ export default theme;`}function Ch(t={},...e){const{breakpoints:n,mixins:r={},sp
|
|
221
221
|
`:null,gO=typeof Dh!="string"?Pm`
|
222
222
|
animation: ${Dh} 1.4s ease-in-out infinite;
|
223
223
|
`:null,vO=t=>{const{classes:e,variant:n,color:r,disableShrink:s}=t,a={root:["root",n,`color${Oe(r)}`],svg:["svg"],circle:["circle",`circle${Oe(n)}`,s&&"circleDisableShrink"]};return gn(a,mO,e)},bO=Fe("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`color${Oe(n.color)}`]]}})(On(({theme:t})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:t.transitions.create("transform")}},{props:{variant:"indeterminate"},style:yO||{animation:`${Mh} 1.4s linear infinite`}},...Object.entries(t.palette).filter(Ii()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}}))]}))),SO=Fe("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(t,e)=>e.svg})({display:"block"}),_O=Fe("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.circle,e[`circle${Oe(n.variant)}`],n.disableShrink&&e.circleDisableShrink]}})(On(({theme:t})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:t.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink,style:gO||{animation:`${Dh} 1.4s ease-in-out infinite`}}]}))),ny=k.forwardRef(function(e,n){const r=sn({props:e,name:"MuiCircularProgress"}),{className:s,color:a="primary",disableShrink:c=!1,size:u=40,style:f,thickness:h=3.6,value:y=0,variant:g="indeterminate",...v}=r,C={...r,color:a,disableShrink:c,size:u,thickness:h,value:y,variant:g},w=vO(C),_={},I={},E={};if(g==="determinate"){const N=2*Math.PI*((Xi-h)/2);_.strokeDasharray=N.toFixed(3),E["aria-valuenow"]=Math.round(y),_.strokeDashoffset=`${((100-y)/100*N).toFixed(3)}px`,I.transform="rotate(-90deg)"}return $.jsx(bO,{className:ot(w.root,s),style:{width:u,height:u,...I,...f},ownerState:C,ref:n,role:"progressbar",...E,...v,children:$.jsx(SO,{className:w.svg,ownerState:C,viewBox:`${Xi/2} ${Xi/2} ${Xi} ${Xi}`,children:$.jsx(_O,{className:w.circle,style:_,ownerState:C,cx:Xi,cy:Xi,r:(Xi-h)/2,fill:"none",strokeWidth:h})})})});function CO(t){return mn("MuiButton",t)}const Ao=yn("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),wO=k.createContext({}),xO=k.createContext(void 0),IO=t=>{const{color:e,disableElevation:n,fullWidth:r,size:s,variant:a,loading:c,loadingPosition:u,classes:f}=t,h={root:["root",c&&"loading",a,`${a}${Oe(e)}`,`size${Oe(s)}`,`${a}Size${Oe(s)}`,`color${Oe(e)}`,n&&"disableElevation",r&&"fullWidth",c&&`loadingPosition${Oe(u)}`],startIcon:["icon","startIcon",`iconSize${Oe(s)}`],endIcon:["icon","endIcon",`iconSize${Oe(s)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},y=gn(h,CO,f);return{...f,...y}},t_=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],TO=Fe(e_,{shouldForwardProp:t=>Bl(t)||t==="classes",name:"MuiButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`${n.variant}${Oe(n.color)}`],e[`size${Oe(n.size)}`],e[`${n.variant}Size${Oe(n.size)}`],n.color==="inherit"&&e.colorInherit,n.disableElevation&&e.disableElevation,n.fullWidth&&e.fullWidth,n.loading&&e.loading]}})(On(({theme:t})=>{const e=t.palette.mode==="light"?t.palette.grey[300]:t.palette.grey[800],n=t.palette.mode==="light"?t.palette.grey.A100:t.palette.grey[700];return{...t.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${Ao.disabled}`]:{color:(t.vars||t).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(t.vars||t).shadows[2],"&:hover":{boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2]}},"&:active":{boxShadow:(t.vars||t).shadows[8]},[`&.${Ao.focusVisible}`]:{boxShadow:(t.vars||t).shadows[6]},[`&.${Ao.disabled}`]:{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${Ao.disabled}`]:{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(t.palette).filter(Ii()).map(([r])=>({props:{color:r},style:{"--variant-textColor":(t.vars||t).palette[r].main,"--variant-outlinedColor":(t.vars||t).palette[r].main,"--variant-outlinedBorder":t.vars?`rgba(${t.vars.palette[r].mainChannel} / 0.5)`:Hr(t.palette[r].main,.5),"--variant-containedColor":(t.vars||t).palette[r].contrastText,"--variant-containedBg":(t.vars||t).palette[r].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(t.vars||t).palette[r].dark,"--variant-textBg":t.vars?`rgba(${t.vars.palette[r].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Hr(t.palette[r].main,t.palette.action.hoverOpacity),"--variant-outlinedBorder":(t.vars||t).palette[r].main,"--variant-outlinedBg":t.vars?`rgba(${t.vars.palette[r].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Hr(t.palette[r].main,t.palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":t.vars?t.vars.palette.Button.inheritContainedBg:e,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":t.vars?t.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:Hr(t.palette.text.primary,t.palette.action.hoverOpacity),"--variant-outlinedBg":t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:Hr(t.palette.text.primary,t.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:t.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:t.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:t.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Ao.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Ao.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),[`&.${Ao.loading}`]:{color:"transparent"}}}]}})),kO=Fe("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.startIcon,n.loading&&e.startIconLoadingStart,e[`iconSize${Oe(n.size)}`]]}})(({theme:t})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...t_]})),EO=Fe("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.endIcon,n.loading&&e.endIconLoadingEnd,e[`iconSize${Oe(n.size)}`]]}})(({theme:t})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...t_]})),RO=Fe("span",{name:"MuiButton",slot:"LoadingIndicator",overridesResolver:(t,e)=>e.loadingIndicator})(({theme:t})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(t.vars||t).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),b1=Fe("span",{name:"MuiButton",slot:"LoadingIconPlaceholder",overridesResolver:(t,e)=>e.loadingIconPlaceholder})({display:"inline-block",width:"1em",height:"1em"}),n_=k.forwardRef(function(e,n){const r=k.useContext(wO),s=k.useContext(xO),a=vl(r,e),c=sn({props:a,name:"MuiButton"}),{children:u,color:f="primary",component:h="button",className:y,disabled:g=!1,disableElevation:v=!1,disableFocusRipple:C=!1,endIcon:w,focusVisibleClassName:_,fullWidth:I=!1,id:E,loading:N=null,loadingIndicator:B,loadingPosition:R="center",size:O="medium",startIcon:F,type:M,variant:V="text",...Y}=c,S=l2(E),j=B??$.jsx(ny,{"aria-labelledby":S,color:"inherit",size:16}),W={...c,color:f,component:h,disabled:g,disableElevation:v,disableFocusRipple:C,fullWidth:I,loading:N,loadingIndicator:j,loadingPosition:R,size:O,type:M,variant:V},Q=IO(W),te=(F||N&&R==="start")&&$.jsx(kO,{className:Q.startIcon,ownerState:W,children:F||$.jsx(b1,{className:Q.loadingIconPlaceholder,ownerState:W})}),se=(w||N&&R==="end")&&$.jsx(EO,{className:Q.endIcon,ownerState:W,children:w||$.jsx(b1,{className:Q.loadingIconPlaceholder,ownerState:W})}),ce=s||"",fe=typeof N=="boolean"?$.jsx("span",{className:Q.loadingWrapper,style:{display:"contents"},children:N&&$.jsx(RO,{className:Q.loadingIndicator,ownerState:W,children:j})}):null;return $.jsxs(TO,{ownerState:W,className:ot(r.className,Q.root,y,ce),component:h,disabled:g||N,focusRipple:!C,focusVisibleClassName:ot(Q.focusVisible,_),ref:n,type:M,id:N?S:E,...Y,classes:Q,children:[te,R!=="end"&&fe,u,R==="end"&&fe,se]})}),ry=Y3({createStyledComponent:Fe("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root}),useThemeProps:t=>sn({props:t,name:"MuiStack"})});function r_(t){return mn("MuiNativeSelect",t)}const iy=yn("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),AO=t=>{const{classes:e,variant:n,disabled:r,multiple:s,open:a,error:c}=t,u={select:["select",n,r&&"disabled",s&&"multiple",c&&"error"],icon:["icon",`icon${Oe(n)}`,a&&"iconOpen",r&&"disabled"]};return gn(u,r_,e)},PO=Fe("select")(({theme:t})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${iy.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},variants:[{props:({ownerState:e})=>e.variant!=="filled"&&e.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}}]})),OO=Fe(PO,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Bl,overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.select,e[n.variant],n.error&&e.error,{[`&.${iy.multiple}`]:e.multiple}]}})({}),MO=Fe("svg")(({theme:t})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${iy.disabled}`]:{color:(t.vars||t).palette.action.disabled},variants:[{props:({ownerState:e})=>e.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),DO=Fe(MO,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${Oe(n.variant)}`],n.open&&e.iconOpen]}})({}),NO=k.forwardRef(function(e,n){const{className:r,disabled:s,error:a,IconComponent:c,inputRef:u,variant:f="standard",...h}=e,y={...e,disabled:s,variant:f,error:a},g=AO(y);return $.jsxs(k.Fragment,{children:[$.jsx(OO,{ownerState:y,className:ot(g.select,r),disabled:s,ref:u||n,...h}),e.multiple?null:$.jsx(DO,{as:c,ownerState:y,className:g.icon})]})});function Rd({props:t,states:e,muiFormControl:n}){return e.reduce((r,s)=>(r[s]=t[s],n&&typeof t[s]>"u"&&(r[s]=n[s]),r),{})}const oy=k.createContext(void 0);function Ad(){return k.useContext(oy)}const BO=ho($.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function ou(t){return parseInt(t,10)||0}const LO={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function FO(t){for(const e in t)return!1;return!0}function S1(t){return FO(t)||t.outerHeightStyle===0&&!t.overflowing}const $O=k.forwardRef(function(e,n){const{onChange:r,maxRows:s,minRows:a=1,style:c,value:u,...f}=e,{current:h}=k.useRef(u!=null),y=k.useRef(null),g=Zs(n,y),v=k.useRef(null),C=k.useRef(null),w=k.useCallback(()=>{const B=y.current,R=C.current;if(!B||!R)return;const F=Uv(B).getComputedStyle(B);if(F.width==="0px")return{outerHeightStyle:0,overflowing:!1};R.style.width=F.width,R.value=B.value||e.placeholder||"x",R.value.slice(-1)===`
|
224
|
-
`&&(R.value+=" ");const M=F.boxSizing,V=ou(F.paddingBottom)+ou(F.paddingTop),Y=ou(F.borderBottomWidth)+ou(F.borderTopWidth),S=R.scrollHeight;R.value="x";const j=R.scrollHeight;let W=S;a&&(W=Math.max(Number(a)*j,W)),s&&(W=Math.min(Number(s)*j,W)),W=Math.max(W,j);const Q=W+(M==="border-box"?V+Y:0),te=Math.abs(W-S)<=1;return{outerHeightStyle:Q,overflowing:te}},[s,a,e.placeholder]),_=sl(()=>{const B=y.current,R=w();if(!B||!R||S1(R))return!1;const O=R.outerHeightStyle;return v.current!=null&&v.current!==O}),I=k.useCallback(()=>{const B=y.current,R=w();if(!B||!R||S1(R))return;const O=R.outerHeightStyle;v.current!==O&&(v.current=O,B.style.height=`${O}px`),B.style.overflow=R.overflowing?"hidden":""},[w]),E=k.useRef(-1);qs(()=>{const B=i3(I),R=y==null?void 0:y.current;if(!R)return;const O=Uv(R);O.addEventListener("resize",B);let F;return typeof ResizeObserver<"u"&&(F=new ResizeObserver(()=>{_()&&(F.unobserve(R),cancelAnimationFrame(E.current),I(),E.current=requestAnimationFrame(()=>{F.observe(R)}))}),F.observe(R)),()=>{B.clear(),cancelAnimationFrame(E.current),O.removeEventListener("resize",B),F&&F.disconnect()}},[w,I,_]),qs(()=>{I()});const N=B=>{h||I(),r&&r(B)};return $.jsxs(k.Fragment,{children:[$.jsx("textarea",{value:u,onChange:N,ref:g,rows:a,style:c,...f}),$.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:C,tabIndex:-1,style:{...LO.shadow,...c,paddingTop:0,paddingBottom:0}})]})});function _1(t){return typeof t=="string"}function C1(t){return t!=null&&!(Array.isArray(t)&&t.length===0)}function Nh(t,e=!1){return t&&(C1(t.value)&&t.value!==""||e&&C1(t.defaultValue)&&t.defaultValue!=="")}function zO(t){return t.startAdornment}function jO(t){return mn("MuiInputBase",t)}const ad=yn("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var w1;const i_=(t,e)=>{const{ownerState:n}=t;return[e.root,n.formControl&&e.formControl,n.startAdornment&&e.adornedStart,n.endAdornment&&e.adornedEnd,n.error&&e.error,n.size==="small"&&e.sizeSmall,n.multiline&&e.multiline,n.color&&e[`color${Oe(n.color)}`],n.fullWidth&&e.fullWidth,n.hiddenLabel&&e.hiddenLabel]},o_=(t,e)=>{const{ownerState:n}=t;return[e.input,n.size==="small"&&e.inputSizeSmall,n.multiline&&e.inputMultiline,n.type==="search"&&e.inputTypeSearch,n.startAdornment&&e.inputAdornedStart,n.endAdornment&&e.inputAdornedEnd,n.hiddenLabel&&e.inputHiddenLabel]},UO=t=>{const{classes:e,color:n,disabled:r,error:s,endAdornment:a,focused:c,formControl:u,fullWidth:f,hiddenLabel:h,multiline:y,readOnly:g,size:v,startAdornment:C,type:w}=t,_={root:["root",`color${Oe(n)}`,r&&"disabled",s&&"error",f&&"fullWidth",c&&"focused",u&&"formControl",v&&v!=="medium"&&`size${Oe(v)}`,y&&"multiline",C&&"adornedStart",a&&"adornedEnd",h&&"hiddenLabel",g&&"readOnly"],input:["input",r&&"disabled",w==="search"&&"inputTypeSearch",y&&"inputMultiline",v==="small"&&"inputSizeSmall",h&&"inputHiddenLabel",C&&"inputAdornedStart",a&&"inputAdornedEnd",g&&"readOnly"]};return gn(_,jO,e)},s_=Fe("div",{name:"MuiInputBase",slot:"Root",overridesResolver:i_})(On(({theme:t})=>({...t.typography.body1,color:(t.vars||t).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${ad.disabled}`]:{color:(t.vars||t).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:e})=>e.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:e,size:n})=>e.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:e})=>e.fullWidth,style:{width:"100%"}}]}))),a_=Fe("input",{name:"MuiInputBase",slot:"Input",overridesResolver:o_})(On(({theme:t})=>{const e=t.palette.mode==="light",n={color:"currentColor",...t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:e?.42:.5},transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})},r={opacity:"0 !important"},s=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:e?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${ad.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":s,"&:focus::-moz-placeholder":s,"&:focus::-ms-input-placeholder":s},[`&.${ad.disabled}`]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},variants:[{props:({ownerState:a})=>!a.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:a})=>a.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),x1=Zm({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),VO=k.forwardRef(function(e,n){const r=sn({props:e,name:"MuiInputBase"}),{"aria-describedby":s,autoComplete:a,autoFocus:c,className:u,color:f,components:h={},componentsProps:y={},defaultValue:g,disabled:v,disableInjectingGlobalStyles:C,endAdornment:w,error:_,fullWidth:I=!1,id:E,inputComponent:N="input",inputProps:B={},inputRef:R,margin:O,maxRows:F,minRows:M,multiline:V=!1,name:Y,onBlur:S,onChange:j,onClick:W,onFocus:Q,onKeyDown:te,onKeyUp:se,placeholder:ce,readOnly:fe,renderSuffix:q,rows:ne,size:re,slotProps:A={},slots:G={},startAdornment:de,type:ge="text",value:De,...xe}=r,$e=B.value!=null?B.value:De,{current:Ne}=k.useRef($e!=null),je=k.useRef(),Lt=k.useCallback(He=>{},[]),ur=Zs(je,R,B.ref,Lt),[dr,Dn]=k.useState(!1),Je=Ad(),Ut=Rd({props:r,muiFormControl:Je,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Ut.focused=Je?Je.focused:dr,k.useEffect(()=>{!Je&&v&&dr&&(Dn(!1),S&&S())},[Je,v,dr,S]);const fr=Je&&Je.onFilled,Qt=Je&&Je.onEmpty,st=k.useCallback(He=>{Nh(He)?fr&&fr():Qt&&Qt()},[fr,Qt]);qs(()=>{Ne&&st({value:$e})},[$e,st,Ne]);const Nn=He=>{Q&&Q(He),B.onFocus&&B.onFocus(He),Je&&Je.onFocus?Je.onFocus(He):Dn(!0)},Xt=He=>{S&&S(He),B.onBlur&&B.onBlur(He),Je&&Je.onBlur?Je.onBlur(He):Dn(!1)},Yn=(He,...Jt)=>{if(!Ne){const ln=He.target||je.current;if(ln==null)throw new Error(oo(1));st({value:ln.value})}B.onChange&&B.onChange(He,...Jt),j&&j(He,...Jt)};k.useEffect(()=>{st(je.current)},[]);const me=He=>{je.current&&He.currentTarget===He.target&&je.current.focus(),W&&W(He)};let Zr=N,an=B;V&&Zr==="input"&&(ne?an={type:void 0,minRows:ne,maxRows:ne,...an}:an={type:void 0,maxRows:F,minRows:M,...an},Zr=$O);const mo=He=>{st(He.animationName==="mui-auto-fill-cancel"?je.current:{value:"x"})};k.useEffect(()=>{Je&&Je.setAdornedStart(!!de)},[Je,de]);const ei={...r,color:Ut.color||"primary",disabled:Ut.disabled,endAdornment:w,error:Ut.error,focused:Ut.focused,formControl:Je,fullWidth:I,hiddenLabel:Ut.hiddenLabel,multiline:V,size:Ut.size,startAdornment:de,type:ge},ti=UO(ei),vt=G.root||h.Root||s_,Et=A.root||y.root||{},wt=G.input||h.Input||a_;return an={...an,...A.input??y.input},$.jsxs(k.Fragment,{children:[!C&&typeof x1=="function"&&(w1||(w1=$.jsx(x1,{}))),$.jsxs(vt,{...Et,ref:n,onClick:me,...xe,...!_1(vt)&&{ownerState:{...ei,...Et.ownerState}},className:ot(ti.root,Et.className,u,fe&&"MuiInputBase-readOnly"),children:[de,$.jsx(oy.Provider,{value:null,children:$.jsx(wt,{"aria-invalid":Ut.error,"aria-describedby":s,autoComplete:a,autoFocus:c,defaultValue:g,disabled:Ut.disabled,id:E,onAnimationStart:mo,name:Y,placeholder:ce,readOnly:fe,required:Ut.required,rows:ne,value:$e,onKeyDown:te,onKeyUp:se,type:ge,...an,...!_1(wt)&&{as:Zr,ownerState:{...ei,...an.ownerState}},ref:ur,className:ot(ti.input,an.className,fe&&"MuiInputBase-readOnly"),onBlur:Xt,onChange:Yn,onFocus:Nn})}),w,q?q({...Ut,startAdornment:de}):null]})]})});function WO(t){return mn("MuiInput",t)}const Xa={...ad,...yn("MuiInput",["root","underline","input"])},HO=t=>{const{classes:e,disableUnderline:n}=t,s=gn({root:["root",!n&&"underline"],input:["input"]},WO,e);return{...e,...s}},GO=Fe(s_,{shouldForwardProp:t=>Bl(t)||t==="classes",name:"MuiInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...i_(t,e),!n.disableUnderline&&e.underline]}})(On(({theme:t})=>{let n=t.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(n=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Xa.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Xa.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Xa.disabled}, .${Xa.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Xa.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(t.palette).filter(Ii()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[r].main}`}}}))]}})),YO=Fe(a_,{name:"MuiInput",slot:"Input",overridesResolver:o_})({}),l_=k.forwardRef(function(e,n){const r=sn({props:e,name:"MuiInput"}),{disableUnderline:s=!1,components:a={},componentsProps:c,fullWidth:u=!1,inputComponent:f="input",multiline:h=!1,slotProps:y,slots:g={},type:v="text",...C}=r,w=HO(r),I={root:{ownerState:{disableUnderline:s}}},E=y??c?on(y??c,I):I,N=g.root??a.Root??GO,B=g.input??a.Input??YO;return $.jsx(VO,{slots:{root:N,input:B},slotProps:E,fullWidth:u,inputComponent:f,multiline:h,ref:n,type:v,...C,classes:w})});l_.muiName="Input";const KO=t=>{const{classes:e}=t;return gn({root:["root"]},r_,e)},QO=$.jsx(l_,{}),Bh=k.forwardRef(function(e,n){const r=sn({name:"MuiNativeSelect",props:e}),{className:s,children:a,classes:c={},IconComponent:u=BO,input:f=QO,inputProps:h,variant:y,...g}=r,v=Ad(),C=Rd({props:r,muiFormControl:v,states:["variant"]}),w={...r,classes:c},_=KO(w),{root:I,...E}=c;return $.jsx(k.Fragment,{children:k.cloneElement(f,{inputComponent:NO,inputProps:{children:a,classes:E,IconComponent:u,variant:C.variant,type:void 0,...h,...f?f.props.inputProps:{}},ref:n,...g,className:ot(_.root,f.props.className,s)})})});Bh.muiName="Select";function ks(t,e){const{className:n,elementType:r,ownerState:s,externalForwardedProps:a,internalForwardedProps:c,shouldForwardComponentProp:u=!1,...f}=e,{component:h,slots:y={[t]:void 0},slotProps:g={[t]:void 0},...v}=a,C=y[t]||r,w=y3(g[t],s),{props:{component:_,...I},internalRef:E}=m3({className:n,...f,externalForwardedProps:t==="root"?v:void 0,externalSlotProps:w}),N=Zs(E,w==null?void 0:w.ref,e.ref),B=t==="root"?_||h:_,R=p3(C,{...t==="root"&&!h&&!y[t]&&c,...t!=="root"&&!y[t]&&c,...I,...B&&!u&&{as:B},...B&&u&&{component:B},ref:N},s);return[C,R]}function XO(t){return mn("MuiPaper",t)}yn("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const JO=t=>{const{square:e,elevation:n,variant:r,classes:s}=t,a={root:["root",r,!e&&"rounded",r==="elevation"&&`elevation${n}`]};return gn(a,XO,s)},qO=Fe("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],!n.square&&e.rounded,n.variant==="elevation"&&e[`elevation${n.elevation}`]]}})(On(({theme:t})=>({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow"),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:t.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(t.vars||t).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),Pd=k.forwardRef(function(e,n){var C;const r=sn({props:e,name:"MuiPaper"}),s=Vm(),{className:a,component:c="div",elevation:u=1,square:f=!1,variant:h="elevation",...y}=r,g={...r,component:c,elevation:u,square:f,variant:h},v=JO(g);return $.jsx(qO,{as:c,ownerState:g,className:ot(v.root,a),ref:n,...y,style:{...h==="elevation"&&{"--Paper-shadow":(s.vars||s).shadows[u],...s.vars&&{"--Paper-overlay":(C=s.vars.overlays)==null?void 0:C[u]},...!s.vars&&s.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${Hr("#fff",wh(u))}, ${Hr("#fff",wh(u))})`}},...y.style}})});function ZO(t){return mn("MuiAlert",t)}const I1=yn("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]);function e5(t){return mn("MuiIconButton",t)}const T1=yn("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),t5=t=>{const{classes:e,disabled:n,color:r,edge:s,size:a,loading:c}=t,u={root:["root",c&&"loading",n&&"disabled",r!=="default"&&`color${Oe(r)}`,s&&`edge${Oe(s)}`,`size${Oe(a)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return gn(u,e5,e)},n5=Fe(e_,{name:"MuiIconButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.loading&&e.loading,n.color!=="default"&&e[`color${Oe(n.color)}`],n.edge&&e[`edge${Oe(n.edge)}`],e[`size${Oe(n.size)}`]]}})(On(({theme:t})=>({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Hr(t.palette.action.active,t.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),On(({theme:t})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(t.palette).filter(Ii()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}})),...Object.entries(t.palette).filter(Ii()).map(([e])=>({props:{color:e},style:{"--IconButton-hoverBg":t.vars?`rgba(${(t.vars||t).palette[e].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Hr((t.vars||t).palette[e].main,t.palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:t.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:t.typography.pxToRem(28)}}],[`&.${T1.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled},[`&.${T1.loading}`]:{color:"transparent"}}))),r5=Fe("span",{name:"MuiIconButton",slot:"LoadingIndicator",overridesResolver:(t,e)=>e.loadingIndicator})(({theme:t})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(t.vars||t).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),i5=k.forwardRef(function(e,n){const r=sn({props:e,name:"MuiIconButton"}),{edge:s=!1,children:a,className:c,color:u="default",disabled:f=!1,disableFocusRipple:h=!1,size:y="medium",id:g,loading:v=null,loadingIndicator:C,...w}=r,_=l2(g),I=C??$.jsx(ny,{"aria-labelledby":_,color:"inherit",size:16}),E={...r,edge:s,color:u,disabled:f,disableFocusRipple:h,loading:v,loadingIndicator:I,size:y},N=t5(E);return $.jsxs(n5,{id:v?_:g,className:ot(N.root,c),centerRipple:!0,focusRipple:!h,disabled:f||v,ref:n,...w,ownerState:E,children:[typeof v=="boolean"&&$.jsx("span",{className:N.loadingWrapper,style:{display:"contents"},children:$.jsx(r5,{className:N.loadingIndicator,ownerState:E,children:v&&I})}),a]})}),o5=ho($.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),s5=ho($.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),a5=ho($.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),l5=ho($.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),c5=ho($.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),u5=t=>{const{variant:e,color:n,severity:r,classes:s}=t,a={root:["root",`color${Oe(n||r)}`,`${e}${Oe(n||r)}`,`${e}`],icon:["icon"],message:["message"],action:["action"]};return gn(a,ZO,s)},d5=Fe(Pd,{name:"MuiAlert",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`${n.variant}${Oe(n.color||n.severity)}`]]}})(On(({theme:t})=>{const e=t.palette.mode==="light"?bl:Sl,n=t.palette.mode==="light"?Sl:bl;return{...t.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(t.palette).filter(Ii(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:t.vars?t.vars.palette.Alert[`${r}Color`]:e(t.palette[r].light,.6),backgroundColor:t.vars?t.vars.palette.Alert[`${r}StandardBg`]:n(t.palette[r].light,.9),[`& .${I1.icon}`]:t.vars?{color:t.vars.palette.Alert[`${r}IconColor`]}:{color:t.palette[r].main}}})),...Object.entries(t.palette).filter(Ii(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:t.vars?t.vars.palette.Alert[`${r}Color`]:e(t.palette[r].light,.6),border:`1px solid ${(t.vars||t).palette[r].light}`,[`& .${I1.icon}`]:t.vars?{color:t.vars.palette.Alert[`${r}IconColor`]}:{color:t.palette[r].main}}})),...Object.entries(t.palette).filter(Ii(["dark"])).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:{fontWeight:t.typography.fontWeightMedium,...t.vars?{color:t.vars.palette.Alert[`${r}FilledColor`],backgroundColor:t.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:t.palette.mode==="dark"?t.palette[r].dark:t.palette[r].main,color:t.palette.getContrastText(t.palette[r].main)}}}))]}})),f5=Fe("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(t,e)=>e.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),p5=Fe("div",{name:"MuiAlert",slot:"Message",overridesResolver:(t,e)=>e.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),h5=Fe("div",{name:"MuiAlert",slot:"Action",overridesResolver:(t,e)=>e.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),k1={success:$.jsx(o5,{fontSize:"inherit"}),warning:$.jsx(s5,{fontSize:"inherit"}),error:$.jsx(a5,{fontSize:"inherit"}),info:$.jsx(l5,{fontSize:"inherit"})},Lh=k.forwardRef(function(e,n){const r=sn({props:e,name:"MuiAlert"}),{action:s,children:a,className:c,closeText:u="Close",color:f,components:h={},componentsProps:y={},icon:g,iconMapping:v=k1,onClose:C,role:w="alert",severity:_="success",slotProps:I={},slots:E={},variant:N="standard",...B}=r,R={...r,color:f,severity:_,variant:N,colorSeverity:f||_},O=u5(R),F={slots:{closeButton:h.CloseButton,closeIcon:h.CloseIcon,...E},slotProps:{...y,...I}},[M,V]=ks("root",{ref:n,shouldForwardComponentProp:!0,className:ot(O.root,c),elementType:d5,externalForwardedProps:{...F,...B},ownerState:R,additionalProps:{role:w,elevation:0}}),[Y,S]=ks("icon",{className:O.icon,elementType:f5,externalForwardedProps:F,ownerState:R}),[j,W]=ks("message",{className:O.message,elementType:p5,externalForwardedProps:F,ownerState:R}),[Q,te]=ks("action",{className:O.action,elementType:h5,externalForwardedProps:F,ownerState:R}),[se,ce]=ks("closeButton",{elementType:i5,externalForwardedProps:F,ownerState:R}),[fe,q]=ks("closeIcon",{elementType:c5,externalForwardedProps:F,ownerState:R});return $.jsxs(M,{...V,children:[g!==!1?$.jsx(Y,{...S,children:g||v[_]||k1[_]}):null,$.jsx(j,{...W,children:a}),s!=null?$.jsx(Q,{...te,children:s}):null,s==null&&C?$.jsx(Q,{...te,children:$.jsx(se,{size:"small","aria-label":u,title:u,color:"inherit",onClick:C,...ce,children:$.jsx(fe,{fontSize:"small",...q})})}):null]})});function m5(t){return mn("MuiFormLabel",t)}const al=yn("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),y5=t=>{const{classes:e,color:n,focused:r,disabled:s,error:a,filled:c,required:u}=t,f={root:["root",`color${Oe(n)}`,s&&"disabled",a&&"error",c&&"filled",r&&"focused",u&&"required"],asterisk:["asterisk",a&&"error"]};return gn(f,m5,e)},g5=Fe("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color==="secondary"&&e.colorSecondary,n.filled&&e.filled]}})(On(({theme:t})=>({color:(t.vars||t).palette.text.secondary,...t.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(t.palette).filter(Ii()).map(([e])=>({props:{color:e},style:{[`&.${al.focused}`]:{color:(t.vars||t).palette[e].main}}})),{props:{},style:{[`&.${al.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${al.error}`]:{color:(t.vars||t).palette.error.main}}}]}))),v5=Fe("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(On(({theme:t})=>({[`&.${al.error}`]:{color:(t.vars||t).palette.error.main}}))),b5=k.forwardRef(function(e,n){const r=sn({props:e,name:"MuiFormLabel"}),{children:s,className:a,color:c,component:u="label",disabled:f,error:h,filled:y,focused:g,required:v,...C}=r,w=Ad(),_=Rd({props:r,muiFormControl:w,states:["color","required","focused","disabled","error","filled"]}),I={...r,color:_.color||"primary",component:u,disabled:_.disabled,error:_.error,filled:_.filled,focused:_.focused,required:_.required},E=y5(I);return $.jsxs(g5,{as:u,ownerState:I,className:ot(E.root,a),ref:n,...C,children:[s,_.required&&$.jsxs(v5,{ownerState:I,"aria-hidden":!0,className:E.asterisk,children:[" ","*"]})]})});function S5(t){return mn("MuiInputLabel",t)}yn("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const _5=t=>{const{classes:e,formControl:n,size:r,shrink:s,disableAnimation:a,variant:c,required:u}=t,f={root:["root",n&&"formControl",!a&&"animated",s&&"shrink",r&&r!=="normal"&&`size${Oe(r)}`,c],asterisk:[u&&"asterisk"]},h=gn(f,S5,e);return{...e,...h}},C5=Fe(b5,{shouldForwardProp:t=>Bl(t)||t==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${al.asterisk}`]:e.asterisk},e.root,n.formControl&&e.formControl,n.size==="small"&&e.sizeSmall,n.shrink&&e.shrink,!n.disableAnimation&&e.animated,n.focused&&e.focused,e[n.variant]]}})(On(({theme:t})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:e})=>e.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:e})=>e.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:e})=>!e.disableAnimation,style:{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:e,ownerState:n})=>e==="filled"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:e,ownerState:n,size:r})=>e==="filled"&&n.shrink&&r==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:e,ownerState:n})=>e==="outlined"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),E1=k.forwardRef(function(e,n){const r=sn({name:"MuiInputLabel",props:e}),{disableAnimation:s=!1,margin:a,shrink:c,variant:u,className:f,...h}=r,y=Ad();let g=c;typeof g>"u"&&y&&(g=y.filled||y.focused||y.adornedStart);const v=Rd({props:r,muiFormControl:y,states:["size","variant","required","focused"]}),C={...r,disableAnimation:s,formControl:y,shrink:g,size:v.size,variant:v.variant,required:v.required,focused:v.focused},w=_5(C);return $.jsx(C5,{"data-shrink":g,ref:n,className:ot(w.root,f),...h,ownerState:C,classes:w})});function w5(t){return mn("MuiFormControl",t)}yn("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const x5=t=>{const{classes:e,margin:n,fullWidth:r}=t,s={root:["root",n!=="none"&&`margin${Oe(n)}`,r&&"fullWidth"]};return gn(s,w5,e)},I5=Fe("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`margin${Oe(n.margin)}`],n.fullWidth&&e.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),R1=k.forwardRef(function(e,n){const r=sn({props:e,name:"MuiFormControl"}),{children:s,className:a,color:c="primary",component:u="div",disabled:f=!1,error:h=!1,focused:y,fullWidth:g=!1,hiddenLabel:v=!1,margin:C="none",required:w=!1,size:_="medium",variant:I="outlined",...E}=r,N={...r,color:c,component:u,disabled:f,error:h,fullWidth:g,hiddenLabel:v,margin:C,required:w,size:_,variant:I},B=x5(N),[R,O]=k.useState(()=>{let se=!1;return s&&k.Children.forEach(s,ce=>{if(!$p(ce,["Input","Select"]))return;const fe=$p(ce,["Select"])?ce.props.input:ce;fe&&zO(fe.props)&&(se=!0)}),se}),[F,M]=k.useState(()=>{let se=!1;return s&&k.Children.forEach(s,ce=>{$p(ce,["Input","Select"])&&(Nh(ce.props,!0)||Nh(ce.props.inputProps,!0))&&(se=!0)}),se}),[V,Y]=k.useState(!1);f&&V&&Y(!1);const S=y!==void 0&&!f?y:V;let j;k.useRef(!1);const W=k.useCallback(()=>{M(!0)},[]),Q=k.useCallback(()=>{M(!1)},[]),te=k.useMemo(()=>({adornedStart:R,setAdornedStart:O,color:c,disabled:f,error:h,filled:F,focused:S,fullWidth:g,hiddenLabel:v,size:_,onBlur:()=>{Y(!1)},onFocus:()=>{Y(!0)},onEmpty:Q,onFilled:W,registerEffect:j,required:w,variant:I}),[R,c,f,h,F,S,g,v,j,Q,W,w,_,I]);return $.jsx(oy.Provider,{value:te,children:$.jsx(I5,{as:u,ownerState:N,className:ot(B.root,a),ref:n,...E,children:s})})}),T5=s2({themeId:Cr});function k5(t){const e=Vm(),n=T5(e.breakpoints.down("sm"));return k.useEffect(()=>{hn.setFrameHeight()},[n]),$.jsx(ry,{direction:n?"column":"row",spacing:2,children:t.children})}const E5=Fe(Us)(({theme:t})=>({position:"relative",[t.breakpoints.down("sm")]:{width:"100%"},width:t.spacing(24),height:t.spacing(16),maxHeight:t.spacing(16),display:"flex",justifyContent:"center",alignItems:"center"})),R5=E5,A5=Fe(Pd)(({theme:t})=>({display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",padding:t.spacing(2),boxSizing:"border-box"})),Fl=A5;function P5(){return $.jsx(Fl,{children:Ll("media_api_not_available")||"Media API not available"})}function O5(){return $.jsx(Fl,{children:Ll("device_ask_permission")||"Please allow the app to use your media devices"})}function M5(t){return $.jsxs(Fl,{children:[Ll("device_access_denied")||"Access denied"," (",t.error.message,")"]})}function D5(t){return $.jsxs(Fl,{children:[Ll("device_not_available")||"Device not available"," (",t.error.message,")"]})}const N5=ho($.jsx("path",{d:"m21 6.5-4 4V7c0-.55-.45-1-1-1H9.82L21 17.18zM3.27 2 2 3.27 4.73 6H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.21 0 .39-.08.54-.18L19.73 21 21 19.73z"}),"VideocamOff"),B5=Fe(Pd)({display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"});function L5(){return $.jsx(B5,{children:$.jsx(N5,{fontSize:"large"})})}const F5=kt.memo(L5),$5=Fe(Us,{shouldForwardProp:t=>t!=="$transparent"})(({theme:t,$transparent:e})=>({margin:0,padding:0,position:"relative","&:before":{position:"absolute",content:'""',width:"100%",height:"100%",opacity:e?0:1,backgroundColor:t.palette.background.default,transition:"opacity 0.3s"}}));function z5(t){const[e,n]=k.useState(!1);return k.useEffect(()=>{const r=setTimeout(()=>{n(!0)},t.time);return()=>clearTimeout(r)},[t.time]),$.jsx($5,{$transparent:e,children:t.children})}const j5=Fe("video")({maxWidth:"100%",maxHeight:"100%"}),U5=j5;function Fh(t){t.getVideoTracks().forEach(e=>e.stop()),t.getAudioTracks().forEach(e=>e.stop())}function V5(t){const e=k.useRef(null);return k.useEffect(()=>{if(t.deviceId==null)return;let n=null,r=!1;return navigator.mediaDevices.getUserMedia({video:{deviceId:t.deviceId},audio:!1}).then(s=>{if(n=s,r){Fh(n);return}e.current&&(e.current.srcObject=n)}),()=>{r=!0,n&&Fh(n)}},[t.deviceId]),$.jsx(U5,{ref:e,autoPlay:!0,muted:!0})}const W5=kt.memo(V5);function A1(t,e){const n=t.map(r=>r.deviceId);if(e&&n.includes(e))return e;if(n.length>0)return n[0]}const H5=(t,e)=>{switch(e.type){case"SET_UNAVAILABLE":return{unavailable:!0,videoInputs:[],audioInputs:[],audioOutputs:[],selectedVideoInputDeviceId:void 0,selectedAudioInputDeviceId:void 0};case"UPDATE_DEVICES":{const n=e.devices,r=n.filter(f=>f.kind==="videoinput"),s=n.filter(f=>f.kind==="audioinput"),a=n.filter(f=>f.kind==="audiooutput"),c=A1(r,t.selectedVideoInputDeviceId),u=A1(s,t.selectedAudioInputDeviceId);return{...t,videoInputs:r,audioInputs:s,audioOutputs:a,selectedVideoInputDeviceId:c,selectedAudioInputDeviceId:u}}case"UPDATE_SELECTED_DEVICE_ID":return{...t,...e.payload}}};function G5(t){const{video:e,audio:n,defaultVideoDeviceId:r,defaultAudioDeviceId:s,onSelect:a}=t,[c,u]=k.useState("WAITING"),[{unavailable:f,videoInputs:h,selectedVideoInputDeviceId:y,audioInputs:g,selectedAudioInputDeviceId:v},C]=k.useReducer(H5,{unavailable:!1,videoInputs:[],audioInputs:[],audioOutputs:[],selectedVideoInputDeviceId:r,selectedAudioInputDeviceId:s}),w=k.useCallback(()=>{var N;if(typeof((N=navigator==null?void 0:navigator.mediaDevices)==null?void 0:N.enumerateDevices)!="function"){C({type:"SET_UNAVAILABLE"});return}return navigator.mediaDevices.enumerateDevices().then(B=>{C({type:"UPDATE_DEVICES",devices:B})})},[]),_=k.useRef({video:r,audio:s});_.current={video:r,audio:s},k.useEffect(()=>{var R;if(typeof((R=navigator==null?void 0:navigator.mediaDevices)==null?void 0:R.getUserMedia)!="function"){C({type:"SET_UNAVAILABLE"});return}u("WAITING");const{video:N,audio:B}=_.current;navigator.mediaDevices.getUserMedia({video:e&&N?{deviceId:N}:e,audio:n&&B?{deviceId:B}:n}).then(async O=>{Fh(O),await w(),u("ALLOWED")}).catch(O=>{u(O)})},[e,n,w]),k.useEffect(()=>{const N=()=>w();return navigator.mediaDevices.ondevicechange=N,()=>{navigator.mediaDevices.ondevicechange===N&&(navigator.mediaDevices.ondevicechange=null)}},[w]);const I=k.useCallback(N=>{C({type:"UPDATE_SELECTED_DEVICE_ID",payload:{selectedVideoInputDeviceId:N.target.value}})},[]),E=k.useCallback(N=>{C({type:"UPDATE_SELECTED_DEVICE_ID",payload:{selectedAudioInputDeviceId:N.target.value}})},[]);if(k.useEffect(()=>{const N=e?h.find(R=>R.deviceId===y):null,B=n?g.find(R=>R.deviceId===v):null;a({video:N==null?void 0:N.deviceId,audio:B==null?void 0:B.deviceId})},[e,n,a,h,g,y,v]),k.useEffect(()=>{setTimeout(()=>hn.setFrameHeight())}),f)return $.jsx(P5,{});if(c==="WAITING")return $.jsx(z5,{time:1e3,children:$.jsx(O5,{})});if(c instanceof Error){const N=c;return N instanceof DOMException&&(N.name==="NotReadableError"||N.name==="NotFoundError")?$.jsx(D5,{error:N}):N instanceof DOMException&&N.name==="NotAllowedError"?$.jsx(M5,{error:N}):$.jsx(Fl,{children:$.jsxs(Lh,{severity:"error",children:[N.name,": ",N.message]})})}return $.jsxs(k5,{children:[$.jsx(R5,{children:e&&y?$.jsx(W5,{deviceId:y}):$.jsx(F5,{})}),$.jsxs(ry,{spacing:2,justifyContent:"center",children:[e&&y&&$.jsxs(R1,{fullWidth:!0,children:[$.jsx(E1,{htmlFor:"device-select-video-input",children:"Video Input"}),$.jsx(Bh,{inputProps:{name:"video-input",id:"device-select-video-input"},value:y,onChange:I,children:h.map(N=>$.jsx("option",{value:N.deviceId,children:N.label},N.deviceId))})]}),n&&v&&$.jsxs(R1,{fullWidth:!0,children:[$.jsx(E1,{htmlFor:"device-select-audio-input",children:"Audio Input"}),$.jsx(Bh,{inputProps:{name:"audio-input",id:"device-select-audio-input"},value:v,onChange:E,children:g.map(N=>$.jsx("option",{value:N.deviceId,children:N.label},N.deviceId))})]})]})]})}function Y5({onClose:t,...e}){return $.jsxs(ry,{spacing:2,children:[$.jsx(G5,{...e}),$.jsx(Us,{children:$.jsx(n_,{variant:"contained",color:"primary",onClick:t,children:"Done"})})]})}function K5(t){var s,a,c,u,f,h,y,g,v,C,w,_,I,E,N,B,R,O,F,M,V,Y,S,j,W,Q,te;k.useEffect(()=>{hn.setFrameHeight()});const e=t.stream.getVideoTracks().length>0,n=k.useCallback(se=>{se&&(se.srcObject=t.stream)},[t.stream]),r=k.useCallback(()=>hn.setFrameHeight(),[]);if(e){const se={hidden:(s=t.userDefinedVideoAttrs)==null?void 0:s.hidden,style:(a=t.userDefinedVideoAttrs)==null?void 0:a.style,autoPlay:(c=t.userDefinedVideoAttrs)==null?void 0:c.autoPlay,controls:(u=t.userDefinedVideoAttrs)==null?void 0:u.controls,controlsList:(f=t.userDefinedVideoAttrs)==null?void 0:f.controlsList,crossOrigin:(h=t.userDefinedVideoAttrs)==null?void 0:h.crossOrigin,loop:(y=t.userDefinedVideoAttrs)==null?void 0:y.loop,mediaGroup:(g=t.userDefinedVideoAttrs)==null?void 0:g.mediaGroup,muted:(v=t.userDefinedVideoAttrs)==null?void 0:v.muted,playsInline:(C=t.userDefinedVideoAttrs)==null?void 0:C.playsInline,preload:(w=t.userDefinedVideoAttrs)==null?void 0:w.preload,height:(_=t.userDefinedVideoAttrs)==null?void 0:_.height,poster:(I=t.userDefinedVideoAttrs)==null?void 0:I.poster,width:(E=t.userDefinedVideoAttrs)==null?void 0:E.width,disablePictureInPicture:(N=t.userDefinedVideoAttrs)==null?void 0:N.disablePictureInPicture,disableRemotePlayback:(B=t.userDefinedVideoAttrs)==null?void 0:B.disableRemotePlayback};return $.jsx("video",{...se,ref:n,onCanPlay:r})}else{const se={hidden:(R=t.userDefinedAudioAttrs)==null?void 0:R.hidden,style:(O=t.userDefinedAudioAttrs)==null?void 0:O.style,autoPlay:(F=t.userDefinedAudioAttrs)==null?void 0:F.autoPlay,controls:(M=t.userDefinedAudioAttrs)==null?void 0:M.controls,controlsList:(V=t.userDefinedAudioAttrs)==null?void 0:V.controlsList,crossOrigin:(Y=t.userDefinedAudioAttrs)==null?void 0:Y.crossOrigin,loop:(S=t.userDefinedAudioAttrs)==null?void 0:S.loop,mediaGroup:(j=t.userDefinedAudioAttrs)==null?void 0:j.mediaGroup,muted:(W=t.userDefinedAudioAttrs)==null?void 0:W.muted,playsInline:(Q=t.userDefinedAudioAttrs)==null?void 0:Q.playsInline,preload:(te=t.userDefinedAudioAttrs)==null?void 0:te.preload};return $.jsx("audio",{ref:n,...se})}}const Q5=kt.memo(K5),X5=ho($.jsx("path",{d:"M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 13H3V5h18z"}),"VideoLabel"),J5=Fe(Pd)(({theme:t})=>({padding:t.spacing(4),display:"flex",justifyContent:"center",alignItems:"center",width:"100%"}));function q5(t){return k.useEffect(()=>{hn.setFrameHeight()}),$.jsx(J5,{elevation:0,children:t.loading?$.jsx(ny,{}):$.jsx(X5,{fontSize:"large"})})}const Z5=kt.memo(q5);function e4(t,e,n){const r=t||{};return e&&(r.video===!0?r.video={deviceId:e}:(typeof r.video=="object"||r.video==null)&&(r.video={...r.video,deviceId:e})),n&&(r.audio===!0?r.audio={deviceId:n}:(typeof r.audio=="object"||r.audio==null)&&(r.audio={...r.audio,deviceId:n})),r}function t4(t){const e=t?!!t.video:!0,n=t?!!t.audio:!0;return{videoEnabled:e,audioEnabled:n}}const n4={webRtcState:"STOPPED",sdpOffer:null,iceCandidates:{},stream:null,error:null},r4=(t,e)=>{switch(e.type){case"SIGNALLING_START":return{...t,webRtcState:"SIGNALLING",stream:null,error:null};case"SET_STREAM":return{...t,stream:e.stream};case"SET_OFFER":return{...t,sdpOffer:e.offer};case"ADD_ICE_CANDIDATE":return{...t,iceCandidates:{...t.iceCandidates,[e.id]:e.candidate}};case"STOPPING":return{...t,webRtcState:"STOPPING",sdpOffer:null,iceCandidates:{}};case"STOPPED":return{...t,webRtcState:"STOPPED",sdpOffer:null,iceCandidates:{},stream:null};case"START_PLAYING":return{...t,webRtcState:"PLAYING",sdpOffer:null,iceCandidates:{}};case"SET_OFFER_ERROR":return{...t,webRtcState:"STOPPED",sdpOffer:null,iceCandidates:{},error:e.error};case"PROCESS_ANSWER_ERROR":return{...t,webRtcState:"STOPPED",sdpOffer:null,iceCandidates:{},error:e.error};case"ERROR":return{...t,webRtcState:"STOPPED",sdpOffer:null,iceCandidates:{},error:e.error}}},i4=t=>(n,r)=>{const s=r4(n,r),a=s.webRtcState==="PLAYING",c=n.webRtcState==="PLAYING",u=a!==c,f=s.sdpOffer,h=n.sdpOffer,y=f!==h,g=s.iceCandidates,v=n.iceCandidates,C=Object.keys(g).length!==Object.keys(v).length;if(u||y||C){const w=Object.fromEntries(Object.entries(g).map(([I,E])=>[I,E.toJSON()])),_={playing:a,sdpOffer:f?f.toJSON():"",iceCandidates:w};console.debug("set component value",_),t(_)}return s};function o4(){const t=k.useRef(new Set),e=k.useCallback(()=>{let r;do r=Math.random().toString(36).substring(2,15);while(t.current.has(r));return t.current.add(r),r},[]),n=k.useCallback(()=>{t.current=new Set},[]);return{get:e,reset:n}}const $h=t=>t==="RECVONLY"||t==="SENDONLY"||t==="SENDRECV",s4=t=>t==="SENDRECV"||t==="RECVONLY",a4=t=>t==="SENDRECV"||t==="SENDONLY",l4=(t,e,n,r,s)=>{k.useEffect(()=>r({playing:!1,sdpOffer:"",iceCandidates:{}}),[]);const a=k.useRef(),c=k.useMemo(()=>i4(r),[r]),[u,f]=k.useReducer(c,n4),h=o4(),y=k.useCallback(()=>{(async()=>{if(u.webRtcState==="STOPPING")return;const w=a.current;if(a.current=void 0,f({type:"STOPPING"}),w!=null)return w.getTransceivers&&w.getTransceivers().forEach(function(_){_.stop&&_.stop()}),w.getSenders().forEach(function(_){var I;(I=_.track)==null||I.stop()}),new Promise(_=>{setTimeout(()=>{w.close(),_()},500)})})().catch(w=>f({type:"ERROR",error:w})).finally(()=>{f({type:"STOPPED"})})},[u.webRtcState]),g=k.useRef(y);g.current=y;const v=k.useCallback(()=>u.webRtcState!=="STOPPED"?Promise.reject(new Error("WebRTC is already started")):(async()=>{f({type:"SIGNALLING_START"}),h.reset();const w=t.mode,_=t.rtcConfiguration||{};console.debug("RTCConfiguration:",_);const I=new RTCPeerConnection(_);if((w==="SENDRECV"||w==="RECVONLY")&&I.addEventListener("track",E=>{const N=E.streams[0];f({type:"SET_STREAM",stream:N})}),w==="SENDRECV"||w==="SENDONLY"){const E=e4(t.mediaStreamConstraints,e,n);if(console.debug("MediaStreamConstraints:",E),E.audio||E.video){if(navigator.mediaDevices==null)throw new Error("navigator.mediaDevices is undefined. It seems the current document is not loaded securely.");if(navigator.mediaDevices.getUserMedia==null)throw new Error("getUserMedia is not implemented in this browser");const N={},B=await navigator.mediaDevices.getUserMedia(E);B.getTracks().forEach(R=>{I.addTrack(R,B);const O=R.kind;if(O!=="video"&&O!=="audio")return;const F=R.getSettings().deviceId;F!=null&&(N[O]=F)}),Object.keys(N).length>0&&s(N)}if(w==="SENDONLY")for(const N of I.getTransceivers())N.direction="sendonly"}else w==="RECVONLY"&&(I.addTransceiver("video",{direction:"recvonly"}),I.addTransceiver("audio",{direction:"recvonly"}));console.debug("transceivers",I.getTransceivers()),I.addEventListener("connectionstatechange",()=>{console.debug("connectionstatechange",I.connectionState),I.connectionState==="connected"?f({type:"START_PLAYING"}):(I.connectionState==="disconnected"||I.connectionState==="closed"||I.connectionState==="failed")&&g.current()}),a.current=I,I.addEventListener("icecandidate",E=>{if(E.candidate){console.debug("icecandidate",E.candidate);const N=h.get();f({type:"ADD_ICE_CANDIDATE",id:N,candidate:E.candidate})}}),I.createOffer().then(E=>I.setLocalDescription(E).then(()=>{const N=I.localDescription;if(N==null)throw new Error("Failed to create an offer SDP");f({type:"SET_OFFER",offer:N})})).catch(E=>{f({type:"SET_OFFER_ERROR",error:E})})})().catch(w=>f({type:"ERROR",error:w})),[n,e,t.mediaStreamConstraints,t.mode,t.rtcConfiguration,u.webRtcState,s]);return k.useEffect(()=>{const C=a.current;if(C==null)return;const w=t.sdpAnswerJson;if(C.remoteDescription==null&&w&&u.webRtcState==="SIGNALLING"){const _=JSON.parse(w);console.debug("Receive answer SDP",_),C.setRemoteDescription(_).catch(I=>{f({type:"PROCESS_ANSWER_ERROR",error:I}),y()})}},[t.sdpAnswerJson,u.webRtcState,y]),k.useEffect(()=>{const C=t.desiredPlayingState;C!=null&&(C===!0&&u.webRtcState==="STOPPED"?v():C===!1&&(u.webRtcState==="SIGNALLING"||u.webRtcState==="PLAYING")&&y())},[t.desiredPlayingState,v,u.webRtcState,y]),{start:v,stop:y,state:u}};function c4(){const[t,e]=k.useState(!1),n=k.useRef(void 0),r=k.useCallback(a=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{e(!0)},a)},[]),s=k.useCallback(()=>{n.current&&clearTimeout(n.current),e(!1)},[]);return k.useEffect(()=>()=>{s()},[s]),{start:r,clear:s,isTimedOut:t}}function u4(t){return hn.setComponentValue(t)}function eh({translationKey:t,defaultText:e,...n}){return $.jsx(n_,{...n,children:Ll(t)||e})}const d4=t=>t.scrollTop;function P1(t,e){const{timeout:n,easing:r,style:s={}}=t;return{duration:s.transitionDuration??(typeof n=="number"?n:n[e.mode]||0),easing:s.transitionTimingFunction??(typeof r=="object"?r[e.mode]:r),delay:s.transitionDelay}}const f4={entering:{opacity:1},entered:{opacity:1}},p4=k.forwardRef(function(e,n){const r=Vm(),s={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:a,appear:c=!0,children:u,easing:f,in:h,onEnter:y,onEntered:g,onEntering:v,onExit:C,onExited:w,onExiting:_,style:I,timeout:E=s,TransitionComponent:N=Ri,...B}=e,R=k.useRef(null),O=Zs(R,g3(u),n),F=te=>se=>{if(te){const ce=R.current;se===void 0?te(ce):te(ce,se)}},M=F(v),V=F((te,se)=>{d4(te);const ce=P1({style:I,timeout:E,easing:f},{mode:"enter"});te.style.webkitTransition=r.transitions.create("opacity",ce),te.style.transition=r.transitions.create("opacity",ce),y&&y(te,se)}),Y=F(g),S=F(_),j=F(te=>{const se=P1({style:I,timeout:E,easing:f},{mode:"exit"});te.style.webkitTransition=r.transitions.create("opacity",se),te.style.transition=r.transitions.create("opacity",se),C&&C(te)}),W=F(w),Q=te=>{a&&a(R.current,te)};return $.jsx(N,{appear:c,in:h,nodeRef:R,onEnter:V,onEntered:Y,onEntering:M,onExit:j,onExited:W,onExiting:S,addEndListener:Q,timeout:E,...B,children:(te,{ownerState:se,...ce})=>k.cloneElement(u,{style:{opacity:0,visibility:te==="exited"&&!h?"hidden":void 0,...f4[te],...I,...u.props.style},ref:O,...ce})})});function h4(t){return k.useEffect(()=>{hn.setFrameHeight()}),$.jsx($.Fragment,{children:t.error?$.jsxs(Lh,{severity:"error",children:[t.error.name,": ",t.error.message]}):t.shouldShowTakingTooLongWarning&&$.jsx(p4,{in:!0,timeout:1e3,children:$.jsx(Lh,{severity:"warning",children:"Taking a while to connect. Are you using a VPN?"})})})}const m4=kt.memo(h4);let c_=!0,u_=!0;function vu(t,e,n){const r=t.match(e);return r&&r.length>=n&&parseInt(r[n],10)}function Go(t,e,n){if(!t.RTCPeerConnection)return;const r=t.RTCPeerConnection.prototype,s=r.addEventListener;r.addEventListener=function(c,u){if(c!==e)return s.apply(this,arguments);const f=h=>{const y=n(h);y&&(u.handleEvent?u.handleEvent(y):u(y))};return this._eventMap=this._eventMap||{},this._eventMap[e]||(this._eventMap[e]=new Map),this._eventMap[e].set(u,f),s.apply(this,[c,f])};const a=r.removeEventListener;r.removeEventListener=function(c,u){if(c!==e||!this._eventMap||!this._eventMap[e])return a.apply(this,arguments);if(!this._eventMap[e].has(u))return a.apply(this,arguments);const f=this._eventMap[e].get(u);return this._eventMap[e].delete(u),this._eventMap[e].size===0&&delete this._eventMap[e],Object.keys(this._eventMap).length===0&&delete this._eventMap,a.apply(this,[c,f])},Object.defineProperty(r,"on"+e,{get(){return this["_on"+e]},set(c){this["_on"+e]&&(this.removeEventListener(e,this["_on"+e]),delete this["_on"+e]),c&&this.addEventListener(e,this["_on"+e]=c)},enumerable:!0,configurable:!0})}function y4(t){return typeof t!="boolean"?new Error("Argument type: "+typeof t+". Please use a boolean."):(c_=t,t?"adapter.js logging disabled":"adapter.js logging enabled")}function g4(t){return typeof t!="boolean"?new Error("Argument type: "+typeof t+". Please use a boolean."):(u_=!t,"adapter.js deprecation warnings "+(t?"disabled":"enabled"))}function d_(){if(typeof window=="object"){if(c_)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function sy(t,e){u_&&console.warn(t+" is deprecated, please use "+e+" instead.")}function v4(t){const e={browser:null,version:null};if(typeof t>"u"||!t.navigator||!t.navigator.userAgent)return e.browser="Not a browser.",e;const{navigator:n}=t;if(n.userAgentData&&n.userAgentData.brands){const r=n.userAgentData.brands.find(s=>s.brand==="Chromium");if(r)return{browser:"chrome",version:parseInt(r.version,10)}}if(n.mozGetUserMedia)e.browser="firefox",e.version=vu(n.userAgent,/Firefox\/(\d+)\./,1);else if(n.webkitGetUserMedia||t.isSecureContext===!1&&t.webkitRTCPeerConnection)e.browser="chrome",e.version=vu(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(t.RTCPeerConnection&&n.userAgent.match(/AppleWebKit\/(\d+)\./))e.browser="safari",e.version=vu(n.userAgent,/AppleWebKit\/(\d+)\./,1),e.supportsUnifiedPlan=t.RTCRtpTransceiver&&"currentDirection"in t.RTCRtpTransceiver.prototype;else return e.browser="Not a supported browser.",e;return e}function O1(t){return Object.prototype.toString.call(t)==="[object Object]"}function f_(t){return O1(t)?Object.keys(t).reduce(function(e,n){const r=O1(t[n]),s=r?f_(t[n]):t[n],a=r&&!Object.keys(s).length;return s===void 0||a?e:Object.assign(e,{[n]:s})},{}):t}function zh(t,e,n){!e||n.has(e.id)||(n.set(e.id,e),Object.keys(e).forEach(r=>{r.endsWith("Id")?zh(t,t.get(e[r]),n):r.endsWith("Ids")&&e[r].forEach(s=>{zh(t,t.get(s),n)})}))}function M1(t,e,n){const r=n?"outbound-rtp":"inbound-rtp",s=new Map;if(e===null)return s;const a=[];return t.forEach(c=>{c.type==="track"&&c.trackIdentifier===e.id&&a.push(c)}),a.forEach(c=>{t.forEach(u=>{u.type===r&&u.trackId===c.id&&zh(t,u,s)})}),s}const D1=d_;function p_(t,e){const n=t&&t.navigator;if(!n.mediaDevices)return;const r=function(u){if(typeof u!="object"||u.mandatory||u.optional)return u;const f={};return Object.keys(u).forEach(h=>{if(h==="require"||h==="advanced"||h==="mediaSource")return;const y=typeof u[h]=="object"?u[h]:{ideal:u[h]};y.exact!==void 0&&typeof y.exact=="number"&&(y.min=y.max=y.exact);const g=function(v,C){return v?v+C.charAt(0).toUpperCase()+C.slice(1):C==="deviceId"?"sourceId":C};if(y.ideal!==void 0){f.optional=f.optional||[];let v={};typeof y.ideal=="number"?(v[g("min",h)]=y.ideal,f.optional.push(v),v={},v[g("max",h)]=y.ideal,f.optional.push(v)):(v[g("",h)]=y.ideal,f.optional.push(v))}y.exact!==void 0&&typeof y.exact!="number"?(f.mandatory=f.mandatory||{},f.mandatory[g("",h)]=y.exact):["min","max"].forEach(v=>{y[v]!==void 0&&(f.mandatory=f.mandatory||{},f.mandatory[g(v,h)]=y[v])})}),u.advanced&&(f.optional=(f.optional||[]).concat(u.advanced)),f},s=function(u,f){if(e.version>=61)return f(u);if(u=JSON.parse(JSON.stringify(u)),u&&typeof u.audio=="object"){const h=function(y,g,v){g in y&&!(v in y)&&(y[v]=y[g],delete y[g])};u=JSON.parse(JSON.stringify(u)),h(u.audio,"autoGainControl","googAutoGainControl"),h(u.audio,"noiseSuppression","googNoiseSuppression"),u.audio=r(u.audio)}if(u&&typeof u.video=="object"){let h=u.video.facingMode;h=h&&(typeof h=="object"?h:{ideal:h});const y=e.version<66;if(h&&(h.exact==="user"||h.exact==="environment"||h.ideal==="user"||h.ideal==="environment")&&!(n.mediaDevices.getSupportedConstraints&&n.mediaDevices.getSupportedConstraints().facingMode&&!y)){delete u.video.facingMode;let g;if(h.exact==="environment"||h.ideal==="environment"?g=["back","rear"]:(h.exact==="user"||h.ideal==="user")&&(g=["front"]),g)return n.mediaDevices.enumerateDevices().then(v=>{v=v.filter(w=>w.kind==="videoinput");let C=v.find(w=>g.some(_=>w.label.toLowerCase().includes(_)));return!C&&v.length&&g.includes("back")&&(C=v[v.length-1]),C&&(u.video.deviceId=h.exact?{exact:C.deviceId}:{ideal:C.deviceId}),u.video=r(u.video),D1("chrome: "+JSON.stringify(u)),f(u)})}u.video=r(u.video)}return D1("chrome: "+JSON.stringify(u)),f(u)},a=function(u){return e.version>=64?u:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[u.name]||u.name,message:u.message,constraint:u.constraint||u.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}},c=function(u,f,h){s(u,y=>{n.webkitGetUserMedia(y,f,g=>{h&&h(a(g))})})};if(n.getUserMedia=c.bind(n),n.mediaDevices.getUserMedia){const u=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(f){return s(f,h=>u(h).then(y=>{if(h.audio&&!y.getAudioTracks().length||h.video&&!y.getVideoTracks().length)throw y.getTracks().forEach(g=>{g.stop()}),new DOMException("","NotFoundError");return y},y=>Promise.reject(a(y))))}}}function h_(t){t.MediaStream=t.MediaStream||t.webkitMediaStream}function m_(t){if(typeof t=="object"&&t.RTCPeerConnection&&!("ontrack"in t.RTCPeerConnection.prototype)){Object.defineProperty(t.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(n){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=n)},enumerable:!0,configurable:!0});const e=t.RTCPeerConnection.prototype.setRemoteDescription;t.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=r=>{r.stream.addEventListener("addtrack",s=>{let a;t.RTCPeerConnection.prototype.getReceivers?a=this.getReceivers().find(u=>u.track&&u.track.id===s.track.id):a={track:s.track};const c=new Event("track");c.track=s.track,c.receiver=a,c.transceiver={receiver:a},c.streams=[r.stream],this.dispatchEvent(c)}),r.stream.getTracks().forEach(s=>{let a;t.RTCPeerConnection.prototype.getReceivers?a=this.getReceivers().find(u=>u.track&&u.track.id===s.id):a={track:s};const c=new Event("track");c.track=s,c.receiver=a,c.transceiver={receiver:a},c.streams=[r.stream],this.dispatchEvent(c)})},this.addEventListener("addstream",this._ontrackpoly)),e.apply(this,arguments)}}else Go(t,"track",e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e))}function y_(t){if(typeof t=="object"&&t.RTCPeerConnection&&!("getSenders"in t.RTCPeerConnection.prototype)&&"createDTMFSender"in t.RTCPeerConnection.prototype){const e=function(s,a){return{track:a,get dtmf(){return this._dtmf===void 0&&(a.kind==="audio"?this._dtmf=s.createDTMFSender(a):this._dtmf=null),this._dtmf},_pc:s}};if(!t.RTCPeerConnection.prototype.getSenders){t.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};const s=t.RTCPeerConnection.prototype.addTrack;t.RTCPeerConnection.prototype.addTrack=function(u,f){let h=s.apply(this,arguments);return h||(h=e(this,u),this._senders.push(h)),h};const a=t.RTCPeerConnection.prototype.removeTrack;t.RTCPeerConnection.prototype.removeTrack=function(u){a.apply(this,arguments);const f=this._senders.indexOf(u);f!==-1&&this._senders.splice(f,1)}}const n=t.RTCPeerConnection.prototype.addStream;t.RTCPeerConnection.prototype.addStream=function(a){this._senders=this._senders||[],n.apply(this,[a]),a.getTracks().forEach(c=>{this._senders.push(e(this,c))})};const r=t.RTCPeerConnection.prototype.removeStream;t.RTCPeerConnection.prototype.removeStream=function(a){this._senders=this._senders||[],r.apply(this,[a]),a.getTracks().forEach(c=>{const u=this._senders.find(f=>f.track===c);u&&this._senders.splice(this._senders.indexOf(u),1)})}}else if(typeof t=="object"&&t.RTCPeerConnection&&"getSenders"in t.RTCPeerConnection.prototype&&"createDTMFSender"in t.RTCPeerConnection.prototype&&t.RTCRtpSender&&!("dtmf"in t.RTCRtpSender.prototype)){const e=t.RTCPeerConnection.prototype.getSenders;t.RTCPeerConnection.prototype.getSenders=function(){const r=e.apply(this,[]);return r.forEach(s=>s._pc=this),r},Object.defineProperty(t.RTCRtpSender.prototype,"dtmf",{get(){return this._dtmf===void 0&&(this.track.kind==="audio"?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function g_(t){if(!(typeof t=="object"&&t.RTCPeerConnection&&t.RTCRtpSender&&t.RTCRtpReceiver))return;if(!("getStats"in t.RTCRtpSender.prototype)){const n=t.RTCPeerConnection.prototype.getSenders;n&&(t.RTCPeerConnection.prototype.getSenders=function(){const a=n.apply(this,[]);return a.forEach(c=>c._pc=this),a});const r=t.RTCPeerConnection.prototype.addTrack;r&&(t.RTCPeerConnection.prototype.addTrack=function(){const a=r.apply(this,arguments);return a._pc=this,a}),t.RTCRtpSender.prototype.getStats=function(){const a=this;return this._pc.getStats().then(c=>M1(c,a.track,!0))}}if(!("getStats"in t.RTCRtpReceiver.prototype)){const n=t.RTCPeerConnection.prototype.getReceivers;n&&(t.RTCPeerConnection.prototype.getReceivers=function(){const s=n.apply(this,[]);return s.forEach(a=>a._pc=this),s}),Go(t,"track",r=>(r.receiver._pc=r.srcElement,r)),t.RTCRtpReceiver.prototype.getStats=function(){const s=this;return this._pc.getStats().then(a=>M1(a,s.track,!1))}}if(!("getStats"in t.RTCRtpSender.prototype&&"getStats"in t.RTCRtpReceiver.prototype))return;const e=t.RTCPeerConnection.prototype.getStats;t.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof t.MediaStreamTrack){const r=arguments[0];let s,a,c;return this.getSenders().forEach(u=>{u.track===r&&(s?c=!0:s=u)}),this.getReceivers().forEach(u=>(u.track===r&&(a?c=!0:a=u),u.track===r)),c||s&&a?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):s?s.getStats():a?a.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return e.apply(this,arguments)}}function v_(t){t.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(c=>this._shimmedLocalStreams[c][0])};const e=t.RTCPeerConnection.prototype.addTrack;t.RTCPeerConnection.prototype.addTrack=function(c,u){if(!u)return e.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const f=e.apply(this,arguments);return this._shimmedLocalStreams[u.id]?this._shimmedLocalStreams[u.id].indexOf(f)===-1&&this._shimmedLocalStreams[u.id].push(f):this._shimmedLocalStreams[u.id]=[u,f],f};const n=t.RTCPeerConnection.prototype.addStream;t.RTCPeerConnection.prototype.addStream=function(c){this._shimmedLocalStreams=this._shimmedLocalStreams||{},c.getTracks().forEach(h=>{if(this.getSenders().find(g=>g.track===h))throw new DOMException("Track already exists.","InvalidAccessError")});const u=this.getSenders();n.apply(this,arguments);const f=this.getSenders().filter(h=>u.indexOf(h)===-1);this._shimmedLocalStreams[c.id]=[c].concat(f)};const r=t.RTCPeerConnection.prototype.removeStream;t.RTCPeerConnection.prototype.removeStream=function(c){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[c.id],r.apply(this,arguments)};const s=t.RTCPeerConnection.prototype.removeTrack;t.RTCPeerConnection.prototype.removeTrack=function(c){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},c&&Object.keys(this._shimmedLocalStreams).forEach(u=>{const f=this._shimmedLocalStreams[u].indexOf(c);f!==-1&&this._shimmedLocalStreams[u].splice(f,1),this._shimmedLocalStreams[u].length===1&&delete this._shimmedLocalStreams[u]}),s.apply(this,arguments)}}function b_(t,e){if(!t.RTCPeerConnection)return;if(t.RTCPeerConnection.prototype.addTrack&&e.version>=65)return v_(t);const n=t.RTCPeerConnection.prototype.getLocalStreams;t.RTCPeerConnection.prototype.getLocalStreams=function(){const y=n.apply(this);return this._reverseStreams=this._reverseStreams||{},y.map(g=>this._reverseStreams[g.id])};const r=t.RTCPeerConnection.prototype.addStream;t.RTCPeerConnection.prototype.addStream=function(y){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},y.getTracks().forEach(g=>{if(this.getSenders().find(C=>C.track===g))throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[y.id]){const g=new t.MediaStream(y.getTracks());this._streams[y.id]=g,this._reverseStreams[g.id]=y,y=g}r.apply(this,[y])};const s=t.RTCPeerConnection.prototype.removeStream;t.RTCPeerConnection.prototype.removeStream=function(y){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},s.apply(this,[this._streams[y.id]||y]),delete this._reverseStreams[this._streams[y.id]?this._streams[y.id].id:y.id],delete this._streams[y.id]},t.RTCPeerConnection.prototype.addTrack=function(y,g){if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const v=[].slice.call(arguments,1);if(v.length!==1||!v[0].getTracks().find(_=>_===y))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find(_=>_.track===y))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const w=this._streams[g.id];if(w)w.addTrack(y),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{const _=new t.MediaStream([y]);this._streams[g.id]=_,this._reverseStreams[_.id]=g,this.addStream(_)}return this.getSenders().find(_=>_.track===y)};function a(h,y){let g=y.sdp;return Object.keys(h._reverseStreams||[]).forEach(v=>{const C=h._reverseStreams[v],w=h._streams[C.id];g=g.replace(new RegExp(w.id,"g"),C.id)}),new RTCSessionDescription({type:y.type,sdp:g})}function c(h,y){let g=y.sdp;return Object.keys(h._reverseStreams||[]).forEach(v=>{const C=h._reverseStreams[v],w=h._streams[C.id];g=g.replace(new RegExp(C.id,"g"),w.id)}),new RTCSessionDescription({type:y.type,sdp:g})}["createOffer","createAnswer"].forEach(function(h){const y=t.RTCPeerConnection.prototype[h],g={[h](){const v=arguments;return arguments.length&&typeof arguments[0]=="function"?y.apply(this,[w=>{const _=a(this,w);v[0].apply(null,[_])},w=>{v[1]&&v[1].apply(null,w)},arguments[2]]):y.apply(this,arguments).then(w=>a(this,w))}};t.RTCPeerConnection.prototype[h]=g[h]});const u=t.RTCPeerConnection.prototype.setLocalDescription;t.RTCPeerConnection.prototype.setLocalDescription=function(){return!arguments.length||!arguments[0].type?u.apply(this,arguments):(arguments[0]=c(this,arguments[0]),u.apply(this,arguments))};const f=Object.getOwnPropertyDescriptor(t.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(t.RTCPeerConnection.prototype,"localDescription",{get(){const h=f.get.apply(this);return h.type===""?h:a(this,h)}}),t.RTCPeerConnection.prototype.removeTrack=function(y){if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!y._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(y._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");this._streams=this._streams||{};let v;Object.keys(this._streams).forEach(C=>{this._streams[C].getTracks().find(_=>y.track===_)&&(v=this._streams[C])}),v&&(v.getTracks().length===1?this.removeStream(this._reverseStreams[v.id]):v.removeTrack(y.track),this.dispatchEvent(new Event("negotiationneeded")))}}function jh(t,e){!t.RTCPeerConnection&&t.webkitRTCPeerConnection&&(t.RTCPeerConnection=t.webkitRTCPeerConnection),t.RTCPeerConnection&&e.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(n){const r=t.RTCPeerConnection.prototype[n],s={[n](){return arguments[0]=new(n==="addIceCandidate"?t.RTCIceCandidate:t.RTCSessionDescription)(arguments[0]),r.apply(this,arguments)}};t.RTCPeerConnection.prototype[n]=s[n]})}function S_(t,e){Go(t,"negotiationneeded",n=>{const r=n.target;if(!((e.version<72||r.getConfiguration&&r.getConfiguration().sdpSemantics==="plan-b")&&r.signalingState!=="stable"))return n})}const N1=Object.freeze(Object.defineProperty({__proto__:null,fixNegotiationNeeded:S_,shimAddTrackRemoveTrack:b_,shimAddTrackRemoveTrackWithNative:v_,shimGetSendersWithDtmf:y_,shimGetUserMedia:p_,shimMediaStream:h_,shimOnTrack:m_,shimPeerConnection:jh,shimSenderReceiverGetStats:g_},Symbol.toStringTag,{value:"Module"}));function __(t,e){const n=t&&t.navigator,r=t&&t.MediaStreamTrack;if(n.getUserMedia=function(s,a,c){sy("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(s).then(a,c)},!(e.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){const s=function(c,u,f){u in c&&!(f in c)&&(c[f]=c[u],delete c[u])},a=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(c){return typeof c=="object"&&typeof c.audio=="object"&&(c=JSON.parse(JSON.stringify(c)),s(c.audio,"autoGainControl","mozAutoGainControl"),s(c.audio,"noiseSuppression","mozNoiseSuppression")),a(c)},r&&r.prototype.getSettings){const c=r.prototype.getSettings;r.prototype.getSettings=function(){const u=c.apply(this,arguments);return s(u,"mozAutoGainControl","autoGainControl"),s(u,"mozNoiseSuppression","noiseSuppression"),u}}if(r&&r.prototype.applyConstraints){const c=r.prototype.applyConstraints;r.prototype.applyConstraints=function(u){return this.kind==="audio"&&typeof u=="object"&&(u=JSON.parse(JSON.stringify(u)),s(u,"autoGainControl","mozAutoGainControl"),s(u,"noiseSuppression","mozNoiseSuppression")),c.apply(this,[u])}}}}function b4(t,e){t.navigator.mediaDevices&&"getDisplayMedia"in t.navigator.mediaDevices||t.navigator.mediaDevices&&(t.navigator.mediaDevices.getDisplayMedia=function(r){if(!(r&&r.video)){const s=new DOMException("getDisplayMedia without video constraints is undefined");return s.name="NotFoundError",s.code=8,Promise.reject(s)}return r.video===!0?r.video={mediaSource:e}:r.video.mediaSource=e,t.navigator.mediaDevices.getUserMedia(r)})}function C_(t){typeof t=="object"&&t.RTCTrackEvent&&"receiver"in t.RTCTrackEvent.prototype&&!("transceiver"in t.RTCTrackEvent.prototype)&&Object.defineProperty(t.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function Uh(t,e){if(typeof t!="object"||!(t.RTCPeerConnection||t.mozRTCPeerConnection))return;!t.RTCPeerConnection&&t.mozRTCPeerConnection&&(t.RTCPeerConnection=t.mozRTCPeerConnection),e.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(s){const a=t.RTCPeerConnection.prototype[s],c={[s](){return arguments[0]=new(s==="addIceCandidate"?t.RTCIceCandidate:t.RTCSessionDescription)(arguments[0]),a.apply(this,arguments)}};t.RTCPeerConnection.prototype[s]=c[s]});const n={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},r=t.RTCPeerConnection.prototype.getStats;t.RTCPeerConnection.prototype.getStats=function(){const[a,c,u]=arguments;return r.apply(this,[a||null]).then(f=>{if(e.version<53&&!c)try{f.forEach(h=>{h.type=n[h.type]||h.type})}catch(h){if(h.name!=="TypeError")throw h;f.forEach((y,g)=>{f.set(g,Object.assign({},y,{type:n[y.type]||y.type}))})}return f}).then(c,u)}}function w_(t){if(!(typeof t=="object"&&t.RTCPeerConnection&&t.RTCRtpSender)||t.RTCRtpSender&&"getStats"in t.RTCRtpSender.prototype)return;const e=t.RTCPeerConnection.prototype.getSenders;e&&(t.RTCPeerConnection.prototype.getSenders=function(){const s=e.apply(this,[]);return s.forEach(a=>a._pc=this),s});const n=t.RTCPeerConnection.prototype.addTrack;n&&(t.RTCPeerConnection.prototype.addTrack=function(){const s=n.apply(this,arguments);return s._pc=this,s}),t.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function x_(t){if(!(typeof t=="object"&&t.RTCPeerConnection&&t.RTCRtpSender)||t.RTCRtpSender&&"getStats"in t.RTCRtpReceiver.prototype)return;const e=t.RTCPeerConnection.prototype.getReceivers;e&&(t.RTCPeerConnection.prototype.getReceivers=function(){const r=e.apply(this,[]);return r.forEach(s=>s._pc=this),r}),Go(t,"track",n=>(n.receiver._pc=n.srcElement,n)),t.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function I_(t){!t.RTCPeerConnection||"removeStream"in t.RTCPeerConnection.prototype||(t.RTCPeerConnection.prototype.removeStream=function(n){sy("removeStream","removeTrack"),this.getSenders().forEach(r=>{r.track&&n.getTracks().includes(r.track)&&this.removeTrack(r)})})}function T_(t){t.DataChannel&&!t.RTCDataChannel&&(t.RTCDataChannel=t.DataChannel)}function k_(t){if(!(typeof t=="object"&&t.RTCPeerConnection))return;const e=t.RTCPeerConnection.prototype.addTransceiver;e&&(t.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let r=arguments[1]&&arguments[1].sendEncodings;r===void 0&&(r=[]),r=[...r];const s=r.length>0;s&&r.forEach(c=>{if("rid"in c&&!/^[a-z0-9]{0,16}$/i.test(c.rid))throw new TypeError("Invalid RID value provided.");if("scaleResolutionDownBy"in c&&!(parseFloat(c.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in c&&!(parseFloat(c.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});const a=e.apply(this,arguments);if(s){const{sender:c}=a,u=c.getParameters();(!("encodings"in u)||u.encodings.length===1&&Object.keys(u.encodings[0]).length===0)&&(u.encodings=r,c.sendEncodings=r,this.setParametersPromises.push(c.setParameters(u).then(()=>{delete c.sendEncodings}).catch(()=>{delete c.sendEncodings})))}return a})}function E_(t){if(!(typeof t=="object"&&t.RTCRtpSender))return;const e=t.RTCRtpSender.prototype.getParameters;e&&(t.RTCRtpSender.prototype.getParameters=function(){const r=e.apply(this,arguments);return"encodings"in r||(r.encodings=[].concat(this.sendEncodings||[{}])),r})}function R_(t){if(!(typeof t=="object"&&t.RTCPeerConnection))return;const e=t.RTCPeerConnection.prototype.createOffer;t.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>e.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):e.apply(this,arguments)}}function A_(t){if(!(typeof t=="object"&&t.RTCPeerConnection))return;const e=t.RTCPeerConnection.prototype.createAnswer;t.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>e.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):e.apply(this,arguments)}}const B1=Object.freeze(Object.defineProperty({__proto__:null,shimAddTransceiver:k_,shimCreateAnswer:A_,shimCreateOffer:R_,shimGetDisplayMedia:b4,shimGetParameters:E_,shimGetUserMedia:__,shimOnTrack:C_,shimPeerConnection:Uh,shimRTCDataChannel:T_,shimReceiverGetStats:x_,shimRemoveStream:I_,shimSenderGetStats:w_},Symbol.toStringTag,{value:"Module"}));function P_(t){if(!(typeof t!="object"||!t.RTCPeerConnection)){if("getLocalStreams"in t.RTCPeerConnection.prototype||(t.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in t.RTCPeerConnection.prototype)){const e=t.RTCPeerConnection.prototype.addTrack;t.RTCPeerConnection.prototype.addStream=function(r){this._localStreams||(this._localStreams=[]),this._localStreams.includes(r)||this._localStreams.push(r),r.getAudioTracks().forEach(s=>e.call(this,s,r)),r.getVideoTracks().forEach(s=>e.call(this,s,r))},t.RTCPeerConnection.prototype.addTrack=function(r,...s){return s&&s.forEach(a=>{this._localStreams?this._localStreams.includes(a)||this._localStreams.push(a):this._localStreams=[a]}),e.apply(this,arguments)}}"removeStream"in t.RTCPeerConnection.prototype||(t.RTCPeerConnection.prototype.removeStream=function(n){this._localStreams||(this._localStreams=[]);const r=this._localStreams.indexOf(n);if(r===-1)return;this._localStreams.splice(r,1);const s=n.getTracks();this.getSenders().forEach(a=>{s.includes(a.track)&&this.removeTrack(a)})})}}function O_(t){if(!(typeof t!="object"||!t.RTCPeerConnection)&&("getRemoteStreams"in t.RTCPeerConnection.prototype||(t.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in t.RTCPeerConnection.prototype))){Object.defineProperty(t.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(n){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=n),this.addEventListener("track",this._onaddstreampoly=r=>{r.streams.forEach(s=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(s))return;this._remoteStreams.push(s);const a=new Event("addstream");a.stream=s,this.dispatchEvent(a)})})}});const e=t.RTCPeerConnection.prototype.setRemoteDescription;t.RTCPeerConnection.prototype.setRemoteDescription=function(){const r=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(s){s.streams.forEach(a=>{if(r._remoteStreams||(r._remoteStreams=[]),r._remoteStreams.indexOf(a)>=0)return;r._remoteStreams.push(a);const c=new Event("addstream");c.stream=a,r.dispatchEvent(c)})}),e.apply(r,arguments)}}}function M_(t){if(typeof t!="object"||!t.RTCPeerConnection)return;const e=t.RTCPeerConnection.prototype,n=e.createOffer,r=e.createAnswer,s=e.setLocalDescription,a=e.setRemoteDescription,c=e.addIceCandidate;e.createOffer=function(h,y){const g=arguments.length>=2?arguments[2]:arguments[0],v=n.apply(this,[g]);return y?(v.then(h,y),Promise.resolve()):v},e.createAnswer=function(h,y){const g=arguments.length>=2?arguments[2]:arguments[0],v=r.apply(this,[g]);return y?(v.then(h,y),Promise.resolve()):v};let u=function(f,h,y){const g=s.apply(this,[f]);return y?(g.then(h,y),Promise.resolve()):g};e.setLocalDescription=u,u=function(f,h,y){const g=a.apply(this,[f]);return y?(g.then(h,y),Promise.resolve()):g},e.setRemoteDescription=u,u=function(f,h,y){const g=c.apply(this,[f]);return y?(g.then(h,y),Promise.resolve()):g},e.addIceCandidate=u}function D_(t){const e=t&&t.navigator;if(e.mediaDevices&&e.mediaDevices.getUserMedia){const n=e.mediaDevices,r=n.getUserMedia.bind(n);e.mediaDevices.getUserMedia=s=>r(N_(s))}!e.getUserMedia&&e.mediaDevices&&e.mediaDevices.getUserMedia&&(e.getUserMedia=(function(r,s,a){e.mediaDevices.getUserMedia(r).then(s,a)}).bind(e))}function N_(t){return t&&t.video!==void 0?Object.assign({},t,{video:f_(t.video)}):t}function B_(t){if(!t.RTCPeerConnection)return;const e=t.RTCPeerConnection;t.RTCPeerConnection=function(r,s){if(r&&r.iceServers){const a=[];for(let c=0;c<r.iceServers.length;c++){let u=r.iceServers[c];u.urls===void 0&&u.url?(sy("RTCIceServer.url","RTCIceServer.urls"),u=JSON.parse(JSON.stringify(u)),u.urls=u.url,delete u.url,a.push(u)):a.push(r.iceServers[c])}r.iceServers=a}return new e(r,s)},t.RTCPeerConnection.prototype=e.prototype,"generateCertificate"in e&&Object.defineProperty(t.RTCPeerConnection,"generateCertificate",{get(){return e.generateCertificate}})}function L_(t){typeof t=="object"&&t.RTCTrackEvent&&"receiver"in t.RTCTrackEvent.prototype&&!("transceiver"in t.RTCTrackEvent.prototype)&&Object.defineProperty(t.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function F_(t){const e=t.RTCPeerConnection.prototype.createOffer;t.RTCPeerConnection.prototype.createOffer=function(r){if(r){typeof r.offerToReceiveAudio<"u"&&(r.offerToReceiveAudio=!!r.offerToReceiveAudio);const s=this.getTransceivers().find(c=>c.receiver.track.kind==="audio");r.offerToReceiveAudio===!1&&s?s.direction==="sendrecv"?s.setDirection?s.setDirection("sendonly"):s.direction="sendonly":s.direction==="recvonly"&&(s.setDirection?s.setDirection("inactive"):s.direction="inactive"):r.offerToReceiveAudio===!0&&!s&&this.addTransceiver("audio",{direction:"recvonly"}),typeof r.offerToReceiveVideo<"u"&&(r.offerToReceiveVideo=!!r.offerToReceiveVideo);const a=this.getTransceivers().find(c=>c.receiver.track.kind==="video");r.offerToReceiveVideo===!1&&a?a.direction==="sendrecv"?a.setDirection?a.setDirection("sendonly"):a.direction="sendonly":a.direction==="recvonly"&&(a.setDirection?a.setDirection("inactive"):a.direction="inactive"):r.offerToReceiveVideo===!0&&!a&&this.addTransceiver("video",{direction:"recvonly"})}return e.apply(this,arguments)}}function $_(t){typeof t!="object"||t.AudioContext||(t.AudioContext=t.webkitAudioContext)}const L1=Object.freeze(Object.defineProperty({__proto__:null,shimAudioContext:$_,shimCallbacksAPI:M_,shimConstraints:N_,shimCreateOfferLegacy:F_,shimGetUserMedia:D_,shimLocalStreamsAPI:P_,shimRTCIceServerUrls:B_,shimRemoteStreamsAPI:O_,shimTrackEventTransceiver:L_},Symbol.toStringTag,{value:"Module"}));var th={exports:{}},F1;function S4(){return F1||(F1=1,function(t){const e={};e.generateIdentifier=function(){return Math.random().toString(36).substring(2,12)},e.localCName=e.generateIdentifier(),e.splitLines=function(n){return n.trim().split(`
|
224
|
+
`&&(R.value+=" ");const M=F.boxSizing,V=ou(F.paddingBottom)+ou(F.paddingTop),Y=ou(F.borderBottomWidth)+ou(F.borderTopWidth),S=R.scrollHeight;R.value="x";const j=R.scrollHeight;let W=S;a&&(W=Math.max(Number(a)*j,W)),s&&(W=Math.min(Number(s)*j,W)),W=Math.max(W,j);const Q=W+(M==="border-box"?V+Y:0),te=Math.abs(W-S)<=1;return{outerHeightStyle:Q,overflowing:te}},[s,a,e.placeholder]),_=sl(()=>{const B=y.current,R=w();if(!B||!R||S1(R))return!1;const O=R.outerHeightStyle;return v.current!=null&&v.current!==O}),I=k.useCallback(()=>{const B=y.current,R=w();if(!B||!R||S1(R))return;const O=R.outerHeightStyle;v.current!==O&&(v.current=O,B.style.height=`${O}px`),B.style.overflow=R.overflowing?"hidden":""},[w]),E=k.useRef(-1);qs(()=>{const B=i3(I),R=y==null?void 0:y.current;if(!R)return;const O=Uv(R);O.addEventListener("resize",B);let F;return typeof ResizeObserver<"u"&&(F=new ResizeObserver(()=>{_()&&(F.unobserve(R),cancelAnimationFrame(E.current),I(),E.current=requestAnimationFrame(()=>{F.observe(R)}))}),F.observe(R)),()=>{B.clear(),cancelAnimationFrame(E.current),O.removeEventListener("resize",B),F&&F.disconnect()}},[w,I,_]),qs(()=>{I()});const N=B=>{h||I(),r&&r(B)};return $.jsxs(k.Fragment,{children:[$.jsx("textarea",{value:u,onChange:N,ref:g,rows:a,style:c,...f}),$.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:C,tabIndex:-1,style:{...LO.shadow,...c,paddingTop:0,paddingBottom:0}})]})});function _1(t){return typeof t=="string"}function C1(t){return t!=null&&!(Array.isArray(t)&&t.length===0)}function Nh(t,e=!1){return t&&(C1(t.value)&&t.value!==""||e&&C1(t.defaultValue)&&t.defaultValue!=="")}function zO(t){return t.startAdornment}function jO(t){return mn("MuiInputBase",t)}const ad=yn("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var w1;const i_=(t,e)=>{const{ownerState:n}=t;return[e.root,n.formControl&&e.formControl,n.startAdornment&&e.adornedStart,n.endAdornment&&e.adornedEnd,n.error&&e.error,n.size==="small"&&e.sizeSmall,n.multiline&&e.multiline,n.color&&e[`color${Oe(n.color)}`],n.fullWidth&&e.fullWidth,n.hiddenLabel&&e.hiddenLabel]},o_=(t,e)=>{const{ownerState:n}=t;return[e.input,n.size==="small"&&e.inputSizeSmall,n.multiline&&e.inputMultiline,n.type==="search"&&e.inputTypeSearch,n.startAdornment&&e.inputAdornedStart,n.endAdornment&&e.inputAdornedEnd,n.hiddenLabel&&e.inputHiddenLabel]},UO=t=>{const{classes:e,color:n,disabled:r,error:s,endAdornment:a,focused:c,formControl:u,fullWidth:f,hiddenLabel:h,multiline:y,readOnly:g,size:v,startAdornment:C,type:w}=t,_={root:["root",`color${Oe(n)}`,r&&"disabled",s&&"error",f&&"fullWidth",c&&"focused",u&&"formControl",v&&v!=="medium"&&`size${Oe(v)}`,y&&"multiline",C&&"adornedStart",a&&"adornedEnd",h&&"hiddenLabel",g&&"readOnly"],input:["input",r&&"disabled",w==="search"&&"inputTypeSearch",y&&"inputMultiline",v==="small"&&"inputSizeSmall",h&&"inputHiddenLabel",C&&"inputAdornedStart",a&&"inputAdornedEnd",g&&"readOnly"]};return gn(_,jO,e)},s_=Fe("div",{name:"MuiInputBase",slot:"Root",overridesResolver:i_})(On(({theme:t})=>({...t.typography.body1,color:(t.vars||t).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${ad.disabled}`]:{color:(t.vars||t).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:e})=>e.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:e,size:n})=>e.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:e})=>e.fullWidth,style:{width:"100%"}}]}))),a_=Fe("input",{name:"MuiInputBase",slot:"Input",overridesResolver:o_})(On(({theme:t})=>{const e=t.palette.mode==="light",n={color:"currentColor",...t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:e?.42:.5},transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})},r={opacity:"0 !important"},s=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:e?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${ad.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":s,"&:focus::-moz-placeholder":s,"&:focus::-ms-input-placeholder":s},[`&.${ad.disabled}`]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},variants:[{props:({ownerState:a})=>!a.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:a})=>a.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),x1=Zm({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),VO=k.forwardRef(function(e,n){const r=sn({props:e,name:"MuiInputBase"}),{"aria-describedby":s,autoComplete:a,autoFocus:c,className:u,color:f,components:h={},componentsProps:y={},defaultValue:g,disabled:v,disableInjectingGlobalStyles:C,endAdornment:w,error:_,fullWidth:I=!1,id:E,inputComponent:N="input",inputProps:B={},inputRef:R,margin:O,maxRows:F,minRows:M,multiline:V=!1,name:Y,onBlur:S,onChange:j,onClick:W,onFocus:Q,onKeyDown:te,onKeyUp:se,placeholder:ce,readOnly:fe,renderSuffix:q,rows:ne,size:re,slotProps:A={},slots:G={},startAdornment:de,type:ge="text",value:De,...xe}=r,$e=B.value!=null?B.value:De,{current:Ne}=k.useRef($e!=null),je=k.useRef(),Lt=k.useCallback(He=>{},[]),ur=Zs(je,R,B.ref,Lt),[dr,Dn]=k.useState(!1),Je=Ad(),Ut=Rd({props:r,muiFormControl:Je,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Ut.focused=Je?Je.focused:dr,k.useEffect(()=>{!Je&&v&&dr&&(Dn(!1),S&&S())},[Je,v,dr,S]);const fr=Je&&Je.onFilled,Qt=Je&&Je.onEmpty,st=k.useCallback(He=>{Nh(He)?fr&&fr():Qt&&Qt()},[fr,Qt]);qs(()=>{Ne&&st({value:$e})},[$e,st,Ne]);const Nn=He=>{Q&&Q(He),B.onFocus&&B.onFocus(He),Je&&Je.onFocus?Je.onFocus(He):Dn(!0)},Xt=He=>{S&&S(He),B.onBlur&&B.onBlur(He),Je&&Je.onBlur?Je.onBlur(He):Dn(!1)},Yn=(He,...Jt)=>{if(!Ne){const ln=He.target||je.current;if(ln==null)throw new Error(oo(1));st({value:ln.value})}B.onChange&&B.onChange(He,...Jt),j&&j(He,...Jt)};k.useEffect(()=>{st(je.current)},[]);const me=He=>{je.current&&He.currentTarget===He.target&&je.current.focus(),W&&W(He)};let Zr=N,an=B;V&&Zr==="input"&&(ne?an={type:void 0,minRows:ne,maxRows:ne,...an}:an={type:void 0,maxRows:F,minRows:M,...an},Zr=$O);const mo=He=>{st(He.animationName==="mui-auto-fill-cancel"?je.current:{value:"x"})};k.useEffect(()=>{Je&&Je.setAdornedStart(!!de)},[Je,de]);const ei={...r,color:Ut.color||"primary",disabled:Ut.disabled,endAdornment:w,error:Ut.error,focused:Ut.focused,formControl:Je,fullWidth:I,hiddenLabel:Ut.hiddenLabel,multiline:V,size:Ut.size,startAdornment:de,type:ge},ti=UO(ei),vt=G.root||h.Root||s_,Et=A.root||y.root||{},wt=G.input||h.Input||a_;return an={...an,...A.input??y.input},$.jsxs(k.Fragment,{children:[!C&&typeof x1=="function"&&(w1||(w1=$.jsx(x1,{}))),$.jsxs(vt,{...Et,ref:n,onClick:me,...xe,...!_1(vt)&&{ownerState:{...ei,...Et.ownerState}},className:ot(ti.root,Et.className,u,fe&&"MuiInputBase-readOnly"),children:[de,$.jsx(oy.Provider,{value:null,children:$.jsx(wt,{"aria-invalid":Ut.error,"aria-describedby":s,autoComplete:a,autoFocus:c,defaultValue:g,disabled:Ut.disabled,id:E,onAnimationStart:mo,name:Y,placeholder:ce,readOnly:fe,required:Ut.required,rows:ne,value:$e,onKeyDown:te,onKeyUp:se,type:ge,...an,...!_1(wt)&&{as:Zr,ownerState:{...ei,...an.ownerState}},ref:ur,className:ot(ti.input,an.className,fe&&"MuiInputBase-readOnly"),onBlur:Xt,onChange:Yn,onFocus:Nn})}),w,q?q({...Ut,startAdornment:de}):null]})]})});function WO(t){return mn("MuiInput",t)}const Xa={...ad,...yn("MuiInput",["root","underline","input"])},HO=t=>{const{classes:e,disableUnderline:n}=t,s=gn({root:["root",!n&&"underline"],input:["input"]},WO,e);return{...e,...s}},GO=Fe(s_,{shouldForwardProp:t=>Bl(t)||t==="classes",name:"MuiInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...i_(t,e),!n.disableUnderline&&e.underline]}})(On(({theme:t})=>{let n=t.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(n=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Xa.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Xa.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Xa.disabled}, .${Xa.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Xa.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(t.palette).filter(Ii()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[r].main}`}}}))]}})),YO=Fe(a_,{name:"MuiInput",slot:"Input",overridesResolver:o_})({}),l_=k.forwardRef(function(e,n){const r=sn({props:e,name:"MuiInput"}),{disableUnderline:s=!1,components:a={},componentsProps:c,fullWidth:u=!1,inputComponent:f="input",multiline:h=!1,slotProps:y,slots:g={},type:v="text",...C}=r,w=HO(r),I={root:{ownerState:{disableUnderline:s}}},E=y??c?on(y??c,I):I,N=g.root??a.Root??GO,B=g.input??a.Input??YO;return $.jsx(VO,{slots:{root:N,input:B},slotProps:E,fullWidth:u,inputComponent:f,multiline:h,ref:n,type:v,...C,classes:w})});l_.muiName="Input";const KO=t=>{const{classes:e}=t;return gn({root:["root"]},r_,e)},QO=$.jsx(l_,{}),Bh=k.forwardRef(function(e,n){const r=sn({name:"MuiNativeSelect",props:e}),{className:s,children:a,classes:c={},IconComponent:u=BO,input:f=QO,inputProps:h,variant:y,...g}=r,v=Ad(),C=Rd({props:r,muiFormControl:v,states:["variant"]}),w={...r,classes:c},_=KO(w),{root:I,...E}=c;return $.jsx(k.Fragment,{children:k.cloneElement(f,{inputComponent:NO,inputProps:{children:a,classes:E,IconComponent:u,variant:C.variant,type:void 0,...h,...f?f.props.inputProps:{}},ref:n,...g,className:ot(_.root,f.props.className,s)})})});Bh.muiName="Select";function ks(t,e){const{className:n,elementType:r,ownerState:s,externalForwardedProps:a,internalForwardedProps:c,shouldForwardComponentProp:u=!1,...f}=e,{component:h,slots:y={[t]:void 0},slotProps:g={[t]:void 0},...v}=a,C=y[t]||r,w=y3(g[t],s),{props:{component:_,...I},internalRef:E}=m3({className:n,...f,externalForwardedProps:t==="root"?v:void 0,externalSlotProps:w}),N=Zs(E,w==null?void 0:w.ref,e.ref),B=t==="root"?_||h:_,R=p3(C,{...t==="root"&&!h&&!y[t]&&c,...t!=="root"&&!y[t]&&c,...I,...B&&!u&&{as:B},...B&&u&&{component:B},ref:N},s);return[C,R]}function XO(t){return mn("MuiPaper",t)}yn("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const JO=t=>{const{square:e,elevation:n,variant:r,classes:s}=t,a={root:["root",r,!e&&"rounded",r==="elevation"&&`elevation${n}`]};return gn(a,XO,s)},qO=Fe("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],!n.square&&e.rounded,n.variant==="elevation"&&e[`elevation${n.elevation}`]]}})(On(({theme:t})=>({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow"),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:t.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(t.vars||t).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),Pd=k.forwardRef(function(e,n){var C;const r=sn({props:e,name:"MuiPaper"}),s=Vm(),{className:a,component:c="div",elevation:u=1,square:f=!1,variant:h="elevation",...y}=r,g={...r,component:c,elevation:u,square:f,variant:h},v=JO(g);return $.jsx(qO,{as:c,ownerState:g,className:ot(v.root,a),ref:n,...y,style:{...h==="elevation"&&{"--Paper-shadow":(s.vars||s).shadows[u],...s.vars&&{"--Paper-overlay":(C=s.vars.overlays)==null?void 0:C[u]},...!s.vars&&s.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${Hr("#fff",wh(u))}, ${Hr("#fff",wh(u))})`}},...y.style}})});function ZO(t){return mn("MuiAlert",t)}const I1=yn("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]);function e5(t){return mn("MuiIconButton",t)}const T1=yn("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),t5=t=>{const{classes:e,disabled:n,color:r,edge:s,size:a,loading:c}=t,u={root:["root",c&&"loading",n&&"disabled",r!=="default"&&`color${Oe(r)}`,s&&`edge${Oe(s)}`,`size${Oe(a)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return gn(u,e5,e)},n5=Fe(e_,{name:"MuiIconButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.loading&&e.loading,n.color!=="default"&&e[`color${Oe(n.color)}`],n.edge&&e[`edge${Oe(n.edge)}`],e[`size${Oe(n.size)}`]]}})(On(({theme:t})=>({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Hr(t.palette.action.active,t.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),On(({theme:t})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(t.palette).filter(Ii()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}})),...Object.entries(t.palette).filter(Ii()).map(([e])=>({props:{color:e},style:{"--IconButton-hoverBg":t.vars?`rgba(${(t.vars||t).palette[e].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Hr((t.vars||t).palette[e].main,t.palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:t.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:t.typography.pxToRem(28)}}],[`&.${T1.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled},[`&.${T1.loading}`]:{color:"transparent"}}))),r5=Fe("span",{name:"MuiIconButton",slot:"LoadingIndicator",overridesResolver:(t,e)=>e.loadingIndicator})(({theme:t})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(t.vars||t).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),i5=k.forwardRef(function(e,n){const r=sn({props:e,name:"MuiIconButton"}),{edge:s=!1,children:a,className:c,color:u="default",disabled:f=!1,disableFocusRipple:h=!1,size:y="medium",id:g,loading:v=null,loadingIndicator:C,...w}=r,_=l2(g),I=C??$.jsx(ny,{"aria-labelledby":_,color:"inherit",size:16}),E={...r,edge:s,color:u,disabled:f,disableFocusRipple:h,loading:v,loadingIndicator:I,size:y},N=t5(E);return $.jsxs(n5,{id:v?_:g,className:ot(N.root,c),centerRipple:!0,focusRipple:!h,disabled:f||v,ref:n,...w,ownerState:E,children:[typeof v=="boolean"&&$.jsx("span",{className:N.loadingWrapper,style:{display:"contents"},children:$.jsx(r5,{className:N.loadingIndicator,ownerState:E,children:v&&I})}),a]})}),o5=ho($.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),s5=ho($.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),a5=ho($.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),l5=ho($.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),c5=ho($.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),u5=t=>{const{variant:e,color:n,severity:r,classes:s}=t,a={root:["root",`color${Oe(n||r)}`,`${e}${Oe(n||r)}`,`${e}`],icon:["icon"],message:["message"],action:["action"]};return gn(a,ZO,s)},d5=Fe(Pd,{name:"MuiAlert",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`${n.variant}${Oe(n.color||n.severity)}`]]}})(On(({theme:t})=>{const e=t.palette.mode==="light"?bl:Sl,n=t.palette.mode==="light"?Sl:bl;return{...t.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(t.palette).filter(Ii(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:t.vars?t.vars.palette.Alert[`${r}Color`]:e(t.palette[r].light,.6),backgroundColor:t.vars?t.vars.palette.Alert[`${r}StandardBg`]:n(t.palette[r].light,.9),[`& .${I1.icon}`]:t.vars?{color:t.vars.palette.Alert[`${r}IconColor`]}:{color:t.palette[r].main}}})),...Object.entries(t.palette).filter(Ii(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:t.vars?t.vars.palette.Alert[`${r}Color`]:e(t.palette[r].light,.6),border:`1px solid ${(t.vars||t).palette[r].light}`,[`& .${I1.icon}`]:t.vars?{color:t.vars.palette.Alert[`${r}IconColor`]}:{color:t.palette[r].main}}})),...Object.entries(t.palette).filter(Ii(["dark"])).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:{fontWeight:t.typography.fontWeightMedium,...t.vars?{color:t.vars.palette.Alert[`${r}FilledColor`],backgroundColor:t.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:t.palette.mode==="dark"?t.palette[r].dark:t.palette[r].main,color:t.palette.getContrastText(t.palette[r].main)}}}))]}})),f5=Fe("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(t,e)=>e.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),p5=Fe("div",{name:"MuiAlert",slot:"Message",overridesResolver:(t,e)=>e.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),h5=Fe("div",{name:"MuiAlert",slot:"Action",overridesResolver:(t,e)=>e.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),k1={success:$.jsx(o5,{fontSize:"inherit"}),warning:$.jsx(s5,{fontSize:"inherit"}),error:$.jsx(a5,{fontSize:"inherit"}),info:$.jsx(l5,{fontSize:"inherit"})},Lh=k.forwardRef(function(e,n){const r=sn({props:e,name:"MuiAlert"}),{action:s,children:a,className:c,closeText:u="Close",color:f,components:h={},componentsProps:y={},icon:g,iconMapping:v=k1,onClose:C,role:w="alert",severity:_="success",slotProps:I={},slots:E={},variant:N="standard",...B}=r,R={...r,color:f,severity:_,variant:N,colorSeverity:f||_},O=u5(R),F={slots:{closeButton:h.CloseButton,closeIcon:h.CloseIcon,...E},slotProps:{...y,...I}},[M,V]=ks("root",{ref:n,shouldForwardComponentProp:!0,className:ot(O.root,c),elementType:d5,externalForwardedProps:{...F,...B},ownerState:R,additionalProps:{role:w,elevation:0}}),[Y,S]=ks("icon",{className:O.icon,elementType:f5,externalForwardedProps:F,ownerState:R}),[j,W]=ks("message",{className:O.message,elementType:p5,externalForwardedProps:F,ownerState:R}),[Q,te]=ks("action",{className:O.action,elementType:h5,externalForwardedProps:F,ownerState:R}),[se,ce]=ks("closeButton",{elementType:i5,externalForwardedProps:F,ownerState:R}),[fe,q]=ks("closeIcon",{elementType:c5,externalForwardedProps:F,ownerState:R});return $.jsxs(M,{...V,children:[g!==!1?$.jsx(Y,{...S,children:g||v[_]||k1[_]}):null,$.jsx(j,{...W,children:a}),s!=null?$.jsx(Q,{...te,children:s}):null,s==null&&C?$.jsx(Q,{...te,children:$.jsx(se,{size:"small","aria-label":u,title:u,color:"inherit",onClick:C,...ce,children:$.jsx(fe,{fontSize:"small",...q})})}):null]})});function m5(t){return mn("MuiFormLabel",t)}const al=yn("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),y5=t=>{const{classes:e,color:n,focused:r,disabled:s,error:a,filled:c,required:u}=t,f={root:["root",`color${Oe(n)}`,s&&"disabled",a&&"error",c&&"filled",r&&"focused",u&&"required"],asterisk:["asterisk",a&&"error"]};return gn(f,m5,e)},g5=Fe("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color==="secondary"&&e.colorSecondary,n.filled&&e.filled]}})(On(({theme:t})=>({color:(t.vars||t).palette.text.secondary,...t.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(t.palette).filter(Ii()).map(([e])=>({props:{color:e},style:{[`&.${al.focused}`]:{color:(t.vars||t).palette[e].main}}})),{props:{},style:{[`&.${al.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${al.error}`]:{color:(t.vars||t).palette.error.main}}}]}))),v5=Fe("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(On(({theme:t})=>({[`&.${al.error}`]:{color:(t.vars||t).palette.error.main}}))),b5=k.forwardRef(function(e,n){const r=sn({props:e,name:"MuiFormLabel"}),{children:s,className:a,color:c,component:u="label",disabled:f,error:h,filled:y,focused:g,required:v,...C}=r,w=Ad(),_=Rd({props:r,muiFormControl:w,states:["color","required","focused","disabled","error","filled"]}),I={...r,color:_.color||"primary",component:u,disabled:_.disabled,error:_.error,filled:_.filled,focused:_.focused,required:_.required},E=y5(I);return $.jsxs(g5,{as:u,ownerState:I,className:ot(E.root,a),ref:n,...C,children:[s,_.required&&$.jsxs(v5,{ownerState:I,"aria-hidden":!0,className:E.asterisk,children:[" ","*"]})]})});function S5(t){return mn("MuiInputLabel",t)}yn("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const _5=t=>{const{classes:e,formControl:n,size:r,shrink:s,disableAnimation:a,variant:c,required:u}=t,f={root:["root",n&&"formControl",!a&&"animated",s&&"shrink",r&&r!=="normal"&&`size${Oe(r)}`,c],asterisk:[u&&"asterisk"]},h=gn(f,S5,e);return{...e,...h}},C5=Fe(b5,{shouldForwardProp:t=>Bl(t)||t==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${al.asterisk}`]:e.asterisk},e.root,n.formControl&&e.formControl,n.size==="small"&&e.sizeSmall,n.shrink&&e.shrink,!n.disableAnimation&&e.animated,n.focused&&e.focused,e[n.variant]]}})(On(({theme:t})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:e})=>e.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:e})=>e.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:e})=>!e.disableAnimation,style:{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:e,ownerState:n})=>e==="filled"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:e,ownerState:n,size:r})=>e==="filled"&&n.shrink&&r==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:e,ownerState:n})=>e==="outlined"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),E1=k.forwardRef(function(e,n){const r=sn({name:"MuiInputLabel",props:e}),{disableAnimation:s=!1,margin:a,shrink:c,variant:u,className:f,...h}=r,y=Ad();let g=c;typeof g>"u"&&y&&(g=y.filled||y.focused||y.adornedStart);const v=Rd({props:r,muiFormControl:y,states:["size","variant","required","focused"]}),C={...r,disableAnimation:s,formControl:y,shrink:g,size:v.size,variant:v.variant,required:v.required,focused:v.focused},w=_5(C);return $.jsx(C5,{"data-shrink":g,ref:n,className:ot(w.root,f),...h,ownerState:C,classes:w})});function w5(t){return mn("MuiFormControl",t)}yn("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const x5=t=>{const{classes:e,margin:n,fullWidth:r}=t,s={root:["root",n!=="none"&&`margin${Oe(n)}`,r&&"fullWidth"]};return gn(s,w5,e)},I5=Fe("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`margin${Oe(n.margin)}`],n.fullWidth&&e.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),R1=k.forwardRef(function(e,n){const r=sn({props:e,name:"MuiFormControl"}),{children:s,className:a,color:c="primary",component:u="div",disabled:f=!1,error:h=!1,focused:y,fullWidth:g=!1,hiddenLabel:v=!1,margin:C="none",required:w=!1,size:_="medium",variant:I="outlined",...E}=r,N={...r,color:c,component:u,disabled:f,error:h,fullWidth:g,hiddenLabel:v,margin:C,required:w,size:_,variant:I},B=x5(N),[R,O]=k.useState(()=>{let se=!1;return s&&k.Children.forEach(s,ce=>{if(!$p(ce,["Input","Select"]))return;const fe=$p(ce,["Select"])?ce.props.input:ce;fe&&zO(fe.props)&&(se=!0)}),se}),[F,M]=k.useState(()=>{let se=!1;return s&&k.Children.forEach(s,ce=>{$p(ce,["Input","Select"])&&(Nh(ce.props,!0)||Nh(ce.props.inputProps,!0))&&(se=!0)}),se}),[V,Y]=k.useState(!1);f&&V&&Y(!1);const S=y!==void 0&&!f?y:V;let j;k.useRef(!1);const W=k.useCallback(()=>{M(!0)},[]),Q=k.useCallback(()=>{M(!1)},[]),te=k.useMemo(()=>({adornedStart:R,setAdornedStart:O,color:c,disabled:f,error:h,filled:F,focused:S,fullWidth:g,hiddenLabel:v,size:_,onBlur:()=>{Y(!1)},onFocus:()=>{Y(!0)},onEmpty:Q,onFilled:W,registerEffect:j,required:w,variant:I}),[R,c,f,h,F,S,g,v,j,Q,W,w,_,I]);return $.jsx(oy.Provider,{value:te,children:$.jsx(I5,{as:u,ownerState:N,className:ot(B.root,a),ref:n,...E,children:s})})}),T5=s2({themeId:Cr});function k5(t){const e=Vm(),n=T5(e.breakpoints.down("sm"));return k.useEffect(()=>{hn.setFrameHeight()},[n]),$.jsx(ry,{direction:n?"column":"row",spacing:2,children:t.children})}const E5=Fe(Us)(({theme:t})=>({position:"relative",[t.breakpoints.down("sm")]:{width:"100%"},width:t.spacing(24),height:t.spacing(16),maxHeight:t.spacing(16),display:"flex",justifyContent:"center",alignItems:"center"})),R5=E5,A5=Fe(Pd)(({theme:t})=>({display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",padding:t.spacing(2),boxSizing:"border-box"})),Fl=A5;function P5(){return $.jsx(Fl,{children:Ll("media_api_not_available")||"Media API not available"})}function O5(){return $.jsx(Fl,{children:Ll("device_ask_permission")||"Please allow the app to use your media devices"})}function M5(t){return $.jsxs(Fl,{children:[Ll("device_access_denied")||"Access denied"," (",t.error.message,")"]})}function D5(t){return $.jsxs(Fl,{children:[Ll("device_not_available")||"Device not available"," (",t.error.message,")"]})}const N5=ho($.jsx("path",{d:"m21 6.5-4 4V7c0-.55-.45-1-1-1H9.82L21 17.18zM3.27 2 2 3.27 4.73 6H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.21 0 .39-.08.54-.18L19.73 21 21 19.73z"}),"VideocamOff"),B5=Fe(Pd)({display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"});function L5(){return $.jsx(B5,{children:$.jsx(N5,{fontSize:"large"})})}const F5=kt.memo(L5),$5=Fe(Us,{shouldForwardProp:t=>t!=="$transparent"})(({theme:t,$transparent:e})=>({margin:0,padding:0,position:"relative","&:before":{position:"absolute",content:'""',width:"100%",height:"100%",opacity:e?0:1,backgroundColor:t.palette.background.default,transition:"opacity 0.3s"}}));function z5(t){const[e,n]=k.useState(!1);return k.useEffect(()=>{const r=setTimeout(()=>{n(!0)},t.time);return()=>clearTimeout(r)},[t.time]),$.jsx($5,{$transparent:e,children:t.children})}const j5=Fe("video")({maxWidth:"100%",maxHeight:"100%"}),U5=j5;function Fh(t){t.getVideoTracks().forEach(e=>e.stop()),t.getAudioTracks().forEach(e=>e.stop())}function V5(t){const e=k.useRef(null);return k.useEffect(()=>{if(t.deviceId==null)return;let n=null,r=!1;return navigator.mediaDevices.getUserMedia({video:{deviceId:t.deviceId},audio:!1}).then(s=>{if(n=s,r){Fh(n);return}e.current&&(e.current.srcObject=n)}),()=>{r=!0,n&&Fh(n)}},[t.deviceId]),$.jsx(U5,{ref:e,autoPlay:!0,muted:!0})}const W5=kt.memo(V5);function A1(t,e){const n=t.map(r=>r.deviceId);if(e&&n.includes(e))return e;if(n.length>0)return n[0]}const H5=(t,e)=>{switch(e.type){case"SET_UNAVAILABLE":return{unavailable:!0,videoInputs:[],audioInputs:[],audioOutputs:[],selectedVideoInputDeviceId:void 0,selectedAudioInputDeviceId:void 0};case"UPDATE_DEVICES":{const n=e.devices,r=n.filter(f=>f.kind==="videoinput"),s=n.filter(f=>f.kind==="audioinput"),a=n.filter(f=>f.kind==="audiooutput"),c=A1(r,t.selectedVideoInputDeviceId),u=A1(s,t.selectedAudioInputDeviceId);return{...t,videoInputs:r,audioInputs:s,audioOutputs:a,selectedVideoInputDeviceId:c,selectedAudioInputDeviceId:u}}case"UPDATE_SELECTED_DEVICE_ID":return{...t,...e.payload}}};function G5(t){const{video:e,audio:n,defaultVideoDeviceId:r,defaultAudioDeviceId:s,onSelect:a}=t,[c,u]=k.useState("WAITING"),[{unavailable:f,videoInputs:h,selectedVideoInputDeviceId:y,audioInputs:g,selectedAudioInputDeviceId:v},C]=k.useReducer(H5,{unavailable:!1,videoInputs:[],audioInputs:[],audioOutputs:[],selectedVideoInputDeviceId:r,selectedAudioInputDeviceId:s}),w=k.useCallback(()=>{var N;if(typeof((N=navigator==null?void 0:navigator.mediaDevices)==null?void 0:N.enumerateDevices)!="function"){C({type:"SET_UNAVAILABLE"});return}return navigator.mediaDevices.enumerateDevices().then(B=>{C({type:"UPDATE_DEVICES",devices:B})})},[]),_=k.useRef({video:r,audio:s});_.current={video:r,audio:s},k.useEffect(()=>{var R;if(typeof((R=navigator==null?void 0:navigator.mediaDevices)==null?void 0:R.getUserMedia)!="function"){C({type:"SET_UNAVAILABLE"});return}u("WAITING");const{video:N,audio:B}=_.current;navigator.mediaDevices.getUserMedia({video:e&&N?{deviceId:N}:e,audio:n&&B?{deviceId:B}:n}).then(async O=>{Fh(O),await w(),u("ALLOWED")}).catch(O=>{u(O)})},[e,n,w]),k.useEffect(()=>{const N=()=>w();return navigator.mediaDevices.ondevicechange=N,()=>{navigator.mediaDevices.ondevicechange===N&&(navigator.mediaDevices.ondevicechange=null)}},[w]);const I=k.useCallback(N=>{C({type:"UPDATE_SELECTED_DEVICE_ID",payload:{selectedVideoInputDeviceId:N.target.value}})},[]),E=k.useCallback(N=>{C({type:"UPDATE_SELECTED_DEVICE_ID",payload:{selectedAudioInputDeviceId:N.target.value}})},[]);if(k.useEffect(()=>{const N=e?h.find(R=>R.deviceId===y):null,B=n?g.find(R=>R.deviceId===v):null;a({video:N==null?void 0:N.deviceId,audio:B==null?void 0:B.deviceId})},[e,n,a,h,g,y,v]),k.useEffect(()=>{setTimeout(()=>hn.setFrameHeight())}),f)return $.jsx(P5,{});if(c==="WAITING")return $.jsx(z5,{time:1e3,children:$.jsx(O5,{})});if(c instanceof Error){const N=c;return N instanceof DOMException&&(N.name==="NotReadableError"||N.name==="NotFoundError")?$.jsx(D5,{error:N}):N instanceof DOMException&&N.name==="NotAllowedError"?$.jsx(M5,{error:N}):$.jsx(Fl,{children:$.jsxs(Lh,{severity:"error",children:[N.name,": ",N.message]})})}return $.jsxs(k5,{children:[$.jsx(R5,{children:e&&y?$.jsx(W5,{deviceId:y}):$.jsx(F5,{})}),$.jsxs(ry,{spacing:2,justifyContent:"center",children:[e&&y&&$.jsxs(R1,{fullWidth:!0,children:[$.jsx(E1,{htmlFor:"device-select-video-input",children:"Video Input"}),$.jsx(Bh,{inputProps:{name:"video-input",id:"device-select-video-input"},value:y,onChange:I,children:h.map(N=>$.jsx("option",{value:N.deviceId,children:N.label},N.deviceId))})]}),n&&v&&$.jsxs(R1,{fullWidth:!0,children:[$.jsx(E1,{htmlFor:"device-select-audio-input",children:"Audio Input"}),$.jsx(Bh,{inputProps:{name:"audio-input",id:"device-select-audio-input"},value:v,onChange:E,children:g.map(N=>$.jsx("option",{value:N.deviceId,children:N.label},N.deviceId))})]})]})]})}function Y5({onClose:t,...e}){return $.jsxs(ry,{spacing:2,children:[$.jsx(G5,{...e}),$.jsx(Us,{children:$.jsx(n_,{variant:"contained",color:"primary",onClick:t,children:"Done"})})]})}function K5(t){var s,a,c,u,f,h,y,g,v,C,w,_,I,E,N,B,R,O,F,M,V,Y,S,j,W,Q,te;k.useEffect(()=>{hn.setFrameHeight()});const e=t.stream.getVideoTracks().length>0,n=k.useCallback(se=>{se&&(se.srcObject=t.stream)},[t.stream]),r=k.useCallback(()=>hn.setFrameHeight(),[]);if(e){const se={hidden:(s=t.userDefinedVideoAttrs)==null?void 0:s.hidden,style:(a=t.userDefinedVideoAttrs)==null?void 0:a.style,autoPlay:(c=t.userDefinedVideoAttrs)==null?void 0:c.autoPlay,controls:(u=t.userDefinedVideoAttrs)==null?void 0:u.controls,controlsList:(f=t.userDefinedVideoAttrs)==null?void 0:f.controlsList,crossOrigin:(h=t.userDefinedVideoAttrs)==null?void 0:h.crossOrigin,loop:(y=t.userDefinedVideoAttrs)==null?void 0:y.loop,mediaGroup:(g=t.userDefinedVideoAttrs)==null?void 0:g.mediaGroup,muted:(v=t.userDefinedVideoAttrs)==null?void 0:v.muted,playsInline:(C=t.userDefinedVideoAttrs)==null?void 0:C.playsInline,preload:(w=t.userDefinedVideoAttrs)==null?void 0:w.preload,height:(_=t.userDefinedVideoAttrs)==null?void 0:_.height,poster:(I=t.userDefinedVideoAttrs)==null?void 0:I.poster,width:(E=t.userDefinedVideoAttrs)==null?void 0:E.width,disablePictureInPicture:(N=t.userDefinedVideoAttrs)==null?void 0:N.disablePictureInPicture,disableRemotePlayback:(B=t.userDefinedVideoAttrs)==null?void 0:B.disableRemotePlayback};return $.jsx("video",{...se,ref:n,onCanPlay:r})}else{const se={hidden:(R=t.userDefinedAudioAttrs)==null?void 0:R.hidden,style:(O=t.userDefinedAudioAttrs)==null?void 0:O.style,autoPlay:(F=t.userDefinedAudioAttrs)==null?void 0:F.autoPlay,controls:(M=t.userDefinedAudioAttrs)==null?void 0:M.controls,controlsList:(V=t.userDefinedAudioAttrs)==null?void 0:V.controlsList,crossOrigin:(Y=t.userDefinedAudioAttrs)==null?void 0:Y.crossOrigin,loop:(S=t.userDefinedAudioAttrs)==null?void 0:S.loop,mediaGroup:(j=t.userDefinedAudioAttrs)==null?void 0:j.mediaGroup,muted:(W=t.userDefinedAudioAttrs)==null?void 0:W.muted,playsInline:(Q=t.userDefinedAudioAttrs)==null?void 0:Q.playsInline,preload:(te=t.userDefinedAudioAttrs)==null?void 0:te.preload};return $.jsx("audio",{ref:n,...se})}}const Q5=kt.memo(K5),X5=ho($.jsx("path",{d:"M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 13H3V5h18z"}),"VideoLabel"),J5=Fe(Pd)(({theme:t})=>({padding:t.spacing(4),display:"flex",justifyContent:"center",alignItems:"center",width:"100%"}));function q5(t){return k.useEffect(()=>{hn.setFrameHeight()}),$.jsx(J5,{elevation:0,children:t.loading?$.jsx(ny,{}):$.jsx(X5,{fontSize:"large"})})}const Z5=kt.memo(q5);function e4(t,e,n){const r=t||{};return e&&(r.video===!0?r.video={deviceId:e}:(typeof r.video=="object"||r.video==null)&&(r.video={...r.video,deviceId:e})),n&&(r.audio===!0?r.audio={deviceId:n}:(typeof r.audio=="object"||r.audio==null)&&(r.audio={...r.audio,deviceId:n})),r}function t4(t){const e=t?!!t.video:!0,n=t?!!t.audio:!0;return{videoEnabled:e,audioEnabled:n}}const n4={webRtcState:"STOPPED",sdpOffer:null,iceCandidates:{},stream:null,error:null},r4=(t,e)=>{switch(e.type){case"SIGNALLING_START":return{...t,webRtcState:"SIGNALLING",stream:null,error:null};case"SET_STREAM":return{...t,stream:e.stream};case"SET_OFFER":return{...t,sdpOffer:e.offer};case"ADD_ICE_CANDIDATE":return{...t,iceCandidates:{...t.iceCandidates,[e.id]:e.candidate}};case"STOPPING":return{...t,webRtcState:"STOPPING",sdpOffer:null,iceCandidates:{}};case"STOPPED":return{...t,webRtcState:"STOPPED",sdpOffer:null,iceCandidates:{},stream:null};case"START_PLAYING":return{...t,webRtcState:"PLAYING",sdpOffer:null,iceCandidates:{}};case"SET_OFFER_ERROR":return{...t,webRtcState:"STOPPED",sdpOffer:null,iceCandidates:{},error:e.error};case"PROCESS_ANSWER_ERROR":return{...t,webRtcState:"STOPPED",sdpOffer:null,iceCandidates:{},error:e.error};case"ERROR":return{...t,webRtcState:"STOPPED",sdpOffer:null,iceCandidates:{},error:e.error}}},i4=t=>(n,r)=>{const s=r4(n,r),a=s.webRtcState==="PLAYING",c=n.webRtcState==="PLAYING",u=a!==c,f=s.sdpOffer,h=n.sdpOffer,y=f!==h,g=s.iceCandidates,v=n.iceCandidates,C=Object.keys(g).length!==Object.keys(v).length;if(u||y||C){const w=Object.fromEntries(Object.entries(g).map(([I,E])=>[I,E.toJSON()])),_={playing:a,sdpOffer:f?f.toJSON():"",iceCandidates:w};console.debug("set component value",_),t(_)}return s};function o4(){const t=k.useRef(new Set),e=k.useCallback(()=>{let r;do r=Math.random().toString(36).substring(2,15);while(t.current.has(r));return t.current.add(r),r},[]),n=k.useCallback(()=>{t.current=new Set},[]);return{get:e,reset:n}}const $h=t=>t==="RECVONLY"||t==="SENDONLY"||t==="SENDRECV",s4=t=>t==="SENDRECV"||t==="RECVONLY",a4=t=>t==="SENDRECV"||t==="SENDONLY",l4=(t,e,n,r,s)=>{k.useEffect(()=>r({playing:!1,sdpOffer:"",iceCandidates:{}}),[]);const a=k.useRef(),c=k.useMemo(()=>i4(r),[r]),[u,f]=k.useReducer(c,n4),h=o4(),y=k.useCallback(()=>{(async()=>{if(u.webRtcState==="STOPPING")return;const w=a.current;if(a.current=void 0,f({type:"STOPPING"}),w!=null)return w.getTransceivers&&w.getTransceivers().forEach(function(_){_.stop&&_.stop()}),w.getSenders().forEach(function(_){var I;(I=_.track)==null||I.stop()}),new Promise(_=>{setTimeout(()=>{w.close(),_()},500)})})().catch(w=>f({type:"ERROR",error:w})).finally(()=>{f({type:"STOPPED"})})},[u.webRtcState]),g=k.useRef(y);g.current=y;const v=k.useCallback(()=>u.webRtcState!=="STOPPED"?Promise.reject(new Error("WebRTC is already started")):(async()=>{f({type:"SIGNALLING_START"}),h.reset();const w=t.mode,_=t.rtcConfiguration||{};console.debug("RTCConfiguration:",_);const I=new RTCPeerConnection(_);if((w==="SENDRECV"||w==="RECVONLY")&&I.addEventListener("track",E=>{const N=E.streams[0];f({type:"SET_STREAM",stream:N})}),w==="SENDRECV"||w==="SENDONLY"){const E=e4(t.mediaStreamConstraints,e,n);if(console.debug("MediaStreamConstraints:",E),E.audio||E.video){if(navigator.mediaDevices==null)throw new Error("navigator.mediaDevices is undefined. It seems the current document is not loaded securely.");if(navigator.mediaDevices.getUserMedia==null)throw new Error("getUserMedia is not implemented in this browser");const N={},B=await navigator.mediaDevices.getUserMedia(E);B.getTracks().forEach(R=>{I.addTrack(R,B);const O=R.kind;if(O!=="video"&&O!=="audio")return;const F=R.getSettings().deviceId;F!=null&&(N[O]=F)}),Object.keys(N).length>0&&s(N)}if(w==="SENDONLY")for(const N of I.getTransceivers())N.direction="sendonly"}else w==="RECVONLY"&&(I.addTransceiver("video",{direction:"recvonly"}),I.addTransceiver("audio",{direction:"recvonly"}));console.debug("transceivers",I.getTransceivers()),I.addEventListener("connectionstatechange",()=>{console.debug("connectionstatechange",I.connectionState),I.connectionState==="connected"?f({type:"START_PLAYING"}):(I.connectionState==="disconnected"||I.connectionState==="closed"||I.connectionState==="failed")&&g.current()}),a.current=I,I.addEventListener("icecandidate",E=>{if(E.candidate){console.debug("icecandidate",E.candidate);const N=h.get();f({type:"ADD_ICE_CANDIDATE",id:N,candidate:E.candidate})}}),I.createOffer().then(E=>I.setLocalDescription(E).then(()=>{const N=I.localDescription;if(N==null)throw new Error("Failed to create an offer SDP");f({type:"SET_OFFER",offer:N})})).catch(E=>{f({type:"SET_OFFER_ERROR",error:E})})})().catch(w=>f({type:"ERROR",error:w})),[n,e,t.mediaStreamConstraints,t.mode,t.rtcConfiguration,u.webRtcState,s,h]);return k.useEffect(()=>{const C=a.current;if(C==null)return;const w=t.sdpAnswerJson;if(C.remoteDescription==null&&w&&u.webRtcState==="SIGNALLING"){const _=JSON.parse(w);console.debug("Receive answer SDP",_),C.setRemoteDescription(_).catch(I=>{f({type:"PROCESS_ANSWER_ERROR",error:I}),y()})}},[t.sdpAnswerJson,u.webRtcState,y]),k.useEffect(()=>{const C=t.desiredPlayingState;C!=null&&(C===!0&&u.webRtcState==="STOPPED"?v():C===!1&&(u.webRtcState==="SIGNALLING"||u.webRtcState==="PLAYING")&&y())},[t.desiredPlayingState,v,u.webRtcState,y]),{start:v,stop:y,state:u}};function c4(){const[t,e]=k.useState(!1),n=k.useRef(void 0),r=k.useCallback(a=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{e(!0)},a)},[]),s=k.useCallback(()=>{n.current&&clearTimeout(n.current),e(!1)},[]);return k.useEffect(()=>()=>{s()},[s]),{start:r,clear:s,isTimedOut:t}}function u4(t){return hn.setComponentValue(t)}function eh({translationKey:t,defaultText:e,...n}){return $.jsx(n_,{...n,children:Ll(t)||e})}const d4=t=>t.scrollTop;function P1(t,e){const{timeout:n,easing:r,style:s={}}=t;return{duration:s.transitionDuration??(typeof n=="number"?n:n[e.mode]||0),easing:s.transitionTimingFunction??(typeof r=="object"?r[e.mode]:r),delay:s.transitionDelay}}const f4={entering:{opacity:1},entered:{opacity:1}},p4=k.forwardRef(function(e,n){const r=Vm(),s={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:a,appear:c=!0,children:u,easing:f,in:h,onEnter:y,onEntered:g,onEntering:v,onExit:C,onExited:w,onExiting:_,style:I,timeout:E=s,TransitionComponent:N=Ri,...B}=e,R=k.useRef(null),O=Zs(R,g3(u),n),F=te=>se=>{if(te){const ce=R.current;se===void 0?te(ce):te(ce,se)}},M=F(v),V=F((te,se)=>{d4(te);const ce=P1({style:I,timeout:E,easing:f},{mode:"enter"});te.style.webkitTransition=r.transitions.create("opacity",ce),te.style.transition=r.transitions.create("opacity",ce),y&&y(te,se)}),Y=F(g),S=F(_),j=F(te=>{const se=P1({style:I,timeout:E,easing:f},{mode:"exit"});te.style.webkitTransition=r.transitions.create("opacity",se),te.style.transition=r.transitions.create("opacity",se),C&&C(te)}),W=F(w),Q=te=>{a&&a(R.current,te)};return $.jsx(N,{appear:c,in:h,nodeRef:R,onEnter:V,onEntered:Y,onEntering:M,onExit:j,onExited:W,onExiting:S,addEndListener:Q,timeout:E,...B,children:(te,{ownerState:se,...ce})=>k.cloneElement(u,{style:{opacity:0,visibility:te==="exited"&&!h?"hidden":void 0,...f4[te],...I,...u.props.style},ref:O,...ce})})});function h4(t){return k.useEffect(()=>{hn.setFrameHeight()}),$.jsx($.Fragment,{children:t.error?$.jsxs(Lh,{severity:"error",children:[t.error.name,": ",t.error.message]}):t.shouldShowTakingTooLongWarning&&$.jsx(p4,{in:!0,timeout:1e3,children:$.jsx(Lh,{severity:"warning",children:"Taking a while to connect. Are you using a VPN?"})})})}const m4=kt.memo(h4);let c_=!0,u_=!0;function vu(t,e,n){const r=t.match(e);return r&&r.length>=n&&parseInt(r[n],10)}function Go(t,e,n){if(!t.RTCPeerConnection)return;const r=t.RTCPeerConnection.prototype,s=r.addEventListener;r.addEventListener=function(c,u){if(c!==e)return s.apply(this,arguments);const f=h=>{const y=n(h);y&&(u.handleEvent?u.handleEvent(y):u(y))};return this._eventMap=this._eventMap||{},this._eventMap[e]||(this._eventMap[e]=new Map),this._eventMap[e].set(u,f),s.apply(this,[c,f])};const a=r.removeEventListener;r.removeEventListener=function(c,u){if(c!==e||!this._eventMap||!this._eventMap[e])return a.apply(this,arguments);if(!this._eventMap[e].has(u))return a.apply(this,arguments);const f=this._eventMap[e].get(u);return this._eventMap[e].delete(u),this._eventMap[e].size===0&&delete this._eventMap[e],Object.keys(this._eventMap).length===0&&delete this._eventMap,a.apply(this,[c,f])},Object.defineProperty(r,"on"+e,{get(){return this["_on"+e]},set(c){this["_on"+e]&&(this.removeEventListener(e,this["_on"+e]),delete this["_on"+e]),c&&this.addEventListener(e,this["_on"+e]=c)},enumerable:!0,configurable:!0})}function y4(t){return typeof t!="boolean"?new Error("Argument type: "+typeof t+". Please use a boolean."):(c_=t,t?"adapter.js logging disabled":"adapter.js logging enabled")}function g4(t){return typeof t!="boolean"?new Error("Argument type: "+typeof t+". Please use a boolean."):(u_=!t,"adapter.js deprecation warnings "+(t?"disabled":"enabled"))}function d_(){if(typeof window=="object"){if(c_)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function sy(t,e){u_&&console.warn(t+" is deprecated, please use "+e+" instead.")}function v4(t){const e={browser:null,version:null};if(typeof t>"u"||!t.navigator||!t.navigator.userAgent)return e.browser="Not a browser.",e;const{navigator:n}=t;if(n.userAgentData&&n.userAgentData.brands){const r=n.userAgentData.brands.find(s=>s.brand==="Chromium");if(r)return{browser:"chrome",version:parseInt(r.version,10)}}if(n.mozGetUserMedia)e.browser="firefox",e.version=vu(n.userAgent,/Firefox\/(\d+)\./,1);else if(n.webkitGetUserMedia||t.isSecureContext===!1&&t.webkitRTCPeerConnection)e.browser="chrome",e.version=vu(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(t.RTCPeerConnection&&n.userAgent.match(/AppleWebKit\/(\d+)\./))e.browser="safari",e.version=vu(n.userAgent,/AppleWebKit\/(\d+)\./,1),e.supportsUnifiedPlan=t.RTCRtpTransceiver&&"currentDirection"in t.RTCRtpTransceiver.prototype;else return e.browser="Not a supported browser.",e;return e}function O1(t){return Object.prototype.toString.call(t)==="[object Object]"}function f_(t){return O1(t)?Object.keys(t).reduce(function(e,n){const r=O1(t[n]),s=r?f_(t[n]):t[n],a=r&&!Object.keys(s).length;return s===void 0||a?e:Object.assign(e,{[n]:s})},{}):t}function zh(t,e,n){!e||n.has(e.id)||(n.set(e.id,e),Object.keys(e).forEach(r=>{r.endsWith("Id")?zh(t,t.get(e[r]),n):r.endsWith("Ids")&&e[r].forEach(s=>{zh(t,t.get(s),n)})}))}function M1(t,e,n){const r=n?"outbound-rtp":"inbound-rtp",s=new Map;if(e===null)return s;const a=[];return t.forEach(c=>{c.type==="track"&&c.trackIdentifier===e.id&&a.push(c)}),a.forEach(c=>{t.forEach(u=>{u.type===r&&u.trackId===c.id&&zh(t,u,s)})}),s}const D1=d_;function p_(t,e){const n=t&&t.navigator;if(!n.mediaDevices)return;const r=function(u){if(typeof u!="object"||u.mandatory||u.optional)return u;const f={};return Object.keys(u).forEach(h=>{if(h==="require"||h==="advanced"||h==="mediaSource")return;const y=typeof u[h]=="object"?u[h]:{ideal:u[h]};y.exact!==void 0&&typeof y.exact=="number"&&(y.min=y.max=y.exact);const g=function(v,C){return v?v+C.charAt(0).toUpperCase()+C.slice(1):C==="deviceId"?"sourceId":C};if(y.ideal!==void 0){f.optional=f.optional||[];let v={};typeof y.ideal=="number"?(v[g("min",h)]=y.ideal,f.optional.push(v),v={},v[g("max",h)]=y.ideal,f.optional.push(v)):(v[g("",h)]=y.ideal,f.optional.push(v))}y.exact!==void 0&&typeof y.exact!="number"?(f.mandatory=f.mandatory||{},f.mandatory[g("",h)]=y.exact):["min","max"].forEach(v=>{y[v]!==void 0&&(f.mandatory=f.mandatory||{},f.mandatory[g(v,h)]=y[v])})}),u.advanced&&(f.optional=(f.optional||[]).concat(u.advanced)),f},s=function(u,f){if(e.version>=61)return f(u);if(u=JSON.parse(JSON.stringify(u)),u&&typeof u.audio=="object"){const h=function(y,g,v){g in y&&!(v in y)&&(y[v]=y[g],delete y[g])};u=JSON.parse(JSON.stringify(u)),h(u.audio,"autoGainControl","googAutoGainControl"),h(u.audio,"noiseSuppression","googNoiseSuppression"),u.audio=r(u.audio)}if(u&&typeof u.video=="object"){let h=u.video.facingMode;h=h&&(typeof h=="object"?h:{ideal:h});const y=e.version<66;if(h&&(h.exact==="user"||h.exact==="environment"||h.ideal==="user"||h.ideal==="environment")&&!(n.mediaDevices.getSupportedConstraints&&n.mediaDevices.getSupportedConstraints().facingMode&&!y)){delete u.video.facingMode;let g;if(h.exact==="environment"||h.ideal==="environment"?g=["back","rear"]:(h.exact==="user"||h.ideal==="user")&&(g=["front"]),g)return n.mediaDevices.enumerateDevices().then(v=>{v=v.filter(w=>w.kind==="videoinput");let C=v.find(w=>g.some(_=>w.label.toLowerCase().includes(_)));return!C&&v.length&&g.includes("back")&&(C=v[v.length-1]),C&&(u.video.deviceId=h.exact?{exact:C.deviceId}:{ideal:C.deviceId}),u.video=r(u.video),D1("chrome: "+JSON.stringify(u)),f(u)})}u.video=r(u.video)}return D1("chrome: "+JSON.stringify(u)),f(u)},a=function(u){return e.version>=64?u:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[u.name]||u.name,message:u.message,constraint:u.constraint||u.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}},c=function(u,f,h){s(u,y=>{n.webkitGetUserMedia(y,f,g=>{h&&h(a(g))})})};if(n.getUserMedia=c.bind(n),n.mediaDevices.getUserMedia){const u=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(f){return s(f,h=>u(h).then(y=>{if(h.audio&&!y.getAudioTracks().length||h.video&&!y.getVideoTracks().length)throw y.getTracks().forEach(g=>{g.stop()}),new DOMException("","NotFoundError");return y},y=>Promise.reject(a(y))))}}}function h_(t){t.MediaStream=t.MediaStream||t.webkitMediaStream}function m_(t){if(typeof t=="object"&&t.RTCPeerConnection&&!("ontrack"in t.RTCPeerConnection.prototype)){Object.defineProperty(t.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(n){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=n)},enumerable:!0,configurable:!0});const e=t.RTCPeerConnection.prototype.setRemoteDescription;t.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=r=>{r.stream.addEventListener("addtrack",s=>{let a;t.RTCPeerConnection.prototype.getReceivers?a=this.getReceivers().find(u=>u.track&&u.track.id===s.track.id):a={track:s.track};const c=new Event("track");c.track=s.track,c.receiver=a,c.transceiver={receiver:a},c.streams=[r.stream],this.dispatchEvent(c)}),r.stream.getTracks().forEach(s=>{let a;t.RTCPeerConnection.prototype.getReceivers?a=this.getReceivers().find(u=>u.track&&u.track.id===s.id):a={track:s};const c=new Event("track");c.track=s,c.receiver=a,c.transceiver={receiver:a},c.streams=[r.stream],this.dispatchEvent(c)})},this.addEventListener("addstream",this._ontrackpoly)),e.apply(this,arguments)}}else Go(t,"track",e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e))}function y_(t){if(typeof t=="object"&&t.RTCPeerConnection&&!("getSenders"in t.RTCPeerConnection.prototype)&&"createDTMFSender"in t.RTCPeerConnection.prototype){const e=function(s,a){return{track:a,get dtmf(){return this._dtmf===void 0&&(a.kind==="audio"?this._dtmf=s.createDTMFSender(a):this._dtmf=null),this._dtmf},_pc:s}};if(!t.RTCPeerConnection.prototype.getSenders){t.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};const s=t.RTCPeerConnection.prototype.addTrack;t.RTCPeerConnection.prototype.addTrack=function(u,f){let h=s.apply(this,arguments);return h||(h=e(this,u),this._senders.push(h)),h};const a=t.RTCPeerConnection.prototype.removeTrack;t.RTCPeerConnection.prototype.removeTrack=function(u){a.apply(this,arguments);const f=this._senders.indexOf(u);f!==-1&&this._senders.splice(f,1)}}const n=t.RTCPeerConnection.prototype.addStream;t.RTCPeerConnection.prototype.addStream=function(a){this._senders=this._senders||[],n.apply(this,[a]),a.getTracks().forEach(c=>{this._senders.push(e(this,c))})};const r=t.RTCPeerConnection.prototype.removeStream;t.RTCPeerConnection.prototype.removeStream=function(a){this._senders=this._senders||[],r.apply(this,[a]),a.getTracks().forEach(c=>{const u=this._senders.find(f=>f.track===c);u&&this._senders.splice(this._senders.indexOf(u),1)})}}else if(typeof t=="object"&&t.RTCPeerConnection&&"getSenders"in t.RTCPeerConnection.prototype&&"createDTMFSender"in t.RTCPeerConnection.prototype&&t.RTCRtpSender&&!("dtmf"in t.RTCRtpSender.prototype)){const e=t.RTCPeerConnection.prototype.getSenders;t.RTCPeerConnection.prototype.getSenders=function(){const r=e.apply(this,[]);return r.forEach(s=>s._pc=this),r},Object.defineProperty(t.RTCRtpSender.prototype,"dtmf",{get(){return this._dtmf===void 0&&(this.track.kind==="audio"?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function g_(t){if(!(typeof t=="object"&&t.RTCPeerConnection&&t.RTCRtpSender&&t.RTCRtpReceiver))return;if(!("getStats"in t.RTCRtpSender.prototype)){const n=t.RTCPeerConnection.prototype.getSenders;n&&(t.RTCPeerConnection.prototype.getSenders=function(){const a=n.apply(this,[]);return a.forEach(c=>c._pc=this),a});const r=t.RTCPeerConnection.prototype.addTrack;r&&(t.RTCPeerConnection.prototype.addTrack=function(){const a=r.apply(this,arguments);return a._pc=this,a}),t.RTCRtpSender.prototype.getStats=function(){const a=this;return this._pc.getStats().then(c=>M1(c,a.track,!0))}}if(!("getStats"in t.RTCRtpReceiver.prototype)){const n=t.RTCPeerConnection.prototype.getReceivers;n&&(t.RTCPeerConnection.prototype.getReceivers=function(){const s=n.apply(this,[]);return s.forEach(a=>a._pc=this),s}),Go(t,"track",r=>(r.receiver._pc=r.srcElement,r)),t.RTCRtpReceiver.prototype.getStats=function(){const s=this;return this._pc.getStats().then(a=>M1(a,s.track,!1))}}if(!("getStats"in t.RTCRtpSender.prototype&&"getStats"in t.RTCRtpReceiver.prototype))return;const e=t.RTCPeerConnection.prototype.getStats;t.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof t.MediaStreamTrack){const r=arguments[0];let s,a,c;return this.getSenders().forEach(u=>{u.track===r&&(s?c=!0:s=u)}),this.getReceivers().forEach(u=>(u.track===r&&(a?c=!0:a=u),u.track===r)),c||s&&a?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):s?s.getStats():a?a.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return e.apply(this,arguments)}}function v_(t){t.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(c=>this._shimmedLocalStreams[c][0])};const e=t.RTCPeerConnection.prototype.addTrack;t.RTCPeerConnection.prototype.addTrack=function(c,u){if(!u)return e.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const f=e.apply(this,arguments);return this._shimmedLocalStreams[u.id]?this._shimmedLocalStreams[u.id].indexOf(f)===-1&&this._shimmedLocalStreams[u.id].push(f):this._shimmedLocalStreams[u.id]=[u,f],f};const n=t.RTCPeerConnection.prototype.addStream;t.RTCPeerConnection.prototype.addStream=function(c){this._shimmedLocalStreams=this._shimmedLocalStreams||{},c.getTracks().forEach(h=>{if(this.getSenders().find(g=>g.track===h))throw new DOMException("Track already exists.","InvalidAccessError")});const u=this.getSenders();n.apply(this,arguments);const f=this.getSenders().filter(h=>u.indexOf(h)===-1);this._shimmedLocalStreams[c.id]=[c].concat(f)};const r=t.RTCPeerConnection.prototype.removeStream;t.RTCPeerConnection.prototype.removeStream=function(c){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[c.id],r.apply(this,arguments)};const s=t.RTCPeerConnection.prototype.removeTrack;t.RTCPeerConnection.prototype.removeTrack=function(c){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},c&&Object.keys(this._shimmedLocalStreams).forEach(u=>{const f=this._shimmedLocalStreams[u].indexOf(c);f!==-1&&this._shimmedLocalStreams[u].splice(f,1),this._shimmedLocalStreams[u].length===1&&delete this._shimmedLocalStreams[u]}),s.apply(this,arguments)}}function b_(t,e){if(!t.RTCPeerConnection)return;if(t.RTCPeerConnection.prototype.addTrack&&e.version>=65)return v_(t);const n=t.RTCPeerConnection.prototype.getLocalStreams;t.RTCPeerConnection.prototype.getLocalStreams=function(){const y=n.apply(this);return this._reverseStreams=this._reverseStreams||{},y.map(g=>this._reverseStreams[g.id])};const r=t.RTCPeerConnection.prototype.addStream;t.RTCPeerConnection.prototype.addStream=function(y){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},y.getTracks().forEach(g=>{if(this.getSenders().find(C=>C.track===g))throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[y.id]){const g=new t.MediaStream(y.getTracks());this._streams[y.id]=g,this._reverseStreams[g.id]=y,y=g}r.apply(this,[y])};const s=t.RTCPeerConnection.prototype.removeStream;t.RTCPeerConnection.prototype.removeStream=function(y){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},s.apply(this,[this._streams[y.id]||y]),delete this._reverseStreams[this._streams[y.id]?this._streams[y.id].id:y.id],delete this._streams[y.id]},t.RTCPeerConnection.prototype.addTrack=function(y,g){if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const v=[].slice.call(arguments,1);if(v.length!==1||!v[0].getTracks().find(_=>_===y))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find(_=>_.track===y))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const w=this._streams[g.id];if(w)w.addTrack(y),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{const _=new t.MediaStream([y]);this._streams[g.id]=_,this._reverseStreams[_.id]=g,this.addStream(_)}return this.getSenders().find(_=>_.track===y)};function a(h,y){let g=y.sdp;return Object.keys(h._reverseStreams||[]).forEach(v=>{const C=h._reverseStreams[v],w=h._streams[C.id];g=g.replace(new RegExp(w.id,"g"),C.id)}),new RTCSessionDescription({type:y.type,sdp:g})}function c(h,y){let g=y.sdp;return Object.keys(h._reverseStreams||[]).forEach(v=>{const C=h._reverseStreams[v],w=h._streams[C.id];g=g.replace(new RegExp(C.id,"g"),w.id)}),new RTCSessionDescription({type:y.type,sdp:g})}["createOffer","createAnswer"].forEach(function(h){const y=t.RTCPeerConnection.prototype[h],g={[h](){const v=arguments;return arguments.length&&typeof arguments[0]=="function"?y.apply(this,[w=>{const _=a(this,w);v[0].apply(null,[_])},w=>{v[1]&&v[1].apply(null,w)},arguments[2]]):y.apply(this,arguments).then(w=>a(this,w))}};t.RTCPeerConnection.prototype[h]=g[h]});const u=t.RTCPeerConnection.prototype.setLocalDescription;t.RTCPeerConnection.prototype.setLocalDescription=function(){return!arguments.length||!arguments[0].type?u.apply(this,arguments):(arguments[0]=c(this,arguments[0]),u.apply(this,arguments))};const f=Object.getOwnPropertyDescriptor(t.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(t.RTCPeerConnection.prototype,"localDescription",{get(){const h=f.get.apply(this);return h.type===""?h:a(this,h)}}),t.RTCPeerConnection.prototype.removeTrack=function(y){if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!y._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(y._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");this._streams=this._streams||{};let v;Object.keys(this._streams).forEach(C=>{this._streams[C].getTracks().find(_=>y.track===_)&&(v=this._streams[C])}),v&&(v.getTracks().length===1?this.removeStream(this._reverseStreams[v.id]):v.removeTrack(y.track),this.dispatchEvent(new Event("negotiationneeded")))}}function jh(t,e){!t.RTCPeerConnection&&t.webkitRTCPeerConnection&&(t.RTCPeerConnection=t.webkitRTCPeerConnection),t.RTCPeerConnection&&e.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(n){const r=t.RTCPeerConnection.prototype[n],s={[n](){return arguments[0]=new(n==="addIceCandidate"?t.RTCIceCandidate:t.RTCSessionDescription)(arguments[0]),r.apply(this,arguments)}};t.RTCPeerConnection.prototype[n]=s[n]})}function S_(t,e){Go(t,"negotiationneeded",n=>{const r=n.target;if(!((e.version<72||r.getConfiguration&&r.getConfiguration().sdpSemantics==="plan-b")&&r.signalingState!=="stable"))return n})}const N1=Object.freeze(Object.defineProperty({__proto__:null,fixNegotiationNeeded:S_,shimAddTrackRemoveTrack:b_,shimAddTrackRemoveTrackWithNative:v_,shimGetSendersWithDtmf:y_,shimGetUserMedia:p_,shimMediaStream:h_,shimOnTrack:m_,shimPeerConnection:jh,shimSenderReceiverGetStats:g_},Symbol.toStringTag,{value:"Module"}));function __(t,e){const n=t&&t.navigator,r=t&&t.MediaStreamTrack;if(n.getUserMedia=function(s,a,c){sy("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(s).then(a,c)},!(e.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){const s=function(c,u,f){u in c&&!(f in c)&&(c[f]=c[u],delete c[u])},a=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(c){return typeof c=="object"&&typeof c.audio=="object"&&(c=JSON.parse(JSON.stringify(c)),s(c.audio,"autoGainControl","mozAutoGainControl"),s(c.audio,"noiseSuppression","mozNoiseSuppression")),a(c)},r&&r.prototype.getSettings){const c=r.prototype.getSettings;r.prototype.getSettings=function(){const u=c.apply(this,arguments);return s(u,"mozAutoGainControl","autoGainControl"),s(u,"mozNoiseSuppression","noiseSuppression"),u}}if(r&&r.prototype.applyConstraints){const c=r.prototype.applyConstraints;r.prototype.applyConstraints=function(u){return this.kind==="audio"&&typeof u=="object"&&(u=JSON.parse(JSON.stringify(u)),s(u,"autoGainControl","mozAutoGainControl"),s(u,"noiseSuppression","mozNoiseSuppression")),c.apply(this,[u])}}}}function b4(t,e){t.navigator.mediaDevices&&"getDisplayMedia"in t.navigator.mediaDevices||t.navigator.mediaDevices&&(t.navigator.mediaDevices.getDisplayMedia=function(r){if(!(r&&r.video)){const s=new DOMException("getDisplayMedia without video constraints is undefined");return s.name="NotFoundError",s.code=8,Promise.reject(s)}return r.video===!0?r.video={mediaSource:e}:r.video.mediaSource=e,t.navigator.mediaDevices.getUserMedia(r)})}function C_(t){typeof t=="object"&&t.RTCTrackEvent&&"receiver"in t.RTCTrackEvent.prototype&&!("transceiver"in t.RTCTrackEvent.prototype)&&Object.defineProperty(t.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function Uh(t,e){if(typeof t!="object"||!(t.RTCPeerConnection||t.mozRTCPeerConnection))return;!t.RTCPeerConnection&&t.mozRTCPeerConnection&&(t.RTCPeerConnection=t.mozRTCPeerConnection),e.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(s){const a=t.RTCPeerConnection.prototype[s],c={[s](){return arguments[0]=new(s==="addIceCandidate"?t.RTCIceCandidate:t.RTCSessionDescription)(arguments[0]),a.apply(this,arguments)}};t.RTCPeerConnection.prototype[s]=c[s]});const n={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},r=t.RTCPeerConnection.prototype.getStats;t.RTCPeerConnection.prototype.getStats=function(){const[a,c,u]=arguments;return r.apply(this,[a||null]).then(f=>{if(e.version<53&&!c)try{f.forEach(h=>{h.type=n[h.type]||h.type})}catch(h){if(h.name!=="TypeError")throw h;f.forEach((y,g)=>{f.set(g,Object.assign({},y,{type:n[y.type]||y.type}))})}return f}).then(c,u)}}function w_(t){if(!(typeof t=="object"&&t.RTCPeerConnection&&t.RTCRtpSender)||t.RTCRtpSender&&"getStats"in t.RTCRtpSender.prototype)return;const e=t.RTCPeerConnection.prototype.getSenders;e&&(t.RTCPeerConnection.prototype.getSenders=function(){const s=e.apply(this,[]);return s.forEach(a=>a._pc=this),s});const n=t.RTCPeerConnection.prototype.addTrack;n&&(t.RTCPeerConnection.prototype.addTrack=function(){const s=n.apply(this,arguments);return s._pc=this,s}),t.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function x_(t){if(!(typeof t=="object"&&t.RTCPeerConnection&&t.RTCRtpSender)||t.RTCRtpSender&&"getStats"in t.RTCRtpReceiver.prototype)return;const e=t.RTCPeerConnection.prototype.getReceivers;e&&(t.RTCPeerConnection.prototype.getReceivers=function(){const r=e.apply(this,[]);return r.forEach(s=>s._pc=this),r}),Go(t,"track",n=>(n.receiver._pc=n.srcElement,n)),t.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function I_(t){!t.RTCPeerConnection||"removeStream"in t.RTCPeerConnection.prototype||(t.RTCPeerConnection.prototype.removeStream=function(n){sy("removeStream","removeTrack"),this.getSenders().forEach(r=>{r.track&&n.getTracks().includes(r.track)&&this.removeTrack(r)})})}function T_(t){t.DataChannel&&!t.RTCDataChannel&&(t.RTCDataChannel=t.DataChannel)}function k_(t){if(!(typeof t=="object"&&t.RTCPeerConnection))return;const e=t.RTCPeerConnection.prototype.addTransceiver;e&&(t.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let r=arguments[1]&&arguments[1].sendEncodings;r===void 0&&(r=[]),r=[...r];const s=r.length>0;s&&r.forEach(c=>{if("rid"in c&&!/^[a-z0-9]{0,16}$/i.test(c.rid))throw new TypeError("Invalid RID value provided.");if("scaleResolutionDownBy"in c&&!(parseFloat(c.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in c&&!(parseFloat(c.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});const a=e.apply(this,arguments);if(s){const{sender:c}=a,u=c.getParameters();(!("encodings"in u)||u.encodings.length===1&&Object.keys(u.encodings[0]).length===0)&&(u.encodings=r,c.sendEncodings=r,this.setParametersPromises.push(c.setParameters(u).then(()=>{delete c.sendEncodings}).catch(()=>{delete c.sendEncodings})))}return a})}function E_(t){if(!(typeof t=="object"&&t.RTCRtpSender))return;const e=t.RTCRtpSender.prototype.getParameters;e&&(t.RTCRtpSender.prototype.getParameters=function(){const r=e.apply(this,arguments);return"encodings"in r||(r.encodings=[].concat(this.sendEncodings||[{}])),r})}function R_(t){if(!(typeof t=="object"&&t.RTCPeerConnection))return;const e=t.RTCPeerConnection.prototype.createOffer;t.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>e.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):e.apply(this,arguments)}}function A_(t){if(!(typeof t=="object"&&t.RTCPeerConnection))return;const e=t.RTCPeerConnection.prototype.createAnswer;t.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>e.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):e.apply(this,arguments)}}const B1=Object.freeze(Object.defineProperty({__proto__:null,shimAddTransceiver:k_,shimCreateAnswer:A_,shimCreateOffer:R_,shimGetDisplayMedia:b4,shimGetParameters:E_,shimGetUserMedia:__,shimOnTrack:C_,shimPeerConnection:Uh,shimRTCDataChannel:T_,shimReceiverGetStats:x_,shimRemoveStream:I_,shimSenderGetStats:w_},Symbol.toStringTag,{value:"Module"}));function P_(t){if(!(typeof t!="object"||!t.RTCPeerConnection)){if("getLocalStreams"in t.RTCPeerConnection.prototype||(t.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in t.RTCPeerConnection.prototype)){const e=t.RTCPeerConnection.prototype.addTrack;t.RTCPeerConnection.prototype.addStream=function(r){this._localStreams||(this._localStreams=[]),this._localStreams.includes(r)||this._localStreams.push(r),r.getAudioTracks().forEach(s=>e.call(this,s,r)),r.getVideoTracks().forEach(s=>e.call(this,s,r))},t.RTCPeerConnection.prototype.addTrack=function(r,...s){return s&&s.forEach(a=>{this._localStreams?this._localStreams.includes(a)||this._localStreams.push(a):this._localStreams=[a]}),e.apply(this,arguments)}}"removeStream"in t.RTCPeerConnection.prototype||(t.RTCPeerConnection.prototype.removeStream=function(n){this._localStreams||(this._localStreams=[]);const r=this._localStreams.indexOf(n);if(r===-1)return;this._localStreams.splice(r,1);const s=n.getTracks();this.getSenders().forEach(a=>{s.includes(a.track)&&this.removeTrack(a)})})}}function O_(t){if(!(typeof t!="object"||!t.RTCPeerConnection)&&("getRemoteStreams"in t.RTCPeerConnection.prototype||(t.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in t.RTCPeerConnection.prototype))){Object.defineProperty(t.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(n){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=n),this.addEventListener("track",this._onaddstreampoly=r=>{r.streams.forEach(s=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(s))return;this._remoteStreams.push(s);const a=new Event("addstream");a.stream=s,this.dispatchEvent(a)})})}});const e=t.RTCPeerConnection.prototype.setRemoteDescription;t.RTCPeerConnection.prototype.setRemoteDescription=function(){const r=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(s){s.streams.forEach(a=>{if(r._remoteStreams||(r._remoteStreams=[]),r._remoteStreams.indexOf(a)>=0)return;r._remoteStreams.push(a);const c=new Event("addstream");c.stream=a,r.dispatchEvent(c)})}),e.apply(r,arguments)}}}function M_(t){if(typeof t!="object"||!t.RTCPeerConnection)return;const e=t.RTCPeerConnection.prototype,n=e.createOffer,r=e.createAnswer,s=e.setLocalDescription,a=e.setRemoteDescription,c=e.addIceCandidate;e.createOffer=function(h,y){const g=arguments.length>=2?arguments[2]:arguments[0],v=n.apply(this,[g]);return y?(v.then(h,y),Promise.resolve()):v},e.createAnswer=function(h,y){const g=arguments.length>=2?arguments[2]:arguments[0],v=r.apply(this,[g]);return y?(v.then(h,y),Promise.resolve()):v};let u=function(f,h,y){const g=s.apply(this,[f]);return y?(g.then(h,y),Promise.resolve()):g};e.setLocalDescription=u,u=function(f,h,y){const g=a.apply(this,[f]);return y?(g.then(h,y),Promise.resolve()):g},e.setRemoteDescription=u,u=function(f,h,y){const g=c.apply(this,[f]);return y?(g.then(h,y),Promise.resolve()):g},e.addIceCandidate=u}function D_(t){const e=t&&t.navigator;if(e.mediaDevices&&e.mediaDevices.getUserMedia){const n=e.mediaDevices,r=n.getUserMedia.bind(n);e.mediaDevices.getUserMedia=s=>r(N_(s))}!e.getUserMedia&&e.mediaDevices&&e.mediaDevices.getUserMedia&&(e.getUserMedia=(function(r,s,a){e.mediaDevices.getUserMedia(r).then(s,a)}).bind(e))}function N_(t){return t&&t.video!==void 0?Object.assign({},t,{video:f_(t.video)}):t}function B_(t){if(!t.RTCPeerConnection)return;const e=t.RTCPeerConnection;t.RTCPeerConnection=function(r,s){if(r&&r.iceServers){const a=[];for(let c=0;c<r.iceServers.length;c++){let u=r.iceServers[c];u.urls===void 0&&u.url?(sy("RTCIceServer.url","RTCIceServer.urls"),u=JSON.parse(JSON.stringify(u)),u.urls=u.url,delete u.url,a.push(u)):a.push(r.iceServers[c])}r.iceServers=a}return new e(r,s)},t.RTCPeerConnection.prototype=e.prototype,"generateCertificate"in e&&Object.defineProperty(t.RTCPeerConnection,"generateCertificate",{get(){return e.generateCertificate}})}function L_(t){typeof t=="object"&&t.RTCTrackEvent&&"receiver"in t.RTCTrackEvent.prototype&&!("transceiver"in t.RTCTrackEvent.prototype)&&Object.defineProperty(t.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function F_(t){const e=t.RTCPeerConnection.prototype.createOffer;t.RTCPeerConnection.prototype.createOffer=function(r){if(r){typeof r.offerToReceiveAudio<"u"&&(r.offerToReceiveAudio=!!r.offerToReceiveAudio);const s=this.getTransceivers().find(c=>c.receiver.track.kind==="audio");r.offerToReceiveAudio===!1&&s?s.direction==="sendrecv"?s.setDirection?s.setDirection("sendonly"):s.direction="sendonly":s.direction==="recvonly"&&(s.setDirection?s.setDirection("inactive"):s.direction="inactive"):r.offerToReceiveAudio===!0&&!s&&this.addTransceiver("audio",{direction:"recvonly"}),typeof r.offerToReceiveVideo<"u"&&(r.offerToReceiveVideo=!!r.offerToReceiveVideo);const a=this.getTransceivers().find(c=>c.receiver.track.kind==="video");r.offerToReceiveVideo===!1&&a?a.direction==="sendrecv"?a.setDirection?a.setDirection("sendonly"):a.direction="sendonly":a.direction==="recvonly"&&(a.setDirection?a.setDirection("inactive"):a.direction="inactive"):r.offerToReceiveVideo===!0&&!a&&this.addTransceiver("video",{direction:"recvonly"})}return e.apply(this,arguments)}}function $_(t){typeof t!="object"||t.AudioContext||(t.AudioContext=t.webkitAudioContext)}const L1=Object.freeze(Object.defineProperty({__proto__:null,shimAudioContext:$_,shimCallbacksAPI:M_,shimConstraints:N_,shimCreateOfferLegacy:F_,shimGetUserMedia:D_,shimLocalStreamsAPI:P_,shimRTCIceServerUrls:B_,shimRemoteStreamsAPI:O_,shimTrackEventTransceiver:L_},Symbol.toStringTag,{value:"Module"}));var th={exports:{}},F1;function S4(){return F1||(F1=1,function(t){const e={};e.generateIdentifier=function(){return Math.random().toString(36).substring(2,12)},e.localCName=e.generateIdentifier(),e.splitLines=function(n){return n.trim().split(`
|
225
225
|
`).map(r=>r.trim())},e.splitSections=function(n){return n.split(`
|
226
226
|
m=`).map((s,a)=>(a>0?"m="+s:s).trim()+`\r
|
227
227
|
`)},e.getDescription=function(n){const r=e.splitSections(n);return r&&r[0]},e.getMediaSections=function(n){const r=e.splitSections(n);return r.shift(),r},e.matchPrefix=function(n,r){return e.splitLines(n).filter(s=>s.indexOf(r)===0)},e.parseCandidate=function(n){let r;n.indexOf("a=candidate:")===0?r=n.substring(12).split(" "):r=n.substring(10).split(" ");const s={foundation:r[0],component:{1:"rtp",2:"rtcp"}[r[1]]||r[1],protocol:r[2].toLowerCase(),priority:parseInt(r[3],10),ip:r[4],address:r[4],port:parseInt(r[5],10),type:r[7]};for(let a=8;a<r.length;a+=2)switch(r[a]){case"raddr":s.relatedAddress=r[a+1];break;case"rport":s.relatedPort=parseInt(r[a+1],10);break;case"tcptype":s.tcpType=r[a+1];break;case"ufrag":s.ufrag=r[a+1],s.usernameFragment=r[a+1];break;default:s[r[a]]===void 0&&(s[r[a]]=r[a+1]);break}return s},e.writeCandidate=function(n){const r=[];r.push(n.foundation);const s=n.component;s==="rtp"?r.push(1):s==="rtcp"?r.push(2):r.push(s),r.push(n.protocol.toUpperCase()),r.push(n.priority),r.push(n.address||n.ip),r.push(n.port);const a=n.type;return r.push("typ"),r.push(a),a!=="host"&&n.relatedAddress&&n.relatedPort&&(r.push("raddr"),r.push(n.relatedAddress),r.push("rport"),r.push(n.relatedPort)),n.tcpType&&n.protocol.toLowerCase()==="tcp"&&(r.push("tcptype"),r.push(n.tcpType)),(n.usernameFragment||n.ufrag)&&(r.push("ufrag"),r.push(n.usernameFragment||n.ufrag)),"candidate:"+r.join(" ")},e.parseIceOptions=function(n){return n.substring(14).split(" ")},e.parseRtpMap=function(n){let r=n.substring(9).split(" ");const s={payloadType:parseInt(r.shift(),10)};return r=r[0].split("/"),s.name=r[0],s.clockRate=parseInt(r[1],10),s.channels=r.length===3?parseInt(r[2],10):1,s.numChannels=s.channels,s},e.writeRtpMap=function(n){let r=n.payloadType;n.preferredPayloadType!==void 0&&(r=n.preferredPayloadType);const s=n.channels||n.numChannels||1;return"a=rtpmap:"+r+" "+n.name+"/"+n.clockRate+(s!==1?"/"+s:"")+`\r
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
7
7
|
<meta name="theme-color" content="#000000" />
|
8
8
|
<meta name="description" content="Streamlit WebRTC Component" />
|
9
|
-
<script type="module" crossorigin src="./assets/index-
|
9
|
+
<script type="module" crossorigin src="./assets/index-DuUNdoqd.js"></script>
|
10
10
|
</head>
|
11
11
|
<body>
|
12
12
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: streamlit-webrtc
|
3
|
-
Version: 0.62.
|
3
|
+
Version: 0.62.3
|
4
4
|
Summary: Real-time video and audio processing on Streamlit
|
5
5
|
Project-URL: Repository, https://github.com/whitphx/streamlit-webrtc
|
6
6
|
Author-email: "Yuichiro Tachibana (Tsuchiya)" <t.yic.yt@gmail.com>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
streamlit_webrtc/__init__.py,sha256=jMWwXoQ9hVyYXPD4Vrps7MyiR9goyC-n7LtkZNFBOxU,2273
|
2
2
|
streamlit_webrtc/_compat.py,sha256=AVRcUGdgWDQcCE7-ufhGr6Hb5P6EHLgejUAA72ArJmg,4384
|
3
|
-
streamlit_webrtc/component.py,sha256=
|
3
|
+
streamlit_webrtc/component.py,sha256=pixNqGXrTlogxXjXx6fSgMx2xPo0dj2fsXKenvWeqQk,28269
|
4
4
|
streamlit_webrtc/components_callbacks.py,sha256=tdrj2TlV8qcexFEdjm4PVkz8JwHffo4A8imoXOtjNHA,2401
|
5
5
|
streamlit_webrtc/config.py,sha256=yKFIVjIoX2F62_G2qcDrNYm2Qe_qx1E9E0YqAnAibMo,5544
|
6
6
|
streamlit_webrtc/credentials.py,sha256=fTs-DhUhScK8m7OEfkgTMw7pKXnS9QNpjtJAvR9oIzs,4619
|
@@ -17,9 +17,9 @@ streamlit_webrtc/session_info.py,sha256=V1EdzD2I8dWANXdC84EKSz8XgPM-zugtkYsb4hJm
|
|
17
17
|
streamlit_webrtc/shutdown.py,sha256=PUjMoNZcTRGzZCooCmjWARpeVs5EG_9JXAf1Iay7dBM,2353
|
18
18
|
streamlit_webrtc/source.py,sha256=haPqMZ50Xh8tg7Z1yN8Frfk8v7D3oOuKteaD59asbzs,2263
|
19
19
|
streamlit_webrtc/webrtc.py,sha256=WzgydYm3Xhoi5c1QHNLc_GiF_E0aGC5ynzmxeAbtJCw,29900
|
20
|
-
streamlit_webrtc/frontend/dist/index.html,sha256=
|
21
|
-
streamlit_webrtc/frontend/dist/assets/index-
|
22
|
-
streamlit_webrtc-0.62.
|
23
|
-
streamlit_webrtc-0.62.
|
24
|
-
streamlit_webrtc-0.62.
|
25
|
-
streamlit_webrtc-0.62.
|
20
|
+
streamlit_webrtc/frontend/dist/index.html,sha256=4NA4vaeFIoF04LTHAeyTGJK4mc_1QSEeoAGKvQNTABY,527
|
21
|
+
streamlit_webrtc/frontend/dist/assets/index-DuUNdoqd.js,sha256=i_jmdQgGab7QtIbCCVzDxeZvy2Xq203Yzzz4vxKNFlw,589801
|
22
|
+
streamlit_webrtc-0.62.3.dist-info/METADATA,sha256=fizHGgOvwEvJ2kzr2vU7-lVWZl294fsN8At3C9g-jDo,18288
|
23
|
+
streamlit_webrtc-0.62.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
24
|
+
streamlit_webrtc-0.62.3.dist-info/licenses/LICENSE,sha256=pwccNHVA7r4rYofGlMU10aKEU90GLUlQr8uY80PR0NQ,1081
|
25
|
+
streamlit_webrtc-0.62.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|