1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,42352,e=>{"use strict";var t=e.i(91398),r=e.i(41158),n=e.i(3828),i=e.i(58758),o=e.i(92511),a=e.i(47675),s=e.i(70910),l=e.i(71557),u=e.i(59411),c=e.i(94398);e.s(["Link",0,({children:e,className:d,href:p,id:m,ariaLabel:g,brand:f,tabIndex:y,dataAttr:b,prefetch:_,openInNewTab:h,locale:v,onClick:S,...P})=>{let k=(0,n.useRouter)(),w=(0,l.useBrandMaybe)(),E=(0,c.useIsLegacyApp)(),j=k?.asPath===p,M=function(e,t,r){if(t||r){let n=t&&(0,i.getBrandFromString)(t),a=(0,o.getQueryString)({brand:n,preview:r});return a?`${e}?${a}`:e}return e}(p,k?.query.brand,k?.query.preview),z=y?{tabIndex:y}:void 0,C=!!f&&f!==w,I=k.asPath?.split("/").pop(),N=m&&(I?`${I}-${m}`:m),x=("string"==typeof p?p:p.pathname||"").includes("/konedata"),L=v||(x?k.locale:"fi");if(h)return(0,t.jsx)("a",{href:M.toString(),className:d,"aria-label":g,"aria-current":!1,target:"_blank",rel:"noreferrer",...z,...b,children:e});if(E||C){let r=(0,u.getAbsoluteUrl)(M.toString(),f||w||s.Brand.MT);return(0,t.jsx)("a",{href:r,className:d,"aria-label":g,"aria-current":!1,rel:"noreferrer",...z,...b,children:e})}return(0,t.jsx)(r.default,{href:M,locale:L,prefetch:!1!==_&&void 0,id:N,className:d,"aria-label":g,"aria-current":!!j&&"page",onClick:e=>{(0,a.persistScrollPosition)(N),S?.(e)},...z,...b,...P,children:e})}])},47675,e=>{"use strict";var t=e.i(91788),r=e.i(71557);let n="scroll-position-restore-id";e.s(["ScrollRestoration",0,()=>{let e=(0,r.useIsLoading)();return(0,t.useEffect)(()=>{if(e)window.scrollTo(0,0);else{let e=sessionStorage.getItem(n);if(e){let t=document.getElementById(e);t&&(t.scrollIntoView({behavior:"auto",block:"center"}),sessionStorage.removeItem(n))}}},[e]),null},"persistScrollPosition",0,e=>{sessionStorage.removeItem(n),e&&sessionStorage.setItem(n,e)}])},71557,e=>{"use strict";var t=e.i(91398),r=e.i(91788);let n=(0,r.createContext)(null),i=()=>{let e=(0,r.useContext)(n);if(!e)throw Error("DRPContext can only be used inside a provider");return e};e.s(["DRPContextProvider",0,({brand:e,section:r,isLoading:i,isPreview:o,hideAds:a,layerAd:s,mobileArticleAds:l,desktopArticleAds:u,desktopArticleBottomAd:c=null,mobileArticleBottomAd:d=null,paywall:p,children:m,configuration:g,cameFromGoogleDiscover:f})=>(0,t.jsx)(n.Provider,{value:{brand:e,section:r,isLoading:i,isPreview:o,hideAds:a,layerAd:s,adPlaceholders:{mobileArticleAds:l,desktopArticleAds:u},desktopArticleBottomAd:c,mobileArticleBottomAd:d,paywall:p,configuration:g,cameFromGoogleDiscover:f},children:m}),"useAdPlaceholders",0,()=>i().adPlaceholders,"useBrand",0,()=>i().brand,"useBrandMaybe",0,()=>{let e=(0,r.useContext)(n);if(e)return e.brand},"useDRPContext",0,i,"useHideAds",0,()=>i().hideAds,"useIsLoading",0,()=>i().isLoading,"usePaywall",0,()=>i().paywall,"useSection",0,()=>i().section])},61128,e=>{"use strict";var t=e.i(91398),r=e.i(38160),n=e.i(3828),i=e.i(91788),o=e.i(19466),a=e.i(32009),s=e.i(32426),l=e.i(17695),u=e.i(28693),c=e.i(13168);let d=(0,i.createContext)(null),p=!0;e.s(["UserContextProvider",0,({children:e})=>{let m=(0,n.useRouter)(),[g,f,y]=(0,o.useLocalStorage)("drp-session-status"),[b,_]=(0,o.useLocalStorage)("fmi_is_subscriber",0),h=(0,i.useCallback)(e=>{f({sessionStatus:e.sessionStatus,expiry:e.expiry}),void 0!==e.isMtSubscriber&&_(+!!e.isMtSubscriber)},[f,_]),[v,S]=(0,o.useLocalStorage)("drp-session-details",null),P=(0,i.useRef)(!1);return(0,i.useEffect)(()=>{if(m.asPath.startsWith("/kirjaudu")||window.isApp)return;let e=(0,s.consumeOidcSessionRefreshHint)();!P.current&&(0,a.shouldFetchSessionStatus)(g?.expiry,{force:e})&&(P.current=!0,(0,a.getSessionStatus)(p).then(e=>{P.current=!1,e&&(e.sessionStatus!==r.SessionStatus.LoggedIn?h({sessionStatus:e.sessionStatus,expiry:(0,a.getSessionStatusExpiryDate)(),isMtSubscriber:!1}):h({sessionStatus:e.sessionStatus,expiry:(0,a.getSessionStatusExpiryDate)(),...void 0!==e.isMtSubscriber&&{isMtSubscriber:e.isMtSubscriber}}),e.sessionStatus===r.SessionStatus.LoggedIn&&(0,l.getProfile)().then(e=>{e?(S({id:e.customerNumber?(0,u.hashId)(e.customerNumber):"",products:e.products?e.products.map(e=>e.product_code):[],initials:e.address.first_name.charAt(0)+e.address.last_name.charAt(0)}),(0,c.updateBlueConicDataLayer)(e)):console.error("Could not retrieve profile data")}))})),g?.sessionStatus===r.SessionStatus.LoggedIn?(0,c.refreshBlueConicDataLayer)():(0,c.clearBlueConicData)(),p=!1}
1,[m.asPath,g?.expiry,h,S]),(0,t.jsx)(d.Provider,{value:{sessionStatus:g,setSessionStatus:h,removeSessionStatus:y,profileDetails:v,setProfileDetails:S},children:e})},"useIsLoggedIn",0,()=>{let e=(0,i.useContext)(d);if(!e)throw Error("UserContext can only be used inside a provider");return e.sessionStatus?.sessionStatus===r.SessionStatus.LoggedIn},"useUser",0,()=>{let e=(0,i.useContext)(d);if(!e)throw Error("UserContext can only be used inside a provider");return e}])},75667,e=>{"use strict";var t,r,n,i,o,a=e.i(498),s=e.i(16619),l=((t={}).Campaign="campaign",t.Package="package",t.Product="product",t),u=((r={}).CreditCard="creditcard",r.DirectDebit="directdebit",r.DirectDebitRecurring="directdebit_recurring",r.Invoice="invoice",r.Adyen="adyen",r.Free="free",r),c=((n={}).Scheme="scheme",n.eBankingFi="ebanking_FI",n.Trustly="trustly",n.Klarna="klarna",n.KlarnaAccount="klarna_account",n.PaySafeCard="paysafecard",n.PayPal="paypal",n.MobilePay="mobilepay",n),d=((i={}).Limited="limited",i.Recurring="recurring",i),p=((o={}).Day="day",o.Week="week",o.Month="month",o);a.object({access_token:a.string().nonempty(),scope:a.string().nonempty(),refresh_token:a.string().nonempty().optional(),expires_in:a.number().positive(),token_type:a.string()}),a.object({ticket:a.string(),expires_at:a.number().positive()});let m=a.object({id:a.string().nonempty(),payment_method:a.nativeEnum(u),type:a.nativeEnum(d),enabled:a.boolean(),iteration_type:a.nativeEnum(p),iteration_length:a.number().int(),price:a.string().transform(e=>Number(`${e}`.replace(",","."))).pipe(a.number().nonnegative()),details:a.object({type:a.nativeEnum(c),name:a.string()}).optional()}),g=a.object({id:a.string().nonempty(),product_code:a.string().nonempty(),type:a.nativeEnum(l),name:a.string().nonempty(),description:a.string(),image_url:a.string().url().nullable(),print_product:a.boolean()});a.object({name:a.string().nonempty(),type:a.string().optional()});let f=a.lazy(()=>a.object({id:a.string().nonempty(),valid_from:a.string(),valid_to:a.string(),expired:a.boolean(),product_code:a.string().nonempty(),integration_code:a.string().nonempty(),title_code:a.string().nonempty(),name:a.string().nonempty(),description:a.string(),additional_short_description:a.string().nullable(),image_url:a.string().optional(),type:a.nativeEnum(l),customer_can_cancel:a.boolean(),products:a.array(g).optional(),tags:a.any().array(),price_periods:a.array(m),based_on_package:f.optional(),transform_to_package:a.boolean().optional(),allow_gift_purchase:a.boolean().optional()}));a.object({active_products:a.array(a.string().nonempty())}),a.object({email:a.string().email().nonempty(),password:a.string().nonempty().min(8).max(1024).optional(),first_name:a.string().nonempty(),last_name:a.string().nonempty(),mobile_phone_number:a.string().nonempty().optional(),social_security_number:a.string().nonempty().optional(),company_name:a.string().nonempty().optional(),company_registration_number:a.string().nonempty().optional(),account_origin:a.string().nonempty().optional(),external_ids:a.any().optional(),birth_date:a.string().optional(),created_from_source:a.string().optional()}),a.object({id:a.string().nonempty()});let y=a.object({first_name:a.string(),last_name:a.string(),street:a.str
1ing().nullable(),street_number:a.string().nullable(),staircase:a.string().nullable(),floor:a.string().nullable(),apartment_number:a.string().nullable(),zip_code:a.string().nullable(),city:a.string().nullable(),drop_box:a.string().nullable(),country_code:a.string().nullable()}),b=a.object({id:a.string(),created:a.string(),updated:a.string(),order_id:a.string().nullable(),product_code:a.string(),title_code:a.string(),valid_from:a.string(),valid_to:a.string().nullable(),provision_service:a.string(),subscription_type:a.string(),subscription_number:a.string().nullable(),state:a.string(),has_pending_change_request:a.boolean(),campaign_end_date:a.string().optional().nullable(),subscription_end_date:a.string().nullable()});a.object({id:a.string().nonempty(),email:a.string().nonempty(),customer_number:a.string().nonempty().nullable(),mobile_phone_number:a.string().optional().nullable(),address:y,user_products:a.object({id:a.string(),state:a.string(),product_code:a.string(),valid_to:a.string()}).array().optional(),company_registration_number:a.string().optional().nullable(),company_name:a.string().optional().nullable(),birth_date:a.string().optional().nullable()}).transform(e=>({id:e.id,email:e.email,customerNumber:e.customer_number,phone:e.mobile_phone_number,address:e.address,products:e.user_products?.filter(e=>"deactivated"!==e.state),companyName:e.company_name,companyVatNumber:e.company_registration_number,birthYear:e.birth_date&&new Date(e.birth_date).getFullYear().toString()})),a.object({account_candidate_id:a.string().nonempty(),email:a.string().optional(),first_name:a.string().optional().nullable(),last_name:a.string().optional().nullable(),customer_number:a.string().nonempty().nullable()}).transform(e=>({candidateId:e.account_candidate_id,email:e.email,firstName:e.first_name,lastName:e.last_name,customerNumber:e.customer_number})),a.object({id:a.string().nonempty(),email:a.string(),status:a.string(),verified:a.boolean(),customer_number:a.string().nullable(),first_name:a.string(),last_name:a.string(),mobile_phone_number:a.string().nullable(),social_security_number:a.string().nullable(),social_security_number_century:a.string().nullable(),age:a.number().nullable(),gender:a.string().nullable(),company_registration_number:a.string().optional().nullable(),company_name:a.string().optional().nullable(),alias:a.string().nullable(),address:y,identity_mapping:a.object({key:a.string(),value:a.string()}).array(),user_products:a.array(b),accepted_marketing_permissions:a.object({id:a.string().nonempty(),type:a.string()}).array()}),a.object({first_name:a.string().nonempty(),last_name:a.string().nonempty(),street_address:a.string().nonempty(),zip_code:a.string().nonempty(),city:a.string().nonempty(),country_code:a.string().nonempty()});let _=a.object({first_name:a.string().nonempty(),last_name:a.string().nonempty(),street:a.str
1ing().nonempty(),street_number:a.string().nullable(),staircase:a.string().optional(),apartment_number:a.string().optional(),zip_code:a.string().nonempty(),city:a.string().nonempty(),country_code:a.string().nonempty(),mobile_number:a.string().nullable(),contact_email:a.string().nullable()}),h=a.object({first_name:a.string().nonempty(),last_name:a.string().nonempty(),street:a.string().nonempty(),building:a.string().nonempty(),staircase:a.string().optional(),apartment_number:a.string().optional(),zip_code:a.string().nonempty(),city:a.string().nonempty(),country_code:a.string().nonempty(),drop_box:a.string().optional()}),v=a.object({first_name:a.string().nonempty(),last_name:a.string().nonempty(),street:a.string().nonempty(),zip_code:a.string().nonempty(),city:a.string().nonempty(),country_code:a.string().nonempty()});a.object({account_id:a.string().nonempty(),product_code:a.string().nonempty(),period_id:a.string().nonempty(),start_date:a.string().nonempty(),merchant_reference:a.string().optional(),receipt_url:a.string().optional(),traffic_source:a.string().optional(),delivery_address:v.optional(),secure_identification:a.object({trusted_identity_id:a.string()}).optional()}),a.object({giver_account_id:a.string().nonempty(),product_code:a.string().nonempty(),period_id:a.string().nonempty(),start_date:a.string().nonempty(),gift_delivery_address:_,secure_identification:a.object({trusted_identity_id:a.string()}).optional()}),a.object({id:a.string(),order_id:a.string().optional()});let S=a.object({first_name:a.string(),last_name:a.string(),street:a.str
1ing(),street_number:a.string().optional(),zip_code:a.string(),city:a.string(),country_code:a.string(),floor:a.string().optional(),apartment_number:a.string().optional(),staircase:a.string().optional(),dropbox:a.string().optional()});a.object({period_id:a.string(),product_code:a.string(),description:a.string(),complete_url:a.string(),error_url:a.string(),cancel_url:a.string(),traffic_source:a.string().optional(),merchant_reference:a.string().optional(),subscription_start_date:a.string().optional(),discount_code:a.string().optional(),origin:a.string(),delivery_address:S.optional()}),a.object({id:a.string().nonempty()}),s.schema.subscriber.transform(e=>({first_name:e.firstName,last_name:e.lastName,email:e.email,mobile_phone_number:e.phone,birth_date:e.birthYear&&`${e.birthYear}-01-01`,password:e.password,company_name:e.companyName,company_registration_number:e.companyVatNumber})),s.schema.giftReceiver.transform(e=>({first_name:e.firstName,last_name:e.lastName,street_address:e.address,zip_code:e.postalCode,city:e.city,country_code:"FI"}));let P=s.schema.account.transform(e=>({first_name:e.firstName,last_name:e.lastName,email:e.email,password:e.password}));s.schema.subscriber.transform(e=>({first_name:e.firstName,last_name:e.lastName,street_address:e.address,zip_code:e.postalCode,city:e.city,country_code:"FI"})),s.schema.subscriber.transform(e=>({first_name:e.firstName,last_name:e.lastName,street:e.address,zip_code:e.postalCode,city:e.city,country_code:"FI"})),h.transform(e=>({first_name:e.first_name,last_name:e.last_name,street:e.street,street_number:e.building,staircase:e.staircase,apartment_number:e.apartment_number,zip_code:e.zip_code,city:e.city,country_code:e.country_code,dropbox:e.drop_box})),e.s(["AdyenPaymentType",()=>c,"IterationType",()=>p,"PaymentMethod",()=>u,"PaymentMethodTranslationMap",0,{creditcard:"Luottokortti",directdebit:"Direct debit",directdebit_recurring:"Direct debit, kestotilaus",invoice:"Lasku",adyen:"Adyen",free:"Ilmainen",scheme:"Luottokortti",ebanking_FI:"Verkkopankki",trustly:"Trustly",klarna:"Klarna",klarna_account:"Klarna osamaksu",paysafecard:"PaySafe",paypal:"PayPal",mobilepay:"MobilePay"},"PricePeriodType",()=>d,"subscriberAccountToNewAccount",0,P])},16619,e=>{"use strict";var t,r,n=e.i(21384),i=e.i(38171);let o="Tämä tieto on pakollinen.",a=n.z.string().trim().nonempty({message:o}).refine(e=>e.match(i.EMAIL_REGEX),{message:"Sähköpostiosoite on väärässä muodossa."});n.z.string().trim().refine(e=>e.match(i.EMAIL_REGEX),{message:"Sähköpostiosoite on väärässä muodossa."});let s=n.z.string().nonempty({message:o}).refine(e=>e.match(i.ADDRESS_REGEX),{message:"Katuosoitteesta puuttuu numero."}).refine(e=>e.match(i.FIRST_NOT_NUMERIC_REGEX),{message:"Katuosoite ei voi alkaa numerolla."}),l=n.z.string().trim().nonempty({message:o}).min(5,{message:"Postinumerossa tulee olla 5 numeroa."}).max(5,{message:"Postinumerossa tulee olla 5 numeroa."}).refine(e=>e.match(i.NUMERIC_REGEX),{message:"Postinumerossa tulee olla vain numeroita."}),u=e=>"string"==typeof e?e.replaceAll(" ",""):e,c=e=>{let t=n.z.string().parse(e),r=t.search(/\d/);return -1!==r?t.slice(0,r)+t.slice(r).replace(/\s+/g,""):t},d=n.z.string().trim().min(9,{message:"Puhelinnumerossa tulee olla vähintään 9 numeroa."}).max(13,{message:"Puhelinnumerossa voi olla korkeintaan 13 merkkiä."}).refine(e=>e.match(i.PHONE_REGEX),{message:"Puhelinnumerossa tulee olla vain numeroita."}).optional().or(n.z.literal("").transform(()=>void 0)),p=n.z.string().refine(e=>e?.match(i.COMPANY_VAT_NUMBER_REGEX),{message:"Anna Y-tunnus muodossa 1234567-8"}).optional().or(n.z.literal("").transform(()=>void 0)),m=n.z.object({email:a,firstName:n.z.string().nonempty({message:o}),lastName:n.z.string().nonempty({message:o}),password:n.z.string().nonempty({message:o}),customerNumber:n.z.string().optional()}),g=n.z.object({id:n.z.string().optional(),email:a,firstName:n.z.string().nonempty({message:o}),lastName:n.z.string().nonempty({message:o}),address:n.z.preprocess(c,s),postalCode:l,city:n.z.string().nonempty({message:o}),phone:n.z.preprocess(u,d),birthYear:n.z.string().optional(),password:n.z.string().optional(),studentNumber:n.z.string().optional(),companyName:n.z.string().optional(),companyVatNumber:p}),f=n.z.object({id:n.z.string().optional(),firstName:n.z.string().nonempty({message:o}),lastName:n.z.string().nonempty({message:o}),address:n.z.preprocess(c,s),postalCode:l,city:n.z.string().nonempty({message:o}),phone:n.z.preprocess(u,d),email:n.z.string().refine(e=>!e||e.match(i.EMAIL_REGEX),{message:"Sähköpostiosoite on väärässä muodossa."}).optional()}),y=n.z.object({subscriber:g,paymentMethod:n.z.string().nonempty(),productC
1ode:n.z.string().nonempty(),periodId:n.z.string().nonempty(),startDate:n.z.string().nonempty(),successRedirectUrl:n.z.string().optional(),errorRedirectUrl:n.z.string().optional(),identityId:n.z.string().optional(),giftReceiver:f.optional()});var b=((t={})[t.SubscriptionType=1]="SubscriptionType",t[t.AccountCheck=2]="AccountCheck",t[t.SubscriberInformation=3]="SubscriberInformation",t[t.GiftReceiverInformation=4]="GiftReceiverInformation",t[t.SubscriptionSubmit=5]="SubscriptionSubmit",t),_=((r={}).digi="digi",r.combo="combo",r);e.s(["PackageType",()=>_,"SubscriptionStep",()=>b,"schema",0,{email:a,account:m,subscriber:g,giftReceiver:f,subscription:y}])},59411,e=>{"use strict";e.i(50461);var t,r=e.i(498),n=e.i(70910),i=((t=i||{}).Localhost="localhost",t.Develop="develop",t.Staging="staging",t.Production="production",t);let o=r.nativeEnum(i),a=()=>o.parse("production"),s=(e,t,r,i)=>{var o;let s=(e=>{let t=a();switch(e){case n.Brand.MT:switch(t){case"localhost":return"http://localhost:3000";case"develop":return"https://dev.maaseuduntulevaisuus.fi";case"staging":return"https://qa.maaseuduntulevaisuus.fi";case"production":return"https://www.maaseuduntulevaisuus.fi";default:throw Error(`Unsupported ${e} environment: ${t}`)}case n.Brand.KV:switch(t){case"localhost":return"http://local.koneviesti.fi:3000";case"develop":return"https://dev.koneviesti.fi";case"staging":return"https://qa.koneviesti.fi";case"production":return"https://www.koneviesti.fi";default:throw Error(`Unsupported ${e} environment: ${t}`)}default:throw Error("Unsupported brand: "+e)}})(t),l=e;if(r){let t=e.split("?");l=t.length?t[0]:e}return(o=l,RegExp("^(?:[a-z+]+:)?//","i").test(o))?l:`${s}${i&&"fi"!==i?`/${i}`:""}${l.startsWith("/")?"":"/"}${l}`};e.s(["Environment",0,i,"getAbsoluteUrl",0,s,"getAbsoluteUrlInApp",0,(e,t,r)=>{let i=((e,t)=>{switch(e){case n.Brand.MT:switch(t){case"localhost":return"http://localhost:3000";case"develop":return"https://dev.maaseuduntulevaisuus.fi";case"staging":return"https://qa.maaseuduntulevaisuus.fi";case"production":return"https://www.maaseuduntulevaisuus.fi";default:throw Error(`Unsupported ${e} environment: ${t}`)}case n.Brand.KV:switch(t){case"localhost":return"http://local.koneviesti.fi:3000";case"develop":return"https://dev.koneviesti.fi";case"staging":return"https://qa.koneviesti.fi";case"production":return"https://www.koneviesti.fi";default:throw Error(`Unsupported ${e} environment: ${t}`)}default:throw Error("Unsupported brand: "+e)}})(t,r);return`${i}${e.startsWith("/")?"":"/"}${e}`},"getCanonicalUrl",0,(e,t,r,i)=>"ar"===t?s(e,n.Brand.MT,r?.withoutQuery):s(e,t,r?.withoutQuery,i),"getEnvironmentDomain",0,e=>{let t=a();switch(e){case n.Brand.MT:switch(t){case"localhost":return"local.mt.fi:3000";case"develop":return"dev.maaseuduntulevaisuus.fi";case"staging":return"qa.maaseuduntulevaisuus.fi";case"production":return"maaseuduntulevaisuus.fi";default:throw Error(`Unsupported ${e} environment: ${t}`)}case n.Brand.KV:switch(t){case"localhost":return"local.koneviesti.fi:3000";case"develop":return"dev.koneviesti.fi";case"staging":return"qa.koneviesti.fi";case"production":return"koneviesti.fi";default:throw Error(`Unsupported ${e} environment: ${t}`)}default:throw Error("Unsupported brand: "+e)}},"getGtmId",0,e=>{let t="GTM-KMWMC5W",r=a();switch(e){case n.Brand.MT:return"production"===r?"GTM-NDVDQSS":t;case n.Brand.KV:return"production"===r?"GTM-NJWKSCQ":t;default:return""}},"getNextEnvironment",0,a,"getNoticeServiceEnvironmentUrl",0,()=>{let e=a();switch(e){case"localhost":return"http://ilmoita.local.mt.fi:4000";case"develop":return"https://ilmoita-dev.maaseuduntulevaisuus.fi";case"staging":return"https://ilmoita-qa.maaseuduntulevaisuus.fi";case"production":return"https://ilmoita.maaseuduntulevaisuus.fi";default:throw Error(`Unsupported notice service environment: ${e}`)}}])},54471,(e,t,r)=>{"use strict";e.i(50461),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getDomainLocale",{enumerable:!0,get:function(){return i}});let n=e.r(70090);function i(t,r,i,o){{let a=e.r(2531).normalizeLocalePath,s=e.r(62205).detectDomainLocale,l=r||a(t,i).detectedLocale,u=s(o,void 0,l);if(u){let e=`http${u.http?"":"s"}://`,r=l===u.defaultLocale?"":`/${l}`;return`${e}${u.domain}${(0,n.normalizePathTrailingSlash)(`${r}${t}`)}`}return!1}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esMo
1dule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},39149,(e,t,r)=>{"use strict";e.i(50461),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return w},useLinkStatus:function(){return k}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let o=e.r(52456),a=e.r(91398),s=o._(e.r(91788)),l=e.r(60472),u=e.r(71112),c=e.r(28169),d=e.r(89129),p=e.r(14862),m=e.r(25479),g=e.r(71914),f=e.r(54471),y=e.r(44113),b=e.r(63230),_=new Set;function h(e,t,r,n){if(!("u"<typeof window)&&(0,u.isLocalURL)(t)){if(!n.bypassPrefetchedCheck){let i=t+"%"+r+"%"+(void 0!==n.locale?n.locale:"locale"in e?e.locale:void 0);if(_.has(i))return;_.add(i)}e.prefetch(t,r,n).catch(e=>{})}}function v(e){return"string"==typeof e?e:(0,c.formatUrl)(e)}let S=s.default.forwardRef(function(e,t){let r,n,{href:i,as:o,children:c,prefetch:_=null,passHref:S,replace:P,shallow:k,scroll:w,locale:E,onClick:j,onNavigate:M,onMouseEnter:z,onTouchStart:C,legacyBehavior:I=!1,transitionTypes:N,...x}=e;r=c,I&&("string"==typeof r||"number"==typeof r)&&(r=(0,a.jsx)("a",{children:r}));let L=s.default.useContext(m.RouterContext),T=!1!==_,{href:R,as:$}=s.default.useMemo(()=>{if(!L){let e=v(i);return{href:e,as:o?v(o):e}}let[e,t]=(0,l.resolveHref)(L,i,!0);return{href:e,as:o?(0,l.resolveHref)(L,o):t||e}},[L,i,o]),A=s.default.useRef(R),O=s.default.useRef($);I&&(n=s.default.Children.only(r));let D=I?n&&"object"==typeof n&&n.ref:t,[U,B,K]=(0,g.useIntersection)({rootMargin:"200px"}),G=s.default.useCallback(e=>{(O.current!==$||A.current!==R)&&(K(),O.current=$,A.current=R),U(e)},[$,R,K,U]),F=(0,b.useMergedRef)(G,D);s.default.useEffect(()=>{!L||B&&T&&h(L,R,$,{bypassPrefetchedCheck:!1,locale:E})},[$,R,B,E,T,L?.locale,L]);let V={ref:F,onClick(e){I||"function"!=typeof j||j(e),I&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(e),!L||e.defaultPrevented||function(e,t,r,n,i,o,a,s,l){let c,{nodeName:d}=e.currentTarget;if(!("A"===d.toUpperCase()&&((c=e.currentTarget.getAttribute("target"))&&"_self"!==c||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which)||e.currentTarget.hasAttribute("download"))){if(!(0,u.isLocalURL)(r)){i&&(e.preventDefault(),location.replace(r));return}e.preventDefault(),(()=>{if(l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let e=a??!0;"beforePopState"in t?t[i?"replace":"push"](r,n,{shallow:o,locale:s,scroll:e}):t[i?"replace":"push"](n||r,{scroll:e})})()}}(e,L,R,$,P,k,w,E,M)},onMouseEnter(e){I||"function"!=typeof z||z(e),I&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),L&&h(L,R,$,{locale:E,priority:!0,bypassPrefetchedCheck:!0})},onTouchStart:function(e){I||"function"!=typeof C||C(e),I&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),L&&h(L,R,$,{locale:E,priority:!0,bypassPrefetchedCheck:!0})}};if((0,d.isAbsoluteUrl)($))V.href=$;else if(!I||S||"a"===n.type&&!("href"in n.props)){let e=void 0!==E?E:L?.locale;V.href=L?.isLocaleDomain&&(0,f.getDomainLocale)($,e,L?.locales,L?.domainLocales)||(0,y.addBasePath)((0,p.addLocale)($,e,L?.defaultLocale))}return I?s.default.cloneElement(n,V):(0,a.jsx)("a",{...x,...V,children:r})}),P=(0,s.createContext)({pending:!1}),k=()=>(0,s.useContext)(P),w=S;("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},41158,(e,t,r)=>{t.exports=e.r(39149)},2531,(e,t,r)=>{"use strict";e.i(50461),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"normalizeLocalePath",{enumerable:!0,get:function(){return n}});let n=(t,r)=>e.r(92090).normalizeLocalePath(t,r);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},71914,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useIntersection",{enumerable:!0,get:function(){return l}});let n=e.r(91788),i=e.r(99604),o="function"==typeof IntersectionObserver,a=new Map,s=[];function l({rootRef:e,rootMargin:t,disabled:r}
1){let u=r||!o,[c,d]=(0,n.useState)(!1),p=(0,n.useRef)(null),m=(0,n.useCallback)(e=>{p.current=e},[]);return(0,n.useEffect)(()=>{if(o){if(u||c)return;let r=p.current;if(r&&r.tagName)return function(e,t,r){let{id:n,observer:i,elements:o}=function(e){let t,r={root:e.root||null,margin:e.rootMargin||""},n=s.find(e=>e.root===r.root&&e.margin===r.margin);if(n&&(t=a.get(n)))return t;let i=new Map;return t={id:r,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=i.get(e.target),r=e.isIntersecting||e.intersectionRatio>0;t&&r&&t(r)})},e),elements:i},s.push(r),a.set(r,t),t}(r);return o.set(e,t),i.observe(e),function(){if(o.delete(e),i.unobserve(e),0===o.size){i.disconnect(),a.delete(n);let e=s.findIndex(e=>e.root===n.root&&e.margin===n.margin);e>-1&&s.splice(e,1)}}}(r,e=>e&&d(e),{root:e?.current,rootMargin:t})}else if(!c){let e=(0,i.requestIdleCallback)(()=>d(!0));return()=>(0,i.cancelIdleCallback)(e)}},[u,t,e,c,p.current]),[m,c,(0,n.useCallback)(()=>{d(!1)},[])]}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},63230,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return i}});let n=e.r(91788);function i(e,t){let r=(0,n.useRef)(null),i=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=i.current;t&&(i.current=null,t())}else e&&(r.current=o(e,n)),t&&(i.current=o(t,n))},[e,t])}function o(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},19466,32426,e=>{"use strict";var t=e.i(91788),r=e.i(65871);e.s(["useLocalStorage",0,function(e,n,i){if(!r.isBrowser)return[n,r.noop,r.noop];if(!e)throw Error("useLocalStorage key may not be falsy");var o=i?i.raw?function(e){return e}:i.deserializer:JSON.parse,a=(0,t.useRef)(function(e){try{var t=i?i.raw?String:i.serializer:JSON.stringify,r=localStorage.getItem(e);if(null!==r)return o(r);return n&&localStorage.setItem(e,t(n)),n}catch(e){return n}}),s=(0,t.useState)(function(){return a.current(e)}),l=s[0],u=s[1];(0,t.useLayoutEffect)(function(){return u(a.current(e))},[e]);var c=(0,t.useCallback)(function(t){try{var r="function"==typeof t?t(l):t;if(void 0===r)return;var n=void 0;n=i?i.raw?"string"==typeof r?r:JSON.stringify(r):i.serializer?i.serializer(r):JSON.stringify(r):JSON.stringify(r),localStorage.setItem(e,n),u(o(n))}catch(e){}},[e,u]);return[l,c,(0,t.useCallback)(function(){try{localStorage.removeItem(e),u(void 0)}catch(e){}},[e,u])]}],19466);let n="oma-oidc-session-refresh";e.s(["consumeOidcSessionRefreshHint",0,function(){if("u"<typeof document)return!1;let e=`${n}=`;return!!document.cookie.split(";").some(t=>t.trim().startsWith(e))&&(document.cookie=`${n}=; Expires=Thu, 01 Jan 1970 00:00:00 GMT; Path=/; SameSite=Lax; Secure`,!0)}],32426)},58758,e=>{"use strict";e.i(50461);var t=e.i(70910);let r=e=>{let r=e.toUpperCase();if(r in t.Brand)return t.Brand[r];throw Error(`Invalid brand name: ${r}`)};e.s(["getBrand",0,(e,n)=>{if(e||(e=window.location.href),n&&e.includes("localhost"))return r(n);switch(!0){case e.includes("maaseuduntulevaisuus.fi"):case e.includes("mt.fi"):return t.Brand.MT;case e.includes("koneviesti.fi"):return t.Brand.KV;default:throw Error("Unable to decide which brand to use!")}},"getBrandFromString",0,r])},17695,e=>{"use strict";e.i(18749),e.i(92042),e.i(87205);var t=e.i(75667),r=e.i(38171),n=e.i(92511),i=e.i(75445);e.i(48508);let o={[t.IterationType.Day]:"pv",[t.IterationType.Week]:"vko",[t.IterationType.Month]:"kk"},a={[t.PricePeriodType.Limited]:"Määräaikainen",[t.PricePeriodType.Recurring]:"Kestotilaus"};t.PricePeriodType.Limited,t.PricePeriodType.Recurring;let s=async()=>{let e=await fetch("/api/accounts/profile");return e.ok?await e.json():void 0},l=async e=>
1{let t=await fetch(`/api/product?productCode=${e}`);return t.ok?await t.json():void 0},u=async(e,t,o,a,s,l,u,c,d,p,m,g)=>{let f=(0,i.parseDateStringAsUtcMidnight)(l,r.DATE_FORMAT),y=(0,i.formatTZDateAsJsonString)(f),b=await fetch("/api/accounts/subscriptions",{method:"POST",headers:{"content-type":"application/json"},credentials:"include",body:JSON.stringify({paymentMethod:e,productCode:t,subscriber:a,periodId:s,startDate:y,successRedirectUrl:u,errorRedirectUrl:c,giftReceiver:m,identityId:g})});if(d(),b.ok){let e=await b.json().catch(e=>console.error(`${e}`));p.push(e?.redirectUrl||u)}else c?p.push(c):p.push(`${(0,n.getSubscriptionRedirectPath)(t,"virhe",!!m)}?p=${o}`);return b};e.s(["PERIOD_LABEL",0,o,"PERIOD_TYPE_LABEL",0,a,"getProduct",0,l,"getProfile",0,s,"isLimitedCampaign",0,e=>!!e.based_on_package&&!e.transform_to_package,"isLimitedPackage",0,(e,r)=>e?e?.type===t.PricePeriodType.Limited:r.price_periods.some(e=>e.enabled&&e.type===t.PricePeriodType.Limited),"subscribe",0,u,"toSubscriberData",0,e=>{let{street:t,street_number:r,staircase:n,apartment_number:i}=e.address,o=`${t||""} ${r||""} ${n||""} ${i||""}`;return{id:e.id,email:e.email||"",phone:e.phone||"",firstName:e.address.first_name||"",lastName:e.address.last_name,address:o,postalCode:e.address.zip_code||"",city:e.address.city||"",birthYear:e.birthYear||"",companyName:e.companyName||"",companyVatNumber:e.companyVatNumber||""}}],17695)}]);
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.