PageSourceSearch

https://www.is.fi/_next/static/chunks/8725-e06aeac6ce5df9c9.js

js is.fi collected 2026-10-01 08:58:45 UTC 58,587 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8725],{88725:(e,t,n)=>{let i;n.d(t,{RS:()=>t9,r5:()=>t4,fetchFacsimileReadingUrl:()=>t5,s2:()=>eX});var r,l=n(15039),a=n(14232),o=n(30083),s=n(41116),c=n(76984),u=n(37876),d=n(52333),f=n(81256),m=n(61016),p=n(18056),h=n(6765),g=n(18621),y=n(81389),x=n(18127);function b(e){let t={},n=(0,x.q)();for(let e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e]);for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(void 0===e[n]?delete t[n]:t[n]=e[n]);(0,x.E)(t)}var v=n(62357),w=n(25037),T=n(74928),j=n(70864);function A(e,t){this.v=e,this.k=t}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function k(e){var t,n;function i(t,n){try{var l=e[t](n),a=l.value,o=a instanceof A;Promise.resolve(o?a.v:a).then(function(n){if(o){var s="return"===t&&a.k?t:"next";if(!a.k||n.done)return i(s,n);n=e[s](n).value}r(!!l.done,n)},function(e){i("throw",e)})}catch(e){r(2,e)}}function r(e,r){2===e?t.reject(r):t.resolve({value:r,done:e}),(t=t.next)?i(t.key,t.arg):n=null}this._invoke=function(e,r){return new Promise(function(l,a){var o={key:e,arg:r,resolve:l,reject:a,next:null};n?n=n.next=o:(t=n=o,i(e,r))})},"function"!=typeof e.return&&(this.return=void 0)}k.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},k.prototype.next=function(e){return this._invoke("next",e)},k.prototype.throw=function(e){return this._invoke("throw",e)},k.prototype.return=function(e){return this._invoke("return",e)};let N=Object.entries,E=Object.setPrototypeOf,I=Object.isFrozen,C=Object.getPrototypeOf,D=Object.getOwnPropertyDescriptor,_=Object.freeze,P=Object.seal,O=Object.create,R="u">typeof Reflect&&Reflect,z=R.apply,L=R.construct;_||(_=function(e){return e}),P||(P=function(e){return e}),z||(z=function(e,t){for(var n=arguments.length,i=Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];return e.apply(t,i)}),L||(L=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return new e(...n)});let U=er(Array.prototype.forEach);Array.prototype.indexOf;let M=er(Array.prototype.lastIndexOf),$=er(Array.prototype.pop),B=er(Array.prototype.push);Array.prototype.slice;let F=er(Array.prototype.splice),H=Array.isArray,W=er(String.prototype.toLowerCase),Y=er(String.prototype.toString),q=er(String.prototype.match),J=er(String.prototype.replace),G=er(String.prototype.indexOf),Q=er(String.prototype.trim),K=er(Number.prototype.toString),V=er(Boolean.prototype.toString),X="u"<typeof BigInt?null:er(BigInt.prototype.toString),Z="u"<typeof Symbol?null:er(Symbol.prototype.toString),ee=er(Object.prototype.hasOwnProperty),et=er(Object.prototype.toString),en=er(RegExp.prototype.test),ei=(r=TypeError,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return L(r,t)});function er(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return z(e,t,i)}}function el(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:W;if(E&&E(e,null),!H(t))return e;let i=t.length;for(;i--;){let r=t[i];if("string"==typeof r){let e=n(r);e!==r&&(I(t)||(t[i]=e),r=e)}e[r]=!0}return e}function ea(e){let t=O(null);for(let i of N(e)){var n=function(e){if(Array.isArray(e))return e}(i)||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,i,r,l,a=[],o=!0,s=!1;try{r=(t=t.call(e)).next,!1;for(;!(o=(n=r.call(t)).done)&&(a.push(n.value),2!==a.length);o=!0);}catch(e){s=!0,i=e}finally{try{if(!o&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(s)throw i}}return a}}(i)||function(e){if(e){if("string"==typeof e)return S(e,2);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?S(e,2):void 0}}(i)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();let r=n[0],l=n[1];ee(e,r)&&(H(l)?t[r]=function(e){for(let t=0;t<e.length;t++)ee(e,t)||(e[t]=null);return e}(l):l&&"object"==typeof l&&l.constructor===Object?t[r]=ea(l):t[r]=l)}return t}function eo(e,t){for(;null!==e;){let n=D(e,t);if(n){if(n.get)return er(n.get);if("function"==typeof n.value)return er(n.value)}e=C(e)}return function(){return null}}let es=_(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ec=_(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),eu=_(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),ed=_(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ef=_(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),em=_(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ep=_(["#text"]),eh=_(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
1spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),eg=_(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ey=_(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ex=_(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),eb=P(/{{[\w\W]*|^[\w\W]*}}/g),ev=P(/<%[\w\W]*|^[\w\W]*%>/g),ew=P(/\${[\w\W]*/g),eT=P(/^data-[\-\w.\u00B7-\uFFFF]+$/),ej=P(/^aria-[\-\w]+$/),eA=P(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),eS=P(/^(?:\w+script|data):/i),ek=P(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),eN=P(/^html$/i),eE=P(/^[a-z][.\w]*(-[.\w]+)+$/i),eI=P(/<[/\w!]/g),eC=P(/<[/\w]/g),eD=P(/<\/no(script|embed|frames)/i),e_=P(/\/>/i),eP=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],eO=_(el({},eP)),eR=(i={},U(eP,e=>{i[e]=P(RegExp("</"+e+"(?=[\\t\\n\\f\\r />])","i"))}),_(i)),ez=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null,i="data-tt-policy-suffix";t&&t.hasAttribute(i)&&(n=t.getAttribute(i));let r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}},eL=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},eU=function(e,t,n,i){return ee(e,t)&&H(e[t])?el(i.base?ea(i.base):{},e[t],i.transform):n},eM=function(e,t,n){let i=ee(e,t)?e[t]:void 0;return i&&"object"==typeof i?ea(i):n()};var e$=function e(){let t,n,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"u"<typeof window?null:window,r=t=>e(t);if(r.version="3.4.16",r.removed=[],!i||!i.document||9!==i.document.nodeType||!i.Element)return r.isSupported=!1,r;let l=i.document,a=l,o=a.currentScript;i.DocumentFragment;let s=i.HTMLTemplateElement,c=i.Node,u=i.Element,d=i.NodeFilter;void 0===i.NamedNodeMap&&(i.NamedNodeMap||i.MozNamedAttrMap),i.HTMLFormElement;let f=i.DOMParser,m=i.trustedTypes,p=u.prototype,h=eo(p,"cloneNode"),g=eo(p,"remove"),y=eo(p,"removeAttributeNode"),x=eo(p,"nextSibling"),b=eo(p,"childNodes"),v=eo(p,"parentNode"),w=eo(p,"shadowRoot"),T=eo(p,"attributes"),j=c&&c.prototype?eo(c.prototype,"nodeType"):null,A=c&&c.prototype?eo(c.prototype,"nodeName"):null,S=c&&c.prototype?eo(c.prototype,"ownerDocument"):null,k=function(e){return j?j(e):e.nodeType},E=function(e){return A?A(e):e.nodeName};if("function"==typeof s){let e=l.createElement("template");e.content&&e.content.ownerDocument&&(l=e.content.ownerDocument)}let I="",C=!1,D=0,R=function(){if(D>0)throw ei('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},z=function(e){R(),D++;try{return t.createHTML(e)}finally{D--}},L=function(e){R(),D++;try{return t.createScriptURL(e)}finally{D--}},er=l,eP=er.implementation,e$=er.createNodeIterator,eB=er.createDocumentFragment,eF=er.getElementsByTagName,eH=a.importNode,eW=eL();r.isSupported="function"==typeof N&&"function"==typeof v&&eP&&void 0!==eP.createHTMLDocument;let eY=eA,eq=null,eJ=el({},[...es,...ec,...eu,...ef,...ep]),eG=null,eQ=el({}
1,[...eh,...eg,...ey,...ex]),eK=Object.seal(O(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),eV=null,eX=null,eZ=Object.seal(O(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),e0=!0,e1=!0,e2=!1,e3=!0,e8=!1,e4=!0,e5=!1,e6=!1,e9=null,e7=null,te=!1,tt=!1,tn=!1,ti=!1,tr=!0,tl=!1,ta="user-content-",to=!0,ts=!1,tc={},tu=null,td=el({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),tf=null,tm=el({},["audio","video","img","source","image","track"]),tp=null,th=el({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),tg="http://www.w3.org/1998/Math/MathML",ty="http://www.w3.org/2000/svg",tx="http://www.w3.org/1999/xhtml",tb=tx,tv=!1,tw=null,tT=el({},[tg,ty,tx],Y),tj=_(["mi","mo","mn","ms","mtext"]),tA=el({},tj),tS=_(["annotation-xml"]),tk=el({},tS),tN=el({},["title","style","font","a","script"]),tE=null,tI=["application/xhtml+xml","text/html"],tC=null,tD=null,t_=l.createElement("form"),tP=function(e){return e instanceof RegExp||e instanceof Function},tO=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(tD&&tD===e)return;e&&"object"==typeof e||(e={}),e=ea(e),tC="application/xhtml+xml"===(tE=-1===tI.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE)?Y:W,eq=eU(e,"ALLOWED_TAGS",eJ,{transform:tC}),eG=eU(e,"ALLOWED_ATTR",eQ,{transform:tC}),tw=eU(e,"ALLOWED_NAMESPACES",tT,{transform:Y}),tp=eU(e,"ADD_URI_SAFE_ATTR",th,{transform:tC,base:th}),tf=eU(e,"ADD_DATA_URI_TAGS",tm,{transform:tC,base:tm}),tu=eU(e,"FORBID_CONTENTS",td,{transform:tC}),eV=eU(e,"FORBID_TAGS",ea({}),{transform:tC}),eX=eU(e,"FORBID_ATTR",ea({}),{transform:tC}),tc=!!ee(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?ea(e.USE_PROFILES):e.USE_PROFILES),e0=!1!==e.ALLOW_ARIA_ATTR,e1=!1!==e.ALLOW_DATA_ATTR,e2=e.ALLOW_UNKNOWN_PROTOCOLS||!1,e3=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,e8=e.SAFE_FOR_TEMPLATES||!1,e4=!1!==e.SAFE_FOR_XML,e5=e.WHOLE_DOCUMENT||!1,tt=e.RETURN_DOM||!1,tn=e.RETURN_DOM_FRAGMENT||!1,ti=e.RETURN_TRUSTED_TYPE||!1,te=e.FORCE_BODY||!1,tr=!1!==e.SANITIZE_DOM,tl=e.SANITIZE_NAMED_PROPS||!1,to=!1!==e.KEEP_CONTENT,ts=e.IN_PLACE||!1,eY=!function(e){try{return en(e,""),!0}catch(e){return!1}}(e.ALLOWED_URI_REGEXP)?eA:e.ALLOWED_URI_REGEXP,tb="string"==typeof e.NAMESPACE?e.NAMESPACE:tx,tA=eM(e,"MATHML_TEXT_INTEGRATION_POINTS",()=>el({},tj)),tk=eM(e,"HTML_INTEGRATION_POINTS",()=>el({},tS));let i=eM(e,"CUSTOM_ELEMENT_HANDLING",()=>O(null));if(eK=O(null),ee(i,"tagNameCheck")&&tP(i.tagNameCheck)&&(eK.tagNameCheck=i.tagNameCheck),ee(i,"attributeNameCheck")&&tP(i.attributeNameCheck)&&(eK.attributeNameCheck=i.attributeNameCheck),ee(i,"allowCustomizedBuiltInElements")&&"boolean"==typeof i.allowCustomizedBuiltInElements&&(eK.allowCustomizedBuiltInElements=i.allowCustomizedBuiltInElements),P(eK),e8&&(e1=!1),tn&&(tt=!0),tc&&(eq=el({},ep),eG=O(null),!0===tc.html&&(el(eq,es),el(eG,eh)),!0===tc.svg&&(el(eq,ec),el(eG,eg),el(eG,ex)),!0===tc.svgFilters&&(el(eq,eu),el(eG,eg),el(eG,ex)),!0===tc.mathMl&&(el(eq,ef),el(eG,ey),el(eG,ex))),eZ.tagCheck=null,eZ.attributeCheck=null,ee(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?eZ.tagCheck=e.ADD_TAGS:H(e.ADD_TAGS)&&(eq===eJ&&(eq=ea(eq)),el(eq,e.ADD_TAGS,tC))),ee(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?eZ.attributeCheck=e.ADD_ATTR:H(e.ADD_ATTR)&&(eG===eQ&&(eG=ea(eG)),el(eG,e.ADD_ATTR,tC))),ee(e,"ADD_FORBID_CONTENTS")&&H(e.ADD_FORBID_CONTENTS)&&(tu===td&&(tu=ea(tu)),el(tu,e.ADD_FORBID_CONTENTS,tC)),to&&(eq["#text"]=!0),e5&&el(eq,["html","head","body"]),eq.table&&(el(eq,["tbody"]),delete eV.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw ei('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw ei('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let n=t;t=e.TRUSTED_TYPES_POLICY;try{I=z("")}catch(e){throw t=n,e}}else null===e.TRUSTED_TYPES_POLICY?(t=void 0,I=""):(void 0===t&&(C||(n=ez(m,o),C=!0),t=n),t&&"string"==typeof I&&(I=z("")));_&&_(e),tD=e},tR=el({},[...ec,...eu,...ed]),tz=el({},[...ef,...em]),tL=function(e){var t,n,i;let r=v(e);r&&r.tagName||(r={namespaceURI:tb,tagName:"template"});let l=W(e.tagName),a=W(r.tagName);return!!tw[e.namespaceURI]&&(e.namespaceURI===ty?(t=r).namespaceURI===tx?"svg"===l:t.namespaceURI===tg?"svg"===l&&("annotation-xml"===a||tA[a]):!!tR[l]:e.namespaceURI===tg?(n=r).namespaceURI===tx?"math"===l:n.namespaceURI===ty?"math"===l&&tk[a]:!!tz[l]:e.namespaceURI===tx?((i=r).namespaceURI!==ty||!!tk[a])&&(i.namespaceURI!==tg||!!tA[a])&&!tz[l]&&(tN[l]||!tR[l]):"application/xhtml+xml"===tE&&!!tw[e.namespaceURI])},tU=function(e){B(r.removed,{element:e});try{v(e).removeChild(e)}catch(t){if(g(e),!v(e))throw ei("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},tM=function(e,t,n){try{y(e,t)}catch(t){try{e.removeAttribute(n)}catch(e){}}},t$=function(e){tH(e);let t=b(e);
1if(t){let e=[];U(t,t=>{B(e,t)}),U(e,e=>{try{g(e)}catch(e){}})}let n=T(e);if(n)for(let t=n.length-1;t>=0;--t){let i=n[t],r=i&&i.name;"string"==typeof r&&tM(e,i,r)}},tB=function(e,t,n){if(!n)try{n=t.getAttributeNode(e)}catch(e){n=null}B(r.removed,{attribute:n||null,from:t});try{n?y(t,n):t.removeAttribute(e)}catch(n){try{t.removeAttribute(e)}catch(e){}}if("is"===e)if(tt||tn)try{tU(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},tF=function(e){let t=T(e);if(t)for(let n=t.length-1;n>=0;--n){let i=t[n],r=i&&i.name;"string"!=typeof r||eG[tC(r)]||tM(e,i,r)}},tH=function(e){let t=[e];for(;t.length>0;){let e=t.pop();1===k(e)&&tF(e);let n=b(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},tW=function(e,t){return!!e4&&("patchsrc"===e||"for"===e&&"label"!==t&&"output"!==t)},tY=function(e){if(!e4)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=k(e);if(7===n||8===n&&en(eC,e.data)){try{g(e)}catch(e){}continue}if(1===n){let t=tC(E(e));try{e.hasAttribute&&e.hasAttribute("patchsrc")&&e.removeAttribute("patchsrc"),e.hasAttribute&&e.hasAttribute("for")&&tW("for",t)&&e.removeAttribute("for")}catch(e){}}let i=b(e);if(i)for(let e=i.length-1;e>=0;--e)t.push(i[e])}},tq=function(e){let n=null,i=null;if(te)e="<remove></remove>"+e;else{let t=q(e,/^[\r\n\t ]+/);i=t&&t[0]}"application/xhtml+xml"===tE&&tb===tx&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");let r=t?z(e):e;if(tb===tx)try{n=new f().parseFromString(r,tE)}catch(e){}if(!n||!n.documentElement){n=eP.createDocument(tb,"template",null);try{n.documentElement.innerHTML=tv?I:r}catch(e){}}let a=n.body||n.documentElement;return(e&&i&&a.insertBefore(l.createTextNode(i),a.childNodes[0]||null),tb===tx)?eF.call(n,e5?"html":"body")[0]:e5?n.documentElement:a},tJ=function(e){let t=S?S(e):e.ownerDocument;return e$.call(t||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},tG=function(e){return e=J(e,eb," "),e=J(e,ev," "),e=J(e,ew," ")},tQ=function(e){var t;e.normalize();let n=S?S(e):e.ownerDocument,i=e$.call(n||e,e,d.SHOW_TEXT|d.SHOW_COMMENT|d.SHOW_CDATA_SECTION|d.SHOW_PROCESSING_INSTRUCTION,null),r=i.nextNode();for(;r;)r.data=tG(r.data),r=i.nextNode();let l=null==(t=e.querySelectorAll)?void 0:t.call(e,"template");l&&U(l,e=>{tV(e.content)&&tQ(e.content)})},tK=function(e){let t=A?A(e):null;return"string"==typeof t&&"form"===tC(t)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==T(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.removeAttributeNode||"function"!=typeof e.getAttributeNode||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==j(e)||e.childNodes!==b(e))},tV=function(e){if(!j||"object"!=typeof e||null===e)return!1;try{return 11===j(e)}catch(e){return!1}},tX=function(e){if(!j||"object"!=typeof e||null===e)return!1;try{return"number"==typeof j(e)}catch(e){return!1}};function tZ(e,t,n){0!==e.length&&U(e,e=>{e.call(r,t,n,tD)})}let t0=function(e,t){if(e instanceof RegExp)return en(e,t);if(e instanceof Function){for(var n=arguments.length,i=Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];return!!e(t,...i)}return!1},t1=function(e,t,n){if(!eV[t]&&t6(t)&&t0(eK.tagNameCheck,t))return!1;if(to&&!tu[t]){let t=v(e),i=b(e);if(i&&t){let r=i.length;for(let l=r-1;l>=0;--l){let r=e===n?h(i[l],!0):i[l];t.insertBefore(r,x(e))}}}return tU(e),!0},t2=function(e,t,n,i){return 0===e.length?t:t===n||t===i?ea(t):t},t3=function(e,t){return e!==t&&null===v(e)&&(ts&&tH(e),!0)},t8=function(e,t){if(tZ(eW.beforeSanitizeElements,e,null),t3(e,t))return!0;if(tK(e))return tU(e),!0;let n=tC(E(e));if(eq=t2(eW.uponSanitizeElement,eq,eJ,e9),tZ(eW.uponSanitizeElement,e,{tagName:n,allowedTags:eq}),t3(e,t))return!0;if(e4&&e.hasChildNodes()&&!tX(e.firstElementChild)&&en(eI,e.textContent)&&en(eI,e.innerHTML)||e4&&e.namespaceURI===tx&&eO[n]&&(tX(e.firstElementChild)||"string"==typeof e.textContent&&en(eR[n],e.textContent))||7===e.nodeType||e4&&8===e.n
1odeType&&en(eC,e.data))return tU(e),!0;if(eV[n]||!(eZ.tagCheck instanceof Function&&eZ.tagCheck(n))&&!eq[n]){let i=t1(e,n,t);return!!(!1===i&&(tZ(eW.afterSanitizeElements,e,null),t3(e,t)))||i}if(1===k(e)&&!tL(e)||("noscript"===n||"noembed"===n||"noframes"===n)&&en(eD,e.innerHTML))return tU(e),!0;if(e8&&3===e.nodeType){let t=tG(e.textContent);e.textContent!==t&&(B(r.removed,{element:e.cloneNode()}),e.textContent=t)}return tZ(eW.afterSanitizeElements,e,null),t3(e,t)},t4=function(e,t,n){if(eX[t]||tW(t,e)||tr&&("id"===t||"name"===t)&&(n in l||n in t_))return!1;let i=eG[t]||eZ.attributeCheck instanceof Function&&eZ.attributeCheck(t,e);return!!(e1&&en(eT,t)||e0&&en(ej,t))||(i?!(!(tp[t]||en(eY,J(n,ek,"")))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==G(n,"data:")||!tf[e])&&(!e2||en(eS,J(n,ek,""))))||!n:t6(e)&&t0(eK.tagNameCheck,e)&&t0(eK.attributeNameCheck,t,e)||"is"===t&&eK.allowCustomizedBuiltInElements&&t0(eK.tagNameCheck,n))},t5=el({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),t6=function(e){return!t5[W(e)]&&en(eE,e)},t9=function(e,n,i,r){if(t&&"object"==typeof m&&"function"==typeof m.getAttributeType&&!i)switch(m.getAttributeType(e,n)){case"TrustedHTML":return z(r);case"TrustedScriptURL":return L(r)}return r},t7=function(e,t,n,i){try{if(n?e.setAttributeNS(n,t,i):e.setAttribute(t,i),tK(e))return tU(e),!1;return!0}catch(n){return tB(t,e),!1}},ne=function(e,t){if(tZ(eW.beforeSanitizeAttributes,e,null),t3(e,t))return;let n=e.attributes;if(!n||tK(e))return;let i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:eG=t2(eW.uponSanitizeAttribute,eG,eQ,e7),forceKeepAttr:void 0},l=n.length,a=tC(e.nodeName);for(;l--;){let t=n[l],o=t.name,s=t.namespaceURI,c=t.value,u=tC(o),d="value"===o?c:Q(c),f=!1;if(i.attrName=u,i.attrValue=d,i.keepAttr=!0,i.forceKeepAttr=void 0,tZ(eW.uponSanitizeAttribute,e,i),d=i.attrValue,tl&&("id"===u||"name"===u)&&0!==G(d,ta)&&(tB(o,e,t),d=ta+d,f=!0),e4&&en(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)||"attributename"===u&&q(d,"href")){tB(o,e,t);continue}if(!i.forceKeepAttr){if(!i.keepAttr||!e3&&en(e_,d)||(e8&&(d=tG(d
1)),!t4(a,u,d))){tB(o,e,t);continue}(d=t9(a,u,s,d))!==c&&t7(e,o,s,d)&&f&&$(r.removed)}}tZ(eW.afterSanitizeAttributes,e,null),t3(e,t)},nt=function(e){let t=null,n=tJ(e);for(tZ(eW.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(tZ(eW.uponSanitizeShadowNode,t,null),t8(t,e),ne(t,e),tV(t.content)&&nt(t.content),1===k(t)){let e=w(t);tV(e)&&(nn(e),nt(e))}tZ(eW.afterSanitizeShadowDOM,e,null)},nn=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){nt(e.shadow);continue}let n=e.node,i=1===k(n),r=b(n);if(r)for(let e=r.length-1;e>=0;--e)t.push({node:r[e],shadow:null});if(i){let e=A?A(n):null;if("string"==typeof e&&"template"===tC(e)){let e=n.content;tV(e)&&t.push({node:e,shadow:null})}}if(i){let e=w(n);tV(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return r.sanitize=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,l=null,o=null,s=null;if((tv=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!tX(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return K(e);case"boolean":return V(e);case"bigint":return X?X(e):"0";case"symbol":return Z?Z(e):"Symbol()";case"undefined":default:return et(e);case"function":case"object":{if(null===e)return et(e);let t=eo(e,"toString");if("function"==typeof t){let n=t(e);return"string"==typeof n?n:et(n)}return et(e)}}}(e)))throw ei("dirty is not a string, aborting");if(!r.isSupported)return e;e6?(eq=e9,eG=e7):tO(n),(eW.uponSanitizeElement.length>0||eW.uponSanitizeAttribute.length>0)&&(eq=ea(eq)),eW.uponSanitizeAttribute.length>0&&(eG=ea(eG)),r.removed=[];let c=ts&&"string"!=typeof e&&tX(e);if(c){tY(e);let t=E(e);if("string"==typeof t){let n=tC(t);if(!eq[n]||eV[n])throw t$(e),ei("root node is forbidden and cannot be sanitized in-place")}if(tK(e))throw t$(e),ei("root node is clobbered and cannot be sanitized in-place");try{nn(e)}catch(t){throw t$(e),t}}else if(tX(e))1===(l=(i=tq("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===l.nodeName||"HTML"===l.nodeName?i=l:i.appendChild(l),nn(i);else{if(!tt&&!e8&&!e5&&-1===e.indexOf("<"))return t&&ti?z(e):e;if(!(i=tq(e)))return tt?null:ti?I:""}i&&te&&tU(i.firstChild);let u=c?e:i;try{let e=tJ(u);for(;o=e.nextNode();)t8(o,u),ne(o,u),tV(o.content)&&nt(o.content)}catch(t){throw c&&(t$(e),U(r.removed,e=>{e.element&&tH(e.element)})),t}if(c){let t=!1;if(U(r.removed,n=>{n.element&&(n.element===e&&(t=!0),tH(n.element))}),t)throw ei("a node selected for removal could not be safely returned; refusing to sanitize in place");return e8&&tQ(e),e}if(tt){if(e8&&tQ(i),tn)for(s=eB.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(eG.shadowroot||eG.shadowrootmode)&&(s=eH.call(a,s,!0)),s}let d=e5?i.outerHTML:i.innerHTML;return e5&&eq["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&en(eN,i.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+d),e8&&(d=tG(d)),t&&ti?z(d):d},r.setConfig=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};tO(e),e6=!0,e9=eq,e7=eG},r.clearConfig=function(){tD=null,e6=!1,e9=null,e7=null,t=n,I=""},r.isValidAttribute=function(e,t,n){return tD||tO({}),t4(tC(e),tC(t),n)},r.addHook=function(e,t){"function"!=typeof t||ee(eW,e)&&B(eW[e],t)},r.removeHook=function(e,t){if(ee(eW,e)){if(void 0!==t){let n=M(eW[e],t);return -1===n?void 0:F(eW[e],n,1)[0]}return $(eW[e])}},r.removeHooks=function(e){ee(eW,e)&&(eW[e]=[])},r.removeAllHooks=function(){eW=eL()},r}(),eB=n(55100),eF=Object.defineProperty,eH=Object.defineProperties,eW=Object.getOwnPropertyDescriptors,eY=Object.getOwnPropertySymbols,eq=Object.prototype.hasOwnProperty,eJ=Object.prototype.propertyIsEnumerable,eG=(e,t,n)=>t in e?eF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eQ=(e,t)=>{for(var n in t||(t={}))eq.call(t,n)&&eG(e,n,t[n]);if(eY)for(var n of eY(t))eJ.call(t,n)&&eG(e,n,t[n]);return e},eK=(e,t,n)=>new Promise((i,r)=>{var l=e=>{try{o(n.next(e))}catch(e){r(e)}},a=e=>{try{o(n.throw(e))}catch(e){r(e)}},o=e=>e.done?i(e.value):Promise.resolve(e.value).then(l,a);o((n=n.apply(e,t)).next())}),eV=e=>Object.keys(e).map(t=>{let n=e[t];return null==n||""===n?"":`${t}=${n}`}).filter(e=>e.length>0).join("&"),eX=(e,t,n)=>eK(null,null,function*(){let i=yield t(),r=i?(0,c.s)(i):"",l=eV({gtmshogun:r&&"object"==typeof r&&"userProfile"in r?r.userProfile.hashedAccountId:"",T_ccs:n()});if(!l)return e;let a=e.includes("?")?"&":"?";return`${e}${a}${l}`}),eZ=(e,t)=>void 0===e?"":[e.getFullYear(),e0(e.getMonth()+1),e0(e.getDate())].join(t),e0=e=>e.toString().padStart(2,"0"),e1=["su","ma","ti","ke","to","pe","la"],e2=e=>{let[t,n,i]=e.split("."),r=new Date(`${t}-${n}-${i}`);return`${e1[r.getDay()]} ${i}.${n}.${t}`},e3=e=>{let[t,n,i]=e.split("T")[0].split("-"),r=new Date(`${t}-${n}-${i}`);return`${e1[r.getDay()]} ${i}.${n}.${t}`},e8=["large","master","small"],e4=["small","large","master"],e5=e=>e.map(e=>{let t=e6(e.covers,e8);return void 0===t?void 0:{cover:t,publishedAt:eZ(new Date(e.publishedAt),"."),productName:e.productName,facsimileId:e.facsimileId,uuid:e.uuid}}).filter(e=>void 0!==e),e6=(e,t)=>{for(let n of t)if(void 0!==e[n])return e[n]},e9=({request:e,config:t,brand:n,getJwtToken:i,getConsentQueryParam:r,onClose:l,onLoadingComplete:c,onEventRelayEvent:d,onBrazeCustomEvent:f})=>{let{response:m,state:p,data:h}=(0,o.LH)({brand:n,env:t.env,facsimileProductId:e.facsimileProductId,uuid:e.uuid,platform:t.platform,platformResolved:t.platformResolved,getJwtToken:i,brazeTargetGroup:t.brazeTargetGroup,p2pDecile:t.p2pDecile,page:e.page,query:e.query});(0,a.useEffect)(()=>{p!==o.MB.LOADING&&c()},[p,c]),(0,a.useEffect)(()=>{let e;p===o.MB.GRANTED&&null!=h&&h.readingUrl&&(e=h.readingUrl,eK(null,null,function*(){var t;let n,a;t=yield eX(e,i,r),n=navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome"),a=navigator.userAgent.includes("Firefox")&&!navigator.userAgent.includes("Seamonkey"),n||a?window.location.assign(t):window.open(t,"_blank","noopener"),l()}))},[p,h,i,r,e,l]);let g=(0,a.useCallback)(()=>{l()},[l]);return(0,u.jsx)(s,{isOpen:p===o.MB.DENIED,onRequestClose:g,className:"mx-nof-16 justify-center overflow-y-auto outline-hidden max-w-[640px] w-full",overlayClassName:"flex items-center justify-center size-full fixed inset-0 bg-black-opacity",children:(0,u.jsx)(o.ki,{accessHookResponse:m,env:t.env,brand:n,isDarkMode:t.isDarkMode,platform:t.platform,authState:t.authState,loginUrl:t.loginUrl,registerUrl:t.registerUrl,isGoogleAccountAllowedToSubscribe:t.isGoogleAccountAllowedToSubscribe,iOSExternalLinkAccount:t.iOSExternalLinkAccount,facsimileId:e.facsimileProductId,onClose:g,onEventRelayEvent:d,onBrazeCustomEvent:f})})},e7=(0,a.createContext)(void 0),te=()=>(0,a.useContext)(e7),tt=({children:e,config:t,brand:n,getJwtToken:i,getConsentQueryParam:r,onEventRelayEvent:l,onBrazeCustomEvent:o})=>{let[s,c]=(0,a.useState)(null),[d,f]=(0,a.useState)(null),m=(0,a.useCallback)(e=>{f(e.uuid),c(e)},[]),p=(0,a.useCallback)(()=>{f(null)},[]),h=(0,a.useCallback)(()=>{c(null),f(null)},[]),g=(0,a.useMemo)(()=>({setActiveRequest:m,loadingUuid:d}),[m,d]);return(0,u.jsxs)(e7.Provider,{value:g,children:[e,s&&(0,u.jsx)(e9,{request:s,config:t,brand:n,getJwtToken:i,getConsentQueryParam:r,onClose:h,onLoadingComplete:p,onEventRelayEvent:l,onBrazeCustomEvent:o})]})},tn=(0,a.createContext)(void 0),ti=({children:e})=>{let[t,n]=(0,a.useState)(window.innerWidth<=475?"small":"large");return(0,a.useEffect)(()=>{let e=()=>{let e=window.innerWidth<=475?"small":"large";e!==t&&n(e)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[t]),(0,u.jsx)(tn.Provider,{value:t,children:e})},tr=()=>{let e=(0,a.useContext)(tn);if(!e)throw Error("useScreenSize must be used inside ScreenSizeProvider!");return e},tl=e=>eK(null,[e],function*([e,t]){let n=yield t(),i=new Headers;i.set("Content-Type","application/json"),n&&i.set("SNDP-Authorization",n);let r=yield fetch(e,{method:"GET",headers:i});if(r.ok){let e=yield r.json(),{body:t}=e;return"string"==typeof t?JSON.parse(t):e}}),ta=({availability:e,brand:t,count:n,facsimileAPIBaseUrl:i,facsimileId:r,offset:l,to:a,getJwtToken:o})=>{let s=`${i}/${t}/${r}?`+eV({count:n,offset:l,from:eZ(void 0,"-"),to:eZ(a,"-")});return(0,f.A)((({brand:e,facsimileAPIBaseUrl:t})=>!!t&&!!e)({facsimileAPIBaseUrl:i,brand:t})?[s,o]:null,()=>{let t=eV({availability:e});return tl([s+(t?`&${t}`:""),o])})},to=({brand:e,delayFetch:t,facsimileAPIBaseUrl:n,facsimileId:i,getJwtToken:r})=>{let l=`${n}/${e}/${i}/latest`;return(0,d.u)(t?null:[l,r],tl)},ts={thumbnail:{width:221,height:325},containerMargin:{bottom:50}},tc={thumbnail:{width:155,height:222},containerMargin:{bottom:24}},tu=e=>"small"===e?tc:ts,td={width:"100%",maxWidth:"964px",margin:"0 auto"},tf=({isLoading:e,children:t})=>(0,u.jsxs)("div",{className:"relative",children:[t,e&&(0,u.jsx)("div",{"data-testid":"loading-overlay",className:"absolute inset-0 flex items-center justify-center bg-white/50 [.sndp-dark_&]:bg-black/50",children:(0,u.jsx)(p.y,{})})]}),tm=({styles:e,screenSize:t,count:n=4})=>{let i=[];for(let r=0;r<n;r++)i.push((0,u.jsxs)("div",{className:l("flex","flex-col"),style:e,"data-testid":`facsimile-placeholder-${r}`,children:[(0,u.jsx)("div",{className:l("mb-nof-8","grow"),style:{backgroundColor:"#d8d8d8"},children:"\xa0"}),"small"!==t&&(0,u.jsx)("div",{className:l("nof-ui-subtitle-xsmall","mb-nof-4","w-1/2"),style:{backgroundColor:"#d8d8d8"},children:"\xa0"}),(0,u.jsx)("div",{className:"w-100 text-nof-foreground-primary font-(family-name:--facsimile-date-font-family) [font-size:var(--facsimile-date-font-size)] [font-weight:var(--facsimile-date-font-we
1ight)] leading-(--facsimile-date-line-height) tracking-(--facsimile-date-letter-spacing)",style:{backgroundColor:"#d8d8d8"},children:"\xa0"})]},r));return(0,u.jsx)("div",{className:l("flex","justify-between","flex-wrap","w-full"),children:i})},tp=()=>(0,u.jsx)("div",{children:"Tapahtui virhe."}),th=({children:e})=>(0,u.jsx)("p",{className:"nof-ui-subtitle-small",children:e}),tg=({children:e,as:t="p",className:n})=>(0,u.jsx)(t,{className:l("text-nof-foreground-primary font-(family-name:--facsimile-date-font-family) [font-size:var(--facsimile-date-font-size)] [font-weight:var(--facsimile-date-font-weight)] leading-(--facsimile-date-line-height) tracking-(--facsimile-date-letter-spacing)",n),children:e}),ty=({children:e,as:t="div",className:n})=>(0,u.jsx)(t,{className:l("text-nof-foreground-primary font-(family-name:--facsimile-lane-title-font-family) [font-size:var(--facsimile-lane-title-font-size)] [font-weight:var(--facsimile-lane-title-font-weight)] leading-(--facsimile-lane-title-line-height) tracking-(--facsimile-lane-title-letter-spacing) [text-transform:var(--facsimile-lane-title-text-transform)]",n),children:e}),tx=e=>{var t,n,i;let r=tr(),l=new Date,a=new Date(l.getFullYear()-50,l.getMonth(),l.getDate()),o=new Date(l.getFullYear()-100,l.getMonth(),l.getDate()),s=ta({brand:e.brand,count:1,facsimileAPIBaseUrl:e.facsimileAPIBaseUrl,facsimileId:e.facsimileId,offset:e.offset,to:a,getJwtToken:e.getJwtToken}),c=ta({brand:e.brand,count:1,facsimileAPIBaseUrl:e.facsimileAPIBaseUrl,facsimileId:e.facsimileId,offset:e.offset,to:o,getJwtToken:e.getJwtToken}),d=null!=(t=s.error)?t:c.error,f=s.isLoading||c.isLoading,m=tu(r),p={height:`${m.thumbnail.height+m.containerMargin.bottom}px`,overflow:"hidden"},h={maxWidth:`${m.thumbnail.width}px`,flexBasis:`${m.thumbnail.width}px`,width:"100%",height:`${m.thumbnail.height+m.containerMargin.bottom}px`,padding:"2px"};return(0,u.jsx)(tv,{facsimileTitle:e.facsimileTitle,styles:p,children:(0,u.jsx)(tb,{ContainerStyles:h,error:d,isLoading:f,screenSize:r,facsimileFiftyYearsAgo:null==(n=s.data)?void 0:n.facsimiles[0],facsimileHundredYearsAgo:null==(i=c.data)?void 0:i.facsimiles[0]})})},tb=({ContainerStyles:e,error:t,isLoading:n,screenSize:i,facsimileFiftyYearsAgo:r,facsimileHundredYearsAgo:l})=>{if(t)return(0,u.jsx)(tp,{});if(n)return(0,u.jsx)(tm,{styles:e,screenSize:i});let a=r?e5([r])[0]:void 0,o=l?e5([l])[0]:void 0;return(0,u.jsx)(tT,{screenSize:i,styles:e,facsimileFiftyYearsAgo:a,facsimileHundredYearsAgo:o})},tv=({children:e,facsimileTitle:t,styles:n})=>(0,u.jsxs)("div",{style:td,children:[(0,u.jsx)(ty,{as:"h3",className:"text-center mb-nof-4",children:t}),(0,u.jsx)("div",{className:l("flex","flex-row","justify-around","flex-wrap"),style:n,children:e})]}),tw=({screenSize:e,styles:t,facsimile:n,title:i})=>{let r=te();return void 0===n?(0,u.jsx)(tp,{}):(0,u.jsxs)("button",{onClick:()=>{null==r||r.setActiveRequest({uuid:n.uuid,facsimileProductId:n.facsimileId})},style:t,className:l("flex","flex-col","grow","shrink","items-center","cursor-pointer"),children:[(0,u.jsx)("div",{className:"font-hs-helsingin mb-nof-2",children:i}),(0,u.jsxs)("a",{href:`/lehti/${n.facsimileId}/${n.uuid}`,onClick:e=>{e.preventDefault()},children:[(0,u.jsx)(tf,{isLoading:(null==r?void 0:r.loadingUuid)===n.uuid,children:(0,u.jsx)("img",{src:n.cover.url,alt:"",style:{height:"small"===e?"160px":"240px",boxShadow:"0px 1px 3px 0px rgba(0, 0, 0, 0.3)"}})}),(0,u.jsxs)("div",{style:{marginTop:"small"!==e?"12px":"4px"},children:["small"!==e&&(0,u.jsx)(th,{children:n.productName}),(0,u.jsx)(tg,{children:e2(n.publishedAt)})]})]})]},n.uuid)},tT=({screenSize:e,styles:t,facsimileFiftyYearsAgo:n,facsimileHundredYearsAgo:i})=>(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(tw,{screenSize:e,styles:t,facsimile:n,title:"50 vuotta sitten"}),(0,u.jsx)(tw,{screenSize:e,styles:t,facsimile:i,title:"100 vuotta sitten"})]}),tj=e=>{let{data:t,error:n,isLoading:i}=to({brand:e.brand,facsimileAPIBaseUrl:e.facsimileAPIBaseUrl,facsimileId:e.facsimileId,getJwtToken:e.getJwtToken}),r="large",a=tu(r),o={maxWidth:`${a.thumbnail.width}px`,flexBasis:`${a.thumbnail.width}px`,width:"100%",height:`${a.thumbnail.height+a.containerMargin.bottom}px`,padding:"2px"};return(0,u.jsx)("div",{className:l("flex","flex-row","justify-between","flex-wrap"),children:n?(0,u.jsx)(tp,{}):i?(0,u.jsx)(tm,{styles:o,screenSize:r,count:1}):(0,u.jsx)(tA,{brand:e.brand,data:t})})},tA=({data:e,brand:t})=>{let n=te();if(!e)return null;let i=(e=>{let t=e6(e.covers,e8);if(t)return{cover:t,publishedAt:eZ(new Date(e.publishedAt),"."),productName:e.productName,facsimileId:e.facsimileId,uuid:e.uuid}})(e);if(!i)return null;let{cover:r,publishedAt:a,productName:o,facsimileId:s,uuid:c}=i;return(0,u.jsxs)("div",{className:"text-nof-foreground-primary",children:[(0,u.jsxs)("button",{onClick:()=>{null==n||n.setActiveRequest({uuid:c,facsimileProductId:s})},className:l("flex","flex-col","grow","shrink","cursor-pointer","pb-nof-16"),children:[(0,u.jsx)(tf,{isLoading:(null==n?void 0:n.loadingUuid)===c,children:(0,u.jsx)("img",{src:r.url,style:{boxShadow:"0px 1px 3px 0px rgba(0, 0, 0, 0.3)"},alt:`Cover of ${a} edition of ${o}`,className:"mb-nof-16"})}),(0,u.jsx)(ty,{as:"h3",className:"pb-nof-4",children:o}),(0,u.jsx)(tg,{className:"pb-nof-8",children:e2(a)}),(0,u.jsx)("p",{className:"nof-ui-body-medium",children:"Lehti luettavissa n\xe4k\xf6islehten\xe4"})]}),"hs"===t?(0,u.jsxs)("div",{className:"border-t border-divider-1 pt-nof-16",children:[(0,u.jsx)(ty,{as:"h3",className:"pb-nof-4",children:"HS Aikakone"}),(0,u.jsx)("p",{className:"nof-ui-body-medium pb-nof-8",children:"Tee huimia l\xf6yt\xf6retki\xe4 historiaan! Helsingin Sanomien j
1a P\xe4iv\xe4lehden paperilehdet vuosilta 1889-1997."}),(0,u.jsx)("a",{href:"/aikakone",className:"nof-ui-label-medium underline",children:"Siirry HS Aikakoneeseen"})]}):null]})},tS=(0,a.createContext)(void 0),tk=({children:e,initialDate:t})=>{let[n,i]=(0,a.useState)(null!=t?t:new Date),r=(0,a.useMemo)(()=>({selectedDate:n,setSelectedDate:i}),[n]);return(0,u.jsx)(tS.Provider,{value:r,children:e})},tN=()=>{let e=(0,a.useContext)(tS);if(void 0===e)throw Error("useDatePickerContext must be used within an DatePickerContextProvider");return e},tE={border:"1px solid #ccc",height:"35px",display:"flex",flexDirection:"row"},tI={width:"34px",height:"33px",paddingTop:"4px",display:"flex"},tC=e=>e.toISOString().split("T")[0],tD=({availableDates:e})=>{let{selectedDate:t,setSelectedDate:n}=tN(),i=(0,a.useRef)(null),[r,l]=(0,a.useState)(void 0),[o,s]=(0,a.useState)(void 0),[c,d]=(0,a.useState)(0),f=(0,a.useCallback)(e=>{let t=e.target.valueAsDate;null===t||Array.isArray(t)||n(t)},[n]);return(0,a.useEffect)(()=>{let r,a;if(void 0===e)return;let o=(r=[],Object.keys(e).forEach(t=>{Object.keys(e[t]).forEach(n=>{Object.keys(e[t][n]).forEach(i=>{let l=e[t][n][i],a=10>parseInt(n)?"0"+n:n,o=l<10?`0${l}`:l;r.push(`${t}-${a}-${o}`)})})}),r).map(e=>{let t=new Date(e);return isNaN(t.getTime())?void 0:t}).filter(e=>void 0!==e);if(o.length===c)return;let{oldest:u,newest:m}={oldest:(a=[...o].sort((e,t)=>e.getTime()-t.getTime()))[0],newest:a[a.length-1]};i.current&&(i.current.addEventListener("change",f),i.current.value=tC(t)),l(u),s(m),0===c&&n(m),d(o.length)},[e,i,c,f,t,n]),(0,u.jsxs)("div",{style:tE,children:[(0,u.jsx)("input",{className:"appearance-none [&::-webkit-inner-spin-button]:hidden [&::-webkit-calendar-picker-indicator]:hidden text-nof-foreground-primary bg-nof-background-content-default",name:"picked-date",ref:i,type:"date",min:void 0!==r?tC(r):"2010-01-01",max:tC(o||new Date),style:{paddingLeft:"5px",outline:"none"},required:!0}),(0,u.jsx)("button",{style:tI,className:"cursor-pointer justify-center bg-(--facsimile-datepicker-icon-bg) text-(--facsimile-datepicker-icon-color)",onClick:()=>{let e=i.current;null!=e&&e.showPicker&&e.showPicker()},children:(0,u.jsx)(g.c,{})})]})},t_={display:"flex",justifyContent:"space-between",alignItems:"flex-start"},tP=({facsimileTitle:e,availableDates:t})=>{let n=tr();return(0,u.jsxs)("div",{style:t_,className:"flex-row mb-nof-16 flex-wrap",children:[(0,u.jsx)(ty,{as:"div",className:"small"===n?"mb-[5px]":void 0,children:null!=e?e:""}),(0,u.jsx)(tD,{availableDates:t})]})},tO=({count:e,editionId:t,editionTitle:n,getEditions:i,getEditionAvailabilities:r,linkComponent:l})=>{let a=tr(),{selectedDate:o}=tN(),{data:s}=(({editionId:e,getEditionAvailabilities:t})=>(0,f.A)(["/api/editions/availability",e],()=>eK(null,null,function*(){let n;return n={},(yield t(e)).forEach(e=>{let t=new Date(e),i=t.getFullYear().toString(),r=(t.getMonth()+1).toString(),l=t.getDate();Object.keys(n).includes(i)?Object.keys(n[i]).includes(r)?n[i][r].push(l):n[i][r]=[l]:n[i]={[r]:[l]}}),n})))({editionId:t,getEditionAvailabilities:r}),{data:c,error:d,isLoading:m}=(({count:e,editionId:t,selectedDate:n,getEditions:i})=>(0,f.A)(["/api/editions",e,t,n],()=>i(t,e,n)))({count:e,editionId:t,selectedDate:o,getEditions:i}),p=tu(a),h={height:`${p.thumbnail.height+p.containerMargin.bottom}px`,overflow:"hidden"},g={maxWidth:`${p.thumbnail.width}px`,flexBasis:`${p.thumbnail.width}px`,width:"100%",height:`${p.thumbnail.height+p.containerMargin.bottom}px`,padding:"2px"},y;return y=d?(0,u.jsx)(tp,{}):m?(0,u.jsx)(tm,{styles:g,screenSize:a}):(0,u.jsx)(tz,{screenSize:a,styles:g,data:c,linkComponent:l}),(0,u.jsxs)("div",{style:td,children:[(0,u.jsx)(tP,{availableDates:s,facsimileTitle:n}),(0,u.jsx)("div",{className:"flex flex-row justify-between flex-wrap",style:h,children:y})]})},tR=e=>{var{href:t,children:n}=e,i=((e,t)=>{var n={};for(var i in e)eq.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&eY)for(var i of eY(e))0>t.indexOf(i)&&eJ.call(e,i)&&(n[i]=e[i]);return n})(e,["href","children"]);return(0,u.jsx)("a",eH(eQ({},i),eW({href:t,children:n})))},tz=({screenSize:e,styles:t,data:n,linkComponent:i})=>{let r={boxShadow:"0px 1px 3px 0px rgba(0, 0, 0, 0.3)",maxHeight:"330px"},a=null!=i?i:tR;return Array.isArray(null==n?void 0:n.editions)?(0,u.jsx)(u.Fragment,{children:n.editions.map(({id:n,title:i,picture:o,product:s,startDate:c,url:d})=>(0,u.jsxs)(a,{href:d,style:t,className:l("flex","flex-col","grow","shrink","cursor-pointer"),children:[(0,u.jsxs)("div",{className:l("grow","overflow-hidden","relative"),style:r,children:[o&&(0,u.jsx)("div",{className:"overflow-hidden relative",style:{height:"small"===e?"85px":"122px"},children:(0,u.jsx)(h.V,{picture:eH(eQ({},o),eW({caption:`Cover of ${e3(c)} edition of ${s}`})),maxImageWidth:320,skipPictureAspectRatio:!0})}),(0,u.jsx)("h3",{className:"mx-nof-8 mt-nof-8 text-nof-foreground-primary font-(family-name:--facsimile-edition-title-font-family) [font-size:var(--facsimile-edition-title-font-size)] md:[font-size:var(--facsimile-edition-title-font-size-desktop)] [font-weight:var(--facsimile-edition-title-font-we
1ight)] leading-(--facsimile-edition-title-line-height) tracking-(--facsimile-edition-title-letter-spacing)",children:i})]}),(0,u.jsxs)("div",{style:{marginTop:"small"!==e?"12px":"4px"},children:["small"!==e&&(0,u.jsx)(th,{children:s}),(0,u.jsx)(tg,{children:e3(c)})]})]},n))}):(0,u.jsx)("div",{children:"Tapahtui virhe."})},tL=({ContainerStyles:e,error:t,isLoading:n,screenSize:i,data:r})=>t?(0,u.jsx)(tp,{}):n?(0,u.jsx)(tm,{styles:e,screenSize:i}):(0,u.jsx)(tM,{screenSize:i,styles:e,data:r}),tU=({children:e,availableDates:t,facsimileTitle:n,styles:i})=>(0,u.jsxs)("div",{style:td,children:[(0,u.jsx)(tP,{availableDates:t,facsimileTitle:n}),(0,u.jsx)("div",{className:l("flex","flex-row","justify-between","flex-wrap"),style:i,children:e})]}),tM=({screenSize:e,styles:t,data:n})=>{let i=te(),r={boxShadow:"0px 1px 3px 0px rgba(0, 0, 0, 0.3)"};return(null==n?void 0:n.facsimiles)!==void 0&&n.facsimiles.length>0?(0,u.jsx)(u.Fragment,{children:e5(n.facsimiles).map(({uuid:n,publishedAt:a,cover:o,productName:s,facsimileId:c})=>(0,u.jsx)("button",{"data-testid":`facsimile-button-${n}`,onClick:()=>{null==i||i.setActiveRequest({uuid:n,facsimileProductId:c})},style:t,className:l("flex","flex-col","grow","shrink","cursor-pointer"),children:(0,u.jsxs)("a",{href:`/lehti/${c}/${n}`,onClick:e=>{e.preventDefault()},children:[(0,u.jsx)(tf,{isLoading:(null==i?void 0:i.loadingUuid)===n,children:(0,u.jsx)("img",{src:o.url,alt:`Cover of ${a} edition of ${s}`,style:r})}),(0,u.jsxs)("div",{style:{marginTop:"small"!==e?"12px":"4px"},children:["small"!==e&&(0,u.jsx)(th,{children:s}),(0,u.jsx)(tg,{children:e2(a)})]})]})},n))}):(0,u.jsx)(tp,{})},t$=e=>{let t=tr(),{selectedDate:n}=tN(),[i,r]=(0,a.useState)(),{data:l,error:o,isLoading:s}=ta({availability:!i,brand:e.brand,count:e.count,facsimileAPIBaseUrl:e.facsimileAPIBaseUrl,facsimileId:e.facsimileId,offset:e.offset,to:n,getJwtToken:e.getJwtToken});!i&&null!=l&&l.availability&&r(l.availability);let c=tu(t),d={height:`${c.thumbnail.height+c.containerMargin.bottom}px`,overflow:"hidden"},f={maxWidth:`${c.thumbnail.width}px`,flexBasis:`${c.thumbnail.width}px`,width:"100%",height:`${c.thumbnail.height+c.containerMargin.bottom}px`,padding:"2px"};return(0,u.jsx)(tU,{availableDates:i,facsimileTitle:e.facsimileTitle,styles:d,children:(0,u.jsx)(tL,{ContainerStyles:f,error:o,isLoading:s,screenSize:t,data:l})})};b({locale:T.fi});var tB=e=>{let t=(0,a.useRef)(null),n=((e,t="0px",n=!0)=>{let[i,r]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{let l=new IntersectionObserver(([e])=>{n&&i||r(e.isIntersecting)},{rootMargin:t}),a=e.current;return a&&l.observe(a),()=>{a&&l.unobserve(a)}},[i,e,t,n]),i})(t,"200px"),{data:i,error:r,isLoading:l}=to({brand:e.brand,delayFetch:!n,facsimileAPIBaseUrl:e.facsimileAPIBaseUrl,facsimileId:e.facsimileId,getJwtToken:e.getJwtToken});return(0,u.jsx)("div",{ref:t,children:r?(0,u.jsx)(tp,{}):l||!i?(0,u.jsx)(tJ,{}):(0,u.jsx)(tq,eQ({},tW(i,e)))})},tF={maxWidth:"130px",minWidth:"130px"},tH="text-nof-foreground-primary nof-ui-body-medium bg-nof-background-content-default p-nof-16 mb-nof-16 flex flex-row justify-between",tW=(e,t)=>({cover:tY(e),date:(0,v.GP)((0,w.H)(e.publishedAt),"d.M.y"),productName:e.productName,readingUrl:e.readingUrl,facsimileId:e.facsimileId,props:t}),tY=e=>e.covers.large?e.covers.large:e.covers.master?e.covers.master:e.covers.small?e.covers.small:void 0,tq=({date:e,productName:t,readingUrl:n,cover:i,facsimileId:r,props:l})=>{let[o,s]=(0,a.useState)(n);if((0,a.useEffect)(()=>{eK(null,null,function*(){(yield l.getJwtToken())&&s((yield eX(n,l.getJwtToken,l.getConsentQueryParam)))})},[l,n]),0===n.length||(null==i?void 0:i.url.length)===0||(null==i?void 0:i.height)===0||(null==i?void 0:i.width)===0||void 0===i)return null;let c=`/lehdet/#${r.replace(/-/g,"_").replace(/([äö])/g,"")}`;return(0,u.jsxs)("div",{className:tH,children:[(0,u.jsxs)("div",{className:"mr-nof-12",children:[t.length>0?(0,u.jsx)("div",{className:"font-bold mb-nof-4",children:t}):null,e.length>0?(0,u.jsx)("div",{className:"nof-ui-body-small mb-nof-8",children:e}):null,(0,u.jsx)("div",{className:"mb-nof-8",children:"Lehti luettavissa n\xe4k\xf6islehten\xe4."}),(0,u.jsx)("a",{className:"underline text-(--facsimile-latest-cover-link-color)",href:c,"aria-label":"Arkistosta l\xf6yd\xe4t my\xf6s aiemmin ilmestyneet lehdet",children:"Arkistosta"})," ","l\xf6yd\xe4t my\xf6s aiemmin ilmestyneet lehdet.",(0,u.jsx)("div",{className:"mt-nof-16",children:o&&(0,u.jsx)(y.z9,{variant:y.KT.Primary,label:"Avaa lehti",link:{href:o,external:!0}})})]}),(0,u.jsx)("div",{className:"flex items-center",children:(0,u.jsx)("a",{href:o,children:(0,u.jsx)("div",{style:tF,className:"shadow-[0_1px_3px_0_rgba(0,_0,_0,_0.3)]",children:(0,u.jsx)("img",{src:i.url,alt:`Cover of ${e} edition of ${t}`,className:"w-full"})})})})]})},tJ=()=>(0,u.jsxs)("div",{className:tH,children:[(0,u.jsxs)("div",{className:"flex-col flex-1 mr-nof-12",children:[(0,u.jsx)("div",{className:"mb-nof-4 bg-(--facsimile-latest-cover-placeholder-bg)",style:{width:"7rem",height:"1.125rem"}}),(0,u.jsx)("div",{className:"mb-nof-24 bg-(--facsimile-latest-cover-placeholder-bg)",style:{width:"5rem",height:"1.125rem"}}),(0,u.jsx)("div",{className:"py-nof-24",children:"Sis\xe4lt\xf6\xe4 ladataan ..."})]}),(0,u.jsx)("div",{className:"flex items-center",children:(0,u.jsx)("div",{className:"bg-(--facsimile-latest-cover-placeholder-bg)",style:{height:"180px",width:"130px"}})})]}),tG=(0,a.createContext)(void 0),tQ=({children:e})=>{let[t,n]=(0,a.useState)(""),i=(0,a.useMemo)(()=>({query:t,setQuery:n}),[t]);return(0,u.jsx)(tG.Provider,{value:i,children:e})},tK=()=>{let e=(0,a.useContext)(tG);
1if(void 0===e)throw Error("useSearchContext must be used within an SearchContextProvider");return e};b({locale:T.fi});var tV=e=>{let t=tr(),{query:n}=tK(),{data:i,error:r,isLoading:l,size:a,setSize:o}=(({query:e,brand:t,facsimileAPIBaseUrl:n,facsimileId:i,getJwtToken:r})=>(0,m.Ay)((l,a)=>e&&0!==e.length&&(null==a?void 0:a.facsimiles.length)!==0?[`${n}/${t}/${i}/search?query=${e}&offset=${10*l}&count=10`,r]:null,tl))({query:n,brand:e.brand,facsimileAPIBaseUrl:e.facsimileAPIBaseUrl,facsimileId:e.facsimileId,getJwtToken:e.getJwtToken});if(r)return(0,u.jsx)(t1,{});if(l||!i||0===i.length)return(0,u.jsx)(u.Fragment,{});let s=(e=>{let t={total:0,facsimiles:[],showMore:!0};if(0===e.length)return t.showMore=!1,t;for(let n of e){if(!(null!=n&&n.facsimiles)||0===n.facsimiles.length){t.showMore=!1;continue}t.total=n.total,t.facsimiles=t.facsimiles.concat(n.facsimiles),t.showMore=!0}return t})(i);return(0,u.jsxs)("div",{children:[(0,u.jsx)(tX,{data:s}),(0,u.jsx)(t0,{screenSize:t,query:n,data:s}),(0,u.jsx)(tZ,{setSize:o,size:a,data:s})]})},tX=({data:e})=>0===e.total?(0,u.jsx)("h2",{children:"Ei tuloksia"}):1===e.total?(0,u.jsx)("h2",{children:"L\xf6ytyi 1 tulos"}):(0,u.jsxs)("h2",{children:["L\xf6ytyi ",`${e.total}`," tulosta"]}),tZ=({setSize:e,size:t,data:n})=>n.showMore?(0,u.jsx)("div",{className:"flex justify-center pb-nof-16 pt-nof-4",children:(0,u.jsx)(y.$n,{variant:y.KT.Secondary,label:"N\xe4yt\xe4 lis\xe4\xe4",icon:(0,j.Z)({}),onClick:()=>{e(t+1)}})}):null,t0=({screenSize:e,query:t,data:n})=>{let i=te(),r={height:"small"===e?"100px":"120px",boxShadow:"0px 1px 3px 0px rgba(0, 0, 0, 0.3)"};return 0===n.facsimiles.length?(0,u.jsx)(u.Fragment,{}):(0,u.jsx)("ul",{children:n.facsimiles.map(e=>{let t=e6(e.covers,e4);return void 0===t?void 0:{cover:t,publishedAt:eZ(new Date(e.publishedAt),"."),headline:e.headline,page:e.page,productName:e.productName,facsimileId:e.facsimileId,uuid:e.uuid}}).filter(e=>void 0!==e).map(({cover:n,publishedAt:a,productName:o,facsimileId:s,headline:c,uuid:d,page:f})=>(0,u.jsx)("li",{className:"border-b pb-nof-4 pt-nof-4 mx-nof-10",children:(0,u.jsxs)("a",{href:`/lehti/${s}/${d}?page=${f}&query=${t}`,onClick:e=>{e.preventDefault(),null==i||i.setActiveRequest({uuid:d,facsimileProductId:s,page:f,query:t})},children:[(0,u.jsxs)(tg,{as:"h3",className:"font-bold flex flex-col items-start",children:[o," ",(0,u.jsx)("span",{children:e2(a)})]}),(0,u.jsxs)("div",{className:"flex flex-row mt-nof-4",children:[(0,u.jsx)("p",{className:l("text-left grow","small"===e?"text-sm":"text-base"),dangerouslySetInnerHTML:{__html:`... ${e$.sanitize(c,{ALLOWED_TAGS:["b"]})} ...`}}),(0,u.jsx)(tf,{isLoading:(null==i?void 0:i.loadingUuid)===d,children:(0,u.jsx)("img",{className:"ml-nof-4",src:n.url,alt:"",style:r})})]})]})},d+c))})},t1=()=>(0,u.jsx)("div",{children:"Tapahtui virhe."}),t2=()=>{let{setQuery:e}=tK(),t=(0,a.useRef)(null);return(0,u.jsx)("form",{ref:t,role:"search",className:"flex flex-col w-full",onSubmit:t=>{let n;t.preventDefault(),t.stopPropagation(),e(("string"==typeof(n=new FormData(t.currentTarget).get("query"))?n:null)||"")},children:(0,u.jsx)(eB.I,{id:"facsimile-search",label:"Etsi hakusanalla",labelVisible:!1,placeholder:"Kirjoita hakusana",onSearch:()=>{var e;return null==(e=t.current)?void 0:e.requestSubmit()},name:"query"})})},t3={display:"flex",justifyContent:"space-between",alignItems:"flex-start"},t8=({facsimileTitle:e,facsimileInfo:t})=>{let n=tr();return(0,u.jsxs)("div",{style:t3,className:"flex-row mb-nof-16 flex-wrap",children:[(0,u.jsx)(ty,{as:"div",className:"small"===n?"mb-[5px]":void 0,children:null!=e?e:""}),(0,u.jsx)("div",{className:"small"===n?"mb-[5px]":void 0,children:null!=t?t:""}),(0,u.jsx)(t2,{})]})},t4={Ok:"ok",NoAccess:"no_access",NoSession:"no_session"},t5=e=>eK(null,null,function*(){let t,n;return t=t6(e),n=e.getJwtToken,eK(null,null,function*(){let e=yield n();return yield fetch(t,eQ({method:"GET"},void 0!==e?{headers:{"Content-Type":"application/json","SNDP-Authorization":e}}:{headers:{"Content-Type":"application/json"}}))})}),t6=({facsimileAPIBaseUrl:e,brand:t,facsimileId:n,uuid:i,page:r,query:l})=>{let a=eV({page:r,query:l}),o=`${e}/issues/${t}/${n}/${i}`;return""!==a?`${o}?${a}`:o},t9=e=>{let t=(0,u.jsx)(t7,eQ({},e));return"edition"===e.type||"facsimileLatestCover"===e.type?(0,u.jsx)(ti,{children:t}
1):(0,u.jsx)(ti,{children:(0,u.jsx)(tt,{config:e.puomiConfig,brand:e.brand,getJwtToken:e.getJwtToken,getConsentQueryParam:e.getConsentQueryParam,onEventRelayEvent:e.onEventRelayEvent,onBrazeCustomEvent:e.onBrazeCustomEvent,children:t})})},t7=e=>{var t,n;switch(e.type){case"edition":return(0,u.jsx)(tk,{children:(0,u.jsx)(ne,{children:(0,u.jsx)(tO,{count:null!=(t=e.count)?t:4,editionId:e.editionId,editionTitle:e.editionTitle,getEditions:e.getEditions,getEditionAvailabilities:e.getEditionAvailabilities,linkComponent:e.linkComponent})})});case"facsimile":return e.useDailyCover?(0,u.jsx)(ne,{children:(0,u.jsx)(tj,{brand:e.brand,facsimileAPIBaseUrl:e.facsimileAPIBaseUrl,facsimileId:e.facsimileId,getJwtToken:e.getJwtToken,getConsentQueryParam:e.getConsentQueryParam})}):(0,u.jsx)(tk,{initialDate:"archive-hs"===e.facsimileId||"hsarchive"===e.facsimileId?new Date("1997-12-31"):void 0,children:(0,u.jsx)(ne,{children:(0,u.jsx)(t$,{brand:e.brand,count:null!=(n=e.count)?n:4,facsimileId:e.facsimileId,facsimileTitle:e.facsimileTitle,facsimileAPIBaseUrl:e.facsimileAPIBaseUrl,offset:e.offset,getJwtToken:e.getJwtToken,getConsentQueryParam:e.getConsentQueryParam})})});case"facsimileLatestCover":return(0,u.jsx)(tB,{brand:e.brand,facsimileAPIBaseUrl:e.facsimileAPIBaseUrl,facsimileId:e.facsimileId,getJwtToken:e.getJwtToken,getConsentQueryParam:e.getConsentQueryParam});case"facsimileArchive":return(0,u.jsx)(ne,{children:(0,u.jsx)(tx,{brand:e.brand,facsimileAPIBaseUrl:e.facsimileAPIBaseUrl,facsimileId:e.facsimileId,facsimileTitle:e.facsimileTitle,getJwtToken:e.getJwtToken,getConsentQueryParam:e.getConsentQueryParam})});case"facsimileSearch":return(0,u.jsx)(tQ,{children:(0,u.jsxs)(ne,{children:[(0,u.jsx)(t8,{facsimileTitle:e.facsimileTitle,facsimileInfo:e.facsimileInfo}),(0,u.jsx)(tV,{brand:e.brand,facsimileAPIBaseUrl:e.facsimileAPIBaseUrl,facsimileId:e.facsimileId,getJwtToken:e.getJwtToken,getConsentQueryParam:e.getConsentQueryParam})]})});default:return}},ne=({children:e})=>(0,u.jsx)("div",{className:"w-full p-nof-4 text-nof-foreground-primary tracking-normal",children:e})}}]);

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.