1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2979],{14787:(e,t,a)=>{a.d(t,{A:()=>p});var r=a(37876),s=a(14232),l=a(72618),o=a(55892),i=a(52312),n=a(86222),d=a(1726),c=a(42298),u=a(65734),m=a(93732),x=a(15565);function h(e){let{className:t,...a}=e;return(0,r.jsx)("textarea",{"data-slot":"textarea",className:(0,x.cn)("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",t),...a})}function p(e){let{isOpen:t,onClose:a}=e,{user:x}=(0,o.A)(),[p,f]=(0,s.useState)(0),[b,g]=(0,s.useState)(0),[v,j]=(0,s.useState)(""),[y,w]=(0,s.useState)(!1),[N,k]=(0,s.useState)(!1),[C,S]=(0,s.useState)(""),[L,E]=(0,s.useState)(""),[z,F]=(0,s.useState)(""),M=(0,s.useRef)(!1);(0,s.useEffect)(()=>{t&&x&&R()},[t,x]);let R=async()=>{try{if(!(null==x?void 0:x.id))return;let e=await (0,n.getUserDetails)(x.id);E(e.name||e.email),F(e.email)}catch(e){console.error("Failed to fetch user details:",e),E((null==x?void 0:x.name)||(null==x?void 0:x.email)||""),F((null==x?void 0:x.email)||"")}},T=async e=>{if((e.preventDefault(),x&&0!==p&&v.trim())&&!M.current&&!y){M.current=!0,w(!0),S("");try{await i.C.submitReview({userId:x.id,message:v.trim(),rating:p,contactName:L||x.name||x.email||"Anonymous",contactEmail:z||x.email||""}),k(!0),(0,d.jV)(),setTimeout(()=>{A()},2e3)}catch(e){console.error("Failed to submit review:",e),S("Failed to submit review. Please try again.")}finally{M.current=!1,w(!1)}}},A=()=>{(0,d.fT)(),sessionStorage.removeItem("shouldShowReview"),f(0),j(""),k(!1),S(""),a()};return((0,s.useEffect)(()=>{t&&(0,d.xE)()},[t]),x)?(0,r.jsx)(u.lG,{open:t,onOpenChange:e=>{e||A()},children:(0,r.jsxs)(u.Cf,{className:"bottom-4 left-auto right-4 top-auto w-[calc(100vw-2rem)] max-w-md translate-x-0 translate-y-0 overflow-hidden border-gray-200 bg-white p-0 text-gray-900 shadow-2xl md:bottom-8 md:right-8 md:w-96 [&>button]:hidden",children:[(0,r.jsx)(u.L3,{className:"sr-only",children:"Share feedback"}),(0,r.jsx)(u.rr,{className:"sr-only",children:"Rate your experience and send feedback to Neural Sound."}),(0,r.jsxs)("div",{className:"bg-white rounded-2xl shadow-2xl border border-gray-200 overflow-hidden",children:[(0,r.jsx)("div",{className:"bg-gradient-to-r from-purple-600 to-blue-600 p-4 md:p-6 text-white",children:(0,r.jsxs)("div",{className:"flex items-start justify-between",children:[(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h3",{className:"text-lg md:text-xl font-bold mb-1",children:"Help Us Improve! \uD83C\uDF1F"}),(0,r.jsx)("p",{className:"text-sm text-purple-100",children:"Share your feedback to help us become better"})]}),(0,r.jsx)("button",{onClick:A,className:"text-white/80 hover:text-white transition-colors ml-2 flex-shrink-0","aria-label":"Close",children:(0,r.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),(0,r.jsx)("div",{className:"p-4 md:p-6",children:N?(0,r.jsxs)(l.P.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:"text-center py-4",children:[(0,r.jsx)("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-3",children:(0,r.jsx)("svg",{className:"w-8 h-8 text-green-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),(0,r.jsx)("h4",{className:"text-lg font-semibold text-gray-900 mb-1",children:"Thank You!"}),(0,r.jsx)("p",{className:"text-sm text-gray-600",children:"Your feedback has been submitted."})]}):(0,r.jsxs)("form",{onSubmit:T,className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(m.J,{className:"block text-sm font-medium text-gray-700 mb-2",children:"Rate your experience"}),(0,r.jsx)("div",{className:"flex gap-1 justify-center",children:[1,2,3,4,5].map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>f(e),onMouseEnter:()=>g(e),onMouseLeave:()=>g(0),className:"transition-transform hover:scale-110 focus:outline-none",disabled:y,children:(0,r.jsx)("svg",{className:"w-8 h-8 md:w-10 md:h-10 transition-colors ".concat(e<=(b||p)?"text-yellow-400 fill-yellow-400":"text-gray-300"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})})},e))})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(m.J,{htmlFor:"popup-review-message",className:"block text-sm font-medium text-gray-700 mb-2",children:"Your feedback"}
1),(0,r.jsx)(h,{id:"popup-review-message",value:v,onChange:e=>j(e.target.value),placeholder:"Tell us about your experience...",className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent resize-none text-gray-900 placeholder-gray-400 text-sm",rows:3,disabled:y,required:!0})]}),C&&(0,r.jsx)("div",{className:"p-2 bg-red-50 border border-red-200 rounded-lg text-red-600 text-xs",children:C}),(0,r.jsxs)("div",{className:"flex gap-2 pt-2",children:[(0,r.jsx)(c.$,{type:"button",variant:"outline",onClick:A,className:"flex-1 px-4 py-2 border border-gray-300 text-gray-700 rounded-lg font-medium hover:bg-gray-50 transition-colors text-sm",disabled:y,children:"Later"}),(0,r.jsx)(c.$,{type:"submit",disabled:0===p||!v.trim()||y,className:"flex-1 bg-gradient-to-r from-purple-600 to-blue-600 text-white py-2 rounded-lg font-semibold hover:from-purple-700 hover:to-blue-700 transition-all disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2 text-sm",children:y?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("svg",{className:"animate-spin h-4 w-4",fill:"none",viewBox:"0 0 24 24",children:[(0,r.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,r.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Submitting..."]}):"Submit"})]})]})})]})]})}):null}},52312:(e,t,a)=>{a.d(t,{C:()=>s});let r="https://api.theaudiothor.com/",s={async submitReview(e){if(!(await fetch("".concat(r,"/api/stem/public/reviews"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok)throw Error("Failed to submit review")},async getReviews(){let e=await fetch("".concat(r,"/api/stem/public/get-reviews"),{method:"GET",headers:{"Content-Type":"application/json"}});if(!e.ok)throw Error("Failed to fetch reviews");let t=await e.json();return{reviews:Array.isArray(t)?t:[]}}}},59773:(e,t,a)=>{a.d(t,{b:()=>i});var r=a(14232),s=a(66326),l=a(37876),o=r.forwardRef((e,t)=>(0,l.jsx)(s.sG.label,{...e,ref:t,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));o.displayName="Label";var i=o},65734:(e,t,a)=>{a.d(t,{Cf:()=>u,Es:()=>x,L3:()=>h,c7:()=>m,lG:()=>n,rr:()=>p});var r=a(37876);a(14232);var s=a(26303),l=a(15565),o=a(42298),i=a(28249);function n(e){let{...t}=e;return(0,r.jsx)(s.bL,{"data-slot":"dialog",...t})}function d(e){let{...t}=e;return(0,r.jsx)(s.ZL,{"data-slot":"dialog-portal",...t})}function c(e){let{className:t,...a}=e;return(0,r.jsx)(s.hJ,{"data-slot":"dialog-overlay",className:(0,l.cn)("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",t),...a})}function u(e){let{className:t,children:a,showCloseButton:n=!0,showOverlay:u=!0,overlayClassName:m,...x}=e;return(0,r.jsxs)(d,{children:[u&&(0,r.jsx)(c,{className:m}),(0,r.jsxs)(s.UC,{"data-slot":"dialog-content",className:(0,l.cn)("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t),...x,children:[a,n&&(0,r.jsx)(s.bm,{"data-slot":"dialog-close",asChild:!0,children:(0,r.jsxs)(o.$,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm",children:[(0,r.jsx)(i.A,{}),(0,r.jsx)("span",{className:"sr-only",children:"Close"})]})})]})]})}function m(e){let{className:t,...a}=e;return(0,r.jsx)("div",{"data-slot":"dialog-header",className:(0,l.cn)("flex flex-col gap-2",t),...a})}function x(e){let{className:t,showCloseButton:a=!1,children:i,...n}=e;return(0,r.jsxs)("div",{"data-slot":"dialog-footer",className:(0,l.cn)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",t),...n,children:[i,a&&(0,r.jsx)(s.bm,{asChild:!0,children:(0,r.jsx)(o.$,{variant:"outline",children:"Close"})})]})}function h(e){let{className:t,...a}=e;return(0,r.jsx)(s.hE,{"data-slot":"dialog-title",className:(0,l.cn)("font-heading text-base leading-none font-medium",t),...a})}function p(e){let{className:t,...a}=e;return(0,r.jsx)(s.VY,{"data-slot":"dialog-description",className:(0,l.cn)("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",t),...a})}}}]);
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.