PageSourceSearch

https://skat.dk/_next/static/chunks/2941.5139cbd8d779acf1.js

js skat.dk collected 2026-09-24 08:31:20 UTC 9,243 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2941],{52941:function(e,s,n){"use strict";n.r(s),n.d(s,{QuizKnowledgeFeature:function(){return k}});var t=n(85893),r=n(94184),l=n.n(r),i=n(67294);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var s=1;s<arguments.length;s++){var n=arguments[s];for(var t in n)({}).hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e}).apply(null,arguments)}var a=function(e){return i.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",style:{fillRule:"evenodd",clipRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:2},viewBox:"0 0 160 160"},e),i.createElement("path",{d:"M80 14c36.426 0 66 29.574 66 66s-29.574 66-66 66-66-29.574-66-66 29.574-66 66-66m-6.084 90.115q0 2.451 1.664 4.114t4.114 1.663q2.538 0 4.201-1.663 1.75-1.663 1.751-4.114 0-2.538-1.751-4.201-1.663-1.752-4.201-1.751-2.451 0-4.114 1.751-1.664 1.663-1.664 4.201m24.159-38.164q0-4.201-1.4-7.09-1.401-2.976-3.851-4.814-2.364-1.926-5.69-2.714-3.327-.875-7.09-.875-6.479 0-11.379 2.188-4.902 2.188-7.266 8.053l8.929 3.064q1.225-2.539 3.326-3.764 2.189-1.226 5.865-1.226 4.288 0 6.477 2.101 2.276 2.102 2.276 5.427 0 2.276-.876 4.027-.875 1.662-2.275 3.238a48 48 0 0 1-2.976 3.064 29.4 29.4 0 0 0-3.064 3.414q-1.488 1.925-2.626 4.376-1.05 2.451-1.313 5.865h9.278q.351-2.538 1.488-4.464a23.3 23.3 0 0 1 2.714-3.501 80 80 0 0 1 3.239-3.064 23.6 23.6 0 0 0 2.976-3.414q1.4-1.838 2.276-4.201.963-2.363.962-5.69",style:{fill:"#fff",fillOpacity:.8},transform:"matrix(.91395 0 0 .91395 6.884 6.884)"}),i.createElement("path",{d:"M160 80a80.007 80.007 0 0 1-23.431 56.569l-14.143-14.143A60 60 0 0 0 140 80z",style:{fill:"#fff",fillOpacity:.4,fillRule:"nonzero"}}),i.createElement("path",{d:"M136.569 136.569A80 80 0 0 1 80 160v-20a60 60 0 0 0 42.426-17.574z",style:{fill:"#fff",fillOpacity:.2,fillRule:"nonzero"}}),i.createElement("path",{d:"M80 160a80 80 0 0 1-56.568-23.431l14.142-14.143A60 60 0 0 0 80 140z",style:{fill:"#fff",fillOpacity:.4,fillRule:"nonzero"}}),i.createElement("path",{d:"M23.432 136.569A80 80 0 0 1 0 80h20a60 60 0 0 0 17.574 42.426z",style:{fill:"#fff",fillOpacity:.2,fillRule:"nonzero"}}),i.createElement("path",{d:"M0 80a80 80 0 0 1 23.432-56.568l14.142 14.142A60 60 0 0 0 20 80z",style:{fill:"#fff",fillOpacity:.4,fillRule:"nonzero"}}),i.createElement("path",{d:"M23.432 23.432A79.99 79.99 0 0 1 80 0v20a60 60 0 0 0-42.426 17.574z",style:{fill:"#fff",fillOpacity:.2,fillRule:"nonzero"}}),i.createElement("path",{d:"M80 0a80 80 0 0 1 56.569 23.432l-14.143 14.142A60 60 0 0 0 80 20z",style:{fill:"#fff",fillOpacity:.4,fillRule:"nonzero"}}),i.createElement("path",{d:"M136.569 23.432A80 80 0 0 1 160 80h-20a60 60 0 0 0-17.574-42.426z",style:{fill:"#fff",fillOpacity:.2,fillRule:"nonzero"}}))},u=n(26680),d=n(94894),c=n(94594),_=n(16824),g=n(11148),h=n(67906),f=n.n(h);let x=e=>{let{done:s=!1,step:n,steps:r}=e,l=e=>s&&e===n-1&&n!==r?f().ProgressBar_done:s&&e===n-1||e+1===r&&n>r?f().ProgressBar_end:e+1===n?f().ProgressBar_active:e+1<n?f().ProgressBar_done:f().ProgressBar_step,i=e=>e+1===r?"":e>=n-1?f().ProgressBar_dottedLine:f().ProgressBar_line;return(0,t.jsx)("ol",{className:f().ProgressBar,children:Array.from({length:r},(e,s)=>(0,t.jsx)("li",{className:l(s),children:(0,t.jsx)("div",{className:i(s)})},s))})};var p=n(18124),m=n.n(p);let v=e=>{var s,n;let{answersBackgroundColor:r,nextButton:o,nextQuestionHandler:a,questionContent:h,questionNumber:f,questionsCount:p}=e,[v,w]=(0,i.useState)(0),[Q,j]=(0,i.useState)(0),[z,B]=(0,i.useState)(!1),P=e=>{let s=e.target.closest("button"),n=s.dataset.index;(null==h?void 0:h.answers.items[n].content.properties.isTrue)?(s.classList.add("isCorrect"),setTimeout(()=>{w(1)},500)):(s.classList.add("isWrong"),setTimeout(()=>{w(2)},500))};return(0,i.useEffect)(()=>{Q!==f&&(B(!1),j(f),w(0))},[Q,f,w]),(0,t.jsxs)("div",{className:m().Question_container,children:[0===v&&(0,t.jsxs)("div",{children:[(0,t.jsx)(x,{done:!1,step:f,steps:p}),(0,t.jsx)(d.X,{className:m().Question_headline,headingLevel:"h2",style:"md",children:null==h?void 0:h.question}),null==h?void 0:h.answers.items.map((e,s)=>(0,t.jsxs)("button",{type:"button",className:l()(m().Answer,"u-bg-color--".concat(null==r?void 0:r.toLocaleLowerCase())),onClick:P,"data-index":s,children:[(0,t.jsx)("span",{children:e.content.properties.answer}),(0,t.jsx)("span",{className:m().Answer_iconOk,children:(0,t.jsx)(_.Z,{})}),(0,t.jsx)("span",{className:m().Answer_iconClose,children:(0,t.jsx)(g.Z,{})})]},s))]}),1===v&&(0,t.jsxs)("div",{children:[(0,t.jsx)(x,{done:!0,step:f,steps:p}),(0,t.jsxs)("div",{className:m().Question_answerContainer,children:[(0,t.jsx)(d.X,{className:m().Question_headline,headingLevel:"h2",style:"md",children:null==h?void 0:h.correctAnswerHeadline}),(0,t.jsx)(c.H,{content:null==h?void 0:null===(s=h.correctAnswerText)||void 0===s?void 0:s.markup}),(0,t.jsx)(u.zx,{onClick:()=>{a(1)},children:o})]})]}),2===v&&(0,t.jsxs)("div",{children:[(0,t.jsx)(x,{done:!0,step:f,steps:p}),(0,t.jsxs)("div",{className:m().Question_answerContainer,children:[(0,t.jsx)(d.X,{className:m().Question_headline,headingLevel:"h2",style:"md",children:null==h?void 0:h.wrongAnswerHeadline}),(0,t.jsx)(c.H,{content:null==h?void 0:null===(n=h.wrongAnswerText)||void 0===n?void 0:n.markup}),(0,t.jsx)(u.zx,{onClick:()=>{a(0)},children:o})]})]})]})};var w=n(68934),Q=n.n(w),j=n(59066),z=n.n(j);let B=e=>{let{restartButton:s,resetHandler:n,resultHeadline:r,resultText:l,questionsCount:i=0,questionScores:o}=e,a=o.reduce((e,s)=>e+s,0);return(0,t.jsxs)("div",{className:z().Result,children:[(0,t.jsx)(d.X,{className:z().Result_headline,headingLevel:"h2",style:"md",children:r.replace("[result]",a.toString()).replace("[count]",i.toString())}),(0,t.jsx)(c.H,{content:l.markup}),(0,t.jsx)(u.zx,{onClick:n,children:s})]})};var P=n(4731),y=n.n(P);let K=e=>{let{nextQuestionHandler:s,startButton:n,teaser:r}=e;return(0,t.jsxs)("div",{className:y().Teaser,children:[(0,t.jsx)(d.X,{className:y().Teaser_text,headingLevel:"h2",style:"lg",children:r}),(0,t.jsx)(u.zx,{onClick:()=>{s(-1)},children:n})]})},N=e=>{let{backgroundColor:s,teaser:n,questions:r,resultHeadline:o,resultText:u,startButton:d,nextButton:c,restartButton:_}=e,[g,h]=(0,i.useState)(0),[f,x]=(0,i.useState)(),[p,m]=(0,i.useState)([]),w=e=>{e>-1&&(p[g-1]=e,m(p)),g<r.items.length&&x(r.items[g].content.properties),h(g+1)};
1return(0,t.jsxs)("div",{className:l()(Q().QuizKnowledge,"u-bg-color--".concat(s)),children:[(0,t.jsx)("div",{className:Q().QuizKnowledge_iconOne,children:(0,t.jsx)(a,{})}),(0,t.jsx)("div",{className:Q().QuizKnowledge_iconTwo,children:(0,t.jsx)(a,{})}),(0,t.jsx)("div",{className:Q().QuizKnowledge_iconThree,children:(0,t.jsx)(a,{})}),(0,t.jsx)("div",{className:Q().QuizKnowledge_iconFour,children:(0,t.jsx)(a,{})}),(0,t.jsxs)("div",{className:l()(Q().QuizKnowledge_container,"u-bg-color--white"),children:[0===g&&(0,t.jsx)(K,{nextQuestionHandler:w,startButton:d,teaser:n}),g>0&&g<r.items.length+1&&(0,t.jsx)(v,{nextButton:c,nextQuestionHandler:w,questionContent:f,questionNumber:g,questionsCount:r.items.length}),g===r.items.length+1&&(0,t.jsx)(B,{resetHandler:()=>{h(0)},restartButton:_,resultHeadline:o,resultText:u,questionsCount:r.items.length,questionScores:p})]})]})};var A=n(75237);let k=e=>{var s,n;let{content:r,settings:l}=e,{teaser:i,questions:o,resultHeadline:a,resultText:u,startButton:d,nextButton:c,restartButton:_}=null!==(s=null==r?void 0:r.properties)&&void 0!==s?s:{},{backgroundColor:g}=null!==(n=null==l?void 0:l.properties)&&void 0!==n?n:{};return(0,t.jsx)(A.E,{...l,children:(0,t.jsx)(N,{backgroundColor:null==g?void 0:g.toLocaleLowerCase(),questions:o,teaser:i,resultHeadline:a,resultText:u,startButton:d,nextButton:c,restartButton:_})})}},67906:function(e){e.exports={ProgressBar:"ProgressBar_ProgressBar__ziFhB",ProgressBar_line:"ProgressBar_ProgressBar_line__RaYgL",ProgressBar_dottedLine:"ProgressBar_ProgressBar_dottedLine__BfEsK",ProgressBar_done:"ProgressBar_ProgressBar_done__tABhn",ProgressBar_active:"ProgressBar_ProgressBar_active__KQJrK",ProgressBar_step:"ProgressBar_ProgressBar_step__lgzrZ",ProgressBar_end:"ProgressBar_ProgressBar_end__GBvmP"}},18124:function(e){e.exports={Question_container:"Question_Question_container__6Z5to",Question_progress:"Question_Question_progress__R_ZBd",Question_headline:"Question_Question_headline__g8Bs4",Question_answerContainer:"Question_Question_answerContainer__u7y0Q",Answer:"Question_Answer__tc5Lm",Answer_iconOk:"Question_Answer_iconOk__N_RZT",Answer_iconClose:"Question_Answer_iconClose__3oWpq",shake:"Question_shake__cAMRi"}},68934:function(e){e.exports={QuizKnowledge:"QuizKnowledge_QuizKnowledge__kPNVd",QuizKnowledge_iconOne:"QuizKnowledge_QuizKnowledge_iconOne___nr5v",QuizKnowledge_iconTwo:"QuizKnowledge_QuizKnowledge_iconTwo__XtDkM",QuizKnowledge_iconThree:"QuizKnowledge_QuizKnowledge_iconThree__4roU9",QuizKnowledge_iconFour:"QuizKnowledge_QuizKnowledge_iconFour__N8g2Y",QuizKnowledge_container:"QuizKnowledge_QuizKnowledge_container__Iqig0"}},59066:function(e){e.exports={Result:"Result_Result__nbKnU",Result_headline:"Result_Result_headline__AKy3X"}},4731:function(e){e.exports={Teaser:"Teaser_Teaser__X80Uu",Teaser_text:"Teaser_Teaser_text__ZMk58"}}}]);
2//# sourceMappingURL=2941.5139cbd8d779acf1.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.