1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[475],{28357:(e,t,n)=>{n.r(t),n.d(t,{default:()=>M});var r=n(37876),i=n(27964),o=n(61230),s=n(18056),a=n(15039),u=n.n(a),l=n(67701),c=n(72848),d=n(61127),f=n(2132),p=n(23191),h=n(20952),v=n(63593),y=n(97575),m=n(59575),g=n(92739),L=n(86700),_=n(51144),b=n(5243),w=n(14232),S=n(51799),x=n(63881),E=n(3009),T=n(59712),j=n(41362),O=n(40262),k=n(71497),C=n(96078),A=n(49310),I=n(32045);let M=e=>{var t,n;let a,M,D,U,F,J,B,K,W,H,V,X,Y,$,q,z,G,Q,Z,ee,et,en,er,ei,eo=(0,i.c)(111),{renderContext:es,podcastId:ea,alasinColor:eu,sectionTheme:el,listTemplate:ec,theme:ed,originalAssetId:ef,customListenAudioTitle:ep,asset:eh,functionButton:ev}=e,[ey,em]=(0,w.useState)(!1),{environment:eg,"hosts.er.whitelabel":eL}=(0,p.U)(),e_=(0,c.P)(),{isDarkMode:eb}=(0,m.DP)(),{pageSectionTheme:ew}=(0,l.A)(),eS=null!=el?el:ew;eo[0]!==eh||eo[1]!==eb?(a=!(0,O.e8)(eh)&&eb,eo[0]=eh,eo[1]=eb,eo[2]=a):a=eo[2];let[ex]=(0,w.useState)(a),{platform:eE,useInkAuth:eT}=(0,v.g$)(),{userProfile:ej,userIds:eO,getValidSessionToken:ek}=(0,g.sb)(),{sppd:eC}=(0,S.h)(),eA=!j.A.copEnabled[e_]||eC,{handleBrazeCustomEvent:eI}=(0,d.ml)(),[eM,eP]=(0,w.useState)(""),[eR,eN]=(0,w.useState)(),[eD,eU]=(0,w.useState)(!!eM||!!ea),{isPersonalized:eF}=(0,y.Ih)(),eJ=(0,h.p)();eo[3]!==eF||eo[4]!==eJ?(M=(0,C.el)(eJ,eF),eo[3]=eF,eo[4]=eJ,eo[5]=M):M=eo[5];let eB=M,eK="splitBody"===es,eW=eK?"18px":void 0,eH="humanAudioId"in eh?eh.humanAudioId:void 0,eV="podcastRuntime"in eh?eh.podcastRuntime:0,eX=null!=ep?ep:"customListenAudioTitle"in eh?eh.customListenAudioTitle:"Kuuntele juttu";eo[6]!==eh.audioType||eo[7]!==eh.id||eo[8]!==e_||eo[9]!==ec||eo[10]!==eJ.nodeId||eo[11]!==ef||eo[12]!==eE||eo[13]!==eV||eo[14]!==eB||eo[15]!==ed||eo[16]!==eO||eo[17]!==ej?(D=(e,t,n,r,i,o)=>{var s;let a=Math.round(1e3*Number(eV||r)),u=Math.round(1e3*t);return{core:{brand:e_,source:eB,visitID:(0,C.h9)(),nodeID:eJ.nodeId,user:(0,k.gL)(ej,eO),device:(0,k.NW)(eE)},audio:{assetId:eh.id,duration:a,mediaId:null!=ef?ef:eh.id.toString(),currentTime:u,playbackSpeed:n,audioSegment:i,mediaType:null!=(s=eh.audioType)?s:"podcast",triggerMode:o,listTemplate:ec,theme:ed},eventType:e}},eo[6]=eh.audioType,eo[7]=eh.id,eo[8]=e_,eo[9]=ec,eo[10]=eJ.nodeId,eo[11]=ef,eo[12]=eE,eo[13]=eV,eo[14]=eB,eo[15]=ed,eo[16]=eO,eo[17]=ej,eo[18]=D):D=eo[18];let eY=D;eo[19]!==eh||eo[20]!==e_||eo[21]!==eH||eo[22]!==ea||eo[23]!==ej?(U=eH&&(0,I.RS)(ej,e_,eh)||ea,eo[19]=eh,eo[20]=e_,eo[21]=eH,eo[22]=ea,eo[23]=ej,eo[24]=U):U=eo[24];let e$=!!U,eq=!!ea&&!eH;eo[25]!==eu||eo[26]!==e_||eo[27]!==eW||eo[28]!==ex||eo[29]!==e$||eo[30]!==eS?(F=(0,I.Tj)(e_,ex,e$,eS,eu,eW),eo[25]=eu,eo[26]=e_,eo[27]=eW,eo[28]=ex,eo[29]=e$,eo[30]=eS,eo[31]=F):F=eo[31];let ez=F;eo[32]!==eq||eo[33]!==eh?(J=eq?(0,T.LJ)(eh):void 0,eo[32]=eq,eo[33]=eh,eo[34]=J):J=eo[34];let eG=J;eo[35]!==e_||eo[36]!==eg||eo[37]!==eH||eo[38]!==ea||eo[39]!==eT||eo[40]!==ej.authenticationStatus?(B=()=>{ej.authenticationStatus===_.J.Authenticated&&(ea||eH)&&(async()=>{eN(await (0,x.nj)(e_,eT,eg))})().catch(P)},eo[35]=e_,eo[36]=eg,eo[37]=eH,eo[38]=ea,eo[39]=eT,eo[40]=ej.authenticationStatus,eo[41]=B):B=eo[41],eo[42]!==e_||eo[43]!==eg||eo[44]!==eH||eo[45]!==ea||eo[46]!==eT||eo[47]!==ej?(K=[e_,eg,ea,eT,ej,eH],eo[42]=e_,eo[43]=eg,eo[44]=eH,eo[45]=ea,eo[46]=eT,eo[47]=ej,eo[48]=K):K=eo[48],(0,w.useEffect)(B,K),eo[49]!==eK?(W={showThumbnail:eK,hidePrecoverVolumeControl:!0},eo[49]=eK,eo[50]=W):W=eo[50],eo[51]!==eh||eo[52]!==e_||eo[53]!==eA?(H=eA?{gaid:(0,T.MM)(eh),service:e_,currentSite:null!=(t=(0,T.yX)(eh))?t:"".concat(e_,"-fi")}:void 0,eo[51]=eh,eo[52]=e_,eo[53]=eA,eo[54]=H):H=eo[54],eo[55]!==eR||eo[56]!==ej?(V=ej.authenticationStatus===_.J.Authenticated?{role:(0,b.t2)(ej),adId:null!=(n=ej.adId)?n:"",products:[...ej.entitlements.map(R)],richieToken:eR}:void 0,eo[55]=eR,eo[56]=ej,eo[57]=V):V=eo[57],eo[58]!==eG?(X=eG?{fwSite:eG}:void 0,eo[58]=eG,eo[59]=X):X=eo[59],eo[60]!==eA?(Y={enableSnowplowMediaEvents:eA},eo[60]=eA,eo[61]=Y):Y=eo[61],eo[62]!==H||eo[63]!==V||eo[64]!==X||eo[65]!==Y||eo[66]!==W?($={layout:W,analytics:H,user:V,ads:X,experimental:Y},eo[62]=H,eo[63]=V,eo[64]=X,eo[65]=Y,eo[66]=W,eo[67]=$):$=eo[67];let eQ=$;eo[68]!==eY||eo[69]!==e_||eo[70]!==eL?(q=async e=>{let t="playState"in e?e.playState.currentTime:0,n="playState"in e?e.playState.duration:0,r=(0,k.mS)(e.type),i="playState"in e?e.playState.playbackRate:0;if("loaded"===e.type&&em(!1),("adBreakStarted"===e.type||"contentStarted"===e.type)&&"user"===e.trigger&&await (0,k.TD)(eL,eY("start",t,i,n,(0,k.Tr)(e),e.trigger),e_),r){if("content-start"===r){await (0,k.TD)(eL,eY(r,t,i,n,(0,k.Tr)(e),e.trigger),e_),await (0,k.TD)(eL,eY("play",t,i,n,(0,k.Tr)(e),e.trigger),e_);return}await (0,k.TD)(eL,eY(r,t,i,n,(0,k.Tr)(e),e.trigger),e_)}},eo[68]=eY,eo[69]=e_,eo[70]=eL,eo[71]=q):q=eo[71];let{playerRef:eZ,player:e0,playerState:e1}=(0,o.RN)(eQ,ez,q);eo[72]!==eh||eo[73]!==e_||eo[74]!==eg||eo[75]!==ek||eo[76]!==eI||eo[77]!==e0||eo[78]!==ej?(z=()=>{if(e0&&e0.preparePlayback(),(0,T.Pm)({assetId:eh.id,error:!1}),(0,L.ub)(eh)){var e;eI({type:f.l.ListenedArticle,payload:{article_id:eh.id,platform:"web",tags:"tags"in eh?null==(e=eh.tags)?void 0:e.map(N):void 0}})}"human"===eh.audioType&&(0,I.RS)(ej,e_,eh)?eU(!0):(em(!0),(0,E.Y)(eh.id,e_,eg,ek,"no-playlist").then(e=>{var t;let n=null!=(t=e.mediaUrl)?t:e.sampleMediaUrl;if(!n)throw Error("No audio URL found in honk metadata");eP(n),eU(!0)}).catch(e=>{console.error(e),(0,T.Pm)({error:!0,errorMessage:e instanceof Error?e.message:void 0}),em(!1)}))},eo[72]=eh,eo[73]=e_,eo[74]=eg,eo[75]=ek,eo[76]=eI,eo[77]=e0,eo[78]=ej,eo[79]=z):z=eo[79];let e9=z;eo[80]!==eH||eo[81]!==e$||eo[82]!==eM||eo[83]!==e0||eo[84]!==e1.status||eo[85
1]!==ea?(G=async()=>{if(e0&&"empty"===e1.status){if(eM)await e0.loadUrl("tts",eM,{autoplay:!0,trigger:"auto"});else if(e$){var e;await e0.loadId("richiePodcast",null!=(e=null!=ea?ea:eH)?e:"",{autoplay:!1,trigger:"user"})}}},eo[80]=eH,eo[81]=e$,eo[82]=eM,eo[83]=e0,eo[84]=e1.status,eo[85]=ea,eo[86]=G):G=eo[86];let e2=G;eo[87]!==e2?(Q=()=>{e2().catch(e=>{console.error("Error loading player:",e),(0,T.Pm)({error:!0,errorMessage:e instanceof Error?e.message:void 0}),em(!1)})},Z=[e2],eo[87]=e2,eo[88]=Q,eo[89]=Z):(Q=eo[88],Z=eo[89]),(0,w.useEffect)(Q,Z);let e3=!!eK||(0,I.HL)(ej,e_,eh);if(ej.authenticationStatus===_.J.AutoWelcomeBack||ej.authenticationStatus===_.J.Unknown){let e;return eo[90]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)("div",{className:"text-to-speech__container","data-testid":"spinner",children:(0,r.jsx)(s.y,{})}),eo[90]=e):e=eo[90],e}if(!e3){let e;return eo[91]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)(r.Fragment,{}),eo[91]=e):e=eo[91],e}let e7=ey||eD;eo[92]!==eD||eo[93]!==e7?(ee=u()("text-to-speech__container",{"min-h-[60px]":e7,"text-to-speech__container--active":eD}),eo[92]=eD,eo[93]=e7,eo[94]=ee):ee=eo[94],eo[95]!==ev||eo[96]!==e9||eo[97]!==eX||eo[98]!==ey||eo[99]!==eD?(et=!eD||ey?(0,r.jsx)(A.D,{playerState:void 0,handleClick:e9,loading:ey,customListenAudioTitle:eX,functionButton:ev}):null,eo[95]=ev,eo[96]=e9,eo[97]=eX,eo[98]=ey,eo[99]=eD,eo[100]=et):et=eo[100];let e5=eD?"100%":void 0,e6=eD?void 0:"none";return eo[101]!==e5||eo[102]!==e6?(en={width:e5,display:e6},eo[101]=e5,eo[102]=e6,eo[103]=en):en=eo[103],eo[104]!==eZ||eo[105]!==en?(er=(0,r.jsx)("div",{style:en,ref:eZ}),eo[104]=eZ,eo[105]=en,eo[106]=er):er=eo[106],eo[107]!==ee||eo[108]!==et||eo[109]!==er?(ei=(0,r.jsxs)("section",{className:ee,"data-testid":"text-to-speech__container",children:[et,er]}),eo[107]=ee,eo[108]=et,eo[109]=er,eo[110]=ei):ei=eo[110],ei};function P(e){console.error("Error fetching richie token:",e)}function R(e){return e.key}function N(e){return e.key}},69319:e=>{var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise(function(n,r){var i,o,s;function a(n){e.removeListener(t,u),r(n)}function u(){"function"==typeof e.removeListener&&e.removeListener("error",a),n([].slice.call(arguments))}v(e,t,u,{once:!0}),"error"!==t&&(i=e,o=a,s={once:!0},"function"==typeof i.on&&v(i,"error",o,s))})},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){if(a(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=u(e))>0&&s.length>i&&!s.warned){s.warned=!0;var i,o,s,l=Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,console&&console.warn&&console.warn(l)}return e}function c(){if(!this.fired)return(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length)?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=c.bind(r);return i.listener=n,r.wrapFn=i,i}function f(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):h(i,i.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function v(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else if("function"==typeof e.addEventListener)e.addEventListener(t,function i(o){r.once&&e.removeEventListener(t,i),n(o)});else throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var s,a=Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)r(u,this,t);else for(var l=u.length,c=h(u,l),n=0;n<l;++n)r(c[n],this,t);return!0},o.prototype.addListener=function(e,t){return l(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return l(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,d(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,d(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,i,o,s;if(a(t),void 0===(r=this._events)||void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit
vendor: 1,394 bytes, line 1
1("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0==arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0==arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return f(this,e,!0)},o.prototype.rawListeners=function(e){return f(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}}}]);
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.