import{C as e,r as t,P as l,Q as a,S as s,V as n,u as o,H as i,U as c,R as r,F as u,a0 as p,J as f,N as d}from"./chunk-BRI0aX6c.js";import{d as m}from"./chunk-D1JGNTfG.js";import{r as x,A as v,i as h,D as k,j as w,S as b,g as y,h as j,b as g}from"./souav-I_ihqEhP.js";import{s as F,c as _}from"./chunk-9PZSJnHb.js";import"./chunk-DwkOxDMO.js";import"./chunk-CMQyd8eO.js";import"./chunk-a7obrEbD.js";import"./chunk-DQhVL27x.js";import"./chunk-cn7T4ICr.js";import"./chunk-Bh3yC0yB.js";import"./chunk-DjdYu-xF.js";import"./chunk-BHPWSuhB.js";/* empty css              */import"./chunk-Bf-nSo-6.js";const C=m("Feedback",()=>({reqFeedback:async function(e,t,l=""){const a=await x(v.feedback,{problemType:e,content:t,videoId:l,phoneModel:window.navigator.userAgent});return h(a.code)}})),A={key:0,class:"fixed z-[100] flex h-full w-full items-center justify-center"},T={class:"flex h-full w-full max-w-[480px] items-center justify-center bg-black/50 px-10"},D={class:"relative w-full"},E=["src"],V={class:"absolute left-[6%] top-[33%] flex w-[88%] flex-wrap gap-x-3 gap-y-2"},z=["onClick"],I={class:"absolute left-[6%] top-[52%] h-[26%] w-[88%] rounded-[10px] border border-black/20 bg-white p-[10px]"},M={class:"absolute left-[6%] top-[80%] flex w-[88%] flex-row items-center"},S={class:"shrink-0 text-[24px] font-normal text-black"},U=["placeholder"],q={class:"absolute -bottom-[4%] flex w-full items-center justify-center"},J=["src"],K=g(e({__name:"FeedbackDialog",setup(e,{expose:m}){const x=t(!1),v=t(""),h=["无法播放","播放卡顿","黑屏","没声音","其他"],g=t(0),K=t(""),N=t("?"),B=()=>{v.value="animate_close",setTimeout(()=>{x.value=!1,v.value="",document.documentElement.style.overflow=""},300)};function H(e=50){return Math.floor(Math.random()*(e+1))}const P=t(0),Q=t(""),R=t(0),G=t("");function L(){const e=H(),t=H(e),l=Math.random()<.5?"+":"-";R.value="+"===l?e+t:e-t,Q.value="".concat(e," ").concat(l," ").concat(t," = "),G.value=""}function O(e){N.value=e?"":"?"}function W(){if(""!==String(G.value).trim())return Number(G.value)!==R.value?(w.emit("showTip",{title:"结果输入错误，请重新输入",content:"",isFail:!0}),L(),void(G.value="")):void async function(){F({duration:0,message:"正在提交",forbidClick:!1,overlay:!0});const e=b.isEmpty(K.value)?"影片ID:".concat(P.value,"无法播放"):K.value;let t=await C().reqFeedback(h[g.value],e,"".concat(P.value));if(_(),t){let e=function(){const e=y.get(j.reportErrorVideos);return e?e.split(","):[]}();if(e.includes(P.value))return;e.push(P.value),y.set(j.reportErrorVideos,e.join(",")),w.emit("showTip",{title:"反馈成功",content:"反馈成功，小编会尽快帮您处理，感谢您的支持～"}),B()}else w.emit("showTip",{title:"反馈失败",content:"网络错误",isFail:!0})}();w.emit("showTip",{title:"请输入结果",content:"",isFail:!0})}return m({show:async e=>{P.value=e,L(),x.value=!0,document.documentElement.style.overflow="hidden",v.value="animate__animated animate__zoomIn"},hide:B}),(e,t)=>x.value?(d(),l("div",A,[s("div",T,[s("div",{class:n([v.value,"relative flex w-full flex-col items-center"])},[s("div",D,[s("img",{src:o(k),class:"pointer-events-none w-full",alt:""},null,8,E),s("div",V,[(d(),l(i,null,c(h,(e,t)=>s("div",{onClick:e=>{return l=t,void(g.value=l);var l},class:n(["flex h-[25px] items-center justify-center rounded-full px-[15px] py-[2px] text-[14px]",g.value===t?"bg-red-600 text-white":"bg-[#AD8F7A] text-white"]),key:t},r(e),11,z)),64))]),s("div",I,[u(s("textarea",{"onUpdate:modelValue":t[0]||(t[0]=e=>K.value=e),placeholder:"请输入您宝贵的意见建议~",rows:4,class:"w-full text-[14px] text-black placeholder-[#999999]"},null,512),[[p,K.value]])]),s("div",M,[s("span",S,r(Q.value),1),u(s("input",{type:"number","onUpdate:modelValue":t[1]||(t[1]=e=>G.value=e),onKeyup:t[2]||(t[2]=f(()=>{},["enter"])),placeholder:N.value,enterkeyhint:"go",onFocus:t[3]||(t[3]=e=>O(!0)),onBlur:t[4]||(t[4]=e=>O(!1)),class:"ml-[5px] h-[30px] min-w-0 flex-1 rounded-full border border-black/20 py-[2px] text-center text-[16px] text-black transition-colors duration-300 focus:border-primary focus:outline-none"},null,40,U),[[p,G.value]]),s("div",{onClick:L,class:"ml-[5px] flex h-[30px] shrink-0 flex-row items-center justify-center space-x-1 rounded-full bg-[#AD8F7A] px-[5px]"},t[5]||(t[5]=[s("i",{class:"iconfont icon-refresh1 text-white",style:{"font-size":"14px"}},null,-1),s("span",{class:"text-[14px] text-white"},"换一个",-1)]))]),s("div",q,[s("img",{onClick:W,src:o("/assets/btn_submit-jCKvaJf2.png"),class:"w-[53.4%]",alt:""},null,8,J)])]),s("i",{class:"iconfont icon-close1 mt-7 flex h-[35px] w-[35px] items-center justify-center rounded-full bg-gray-600 text-white",style:{"font-size":"25px"},onClick:B})],2)])])):a("",!0)}}),[["__scopeId","data-v-7cf40f00"]]);export{K as default};
