(()=>{"use strict";var o={d:(n,t)=>{for(var e in t)o.o(t,e)&&!o.o(n,e)&&Object.defineProperty(n,e,{enumerable:!0,get:t[e]})},o:(o,n)=>Object.prototype.hasOwnProperty.call(o,n)},n={};o.d(n,{default:()=>e});const t=()=>{var o,n;return null===(n=null===(o=window.location)||void 0===o?void 0:o.search)||void 0===n?void 0:n.includes("pianoDebug")},e={onetrustToPianoMapping:{C0001:{COMPOSER:1,DMP:1,ID:1,PA:1,VX:1,DL:1},C0002:{COMPOSER:1,DMP:2,ID:1,PA:1,VX:3,DL:1},C0003:{COMPOSER:3,DMP:2,ID:3,PA:3,VX:2,DL:1},C0004:{COMPOSER:2,DMP:3,ID:2,PA:2,VX:2,DL:2}},pianoProductModesConsentAll:{COMPOSER:3,DMP:3,ID:3,PA:3,VX:3,DL:3},pianoProductModes:{COMPOSER:1,DMP:1,ID:1,PA:1,VX:1,DL:1},pianoWeightsToModes:{1:"opt-out",2:"essential",3:"opt-in"},hookIntoOneTrust:function(){t()&&console.log("PMC: Piano:","Consent Initialization.."),window.pmc.hooks.add_action("pmc_onetrust_consent_data_ready",this.determinePianoProductModes.bind(this))},determinePianoProductModes:function({groupsConsentedTo:o}){const n=this;t()&&console.log("PMC: Piano:","pmc_onetrust_consent_data_ready","OneTrust groups consented to",o);const e={COMPOSER:[],DMP:[],ID:[],PA:[],VX:[],DL:[]};if(0{Object.keys(e).forEach(t=>{n.onetrustToPianoMapping[o]&&e[t].push(n.onetrustToPianoMapping[o][t])})}),t()&&console.log("PMC: Piano:","pianoProductsWeights",e);const i=o.length>=Object.keys(n.onetrustToPianoMapping).length;Object.keys(e).forEach(o=>{n.pianoProductModes[o]=Math.max(...e[o],...i?[n.pianoProductModesConsentAll[o]]:[])}),t()&&console.log("PMC: Piano:","pianoProductModes",n.pianoProductModes)}window.tp=window.tp||[],window.tp.push(["init",n.setPianoProductModes.bind(n)])},setPianoProductModes:function(){var o,n,e,i,s,d;const a=this;window.pdl=window.pdl||{},window.pdl.requireConsent=!0,window.tp.consent.set("ESP",{mode:"opt-out"}),window.tp.consent.set("Social Flow",{mode:"opt-out"}),window.tp.consent.set("COMPOSER",{mode:null!==(o=a.pianoWeightsToModes[a.pianoProductModes.COMPOSER])&&void 0!==o?o:"opt-out"}),window.tp.consent.set("DMP",{mode:null!==(n=a.pianoWeightsToModes[a.pianoProductModes.DMP])&&void 0!==n?n:"opt-out"}),window.tp.consent.set("ID",{mode:null!==(e=a.pianoWeightsToModes[a.pianoProductModes.ID])&&void 0!==e?e:"opt-out"}),window.tp.consent.set("PA",{mode:null!==(i=a.pianoWeightsToModes[a.pianoProductModes.PA])&&void 0!==i?i:"opt-out"}),window.tp.consent.set("VX",{mode:null!==(s=a.pianoWeightsToModes[a.pianoProductModes.VX])&&void 0!==s?s:"opt-out"}),window.tp.consent.set("DL",{mode:null!==(d=a.pianoWeightsToModes[a.pianoProductModes.DL])&&void 0!==d?d:"opt-out"}),t()&&console.log("PMC: Piano:","tp.consent.get()",window.tp.consent.get())}};(window.pmcPianoConsent=window.pmcPianoConsent||{}).consent=n.default})();