1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[33274,82583],{4732:(e,n,i)=>{"use strict";i.r(n),i.d(n,{ArticleInlinePaidPlenigo:()=>A,PaidBoxOverlay:()=>Y,default:()=>O});var t=i(6029),a=i(54879),r=i.n(a),l=i(55729),o=i(31332),s=i(60660),d=i(58057),c=i(92476),u=i(34767),p=i(58376),x=i(4455),h=i(81163),m=i(8345),g=i(38252),f=i(11156),b=i(70217),v=i(32988),_=i.n(v),j=i(40524),w=i(41498),y=i(89517),P=i.n(y),k=i(31404),N=i.n(k),M=i(68980),D=i.n(M),z=i(64670),C=i.n(z),T=i(42704),B=i.n(T),S=i(60698),F=i.n(S),I=i(93039),H=i(23661);let A=({data:e,isBought:n,isProduct:i,shouldUseMarginTop:a=!1,totalLength:f=0,...v})=>{let y="plenigo_pdf_"+e?.paid?._id,k="inline-paid-plenigo-download-"+e?.paid?._id,M=(0,l.useContext)(g.HP),z=(0,l.useContext)(x.VQ),[T,S]=(0,l.useState)(""),[A,O,L]=(0,m.A)([y]),[U,E]=(0,l.useState)(!1),[J,W]=(0,l.useState)(!1),[G,K]=(0,l.useState)(n||A[y]),{isMobile:R}=(0,l.useContext)(j.a),{project:V}=(0,l.useContext)(g.HP);V=String(V).toUpperCase();let[$,Q]=(0,l.useState)("0px");if((0,l.useEffect)(()=>{a&&window.setTimeout(()=>{Q((0,I.getMarginTop)(f))},2e3)},[]),(0,l.useEffect)(()=>{!n&&z.loginValidated&&(z.loggedIn?Z():q())},[z.loginValidated,z.loggedIn]),(0,l.useEffect)(()=>{G&&!A[y]&&(O(y,"1",(0,x.f1)()),document.getElementById(k)?.scrollIntoView({behavior:"smooth",block:"center"}))},[G]),!e?.paid)return null;let X=e=>{E(!U)};async function Z(){try{let n=M.apiHost+`/plenigo-api/is-bought/${e.paid._id}`,i=await fetch(n,{method:"POST",credentials:"include"}).then(e=>e.json());K(i.isBought),i.isBought||(A[y]&&L(y,(0,x.f1)()),q())}catch(e){console.log("error in checkProductBought",e)}}async function q(){try{let n=M.apiHost+`/plenigo-api/preparePDFPurchase/${e.paid._id}`,i=await fetch(n,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({returnUrl:window.location.href})}).then(e=>e.json());S(i.checkoutUrl)}catch(e){console.log("error in fetchCheckoutUrl",e)}}return(0,t.jsx)("div",{className:"float-none clear-both",...(0,H.h)("paid-plenigo"),children:(0,t.jsxs)(p.yI,{visible:!0,click:!0,name:i?"article.productBox":"article.paidBox",children:[(0,t.jsx)("div",{id:"shopify-overlay-container"}),(0,t.jsxs)("div",{style:a?{marginTop:$}:{},className:"mx-4 lg:mx-0 mb-6 rounded-t-lg border-2 border-solid "+r().borderColor,children:[(0,t.jsx)("div",{className:"py-2 text-center rounded-t-lg border-b-2 border-solid "+r().headColor+" "+r().borderColor,children:(0,t.jsx)(o.Headline,{isDarkMode:!0,size:"medium",headline:e.paid.boxHeader||"Download"})}),(0,t.jsxs)("div",{className:"va-paid-box",children:[(0,t.jsxs)("div",{className:"lg:flex lg:flex-wrap py-4 px-4 "+r().backgroundColor,children:[(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsx)(s.Subline,{isDarkMode:!0,children:e.paid.headline}),(0,t.jsx)("div",{className:"mb-2",children:(0,t.jsx)(o.Headline,{isDarkMode:!0,size:"medium",headline:e.paid.title})})]}),(0,t.jsxs)("div",{className:"flex flex-col flex-wrap items-start gap-4 lg:flex-row lg:gap-0",children:[(0,t.jsx)("figure",{className:"lg:max-w-px-300 relative aspect-video w-full overflow-hidden lg:w-1/2",children:(0,t.jsx)(d.Ay,{className:"h-auto w-full",src:e.paid.image,elementId:"inline.paidPlenigo"})}),(0,t.jsxs)("div",{className:"lg:w-1/2 lg:pl-4",children:[e.paid.mhteaser&&e.paid?.mhteaser?.length>0&&(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("div",{className:"relative text-xs "+r().paidMhTeaser,dangerouslySetInnerHTML:{__html:e.paid.mhteaser}})}),e?.paid?.badge&&(0,t.jsx)(d.Ay,{src:e.paid.badge,sizes:["badge"],className:"w-px-100 lg:w-px-140 pt-4"})]}),(0,t.jsxs)("div",{className:"flex w-full flex-col justify-between lg:mt-3 lg:flex-row lg:items-start",children:[(0,t.jsx)("div",{className:"w-full empty:hidden",children:e?.paid?.text.length>=1&&e?.paid?.text[0]!=="<p></p>"&&(0,t.jsx)("div",{className:"flex space-x-3 pt-1 lg:left-0",children:(0,t.jsxs)("div",{className:"ml-1.5 flex cursor-pointer lg:ml-0",children:[(0,t.jsx)(w.B,{src:P(),className:"size-px-9 inline-block mt-1 mr-1.5 "+r().iconColor}),(0,t.jsx)("span",{onClick:X.bind(void 0,!1),className:"block text-xs underline",children:"mehr Infos"}),U&&(0,t.jsx)(Y,{paidBoxData:e.paid,setOverlay:X.bind(void 0,!1)})]})})}),!G&&e.paid.price&&(0,t.jsxs)("div",{className:"ml-auto flex justify-center gap-4 lg:flex-col",children:[(0,t.jsxs)("div",{className:"w-px-140 lg:w-px-150 text-center lg:items-center",children:[e.paid.priceDiscounted&&!Number.isNaN(parseFloat(e.paid.priceDiscounted))&&e.paid.priceDiscounted!==(0,u.numberFormat)(e.paid.price,2)&&(0,t.jsxs)("small",{className:"price-small relative mr-4 inline-block lg:text-base",children:[(0,t.jsx)(w.B,{src:N(),className:"size-px-40 text-skin-primary absolute left-1/2 top-1/2 inline-block -translate-x-1/2 -translate-y-1/2"}),(0,t.jsxs)("span",{className:"relative",children:[e.paid.priceDiscounted," â¬"]})]}),(0,t.jsxs)("div",{className:"block lg:flex lg:items-center lg:gap-3",children:[i&&!!e.paid.infoPrice&&(0,t.jsx)("span",{className:"mr-1 block text-xs",children:e.paid.infoPrice}),!i&&(0,t.jsx)("span",{className:"block text-xs",children:"nur"}),(0,t.jsxs)("span",{className:"whitespace-nowrap text-2xl font-bold lg:text-3xl",children:[(0,u.numberFormat)(e.paid.price,2)," â¬"]})]})]}),!i&&T&&(0,t.jsxs)("div",{className:"space-y-2 text-center lg:w-full",children:[(0,t.jsx)("div",{className:"va-button text-skin-white block cursor-pointer rounded-full",children:(0,t.jsx)("div",{className:"content__paidpdf__price h-px-30",children:(0,t.jsx)("a",{href:T,className:"block max-w-px-200 whitespace-nowrap rounded-full bg-skin-primary px-px-12 pb-px-6 pt-px-5 "+r().buttonPaidbox,rel:"noreferrer",children:"Jetzt kaufen"})})}),!G&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{children:(0,t.jsx)("span",{onClick:()=>{W(!0)},className:"block max-w-px-200 cursor-pointer whitespace-nowrap rounded-full bg-skin-grey-medium px-px-12 pb-px-6 pt-px-5 text-skin-grey-dark "+r().buttonPaidbox,children:"Jetzt downloaden"})}),(0,t.jsxs)("div",{className:_()({"p-4 absolute left-4 bottom-4 right-4 shadow-md text-left items-center justify-between gap-4":!0,[r().errorBox]:!0,flex:J,hidden:!J}),children:[(0,t.jsx)("div",{className:"grow",children:(0,t.jsx)(b.Text,{size:"small",isDarkMode:!0,children:"Ups! Sieht so aus, als h\xe4ttest Du den Kauf noch nicht abgeschlossen."})}),(0,t.jsx)(w.B,{src:D(),onClick:()=>{W(!1)},className:"w-px-16 cursor-pointer"})]})]})]})]})]})]})]}),i&&e?.paid?.buttonText&&e?.paid?.buttonLink&&(0,t.jsx)("div",{className:"p-4 text-center",children:(0,t.jsx)(p.yI,{visible:!1,
1click:!0,name:"article.productBox",children:(0,t.jsx)(h.Button,{link:e?.paid?.buttonLink?.URL,linkTarget:"_blank",type:"link",style:"primaryInverted",text:e?.paid?.buttonText})})})]}),!i&&G?(0,t.jsxs)("div",{className:"bg-skin-primary flex flex-wrap justify-center gap-4 p-4",children:[(0,t.jsxs)("div",{className:"flex w-full items-center justify-center gap-4",children:[(0,t.jsx)(w.B,{src:B(),className:"text-skin-white w-4"}),(0,t.jsx)("p",{className:"text-skin-white !mb-0 !px-0 text-xs",children:"Du hast das PDF bereits gekauft."})]}),(0,t.jsx)(c.Ay,{href:"/plenigo-api/download/"+e.paid._id,target:"_blank",children:(0,t.jsxs)("span",{className:"bg-skin-white px-px-12 pb-px-6 pt-px-5 text-skin-primary flex cursor-pointer gap-2 whitespace-nowrap rounded-full text-xs",children:[(0,t.jsx)(w.B,{src:F(),className:"w-4"}),"Jetzt herunterladen"]})})]}):(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4 p-4",children:[(0,t.jsx)(w.B,{src:C(),className:"text-skin-primary size-4"}),(0,t.jsx)("p",{className:"text-skin-grey-dark !mb-0 grow !px-0 text-xs",children:"Nach dem Kauf erh\xe4ltst du eine E-Mail mit einem Link zum PDF-Datei Download oder kannst die Datei direkt hier auf der Webseite herunterladen."})]})]})]})})},Y=({paidBoxData:e,setOverlay:n})=>(0,t.jsx)("div",{className:"va-gallery-overlay z-100 bg-skin-black fixed left-0 top-0 flex size-full items-center justify-center px-4",style:{overflow:"scroll"},children:(0,t.jsxs)("div",{"data-window-name":"paidbox",className:"paidbox-overlay relative overflow-y-auto bg-skin-white px-4 pb-4 pt-px-40 lg:max-w-px-800 "+r().overlay,children:[(0,t.jsx)("div",{className:"va-gallery-overlay__close size-px-15 bg-skin-white absolute right-4 top-4 flex items-center justify-center landscape:hidden lg:landscape:block",onClick:n,children:(0,t.jsx)(w.B,{src:D(),className:"text-skin-black w-full"})}),(0,t.jsx)("div",{className:"paidbox-overlay__headline border-skin-grey-medium mb-4 border-b border-solid pb-4",children:(0,t.jsx)(o.Headline,{size:"medium",headline:e.headline})}),(0,t.jsxs)("div",{className:"paidbox-overlay__text pl-4",children:[(0,t.jsx)("div",{className:"-ml-4 mb-2",children:(0,t.jsx)(o.Headline,{size:"small",headline:e.title})}),(0,t.jsx)(f.X0,{isDarkmode:!1,className:r().overlayText,data:e.text})]})]})}),O=A},31404:(e,n,i)=>{e.exports=i.p+"static/img/icon-cross.svg"},34767:(e,n,i)=>{let t=i(97282);e.exports={numberFormat:function(e,n){return n=n||0,e="string"==typeof e?e.replace(",","."):e,t.numberFormat(e,n,",",".")},kwToPs:function(e){return Math.round(1.35962*parseInt(e))}}},54879:e=>{e.exports={"border-color":"inlinePaidPlenigo_border-color__pgzLf",borderColor:"inlinePaidPlenigo_border-color__pgzLf","head-color":"inlinePaidPlenigo_head-color__Aij91",headColor:"inlinePaidPlenigo_head-color__Aij91","error-box":"inlinePaidPlenigo_error-box__81C9D",errorBox:"inlinePaidPlenigo_error-box__81C9D","background-color":"inlinePaidPlenigo_background-color__SPh6P",backgroundColor:"inlinePaidPlenigo_background-color__SPh6P","icon-color":"inlinePaidPlenigo_icon-color__TP5Cw",iconColor:"inlinePaidPlenigo_icon-color__TP5Cw","va-radio":"inlinePaidPlenigo_va-radio__mcwWP",vaRadio:"inlinePaidPlenigo_va-radio__mcwWP",input:"inlinePaidPlenigo_input____wDR","va-radio-button_span":"inlinePaidPlenigo_va-radio-button_span__D3uIQ",vaRadioButtonSpan:"inlinePaidPlenigo_va-radio-button_span__D3uIQ","paid-mh-teaser":"inlinePaidPlenigo_paid-mh-teaser__z6Ah7",paidMhTeaser:"inlinePaidPlenigo_paid-mh-teaser__z6Ah7",overlay:"inlinePaidPlenigo_overlay__jMw_0","overlay-text":"inlinePaidPlenigo_overlay-text__C0zP3",overlayText:"inlinePaidPlenigo_overlay-text__C0zP3","button-paidbox":"inlinePaidPlenigo_button-paidbox__ima_6",buttonPaidbox:"inlinePaidPlenigo_button-paidbox__ima_6"}},64670:(e,n,i)=>{e.exports=i.p+"static/img/icon-info.svg"},97282:function(e,n){(function(){var i=this,t=i.humanize,a={};e.exports&&(n=e.exports=a),n.humanize=a,a.noConflict=function(){return i.humanize=t,this},a.pad=function(e,n,i,t){if(e+="",i?i.length>1&&(i=i.charAt(0)):i=" ","right"==(t=void 0===t?"left":"right"))for(;e.length<n;)e+=i;else for(;e.length<n;)e=i+e;return e},a.time=function(){return new Date().getTime()/1e3};var r=[0,0,31,59,90,120,151,181,212,243,273,304,334],l=[0,0,31,60,91,121,152,182,213,244,274,305,335];a.date=function(e,n){var i=void 0===n?new Date:new Date(n instanceof Date?n:1e3*n),t=/\\?([a-z])/gi,o=function(e,n){return c[e]?c[e]():n}
1,s=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d=["January","February","March","April","May","June","July","August","September","October","November","December"],c={d:function(){return a.pad(c.j(),2,"0")},D:function(){return c.l().slice(0,3)},j:function(){return i.getDate()},l:function(){return s[c.w()]},N:function(){return c.w()||7},S:function(){var e=c.j();return e>4&&e<21?"th":({1:"st",2:"nd",3:"rd"})[e%10]||"th"},w:function(){return i.getDay()},z:function(){return(c.L()?l[c.n()]:r[c.n()])+c.j()-1},W:function(){var e=c.z()-c.N()+1.5;return a.pad(1+Math.floor(Math.abs(e)/7)+ +(e%7>3.5),2,"0")},F:function(){return d[i.getMonth()]},m:function(){return a.pad(c.n(),2,"0")},M:function(){return c.F().slice(0,3)},n:function(){return i.getMonth()+1},t:function(){return new Date(c.Y(),c.n(),0).getDate()},L:function(){return+(1===new Date(c.Y(),1,29).getMonth())},o:function(){var e=c.n(),n=c.W();return c.Y()+(12===e&&n<9?-1:1===e&&n>9)},Y:function(){return i.getFullYear()},y:function(){return String(c.Y()).slice(-2)},a:function(){return i.getHours()>11?"pm":"am"},A:function(){return c.a().toUpperCase()},B:function(){var e=i.getTime()/1e3,n=e%86400+3600;n<0&&(n+=86400);var t=n/86.4%1e3;return e<0?Math.ceil(t):Math.floor(t)},g:function(){return c.G()%12||12},G:function(){return i.getHours()},h:function(){return a.pad(c.g(),2,"0")},H:function(){return a.pad(c.G(),2,"0")},i:function(){return a.pad(i.getMinutes(),2,"0")},s:function(){return a.pad(i.getSeconds(),2,"0")},u:function(){return a.pad(1e3*i.getMilliseconds(),6,"0")},O:function(){var e=i.getTimezoneOffset(),n=Math.abs(e);return(e>0?"-":"+")+a.pad(100*Math.floor(n/60)+n%60,4,"0")},P:function(){var e=c.O();return e.substr(0,3)+":"+e.substr(3,2)},Z:function(){return-(60*i.getTimezoneOffset())},c:function(){return"Y-m-d\\TH:i:sP".replace(t,o)},r:function(){return"D, d M Y H:i:s O".replace(t,o)},U:function(){return i.getTime()/1e3||0}};return e.replace(t,o)},a.numberFormat=function(e,n,i,t){n=isNaN(n)?2:Math.abs(n),i=void 0===i?".":i,t=void 0===t?",":t;var a=e<0?"-":"",r=parseInt((e=Math.abs(+e||0)).toFixed(n),10)+"",l=r.length>3?r.length%3:0;return a+(l?r.substr(0,l)+t:"")+r.substr(l).replace(/(\d{3})(?=\d)/g,"$1"+t)+(n?i+Math.abs(e-r).toFixed(n).slice(2):"")},a.naturalDay=function(e,n){e=void 0===e?a.time():e,n=void 0===n?"Y-m-d":n;var i=new Date,t=new Date(i.getFullYear(),i.getMonth(),i.getDate()).getTime()/1e3;return e<t&&e>=t-86400?"yesterday":e>=t&&e<t+86400?"today":e>=t+86400&&e<t+172800?"tomorrow":a.date(n,e)},a.relativeTime=function(e){e=void 0===e?a.time():e;var n=a.time(),i=n-e;if(i<2&&i>-2)return(i>=0?"just ":"")+"now";if(i<60&&i>-60)return i>=0?Math.floor(i)+" seconds ago":"in "+Math.floor(-i)+" seconds";if(i<120&&i>-120)return i>=0?"about a minute ago":"in about a minute";if(i<3600&&i>-3600)return i>=0?Math.floor(i/60)+" minutes ago":"in "+Math.floor(-i/60)+" minutes";if(i<7200&&i>-7200)return i>=0?"about an hour ago":"in about an hour";if(i<86400&&i>-86400)return i>=0?Math.floor(i/3600)+" hours ago":"in "+Math.floor(-i/3600)+" hours";if(i<172800&&i>-172800)return i>=0?"1 day ago":"in 1 day";if(i<2505600&&i>-2505600)return i>=0?Math.floor(i/86400)+" days ago":"in "+Math.floor(-i/86400)+" days";if(i<5184e3&&i>-5184e3)return i>=0?"about a month ago":"in about a month";var t=parseInt(a.date("Y",n),10),r=parseInt(a.date("Y",e),10),l=12*t+parseInt(a.date("n",n),10)-(12*r+parseInt(a.date("n",e),10));if(l<12&&l>-12)return l>=0?l+" months ago":"in "+-l+" months";var o=t-r;return o<2&&o>-2?o>=0?"a year ago":"in a year":o>=0?o+" years ago":"in "+-o+" years"},a.ordinal=function(e){var n=(e=isNaN(e=parseInt(e,10))?0:e)<0?"-":"",i=(e=Math.abs(e))%100;return n+e+(i>4&&i<21?"th":({1:"st",2:"nd",3:"rd"})[e%10]||"th")},a.filesize=function(e,n,i,t,r,l){return(n=void 0===n?1024:n,e<=0)?"0 bytes":(e<n&&void 0===i&&(i=0),void 0===l&&(l=" "),a.intword(e,["bytes","KB","MB","GB","TB","PB"],n,i,t,r,l))},a.intword=function(e,n,i,t,r,l,o){d=(n=n||["","K","M","B","T"]).length-1,i=i||1e3,t=isNaN(t)?2:Math.abs(t),r=r||".",l=l||",",o=o||"";for(var s,d,c=0;c<n.length;c++)if(e<Math.pow(i,c+1)){d=c;break}s=e/Math.pow(i,d);var u=n[d]?o+n[d]:"";return a.numberFormat(s,t,r,l)+u},a.linebreaks=function(e){return"<p>
1"+(e=(e=(e=(e=(e=e.replace(/^([\n|\r]*)/,"")).replace(/([\n|\r]*)$/,"")).replace(/(\r\n|\n|\r)/g,"\n")).replace(/(\n{2,})/g,"</p><p>")).replace(/\n/g,"<br />"))+"</p>"},a.nl2br=function(e){return e.replace(/(\r\n|\n|\r)/g,"<br />")},a.truncatechars=function(e,n){return e.length<=n?e:e.substr(0,n)+"â¦"},a.truncatewords=function(e,n){var i=e.split(" ");return i.length<n?e:i.slice(0,n).join(" ")+"â¦"}}).call(this)}}]);
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.