1(()=>{(function(){try{var c=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:{},l=new c.Error().stack;l&&(c._sentryDebugIds=c._sentryDebugIds||{},c._sentryDebugIds[l]="05dcc883-56ae-4fca-90c8-0dec951c4766",c._sentryDebugIdIdentifier="sentry-dbid-05dcc883-56ae-4fca-90c8-0dec951c4766")}catch(e){}})();(self.webpackChunkdice_web=self.webpackChunkdice_web||[]).push([[50214],{3323:((c,l,e)=>{e.r(l),e.d(l,{default:()=>j});var t=e(96540),O=e(56347),f=e(58562),I=e(63492),_=e(84454),y=e(81056),d=e(47393),M=e(58484),E=e(31600),m=e(9246);const A=n=>{var o;const a={};return Object.entries((o=n.purposeInfo)!=null?o:{}).forEach(([r,s])=>{a[r]=String(s.allowed)==="true"}),a},h=1e4,N=async n=>{const{organisation:o,property:a,environment:r,accountId:s}=n,g=new AbortController,i=window.setTimeout(()=>g.abort(),h);try{const v=await fetch(`${E.PM}/${encodeURIComponent(o)}/get?includePurposeInfo=true`,{method:"POST",headers:{"Content-Type":"application/json",accept:"application/json"},body:JSON.stringify({organizationCode:o,propertyCode:a,environmentCode:r,identities:{account_id:s}}),signal:g.signal});if(!v.ok)throw new Error(`companion getConsent ${v.status}`);return await v.json()}finally{window.clearTimeout(i)}};var D=e(97274),T=e(96763),K=Object.defineProperty,b=Object.defineProperties,C=Object.getOwnPropertyDescriptors,B=Object.getOwnPropertySymbols,F=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable,S=(n,o,a)=>o in n?K(n,o,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[o]=a,U=(n,o)=>{for(var a in o||(o={}))F.call(o,a)&&S(n,a,o[a]);if(B)for(var a of B(o))G.call(o,a)&&S(n,a,o[a]);return n},L=(n,o)=>b(n,C(o)),x=(n=>(n.MISSING_PROPERTY="missing_property",n.MISSING_IDENTITIES="missing_identities",n.LOAD_FAILED="load_failed",n))(x||{});const j=()=>{const n=(0,O.zy)(),[o,a]=(0,t.useState)(!0),[r,s]=(0,t.useState)(null),[g,i]=(0,t.useState)(!0),{tvCompanionPostConsent:v,tvCompanionMissingProperty:Y,tvCompanionMissingIdentities:$,tvCompanionLoadFailed:X}=(0,f.b0)(["tvCompanionPostConsent","tvCompanionMissingProperty","tvCompanionMissingIdentities","tvCompanionLoadFailed"]),J=(0,t.useMemo)(()=>{switch(r){case"missing_property":return Y.value;case"missing_identities":return $.value;case"load_failed":return X.value;default:return null}},[r,Y.value,$.value,X.value]);return(0,t.useEffect)(()=>{var V;let p=!1;a(!0),i(!0),s(null);const H=(V=n.search)!=null?V:"",u=(0,m.nD)(H),W=(0,m.IM)(H),R=(0,m.Mp)(H);if(!u){i(!1),s("missing_property");return}if(Object.keys(R).length===0){i(!1),s("missing_identities");return}return(async()=>{var Z;try{if((0,m.xN)(),W)try{await(0,y.getLabels)(W.replace(/_/g,"-"),null)}catch(P){T.warn("Failed to load labels for companion consent page, continuing with existing labels",P)}if(p)return;s(null);let w;try{const P=await N({organisation:u.organisation,property:u.property,environment:u.environment,accountId:R.account_id});P.setConsentRequired===!1&&(w=A(P))}catch(P){T.warn("Boot without seed. First time / error path still opens UI",P)}if(p||(await d.eG.loadCompanionCmp(L(U({},u),{lang:W!=null?W:void 0,identities:R,seededPurposes:w})),p))return;(Z=window.ketch)==null||Z.call(window,E.xo.ON,E.k1.WILL_SHOW_EXPERIENCE,()=>{p||i(!1)}),d.eG.initCompanionConsent(()=>{p||(i(!1),a(!1))},R,L(U({},u),{seededPurposes:w}))}catch(w){p||(d.eG.teardownCompanionCmp(u),i(!1),s("load_failed"))}})(),()=>{p=!0,d.eG.teardownCompanionCmp(u),(0,M.o)()||window.location.reload()}},[n.search]),t.createElement("div",{className:"companion-consent"},t.createElement(_.A,null,t.createElement("div",null,!r&&g&&t.createElement(I.A,null),J&&t.createElement("div",{role:"alert","aria-live":"assertive"},t.createElement(D.Y,{title:J})),!r&&!o&&t.createElement(D.Y,{title:v.value}))))}}),84454:((c,l,e)=>{e.d(l,{A:()=>b,y:()=>T});var t=e(96540),O=e(86364),f=e(56347),I=e(90953),_=e(13516),y=e(6223),d=e(41078),M=e(98284),E=e(2275),m=e(79383),A=e(21865);const h=1024,N=820,D=1080,T=({isRtL:C,children:B})=>{const[F,G]=t.useState(!1),{imageType:S}
1=t.useContext(_.xK),U=(0,m.d)(),{appSettings:{WEB:L},realmFullName:x}=(0,I.U)(),{logoSrc:z,loginBackgroundWeb:j,loginBackgroundWebRtl:n,loginBackgroundWebMobile:o}=(0,M.b)({imageUris:U}),a=(0,d.l)(),r=F?"loaded":void 0,s=(i,v)=>(0,_.vy)(i,"AUTO",v,S),g=()=>G(!0);return t.createElement(t.Fragment,null,t.createElement(y.s,{transitionEnterTimeout:200,transitionLeaveTimeout:200,transitionName:"background-image-transition",component:"div",className:"login-page__background"},a<=h&&t.createElement("img",{className:`img_mobile ${r}`,src:s(o,N),onLoad:g,alt:""}),a>h&&C&&t.createElement("img",{className:r,src:s(n,D),alt:"",onLoad:g}),a>h&&!C&&t.createElement("img",{className:r,src:s(j,D),alt:"",onLoad:g})),t.createElement("div",{className:(0,E.AH)("login-page__logo",(L==null?void 0:L.languageBadgeStyle)&&"login-page__logo--with-language-toggle")},t.createElement("img",{alt:x,src:(0,_.vy)(z,"AUTO",110)})),B)},K=({services:{app:{isRtL:C}}})=>({isRtL:C}),b=(0,f.y)((0,O.Ng)(K)(T))}),97274:((c,l,e)=>{e.d(l,{Y:()=>y});var t=e(96540),O=e(90953),f=e(13516),I=e(98284),_=e(79383);const y=({title:d})=>{const{realmFullName:M}=(0,O.U)(),{imageType:E}=t.useContext(f.xK),m=(0,_.d)(),{logoSrc:A}=(0,I.b)({imageUris:m});return t.createElement("div",{className:"login-page__header"},t.createElement("h1",{"aria-level":2},d),t.createElement("div",{className:"login-page__header__logo"},t.createElement("img",{src:(0,f.vy)(A,"AUTO",110,E),alt:M})))}})}]);})(); 2 3//# sourceMappingURL=companion-consent.17b5b3c15370b63df0a4.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.