streamlit-webrtc 0.49.0__tar.gz → 0.49.1__tar.gz

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.
Files changed (24) hide show
  1. {streamlit_webrtc-0.49.0 → streamlit_webrtc-0.49.1}/PKG-INFO +1 -1
  2. {streamlit_webrtc-0.49.0 → streamlit_webrtc-0.49.1}/pyproject.toml +3 -3
  3. streamlit_webrtc-0.49.0/streamlit_webrtc/frontend/dist/assets/index-BfANt4tM.js → streamlit_webrtc-0.49.1/streamlit_webrtc/frontend/dist/assets/index-EHnd8JcY.js +2 -2
  4. {streamlit_webrtc-0.49.0 → streamlit_webrtc-0.49.1}/streamlit_webrtc/frontend/dist/index.html +1 -1
  5. {streamlit_webrtc-0.49.0 → streamlit_webrtc-0.49.1}/streamlit_webrtc/models.py +8 -2
  6. {streamlit_webrtc-0.49.0 → streamlit_webrtc-0.49.1}/streamlit_webrtc/process.py +3 -3
  7. {streamlit_webrtc-0.49.0 → streamlit_webrtc-0.49.1}/LICENSE +0 -0
  8. {streamlit_webrtc-0.49.0 → streamlit_webrtc-0.49.1}/README.md +0 -0
  9. {streamlit_webrtc-0.49.0 → streamlit_webrtc-0.49.1}/streamlit_webrtc/__init__.py +0 -0
  10. {streamlit_webrtc-0.49.0 → streamlit_webrtc-0.49.1}/streamlit_webrtc/_compat.py +0 -0
  11. {streamlit_webrtc-0.49.0 → streamlit_webrtc-0.49.1}/streamlit_webrtc/component.py +0 -0
  12. {streamlit_webrtc-0.49.0 → streamlit_webrtc-0.49.1}/streamlit_webrtc/components_callbacks.py +0 -0
  13. {streamlit_webrtc-0.49.0 → streamlit_webrtc-0.49.1}/streamlit_webrtc/config.py +0 -0
  14. {streamlit_webrtc-0.49.0 → streamlit_webrtc-0.49.1}/streamlit_webrtc/eventloop.py +0 -0
  15. {streamlit_webrtc-0.49.0 → streamlit_webrtc-0.49.1}/streamlit_webrtc/factory.py +0 -0
  16. {streamlit_webrtc-0.49.0 → streamlit_webrtc-0.49.1}/streamlit_webrtc/mix.py +0 -0
  17. {streamlit_webrtc-0.49.0 → streamlit_webrtc-0.49.1}/streamlit_webrtc/py.typed +0 -0
  18. {streamlit_webrtc-0.49.0 → streamlit_webrtc-0.49.1}/streamlit_webrtc/receive.py +0 -0
  19. {streamlit_webrtc-0.49.0 → streamlit_webrtc-0.49.1}/streamlit_webrtc/relay.py +0 -0
  20. {streamlit_webrtc-0.49.0 → streamlit_webrtc-0.49.1}/streamlit_webrtc/server.py +0 -0
  21. {streamlit_webrtc-0.49.0 → streamlit_webrtc-0.49.1}/streamlit_webrtc/session_info.py +0 -0
  22. {streamlit_webrtc-0.49.0 → streamlit_webrtc-0.49.1}/streamlit_webrtc/shutdown.py +0 -0
  23. {streamlit_webrtc-0.49.0 → streamlit_webrtc-0.49.1}/streamlit_webrtc/source.py +0 -0
  24. {streamlit_webrtc-0.49.0 → streamlit_webrtc-0.49.1}/streamlit_webrtc/webrtc.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: streamlit-webrtc
3
- Version: 0.49.0
3
+ Version: 0.49.1
4
4
  Summary: Real-time video and audio processing on Streamlit
5
5
  License: MIT
6
6
  Author: Yuichiro Tachibana (Tsuchiya)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "streamlit-webrtc"
3
- version = "0.49.0"
3
+ version = "0.49.1"
4
4
  description = "Real-time video and audio processing on Streamlit"
5
5
  authors = ["Yuichiro Tachibana (Tsuchiya) <t.yic.yt@gmail.com>"]
6
6
  license = "MIT"
@@ -23,8 +23,8 @@ packaging = ">=20.0"
23
23
 
24
24
  [tool.poetry.group.dev.dependencies]
25
25
  click = ">=7.0,<9.0" # We must specify the click version because we install older versions of Streamlit in the CI process and their depending click version is different from the newer releases.
26
- ruff = ">=0.3,<0.10"
27
- mypy = "^1.11.2"
26
+ ruff = "^0.9.10"
27
+ mypy = {extras = ["faster-cache"], version = "^1.15.0"}
28
28
  pydub = "^0.25.1"
29
29
  matplotlib = "^3.5.1"
30
30
  deepspeech = { version = "^0.9.3", python = ">=3.5,<=3.9" } # DeepSpeech 0.9.3 supports Python version 3.5, 3.6, 3.7, 3.8 and 3.9; https://github.com/mozilla/DeepSpeech/releases/tag/v0.9.3
