(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2812],{80969:function(e,t,n){Promise.resolve().then(n.bind(n,57615)),Promise.resolve().then(n.bind(n,29714)),Promise.resolve().then(n.bind(n,31157)),Promise.resolve().then(n.bind(n,92320)),Promise.resolve().then(n.bind(n,64996)),Promise.resolve().then(n.bind(n,39617)),Promise.resolve().then(n.bind(n,38124))},57615:function(e,t,n){"use strict";n.d(t,{ClientSideEventPage:function(){return B}});var r=n(35351),i=n(12321),l=n(14007),o=n(38859),a=n(29092),c=n.n(a);function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var u=(0,o.forwardRef)(function(e,t){var n=e.color,r=e.size,i=void 0===r?24:r,l=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,["color","size"]);return o.createElement("svg",s({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:void 0===n?"currentColor":n,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),o.createElement("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),o.createElement("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),o.createElement("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),o.createElement("line",{x1:"3",y1:"10",x2:"21",y2:"10"}))});u.propTypes={color:c().string,size:c().oneOfType([c().string,c().number])},u.displayName="Calendar";var d=n(17743),v=n(3518),h=n(55362),f=n(29543),m=n(53560),p=n(53426),g=n(80151),x=n(63881),j=n(5344),y=n(34031),b=e=>{let{event:t}=e;return(0,r.jsxs)(i.xuv,{position:"relative",children:[(0,r.jsx)(j.l,{image:t.image,aspectRatio:1.8,resolution:{base:540,sm:1080,lg:2160}}),(0,r.jsx)(y.h,{event:t,fontSize:{base:"1xl",sm:"2xl",md:"3xl"}})]})},w=n(65070),k=n(71342),O=n(15644),T=n(39419),D=n(30744);let S=e=>{let{label:t,children:n,...l}=e;return(0,r.jsxs)(i.kCb,{align:"flex-start",...l,children:[(0,r.jsx)(i.X6q,{as:"h2",fontSize:"md",minWidth:"5rem",marginRight:"1rem",children:t}),(0,r.jsx)(i.xuv,{maxWidth:{base:"unset",md:"14rem"},_firstLetter:{textTransform:"uppercase"},children:n})]})};var P=n(79792);let _=(e,t)=>{let n=(0,P.Fg)(!(0,P.RL)(t));return(0,O.p6)(e,n,t)},Z=e=>{let{children:t,color:n=i.O9T.statusRed}=e;return(0,r.jsxs)(i.xvT,{color:n,fontWeight:"bold",whiteSpace:"nowrap",children:["– ","\xa0",t]})},E=e=>{var t;return!!e.startDate&&(e.startDate>(0,l.dM)()||e.startDate==(0,l.dM)()&&(null!==(t=e.eventEnd)&&void 0!==t?t:"00:00")>(0,l.ZD)())},C=e=>{let{t,lang:n}=(0,v.$)(),{eventStatus:l,eventStart:o,eventEnd:a,startDate:c}=e.repeatedDate,s=(0,P.k3)(l),u=(0,P.dq)(l),d=!s&&!u&&(o&&o!==e.event.eventStart||a&&a!==e.event.eventEnd);return(0,r.jsx)(i.HCh,{paddingLeft:".25em",children:(0,r.jsxs)(i.Ugi,{children:[(0,r.jsx)(D.Z,{_firstLetter:{textTransform:"uppercase"},href:(0,T.DW)(e.repeatedDate),whiteSpace:"nowrap",children:c&&_(n,c)}),s&&(0,r.jsx)(Z,{children:t("Avlyst")}),u&&(0,r.jsx)(Z,{children:t("Fullt")}),d&&(0,r.jsxs)(Z,{color:i.O9T.statusYellow,children:[t("Tidspunkt")," ",o,a&&" – ".concat(a)]})]})},e.repeatedDate._id)};var z=e=>{var t,n;let{event:a}=e,{t:c}=(0,v.$)(),[s,u]=(0,o.useState)(!1);if(!(0,l.VP)(a))return null;let d=null===(n=a.series.repeatedDates)||void 0===n?void 0:null===(t=n.filter(E))||void 0===t?void 0:t.filter(e=>e.startDate!==a.startDate);if(!(null==d?void 0:d.length))return null;let h=null==d?void 0:d.slice(0,s?Number.POSITIVE_INFINITY:3);return(0,r.jsxs)(S,{label:c("Flere arrangementer i denne serien"),flexDirection:"column",children:[(0,r.jsx)(i.aVo,{paddingTop:"0.5rem",spacing:"0.5rem",children:null==h?void 0:h.map(e=>(0,r.jsx)(C,{repeatedDate:e,event:a},e._id))}),!s&&d.length>h.length&&(0,r.jsxs)(i.rUS,{marginY:".5em",as:"button",onClick:()=>u(!0),display:"flex",alignItems:"center",gap:".25em",children:[(0,r.jsx)(k.Z,{size:"1em"})," ",c("Vis alle")]})]})},I=n(56385),M=n(13626),R=e=>{let{registration:t,registrationUrlOrEmailOrPhone:n,digitalTicket:l,ticketInfo:o}=e,{t:a,ts:c}=(0,v.$)();return"open"!==t&&("registration"!==t||n)&&("ticket"!==t||!l||n)&&("ticket"!==t||l||c(o))?"ticket"!==t||l?(0,I.hj)(Number(n))?(0,r.jsx)(S,{label:a("ticket"===t?"Billetter":"P\xe5melding"),alignItems:"flex-start",children:(0,r.jsxs)(i.kCb,{flexDirection:"column",children:[(0,r.jsxs)(i.xvT,{as:"span",whiteSpace:"nowrap",children:[a("Telefon"),":"]}),(0,r.jsx)(i.rUS,{href:"tel:".concat(n),wordBreak:"break-all",children:n})]})}):(0,P.pw)(n)?(0,r.jsx)(S,{label:a("ticket"===t?"Billetter":"P\xe5melding"),alignItems:"flex-start",children:(0,r.jsxs)(i.kCb,{flexDirection:"column",children:[(0,r.jsx)(i.xvT,{as:"span",whiteSpace:"nowrap",children:a("Send e-post til:")}),(0,r.jsx)(i.rUS,{href:"mailto:".concat(n),wordBreak:"break-all",children:n})]})}):(0,r.jsx)(i.zxk,{as:"a",href:n,variant:"primary",rightIcon:(0,r.jsx)(M.Z,{size:"1em"}),children:a("ticket"===t?"Kj\xf8p billett":"G\xe5 til p\xe5melding")}):(0,r.jsx)(S,{label:a("Billetter"),children:c(o)}):null};let W={fontWeight:"semibold"};var L=e=>{let{registration:t}=e,{t:n}=(0,v.$)();return"registration"===t?(0,r.jsx)(i.xvT,{color:i.O9T.statusYellow,...W,children:n("Gratis - krever p\xe5melding")}):"ticket"===t?(0,r.jsx)(i.xvT,{color:i.O9T.statusYellow,...W,children:n("Arrangementet krever billett")}):(0,r.jsx)(i.xvT,{color:i.O9T.statusGreen,...W,children:n("Gratis - ingen p\xe5melding")})};let q=e=>{var t,n;let{event:o}=e,{t:a,ts:c,lang:s}=(0,v.$)();return o?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.Z,{title:a("Til arrangementer"),url:"/arrangementer?scrollRestoration=true"}),(0,r.jsx)(f.d,{marginTop:"2rem",children:(0,r.jsxs)(i.Kqy,{spacing:"1rem",children:[(0,r.jsxs)(i.Kqy,{spacing:1,children:[(0,r.jsx)(i.X6q,{as:"h1",children:c(o.title)}),(0,r.jsx)(x.X,{fontSize:"xs",event:o}),(0,r.jsx)(p.I,{doc:{_id:(0,l.VP)(o)?o.series.id:o._id,_type:"event"}}),o.teaser&&(0,r.jsx)(i.xvT,{fontSize:"lg",marginTop:"1rem",children:c(o.teaser)})]}),(0,r.jsx)(b,{event:o}),(0,P.v5)(o.eventStatus)&&(0,r.jsx)(L,{registration:o.registration}),(0,P.X2)(o)&&!(0,P.k3)(o.eventStatus)&&(0,r.jsx)(i.bZj,{status:"warning",marginTop:{base:"2rem",md:"0"},children:a("Dette arrangementet er avholdt")}),!(0,P.v5)(o.eventStatus)&&(0,r.jsx)(i.bZj,{status:"warning",children:a((0,P.k3)(o.eventStatus)?"Dette arrangementet er avlyst":"Dette arrangementet er fullt")}),(0,r.jsxs)(i.kCb,{as:"section",alignItems:"baseline",direction:{base:"column",md:"row"},gap:"2rem 4rem",children:[(0,r.jsxs)(i.Kqy,{spacing:"2rem",children:[(0,r.jsxs)(i.Kqy,{spacing:".5rem",children:[(0,r.jsx)(S,{label:a("Dato"),children:(0,P.lT)(s,o)}),!o.allDay&&(0,r.jsx)(S,{label:a("Tid"),children:(0,P.wI)(o)}),(0,r.jsx)(S,{label:a("Sted"),children:(0,r.jsx)(w.s,{event:o})}),c(o.organizer)&&(0,r.jsx)(S,{label:a("Arrang\xf8r"),children:c(o.organizer)})]}),(0,r.jsxs)(i.Kqy,{children:[(0,P.v5)(o.eventStatus)&&(0,r.jsx)(R,{registration:o.registration,registrationUrlOrEmailOrPhone:o.registrationUrlOrEmailOrPhone,digitalTicket:o.digitalTicket,ticketInfo:o.ticketInfo}),!(0,P.X2)(o)&&(0,r.jsx)(i.zxk,{as:"a",variant:"secondary",href:"/api/internal/".concat(s,"/ical?idOrKey=").concat(o._id),onClick:()=>(0,d.xb)("Arrangement:Ical"),rightIcon:(0,r.jsx)(u,{size:"1em"}),children:a("Legg til i kalender")})]}),(0,r.jsx)(z,{event:o})]}),(0,r.jsx)(m.Z,{blocks:c(o.body),maxW:"100%"})]}),(null!==(n=null===(t=o.relevantPublications)||void 0===t?void 0:t.length)&&void 0!==n?n:0)>0&&(0,r.jsx)(i.X6q,{as:"h2",size:"lg",children:a("Relatert litteratur")}),(0,r.jsx)(g.n,{publications:o.relevantPublications,as:"section"})]})})]}):null};var V=n(74391);let B=e=>(0,r.jsx)(V.U,{sanityData:e.sanityData,children:e=>{let{event:t}=e;return(0,r.jsx)(q,{event:t})}})},33052:function(e,t,n){"use strict";n.d(t,{DeveloperMetricsProvider:function(){return a},Q:function(){return o}});var r=n(35351),i=n(38859);let l=(0,i.createContext)({sanityDataEntries:[],addDataEntry:()=>null}),o=()=>(0,i.useContext)(l),a=e=>{let[t,n]=(0,i.useReducer)((e,t)=>[...e.filter(e=>{var n,r;return(null===(n=e._previewConfig)||void 0===n?void 0:n.query)!==(null===(r=t._previewConfig)||void 0===r?void 0:r.query)}),t],[]);return(0,r.jsx)(l.Provider,{value:{sanityDataEntries:t,addDataEntry:n},children:e.children})}},74391:function(e,t,n){"use strict";n.d(t,{U:function(){return o}});var r=n(67540),i=n(60159),l=n(33052);let o=e=>{var t,n;if(!(null==e?void 0:null===(t=e.sanityData)||void 0===t?void 0:t._raw_data)||!(null==e?void 0:null===(n=e.sanityData)||void 0===n?void 0:n._previewConfig))throw Error("Missing preview data and/or preview config. Did you forget to send it as props?");let[o]=(0,r.yR)(e.sanityData._raw_data,e.sanityData._previewConfig.query,e.sanityData._previewConfig.queryParams),{addDataEntry:a}=(0,l.Q)();return(0,i.Z)(()=>{a(e.sanityData)}),e.children(o)}},82080:function(e,t,n){"use strict";var r=n(35351),i=n(12321);t.Z=e=>{let{children:t}=e;return(0,r.jsx)(i.xuv,{fontSize:"0.8rem",fontWeight:"600",minHeight:"0.8rem",children:t})}},55362:function(e,t,n){"use strict";var r=n(35351),i=n(29543),l=n(5446);t.Z=e=>{let{title:t,url:n,...o}=e;return(0,r.jsx)(i.H,{...o,children:(0,r.jsx)(l.Z,{url:n,title:t,arrowLeft:!0,fontSize:".8rem",fontWeight:"normal"})})}},30744:function(e,t,n){"use strict";var r=n(35351),i=n(12321),l=n(38859),o=n(39614);let a=(0,l.forwardRef)((e,t)=>{let{href:n,linkComponent:l,nextLinkProps:a,...c}=e,s=null!=l?l:i.rUS;return(0,r.jsx)(o.v,{href:n,passHref:!0,legacyBehavior:!0,...a,children:(0,r.jsx)(s,{ref:t,...c})})});t.Z=a},35733:function(e,t,n){"use strict";var r=n(35351),i=n(12321),l=n(38859),o=n(30744);let a=(0,l.forwardRef)((e,t)=>(0,r.jsx)(o.Z,{linkComponent:i.AB5,...e,ref:t}));t.Z=a},39614:function(e,t,n){"use strict";n.d(t,{v:function(){return a}});var r=n(35351),i=n(44165),l=n(38859),o=n(3518);let a=(0,l.forwardRef)((e,t)=>{let{href:n,...l}=e,{lang:a}=(0,o.$)();return(0,r.jsx)(i.default,{href:"/".concat(a).concat(n),...l,ref:t})})},5446:function(e,t,n){"use strict";var r=n(35351),i=n(12321),l=n(13921),o=n(85123),a=n(39614);t.Z=e=>{let{url:t,title:n="Vis alle",arrowLeft:c,...s}=e;return(0,r.jsx)(i.zxk,{href:t,as:a.v,size:"md",variant:"link",rightIcon:c?void 0:(0,r.jsx)(l.Z,{}),leftIcon:c?(0,r.jsx)(o.Z,{}):void 0,color:"currentColor",...s,children:n})}},63881:function(e,t,n){"use strict";n.d(t,{X:function(){return s}});var r=n(35351),i=n(38859),l=n(12321),o=n(14007),a=n(3518),c=n(73642);let s=e=>{var t;let{event:n,...s}=e,{ts:d}=(0,a.$)(),v=(0,c.SP)();return(0,r.jsxs)(l.Ugi,{paddingTop:".25rem",flexWrap:"wrap",...s,children:[(0,r.jsx)(u,{...v.colors.lightaccent1.css,children:d(n.eventType)}),null===(t=n.targetAudiences)||void 0===t?void 0:t.map(e=>(0,i.createElement)(u,{...v.colors.lightaccent2.css,key:e},d(o.dq[e])))]})},u=e=>(0,r.jsx)(l.xuv,{fontWeight:600,padding:".1em .5em",borderRadius:".25em",textTransform:"uppercase",...e})},65070:function(e,t,n){"use strict";n.d(t,{s:function(){return s}});var r=n(35351),i=n(12321),l=n(53722),o=n(39419),a=n(3518),c=n(30744);let s=e=>{var t;let{event:n,...s}=e,{t:u,ts:d}=(0,a.$)();return n.externalLocation?(0,r.jsxs)(i.xvT,{display:"flex",alignItems:"center",gap:".3rem",...s,children:[(0,r.jsx)(i.TXu,{children:u("Avholdes ikke i biblioteket")}),(0,r.jsx)(i.ua7,{label:u("Avholdes ikke i biblioteket"),children:(0,r.jsx)(i.xuv,{as:"span",tabIndex:0,children:(0,r.jsx)(l.Z,{"aria-hidden":!0,color:i.O9T.statusYellow,size:"1em"})})}),n.location]}):(0,r.jsxs)(i.xvT,{...s,children:[n.library&&(0,r.jsx)(c.Z,{variant:"plain",href:(0,o.DW)(n.library),children:d(null===(t=n.library)||void 0===t?void 0:t.name)}),n.location&&" - ".concat(n.location)]})}},34031:function(e,t,n){"use strict";n.d(t,{h:function(){return a},v:function(){return o}});var r=n(35351),i=n(12321),l=n(3518);let o=e=>{let{event:t}=e,n=c(t);return n?(0,r.jsxs)(r.Fragment,{children:[n.toUpperCase()," - "]}):null},a=e=>{let{event:t,fontSize:n}=e,l=c(t);return l?"cancelled"===t.eventStatus?(0,r.jsx)(s,{fontSize:n,background:i.O9T.statusRed,color:"white",children:l}):(0,r.jsx)(s,{fontSize:n,children:l}):null},c=e=>{let{eventStatus:t,registration:n}=e,{t:r}=(0,l.$)();switch(t){case"cancelled":return r("Avlyst");case"full":return r("ticket"===n?"Utsolgt":"Fullt");case"almostFull":return r("ticket"===n?"Snart utsolgt":"Snart fullt");default:return null}},s=e=>{let{children:t,...n}=e;return(0,r.jsx)(i.xuv,{position:"absolute",top:"0",bottom:"0",left:"0",right:"0",overflow:"hidden",pointerEvents:"none",children:(0,r.jsx)(i.xvT,{position:"absolute",fontSize:"2em",textAlign:"center",right:"0em",top:"0",transform:"rotate(45deg) translate(32.5%, -75%)",transformOrigin:"center",fontWeight:"600",paddingX:"5em",whiteSpace:"nowrap",background:i.O9T.accentYellow,textTransform:"uppercase",opacity:.95,...n,children:t})})}},79792:function(e,t,n){"use strict";n.d(t,{Fg:function(){return a},RL:function(){return o},X2:function(){return s},dq:function(){return d},k3:function(){return u},lT:function(){return c},pw:function(){return h},v5:function(){return v},wI:function(){return l}});var r=n(14007),i=n(15644);let l=e=>{var t;return e.eventEnd?"".concat(e.eventStart," - ").concat(e.eventEnd):null!==(t=e.eventStart)&&void 0!==t?t:""},o=e=>!e||new Date(e).getFullYear()===new Date().getFullYear(),a=(e,t)=>t?e?"PP":"EEEE, do MMMM":e?"EEEE, PPP":"EEEE, do MMMM",c=(e,t)=>{let n=!o(t.startDate)||!o(t.endDate),r=a(n),l=a(n,!0);if(t.allDay&&t.startDate!==t.endDate){let n=(0,i.p6)(e,l,t.startDate),r=(0,i.p6)(e,l,t.endDate);return"".concat(n," til ").concat(r)}return(0,i.p6)(e,r,t.startDate)},s=e=>{let{allDay:t,endDate:n,startDate:i}=e;return t&&n?!new r.Ov(n).isTodayOrLater:!!i&&!new r.Ov(i).isTodayOrLater},u=e=>"cancelled"===e,d=e=>"full"===e,v=e=>!u(e)&&!d(e),h=e=>!!(null==e?void 0:e.includes("@"))},44782:function(e,t,n){"use strict";var r=n(35351),i=n(12321),l=n(70851),o=n(39419),a=n(3518),c=n(99559),s=n(35733),u=n(29714),d=n(15751),v=n(93717);let h=e=>(null==e?void 0:e._type)==="employee",f=e=>(null==e?void 0:e._type)==="site",m=e=>{let{createdBy:t}=e;if(f(t))return(0,r.jsx)(v.x,{image:t.coatOfArms,resolution:200,width:"1.9rem",boxShadow:"none",borderRadius:"none"});let n=h(t)&&!!(null==t?void 0:t.showEmployee);return(0,r.jsx)(d.Z,{employee:n?t:void 0,size:"2rem",resolution:200,fontSize:"sm",hideCaption:!0})};t.Z=e=>{var t,n,d;let{createdBy:v}=e,{t:p,ts:g}=(0,a.$)(),{site:x}=(0,u.useCommonData)(),j=h(v)&&!!(null==v?void 0:v.showEmployee),y=null!==(d=h(v)?null===(n=v.affiliations)||void 0===n?void 0:null===(t=n[0])||void 0===t?void 0:t.entity:v)&&void 0!==d?d:x;return(0,r.jsx)(i.fGe,{children:(0,r.jsxs)(i.kCb,{gap:".5rem",role:"group",children:[(0,r.jsx)(m,{createdBy:v}),(0,r.jsxs)(i.Kqy,{spacing:0,fontSize:".7rem",lineHeight:".9rem",justifyContent:f(v)?"center":"",children:[j&&(0,r.jsx)(s.Z,{href:(0,o.DW)(v),_hover:(0,c.Z)({textDecoration:"underline"}),zIndex:10,children:(0,r.jsx)(i.xvT,{fontWeight:600,children:v.name})}),(!h(v)&&!f(v)||"employee"===v._type&&!j)&&(0,r.jsx)(i.xvT,{fontWeight:600,children:p("Ansatt")}),y&&(0,r.jsx)(i.xvT,{noOfLines:1,children:(0,l.R9)(null==y?void 0:y.name)?g(null==y?void 0:y.name):null==y?void 0:y.name})]})]})})}},15751:function(e,t,n){"use strict";var r=n(35351),i=n(12321),l=n(5256),o=n(3518),a=n(73642),c=n(65051);t.Z=e=>{var t;let{employee:n,resolution:s,size:u,fontSize:d="md",hideCaption:v=!1}=e,{t:h}=(0,o.$)(),f=(0,a.SP)().colors.darkaccent4;return(null==n?void 0:null===(t=n.image)||void 0===t?void 0:t.asset)&&s?(0,r.jsx)(i.xuv,{width:u,height:u,children:(0,r.jsx)(c.Z,{image:null==n?void 0:n.image,customNextImageProps:{alt:h("Profilbilde av {ansattNavn}",{ansattNavn:n.name})},aspectRatio:1,resolution:s,borderRadius:"full",hideCaption:v})}):(0,r.jsx)(i.qEK,{name:null==n?void 0:n.name,...f.css,fontWeight:"600",width:u,height:u,size:d,icon:(0,r.jsx)(l.Z,{width:"1.25rem",height:"1.25rem"})})}},93717:function(e,t,n){"use strict";n.d(t,{x:function(){return a}});var r=n(35351),i=n(12321),l=n(3518),o=n(41207);function a(e){let{image:t,resolution:n,boxShadow:a="md",alt:c,customNextImageProps:s,hideCaption:u,...d}=e,{t:v}=(0,l.$)();return(null==t?void 0:t.asset)?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.xuv,{lineHeight:0,borderRadius:"0.5em",boxShadow:a,position:"relative",overflow:"hidden",...d,children:(0,r.jsx)(o.y,{image:t,resolution:n,aspectRatio:"original",customNextImageProps:{alt:c,...s}})}),t.creator&&!u&&(0,r.jsx)(i.xuv,{fontStyle:"italic",marginTop:"0.1rem",fontSize:"sm",opacity:.8,position:"absolute",top:"100%",left:"50%;",transform:"translateX(-50%)",whiteSpace:"nowrap",children:v("Foto: {opphavsPerson}",{opphavsPerson:t.creator})})]}):null}},5344:function(e,t,n){"use strict";n.d(t,{l:function(){return c}});var r=n(35351),i=n(38859),l=n(3846),o=n(65051);let a=(e,t)=>{let n=l.AV.indexOf(t);return l.AV.slice(n+1).find(t=>e.includes(t))},c=e=>{let{resolution:t,...n}=e;if("number"==typeof t)return(0,r.jsx)(o.Z,{resolution:t,...n});if(!t)return null;let c=Object.keys(t);return(0,r.jsx)(r.Fragment,{children:c.filter(l.zn).map(e=>{var r;let l={base:"none"};l[e]="block";let s=a(c,e);return s&&(l[s]="none"),(0,i.createElement)(o.Z,{...n,key:e,resolution:null!==(r=t[e])&&void 0!==r?r:0,chakraProps:{display:l}})})})}},7191:function(e,t,n){"use strict";n.d(t,{y:function(){return o}});var r=n(35351),i=n(99311),l=n(93717);let o=e=>{let{publication:t,publication:{image:n},alt:o="",...a}=e;return(0,r.jsx)(l.x,{image:n,alt:o||(0,i.X)(t)||"",hideCaption:!0,...a})}},62904:function(e,t,n){"use strict";var r=n(35351),i=n(71805),l=n(12321),o=n(14007),a=n(73642),c=n(7191);let s={transition:".9s",_groupHover:{transition:".5s",transform:"scale(1.05)"}};t.Z=e=>{let{publication:t,resolution:n,imageWidth:u,...d}=e,v=(0,a.SP)();return(0,r.jsx)(l.xuv,{...d,children:(0,o.pu)(t)?(0,r.jsx)(c.y,{borderRadius:".5rem",publication:t,resolution:null!=n?n:250,maxWidth:u,...s}):(0,r.jsx)(l.rjZ,{css:"aspect-ratio: .7;",borderRadius:".5rem",placeItems:"center",width:u,"aria-hidden":!0,...v.colors.darkaccent4.css,...s,children:(0,r.jsx)(i.vJ,{fontSize:"2em"})})})}},23071:function(e,t,n){"use strict";var r=n(35351),i=n(12321),l=n(14007),o=n(64539),a=n(3518),c=n(82080);t.Z=e=>{let{targetAudiences:t}=e,{ts:n}=(0,a.$)();return(null==t?void 0:t.length)?(0,r.jsx)(c.Z,{children:(0,r.jsx)(i.Ugi,{gap:".5em",divider:(0,r.jsx)(r.Fragment,{children:"•"}),children:(0,o.DY)(t,l.FV).map((e,t)=>(0,r.jsx)("span",{children:n(l.dq[e])},t))})}):null}},80151:function(e,t,n){"use strict";n.d(t,{n:function(){return h}});var r=n(35351),i=n(12321),l=n(3518),o=n(55362),a=n(29543),c=n(53426),s=n(44782),u=n(23071),d=n(93391),v=n(20705);let h=e=>{let{publications:t,minPublicationWidth:n="8rem",gridGap:l="1rem",publicationHeadingSize:o="h3",...a}=e;return(null==t?void 0:t.length)?(0,r.jsx)(i.rjZ,{templateColumns:"repeat(auto-fill, minmax(".concat(n,", 1fr))"),gridGap:l,alignItems:"end",...a,children:null==t?void 0:t.map(e=>(0,r.jsx)(v.Z,{publication:e,headingSize:o},e._key))}):null};t.Z=e=>{var t;let{list:n}=e,{t:v,ts:f}=(0,l.$)(),m=(0,d.d)(n);return n?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.xuv,{...m.css,children:[(0,r.jsx)(o.Z,{paddingTop:"1.5rem",title:v("Til leseforslag"),url:"/lister"}),(0,r.jsx)(a.d,{paddingTop:"1rem",paddingBottom:"3rem",children:(0,r.jsxs)(i.kCb,{justifyContent:"space-between",gridGap:"1.5rem",flexWrap:{base:"wrap",lg:"nowrap"},children:[(0,r.jsxs)(i.gCW,{alignItems:"start",children:[(0,r.jsx)(u.Z,{targetAudiences:n.targetAudiences}),(0,r.jsx)(i.X6q,{as:"h1",size:"lg",children:f(n.title)})]}),(0,r.jsxs)(i.Kqy,{flexGrow:2,maxWidth:"30rem",spacing:"1rem",children:[(0,r.jsx)(i.xvT,{children:f(n.teaser)}),(0,r.jsx)(i.xvT,{children:f(n.description)}),(0,r.jsx)(s.Z,{createdBy:n.createdBy})]})]})})]}),(0,r.jsx)(a.d,{margin:"2rem auto 5rem",children:(0,r.jsxs)(i.Kqy,{direction:"column",spacing:"2rem",children:[(0,r.jsx)(c.I,{doc:n}),(0,r.jsxs)(i.X6q,{as:"h2",size:"sm",children:[null===(t=n.publications)||void 0===t?void 0:t.length," ",v("titler")]}),(0,r.jsx)(h,{publications:n.publications,publicationHeadingSize:"h2"})]})})]}):null}},20705:function(e,t,n){"use strict";var r=n(35351),i=n(12321),l=n(23626),o=n(72983),a=n(62904),c=n(29714);t.Z=e=>{var t,n;let{publication:s,headingSize:u}=e,[d]=null!==(n=null===(t=s.title)||void 0===t?void 0:t.split(":"))&&void 0!==n?n:[],{site:v}=(0,c.useCommonData)(),h=(0,l.S)({publication:s,work:void 0,site:v}),f=(0,o.M)(s);return(0,r.jsx)(i.fGe,{children:(0,r.jsxs)(i.Kqy,{direction:"column",justifyContent:"flex-end",role:"group",children:[(0,r.jsx)(a.Z,{publication:s,resolution:300}),(0,r.jsxs)(i.kCb,{flexDir:"column",minHeight:"4.3rem",children:[(0,r.jsx)(i.AB5,{href:h,_groupHover:{textDecoration:"underline"},rel:"nofollow",children:(0,r.jsx)(i.X6q,{as:u,size:"xs",noOfLines:3,lang:f,children:d})}),(0,r.jsx)(i.xvT,{fontSize:"xs",children:s.author})]})]})})}},93391:function(e,t,n){"use strict";n.d(t,{d:function(){return u}});var r=n(57152),i=n(64539),l=n(73642),o=n(29714);let a=e=>e.slice().map(e=>{let[t,n]=e;return{color:t,sort:(0,r.F9)(n)}}).sort((e,t)=>e.sort-t.sort).map(e=>{let{color:t}=e;return t}),c=e=>void 0!==e[0]&&void 0!==e[1],s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=a((0,i.$R)(t,e).filter(c)),r=n.length;return Object.fromEntries(e.map((e,t)=>[e,n[t%r]]))},u=e=>{var t,n;let i=(0,l.SP)(),a=[i.colors.lightaccent1,i.colors.lightaccent3,i.colors.darkaccent3,i.colors.lightaccent2,i.colors.lightaccent4,i.colors.pop2],c=null===(t=(0,o.useCommonData)().bookListStyling)||void 0===t?void 0:t.bookListIds;return e&&null!==(n=s(c,a)[e._id])&&void 0!==n?n:(0,r.AQ)(a)}},77921:function(e,t,n){"use strict";n.d(t,{U4:function(){return a},em:function(){return s}});var r=n(12321),i=n(57152),l=n(42874),o=n.n(l);function a(e){return e.match(/^#[0-9,a,b,c,d,e,f]{6}$/i)||console.error('I only understand hex-colors, got: "'.concat(e,'"')),o().hex.hsl(e)[2]>50}let c=[r.O9T.accentBlueDark,r.O9T.accentGreen,r.O9T.accentPeach,r.O9T.accentPurple,r.O9T.lightGreen,r.O9T.lightPeach,r.O9T.accentBlueMedium],s=e=>{let t=Math.floor((0,i.F9)(e)*c.length);return c[t]}},99311:function(e,t,n){"use strict";n.d(t,{X:function(){return i}});var r=n(14007);let i=e=>{var t,n;let i=l(e)?(0,r.aL)(null!==(n=e.author)&&void 0!==n?n:""):null===(t=e.authors)||void 0===t?void 0:t.map(r.aL).join(", ");return e.title&&i?'Omslag: "'.concat(e.title,'" av ').concat(i):e.title?'Omslag: "'.concat(e.title,'"'):i?"Omslag: ".concat(i):(console.error("Trying to generate cover image alt text without title or author"),"Omslag")},l=e=>!!e&&"object"==typeof e&&(null==e?void 0:e._type)==="publication"},15644:function(e,t,n){"use strict";n.d(t,{_Q:function(){return v},p6:function(){return u}});var r=n(70851),i=n(11783),l=n.n(i),o=n(93136),a=n(51333),c=n(14514),s=n(72326);function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Pp",n=arguments.length>2?arguments[2]:void 0;if("string"!=typeof n)return"Ukjent dato";n.match(/^\d{4}-\d{2}-\d{2}.*/)||console.error("formatDate is meant to format dates on the form YYYY-MM-DD");let i=r.j4[e];try{return l()(new Date(n),"UTC",t,{locale:i})}catch(e){return console.error("Could not format date:"+n,e),n}}let d=r.j4.nb,v=(e,t)=>{if(!e||!t)return;let n=new Date(e),r=new Date(t);if(!(0,s.Z)(n)||!(0,s.Z)(r))return;let i=(0,o.Z)(n,"d.",{locale:d}),l=(0,o.Z)(r,"d.",{locale:d}),u=(0,o.Z)(n,"MMMM",{locale:d}),v=(0,o.Z)(r,"MMMM",{locale:d}),h=(0,o.Z)(n,"yyyy"),f=(0,o.Z)(r,"yyyy");if(!(0,c.Z)(n,r))return"".concat(i," ").concat(u," ").concat(h," - ").concat(l," ").concat(v," ").concat(f);let m=(0,c.Z)(n,new Date)?"":" ".concat(h);return(0,a.Z)(n,r)&&(0,c.Z)(n,r)?"".concat(i," - ").concat(l," ").concat(u).concat(m):"".concat(i," ").concat(u," - ").concat(l," ").concat(v).concat(m)}},39419:function(e,t,n){"use strict";n.d(t,{D5:function(){return x},DW:function(){return m}});var r=n(64709),i=n(57152),l=n(14007);let o=e=>(null==e?void 0:e.type)==="Work",a=e=>(null==e?void 0:e.type)==="Person"||(null==e?void 0:e.type)==="CollectiveAgent",c=e=>(null==e?void 0:e.type)==="Subject",s=e=>(null==e?void 0:e.type)==="FacetTerm",u=e=>(null==e?void 0:e.type)==="CollectionExpression",d=e=>(null==e?void 0:e.type)==="Manifestation",v=e=>(0,l.jG)(e),h=e=>{if((0,l.Ub)(e)){let t=(0,i.V3)(p(e.name));return"".concat(t,"_").concat(null==e?void 0:e._id)}if(!(null==e?void 0:e.code))throw Error("Could not generate path for digital library service ".concat(JSON.stringify(e)));return(0,l.Kh)(e.code)},f=e=>"uniform_title_music"===e.titleType,m=e=>{if(o(e))return"/samling/verk/".concat((0,i.V3)(f(e.title)?(0,r.zP)(e):e.title.mainTitle),"_").concat(e.id);if(d(e))return"/samling/verk/".concat(e.workId,"/utgave/").concat((0,i.V3)(e.title.mainTitle),"_").concat(e.id);if(a(e)){let{id:t,identifiers:n,name:r}=e;return n.norafId?"/samling/personer/".concat((0,i.V3)(p(r)),"_b").concat(t,"-n").concat(n.norafId):"/samling/personer/".concat((0,i.V3)(p(r)),"_b").concat(t)}if(c(e))return"/samling/emner/".concat((0,i.V3)(p(e.name)),"_").concat(e.id);if(s(e))return"/samling/emner/".concat((0,i.V3)(e.name),"_").concat(e.value);if(v(e))return"/digitalt-bibliotek/".concat(h(e));if((0,l.aH)(e))return"/kampanje/".concat(l.Wd[e._type]);if(u(e))return"/samling/serie/".concat((0,i.V3)(e.title.mainTitle),"_").concat(e.workExpressed.id);switch(e._type){case"repeatedDateSummary":case"resolvedRepeatedEventOccurence":case"event":return"/arrangementer/".concat(g(e),"_").concat(null==e?void 0:e._id);case"library":return"/bibliotek/".concat(null==e?void 0:e.slug);case"employee":return"/ansatte/".concat((0,i.V3)(e.name),"_").concat(e._id);case"list":return"/lister/".concat((0,i.V3)(p(e.title)),"_").concat(e._id);case"recommendation":var t;return"/anbefalinger/".concat((0,i.V3)(null===(t=e.publication)||void 0===t?void 0:t.title),"_").concat(e._id);case"service":return"/tjenester/".concat((0,i.V3)(p(e.title)),"_").concat(e._id);case"staticPage":return"/info/".concat((0,i.V3)(p(e.title)),"_").concat(e._id);case"customCampaign":return"/kampanje/".concat((0,i.V3)(p(e.title)),"_").concat(e._id);default:{let t="Could not generate path for unkown document type: ".concat(e._type);throw console.error(t,{doc:e}),Error(t)}}},p=e=>{var t;return null!==(t=null==e?void 0:e.nn)&&void 0!==t?t:null==e?void 0:e.nb},g=e=>{let t=(0,i.V3)(p(e.title)),n=(0,i.RQ)(e.startDate,"dd-MMM").replace(".","");return n?"".concat(t,"-").concat(n):t},x="/personvern"},23626:function(e,t,n){"use strict";n.d(t,{S:function(){return i}}),n(39419),n(75160),n(57152);var r=n(92726);let i=e=>{let{publication:t}=e,n=null==t?void 0:t.isbn,i=null==t?void 0:t.id;return"/api/internal/link-to-publication?"+new URLSearchParams((0,r.lL)({isbn:n,publicationId:i})).toString()}},72983:function(e,t,n){"use strict";n.d(t,{$:function(){return o},M:function(){return a}});var r=n(70851),i=n(3518);let l=["no","nb","nn"],o=(e,t)=>{let n=(0,r.Rj)(e),i=(0,r.Rj)(t);return"no"===n||"no"===i?!!n&&!!i&&l.includes(n)&&l.includes(i):n===i},a=e=>{let{lang:t}=(0,i.$)(),n=(0,r.Rj)(null==e?void 0:e.language);return n&&!o(n,t)?n:void 0}},73642:function(e,t,n){"use strict";n.d(t,{SP:function(){return f},Xw:function(){return m}});var r=n(35351),i=n(12321),l=n(14007),o=n(38859),a=n(29714),c=n(77921);let s={header:i.O9T.white,search:i.O9T.lightPurple,footer:i.O9T.grey05,card:i.O9T.grey10,pop1:i.O9T.accentYellow,pop2:i.O9T.accentBlueMedium,darkaccent1:i.O9T.accentPurple,lightaccent1:i.O9T.lightPurple,darkaccent2:i.O9T.accentGreen,lightaccent2:i.O9T.lightGreen,darkaccent3:i.O9T.accentPeach,lightaccent3:i.O9T.lightPeach,darkaccent4:i.O9T.accentBlueDark,lightaccent4:i.O9T.lightBlue},u=Object.keys(s),d=e=>{var t;let n=!!(null==e?void 0:null===(t=e.customPalette)||void 0===t?void 0:t.useCustomPalette);return{colors:u.reduce((t,r)=>({...t,[r]:v(r,n,e)}),{}),useCustomPalette:n}},v=(e,t,n)=>{var r,i;let o=t&&(null==n?void 0:null===(i=n.customPalette)||void 0===i?void 0:null===(r=i[e])||void 0===r?void 0:r.color)||s[e],a=(0,c.U4)(o);return{css:{background:o,color:a?"gray.800":"white",_before:(0,l.Lk)("custom-palette-debug")?{content:'"'.concat(e," ").concat(o,'"'),opacity:.7,fontSize:".6rem",position:"absolute"}:void 0},isBright:a}},h=(0,o.createContext)(d()),f=()=>(0,o.useContext)(h),m=e=>{let{site:t}=(0,a.useCommonData)(),n=d(t);return(0,r.jsx)(h.Provider,{value:n,children:e.children})}},71342:function(e,t,n){"use strict";var r=n(38859),i=n(29092),l=n.n(i);function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var a=(0,r.forwardRef)(function(e,t){var n=e.color,i=e.size,l=void 0===i?24:i,a=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,["color","size"]);return r.createElement("svg",o({ref:t,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:void 0===n?"currentColor":n,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a),r.createElement("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),r.createElement("line",{x1:"5",y1:"12",x2:"19",y2:"12"}))});a.propTypes={color:l().string,size:l().oneOfType([l().string,l().number])},a.displayName="Plus",t.Z=a},5256:function(e,t,n){"use strict";var r=n(38859),i=n(29092),l=n.n(i);function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var a=(0,r.forwardRef)(function(e,t){var n=e.color,i=e.size,l=void 0===i?24:i,a=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,["color","size"]);return r.createElement("svg",o({ref:t,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:void 0===n?"currentColor":n,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a),r.createElement("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),r.createElement("circle",{cx:"12",cy:"7",r:"4"}))});a.propTypes={color:l().string,size:l().oneOfType([l().string,l().number])},a.displayName="User",t.Z=a}},function(e){e.O(0,[2321,8286,7152,4165,4722,8003,6417,5440,2874,4709,6922,9498,3582,4385,337,132,1779,3608,6411,4248,1744],function(){return e(e.s=80969)}),_N_E=e.O()}]);
//# sourceMappingURL=page-2a8e7532bb0c33d8.js.map