PageSourceSearch

https://www.obs.no/assets/2816.chunk.30fb8baae514a123f8b9.js

js obs.no collected 2026-09-25 02:36:36 UTC 9,513 bytes, 3 lines download raw bytes

1/*! For license information please see 2816.chunk.30fb8baae514a123f8b9.js.LICENSE.txt */
2"use strict";(globalThis.webpackChunknitro5_app=globalThis.webpackChunknitro5_app||[]).push([[2816],{2816:(e,t,n)=>{n.d(t,{default:()=>U});var o=n(62),a=n(6166),i=n(3696),r=n(121),l=n(667),s=n(7097),c=n(8858),d=n(6268),u=n(774),m=n(3071),p=n(4702),f=n(726),g=n(9803),h=n(7539),b=n(3445),x=n(2833),y=n(7458),w=n(7921),T=n(6215),v=n(4072);function E(e){var t;const{blockTitle:n,confirmationTitle:o,consentText:a,inputPlaceholder:s,buttonText:u,teaserText:m,teaserShortText:p}=e,[x,y]=(0,i.useState)(""),[T,v]=(0,i.useState)(null),[E,A]=(0,i.useState)(!1),W=(0,w.R)(),{stores:J,storeId:R}=(0,f.z)(),U=null===(t=null==J?void 0:J.find(e=>{var t;return(null===(t=e.storeId)||void 0===t?void 0:t.toString())===R}))||void 0===t?void 0:t.name,z=(0,h.w)(),{clientCoords:q,hasShownLocationPrompt:K}=(0,h.d)(e=>e.miniMenu),Q=e.subscriptionSource?"#"+e.subscriptionSource:"",X=E?`${o} ${U}`:U?i.createElement(i.Fragment,null,i.createElement(S,null,n),i.createElement(i.Fragment,null,` - ${U}`)):n;return i.createElement(I,null,i.createElement(k,{onSubmit:function(e){if(e.preventDefault(),R){if(x){const e={email:x,storeId:R,source:window.location.href+Q};(0,l.B2D)("/newsletter/subscribe",e).then(e=>e.success?(A(!0),Promise.resolve()):(v(e.message),Promise.reject())).catch(()=>Promise.reject(null)).then(()=>y(""))}}else(0,b.l)(q,K,z)}},i.createElement(D,null,i.createElement(j,{css:!(!E&&!W)&&{width:"100%",textAlign:"center",marginBottom:0}},!!n&&!!o&&i.createElement(_,{"aria-label":"Newsletter"},X),E?i.createElement(r.Cx,{for:a,component:P}):i.createElement(C,null,R?p:m))),!E&&i.createElement(N,null,i.createElement(L,null,(0,l.TlY)("/Newsletter/InputInformationText")),i.createElement(O,null,i.createElement($,{required:!0,type:"email",value:x,onChange:function(e){const t=e.currentTarget.value.trim();y(t),v(null)}},s),R?i.createElement(B,{isFormSubmit:!0,gtmButtonData:{buttonText:u,context:"Submit for newsletter form",eventType:g.LU.Submit,eventGroup:g._B.Footer},type:"submit",disabled:!x,"aria-label":u,as:c.Sx.Primary},i.createElement(G,null,u,i.createElement(F,null))):i.createElement(M,{onClick:e=>{e.stopPropagation(),(0,b.l)(q,K,z)},onKeyDown:e=>{e.stopPropagation(),"Enter"===e.key&&(0,b.l)(q,K,z)},"aria-label":(0,l.TlY)("/Newspaper/SelectStore"),as:c.Sx.Secondary,gtmButtonData:{buttonText:(0,l.TlY)("/Newspaper/SelectStore"),context:"Select store for newsletter subscription",eventType:g.LU.Open,eventGroup:g._B.NewsletterSubscription}},i.createElement(Y,null,(0,l.TlY)("/Newspaper/SelectStore"),i.createElement(F,null)))),!!T&&i.createElement(d.A,{type:d.M.Error},T))))}const I=u.I4.div({width:"100%",display:"flex",justifyContent:"space-between",backgroundColor:e=>e.styleguide.color.support1.surface.tinted,borderRadius:e=>e.styleguide.borderRadius.md,padding:{x:e=>e.styleguide.dimension.dimension7,y:e=>e.styleguide.dimension.dimension6}}),k=u.I4.form(Object.assign({display:"flex",width:"100%",flexDirection:"column",justifyContent:"space-between"},(0,p.$_)(m._fM,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-around"}))),S="span",_=u.I4.h2((0,v.L)("headingTitle"),{color:e=>e.styleguide.color.dominant.text.default}),C=u.I4.p((0,v.L)("bodyDefaultStandard"),{color:e=>e.styleguide.color.neutral.text.default,marginTop:m.nU9}),j=u.I4.div(Object.assign({display:"flex",flexDirection:"column",justifyContent:"center",marginBottom:m.EXj},(0,p.$_)(m._fM,{marginBottom:0}))),O=u.I4.div(Object.assign({display:"flex",flexDirection:"column",alignItems:"center"},(0,p.$_)(m._fM,{flexDirection:"row"}))),D=u.I4.div(Object.assign({display:"flex",width:"100%",flexDirection:"column"},(0,p.$_)(m._fM,{flexDirection:"row",width:"50%",marginRight:m.nU9}))),P=u.I4.div(Object.assign({fontSize:m.NiS,margin:{x:0,top:-m.asY,bottom:-m.utm}},(0,p.$_)(m._fM,{margin:{bottom:-m.asY}}))),A=(0,u.I4)(y.oy,(0,x.k)({offset:-3,color:m.ONy}),Object.assign({cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:e=>e.styleguide.borderRadius.full,padding:{x:e=>e.styleguide.dimension.fixed.small.dimension6,y:e=>e.styleguide.dimension.fixed.small.dimension3},marginTop:e=>e.styleguide.dimension.dimension4,width:"100%"},(0,p.$_)(m._fM,{margin:{top:0,left:e=>e.styleguide.dimension.dimension4},width:"max-content"}))),B=(0,u.I4)(A,(0,x.k)({offset:-3,color:m.ONy}),Object.assign({verticalAlign:"bottom",backgroundColor:e=>e.styleguide.color.dominant.base.default},(0,p.$_)(m._fM,{":hover":{backgroundColor:e=>e.styleguide.color.dominant.base.hover}}))),M=(0,u.I4)(A,(0,x.k)({})),N=u.I4.div(Object.assign({display:"flex",flexDirection:"column",justifyContent:"center",marginTop:e=>e.styleguide.dimension.dimension4},(0,p.$_)(m._fM,{height:"100%",width:"50%",marginLeft:m.nU9,marginTop:0}))),$=(0,u.I4)(s.YC,{borderRadius:e=>e.styleguide.borderRadius.md,padding:{xy:e=>e.styleguide.dimension.dimension3},height:"100%",margin:{top:0,left:0},backgroundColor:m.ONy,color:m.Ql9,gap:e=>e.styleguide.dimension.dimension4,width:"100%"}),F=(0,u.I4)(T.c_,{width:e=>e.styleguide.dimension.fixed.small.dimension6,height:e=>e.styleguide.dimension.fixed.small.dimension6,color:e=>e.styleguide.color.accent.base.default}),W=u.I4.p((0,v.L)("action",{desktop:"small"}),{display:"flex",alignItems:"center",margin:{y:0},width:"max-content"}),G=(0,u.I4)(W,{color:e=>e.styleguide.color.dominant.base.contrast.default}),Y=(0,u.I4)(W,{color:e=>e.styleguide.color.dominant.text.default}),L=u.I4.span((0,v.L)("label"),{marginBottom:m.nU9});var J=n(5730);const R=(0,u.I4)((0,u.yd)(function(e){const t=(0,o.c)(34),{component:n,className:l}=e;let s,c,d,u,m,p,f,g,h,b,x,y,w,T,v,I;if(t[0]!==n||t[1]!==l||t[2]!==e){c=(0,a.__rest)(e,["component","className"]);const o=c.block;d=(0,r.Jn)(o.title),m=(0,r.Jn)(o.confirmationTitle),p=o.consentText,f
2=(0,r.Jn)(o.placeholderText),u=(0,r.Jn)(o.buttonText),w=(0,r.Jn)(o.teaserText),y=(0,r.Jn)(o.teaserShortText),g=(0,r.Jn)(o.subscriptionSource),s=n,h=l,b="newsletter-subscription-block",x=(0,r.Jn)(o.testId),t[0]=n,t[1]=l,t[2]=e,t[3]=s,t[4]=c,t[5]=d,t[6]=u,t[7]=m,t[8]=p,t[9]=f,t[10]=g,t[11]=h,t[12]=b,t[13]=x,t[14]=y,t[15]=w}else s=t[3],c=t[4],d=t[5],u=t[6],m=t[7],p=t[8],f=t[9],g=t[10],h=t[11],b=t[12],x=t[13],y=t[14],w=t[15];return t[16]!==d||t[17]!==u||t[18]!==m||t[19]!==p||t[20]!==f||t[21]!==g||t[22]!==y||t[23]!==w?(T=i.createElement(E,{blockTitle:d,confirmationTitle:m,consentText:p,inputPlaceholder:f,buttonText:u,teaserText:w,teaserShortText:y,subscriptionSource:g}),t[16]=d,t[17]=u,t[18]=m,t[19]=p,t[20]=f,t[21]=g,t[22]=y,t[23]=w,t[24]=T):T=t[24],t[25]!==c.appearance||t[26]!==T?(v=i.createElement(J.o_,{appearance:c.appearance},T),t[25]=c.appearance,t[26]=T,t[27]=v):v=t[27],t[28]!==s||t[29]!==h||t[30]!==b||t[31]!==x||t[32]!==v?(I=i.createElement(s,{className:h,id:b,"data-test-id":x},v),t[28]=s,t[29]=h,t[30]=b,t[31]=x,t[32]=v,t[33]=I):I=t[33],I}),{height:"100%",overflow:"hidden"}),U=(0,r.pG)(R)},5730:(e,t,n)=>{n.d(t,{o_:()=>v,Yh:()=>T});var o=n(62),a=n(3696),i=n(6488),r=n(8331),l=n(774),s=n(4702),c=n(3071),d=n(9331);function u(e){return"medium"===e||"huge"===e||"large"===e?parseFloat(d.P.dimension15.medium):"small"===e||"tiny"===e||"thick"===e?parseFloat(d.P.dimension8.medium):0}function m(e){return"medium"===e||"huge"===e||"large"===e?parseFloat(d.P.dimension15.small):"small"===e||"tiny"===e||"thick"===e?parseFloat(d.P.dimension8.small):0}var p=n(9540),f=n(2586);function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},g.apply(null,arguments)}const h=(0,l.I4)(e=>{const t=(0,p.tO)(),n=(0,a.useContext)(f.xl),o=function(e,t){const n=Object.assign(Object.assign({},e),{desktopAppearance:b(e.desktopAppearance,t),mobileAppearance:b(e.mobileAppearance,t)});return n}(e.appearance,e.defaultAppearance),r=function(e,t,n){const o=t?e.hasGapForMobile:e.hasGapForDesktop,a=t?e.mobileAppearance:function(e,t){if(t.hasLayout&&x(e,t.appearanceWidthContext))return t.appearanceWidthContext;return e}(e.desktopAppearance,n);return{hasGap:o,appearanceWidth:a}}(o,t,n),d=(0,a.useMemo)(()=>{return e=o.desktopTop,t=o.desktopBottom,(0,l.I4)({marginTop:m(e),marginBottom:m(t)},(0,s.$_)(c._fM,{marginTop:u(e),marginBottom:u(t)}));var e,t},[o.desktopBottom,o.desktopTop]);return x(o.desktopAppearance,n.appearanceWidthContext)&&"full"!==o.desktopAppearance?a.createElement(i.x,{appearanceWidth:"full"},a.createElement(i.x,{appearanceWidth:r.appearanceWidth,hasGap:r.hasGap,css:d},e.children)):a.createElement(i.x,{appearanceWidth:r.appearanceWidth,hasGap:r.hasGap,css:d},e.children)});function b(e,t){return null!=t?t:e}function x(e,t){return"narrow"===t?"narrow"!==e:"normal"===t?"wide"===e||"full"===e:"wide"===t&&"full"===e}function y(e){const t=(0,o.c)(5),{appearance:n,shouldWrap:i,defaultAppearance:r,children:l}=e;let s;return t[0]!==n||t[1]!==l||t[2]!==r||t[3]!==i?(s=i&&n?a.createElement(h,{appearance:n,defaultAppearance:r},l):a.createElement(a.Fragment,null,l),t[0]=n,t[1]=l,t[2]=r,t[3]=i,t[4]=s):s=t[4],s}const w=(0,a.createContext)(!1);function T(e){const t=(0,o.c)(2),{children:n}=e;let i;return t[0]!==n?(i=a.createElement(w.Provider,{value:!0},n),t[0]=n,t[1]=i):i=t[1],i}function v(e){const t=(0,o.c)(3),n=(0,r.YY)(),i=(0,a.useContext)(w),l=!n&&!i;let s;return t[0]!==e||t[1]!==l?(s=a.createElement(y,g({shouldWrap:l},e)),t[0]=e,t[1]=l,t[2]=s):s=t[2],s}}}]);
3//# sourceMappingURL=2816.chunk.30fb8baae514a123f8b9.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.