@@ -120,7 +120,7 @@ export default theme;`}function Sh(t={},...e){const{breakpoints:n,mixins:r={},sp
120
120
  *
121
121
  * You can read more about the APCA Readability Criterion at
122
122
  * https://readtech.org/ARC/
123
- */const o1=.027,oP=5e-4,sP=.1,s1=1.14,Zc=.022,a1=1.414,aP=(t,e)=>{t=new Z(t),e=new Z(e),t.alpha()<1&&(t=qs(e,t,t.alpha(),"rgb"));const n=l1(...t.rgb()),r=l1(...e.rgb()),s=n>=Zc?n:n+Math.pow(Zc-n,a1),a=r>=Zc?r:r+Math.pow(Zc-r,a1),c=Math.pow(a,.56)-Math.pow(s,.57),u=Math.pow(a,.65)-Math.pow(s,.62),f=Math.abs(a-s)<oP?0:s<a?c*s1:u*s1;return(Math.abs(f)<sP?0:f>0?f-o1:f+o1)*100};function l1(t,e,n){return .2126729*Math.pow(t/255,2.4)+.7151522*Math.pow(e/255,2.4)+.072175*Math.pow(n/255,2.4)}const{sqrt:fi,pow:Ot,min:lP,max:cP,atan2:c1,abs:u1,cos:eu,sin:d1,exp:uP,PI:f1}=Math;function dP(t,e,n=1,r=1,s=1){var a=function(ue){return 360*ue/(2*f1)},c=function(ue){return 2*f1*ue/360};t=new Z(t),e=new Z(e);const[u,f,h]=Array.from(t.lab()),[y,g,v]=Array.from(e.lab()),_=(u+y)/2,C=fi(Ot(f,2)+Ot(h,2)),w=fi(Ot(g,2)+Ot(v,2)),I=(C+w)/2,P=.5*(1-fi(Ot(I,7)/(Ot(I,7)+Ot(25,7)))),D=f*(1+P),B=g*(1+P),M=fi(Ot(D,2)+Ot(h,2)),E=fi(Ot(B,2)+Ot(v,2)),U=(M+E)/2,O=a(c1(h,D)),V=a(c1(v,B)),Y=O>=0?O:O+360,S=V>=0?V:V+360,F=u1(Y-S)>180?(Y+S+360)/2:(Y+S)/2,H=1-.17*eu(c(F-30))+.24*eu(c(2*F))+.32*eu(c(3*F+6))-.2*eu(c(4*F-63));let X=S-Y;X=u1(X)<=180?X:S<=Y?X+360:X-360,X=2*fi(M*E)*d1(c(X)/2);const le=y-u,ce=E-M,de=1+.015*Ot(_-50,2)/fi(20+Ot(_-50,2)),fe=1+.045*U,J=1+.015*U*H,te=30*uP(-Ot((F-275)/25,2)),k=-(2*fi(Ot(U,7)/(Ot(U,7)+Ot(25,7))))*d1(2*c(te)),G=fi(Ot(le/(n*de),2)+Ot(ce/(r*fe),2)+Ot(X/(s*J),2)+k*(ce/(r*fe))*(X/(s*J)));return cP(0,lP(100,G))}function fP(t,e,n="lab"){t=new Z(t),e=new Z(e);const r=t.get(n),s=e.get(n);let a=0;for(let c in r){const u=(r[c]||0)-(s[c]||0);a+=u*u}return Math.sqrt(a)}const pP=(...t)=>{try{return new Z(...t),!0}catch{return!1}},hP={cool(){return nd([je.hsl(180,1,.9),je.hsl(250,.7,.4)])},hot(){return nd(["#000","#f00","#ff0","#fff"]).mode("rgb")}},xh={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},O_=Object.keys(xh),p1=new Map(O_.map(t=>[t.toLowerCase(),t])),mP=typeof Proxy=="function"?new Proxy(xh,{get(t,e){const n=e.toLowerCase();if(p1.has(n))return t[p1.get(n)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(O_)}}):xh,yP=(...t)=>{t=Ae(t,"cmyk");const[e,n,r,s]=t,a=t.length>4?t[4]:1;return s===1?[0,0,0,a]:[e>=1?0:255*(1-e)*(1-s),n>=1?0:255*(1-n)*(1-s),r>=1?0:255*(1-r)*(1-s),a]},{max:h1}=Math,gP=(...t)=>{let[e,n,r]=Ae(t,"rgb");e=e/255,n=n/255,r=r/255;const s=1-h1(e,h1(n,r)),a=s<1?1/(1-s):0,c=(1-e-s)*a,u=(1-n-s)*a,f=(1-r-s)*a;return[c,u,f,s]};Z.prototype.cmyk=function(){return gP(this._rgb)};const vP=(...t)=>new Z(...t,"cmyk");Object.assign(je,{cmyk:vP});Ie.format.cmyk=yP;Ie.autodetect.push({p:2,test:(...t)=>{if(t=Ae(t,"cmyk"),Le(t)==="array"&&t.length===4)return"cmyk"}});const bP=(...t)=>{const e=Ae(t,"hsla");let n=na(t)||"lsa";return e[0]=ar(e[0]||0)+"deg",e[1]=ar(e[1]*100)+"%",e[2]=ar(e[2]*100)+"%",n==="hsla"||e.length>3&&e[3]<1?(e[3]="/ "+(e.length>3?e[3]:1),n="hsla"):e.length=3,`${n.substr(0,3)}(${e.join(" ")})`},SP=(...t)=>{const e=Ae(t,"lab");let n=na(t)||"lab";return e[0]=ar(e[0])+"%",e[1]=ar(e[1]),e[2]=ar(e[2]),n==="laba"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lab(${e.join(" ")})`},_P=(...t)=>{const e=Ae(t,"lch");let n=na(t)||"lab";return e[0]=ar(e[0])+"%",e[1]=ar(e[1]),e[2]=isNaN(e[2])?"none":ar(e[2])+"deg",n==="lcha"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lch(${e.join(" ")})`},wP=(...t)=>{const e=Ae(t,"lab");return e[0]=ar(e[0]*100)+"%",e[1]=wh(e[1]),e[2]=wh(e[2]),e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklab(${e.join(" ")})`},M_=(...t)=>{const[e,n,r,...s]=Ae(t,"rgb"),[a,c,u]=Vm(e,n,r),[f,h,y]=T_(a,c,u);return[f,h,y,...s.length>0&&s[0]<1?[s[0]]:[]]},CP=(...t)=>{const e=Ae(t,"lch");return e[0]=ar(e[0]*100)+"%",e[1]=wh(e[1]),e[2]=isNaN(e[2])?"none":ar(e[2])+"deg",e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklch(${e.join(" ")})`},{round:Xp}=Math,xP=(...t)=>{const e=Ae(t,"rgba");let n=na(t)||"rgb";if(n.substr(0,3)==="hsl")return bP(R_(e),n);if(n.substr(0,3)==="lab"){const r=Sl();wi("d50");const s=SP($m(e),n);return wi(r),s}if(n.substr(0,3)==="lch"){const r=Sl();wi("d50");const s=_P(zm(e),n);return wi(r),s}return n.substr(0,5)==="oklab"?wP(Vm(e)):n.substr(0,5)==="oklch"?CP(M_(e)):(e[0]=Xp(e[0]),e[1]=Xp(e[1]),e[2]=Xp(e[2]),(n==="rgba"||e.length>3&&e[3]<1)&&(e[3]="/ "+(e.length>3?e[3]:1),n="rgba"),`${n.substr(0,3)}(${e.slice(0,n==="rgb"?3:4).join(" ")})`)},D_=(...t)=>{t=Ae(t,"lch");const[e,n,r,...s]=t,[a,c,u]=I_(e,n,r),[f,h,y]=Um(a,c,u);return[f,h,y,...s.length>0&&s[0]<1?[s[0]]:[]]},Ii=/((?:-?\d+)|(?:-?\d+(?:\.\d+)?)%|none)/.source,xr=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%?)|none)/.source,rd=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%)|none)/.source,cr=/\s*/.source,ia=/\s+/.source,Wm=/\s*,\s*/.source,kd=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)(?:deg)?)|none)/.source,oa=/\s*(?:\/\s*((?:[01]|[01]?\.\d+)|\d+(?:\.\d+)?%))?/.source,N_=new RegExp("^rgba?\\("+cr+[Ii,Ii,Ii].join(ia)+oa+"\\)$"),B_=new RegExp("^rgb\\("+cr+[Ii,Ii,Ii].join(Wm)+cr+"\\)$"),L_=new RegExp("^rgba\\("+cr+[Ii,Ii,Ii,xr].join(Wm)+cr+"\\)$"),F_=new RegExp("^hsla?\\("+cr+[kd,rd,rd].join(ia)+oa+"\\)$"),$_=new RegExp("^hsl?\\("+cr+[kd,rd,rd].join(Wm)+cr+"\\)$"),j_=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,z_=new RegExp("^lab\\("+cr+[xr,xr,xr].join(ia)+oa+"\\)$"),U_=new RegExp("^lch\\("+cr+[xr,xr,kd].join(ia)+oa+"\\)$"),V_=new RegExp("^oklab\\("+cr+[xr,xr,xr].join(ia)+oa+"\\)$"),W_=new RegExp("^oklch\\("+cr+[xr,xr,kd].join(ia)+oa+"\\)$"),{round:H_}=Math,xs=t=>t.map((e,n)=>n<=2?zo(H_(e),0,255):e),Mt=(t,e=0,n=100,r=!1)=>(typeof t=="string"&&t.endsWith("%")&&(t=parseFloat(t.substring(0,t.length-1))/100,r?t=e+(t+1)*.5*(n-e):t=e+t*(n-e)),+t),fn=(t,e)=>t==="none"?e:t,Hm=t=>{if(t=t.toLowerCase().trim(),t==="transparent")return[0,0,0,0];let e;if(Ie.format.named)try{return Ie.format.named(t)}catch{}if((e=t.match(N_))||(e=t.match(B_))){let n=e.slice(1,4);for(let s=0;s<3;s++)n[s]=+Mt(fn(n[s],0),0,255);n=xs(n);const r=e[4]!==void 0?+Mt(e[4],0,1):1;return n[3]=r,n}if(e=t.match(L_)){const n=e.slice(1,5);for(let r=0;r<4;r++)n[r]=+Mt(n[r],0,255);return n}if((e=t.match(F_))||(e=t.match($_))){const n=e.slice(1,4);n[0]=+fn(n[0].replace("deg",""),0),n[1]=+Mt(fn(n[1],0),0,100)*.01,n[2]=+Mt(fn(n[2],0),0,100)*.01;const r=xs(Ch(n)),s=e[4]!==void 0?+Mt(e[4],0,1):1;return r[3]=s,r}if(e=t.match(j_)){const n=e.slice(1,4);n[1]*=.01,n[2]*=.01;const r=Ch(n);for(let s=0;s<3;s++)r[s]=H_(r[s]);return r[3]=+e[4],r}if(e=t.match(z_)){const n=e.slice(1,4);n[0]=Mt(fn(n[0],0),0,100),n[1]=Mt(fn(n[1],0),-125,125,!0),n[2]=Mt(fn(n[2],0),-125,125,!0);const r=Sl();wi("d50");const s=xs(Fm(n));wi(r);const a=e[4]!==void 0?+Mt(e[4],0,1):1;return s[3]=a,s}if(e=t.match(U_)){const n=e.slice(1,4);n[0]=Mt(n[0],0,100),n[1]=Mt(fn(n[1],0),0,150,!1),n[2]=+fn(n[2].replace("deg",""),0);const r=Sl();wi("d50");const s=xs(jm(n));wi(r);const a=e[4]!==void 0?+Mt(e[4],0,1):1;return s[3]=a,s}if(e=t.match(V_)){const n=e.slice(1,4);n[0]=Mt(fn(n[0],0),0,1),n[1]=Mt(fn(n[1],0),-.4,.4,!0),n[2]=Mt(fn(n[2],0),-.4,.4,!0);const r=xs(Um(n)),s=e[4]!==void 0?+Mt(e[4],0,1):1;return r[3]=s,r}if(e=t.match(W_)){const n=e.slice(1,4);n[0]=Mt(fn(n[0],0),0,1),n[1]=Mt(fn(n[1],0),0,.4,!1),n[2]=+fn(n[2].replace("deg",""),0);const r=xs(D_(n)),s=e[4]!==void 0?+Mt(e[4],0,1):1;return r[3]=s,r}};Hm.test=t=>N_.test(t)||F_.test(t)||z_.test(t)||U_.test(t)||V_.test(t)||W_.test(t)||B_.test(t)||L_.test(t)||$_.test(t)||j_.test(t)||t==="transparent";Z.prototype.css=function(t){return xP(this._rgb,t)};const IP=(...t)=>new Z(...t,"css");je.css=IP;Ie.format.css=Hm;Ie.autodetect.push({p:5,test:(t,...e)=>{if(!e.length&&Le(t)==="string"&&Hm.test(t))return"css"}});Ie.format.gl=(...t)=>{const e=Ae(t,"rgba");return e[0]*=255,e[1]*=255,e[2]*=255,e};const TP=(...t)=>new Z(...t,"gl");je.gl=TP;Z.prototype.gl=function(){const t=this._rgb;return[t[0]/255,t[1]/255,t[2]/255,t[3]]};Z.prototype.hex=function(t){return w_(this._rgb,t)};const kP=(...t)=>new Z(...t,"hex");je.hex=kP;Ie.format.hex=__;Ie.autodetect.push({p:4,test:(t,...e)=>{if(!e.length&&Le(t)==="string"&&[3,4,5,6,7,8,9].indexOf(t.length)>=0)return"hex"}});const{log:tu}=Math,G_=t=>{const e=t/100;let n,r,s;return e<66?(n=255,r=e<6?0:-155.25485562709179-.44596950469579133*(r=e-2)+104.49216199393888*tu(r),s=e<20?0:-254.76935184120902+.8274096064007395*(s=e-10)+115.67994401066147*tu(s)):(n=351.97690566805693+.114206453784165*(n=e-55)-40.25366309332127*tu(n),r=325.4494125711974+.07943456536662342*(r=e-50)-28.0852963507957*tu(r),s=255),[n,r,s,1]},{round:RP}=Math,EP=(...t)=>{const e=Ae(t,"rgb"),n=e[0],r=e[2];let s=1e3,a=4e4;const c=.4;let u;for(;a-s>c;){u=(a+s)*.5;const f=G_(u);f[2]/f[0]>=r/n?a=u:s=u}return RP(u)};Z.prototype.temp=Z.prototype.kelvin=Z.prototype.temperature=function(){return EP(this._rgb)};const qp=(...t)=>new Z(...t,"temp");Object.assign(je,{temp:qp,kelvin:qp,temperature:qp});Ie.format.temp=Ie.format.kelvin=Ie.format.temperature=G_;Z.prototype.oklch=function(){return M_(this._rgb)};const AP=(...t)=>new Z(...t,"oklch");Object.assign(je,{oklch:AP});Ie.format.oklch=D_;Ie.autodetect.push({p:2,test:(...t)=>{if(t=Ae(t,"oklch"),Le(t)==="array"&&t.length===3)return"oklch"}});Object.assign(je,{analyze:A_,average:PA,bezier:LA,blend:Tr,brewer:mP,Color:Z,colors:Xs,contrast:iP,contrastAPCA:aP,cubehelix:XA,deltaE:dP,distance:fP,input:Ie,interpolate:qs,limits:P_,mix:qs,random:eP,scale:nd,scales:hP,valid:pP});function PP(t){const{theme:e}=ud.useRenderData(),n=JSON.stringify(e),r=Nt.useMemo(()=>{const s=JSON.parse(n);if(s==null)return;const a=je.scale([s.textColor,s.backgroundColor]).mode("lab");return Id({palette:{primary:{main:s.primaryColor},background:{default:s.backgroundColor,paper:s.secondaryBackgroundColor},text:{primary:s.textColor,secondary:a(.1).hex(),disabled:a(.5).hex()}},typography:{fontFamily:s.font}})},[n]);return r==null?j.jsx(j.Fragment,{children:t.children}):j.jsx(kE,{theme:r,children:t.children})}function OP(t){return j.jsx(L3,{...t,defaultTheme:Bm,themeId:Cr})}function Gm(t){return function(n){return j.jsx(OP,{styles:typeof t=="function"?r=>t({theme:r,...n}):t})}}function an(t){return TR(t)}const Ih=typeof Gm({})=="function",MP=(t,e)=>({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%",...e&&!t.vars&&{colorScheme:t.palette.mode}}),DP=t=>({color:(t.vars||t).palette.text.primary,...t.typography.body1,backgroundColor:(t.vars||t).palette.background.default,"@media print":{backgroundColor:(t.vars||t).palette.common.white}}),Y_=(t,e=!1)=>{var a,c;const n={};e&&t.colorSchemes&&typeof t.getColorSchemeSelector=="function"&&Object.entries(t.colorSchemes).forEach(([u,f])=>{var y,g;const h=t.getColorSchemeSelector(u);h.startsWith("@")?n[h]={":root":{colorScheme:(y=f.palette)==null?void 0:y.mode}}:n[h.replace(/\s*&/,"")]={colorScheme:(g=f.palette)==null?void 0:g.mode}});let r={html:MP(t,e),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:t.typography.fontWeightBold},body:{margin:0,...DP(t),"&::backdrop":{backgroundColor:(t.vars||t).palette.background.default}},...n};const s=(c=(a=t.components)==null?void 0:a.MuiCssBaseline)==null?void 0:c.styleOverrides;return s&&(r=[r,s]),r},mu="mui-ecs",NP=t=>{const e=Y_(t,!1),n=Array.isArray(e)?e[0]:e;return!t.vars&&n&&(n.html[`:root:has(${mu})`]={colorScheme:t.palette.mode}),t.colorSchemes&&Object.entries(t.colorSchemes).forEach(([r,s])=>{var c,u;const a=t.getColorSchemeSelector(r);a.startsWith("@")?n[a]={[`:root:not(:has(.${mu}))`]:{colorScheme:(c=s.palette)==null?void 0:c.mode}}:n[a.replace(/\s*&/,"")]={[`&:not(:has(.${mu}))`]:{colorScheme:(u=s.palette)==null?void 0:u.mode}}}),e},BP=Gm(Ih?({theme:t,enableColorScheme:e})=>Y_(t,e):({theme:t})=>NP(t));function LP(t){const e=an({props:t,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=e;return j.jsxs(A.Fragment,{children:[Ih&&j.jsx(BP,{enableColorScheme:r}),!Ih&&!r&&j.jsx("span",{className:mu,style:{display:"none"}}),n]})}const K_=Nt.createContext(void 0);function FP(t){const e=ud.useRenderData(),{start:n,stop:r,select_device:s,device_ask_permission:a,device_not_available:c,device_access_denied:u,media_api_not_available:f}=e.args.translations||{},h=A.useMemo(()=>({start:n,stop:r,select_device:s,device_ask_permission:a,device_not_available:c,device_access_denied:u,media_api_not_available:f}),[n,r,s,a,c,u,f]);return j.jsx(K_.Provider,{value:h,children:t.children})}const $P=Nt.memo(FP),jP=gn("MuiBox",["root"]),zP=Id(),$s=j3({themeId:Cr,defaultTheme:zP,defaultClassName:jP.root,generateClassName:QS.generate}),Mn=kR;function Is(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,_=y[t]||r,C=gR(g[t],s),{props:{component:w,...I},internalRef:P}=yR({className:n,...f,externalForwardedProps:t==="root"?v:void 0,externalSlotProps:C}),D=vl(P,C==null?void 0:C.ref,e.ref),B=t==="root"?w||h:w,M=hR(_,{...t==="root"&&!h&&!y[t]&&c,...t!=="root"&&!y[t]&&c,...I,...B&&!u&&{as:B},...B&&u&&{component:B},ref:D},s);return[_,M]}function UP(t){return typeof t.main=="string"}function VP(t,e=[]){if(!UP(t))return!1;for(const n of e)if(!t.hasOwnProperty(n)||typeof t[n]!="string")return!1;return!0}function Ti(t=[]){return([,e])=>e&&VP(e,t)}function WP(t){return yn("MuiPaper",t)}gn("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 HP=t=>{const{square:e,elevation:n,variant:r,classes:s}=t,a={root:["root",r,!e&&"rounded",r==="elevation"&&`elevation${n}`]};return vn(a,WP,s)},GP=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}`]]}})(Mn(({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)"}}]}))),Rd=A.forwardRef(function(e,n){var _;const r=an({props:e,name:"MuiPaper"}),s=y_(),{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=HP(g);return j.jsx(GP,{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":(_=s.vars.overlays)==null?void 0:_[u]},...!s.vars&&s.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${Gr("#fff",_h(u))}, ${Gr("#fff",_h(u))})`}},...y.style}})});function YP(t){return yn("MuiAlert",t)}const m1=gn("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 KP(t){return yn("MuiSvgIcon",t)}gn("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const QP=t=>{const{color:e,fontSize:n,classes:r}=t,s={root:["root",e!=="inherit"&&`color${Oe(e)}`,`fontSize${Oe(n)}`]};return vn(s,KP,r)},XP=Fe("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="inherit"&&e[`color${Oe(n.color)}`],e[`fontSize${Oe(n.fontSize)}`]]}})(Mn(({theme:t})=>{var e,n,r,s,a,c,u,f,h,y,g,v,_,C;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(s=(e=t.transitions)==null?void 0:e.create)==null?void 0:s.call(e,"fill",{duration:(r=(n=(t.vars??t).transitions)==null?void 0:n.duration)==null?void 0:r.shorter}),variants:[{props:w=>!w.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((c=(a=t.typography)==null?void 0:a.pxToRem)==null?void 0:c.call(a,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((f=(u=t.typography)==null?void 0:u.pxToRem)==null?void 0:f.call(u,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((y=(h=t.typography)==null?void 0:h.pxToRem)==null?void 0:y.call(h,35))||"2.1875rem"}},...Object.entries((t.vars??t).palette).filter(([,w])=>w&&w.main).map(([w])=>{var I,P;return{props:{color:w},style:{color:(P=(I=(t.vars??t).palette)==null?void 0:I[w])==null?void 0:P.main}}}),{props:{color:"action"},style:{color:(v=(g=(t.vars??t).palette)==null?void 0:g.action)==null?void 0:v.active}},{props:{color:"disabled"},style:{color:(C=(_=(t.vars??t).palette)==null?void 0:_.action)==null?void 0:C.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Th=A.forwardRef(function(e,n){const r=an({props:e,name:"MuiSvgIcon"}),{children:s,className:a,color:c="inherit",component:u="svg",fontSize:f="medium",htmlColor:h,inheritViewBox:y=!1,titleAccess:g,viewBox:v="0 0 24 24",..._}=r,C=A.isValidElement(s)&&s.type==="svg",w={...r,color:c,component:u,fontSize:f,instanceFontSize:e.fontSize,inheritViewBox:y,viewBox:v,hasSvgAsChild:C},I={};y||(I.viewBox=v);const P=QP(w);return j.jsxs(XP,{as:u,className:ot(P.root,a),focusable:"false",color:h,"aria-hidden":g?void 0:!0,role:g?"img":void 0,ref:n,...I,..._,...C&&s.props,ownerState:w,children:[C?s.props.children:s,g?j.jsx("title",{children:g}):null]})});Th.muiName="SvgIcon";function mo(t,e){function n(r,s){return j.jsx(Th,{"data-testid":`${e}Icon`,ref:s,...r,children:t})}return n.muiName=Th.muiName,A.memo(A.forwardRef(n))}class id{constructor(){Ua(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new id}static use(){const e=o_(id.create).current,[n,r]=A.useState(!1);return e.shouldMount=n,e.setShouldMount=r,A.useEffect(e.mountEffect,[n]),e}mount(){return this.mounted||(this.mounted=JP(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...e){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.start(...e)})}stop(...e){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.stop(...e)})}pulsate(...e){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.pulsate(...e)})}}function qP(){return id.use()}function JP(){let t,e;const n=new Promise((r,s)=>{t=r,e=s});return n.resolve=t,n.reject=e,n}function ZP(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function kh(t,e){return kh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},kh(t,e)}function eO(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,kh(t,e)}const y1=Nt.createContext(null);function tO(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ym(t,e){var n=function(a){return e&&A.isValidElement(a)?e(a):a},r=Object.create(null);return t&&A.Children.map(t,function(s){return s}).forEach(function(s){r[s.key]=n(s)}),r}function nO(t,e){t=t||{},e=e||{};function n(y){return y in e?e[y]:t[y]}var r=Object.create(null),s=[];for(var a in t)a in e?s.length&&(r[a]=s,s=[]):s.push(a);var c,u={};for(var f in e){if(r[f])for(c=0;c<r[f].length;c++){var h=r[f][c];u[r[f][c]]=n(h)}u[f]=n(f)}for(c=0;c<s.length;c++)u[s[c]]=n(s[c]);return u}function Fo(t,e,n){return n[e]!=null?n[e]:t.props[e]}function rO(t,e){return Ym(t.children,function(n){return A.cloneElement(n,{onExited:e.bind(null,n),in:!0,appear:Fo(n,"appear",t),enter:Fo(n,"enter",t),exit:Fo(n,"exit",t)})})}function iO(t,e,n){var r=Ym(t.children),s=nO(e,r);return Object.keys(s).forEach(function(a){var c=s[a];if(A.isValidElement(c)){var u=a in e,f=a in r,h=e[a],y=A.isValidElement(h)&&!h.props.in;f&&(!u||y)?s[a]=A.cloneElement(c,{onExited:n.bind(null,c),in:!0,exit:Fo(c,"exit",t),enter:Fo(c,"enter",t)}):!f&&u&&!y?s[a]=A.cloneElement(c,{in:!1}):f&&u&&A.isValidElement(h)&&(s[a]=A.cloneElement(c,{onExited:n.bind(null,c),in:h.props.in,exit:Fo(c,"exit",t),enter:Fo(c,"enter",t)}))}}),s}var oO=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},sO={component:"div",childFactory:function(e){return e}},Km=function(t){eO(e,t);function e(r,s){var a;a=t.call(this,r,s)||this;var c=a.handleExited.bind(tO(a));return a.state={contextValue:{isMounting:!0},handleExited:c,firstRender:!0},a}var n=e.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(s,a){var c=a.children,u=a.handleExited,f=a.firstRender;return{children:f?rO(s,u):iO(s,c,u),firstRender:!1}},n.handleExited=function(s,a){var c=Ym(this.props.children);s.key in c||(s.props.onExited&&s.props.onExited(a),this.mounted&&this.setState(function(u){var f=Ju({},u.children);return delete f[s.key],{children:f}}))},n.render=function(){var s=this.props,a=s.component,c=s.childFactory,u=ZP(s,["component","childFactory"]),f=this.state.contextValue,h=oO(this.state.children).map(c);return delete u.appear,delete u.enter,delete u.exit,a===null?Nt.createElement(y1.Provider,{value:f},h):Nt.createElement(y1.Provider,{value:f},Nt.createElement(a,u,h))},e}(Nt.Component);Km.propTypes={};Km.defaultProps=sO;function aO(t){const{className:e,classes:n,pulsate:r=!1,rippleX:s,rippleY:a,rippleSize:c,in:u,onExited:f,timeout:h}=t,[y,g]=A.useState(!1),v=ot(e,n.ripple,n.rippleVisible,r&&n.ripplePulsate),_={width:c,height:c,top:-(c/2)+a,left:-(c/2)+s},C=ot(n.child,y&&n.childLeaving,r&&n.childPulsate);return!u&&!y&&g(!0),A.useEffect(()=>{if(!u&&f!=null){const w=setTimeout(f,h);return()=>{clearTimeout(w)}}},[f,u,h]),j.jsx("span",{className:v,style:_,children:j.jsx("span",{className:C})})}const rr=gn("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Rh=550,lO=80,cO=Pl`
123
+ */const o1=.027,oP=5e-4,sP=.1,s1=1.14,Zc=.022,a1=1.414,aP=(t,e)=>{t=new Z(t),e=new Z(e),t.alpha()<1&&(t=qs(e,t,t.alpha(),"rgb"));const n=l1(...t.rgb()),r=l1(...e.rgb()),s=n>=Zc?n:n+Math.pow(Zc-n,a1),a=r>=Zc?r:r+Math.pow(Zc-r,a1),c=Math.pow(a,.56)-Math.pow(s,.57),u=Math.pow(a,.65)-Math.pow(s,.62),f=Math.abs(a-s)<oP?0:s<a?c*s1:u*s1;return(Math.abs(f)<sP?0:f>0?f-o1:f+o1)*100};function l1(t,e,n){return .2126729*Math.pow(t/255,2.4)+.7151522*Math.pow(e/255,2.4)+.072175*Math.pow(n/255,2.4)}const{sqrt:fi,pow:Ot,min:lP,max:cP,atan2:c1,abs:u1,cos:eu,sin:d1,exp:uP,PI:f1}=Math;function dP(t,e,n=1,r=1,s=1){var a=function(ue){return 360*ue/(2*f1)},c=function(ue){return 2*f1*ue/360};t=new Z(t),e=new Z(e);const[u,f,h]=Array.from(t.lab()),[y,g,v]=Array.from(e.lab()),_=(u+y)/2,C=fi(Ot(f,2)+Ot(h,2)),w=fi(Ot(g,2)+Ot(v,2)),I=(C+w)/2,P=.5*(1-fi(Ot(I,7)/(Ot(I,7)+Ot(25,7)))),D=f*(1+P),B=g*(1+P),M=fi(Ot(D,2)+Ot(h,2)),E=fi(Ot(B,2)+Ot(v,2)),U=(M+E)/2,O=a(c1(h,D)),V=a(c1(v,B)),Y=O>=0?O:O+360,S=V>=0?V:V+360,F=u1(Y-S)>180?(Y+S+360)/2:(Y+S)/2,H=1-.17*eu(c(F-30))+.24*eu(c(2*F))+.32*eu(c(3*F+6))-.2*eu(c(4*F-63));let X=S-Y;X=u1(X)<=180?X:S<=Y?X+360:X-360,X=2*fi(M*E)*d1(c(X)/2);const le=y-u,ce=E-M,de=1+.015*Ot(_-50,2)/fi(20+Ot(_-50,2)),fe=1+.045*U,J=1+.015*U*H,te=30*uP(-Ot((F-275)/25,2)),k=-(2*fi(Ot(U,7)/(Ot(U,7)+Ot(25,7))))*d1(2*c(te)),G=fi(Ot(le/(n*de),2)+Ot(ce/(r*fe),2)+Ot(X/(s*J),2)+k*(ce/(r*fe))*(X/(s*J)));return cP(0,lP(100,G))}function fP(t,e,n="lab"){t=new Z(t),e=new Z(e);const r=t.get(n),s=e.get(n);let a=0;for(let c in r){const u=(r[c]||0)-(s[c]||0);a+=u*u}return Math.sqrt(a)}const pP=(...t)=>{try{return new Z(...t),!0}catch{return!1}},hP={cool(){return nd([je.hsl(180,1,.9),je.hsl(250,.7,.4)])},hot(){return nd(["#000","#f00","#ff0","#fff"]).mode("rgb")}},xh={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},O_=Object.keys(xh),p1=new Map(O_.map(t=>[t.toLowerCase(),t])),mP=typeof Proxy=="function"?new Proxy(xh,{get(t,e){const n=e.toLowerCase();if(p1.has(n))return t[p1.get(n)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(O_)}}):xh,yP=(...t)=>{t=Ae(t,"cmyk");const[e,n,r,s]=t,a=t.length>4?t[4]:1;return s===1?[0,0,0,a]:[e>=1?0:255*(1-e)*(1-s),n>=1?0:255*(1-n)*(1-s),r>=1?0:255*(1-r)*(1-s),a]},{max:h1}=Math,gP=(...t)=>{let[e,n,r]=Ae(t,"rgb");e=e/255,n=n/255,r=r/255;const s=1-h1(e,h1(n,r)),a=s<1?1/(1-s):0,c=(1-e-s)*a,u=(1-n-s)*a,f=(1-r-s)*a;return[c,u,f,s]};Z.prototype.cmyk=function(){return gP(this._rgb)};const vP=(...t)=>new Z(...t,"cmyk");Object.assign(je,{cmyk:vP});Ie.format.cmyk=yP;Ie.autodetect.push({p:2,test:(...t)=>{if(t=Ae(t,"cmyk"),Le(t)==="array"&&t.length===4)return"cmyk"}});const bP=(...t)=>{const e=Ae(t,"hsla");let n=na(t)||"lsa";return e[0]=ar(e[0]||0)+"deg",e[1]=ar(e[1]*100)+"%",e[2]=ar(e[2]*100)+"%",n==="hsla"||e.length>3&&e[3]<1?(e[3]="/ "+(e.length>3?e[3]:1),n="hsla"):e.length=3,`${n.substr(0,3)}(${e.join(" ")})`},SP=(...t)=>{const e=Ae(t,"lab");let n=na(t)||"lab";return e[0]=ar(e[0])+"%",e[1]=ar(e[1]),e[2]=ar(e[2]),n==="laba"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lab(${e.join(" ")})`},_P=(...t)=>{const e=Ae(t,"lch");let n=na(t)||"lab";return e[0]=ar(e[0])+"%",e[1]=ar(e[1]),e[2]=isNaN(e[2])?"none":ar(e[2])+"deg",n==="lcha"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lch(${e.join(" ")})`},wP=(...t)=>{const e=Ae(t,"lab");return e[0]=ar(e[0]*100)+"%",e[1]=wh(e[1]),e[2]=wh(e[2]),e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklab(${e.join(" ")})`},M_=(...t)=>{const[e,n,r,...s]=Ae(t,"rgb"),[a,c,u]=Vm(e,n,r),[f,h,y]=T_(a,c,u);return[f,h,y,...s.length>0&&s[0]<1?[s[0]]:[]]},CP=(...t)=>{const e=Ae(t,"lch");return e[0]=ar(e[0]*100)+"%",e[1]=wh(e[1]),e[2]=isNaN(e[2])?"none":ar(e[2])+"deg",e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklch(${e.join(" ")})`},{round:Xp}=Math,xP=(...t)=>{const e=Ae(t,"rgba");let n=na(t)||"rgb";if(n.substr(0,3)==="hsl")return bP(R_(e),n);if(n.substr(0,3)==="lab"){const r=Sl();wi("d50");const s=SP($m(e),n);return wi(r),s}if(n.substr(0,3)==="lch"){const r=Sl();wi("d50");const s=_P(zm(e),n);return wi(r),s}return n.substr(0,5)==="oklab"?wP(Vm(e)):n.substr(0,5)==="oklch"?CP(M_(e)):(e[0]=Xp(e[0]),e[1]=Xp(e[1]),e[2]=Xp(e[2]),(n==="rgba"||e.length>3&&e[3]<1)&&(e[3]="/ "+(e.length>3?e[3]:1),n="rgba"),`${n.substr(0,3)}(${e.slice(0,n==="rgb"?3:4).join(" ")})`)},D_=(...t)=>{t=Ae(t,"lch");const[e,n,r,...s]=t,[a,c,u]=I_(e,n,r),[f,h,y]=Um(a,c,u);return[f,h,y,...s.length>0&&s[0]<1?[s[0]]:[]]},Ii=/((?:-?\d+)|(?:-?\d+(?:\.\d+)?)%|none)/.source,xr=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%?)|none)/.source,rd=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%)|none)/.source,cr=/\s*/.source,ia=/\s+/.source,Wm=/\s*,\s*/.source,kd=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)(?:deg)?)|none)/.source,oa=/\s*(?:\/\s*((?:[01]|[01]?\.\d+)|\d+(?:\.\d+)?%))?/.source,N_=new RegExp("^rgba?\\("+cr+[Ii,Ii,Ii].join(ia)+oa+"\\)$"),B_=new RegExp("^rgb\\("+cr+[Ii,Ii,Ii].join(Wm)+cr+"\\)$"),L_=new RegExp("^rgba\\("+cr+[Ii,Ii,Ii,xr].join(Wm)+cr+"\\)$"),F_=new RegExp("^hsla?\\("+cr+[kd,rd,rd].join(ia)+oa+"\\)$"),$_=new RegExp("^hsl?\\("+cr+[kd,rd,rd].join(Wm)+cr+"\\)$"),j_=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,z_=new RegExp("^lab\\("+cr+[xr,xr,xr].join(ia)+oa+"\\)$"),U_=new RegExp("^lch\\("+cr+[xr,xr,kd].join(ia)+oa+"\\)$"),V_=new RegExp("^oklab\\("+cr+[xr,xr,xr].join(ia)+oa+"\\)$"),W_=new RegExp("^oklch\\("+cr+[xr,xr,kd].join(ia)+oa+"\\)$"),{round:H_}=Math,xs=t=>t.map((e,n)=>n<=2?zo(H_(e),0,255):e),Mt=(t,e=0,n=100,r=!1)=>(typeof t=="string"&&t.endsWith("%")&&(t=parseFloat(t.substring(0,t.length-1))/100,r?t=e+(t+1)*.5*(n-e):t=e+t*(n-e)),+t),fn=(t,e)=>t==="none"?e:t,Hm=t=>{if(t=t.toLowerCase().trim(),t==="transparent")return[0,0,0,0];let e;if(Ie.format.named)try{return Ie.format.named(t)}catch{}if((e=t.match(N_))||(e=t.match(B_))){let n=e.slice(1,4);for(let s=0;s<3;s++)n[s]=+Mt(fn(n[s],0),0,255);n=xs(n);const r=e[4]!==void 0?+Mt(e[4],0,1):1;return n[3]=r,n}if(e=t.match(L_)){const n=e.slice(1,5);for(let r=0;r<4;r++)n[r]=+Mt(n[r],0,255);return n}if((e=t.match(F_))||(e=t.match($_))){const n=e.slice(1,4);n[0]=+fn(n[0].replace("deg",""),0),n[1]=+Mt(fn(n[1],0),0,100)*.01,n[2]=+Mt(fn(n[2],0),0,100)*.01;const r=xs(Ch(n)),s=e[4]!==void 0?+Mt(e[4],0,1):1;return r[3]=s,r}if(e=t.match(j_)){const n=e.slice(1,4);n[1]*=.01,n[2]*=.01;const r=Ch(n);for(let s=0;s<3;s++)r[s]=H_(r[s]);return r[3]=+e[4],r}if(e=t.match(z_)){const n=e.slice(1,4);n[0]=Mt(fn(n[0],0),0,100),n[1]=Mt(fn(n[1],0),-125,125,!0),n[2]=Mt(fn(n[2],0),-125,125,!0);const r=Sl();wi("d50");const s=xs(Fm(n));wi(r);const a=e[4]!==void 0?+Mt(e[4],0,1):1;return s[3]=a,s}if(e=t.match(U_)){const n=e.slice(1,4);n[0]=Mt(n[0],0,100),n[1]=Mt(fn(n[1],0),0,150,!1),n[2]=+fn(n[2].replace("deg",""),0);const r=Sl();wi("d50");const s=xs(jm(n));wi(r);const a=e[4]!==void 0?+Mt(e[4],0,1):1;return s[3]=a,s}if(e=t.match(V_)){const n=e.slice(1,4);n[0]=Mt(fn(n[0],0),0,1),n[1]=Mt(fn(n[1],0),-.4,.4,!0),n[2]=Mt(fn(n[2],0),-.4,.4,!0);const r=xs(Um(n)),s=e[4]!==void 0?+Mt(e[4],0,1):1;return r[3]=s,r}if(e=t.match(W_)){const n=e.slice(1,4);n[0]=Mt(fn(n[0],0),0,1),n[1]=Mt(fn(n[1],0),0,.4,!1),n[2]=+fn(n[2].replace("deg",""),0);const r=xs(D_(n)),s=e[4]!==void 0?+Mt(e[4],0,1):1;return r[3]=s,r}};Hm.test=t=>N_.test(t)||F_.test(t)||z_.test(t)||U_.test(t)||V_.test(t)||W_.test(t)||B_.test(t)||L_.test(t)||$_.test(t)||j_.test(t)||t==="transparent";Z.prototype.css=function(t){return xP(this._rgb,t)};const IP=(...t)=>new Z(...t,"css");je.css=IP;Ie.format.css=Hm;Ie.autodetect.push({p:5,test:(t,...e)=>{if(!e.length&&Le(t)==="string"&&Hm.test(t))return"css"}});Ie.format.gl=(...t)=>{const e=Ae(t,"rgba");return e[0]*=255,e[1]*=255,e[2]*=255,e};const TP=(...t)=>new Z(...t,"gl");je.gl=TP;Z.prototype.gl=function(){const t=this._rgb;return[t[0]/255,t[1]/255,t[2]/255,t[3]]};Z.prototype.hex=function(t){return w_(this._rgb,t)};const kP=(...t)=>new Z(...t,"hex");je.hex=kP;Ie.format.hex=__;Ie.autodetect.push({p:4,test:(t,...e)=>{if(!e.length&&Le(t)==="string"&&[3,4,5,6,7,8,9].indexOf(t.length)>=0)return"hex"}});const{log:tu}=Math,G_=t=>{const e=t/100;let n,r,s;return e<66?(n=255,r=e<6?0:-155.25485562709179-.44596950469579133*(r=e-2)+104.49216199393888*tu(r),s=e<20?0:-254.76935184120902+.8274096064007395*(s=e-10)+115.67994401066147*tu(s)):(n=351.97690566805693+.114206453784165*(n=e-55)-40.25366309332127*tu(n),r=325.4494125711974+.07943456536662342*(r=e-50)-28.0852963507957*tu(r),s=255),[n,r,s,1]},{round:RP}=Math,EP=(...t)=>{const e=Ae(t,"rgb"),n=e[0],r=e[2];let s=1e3,a=4e4;const c=.4;let u;for(;a-s>c;){u=(a+s)*.5;const f=G_(u);f[2]/f[0]>=r/n?a=u:s=u}return RP(u)};Z.prototype.temp=Z.prototype.kelvin=Z.prototype.temperature=function(){return EP(this._rgb)};const qp=(...t)=>new Z(...t,"temp");Object.assign(je,{temp:qp,kelvin:qp,temperature:qp});Ie.format.temp=Ie.format.kelvin=Ie.format.temperature=G_;Z.prototype.oklch=function(){return M_(this._rgb)};const AP=(...t)=>new Z(...t,"oklch");Object.assign(je,{oklch:AP});Ie.format.oklch=D_;Ie.autodetect.push({p:2,test:(...t)=>{if(t=Ae(t,"oklch"),Le(t)==="array"&&t.length===3)return"oklch"}});Object.assign(je,{analyze:A_,average:PA,bezier:LA,blend:Tr,brewer:mP,Color:Z,colors:Xs,contrast:iP,contrastAPCA:aP,cubehelix:XA,deltaE:dP,distance:fP,input:Ie,interpolate:qs,limits:P_,mix:qs,random:eP,scale:nd,scales:hP,valid:pP});function PP(t){const{theme:e}=ud.useRenderData(),n=JSON.stringify(e),r=Nt.useMemo(()=>{const s=JSON.parse(n);if(s==null)return;const a=je.scale([s.textColor,s.backgroundColor]).mode("lab");return Id({palette:{primary:{main:s.primaryColor},background:{default:s.backgroundColor,paper:s.secondaryBackgroundColor},text:{primary:s.textColor,secondary:a(.1).hex(),disabled:a(.5).hex()}},typography:{fontFamily:s.font}})},[n]);return r==null?j.jsx(j.Fragment,{children:t.children}):j.jsx(kE,{theme:r,children:t.children})}function OP(t){return j.jsx(L3,{...t,defaultTheme:Bm,themeId:Cr})}function Gm(t){return function(n){return j.jsx(OP,{styles:typeof t=="function"?r=>t({theme:r,...n}):t})}}function an(t){return TR(t)}const Ih=typeof Gm({})=="function",MP=(t,e)=>({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%",...e&&!t.vars&&{colorScheme:t.palette.mode}}),DP=t=>({color:(t.vars||t).palette.text.primary,...t.typography.body1,backgroundColor:(t.vars||t).palette.background.default,"@media print":{backgroundColor:(t.vars||t).palette.common.white}}),Y_=(t,e=!1)=>{var a,c;const n={};e&&t.colorSchemes&&typeof t.getColorSchemeSelector=="function"&&Object.entries(t.colorSchemes).forEach(([u,f])=>{var y,g;const h=t.getColorSchemeSelector(u);h.startsWith("@")?n[h]={":root":{colorScheme:(y=f.palette)==null?void 0:y.mode}}:n[h.replace(/\s*&/,"")]={colorScheme:(g=f.palette)==null?void 0:g.mode}});let r={html:MP(t,e),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:t.typography.fontWeightBold},body:{margin:0,...DP(t),"&::backdrop":{backgroundColor:(t.vars||t).palette.background.default}},...n};const s=(c=(a=t.components)==null?void 0:a.MuiCssBaseline)==null?void 0:c.styleOverrides;return s&&(r=[r,s]),r},mu="mui-ecs",NP=t=>{const e=Y_(t,!1),n=Array.isArray(e)?e[0]:e;return!t.vars&&n&&(n.html[`:root:has(${mu})`]={colorScheme:t.palette.mode}),t.colorSchemes&&Object.entries(t.colorSchemes).forEach(([r,s])=>{var c,u;const a=t.getColorSchemeSelector(r);a.startsWith("@")?n[a]={[`:root:not(:has(.${mu}))`]:{colorScheme:(c=s.palette)==null?void 0:c.mode}}:n[a.replace(/\s*&/,"")]={[`&:not(:has(.${mu}))`]:{colorScheme:(u=s.palette)==null?void 0:u.mode}}}),e},BP=Gm(Ih?({theme:t,enableColorScheme:e})=>Y_(t,e):({theme:t})=>NP(t));function LP(t){const e=an({props:t,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=e;return j.jsxs(A.Fragment,{children:[Ih&&j.jsx(BP,{enableColorScheme:r}),!Ih&&!r&&j.jsx("span",{className:mu,style:{display:"none"}}),n]})}const K_=Nt.createContext(void 0),Nl=t=>{const e=A.useContext(K_);return e==null?null:e[t]};function FP(t){const e=ud.useRenderData(),{start:n,stop:r,select_device:s,device_ask_permission:a,device_not_available:c,device_access_denied:u,media_api_not_available:f}=e.args.translations||{},h=A.useMemo(()=>({start:n,stop:r,select_device:s,device_ask_permission:a,device_not_available:c,device_access_denied:u,media_api_not_available:f}),[n,r,s,a,c,u,f]);return j.jsx(K_.Provider,{value:h,children:t.children})}const $P=Nt.memo(FP),jP=gn("MuiBox",["root"]),zP=Id(),$s=j3({themeId:Cr,defaultTheme:zP,defaultClassName:jP.root,generateClassName:QS.generate}),Mn=kR;function Is(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,_=y[t]||r,C=gR(g[t],s),{props:{component:w,...I},internalRef:P}=yR({className:n,...f,externalForwardedProps:t==="root"?v:void 0,externalSlotProps:C}),D=vl(P,C==null?void 0:C.ref,e.ref),B=t==="root"?w||h:w,M=hR(_,{...t==="root"&&!h&&!y[t]&&c,...t!=="root"&&!y[t]&&c,...I,...B&&!u&&{as:B},...B&&u&&{component:B},ref:D},s);return[_,M]}function UP(t){return typeof t.main=="string"}function VP(t,e=[]){if(!UP(t))return!1;for(const n of e)if(!t.hasOwnProperty(n)||typeof t[n]!="string")return!1;return!0}function Ti(t=[]){return([,e])=>e&&VP(e,t)}function WP(t){return yn("MuiPaper",t)}gn("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 HP=t=>{const{square:e,elevation:n,variant:r,classes:s}=t,a={root:["root",r,!e&&"rounded",r==="elevation"&&`elevation${n}`]};return vn(a,WP,s)},GP=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}`]]}})(Mn(({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)"}}]}))),Rd=A.forwardRef(function(e,n){var _;const r=an({props:e,name:"MuiPaper"}),s=y_(),{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=HP(g);return j.jsx(GP,{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":(_=s.vars.overlays)==null?void 0:_[u]},...!s.vars&&s.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${Gr("#fff",_h(u))}, ${Gr("#fff",_h(u))})`}},...y.style}})});function YP(t){return yn("MuiAlert",t)}const m1=gn("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 KP(t){return yn("MuiSvgIcon",t)}gn("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const QP=t=>{const{color:e,fontSize:n,classes:r}=t,s={root:["root",e!=="inherit"&&`color${Oe(e)}`,`fontSize${Oe(n)}`]};return vn(s,KP,r)},XP=Fe("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="inherit"&&e[`color${Oe(n.color)}`],e[`fontSize${Oe(n.fontSize)}`]]}})(Mn(({theme:t})=>{var e,n,r,s,a,c,u,f,h,y,g,v,_,C;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(s=(e=t.transitions)==null?void 0:e.create)==null?void 0:s.call(e,"fill",{duration:(r=(n=(t.vars??t).transitions)==null?void 0:n.duration)==null?void 0:r.shorter}),variants:[{props:w=>!w.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((c=(a=t.typography)==null?void 0:a.pxToRem)==null?void 0:c.call(a,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((f=(u=t.typography)==null?void 0:u.pxToRem)==null?void 0:f.call(u,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((y=(h=t.typography)==null?void 0:h.pxToRem)==null?void 0:y.call(h,35))||"2.1875rem"}},...Object.entries((t.vars??t).palette).filter(([,w])=>w&&w.main).map(([w])=>{var I,P;return{props:{color:w},style:{color:(P=(I=(t.vars??t).palette)==null?void 0:I[w])==null?void 0:P.main}}}),{props:{color:"action"},style:{color:(v=(g=(t.vars??t).palette)==null?void 0:g.action)==null?void 0:v.active}},{props:{color:"disabled"},style:{color:(C=(_=(t.vars??t).palette)==null?void 0:_.action)==null?void 0:C.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Th=A.forwardRef(function(e,n){const r=an({props:e,name:"MuiSvgIcon"}),{children:s,className:a,color:c="inherit",component:u="svg",fontSize:f="medium",htmlColor:h,inheritViewBox:y=!1,titleAccess:g,viewBox:v="0 0 24 24",..._}=r,C=A.isValidElement(s)&&s.type==="svg",w={...r,color:c,component:u,fontSize:f,instanceFontSize:e.fontSize,inheritViewBox:y,viewBox:v,hasSvgAsChild:C},I={};y||(I.viewBox=v);const P=QP(w);return j.jsxs(XP,{as:u,className:ot(P.root,a),focusable:"false",color:h,"aria-hidden":g?void 0:!0,role:g?"img":void 0,ref:n,...I,..._,...C&&s.props,ownerState:w,children:[C?s.props.children:s,g?j.jsx("title",{children:g}):null]})});Th.muiName="SvgIcon";function mo(t,e){function n(r,s){return j.jsx(Th,{"data-testid":`${e}Icon`,ref:s,...r,children:t})}return n.muiName=Th.muiName,A.memo(A.forwardRef(n))}class id{constructor(){Ua(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new id}static use(){const e=o_(id.create).current,[n,r]=A.useState(!1);return e.shouldMount=n,e.setShouldMount=r,A.useEffect(e.mountEffect,[n]),e}mount(){return this.mounted||(this.mounted=JP(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...e){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.start(...e)})}stop(...e){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.stop(...e)})}pulsate(...e){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.pulsate(...e)})}}function qP(){return id.use()}function JP(){let t,e;const n=new Promise((r,s)=>{t=r,e=s});return n.resolve=t,n.reject=e,n}function ZP(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function kh(t,e){return kh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},kh(t,e)}function eO(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,kh(t,e)}const y1=Nt.createContext(null);function tO(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ym(t,e){var n=function(a){return e&&A.isValidElement(a)?e(a):a},r=Object.create(null);return t&&A.Children.map(t,function(s){return s}).forEach(function(s){r[s.key]=n(s)}),r}function nO(t,e){t=t||{},e=e||{};function n(y){return y in e?e[y]:t[y]}var r=Object.create(null),s=[];for(var a in t)a in e?s.length&&(r[a]=s,s=[]):s.push(a);var c,u={};for(var f in e){if(r[f])for(c=0;c<r[f].length;c++){var h=r[f][c];u[r[f][c]]=n(h)}u[f]=n(f)}for(c=0;c<s.length;c++)u[s[c]]=n(s[c]);return u}function Fo(t,e,n){return n[e]!=null?n[e]:t.props[e]}function rO(t,e){return Ym(t.children,function(n){return A.cloneElement(n,{onExited:e.bind(null,n),in:!0,appear:Fo(n,"appear",t),enter:Fo(n,"enter",t),exit:Fo(n,"exit",t)})})}function iO(t,e,n){var r=Ym(t.children),s=nO(e,r);return Object.keys(s).forEach(function(a){var c=s[a];if(A.isValidElement(c)){var u=a in e,f=a in r,h=e[a],y=A.isValidElement(h)&&!h.props.in;f&&(!u||y)?s[a]=A.cloneElement(c,{onExited:n.bind(null,c),in:!0,exit:Fo(c,"exit",t),enter:Fo(c,"enter",t)}):!f&&u&&!y?s[a]=A.cloneElement(c,{in:!1}):f&&u&&A.isValidElement(h)&&(s[a]=A.cloneElement(c,{onExited:n.bind(null,c),in:h.props.in,exit:Fo(c,"exit",t),enter:Fo(c,"enter",t)}))}}),s}var oO=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},sO={component:"div",childFactory:function(e){return e}},Km=function(t){eO(e,t);function e(r,s){var a;a=t.call(this,r,s)||this;var c=a.handleExited.bind(tO(a));return a.state={contextValue:{isMounting:!0},handleExited:c,firstRender:!0},a}var n=e.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(s,a){var c=a.children,u=a.handleExited,f=a.firstRender;return{children:f?rO(s,u):iO(s,c,u),firstRender:!1}},n.handleExited=function(s,a){var c=Ym(this.props.children);s.key in c||(s.props.onExited&&s.props.onExited(a),this.mounted&&this.setState(function(u){var f=Ju({},u.children);return delete f[s.key],{children:f}}))},n.render=function(){var s=this.props,a=s.component,c=s.childFactory,u=ZP(s,["component","childFactory"]),f=this.state.contextValue,h=oO(this.state.children).map(c);return delete u.appear,delete u.enter,delete u.exit,a===null?Nt.createElement(y1.Provider,{value:f},h):Nt.createElement(y1.Provider,{value:f},Nt.createElement(a,u,h))},e}(Nt.Component);Km.propTypes={};Km.defaultProps=sO;function aO(t){const{className:e,classes:n,pulsate:r=!1,rippleX:s,rippleY:a,rippleSize:c,in:u,onExited:f,timeout:h}=t,[y,g]=A.useState(!1),v=ot(e,n.ripple,n.rippleVisible,r&&n.ripplePulsate),_={width:c,height:c,top:-(c/2)+a,left:-(c/2)+s},C=ot(n.child,y&&n.childLeaving,r&&n.childPulsate);return!u&&!y&&g(!0),A.useEffect(()=>{if(!u&&f!=null){const w=setTimeout(f,h);return()=>{clearTimeout(w)}}},[f,u,h]),j.jsx("span",{className:v,style:_,children:j.jsx("span",{className:C})})}const rr=gn("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Rh=550,lO=80,cO=Pl`
124
124
  0% {
125
125
  transform: scale(0);
126
126
  opacity: 0.1;
@@ -221,7 +221,7 @@ export default theme;`}function Sh(t={},...e){const{breakpoints:n,mixins:r={},sp
221
221
  `:null,_O=typeof Ah!="string"?Im`
222
222
  animation: ${Ah} 1.4s ease-in-out infinite;
223
223
  `:null,wO=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 vn(a,bO,e)},CO=Fe("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`color${Oe(n.color)}`]]}})(Mn(({theme:t})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:t.transitions.create("transform")}},{props:{variant:"indeterminate"},style:SO||{animation:`${Eh} 1.4s linear infinite`}},...Object.entries(t.palette).filter(Ti()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}}))]}))),xO=Fe("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(t,e)=>e.svg})({display:"block"}),IO=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]}})(Mn(({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:_O||{animation:`${Ah} 1.4s ease-in-out infinite`}}]}))),Qm=A.forwardRef(function(e,n){const r=an({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,_={...r,color:a,disableShrink:c,size:u,thickness:h,value:y,variant:g},C=wO(_),w={},I={},P={};if(g==="determinate"){const D=2*Math.PI*((qi-h)/2);w.strokeDasharray=D.toFixed(3),P["aria-valuenow"]=Math.round(y),w.strokeDashoffset=`${((100-y)/100*D).toFixed(3)}px`,I.transform="rotate(-90deg)"}return j.jsx(CO,{className:ot(C.root,s),style:{width:u,height:u,...I,...f},ownerState:_,ref:n,role:"progressbar",...P,...v,children:j.jsx(xO,{className:C.svg,ownerState:_,viewBox:`${qi/2} ${qi/2} ${qi} ${qi}`,children:j.jsx(IO,{className:C.circle,style:w,ownerState:_,cx:qi,cy:qi,r:(qi-h)/2,fill:"none",strokeWidth:h})})})});function TO(t){return yn("MuiIconButton",t)}const g1=gn("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),kO=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 vn(u,TO,e)},RO=Fe(Q_,{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)}`]]}})(Mn(({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})`:Gr(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}}]})),Mn(({theme:t})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(t.palette).filter(Ti()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}})),...Object.entries(t.palette).filter(Ti()).map(([e])=>({props:{color:e},style:{"--IconButton-hoverBg":t.vars?`rgba(${(t.vars||t).palette[e].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Gr((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)}}],[`&.${g1.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled},[`&.${g1.loading}`]:{color:"transparent"}}))),EO=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"}}]})),AO=A.forwardRef(function(e,n){const r=an({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}=r,w=i_(g),I=_??j.jsx(Qm,{"aria-labelledby":w,color:"inherit",size:16}),P={...r,edge:s,color:u,disabled:f,disableFocusRipple:h,loading:v,loadingIndicator:I,size:y},D=kO(P);return j.jsxs(RO,{id:v?w:g,className:ot(D.root,c),centerRipple:!0,focusRipple:!h,disabled:f||v,ref:n,...C,ownerState:P,children:[typeof v=="boolean"&&j.jsx("span",{className:D.loadingWrapper,style:{display:"contents"},children:j.jsx(EO,{className:D.loadingIndicator,ownerState:P,children:v&&I})}),a]})}),PO=mo(j.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"),OO=mo(j.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),MO=mo(j.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"),DO=mo(j.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"),NO=mo(j.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"),BO=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 vn(a,YP,s)},LO=Fe(Rd,{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)}`]]}})(Mn(({theme:t})=>{const e=t.palette.mode==="light"?yl:gl,n=t.palette.mode==="light"?gl:yl;return{...t.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(t.palette).filter(Ti(["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),[`& .${m1.icon}`]:t.vars?{color:t.vars.palette.Alert[`${r}IconColor`]}:{color:t.palette[r].main}}})),...Object.entries(t.palette).filter(Ti(["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}`,[`& .${m1.icon}`]:t.vars?{color:t.vars.palette.Alert[`${r}IconColor`]}:{color:t.palette[r].main}}})),...Object.entries(t.palette).filter(Ti(["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)}}}))]}})),FO=Fe("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(t,e)=>e.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),$O=Fe("div",{name:"MuiAlert",slot:"Message",overridesResolver:(t,e)=>e.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),jO=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}),v1={success:j.jsx(PO,{fontSize:"inherit"}),warning:j.jsx(OO,{fontSize:"inherit"}),error:j.jsx(MO,{fontSize:"inherit"}),info:j.jsx(DO,{fontSize:"inherit"})},X_=A.forwardRef(function(e,n){const r=an({props:e,name:"MuiAlert"}),{action:s,children:a,className:c,closeText:u="Close",color:f,components:h={},componentsProps:y={},icon:g,iconMapping:v=v1,onClose:_,role:C="alert",severity:w="success",slotProps:I={},slots:P={},variant:D="standard",...B}=r,M={...r,color:f,severity:w,variant:D,colorSeverity:f||w},E=BO(M),U={slots:{closeButton:h.CloseButton,closeIcon:h.CloseIcon,...P},slotProps:{...y,...I}},[O,V]=Is("root",{ref:n,shouldForwardComponentProp:!0,className:ot(E.root,c),elementType:LO,externalForwardedProps:{...U,...B},ownerState:M,additionalProps:{role:C,elevation:0}}),[Y,S]=Is("icon",{className:E.icon,elementType:FO,externalForwardedProps:U,ownerState:M}),[F,H]=Is("message",{className:E.message,elementType:$O,externalForwardedProps:U,ownerState:M}),[X,le]=Is("action",{className:E.action,elementType:jO,externalForwardedProps:U,ownerState:M}),[ce,de]=Is("closeButton",{elementType:AO,externalForwardedProps:U,ownerState:M}),[fe,J]=Is("closeIcon",{elementType:NO,externalForwardedProps:U,ownerState:M});return j.jsxs(O,{...V,children:[g!==!1?j.jsx(Y,{...S,children:g||v[w]||v1[w]}):null,j.jsx(F,{...H,children:a}),s!=null?j.jsx(X,{...le,children:s}):null,s==null&&_?j.jsx(X,{...le,children:j.jsx(ce,{size:"small","aria-label":u,title:u,color:"inherit",onClick:_,...de,children:j.jsx(fe,{fontSize:"small",...J})})}):null]})});function zO(t){return yn("MuiButton",t)}const Po=gn("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"]),UO=A.createContext({}),VO=A.createContext(void 0),WO=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=vn(h,zO,f);return{...f,...y}},q_=[{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}}}],HO=Fe(Q_,{shouldForwardProp:t=>Dl(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]}})(Mn(({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"},[`&.${Po.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]},[`&.${Po.focusVisible}`]:{boxShadow:(t.vars||t).shadows[6]},[`&.${Po.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)",[`&.${Po.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(Ti()).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)`:Gr(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})`:Gr(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})`:Gr(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})`:Gr(t.palette.text.primary,t.palette.action.hoverOpacity),"--variant-outlinedBg":t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:Gr(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"},[`&.${Po.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Po.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}),[`&.${Po.loading}`]:{color:"transparent"}}}]}})),GO=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}},...q_]})),YO=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}},...q_]})),KO=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"}),J_=A.forwardRef(function(e,n){const r=A.useContext(UO),s=A.useContext(VO),a=ml(r,e),c=an({props:a,name:"MuiButton"}),{children:u,color:f="primary",component:h="button",className:y,disabled:g=!1,disableElevation:v=!1,disableFocusRipple:_=!1,endIcon:C,focusVisibleClassName:w,fullWidth:I=!1,id:P,loading:D=null,loadingIndicator:B,loadingPosition:M="center",size:E="medium",startIcon:U,type:O,variant:V="text",...Y}=c,S=i_(P),F=B??j.jsx(Qm,{"aria-labelledby":S,color:"inherit",size:16}),H={...c,color:f,component:h,disabled:g,disableElevation:v,disableFocusRipple:_,fullWidth:I,loading:D,loadingIndicator:F,loadingPosition:M,size:E,type:O,variant:V},X=WO(H),le=(U||D&&M==="start")&&j.jsx(GO,{className:X.startIcon,ownerState:H,children:U||j.jsx(b1,{className:X.loadingIconPlaceholder,ownerState:H})}),ce=(C||D&&M==="end")&&j.jsx(YO,{className:X.endIcon,ownerState:H,children:C||j.jsx(b1,{className:X.loadingIconPlaceholder,ownerState:H})}),de=s||"",fe=typeof D=="boolean"?j.jsx("span",{className:X.loadingWrapper,style:{display:"contents"},children:D&&j.jsx(KO,{className:X.loadingIndicator,ownerState:H,children:F})}):null;return j.jsxs(HO,{ownerState:H,className:ot(r.className,X.root,y,de),component:h,disabled:g||D,focusRipple:!_,focusVisibleClassName:ot(X.focusVisible,w),ref:n,type:O,id:D?S:P,...Y,classes:X,children:[le,M!=="end"&&fe,u,M==="end"&&fe,ce]})}),Xm=YR({createStyledComponent:Fe("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root}),useThemeProps:t=>an({props:t,name:"MuiStack"})});function Z_(t){return yn("MuiNativeSelect",t)}const qm=gn("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),QO=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 vn(u,Z_,e)},XO=Fe("select")(({theme:t})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${qm.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}}}]})),qO=Fe(XO,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Dl,overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.select,e[n.variant],n.error&&e.error,{[`&.${qm.multiple}`]:e.multiple}]}})({}),JO=Fe("svg")(({theme:t})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${qm.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}}]})),ZO=Fe(JO,{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]}})({}),e5=A.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=QO(y);return j.jsxs(A.Fragment,{children:[j.jsx(qO,{ownerState:y,className:ot(g.select,r),disabled:s,ref:u||n,...h}),e.multiple?null:j.jsx(ZO,{as:c,ownerState:y,className:g.icon})]})});function Ed({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 Jm=A.createContext(void 0);function Ad(){return A.useContext(Jm)}const t5=mo(j.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function nu(t){return parseInt(t,10)||0}const n5={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function r5(t){for(const e in t)return!1;return!0}function i5(t){return r5(t)||t.outerHeightStyle===0&&!t.overflowing}const o5=A.forwardRef(function(e,n){const{onChange:r,maxRows:s,minRows:a=1,style:c,value:u,...f}=e,{current:h}=A.useRef(u!=null),y=A.useRef(null),g=vl(n,y),v=A.useRef(null),_=A.useRef(null),C=A.useCallback(()=>{const D=y.current,B=_.current;if(!D||!B)return;const E=Fv(D).getComputedStyle(D);if(E.width==="0px")return{outerHeightStyle:0,overflowing:!1};B.style.width=E.width,B.value=D.value||e.placeholder||"x",B.value.slice(-1)===`
224
- `&&(B.value+=" ");const U=E.boxSizing,O=nu(E.paddingBottom)+nu(E.paddingTop),V=nu(E.borderBottomWidth)+nu(E.borderTopWidth),Y=B.scrollHeight;B.value="x";const S=B.scrollHeight;let F=Y;a&&(F=Math.max(Number(a)*S,F)),s&&(F=Math.min(Number(s)*S,F)),F=Math.max(F,S);const H=F+(U==="border-box"?O+V:0),X=Math.abs(F-Y)<=1;return{outerHeightStyle:H,overflowing:X}},[s,a,e.placeholder]),w=A.useCallback(()=>{const D=y.current,B=C();if(!D||!B||i5(B))return;const M=B.outerHeightStyle;v.current!==M&&(v.current=M,D.style.height=`${M}px`),D.style.overflow=B.overflowing?"hidden":""},[C]),I=A.useRef(-1);Qs(()=>{const D=oR(()=>w()),B=y==null?void 0:y.current;if(!B)return;const M=Fv(B);M.addEventListener("resize",D);let E;return typeof ResizeObserver<"u"&&(E=new ResizeObserver(()=>{E.unobserve(B),cancelAnimationFrame(I.current),w(),I.current=requestAnimationFrame(()=>{E.observe(B)})}),E.observe(B)),()=>{D.clear(),cancelAnimationFrame(I.current),M.removeEventListener("resize",D),E&&E.disconnect()}},[C,w]),Qs(()=>{w()});const P=D=>{h||w(),r&&r(D)};return j.jsxs(A.Fragment,{children:[j.jsx("textarea",{value:u,onChange:P,ref:g,rows:a,style:c,...f}),j.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:_,tabIndex:-1,style:{...n5.shadow,...c,paddingTop:0,paddingBottom:0}})]})});function S1(t){return typeof t=="string"}function _1(t){return t!=null&&!(Array.isArray(t)&&t.length===0)}function Ph(t,e=!1){return t&&(_1(t.value)&&t.value!==""||e&&_1(t.defaultValue)&&t.defaultValue!=="")}function s5(t){return t.startAdornment}function a5(t){return yn("MuiInputBase",t)}const od=gn("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var w1;const e2=(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]},t2=(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]},l5=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:_,type:C}=t,w={root:["root",`color${Oe(n)}`,r&&"disabled",s&&"error",f&&"fullWidth",c&&"focused",u&&"formControl",v&&v!=="medium"&&`size${Oe(v)}`,y&&"multiline",_&&"adornedStart",a&&"adornedEnd",h&&"hiddenLabel",g&&"readOnly"],input:["input",r&&"disabled",C==="search"&&"inputTypeSearch",y&&"inputMultiline",v==="small"&&"inputSizeSmall",h&&"inputHiddenLabel",_&&"inputAdornedStart",a&&"inputAdornedEnd",g&&"readOnly"]};return vn(w,a5,e)},n2=Fe("div",{name:"MuiInputBase",slot:"Root",overridesResolver:e2})(Mn(({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",[`&.${od.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%"}}]}))),r2=Fe("input",{name:"MuiInputBase",slot:"Input",overridesResolver:t2})(Mn(({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] + .${od.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},[`&.${od.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"}}]}})),C1=Gm({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),c5=A.forwardRef(function(e,n){const r=an({props:e,name:"MuiInputBase"}),{"aria-describedby":s,autoComplete:a,autoFocus:c,className:u,color:f,components:h={},componentsProps:y={},defaultValue:g,disabled:v,disableInjectingGlobalStyles:_,endAdornment:C,error:w,fullWidth:I=!1,id:P,inputComponent:D="input",inputProps:B={},inputRef:M,margin:E,maxRows:U,minRows:O,multiline:V=!1,name:Y,onBlur:S,onChange:F,onClick:H,onFocus:X,onKeyDown:le,onKeyUp:ce,placeholder:de,readOnly:fe,renderSuffix:J,rows:te,size:ne,slotProps:k={},slots:G={},startAdornment:ue,type:ge="text",value:De,...xe}=r,$e=B.value!=null?B.value:De,{current:Ne}=A.useRef($e!=null),ze=A.useRef(),Lt=A.useCallback(He=>{},[]),dr=vl(ze,M,B.ref,Lt),[fr,Nn]=A.useState(!1),qe=Ad(),Ut=Ed({props:r,muiFormControl:qe,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Ut.focused=qe?qe.focused:fr,A.useEffect(()=>{!qe&&v&&fr&&(Nn(!1),S&&S())},[qe,v,fr,S]);const pr=qe&&qe.onFilled,Qt=qe&&qe.onEmpty,st=A.useCallback(He=>{Ph(He)?pr&&pr():Qt&&Qt()},[pr,Qt]);Qs(()=>{Ne&&st({value:$e})},[$e,st,Ne]);const Bn=He=>{X&&X(He),B.onFocus&&B.onFocus(He),qe&&qe.onFocus?qe.onFocus(He):Nn(!0)},Xt=He=>{S&&S(He),B.onBlur&&B.onBlur(He),qe&&qe.onBlur?qe.onBlur(He):Nn(!1)},Kn=(He,...qt)=>{if(!Ne){const cn=He.target||ze.current;if(cn==null)throw new Error(so(1));st({value:cn.value})}B.onChange&&B.onChange(He,...qt),F&&F(He,...qt)};A.useEffect(()=>{st(ze.current)},[]);const me=He=>{ze.current&&He.currentTarget===He.target&&ze.current.focus(),H&&H(He)};let ei=D,ln=B;V&&ei==="input"&&(te?ln={type:void 0,minRows:te,maxRows:te,...ln}:ln={type:void 0,maxRows:U,minRows:O,...ln},ei=o5);const yo=He=>{st(He.animationName==="mui-auto-fill-cancel"?ze.current:{value:"x"})};A.useEffect(()=>{qe&&qe.setAdornedStart(!!ue)},[qe,ue]);const ti={...r,color:Ut.color||"primary",disabled:Ut.disabled,endAdornment:C,error:Ut.error,focused:Ut.focused,formControl:qe,fullWidth:I,hiddenLabel:Ut.hiddenLabel,multiline:V,size:Ut.size,startAdornment:ue,type:ge},ni=l5(ti),vt=G.root||h.Root||n2,kt=k.root||y.root||{},Ct=G.input||h.Input||r2;return ln={...ln,...k.input??y.input},j.jsxs(A.Fragment,{children:[!_&&typeof C1=="function"&&(w1||(w1=j.jsx(C1,{}))),j.jsxs(vt,{...kt,ref:n,onClick:me,...xe,...!S1(vt)&&{ownerState:{...ti,...kt.ownerState}},className:ot(ni.root,kt.className,u,fe&&"MuiInputBase-readOnly"),children:[ue,j.jsx(Jm.Provider,{value:null,children:j.jsx(Ct,{"aria-invalid":Ut.error,"aria-describedby":s,autoComplete:a,autoFocus:c,defaultValue:g,disabled:Ut.disabled,id:P,onAnimationStart:yo,name:Y,placeholder:de,readOnly:fe,required:Ut.required,rows:te,value:$e,onKeyDown:le,onKeyUp:ce,type:ge,...ln,...!S1(Ct)&&{as:ei,ownerState:{...ti,...ln.ownerState}},ref:dr,className:ot(ni.input,ln.className,fe&&"MuiInputBase-readOnly"),onBlur:Xt,onChange:Kn,onFocus:Bn})}),C,J?J({...Ut,startAdornment:ue}):null]})]})});function u5(t){return yn("MuiInput",t)}const Qa={...od,...gn("MuiInput",["root","underline","input"])},d5=t=>{const{classes:e,disableUnderline:n}=t,s=vn({root:["root",!n&&"underline"],input:["input"]},u5,e);return{...e,...s}},f5=Fe(n2,{shouldForwardProp:t=>Dl(t)||t==="classes",name:"MuiInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...e2(t,e),!n.disableUnderline&&e.underline]}})(Mn(({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"},[`&.${Qa.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Qa.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(.${Qa.disabled}, .${Qa.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Qa.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(t.palette).filter(Ti()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[r].main}`}}}))]}})),p5=Fe(r2,{name:"MuiInput",slot:"Input",overridesResolver:t2})({}),i2=A.forwardRef(function(e,n){const r=an({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",..._}=r,C=d5(r),I={root:{ownerState:{disableUnderline:s}}},P=y??c?sn(y??c,I):I,D=g.root??a.Root??f5,B=g.input??a.Input??p5;return j.jsx(c5,{slots:{root:D,input:B},slotProps:P,fullWidth:u,inputComponent:f,multiline:h,ref:n,type:v,..._,classes:C})});i2.muiName="Input";const h5=t=>{const{classes:e}=t;return vn({root:["root"]},Z_,e)},m5=j.jsx(i2,{}),Oh=A.forwardRef(function(e,n){const r=an({name:"MuiNativeSelect",props:e}),{className:s,children:a,classes:c={},IconComponent:u=t5,input:f=m5,inputProps:h,variant:y,...g}=r,v=Ad(),_=Ed({props:r,muiFormControl:v,states:["variant"]}),C={...r,classes:c},w=h5(C),{root:I,...P}=c;return j.jsx(A.Fragment,{children:A.cloneElement(f,{inputComponent:e5,inputProps:{children:a,classes:P,IconComponent:u,variant:_.variant,type:void 0,...h,...f?f.props.inputProps:{}},ref:n,...g,className:ot(w.root,f.props.className,s)})})});Oh.muiName="Select";function y5(t){return yn("MuiFormLabel",t)}const il=gn("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),g5=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 vn(f,y5,e)},v5=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]}})(Mn(({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(Ti()).map(([e])=>({props:{color:e},style:{[`&.${il.focused}`]:{color:(t.vars||t).palette[e].main}}})),{props:{},style:{[`&.${il.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${il.error}`]:{color:(t.vars||t).palette.error.main}}}]}))),b5=Fe("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(Mn(({theme:t})=>({[`&.${il.error}`]:{color:(t.vars||t).palette.error.main}}))),S5=A.forwardRef(function(e,n){const r=an({props:e,name:"MuiFormLabel"}),{children:s,className:a,color:c,component:u="label",disabled:f,error:h,filled:y,focused:g,required:v,..._}=r,C=Ad(),w=Ed({props:r,muiFormControl:C,states:["color","required","focused","disabled","error","filled"]}),I={...r,color:w.color||"primary",component:u,disabled:w.disabled,error:w.error,filled:w.filled,focused:w.focused,required:w.required},P=g5(I);return j.jsxs(v5,{as:u,ownerState:I,className:ot(P.root,a),ref:n,..._,children:[s,w.required&&j.jsxs(b5,{ownerState:I,"aria-hidden":!0,className:P.asterisk,children:[" ","*"]})]})});function _5(t){return yn("MuiInputLabel",t)}gn("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const w5=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=vn(f,_5,e);return{...e,...h}},C5=Fe(S5,{shouldForwardProp:t=>Dl(t)||t==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${il.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]]}})(Mn(({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)"}}]}))),x1=A.forwardRef(function(e,n){const r=an({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=Ed({props:r,muiFormControl:y,states:["size","variant","required","focused"]}),_={...r,disableAnimation:s,formControl:y,shrink:g,size:v.size,variant:v.variant,required:v.required,focused:v.focused},C=w5(_);return j.jsx(C5,{"data-shrink":g,ref:n,className:ot(C.root,f),...h,ownerState:_,classes:C})});function x5(t){return yn("MuiFormControl",t)}gn("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const I5=t=>{const{classes:e,margin:n,fullWidth:r}=t,s={root:["root",n!=="none"&&`margin${Oe(n)}`,r&&"fullWidth"]};return vn(s,x5,e)},T5=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%"}}]}),I1=A.forwardRef(function(e,n){const r=an({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:_="none",required:C=!1,size:w="medium",variant:I="outlined",...P}=r,D={...r,color:c,component:u,disabled:f,error:h,fullWidth:g,hiddenLabel:v,margin:_,required:C,size:w,variant:I},B=I5(D),[M,E]=A.useState(()=>{let ce=!1;return s&&A.Children.forEach(s,de=>{if(!Fp(de,["Input","Select"]))return;const fe=Fp(de,["Select"])?de.props.input:de;fe&&s5(fe.props)&&(ce=!0)}),ce}),[U,O]=A.useState(()=>{let ce=!1;return s&&A.Children.forEach(s,de=>{Fp(de,["Input","Select"])&&(Ph(de.props,!0)||Ph(de.props.inputProps,!0))&&(ce=!0)}),ce}),[V,Y]=A.useState(!1);f&&V&&Y(!1);const S=y!==void 0&&!f?y:V;let F;A.useRef(!1);const H=A.useCallback(()=>{O(!0)},[]),X=A.useCallback(()=>{O(!1)},[]),le=A.useMemo(()=>({adornedStart:M,setAdornedStart:E,color:c,disabled:f,error:h,filled:U,focused:S,fullWidth:g,hiddenLabel:v,size:w,onBlur:()=>{Y(!1)},onFocus:()=>{Y(!0)},onEmpty:X,onFilled:H,registerEffect:F,required:C,variant:I}),[M,c,f,h,U,S,g,v,F,X,H,C,w,I]);return j.jsx(Jm.Provider,{value:le,children:j.jsx(T5,{as:u,ownerState:D,className:ot(B.root,a),ref:n,...P,children:s})})}),k5=n_({themeId:Cr});function R5(t){const e=y_(),n=k5(e.breakpoints.down("sm"));return A.useEffect(()=>{hn.setFrameHeight()},[n]),j.jsx(Xm,{direction:n?"column":"row",spacing:2,children:t.children})}const E5=Fe($s)(({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"})),A5=E5,P5=Fe(Rd)(({theme:t})=>({display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",padding:t.spacing(2),boxSizing:"border-box"})),Nl=P5,Bl=t=>{const e=A.useContext(K_);return e==null?null:e[t]};function O5(){return j.jsx(Nl,{children:Bl("media_api_not_available")||"Media API not available"})}function M5(){return j.jsx(Nl,{children:Bl("device_ask_permission")||"Please allow the app to use your media devices"})}function D5(t){return j.jsxs(Nl,{children:[Bl("device_access_denied")||"Access denied"," (",t.error.message,")"]})}function N5(t){return j.jsxs(Nl,{children:[Bl("device_not_available")||"Device not available"," (",t.error.message,")"]})}const B5=mo(j.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"),L5=Fe(Rd)({display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"});function F5(){return j.jsx(L5,{children:j.jsx(B5,{fontSize:"large"})})}const $5=Nt.memo(F5),j5=Fe($s,{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]=A.useState(!1);return A.useEffect(()=>{const r=setTimeout(()=>{n(!0)},t.time);return()=>clearTimeout(r)},[t.time]),j.jsx(j5,{$transparent:e,children:t.children})}const U5=Fe("video")({maxWidth:"100%",maxHeight:"100%"}),V5=U5;function Mh(t){t.getVideoTracks().forEach(e=>e.stop()),t.getAudioTracks().forEach(e=>e.stop())}function W5(t){const e=A.useRef(null);return A.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){Mh(n);return}e.current&&(e.current.srcObject=n)}),()=>{r=!0,n&&Mh(n)}},[t.deviceId]),j.jsx(V5,{ref:e,autoPlay:!0,muted:!0})}const H5=Nt.memo(W5);function T1(t,e){const n=t.map(r=>r.deviceId);if(e&&n.includes(e))return e;if(n.length>0)return n[0]}const G5=(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=T1(r,t.selectedVideoInputDeviceId),u=T1(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 Y5(t){const{video:e,audio:n,defaultVideoDeviceId:r,defaultAudioDeviceId:s,onSelect:a}=t,[c,u]=A.useState("WAITING"),[{unavailable:f,videoInputs:h,selectedVideoInputDeviceId:y,audioInputs:g,selectedAudioInputDeviceId:v},_]=A.useReducer(G5,{unavailable:!1,videoInputs:[],audioInputs:[],audioOutputs:[],selectedVideoInputDeviceId:r,selectedAudioInputDeviceId:s}),C=A.useCallback(()=>{var D;if(typeof((D=navigator==null?void 0:navigator.mediaDevices)==null?void 0:D.enumerateDevices)!="function"){_({type:"SET_UNAVAILABLE"});return}return navigator.mediaDevices.enumerateDevices().then(B=>{_({type:"UPDATE_DEVICES",devices:B})})},[]),w=A.useRef({video:r,audio:s});w.current={video:r,audio:s},A.useEffect(()=>{var M;if(typeof((M=navigator==null?void 0:navigator.mediaDevices)==null?void 0:M.getUserMedia)!="function"){_({type:"SET_UNAVAILABLE"});return}u("WAITING");const{video:D,audio:B}=w.current;navigator.mediaDevices.getUserMedia({video:e&&D?{deviceId:D}:e,audio:n&&B?{deviceId:B}:n}).then(async E=>{Mh(E),await C(),u("ALLOWED")}).catch(E=>{u(E)})},[e,n,C]),A.useEffect(()=>{const D=()=>C();return navigator.mediaDevices.ondevicechange=D,()=>{navigator.mediaDevices.ondevicechange===D&&(navigator.mediaDevices.ondevicechange=null)}},[C]);const I=A.useCallback(D=>{_({type:"UPDATE_SELECTED_DEVICE_ID",payload:{selectedVideoInputDeviceId:D.target.value}})},[]),P=A.useCallback(D=>{_({type:"UPDATE_SELECTED_DEVICE_ID",payload:{selectedAudioInputDeviceId:D.target.value}})},[]);if(A.useEffect(()=>{const D=e?h.find(M=>M.deviceId===y):null,B=n?g.find(M=>M.deviceId===v):null;a({video:D==null?void 0:D.deviceId,audio:B==null?void 0:B.deviceId})},[e,n,a,h,g,y,v]),A.useEffect(()=>{setTimeout(()=>hn.setFrameHeight())}),f)return j.jsx(O5,{});if(c==="WAITING")return j.jsx(z5,{time:1e3,children:j.jsx(M5,{})});if(c instanceof Error){const D=c;return D instanceof DOMException&&(D.name==="NotReadableError"||D.name==="NotFoundError")?j.jsx(N5,{error:D}):D instanceof DOMException&&D.name==="NotAllowedError"?j.jsx(D5,{error:D}):j.jsx(Nl,{children:j.jsxs(X_,{severity:"error",children:[D.name,": ",D.message]})})}return j.jsxs(R5,{children:[j.jsx(A5,{children:e&&y?j.jsx(H5,{deviceId:y}):j.jsx($5,{})}),j.jsxs(Xm,{spacing:2,justifyContent:"center",children:[e&&y&&j.jsxs(I1,{fullWidth:!0,children:[j.jsx(x1,{htmlFor:"device-select-video-input",children:"Video Input"}),j.jsx(Oh,{inputProps:{name:"video-input",id:"device-select-video-input"},value:y,onChange:I,children:h.map(D=>j.jsx("option",{value:D.deviceId,children:D.label},D.deviceId))})]}),n&&v&&j.jsxs(I1,{fullWidth:!0,children:[j.jsx(x1,{htmlFor:"device-select-audio-input",children:"Audio Input"}),j.jsx(Oh,{inputProps:{name:"audio-input",id:"device-select-audio-input"},value:v,onChange:P,children:g.map(D=>j.jsx("option",{value:D.deviceId,children:D.label},D.deviceId))})]})]})]})}function K5({onClose:t,...e}){return j.jsxs(Xm,{spacing:2,children:[j.jsx(Y5,{...e}),j.jsx($s,{children:j.jsx(J_,{variant:"contained",color:"primary",onClick:t,children:"Done"})})]})}function Q5(t){var s,a,c,u,f,h,y,g,v,_,C,w,I,P,D,B,M,E,U,O,V,Y,S,F,H,X,le;A.useEffect(()=>{hn.setFrameHeight()});const e=t.stream.getVideoTracks().length>0,n=A.useCallback(ce=>{ce&&(ce.srcObject=t.stream)},[t.stream]),r=A.useCallback(()=>hn.setFrameHeight(),[]);if(e){const ce={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:(_=t.userDefinedVideoAttrs)==null?void 0:_.playsInline,preload:(C=t.userDefinedVideoAttrs)==null?void 0:C.preload,height:(w=t.userDefinedVideoAttrs)==null?void 0:w.height,poster:(I=t.userDefinedVideoAttrs)==null?void 0:I.poster,width:(P=t.userDefinedVideoAttrs)==null?void 0:P.width,disablePictureInPicture:(D=t.userDefinedVideoAttrs)==null?void 0:D.disablePictureInPicture,disableRemotePlayback:(B=t.userDefinedVideoAttrs)==null?void 0:B.disableRemotePlayback};return j.jsx("video",{...ce,ref:n,onCanPlay:r})}else{const ce={hidden:(M=t.userDefinedAudioAttrs)==null?void 0:M.hidden,style:(E=t.userDefinedAudioAttrs)==null?void 0:E.style,autoPlay:(U=t.userDefinedAudioAttrs)==null?void 0:U.autoPlay,controls:(O=t.userDefinedAudioAttrs)==null?void 0:O.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:(F=t.userDefinedAudioAttrs)==null?void 0:F.mediaGroup,muted:(H=t.userDefinedAudioAttrs)==null?void 0:H.muted,playsInline:(X=t.userDefinedAudioAttrs)==null?void 0:X.playsInline,preload:(le=t.userDefinedAudioAttrs)==null?void 0:le.preload};return j.jsx("audio",{ref:n,...ce})}}const X5=Nt.memo(Q5),q5=mo(j.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(Rd)(({theme:t})=>({padding:t.spacing(4),display:"flex",justifyContent:"center",alignItems:"center",width:"100%"}));function Z5(t){return A.useEffect(()=>{hn.setFrameHeight()}),j.jsx(J5,{elevation:0,children:t.loading?j.jsx(Qm,{}):j.jsx(q5,{fontSize:"large"})})}const e4=Nt.memo(Z5);function t4(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 n4(t){const e=t?!!t.video:!0,n=t?!!t.audio:!0;return{videoEnabled:e,audioEnabled:n}}const r4={webRtcState:"STOPPED",sdpOffer:null,signallingTimedOut:!1,stream:null,error:null},i4=(t,e)=>{switch(e.type){case"SIGNALLING_START":return{...t,webRtcState:"SIGNALLING",stream:null,error:null,signallingTimedOut:!1};case"SIGNALLING_TIMEOUT":return{...t,signallingTimedOut:!0};case"SET_STREAM":return{...t,stream:e.stream};case"SET_OFFER":return{...t,sdpOffer:e.offer};case"STOPPING":return{...t,webRtcState:"STOPPING",sdpOffer:null};case"STOPPED":return{...t,webRtcState:"STOPPED",sdpOffer:null,stream:null};case"START_PLAYING":return{...t,webRtcState:"PLAYING",sdpOffer:null};case"PROCESS_ANSWER_ERROR":return{...t,error:e.error};case"ERROR":return{...t,webRtcState:"STOPPED",sdpOffer:null,error:e.error}}},o4=t=>(n,r)=>{const s=i4(n,r),a=s.webRtcState==="PLAYING",c=n.webRtcState==="PLAYING",u=a!==c,f=s.sdpOffer,h=n.sdpOffer;return(u||f!==h)&&(h&&console.log("Send SDP offer",h),t({playing:a,sdpOffer:f?f.toJSON():""})),s},Dh=t=>t==="RECVONLY"||t==="SENDONLY"||t==="SENDRECV",s4=t=>t==="SENDRECV"||t==="RECVONLY",a4=t=>t==="SENDRECV"||t==="SENDONLY",l4=t=>t.createOffer().then(e=>(console.log("Created offer:",e),t.setLocalDescription(e))).then(()=>(console.log("Wait for ICE gethering..."),new Promise(e=>{if(t.iceGatheringState==="complete")e();else{const n=()=>{t.iceGatheringState==="complete"&&(t.removeEventListener("icegatheringstatechange",n),e())};t.addEventListener("icegatheringstatechange",n)}}))).then(()=>t.localDescription).catch(e=>{throw console.error(e),e}),c4=3*1e3,u4=(t,e,n,r,s)=>{A.useEffect(()=>r({playing:!1,sdpOffer:""}),[]);const a=A.useRef(),c=A.useRef(),u=A.useMemo(()=>o4(r),[r]),[f,h]=A.useReducer(u,r4),y=A.useCallback(()=>{(async()=>{if(f.webRtcState==="STOPPING")return;const C=c.current;if(c.current=void 0,h({type:"STOPPING"}),C!=null)return C.getTransceivers&&C.getTransceivers().forEach(function(w){w.stop&&w.stop()}),C.getSenders().forEach(function(w){var I;(I=w.track)==null||I.stop()}),new Promise(w=>{setTimeout(()=>{C.close(),w()},500)})})().catch(C=>h({type:"ERROR",error:C})).finally(()=>{h({type:"STOPPED"})})},[f.webRtcState]),g=A.useRef(y);g.current=y;const v=A.useCallback(()=>{if(f.webRtcState!=="STOPPED")return;(async()=>{h({type:"SIGNALLING_START"}),a.current=setTimeout(()=>{h({type:"SIGNALLING_TIMEOUT"})},c4);const C=t.mode,w=t.rtcConfiguration||{};console.log("RTCConfiguration:",w);const I=new RTCPeerConnection(w);if((C==="SENDRECV"||C==="RECVONLY")&&I.addEventListener("track",P=>{const D=P.streams[0];h({type:"SET_STREAM",stream:D})}),C==="SENDRECV"||C==="SENDONLY"){const P=t4(t.mediaStreamConstraints,e,n);if(console.log("MediaStreamConstraints:",P),P.audio||P.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 D={},B=await navigator.mediaDevices.getUserMedia(P);B.getTracks().forEach(M=>{I.addTrack(M,B);const E=M.kind;if(E!=="video"&&E!=="audio")return;const U=M.getSettings().deviceId;U!=null&&(D[E]=U)}),Object.keys(D).length>0&&s(D)}if(C==="SENDONLY")for(const D of I.getTransceivers())D.direction="sendonly"}else C==="RECVONLY"&&(I.addTransceiver("video",{direction:"recvonly"}),I.addTransceiver("audio",{direction:"recvonly"}));console.log("transceivers",I.getTransceivers()),I.addEventListener("iceconnectionstatechange",()=>{console.log("iceconnectionstatechange",I.iceConnectionState),(I.iceConnectionState==="disconnected"||I.iceConnectionState==="failed"||I.iceConnectionState==="closed")&&g.current()}),c.current=I,await l4(I).then(P=>{if(P==null)throw new Error("Failed to create an offer SDP");h({type:"SET_OFFER",offer:P})})})().catch(C=>h({type:"ERROR",error:C}))},[n,e,t.mediaStreamConstraints,t.mode,t.rtcConfiguration,f.webRtcState,s]);return A.useEffect(()=>{const _=c.current;if(_==null)return;const C=t.sdpAnswerJson;if(_.remoteDescription==null&&C&&f.webRtcState==="SIGNALLING"){const w=JSON.parse(C);console.log("Receive answer sdpOffer",w),_.setRemoteDescription(w).then(()=>{console.log("Remote description is set"),a.current&&clearTimeout(a.current),h({type:"START_PLAYING"})}).catch(I=>{h({type:"PROCESS_ANSWER_ERROR",error:I}),y()})}},[t.sdpAnswerJson,f.webRtcState,y]),A.useEffect(()=>{const _=t.desiredPlayingState;_!=null&&(_===!0&&f.webRtcState==="STOPPED"?v():_===!1&&(f.webRtcState==="SIGNALLING"||f.webRtcState==="PLAYING")&&y())},[t.desiredPlayingState,v,f.webRtcState,y]),{start:v,stop:y,state:f}};function d4(t){return hn.setComponentValue(t)}function Jp({translationKey:t,defaultText:e,...n}){return j.jsx(J_,{...n,children:Bl(t)||e})}let o2=!0,s2=!0;function yu(t,e,n){const r=t.match(e);return r&&r.length>=n&&parseInt(r[n],10)}function Ho(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 f4(t){return typeof t!="boolean"?new Error("Argument type: "+typeof t+". Please use a boolean."):(o2=t,t?"adapter.js logging disabled":"adapter.js logging enabled")}function p4(t){return typeof t!="boolean"?new Error("Argument type: "+typeof t+". Please use a boolean."):(s2=!t,"adapter.js deprecation warnings "+(t?"disabled":"enabled"))}function a2(){if(typeof window=="object"){if(o2)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function Zm(t,e){s2&&console.warn(t+" is deprecated, please use "+e+" instead.")}function h4(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=yu(n.userAgent,/Firefox\/(\d+)\./,1);else if(n.webkitGetUserMedia||t.isSecureContext===!1&&t.webkitRTCPeerConnection)e.browser="chrome",e.version=yu(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(t.RTCPeerConnection&&n.userAgent.match(/AppleWebKit\/(\d+)\./))e.browser="safari",e.version=yu(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 k1(t){return Object.prototype.toString.call(t)==="[object Object]"}function l2(t){return k1(t)?Object.keys(t).reduce(function(e,n){const r=k1(t[n]),s=r?l2(t[n]):t[n],a=r&&!Object.keys(s).length;return s===void 0||a?e:Object.assign(e,{[n]:s})},{}):t}function Nh(t,e,n){!e||n.has(e.id)||(n.set(e.id,e),Object.keys(e).forEach(r=>{r.endsWith("Id")?Nh(t,t.get(e[r]),n):r.endsWith("Ids")&&e[r].forEach(s=>{Nh(t,t.get(s),n)})}))}function R1(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&&Nh(t,u,s)})}),s}const E1=a2;function c2(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,_){return v?v+_.charAt(0).toUpperCase()+_.slice(1):_==="deviceId"?"sourceId":_};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(C=>C.kind==="videoinput");let _=v.find(C=>g.some(w=>C.label.toLowerCase().includes(w)));return!_&&v.length&&g.includes("back")&&(_=v[v.length-1]),_&&(u.video.deviceId=h.exact?{exact:_.deviceId}:{ideal:_.deviceId}),u.video=r(u.video),E1("chrome: "+JSON.stringify(u)),f(u)})}u.video=r(u.video)}return E1("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 u2(t){t.MediaStream=t.MediaStream||t.webkitMediaStream}function d2(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 Ho(t,"track",e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e))}function f2(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 p2(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=>R1(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}),Ho(t,"track",r=>(r.receiver._pc=r.srcElement,r)),t.RTCRtpReceiver.prototype.getStats=function(){const s=this;return this._pc.getStats().then(a=>R1(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 h2(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 m2(t,e){if(!t.RTCPeerConnection)return;if(t.RTCPeerConnection.prototype.addTrack&&e.version>=65)return h2(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(_=>_.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(w=>w===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(w=>w.track===y))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const C=this._streams[g.id];if(C)C.addTrack(y),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{const w=new t.MediaStream([y]);this._streams[g.id]=w,this._reverseStreams[w.id]=g,this.addStream(w)}return this.getSenders().find(w=>w.track===y)};function a(h,y){let g=y.sdp;return Object.keys(h._reverseStreams||[]).forEach(v=>{const _=h._reverseStreams[v],C=h._streams[_.id];g=g.replace(new RegExp(C.id,"g"),_.id)}),new RTCSessionDescription({type:y.type,sdp:g})}function c(h,y){let g=y.sdp;return Object.keys(h._reverseStreams||[]).forEach(v=>{const _=h._reverseStreams[v],C=h._streams[_.id];g=g.replace(new RegExp(_.id,"g"),C.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,[C=>{const w=a(this,C);v[0].apply(null,[w])},C=>{v[1]&&v[1].apply(null,C)},arguments[2]]):y.apply(this,arguments).then(C=>a(this,C))}};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(_=>{this._streams[_].getTracks().find(w=>y.track===w)&&(v=this._streams[_])}),v&&(v.getTracks().length===1?this.removeStream(this._reverseStreams[v.id]):v.removeTrack(y.track),this.dispatchEvent(new Event("negotiationneeded")))}}function Bh(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 y2(t,e){Ho(t,"negotiationneeded",n=>{const r=n.target;if(!((e.version<72||r.getConfiguration&&r.getConfiguration().sdpSemantics==="plan-b")&&r.signalingState!=="stable"))return n})}const A1=Object.freeze(Object.defineProperty({__proto__:null,fixNegotiationNeeded:y2,shimAddTrackRemoveTrack:m2,shimAddTrackRemoveTrackWithNative:h2,shimGetSendersWithDtmf:f2,shimGetUserMedia:c2,shimMediaStream:u2,shimOnTrack:d2,shimPeerConnection:Bh,shimSenderReceiverGetStats:p2},Symbol.toStringTag,{value:"Module"}));function g2(t,e){const n=t&&t.navigator,r=t&&t.MediaStreamTrack;if(n.getUserMedia=function(s,a,c){Zm("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 m4(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 v2(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 Lh(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 b2(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 S2(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}),Ho(t,"track",n=>(n.receiver._pc=n.srcElement,n)),t.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function _2(t){!t.RTCPeerConnection||"removeStream"in t.RTCPeerConnection.prototype||(t.RTCPeerConnection.prototype.removeStream=function(n){Zm("removeStream","removeTrack"),this.getSenders().forEach(r=>{r.track&&n.getTracks().includes(r.track)&&this.removeTrack(r)})})}function w2(t){t.DataChannel&&!t.RTCDataChannel&&(t.RTCDataChannel=t.DataChannel)}function C2(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 x2(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 I2(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 T2(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 P1=Object.freeze(Object.defineProperty({__proto__:null,shimAddTransceiver:C2,shimCreateAnswer:T2,shimCreateOffer:I2,shimGetDisplayMedia:m4,shimGetParameters:x2,shimGetUserMedia:g2,shimOnTrack:v2,shimPeerConnection:Lh,shimRTCDataChannel:w2,shimReceiverGetStats:S2,shimRemoveStream:_2,shimSenderGetStats:b2},Symbol.toStringTag,{value:"Module"}));function k2(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 R2(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 E2(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 A2(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(P2(s))}!e.getUserMedia&&e.mediaDevices&&e.mediaDevices.getUserMedia&&(e.getUserMedia=(function(r,s,a){e.mediaDevices.getUserMedia(r).then(s,a)}).bind(e))}function P2(t){return t&&t.video!==void 0?Object.assign({},t,{video:l2(t.video)}):t}function O2(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?(Zm("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 M2(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 D2(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 N2(t){typeof t!="object"||t.AudioContext||(t.AudioContext=t.webkitAudioContext)}const O1=Object.freeze(Object.defineProperty({__proto__:null,shimAudioContext:N2,shimCallbacksAPI:E2,shimConstraints:P2,shimCreateOfferLegacy:D2,shimGetUserMedia:A2,shimLocalStreamsAPI:k2,shimRTCIceServerUrls:O2,shimRemoteStreamsAPI:R2,shimTrackEventTransceiver:M2},Symbol.toStringTag,{value:"Module"}));var Zp={exports:{}},M1;function y4(){return M1||(M1=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
+ `&&(B.value+=" ");const U=E.boxSizing,O=nu(E.paddingBottom)+nu(E.paddingTop),V=nu(E.borderBottomWidth)+nu(E.borderTopWidth),Y=B.scrollHeight;B.value="x";const S=B.scrollHeight;let F=Y;a&&(F=Math.max(Number(a)*S,F)),s&&(F=Math.min(Number(s)*S,F)),F=Math.max(F,S);const H=F+(U==="border-box"?O+V:0),X=Math.abs(F-Y)<=1;return{outerHeightStyle:H,overflowing:X}},[s,a,e.placeholder]),w=A.useCallback(()=>{const D=y.current,B=C();if(!D||!B||i5(B))return;const M=B.outerHeightStyle;v.current!==M&&(v.current=M,D.style.height=`${M}px`),D.style.overflow=B.overflowing?"hidden":""},[C]),I=A.useRef(-1);Qs(()=>{const D=oR(()=>w()),B=y==null?void 0:y.current;if(!B)return;const M=Fv(B);M.addEventListener("resize",D);let E;return typeof ResizeObserver<"u"&&(E=new ResizeObserver(()=>{E.unobserve(B),cancelAnimationFrame(I.current),w(),I.current=requestAnimationFrame(()=>{E.observe(B)})}),E.observe(B)),()=>{D.clear(),cancelAnimationFrame(I.current),M.removeEventListener("resize",D),E&&E.disconnect()}},[C,w]),Qs(()=>{w()});const P=D=>{h||w(),r&&r(D)};return j.jsxs(A.Fragment,{children:[j.jsx("textarea",{value:u,onChange:P,ref:g,rows:a,style:c,...f}),j.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:_,tabIndex:-1,style:{...n5.shadow,...c,paddingTop:0,paddingBottom:0}})]})});function S1(t){return typeof t=="string"}function _1(t){return t!=null&&!(Array.isArray(t)&&t.length===0)}function Ph(t,e=!1){return t&&(_1(t.value)&&t.value!==""||e&&_1(t.defaultValue)&&t.defaultValue!=="")}function s5(t){return t.startAdornment}function a5(t){return yn("MuiInputBase",t)}const od=gn("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var w1;const e2=(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]},t2=(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]},l5=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:_,type:C}=t,w={root:["root",`color${Oe(n)}`,r&&"disabled",s&&"error",f&&"fullWidth",c&&"focused",u&&"formControl",v&&v!=="medium"&&`size${Oe(v)}`,y&&"multiline",_&&"adornedStart",a&&"adornedEnd",h&&"hiddenLabel",g&&"readOnly"],input:["input",r&&"disabled",C==="search"&&"inputTypeSearch",y&&"inputMultiline",v==="small"&&"inputSizeSmall",h&&"inputHiddenLabel",_&&"inputAdornedStart",a&&"inputAdornedEnd",g&&"readOnly"]};return vn(w,a5,e)},n2=Fe("div",{name:"MuiInputBase",slot:"Root",overridesResolver:e2})(Mn(({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",[`&.${od.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%"}}]}))),r2=Fe("input",{name:"MuiInputBase",slot:"Input",overridesResolver:t2})(Mn(({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] + .${od.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},[`&.${od.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"}}]}})),C1=Gm({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),c5=A.forwardRef(function(e,n){const r=an({props:e,name:"MuiInputBase"}),{"aria-describedby":s,autoComplete:a,autoFocus:c,className:u,color:f,components:h={},componentsProps:y={},defaultValue:g,disabled:v,disableInjectingGlobalStyles:_,endAdornment:C,error:w,fullWidth:I=!1,id:P,inputComponent:D="input",inputProps:B={},inputRef:M,margin:E,maxRows:U,minRows:O,multiline:V=!1,name:Y,onBlur:S,onChange:F,onClick:H,onFocus:X,onKeyDown:le,onKeyUp:ce,placeholder:de,readOnly:fe,renderSuffix:J,rows:te,size:ne,slotProps:k={},slots:G={},startAdornment:ue,type:ge="text",value:De,...xe}=r,$e=B.value!=null?B.value:De,{current:Ne}=A.useRef($e!=null),ze=A.useRef(),Lt=A.useCallback(He=>{},[]),dr=vl(ze,M,B.ref,Lt),[fr,Nn]=A.useState(!1),qe=Ad(),Ut=Ed({props:r,muiFormControl:qe,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Ut.focused=qe?qe.focused:fr,A.useEffect(()=>{!qe&&v&&fr&&(Nn(!1),S&&S())},[qe,v,fr,S]);const pr=qe&&qe.onFilled,Qt=qe&&qe.onEmpty,st=A.useCallback(He=>{Ph(He)?pr&&pr():Qt&&Qt()},[pr,Qt]);Qs(()=>{Ne&&st({value:$e})},[$e,st,Ne]);const Bn=He=>{X&&X(He),B.onFocus&&B.onFocus(He),qe&&qe.onFocus?qe.onFocus(He):Nn(!0)},Xt=He=>{S&&S(He),B.onBlur&&B.onBlur(He),qe&&qe.onBlur?qe.onBlur(He):Nn(!1)},Kn=(He,...qt)=>{if(!Ne){const cn=He.target||ze.current;if(cn==null)throw new Error(so(1));st({value:cn.value})}B.onChange&&B.onChange(He,...qt),F&&F(He,...qt)};A.useEffect(()=>{st(ze.current)},[]);const me=He=>{ze.current&&He.currentTarget===He.target&&ze.current.focus(),H&&H(He)};let ei=D,ln=B;V&&ei==="input"&&(te?ln={type:void 0,minRows:te,maxRows:te,...ln}:ln={type:void 0,maxRows:U,minRows:O,...ln},ei=o5);const yo=He=>{st(He.animationName==="mui-auto-fill-cancel"?ze.current:{value:"x"})};A.useEffect(()=>{qe&&qe.setAdornedStart(!!ue)},[qe,ue]);const ti={...r,color:Ut.color||"primary",disabled:Ut.disabled,endAdornment:C,error:Ut.error,focused:Ut.focused,formControl:qe,fullWidth:I,hiddenLabel:Ut.hiddenLabel,multiline:V,size:Ut.size,startAdornment:ue,type:ge},ni=l5(ti),vt=G.root||h.Root||n2,kt=k.root||y.root||{},Ct=G.input||h.Input||r2;return ln={...ln,...k.input??y.input},j.jsxs(A.Fragment,{children:[!_&&typeof C1=="function"&&(w1||(w1=j.jsx(C1,{}))),j.jsxs(vt,{...kt,ref:n,onClick:me,...xe,...!S1(vt)&&{ownerState:{...ti,...kt.ownerState}},className:ot(ni.root,kt.className,u,fe&&"MuiInputBase-readOnly"),children:[ue,j.jsx(Jm.Provider,{value:null,children:j.jsx(Ct,{"aria-invalid":Ut.error,"aria-describedby":s,autoComplete:a,autoFocus:c,defaultValue:g,disabled:Ut.disabled,id:P,onAnimationStart:yo,name:Y,placeholder:de,readOnly:fe,required:Ut.required,rows:te,value:$e,onKeyDown:le,onKeyUp:ce,type:ge,...ln,...!S1(Ct)&&{as:ei,ownerState:{...ti,...ln.ownerState}},ref:dr,className:ot(ni.input,ln.className,fe&&"MuiInputBase-readOnly"),onBlur:Xt,onChange:Kn,onFocus:Bn})}),C,J?J({...Ut,startAdornment:ue}):null]})]})});function u5(t){return yn("MuiInput",t)}const Qa={...od,...gn("MuiInput",["root","underline","input"])},d5=t=>{const{classes:e,disableUnderline:n}=t,s=vn({root:["root",!n&&"underline"],input:["input"]},u5,e);return{...e,...s}},f5=Fe(n2,{shouldForwardProp:t=>Dl(t)||t==="classes",name:"MuiInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...e2(t,e),!n.disableUnderline&&e.underline]}})(Mn(({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"},[`&.${Qa.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Qa.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(.${Qa.disabled}, .${Qa.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Qa.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(t.palette).filter(Ti()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[r].main}`}}}))]}})),p5=Fe(r2,{name:"MuiInput",slot:"Input",overridesResolver:t2})({}),i2=A.forwardRef(function(e,n){const r=an({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",..._}=r,C=d5(r),I={root:{ownerState:{disableUnderline:s}}},P=y??c?sn(y??c,I):I,D=g.root??a.Root??f5,B=g.input??a.Input??p5;return j.jsx(c5,{slots:{root:D,input:B},slotProps:P,fullWidth:u,inputComponent:f,multiline:h,ref:n,type:v,..._,classes:C})});i2.muiName="Input";const h5=t=>{const{classes:e}=t;return vn({root:["root"]},Z_,e)},m5=j.jsx(i2,{}),Oh=A.forwardRef(function(e,n){const r=an({name:"MuiNativeSelect",props:e}),{className:s,children:a,classes:c={},IconComponent:u=t5,input:f=m5,inputProps:h,variant:y,...g}=r,v=Ad(),_=Ed({props:r,muiFormControl:v,states:["variant"]}),C={...r,classes:c},w=h5(C),{root:I,...P}=c;return j.jsx(A.Fragment,{children:A.cloneElement(f,{inputComponent:e5,inputProps:{children:a,classes:P,IconComponent:u,variant:_.variant,type:void 0,...h,...f?f.props.inputProps:{}},ref:n,...g,className:ot(w.root,f.props.className,s)})})});Oh.muiName="Select";function y5(t){return yn("MuiFormLabel",t)}const il=gn("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),g5=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 vn(f,y5,e)},v5=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]}})(Mn(({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(Ti()).map(([e])=>({props:{color:e},style:{[`&.${il.focused}`]:{color:(t.vars||t).palette[e].main}}})),{props:{},style:{[`&.${il.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${il.error}`]:{color:(t.vars||t).palette.error.main}}}]}))),b5=Fe("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(Mn(({theme:t})=>({[`&.${il.error}`]:{color:(t.vars||t).palette.error.main}}))),S5=A.forwardRef(function(e,n){const r=an({props:e,name:"MuiFormLabel"}),{children:s,className:a,color:c,component:u="label",disabled:f,error:h,filled:y,focused:g,required:v,..._}=r,C=Ad(),w=Ed({props:r,muiFormControl:C,states:["color","required","focused","disabled","error","filled"]}),I={...r,color:w.color||"primary",component:u,disabled:w.disabled,error:w.error,filled:w.filled,focused:w.focused,required:w.required},P=g5(I);return j.jsxs(v5,{as:u,ownerState:I,className:ot(P.root,a),ref:n,..._,children:[s,w.required&&j.jsxs(b5,{ownerState:I,"aria-hidden":!0,className:P.asterisk,children:[" ","*"]})]})});function _5(t){return yn("MuiInputLabel",t)}gn("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const w5=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=vn(f,_5,e);return{...e,...h}},C5=Fe(S5,{shouldForwardProp:t=>Dl(t)||t==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${il.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]]}})(Mn(({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)"}}]}))),x1=A.forwardRef(function(e,n){const r=an({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=Ed({props:r,muiFormControl:y,states:["size","variant","required","focused"]}),_={...r,disableAnimation:s,formControl:y,shrink:g,size:v.size,variant:v.variant,required:v.required,focused:v.focused},C=w5(_);return j.jsx(C5,{"data-shrink":g,ref:n,className:ot(C.root,f),...h,ownerState:_,classes:C})});function x5(t){return yn("MuiFormControl",t)}gn("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const I5=t=>{const{classes:e,margin:n,fullWidth:r}=t,s={root:["root",n!=="none"&&`margin${Oe(n)}`,r&&"fullWidth"]};return vn(s,x5,e)},T5=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%"}}]}),I1=A.forwardRef(function(e,n){const r=an({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:_="none",required:C=!1,size:w="medium",variant:I="outlined",...P}=r,D={...r,color:c,component:u,disabled:f,error:h,fullWidth:g,hiddenLabel:v,margin:_,required:C,size:w,variant:I},B=I5(D),[M,E]=A.useState(()=>{let ce=!1;return s&&A.Children.forEach(s,de=>{if(!Fp(de,["Input","Select"]))return;const fe=Fp(de,["Select"])?de.props.input:de;fe&&s5(fe.props)&&(ce=!0)}),ce}),[U,O]=A.useState(()=>{let ce=!1;return s&&A.Children.forEach(s,de=>{Fp(de,["Input","Select"])&&(Ph(de.props,!0)||Ph(de.props.inputProps,!0))&&(ce=!0)}),ce}),[V,Y]=A.useState(!1);f&&V&&Y(!1);const S=y!==void 0&&!f?y:V;let F;A.useRef(!1);const H=A.useCallback(()=>{O(!0)},[]),X=A.useCallback(()=>{O(!1)},[]),le=A.useMemo(()=>({adornedStart:M,setAdornedStart:E,color:c,disabled:f,error:h,filled:U,focused:S,fullWidth:g,hiddenLabel:v,size:w,onBlur:()=>{Y(!1)},onFocus:()=>{Y(!0)},onEmpty:X,onFilled:H,registerEffect:F,required:C,variant:I}),[M,c,f,h,U,S,g,v,F,X,H,C,w,I]);return j.jsx(Jm.Provider,{value:le,children:j.jsx(T5,{as:u,ownerState:D,className:ot(B.root,a),ref:n,...P,children:s})})}),k5=n_({themeId:Cr});function R5(t){const e=y_(),n=k5(e.breakpoints.down("sm"));return A.useEffect(()=>{hn.setFrameHeight()},[n]),j.jsx(Xm,{direction:n?"column":"row",spacing:2,children:t.children})}const E5=Fe($s)(({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"})),A5=E5,P5=Fe(Rd)(({theme:t})=>({display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",padding:t.spacing(2),boxSizing:"border-box"})),Bl=P5;function O5(){return j.jsx(Bl,{children:Nl("media_api_not_available")||"Media API not available"})}function M5(){return j.jsx(Bl,{children:Nl("device_ask_permission")||"Please allow the app to use your media devices"})}function D5(t){return j.jsxs(Bl,{children:[Nl("device_access_denied")||"Access denied"," (",t.error.message,")"]})}function N5(t){return j.jsxs(Bl,{children:[Nl("device_not_available")||"Device not available"," (",t.error.message,")"]})}const B5=mo(j.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"),L5=Fe(Rd)({display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"});function F5(){return j.jsx(L5,{children:j.jsx(B5,{fontSize:"large"})})}const $5=Nt.memo(F5),j5=Fe($s,{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]=A.useState(!1);return A.useEffect(()=>{const r=setTimeout(()=>{n(!0)},t.time);return()=>clearTimeout(r)},[t.time]),j.jsx(j5,{$transparent:e,children:t.children})}const U5=Fe("video")({maxWidth:"100%",maxHeight:"100%"}),V5=U5;function Mh(t){t.getVideoTracks().forEach(e=>e.stop()),t.getAudioTracks().forEach(e=>e.stop())}function W5(t){const e=A.useRef(null);return A.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){Mh(n);return}e.current&&(e.current.srcObject=n)}),()=>{r=!0,n&&Mh(n)}},[t.deviceId]),j.jsx(V5,{ref:e,autoPlay:!0,muted:!0})}const H5=Nt.memo(W5);function T1(t,e){const n=t.map(r=>r.deviceId);if(e&&n.includes(e))return e;if(n.length>0)return n[0]}const G5=(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=T1(r,t.selectedVideoInputDeviceId),u=T1(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 Y5(t){const{video:e,audio:n,defaultVideoDeviceId:r,defaultAudioDeviceId:s,onSelect:a}=t,[c,u]=A.useState("WAITING"),[{unavailable:f,videoInputs:h,selectedVideoInputDeviceId:y,audioInputs:g,selectedAudioInputDeviceId:v},_]=A.useReducer(G5,{unavailable:!1,videoInputs:[],audioInputs:[],audioOutputs:[],selectedVideoInputDeviceId:r,selectedAudioInputDeviceId:s}),C=A.useCallback(()=>{var D;if(typeof((D=navigator==null?void 0:navigator.mediaDevices)==null?void 0:D.enumerateDevices)!="function"){_({type:"SET_UNAVAILABLE"});return}return navigator.mediaDevices.enumerateDevices().then(B=>{_({type:"UPDATE_DEVICES",devices:B})})},[]),w=A.useRef({video:r,audio:s});w.current={video:r,audio:s},A.useEffect(()=>{var M;if(typeof((M=navigator==null?void 0:navigator.mediaDevices)==null?void 0:M.getUserMedia)!="function"){_({type:"SET_UNAVAILABLE"});return}u("WAITING");const{video:D,audio:B}=w.current;navigator.mediaDevices.getUserMedia({video:e&&D?{deviceId:D}:e,audio:n&&B?{deviceId:B}:n}).then(async E=>{Mh(E),await C(),u("ALLOWED")}).catch(E=>{u(E)})},[e,n,C]),A.useEffect(()=>{const D=()=>C();return navigator.mediaDevices.ondevicechange=D,()=>{navigator.mediaDevices.ondevicechange===D&&(navigator.mediaDevices.ondevicechange=null)}},[C]);const I=A.useCallback(D=>{_({type:"UPDATE_SELECTED_DEVICE_ID",payload:{selectedVideoInputDeviceId:D.target.value}})},[]),P=A.useCallback(D=>{_({type:"UPDATE_SELECTED_DEVICE_ID",payload:{selectedAudioInputDeviceId:D.target.value}})},[]);if(A.useEffect(()=>{const D=e?h.find(M=>M.deviceId===y):null,B=n?g.find(M=>M.deviceId===v):null;a({video:D==null?void 0:D.deviceId,audio:B==null?void 0:B.deviceId})},[e,n,a,h,g,y,v]),A.useEffect(()=>{setTimeout(()=>hn.setFrameHeight())}),f)return j.jsx(O5,{});if(c==="WAITING")return j.jsx(z5,{time:1e3,children:j.jsx(M5,{})});if(c instanceof Error){const D=c;return D instanceof DOMException&&(D.name==="NotReadableError"||D.name==="NotFoundError")?j.jsx(N5,{error:D}):D instanceof DOMException&&D.name==="NotAllowedError"?j.jsx(D5,{error:D}):j.jsx(Bl,{children:j.jsxs(X_,{severity:"error",children:[D.name,": ",D.message]})})}return j.jsxs(R5,{children:[j.jsx(A5,{children:e&&y?j.jsx(H5,{deviceId:y}):j.jsx($5,{})}),j.jsxs(Xm,{spacing:2,justifyContent:"center",children:[e&&y&&j.jsxs(I1,{fullWidth:!0,children:[j.jsx(x1,{htmlFor:"device-select-video-input",children:"Video Input"}),j.jsx(Oh,{inputProps:{name:"video-input",id:"device-select-video-input"},value:y,onChange:I,children:h.map(D=>j.jsx("option",{value:D.deviceId,children:D.label},D.deviceId))})]}),n&&v&&j.jsxs(I1,{fullWidth:!0,children:[j.jsx(x1,{htmlFor:"device-select-audio-input",children:"Audio Input"}),j.jsx(Oh,{inputProps:{name:"audio-input",id:"device-select-audio-input"},value:v,onChange:P,children:g.map(D=>j.jsx("option",{value:D.deviceId,children:D.label},D.deviceId))})]})]})]})}function K5({onClose:t,...e}){return j.jsxs(Xm,{spacing:2,children:[j.jsx(Y5,{...e}),j.jsx($s,{children:j.jsx(J_,{variant:"contained",color:"primary",onClick:t,children:"Done"})})]})}function Q5(t){var s,a,c,u,f,h,y,g,v,_,C,w,I,P,D,B,M,E,U,O,V,Y,S,F,H,X,le;A.useEffect(()=>{hn.setFrameHeight()});const e=t.stream.getVideoTracks().length>0,n=A.useCallback(ce=>{ce&&(ce.srcObject=t.stream)},[t.stream]),r=A.useCallback(()=>hn.setFrameHeight(),[]);if(e){const ce={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:(_=t.userDefinedVideoAttrs)==null?void 0:_.playsInline,preload:(C=t.userDefinedVideoAttrs)==null?void 0:C.preload,height:(w=t.userDefinedVideoAttrs)==null?void 0:w.height,poster:(I=t.userDefinedVideoAttrs)==null?void 0:I.poster,width:(P=t.userDefinedVideoAttrs)==null?void 0:P.width,disablePictureInPicture:(D=t.userDefinedVideoAttrs)==null?void 0:D.disablePictureInPicture,disableRemotePlayback:(B=t.userDefinedVideoAttrs)==null?void 0:B.disableRemotePlayback};return j.jsx("video",{...ce,ref:n,onCanPlay:r})}else{const ce={hidden:(M=t.userDefinedAudioAttrs)==null?void 0:M.hidden,style:(E=t.userDefinedAudioAttrs)==null?void 0:E.style,autoPlay:(U=t.userDefinedAudioAttrs)==null?void 0:U.autoPlay,controls:(O=t.userDefinedAudioAttrs)==null?void 0:O.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:(F=t.userDefinedAudioAttrs)==null?void 0:F.mediaGroup,muted:(H=t.userDefinedAudioAttrs)==null?void 0:H.muted,playsInline:(X=t.userDefinedAudioAttrs)==null?void 0:X.playsInline,preload:(le=t.userDefinedAudioAttrs)==null?void 0:le.preload};return j.jsx("audio",{ref:n,...ce})}}const X5=Nt.memo(Q5),q5=mo(j.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(Rd)(({theme:t})=>({padding:t.spacing(4),display:"flex",justifyContent:"center",alignItems:"center",width:"100%"}));function Z5(t){return A.useEffect(()=>{hn.setFrameHeight()}),j.jsx(J5,{elevation:0,children:t.loading?j.jsx(Qm,{}):j.jsx(q5,{fontSize:"large"})})}const e4=Nt.memo(Z5);function t4(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 n4(t){const e=t?!!t.video:!0,n=t?!!t.audio:!0;return{videoEnabled:e,audioEnabled:n}}const r4={webRtcState:"STOPPED",sdpOffer:null,signallingTimedOut:!1,stream:null,error:null},i4=(t,e)=>{switch(e.type){case"SIGNALLING_START":return{...t,webRtcState:"SIGNALLING",stream:null,error:null,signallingTimedOut:!1};case"SIGNALLING_TIMEOUT":return{...t,signallingTimedOut:!0};case"SET_STREAM":return{...t,stream:e.stream};case"SET_OFFER":return{...t,sdpOffer:e.offer};case"STOPPING":return{...t,webRtcState:"STOPPING",sdpOffer:null};case"STOPPED":return{...t,webRtcState:"STOPPED",sdpOffer:null,stream:null};case"START_PLAYING":return{...t,webRtcState:"PLAYING",sdpOffer:null};case"PROCESS_ANSWER_ERROR":return{...t,error:e.error};case"ERROR":return{...t,webRtcState:"STOPPED",sdpOffer:null,error:e.error}}},o4=t=>(n,r)=>{const s=i4(n,r),a=s.webRtcState==="PLAYING",c=n.webRtcState==="PLAYING",u=a!==c,f=s.sdpOffer,h=n.sdpOffer;return(u||f!==h)&&(h&&console.log("Send SDP offer",h),t({playing:a,sdpOffer:f?f.toJSON():""})),s},Dh=t=>t==="RECVONLY"||t==="SENDONLY"||t==="SENDRECV",s4=t=>t==="SENDRECV"||t==="RECVONLY",a4=t=>t==="SENDRECV"||t==="SENDONLY",l4=t=>t.createOffer().then(e=>(console.log("Created offer:",e),t.setLocalDescription(e))).then(()=>(console.log("Wait for ICE gethering..."),new Promise(e=>{if(t.iceGatheringState==="complete")e();else{const n=()=>{t.iceGatheringState==="complete"&&(t.removeEventListener("icegatheringstatechange",n),e())};t.addEventListener("icegatheringstatechange",n)}}))).then(()=>t.localDescription).catch(e=>{throw console.error(e),e}),c4=3*1e3,u4=(t,e,n,r,s)=>{A.useEffect(()=>r({playing:!1,sdpOffer:""}),[]);const a=A.useRef(),c=A.useRef(),u=A.useMemo(()=>o4(r),[r]),[f,h]=A.useReducer(u,r4),y=A.useCallback(()=>{(async()=>{if(f.webRtcState==="STOPPING")return;const C=c.current;if(c.current=void 0,h({type:"STOPPING"}),C!=null)return C.getTransceivers&&C.getTransceivers().forEach(function(w){w.stop&&w.stop()}),C.getSenders().forEach(function(w){var I;(I=w.track)==null||I.stop()}),new Promise(w=>{setTimeout(()=>{C.close(),w()},500)})})().catch(C=>h({type:"ERROR",error:C})).finally(()=>{h({type:"STOPPED"})})},[f.webRtcState]),g=A.useRef(y);g.current=y;const v=A.useCallback(()=>{if(f.webRtcState!=="STOPPED")return;(async()=>{h({type:"SIGNALLING_START"}),a.current=setTimeout(()=>{h({type:"SIGNALLING_TIMEOUT"})},c4);const C=t.mode,w=t.rtcConfiguration||{};console.log("RTCConfiguration:",w);const I=new RTCPeerConnection(w);if((C==="SENDRECV"||C==="RECVONLY")&&I.addEventListener("track",P=>{const D=P.streams[0];h({type:"SET_STREAM",stream:D})}),C==="SENDRECV"||C==="SENDONLY"){const P=t4(t.mediaStreamConstraints,e,n);if(console.log("MediaStreamConstraints:",P),P.audio||P.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 D={},B=await navigator.mediaDevices.getUserMedia(P);B.getTracks().forEach(M=>{I.addTrack(M,B);const E=M.kind;if(E!=="video"&&E!=="audio")return;const U=M.getSettings().deviceId;U!=null&&(D[E]=U)}),Object.keys(D).length>0&&s(D)}if(C==="SENDONLY")for(const D of I.getTransceivers())D.direction="sendonly"}else C==="RECVONLY"&&(I.addTransceiver("video",{direction:"recvonly"}),I.addTransceiver("audio",{direction:"recvonly"}));console.log("transceivers",I.getTransceivers()),I.addEventListener("iceconnectionstatechange",()=>{console.log("iceconnectionstatechange",I.iceConnectionState),(I.iceConnectionState==="disconnected"||I.iceConnectionState==="failed"||I.iceConnectionState==="closed")&&g.current()}),c.current=I,await l4(I).then(P=>{if(P==null)throw new Error("Failed to create an offer SDP");h({type:"SET_OFFER",offer:P})})})().catch(C=>h({type:"ERROR",error:C}))},[n,e,t.mediaStreamConstraints,t.mode,t.rtcConfiguration,f.webRtcState,s]);return A.useEffect(()=>{const _=c.current;if(_==null)return;const C=t.sdpAnswerJson;if(_.remoteDescription==null&&C&&f.webRtcState==="SIGNALLING"){const w=JSON.parse(C);console.log("Receive answer sdpOffer",w),_.setRemoteDescription(w).then(()=>{console.log("Remote description is set"),a.current&&clearTimeout(a.current),h({type:"START_PLAYING"})}).catch(I=>{h({type:"PROCESS_ANSWER_ERROR",error:I}),y()})}},[t.sdpAnswerJson,f.webRtcState,y]),A.useEffect(()=>{const _=t.desiredPlayingState;_!=null&&(_===!0&&f.webRtcState==="STOPPED"?v():_===!1&&(f.webRtcState==="SIGNALLING"||f.webRtcState==="PLAYING")&&y())},[t.desiredPlayingState,v,f.webRtcState,y]),{start:v,stop:y,state:f}};function d4(t){return hn.setComponentValue(t)}function Jp({translationKey:t,defaultText:e,...n}){return j.jsx(J_,{...n,children:Nl(t)||e})}let o2=!0,s2=!0;function yu(t,e,n){const r=t.match(e);return r&&r.length>=n&&parseInt(r[n],10)}function Ho(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 f4(t){return typeof t!="boolean"?new Error("Argument type: "+typeof t+". Please use a boolean."):(o2=t,t?"adapter.js logging disabled":"adapter.js logging enabled")}function p4(t){return typeof t!="boolean"?new Error("Argument type: "+typeof t+". Please use a boolean."):(s2=!t,"adapter.js deprecation warnings "+(t?"disabled":"enabled"))}function a2(){if(typeof window=="object"){if(o2)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function Zm(t,e){s2&&console.warn(t+" is deprecated, please use "+e+" instead.")}function h4(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=yu(n.userAgent,/Firefox\/(\d+)\./,1);else if(n.webkitGetUserMedia||t.isSecureContext===!1&&t.webkitRTCPeerConnection)e.browser="chrome",e.version=yu(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(t.RTCPeerConnection&&n.userAgent.match(/AppleWebKit\/(\d+)\./))e.browser="safari",e.version=yu(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 k1(t){return Object.prototype.toString.call(t)==="[object Object]"}function l2(t){return k1(t)?Object.keys(t).reduce(function(e,n){const r=k1(t[n]),s=r?l2(t[n]):t[n],a=r&&!Object.keys(s).length;return s===void 0||a?e:Object.assign(e,{[n]:s})},{}):t}function Nh(t,e,n){!e||n.has(e.id)||(n.set(e.id,e),Object.keys(e).forEach(r=>{r.endsWith("Id")?Nh(t,t.get(e[r]),n):r.endsWith("Ids")&&e[r].forEach(s=>{Nh(t,t.get(s),n)})}))}function R1(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&&Nh(t,u,s)})}),s}const E1=a2;function c2(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,_){return v?v+_.charAt(0).toUpperCase()+_.slice(1):_==="deviceId"?"sourceId":_};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(C=>C.kind==="videoinput");let _=v.find(C=>g.some(w=>C.label.toLowerCase().includes(w)));return!_&&v.length&&g.includes("back")&&(_=v[v.length-1]),_&&(u.video.deviceId=h.exact?{exact:_.deviceId}:{ideal:_.deviceId}),u.video=r(u.video),E1("chrome: "+JSON.stringify(u)),f(u)})}u.video=r(u.video)}return E1("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 u2(t){t.MediaStream=t.MediaStream||t.webkitMediaStream}function d2(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 Ho(t,"track",e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e))}function f2(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 p2(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=>R1(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}),Ho(t,"track",r=>(r.receiver._pc=r.srcElement,r)),t.RTCRtpReceiver.prototype.getStats=function(){const s=this;return this._pc.getStats().then(a=>R1(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 h2(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 m2(t,e){if(!t.RTCPeerConnection)return;if(t.RTCPeerConnection.prototype.addTrack&&e.version>=65)return h2(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(_=>_.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(w=>w===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(w=>w.track===y))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const C=this._streams[g.id];if(C)C.addTrack(y),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{const w=new t.MediaStream([y]);this._streams[g.id]=w,this._reverseStreams[w.id]=g,this.addStream(w)}return this.getSenders().find(w=>w.track===y)};function a(h,y){let g=y.sdp;return Object.keys(h._reverseStreams||[]).forEach(v=>{const _=h._reverseStreams[v],C=h._streams[_.id];g=g.replace(new RegExp(C.id,"g"),_.id)}),new RTCSessionDescription({type:y.type,sdp:g})}function c(h,y){let g=y.sdp;return Object.keys(h._reverseStreams||[]).forEach(v=>{const _=h._reverseStreams[v],C=h._streams[_.id];g=g.replace(new RegExp(_.id,"g"),C.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,[C=>{const w=a(this,C);v[0].apply(null,[w])},C=>{v[1]&&v[1].apply(null,C)},arguments[2]]):y.apply(this,arguments).then(C=>a(this,C))}};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(_=>{this._streams[_].getTracks().find(w=>y.track===w)&&(v=this._streams[_])}),v&&(v.getTracks().length===1?this.removeStream(this._reverseStreams[v.id]):v.removeTrack(y.track),this.dispatchEvent(new Event("negotiationneeded")))}}function Bh(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 y2(t,e){Ho(t,"negotiationneeded",n=>{const r=n.target;if(!((e.version<72||r.getConfiguration&&r.getConfiguration().sdpSemantics==="plan-b")&&r.signalingState!=="stable"))return n})}const A1=Object.freeze(Object.defineProperty({__proto__:null,fixNegotiationNeeded:y2,shimAddTrackRemoveTrack:m2,shimAddTrackRemoveTrackWithNative:h2,shimGetSendersWithDtmf:f2,shimGetUserMedia:c2,shimMediaStream:u2,shimOnTrack:d2,shimPeerConnection:Bh,shimSenderReceiverGetStats:p2},Symbol.toStringTag,{value:"Module"}));function g2(t,e){const n=t&&t.navigator,r=t&&t.MediaStreamTrack;if(n.getUserMedia=function(s,a,c){Zm("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 m4(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 v2(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 Lh(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 b2(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 S2(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}),Ho(t,"track",n=>(n.receiver._pc=n.srcElement,n)),t.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function _2(t){!t.RTCPeerConnection||"removeStream"in t.RTCPeerConnection.prototype||(t.RTCPeerConnection.prototype.removeStream=function(n){Zm("removeStream","removeTrack"),this.getSenders().forEach(r=>{r.track&&n.getTracks().includes(r.track)&&this.removeTrack(r)})})}function w2(t){t.DataChannel&&!t.RTCDataChannel&&(t.RTCDataChannel=t.DataChannel)}function C2(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 x2(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 I2(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 T2(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 P1=Object.freeze(Object.defineProperty({__proto__:null,shimAddTransceiver:C2,shimCreateAnswer:T2,shimCreateOffer:I2,shimGetDisplayMedia:m4,shimGetParameters:x2,shimGetUserMedia:g2,shimOnTrack:v2,shimPeerConnection:Lh,shimRTCDataChannel:w2,shimReceiverGetStats:S2,shimRemoveStream:_2,shimSenderGetStats:b2},Symbol.toStringTag,{value:"Module"}));function k2(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 R2(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 E2(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 A2(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(P2(s))}!e.getUserMedia&&e.mediaDevices&&e.mediaDevices.getUserMedia&&(e.getUserMedia=(function(r,s,a){e.mediaDevices.getUserMedia(r).then(s,a)}).bind(e))}function P2(t){return t&&t.video!==void 0?Object.assign({},t,{video:l2(t.video)}):t}function O2(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?(Zm("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 M2(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 D2(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 N2(t){typeof t!="object"||t.AudioContext||(t.AudioContext=t.webkitAudioContext)}const O1=Object.freeze(Object.defineProperty({__proto__:null,shimAudioContext:N2,shimCallbacksAPI:E2,shimConstraints:P2,shimCreateOfferLegacy:D2,shimGetUserMedia:A2,shimLocalStreamsAPI:k2,shimRTCIceServerUrls:O2,shimRemoteStreamsAPI:R2,shimTrackEventTransceiver:M2},Symbol.toStringTag,{value:"Module"}));var Zp={exports:{}},M1;function y4(){return M1||(M1=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-BfANt4tM.js"></script>
9
+ <script type="module" crossorigin src="./assets/index-EHnd8JcY.js"></script>
10
10
  </head>
11
11
  <body>
12
12
  <noscript>You need to enable JavaScript to run this app.</noscript>
@@ -164,8 +164,14 @@ class AudioProcessorBase(ProcessorBase[av.AudioFrame]):
164
164
  """
165
165
 
166
166
 
167
- VideoProcessorT = TypeVar("VideoProcessorT", bound=VideoProcessorBase)
168
- AudioProcessorT = TypeVar("AudioProcessorT", bound=AudioProcessorBase)
167
+ VideoProcessorT = TypeVar(
168
+ "VideoProcessorT",
169
+ bound=Union[CallbackAttachableProcessor[av.VideoFrame], VideoProcessorBase],
170
+ )
171
+ AudioProcessorT = TypeVar(
172
+ "AudioProcessorT",
173
+ bound=Union[CallbackAttachableProcessor[av.AudioFrame], AudioProcessorBase],
174
+ )
169
175
 
170
176
  MediaPlayerFactory = Callable[[], MediaPlayer]
171
177
  MediaRecorderFactory = Callable[[], MediaRecorder]
@@ -81,9 +81,9 @@ class AsyncMediaProcessTrack(MediaStreamTrack, Generic[ProcessorT, FrameT]):
81
81
 
82
82
  self.stop_timeout = stop_timeout
83
83
 
84
- self._thread = None
84
+ self._thread: Optional[threading.Thread] = None
85
85
 
86
- def _start(self):
86
+ def _start(self) -> None:
87
87
  if self._thread:
88
88
  return
89
89
 
@@ -128,7 +128,7 @@ class AsyncMediaProcessTrack(MediaStreamTrack, Generic[ProcessorT, FrameT]):
128
128
 
129
129
  return frames[-1]
130
130
 
131
- def _worker_thread(self):
131
+ def _worker_thread(self) -> None:
132
132
  loop = asyncio.new_event_loop()
133
133
 
134
134
  tasks: List[asyncio.Task] = []