PageSourceSearch

https://telex.hu/_nuxt/CLRZJwuP.js

js telex.hu collected 2026-09-24 08:36:54 UTC 3,820 bytes, 1 lines download raw bytes

1import{_ as E}from"./BiGUw9Pk.js";import{aO as x,j as z,t as F,p as U,a5 as W,K as o,J as C,aE as _,H as j,L as A,o as g,c as y,a as G,h as H,n as R,e as T,f as N}from"./BdFqHcNj.js";const O=()=>x("color-mode").value,V=["id","src","data-src","data-map-id","height","width","allow"],D={key:1,class:"loading-overlay"},Q={__name:"Election2026Map",props:{queryString:{type:String,required:!0},widthProps:{type:String,default:null},heightProps:{type:String,default:null},allow:{type:String,default:""},classes:{type:Array,default:()=>["iframe-wrapper"]},style:{type:Object,default:()=>({})},handleTheme:{type:Boolean,default:!1},mapId:{type:String,required:!0},shouldUpdateRoute:{type:Boolean,default:!1},forceLoad:{type:Boolean,default:!1},nonInteractive:{type:Boolean,default:!1}},setup(r){const a=r,b=z(),{unloadableEmbedCount:w}=F(b),n=O(),u=U(),c=W(),f=o(null),v=o(null),h=o(!1),s=o(null),d=o(null),i=new URL("https://valasztas-2026.telex.hu/");i.search=a.queryString?new URLSearchParams(a.queryString).toString():"",i.searchParams.set("mapId",a.mapId),a.nonInteractive&&i.searchParams.set("noninteractive",1),a.handleTheme&&i.searchParams.set("theme",n.preference!=="system"?n.preference:n.value);const m=o(i.toString());a.widthProps&&(v.value=a.widthProps),a.heightProps&&(f.value=a.heightProps);const S=o(!1),p=t=>{const e=new URL(t);return e.pathname==="/"&&(e.pathname=""),e.toString()},L=t=>{const e=t.data;e.type==="iframe-size"&&p(e.sourceAddress)===p(m.value)&&(a.heightProps||(f.value=e.height),a.widthProps||(v.value=e.width))},I=()=>{h.value=!0,s.value&&(s.value.classList.add("fullscreen-embed"),s.value.contentWindow.postMessage({event:"fullscreenToggle",isFullscreen:!0},"*"))},k=()=>{h.value=!1,s.value&&(s.value.classList.remove("fullscreen-embed"),s.value.contentWindow.postMessage({event:"fullscreenToggle",isFullscreen:!1},"*"))},q=t=>{s.value&&!s.value.classList.contains("fullscreen-embed")&&(window.innerWidth<690||t)&&c.push({query:{...u.query,activeMap:a.mapId}})},M=()=>{if(a.handleTheme&&s.value&&s.value.contentWindow){const t={type:"themeChanged",colorMode:n.preference!=="system"?n.preference:n.value};s.value.contentWindow.postMessage(t,"*")}},B=t=>{if(!d.value)return d.value=t,!1;const e=["projection","selectedConstituency","selectedLayerGroup","selectedRoute","year","currentStopIndex"].some(l=>t[l]!==d.value[l]);return d.value=t,!e},P=t=>{const e=t.data;if(e.event==="fullscreenToggle"&&e.mapId===a.mapId)if(s.value&&s.value.classList.contains("fullscreen-embed")){const l={...u.query};delete l.activeMap,c.replace({query:l})}else q(!0);a.shouldUpdateRoute&&e.event==="paramsChanged"&&c.replace({query:{...u.query,state:e.params.state},state:{skipGemius:B(e.params.stateObject)}}),e.type==="parent-router"&&p(e.sourceAddress)===p(m.value)&&c.push(e.to),e.event==="mapLoaded"&&e.mapId===a.mapId&&(S.value=!0)};return C(()=>n.preference,()=>{M()}),C(()=>u.query.activeMap,(t,e)=>{e&&a.mapId===e&&k(),t&&a.mapId===t&&I()},{immediate:!0}),_(()=>{w.value+=1,window.addEventListener("message",L),window.addEventListener("message",P),u.query.activeMap===a.mapId&&a.mapId&&j(()=>{I()}),setTimeout(M,500)}),A(()=>{w.value-=1,window.removeEventListener("message",L),window.removeEventListener("message",P)}),(t,e)=>{const l=E;return g(),y("div",{class:R(["election2026__module election2026__module--map iframe-placeholder",{unloadable:!r.forceLoad}])},[G("iframe",{id:r.mapId,ref_key:"iframeWrapper",ref:s,src:r.forceLoad?m.value:null,"data-src":m.value,"data-map-id":r.mapId,height:f.value,width:v.value,class:R([r.classes,"iframe-wrapper"]),allow:r.allow,style:H(r.style),loading:"eager"},null,14,V),h.value?T("",!0):(g(),y("div",{key:0,class:"click-overlay",onClick:e[0]||(e[0]=J=>q(!1))})),S.value?T("",!0):(g(),y("div",D,[N(l,{color:"#009966FF",size:125})]))],2)}}};export{Q as default};

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.