"use strict";(self.webpackChunk_spark_front_templates=self.webpackChunk_spark_front_templates||[]).push([["7113"],{3182:function(e,n,t){t.d(n,{SC:function(){return i},d8:function(){return r},ej:function(){return o},kT:function(){return a}});var o=e=>{for(var n=e+"=",t=decodeURIComponent(document.cookie).split(";"),o=0;o2&&void 0!==arguments[2]?arguments[2]:0;if(0===t)document.cookie=e+"="+n+";path=/";else{var o=new Date;o.setTime(o.getTime()+864e5*t);var r="expires="+o.toUTCString();document.cookie=e+"="+n+";"+r+";path=/"}},a=e=>{document.cookie="".concat(e,"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")},i=e=>{for(var n=document.cookie.split(";"),t=0;ti}),(o||(o={})).aurora="aurora";var o,r=t("3182"),a=t("5334"),i=()=>{(0,r.d8)("sfauthr","true",365),window.location.href=(0,a.z)("auth")}},5334:function(e,n,t){t.d(n,{z:function(){return c}});var o=t(3182),r=t(470),a=()=>{if("undefined"!=typeof window){if(!["sf-dev","sf-test","sf-uat","sf-prod","sparknews-dev","sparknews-test","sparknews-uat","sparknews"].some(e=>window.location.host.includes(e))){var e=window.location.host.split(".");if(3===e.length&&"www"!==e[0])return e[0];if(e.length>3)return e[1]}}},i=e=>{var n=e.split(".");return n.length>2?n.slice(-2).join("."):e},c=(e,n,t)=>{var c,d,s,u,l,p,f,m=null!==(l=null==n?void 0:n.pageUrl)&&void 0!==l?l:"",x="",v="";if(""!==m&&n){var w=t||n.pageUrl;w&&({domain:x,pathname:v}=(e=>{var[n,...t]=e.replace(/^(https?:\/\/)/,"").split("/");return{domain:n,pathname:"/".concat(t.join("/"))}})(w))}var h="undefined"!=typeof window&&("true"===(0,o.ej)("ssoSandbox")||(0,r.l)().ssoSandbox||(null==n?void 0:n.sandbox)||!1),g="undefined"!=typeof window?null===(d=window.SPARK)||void 0===d?void 0:null===(c=d.sso)||void 0===c?void 0:c.clientId:n?n.clientId:"",b="undefined"!=typeof window?null===(u=window.SPARK)||void 0===u?void 0:null===(s=u.sso)||void 0===s?void 0:s.auth0Realm:n?n.auth0Realm:"";if("undefined"==typeof window)f=encodeURIComponent("https://".concat(x));else{var k=(p=a())?i(window.location.host):window.location.host,y=p?"https://www.":"https://";f=encodeURIComponent("".concat(y).concat(k))}var S=encodeURIComponent(encodeURIComponent("undefined"!=typeof window?window.location.pathname+window.location.search:v)),C="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{var n=16*Math.random()|0;return("x"===e?n:3&n|8).toString(16)}),_=h?"https://login-stage.funkemedien.de/realms/".concat(b):"https://login.funkemedien.de/realms/".concat(b);p=p?encodeURIComponent("/".concat(p,"/")):p;var I="redirect_uri=".concat(f,"%2Fredirect.html%3Fo%3D").concat(p||S);return"reset-credentials"===e?"".concat(_,"/login-actions/").concat(e,"?client_id=").concat(g):"".concat(_,"/protocol/openid-connect/").concat("registrations"===e?e:"auth","?client_id=").concat(g).concat("registrations"===e||"auth"===e?"":"&kc_action=".concat(e),"&scope=openid%20profile%20email&response_type=id_token%20token&response_mode=form_post&nonce=").concat(C,"&").concat(I)}},3274:function(e,n,t){t.d(n,{i:function(){return o}});var o=e=>{var n="sandbox_info",t=document.getElementById(n),o=(e,n)=>e.textContent.includes(n),r=t&&Array.from(t.getElementsByTagName("span")).find(n=>o(n,e));if(!t&&((t=document.createElement("div")).className="fixed bottom-4 left-2 rounded-md z-50",t.id=n,document.body.appendChild(t)),!r){var a=document.createElement("span");a.innerText=e,a.className="text-copy-negative bg-background-900 p-2 rounded-md mr-2",t.appendChild(a)}}},470:function(e,n,t){t.d(n,{l:function(){return r}});var o=t(3182),r=()=>{var e=["pcAccess","epAccess","debug"],n=["empty"],t=["ssoSandbox","pianoSandbox"];return window.location.search.slice(1).split("&").reduce((r,a)=>{var[i,c]=a.split("=").map(decodeURIComponent);return"true"===c||"false"===c?r[i]="true"===c:r[i]=c,e.includes(i)&&sessionStorage.setItem(i,c),n.includes(i)&&localStorage.setItem(i,c),t.includes(i)&&(0,o.d8)(i,c,1),("ssoSandbox"===i||"pianoSandbox"===i)&&"false"===c&&(0,o.kT)(i),r},function(e){for(var n=1;ns});var o=t("470"),r=t("3182"),a=t("3274"),i=t("5334"),c=t("9591"),d=(0,t("971").Z)("LoginButtonModule"),s=e=>{d.info("running");var{ssoSandbox:n}=(0,o.l)(),t="true"===(0,r.ej)("ssoSandbox")||n;t&&(0,a.i)("ssoSandbox = ".concat(t)),e.setAttribute("href",(0,i.z)("auth")),e.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),(0,c.v)()})}}}]);