PageSourceSearch

https://voispark.com/_next/static/chunks/7785.0b27bedb56516dba.js

js voispark.com collected 2026-10-05 18:39:39 UTC 12,402 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7785],{42519:(e,t,l)=>{l.d(t,{A:()=>a});let a=(0,l(99136).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},52733:(e,t,l)=>{l.d(t,{Cf:()=>m,Es:()=>x,HM:()=>p,L3:()=>h,LC:()=>g,ZJ:()=>u,ak:()=>v,c7:()=>f,lG:()=>i,rr:()=>y,zM:()=>d});var a=l(25404);l(6992);var o=l(66916),n=l(42519),s=l(79490),r=l(67887),c=l(89895);function i(e){let{...t}=e;return(0,a.jsx)(o.bL,{"data-slot":"dialog",...t})}function d(e){let{...t}=e;return(0,a.jsx)(o.l9,{"data-slot":"dialog-trigger",...t})}function u(e){let{...t}=e;return(0,a.jsx)(o.ZL,{"data-slot":"dialog-portal",...t})}function p(e){let{...t}=e;return(0,a.jsx)(o.bm,{"data-slot":"dialog-close",...t})}function g(e){let{className:t,...l}=e;return(0,a.jsx)(o.hJ,{"data-slot":"dialog-overlay",className:(0,s.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-500 bg-black/50",t),...l})}function m(e){let{className:t,children:l,showCloseButton:r=!0,...c}=e;return(0,a.jsxs)(u,{"data-slot":"dialog-portal",children:[(0,a.jsx)(g,{}),(0,a.jsxs)(o.UC,{"data-slot":"dialog-content",className:(0,s.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-500 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] rounded-lg border shadow-lg duration-200 lg:max-w-lg",t),...c,children:[l,r&&(0,a.jsxs)(o.bm,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,a.jsx)(n.A,{}),(0,a.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function f(e){let{className:t,...l}=e;return(0,a.jsx)("div",{"data-slot":"dialog-header",className:(0,s.cn)("flex flex-col gap-2 text-center sm:text-left",t),...l})}function x(e){let{className:t,...l}=e;return(0,a.jsx)("div",{"data-slot":"dialog-footer",className:(0,s.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...l})}function h(e){let{className:t,...l}=e;return(0,a.jsx)(o.hE,{"data-slot":"dialog-title",className:(0,s.cn)("text-lg leading-none font-semibold",t),...l})}function y(e){let{className:t,...l}=e;return(0,a.jsx)(o.VY,{"data-slot":"dialog-description",className:(0,s.cn)("text-muted-foreground text-sm",t),...l})}function v(e){let{title:t,showCloseButton:l=!0,className:n,children:i}=e;return(0,a.jsx)(m,{className:(0,s.cn)("rounded-[26px] overflow-hidden p-0",n),showCloseButton:!1,children:(0,a.jsxs)("div",{className:"relative w-full",children:[l&&(0,a.jsx)(o.bm,{className:"top-6 right-6 absolute w-6 h-6 flex items-center justify-center cursor-pointer",children:(0,a.jsx)(r.default,{name:c.Z.CLOSE})}),(0,a.jsxs)("div",{className:"flex flex-col w-full py-6 px-10",children:[(0,a.jsx)(h,{children:(0,a.jsx)("p",{className:"typo-h3 text-text-primary",children:t})}),i]})]})})}},57785:(e,t,l)=>{l.r(t),l.d(t,{CreateCollectionDialog:()=>i});var a=l(25404),o=l(6992),n=l(88982),s=l(52733),r=l(52021),c=l(99728);function i(){let{t:e}=(0,n.WD)(),{createCollectionDialog:t,closeCreateCollectionDialog:l,openAddToCollectionDialog:i}=(0,r.k)(),{isOpen:d,returnToAddDialog:u,pendingVoice:p}=t,[g,m]=(0,o.useState)(""),f=(0,c.W_)(),x=f.isPending;(0,o.useEffect)(()=>{d&&m("")},[d]);let h=async()=>{if(g.trim())try{await f.mutateAsync({name:g.trim()})&&(l(),u&&p&&i(p))}catch(e){console.error("Failed to create collection:",e)}},y=!g.trim()||x;return(0,a.jsx)(s.lG,{open:d,onOpenChange:e=>!e&&l(),children:(0,a.jsx)(s.Cf,{className:"rounded-[16px] lg:rounded-[26px] overflow-hidden p-0 lg:max-w-[560px]",showCloseButton:!1,children:(0,a.jsxs)("div",{className:"relative w-full",children:[(0,a.jsxs)("div",{className:"px-6 lg:px-10 pt-6 lg:pt-6 pb-4 lg:pb-4",children:[(0,a.jsx)(s.L3,{children:(0,a.jsx)("p",{className:"typo-h3m lg:typo-h3 text-text-primary text-center lg:text-left",children:(0,a.jsx)(n.T,{keyName:"dashboard_collection_create_title"})})}),(0,a.jsx)("p",{className:"typo-caption-2m lg:typo-body text-text-primary mt-4 lg:mt-4",children:(0,a.jsx)(n.T,{keyName:"dashboard_collection_create_description"})})]}),(0,a.jsx)("div",{className:"mx-6 lg:mx-10 mt-2",children:(0,a.jsx)("div",{className:"w-full bg-background-primary border border-border-primary rounded-xl lg:rou
1nded-[10px] px-3 lg:px-4 py-3 lg:py-3 flex items-center h-12 lg:h-auto",children:(0,a.jsx)("input",{type:"text",className:"flex-1 typo-caption-1m lg:typo-caption font-bold text-text-primary bg-transparent outline-none placeholder:text-text-tertiary",placeholder:e("dashboard_collection_name_placeholder"),value:g,onChange:e=>m(e.target.value),onKeyDown:e=>{"Enter"!==e.key||y||h()},autoFocus:!0})})}),(0,a.jsxs)("div",{className:"flex gap-3 lg:gap-3 items-center justify-end px-6 lg:px-6 py-6 lg:py-6",children:[(0,a.jsx)("button",{className:"flex-1 lg:flex-none lg:w-[120px] h-11 lg:h-12 bg-background-tertiary rounded-2xl lg:rounded-2xl typo-h4m lg:typo-h5 text-text-primary cursor-pointer hover:opacity-80 disabled:opacity-50 disabled:cursor-not-allowed",onClick:()=>{l()},disabled:x,children:(0,a.jsx)(n.T,{keyName:"dashboard_collection_btn_cancel"})}),(0,a.jsxs)("button",{className:"flex-1 lg:flex-none h-11 lg:h-12 px-6 bg-button-primary rounded-2xl lg:rounded-2xl typo-h4m lg:typo-h5 text-button-default cursor-pointer hover:opacity-80 ".concat(y?"opacity-50 cursor-not-allowed":""),onClick:h,disabled:y,children:[(0,a.jsx)("span",{className:"hidden lg:inline-block",children:(0,a.jsx)(n.T,{keyName:"dashboard_collection_btn_create"})}),(0,a.jsx)("span",{className:"inline-block lg:hidden",children:(0,a.jsx)(n.T,{keyName:"dashboard_collection_btn_create_mobile"})}),x&&"..."]})]})]})})})}},88982:(e,t,l)=>{let a,o,n;l.d(t,{IO:()=>d,T:()=>y,WD:()=>m,Wn:()=>v});var s=l(6992),r=l(47309);let c={useSuspense:!1},i=()=>(a||(a=s.createContext(void 0)),a),d=({tolgee:e,options:t,children:l,fallback:a,ssr:o})=>{(0,s.useEffect)(()=>{(null==n?void 0:n.run)!==e.run&&(n&&n.stop(),n=e,e.run().catch(e=>{console.error(e)}).finally(()=>{m(!1)}))},[e]);let d=e,{language:u,staticData:p}="object"!=typeof o?{}:o;
1d=function(e,t,l,a=!0){let[o]=(0,s.useState)(()=>Object.assign(Object.assign({},e),{t(...t){let l=(0,r.hN)(...t);return e.t(Object.assign(Object.assign({},l),{noWrap:!0}))}})),[n,c]=(0,s.useState)(a);return(0,s.useEffect)(()=>{c(!1)},[]),(0,s.useMemo)(()=>{a&&(e.setEmitterActive(!1),e.addStaticData(l),e.changeLanguage(t),e.setEmitterActive(!0))},[t,l,e]),(0,s.useState)(()=>{if(!e.isLoaded()&&a){let l=e.getRequiredDescriptors(t),a=e.getAllRecords(),o=l.map(({namespace:e,language:t})=>e?`${e}:${t}`:t).filter(e=>!a.find(t=>(null==t?void 0:t.cacheKey)===e));console.warn(`Tolgee: Missing records in "staticData" for proper SSR functionality: ${o.map(e=>`"${e}"`).join(", ")}`)}}),n?o:e}(e,u,p,!!o);let[g,m]=(0,s.useState)(!d.isLoaded()),f=Object.assign(Object.assign({},c),t),x=i();return f.useSuspense?s.createElement(x.Provider,{value:{tolgee:d,options:f}},g?a:s.createElement(s.Suspense,{fallback:a||null},l)):s.createElement(x.Provider,{value:{tolgee:d,options:f}},g?a:l)},u=()=>{let e=i(),t=(0,s.useContext)(e)||o;if(!t)throw Error("Couldn't find tolgee instance, did you forgot to use `TolgeeProvider`?");return t},p=()=>{let[e,t]=(0,s.useState)(0);return{instance:e,rerender:(0,s.useCallback)(()=>{t(e=>e+1)},[t])}},g=(e,t)=>{let{tolgee:l,options:a}=u(),o=(0,r.zb)(e),n=(0,r.MA)(o).join(":"),c=Object.assign(Object.assign({},a),t),{rerender:i,instance:d}=p();(0,s.useRef)([]).current=[];let g=l.isLoaded(o);(0,s.useEffect)(()=>{let e=l.on("update",i);return()=>{e.unsubscribe()}},[n,l]),(0,s.useEffect)(()=>(l.addActiveNs(o),()=>l.removeActiveNs(o)),[n,l]);let m=(0,s.useCallback)(e=>{var t;let a=null!=(t=e.ns)?t:null==o?void 0:o[0];return l.t(Object.assign(Object.assign({},e),{ns:a}))},[l,d]);if(c.useSuspense&&!g)throw l.addActiveNs(o,!0);return{t:m,isLoading:!g}},m=(e,t)=>{let{t:l,isLoading:a}=g(e,t);return{t:(0,s.useCallback)((...e)=>l((0,r.hN)(...e)),[l]),isLoading:a}},f=e=>{if(!e)return;let t={};return Object.entries(e||{}).forEach(([e,l])=>{"function"==typeof l?t[e]=e=>l(x(e)):s.isValidElement(l)?t[e]=e=>void 0===l.props.children&&(null==e?void 0:e.length)?s.cloneElement(l,{},x(e)):s.cloneElement(l):t[e]=l}),t},x=e=>{let t=function(e){return Array.isArray(e)&&1===e.length?e[0]:e}(e);return Array.isArray(t)?t.map((e,t)=>s.createElement(s.Fragment,{key:t},e)):t},h=e=>{let t=e.keyName||e.children;void 0===t&&console.error("T component: keyName not defined");let l=e.defaultValue||(e.keyName?e.children:void 0),a=x(e.t({key:t,params:f(e.params),defaultValue:l,noWrap:e.noWrap,ns:e.ns,language:e.language}));return s.createElement(s.Fragment,null,a)},y=e=>{let{t}=g();return s.createElement(h,Object.assign({t:t},e))},v=e=>{let{tolgee:t}=u(),{rerender:l}=p();return(0,s.useEffect)(()=>{let a=null==e?void 0:e.map(e=>t.on(e,l));return()=>{null==a||a.forEach(e=>e.unsubscribe())}},[null==e?void 0:e.join(":")]),t}},99728:(e,t,l)=>{l.d(t,{WC:()=>u,W_:()=>m,d:()=>d,j_:()=>x,qs:()=>g,rR:()=>f,xq:()=>p});var a=l(66718),o=l(7899),n=l(38550),s=l(6992),r=l(26011),c=l(52021);let i={all:()=>["collections"],list:()=>[...i.all(),"list"],voicesCheck:e=>[...i.all(),"voicesCheck",e],voicesCheckAll:()=>[...i.all(),"voicesCheck"]};function d(e,t){var l;let o=[...e].sort((e,t)=>e.voiceType!==t.voiceType?e.voiceType.localeCompare(t.voiceType):e.voiceId.localeCompare(t.voiceId)).map(e=>"".concat(e.voiceType,":").concat(e.voiceId)).join("|"),n=(0,c.k)(e=>e.updateVoiceCollectionsCache),d=(0,a.I)({queryKey:i.voicesCheck(o),queryFn:async()=>{if(0===e.length)return{results:{}};let t=await (0,r.Yt)(e);if(!t.success)throw Error(t.message||"Failed to check voices in collections");return t.data},staleTime:3e5,gcTime:6e5,retry:2,refetchOnWindowFocus:!1,enabled:e.length>0&&(null==(l=null==t?void 0:t.enabled)||l)});return(0,s.useEffect)(()=>{d.isSuccess&&d.data&&n(d.data.results)},[d.isSuccess,d.data,n]),{isLoading:d.isLoading,isError:d.isError,isSuccess:d.isSuccess}}function u(){let e=(0,o.jE)();return(0,s.useCallback)(()=>{e.invalidateQueries({queryKey:i.voicesCheckAll()}
1),e.invalidateQueries({queryKey:["voices","catalog","collection"]})},[e])}function p(){var e,t,l,o;let n=(0,a.I)({queryKey:i.list(),queryFn:async()=>{let e=await (0,r.IM)(1,100);if(!e.success)throw Error(e.message||"Failed to fetch collections");return e.data},staleTime:3e5,gcTime:18e5,retry:2,refetchOnWindowFocus:!1});return{collections:null!=(l=null==(e=n.data)?void 0:e.collections)?l:[],total:null!=(o=null==(t=n.data)?void 0:t.total)?o:0,isLoading:n.isLoading,isError:n.isError,isSuccess:n.isSuccess,refetch:n.refetch}}function g(){let e=(0,o.jE)();return(0,s.useCallback)((t,l)=>{e.setQueryData(i.list(),e=>e?{...e,collections:e.collections.map(e=>e.collectionId===t?{...e,voiceCount:Math.max(0,e.voiceCount+l)}:e)}:e)},[e])}function m(){let e=(0,o.jE)(),t=(0,c.k)(e=>e.setNewlyCreatedCollectionId);return(0,n.n)({mutationFn:async e=>{let{name:t,description:l,initialVoice:a}=e,o=await (0,r.No)(t,l,a);if(!o.success||!o.data)throw Error(o.message||"Failed to create collection");return o.data},onSuccess:l=>{e.setQueryData(i.list(),e=>e?{...e,collections:[l,...e.collections],total:e.total+1}:{collections:[l],total:1,page:1,pageSize:100}),t(l.collectionId)}})}function f(){let e=(0,o.jE)();return(0,n.n)({mutationFn:async e=>{let{collectionId:t,name:l,description:a}=e,o=await (0,r.IX)(t,l,a);if(!o.success||!o.data)throw Error(o.message||"Failed to update collection");return o.data},onSuccess:t=>{e.setQueryData(i.list(),e=>e?{...e,collections:e.collections.map(e=>e.collectionId===t.collectionId?t:e)}:e)}})}function x(){let e=(0,o.jE)();return(0,n.n)({mutationFn:async e=>{let t=await (0,r.o4)(e);if(!t.success)throw Error(t.message||"Failed to delete collection");return e},onSuccess:t=>{e.setQueryData(i.list(),e=>e?{...e,collections:e.collections.filter(e=>e.collectionId!==t),total:Math.max(0,e.total-1)}:e),e.invalidateQueries({queryKey:i.voicesCheckAll()})}})}}}]);

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.