!function(){"use strict";var o={207:function(o,n,e){e.d(n,{default:function(){return d}});const i="PMC: Piano: ",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")};o=e.hmd(o);const a={loadSDK:function(){var o;if(!(null===(o=window.pmcPianoData)||void 0===o?void 0:o.sdkUri))return void console.error(i,"window.pmcPianoData.sdkUri not defined",window.pmcPianoData);const n=document.createElement("script");n.type="text/javascript",n.async=!0,n.src=window.pmcPianoData.sdkUri,document.head.appendChild(n)},prime:function(){var o,n,e,a,d,r,s,p,c;if(window.tp=window.tp||[],!(null===(o=window.pmcPianoData)||void 0===o?void 0:o.aid))return void console.error(i,"window.pmcPianoData.aid not defined",window.pmcPianoData);window.tp.push(["setAid",null===(n=window.pmcPianoData)||void 0===n?void 0:n.aid]),(null===(e=window.pmcPianoData)||void 0===e?void 0:e.cxSiteId)&&(t()&&console.log(i,"tp.push: [setCxenseSiteID="+window.pmcPianoData.cxSiteId+"]"),window.tp.push(["setCxenseSiteId",window.pmcPianoData.cxSiteId])),window.tp.push(["setSandbox",!!window.location.host.match(/test|pmcqa|go-vip/)]),window.tp.push(["setDebug",t()]),window.tp.push(["setUsePianoIdUserProvider",!0]),Object.entries(null!==(d=null===(a=window.pmcPianoData)||void 0===a?void 0:a.customVariables)&&void 0!==d?d:{}).map((([o,n])=>{t()&&console.log(i,"tp.push: [setCustomVariable, "+o+"="+n+"]"),window.tp.push(["setCustomVariable",o,n])}));const w=window.pmc.tracking.get_properties();if(window.tp.push(["setPageURL",window.location.href]),w.forEach((function(o){t()&&console.log(i,"tp.push: [setCustomVariable, pmc-"+o.name+"="+o.value+"]"),window.tp.push(["setCustomVariable","pmc-"+o.name,o.value])})),null===(r=window.pmcPianoData)||void 0===r?void 0:r.author){const o=[].concat(window.pmcPianoData.author).join(",");t()&&console.log(i,"tp.push: [setContentAuthor="+o+"]"),window.tp.push(["setContentAuthor",o])}(null===(s=window.pmcPianoData)||void 0===s?void 0:s.tags)&&0<(null===(p=window.pmcPianoData.tags)||void 0===p?void 0:p.length)&&(t()&&console.log(i,"tp.push: [setTags=]",window.pmcPianoData.tags),window.tp.push(["setTags",null!==(c=window.pmcPianoData.tags)&&void 0!==c?c:[]]));const l=()=>{window.pmcPiano.piano.setGA4Config(),window.tp.experience.execute()};window.pmcPiano.callbacks.onInit({knownUser:l,unknownUser:l}).onLogin((o=>{"PIANOID"===o.source&&!0!==o.registration&&window.pmcPiano.piano.reRenderExperiences()})).onLogout(this.reRenderExperiences.bind(this))},setGA4Config:function(){var o,n,e,a;const d=null===(o=window.tp.pianoId.getUser())||void 0===o?void 0:o.uid,r=null===(a=null===(e=null===(n=window.pmcPianoData)||void 0===n?void 0:n.trackingPixels)||void 0===e?void 0:e.ga)||void 0===a?void 0:a.measurement_id;if(!r)return void console.error(i,"GA4 measurement_id is undefined.",window.pmcPianoData);const s={send_page_view:!1,page_location:document.URL,page_title:document.title};d&&(s.user_id=d),window.tp.setGA4Config({measurementId:r,eventParameters:s}),t()&&console.log(i,"tp.setGA4Config measurement id",window.tp.ga4Service.getMeasurementId())},reRenderExperiences:function(){t()&&console.log(i,"Re-rendering Experiences"),window.tp.offer.close(),window.tp.offer.closeInline("#piano-paywall"),window.tp.offer.closeInline("#piano-right-rail"),window.tp.offer.closeInline("#piano-mid-river"),window.tp.offer.closeInline("#piano-sticky-footer"),window.tp.offer.closeInline("#piano-fly-out"),window.tp.offer.closeInline("#piano-module-header-link-vy"),window.tp.offer.closeInline("#piano-header-subscribe-button"),window.tp.offer.closeInline("#piano-header-sub-button");const o=document.querySelector(".pmc-paywall");o&&(o.classList.remove("a-article-cropped"),o.classList.remove("piano-truncate-content")),window.tp.experience.execute()}};a.prime(),a.loadSDK();var d=a;"undefined"!=typeof exports&&(o.exports=a)}},n={};function e(i){var t=n[i];if(void 0!==t)return t.exports;var a=n[i]={id:i,loaded:!1,exports:{}};return o[i](a,a.exports,e),a.loaded=!0,a.exports}e.d=function(o,n){for(var i in n)e.o(n,i)&&!e.o(o,i)&&Object.defineProperty(o,i,{enumerable:!0,get:n[i]})},e.hmd=function(o){return(o=Object.create(o)).children||(o.children=[]),Object.defineProperty(o,"exports",{enumerable:!0,set:function(){throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+o.id)}}),o},e.o=function(o,n){return Object.prototype.hasOwnProperty.call(o,n)};var i=e(207);(window.pmcPiano=window.pmcPiano||{}).piano=i.default}();