PageSourceSearch

https://www.gronalund.com/component---src-templates-digital-ride-m…ia-qr-code-page-tsx-1ba9c25e723569270825.js

js gronalund.com collected 2026-10-02 04:03:00 UTC 16,528 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkparks_gronan=self.webpackChunkparks_gronan||[]).push([[549],{91783:function(e,a,t){t.r(a),t.d(a,{Head:function(){return M},default:function(){return T}});var n=t(97623),o=t(60423),i=t(74848),l=t(53740),d="core--digital-ride-media-qr-code-connect-block-module--outer-wrapper--137835",r="core--digital-ride-media-qr-code-connect-block-module--inner-wrapper--7d8ef8",s=t(48069),c=t(57097),u=t(96540),m=t(18935),h=t(32389),b=t(75855),p=t(91644),g=t(96864),x=t(40314),v=e=>{var a,t,n,o,v;let{qrCodeAccountId:A,service:f,navigateToAlbum:j}=e;const{t:C}=(0,h.Bd)(),{data:E,isLoading:w,error:N}=(0,s.I)({queryKey:["qr-code-media",A],queryFn:()=>f.getMediaOnQrCodeAccount(A)}),[S,M]=(0,u.useState)(),[T,I]=(0,u.useState)(),{mutate:L}=(0,c.n)({mutationFn:e=>f.connectQrCodeToAlbum(A,e),onMutate:e=>{M(e)},onSuccess:(e,a)=>{j(a)},onError:(e,a)=>{M(void 0),I(a)}}),[y,D]=(0,u.useState)(),{mutate:B,isPending:k,error:z}=(0,c.n)({mutationFn:()=>f.createNewAlbum(),onSuccess:e=>{var a;null!==(a=e.item)&&void 0!==a&&a.albumId?D(e.item.albumId):console.error("No albumId returned from createNewAlbum")}});(0,u.useEffect)((()=>{y&&L(y)}),[y,L]);const q=null!==(a=null==E||null===(t=E.media)||void 0===t||null===(n=t.items)||void 0===n?void 0:n.length)&&void 0!==a?a:0,P=null==E||null===(o=E.media)||void 0===o||null===(v=o.items)||void 0===v?void 0:v.map((e=>e.dateString)).find((e=>!!e));return(0,i.jsxs)("section",{className:(0,g.TD)(d,l.A.block,l.A.blockMaxWidthM),children:[w&&(0,i.jsx)(m.C,{}),N&&(0,i.jsx)(b.l,{type:"critical",heading:C("somethingWentWrong"),paragraph:C("rideMediaConnectQrCodeErrorBannerParagraph")}),E&&(0,i.jsxs)("div",{className:r,children:[(0,i.jsx)("h1",{"data-testid":"digital-ride-media-qr-code-connect-heading",children:C("rideMediaConnectQrCodeHeading",{count:q})}),(0,i.jsx)(p.e,{wrappingElement:"div",service:f,isVisible:!0,visitDate:null!=P?P:x.q.getNow().toISOString(),createNewAlbum:()=>{B()},createNewAlbumError:z,addToExistingAlbum:e=>{L(e)},isLoadingCreateAlbum:k,isLoadingSaveToExistingAlbumId:S,isErrorOnSaveToExistingAlbumId:T,qrCodeAccountMediaNumber:q})]})]})},A=t(83621),f=t(94451),j=t(31414),C=t(44246),E=t(5836),w=t(17755),N=t(89180),S=t(77335);const M=e=>{const a=(0,u.useContext)(j.FI),t=e.data.contentfulSiteConfiguration.node_locale,n=e.params["*"],o=C.A.getLabel("RIDE_MEDIA_QR_CODE_PAGE_TITLE","Attraktionsbilder - QR Kod"),l=n?o+" "+n:o,d=C.A.getLabel("RIDE_MEDIA_QR_CODE_PAGE_DESCRIPTION","Dina attraktionsbilder!");return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(E.E,{isViewportScrollable:a.isViewportScrollable,lang:t}),(0,i.jsx)(w.h,{title:l}),(0,i.jsx)(N.p,{description:d,robots:"noindex,follow"}),(0,i.jsx)(S.W,{})]})};function T(e){const{contentfulSiteConfiguration:a,allLocalSearchSvPage:t,allLocalSearchEnPage:l,contentfulEcommerceConfig:d}=e.data,r=a.node_locale,s=(0,o.ku)(e.params["*"]),c={sv:s?e.pageContext.localesToPath.qrCode.sv+"/"+s:e.pageContext.localesToPath.qrCode.sv,en:s?e.pageContext.localesToPath.qrCode.en+"/"+s:e.pageContext.localesToPath.qrCode.en};return(0,i.jsx)(f.e,{siteConfig:a,allLocalSearchSvpage:t,allLocalSearchEnpage:l,contentfulEcommerceConfig:d,currentContentPageSlugs:c,children:s&&(0,i.jsx)(v,{service:A.q,navigateToAlbum:a=>{window.scrollTo({top:-100,behavior:"smooth"}),(0,n.navigate)(e.pageContext.localesToPath.album[r]+"/"+a)},qrCodeAccountId:s})})}},14928:function(e,a,t){t.d(a,{o:function(){return d}});var n=t(74848),o=t(18293),i=t(32389),l="core--back-button-module--back-button--309f9d";const d=e=>{let{onClick:a,labelOverride:t}=e;const{t:d}=(0,i.Bd)();return(0,n.jsx)(o.a6,{iconLeftNew:"chevron-left",label:null!=t?t:d("back"),className:l,onClick:a})}},91644:function(e,a,t){t.d(a,{e:function(){return E}});var n=t(74848),o=t(26973),i="core--save-to-album-module--card--62f274",l="core--save-to-album-module--top-bar--6ffb51",d="core--save-to-album-module--save-to-album-wrapper--83b1df",r="core--save-to-album-module--other-saving-options--4d458d",s=t(18293),c=t(92996),u=t(67561),m=t(2160),h=t(47571),b=t(92151),p=t(50671),g=t(97715),x=t(32389),v=t(14928),A=t(75855),f=t(60423),j=t(74204),C=t(23931);const E=e=>{let{wrappingElement:a,service:t,isVisible:o,createNewAlbum:i,addToExistingAlbum:r,visitDate:s,isLoadingCreateAlbum:m,isLoadingSaveToExistingAlbumId:p,isErrorOnSaveToExistingAlbumId:A,createNewAlbumError:E,goBack:S,qrCodeAccountMediaNumber:M}=e;const[T]=(0,j.M)("savedRideMediaAlbumIds",[]),I=(0,h.E)({queries:T.map((e=>({queryKey:["album-metadata",e],queryFn:()=>t.fetchAlbum(e)})))}),L=C.Ay.toStringDDMonth(s),y=T.map(((e,a)=>({id:e,query:I[a]}))).filter((e=>{var a,t;let{query:n}=e;const o=null===(a=n.data)||void 0===a||null===(t=a.item)||void 0===t?void 0:t.visitDate;return!!o&&C.Ay.isEqualYYYYMMDD(o,s)})).sort(((e,a)=>{var t,n;let{query:o}=e,{query:i}=a;return Number((0,f.hg)(null===(t=i.data)||void 0===t?void 0:t.item))-Number((0,f.hg)(null===(n=o.data)||void 0===n?void 0:n.item))})),{t:D}=(0,x.Bd)(),B=M||1;return(0,n.jsx)(u.N,{children:o&&(0,n.jsxs)(w,{wrappingElement:a,children:[S&&(0,n.jsx)("div",{className:l,children:(0,n.jsx)(v.o,{onClick:S})}),(0,n.jsx)("h3",{children:D("rideMediaSaveToAlbumCardHeading")}),(0,n.jsxs)("div",{className:d,children:[y.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h4",{children:D("rideMediaSaveToAlbumCardExistingAlbumsHeading",{visitDate:L})}),(0,n.jsx)(b.c,{albums:y,action:"ADD_TO_ALBUM",albumIdInLoadingState:p,albumIdInErrorState:A,onClick:r,addToAlbumMediaAmount:B,visitDate:s}),(0,n.jsx)(c.s,{text:D("orDivider"),"data-testid":"digital-ride-media-save-to-album-or-divider"}),(0,n.jsx)(g.at,{buttonType:"ghost",showMoreLabelOverride:D("rideMediaSaveToAlbumCardShowMoreOptions"),showLessLabelOverride:D("rideMediaSaveToAlbumCardShowLessOptions"),children:(0,n.jsx)(N,{isLoadingCreateAlbum:m,createNewAlbum:i,service:t,albumIdInLoadingState:p,albumIdInErrorState:A,addToExistingAlbum:r,createNewAlbumError:E,imagesToSave:B,visitDate:s})})]}),0===y.length&&(0,n.jsx)(N,{isLoadingCreateAlbum:m,createNewAlbum:i,service:t,albumIdInLoadingState:p,albumIdInErrorState:A,visitDate:s,addToExistingAlbum:r,createNewAlbumError:E,imagesToSave:B})]})]})})},w=e=>{let{wrappingElement:a,children:t}=e;
1return"div"===a?(0,n.jsx)(m.P.div,{animate:{opacity:1},exit:{opacity:0},initial:{opacity:0},transition:{duration:.2},children:t}):"card"===a?(0,n.jsx)(o.Z,{className:i,animate:{opacity:1},exit:{opacity:0},initial:{opacity:0},transition:{duration:.2},children:t}):null},N=e=>{let{isLoadingCreateAlbum:a,createNewAlbum:t,service:o,addToExistingAlbum:i,createNewAlbumError:l,albumIdInLoadingState:d,albumIdInErrorState:u,imagesToSave:m,visitDate:h}=e;const{t:b}=(0,x.Bd)();return(0,n.jsxs)("div",{className:r,"data-testid":"digital-ride-media-save-to-album-other-saving-options",children:[(0,n.jsx)("p",{children:b("rideMediaSaveToAlbumCardParagraph")}),(0,n.jsx)(s.jn,{label:b(a?"rideMediaSaveToAlbumCardCreateNewAlbumButtonLoading":"rideMediaSaveToAlbumCardCreateNewAlbumButtonStandard"),iconLeftNew:a?"loading":"add",isFullWidth:!0,onClick:t,"data-testid":a?"digital-ride-media-save-to-album-create-new-album-button-loading":"digital-ride-media-save-to-album-create-new-album-button"}),l&&(0,n.jsx)(A.l,{type:"critical",heading:b("rideMediaSaveToAlbumErrorHeading"),paragraph:b("rideMediaSaveToAlbumErrorParagraph")}),(0,n.jsx)(c.s,{text:b("orDivider")}),(0,n.jsx)("h4",{children:b("rideMediaSaveToAlbumCardSearchAlbumHeading")}),(0,n.jsx)("p",{children:b("rideMediaSaveToAlbumCardSearchAlbumParagraph",{count:m})}),(0,n.jsx)(p._,{service:o,albumAction:{action:"ADD_TO_ALBUM",visitDate:h},onClickAlbumResult:i,albumIdInLoadingState:d,albumIdInErrorState:u,addToAlbumMediaAmount:m})]})}},18935:function(e,a,t){t.d(a,{C:function(){return i}});var n=t(74848),o={animated:"core--animated-ferris-wheel-module--animated--d1c21d",spokes:"core--animated-ferris-wheel-module--spokes--c3f108",gondola:"core--animated-ferris-wheel-module--gondola--4bdcf1",loopWheel:"core--animated-ferris-wheel-module--loop-wheel--46f364"};function i(e){const a=e=>({"--offset":e.toString()});return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 36 36",...e,children:[(0,n.jsx)("path",{className:o.spokes,fill:"#CCD6DD",d:"M30.806 15.347H19.201l8.205-8.205-.707-.707-8.205 8.205V3.036h-1V14.64L9.288 6.435l-.707.707 8.206 8.205H5.182v1h11.605l-8.206 8.206.707.707 8.206-8.206v11.605h1V17.055l8.205 8.205.707-.707-8.205-8.206h11.605z"}),(0,n.jsx)("path",{fill:"#AAB8C2",d:"M17.994 1.394c-7.982 0-14.453 6.471-14.453 14.453 0 7.982 6.471 14.453 14.453 14.453 7.983 0 14.454-6.471 14.454-14.453-.001-7.982-6.472-14.453-14.454-14.453zm0 26.683c-6.755 0-12.23-5.475-12.23-12.23s5.475-12.23 12.23-12.23c6.754 0 12.23 5.475 12.23 12.23s-5.475 12.23-12.23 12.23z"}),(0,n.jsx)("path",{fill:"#AAB8C2",d:"M17.993 23.374c-4.15 0-7.526-3.377-7.526-7.527s3.376-7.526 7.526-7.526c4.151 0 7.528 3.376 7.528 7.526s-3.376 7.527-7.528 7.527zm0-13.553c-3.323 0-6.026 2.704-6.026 6.026s2.704 6.027 6.026 6.027c3.324 0 6.028-2.704 6.028-6.027s-2.704-6.026-6.028-6.026z"}),(0,n.jsx)("path",{className:o.gondola,style:a(.25),fill:"#744EAA",d:"M21.284 29.819c0 1.535-1.244 2.779-2.779 2.779h-1.112c-1.535 0-2.779-1.244-2.779-2.779s1.244-2.779 2.779-2.779h1.112c1.534 0 2.779 1.244 2.779 2.779z"}),(0,n.jsx)("path",{className:o.gondola,style:a(.25),fill:"#CBB7EA",d:"M21.227 29.263c-.257-1.269-1.378-2.224-2.723-2.224h-1.112c-1.345 0-2.466.954-2.724 2.224h6.559z"}),(0,n.jsx)("path",{className:o.gondola,style:a(-.62),fill:"#5C913B",d:"M11.017 26.527c0 1.535-1.244 2.779-2.779 2.779H7.126c-1.535 0-2.779-1.244-2.779-2.779s1.244-2.779 2.779-2.779h1.112c1.535 0 2.779 1.244 2.779 2.779z"}),(0,n.jsx)("path",{className:o.gondola,style:a(-.62),fill:"#C6E5B3",d:"M10.96 25.971c-.257-1.269-1.378-2.224-2.723-2.224H7.126c-1.345 0-2.466.954-2.724 2.224h6.558z"}),(0,n.jsx)("path",{className:o.gondola,fill:"#3B94D9",d:"M34.977 17.633c0 1.535-1.244 2.779-2.779 2.779h-1.112c-1.535 0-2.779-1.244-2.779-2.779s1.244-2.779 2.779-2.779h1.112c1.535-.001 2.779 1.243 2.779 2.779z"}),(0,n.jsx)("path",{className:o.gondola,fill:"#BBDDF5",d:"M34.921 17.077c-.257-1.269-1.378-2.224-2.723-2.224h-1.112c-1.344 0-2.466.954-2.723 2.224h6.558z"}),(0,n.jsx)("path",{className:o.gondola,style:a(-.12),fill:"#5C913B",d:"M31.644 7.887c0 1.535-1.244 2.779-2.779 2.779h-1.112c-1.535 0-2.779-1.244-2.779-2.779s1.244-2.779 2.779-2.779h1.112c1.535 0 2.779 1.244 2.779 2.779z"}),(0,n.jsx)("path",{className:o.gondola,style:a(-.12),fill:"#C6E5B3",d:"M31.588 7.331c-.257-1.269-1.378-2.224-2.723-2.224h-1.112c-1.344 
10-2.466.954-2.723 2.224h6.558z"}),(0,n.jsx)("path",{className:o.gondola,style:a(.12),fill:"#BE1931",d:"M31.644 26.527c0 1.535-1.244 2.779-2.779 2.779h-1.112c-1.535 0-2.779-1.244-2.779-2.779s1.244-2.779 2.779-2.779h1.112c1.535 0 2.779 1.244 2.779 2.779z"}),(0,n.jsx)("path",{className:o.gondola,style:a(.12),fill:"#F4ABBA",d:"M31.588 25.971c-.257-1.269-1.378-2.224-2.723-2.224h-1.112c-1.344 0-2.466.954-2.723 2.224h6.558z"}),(0,n.jsx)("path",{className:o.gondola,style:a(.62),fill:"#BE1931",d:"M11.017 7.887c0 1.535-1.244 2.779-2.779 2.779H7.126c-1.535 0-2.779-1.244-2.779-2.779s1.244-2.779 2.779-2.779h1.112c1.535 0 2.779 1.244 2.779 2.779z"}),(0,n.jsx)("path",{className:o.gondola,style:a(.62),fill:"#F4ABBA",d:"M10.96 7.331c-.257-1.269-1.378-2.224-2.723-2.224H7.126c-1.345 0-2.466.954-2.724 2.224h6.558z"}),(0,n.jsx)("path",{className:o.gondola,style:a(.75),fill:"#744EAA",d:"M21.284 2.876c0 1.535-1.244 2.779-2.779 2.779h-1.112c-1.535 0-2.779-1.244-2.779-2.779S15.858.097 17.393.097h1.112c1.534-.001 2.779 1.243 2.779 2.779z"}),(0,n.jsx)("path",{className:o.gondola,style:a(.75),fill:"#CBB7EA",d:"M21.227 2.32C20.97 1.051 19.849.096 18.504.096h-1.112c-1.345 0-2.466.954-2.724 2.224h6.559z"}),(0,n.jsx)("path",{className:o.gondola,style:a(.5),fill:"#3B94D9",d:"M7.682 17.633c0 1.535-1.244 2.779-2.779 2.779H3.79c-1.535 0-2.779-1.244-2.779-2.779s1.244-2.779 2.779-2.779h1.112c1.535-.001 2.78 1.243 2.78 2.779z"}),(0,n.jsx)("path",{className:o.gondola,style:a(.5),fill:"#BBDDF5",d:"M7.625 17.077c-.257-1.269-1.378-2.224-2.723-2.224H3.79c-1.345 0-2.466.954-2.724 2.224h6.559z"}),(0,n.jsx)("path",{fill:"#553788",d:"M14.952 15.847c0-1.68 1.362-3.041 3.041-3.041 1.68 0 3.042 1.362 3.042 3.041s-1.362 3.041-3.042 3.041c-1.679.001-3.041-1.361-3.041-3.041z"}),(0,n.jsx)("path",{fill:"#8899A6",d:"M27.279 34.429l-8.376-18.344c-.021-.046-.058-.076-.085-.117-.038-.059-.072-.118-.123-.169-.051-.051-.11-.085-.17-.123-.041-.027-.071-.064-.117-.085-.012-.005-.024-.003-.035-.008-.064-.027-.132-.034-.201-.047-.061-.011-.121-.03-.182-.03-.054 0-.106.018-.161.027-.075.013-.149.022-.219.051-.011.005-.023.003-.034.008-.044.02-.074.057-.114.082-.061.039-.121.074-.173.125-.051.051-.086.111-.124.171-.026.04-.063.07-.083.115L8.709 34.429c-.229.502-.008 1.096.494 1.325.135.061.276.09.415.09.379 0 .742-.217.91-.585l7.465-16.351 7.465 16.351c.168.368.531.585.911.585.139 0 .279-.029.414-.091.504-.229.725-.822.496-1.324z"}),(0,n.jsx)("path",{d:"M12.9 36H7.079c-.552 0-1-.447-1-1s.448-1 1-1H12.9c.552 0 1 .447 1 1s-.448 1-1 1zm15.999 0h-5.82c-.553 0-1-.447-1-1s.447-1 1-1h5.82c.553 0 1 .447 1 1s-.447 1-1 1z",fill:"#553788"})]})}},97715:function(e,a,t){t.d(a,{UC:function(){return N},H7:function(){return w},at:function(){return j}});var n=t(74848),o=t(96540),i="core--expand-content-module--expand-content--f8f83b",l="core--expand-content-module--buttonRow--137e58",d="core--expand-content-module--plain-button--d0893e",r="core--expand-content-module--button-label--b731a6",s="core--expand-content-module--ghost-button--586b5b",c="core--expand-content-module--button-content--76252f",u="core--expand-content-module--icon-wrapper--59b2a2",m="core--expand-content-module--icon--2fb6f5",h=t(18293),b=t(2160),p=t(89120),g=t(67561),x=t(32389),v=t(90520),A=t(85086),f=t(96864);const j=e=>{let{...a}=e;const[t,i]=(0,o.useState)(!1);return(0,n.jsx)(C,{...a,isExpanded:t,setIsExpanded:i})},C=e=>{let{showMoreLabelOverride:a,showLessLabelOverride:t,buttonPosition:o="bottom",buttonType:i="regular",children:l,rightContent:d,removeChildrenWhenUnexpanded:r,isExpanded:s,setIsExpanded:c}=e;const{t:u}=(0,x.Bd)(),m=u("readMore"),h=u("readLess"),b=(0,n.jsx)(E,{buttonType:i,isExpanded:s,showLessLabel:null!=t?t:h,showMoreLabel:null!=a?a:m,toggleIsExpanded:()=>c(!s),rightContent:d});return(0,n.jsxs)("div",{children:["top"===o&&b,(0,n.jsx)(N,{isExpanded:s,buttonPosition:o,removeChildrenWhenUnexpanded:r,children:l}),"bottom"===o&&b]})},E=e=>{let{buttonType:a,isExpanded:t,showLessLabel:o,showMoreLabel:i,toggleIsExpanded:p,rightContent:g}=e;switch(a){case"regular":return(0,n.jsxs)("div",{className:l,children:[(0,n.jsx)(h.jn,{complementary:!0,label:t?o:i,onClick:()=>p(),iconRightNew:t?"remove":"add","data-testid":"expand-content-toggle-button-"+(t?"expanded":"collapsed")}),g]});case"plain":case"ghost":return(0,n.jsxs)("button",{className:(0,f.TD)(l,d,"ghost"===a&&s),onClick:()=>p(),"data-testid":"expand-content-toggle-button-"+(t?"expanded":"collapsed"),children:[(0,n.jsxs)("span",{className:c,children:[(0,n.jsx)(b.P.span,{initial:{rotate:t?180:0},animate:{rotate:t?180:0},className:u,children:(0,n.jsx)(v.In,{name:"expand-more",className:m})}),(0,n.jsx)("span",{className:r,children:t?o:i})]}),g]});default:return(0,A.ZT)()}},w=e=>{let{children:a}=e;const[t,i]=(0,p.xQ)();return(0,o.useEffect)((()=>{!t&&setTimeout(i,200)}),[t,i]),(0,n.jsx)(n.Fragment,{children:a})},N=e=>{let{isExpanded:a,buttonPosition:t,removeChildrenWhenUnexpanded:l,children:d}=e;const[r,s]=(0,o.useState)(!1);return(0,n.jsx)(b.P.div,{className:i,"data-button-position":t,initial:!1,animate:{height:a?"auto":0,overflow:r?"visible":"hidden"},transition:{duration:.2,type:"tween"},onAnimationStart:e=>{0===e.height&&s(!1)},onAnimationComplete:e=>{"auto"===e.height&&s(!0)},"data-testid":"expand-content-content-"+(a?"expanded":"collapsed"),children:l?(0,n.jsx)(g.N,{children:a&&(0,n.jsx)(w,{children:d})}):d})}},92996:function(e,a,t){t.d(a,{s:function(){return d}});var n=t(74848),o="core--text-and-line-divider-module--wrapper--3a21c4",i="core--text-and-line-divider-module--line-wrapper--3e2271",l="core--text-and-line-divider-module--text-wrapper--6e20f9";const d=e=>{let{text:a,"data-testid":t}=e;return(0,n.jsxs)("div",{className:o,"data-testid":t,children:[(0,n.jsx)("div",{className:i,children:(0,n.jsx)("span",{})}),(0,n.jsx)("div",{className:l,children:(0,n.jsx)("span",{className:"bold heading-xs",children:a})})]})}}}]);
2//# sourceMappingURL=component---src-templates-digital-ride-media-qr-code-page-tsx-1ba9c25e723569270825.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.