1"use strict";(self.webpackChunkdemo1=self.webpackChunkdemo1||[]).push([[654],{43654:function(e,n,t){t.r(n),t.d(n,{default:function(){return f}});var s=t(47313),l=t(25328),a=t(66135),r=(t(1413),t(70885)),o=t(29466),i=t(89930),c=t(93298),d=t(79066),u=(t(84069),t(89457)),m=t(46417),x=function(e){var n=e.title,t=(e.subTitle,e.rows,e.count,e.className),x=e.toolbar,h=void 0===x||x,p=e.per_page,b=e.link,f=e.linkTitle,j=(0,a.I0)(),v=(0,a.v9)((function(e){return e.general.customPronunciations})),g=(0,a.v9)((function(e){return e.general.pronunciation_current_page})),N=(0,s.useState)(!0),y=(0,r.Z)(N,2),w=(y[0],y[1],(0,s.useState)(!1)),S=(0,r.Z)(w,2),C=S[0],T=S[1],P=(0,s.useState)({column:"updatedAt",asc:!1}),E=(0,r.Z)(P,2),_=(E[0],E[1],(0,s.useState)([{column:"id",asc:!0},{column:"name",asc:!0},{column:"updatedAt",asc:!0},{column:"createdAt",asc:!0}])),Z=(0,r.Z)(_,2),k=(Z[0],Z[1],(0,a.v9)((function(e){return e.general.isWorkspace})));(0,s.useEffect)((function(){return k&&l.Um.getPronunciation(k).then((function(e){j({type:"SET_CUSTOM_PRONUNCIATION",payload:e})})),function(){}}),[C]),(0,s.useEffect)((function(){T(!C)}),[k]);var W=(0,s.useState)(""),A=(0,r.Z)(W,2),R=A[0],U=A[1],O=(0,s.useState)(""),F=(0,r.Z)(O,2),L=F[0],D=F[1],I=(0,s.useState)(!1),V=(0,r.Z)(I,2),B=V[0],H=V[1],M=(0,s.useState)(""),z=(0,r.Z)(M,2),q=(z[0],z[1],(0,s.useState)(!1)),G=(0,r.Z)(q,2),J=G[0],K=G[1],Q=(0,s.useState)(!1),X=(0,r.Z)(Q,2),Y=X[0],$=X[1],ee=function(){return H(!1)},ne=function(){return K(!1)},te=function(){return $(!1)},se=(0,s.useState)(null),le=(0,r.Z)(se,2),ae=le[0],re=le[1],oe=(0,s.useState)(""),ie=(0,r.Z)(oe,2),ce=ie[0],de=ie[1],ue=(0,s.useState)(null),me=(0,r.Z)(ue,2),xe=(me[0],me[1],function(){""!=(null===ae||void 0===ae?void 0:ae.originalWord)&&""!=ce?l.Um.addPronunciation(null===ae||void 0===ae?void 0:ae.originalWord,ce,k).then((function(e){e&&(j({type:"SET_ALERT",payload:{type:"success",title:"Saved!",content:"The Pronunciation is Edited Successfully!"}}),T(!C),te())})).catch((function(e){console.log("error:",e),j({type:"SET_ALERT",payload:{type:"error",title:"Error!",content:"Unable to save Custom Pronunciation!"}}),te()})):te()});return v=(0,a.v9)((function(e){return e.general.customPronunciations})),(0,m.jsxs)("div",{className:"card ".concat(t),children:[(0,m.jsxs)("div",{className:"card-header border-0 pt-5",children:[(0,m.jsx)("h3",{className:"card-title align-items-start flex-column",children:(0,m.jsxs)("span",{className:"card-label fw-bolder fs-3 mb-1",children:[" ",n]})}),h&&(0,m.jsx)("div",{className:"card-toolbar",children:(0,m.jsx)("ul",{className:"nav",children:(0,m.jsx)("li",{className:"nav-item",children:(0,m.jsx)(o.rU,{to:b,children:(0,m.jsx)(c.Z,{className:"btn btn-primary btn-sm",onClick:function(){return H(!0)},children:"+ Add a Pronunciation"})})})})}),(0,m.jsx)(d.Z,{show:B,onHide:ee,style:{marginTop:"40px"},children:(0,m.jsxs)(d.Z.Body,{children:[(0,m.jsxs)("div",{className:"row mb-7",children:[(0,m.jsx)("h3",{className:"mb-3",children:"Add Custom Pronunciation"}),(0,m.jsxs)("div",{className:"col-6",children:[(0,m.jsx)("label",{className:"fs-6 fw-bold form-label mt-3",children:(0,m.jsx)("span",{children:"Original Word"})}),(0,m.jsx)("input",{type:"text",className:"form-control form-control-solid",name:"original",defaultValue:R,onChange:function(e){U(e.target.value)}})]}),(0,m.jsxs)("div",{className:"col-6",children:[(0,m.jsx)("label",{className:"fs-6 fw-bold form-label mt-3",children:(0,m.jsx)("span",{children:"Replace With"})}),(0,m.jsx)("input",{type:"text",className:"form-control form-control-solid",defaultValue:L,onChange:function(e){D(e.target.value)},name:"replaced"})]})]}),(0,m.jsxs)("div",{className:"d-flex justify-content-end",children:[(0,m.jsx)("div",{className:"text-end me-3",children:(0,m.jsx)("button",{className:"btn btn-sm btn-light-primary",onClick:ee,children:"Cancel"})}),(0,m.jsx)("div",{className:"text-end",children:""!=R&&""!=L?(0,m.jsx)("button",{className:"btn btn-sm btn-primary",onClick:function(){""!=R&&""!=L?l.Um.addPronunciation(R,L,k).then((function(e){e&&(j({type:"SET_ALERT",payload:{type:"success",title:"Saved!",content:"New Pronunciation is Added Successfully!"}}),T(!C),ee())})).catch((function(e){console.log("error:",e),j({type:"SET_ALERT",payload:{type:"error",title:"Error!",content:"Unable to Save Custom Pronunciation!"}}),ee()})):ee()},children:"Add"}):(0,m.jsx)("button",{className:"btn btn-sm btn-primary",disabled:!0,children:"Add"})})]})]})}),(0,m.jsx)(d.Z,{show:Y,onHide:te,style:{marginTop:"40px"},children:(0,m.jsxs)(d.Z.Body,{children:[(0,m.jsxs)("div",{className:"row mb-7",children:[(0,m.jsx)("h3",{className:"mb-3",children:"Edit Custom Pronunciation"}),(0,m.jsxs)("div",{className:"col-6",children:[(0,m.jsx)("label",{className:"fs-6 fw-bold form-label mt-3",children:(0,m.jsx)("span",{children:"Original Word"})}),(0,m.jsx)("input",{type:"text",className:"form-control form-control-solid",name:"original",defaultValue:null===ae||void 0===ae?void 0:ae.originalWord})]}),(0,m.jsxs)("div",{className:"col-6",children:[(0,m.jsx)("label",{className:"fs-6 fw-bold form-label mt-3",children:(0,m.jsx)("span",{children:"Replace With"})}),(0,m.jsx)("input",{type:"text",className:"form-control form-control-solid",defaultValue:null===ae||void 0===ae?void 0:ae.customWord,onChange:function(e){de(e.target.value)},name:"replaced"})]})]}),(0,m.jsxs)("div",{className:"d-flex justify-content-end",children:[(0,m.jsx)("div",{className:"text-end me-3",children:(0,m.jsx)("button",{className:"btn btn-sm btn-light-primary",onClick:te,children:"Cancel"})}),(0,m.jsx)("div",{className:"text-end",children:ce.length>0?(0,m.jsx)("button",{className:"btn btn-sm btn-primary",onClick:xe,children:"Save"}):(0,m.jsx)("button",{className:"btn btn-sm btn-primary",onClick:xe,disabled:!0,children:"Save"})})]})]})}),(0,m.jsxs)(d.Z,{show:J,onHide:ne,style:{marginTop:"40px"},children:[(0,m.jsx)(d.Z.Body,{children:(0,m.jsxs)("div",{className:"fv-row mb-0 text-center ",children:[(0,m.jsx)("label",{htmlFor:"confirmemailpassword",className:"form-label fs-3 fw-bolder mb-5",children:"Please Confirm!"}),(0,m.jsxs)("div",{className:"text-center",style:{margin:"auto"},children:[(0,m.jsxs)("p",{children:["Original Word:",(0,m.jsxs)("b",{children:[" \xa0",null===ae||void 0===ae?void 0:ae.originalWord]})," ",(0,m.jsx)("br",{}),"Custom Word:",(0,m.jsxs)("b",{children:[" \xa0",null===ae||void 0===ae?void 0:ae.customWord]})]}),(0,m.jsx)("p",{className:"",children:"Are you sure you want to delete this pronunciation from your Library?"})]})]})}),(0,m.jsxs)(d.Z.Footer,{className:"mr-auto",children:[(0,m.jsx)(c.Z,{variant:"secondary",onClick:ne,children:"Close"}),(0,m.jsx)(c.Z,{variant:"danger",onClick:function(){null!=(null===ae||void 0===ae?void 0:ae.originalWord)&&null!=(null===ae||void 0===ae?void 0:ae.customWord)?l.Um.deletePronunciation(null===ae||void 0===ae?void 0:ae.originalWord).then((function(e){e&&(j({type:"SET_ALERT",payload:{type:"success",title:"Saved!",content:"The Pronunciation is Deleted Successfully!"}}),T(!C),ne())})).catch((function(e){console.log("error:",e),j({type:"SET_ALERT",payload:{type:"error",title:"Error!",content:"Unable to Delete Custom Pronunciation"}}),ne()})):ne()},children:"Delete"})]})]})]}),(0,m.jsxs)("div",{className:"card-body py-3 mb-5 mt-3",children:[(0,m.jsx)("div",{className:"tab-content",children:(0,m.jsx)("div",{className:"tab-pane fade show active",children:(0,m.jsxs)("div",{className:"table-responsive",children:[(0,m.jsxs)("table",{className:"table table-row-dashed table-row-gray-200 align-middle gs-0 gy-4",children:[(0,m.jsx)("thead",{style:{borderBottom:"0.5px dotted",borderColor:"#EDF0F4"},children:(0,m.jsxs)("tr",{className:"border-0 pb-5 mb-5",children:[(0,m.jsx)("th",{className:"p-3 min-w-150px text-muted text-uppercase text-bold",style:{cursor:"pointer"},children:"Original Text"}),(0,m.jsx)("th",{className:"p-3 min-w-140px text-muted text-uppercase text-bold",style:{cursor:"pointer"},children:"Replaced With"}),(0,m.jsx)("th",{className:"p-3 min-w-110px text-muted text-uppercase text-bold",style:{cursor:"pointer"}})]})}),(0,m.jsx)("tbody",{children:v.map((function(e){return(0,m.jsxs)("tr",{children:[(0,m.jsx)("td",{className:" ps-3",children:(0,m.jsx)("input",{type:"text",className:"form-control form-control-solid",name:"original",defaultValue:e.original_word,disabled:!0})}),(0,m.jsx)("td",{className:"text-start text-muted fw-bold",children:(0,m.jsx)("input",{type:"text",className:"form-control form-control-solid",name:"custom",value:e.custom_word,disabled:!0})}),(0,m.jsxs)("td",{className:"text-start text-muted fw-bold",children:[(0,m.jsx)("a",{style:{cursor:"pointer"},onClick:function(){var n,t;n=e.original_word,t=e.custom_word,re({originalWord:n,customWord:t}),$(!0)},className:"btn btn-icon btn-bg-light btn-active-color-primary btn-sm me-1",children:(0,m.jsx)(u.D8,{path:"/media/icons/duotune/art/art005.svg",className:"svg-icon-3"})}),(0,m.jsx)("a",{style:{cursor:"pointer"},onClick:function(){var n,t;n=e.original_word,t=e.custom_word,re({originalWord:n,customWord:t}),K(!0)},className:"btn btn-icon btn-bg-light btn-active-color-primary btn-sm",children:(0,m.jsx)(u.D8,{path:"/media/icons/duotune/general/gen027.svg",className:"svg-icon-3"})})]})]},e.id)}))})]}),v.length<1&&(0,m.jsx)("div",{className:"d-flex justify-content-center mt-4 pt-4",children:(0,m.jsx)("p",{style:{color:"#7E8299",fontSize:"14px"}
1,children:"No records found"})})]})})}),v.length<1&&(0,m.jsx)(i.t,{currentPage:g,lastPage:1,totalRecords:v.length,perPage:p,linkTitle:f,isEmpty:!0}),v.length>0&&(0,m.jsx)(i.t,{currentPage:g,lastPage:1,totalRecords:v.length,perPage:p,linkTitle:f,isEmpty:!1})]})]})},h=t(8334),p=t.n(h),b=function(e){var n=(0,a.I0)(),t=(0,a.v9)((function(e){return e.general.isWorkspace}));s.useEffect((function(){return l.Um.getPronunciation(t).then((function(e){n({type:"SET_CUSTOM_PRONUNCIATION",payload:e})})),function(){}}),[t]);var r=(0,a.v9)((function(e){return e.general.customPronunciations})),o=(0,a.v9)((function(e){return e.general.pronunciation_current_page}));return(0,m.jsxs)(m.Fragment,{children:[r&&(0,m.jsx)("div",{className:"row g-5 g-xl-8",children:(0,m.jsx)("div",{className:"col-xxl-12",children:(0,m.jsx)(x,{title:"Pronunciations",subTitle:"",className:"card-xxl-stretch mb-5 mb-xxl-8",rows:r,toolbar:!0,count:o,per_page:e.per_page,link:"",linkTitle:"Create a Project"})})}),!r&&(0,m.jsx)("div",{className:"d-flex justify-content-center",style:{marginTop:"20%"},children:(0,m.jsx)(p(),{color:"#009EF7"})})]})},f=function(){return(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(b,{per_page:10})})}}}]);
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.