1"use strict"; 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="78c77212-2f9a-5f6f-8e9f-8f1eb2e752ee")}catch(e){}}(); 3(self.webpackChunkmurf_web=self.webpackChunkmurf_web||[]).push([[7862],{17862:(e,s,l)=>{l.r(s),l.d(s,{default:()=>b});var a=l(65043),i=l(14556),n=l(35323),t=l(69073),c=l(24682),d=l(9743),r=l(55293),o=l(70579);const m=()=>(0,o.jsx)(d.A,{isMobile:!0,redirectToHome:!0,children:(0,o.jsx)("div",{className:"d-flex align-items-center flex-grow-1",children:(0,o.jsx)(r.A,{weight:500,fontSize:20,children:"Audio Splitting Dashboard"})})});var u=l(25078),x=l(98139),h=l.n(x),j=l(52348),g=l(54795),v=l(96679),p=l(88714),f=l(42169),N=l(37939);const C=[{value:"M",label:"Male"},{value:"F",label:"Female"}],y=e=>{let{voiceIds:s,closeModal:l}=e;const n=(0,a.useContext)(N.l7),{locales:t,voiceStyles:d}=(0,i.d4)((e=>e.audioSplittingState)),[m,x]=(0,a.useState)({name:"",id:"",locale:"en_US",gender:"M",style:"Promo"}),[y,b]=(0,a.useState)(v.dOd.idle),w=(0,i.wA)(),I=(0,f.W6)(),S=(0,a.useMemo)((()=>t.map((e=>({value:e,label:e})))),[t]),$=(e,s)=>{x({...m,[e]:s})},k=(0,a.useMemo)((()=>`${m.locale}_${m.name.trim().replaceAll(" ","")}_${m.id}-${m.gender}-${m.style}`),[m]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:u.fQ0,children:[(0,o.jsx)(r.A,{className:"flex-grow-1",weight:500,fontSize:16,children:"Create Voice Id"}),(0,o.jsx)(c.$n,{small:!0,icon:(0,o.jsx)("span",{className:"material-icons-round md-20",children:"close"}),className:"p-0",onClick:l})]}),(0,o.jsxs)("div",{className:u.sar,children:[(0,o.jsx)(c.JU,{className:"m-0 mt-3",children:"Voice Avatar Name"}),(0,o.jsx)(c.MG,{value:m.name,fill:!0,onChange:e=>$("name",e.target.value)}),(0,o.jsx)(c.JU,{className:"m-0 mt-3",children:"Voice Avatar Id"}),(0,o.jsx)(c.MG,{value:m.id,fill:!0,onChange:e=>$("id",e.target.value)}),(0,o.jsxs)("div",{className:"d-flex gap-2",children:[(0,o.jsxs)("div",{className:"flex-1",children:[(0,o.jsx)(c.JU,{className:"m-0 mt-3",children:"Locale"}),(0,o.jsx)(c.gB,{className:"bg-white rounded",fill:!0,value:m.locale,options:S,onChange:e=>$("locale",e.target.value)})]}),(0,o.jsxs)("div",{className:"flex-1",children:[(0,o.jsx)(c.JU,{className:"m-0 mt-3",children:"Gender"}),(0,o.jsx)(c.gB,{className:"bg-white rounded",fill:!0,value:m.gender,options:C,onChange:e=>$("gender",e.target.value)})]})]}),(0,o.jsxs)("div",{className:"",children:[(0,o.jsx)(c.JU,{className:"m-0 mt-3",children:"Style"}),(0,o.jsx)(c.gB,{className:"bg-white rounded",fill:!0,value:m.style,options:d,onChange:e=>$("style",e.target.value)})]}),(0,o.jsx)(c.JU,{className:"m-0 mt-3",children:"Preview"}),(0,o.jsx)(c.MG,{fill:!0,value:k})]}),(0,o.jsxs)("div",{className:h()("d-flex justify-content-end p-2 bg-white ",{}),children:[(0,o.jsx)(c.$n,{className:"mr-2",onClick:l,intent:"none",minimal:!0,children:"Cancel"}),(0,o.jsx)(c.$n,{className:"px-4",intent:"primary",loading:y===v.dOd.loading,onClick:async()=>{if(s.includes(k))(0,j.Qg)("Voice Id already exists");else{b(v.dOd.loading);try{await g.Z.createVoiceId(n,{voiceId:k}),w(p.A.actions.addVoiceId(k)),b(v.dOd.success),(0,j.Te)("Voice Id created successfully"),l(),I.push(`/user/support/audio-splitting/${k}`)}catch(e){b(v.dOd.error),(0,j.Te)("Voice Id creation failed please try again")}}},children:"Create Voice Id"})]})]})},b=()=>{const[e,s]=(0,a.useState)(""),[l,d]=(0,a.useState)(null),[r,u]=(0,a.useState)(!1),x=(0,i.d4)((e=>e.audioSplittingState.voiceIds)),h=(0,n.W6)(),j=()=>{u(!1)};return(0,o.jsxs)("div",{children:[(0,o.jsx)(m,{}),(0,o.jsx)("div",{className:"container container-md pt-4",children:(0,o.jsxs)("div",{className:"d-flex gap-2 justify-content-center",children:[(0,o.jsxs)("div",{className:"d-flex gap-2 flex-column",style:{minWidth:400},children:[(0,o.jsx)(t.b,{items:x,query:e,fill:!0,onQueryChange:e=>s(e),itemRenderer:(e,s)=>(0,o.jsx)(c.Dr,{onClick:()=>d(e),text:e.voiceId,labelElement:e.isCompleted?(0,o.jsx)("span",{className:"material-icons-outlined text-green3",children:"check_circle"}):(0,o.jsx)("span",{className:"material-icons-outlined text-red3",children:"cancel"})}),itemPredicate:(e,s)=>s.voiceId.toLowerCase().includes(e.toLowerCase()),noResults:e.trim()?(0,o.jsx)(c.Dr,{disabled:!0,text:"No results."}):void 0,inputValueRenderer:e=>e.voiceId,selectedItem:l}),(0,o.jsx)(c.$n,{onClick:()=>u(!0),intent:"primary",children:"Generate Voice Id"})]}),(0,o.jsx)(c.$n,{onClick:()=>{l&&h.push(`/user/support/audio-splitting/${l.voiceId}`)},intent:"primary",disabled:!l,children:"Start"})]})}),(0,o.jsx)(c.lG,{className:"pb-0 overflow-hidden",isOpen:r,onClose:j,style:{maxWidth:"500px"},children:(0,o.jsx)(y,{voiceIds:x,closeModal:j})})]})}}}]); 4//# sourceMappingURL=7862.912029cc.chunk.js.map
5//# debugId=78c77212-2f9a-5f6f-8e9f-8f1eb2e752ee
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.