PageSourceSearch

https://theadarederm.vercel.app/_next/static/chunks/6646.b0f8124de521bed6.js

js theadarederm.vercel.app collected 2026-10-03 07:52:33 UTC 8,885 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2afbf390-4200-48c9-b0c7-57ad5485af9e",e._sentryDebugIdIdentifier="sentry-dbid-2afbf390-4200-48c9-b0c7-57ad5485af9e")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6646],{24265:(e,t,a)=>{a.r(t),a.d(t,{DeviceCheckOverlay:()=>p});var n=a(95155),l=a(12115),c=a(47650),r=a(41200),i=a(67559),s=a(19451);function o(e,t,a){return e.filter(e=>e.kind===t).map((e,t)=>({deviceId:e.deviceId,label:e.label||"".concat(a," ").concat(t+1)}))}function d(e,t,a){let n=(0,l.useRef)(null),[c,r]=(0,l.useState)([]),[i,s]=(0,l.useState)(a||""),[d,u]=(0,l.useState)(null);async function f(a){try{var l;let c=await navigator.mediaDevices.getUserMedia("videoinput"===e?{video:!a||{deviceId:{exact:a}}}:{audio:!a||{deviceId:{exact:a}}});null==(l=n.current)||l.getTracks().forEach(e=>e.stop()),n.current=c,u(null);let i=await navigator.mediaDevices.enumerateDevices();r(o(i,e,t));let d="videoinput"===e?c.getVideoTracks()[0]:c.getAudioTracks()[0],f=null==d?void 0:d.getSettings().deviceId;return f&&s(f),c}catch(a){let t="videoinput"===e?"camera":"microphone";return u(a instanceof Error?a.message:"Could not access your ".concat(t,".")),null}}return(0,l.useEffect)(()=>()=>{var e;return null==(e=n.current)?void 0:e.getTracks().forEach(e=>e.stop())},[]),{devices:c,selected:i,error:d,start:f}}let u="derm:precall-devices";function f(e){let{id:t,label:a,devices:l,value:c,onChange:r}=e;return l.length<2?null:(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"label text-xs",htmlFor:t,children:a}),(0,n.jsx)("select",{id:t,className:"input",value:c,onChange:e=>r(e.target.value),children:l.map(e=>(0,n.jsx)("option",{value:e.deviceId,children:e.label},e.deviceId))})]})}function h(e){let{initialDeviceId:t,onDevice:a}=e,c=(0,l.useRef)(null),r=(0,l.useRef)(!0),{devices:i,selected:s,error:o,start:u}=d("videoinput","Camera",t);async function h(e){var t;let n=await u(e);if(n){if(!r.current)return void n.getTracks().forEach(e=>e.stop());c.current&&(c.current.srcObject=n),a((null==(t=n.getVideoTracks()[0])?void 0:t.getSettings().deviceId)||e)}}return(0,l.useEffect)(()=>(r.current=!0,h(t),()=>{r.current=!1}),[]),(0,n.jsxs)("section",{className:"flex flex-col gap-2","aria-labelledby":"precall-camera-heading",children:[(0,n.jsx)("h3",{id:"precall-camera-heading",className:"text-sm font-semibold text-fg",children:"Camera"}),(0,n.jsx)("div",{className:"aspect-video w-full overflow-hidden rounded-lg bg-black",children:(0,n.jsx)("video",{ref:c,autoPlay:!0,playsInline:!0,muted:!0,className:"h-full w-full object-cover"})}),o?(0,n.jsxs)("p",{className:"text-xs text-warn",role:"status",children:[o," You can still join without a camera."]}):(0,n.jsx)(f,{id:"precall-camera",label:"Camera",devices:i,value:s,onChange:e=>void h(e)})]})}function m(e){let{initialDeviceId:t,onDevice:a}=e,c=(0,l.useRef)(null),r=(0,l.useRef)(null),i=(0,l.useRef)(!0),[s,o]=(0,l.useState)(0),{devices:u,selected:h,error:m,start:v}=d("audioinput","Microphone",t);function x(){var e;null!==c.current&&cancelAnimationFrame(c.current),c.current=null,null==(e=r.current)||e.close().catch(()=>{}),r.current=null}async function p(e){var t;let n=await v(e);if(n){if(!i.current)return void n.getTracks().forEach(e=>e.stop());x();let l=new(window.AudioContext||window.webkitAudioContext);r.current=l;let s=l.createAnalyser();s.fftSize=512,l.createMediaStreamSource(n).connect(s);let d=new Uint8Array(s.frequencyBinCount),u=()=>{s.getByteFrequencyData(d),o(Math.min(100,Math.round(d.reduce((e,t)=>e+t,0)/d.length/255*200))),c.current=requestAnimationFrame(u)};u(),a((null==(t=n.getAudioTracks()[0])?void 0:t.getSettings().deviceId)||e)}}return(0,l.useEffect)(()=>(i.current=!0,p(t),()=>{i.current=!1,x()}),[]),(0,n.jsxs)("section",{className:"flex flex-col gap-2","aria-labelledby":"precall-mic-heading",children:[(0,n.jsx)("h3",{id:"precall-mic-heading",className:"text-sm font-semibold text-fg",children:"Microphone"}),m?(0,n.jsxs)("p",{className:"text-xs text-warn",role:"status",children:[m," You can still join without a microphone check."]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{className:"text-xs text-muted",children:"Say a few words — the bar should move as you speak."}),(0,n.jsx)("div",{className:"h-3 w-full overflow-hidden rounded-full bg-surface-sunken",role:"meter","aria-label":"Microphone level","aria-valuenow":s,"aria-valuemin":0,"aria-valuemax":100,children:(0,n.jsx)("div",{className:"h-full rounded-full bg-primary transition-[width]",style:{width:"".concat(s,"%")}})}),(0,n.jsx)(f,{id:"precall-mic",label:"Microphone",devices:u,value:h,onChange:e=>void p(e)})]})]})}function v(e){let{initialDeviceId:t,onDevice:a}=e,c=(0,l.useRef)(null),r=(0,l.useRef)(null),[i,s]=(0,l.useState)([]),[d,u]=(0,l.useState)(t||""),[h,m]=(0,l.useState)(!1),v="setSinkId"in HTMLMediaElement.prototype;async function x(){var e;null==(e=r.current)||e.close().catch(()=>{});let t=new(window.AudioContext||window.webkitAudioContext);r.current=t;let n=t.createOscillator(),l=t.createGain();l.gain.value=.15,n.frequency.value=440;let i=t.createMediaStreamDestination();n.connect(l).connect(i),n.onended=()=>{r.current===t&&(r.current=null),t.close().catch(()=>{})},n.start(),n.stop(t.currentTime+.6);let s=c.current;s&&(s.srcObject=i.stream,v&&d&&s.setSinkId&&await s.setSinkId(d).catch(()=>{}),s.play(),m(!0),a(d||void 0))}return(0,l.useEffect)(()=>{v&&navigator.mediaDevices.enumerateDevices().then(e=>s(o(e,"audiooutput","Speaker"))).catch(()=>s([]))},[v]),(0,l.useEffect)(()=>()=>{var e;null==(e=r.current)||e.close().catch(()=>{})},[]),(0,n.jsxs)("section",{className:"flex flex-col gap-2","aria-labelledby":"precall-speaker-heading",children:[(0,n.jsx)("h3",{id:"precall-speaker-heading",className:"text-sm font-semibold text-fg",children:"Speaker"}),(0,n.jsx)(f,{id:"precall-speaker",label:"Speaker",devices:v?i:[],value:d,onChange:u}),(0,n.jsx)("audio",{ref:c,hidden:!0}),(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)("button",{type:"button",className:"btn btn-outline btn-sm",onClick:()=>void x(),children:"Play test sound"}),h?(0,n.jsx)("span",{className:"text-xs text-muted",children:"Heard it? Then you are good to go."}):null]})]})}let x={checking:"Checking your connection…",good:"We reached our server quickly.",slow:"It took a while to reach our server — video quality may suffer.",failed:"Could not check your connection. You can still try to join."};function p(e){let{role:t,onReady:a,onCancel:o}=e,d=(0,l.useId)(),[f,p]=(0,l.useState)(!0),[g,b]=(0,l.useState)({}),y=(0,l.useRef)(function(){try{let e=window.localStorage.getItem(u);return e?JSON.parse(e):{}}catch(e){return{}}}
1()),w=function(e){let[t,a]=(0,l.useState)("checking");return(0,l.useEffect)(()=>{let t=!1,n=performance.now();return fetch((0,r.sd)("".concat(e,"s/video")),{cache:"no-store"}).then(e=>{if(!t){if(!e.ok)return a("failed");a(performance.now()-n>2e3?"slow":"good")}}).catch(()=>{t||a("failed")}),()=>{t=!0}},[e]),t}(t),k=(0,s.u)(!0,o);return"undefined"==typeof document?null:(0,c.createPortal)((0,n.jsxs)("div",{className:"video-call-overlay",role:"dialog","aria-modal":"true","aria-labelledby":d,children:[(0,n.jsx)("div",{className:"video-call-overlay__backdrop",onClick:o}),(0,n.jsxs)("div",{className:"video-call-overlay__panel video-call-overlay__panel--narrow",children:[(0,n.jsxs)("div",{className:"video-call-overlay__header",children:[(0,n.jsx)("h2",{ref:k,id:d,tabIndex:-1,className:"font-display text-lg font-semibold text-fg focus:outline-none",children:"Check your devices"}),(0,n.jsx)("button",{type:"button",className:"btn btn-outline btn-sm",onClick:o,children:"Cancel"})]}),(0,n.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col gap-5 overflow-y-auto p-4 sm:p-6",children:[(0,n.jsx)(h,{initialDeviceId:y.current.cameraId,onDevice:e=>b(t=>({...t,cameraId:e}))}),(0,n.jsx)(m,{initialDeviceId:y.current.microphoneId,onDevice:e=>b(t=>({...t,microphoneId:e}))}),(0,n.jsx)(v,{initialDeviceId:y.current.speakerId,onDevice:e=>b(t=>({...t,speakerId:e}))}),(0,n.jsxs)("p",{className:"text-xs text-muted",role:"status",children:[x[w]," Use a well-lit room and make sure the affected area can be shown on camera."]}),(0,n.jsxs)("label",{className:"flex items-center gap-2 text-sm text-fg",children:[(0,n.jsx)("input",{type:"checkbox",checked:f,onChange:e=>p(e.target.checked)}),"Remember my device choices for next time"]}),(0,n.jsx)("div",{className:"flex justify-end",children:(0,n.jsx)("button",{type:"button",className:"btn btn-primary",onClick:function(){f&&function(e){try{window.localStorage.setItem(u,JSON.stringify(e))}catch(e){}}(g),(0,i.av)(t),a()},children:"Join"})})]})]})]}),document.body)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.