1"use strict";(self.webpackChunksbm24=self.webpackChunksbm24||[]).push([[9413],{47811:(e,s,t)=>{t.d(s,{A:()=>i});t(65043);const i=t.p+"static/media/dossier.46d0f55e8606d17700066da17eca3c56.svg"},16349:(e,s,t)=>{t.d(s,{A:()=>ke});var i=t(65043),a=t(8488),n=t(43255),l=t(19647),r=t(77252),o=t(81551),d=t(70579);const c=(0,o.A)({myMessage:{float:"right",margin:5},otherMessage:{float:"left",margin:5},icons:{opacity:.2,"&:hover, &:focus":{opacity:.9}}}),h=e=>{let{chat:s,UserId:t,reply:i,deleteMessage:o}=e;const h=parseInt(t)===parseInt(s.user_id);c();return(0,d.jsxs)("div",{className:h?"chat_item me":"chat_item",children:[(0,d.jsxs)("div",{className:"main_item_chat",children:[(0,d.jsx)("div",{className:"text_chat",children:(0,d.jsx)("p",{children:s.message})}),(0,d.jsx)("div",{className:"clearfix"}),(0,d.jsx)("time",{children:s.created_at}),h&&(0,d.jsx)("span",{className:"seen",children:s.seen_audience?(0,d.jsx)(a.A,{}):(0,d.jsx)(n.A,{})}),(0,d.jsx)("div",{className:"clearfix"})]}),h?(0,d.jsxs)("div",{className:"control_message",style:{display:"inline"},children:[(0,d.jsx)(l.A,{className:"reply_message",onClick:()=>i(s)}),(0,d.jsx)(r.A,{className:"delete_message",onClick:()=>o(s)})]}):(0,d.jsx)("div",{className:"control_message",style:{display:"inline",float:"left"},children:(0,d.jsx)(l.A,{className:"reply_message",onClick:()=>i(s)})}),(0,d.jsx)("div",{className:"clearfix"})]},s.key)};var p=t(40854),m=t.n(p),u=t(60620),g=t(38571),x=t(18764);const A=(0,o.A)({myMessage:{float:"right",margin:5},otherMessage:{float:"left",margin:5}}),j=e=>{let{chat:s,UserId:t,reply:o,deleteMessage:c,doc:h,prescriptionFileStyle:p,prescriptionFileStyle2:m}=e;const[x,j]=(0,i.useState)({}),[f,y]=(0,i.useState)(!1),v=parseInt(t)===parseInt(s.user_id),[b,C]=(0,i.useState)(0),[I,k]=(0,i.useState)(!1),_=(A(),e=>{const t=document.createElement("a");t.href=`${s.file}`,t.target="_blank",t.setAttribute("download",s.file.split("/").slice(-1)[0]),document.body.appendChild(t),t.click()});return(0,d.jsxs)("div",{className:v?"chat_item me":"chat_item",children:[(0,d.jsxs)("div",{className:"main_item_chat",style:p,children:[(0,d.jsxs)("div",{className:"text_chat",style:m,children:[(0,d.jsxs)("p",{onClick:_,children:[(0,d.jsx)(g.A,{"aria-label":"save",size:"medium",style:v?{backgroundColor:"#fff"}:{backgroundColor:"#7144b7"},children:(0,d.jsx)(u.A,{style:v?{color:"#7144b7"}:{color:"#fff"}})}),I?`% ${b}`:"\u062f\u0627\u0646\u0644\u0648\u062f \u0641\u0627\u06cc\u0644",h]}),(0,d.jsx)("p",{style:{marginTop:"10px",marginBottom:"10px"},children:s.message})]}),(0,d.jsx)("div",{className:"clearfix"}),(0,d.jsx)("time",{children:s.created_at}),v?(0,d.jsx)("span",{className:"seen",children:s.seen?(0,d.jsx)(a.A,{}):(0,d.jsx)(n.A,{})}):null,(0,d.jsx)("div",{className:"clearfix"})]}),v?(0,d.jsxs)("div",{className:"control_message",style:{display:"inline"},children:[(0,d.jsx)(l.A,{className:"reply_message",onClick:()=>o(s)}),(0,d.jsx)(r.A,{className:"delete_message",onClick:()=>c(s)})," "]}):(0,d.jsx)("div",{className:"control_message",style:{display:"inline",float:"left"},children:(0,d.jsx)(l.A,{className:"reply_message",onClick:()=>o(s)})}),(0,d.jsx)("div",{className:"clearfix"})]},s.key)},f=e=>{let{audio:s,owner:t}=e;const[a,n]=(0,i.useState)(!1),[l,r]=(0,i.useState)(0),[o,c]=(0,i.useState)(0),h=(0,i.useRef)(null);(0,i.useEffect)((()=>{h.current&&(h.current.addEventListener("timeupdate",p),h.current.addEventListener("loadedmetadata",m))}),[]);const p=()=>{r(h.current.currentTime)},m=()=>{c(h.current.duration)},u=e=>{const s=Math.floor(e/60),t=Math.floor(e%60);return`${s}:${t<10?"0":""}${t}`},g=l/o*100;return console.log(g),(0,i.useEffect)((()=>{g>=100&&n(!1)}),[g,n]),(0,d.jsxs)("div",{className:"audioContainer",style:{flexDirection:""+(t?"row-reverse":"row")},children:[(0,d.jsx)("button",{className:"playButton",onClick:()=>{a?h.current.pause():h.current.play(),n(!a)},children:a?"\u275a\u275a":"\u25ba"}),(0,d.jsx)("input",{type:"range",style:{width:"10px"},value:g,onChange:e=>{const s=e.target.value/100*o;h.current.currentTime=s,r(s)},className:"progressBar"}),(0,d.jsxs)("div",{className:"timeContainer",style:{color:""+(t?"#ffffff"
1:"#ca5cd4")},children:[(0,d.jsx)("p",{children:u(l)})," / ",(0,d.jsx)("p",{children:u(o)})]}),(0,d.jsx)("audio",{ref:h,src:s,className:"hiddenAudioElement"})]})},y=e=>{let{chat:s,UserId:t,reply:i,deleteMessage:o,doc:c,prescriptionVoiceStyle:h,prescriptionVoiceStyle2:p}=e;const m=parseInt(t)===parseInt(s.user_id);return(0,d.jsxs)("div",{className:m?"chat_item me":"chat_item",children:[(0,d.jsxs)("div",{className:"main_item_chat",style:h,children:[(0,d.jsxs)("div",{className:"text_chat",style:p,children:[(0,d.jsx)("p",{children:(0,d.jsx)("div",{className:"load_audio",children:(0,d.jsx)(f,{audio:s.file,owner:m})})}),c]}),(0,d.jsx)("div",{className:"clearfix"}),(0,d.jsx)("time",{children:s.created_at}),m?(0,d.jsx)("span",{className:"seen",children:s.seen?(0,d.jsx)(a.A,{}):(0,d.jsx)(n.A,{})}):null,(0,d.jsx)("div",{className:"clearfix"})]}),m?(0,d.jsxs)("div",{className:"control_message",style:{display:"inline-block"},children:[(0,d.jsx)(l.A,{className:"reply_message",style:m?{fontSize:20}:{fontSize:20,float:"left"},onClick:()=>i(s)}),(0,d.jsx)(r.A,{className:"delete_message",onClick:()=>o(s)})]}):(0,d.jsx)("div",{className:"control_message",style:{display:"inline-block"},children:(0,d.jsx)(l.A,{className:"reply_message",style:m?{fontSize:20}:{fontSize:20,float:"left"},onClick:()=>i(s)})}),(0,d.jsx)("div",{className:"clearfix"})]},s.key)};var v=t(1043);const b=(0,o.A)({myMessage:{float:"right",margin:5},otherMessage:{float:"left",margin:5},icons:{opacity:.2,"&:hover, &:focus":{opacity:.9}}}),C=e=>{let{UserId:s,chat:t,reply:i,deleteMessage:o,src:c,doc:h,prescriptionVideoStyle:p}=e;const m=b(),u=parseInt(s)===parseInt(t.user_id);return(0,d.jsxs)("div",{className:u?"chat_item me":"chat_item",children:[(0,d.jsxs)("div",{className:"main_item_chat",style:p,children:[(0,d.jsxs)("div",{className:u?m.myMessage:m.otherMessage,children:[(0,d.jsx)("div",{className:"text_chat",children:(0,d.jsx)(v.A,{controls:!0,className:u?m.myMessage:m.otherMessage,url:c,width:"200px",height:"auto",style:{borderRadius:"7px"},UserId:s})}),u?(0,d.jsxs)("div",{className:"control_message",style:{display:"inline-block"},children:[(0,d.jsx)(l.A,{className:"reply_message",style:u?{fontSize:20}:{fontSize:20,float:"left"},onClick:()=>i(t)}),(0,d.jsx)(r.A,{className:"delete_message",onClick:()=>o(t)})]}):(0,d.jsx)("div",{className:"control_message",style:{display:"inline-block"},children:(0,d.jsx)(l.A,{className:"reply_message",style:u?{fontSize:20}:{fontSize:20,float:"left"},onClick:()=>i(t)})}),h]}),(0,d.jsx)("div",{className:"clearfix"}),(0,d.jsx)("time",{children:t.created_at}),u?(0,d.jsx)("span",{className:"seen",children:t.seen?(0,d.jsx)(a.A,{}):(0,d.jsx)(n.A,{})}):null,(0,d.jsx)("div",{className:"clearfix"})]}),(0,d.jsx)("div",{className:"clearfix"})]},t.key)},I=(0,o.A)({myMessage:{float:"right",margin:5},otherMessage:{float:"left",margin:5}}),k=e=>{let{chat:s,UserId:t,reply:o,deleteMessage:c,doc:h,prescriptionFileStyle:p,prescriptionFileStyle2:m}=e;const[u,g]=(0,i.useState)({}),[x,A]=(0,i.useState)(!1),j=parseInt(t)===parseInt(s.user_id),[f,y]=(0,i.useState)(0),[v,b]=(0,i.useState)(!1);I();return(0,d.jsxs)("div",{className:j?"chat_item me":"chat_item",children:[(0,d.jsxs)("div",{className:"main_item_chat",style:p,children:[(0,d.jsxs)("div",{className:"text_chat",style:m,children:[(0,d.jsx)("p",{children:h}),(0,d.jsx)("p",{children:s.message})]}),(0,d.jsx)("div",{className:"clearfix"}),(0,d.jsx)("time",{children:s.created_at}),j?(0,d.jsx)("span",{className:"seen",children:s.seen?(0,d.jsx)(a.A,{}):(0,d.jsx)(n.A,{})}):null,(0,d.jsx)("div",{className:"clearfix"})]}),j?(0,d.jsxs)("div",{className:"control_message",style:{display:"inline"},children:[(0,d.jsx)(l.A,{className:"reply_message",onClick:()=>o(s)}),(0,d.jsx)(r.A,{className:"delete_message",onClick:()=>c(s)})," "]}):(0,d.jsx)("div",{className:"control_message",style:{display:"inline",float:"left"},children:(0,d.jsx)(l.A,{className:"reply_message",onClick:()=>o(s)})}),(0,d.jsx)("div",{className:"clearfix"})]},s.key)};var _=t(81073);const S=(0,o.A)({myMessage:{float:"right",margin:5},otherMessage:{float:"left",margin:5}}),N=e=>{let{chat:s,UserId:t,reply:o,deleteMessage:c,doc:h,prescriptionFileStyle:p,prescriptionFileStyle2:m}=e;const[u,g]=(0,i.useState)({}
1),[x,A]=(0,i.useState)(!1),j=parseInt(t)===parseInt(s.user_id),[f,y]=(0,i.useState)(0),[v,b]=(0,i.useState)(!1),C=(S(),e=>{const t=document.createElement("a");t.href=`${s.file}`,t.target="_blank",t.setAttribute("download",s.file.split("/").slice(-1)[0]),document.body.appendChild(t),t.click()});return(0,d.jsxs)("div",{className:j?"chat_item me":"chat_item",children:[(0,d.jsxs)("div",{className:"main_item_chat",style:p,children:[(0,d.jsx)("div",{className:"text_chat",style:m,children:(0,d.jsxs)("p",{onClick:C,children:[(0,d.jsx)("p",{children:s.message}),(0,d.jsx)(_.A,{height:200,offsetVertical:200,children:(0,d.jsx)("img",{style:{width:200,height:200,borderRadius:8},src:s.file,alt:"no image",userId:t})}),h]})}),(0,d.jsx)("div",{className:"clearfix"}),(0,d.jsx)("time",{children:s.created_at}),j?(0,d.jsx)("span",{className:"seen",children:s.seen?(0,d.jsx)(a.A,{}):(0,d.jsx)(n.A,{})}):null,(0,d.jsx)("div",{className:"clearfix"})]}),j?(0,d.jsxs)("div",{className:"control_message",style:{display:"inline"},children:[(0,d.jsx)(l.A,{className:"reply_message",onClick:()=>o(s)}),(0,d.jsx)(r.A,{className:"delete_message",onClick:()=>c(s)})," "]}):(0,d.jsx)("div",{className:"control_message",style:{display:"inline",float:"left"},children:(0,d.jsx)(l.A,{className:"reply_message",onClick:()=>o(s)})}),(0,d.jsx)("div",{className:"clearfix"})]},s.key)},w=((0,o.A)({myMessage:{float:"right",margin:5},otherMessage:{float:"left",margin:5},icons:{opacity:.2,"&:hover, &:focus":{opacity:.9}}}),e=>{let{chat:s}=e;return(0,d.jsx)("div",{children:(0,d.jsxs)("div",{className:"main_item_chat",children:[(0,d.jsx)("div",{className:"text_chat",children:(0,d.jsx)("p",{children:s.message})}),(0,d.jsx)("div",{className:"clearfix"})]})},Math.random(1e3))}),M=e=>{let{chats:s,UserId:t,reply:i,deleteMessage:a,hasReply:n}=e;return(0,d.jsxs)("div",{className:"chat_lists",children:[s.map((e=>{if(e){if("file_message"===e.type&&e.reply_to){let n=s&&s.find((s=>s.id==e.reply_to));return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:parseInt(t)===parseInt(e.user_id)?"chat_item me":"chat_item",style:R.replyWrap,children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{children:"\u067e\u0627\u0633\u062e \u0628\u0647 :"}),n&&n.file]}),(0,d.jsx)(j,{chat:e,UserId:t,reply:()=>i(e),deleteMessage:()=>a(e)},e.key)]}),(0,d.jsx)("div",{className:"clearfix"})]})}if("file_message"===e.type)return(0,d.jsx)("div",{className:parseInt(t)===parseInt(e.user_id)?"chat_item me":"chat_item",children:(0,d.jsx)(j,{chat:e,UserId:t,reply:()=>i(e),deleteMessage:()=>a(e)},e.key)});if("dossierPhoto"===e.type)return(0,d.jsx)("div",{className:parseInt(t)===parseInt(e.user_id)?"chat_item me":"chat_item",children:(0,d.jsx)(N,{chat:e,UserId:t,reply:()=>i(e),deleteMessage:()=>a(e)},e.key)});if("dossierFile"===e.type){let s=null!=(l=e.file)?l.split(".").pop():void 0;return"jpg"==s||"jpeg"==s||"png"==s?(0,d.jsx)("div",{className:parseInt(t)===parseInt(e.user_id)?"chat_item me":"chat_item",children:(0,d.jsx)(N,{chat:e,UserId:t,reply:()=>i(e),deleteMessage:()=>a(e)},e.key)}):(0,d.jsx)("div",{className:parseInt(t)===parseInt(e.user_id)?"chat_item me":"chat_item",children:(0,d.jsx)(j,{chat:e,UserId:t,reply:()=>i(e),deleteMessage:()=>a(e)},e.key)})}if(e.type_message&&"dossiers"===e.type_message)return(0,d.jsx)("div",{className:parseInt(t)===parseInt(e.user_id)?"chat_item me":"chat_item",children:(0,d.jsx)(j,{chat:e,UserId:t,reply:()=>i(e),deleteMessage:()=>a(e)},e.key)});if("prescriptionPhoto"===e.type)return(0,d.jsx)("div",{className:parseInt(t)===parseInt(e.user_id)?"chat_item me":"chat_item",children:(0,d.jsx)(N,{prescriptionFileStyle:parseInt(t)===parseInt(e.user_id)?{border:"dotted",borderColor:"#fff",borderRadius:18,padding:5,backgroundColor:"#7747c0",color:"#fff"}:{border:"dotted",borderColor:"#7747c0",borderRadius:18,padding:5,backgroundColor:"#fff",color:"#000000"},prescriptionFileStyle2:parseInt(t)===parseInt(e.user_id)?{backgroundColor:"#7747c0",color:"#fff"}:{backgroundColor:"#fff",color:"#000000"},doc:" \u062f\u0633\u062a\u0648\u0631 \u067e\u0632\u0634\u06a9\u06cc",chat:e,UserId:t,reply:()=>i(e),deleteMessage:()=>a(e)},e.key)});
1if("prescriptionFile"===e.type&&null!=e.file)return(0,d.jsx)("div",{className:parseInt(t)===parseInt(e.user_id)?"chat_item me":"chat_item",children:(0,d.jsx)(j,{prescriptionFileStyle:parseInt(t)===parseInt(e.user_id)?{border:"dotted",borderColor:"#fff",borderRadius:18,padding:5,backgroundColor:"#7747c0"}:{border:"dotted",borderColor:"#7747c0",borderRadius:18,padding:5,backgroundColor:"#fff"},prescriptionFileStyle2:parseInt(t)===parseInt(e.user_id)?{backgroundColor:"#7747c0"}:{backgroundColor:"#fff"},doc:" : \u062f\u0633\u062a\u0648\u0631 \u067e\u0632\u0634\u06a9\u06cc",chat:e,UserId:t,reply:()=>i(e),deleteMessage:()=>a(e)},e.key)});if("prescriptionFile"===e.type&&null==e.file)return(0,d.jsx)("div",{className:parseInt(t)===parseInt(e.user_id)?"chat_item me":"chat_item",children:(0,d.jsx)(k,{prescriptionFileStyle:parseInt(t)===parseInt(e.user_id)?{border:"dotted",borderColor:"#fff",borderRadius:18,padding:5,backgroundColor:"#7747c0"}:{border:"dotted",borderColor:"#7747c0",borderRadius:18,padding:5,backgroundColor:"#fff"},prescriptionFileStyle2:parseInt(t)===parseInt(e.user_id)?{backgroundColor:"#7747c0"}:{backgroundColor:"#fff"},doc:" \u062f\u0633\u062a\u0648\u0631 \u067e\u0632\u0634\u06a9\u06cc",chat:e,UserId:t,reply:()=>i(e),deleteMessage:()=>a(e)},e.key)});if("voice_message"===e.type&&e.reply_to){let n=s&&s.find((s=>s.id==e.reply_to));return(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)("div",{className:parseInt(t)===parseInt(e.user_id)?"chat_item me":"chat_item",style:R.replyWrap,children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{children:"\u067e\u0627\u0633\u062e \u0628\u0647 :"}),n&&n.file]}),(0,d.jsx)(y,{chat:e,UserId:t,reply:()=>i(e),deleteMessage:()=>a(e)},e.key)]})})}if("voice_message"===e.type)return(0,d.jsx)("div",{className:parseInt(t)===parseInt(e.user_id)?"chat_item me":"chat_item",children:(0,d.jsx)(y,{chat:e,UserId:t,reply:()=>i(e),deleteMessage:()=>a(e)},e.key)});if("prescriptionVoice"===e.type)return(0,d.jsx)("div",{className:parseInt(t)===parseInt(e.user_id)?"chat_item me":"chat_item",children:(0,d.jsx)(y,{prescriptionVoiceStyle:parseInt(t)===parseInt(e.user_id)?{border:"dotted",borderColor:"#fff",borderRadius:18,padding:5,backgroundColor:"#7747c0"}:{border:"dotted",borderColor:"#7747c0",borderRadius:18,padding:5,backgroundColor:"#fff"},prescriptionVoiceStyle2:parseInt(t)===parseInt(e.user_id)?{backgroundColor:"#7747c0"}:{backgroundColor:"#fff"},doc:"\u062f\u0633\u062a\u0648\u0631 \u067e\u0632\u0634\u06a9\u06cc",chat:e,UserId:t,reply:()=>i(e),deleteMessage:()=>a(e)},e.key)});if("dossierVoice"===e.type&&e.reply_to){let n=s&&s.find((s=>s.id==e.reply_to));return(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)("div",{className:parseInt(t)===parseInt(e.user_id)?"chat_item me":"chat_item",style:R.replyWrap,children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{children:"\u067e\u0627\u0633\u062e \u0628\u0647 :"}),n&&n.file]}),(0,d.jsx)(y,{chat:e,UserId:t,reply:()=>i(e),deleteMessage:()=>a(e)},e.key)]})})}if("dossierVoice"===e.type)return(0,d.jsx)("div",{className:parseInt(t)===parseInt(e.user_id)?"chat_item me":"chat_item",children:(0,d.jsx)(y,{chat:e,UserId:t,reply:()=>i(e),deleteMessage:()=>a(e)},e.key)});if("text"===e.type&&e.reply_to){let l=s&&s.find((s=>s.id==e.reply_to));return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:parseInt(t)===parseInt(e.user_id)?"chat_item me":"chat_item",style:R.replyWrap,children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{children:"\u067e\u0627\u0633\u062e \u0628\u0647 :"}),l&&l.message]}),(0,d.jsx)(h,{chat:e,UserId:t,reply:()=>i(e),deleteMessage:()=>a(e),hasReply:n},e.key)]}),(0,d.jsx)("div",{className:"clearfix"})]})}if("text"===e.type)return(0,d.jsx)("div",{className:parseInt(t)===parseInt(e.user_id)?"chat_item me":"chat_item",children:(0,d.jsx)(h,{chat:e,UserId:t,reply:()=>i(e),deleteMessage:()=>a(e),hasReply:n},e.key)});if("video_message"===e.type&&e.reply_to){let n=s&&s.find((s=>s.id==e.reply_to));return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:parseInt(t)===parseInt(e.user_id)?"chat_item me":"chat_item",style:R.replyWrap,children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{children:"\u067e\u0627\u0633\u062e \u0628\u0647 :"}),n&&n.file]}
1),(0,d.jsx)(C,{src:e.file,UserId:t,reply:()=>i(e),deleteMessage:()=>a(e),chat:e},e.key)]}),(0,d.jsx)("div",{className:"clearfix"})]})}if("video_message"===e.type)return(0,d.jsx)("div",{className:parseInt(t)===parseInt(e.user_id)?"chat_item me":"chat_item",children:(0,d.jsx)(C,{src:e.file,UserId:t,reply:()=>i(e),deleteMessage:()=>a(e),chat:e},e.key)});if("prescriptionVideoMessage"===e.type)return(0,d.jsx)("div",{className:parseInt(t)===parseInt(e.user_id)?"chat_item me":"chat_item",children:(0,d.jsx)(C,{prescriptionVideoStyle:parseInt(t)===parseInt(e.user_id)?{border:"dotted",borderColor:"#fff",borderRadius:18,padding:5,backgroundColor:"#7747c0"}:{border:"dotted",borderColor:"#7747c0",borderRadius:18,padding:5,backgroundColor:"#fff"},prescriptionVideoStyle2:parseInt(t)===parseInt(e.user_id)?{backgroundColor:"#7747c0"}:{backgroundColor:"#fff"},doc:"\u062f\u0633\u062a\u0648\u0631 \u067e\u0632\u0634\u06a9\u06cc",src:e.file,UserId:t,reply:()=>i(e),deleteMessage:()=>a(e),chat:e},e.key)});if("dossierVideoMessage"===e.type&&e.reply_to){let n=s&&s.find((s=>s.id==e.reply_to));return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:parseInt(t)===parseInt(e.user_id)?"chat_item me":"chat_item",style:R.replyWrap,children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{children:"\u067e\u0627\u0633\u062e \u0628\u0647 :"}),n&&n.file]}),(0,d.jsx)(C,{src:e.file,UserId:t,reply:()=>i(e),deleteMessage:()=>a(e),chat:e},e.key)]}),(0,d.jsx)("div",{className:"clearfix"})]})}return"dossierVideoMessage"===e.type?(0,d.jsx)("div",{className:parseInt(t)===parseInt(e.user_id)?"chat_item me":"chat_item",children:(0,d.jsx)(C,{src:e.file,UserId:t,reply:()=>i(e),deleteMessage:()=>a(e),chat:e},e.key)}):"systemMessages"===e.type?(0,d.jsx)("div",{style:{background:"#fff",borderRadius:13,padding:"10px 13px",marginBottom:10,minWidth:250,fontSize:"0.8em",display:"block",backgroundColor:"#fbf8ff",color:"#7144b7",lineHeight:"2.5em",border:"2px solid #7144b7"},children:(0,d.jsx)(w,{chat:e})}):null;var l}})),(0,d.jsx)("div",{id:"chat_list_end"})]})},R={replyWrap:{display:"inlineBlock",background:"#fcf9de",padding:10,border:"1px solid #fcf9de",borderRadius:4,boxShadow:"1px 3px 1px #faf4c5",margin:10}};var D=t(58374),T=t(20880),U=t(53536),V=t.n(U),B=t(35801),F=t(85883),L=t(43867),E=t(9989),P=t(87603),z=t(8713),O=t(96962),J=t
1(77325),G=t(52907),W=t(58425),X=t(59615),Y=t(39809),Q=t(3179),H=t(54056),Z=t(88425),q=t(83837);var K=t(33155);var $=t(41686);const ee=(0,q.uQ)();$.A.websocket.wsHost,$.A.websocket.wssPort,$.A.websocket.wsPort,$.A.backend.broadcastingAuth;var se=t(41641);const te=e=>{const{handleClose:s,AudienceID:t,addMessageToList:a,attachType:n,userId:l,roomToken:r}=e,{acceptedFiles:o,currentUploadFile:c,getInputProps:h,getRootProps:p,process:u,description:A,setDescription:j,descriptionInputRef:f,upload:y,uploading:v,close:b,success:C,failed:I}=((e,s,t,a,n)=>{const{acceptedFiles:l,getRootProps:r,getInputProps:o}=(0,K.V)({multiple:!1,maxSize:104e5}),[d]=(0,i.useState)(m().CancelToken.source()),[c,h]=(0,i.useState)(""),[p,u]=(0,i.useState)([]),[g,A]=(0,i.useState)([]),[j,f]=(0,i.useState)(!1),[y,v]=(0,i.useState)(""),[b,C]=(0,i.useState)(0),I=(0,i.useRef)(null);let k=a;return{getRootProps:r,getInputProps:o,setDescription:h,setCurrentUploadFile:v,upload:()=>{f(!0),l.forEach(((s,i)=>{if(-1===p.indexOf(s.name)){v(s.name);var a=new FormData;a.append("message",c),a.append("audience",e),"prescription"==k?a.append("type","prescriptionFile"):a.append("type","dossierFile"),a.append("file",s),a.append("room_token",t),(0,T.ce)("chat",a,"true","post","false","",!1,(e=>{C(e.loaded/e.total*100)}),(()=>{A([...g,s.name]),f(!1),(0,x.zV)("\u0627\u067e\u0644\u0648\u062f \u0641\u0627\u06cc\u0644 \u0628\u0627 \u062e\u0637\u0627 \u0645\u0648\u0627\u062c\u0647 \u0634\u062f. \u0644\u0637\u0641\u0627 \u062f\u0648\u0628\u0627\u0631\u0647 \u062a\u0644\u0627\u0634 \u06a9\u0646\u06cc\u062f.")}),d.token).then((function(e){console.log("fuck ",e),e&&(u([...p,s.name]),n(e))})).catch((e=>{console.log("fuck ",e)}))}}))},close:()=>{d.cancel("upload operation canceled by user"),s()},description:c,uploading:j,currentUploadFile:y,process:b,acceptedFiles:l,success:p,failed:g,descriptionInputRef:I}})(t,s,r,n,(e=>{a(e.message),s()})),k=e=>{const s=C.filter((s=>s===e)),t=I.filter((s=>s===e));return 1===s.length?(0,d.jsx)(g.A,{"aria-label":"save",color:"primary",children:(0,d.jsx)(X.A,{})}):1===t.length?(0,d.jsx)(g.A,{"aria-label":"save",color:"primary",children:(0,d.jsx)(Y.A,{})}):c===e?(0,d.jsx)(g.A,{"aria-label":"save",color:"default",children:(0,d.jsx)(W.A,{variant:"static",value:u})}):v?(0,d.jsx)(W.A,{}):(0,d.jsx)(Q.A,{})};return(0,d.jsxs)(B.A,{open:!0,onClose:b,"aria-labelledby":"form-dialog-title",children:[(0,d.jsx)(F.A,{id:"scroll-dialog-title",children:"\u0627\u0631\u0633\u0627\u0644 \u0641\u0627\u06cc\u0644 \u062c\u062f\u06cc\u062f"}),(0,d.jsxs)(L.A,{children:[(0,d.jsxs)("div",{style:{border:"2px dashed #ccc",borderRadius:"10px",height:"70%",textAlign:"center",padding:"15px"},...p(),children:[(0,d.jsx)("input",{...h(),disabled:v,multiple:!0}),(0,d.jsx)("p",{children:"\u0628\u0631 \u0631\u0648\u06cc + \u06a9\u0644\u06cc\u06a9 \u06a9\u0631\u062f\u0647 \u0648 \u0641\u0627\u06cc\u0644 \u0645\u0648\u0631\u062f \u0646\u0638\u0631 \u062e\u0648\u062f \u0631\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u0648 \u0627\u067e\u0644\u0648\u062f \u0646\u0645\u0627\u06cc\u06cc\u062f"}),(0,d.jsx)("p",{children:"\u062d\u062f\u0627\u06a9\u062b\u0631 \u062d\u062c\u0645 \u0642\u0627\u0628\u0644 \u0622\u067e\u0644\u0648\u062f \u06f1\u06f0 \u0645\u06af\u0627\u0628\u0627\u06cc\u062a"}),(0,d.jsx)("div",{className:"list_attach_fils",children:(0,d.jsx)("div",{className:"item_attach",children:o.length>0?(0,d.jsx)(E.A,{dense:!1,children:o.map((e=>(0,d.jsxs)(P.A,{className:"item_at_file",children:[(0,d.jsx)(z.A,{children:(0,d.jsx)(O.A,{children:k(e.name)})}),(0,d.jsx)(J.A,{primary:e.name,secondary:null})]},e.name)))}):(0,d.jsx)("div",{className:"file_attach",children:(0,d.jsx)(H.A,{})})})})]}),(0,d.jsx)("input",{disabled:v,type:"text",value:A,placeholder:"\u062a\u0648\u0636\u06cc\u062d\u0627\u062a \u062e\u0648\u062f \u0631\u0627 \u062a\u0627\u06cc\u067e \u06a9\u0646\u06cc\u062f...",className:"form-control chat_type",onChange:e=>j(e.target.value),style:{marginTop:"10px"},autoFocus:!0,ref:f})]}),(0,d.jsxs)(G.A,{children:[(0,d.jsxs)("button",{variant:"contained",onClick:()=>y(),disabled:v||0===o.length,className:"button",children:[(0,d.jsx)(Z.A,{style:{marginLeft:"10px"}}),"\u0622\u067e\u0644\u0648\u062f"]}),(0,d.jsx)("button",{onClick:b,color:"primary",className:"button",children:"\u0644\u063a\u0648"})]})]})};
1var ie=t(53753),ae=t(10155),ne=t(17392),le=t(77925);class re extends i.Component{constructor(e){super(e),this.state={time:{},miliseconds:0,recording:!1,medianotFound:!1,audios:[],audioBlob:null,stream:null},this.timer=0,this.startTimer=this.startTimer.bind(this),this.countDown=this.countDown.bind(this),this.onClose=this.onClose.bind(this),this.stopRecording=this.stopRecording.bind(this)}handleAudioPause(e){e.preventDefault(),clearInterval(this.timer),this.mediaRecorder.pause(),this.setState({pauseRecord:!0})}handleAudioStart(e){e.preventDefault(),this.startTimer(),this.mediaRecorder.resume(),this.setState({pauseRecord:!1})}startTimer(){this.timer=setInterval(this.countDown,100)}countDown(){this.props.limit&&this.state.time.m>=this.props.limit&&(this.stopRecording(),console.log(this.state.time,"******* hi timer")),this.setState((e=>{const s=e.miliseconds+100;return{time:this.milisecondsToTime(s),miliseconds:s}})),this.props.handleCountDown(this.state.time)}milisecondsToTime(e){let s=e/1e3,t=s%3600,i=t%60;return{h:Math.floor(s/3600),m:Math.floor(t/60),s:Math.ceil(i),ms:e}}async initRecorder(){if(navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia,navigator.mediaDevices){const e=await navigator.mediaDevices.getUserMedia({audio:!0});this.props.mimeTypeToUseWhenRecording?this.mediaRecorder=new MediaRecorder(e,{mimeType:this.props.mimeTypeToUseWhenRecording}):this.mediaRecorder=new MediaRecorder(e),this.chunks=[],this.mediaRecorder.ondataavailable=e=>{e.data&&e.data.size>0&&this.chunks.push(e.data)},this.mediaRecorder.onstop=()=>{this.saveAudio()},this.stream=e}else this.setState({medianotFound:!0}),console.log("Media Decives will work only with SSL.....")}async startRecording(e){e.preventDefault(),this.chunks=[];try{await this.initRecorder()}catch(s){return void console.log(s)}this.mediaRecorder.start(10),this.startTimer(),this.setState({recording:!0})}stopRecording(e){if(clearInterval(this.timer),this.setState({time:{}}),e&&e.preventDefault(),this.mediaRecorder&&"inactive"!==this.mediaRecorder.state&&this.mediaRecorder.stop(),this.stream&&this.stream.getAudioTracks){this.stream.getAudioTracks().forEach((e=>{e.stop()}))}else console.log("No Tracks Found");this.setState({recording:!1,pauseRecord:!1})}handleReset(e){this.state.recording&&this.stopRecording(e),this.setState({time:{},miliseconds:0,recording:!1,medianotFound:!1,audios:[],audioBlob:null},(()=>{this.props.handleReset(this.state)}))}saveAudio(){const e=new Blob(this.chunks,{type:"audio/*"}),s=window.URL.createObjectURL(e),t=[s];this.setState({audios:t,audioBlob:e}),this.props.handleAudioStop({url:s,blob:e,chunks:this.chunks,duration:this.state.time})}onClose(e){this.state.recording&&this.stopRecording(e),this.props.onClose()}uploadFile(){console.log("kjhkjhkjkh"),this.state.audioBlob?this.props.handleAudioUpload(this.state.audioBlob):console.log("chertopert")}render(){const{recording:e,audios:s,time:t,medianotFound:i,pauseRecord:a}=this.state,{showUIAudio:n,audioURL:l,disableFullUI:r}=this.props;return r?null:(0,d.jsxs)("div",{className:"recorder_library_box",children:[(0,d.jsxs)("div",{className:"dialog-header",children:[(0,d.jsxs)("div",{className:"dialog-header-title",children:[(0,d.jsx)("div",{className:"dialog-header-icon",children:(0,d.jsx)(ie.A,{sx:{fontSize:"30px",margin:"0px"}})}),"\u0636\u0628\u0637 \u0641\u0627\u06cc\u0644 \u0635\u0648\u062a\u06cc"]}),(0,d.jsx)(ne.A,{onClick:this.onClose,color:"error",sx:{aspectRatio:1,width:"25px",height:"25px",backgroundColor:"rgb(250, 156, 156)"},"aria-label":"delete",children:(0,d.jsx)(ae.A,{})})]}),(0,d.jsx)("div",{className:"recorder_box",children:(0,d.jsx)("div",{className:"recorder_box_inner",children:i?(0,d.jsx)("div",{className:"btn_container",children:"Seems the site is Non-SSL"}):(0,d.jsxs)("div",{className:"record_section",children:[(0,d.jsxs)("div",{className:"audio_section",children:[(0,d.jsxs)("span",{children:[void 0!==t.s?`${t.s<=9?"0"+t.s:t.s}`:"00"," "]}),(0,d.jsx)("span",{children:":"}),(0,d.jsx)("span",{children:void 0!==t.m?`${t.m<=9?"0"+t.m:t.m}`:"00"})]}),e?(0,d.jsx)("div",{className:"audio_section",children:"\u062d\u062f\u0627\u06a9\u062b\u0631 \u06f3 \u062f\u0642\u06cc\u0642\u0647"}):(0,d.jsx)("div",{className:"audio_section",children:"\u0628\u0631\u0627\u06cc \u0636\u0628\u0637 \u06a9\u0644\u06cc\u06a9 \u06a9\u0646\u06cc\u062f"}),(0,d.jsx)("div",{className:"audio_section",children:null!==l&&n?(0,d.jsxs)("audio",{className:"audio_player",controls:!0,children:[(0,d.jsx)("source",{src:s[0],type:"audio/ogg"}),(0,d.jsx)("source",{src:s[0],type:"audio/mpeg"})]}):(0,d.jsx)("div",{className:"btn_container",style:{padding:0},children:e?(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("button",{className:"button",onClick:e=>this.stopRecording(e),children:"\u062a\u0648\u0642\u0641 \u0636\u0628\u0637"})}):null==l&&(0,d.jsx)("button",{className:"button",onClick:e=>this.startRecording(e),children:"\u0634\u0631\u0648\u0639 \u0636\u0628\u0637"})})}),this.props.uploading&&(0,d.jsxs)("div",{children:[(0,d.jsx)(le.A,{variant:"determinate",value:this.props.uploadProcess,color:"primary"}),(0,d.jsx)("p",{style:{textAlign:"center",marginTop:"10px"},children:"\u062f\u0631\u062d\u0627\u0644 \u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc..."})]}),(0,d.jsxs)("div",{className:"btn_container",children:[(0,d.jsx)("button",{disabled:this.props.uploading,onClick:()=>this.uploadFile(),className:"button",children:"\u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc"}),(0,d.jsx)("button",{onClick:e=>this.handleReset(e),className:"button",children:"\u062f\u0648\u0628\u0627\u0631\u0647"})]})]})})})]})}}re.defaultProps={hideHeader:!1,mimeTypeToUseWhenRecording:null,handleCountDown:e=>{}};const oe=function(e){const[s,t]=(0,i.useState)(!1),[a,n]=(0,i.useState)(!1),[l,r]=(0,i.useState)(),[o,c]=(0,i.useState)(),[h,p]=(0,i.useState)(0),m=(0,i.useRef)(null),u=(0,i.useRef)(null),g=(0,i.useRef)(!1),x=(0,i.useRef)(!1),A=(0,i.useRef)(!0),j=(0,i.useCallback)((()=>
1{u.current&&(u.current.getTracks().forEach((e=>e.stop())),u.current=null)}),[]),f=(0,i.useCallback)((async()=>{if(navigator.mediaDevices&&navigator.mediaDevices.getUserMedia)return navigator.mediaDevices.getUserMedia({audio:!0,video:!1});const e=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;if(!e)throw new Error("getUserMedia is not supported");return new Promise(((s,t)=>{e.call(navigator,{audio:!0,video:!1},s,t)}))}),[]),y=(0,i.useCallback)((()=>{g.current||x.current||(t(!0),f().then((s=>{const t=window.AudioContext||window.webkitAudioContext||!1;if(!t)throw new Error("Web Audio API is not supported");const i=(new t).createMediaStreamSource(s),a=new window.WebAudioRecorder(i,{workerDir:"/mp3/",numChannels:2});a.setEncoding("mp3"),a.setOptions({timeLimit:e.timeLimit,ogg:{quality:.5},mp3:{bitRate:160},encodeAfterRecord:!0}),a.onComplete=(e,s)=>{A.current&&(r(s),c(URL.createObjectURL(s)),j())},u.current=s,m.current=a,a.startRecording(),A.current&&(g.current=!0,n(!0),p(0))})).catch((e=>{console.error(e),"NotAllowedError"!==(null===e||void 0===e?void 0:e.name)?"NotFoundError"!==(null===e||void 0===e?void 0:e.name)?(0,q.zV)("\u0627\u0645\u06a9\u0627\u0646 \u0636\u0628\u0637 \u0635\u062f\u0627 \u062f\u0631 \u0645\u0631\u0648\u0631\u06af\u0631 \u0634\u0645\u0627 \u0648\u062c\u0648\u062f \u0646\u062f\u0627\u0631\u062f."):(0,q.zV)("\u0645\u06cc\u06a9\u0631\u0648\u0641\u0646 \u062f\u0631 \u062f\u0633\u062a\u0631\u0633 \u0646\u06cc\u0633\u062a."):(0,q.zV)("\u0627\u062c\u0627\u0632\u0647 \u062f\u0633\u062a\u0631\u0633\u06cc \u0628\u0647 \u0645\u06cc\u06a9\u0631\u0648\u0641\u0646 \u062f\u0627\u062f\u0647 \u0646\u0634\u062f.")})).finally((()=>{A.current&&t(!1)})))}),[j,e.timeLimit,f]),v=(0,i.useCallback)((async()=>{if(g.current&&!x.current){x.current=!0,t(!0);try{const e=m.current;g.current=!1,n(!1),u.current&&u.current.getTracks().forEach((e=>e.stop())),e?e.finishRecording():j()}catch(e){console.error(e),A.current&&(g.current=!1,n(!1)),j()}finally{x.current=!1,A.current&&t(!1)}}}),[j]);return(0,i.useEffect)((()=>{if(!a)return;const e=setInterval((()=>{p((e=>e+1))}),1e3);return()=>clearInterval(e)}),[a]),(0,i.useEffect)((()=>{h>=e.timeLimit&&v()}),[h,e.timeLimit,v]),(0,i.useEffect)((()=>(A.current=!0,()=>{A.current=!1,m.current&&g.current&&!x.current&&m.current.cancelRecording(),j(),o&&URL.revokeObjectURL(o)})),[j,o]),(0,d.jsxs)("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[(0,d.jsxs)("div",{className:"dialog-header",children:[(0,d.jsxs)("div",{className:"dialog-header-title",children:[(0,d.jsx)("div",{className:"dialog-header-icon",children:(0,d.jsx)(ie.A,{sx:{fontSize:"30px",margin:"0px"}})}),"\u0636\u0628\u0637 \u0641\u0627\u06cc\u0644 \u0635\u0648\u062a\u06cc"]}),(0,d.jsx)(ne.A,{onClick:async()=>{g.current&&await v(),e.onClose()},color:"error",sx:{aspectRatio:1,width:"25px",height:"25px",backgroundColor:"rgb(250, 156, 156)"},"aria-label":"delete",children:(0,d.jsx)(ae.A,{})})]}),(0,d.jsx)("div",{style:{width:"100%",display:"flex",justifyContent:"center",minHeight:70,alignItems:"center"},children:o?(0,d.jsx)("audio",{src:o,controls:!0}):a?(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(()=>{const e=e=>e>9?""+e:"0"+e,s=parseInt(h/60,10),t=h%60;return`${e(s)}:${e(t)}`})(),(0,d.jsx)("div",{className:"recording_light"})]}):(0,d.jsxs)("div",{className:"audio_section",children:[(0,d.jsx)("div",{children:"\u0628\u0631\u0627\u06cc \u0636\u0628\u0637 \u0631\u0648\u06cc \u0634\u0631\u0648\u0639 \u06a9\u0644\u06cc\u06a9 \u06a9\u0646\u06cc\u062f"}),(0,d.jsx)("div",{style:{fontSize:11,display:"flex",justifyContent:"center"},children:"\u062d\u062f\u0627\u06a9\u062b\u0631 \u06f3 \u062f\u0642\u06cc\u0642\u0647"})]})}),(0,d.jsx)("div",{className:"btn_container",children:l?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{className:"button",onClick:()=>e.handleAudioUpload(l),children:"\u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc"}),(0,d.jsx)("button",{className:"button error",onClick:()=>{o&&URL.revokeObjectURL(o),c(),r(),p(0),m.current=null},children:"\u062f\u0648\u0628\u0627\u0631\u0647"})]}):(0,d.jsx)("button",{className:"button",disabled:s,onClick:()=>{g.current?v():y()},children:a?"\u062a\u0648\u0642\u0641":"\u0634\u0631\u0648\u0639"})}),e.uploading&&(0,d.jsxs)("div",{style:{width:"100%"},children:[(0,d.jsx)(le.A,{variant:"determinate",value:e.uploadProcess,color:"primary"}),(0,d.jsx)("p",{style:{textAlign:"center",marginTop:"10px"},children:"\u062f\u0631\u062d\u0627\u0644 \u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc..."})]})]})};const de=function(e){const{handleClose:s,AudienceID:t,addMessageToList:a,userId:n,attachType:l,roomToken:r,cancel:o}=e,[c,h]=(0,i.useState)(0),[p,m]=(0,i.useState)(!1),[u,g]=(0,i.useState)({url:null,blob:null,chunks:null,duration:{h:0,m:0,s:0}}),x=()=>{A(),e.cancel()},A=()=>{g({url:null,blob:null,chunks:null,duration:{h:0,m:0,s:0}})};return(0,d.jsx)(B.A,{open:!0,"aria-labelledby":"form-dialog-title",children:(0,d.jsx)(oe,{timeLimit:180,onClose:x,uploadProcess:c,uploading:p,handleAudioUpload:e=>{const s=new File([e],`${t}-${n}-${Date.now().toFixed()}.mp3`,{type:"audio/mp3"});let i=new FormData;i.append("message",null),i.append("audience",t),"prescription"==l?i.append("type","prescriptionVoice"):i.append("type","dossierVoice"),i.append("file",s),i.append("room_token",r),m(!0);T.ce("chat",i,"true","post","false","",!1,(e=>{h(e.loaded/e.total*100)}),(()=>{(0,q.zV)("\u062e\u0637\u0627\u06cc\u06cc \u062f\u0631 \u0627\u067e\u0644\u0648\u062f \u0631\u062e \u062f\u0627\u062f. \u0644\u0637\u064
11\u0627 \u0645\u062c\u062f\u062f\u0627 \u062a\u0644\u0627\u0634 \u06a9\u0646\u06cc\u062f.")})).then((function(e){m(!1),e&&(a(e.message),console.log(e,"0000000000000responsej"),x())})).catch((()=>{m(!1)}))}})})};var ce=t(74990),he=t(78779),pe=t(99346),me=t(7855);const ue=e=>{const[s,t]=(0,i.useState)(0),[a,n]=(0,i.useState)(!1),{AudienceID:l,closeDialoge:r,addMessageToList:o,attachType:c,roomToken:h}=e,[p,m]=(0,i.useState)(!1),[u,g]=(0,i.useState)(),[x,A]=(0,i.useState)(-1),[j,f]=(0,i.useState)(!1),[y,v]=(0,i.useState)(0);(0,i.useEffect)((()=>{const e=setInterval((()=>{u||j&&A(x+1)}),1e3);return()=>clearInterval(e)}),[x]),(0,i.useEffect)((()=>()=>{A(-1)}),[y]);const b=e=>{const s=e=>e>9?""+e:"0"+e,t=e%60;return`${s(parseInt(e/60))}:${s(t)}`};return(0,d.jsxs)(B.A,{open:!0,onClose:e.closeDialoge,"aria-labelledby":"form-dialog-title",children:[(0,d.jsxs)("div",{className:"dialog-header",children:[(0,d.jsxs)("div",{className:"dialog-header-title",children:[(0,d.jsx)("div",{className:"dialog-header-icon",children:(0,d.jsx)(me.A,{sx:{fontSize:"30px",margin:"0px"}})}),(0,d.jsx)("h5",{children:"\u0636\u0628\u0637 \u067e\u06cc\u0627\u0645 \u062a\u0635\u0648\u06cc\u0631\u06cc"})]}),(0,d.jsx)("div",{className:"dialog-header-close",children:(0,d.jsx)(ne.A,{onClick:e.closeDialoge,color:"error",sx:{aspectRatio:1,width:"25px",height:"25px",backgroundColor:"rgb(250, 156, 156)"},"aria-label":"delete",children:(0,d.jsx)(ae.A,{})})})]}),(0,d.jsxs)(L.A,{children:[(0,d.jsxs)("div",{className:"video_recorder_chat",children:[(0,d.jsx)(ce.A,{switchCamera:!0,mimeType:"video/webm;codecs=h264",onSwitchCamera:e=>console.log(e,"onSwitchCamera"),onStartRecording:()=>{f(!0),g(""),A(-3)},onStopRecording:()=>{v(x)},onRecordingComplete:e=>{g(e)}}),!u&&x>=0&&(0,d.jsx)("div",{className:"video-record-timer",children:b(x)})]}),y>0&&(0,d.jsx)("div",{className:"video-record-duration ",children:b(y)})]}),a&&(0,d.jsxs)("div",{children:[(0,d.jsx)(le.A,{variant:"determinate",value:s,color:"primary"}),(0,d.jsx)("p",{style:{textAlign:"center",marginTop:"10px"},children:"\u062f\u0631\u062d\u0627\u0644 \u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc..."})]}),(0,d.jsx)(G.A,{children:(0,d.jsxs)("div",{className:"space-evenly v-padding",children:[(0,d.jsx)("button",{disabled:a,onClick:()=>{new File([u],`${Math.random()}.WebM`);if(!u)return;n(!0);let e=new FormData;e.append("file",u),e.append("audience",l),"prescription"==c?e.append("type","prescriptionVideoMessage"):e.append("type","dossierVideoMessage"),e.append("room_token",h);(0,T.ce)("chat",e,"true","post","false","",!1,(e=>{t(e.loaded/e.total*100)}),(()=>{(0,q.zV)("\u062e\u0637\u0627\u06cc\u06cc \u062f\u0631 \u0627\u067e\u0644\u0648\u062f \u0631\u062e \u062f\u0627\u062f. \u0644\u0637\u0641\u0627 \u0645\u062c\u062f\u062f\u0627 \u062a\u0644\u0627\u0634 \u06a9\u0646\u06cc\u062f.")})).then((function(e){n(!1),e&&(m(!0),r(),o(e.message))})).catch((e=>{n(!1),(0,q.zV)("\u062e\u0637\u0627\u06cc\u06cc \u062f\u0631 \u0627\u067e\u0644\u0648\u062f \u0631\u062e \u062f\u0627\u062f. \u0644\u0637\u0641\u0627 \u0645\u062c\u062f\u062f\u0627 \u062a\u0644\u0627\u0634 \u06a9\u0646\u06cc\u062f.")}))},className:"button light",children:(0,d.jsx)("h5",{children:"\u0622\u067e\u0644\u0648\u062f"})}),(0,d.jsx)("button",{onClick:e.closeDialoge,className:"button error",children:(0,d.jsx)("h5",{children:"\u0644\u063a\u0648 \u0627\u0631\u0633\u0627\u0644"})})]})}),(0,d.jsx)(he.A,{style:{width:"100%"},open:p,autoHideDuration:3e3,onClose:()=>{m(!1)},children:(0,d.jsx)(pe.A,{style:{fontSize:16,fontFamily:"iranyekan"},severity:"success",variant:"filled",children:"\u067e\u06cc\u0627\u0645 \u062a\u0635\u0648\u06cc\u0631\u06cc \u0628\u0627 \u0645\u0648\u0641\u0642\u06cc\u062a \u0627\u0631\u0633\u0627\u0644 \u0634\u062f"})})]})};var ge=t(82703),xe=t(98533),Ae=t(88528),je=t(10163);const fe=e=>{const{handleClose:s,AudienceID:t,addMessageToList:a,userId:n,roomToken:l}=e,{acceptedFiles:r,currentUploadFile:o,getInputProps:c,getRootProps:h,process:p,description:u,setDescription:A,descriptionInputRef:j,upload:f,uploading:y,close:v,success:b,failed:C}=((e,s,t,a)=>{const{acceptedFiles:n,getRootProps:l,getInputProps:r}=(0,K.V)({accept:"image/jpeg, image/png",multiple:!1,maxSize:104e5}
1),[o]=(0,i.useState)(m().CancelToken.source()),[d,c]=(0,i.useState)(""),[h,p]=(0,i.useState)([]),[u,g]=(0,i.useState)([]),[A,j]=(0,i.useState)(!1),[f,y]=(0,i.useState)(""),[v,b]=(0,i.useState)(0),C=(0,i.useRef)(null);return{getRootProps:l,getInputProps:r,setDescription:c,setCurrentUploadFile:y,upload:()=>{console.log("this is data"),j(!0),n.forEach(((s,i)=>{if(-1===h.indexOf(s.name)){var n=s;(0,se.A)(n,{maxSizeMB:1,maxWidthOrHeight:1920,useWebWorker:!0,fileType:"image/png"}).then((function(i){var n=new File([i],i.name,{type:"image/png",lastModified:Date.now()});y(i.name);var l=new FormData;l.append("message",d),l.append("audience",e),l.append("type","jpg"),l.append("file",n),l.append("room_token",t),(0,T.ce)("chat",l,"true","post","false","",!1,(e=>{b(e.loaded/e.total*100)}),(()=>{g([...u,s.name]),j(!1),console.log("er"),(0,x.zV)("\u0627\u067e\u0644\u0648\u062f \u0641\u0627\u06cc\u0644 \u0628\u0627 \u062e\u0637\u0627 \u0645\u0648\u0627\u062c\u0647 \u0634\u062f. \u0644\u0637\u0641\u0627 \u062f\u0648\u0628\u0627\u0631\u0647 \u062a\u0644\u0627\u0634 \u06a9\u0646\u06cc\u062f.")}),o.token).then((function(e){e&&(p([...h,s.name]),a(e))}))})).catch((function(e){console.log("ammir",e.message)}))}}))},close:()=>{o.cancel("upload operation canceled by user"),s()},description:d,uploading:A,currentUploadFile:f,process:v,acceptedFiles:n,success:h,failed:u,descriptionInputRef:C}})(t,s,l,(e=>{a(e.message),s()})),I=e=>{const s=b.filter((s=>s===e)),t=C.filter((s=>s===e));return 1===s.length?(0,d.jsx)(g.A,{"aria-label":"save",color:"primary",children:(0,d.jsx)(X.A,{})}):1===t.length?(0,d.jsx)(g.A,{"aria-label":"save",color:"primary",children:(0,d.jsx)(Y.A,{})}):o===e?(0,d.jsx)(g.A,{"aria-label":"save",color:"default",children:(0,d.jsx)(W.A,{variant:"static",value:p})}):y?(0,d.jsx)(W.A,{}):(0,d.jsx)(Q.A,{})};return(0,d.jsxs)(B.A,{open:!0,onClose:v,"aria-labelledby":"form-dialog-title",children:[(0,d.jsx)(F.A,{id:"scroll-dialog-title",children:"\u0627\u0631\u0633\u0627\u0644 \u062a\u0635\u0648\u06cc\u0631 \u062c\u062f\u06cc\u062f"}),(0,d.jsxs)(L.A,{children:[(0,d.jsxs)("div",{style:{border:"2px dashed #ccc",borderRadius:"10px",height:"70%",textAlign:"center",padding:"15px"},...h(),children:[(0,d.jsx)("input",{...c(),disabled:y}),(0,d.jsx)("p",{children:"\u0627\u06cc\u0646\u062c\u0627 \u06a9\u0644\u06cc\u06a9 \u06a9\u0646\u06cc\u062f \u0628\u0627 \u062a\u0635\u0648\u06cc\u0631 \u0631\u0627 \u06a9\u0634\u06cc\u062f\u0647 \u0648 \u0627\u06cc\u0646\u062c\u0627 \u0631\u0647\u0627 \u06a9\u0646\u06cc\u062f."}),(0,d.jsx)("p",{children:"\u062d\u062f\u0627\u06a9\u062b\u0631 \u062d\u062c\u0645 \u0642\u0627\u0628\u0644 \u0622\u067e\u0644\u0648\u062f \u06f1\u06f0 \u0645\u06af\u0627\u0628\u0627\u06cc\u062a"}),(0,d.jsx)("div",{className:"list_attach_fils",children:(0,d.jsx)("div",{className:"item_attach",children:r.length>0?(0,d.jsx)(E.A,{dense:!1,children:r.map((e=>(0,d.jsxs)(P.A,{className:"item_at_file",children:[(0,d.jsx)(z.A,{children:(0,d.jsx)(O.A,{children:I(e.name)})}),(0,d.jsx)(J.A,{primary:e.name,secondary:null})]},e.name)))}):(0,d.jsx)("div",{className:"file_attach",children:(0,d.jsx)(H.A,{})})})})]}),(0,d.jsx)("input",{disabled:y,type:"text",value:u,placeholder:"\u062a\u0648\u0636\u06cc\u062d\u0627\u062a \u062e\u0648\u062f \u0631\u0627 \u062a\u0627\u06cc\u067e \u06a9\u0646\u06cc\u062f...",className:"form-control chat_type",onChange:e=>A(e.target.value),style:{marginTop:"10px"},autoFocus:!0,ref:j})]}),(0,d.jsxs)(G.A,{children:[(0,d.jsxs)("button",{variant:"contained",onClick:()=>f(),disabled:y||0===r.length,className:"button",children:[(0,d.jsx)(Z.A,{style:{marginLeft:"10px"}}),"\u0622\u067e\u0644\u0648\u062f"]}),(0,d.jsx)("button",{onClick:v,className:"button",children:"\u0644\u063a\u0648"})]})]})};var ye=t(53602),ve=(t(52360),t(6171)),be=t(5393),Ce=(t(9192),t(42104));class Ie extends i.Component{constructor(e){super(e),this.pad=e=>{let s=e+"";return s.length<2?"0"+s:s},this.getVisitDuration=()=>{var e=this.props.VisitToken;const s=this;T.e5("doctor-visit-duration","token="+e,"true").then((function(e){if(e){let t,i;function a(e){let s=e+"";return s.length<2?"0"+s:s}s.setState({totalSeconds:e}),t=a(e%60),i=a(parseInt(e/60)),s.setState({secondsLabel:i,minutesLabel:t})}}))},this.ChatCallChannel=this.props.echo().join(`chat.${this.props.VisitToken}`),this.echoJoin=()=>{document.getElementById("chat_list_end")&&this.ChatCallChannel.here((e=>{let s=e.find((e=>e.id!==this.props.UserLogin.client_id));
1this.setState({audienceUser:s}),this.props.SeenChat(),setTimeout((()=>{if(s){document.getElementById("member_"+s.id).classList.add("online","public_online")}}),500)})).joining((e=>{setTimeout((()=>{let s=document.getElementById("member_"+e.id);s&&s.classList.add("online","public_online")}),500),setTimeout((()=>{var s=[];V().map(this.state.chats,(t=>{t.user_id===this.props.UserLogin.client_id&&e.id===t.audience&&!1===t.seen&&(t.seen=!0),s.push(t)})),this.setState({chats:s})}),1e3)})).leaving((e=>{setTimeout((()=>{let s=document.getElementById("member_"+e.id);s&&s.classList.remove("online")}),500)})).listen("MessageSent",(e=>{var s=this;e&&(Array.isArray(e.data)?e.data.map((e=>{s.setState({chats:[...s.state.chats,e]}),document.getElementById("chat_list_end")&&console.log("end 8"),e.id&&s.SeenMessage(e.id)})):parseInt(e.data.user_id)!==parseInt(this.user.id)&&(s.setState({chats:[...s.state.chats,e.data]}),document.getElementById("chat_list_end")&&console.log("end 7"),e.data.id&&s.SeenMessage(e.data.id)))})).listen("SeenMessage",(e=>{var s=this;parseInt(e.message.user_id)===parseInt(this.user.id)&&(document.getElementById("chat_list_end")&&console.log("end 10"),1===e.message.seen_audience&&setTimeout((()=>{var t=[];V().map(s.state.chats,(s=>{e.message.id===s.key&&(s.seen=!0),t.push(s)})),s.setState({chats:t})}),1e3))})).listenForWhisper("typing",(e=>{this.setState({isTyping:e.typing})}))},this.onWindowResize=()=>{},this.timer=null,this.triggerChange=()=>{this.ChatCallChannel.whisper("typing",{typing:!1,name:this.props.UserLogin.fullname}),this.setState({doTyping:!1})},this.addMessageToList=e=>{console.log("add me",e),e.file?this.addMessage(e):(this.setState({chats:[...this.state.chats,e],attachType:""}),setTimeout((function(){document.getElementById("chat_list_end")&&document.getElementById("chat_list_end").scrollIntoView(),console.log("end 1")}),100))},this.addmultifileMessageToList=e=>{console.log("addmultifileMessageToList"),Array.isArray(e)?e.forEach((e=>{this.addMessage(e),this.setState({attachType:"",showMedicalDocuments:!1,showMedicalInstructions:!1})})):this.setState({chats:[...this.state.chats,e],attachType:"",showMedicalDocuments:!1,showMedicalInstructions:!1}),setTimeout((function(){document.getElementById("chat_list_end")&&console.log("end 2")}),100)},this.confirmDeleteDialoge=e=>{this.setState({confirmDeleteDialoge:!0,deleted_id:e.id,selectedChat:e})},this.ConfirmDeleteMessage=()=>{const{VisitToken:e}=this.props,{deleted_id:s}=this.state;console.log("hi",e),this.socket.emit("deleteMessage",{messageId:s,roomToken:e}),this.socket.on(`updatedChat:${e}`,(e=>{this.setState((s=>({chats:[...e],confirmDeleteDialoge:!1})))}))},this.replyAction=e=>{this.setState({rep_to:e.id,showReplyDiv:!0}),document.getElementById("chat_list_end")&&console.log("end 4")},this.deleteAction=e=>{this.setState({deleted_id:e.id}),document.getElementById("chat_list_end")&&console.log("end 3")},this.cancelRepleing=()=>{this.setState({rep_to:null,showReplyDiv:!1})},this.VideoRecordHandler=()=>{window.RTCPeerConnection,this.setState({showVideoRecordMenu:!0})},this.VoiceRecordHandler=()=>{!1===!window.RTCPeerConnection?this.setState({showVoiceRecordMenu:!0}):this.setState({showVideoRecordMenu:!0})},this.medicalDocumentsHandler=()=>{this.setState({showMedicalDocuments:!0})},this.medicalInstructionsHandler=()=>{this.setState({showMedicalInstructions:!0})},this.handleOpenCompressedImageDialog=()=>{this.setState({showCompressedUploadMenu:!0})},this.AddFile=()=>{this.setState({showMedicalDocuments:!1,showFileUploadMenu:!1})},this.wordSuggestions=e=>{e.preventDefault();let s=e.currentTarget.value,t=this.state.words.filter((e=>e!=s));this.setState((e=>({words:t}))),this.addMessage(s),setTimeout((function(){document.getElementById("chat_list_end")&&console.log("end 6")}),100)},this.setAttachTypeprescription=()=>{this.setState({attachType:"prescription"})};const{UserLogin:s}=this.props;this.user={id:s.client_id,name:s.fullname},this.state={tarikh:this.props.date,rep_to:null,deleted_id:null,firstload:!0,loading:!0,text:"",username:this.user.name,chats:[],showFileUploadMenu:!1,showVoiceRecordMenu:!1,confirmDeleteDialoge:!1,selectedChat:{},showVideoRecordMenu:!1,showReplyDiv:!1,selectedToReply:"",isTyping:!1,showRtcUnsupported:!1,doTyping:!1,words:["\u0633\u0644\u0627\u0645","\u0648\u0642\u062a \u0628\u062e\u06cc\u0631","\u0686\u0646\u062f \u0644\u062d\u0638\u0647 \u0644\u0637\u064
11\u0627"],showMedicalDocuments:!1,showMedicalInstructions:!1,showCompressedUploadMenu:!1,attachType:"",totalSeconds:"",audienceUser:"",secondsLabel:"00",minutesLabel:"00"},this.handleTextChange=this.handleTextChange.bind(this),this.send=this.send.bind(this),this.ConfirmDeleteMessage=this.ConfirmDeleteMessage.bind(this),this.getVisitDuration=this.getVisitDuration.bind(this)}componentDidMount(){const e=$.A.websocket.socketUrl,s="https:"===window.location.protocol,t=e.startsWith("http://"),i=s&&t;this.socket=(0,Ce.io)(e,{transports:i?["polling"]:["polling","websocket"],reconnection:!0,reconnectionDelay:1e3,reconnectionAttempts:10,reconnectionDelayMax:5e3,upgrade:!i,rememberUpgrade:!i,timeout:2e4,forceNew:!1,autoConnect:!0,...i&&{withCredentials:!1,extraHeaders:{}}}),this.socket.on("connect_error",(s=>{console.error("\u274c Socket connection error:",s),console.log("Socket URL:",e),console.log("Page protocol:",window.location.protocol)})),this.socket.on("connect",(()=>{console.log("\u2705 Socket connected successfully")})),this.socket.on("disconnect",(e=>{console.warn("\u26a0\ufe0f Socket disconnected:",e)})),this.socket.on("reconnect",(e=>{console.log("\u2705 Socket reconnected after",e,"attempts")})),this.socket.on("reconnect_error",(e=>{console.error("\u274c Socket reconnection error:",e)}));new Date(this.state.tarikh).getFullYear();var a=this;a.echoJoin(),a.getVisitDuration(),this.socket.emit("fetchMessages",{roomToken:this.props.VisitToken,senderid:this.user.id,geterid:this.props.AudienceID}),this.socket.on(`newMessage:${this.props.VisitToken}`,(e=>{this.socket.emit("fetchMessages",{roomToken:this.props.VisitToken,senderid:this.user.id,geterid:this.props.AudienceID}),this.setState((s=>({chats:[...s.chats.map((e=>e.audience_id!==this.props.user_id?(console.log("this ch",e),{...e,seen_audience:1}):e)),e],showReplyDiv:!1})),(()=>{document.getElementById("chat_list_end")&&document.getElementById("chat_list_end").scrollIntoView({behavior:"smooth"})})),this.props.VisitToken===e.roomToken&&this.socket.emit("markAsSeen",{messageId:e.id,roomToken:e.roomToken})})),this.socket.on("chatHistory",(e=>{this.setState({chats:e,loading:!1},(()=>{document.getElementById("chat_list_end")&&document.getElementById("chat_list_end").scrollIntoView({behavior:"smooth"})}))})),window.addEventListener("resize",a.onWindowResize,!1);var n=document.getElementById("main_footer");n&&n.classList.add("hide_footer");var l=document.getElementById("main");l&&l.classList.add("hide_mood_main")}socketfetcher(){}setUserForSocket(){const{AudienceID:e}=this.props;this.socket.emit("setUser",{id:this.user.id,AudienceID:e})}scrollToEnd(){const e=document.getElementById("chat_list_end");e&&e.scrollIntoView()}addMessage(e){const{AudienceID:s,VisitToken:t}=this.props,{rep_to:i}=this.state;if(console.log("this is messages for us",e),e){let a={};a=e.file?{userid:this.user.id,type:e.type||"voice_message",file:e.file||null,audience_id:s,message:e.message||"null",room_token:t,reply_to:i||null}:{userid:this.user.id,type:e.type||"text",file:e.file||null,audience_id:s,message:e||"",room_token:t,reply_to:i||null},console.log("reply",i),this.setState({text:""}),this.socket.emit("sendMessage",a),this.setState({rep_to:null}),this.socket.off(`newMessage:${t}`),this.socket.on(`newMessage:${t}`,(e=>{this.setState((s=>{console.log("user id",e.user_id),console.log("user id 1",this.props.AudienceID);return{chats:[...s.chats.map((s=>e.user_id==this.props.AudienceID&&s.user_id==this.user.id?{...s,seen_audience:1}:s)),e],showReplyDiv:!1}})),document.getElementById("chat_list_end")&&(document.getElementById("chat_list_end").scrollIntoView(),console.log("end 12"))})),document.getElementById("chat_list_end")&&console.log("end 13")}}SeenMessage(e){}handleTextChange(e){clearTimeout(this.timer),this.setState({text:e.target.value}),this.timer=setTimeout(this.triggerChange,2e3),this.setState((e=>{if(!e.doTyping)return{doTyping:!0}})),this.state.doTyping||this.ChatCallChannel.whisper("typing",{typing:!0,name:this.props.UserLogin.fullname}),13===e.keyCode?(clearTimeout(this.timer),this.ChatCallChannel.whisper("typing",{typing:!1,name:this.props.UserLogin.fullname}),this.setState({dfoTyping:!1}),this.addMessage(this.state.text)):this.setState({text:e.target.value})}send(e){this.addMessage(this.state.text),this.state.showReplyDiv&&this.setState({showReplyDiv:!1})}render(){const{AudienceID:e,StatusOpen:s,VisitToken:t}=this.props;return this.state.loading?(0,d.jsx)("div",{className:"chat_room",children:(0,d.jsx)("div",{className:"preloader_set",children:(0,d.jsx)("div",{className:"cssload-speeding-wheel"})})}):(0,d.jsxs)("div",{className:s?"chat_room":"chat_room end_room",id:"chat_room_"+e,children:[this.state.isTyping?(0,d.jsx)("div",{style:{textAlign:"center",opacity:.5,color:"green"},children:"\u0645\u062e\u0627\u0637\u0628 \u062f\u0631 \u062d\u0627\u0644 \u062a\u0627\u06cc\u067e"}):null,(0,d.jsx)(M,{UserId:this.user.id,chats:this.state.chats,reply:e=>{this.replyAction(e)},deleteMessage:e=>{this.confirmDeleteDialoge(e)}}),this.state.showFileUploadMenu?(0,d.jsx)(te,{roomToken:this.props.VisitToken,addMessageToList:this.addMessageToList,AudienceID:e,open:this.state.showFileUploadMenu,userId:this.user.id,handleClose:()=>this.setState({showFileUploadMenu:!1,attachType:""}),attachType:this.state.attachType}):null,this.state.showCompressedUploadMenu?(0,d.jsx)(fe,{roomToken:this.props.VisitToken,addMessageToList:this.addMessageToList,AudienceID:e,open:this.state.showCompressedUploadMenu,userId:this.user.id,handleClose:()=>this.setState({showCompressedUploadMenu:!1})}):null,this.state.showVoiceRecordMenu?(0,d.jsx)(de,{roomToken:this.props.VisitToken,addMessageToList:this.addMessageToList,AudienceID:e,userId:this.user.id,open:this.state.showFileUploadMenu,handleClose:()=>this.setState({showVoiceRecordMenu:!1}),cancel:()=>{this.setState({showVoiceRecordMenu:!1,attachType:""})},attachType:this.state.attachType}):null,this.state.showVideoRecordMenu?(0,d.jsx)(ue,{roomToken:this.props.VisitToken,addMessageToList:this.addMessageToList,closeDialoge:()=>{this.setState({showVideoRecordMenu:!1,attachType:""})},AudienceID:this.props.AudienceID,attachType:this.state.attachType}):null,s?(0,d.jsx)("div",{className:"wordSuggestions-wrapper chat_input_tools",children:(0,d.jsx)(D.A,{text:this.state.text,username:this.state.username,handleTextChange:this.handleTextChange,handleSend:this.send,handleOpenFileUploadDialog:()=>this.setState({showMedicalDocuments:!0}),handleOpenFileUploadDialogDR:()=>this.setState({showMedicalInstructions:!0}),handleOpenVoiceRecorderDialog:this.VoiceRecordHandler,handleOpenVideoeRecorderDialog:this.VideoRecordHandler,medicalDocuments:this.medicalDocumentsHandler,medicalInstructions:this.medicalInstructionsHandler,showReplyDiv:this.state.showReplyDiv,cancelRepleing:this.cancelRepleing,selectedToReply:this.state.selectedToReply,handleOpenCompressedImageDialog:this.handleOpenCompressedImageDialog,VisitToken:t,AudienceID:e,addMessageToList:this.addMessageToList,attachType:this.state.attachType,setAttachTypeprescription:this.setAttachTypeprescription,setAttachTypeDefault:()=>this.setState({attachType:""})})}):this.props.Dr_info?(0,d.jsx)("div",{className:"new-reserve-same-dr",children:(0,d.jsx)("a",{className:"button secondary",href:ve.$("info_site")+this.props.Dr_info.doctor_username,children:(0,d.jsx)("h6",{children:"\u0631\u0632\u0631\u0648 \u0648\u0642\u062a \u062c\u062f\u06cc\u062f \u0627\u0632 \u0647\u0645\u06cc\u0646 \u062f\u06a9\u062a\u0631"})})}):null,this.state.showMedicalDocuments&&(0,d.jsx)("div",{children:(0,d.jsxs)(B.A,{open:!0,onClose:()=>{this.setState({showMedicalDocuments:!1})},"aria-labelledby":"form-dialog-title",children:[(0,d.jsxs)(ge.A,{sx:{display:"flex",width:"100%",justifyContent:"space-between",alignItems:"center"},children:[(0,d.jsx)(F.A,{id:"scroll-dialog-title",children:"\u062b\u0628\u062a \u0645\u0633\u062a\u0646\u062f\u0627\u062a \u062c\u062f\u06cc\u062f"}),(0,d.jsx)(ne.A,{onClick:()=>{this.setState({showMedicalDocuments:!1})},children:(0,d.jsx)(be.A,{sx:{width:"3rem !important",height:"3rem !important",color:"#de0036"}})})]}),(0,d.jsxs)(L.A,{children:[(0,d.jsx)(xe.A,{className:"dialog_text",sx:{fontSize:"1.25rem !important",fontWeight:"800 !important",width:"90% !important",marginX:"auto"},children:"\u0628\u0631\u0627\u06cc \u062b\u0628\u062a \u0645\u0633\u062a\u0646\u062f \u062c\u062f\u06cc\u062f \u0644\u0637\u064
11\u0627 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0628\u062e\u0634 \u0632\u06cc\u0631 \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f."}),(0,d.jsx)(Ae.A,{AddFile:e=>{this.addmultifileMessageToList(e)},VisitToken:this.props.VisitToken,AudienceID:e})]}),(0,d.jsx)(G.A,{})]})}),this.state.showMedicalInstructions&&(0,d.jsx)("div",{children:(0,d.jsxs)(B.A,{open:!0,onClose:()=>{this.setState({showMedicalInstructions:!1})},"aria-labelledby":"form-dialog-title",children:[(0,d.jsxs)("div",{className:"dialog-header",children:[(0,d.jsxs)("div",{className:"dialog-header-title",children:[(0,d.jsx)("div",{className:"dialog-header-icon",children:(0,d.jsx)(ye.A,{sx:{fontSize:"30px",margin:"0px"}})}),"\u0627\u067e\u0644\u0648\u062f \u0641\u0627\u06cc\u0644"]}),(0,d.jsx)(ne.A,{onClick:()=>{this.setState({showMedicalInstructions:!1})},color:"error",sx:{aspectRatio:1,width:"25px",height:"25px",backgroundColor:"rgb(250, 156, 156)"},"aria-label":"delete",children:(0,d.jsx)(ae.A,{})})]}),(0,d.jsx)(L.A,{children:(0,d.jsx)("div",{className:"center-content",children:(0,d.jsx)(je.A,{AddFile:e=>{this.addmultifileMessageToList(e)},VisitToken:this.props.VisitToken,AudienceID:e})})})]})}),(0,d.jsxs)(B.A,{open:this.state.confirmDeleteDialoge,onClose:()=>this.setState({confirmDeleteDialoge:!1}),children:[(0,d.jsx)(F.A,{className:"dialog-text",children:(0,d.jsx)("p",{children:"\u0622\u06cc\u0627\u0627\u0632 \u062d\u0630\u0641 \u067e\u06cc\u0627\u0645 \u0645\u0637\u0645\u0626\u0646 \u0647\u0633\u062a\u06cc\u062f\u061f"})}),(0,d.jsxs)(G.A,{children:[(0,d.jsx)("button",{autoFocus:!0,onClick:()=>this.setState({confirmDeleteDialoge:!1}),className:"button",children:"\u0627\u0646\u0635\u0631\u0627\u0641"}),(0,d.jsx)("button",{onClick:this.ConfirmDeleteMessage,autoFocus:!0,className:"button",children:"\u062a\u0627\u06cc\u06cc\u062f"})]})]})]})}}const ke=Ie;d.Fragment},58374:(e,s,t)=>{t.d(s,{A:()=>w});var i=t(65043),a=t(79234),n=t(55357),l=t(17339),r=t(7740),o=t(45636),d=t(49632),c=t(70579);function h(e){let{userLogin:s,shot:t,handleOpenFileUploadDialog:h,handleOpenVoiceRecorderDialog:m,handleOpenVideoeRecorderDialog:u,setAttachTypeDefault:g,AudienceID:x,VisitToken:A}=e;const[j,f]=(0,i.useState)(null),y=()=>{f(null)};return(0,c.jsxs)("div",{children:[(0,c.jsx)("div",{className:s&&"doctor"===s.approve?"send-files send-files-dr":"send-files",onClick:e=>{f(e.currentTarget)},children:s&&"doctor"===s.approve?(0,c.jsx)("div",{className:"send-svg-files",children:(0,c.jsx)("svg",{viewBox:"0 0 448 512",children:(0,c.jsx)("path",{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"})})}):(0,c.jsx)(c.Fragment,{children:(0,c.jsx)("div",{className:"send-svg-files",style:{width:"100%"},children:(0,c.jsx)("svg",{viewBox:"0 0 384 512",children:(0,c.jsx)("path",{d:"M336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM192 40c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm144 418c0 3.3-2.7 6-6 6H54c-3.3 0-6-2.7-6-6V118c0-3.3 2.7-6 6-6h42v36c0 6.6 5.4 12 12 12h168c6.6 0 12-5.4 12-12v-36h42c3.3 0 6 2.7 6 6v340zm-56-170h-56v-56c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v56h-56c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h56v56c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-56h56c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"})})})})}),(0,c.jsxs)(a.A,{id:"simple-menu",anchorEl:j,keepMounted:!0,open:Boolean(j),onClose:y,children:[(0,c.jsxs)(n.A,{onClick:()=>{t(),g(),y()},children:[(0,c.jsx)(l.A,{"aria-haspopup":"true",children:(0,c.jsx)(d.A,{style:p.btn,titleAccess:"\u0627\u0631\u0633\u0627\u0644 \u0641\u0627\u06cc\u0644"})}),(0,c.jsx)("div",{style:{width:"100%",textAlign:"right"},children:"\u062f\u0648\u0631\u0628\u06cc\u0646"})]}),(0,c.jsxs)(n.A,{onClick:()=>{h(),g(),y()},children:[(0,c.jsx)(l.A,{"aria-haspopup":"true",children:(0,c.jsx)(r.A,{style:p.btn,titleAccess:"\u0627\u0631\u0633\u0627\u0644 \u0641\u0627\u06cc\u0644"})}),(0,c.jsx)("div",{style:{width:"100%",textAlign:"right"},children:"\u0641\u0627\u06cc\u0644"})]}),(0,c.jsxs)(n.A,{onClick:()=>{m(),g(),y()},children:[(0,c.jsx)(l.A,{"aria-haspopup":"true",children:(0,c.jsx)(o.A,{style:p.btn,titleAccess:"\u0627\u0631\u0633\u0627\u0644 \u0641\u0627\u06cc\u0644 \u0635\u0648\u062a\u06cc"})}),(0,c.jsx)("div",{style:{width:"100%",textAlign:"right"},children:"\u067e\u06cc\u0627\u0645 \u0635\u0648\u062a\u06cc"})]})]})]})}const p={btn:{fontSize:25,color:"#7144B7"}};var m=t(99534);function u(e){let{shot:s,medicalDocuments:t,medicalInstructions:h,handleOpenFileUploadDialog:p,handleOpenVoiceRecorderDialog:u,handleOpenVideoeRecorderDialog:x,handleOpenCompressedImageDialog:A,setAttachType:j}=e;const[f,y]=(0,i.useState)(null),v=()=>{y(null)};return(0,c.jsxs)("div",{children:[(0,c.jsx)("div",{className:"send-files",onClick:e=>{y(e.currentTarget)},style:{justifyContent:"center"},children:(0,c.jsx)("span",{children:"\u0627\u0631\u0633\u0627\u0644 \u0646\u0633\u062e\u0647"})}),(0,c.jsxs)(a.A,{id:"simple-menu",anchorEl:f,keepMounted:!0,open:Boolean(f),onClose:v,children:[(0,c.jsxs)(n.A,{style:{padding:"8px 0px 8px 32px"},onClick:()=>{s(),j(),v()},children:[(0,c.jsx)(l.A,{"aria-haspopup":"true",children:(0,c.jsx)(d.A,{style:g.btn,titleAccess:"\u0627\u0631\u0633\u0627\u0644 \u0641\u0627\u06cc\u0644"})}),(0,c.jsx)("div",{style:{width:"100%",textAlign:"right"},children:"\u0639\u06a9\u0633 \u0628\u0631\u062f\u0627\u0631\u06cc \u0627\u0632 \u062f\u0633\u062a\u0648\u0631\u0627\u062a"})]}),(0,c.jsxs)(n.A,{style:{padding:"8px 0px 8px 32px"},onClick:()=>{p(),j(),v()},children:[(0,c.jsx)(l.A,{"aria-haspopup":"true",children:(0,c.jsx)(r.A,{style:g.btn,titleAccess:"\u0627\u0631\u0633\u0627\u0644 \u0641\u0627\u06cc\u0644"})}),(0,c.jsx)("div",{style:{width:"100%",textAlign:"right"},children:"\u0636\u0645\u06cc\u0645\u0647 \u06a9\u0631\u062f\u0646 \u062f\u0633\u062a\u0648\u0631\u0627\u062a"})]}),(0,c.jsxs)(n.A,{style:{padding:"8px 0px 8px 32px"},onClick:()=>{u(),j(),v()},children:[(0,c.jsx)(l.A,{"aria-haspopup":"true",children:(0,c.jsx)(o.A,{style:g.btn,titleAccess:"\u0627\u0631\u0633\u0627\u0644 \u0641\u0627\u06cc\u0644 \u0635\u0648\u062a\u06cc"})}),(0,c.jsx)("div",{style:{width:"100%",textAlign:"right"},children:"\u0636\u0628\u0637 \u0641\u0627\u06cc\u0644 \u0635\u0648\u062a\u06cc \u062f\u0633\u062a\u0648\u0631\u0627\u062a"})]}),(0,c.jsxs)(n.A,{style:{padding:"8px 0px 8px 32px"},onClick:()=>{window.open("https://ep.tamin.ir","_blank")},children:[(0,c.jsx)(l.A,{"aria-haspopup":"true",children:(0,c.jsx)(m.A,{style:g.btn,titleAccess:"\u0646\u0633\u062e\u0647 \u0627\u0644\u06a9\u062a\u0631\u0648\u0646\u06cc\u06a9 \u062a\u0627\u0645\u06cc\u0646 \u0627\u062c\u062a\u0645\u0627\u0639\u06cc"})}),(0,c.jsx)("div",{style:{width:"100%",textAlign:"right",paddingLeft:0},children:"\u0646\u0633\u062e\u0647 \u0627\u0644\u06a9\u062a\u0631\u0648\u0646\u06cc\u06a9 \u062a\u0627\u0645\u06cc\u0646 \u0627\u062c\u062a\u0645\u0627\u0639\u06cc"})]}),(0,c.jsxs)(n.A,{style:{padding:"8px 0px 8px 32px"},onClick:()=>{window.open("https://eservices.ihio.gov.ir/ihioerx/","_blank")},children:[(0,c.jsx)(l.A,{children:(0,c.jsx)(m.A,{style:g.btn,titleAccess:"\u0646\u0633\u062e\u0647 \u0627\u0644\u06a9\u062a\u0631\u0648\u0646\u06cc\u06a9 \u0628\u06cc\u0645\u0647 \u0633\u0644\u0627\u0645\u062a"})}),(0,c.jsx)("div",{style:{width:"100%",textAlign:"right"},children:"\u0646\u0633\u062e\u0647 \u0627\u0644\u06a9\u062a\u0631\u0648\u0646\u06cc\u06a9 \u0628\u06cc\u0645\u0647 \u0633\u0644\u0627\u0645\u062a"})]})]})]})}const g={btn:{fontSize:25,color:"#7144B7"},btnColor:{backgroundColor:"#7144B7",color:"white"}};var x=t(47784),A=t.n(x),j=t(20880),f=(t(76428),t(41686));const y=e=>{let{dataUri:s,isFullscreen:t}=e,i=t?"demo-image-preview-fullscreen":"";return(0,c.jsx)("div",{className:"demo-image-preview "+i,children:(0,c.jsx)("img",{src:s})})};
1var v=t(14329),b=t(35801),C=t(52907),I=t(43867),k=t(50419),_=t(58425),S=t(58256),N=t(30802);function w(e){let{handleTextChange:s,handleSend:t,text:a,handleOpenFileUploadDialog:n,handleOpenFileUploadDialogDR:l,handleOpenVoiceRecorderDialog:r,handleOpenVideoeRecorderDialog:o,handleOpenCompressedImageDialog:d,medicalDocuments:p,medicalInstructions:m,showReplyDiv:g,cancelRepleing:w,AudienceID:R,VisitToken:D,addMessageToList:T,attachType:U,setAttachTypeprescription:V,setAttachTypeDefault:B,selectedToReply:F}=e;const[L,E]=(0,i.useState)(null),[P,z]=(0,i.useState)(!1),[O,J]=(0,i.useState)(""),[G,W]=(0,i.useState)(!1),[X,Y]=(0,i.useState)("FACING_MODES.ENVIRONMENT"),[Q,H]=(0,i.useState)(!1);(0,i.useEffect)((()=>{j.e5("get_start","","true").then((function(e){e&&(E(e.user_login),document.cookie=`token=${e.user_login.api_token}; domain=.${f.A.cookie.domain}; path=/;`)}))}),[]),(0,i.useEffect)((()=>()=>{P||J("")}),[P]);const Z=!1;return console.log(F,"selectedToReply.message"),(0,c.jsxs)(c.Fragment,{children:[g?(0,c.jsxs)("div",{className:"chat_reply_container",children:[(0,c.jsx)("div",{style:{fontSize:11},children:"\u067e\u0627\u0633\u062e \u0628\u0647:"}),(0,c.jsxs)("div",{className:"reply_container",children:[(0,c.jsxs)("div",{className:"reply",children:[F.file&&(0,c.jsx)("div",{className:"reply_img",children:(0,c.jsx)("img",{style:{height:"100%",resize:"contain"},src:F.file})}),(0,c.jsx)("div",{className:"reply_msg",children:F.message})]}),(0,c.jsx)("div",{className:"cancel_btn_container",onClick:w,children:(0,c.jsx)(S.A,{})})]})]}):null,(0,c.jsxs)("div",{style:{width:"100%",display:"flex",alignItems:"flex-end"},children:[L&&"doctor"==L.approve?(0,c.jsxs)("ul",{style:M.ul,children:[(0,c.jsx)("li",{className:"step6-dr",style:M.li,children:(0,c.jsx)(u,{shot:()=>z(!0),handleOpenFileUploadDialog:l,handleOpenVoiceRecorderDialog:r,handleOpenVideoeRecorderDialog:o,setAttachType:()=>{V()}})}),(0,c.jsx)("li",{className:"step7-dr",style:M.li,children:(0,c.jsx)(h,{userLogin:L,shot:()=>z(!0),handleOpenFileUploadDialog:n,handleOpenVoiceRecorderDialog:r,handleOpenVideoeRecorderDialog:o,setAttachTypeDefault:()=>{B()}})})]}):(0,c.jsx)(c.Fragment,{children:(0,c.jsx)("div",{className:"step5-user",children:(0,c.jsx)(h,{userLogin:L,shot:()=>z(!0),medicalInstructions:m,medicalDocuments:p,handleOpenFileUploadDialog:n,handleOpenVoiceRecorderDialog:r,handleOpenVideoeRecorderDialog:o,AudienceID:R,VisitToken:D,setAttachTypeDefault:()=>{B()}})})}),(0,c.jsxs)("div",{className:"message_input_container",children:[(0,c.jsx)(N.A,{"aria-label":"empty textarea",maxRows:2,type:"text",value:a,placeholder:"\u067e\u06cc\u0627\u0645 \u062e\u0648\u062f \u0631\u0627 \u062a\u0627\u06cc\u067e \u06a9\u0646\u06cc\u062f...",onChange:s,className:"message_input"}),(0,c.jsx)("button",{onClick:t,className:"message_send_btn_container",children:"\u0627\u0631\u0633\u0627\u0644"})]})]}),G&&(0,c.jsx)("div",{children:(0,c.jsxs)(b.A,{open:!0,"aria-labelledby":"form-dialog-title",children:[(0,c.jsx)(I.A,{children:(0,c.jsx)(k.A,{className:"dialog_text",children:"\u0645\u0646\u0627\u0633\u0628 \u0627\u0633\u062a\u061f"})}),0==Q?(0,c.jsxs)(C.A,{children:[(0,c.jsx)("button",{className:"button",onClick:()=>{J(""),W(!1)},children:"\u062f\u0648\u0628\u0627\u0631\u0647"}),(0,c.jsx)("button",{onClick:function(){H(!0);var e=function(e,s){for(var t=e.split(","),i=t[0].match(/:(.*?);/)[1],a=atob(t[1]),n=a.length,l=new Uint8Array(n);n--;)l[n]=a.charCodeAt(n);return new File([l],s,{type:i})}(O,`${Math.random(10)}.jpg`);let s=new FormData;s.append("message",""),s.append("audience",R),s.append("room_token",D),s.append("length",1),"prescription"==U?s.append("type","prescriptionPhoto"):s.append("type","dossierPhoto"),s.append("file0",e),j.ce("send2",s,"true").then((function(e){e&&(B(),W(!1),z(!1),T(e.data[0]),H(!1)),H(!1)})).catch((function(e){H(!1)}))},color:"primary",className:"button",children:"\u0627\u0631\u0633\u0627\u0644"}),(0,c.jsx)("button",{onClick:()=>{J(""),W(!1),z(!1),B()},className:"button error",children:"\u0627\u0646\u0635\u0631\u0627\u0641"})]}):(0,c.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center",alignItems:"center"},children:(0,c.jsx)(_.A,{})})]})}),(0,c.jsx)(v.A,{open:P,onClose:()=>z(!1),"aria-labelledby":"simple-modal-title","aria-describedby":"simple-modal-description",children:O?(0,c.jsx)(y,{dataUri:O,isFullscreen:Z}):(0,c.jsx)(A(),{onTakePhotoAnimationDone:function(e){J(e),setTimeout((()=>{W(!0)}),2e3)},onCameraError:()=>{alert("\u062f\u0633\u062a\u06af\u0627\u0647 \u062f\u0627\u0631\u0627\u06cc \u062f\u0648\u0631\u0628\u06cc\u0646 \u0646\u0645\u06cc \u0628\u0627\u0634\u062f \u06cc\u0627 \u0628\u0627 \u0627\u0634\u06a9\u0627\u0644 \u0645\u0648\u0627\u062c\u0647 \u0627\u0633\u062a"),J(""),W(!1),z(!1),B()},isFullscreen:Z,idealFacingMode:x.FACING_MODES.ENVIRONMENT,isImageMirror:!1})})]})}const M={wrap:{paddingButton:0,position:"absolute",zIndex:1,width:"70%",bottom:"2px",height:"auto",right:5,border:"1px solid red"},box:{height:"auto",borderRadius:"13px 2px 13px 13px",backgroundColor:"rgb(255 226 164)",padding:10,
1color:"#0007",boxShadow:"0 3px 7px -3px rgb(175 149 93)",fontSize:".8em"},replyText:{paddingRight:50,marginTop:10,backgroundColor:"lightgreen",display:"none"},ul:{listStyleType:"none",margin:0,padding:0},li:{float:"right",textAlign:"center",fontSize:12}}},11763:(e,s,t)=>{t.d(s,{A:()=>n});t(65043);var i=t(45419),a=t(70579);const n=function(e){return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(i.Ay,{steps:e.steps,isOpen:e.isTourOpen,onRequestClose:e.passsedGuid,rounded:17,showCloseButton:!0,disableInteraction:!0,nextButton:(0,a.jsx)("div",{className:"tutorial-next-button",children:"\u0628\u0639\u062f\u06cc"}),prevButton:(0,a.jsx)("div",{className:"tutorial-prev-button",children:"\u0642\u0628\u0644\u06cc"}),lastStepNextButton:(0,a.jsx)("div",{className:"tutorial-last-button",onClick:e.passsedGuid,children:"\u0645\u062a\u0648\u062c\u0647 \u0634\u062f\u0645"}),showButtons:!0,showNavigation:!1,showNumber:!1,maskSpace:5})})}},15017:(e,s,t)=>{t.d(s,{A:()=>h});var i=t(65043),a=t(35801),n=t(43867);const l=t.p+"static/media/microphone.5a35915b14f4c9128636.png",r=t.p+"static/media/access_microphone.b010884ebc8b2417afce.png";var o=t(52907),d=t(70579);class c extends i.Component{render(){const{RoomLink:e,acceptNextCall:s,onClick:t}=this.props;return(0,d.jsx)("div",{children:(0,d.jsxs)(a.A,{open:!0,onClose:t,"aria-labelledby":"form-dialog-title",children:[(0,d.jsx)(n.A,{className:"dialog-text text-center",children:(0,d.jsxs)("div",{className:"sk_help",children:[(0,d.jsx)("h3",{children:"\u0622\u0645\u0648\u0632\u0634 \u0627\u0631\u062a\u0628\u0627\u0637 \u062a\u0635\u0648\u06cc\u0631\u06cc"}),(0,d.jsxs)("ol",{children:[(0,d.jsx)("li",{children:"\u0644\u0637\u0641\u0627 \u0628\u0639\u062f \u0627\u0632 \u0628\u0631\u0642\u0631\u0627\u0631\u06cc \u062a\u0645\u0627\u06cc \u062a\u0635\u0648\u06cc\u0631\u06cc \u0628\u0631 \u0631\u0648\u06cc \u062f\u06a9\u0645\u0647 \u0648\u0631\u0648\u062f \u0628\u0632\u0646\u06cc\u062f."}),(0,d.jsxs)("li",{children:[(0,d.jsx)("p",{children:"\u0644\u0637\u0641\u0627 \u0628\u0631\u0627\u06cc \u0641\u0639\u0627\u0644\u0633\u0627\u0632\u06cc \u0645\u06cc\u06a9\u0631\u0648\u0641\u0648\u0646\u060c \u062f\u06a9\u0645\u0647 \u0641\u0639\u0627\u0644\u0633\u0627\u0632\u06cc \u0631\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u06cc\u062f."}),(0,d.jsx)("img",{src:l,alt:"record audio"}),(0,d.jsx)("p",{children:"\u0648 \u0628\u0639\u062f \u0627\u0632 \u0622\u0646 Allow \u0631\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u06cc\u062f."}),(0,d.jsx)("img",{src:r,alt:"record audio"})]}),(0,d.jsx)("li",{children:"\u062f\u0631 \u0627\u06cc\u0646 \u0632\u0645\u0627\u0646 \u062f\u0631 \u0635\u0648\u0631\u062a\u06cc \u06a9\u0647 \u0628\u06cc\u0645\u0627\u0631 \u0648 \u067e\u0632\u0634\u06a9 \u062f\u0631 \u0627\u062a\u0627\u0642 \u0628\u0627\u0634\u0646\u062f \u0627\u0645\u06a9\u0627\u0646 \u0635\u062d\u0628\u062a \u0628\u0647 \u0635\u0648\u0631\u062a \u0635\u0648\u062a\u06cc \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f."}),(0,d.jsxs)("li",{children:[(0,d.jsx)("p",{children:"\u0628\u0631\u0627\u06cc \u0645\u0634\u0627\u0647\u062f\u0647 \u062a\u0635\u0648\u06cc\u0631 \u06af\u0632\u06cc\u0646\u0647 \u062f\u0648\u0631\u0628\u06cc\u0646 \u0631\u0627 \u0641\u0639\u0627\u0644 \u06a9\u0646\u06cc\u062f."}),(0,d.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASQAAABmCAYAAABiHuw/AAAMXWlDQ1BJQ0MgUHJvZmlsZQAASImVVwdYU8kWnltSIbQAAlJCb6JIDSAlhBapUgVRCUkgoYSYEFTs6KKCaxcRsKGrIoquBZC1InYXxd4XCyqKLhZsqLwJCejqK9873zd3/pw585+SmXtnANBs50okOagWALnifGlsaCBjbHIKg/QI4AAFFOAFLLg8mYQVExMBoAz0/5R31wCi6C87Kbh+Hv+vosMXyHgAIKkQp/NlvFyIjwKAF/Ek0nwAiEFQbzk5X6LAQoh1pTBAiKcrcKYSL1XgdCXe3G8TH8uGuBEAsjqXK80EQKMF6hkFvEzIo/EIYmcxXyQGQFMXYj+ekMuHOB7iYbm5eQo8G2I7aC+BeBvEzPTvODP/wZ8+yM/lZg5iZV79Qg4SySQ53Kn/Z2n+t+TmyAd82MCmLpSGxSryhzW8kZ0XrsDqEHeJ06OiFbWG+IOIr6w7AChVKA9LUNqjxjwZG9YP6EPszOcGhUNsDHGIOCcqQqVPzxCFcCCGqwWdIsrnxKvmLhDIguNUnFXSvNjoAZwhZbNUc+u40n6/CvsWeXYCS8V/QyjgDPC/LRTGJ0FMBQCjFogSoyDWgFhXlh0XrrTBLAqF7KgBG6k8VhG/FcRMgTg0UMmPpWZIQ2JV9pJc2UC+WLFQxIlS4fJ8YXyYsj7Ydh63P34DiOsFYlbCAI9ANjZiIBe+IChYmTvWKhAnqPLF7knyA2NVc7slOTEqe5wsyAlV6C0gNpIVxKnm4qP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4EQQQGBggTR2/2uu9a9/Psjl+eOey2ErzEkTSCmHmkBKCZexWV7dM152YZoTSCmHOq8TgzuklANOs74IEEgpmQmklHAZm+XVPeNlF6Y5gZRyqPM6MbhDSjngNOuLAIGUkplASgmXsVle3TNedmGaDyyQCiPMhSKAgFqAQFJTUYgAAtYCBJK1MP0jgIBagEBSU1GIAALWAgSStTD9I4CAWoBAUlNRiAAC1gIEkrUw/SOAgFqAQFJTUYgAAtYCBJK1MP0jgIBagEBSU1GIAALWAgSStTD9I4CAWoBAUlNRiAAC1gIEkrUw/SOAgFqAQFJTUYgAAtYCBJK1MP0jgIBagEBSU1GIAALWAgSStTD9I4CAWoBAUlNRiAAC1gIEkrUw/SOAgFqAQFJTUYgAAtYCBJK1MP0jgIBagEBSU1GIAALWAgSStTD9I4CAWoBAUlNRiAAC1gIEkrUw/SOAgFqAQFJTUYgAAtYCBJK1MP0jgIBagEBSU1GIAALWAv8AY2xRUeCZtJkAAAAASUVORK5CYII=",alt:"allow camera"}),(0,d.jsx)("p",{children:"\u0648 \u0628\u0639\u062f \u0627\u0632 \u0622\u0646 Allow \u0631\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u06cc\u062f."}),(0,d.jsx)("img",{src:r,alt:"allow mic"})]}),(0,d.jsx)("li",{children:"\u0644\u0637\u0641\u0627 \u0628\u0639\u062f \u0627\u0632 \u067e\u0627\u06cc\u0627\u0646 \u0648\u06cc\u0632\u06cc\u062a \u067e\u0646\u062c\u0631\u0647 \u0645\u0631\u0648\u0631\u06af\u0631 \u062e\u0648\u062f \u0631\u0627 \u0628\u0628\u0646\u062f\u06cc\u062f \u06cc\u0627 \u0628\u0647 \u0645\u0631\u062d\u0644\u0647 \u0642\u0628\u0644 \u0628\u0627\u0632\u06af\u0631\u062f\u06cc\u062f."})]})]})}),(0,d.jsx)(o.A,{children:(0,d.jsx)("button",{color:"primary",onClick:t,className:"button button_sk",children:"\u06cc\u0627\u062f \u06af\u0631\u0641\u062a\u0645"})})]})})}}const h=c},88528:(e,s,t)=>{t.d(s,{A:()=>x});var i=t(65043),a=t(20880),n=t(58425),l=t(11906),r=t(82703),o=t(85865),d=t(17392),c=t(81223),h=t(39244),p=t(18764),m=t(63471),u=t(70579);class g extends i.Component{constructor(e){super(e),this.state={text:"",file:"",fileList:[],loading:!1,disabled:!1},this.handleChange=this.handleChange.bind(this),this.handleSubmit=this.handleSubmit.bind(this)}handleChange(e){switch(e.target.name){case"text":this.setState({text:e.target.value});break;case"file":const s=Array.from(e.target.files);this.state.fileList.length<5?this.setState({file:e.target.value,fileList:[...s,...this.state.fileList]}):p.zV("\u062f\u0631 \u0645\u0631\u062d\u0644\u0647 \u062d\u062f\u0627\u06a9\u062b\u0631 \u06f5 \u0641\u0627\u06cc\u0644 \u0642\u0627\u0628\u0644 \u0627\u0631\u0633\u0627\u0644 \u0645\u06cc \u0628\u0627\u0634\u062f.")}}handleSubmit(e){e.preventDefault();var s=this;s.setState({loading:!0});const{AudienceID:t,VisitToken:i,AddFile:n}=this.props;var l=new FormData;l.append("message",this.state.text),l.append("audience",t),l.append("room_token",i),l.append("length",this.state.fileList.length),l.append("type","dossierFile");for(let a=0;a<this.state.fileList.length;a++)console.log("num",a),l.append(`file${a}`,this.state.fileList[a]);a.ce("FileSend",l,"true").then((function(e){e?(console.log("taha 2",e),n(e.data)):s.setState({loading:!1})}
1)).catch((e=>{console.log(e,"error"),s.setState({loading:!1})}))}handleClickDelete(e){const s=this.state.fileList.filter((s=>s.name!==e.name));this.setState({fileList:s})}render(){return(0,u.jsx)("div",{className:"attach_new_file",children:(0,u.jsx)("div",{className:"fs_split_pane large_bottom_margin",children:(0,u.jsx)("form",{className:"form-horizontal",onSubmit:this.handleSubmit,children:this.state.loading?(0,u.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,u.jsx)(n.A,{})}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:"box_input",children:(0,u.jsx)("textarea",{style:{backgroundColor:"#eee",height:"10rem"},name:"text",className:"form-control",placeholder:"\u062a\u0648\u0636\u06cc\u062d\u0627\u062a \u06a9\u0627\u0645\u0644",value:this.state.text,onChange:this.handleChange})}),(0,u.jsxs)("div",{className:"box_input",style:{display:"flex",flexDirection:"column",gap:"0.5rem",justifyContent:"center",alignItems:"center"},children:[(0,u.jsxs)("label",{style:{display:"flex",justifyContent:"center",textAlign:"center",marginX:"auto"},children:[(0,u.jsx)("input",{style:{display:"none"},multiple:!0,id:"file",name:"file",className:"form-control",type:"file",disabled:this.state.disabled,onChange:this.handleChange,required:!0,accept:"image/jpg, image/jpeg, image/png, application/pdf"}),(0,u.jsxs)(l.A,{id:"file",component:"span",disabled:this.state.disabled,sx:{backgroundColor:"#eee !important",padding:"2rem !important",height:"10rem",width:"10rem",borderRadius:"10px !important",display:"flex",flexDirection:"column",gap:"0.5rem",fontSize:"1.5rem !important",color:"#7747c0 !important"},children:[(0,u.jsx)(c.A,{sx:{color:"#7747c0",fontSize:"2rem !important"}}),"\u0622\u067e\u0644\u0648\u062f \u0641\u0627\u06cc\u0644"]})]}),(0,u.jsxs)("p",{className:"help_text",style:{marginBottom:"0",display:"flex",flexDirection:"column",justifyContent:"center",textAlign:"center"},children:["\u0641\u0627\u06cc\u0644 \u0647\u0627\u06cc \u0642\u0627\u0628\u0644 \u0642\u0628\u0648\u0644:png , jpeg , jpg ,pdf",(0,u.jsx)("span",{sx:{color:"#de0036 !important"},children:"\u062f\u0631 \u0647\u0631 \u0645\u0631\u062d\u0644\u0647 \u062d\u062f\u0627\u06a9\u062b\u0631 \u06f5 \u0641\u0627\u06cc\u0644 \u0642\u0627\u0628\u0644 \u0627\u0631\u0633\u0627\u0644 \u0645\u06cc \u0628\u0627\u0634\u062f"})]}),this.state.fileList.map((e=>(0,u.jsx)(r.A,{sx:{background:"#eee",display:"flex",borderRadius:"10px",width:"100%",paddingY:"1rem",justifyContent:"space-between !important"},children:(0,u.jsxs)(r.A,{sx:{display:"flex",alignItems:"center",color:"#7747c0",width:"80%",marginX:"auto",gap:"1rem",justifyContent:"space-between"},children:[(0,u.jsxs)(r.A,{sx:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[(0,u.jsx)(h.A,{sx:{marginTop:"0.25rem"}}),(0,u.jsxs)(o.A,{children:[e.name.slice(0,10),"... .",e.name.split(".")[1]]})]}),(0,u.jsx)(d.A,{onClick:()=>this.handleClickDelete(e),children:(0,u.jsx)(m.A,{sx:{color:"#7747c0"}})})]})},e.name)))]}),(0,u.jsx)("div",{className:"box_conferm",style:{display:"flex",justifyContent:"center",textAlign:"center",marginX:"auto"},children:(0,u.jsx)("button",{id:"Submit\u0651Item",className:"button",type:"submit",children:"\u062a\u0627\u06cc\u06cc\u062f \u0648 \u0627\u0631\u0633\u0627\u0644"})})]})})})})}}const x=g},70525:(e,s,t)=>{t.d(s,{A:()=>p});t(65043);var i=t(84753),a=t(75359),n=t(32891),l=t(98791),r=t(77252),o=t(75757),d=t(53536),c=t.n(d),h=t(70579);const p=e=>{let{Files:s,AddDeleteAttach:t,UserId:d}=e;return(0,h.jsxs)("div",{className:"list_attach_fils",children:[c().map(s,(e=>(0,h.jsxs)("div",{className:parseInt(d)===parseInt(e.user_id)?"item_attach me":"item_attach",children:[(0,h.jsxs)("div",{className:"header_attach",children:[(0,h.jsx)("span",{children:parseInt(d)===parseInt(e.user_id)?"\u062b\u0628\u062a \u0634\u062f\u0647 \u062a\u0648\u0633\u0637 \u0634\u0645\u0627":"\u062b\u0628\u062a \u0634\u062f\u0647 \u062a\u0648\u0633\u0637 \u0628\u06cc\u0645\u0627\u0631"})," ",(0,h.jsx)("time",{children:e.jalali_created_at})]}),(0,h.jsx)("div",{className:"main_attach",children:(0,h.jsx)("p",{children:e.message})}),(0,h.jsx)(i.Ay,{dense:!1,children:(0,h.jsxs)(a.Ay,{className:"item_at_file",children:[e.file?(0,h.jsx)(o.A,{preload:"none",src:e.file,showSkipControl
1s:!1,showJumpControls:!1,customVolumeControls:[],customAdditionalControls:[],style:{width:"70%"}}):null,parseInt(d)===parseInt(e.user_id)?(0,h.jsx)(n.Ay,{className:"delete_at_file",onClick:s=>t(e.key),children:(0,h.jsx)(l.Ay,{"aria-label":"Delete",children:(0,h.jsx)(r.A,{})})}):null]})})]}))),(0,h.jsx)("div",{className:"alert alert-info",children:"\u062f\u0631 \u0635\u0648\u0631\u062a\u06cc\u06a9\u0647 \u06a9\u0647 \u0646\u06cc\u0627\u0632 \u0628\u0647 \u062b\u0628\u062a \u0645\u0633\u062a\u0646\u062f\u0627\u062a \u062c\u062f\u06cc\u062f \u062f\u0627\u0631\u06cc\u062f \u0628\u0631 \u0631\u0648\u06cc + \u0628\u0632\u0646\u06cc\u062f . \u062f\u0631 \u063a\u06cc\u0631 \u0627\u06cc\u0646\u0635\u0648\u0631\u062a \u067e\u0646\u062c\u0631\u0647 \u0631\u0627 \u0628\u0628\u0646\u062f\u06cc\u062f."}),(0,h.jsx)("div",{id:"list_attach_fils"})]})}},56483:(e,s,t)=>{t.d(s,{A:()=>p});t(65043);var i=t(84753),a=t(75359),n=t(32891),l=t(98791),r=t(77252),o=t(81073),d=t(53536),c=t.n(d),h=t(70579);const p=e=>{let{Files:s,AddDeleteAttach:t,UserId:d}=e;return(0,h.jsxs)("div",{className:"list_attach_fils",children:[c().map(s,(e=>(0,h.jsxs)("div",{className:parseInt(d)===parseInt(e.user_id)?"item_attach me":"item_attach",children:[(0,h.jsxs)("div",{className:"header_attach",children:[(0,h.jsx)("span",{children:parseInt(d)===parseInt(e.user_id)?"\u062b\u0628\u062a \u0634\u062f\u0647 \u062a\u0648\u0633\u0637 \u0634\u0645\u0627":"\u062b\u0628\u062a \u0634\u062f\u0647 \u062a\u0648\u0633\u0637 \u0628\u06cc\u0645\u0627\u0631"})," ",(0,h.jsx)("time",{children:e.jalali_created_at})]}),(0,h.jsx)("div",{className:"main_attach",children:(0,h.jsx)("p",{children:e.message})}),(0,h.jsx)(i.Ay,{dense:!1,children:(0,h.jsxs)(a.Ay,{className:"item_at_file",children:[e.file?(0,h.jsx)("a",{href:e.file,target:"_blank",rel:"noopener noreferrer",children:(0,h.jsx)(o.A,{height:220,offsetVertical:220,children:(0,h.jsx)("img",{style:{width:200,height:200,borderRadius:8},src:e.file,alt:"preview-file"})})}):null,parseInt(d)===parseInt(e.user_id)?(0,h.jsx)(n.Ay,{className:"delete_at_file",onClick:s=>t(e.key),children:(0,h.jsx)(l.Ay,{"aria-label":"Delete",children:(0,h.jsx)(r.A,{})})}):null]})})]}))),(0,h.jsx)("div",{className:"alert alert-info",children:"\u062f\u0631 \u0635\u0648\u0631\u062a\u06cc\u06a9\u0647 \u06a9\u0647 \u0646\u06cc\u0627\u0632 \u0628\u0647 \u062b\u0628\u062a \u0645\u0633\u062a\u0646\u062f\u0627\u062a \u062c\u062f\u06cc\u062f \u062f\u0627\u0631\u06cc\u062f \u0628\u0631 \u0631\u0648\u06cc + \u0628\u0632\u0646\u06cc\u062f . \u062f\u0631 \u063a\u06cc\u0631 \u0627\u06cc\u0646\u0635\u0648\u0631\u062a \u067e\u0646\u062c\u0631\u0647 \u0631\u0627 \u0628\u0628\u0646\u062f\u06cc\u062f."}),(0,h.jsx)("div",{id:"list_attach_fils"})]})}},34305:(e,s,t)=>{t.d(s,{A:()=>p});t(65043);var i=t(84753),a=t(75359),n=t(32891),l=t(98791),r=t(77252),o=t(1043),d=t(53536),c=t.n(d),h=t(70579);const p=e=>{let{Files:s,AddDeleteAttach:t,UserId:d}=e;return(0,h.jsxs)("div",{className:"list_attach_fils",children:[c().map(s,(e=>(0,h.jsxs)("div",{className:parseInt(d)===parseInt(e.user_id)?"item_attach me":"item_attach",children:[(0,h.jsxs)("div",{className:"header_attach",children:[(0,h.jsx)("span",{children:parseInt(d)===parseInt(e.user_id)?"\u062b\u0628\u062a \u0634\u062f\u0647 \u062a\u0648\u0633\u0637 \u0634\u0645\u0627":"\u062b\u0628\u062a \u0634\u062f\u0647 \u062a\u0648\u0633\u0637 \u0628\u06cc\u0645\u0627\u0631"})," ",(0,h.jsx)("time",{children:e.jalali_created_at})]}),(0,h.jsx)("div",{className:"main_attach",children:(0,h.jsx)("p",{children:e.message})}),(0,h.jsx)(i.Ay,{dense:!1,children:(0,h.jsxs)(a.Ay,{className:"item_at_file",children:[e.file?(0,h.jsx)(o.A,{controls:!0,url:e.file,width:"50%",height:"50%"}):null,parseInt(d)===parseInt(e.user_id)?(0,h.jsx)(n.Ay,{className:"delete_at_file",onClick:s=>t(e.key),children:(0,h.jsx)(l.Ay,{"aria-label":"Delete",children:(0,h.jsx)(r.A,{})})}):null]})})]}))),(0,h.jsx)("div",{className:"alert alert-info",children:"\u062f\u0631 \u0635\u0648\u0631\u062a\u06cc\u06a9\u0647 \u06a9\u0647 \u0646\u06cc\u0627\u0632 \u0628\u0647 \u062b\u0628\u062a \u0645\u0633\u062a\u0646\u062f\u0627\u062a \u062c\u062f\u06cc\u062f \u062f\u0627\u0631\u06cc\u062f \u0628\u0631 \u0631\u0648\u06cc + \u0628\u0632\u0646\u06cc\u062f . \u062f\u0631 \u063a\u06cc\u0631 \u0627\u06cc\u0646\u0635\u0648\u0631\u062a \u067e\u0646\u062c\u0631\u0647 \u0631\u0627 \u0628\u0628\u0646\u062f\u06cc\u062f."}),(0,h.jsx)("div",{id:"list_attach_fils"})]})}},10163:(e,s,t)=>{t.d(s,{A:()=>x});var i=t(65043),a=t(20880),n=t(58425),l=t(11906),r=t(82703),o=t(85865),d=t(17392),c=t(81223),h=t(39244),p=t(18764),m=t
1(63471),u=t(70579);class g extends i.Component{constructor(e){super(e),this.state={text:"",file:"",fileList:[],loading:!1,disabled:!1},this.handleChange=this.handleChange.bind(this),this.handleSubmit=this.handleSubmit.bind(this)}handleChange(e){switch(e.target.name){case"text":this.setState({text:e.target.value});break;case"file":const s=Array.from(e.target.files);this.state.fileList.length<5?this.setState({file:e.target.value,fileList:[...s,...this.state.fileList]}):p.zV("\u062f\u0631 \u0645\u0631\u062d\u0644\u0647 \u062d\u062f\u0627\u06a9\u062b\u0631 \u06f5 \u0641\u0627\u06cc\u0644 \u0642\u0627\u0628\u0644 \u0627\u0631\u0633\u0627\u0644 \u0645\u06cc \u0628\u0627\u0634\u062f.")}}handleSubmit(e){e.preventDefault();var s=this;s.setState({loading:!0});const{AudienceID:t,VisitToken:i,AddFile:n}=this.props;var l=new FormData;l.append("message",this.state.text),l.append("audience",t),l.append("room_token",i),l.append("length",this.state.fileList.length),l.append("type","dossierFile");for(let a=0;a<this.state.fileList.length;a++)this.state.file?l.append(`file${a}`,this.state.fileList[a]):l.append("file","");a.ce("FileSend",l,"true").then((function(e){e?(n(e.data),s.setState({text:"",loading:!1})):s.setState({loading:!1})})).catch((e=>{console.log(e,"error"),s.setState({loading:!1})}))}handleClickDelete(e){const s=this.state.fileList.filter((s=>s.name!==e.name));this.setState({fileList:s})}render(){return(0,u.jsx)("div",{className:"attach_new_file",children:(0,u.jsx)("div",{className:"fs_split_pane large_bottom_margin",children:(0,u.jsx)("form",{className:"form-horizontal",onSubmit:this.handleSubmit,children:this.state.loading?(0,u.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,u.jsx)(n.A,{})}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:"box_input",children:(0,u.jsx)("textarea",{style:{backgroundColor:"#eee",height:"10rem"},name:"text",className:"form-control",placeholder:"\u062a\u0648\u0636\u06cc\u062d\u0627\u062a \u06a9\u0627\u0645\u0644",value:this.state.text,onChange:this.handleChange})}),(0,u.jsxs)("div",{className:"box_input",style:{display:"flex",flexDirection:"column",gap:"0.5rem",justifyContent:"center",alignItems:"center"},children:[(0,u.jsxs)("label",{style:{display:"flex",justifyContent:"center",textAlign:"center",marginX:"auto"},children:[(0,u.jsx)("input",{style:{display:"none"},multiple:!0,id:"file",name:"file",className:"form-control",type:"file",disabled:this.state.disabled,onChange:this.handleChange,required:!0,accept:"image/jpg, image/jpeg, image/png, application/pdf"}),(0,u.jsxs)(l.A,{id:"file",component:"span",disabled:this.state.disabled,sx:{backgroundColor:"#eee !important",padding:"2rem !important",height:"10rem",width:"10rem",borderRadius:"10px !important",display:"flex",flexDirection:"column",gap:"0.5rem",fontSize:"1.5rem !important",color:"#7747c0 !important"},children:[(0,u.jsx)(c.A,{sx:{color:"#7747c0",fontSize:"2rem !important"}}),"\u0622\u067e\u0644\u0648\u062f \u0641\u0627\u06cc\u0644"]})]}),(0,u.jsxs)("p",{className:"help_text",style:{marginBottom:"0",display:"flex",flexDirection:"column",justifyContent:"center",textAlign:"center"},children:["\u0641\u0627\u06cc\u0644 \u0647\u0627\u06cc \u0642\u0627\u0628\u0644 \u0642\u0628\u0648\u0644:png , jpeg , jpg ,pdf",(0,u.jsx)("span",{sx:{color:"#de0036 !important"},children:"\u062f\u0631 \u0647\u0631 \u0645\u0631\u062d\u0644\u0647 \u062d\u062f\u0627\u06a9\u062b\u0631 \u06f5 \u0641\u0627\u06cc\u0644 \u0642\u0627\u0628\u0644 \u0627\u0631\u0633\u0627\u0644 \u0645\u06cc \u0628\u0627\u0634\u062f"})]}),this.state.fileList.map((e=>(0,u.jsx)(r.A,{sx:{background:"#eee",display:"flex",borderRadius:"10px",width:"100%",paddingY:"1rem",justifyContent:"space-between !important"},children:(0,u.jsxs)(r.A,{sx:{display:"flex",alignItems:"center",color:"#7747c0",width:"80%",marginX:"auto",gap:"1rem",justifyContent:"space-between"},children:[(0,u.jsxs)(r.A,{sx:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[(0,u.jsx)(h.A,{sx:{marginTop:"0.25rem"}}),(0,u.jsxs)(o.A,{children:[e.name.slice(0,10),"... .",e.name.split(".")[1]]})]}),(0,u.jsx)(d.A,{onClick:()=>this.handleClickDelete(e),children:(0,u.jsx)(m.A,{sx:{color:"#7747c0"}})})]})},e.name)))]}),(0,u.jsx)("div",{className:"box_conferm",style:{display:"flex",justifyContent:"center",textAlign:"center",marginX:"auto"},children:(0,u.jsx)("button",{id:"Submit\u0651Item",className:"button",type:"submit",children:"\u062a\u0627\u06cc\u06cc\u062f \u0648 \u0627\u0631\u0633\u0627\u0644"})})]})})})})}}const x=g},53485:(e,s,t)=>{t.d(s,{A:()=>r});t(65043);var i=t(14329),a=t(95611),n=t(57066),l=t(70579);const r=e=>
1(0,l.jsx)(i.A,{open:e.viewModal,onClose:e.onClose,"aria-labelledby":"simple-modal-title","aria-describedby":"simple-modal-description",style:{display:"flex",alignItems:"center",justifyContent:"center",border:"2px solid #000",boxShadow:5,padding:5,borderRadius:4},children:(0,l.jsxs)("div",{style:{backgroundColor:"white",width:400,padding:10,height:200},children:[(0,l.jsx)("h2",{id:"simple-modal-title",children:"\u0627\u0645\u062a\u06cc\u0627\u0632 \u062f\u0647\u06cc"}),(0,l.jsxs)(n.A,{component:"fieldset",mb:3,borderColor:"transparent",children:[(0,l.jsx)("div",{children:e.rateTitle}),(0,l.jsx)("div",{style:{direction:"ltr"},children:(0,l.jsx)(a.A,{size:"large",name:"simple-controlled",value:e.value,onChange:e.onChangeRate})}),(0,l.jsx)("div",{style:{textAlign:"center"},children:e.finishBtn})]})]})})},72041:()=>{},41196:(e,s,t)=>{e.exports=t.p+"static/media/service2.579270b9923931d75cd0.jpg"},33146:(e,s,t)=>{e.exports=t.p+"static/media/service4.890b2ccceb450da0de19.jpg"}}]); 2//# sourceMappingURL=9413.604e0cc7.chunk.js.map
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.