PageSourceSearch

https://www.kauppalehti.fi/static/static/js/async/elections.905b196a47.js

js kauppalehti.fi collected 2026-10-02 02:24:44 UTC 7,858 bytes, 4 lines download raw bytes

1"use strict";(globalThis.rspackChunktalent_news_frontend||=[]).push([["4s"],{KB(t,e,i){var a=i("VT"),n=i("DG"),r=i("QE"),o=i("WR");let{mediaShortSlugs:s}=r.A;i.d(e,{},{M:function(){let{offset:t=0,limit:e=5,media:i=s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(t=>{let{media:e,name:i,slug:r,listName:s="onlySubscribers",offset:l=0,limit:d=10}=t;return(t,c,p)=>((t,e,i)=>{if((0,n.b0)(e))return!1;let a=t.lists[e];return!a||!a.lastUpdated||a.lastUpdated+6e4<Date.now()||a.data.length<i})(c(),s,l+d)?p.get(a.vZ.dynamicListBySlug({media:e,name:i,slug:r,offset:l,limit:d})).then(e=>t(o.dT.done({params:{name:s,offset:l,limit:d},result:e}))):Promise.resolve()})({name:"feed",slug:"locked",offset:t,limit:e,media:i})}})},XX(t,e,i){var a=i("QE"),n=i("DG"),r=i("WR");let{mediaShortSlugs:o,apiRoot:s}=a.A;e.A=function(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:15;return(a,l,d)=>{let c=l();return((t,e,i,a)=>{if((0,n.b0)(e))return!1;let r=t.topic[e];return!r||!r.lastUpdated||r.lastUpdated+6e4<Date.now()||r.items.length<i+a})(c,t,e,i)?d.get(`${s}pages/v2/listingpage/topic/${o}/${t}/${e}/${i}`).then(i=>i.topicList.items.length||"vain-tilaajille"===t?(a((0===e?r.TJ:r.tj)((0,r.CE)({slug:t,data:i}))),Promise.resolve(i.topicList)):Promise.reject({status:404})).catch(t=>Promise.reject(t)):Promise.resolve(c.topic[t])}}},HwG(__unused_rspack_module,__webpack_exports__,__webpack_require__){var react_jsx_runtime__rspack_import_0=__webpack_require__("X"),react__rspack_import_1=__webpack_require__("u"),styled_components__rspack_import_2=__webpack_require__("tE");function _defineProperty(t,e,i){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function _toPropertyKey(t){var e=_toPrimitive(t,"string");return"symbol"==typeof e?e:e+""}function _toPrimitive(t,e){if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,e||"default");if("object"!=typeof a)return a;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}let Embed=(styled_components__rspack_import_2.Ay.div.withConfig({componentId:"sc-198d75c4-0"}))(["max-width:100%;background-color:inherit;clear:both;iframe,> *{max-width:100%;}"]),scriptId=t=>`ext-${t}`;function evalJS(id){try{let scripts=document.querySelectorAll(`#${scriptId(id)} script`);Array.prototype.forEach.call(scripts,script=>{if(script.src){let s=document.createElement("script");s.async=!0,s.src=script.src,document.head.appendChild(s)}else eval(script.text)})}catch(error){console.log(error)}window.scripts[id]=!0}function cleanupJS(t){delete window.scripts[t];let e=document.querySelectorAll(`#${scriptId(t)} script`);Array.prototype.forEach.call(e,t=>{t.parentNode&&t.parentNode.removeChild(t)})}class GenericExternalHtml extends react__rspack_import_1.Component{componentDidMount(){window.scripts=window.scripts||{},this.setState({mounted:!0}),this.prevId=this.props.id}componentDidUpdate(){var t;this.prevId&&this.prevId!==this.props.id&&(cleanupJS(this.prevId),this.prevId=this.props.id),(null==(t=window.scripts)?void 0:t[this.props.id])||evalJS(this.props.id)}componentWillUnmount(){this.props.loadEveryTimePageIsVisited&&cleanupJS(this.props.id)}render(){return this.state.mounted?(0,react_jsx_runtime__rspack_import_0.jsx)(Embed,{id:scriptId(this.props.id),dangerouslySetInnerHTML:{__html:this.props.html}}):null}constructor(...t){super(...t),_defineProperty(this,"state",{}),_defineProperty(this,"prevId",null)}}__webpack_exports__.A=GenericExternalHtml},v8Y(t,e,i){var a,n=i("X"),r=i("u"),o=i("XE"),s=i("tE"),l=i("Xo"),d=i("lW"),c=i("ZNj"),p=i("Xi"),u=i("HwG"),m=i("Ejx");let h=[],v=(s.Ay.main.withConfig({componentId:"sc-7f7d13b1-0"}))(["color:",";",";@media ","{margin:0 auto;}@media ","{padding:0 ",";}"],l.I8.color.primary["5"],t=>{let{theme:e}=t;return e.foundation.media.type.ui.medium},l.I8.mediaquery.max.small,l.I8.mediaquery.min.small,l.I8.spacing.large),g=(s.Ay.section.withConfig({componentId:"sc-7f7d13b1-1"}))(["padding-top:",";"],l.I8.spacing["x-large"]);e.A=t=>{let{html:e,id:i,genericPageHead:s}=t,m=(0,o.d4)(t=>{var e,i;return(null==(i=t.topic)||null==(e=i.vaalit)?void 0:e.items)??h}),y=(0,o.d4)(t=>{var e;return(null==(e=t.history.location)?void 0:e.pathname)||""}),w=r.useRef(!1),b=r.useRef(d.A.location.hash),A=r.useRef(null),x=r.useCallback(()=>{requestAnimationFrame(()=>{setTimeout(()=>{var t;let e=null==(t=A.current)?void 0:t.getBoundingClientRect().top;if(void 0!==e){let t=window.pageYOffset+e-20;window.scrollTo({top:t,behavior:"smooth"})}},100)})},[]);r.useEffect(()=>{"/vaalikone2025"===y&&(w.current=!0,d.A.location.hash!==b.current&&x(),b.current=d.A.location.hash)},[y,d.A.location.hash,x]);let j=r.useMemo(()=>"/vaalikone2025"!==y||!w.current,[y]);return r.useEffect(()=>{let t=t=>{var e;(null==(e=t.data)?void 0:e.type)==="hashchange"&&x()};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)},[x]),(0,n.jsx)(c.A,{children:(0,n.jsxs)(v,{id:"skyscraper-height-div",children:[s,(0,n.jsxs)(g,{children:[(0,n.jsx)("div",{ref:A,children:(0,n.jsx)(u.A,{html:e,id:i,loadEveryTimePageIsVisited:j})}),(0,n.jsx)(f,{teaserList:m.slice(0,6),title:"Vaalit",$_css:`${l.I8.spacing["x-large"]} 0`})]}),a||(a=(0,n.jsx)(p.F0,{postContent:!0,skipPlaceholder:!0}))]})})};var f=(0,s.Ay)(m.default).withConfig({componentId:"sc-7f7d13b1-2"})(t=>({margin:t.$_css}))},OP(t,e,i){var a,n=i("X");i("u");var r=i("tE"),o=i("gw");let s=(0,r.i7)(["0%{opacity:.2;}20%{opacity:1;}100%{opacity:.2;}"]),l=(0,r.i7)(["0%{opacity:0}
1100%{opacity:0.8}"]),d=(r.Ay.div.withConfig({componentId:"sc-20be0b5c-0"}))(["display:inline-block;background-color:",";margin:4px;height:10px;width:10px;animation-name:",";animation-duration:1.4s;animation-iteration-count:infinite;animation-fill-mode:both;animation-delay:","s;"],o.Ay.colors.main,s,t=>{let{$index:e}=t;return .2*e}),c=(r.Ay.div.withConfig({componentId:"sc-20be0b5c-1"}))(["text-align:center;padding:20px 0;"]),p=(r.Ay.div.withConfig({componentId:"sc-20be0b5c-2"}))(["position:fixed;top:40vh;left:0;right:0;text-align:center;"]),u=(r.Ay.div.withConfig({componentId:"sc-20be0b5c-3"}))(["background:#fff;opacity:0.8;position:absolute;width:100%;height:100%;z-index:100;animation:"," 0.15s;"],l),m=[0,1,2,3,4].map(t=>(0,n.jsx)(d,{$index:t},t));e.A=t=>{let{overlay:e,...i}=t;return e?(0,n.jsx)(u,{...i,children:a||(a=(0,n.jsx)(p,{children:m}))}):(0,n.jsx)(c,{...i,children:m})}},ZNj(t,e,i){var a,n=i("X");i("u");var r=i("XE"),o=i("tE"),s=i("Tu"),l=i("OP");let d=(o.Ay.div.withConfig({componentId:"sc-3d4872c6-0"}))(["position:relative;padding:",";",";"],t=>t.padding?t.padding:"0.9375rem 0",(0,s.A)("tablet")`
2        padding-top: 0;
3    `);e.A=t=>{let{children:e,padding:i,className:o}=t,s=(0,r.d4)(t=>t.ui.loading);return(0,n.jsxs)(d,{padding:i,className:o,children:[s&&(a||(a=(0,n.jsx)(l.A,{overlay:!0}))),e]})}},gA(t,e,i){i.r(e);var a=i("X");i("u");var n=i("XX"),r=i("VT"),o=i("EJ"),s=i("v8Y"),l=i("B9"),d=i("KB"),c=i("jo");async function p(t){let e,{params:i,store:p}=t;switch(i.year){case"2022":e="https://tulospalvelu.vaalit.almamedia.fi/av-2022/tulospalvelu.js";break;case"2023":e="https://tulospalvelu.vaalit.almamedia.fi/ekv-2023/tulospalvelu.js";break;case"2024":e="https://tulospalvelu.vaalit.almamedia.fi/epv-2024/tulospalvelu.js";break;default:return(0,c.A)({status:404,store:p})}await Promise.all([p.dispatch((0,l.A)("vaalit","vaalitulos","vaalitulos","otherpage"))]),await (0,r.it)([(0,n.A)("vaalit",0,10),(0,d.M)()].filter(Boolean).map(t=>p.dispatch(t).catch(o.A)));let u=`<div id="alma-tulospalvelu-app" data-enable-theme="true" data-is-alma="true"><script type="text/javascript" src="${e}" ><\/script></div>`;return(0,a.jsx)(s.A,{html:u,id:"vaalitulos"})}i.d(e,{default:()=>p})}}]);
4//# sourceMappingURL=elections.905b196a47.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.