PageSourceSearch

https://www.listening.com/assets/voices-Dicpkf84.js

js listening.com collected 2026-10-01 10:24:55 UTC 3,408 bytes, 2 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`798154dfe6f02312abe2ebb46dcac5b55267091e`},e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:listening-web":!0});var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`4831a084-3b14-4bd1-8a59-5a63a3c5b41c`,e._sentryDebugIdIdentifier=`sentry-dbid-4831a084-3b14-4bd1-8a59-5a63a3c5b41c`)}catch{}})();import{a as e,n as t}from"./jsx-runtime-HLTtilDO.js";import{Hn as n,Tt as r,V as i,Vt as a,d as o,ht as s,j as c,lt as l,t as u,x as d,xn as f}from"./Schema-BiKO9Vds.js";import{_ as p,g as m,h,m as g,o as _,v,z as y}from"./api-contract-CCE5gx-b.js";import{c as b,o as x,s as S,t as C}from"./kvs-_HSp1xFW.js";import{t as w}from"./api-client-tag-rKJyW-Av.js";import{t as T}from"./compiler-runtime-UO9gZYRt.js";import{r as E}from"./runtime-context-CQ9SYK9D.js";import"./schemas-CUmYC9xS.js";import{n as D}from"./legacy-client-types-B54bgqNY.js";var O=T(),k=e(t(),1),A=2592e5,j=[`voices`,`list`];function M(e){return e[1]===`m`?`male`:`female`}function N(e){return{gender:M(e.model_id),image_url:`/voice-images/${e.model_id}.webp`,is_free:e.is_free??!1,lang:e.lang,model_id:v(e.model_id),name:p(e.name),sample_url:`/voice-samples/${e.model_id}.mp3`,softness:e.softness??`moderate`}}var P=g.map(N),F=d({voices:u(h)}),I={voices:[]},L=F.mapFields(r(l)),R=c([d({state:L,version:o}),L]).pipe(i(s(F),a({decode:e=>({...I,...`state`in e?e.state:e}),encode:e=>e}))),z=C({key:`voice-catalog-cache-storage`,schema:R,defaultValue:()=>I}),B=e=>{let t=e.filter(e=>!m(e.model_id||e.name));return t.length===e.length?e:t};function V(e,t){return e?.length?B(e):t.length?B(t):P}function H(e){return(e??``).trim().toLowerCase()}function U(e){return H(e.model_id||e.name)}function W(e,t){let n=H(t);return n?n===U(e)||n===H(e.name):!1}var G=f(w,e=>e.Voices.ListVoices().pipe(n(e=>e.voices.map(_.schemaInstanceToPlain)))),K=e=>({queryKey:j,queryFn:({signal:t})=>e(e=>e.Voices.ListVoices(),{signal:t}).then(e=>e.voices.map(_.schemaInstanceToPlain)),staleTime:A}),q=()=>{let e=(0,O.c)(15),t=(0,k.use)(b),n=S(z).voices,r=x(z),i=E(),a;e[0]===i?a=e[1]:(a=i.queryOptions({queryKey:j,queryFn:Y}),e[0]=i,e[1]=a);let o;e[2]===a?o=e[3]:(o={...a,staleTime:A},e[2]=a,e[3]=o);let s=y(o),c=s.data,l,u;e[4]!==t||e[5]!==c||e[6]!==r?(l=()=>{c?.length&&t.get(z).voices!==c&&r({voices:c})},u=[t,c,r],e[4]=t,e[5]=c,e[6]=r,e[7]=l,e[8]=u):(l=e[7],u=e[8]),(0,k.useEffect)(l,u);let d;e[9]!==n||e[10]!==s.data?(d=V(s.data,n),e[9]=n,e[10]=s.data,e[11]=d):d=e[11];let f=d,p;return e[12]!==f||e[13]!==s?(p={...s,data:f},e[12]=f,e[13]=s,e[14]=p):p=e[14],p};function J(e){let{audioItemLang:t,audioPreferredVoiceName:n,preferredVoiceName:r,isPremiumUser:i,voiceOptionsAll:a}=e,o=a.filter(e=>e.is_free||i),s=a.find(e=>W(e,n))??o.find(e=>W(e,r))??D;return!t||t===s.lang?s:o.find(e=>e.lang===t&&e.gender===s.gender&&e.softness===s.softness)||o.find(e=>e.lang===t&&e.gender===s.gender)||(o.find(e=>e.lang===t)??s)}function Y(){return G}export{j as a,K as i,J as n,q as r,P as t};
2//# sourceMappingURL=voices-Dicpkf84.js.map

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.