PageSourceSearch

https://www.thebullvine.com/wp-content/cache/min/1/swg/js/v1/swg-basic.js?ver=1790920370

js thebullvine.com collected 2026-10-02 10:13:37 UTC 282,456 bytes, 1 lines download raw bytes

1(()=>{var _a,_b,__freeze=Object.freeze,__defProp=Object.defineProperty,__template=(t,s)=>__freeze(__defProp(t,"raw",{value:__freeze(s||t.slice())}));!function(){"use strict";function t(t,s){for(var i=0;i<s.length;i++){const e=s[i];if("string"!=typeof e&&!Array.isArray(e))for(const s in e)if("default"!==s&&!(s in t)){const i=Object.getOwnPropertyDescriptor(e,s);i&&Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:()=>e[s]})}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}const s="https://news.google.com",i="1.0.165",e="https://news.google.com/swg/js/v1";var n=(t=>(t.ENABLE_PUBLICATION_ID_SUFFIX_FOR_STORAGE_KEY="enable-pub-id-suffix-for-storage-key",t.ENABLE_GIS_INTEROP="enable-gis-interop",t))(n||{}),r=(t=>(t.BACKGROUND_CLICK_BEHAVIOR_EXPERIMENT="background_click_behavior_experiment",t.ALWAYS_SHOW_BLOCKING_CONTRIBUTION_EXPERIMENT="bcontrib_experiment",t.MULTI_INSTANCE_MONETARY_CTA_EXPERIMENT="multi_instance_monetary_cta_experiment",t))(r||{}),o=(t=>(t[t.UNKNOWN=0]="UNKNOWN",t[t.IMPRESSION_PAYWALL=1]="IMPRESSION_PAYWALL",t[t.IMPRESSION_AD=2]="IMPRESSION_AD",t[t.IMPRESSION_OFFERS=3]="IMPRESSION_OFFERS",t[t.IMPRESSION_SUBSCRIBE_BUTTON=4]="IMPRESSION_SUBSCRIBE_BUTTON",t[t.IMPRESSION_SMARTBOX=5]="IMPRESSION_SMARTBOX",t[t.IMPRESSION_SWG_BUTTON=6]="IMPRESSION_SWG_BUTTON",t[t.IMPRESSION_CLICK_TO_SHOW_OFFERS=7]="IMPRESSION_CLICK_TO_SHOW_OFFERS",t[t.IMPRESSION_CLICK_TO_SHOW_OFFERS_OR_ALREADY_SUBSCRIBED=8]="IMPRESSION_CLICK_TO_SHOW_OFFERS_OR_ALREADY_SUBSCRIBED",t[t.IMPRESSION_SUBSCRIPTION_COMPLETE=9]="IMPRESSION_SUBSCRIPTION_COMPLETE",t[t.IMPRESSION_ACCOUNT_CHANGED=10]="IMPRESSION_ACCOUNT_CHANGED",t[t.IMPRESSION_PAGE_LOAD=11]="IMPRESSION_PAGE_LOAD",t[t.IMPRESSION_LINK=12]="IMPRESSION_LINK",t[t.IMPRESSION_SAVE_SUBSCR_TO_GOOGLE=13]="IMPRESSION_SAVE_SUBSCR_TO_GOOGLE",t[t.IMPRESSION_GOOGLE_UPDATED=14]="IMPRESSION_GOOGLE_UPDATED",t[t.IMPRESSION_SHOW_OFFERS_SMARTBOX=15]="IMPRESSION_SHOW_OFFERS_SMARTBOX",t[t.IMPRESSION_SHOW_OFFERS_SWG_BUTTON=16]="IMPRESSION_SHOW_OFFERS_SWG_BUTTON",t[t.IMPRESSION_SELECT_OFFER_SMARTBOX=17]="IMPRESSION_SELECT_OFFER_SMARTBOX",t[t.IMPRESSION_SELECT_OFFER_SWG_BUTTON=18]="IMPRESSION_SELECT_OFFER_SWG_BUTTON",t[t.IMPRESSION_SHOW_CONTRIBUTIONS_SWG_BUTTON=19]="IMPRESSION_SHOW_CONTRIBUTIONS_SWG_BUTTON",t[t.IMPRESSION_SELECT_CONTRIBUTION_SWG_BUTTON=20]="IMPRESSION_SELECT_CONTRIBUTION_SWG_BUTTON",t[t.IMPRESSION_METER_TOAST=21]="IMPRESSION_METER_TOAST",t[t.IMPRESSION_REGWALL=22]="IMPRESSION_REGWALL",t[t.IMPRESSION_SHOWCASE_REGWALL=23]="IMPRESSION_SHOWCASE_REGWALL",t[t.IMPRESSION_SWG_SUBSCRIPTION_MINI_PROMPT=24]="IMPRESSION_SWG_SUBSCRIPTION_MINI_PROMPT",t[t.IMPRESSION_SWG_CONTRIBUTION_MINI_PROMPT=25]="IMPRESSION_SWG_CONTRIBUTION_MINI_PROMPT",t[t.IMPRESSION_CONTRIBUTION_OFFERS=26]="IMPRESSION_CONTRIBUTION_OFFERS",t[t.IMPRESSION_TWG_COUNTER=27]="IMPRESSION_TWG_COUNTER",t[t.IMPRESSION_TWG_SITE_SUPPORTER_WALL=28]="IMPRESSION_TWG_SITE_SUPPORTER_WALL",t[t.IMPRESSION_TWG_PUBLICATION=29]="IMPRESSION_TWG_PUBLICATION",t[t.IMPRESSION_TWG_STATIC_BUTTON=30]="IMPRESSION_TWG_STATIC_BUTTON",t[t.IMPRESSION_TWG_DYNAMIC_BUTTON=31]="IMPRESSION_TWG_DYNAMIC_BUTTON",t[t.IMPRESSION_TWG_STICKER_SELECTION_SCREEN=32]="IMPRESSION_TWG_STICKER_SELECTION_SCREEN",t[t.IMPRESSION_TWG_PUBLICATION_NOT_SET_UP=33]="IMPRESSION_TWG_PUBLICATION_NOT_SET_UP",t[t.IMPRESSION_REGWALL_OPT_IN=34]="IMPRESSION_REGWALL_OPT_IN",t[t.IMPRESSION_NEWSLETTER_OPT_IN=35]="IMPRESSION_NEWSLETTER_OPT_IN",t[t.IMPRESSION_SUBSCRIPTION_OFFERS_ERROR=36]="IMPRESSION_SUBSCRIPTION_OFFERS_ERROR",t[t.IMPRESSION_CONTRIBUTION_OFFERS_ERROR=37]="IMPRESSION_CONTRIBUTION_OFFERS_ERROR",t[t.IMPRESSION_TWG_SHORTENED_STICKER_FLOW=38]="IMPRESSION_TWG_SHORTENED_STICKER_FLOW",t[t.IMPRESSION_SUBSCRIPTION_LINKING_LOADING=39]="IMPRESSION_SUBSCRIPTION_LINKING_LOADING",t[t.IMPRESSION_SUBSCRIPTION_LINKING_COMPLETE=40]="IMPRESSION_SUBSCRIPTION_LINKING_COMPLETE",t[t.IMPRESSION_SUBSCRIPTION_LINKING_ERROR=41]="IMPRESSION_SUBSCRIPTION_LINKING_ERROR",t[t.IMPRESSION_SURVEY=42]="IMPRESSION_SURVEY",t[t.IMPRESSION_REGWALL_ERROR=43]="IMPRESSION_REGWALL_ERROR",t[t.IMPRESSION_NEWSLETTER_ERROR=44]="IMPRESSION_NEWSLETTER_ERROR",t[t.IMPRESSION_SURVEY_ERROR=45]="IMPRESSION_SURVEY_ERROR",t[t.IMPRESSION_METER_TOAST_ERROR=46]="IMPRESSION_METER_TOAST_ERROR",t[t.IMPRESSION_MINI_PROMPT=47]="IMPRESSION_MINI_PROMPT",t[t.IMPRESSION_MINI_PROMPT_ERROR=48]="IMPRESSION_MINI_PROMPT_ERROR",t[t.IMPRESSION_REWARDED_AD=49]="IMPRESSION_REWARDED_AD",t[t.IMPRESSION_BYOP_NEWSLETTER_OPT_IN=50]="IMPRESSION_BYOP_NEWSLETTER_OPT_IN",t[t.IMPRESSION_REWARDED_AD_ERROR=51]="IMPRESSION_REWARDED_AD_ERROR",t[t.IMPRESSION_HOSTED_PAGE_SUBSCRIPTION_OFFERS=52]="IMPRESSION_HOSTED_PAGE_SUBSCRIPTION_OFFERS",t[t.IMPRESSION_HOSTED_PAGE_CONTRIBUTION_OFFERS=53]="IMPRESSION_HOSTED_PAGE_CONTRIBUTION_OFFERS",t[t.IMPRESSION_HOSTED_PAGE_SUBSCRIPTION_OFFERS_ERROR=54]="IMPRESSION_HOSTED_PAGE_SUBSCRIPTION_OFFERS_ERROR",t[t.IMPRESSION_HOSTED_PAGE_CONTRIBUTION_OFFERS_ERROR=55]="IMPRESSION_HOSTED_PAGE_CONTRIBUTION_OFFERS_ERROR",t[t.IMPRESSION_BYO_CTA=56]="IMPRESSION_BYO_CTA",t[t.IMPRESSION_BYO_CTA_ERROR=57]="IMPRESSION_BYO_CTA_ERROR",t[t.IMPRESSION_CONTRIBUTION_OFFERS_PURCHASE_UNAVAILABLE=58]="IMPRESSION_CONTRIBUTION_OFFERS_PURCHASE_UNAVAILABLE",t[t.IMPRESSION_BYOE_POP_UP_OPT_IN=59]="IMPRESSION_BYOE_POP_UP_OPT_IN",t[t.IMPRESSION_BYOE_POP_UP_OPT_IN_ERROR=60]="IMPRESSION_BYOE_POP_UP_OPT_IN_ERROR",t[t.IMPRESSION_ADD_PREFERRED_SOURCES_BUTTON=61]="IMPRESSION_ADD_PREFERRED_SOURCES_BUTTON",t[t.IMPRESSION_ADD_PREFERRED_SOURCES_CONFIRMATION=62]="IMPRESSION_ADD_PREFERRED_SOURCES_CONFIRMATION",t[t.IMPRESSION_ADD_PREFERRED_SOURCE_CONSENT_SCREEN=63]="IMPRESSION_ADD_PREFERRED_SOURCE_CONSENT_SCREEN",t[t.IMPRESSION_ADD_PREFERRED_SOURCE_CONSENT_SCREEN_ADD_SOURCE_BUTTON=64]="IMPRESSION_ADD_PREFERRED_SOURCE_CONSENT_SCREEN_ADD_SOURCE_BUTTON",t[t.IMPRESSION_ADD_PREFERRED_SOURCE_CONSENT_SCREEN_E
1RROR=65]="IMPRESSION_ADD_PREFERRED_SOURCE_CONSENT_SCREEN_ERROR",t[t.IMPRESSION_ADD_PREFERRED_SOURCE_CONSENT_SCREEN_INELIGIBLE=66]="IMPRESSION_ADD_PREFERRED_SOURCE_CONSENT_SCREEN_INELIGIBLE",t[t.IMPRESSION_OFFERS_PLAN_CHANGE=67]="IMPRESSION_OFFERS_PLAN_CHANGE",t[t.ACTION_SUBSCRIBE=1e3]="ACTION_SUBSCRIBE",t[t.ACTION_PAYMENT_COMPLETE=1001]="ACTION_PAYMENT_COMPLETE",t[t.ACTION_ACCOUNT_CREATED=1002]="ACTION_ACCOUNT_CREATED",t[t.ACTION_ACCOUNT_ACKNOWLEDGED=1003]="ACTION_ACCOUNT_ACKNOWLEDGED",t[t.ACTION_SUBSCRIPTIONS_LANDING_PAGE=1004]="ACTION_SUBSCRIPTIONS_LANDING_PAGE",t[t.ACTION_PAYMENT_FLOW_STARTED=1005]="ACTION_PAYMENT_FLOW_STARTED",t[t.ACTION_PAY_PAYMENT_FLOW_STARTED=1090]="ACTION_PAY_PAYMENT_FLOW_STARTED",t[t.ACTION_PLAY_PAYMENT_FLOW_STARTED=1091]="ACTION_PLAY_PAYMENT_FLOW_STARTED",t[t.ACTION_OFFER_SELECTED=1006]="ACTION_OFFER_SELECTED",t[t.ACTION_SWG_BUTTON_CLICK=1007]="ACTION_SWG_BUTTON_CLICK",t[t.ACTION_VIEW_OFFERS=1008]="ACTION_VIEW_OFFERS",t[t.ACTION_ALREADY_SUBSCRIBED=1009]="ACTION_ALREADY_SUBSCRIBED",t[t.ACTION_NEW_DEFERRED_ACCOUNT=1010]="ACTION_NEW_DEFERRED_ACCOUNT",t[t.ACTION_LINK_CONTINUE=1011]="ACTION_LINK_CONTINUE",t[t.ACTION_LINK_CANCEL=1012]="ACTION_LINK_CANCEL",t[t.ACTION_GOOGLE_UPDATED_CLOSE=1013]="ACTION_GOOGLE_UPDATED_CLOSE",t[t.ACTION_USER_CANCELED_PAYFLOW=1014]="ACTION_USER_CANCELED_PAYFLOW",t[t.ACTION_SAVE_SUBSCR_TO_GOOGLE_CONTINUE=1015]="ACTION_SAVE_SUBSCR_TO_GOOGLE_CONTINUE",t[t.ACTION_SAVE_SUBSCR_TO_GOOGLE_CANCEL=1016]="ACTION_SAVE_SUBSCR_TO_GOOGLE_CANCEL",t[t.ACTION_SWG_BUTTON_SHOW_OFFERS_CLICK=1017]="ACTION_SWG_BUTTON_SHOW_OFFERS_CLICK",t[t.ACTION_SWG_BUTTON_SELECT_OFFER_CLICK=1018]="ACTION_SWG_BUTTON_SELECT_OFFER_CLICK",t[t.ACTION_SWG_BUTTON_SHOW_CONTRIBUTIONS_CLICK=1019]="ACTION_SWG_BUTTON_SHOW_CONTRIBUTIONS_CLICK",t[t.ACTION_SWG_BUTTON_SELECT_CONTRIBUTION_CLICK=1020]="ACTION_SWG_BUTTON_SELECT_CONTRIBUTION_CLICK",t[t.ACTION_USER_CONSENT_DEFERRED_ACCOUNT=1021]="ACTION_USER_CONSENT_DEFERRED_ACCOUNT",t[t.ACTION_USER_DENY_DEFERRED_ACCOUNT=1022]="ACTION_USER_DENY_DEFERRED_ACCOUNT",t[t.ACTION_DEFERRED_ACCOUNT_REDIRECT=1023]="ACTION_DEFERRED_ACCOUNT_REDIRECT",t[t.ACTION_GET_ENTITLEMENTS=1024]="ACTION_GET_ENTITLEMENTS",t[t.ACTION_METER_TOAST_SUBSCRIBE_CLICK=1025]="ACTION_METER_TOAST_SUBSCRIBE_CLICK",t[t.ACTION_METER_TOAST_EXPANDED=1026]="ACTION_METER_TOAST_EXPANDED",t[t.ACTION_METER_TOAST_CLOSED_BY_ARTICLE_INTERACTION=1027]="ACTION_METER_TOAST_CLOSED_BY_ARTICLE_INTERACTION",t[t.ACTION_METER_TOAST_CLOSED_BY_SWIPE_DOWN=1028]="ACTION_METER_TOAST_CLOSED_BY_SWIPE_DOWN",t[t.ACTION_METER_TOAST_CLOSED_BY_X_CLICKED=1029]="ACTION_METER_TOAST_CLOSED_BY_X_CLICKED",t[t.ACTION_SWG_SUBSCRIPTION_MINI_PROMPT_CLICK=1030]="ACTION_SWG_SUBSCRIPTION_MINI_PROMPT_CLICK",t[t.ACTION_SWG_CONTRIBUTION_MINI_PROMPT_CLICK=1031]="ACTION_SWG_CONTRIBUTION_MINI_PROMPT_CLICK",t[t.ACTION_SWG_SUBSCRIPTION_MINI_PROMPT_CLOSE=1032]="ACTION_SWG_SUBSCRIPTION_MINI_PROMPT_CLOSE",t[t.ACTION_SWG_CONTRIBUTION_MINI_PROMPT_CLOSE=1033]="ACTION_SWG_CONTRIBUTION_MINI_PROMPT_CLOSE",t[t.ACTION_CONTRIBUTION_OFFER_SELECTED=1034]="ACTION_CONTRIBUTION_OFFER_SELECTED",t[t.ACTION_SHOWCASE_REGWALL_GSI_CLICK=1035]="ACTION_SHOWCASE_REGWALL_GSI_CLICK",t[t.ACTION_SHOWCASE_REGWALL_EXISTING_ACCOUNT_CLICK=1036]="ACTION_SHOWCASE_REGWALL_EXISTING_ACCOUNT_CLICK",t[t.ACTION_SUBSCRIPTION_OFFERS_CLOSED=1037]="ACTION_SUBSCRIPTION_OFFERS_CLOSED",t[t.ACTION_CONTRIBUTION_OFFERS_CLOSED=1038]="ACTION_CONTRIBUTION_OFFERS_CLOSED",t[t.ACTION_TWG_STATIC_CTA_CLICK=1039]="ACTION_TWG_STATIC_CTA_CLICK",t[t.ACTION_TWG_DYNAMIC_CTA_CLICK=1040]="ACTION_TWG_DYNAMIC_CTA_CLICK",t[t.ACTION_TWG_SITE_LEVEL_SUPPORTER_WALL_CTA_CLICK=1041]="ACTION_TWG_SITE_LEVEL_SUPPORTER_WALL_CTA_CLICK",t[t.ACTION_TWG_DIALOG_SUPPORTER_WALL_CTA_CLICK=1042]="ACTION_TWG_DIALOG_SUPPORTER_WALL_CTA_CLICK",t[t.ACTION_TWG_COUNTER_CLICK=1043]="ACTION_TWG_COUNTER_CLICK",t[t.ACTION_TWG_SITE_SUPPORTER_WALL_ALL_THANKS_CLICK=1044]="ACTION_TWG_SITE_SUPPORTER_WALL_ALL_THANKS_CLICK",t[t.ACTION_TWG_PAID_STICKER_SELECTED_SCREEN_CLOSE_CLICK=1045]="ACTION_TWG_PAID_STICKER_SELECTED_SCREEN_CLOSE_CLICK",t[t.ACTION_TWG_PAID_STICKER_SELECTION_CLICK=1046]="ACTION_TWG_PAID_STICKER_SELECTION_CLICK",t[t.ACTION_TWG_FREE_STICKER_SELECTION_CLICK=1047]="ACTION_TWG_FREE_STICKER_SELECTION_CLICK",t[t.ACTION_TWG_MINI_SUPPORTER_WALL_CLICK=1048]="ACTION_TWG_MINI_SUPPORTER_WALL_CLICK",t[t.ACTION_TWG_CREATOR_BENEFIT_CLICK=1049]="ACTION_TWG_CREATOR_BENEFIT_CLICK",t[t.ACTION_TWG_FREE_TRANSACTION_START_NEXT_BUTTON_CLICK=1050]="ACTION_TWG_FREE_TRANSACTION_START_NEXT_BUTTON_CLICK",t[t.ACTION_TWG_PAID_TRANSACTION_START_NEXT_BUTTON_CLICK=1051]="ACTION_TWG_PAID_TRANSACTION_START_NEXT_BUTTON_CLICK",t[t.ACTION_TWG_STICKER_SELECTION_SCREEN_CLOSE_CLICK=1052]="ACTION_TWG_STICKER_SELECTION_SCREEN_CLOSE_CLICK",t[t.ACTION_TWG_ARTICLE_LEVEL_SUPPORTER_WALL_CTA_CLICK=1053]="ACTION_TWG_ARTICLE_LEVEL_SUPPORTER_WALL_CTA_CLICK",t[t.ACTION_REGWALL_OPT_IN_BUTTON_CLICK=1054]="ACTION_REGWALL_OPT_IN_BUTTON_CLICK",t[t.ACTION_REGWALL_ALREADY_OPTED_IN_CLICK=1055]="ACTION_REGWALL_ALREADY_OPTED_IN_CLICK",t[t.ACTION_NEWSLETTER_OPT_IN_BUTTON_CLICK=1056]="ACTION_NEWSLETTER_OPT_IN_BUTTON_CLICK",t[t.ACTION_NEWSLETTER_ALREADY_OPTED_IN_CLICK=1057]="A
1CTION_NEWSLETTER_ALREADY_OPTED_IN_CLICK",t[t.ACTION_REGWALL_OPT_IN_CLOSE=1058]="ACTION_REGWALL_OPT_IN_CLOSE",t[t.ACTION_NEWSLETTER_OPT_IN_CLOSE=1059]="ACTION_NEWSLETTER_OPT_IN_CLOSE",t[t.ACTION_SHOWCASE_REGWALL_SIWG_CLICK=1060]="ACTION_SHOWCASE_REGWALL_SIWG_CLICK",t[t.ACTION_TWG_CHROME_APP_MENU_ENTRY_POINT_CLICK=1061]="ACTION_TWG_CHROME_APP_MENU_ENTRY_POINT_CLICK",t[t.ACTION_TWG_DISCOVER_FEED_MENU_ENTRY_POINT_CLICK=1062]="ACTION_TWG_DISCOVER_FEED_MENU_ENTRY_POINT_CLICK",t[t.ACTION_SHOWCASE_REGWALL_3P_BUTTON_CLICK=1063]="ACTION_SHOWCASE_REGWALL_3P_BUTTON_CLICK",t[t.ACTION_SUBSCRIPTION_OFFERS_RETRY=1064]="ACTION_SUBSCRIPTION_OFFERS_RETRY",t[t.ACTION_CONTRIBUTION_OFFERS_RETRY=1065]="ACTION_CONTRIBUTION_OFFERS_RETRY",t[t.ACTION_TWG_SHORTENED_STICKER_FLOW_STICKER_SELECTION_CLICK=1066]="ACTION_TWG_SHORTENED_STICKER_FLOW_STICKER_SELECTION_CLICK",t[t.ACTION_INITIATE_UPDATED_SUBSCRIPTION_LINKING=1067]="ACTION_INITIATE_UPDATED_SUBSCRIPTION_LINKING",t[t.ACTION_SURVEY_SUBMIT_CLICK=1068]="ACTION_SURVEY_SUBMIT_CLICK",t[t.ACTION_SURVEY_CLOSED=1069]="ACTION_SURVEY_CLOSED",t[t.ACTION_SURVEY_DATA_TRANSFER=1070]="ACTION_SURVEY_DATA_TRANSFER",t[t.ACTION_REGWALL_PAGE_REFRESH=1071]="ACTION_REGWALL_PAGE_REFRESH",t[t.ACTION_NEWSLETTER_PAGE_REFRESH=1072]="ACTION_NEWSLETTER_PAGE_REFRESH",t[t.ACTION_SURVEY_PAGE_REFRESH=1073]="ACTION_SURVEY_PAGE_REFRESH",t[t.ACTION_METER_TOAST_PAGE_REFRESH=1074]="ACTION_METER_TOAST_PAGE_REFRESH",t[t.ACTION_MINI_PROMPT_INTERACTION=1075]="ACTION_MINI_PROMPT_INTERACTION",t[t.ACTION_SURVEY_PREVIOUS_BUTTON_CLICK=1076]="ACTION_SURVEY_PREVIOUS_BUTTON_CLICK",t[t.ACTION_SURVEY_NEXT_BUTTON_CLICK=1077]="ACTION_SURVEY_NEXT_BUTTON_CLICK",t[t.ACTION_REWARDED_AD_VIEW=1078]="ACTION_REWARDED_AD_VIEW",t[t.ACTION_REWARDED_AD_CLOSE=1079]="ACTION_REWARDED_AD_CLOSE",t[t.ACTION_REWARDED_AD_CLOSE_AD=1080]="ACTION_REWARDED_AD_CLOSE_AD",t[t.ACTION_REWARDED_AD_SIGN_IN=1081]="ACTION_REWARDED_AD_SIGN_IN",t[t.ACTION_REWARDED_AD_SUPPORT=1082]="ACTION_REWARDED_AD_SUPPORT",t[t.ACTION_BACK_TO_HOMEPAGE=1083]="ACTION_BACK_TO_HOMEPAGE",t[t.ACTION_BYOP_NEWSLETTER_OPT_IN_CLOSE=1084]="ACTION_BYOP_NEWSLETTER_OPT_IN_CLOSE",t[t.ACTION_BYOP_NEWSLETTER_OPT_IN_SUBMIT=1085]="ACTION_BYOP_NEWSLETTER_OPT_IN_SUBMIT",t[t.ACTION_SUBSCRIPTION_LINKING_CLOSE=1086]="ACTION_SUBSCRIPTION_LINKING_CLOSE",t[t.ACTION_BYO_CTA_CLOSE=1087]="ACTION_BYO_CTA_CLOSE",t[t.ACTION_BYO_CTA_BUTTON_CLICK=1088]="ACTION_BYO_CTA_BUTTON_CLICK",t[t.ACTION_BYO_CTA_PAGE_REFRESH=1089]="ACTION_BYO_CTA_PAGE_REFRESH",t[t.ACTION_BYOE_POP_UP_OPT_IN=1092]="ACTION_BYOE_POP_UP_OPT_IN",t[t.ACTION_ADD_PREFERRED_SOURCES_BUTTON_CLICK=1093]="ACTION_ADD_PREFERRED_SOURCES_BUTTON_CLICK",t[t.ACTION_MANAGE_PREFERRED_SOURCES=1094]="ACTION_MANAGE_PREFERRED_SOURCES",t[t.ACTION_ADD_PREFERRED_SOURCE=1095]="ACTION_ADD_PREFERRED_SOURCE",t[t.EVENT_PAYMENT_FAILED=2e3]="EVENT_PAYMENT_FAILED",t[t.EVENT_REGWALL_OPT_IN_FAILED=2001]="EVENT_REGWALL_OPT_IN_FAILED",t[t.EVENT_NEWSLETTER_OPT_IN_FAILED=2002]="EVENT_NEWSLETTER_OPT_IN_FAILED",t[t.EVENT_REGWALL_ALREADY_OPT_IN=2003]="EVENT_REGWALL_ALREADY_OPT_IN",t[t.EVENT_NEWSLETTER_ALREADY_OPT_IN=2004]="EVENT_NEWSLETTER_ALREADY_OPT_IN",t[t.EVENT_SUBSCRIPTION_LINKING_FAILED=2005]="EVENT_SUBSCRIPTION_LINKING_FAILED",t[t.EVENT_SURVEY_ALREADY_SUBMITTED=2006]="EVENT_SURVEY_ALREADY_SUBMITTED",t[t.EVENT_SURVEY_COMPLETION_RECORD_FAILED=2007]="EVENT_SURVEY_COMPLETION_RECORD_FAILED",t[t.EVENT_SURVEY_DATA_TRANSFER_FAILED=2008]="EVENT_SURVEY_DATA_TRANSFER_FAILED",t[t.EVENT_BYO_CTA_COMPLETION_RECORD_FAILED=2009]="EVENT_BYO_CTA_COMPLETION_RECORD_FAILED",t[t.EVENT_ADD_PREFERRED_SOURCE_FAILURE=2010]="EVENT_ADD_PREFERRED_SOURCE_FAILURE",t[t.EVENT_CUSTOM=3e3]="EVENT_CUSTOM",t[t.EVENT_CONFIRM_TX_ID=3001]="EVENT_CONFIRM_TX_ID",t[t.EVENT_CHANGED_TX_ID=3002]="EVENT_CHANGED_TX_ID",t[t.EVENT_GPAY_NO_TX_ID=3003]="EVENT_GPAY_NO_TX_ID",t[t.EVENT_GPAY_CANNOT_CONFIRM_TX_ID=3004]="EVENT_GPAY_CANNOT_CONFIRM_TX_ID",t[t.EVENT_GOOGLE_UPDATED=3005]="EVENT_GOOGLE_UPDATED",t[t.EVENT_NEW_TX_ID=3006]="EVENT_NEW_TX_ID",t[t.EVENT_UNLOCKED_BY_SUBSCRIPTION=3007]="EVENT_UNLOCKED_BY_SUBSCRIPTION",t[t.EVENT_UNLOCKED_BY_METER=3008]="EVENT_UNLOCKED_BY_METER",t[t.EVENT_NO_ENTITLEMENTS=3009]="EVENT_NO_ENTITLEMENTS",t[t.EVENT_HAS_METERING_ENTITLEMENTS=3010]="EVENT_HAS_METERING_ENTITLEMENTS",t[t.EVENT_OFFERED_MET
1ER=3011]="EVENT_OFFERED_METER",t[t.EVENT_UNLOCKED_FREE_PAGE=3012]="EVENT_UNLOCKED_FREE_PAGE",t[t.EVENT_INELIGIBLE_PAYWALL=3013]="EVENT_INELIGIBLE_PAYWALL",t[t.EVENT_UNLOCKED_FOR_CRAWLER=3014]="EVENT_UNLOCKED_FOR_CRAWLER",t[t.EVENT_TWG_COUNTER_VIEW=3015]="EVENT_TWG_COUNTER_VIEW",t[t.EVENT_TWG_SITE_SUPPORTER_WALL_VIEW=3016]="EVENT_TWG_SITE_SUPPORTER_WALL_VIEW",t[t.EVENT_TWG_STATIC_BUTTON_VIEW=3017]="EVENT_TWG_STATIC_BUTTON_VIEW",t[t.EVENT_TWG_DYNAMIC_BUTTON_VIEW=3018]="EVENT_TWG_DYNAMIC_BUTTON_VIEW",t[t.EVENT_TWG_PRE_TRANSACTION_PRIVACY_SETTING_PRIVATE=3019]="EVENT_TWG_PRE_TRANSACTION_PRIVACY_SETTING_PRIVATE",t[t.EVENT_TWG_POST_TRANSACTION_SETTING_PRIVATE=3020]="EVENT_TWG_POST_TRANSACTION_SETTING_PRIVATE",t[t.EVENT_TWG_PRE_TRANSACTION_PRIVACY_SETTING_PUBLIC=3021]="EVENT_TWG_PRE_TRANSACTION_PRIVACY_SETTING_PUBLIC",t[t.EVENT_TWG_POST_TRANSACTION_SETTING_PUBLIC=3022]="EVENT_TWG_POST_TRANSACTION_SETTING_PUBLIC",t[t.EVENT_REGWALL_OPTED_IN=3023]="EVENT_REGWALL_OPTED_IN",t[t.EVENT_NEWSLETTER_OPTED_IN=3024]="EVENT_NEWSLETTER_OPTED_IN",t[t.EVENT_SHOWCASE_METERING_INIT=3025]="EVENT_SHOWCASE_METERING_INIT",t[t.EVENT_DISABLE_MINIPROMPT_DESKTOP=3026]="EVENT_DISABLE_MINIPROMPT_DESKTOP",t[t.EVENT_SUBSCRIPTION_LINKING_SUCCESS=3027]="EVENT_SUBSCRIPTION_LINKING_SUCCESS",t[t.EVENT_SURVEY_SUBMITTED=3028]="EVENT_SURVEY_SUBMITTED",t[t.EVENT_LINK_ACCOUNT_SUCCESS=3029]="EVENT_LINK_ACCOUNT_SUCCESS",t[t.EVENT_SAVE_SUBSCRIPTION_SUCCESS=3030]="EVENT_SAVE_SUBSCRIPTION_SUCCESS",t[t.EVENT_SURVEY_DATA_TRANSFER_COMPLETE=3031]="EVENT_SURVEY_DATA_TRANSFER_COMPLETE",t[t.EVENT_RUNTIME_IS_READY=3032]="EVENT_RUNTIME_IS_READY",t[t.EVENT_START_API=3033]="EVENT_START_API",t[t.EVENT_SHOW_OFFERS_API=3034]="EVENT_SHOW_OFFERS_API",t[t.EVENT_SHOW_CONTRIBUTION_OPTIONS_API=3035]="EVENT_SHOW_CONTRIBUTION_OPTIONS_API",t[t.EVENT_REWARDED_AD_FLOW_INIT=3048]="EVENT_REWARDED_AD_FLOW_INIT",t[t.EVENT_REWARDED_AD_READY=3036]="EVENT_REWARDED_AD_READY",t[t.EVENT_REWARDED_AD_GPT_MISSING_ERROR=3037]="EVENT_REWARDED_AD_GPT_MISSING_ERROR",t[t.EVENT_REWARDED_AD_ADSENSE_MISSING_ERROR=3059]="EVENT_REWARDED_AD_ADSENSE_MISSING_ERROR",t[t.EVENT_REWARDED_AD_CONFIG_ERROR=3038]="EVENT_REWARDED_AD_CONFIG_ERROR",t[t.EVENT_REWARDED_AD_PAGE_ERROR=3039]="EVENT_REWARDED_AD_PAGE_ERROR",t[t.EVENT_REWARDED_AD_GPT_ERROR=3040]="EVENT_REWARDED_AD_GPT_ERROR",t[t.EVENT_REWARDED_AD_GRANTED=3041]="EVENT_REWARDED_AD_GRANTED",t[t.EVENT_REWARDED_AD_NOT_FILLED=3049]="EVENT_REWARDED_AD_NOT_FILLED",t[t.EVENT_REWARDED_AD_GPT_FILTERED=3060]="EVENT_REWARDED_AD_GPT_FILTERED",t[t.EVENT_REWARDED_AD_ADSENSE_FILTERED=3061]="EVENT_REWARDED_AD_ADSENSE_FILTERED",t[t.EVENT_GLOBAL_FREQUENCY_CAP_MET=3042]="EVENT_GLOBAL_FREQUENCY_CAP_MET",t[t.EVENT_PROMPT_FREQUENCY_CAP_MET=3043]="EVENT_PROMPT_FREQUENCY_CAP_MET",t[t.EVENT_ACTION_IMPRESSIONS_STORAGE_KEY_NOT_FOUND_ERROR=3044]="EVENT_ACTION_IMPRESSIONS_STORAGE_KEY_NOT_FOUND_ERROR",t[t.EVENT_LOCAL_STORAGE_TIMESTAMPS_PARSING_ERROR=3052]="EVENT_LOCAL_STORAGE_TIMESTAMPS_PARSING_ERROR",t[t.EVENT_FREQUENCY_CAP_CONFIG_NOT_FOUND_ERROR=3045]="EVENT_FREQUENCY_CAP_CONFIG_NOT_FOUND_ERROR",t[t.EVENT_PROMPT_FREQUENCY_CONFIG_NOT_FOUND=3053]="EVENT_PROMPT_FREQUENCY_CONFIG_NOT_FOUND",t[t.EVENT_FREQUENCY_CAP_LOCAL_STORAGE_CONFIG_ID_KEY_NOT_FOUND=3057]="EVENT_FREQUENCY_CAP_LOCAL_STORAGE_CONFIG_ID_KEY_NOT_FOUND",t[t.EVENT_BYOP_NEWSLETTER_OPT_IN_CONFIG_ERROR=3046]="EVENT_BYOP_NEWSLETTER_OPT_IN_CONFIG_ERROR",t[t.EVENT_BYOP_NEWSLETTER_OPT_IN_CODE_SNIPPET_ERROR=3047]="EVENT_BYOP_NEWSLETTER_OPT_IN_CODE_SNIPPET_ERROR",t[t.EVENT_SUBSCRIPTION_PAYMENT_COMPLETE=3050]="EVENT_SUBSCRIPTION_PAYMENT_COMPLETE",t[t.EVENT_CONTRIBUTION_PAYMENT_COMPLETE=3051]="EVENT_CONTRIBUTION_PAYMENT_COMPLETE",t[t.EVENT_PAY_PAYMENT_COMPLETE=3058]="EVENT_PAY_PAYMENT_COMPLETE",t[t.EVENT_HOSTED_PAGE_SUBSCRIPTION_PAYMENT_COMPLETE=3054]="EVENT_HOSTED_PAGE_SUBSCRIPTION_PAYMENT_COMPLETE",t[t.EVENT_HOSTED_PAGE_CONTRIBUTION_PAYMENT_COMPLETE=3055]="EVENT_HOSTED_PAGE_CONTRIBUTION_PAYMENT_COMPLETE",t[t.EVENT_COMPLETION_COUNT_FOR_REPEATABLE_ACTION_MISSING_ERROR=3056]="EVENT_COMPLETION_COUNT_FOR_REPEATABLE_ACTION_MISSING_ERROR",t[t.EVENT_BYOE_POP_UP_EMAIL_VALIDATION_ERROR=3062]="EVENT_BYOE_POP_UP_EMAIL_VALIDATION_ERROR",t[t.EVENT_BYOE_POP_UP_NAME_VALIDATION_ERROR=3063]="EVENT_BYOE_POP_UP_NAME_VALIDATION_ERROR",t[t.EVENT_TIME_BOUND_PASS_PAYMENT_COMPLETE=3064]="EVENT_TIME_BOUND_PASS_PAYMENT_COMPLETE",t[t.EVENT_GIS_INTEROP_YIELD=3065]="EVENT_GIS_INTEROP_YIELD",t[t.EVENT_GIS_INTEROP_PING_RECEIVED=3066]="EVENT_GIS_INTEROP_PING_RECEIVED",t[t.EVENT_GIS_INTEROP_WAITING_FOR_PING_ERROR=3067]="EVENT_GIS_INTEROP_WAITING_FOR_PING_ERROR",t[t.EVENT_GIS_INTEROP_LOADING_IFRAME_ERROR=3068]="EVENT_GIS_INTEROP_LOADING_IFRAME_ERROR",t[t.EVENT_GIS_INTEROP_HANDSHAKE_ESTABLISHED=3069]="EVENT_GIS_INTEROP_HANDSHAKE_ESTABLISHED",t[t.EVENT_GIS_INTEROP_OPERATION_ERROR=3070]="EVENT_GIS_INTEROP_OPERATION_ERROR",t[t.EVENT_GIS_INTEROP_TOKEN_UPDATE_START=3071]="EVENT_GIS_INTEROP_TOKEN_UPDATE_START",t[t.EVENT_GIS_INTEROP_TOKEN_UPDATE_ERROR=3072]="EVENT_GIS_INTEROP_TOKEN_UPDATE_ERROR",t[t.EVENT_GIS_INTEROP_TOKEN_UPDATED=3073]="EVENT_GIS_INTEROP_TOKEN_UPDATED",t[t.EVENT_GIS_LOGIN_ERROR=3074]="EVENT_GIS_LOGIN_ERROR",t[t.EVENT_ADD_PREFERRED_SOURCE_CONSENT_SCREEN_ADD_SOURCE_BUTTON_CLICK=3075]="EVENT_ADD_PREFERRED_SOURCE_CONSENT_SCREEN_ADD_SOURCE_BUTTON_CLICK",t[t.EVENT_ADD_PREFERRED_SOURCE_SUCCESS=3076]="EVENT_ADD_PREFERRED_SOURCE_SUCCESS",t[t.EVENT_PREFERRED_SOURCE_ALREADY_ADDED=3077]="EVENT_PREFERRED_SOURCE_ALREADY_ADDED",t[t.EVENT_SUBSCRIPTION_PLAN_CHANGE_COMPLETE=3078]="EVENT_SUBSCRIPTION_PLAN_CHANGE_COMPLETE",t[t.EVENT_PUBLISHER_RUNTIME_INSTALLED=3079]="EVENT_PUBLISHER_RUNTIME_INSTALLED",t[t.EVENT_SUBSCRIPTION_STATE=4e3]="EVENT_SUBSCRIPTION_STATE",t[t.FREE_ACCESS_EVENT_LANDING=5e3]="FREE_ACCESS_EVENT_LANDING",t[t.FREE_ACCESS_EVENT_FREE_ACCESS_PROGRAM=5001]="FREE_ACCESS_EVENT_FREE_ACCESS_PROGRAM",t[t.FREE_ACCESS_EVENT_REGWALL_IMPRESSION=5002]="FREE_ACCESS_EVENT_REGWALL_IMPRESSION",t[t.FREE_ACCESS_EVENT_UNLOCK_VIA_FREE_ACCESS_PROGRAM=5003]="FREE_ACCESS_EVENT_UNLOCK_VIA_FREE_ACCESS_PROGRAM",t[t.FREE_ACCESS_EVENT_UNLOCK_VIA_FREE_ACCESS_PROGRAM_FOR_NEW_REGISTRATION=5004]="FREE_ACCESS_EVENT_UNLOCK_VIA_FREE_ACCESS_PROGRAM_FOR_NEW_REGISTRATION",t[t.FREE_ACCESS_EVENT_UNLOCK_VIA_FREE_ACCESS_PROGRAM_FOR_USER_SIGN_IN=5005]="FREE_ACCESS_EVENT_UNLOCK_VIA_FREE_ACCESS_PROGRAM_FOR_USER_SIGN_IN",t[t.FREE_ACCESS_EVENT_UNLOCK_VIA_FREE_ACCESS_PROGRAM_FOR_USER_ALREADY_SIGNED_IN=5006]="FREE_ACCESS_EVENT_UNLOCK_VIA_FREE_ACCESS_PROGRAM_FOR_USER_ALREADY_SIGNED_IN",t[t.FREE_ACCESS_EVENT_NON_FREE_ACCESS_PROGRAM_PRE_SIGN_IN=5007]="FREE_ACCESS_EVENT_NON_FREE_ACCESS_PROGRAM_PRE_SIGN_IN",t[t.FREE_ACCESS_EVENT_NON_FREE_ACCESS_PROGRAM_POST_SIGN_IN=5008]="FREE_ACCESS_EVENT_NON_FREE_ACCESS_PROGRAM_POST_SIGN_IN",t))(o||{}),h=(t=>(t[t.CTA_MODE_UNSPECIFIED=0]="CTA_MODE_UNSPECIFIED",t[t.CTA_MODE_POPUP=1]="CTA_MODE_POPUP",t[t.CTA_MODE_INLINE=2]="CTA_MODE_INLINE",t))(h||{}),a=(t=>(t[t.UNKNOWN_ENTITLEMENT_RESULT=0]="UNKNOWN_ENTITLEMENT_RESULT",t[t.UNLOCKED_SUBSCRIBER=1001]="UNLOCKED_SUBSCRIBER",t[t.UNLOCKED_FREE=1002]="UNLOCKED_FREE",t[t.UNLOCKED_METER=1003]="UNLOCKED_METER",t[t.LOCKED_REGWALL=2001]="LOCKED_REGWALL",t[t.LOCKED_PAYWALL=2002]="LOCKED_PAYWALL",t[t.INELIGIBLE_PAYWALL=2003]="INELIGIBLE_PAYWALL",t))(a||{}),l=(t=>(t[t.UNKNOWN_ENTITLEMENT_SOURCE=0]="UNKNOWN_ENTITLEMENT_SOURCE",t[t.GOOGLE_SUBSCRIBER_ENTITLEMENT=1001]="GOOGLE_SUBSCRIBER_ENTITLEMENT",t[t.GOOGLE_SHOWCASE_METERING_SERVICE=2001]="GOOGLE_SHOWCASE_METERING_SERVICE",t[t.SUBSCRIBE_WITH_GOOGLE_METERING_SERVICE=2002]="SUBSCRIBE_WITH_GOOGLE_METERING_SERVICE",t[t.PUBLISHER_ENTITLEMENT=3001]="P
1UBLISHER_ENTITLEMENT",t))(l||{}),u=(t=>(t[t.UNKNOWN_CLIENT=0]="UNKNOWN_CLIENT",t[t.SWG_CLIENT=1]="SWG_CLIENT",t[t.AMP_CLIENT=2]="AMP_CLIENT",t[t.PROPENSITY_CLIENT=3]="PROPENSITY_CLIENT",t[t.SWG_SERVER=4]="SWG_SERVER",t[t.PUBLISHER_CLIENT=5]="PUBLISHER_CLIENT",t[t.SHOWCASE_CLIENT=6]="SHOWCASE_CLIENT",t))(u||{}),c=(t=>(t[t.GIS_MODE_UNSPECIFIED=0]="GIS_MODE_UNSPECIFIED",t[t.GIS_MODE_DISABLED=1]="GIS_MODE_DISABLED",t[t.GIS_MODE_NORMAL=2]="GIS_MODE_NORMAL",t[t.GIS_MODE_OVERLAY=3]="GIS_MODE_OVERLAY",t))(c||{});class d{constructor(t=[],s=!0){const i=s?1:0;this.t=null==t[i]?null:t[i]}getComplete(){return this.t}setComplete(t){this.t=t}toArray(t=!0){const s=[this.t];return t&&s.unshift(this.label()),s}label(){return"AccountCreationRequest"}}class g{constructor(t=[],s=!0){const i=s?1:0;this.o=null==t[i]?null:t[i],this.h=null==t[1+i]?null:t[1+i]}getSubscriberOrMember(){return this.o}setSubscriberOrMember(t){this.o=t}getLinkRequested(){return this.h}setLinkRequested(t){this.h=t}toArray(t=!0){const s=[this.o,this.h];return t&&s.unshift(this.label()),s}label(){return"AlreadySubscribedResponse"}}class p{constructor(t=[],s=!0){const i=s?1:0;this.l=null==t[i]?null:t[i],this.u=null==t[1+i]?null:t[1+i],this.p=null==t[2+i]?null:t[2+i],this._=null==t[3+i]?null:t[3+i],this.m=null==t[4+i]?null:t[4+i],this.I=null==t[5+i]?null:t[5+i],this.T=null==t[6+i]?null:t[6+i],this.R=null==t[7+i]?null:t[7+i],this.S=t[8+i]||[],this.A=null==t[9+i]?null:t[9+i],this.C=null==t[10+i]?null:t[10+i],this.O=null==t[11+i]?null:new j(t[11+i],s),this.N=null==t[12+i]?null:t[12+i],this.v=null==t[13+i]?null:t[13+i],this.P=null==t[14+i]?null:new j(t[14+i],s),this.L=null==t[15+i]?null:new I(t[15+i],s),this.G=null==t[16+i]?null:new j(t[16+i],s),this.M=null==t[17+i]?null:t[17+i],this.k=null==t[18+i]?null:t[18+i]}getEmbedderOrigin(){return this.l}setEmbedderOrigin(t){this.l=t}getTransactionId(){return this.u}setTransactionId(t){this.u=t}getReferringOrigin(){return this.p}setReferringOrigin(t){this.p=t}getUtmSource(){return this._}setUtmSource(t){this._=t}getUtmCampaign(){return this.m}setUtmCampaign(t){this.m=t}getUtmMedium(){return this.I}setUtmMedium(t){this.I=t}getSku(){return this.T}setSku(t){this.T=t}getReadyToPay(){return this.R}setReadyToPay(t){this.R=t}getLabelList(){return this.S}setLabelList(t){this.S=t}getClientVersion(){return this.A}setClientVersion(t){this.A=t}getUrl(){return this.C}setUrl(t){this.C=t}getClientTimestamp(){return this.O}setClientTimestamp(t){this.O=t}getReaderSurfaceType(){return this.N}setReaderSurfaceType(t){this.N=t}getIntegrationVersion(){return this.v}setIntegrationVersion(t){this.v=t}getPageLoadBeginTimestamp(){return this.P}setPageLoadBeginTimestamp(t){this.P=t}getLoadEventStartDelay(){return this.L}setLoadEventStartDelay(t){this.L=t}getRuntimeCreationTimestamp(){return this.G}setRuntimeCreationTimestamp(t){this.G=t}getIsLockedContent(){return this.M}setIsLockedContent(t){this.M=t}getUrlFromMarkup(){return this.k}setUrlFromMarkup(t){this.k=t}toArray(t=!0){const s=[this.l,this.u,this.p,this._,this.m,this.I,this.T,this.R,this.S,this.A,this.C,this.O?this.O.toArray(t):[],this.N,this.v,this.P?this.P.toArray(t):[],this.L?this.L.toArray(t):[],this.G?this.G.toArray(t):[],this.M,this.k];return t&&s.unshift(this.label()),s}label(){return"AnalyticsContext"}}class E{constructor(t=[],s=!0){const i=s?1:0;this.D=null==t[i]?null:t[i],this.U=null==t[1+i]?null:t[1+i],this.F=null==t[2+i]?null:t[2+i]}getEventOriginator(){return this.D}setEventOriginator(t){this.D=t}getIsFromUserAction(){return this.U}setIsFromUserAction(t){this.U=t}getConfigurationId(){return this.F}setConfigurationId(t){this.F=t}toArray(t=!0){const s=[this.D,this.U,this.F];return t&&s.unshift(this.label()),s}label(){return"AnalyticsEventMeta"}}class _{constructor(t=[],s=!0){const i=s?1:0;this.B=null==t[i]?null:new p(t[i],s),this.V=null==t[1+i]?null:t[1+i],this.W=null==t[2+i]?null:new E(t[2+i],s),this.j=null==t[3+i]?null:new A(t[3+i],s)}getContext(){return this.B}setContext(t){this.B=t}getEvent(){return this.V}setEvent(t){this.V=t}getMeta(){return this.W}setMeta(t){this.W=t}getParams(){return this.j}setParams(t){this.j=t}toArray(t=!0){const s=[this.B?this.B.toArray(t):[],this.V,this.W?this.W.toArray(t):[],this.j?this.j.toArray(t):[]];return t&&s.unshift(this.label()),s}label(){return"AnalyticsRequest"}}class m{constructor(t=[],s=!0){const i=s?1:0;this.V=null==t[i]?null:t[i]}getEvent(){return this.V}setEvent(t){this.V=t}toArray(t=!0){const s=[this.V];return t&&s.unshift(this.label()),s}label(){return"AudienceActivityClientLogsRequest"}}class f{constructor(t=[],s=!0){const i=s?1:0;this.Y=null==t[i]?null:t[i]}getUnused(){return this.Y}setUnused(t){this.Y=t}toArray(t=!0){const s=[this.Y];return t&&s.unshift(this.label()),s}label(){return"CloseWindowRequest"}}class w{constructor(t=[],s=!0){const i=s?1:0;this.K=null==t[i]?null:t[i],this.q=null==t[1+i]?null:t[1+i],this.H=null==t[2+i]?null:t[2+i],this.J=null==t[3+i]?null:t[3+i],this.X=null==t[4+i]?null:t[4+i],this.$=null==t[5+i]?null:t[5+i],this.Z=null==t[6+i]?null:t[6+i],this.tt
1=null==t[7+i]?null:t[7+i]}getSwgUserToken(){return this.K}setSwgUserToken(t){this.K=t}getActionCompleted(){return this.q}setActionCompleted(t){this.q=t}getUserEmail(){return this.H}setUserEmail(t){this.H=t}getAlreadyCompleted(){return this.J}setAlreadyCompleted(t){this.J=t}getDisplayName(){return this.X}setDisplayName(t){this.X=t}getGivenName(){return this.$}setGivenName(t){this.$=t}getFamilyName(){return this.Z}setFamilyName(t){this.Z=t}getTermsAndConditionsConsent(){return this.tt}setTermsAndConditionsConsent(t){this.tt=t}toArray(t=!0){const s=[this.K,this.q,this.H,this.J,this.X,this.$,this.Z,this.tt];return t&&s.unshift(this.label()),s}label(){return"CompleteAudienceActionResponse"}}let I=class{constructor(t=[],s=!0){const i=s?1:0;this.seconds_=null==t[i]?null:t[i],this.nanos_=null==t[1+i]?null:t[1+i]}getSeconds(){return this.seconds_}setSeconds(t){this.seconds_=t}getNanos(){return this.nanos_}setNanos(t){this.nanos_=t}toArray(t=!0){const s=[this.seconds_,this.nanos_];return t&&s.unshift(this.label()),s}label(){return"Duration"}};class b{constructor(t=[],s=!0){const i=s?1:0;this.st=null==t[i]?null:t[i],this.nt=null==t[1+i]?null:t[1+i],this.rt=null==t[2+i]?null:t[2+i],this.ot=null==t[3+i]?null:t[3+i],this.ht=null==t[4+i]?null:t[4+i],this.ut=null==t[5+i]?null:t[5+i]}getId(){return this.st}setId(t){this.st=t}getLeft(){return this.nt}setLeft(t){this.nt=t}getTop(){return this.rt}setTop(t){this.rt=t}getWidth(){return this.ot}setWidth(t){this.ot=t}getHeight(){return this.ht}setHeight(t){this.ht=t}getDisabled(){return this.ut}setDisabled(t){this.ut=t}toArray(t=!0){const s=[this.st,this.nt,this.rt,this.ot,this.ht,this.ut];return t&&s.unshift(this.label()),s}label(){return"ElementCoordinates"}}class T{constructor(t=[],s=!0){const i=s?1:0;this.ct=null==t[i]?null:t[i],this.dt=null==t[1+i]?null:t[1+i]}getJwt(){return this.ct}setJwt(t){this.ct=t}getSource(){return this.dt}setSource(t){this.dt=t}toArray(t=!0){const s=[this.ct,this.dt];return t&&s.unshift(this.label()),s}label(){return"EntitlementJwt"}}class R{constructor(t=[],s=!0){const i=s?1:0;this.gt=null==t[i]?null:new T(t[i],s),this.Et=null==t[1+i]?null:new j(t[1+i],s),this._t=null==t[2+i]?null:t[2+i],this.ft=null==t[3+i]?null:t[3+i],this.wt=null==t[4+i]?null:t[4+i],this.It=null==t[5+i]?null:t[5+i],this.bt=null==t[6+i]?null:new j(t[6+i],s)}getUsedEntitlement(){return this.gt}setUsedEntitlement(t){this.gt=t}getClientEventTime(){return this.Et}setClientEventTime(t){this.Et=t}getEntitlementSource(){return this._t}setEntitlementSource(t){this._t=t}getEntitlementResult(){return this.ft}setEntitlementResult(t){this.ft=t}getToken(){return this.wt}setToken(t){this.wt=t}getIsUserRegistered(){return this.It}setIsUserRegistered(t){this.It=t}getSubscriptionTimestamp(){return this.bt}setSubscriptionTimestamp(t){this.bt=t}toArray(t=!0){const s=[this.gt?this.gt.toArray(t):[],this.Et?this.Et.toArray(t):[],this._t,this.ft,this.wt,this.It,this.bt?this.bt.toArray(t):[]];return t&&s.unshift(this.label()),s}label(){return"EntitlementsRequest"}}class S{constructor(t=[],s=!0){const i=s?1:0;this.ct=null==t[i]?null:t[i],this.K=null==t[1+i]?null:t[1+i]}getJwt(){return this.ct}setJwt(t){this.ct=t}getSwgUserToken(){return this.K}setSwgUserToken(t){this.K=t}toArray(t=!0){const s=[this.ct,this.K];return t&&s.unshift(this.label()),s}label(){return"EntitlementsResponse"}}class A{constructor(t=[],s=!0){const i=s?1:0;this.Tt=null==t[i]?null:t[i],this.Rt=null==t[1+i]?null:t[1+i],this.St=null==t[2+i]?null:t[2+i],this.T=null==t[3+i]?null:t[3+i],this.At=null==t[4+i]?null:t[4+i],this.It=null==t[5+i]?null:t[5+i],this.Ct=null==t[6+i]?null:t[6+i],this.bt=null==t[7+i]?null:new j(t[7+i],s),this.Ot=null==t[8+i]?null:t[8+i],this.Nt=null==t[9+i]?null:t[9+i],this.yt=null==t[10+i]?null:t[10+i],this.vt=null==t[11+i]?null:t[11+i],this.Pt=null==t[12+i]?null:t[12+i],this.Lt=null==t[13+i]?null:t[13+i],this.Gt=null==t[14+i]?null:t[14+i],this.Mt=null==t[15+i]?null:t[15+i],this.kt=null==t[16+i]?null:t[16+i],this.Dt=null==t[17+i]?null:t[17+i],this.Ut=null==t[18+i]?null:t[18+i]}getSmartboxMessage(){return this.Tt}setSmartboxMessage(t){this.Tt=t}getGpayTransactionId(){return this.Rt}setGpayTransactionId(t){this.Rt=t}getHadLogged(){return this.St}setHadLogged(t){this.St=t}getSku(){return this.T}setSku(t){this.T=t}getOldTransactionId(){return this.At}setOldTransactionId(t){this.At=t}getIsUserRegistered(){return this.It}setIsUserRegistered(t){this.It=t}getSubscriptionFlow(){return this.Ct}setSubscriptionFlow(t){this.Ct=t}getSubscriptionTimestamp(){return this.bt}setSubscriptionTimestamp(t){this.bt=t}getCampaignId(){return this.Ot}setCampaignId(t){this.Ot=t}getLinkedPublicationsCount(){return this.Nt}setLinkedPublicationsCount(t){this.Nt=t}getCtaMode(){return this.yt}setCtaMode(t){this.yt=t}getOptInType(){return this.vt}setOptInType(t){this.vt=t}getEmailValidationStatus(){return this.Pt}setEmailValidationStatus(t){this.Pt=t}getGisMode(){return this.Lt}setGisMode(t){this.Lt=t}getAddPreferredSourceStatus(){return this.Gt}
1setAddPreferredSourceStatus(t){this.Gt=t}getCanonicalUrl(){return this.Mt}setCanonicalUrl(t){this.Mt=t}getUvSiteChunk(){return this.kt}setUvSiteChunk(t){this.kt=t}getPreferredSourcesInstallType(){return this.Dt}setPreferredSourcesInstallType(t){this.Dt=t}getPreferredSourcesAddSourceTrigger(){return this.Ut}setPreferredSourcesAddSourceTrigger(t){this.Ut=t}toArray(t=!0){const s=[this.Tt,this.Rt,this.St,this.T,this.At,this.It,this.Ct,this.bt?this.bt.toArray(t):[],this.Ot,this.Nt,this.yt,this.vt,this.Pt,this.Lt,this.Gt,this.Mt,this.kt,this.Dt,this.Ut];return t&&s.unshift(this.label()),s}label(){return"EventParams"}}class C{constructor(t=[],s=!0){const i=s?1:0;this.t=null==t[i]?null:t[i],this.xt=null==t[1+i]?null:t[1+i]}getComplete(){return this.t}setComplete(t){this.t=t}getError(){return this.xt}setError(t){this.xt=t}toArray(t=!0){const s=[this.t,this.xt];return t&&s.unshift(this.label()),s}label(){return"FinishedLoggingResponse"}}class O{constructor(t=[],s=!0){const i=s?1:0;this.K=null==t[i]?null:t[i]}getSwgUserToken(){return this.K}setSwgUserToken(t){this.K=t}toArray(t=!0){const s=[this.K];return t&&s.unshift(this.label()),s}label(){return"GisSignIn"}}class N{constructor(t=[],s=!0){const i=s?1:0;this.Ft=null==t[i]?null:t[i],this.wt=null==t[1+i]?null:t[1+i]}getAuthCode(){return this.Ft}setAuthCode(t){this.Ft=t}getToken(){return this.wt}setToken(t){this.wt=t}toArray(t=!0){const s=[this.Ft,this.wt];return t&&s.unshift(this.label()),s}label(){return"LinkSaveTokenRequest"}}class y{constructor(t=[],s=!0){const i=s?1:0;this.Bt=null==t[i]?null:t[i]}getRequested(){return this.Bt}setRequested(t){this.Bt=t}toArray(t=!0){const s=[this.Bt];return t&&s.unshift(this.label()),s}label(){return"LinkingInfoResponse"}}class v{constructor(t=[],s=!0){const i=s?1:0;this.Vt=(t[i]||[]).map(t=>new b(t,s))}getLoginButtonCoordinatesList(){return this.Vt}setLoginButtonCoordinatesList(t){this.Vt=t}toArray(t=!0){const s=[this.Vt?this.Vt.map(s=>s.toArray(t)):[]];return t&&s.unshift(this.label()),s}label(){return"LoginButtonCoordinates"}}class P{constructor(t=[],s=!0){const i=s?1:0;this.Y=null==t[i]?null:t[i]}getUnused(){return this.Y}setUnused(t){this.Y=t}toArray(t=!0){const s=[this.Y];return t&&s.unshift(this.label()),s}label(){return"RewardedAdAlternateActionRequest"}}class L{constructor(t=[],s=!0){const i=s?1:0;this.Wt=null==t[i]?null:t[i]}getAdUnit(){return this.Wt}setAdUnit(t){this.Wt=t}toArray(t=!0){const s=[this.Wt];return t&&s.unshift(this.label()),s}label(){return"RewardedAdLoadAdRequest"}}class G{constructor(t=[],s=!0){const i=s?1:0;this.zt=null==t[i]?null:t[i]}getSuccess(){return this.zt}setSuccess(t){this.zt=t}toArray(t=!0){const s=[this.zt];return t&&s.unshift(this.label()),s}label(){return"RewardedAdLoadAdResponse"}}class M{constructor(t=[],s=!0){const i=s?1:0;this.Wt=null==t[i]?null:t[i]}getAdUnit(){return this.Wt}setAdUnit(t){this.Wt=t}toArray(t=!0){const s=[this.Wt];return t&&s.unshift(this.label()),s}label(){return"RewardedAdViewAdRequest"}}class k{constructor(t=[],s=!0){const i=s?1:0;this.T=null==t[i]?null:t[i],this.jt=null==t[1+i]?null:t[1+i],this.Yt=null==t[2+i]?null:t[2+i],this.Kt=null==t[3+i]?null:t[3+i],this.qt=null==t[4+i]?null:t[4+i],this.Ht=null==t[5+i]?null:t[5+i],this.Jt=null==t[6+i]?null:t[6+i],this.Xt=null==t[7+i]?null:t[7+i]}getSku(){return this.T}setSku(t){this.T=t}getOldSku(){return this.jt}setOldSku(t){this.jt=t}getOneTime(){return this.Yt}setOneTime(t){this.Yt=t}getPlayOffer(){return this.Kt}setPlayOffer(t){this.Kt=t}getOldPlayOffer(){return this.qt}setOldPlayOffer(t){this.qt=t}getCustomMessage(){return this.Ht}setCustomMessage(t){this.Ht=t}getAnonymous(){return this.Jt}setAnonymous(t){this.Jt=t}getSharingPolicyEnabled(){return this.Xt}setSharingPolicyEnabled(t){this.Xt=t}toArray(t=!0){const s=[this.T,this.jt,this.Yt,this.Kt,this.qt,this.Ht,this.Jt,this.Xt];return t&&s.unshift(this.label()),s}label(){return"SkuSelectedResponse"}}class D{constructor(t=[],s=!0){const i=s?1:0;this.$t=null==t[i]?null:t[i]}getIsClicked(){return this.$t}
1setIsClicked(t){this.$t=t}toArray(t=!0){const s=[this.$t];return t&&s.unshift(this.label()),s}label(){return"SmartBoxMessage"}}let U=class{constructor(t=[],s=!0){const i=s?1:0;this.Qt=null==t[i]?null:t[i]}getSubscribe(){return this.Qt}setSubscribe(t){this.Qt=t}toArray(t=!0){const s=[this.Qt];return t&&s.unshift(this.label()),s}label(){return"SubscribeResponse"}};class x{constructor(t=[],s=!0){const i=s?1:0;this.Zt=null==t[i]?null:t[i],this.zt=null==t[1+i]?null:t[1+i],this.ts=(t[2+i]||[]).map(t=>new F(t,s))}getPublisherProvidedId(){return this.Zt}setPublisherProvidedId(t){this.Zt=t}getSuccess(){return this.zt}setSuccess(t){this.zt=t}getLinkResultsList(){return this.ts}setLinkResultsList(t){this.ts=t}toArray(t=!0){const s=[this.Zt,this.zt,this.ts?this.ts.map(s=>s.toArray(t)):[]];return t&&s.unshift(this.label()),s}label(){return"SubscriptionLinkingCompleteResponse"}}class F{constructor(t=[],s=!0){const i=s?1:0;this.zt=null==t[i]?null:t[i],this.ss=null==t[1+i]?null:t[1+i],this.Zt=null==t[2+i]?null:t[2+i]}getSuccess(){return this.zt}setSuccess(t){this.zt=t}getSwgPublicationId(){return this.ss}setSwgPublicationId(t){this.ss=t}getPublisherProvidedId(){return this.Zt}setPublisherProvidedId(t){this.Zt=t}toArray(t=!0){const s=[this.zt,this.ss,this.Zt];return t&&s.unshift(this.label()),s}label(){return"SubscriptionLinkingLinkResult"}}class B{constructor(t=[],s=!0){const i=s?1:0;this.ns=null==t[i]?null:t[i],this.rs=null==t[1+i]?null:t[1+i],this.hs=null==t[2+i]?null:t[2+i],this.ls=null==t[3+i]?null:t[3+i]}getAnswerId(){return this.ns}setAnswerId(t){this.ns=t}getAnswerText(){return this.rs}setAnswerText(t){this.rs=t}getAnswerCategory(){return this.hs}setAnswerCategory(t){this.hs=t}getPpsValue(){return this.ls}setPpsValue(t){this.ls=t}toArray(t=!0){const s=[this.ns,this.rs,this.hs,this.ls];return t&&s.unshift(this.label()),s}label(){return"SurveyAnswer"}}class V{constructor(t=[],s=!0){const i=s?1:0;this.us=(t[i]||[]).map(t=>new z(t,s)),this.ds=null==t[1+i]?null:t[1+i]}getSurveyQuestionsList(){return this.us}setSurveyQuestionsList(t){this.us=t}getStorePpsInLocalStorage(){return this.ds}setStorePpsInLocalStorage(t){this.ds=t}toArray(t=!0){const s=[this.us?this.us.map(s=>s.toArray(t)):[],this.ds];return t&&s.unshift(this.label()),s}label(){return"SurveyDataTransferRequest"}}class W{constructor(t=[],s=!0){const i=s?1:0;this.zt=null==t[i]?null:t[i]}getSuccess(){return this.zt}setSuccess(t){this.zt=t}toArray(t=!0){const s=[this.zt];return t&&s.unshift(this.label()),s}label(){return"SurveyDataTransferResponse"}}class z{constructor(t=[],s=!0){const i=s?1:0;this.gs=null==t[i]?null:t[i],this.ps=null==t[1+i]?null:t[1+i],this.Es=null==t[2+i]?null:t[2+i],this._s=(t[3+i]||[]).map(t=>new B(t,s))}getQuestionId(){return this.gs}setQuestionId(t){this.gs=t}getQuestionText(){return this.ps}setQuestionText(t){this.ps=t}getQuestionCategory(){return this.Es}setQuestionCategory(t){this.Es=t}getSurveyAnswersList(){return this._s}setSurveyAnswersList(t){this._s=t}toArray(t=!0){const s=[this.gs,this.ps,this.Es,this._s?this._s.map(s=>s.toArray(t)):[]];return t&&s.unshift(this.label()),s}label(){return"SurveyQuestion"}}class j{constructor(t=[],s=!0){const i=s?1:0;this.seconds_=null==t[i]?null:t[i],this.nanos_=null==t[1+i]?null:t[1+i]}getSeconds(){return this.seconds_}setSeconds(t){this.seconds_=t}getNanos(){return this.nanos_}setNanos(t){this.nanos_=t}toArray(t=!0){const s=[this.seconds_,this.nanos_];return t&&s.unshift(this.label()),s}label(){return"Timestamp"}}class Y{constructor(t=[],s=!0){const i=s?1:0;this.fs=null==t[i]?null:t[i]}getClose(){return this.fs}setClose(t){this.fs=t}toArray(t=!0){const s=[this.fs];return t&&s.unshift(this.label()),s}label(){return"ToastCloseRequest"}}class K{constructor(t=[],s=!0){const i=s?1:0;this.ws=null==t[i]?null:t[i]}getNative(){return this.ws}setNative(t){this.ws=t}toArray(t=!0){const s=[this.ws];return t&&s.unshift(this.label()),s}label(){return"ViewSubscriptionsResponse"}}const q={AccountCreationRequest:d,ActionRequest:class{constructor(t=[],s=!0){const i=s?1:0;this.Is=null==t[i]?null:t[i]}getAction(){return this.Is}setAction(t){this.Is=t}toArray(t=!0){const s=[this.Is];return t&&s.unshift(this.label()),s}label(){return"ActionRequest"}},AddPreferredSourceRequest:class{constructor(t=[],s=!0){const i=s?1:0;this.Y=null==t[i]?null:t[i]}getUnused(){return this.Y}setUnused(t){this.Y=t}toArray(t=!0){const s=[this.Y];return t&&s.unshift(this.label()),s}label(){return"AddPreferredSourceRequest"}},AddPreferredSourceResponse:class{constructor(t=[],s=!0){const i=s?1:0;this.bs=null==t[i]?null:t[i],this.Ts=null==t[1+i]?null:t[1+i]}getStatus(){return this.bs}setStatus(t){this.bs=t}getSiteName(){return this.Ts}setSiteName(t){this.Ts=t}toArray(t=!0){const s=[this.bs,this.Ts];return t&&s.unshift(this.label()),s}label(){return"AddPreferredSourceResponse"}},AlreadySubscribedResponse:g,AnalyticsContext:p,AnalyticsEventMeta:E,AnalyticsRequest:_,AudienceActivityClientLogsRequest:m,CloseWindowRequest:f,CompleteAudienceActionResponse:w,Duration:I,ElementCoordinates:b,EntitlementJwt:T,EntitlementsRequest:R,EntitlementsResponse:S,EventParam
1s:A,FinishedLoggingResponse:C,GisSignIn:O,LinkSaveTokenRequest:N,LinkingInfoResponse:y,LoginButtonCoordinates:v,OpenDialogRequest:class{constructor(t=[],s=!0){const i=s?1:0;this.Rs=null==t[i]?null:t[i]}getUrlPath(){return this.Rs}setUrlPath(t){this.Rs=t}toArray(t=!0){const s=[this.Rs];return t&&s.unshift(this.label()),s}label(){return"OpenDialogRequest"}},RewardedAdAlternateActionRequest:P,RewardedAdLoadAdRequest:L,RewardedAdLoadAdResponse:G,RewardedAdViewAdRequest:M,SkuSelectedResponse:k,SmartBoxMessage:D,StartGisSignIn:class{constructor(t=[],s=!0){const i=s?1:0;this.Y=null==t[i]?null:t[i]}getUnused(){return this.Y}setUnused(t){this.Y=t}toArray(t=!0){const s=[this.Y];return t&&s.unshift(this.label()),s}label(){return"StartGisSignIn"}},SubscribeResponse:U,SubscriptionLinkingCompleteResponse:x,SubscriptionLinkingLinkResult:F,SubscriptionLinkingResponse:class{constructor(t=[],s=!0){const i=s?1:0;this.Zt=null==t[i]?null:t[i]}getPublisherProvidedId(){return this.Zt}setPublisherProvidedId(t){this.Zt=t}toArray(t=!0){const s=[this.Zt];return t&&s.unshift(this.label()),s}label(){return"SubscriptionLinkingResponse"}},SurveyAnswer:B,SurveyDataTransferRequest:V,SurveyDataTransferResponse:W,SurveyQuestion:z,Timestamp:j,ToastCloseRequest:Y,UpdateAddPreferredSourceButtonRequest:class{constructor(t=[],s=!0){const i=s?1:0;this.bs=null==t[i]?null:t[i]}getStatus(){return this.bs}setStatus(t){this.bs=t}toArray(t=!0){const s=[this.bs];return t&&s.unshift(this.label()),s}label(){return"UpdateAddPreferredSourceButtonRequest"}},ViewSubscriptionsResponse:K};function H(t){const s=t?t[0]:null;if(s){const i=q[s];if(i)return new i(t)}throw new Error("Deserialization failed for ".concat(t))}function J(t){return t.prototype.label()}const X=1,$="USER_TOKEN",Q="READ_TIME",Z="ents",tt="isreadytopay",st="subscribe.google.com:rk",it="toast",et="hasgisconnection",nt="readervisitlogged",rt={PPS_TAXONOMIES:"ppstaxonomies"},ot="reader_visit";var ht=(t=>(t.TYPE_REGISTRATION_WALL="TYPE_REGISTRATION_WALL",t.TYPE_NEWSLETTER_SIGNUP="TYPE_NEWSLETTER_SIGNUP",t.TYPE_REWARDED_SURVEY="TYPE_REWARDED_SURVEY",t.TYPE_REWARDED_AD="TYPE_REWARDED_AD",t.TYPE_CONTRIBUTION="TYPE_CONTRIBUTION",t.TYPE_SUBSCRIPTION="TYPE_SUBSCRIPTION",t.TYPE_BYO_CTA="TYPE_BYO_CTA",t))(ht||{});function at(...t){/swg.debug=1/.test(self.location.hash)&&(t.unshift("[Subscriptions]"),lt(...t))}function lt(...t){console.log(...t)}function ut(...t){console.warn(...t)}function ct(t,s="Assertion failed",...i){if(t)return;const e=s.split("%s");let n=e.shift();for(const r of i){const t=e.shift();n+=dt(r)+t}throw new Error(n)}function dt(t){const s=t;return 1==(null==s?void 0:s.nodeType)?s.tagName.toLowerCase()+(s.id?"#"+s.id:""):String(t)}const gt=self.document.createElement("a"),pt={};function Et(t){const s=pt[t];if(s)return s;const i=function(t,s){t.href=s;const i={href:t.href,protocol:t.protocol,host:t.host,hostname:t.hostname,port:"0"==t.port?"":t.port,pathname:t.pathname,search:t.search,hash:t.hash,origin:t.protocol+"//"+t.host};return t.origin&&"null"!==t.origin?i.origin=t.origin:"data:"!==i.protocol&&i.host||(i.origin=i.href),i}(gt,t);return pt[t]=i}function _t(t){return t?(/^[?#]/.test(t)?t.slice(1):t).split("&").reduce((t,s)=>{const i=s.split("=");try{const s=decodeURIComponent(i[0]||""),e=decodeURIComponent(i[1]||"");s&&(t[s]=e)}catch{ut("SwG could not parse a URL query param: ".concat(i[0]))}return t},{}):{}}function mt(t,s,i){const e=t.indexOf("?"),n=t.indexOf("#");let r="";return-1!=n&&(r=t.substring(n),t=t.substring(0,n)),-1==e?t+="?":e<t.length-1&&(t+="&"),(t+=encodeURIComponent(s)+"="+encodeURIComponent(i))+r}function ft(t){return JSON.stringify(t.toArray(!1))}function wt(t){const s=t.getRootNode().querySelector("link[rel='canonical']");return null==s?void 0:s.href}function It(t){const s=t.getRootNode();return wt(t)||s.location.origin+s.location.pathname}const bt=Et(self.window.location.href);Et(self.document.referrer);const Tt={[ht.TYPE_SUBSCRIPTION]:"/subscriptionoffersiframe",[ht.TYPE_CONTRIBUTION]:"/contributionoffersiframe",[ht.TYPE_REGISTRATION_WALL]:"/regwalliframe",[ht.TYPE_NEWSLETTER_SIGNUP]:"/newsletteriframe",[ht.TYPE_REWARDED_SURVEY]:"/surveyiframe",[ht.TYPE_BYO_CTA]:"/byoctaiframe",[ht.TYPE_REWARDED_AD]:"/rewardedadiframe"};function Rt(t,s){const i=s.win().location.search;return new URLSearchParams(i).get(t)}const St={zero:"0",nocache:"1",hr1:"3600000",hr12:"43200000"},At={frontEnd:"https://news.google.com",payEnv:"PRODUCTION",playEnv:"PROD",feCache:"nocache"},Ct={default:{frontEnd:s,payEnv:"PRODUCTION",playEnv:"PROD",feCache:"nocache"},prod:At,paytest:{...At,payEnv:"TEST"},autopush:{frontEnd:"https://subscribe-autopush.sandbox.google.com",payEnv:"PRODUCTION",playEnv:"AUTOPUSH",feCache:"nocache"},qual:{frontEnd:"https://subscribe-qual.sandbox.google.com",payEnv:"SANDBOX",playEnv:"STAGING",feCache:"nocache"}};function Ot(){const t=_t(self.location.hash)["swg.mode"];return t&&Ct[t]?Ct[t]:Ct.default}function Nt(){return Et(Ot().frontEnd).origin}function yt(t){const s=_t(self.location.hash)["swg.experiments"];return void 0!==s&&(t=mt(t,"e",s)),"".concat(Ot().frontEnd,"/swg/_/api/v1")+t}function vt(t){return"https://pubads.g.doubleclick.net"+t}function Pt(t,s={},i=""){const e=i?"swg/".concat(i):"swg";t=function(t){return mt(t,"_",function(t){const s=Number(St[t]||1);if(0===s)return"_";const i=Date.now();return String(s<=1?i:Math.floor(i/s))}(Ot().feCache))}("".concat(Ot().frontEnd,"/").concat(e,"/ui/v1").concat(t));const n=_t(self.location.hash),r=n["swg.boqjsmode"];void 0!==r&&(t=mt(t,"jsmode",r));const o=n["swg.experiments"];void 0!==o&&(t=mt(t,"e",o));for(const h in s)t=mt(t,h,s[h]);return t}function Lt(t){return Object.assign(t,{_client:"SwG ".concat(i)})}const Gt=new Set([o.ACTION_BYO_CTA_BUTTON_CLICK,o.ACTION_BYO_CTA_CLOSE,o.ACTION_CONTRIBUTION_OFFER_SELECTED,o.ACTION_NEWSLETTER_ALREADY_OPTED_IN_CLICK,o.ACTION_NEWSLETTER_OPT_IN_BUTTON_CLICK,o.ACTION_PAYMENT_COMPLETE,o.ACTION_PAYMENT_FLOW_STARTED,o.ACTION_REGWALL_ALREADY_OPTED_IN_CLICK,o.ACTION_REGWALL_OPT_IN_BUTTON_CLICK,o.ACTION_SURVEY_CLOSED,o.ACTION_SURVEY_NEXT_BUTTON_CLICK,o.ACTION_SURVEY_PREVIOUS_BUTTON_CLICK,o.ACTION_SURVEY_SUBMIT_CLICK,o.EVENT_NEWSLETTER_OPTED_IN,o.EVENT_REGWALL_OPTED_IN,o.EVENT_SURVEY_SUBMITTED,o.IMPRESSION_BYO_CTA,o.IMPRESSION_CONTRIBUTION_OFFERS,o.IMPRESSION_NEWSLETTER_OPT_IN,o.IMPRESSION_OFFERS,o.IMPRESSION_PAGE_LOAD,o.IMPRESSION_PAYWALL,o.IMPRESSION_REGWALL_OPT_IN,o.IMPRESSION_SURVEY]);class Mt{constructor(t,s){this.Ss=t,this.As=s,this.Cs=this.Ss.eventManager(),this.Os=this.Ss.storage()}start(){this.Cs.registerEventListener(this.Ns.bind(this))}async Ns(t){if(!t.eventType||!Gt.has(t.eventType))return;const s=await this.Os.get($,!0);if(!s)return;const i=encodeURIComponent(this.Ss.pageConfig().getPublicationId()),e=this.ys(t);let n="/publication/".concat(i,"/audienceactivity");n=mt(n,"sut",s),this.As.sendBeacon(yt(n),e)}ys(t){const s=new m;return s.setEvent(t.eventType),s}}var kt=(t=>(t.UNSPECIFIED="UNSPECIFIED",t.DISMISSIBLE="DISMISSIBLE",t.BLOCKING="BLOCKING",t))(kt||{}),Dt=(t=>(t.UNSPECIFIED="UNSPECIFIED",t.FINITE="FINITE",t.INFINITE="INFINITE",t))(Dt||{});function Ut(t){return!!(null==t?void 0:t.seconds)||!!(null==t?void 0:t.nanos)}function xt(t,s,i){var e,n;return(null==(e=i.promptFrequencyCap)?void 0:e.duration)||(t.logSwgEvent(o.EVENT_PROMPT_FREQUENCY_CONFIG_NOT_FOUND),null==(n=s.anyPromptFrequencyCap)?void 0:n.frequencyCapDuration)}function Ft(t,s){if(0===s.length)return!1;const i=Math.max(...s),e=1e3*(t.seconds||0)+(n=t.nanos||0,Math.floor(n/Math.pow(10,6)));var n;return Date.now()-i<e}function Bt(t,s){const i=s.configId?t[s.configId]:t[s.type];return s.closability===kt.BLOCKING?(null==i?void 0:i.completions)||[]:[...(null==i?void 0:i.dismissals)||[],...(null==i?void 0:i.completions)||[]]}const Vt={ar:"المساهمة من خلال Google",bg:"Принос чрез Google",bn:"Google-এর মাধ্যমে নিজের অবদান রাখুন",cs:"Přispět s Googlem",da:"Bidrag via Google",de:"Unterstützen mit Google",el:"Συνεισφέρετε μέσω Google",en:"Contribute with Google",es:"Contribuye con Google","es-419":"Contribuir con Google",et:"Panustage Google'i abil",fil:"Mag-contribute gamit ang Google",fr:"Contribuer avec Google","fr-ca":"Contribuer avec Google",gu:"Google વડે કન્ટ્રિબ્યૂટ કરો",hi:"Google खाते की मदद से योगदान करें",hr:"Podržite putem Googlea",hu:"Hozzájárulás a Google-lal",id:"Beri kontribusi dengan Google",it:"Contribuisci con Google",iw:"לתרומה באמצעות Google",ja:"Google で寄付",kn:"Google ಮೂಲಕ ಕೊಡುಗೆ ನೀಡಿ",ko:"Google을 통한 후원",lt:"Skirkite paramą su „Google“",lv:"Dāvināt, izmantojot Google",ml:"Google-ലൂടെ സംഭാവന ചെയ്യുക",mr:"Google वरून योगदान द्या",ms:"Sumbangkan dengan Google",nl:"Bijdragen met Google",no:"Bidra med Google",pa:"Contribute with Google",pl:"Wesprzyj z Google","pt-br":"Contribua usando o Google","pt-pt":"Contribuir com o Google",ro:"Contribuiți cu Google",ru:"Поддержать через Google",sk:"Prispieť s Googlom",sl:"Prispevajte z Googlom",sv:"Bidra med Google",ta:"Contribute with Google",te:"Google ద్వారా డొనేట్ చేయండి",th:"สนับสนุนผ่าน Google",tr:"Google ile Katkıda Bulun",uk:"Зробити внесок через Google",ur:"Google کے ساتھ تعاون کریں",vi:"Đóng góp bằng Google","zh-cn":"通过 Google 捐赠","zh-hk":"透過 Google 捐助","zh-tw":"透過 Google 捐款"},Wt={ar:"الاشتراك من خلال Google",bg:"Абонамент към Google",bn:"Google দিয়ে সাবস্ক্রাইব করুন",cs:"Předplatné s Googlem",da:"Abonner via Google",de:"Abonnieren mit Google",el:"Εγγραφείτε με την Google",en:"Subscribe with Google",es:"Suscríbete con Google","es-419":"Suscríbete con Google",et:"Tellige Google'iga",fil:"Mag-subscribe gamit ang Google",fr:"S'abonner avec Google","fr-ca":"S'abonner avec Google",gu:"Google વડે સબ્સ્ક્રાઇબ કરો",hi:"Google खाते की मदद से सदस्यता लें",hr:"Pretplatite se putem Googlea",hu:"Előfizetés a Google-lal",id:"Berlangganan dengan Google",it:"Abbonati con Google",iw:"הרשמה באמצעות Google",ja:"Google で購読",kn:"Subscribe with Google",ko:"Google을 통해 구독하기",lt:"Prenumeruoti su „Google“",lv:"Abonēt, izmantojot Google",ml:"Subscribe with Google",mr:"Google वरून सदस्य व्हा",ms:"Langgan dengan Google",nl:"Abonneren via Google",no:"Abonner med Google",pa:"Subscribe with Google",pl:"Subskrybuj z Google","pt-br":"Assine com o Google","pt-pt":"Subscrever com o Google",ro:"Abonați-vă cu Google",ru:"Подписка через Google",sk:"Predplatné s Googlom",sl:"Naročnine z Googlom",sv:"Subscribe with Google",ta:"Subscribe with Google",te:"Google ఖాతాతో సబ్‌స్క్రయిబ్ చేయండి",th:"สมัครผ่าน Google",tr:"Google ile Abone Ol",uk:"Передплата через Google",ur:"Google کے ساتھ سبسکرائب کریں",vi:"Đăng ký bằng Google","zh-cn":"通过 Google 订阅","zh-hk":"透過 Google 訂閱","zh-tw":"透過 Google 訂閱"},zt={ar:"تم إنشاء حساب باستخدام {EMAIL}.",bg:"Създаване на профил чрез {EMAIL}",bn:"{EMAIL}-এর সাহায্যে একটি অ্যাকাউন্ট তৈরি করা হয়েছে",cs:"Vytvořen účet pomocí e-mailu {EMAIL}",da:"Opret en konto med {EMAIL}",de:"Konto bei {EMAIL}
1 wurde erstellt",el:"Δημιουργήθηκε ένας λογαριασμός με τη διεύθυνση {EMAIL}",en:"Created an account with {EMAIL}",es:"Has creado una cuenta con {EMAIL}","es-419":"Se creó una cuenta con {EMAIL}",et:"Lõite konto e-posti aadressiga {EMAIL}",fil:"Gumawa ng account gamit ang {EMAIL}",fr:"A créé un compte avec {EMAIL}","fr-ca":"Un compte a été créé avec l'adresse {EMAIL}",gu:"{EMAIL} વડે એકાઉન્ટ બનાવ્યું",hi:"{EMAIL} का इस्तेमाल करके, एक खाता बनाया गया",hr:"Izrađen je račun s e-adresom {EMAIL}",hu:"Fiók létrehozva a következővel: {EMAIL}",id:"Membuat akun dengan {EMAIL}",it:"È stato creato un account con l'indirizzo {EMAIL}",iw:"יצרת חשבון באמצעות {EMAIL}",ja:"{EMAIL} でアカウントを作成しました",kn:"{EMAIL} ಮೂಲಕ ಒಂದು ಖಾತೆಯನ್ನು ರಚಿಸಲಾಗಿದೆ",ko:"{EMAIL}(으)로 계정을 만들었습니다.",lt:"Sukurta paskyra pas „{EMAIL}“",lv:"Ir izveidots konts ar e-pastu {EMAIL}",ml:"{EMAIL} ഉപയോഗിച്ച് അക്കൗണ്ട് സൃഷ്ടിച്ചു",mr:"{EMAIL} वापरून खाते तयार केले",ms:"Membuat akaun dengan {EMAIL}",nl:"Account gemaakt met {EMAIL}",no:"Du har opprettet en konto med {EMAIL}",pa:"{EMAIL} ਨਾਲ ਖਾਤਾ ਬਣਾਇਆ ਗਿਆ",pl:"Utworzono konto za pomocą adresu {EMAIL}","pt-br":"Conta criada com o e-mail {EMAIL}","pt-pt":"Criou uma conta com {EMAIL}",ro:"A fost creat un cont cu {EMAIL}",ru:"Вы зарегистрировали аккаунт на адрес {EMAIL}.",sk:"Vytvorený účet pomocou e‑mailu {EMAIL}",sl:"Z e-poštnim naslovom {EMAIL} je bil ustvarjen račun.",sv:"Du skapade ett konto med {EMAIL}",ta:"{EMAIL} மூலம் கணக்கு உருவாக்கப்பட்டது",te:"{EMAIL}తో ఖాతాను క్రియేట్ చేయండి",th:"สร้างบัญชีด้วย {EMAIL}",tr:"{EMAIL} ile bir hesap oluşturun",uk:"Обліковий запис створено за допомогою електронної адреси {EMAIL}",ur:"{EMAIL} سے اکاؤنٹ بنایا گیا",vi:"Đã tạo một tài khoản bằng {EMAIL}","zh-cn":"已使用 {EMAIL} 创建账号","zh-hk":"已使用 {EMAIL} 建立帳戶","zh-tw":"已使用 {EMAIL} 建立帳戶"},jt={ar:"اشتركت بنجاح باستخدام {EMAIL}",bg:"Регистрирахте се с(ъс) {EMAIL}",bn:"{EMAIL} দিয়ে সাইন-আপ করা হয়েছে",cs:"Zaregistrováno pomocí účtu {EMAIL}",da:"Tilmeldt med {EMAIL}",de:"Angemeldet mit {EMAIL}",el:"Εγγραφήκατε με τη διεύθυνση {EMAIL}",en:"Signed up with {EMAIL}",es:"Te has registrado con {EMAIL}
1","es-419":"Te registraste con {EMAIL}",et:"Registreerusite e-posti aadressiga {EMAIL}.",fil:"Nag-sign up gamit ang {EMAIL}",fr:"Inscrit avec {EMAIL}","fr-ca":"Inscrit avec {EMAIL}",gu:"{EMAIL} વડે સાઇન અપ કર્યું",hi:"{EMAIL} से साइन अप किया गया",hr:"Registrirani ste putem e-adrese {EMAIL}",hu:"Sikeresen regisztrált a(z) {EMAIL} címmel",id:"Mendaftar dengan {EMAIL}",it:"Registrazione eseguita con {EMAIL}",iw:"נרשמת באמצעות {EMAIL}",ja:"{EMAIL} で登録しました",kn:"{EMAIL} ಮೂಲಕ ಸೈನ್ ಅಪ್ ಮಾಡಲಾಗಿದೆ",ko:"{EMAIL} 주소로 가입함",lt:"Užsiregistruota naudojant {EMAIL}",lv:"Jūs reģistrējāties, izmantojot kontu {EMAIL}.",ml:"{EMAIL} ഉപയോഗിച്ച് സൈൻ അപ്പ് ചെയ്തു",mr:"{EMAIL} वापरून साइन अप केले आहे",ms:"Mendaftar dengan {EMAIL}",nl:"Aangemeld met {EMAIL}",no:"Registrert med {EMAIL}",pa:"{EMAIL} ਨਾਲ ਸਾਈਨ-ਅੱਪ ਕੀਤਾ ਗਿਆ",pl:"Zarejestrowano za pomocą adresu {EMAIL}","pt-br":"Deu certo! Seu e-mail {EMAIL} está inscrito","pt-pt":"Inscrição feita com {EMAIL}",ro:"V-ați înscris cu {EMAIL}",ru:"Новости будут приходить на адрес {EMAIL}.",sk:"Zaregistrovali ste sa pomocou účtu {EMAIL}",sl:"Registrirano z e-poštnim naslovom {EMAIL}",sv:"Registrerade sig med {EMAIL}",ta:"{EMAIL} மூலம் பதிவுசெய்துள்ளீர்கள்",te:"{EMAIL}‌ను ఉపయోగించి సైన్ అప్ చేశారు",th:"ลงชื่อสมัครใช้ด้วย {EMAIL}",tr:"{EMAIL} ile kaydolundu",uk:"Ви підписалися на новини, використовуючи адресу {EMAIL}",ur:"‫{EMAIL} کے ساتھ سائن اپ کیا",vi:"Đã đăng ký bằng tài khoản {EMAIL}","zh-cn":"已使用 {EMAIL} 订阅","zh-hk":"已透過 {EMAIL} 註冊","zh-tw":"已使用 {EMAIL} 訂閱"},Yt={ar:"تعذَّرت عملية التسجيل. يُرجى إعادة المحاولة.",bg:"Регистрацията не бе успешна. Опитайте да се регистрирате отново.",bn:"রেজিস্ট্রেশন করা যায়নি। আবার রেজিস্টার করার চেষ্টা করুন।",cs:"Registrace se nezdařila. Zkuste se zaregistrovat znovu.",da:"Tilmeldingen mislykkedes. Prøv at tilmelde dig igen.",de:"Registrierung fehlgeschlagen. Versuche es n
1och einmal.",el:"H εγγραφή απέτυχε. Δοκιμάστε να εγγραφείτε ξανά.",en:"Registration failed. Try registering again.",es:"Registro fallido. Prueba a registrarte de nuevo.","es-419":"No se pudo completar el registro. Vuelve a intentarlo.",et:"Registreerimine nurjus. Proovige uuesti registreerida.",fil:"Hindi nairehistro. Subukang irehistro ulit.",fr:"Échec de l'enregistrement. Réessayez.","fr-ca":"Échec de l'inscription. Essayez de vous inscrire à nouveau.",gu:"રજિસ્ટ્રેશન કરવામાં નિષ્ફળ થયા. ફરી રજિસ્ટર કરવાનો પ્રયાસ કરો.",hi:"रजिस्ट्रेशन नहीं हो सका. फिर से रजिस्टर करने की कोशिश करें.",hr:"Registracija nije uspjela. Pokušajte se registrirati ponovo.",hu:"Sikertelen regisztráció. Próbáljon meg újra regisztrálni.",id:"Pendaftaran gagal. Coba daftar lagi.",it:"Registrazione non riuscita. Prova a registrarti di nuovo.",iw:"הרישום נכשל. כדאי לנסות שוב.",ja:"登録できませんでした。もう一度お試しください。",kn:"ನೋಂದಣಿ ವಿಫಲವಾಗಿದೆ. ಪುನಃ ನೋಂದಾಯಿಸಲು ಪ್ರಯತ್ನಿಸಿ.",ko:"등록에 실패했습니다. 다시 등록해 보세요.",lt:"Registracija nesėkminga. Bandykite registruotis dar kartą.",lv:"Reģistrēšanās neizdevās. Mēģiniet reģistrēties vēlreiz.",ml:"രജിസ്റ്റർ ചെയ്യാനായില്ല. വീണ്ടും രജിസ്റ്റർ ചെയ്യാൻ ശ്രമിക്കുക.",mr:"नोंदणी करता आली नाही. पुन्हा नोंदणी करून पहा.",ms:"Pendaftaran gagal. Cuba daftar lagi.",nl:"Registratie mislukt. Probeer opnieuw te registreren.",no:"Registreringen mislyktes. Prøv å registrere deg på nytt.",pa:"ਰਜਿਸਟਰੇਸ਼ਨ ਕਰਨਾ ਅਸਫਲ ਰਿਹਾ। ਰਜਿਟਰ ਕਰਨ ਦੀ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ।",pl:"Rejestracja się nie udała. Spróbuj jeszcze raz się zarejestrować.","pt-br":"Não foi possível fazer o registro. Tente de novo.","pt-pt":"Falha no registo. Tente registar-se novamente.",ro:"Nu s-a realizat înregistrarea. Încercați să vă înregistrați din nou.",ru:"Не удалось пройти регистрацию. Повторите попытку.",sk:"Registrácia sa nepodarila. Skúste sa zaregistrovať znova.",sl:"Registracija ni uspela. Poskusite se znova registrirati.",sv:"Registreringen misslyckades. Försök att registrera dig igen.",ta:"பதிவுசெய்ய முடியவில்லை. மீண்டும் முயலவும்.",te:"రిజిస్ట్రేషన్ విఫలమైంది. రిజిస్ట్రేషన్‌ను మళ్లీ ట్రై చేయండి.",th:"ลงทะเบียนไม่สำเร็จ ลองลงทะเบียนอีกครั้ง",tr:"Kayıt işlemi başarısız oldu. Tekrar kayıt yaptırmayı deneyin.",uk:"Не вдалося зареєструватися. Повторіть спробу.",ur:"رجسٹریشن ناکام ہو گئی۔ دوبارہ رجسٹر کرنے کی کوشش کریں۔",vi:"Không đăng ký được. Hãy thử đăng ký lại.","zh-cn":"注册失败,请尝试重新注册。","zh-hk":"註冊失敗。請嘗試重新註冊。","zh-tw":"註冊失敗,請再試一次。"},Kt={ar:"تعذَّرت عملية الاشتراك. يُرجى إعادة المحاولة.",bg:"Регистрацията не бе успешна. Опитайте да се регистрирате отново.",bn:"সাইন-আপ করা যায়নি। আবার সাইন-আপ করার চেষ্টা করুন।",cs:"Registrace se nezdařila. Zkuste se zaregistrovat znovu.",da:"Tilmeldingen mislykkedes. Prøv at tilmelde dig igen.",de:"Anmeldung fehlgeschlagen. Versuche es n
1och einmal.",el:"Η εγγραφή απέτυχε. Δοκιμάστε να εγγραφείτε ξανά.",en:"Sign-up failed. Try signing up again.",es:"Suscripción fallida. Prueba a suscribirte de nuevo.","es-419":"Se produjo un error durante el registro. Vuelve a intentarlo.",et:"Registreerumine nurjus. Proovige uuesti registreeruda.",fil:"Hindi nakapag-sign up. Subukang mag-sign up ulit.",fr:"Échec de l'inscription. Réessayez.","fr-ca":"Échec de l'inscription. Essayez de vous inscrire à nouveau.",gu:"સાઇન અપ કરવામાં નિષ્ફળ થયા. ફરી સાઇન અપ કરવાનો પ્રયાસ કરો.",hi:"साइन अप नहीं किया जा सका. फिर से साइन अप करने की कोशिश करें.",hr:"Registracija nije uspjela. Pokušajte se registrirati ponovo.",hu:"A regisztráció nem sikerült. Próbáljon meg újra regisztrálni.",id:"Pendaftaran gagal. Coba daftar lagi.",it:"Iscrizione non riuscita. Prova a iscriverti di nuovo.",iw:"ההרשמה נכשלה. כדאי לנסות שוב.",ja:"登録できませんでした。もう一度お試しください。",kn:"ಸೈನ್ ಅಪ್ ವಿಫಲವಾಗಿದೆ. ಪುನಃ ಸೈನ್ ಅಪ್ ಮಾಡಲು ಪ್ರಯತ್ನಿಸಿ.",ko:"가입에 실패했습니다. 다시 가입해 보세요.",lt:"Nepavyko prisiregistruoti. Bandykite prisiregistruoti dar kartą.",lv:"Reģistrācija neizdevās. Mēģiniet reģistrēties vēlreiz.",ml:"സൈൻ അപ്പ് ചെയ്യാനായില്ല. വീണ്ടും സൈൻ അപ്പ് ചെയ്യാൻ ശ്രമിക്കുക.",mr:"साइनअप करता आले नाही. पुन्हा साइन अप करून पहा.",ms:"Daftar gagal. Cuba daftar lagi.",nl:"Aanmelding mislukt. Probeer opnieuw aan te melden.",no:"Registreringen mislyktes. Prøv å registrere deg på nytt.",pa:"ਸਾਈਨ-ਅੱਪ ਕਰਨਾ ਅਸਫਲ ਰਿਹਾ। ਸਾਈਨ-ਅੱਪ ਕਰਨ ਦੀ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ।",pl:"Rejestracja się nie udała. Spróbuj jeszcze raz się zarejestrować.","pt-br":"Não foi possível se inscrever. Tente de novo.","pt-pt":"Falha na inscrição. Tente inscrever-se novamente.",ro:"Nu s-a realizat înscrierea. Încercați să vă înscrieți din nou.",ru:"Не удалось зарегистрироваться. Повторите попытку.",sk:"Registrácia sa nepodarila. Skúste sa zaregistrovať znova.",sl:"Prijava ni uspela. Poskusite se znova prijaviti.",sv:"Registreringen misslyckades. Försök att registrera dig igen.",ta:"பதிவுசெய்ய முடியவில்லை. மீண்டும் முயலவும்.",te:"సైన్ అప్ విఫలమైంది. మళ్లీ సైన్ అప్ చేసి ట్రై చేయండి.",th:"ลงชื่อสมัครรับไม่สำเร็จ ลองลงชื่อสมัครรับอีกครั้ง",tr:"Kaydolma işlemi başarısız oldu. Tekrar kaydolmayı deneyin.",uk:"Не вдалося підписатися. Повторіть спробу.",ur:"سائن اپ ناکام ہو گیا۔ دوبارہ سائن اپ کرنے کی کوشش کریں۔",vi:"Không đăng ký nhận bản tin được. Hãy thử đăng ký lại.","zh-cn":"注册失败,请尝试重新注册。","zh-hk":"申請失敗。請嘗試重新申請。","zh-tw":"訂閱失敗,請再試一次。"},qt={ar:"لم يتم العثور على أي اشتراك.",bg:"Няма намерено членство",bn:"কোনও মেম্বারশিপ খুঁজে পাওয়া যায়নি",cs:"Nebylo nalezeno žádné členství",da:"Der blev ikke fundet noget medlemskab",de:"Keine Mitgliedschaftsdaten gefunden",el:"Δεν βρέθηκε συνδρομή",en:"No membership found",es:"No se han encontrado suscripciones","es-419":"No se encontró ninguna membresía",et:"Liikmesust ei leitud",fil:"Walang nakitang membership",fr:"Aucun abonnement trouvé","fr-ca":"Aucun abonnement trouvé",gu:"કોઈ મેમ્બરશિપ મળી નથી",hi:"पैसे चुकाकर ली जाने वाली कोई सदस्यता नहीं मिली",hr:"Nije pronađena nijedna pretplata",hu:"Nem található tagság",id:"Langganan tidak ditemukan",it:"Nessun abbonamento trovato",iw:"לא נמצא מינוי",ja:"メンバーシップが見つかりません",kn:"ಯಾವುದೇ ಸದಸ್ಯತ್ವವು ಕಂಡುಬಂದಿಲ್ಲ",ko:"멤버십 정보를 찾을 수 없습니다.",lt:"Narystės nerasta",lv:"Netika atrasts neviens abonements.",ml:"അംഗത്വമൊന്നും കണ്ടെത്തിയില്ല",mr:"कोणतेही सदस्यत्व आढळले नाही",ms:"Tiada keahlian ditemukan",nl:"Geen lidmaatschap gevonden",no:"Fant ingen abonnementer",pa:"ਕੋਈ ਮੈਂਬਰਸ਼ਿਪ ਨਹੀਂ ਮਿਲੀ",pl:"Nie znaleziono subskrypcji","pt-br":"Nenhuma assinatura foi encontrada","pt-pt":"Nenhuma subscrição encontrada",ro:"Niciun abonament găsit",ru:"Подписка не найдена.",sk:"Nenašlo sa žiadne členstvo",sl:"Ni naročnin",sv:"Inget medlemskap hittades",ta:"மெம்ப
1ர்ஷிப் இல்லை",te:"మెంబర్‌షిప్ కనుగొనబడలేదు",th:"ไม่พบการเป็นสมาชิก",tr:"Üyelik bulunamadı",uk:"Немає підписок",ur:"کوئی رکنیت نہیں ملی",vi:"Không tìm thấy gói thành viên nào","zh-cn":"未找到会员资料","zh-hk":"找不到會籍","zh-tw":"找不到會員資料"},Ht={ar:'عبارة الحث على اتخاذ إجراء في ميزة "اشترِك مع Google"',bg:"Подканваща фраза за „Абонамент към Google“",bn:"Subscribe with Google CTA",cs:"Výzva k akci Předplatného s Googlem",da:"CTA for Abonner med Google",de:"„Abonnieren mit Google“-CTA",el:"CTA για τη λειτουργία Εγγραφείτε με την Google",en:"Subscribe with Google CTA",es:"CTA de Suscríbete con Google","es-419":"CTA de Suscríbete con Google",et:"CTA Tellige Google'iga",fil:"CTA ng Mag-subscribe gamit ang Google",fr:"CTA S'abonner avec Google","fr-ca":"Appel à l'action S'abonner avec Google",gu:"Subscribe with Google CTA",hi:"Subscribe with Google का सीटीए",hr:"CTA za Pretplatu putem Googlea",hu:"Előfizetés a Google-lal CTA",id:"CTA Berlangganan dengan Google",it:"CTA Abbonati con Google",iw:"‫CTA של Subscribe with Google",ja:"「Google で購読」の CTA",kn:"Subscribe with Google CTA",ko:"Google을 통한 구독 CTA",lt:"Prenumeruoti su „Google“ raginimas veikti",lv:"Abonēšana, izmantojot Google NLP",ml:"Subscribe with Google CTA",mr:"Subscribe with Google CTA",ms:"
1CTA Langgan dengan Google",nl:"CTA voor Abonneren via Google",no:"Handlingsfremmende oppfordring for Abonner med Google",pa:"Subscribe with Google CTA",pl:"Wezwanie do działania Subskrybuj z Google","pt-br":"CTA do Assine com o Google","pt-pt":"AAA Subscreva com o Google",ro:"Îndemnul Abonați-vă cu Google",ru:'Призыв к действию в сервисе "Подписка через Google"',sk:"Výzva na akciu Predplatného s Googlom",sl:"Poziv k dejanju za Naročnine z Googlom",sv:"Uppmaning för Subscribe with Google",ta:"Subscribe with Google CTA",te:"Subscribe with Google CTA",th:'CTA "สมัครผ่าน Google"',tr:"Google ile Abone Ol CTA Mesajı",uk:'Заклик до дії "Передплата через Google"',ur:"‫Google کے ساتھ سبسکرائب کریں کا CTA",vi:"CTA cho dịch vụ Đăng ký bằng Google","zh-cn":"“通过 Google 订阅”CTA","zh-hk":"「透過 Google 訂閱」呼籲字句 (CTA)","zh-tw":"「透過 Google 訂閱」行動號召"},Jt={ar:'زر "اشترِك مع Google"',bg:"Бутон „Абонамент към Google“",bn:"Subscribe with Google-এর বোতাম",cs:"Tlačítko Předplatného s Googlem",da:"Knap til Abonner med Google",de:"„Abonnieren mit Google“-Button",el:"Κουμπί για τη λειτουργία Εγγραφείτε με την Google",en:"Subscribe with Google Button",es:"Botón Suscríbete con Google","es-419":"Botón de Suscríbete con Google",et:"Nupp Tellige Google'iga",fil:"Button na Mag-subscribe gamit ang Google",fr:"Bouton S'abonner avec Google","fr-ca":"Bouton S'abonner avec Google",gu:"Subscribe with Google બટન",hi:"Subscribe with Google बटन",hr:"Gumb Pretplata putem Googlea",hu:"Előfizetés a Google-lal gomb",id:"Tombol Berlangganan dengan Google",it:"Pulsante Abbonati con Google",iw:"כפתור של Subscribe with Google",ja:"「Google で購読」のボタン",kn:"Subscribe with Google ಬಟನ್",ko:"Google을 통한 구독 버튼",lt:"Prenumeruoti su „Google“ mygtukas",lv:"Poga “Abonēšana, izmantojot Google”",ml:"Subscribe with Google ബട്ടൺ",mr:"Subscribe with Google बटण",ms:"Butang Langgan dengan Google",nl:"Abonneren via Google-knop",no:"Abonner med Google-knapp",pa:"Subscribe with Google ਬਟਨ",pl:"Przycisk Subskrybuj z Google","pt-br":"Botão do Assine com o Google","pt-pt":"Botão Subscreva com o Google",ro:"Butonul Abonați-vă cu Google",ru:'Кнопка сервиса "Подписка через Google"',sk:"Tlačidlo Predplatného s Googlom",sl:"Gumb za Naročnine z Googlom",sv:"Knapp för Subscribe with Google",ta:"Subscribe with Google பட்டன்",te:"Subscribe with Google బటన్",th:'ปุ่ม "สมัครผ่าน Google"',tr:"Google ile Abone Ol Düğmesi",uk:'Кнопка "Передплата через Google"',ur:"‫Google کے ساتھ سبسکرائب کریں کا بٹن",vi:"Nút Đăng ký bằng Google","zh-cn":"“通过 Google 订阅”按钮","zh-hk":"「透過 Google 訂閱」按鈕","zh-tw":"「透過 Google 訂閱」按鈕"},Xt={ar:'إشعار "اشترِك مع Google"',bg:"Известие за „Абонамент към Google“",bn:"Subscribe with Google-এর বিজ্ঞপ্তি",cs:"Oznámení Předplatného s Googlem",da:"Notifikation om Abonner med Google",de:"„Abonnieren mit Google“-Benachrichtigung",el:"Ειδοποίηση από τη λειτουργία Εγγραφείτε με την Google",en:"Subscribe with Google Notification",es:"Notificación de Suscríbete con Google","es-419":"Notificación de Suscríbete con Google",et:"Märguanne Tellige Google'iga",fil:"Notification ng Mag-subscribe gamit ang Google",fr:"Notification S'abonner avec Google","fr-ca":"Notification S'abonner avec Google",gu:"Subscribe with Google નોટિફિકેશન",hi:"Subscribe with Google की सूचना",hr:"Obavijest o Pretplati putem Googlea",hu:"Előfizetés a Google-lal értesítés",id:"Notifikasi Berlangganan dengan Google",it:"Notifica Abbonati con Google",iw:"התראה לגבי Subscribe with Google",ja:"「Google で購読」の通知",kn:"Subscribe with Google ನೋಟಿಫಿಕೇಶನ್",ko:"Google을 통한 구독 알림",lt:"„Prenumeruoti su „Google“ pranešimas",lv:"Paziņojums par funkciju “Abonēšana, izmantojot Google”",ml:"Subscribe with Google അറിയിപ്പ്",mr:"Subscribe with Google नोटिफिकेशन",ms:"Pemberitahuan Langgan dengan Google",nl:"Melding voor Abonneren via Google",no:"Abonner med Google-varsel",pa:"Subscribe with Google ਸੂਚਨਾ",pl:"Powiadomienie Subskrybuj z Google","pt-br":"Notificação do Assine com o Google","pt-pt":"Notificação da funcionalidade Subscreva com o Google",ro:"Notificarea Abonați-vă cu Google",ru:'Уведомление сервиса "Подписка через Google"',sk:"Upozornenie Predplatného s Googlom",sl:"Obvestilo o Naročninah z Googlom",sv:"Avisering om Subscribe with Google",ta:"Subscribe with Google அறிவிப்ப
1ு",te:"Subscribe with Google నోటిఫికేషన్",th:'การแจ้งเตือน "สมัครผ่าน Google"',tr:"Google ile Abone Ol Bildirimi",uk:'Сповіщення "Передплата через Google"',ur:"‫Google کے ساتھ سبسکرائب کریں کی اطلاع",vi:"Thông báo về dịch vụ Đăng ký bằng Google","zh-cn":"“通过 Google 订阅”通知","zh-hk":"「透過 Google 訂閱」通知","zh-tw":"「透過 Google 訂閱」通知"},$t={ar:"سبق أن اشتركت في النشرة الإخبارية.",bg:"Регистрирали сте се преди.",bn:"আপনি আগেই সাইন-আপ করেছেন।",cs:"Už jste se zaregistrovali dříve.",da:"Du har tilmeldt dig før.",de:"Du hast dich bereits angemeldet.",el:"Έχετε εγγραφεί στο παρελθόν.",en:"You have signed up before.",es:"Ya te has registrado.","es-419":"Ya te registraste antes.",et:"Olete varem juba registreerunud.",fil:"Nag-sign up ka na dati.",fr:"Vous vous êtes déjà inscrit.","fr-ca":"Vous vous êtes inscrit auparavant.",gu:"તમે પહેલેથી જ સાઇન અપ કર્યું છે.",hi:"आपने न्यूज़लेटर के लिए पहले ही साइन अप कर लिया है.",hr:"Već ste se registrirali.",hu:"Ön korábban már regisztrált.",id:"Anda telah mendaftar sebelumnya.",it:"Hai già effettuato l'iscrizione.",iw:"כבר נרשמת.",ja:"すでに登録しています。",kn:"ನೀವು ಮೊದಲು ಸೈನ್ ಅಪ್ ಮಾಡಿದ್ದೀರಿ.",ko:"이전에 가입한 사용자입니다.",lt:"Jau esate prisiregistravę.",lv:"Jūs jau iepriekš reģistrējāties.",ml:"നിങ്ങൾ മുമ്പ് സെെൻ അപ്പ് ചെയ്‌തിട്ടുണ്ട്.",mr:"तुम्ही यापूर्वी साइन अप केले आहे.",ms:"Anda sudah mendaftar sebelum ini.",nl:"Je hebt je al eerder aangemeld.",no:"Du er allerede registrert.",pa:"ਤੁਸੀਂ ਪਹਿਲਾਂ ਹੀ ਸਾਈਨ-ਅੱਪ ਕਰ ਚੁੱਕੇ ਹੈ।",pl:"Już wcześniej się zarejestrowałeś(-aś).","pt-br":"Você já se inscreveu.","pt-pt":"Já se inscreveu anteriormente.",ro:"V-ați mai înscris în trecut.",ru:"Вы уже зарегистрированы.",sk:"Už ste sa zaregistrovali.",sl:"Ste se že registrirali.",sv:"Du har redan registrerat dig.",ta:"ஏற்கெனவே பதிவு செய்துள்ளீர்கள்.",te:"మీరు ఇంతకు ముందే సైన్ అప్ చేశారు.",th:"คุณสมัครรับมาก่อนแล้ว",tr:"Daha önce kaydolmuştunuz.",uk:"Ви вже зареєструвалися.",ur:"آپ پہلے سائن اپ کر چکے ہیں۔",vi:"Bạn đã đăng ký trước đó.","zh-cn":"您之前已订阅。","zh-hk":"你之前已註冊。","zh-tw":"你先前已訂閱。"};class Qt{constructor(){}resized(){}}async function Zt(t,s,i,e){const n=await t.acceptResult();if(n.origin!=s||i&&!n.originVerified||e&&!n.secureChannel)throw new Error("channel mismatch");return n.data}function ts(t,s,i,e){const n=t.createElement(s);return function(t,s={}){for(const[i,e]of Object.entries(s))t.setAttribute(i,e)}(n,i),e&&(n.textContent=e),n}function ss(t,s){var i;const e=ts(t.getWin().document,"style",{type:"text/css"});return e.textContent=s,null==(i=t.getHead())||i.appendChild(e),e}function is(t){let s=t;do{if(s.nextSibling)return!0}while(s=s.parentNode);return!1}function es(t){return"AbortError"===(null==t?void 0:t.name)}function ns(t){const s=new Error("AbortError: "+t);return s.name="AbortError",s}class rs{static throwAsync(t){setTimeout(()=>{throw t})}}function os(t,s){const i=t.en;if(!s)return i;let e="string"==typeof s?s:(n=s).lang?n.lang:(null==(o=null==(r=null==n?void 0:n.ownerDocument)?void 0:r.documentElement)?void 0:o.lang)?n.ownerDocument.documentElement.lang:"en";var n,r,o;e=e.toLowerCase(),e=e.replace(/_/g,"-");const h=e.split("-");for(;h.length;){const s=h.join("-");if(s in t)return t[s];h.pop()}return i}const hs={"align-content":"normal",animation:"none","align-items":"normal","align-self":"auto","alignment-baseline":"auto","backface-visibility":"hidden","background-clip":"border-box","background-image":"none","baseline-shift":"0","block-size":"auto",border:"none","border-collapse":"separate",bottom:"0","box-sizing":"border-box","break-after":"auto","break-before":"auto","break-inside":"auto","buffered-rendering":"auto","caption-side":"top","caret-color":"rgb(51, 51, 51)",clear:"none",color:"rgb(51, 51, 51)","color-rendering":"auto","column-count":"auto","column-fill":"balance","column-gap":"normal","column-rule-color":"rgb(51, 51, 51)","column-rule-style":"none","column-rule-width":"0","column-span":"none","column-width":"auto",contain:"none","counter-increment":"none","counter-reset":"none",cursor:"auto",direction:"inherit",display:"block","empty-cells":"show",filter:"none",flex:"none","flex-flow":"row nowrap",float:"none","flood-color":"rgb(0, 0, 0)","flood-opacity":"1",font:"none","font-size":"medium","font-family":"",height:"auto",hyphens:"manual","image-rendering":"auto","inline-size":"",isolation:"auto","justify-content":"normal","justify-items":"normal","justify-self":"auto","letter-spacing":"normal","lighting-color":"rgb(255, 255, 255)","line-break":"auto","line-height":"normal","margin-bottom":"0",mask:"none","max-block-size":"none","max-height":"none","max-inline-size":"none","max-width":"none","min-block-size":"none","min-height":"0","min-inline-size":"0","min-width":"0","mix-blend-mode":"normal","object-fit":"fill","offset-distance":"none","offset-path":"none","offset-rotate":"auto 0deg",opacity:"1",order:"0",orphans:"2",outline:"none","overflow-anchor":"auto","overflow-wrap":"normal",overflow:"visible",padding:"0",page:"",perspective:"none","pointer-events":"auto",position:"static",quotes:"",resize:"none",right:"0","scroll-behavior":"auto","tab-size":"8","table-layout":"auto","text-align":"start","text-align-last":"auto","text-anchor":"start","text-combine-upright":"none","text-decoration":"none","text-indent":"0","text-orientation":"mixed","text-overflow":"clip","text-rendering":"auto","text-shadow":"none","text-size-adjust":"auto","text-transform":"none","text-underline-position":"auto",top:"auto","touch-action":"auto",transform:"none",transition:"none 0s ease 0s","unicode
1-bidi":"normal","user-select":"auto","vector-effect":"none","vertical-align":"baseline",visibility:"visible","white-space":"normal",widows:"2","word-break":"normal","word-spacing":"0","word-wrap":"normal","writing-mode":"horizontal-tb",zoom:"1","z-index":"auto"};function as(t,s){for(const[i,e]of Object.entries(s))t.style.setProperty(i,e.toString(),"important")}function ls(t,s,i){t.style.setProperty(s,i)}class us extends Qt{constructor(t,s,i,e,n,r=!1,o=!1,h=!0){super(),this.vs=t,this.Ps=s,this.Ls=i,this.Gs=e,this.titleLang=n,this.Ms=r,this.ks=o,this.Ds=h,this.Us=null,this.xs=[],this.Fs=this.vs.document;const a={frameborder:"0",scrolling:"no",title:os(Ht,n)};this.Bs=ts(this.Fs,"iframe",a),this.Vs=new Promise(t=>{this.Ws=t})}getElement(){return this.Bs}async init(t){const s=await this.Ps.openIframe(this.Bs,this.Ls,this.Gs);return this.zs(s,t)}shouldFadeBody(){return this.Ms}hasLoadingIndicator(){return this.ks}zs(t,s){return this.Us=t,this.Ws(t),s?this.Us.onResizeRequest(t=>{s.resizeView(this,t)}):t.onResizeRequest(t=>{as(this.Bs,{height:"".concat(t,"px")})}),this.Us.whenReady()}js(){return this.Vs}async on(t,s){(await this.js()).on(t,s)}async execute(t){(await this.js()).execute(t)}async acceptResult(){return(await this.js()).acceptResult()}async acceptResultAndVerify(t,s,i){return Zt(await this.js(),t,s,i)}async whenComplete(){await this.acceptResult()}async onCancel(t){try{await this.acceptResult()}catch(s){throw es(s)&&t(),s}}resized(){this.Us&&this.Us.resized(),this.xs.forEach(t=>t())}onResize(t){this.xs.push(t)}shouldAnimateFade(){return this.Ds}}var cs=(t=>(t.NONE="none",t.CONTRIBUTION="contribution",t.CONTRIBUTION_LARGE="contribution_large",t.SUBSCRIPTION="subscription",t.SUBSCRIPTION_LARGE="subscription_large",t))(cs||{}),ds=(t=>(t.OPEN="OPEN",t.CLOSED="CLOSED",t))(ds||{});class gs{constructor(t,s,i){var e,n;this.deps=t,this.activityIframeView=s,this.configurationId=i,this.overlays=new Map,this.positions=new Map,this.rafId=null,this.resizeHandler=this.scheduleUpdate.bind(this),this.doc=t.doc(),this.eventManager=t.eventManager(),this.activityIframeView.on(v,this.handleLoginButtonCoordinates.bind(this)),this.doc.getWin().addEventListener("resize",this.resizeHandler),this.activityIframeView.onResize(this.resizeHandler),null==(n=null==(e=this.deps.gisInteropManager())?void 0:e.setCompleteLoginCallback)||n.call(e,this.completeLogin.bind(this))}dispose(){var t,s;for(const i of this.overlays.values())i.remove();this.overlays.clear(),this.rafId&&this.doc.getWin().cancelAnimationFrame(this.rafId),this.doc.getWin().removeEventListener("resize",this.resizeHandler),null==(s=null==(t=this.deps.gisInteropManager())?void 0:t.setCompleteLoginCallback)||s.call(t,null)}updateOverlays(){this.positions.forEach((t,s)=>{const i=this.activityIframeView.getElement().getBoundingClientRect(),e=i.height,n=i.width,r=this.doc.getWin().innerWidth,o=this.doc.getWin().innerHeight,h=(r-n)/2+t.left,a=o-(e-t.top);as(this.overlays.get(s),{left:"".concat(h,"px"),top:"".concat(a,"px"),width:"".concat(t.width,"px"),height:"".concat(t.height,"px"),"pointer-events":t.disabled?"none":"auto"})})}scheduleUpdate(){this.rafId&&(this.doc.getWin().cancelAnimationFrame(this.rafId),this.rafId=null),this.rafId=this.doc.getWin().requestAnimationFrame(()=>{this.rafId=null,this.updateOverlays()})}handleLoginButtonCoordinates(t){var s;null==(s=t.getLoginButtonCoordinatesList())||s.forEach(t=>{const s=this.validatedPosition(t);s&&(this.positions.has(s.id)||this.createOverlay(s.id),this.positions.set(s.id,s))}),this.scheduleUpdate()}validatedPosition(t){const s=t.getId(),i=t.getLeft(),e=t.getTop(),n=t.getWidth(),r=t.getHeight(),o=!!t.getDisabled();return null===s||null===i||null===e||null===n||null===r?null:{id:s,left:i,top:e,width:n,height:r,disabled:o}}createOverlay(t){var s;const i=ts(this.doc.getRootNode(),"div",{});return as(i,{position:"absolute",opacity:"0.001","background-color":"transparent","z-index":"2147483647","pointer-events":"auto",cursor:"pointer"}),this.renderButton(i),this.overlays.set(t,i),null==(s=this.doc.getBody())||s.appendChild(i),i}renderButton(t){var s,i,e;null==(e=null==(i=null==(s=this.doc.getWin().google)?void 0:s.accounts)?void 0:i.id)||e.renderButton(t,{type:"standard",theme:"outline",text:"continue_with",logo_alignment:"left",width:190,click_listener:this.overlayClick.bind(this)})}overlayClick(){var t,s;const i=new A;i.setGisMode(c.GIS_MODE_OVERLAY),this.eventManager.logSwgEvent(o.ACTION_REGWALL_OPT_IN_BUTTON_CLICK,!0,i,void 0,this.configurationId),null==(s=null==(t=this.deps.gisInteropM
1anager())?void 0:t.setRegwallClickPending)||s.call(t,!0)}async completeLogin(t){try{const s=new O;return s.setSwgUserToken(t),await this.activityIframeView.execute(s),!0}catch{return this.eventManager.logSwgEvent(o.EVENT_GIS_LOGIN_ERROR,!1,null,void 0,this.configurationId),!1}}}const ps=/^(\)\]\}'\n)/;class Es{constructor(t){this.vs=t}async fetchCredentialedJson(t){const s=await this.fetch(t,{method:"GET",headers:{Accept:"text/plain, application/json"},credentials:"include"}),i=(await s.text()).replace(ps,"");return JSON.parse(i)}async sendPost(t,s){const i={method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},credentials:"include",body:"f.req="+ft(s)},e=await this.fetch(t,i);if(!e)return{};const n=await e.text();try{const t=n.replace(ps,"");return JSON.parse(t)}catch(r){return rs.throwAsync(r),{}}}async fetch(t,s){try{return await this.vs.fetch(t,s)}catch(i){const s=Et(t).origin;throw new Error("XHR Failed fetching (".concat(s,"/...): (Note: a CORS error above may indicate that this publisher or domain is not configured in Publisher Center. The CORS error happens because 4xx responses do not set CORS headers.)\n\n")+i)}}sendBeacon(t,s){const i=new Blob(["f.req="+ft(s)],{type:"application/x-www-form-urlencoded;charset=UTF-8"});navigator.sendBeacon(t,i)}}var _s=(t=>(t.GisModeDisabled="GIS_MODE_DISABLED",t.GisModeOverlay="GIS_MODE_OVERLAY",t))(_s||{});async function ms(t,s,i){const e=t.gisInteropManager(),n=null==e?void 0:e.isRegwallClickPending(),r=t.dialogManager().getDialog(),o=null==r?void 0:r.getLoadingView(),h=null==r?void 0:r.getContainer();n&&o&&h&&(o.show(),as(h,{display:"none"}));let a=!1;try{const r=await async function(t,s){const i=new Es(t.win()),e=t.pageConfig().getPublicationId(),n=await t.storage().get($,!0),r=Et(t.win().location.href).origin;let o=yt("/publication/".concat(encodeURIComponent(e),"/mixrrmgistokens"));n&&(o=mt(o,"sut",n)),o=mt(o,"id_token",s.idToken),o=mt(o,"gis_client_id",s.gisClientId),o=mt(o,"rrm_origin",r),s.gisOrigin&&(o=mt(o,"gis_origin",s.gisOrigin));const h=await i.sendPost(o,{toArray:()=>[],label:()=>"MixRrmGisTokens"});return(null==h?void 0:h.swgUserToken)&&await t.entitlementsManager().updateEntitlements(h.swgUserToken),h}(t,{idToken:s.credential,gisClientId:i.gisClientId}),o=null==r?void 0:r.swgUserToken;return n&&(e.setRegwallClickPending(!1),o)&&await e.triggerCompleteLogin(o)?(a=!0,{fromRrm:!0}):{fromRrm:!1}}finally{!a&&n&&o&&h&&(o.hide(),as(h,{display:"block"}))}}var fs=(t=>(t.EVENT_SHOWCASE_METER_OFFERED="EVENT_SHOWCASE_METER_OFFERED",t.EVENT_SHOWCASE_UNLOCKED_BY_SUBSCRIPTION="EVENT_SHOWCASE_UNLOCKED_BY_SUBSCRIPTION",t.EVENT_SHOWCASE_UNLOCKED_BY_METER="EVENT_SHOWCASE_UNLOCKED_BY_METER",t.EVENT_SHOWCASE_UNLOCKED_FREE_PAGE="EVENT_SHOWCASE_UNLOCKED_FREE_PAGE",t.EVENT_SHOWCASE_NO_ENTITLEMENTS_REGWALL="EVENT_SHOWCASE_NO_ENTITLEMENTS_REGWALL",t.EVENT_SHOWCASE_INELIGIBLE_PAYWALL="EVENT_SHOWCASE_INELIGIBLE_PAYWALL",t.EVENT_SHOWCASE_NO_ENTITLEMENTS_PAYWALL="EVENT_SHOWCASE_NO_ENTITLEMENTS_PAYWALL",t))(fs||{}),ws=(t=>(t.SHOW_OFFERS="showOffers",t.SHOW_SUBSCRIBE_OPTION="showSubscribeOption",t.SHOW_ABBRV_OFFER="showAbbrvOffer",t.SHOW_CONTRIBUTION_OPTIONS="showContributionOptions",t.SUBSCRIBE="subscribe",t.CONTRIBUTE="contribute",t.COMPLETE_DEFERRED_ACCOUNT_CREATION="completeDeferredAccountCreation",t.LINK_ACCOUNT="linkAccount",t.SHOW_LOGIN_PROMPT="showLoginPrompt",t.SHOW_LOGIN_NOTIFICATION="showLoginNotification",t.SHOW_METER_TOAST="showMeterToast",t.TIME_BOUND_PASS="timeBoundPass",t))(ws||{}),Is=(t=>(t[t.DEFAULT=0]="DEFAULT",t[t.IMPRESSIONS=1]="IMPRESSIONS",t))(Is||{}),bs=(t=>(t.AUTO="auto",t.REDIRECT="redirect",t))(bs||{}),Ts=(t=>(t.SUBSCRIPTION="SUBSCRIPTION",t.UI_CONTRIBUTION="UI_CONTRIBUTION",t.TIME_BOUND_PASS="TIME_BOUND_PASS",t))(Ts||{}),Rs=(t=>(t.LIGHT="light",t.DARK="dark",t))(Rs||{}),Ss=(t=>(t.PREFERENCE_UNSPECIFIED="PREFERENCE_UNSPECIFIED",t.PREFERENCE_GOOGLE_PROVIDED_PROMPT="PREFERENCE_GOOGLE_PROVIDED_PROMPT",t.PREFERENCE_PUBLISHER_PROVIDED_PROMPT="PREFERENCE_PUBLISHER_PROVIDED_PROMPT",t.PREFERENCE_ADSENSE_REWARDED_AD="PREFERENCE_ADSENSE_REWARDED_AD",t))(Ss||{});async function As(t,s,i,e){const n=t.ownerDocument.defaultView,r=t.style.transition||"";await new Promise(r=>{n.setTimeout(()=>{n.setTimeout(r,i);const o="".concat(i,"ms ").concat(e);as(t,Object.assign({transition:"transform ".concat(o,", opacity ").concat(o)},s))})}),as(t,{transition:r})}const Cs={height:"0"};class Os{constructor(t,s,i={},e="swg-toast"){this.Ls=s,this.Gs=i,this.Ys=e,this.Ks=null,this.qs=!1,this.Fs=t.doc(),this.Ps=t.activities();const n=t.clientConfigManager().getLanguage(),r=os(Xt,n),o={frameborder:"0",scrolling:"no",class:this.Ys,title:r};this.Bs=ts(this.Fs.getWin().document,"iframe",o),as(this.Bs,Cs)}Hs(){var t;return Boolean(null==(t=this.Ys)?void 0:t.split(" ").includes("publisher-toast"))}Js(){return this.Hs()&&this.Fs.getWin().matchMedia("(min-width: 641px) and (min-height: 641px)").matches}Xs(){return this.qs?"translateX(calc(100% + 30px))":"translateY(100%)"}$s(){return this.qs?"translateX(0)":"translateY(0)"}getElement(){return this.Bs}open(){var t;return null==(t=this.Fs.getBody())||t.appendChild(this.Bs),this.Qs()}async Qs(){const t=await this.Ps.openIframe(this.Bs,this.Ls,this.Gs);let s=!1;t.onResizeRequest(i=>{s=!0,as(this.Bs,{height:"".concat(i,"px")}),t.resized()}),await t.whenReady(),s||function(t){for(const s of.height)ls(t,s,"")}(this.Bs),this.qs=this.Js(),this.Ks=this.Zs({callback:()=>(as(this.Bs,{transform:this.Xs(),opacity:"1",visibility:"visible"}),As(this.Bs,{transform:this.$s(),opacity:"1",visibility:"visible"},400,"ease-out"))}),this.Fs.getWin().setTimeout(()=>{this.close()},8e3)}async Zs({callback:t}){await this.Ks;try{await t()}catch{}}close(){return this.Ks=this.Zs({callback:()=>(this.Fs.getWin().setTimeout(()=>{var t;null==(t=this.Fs.getBody())||t.removeChild(this.Bs)},500),As(this.Bs,{transform:this.Xs(),opacity:"1",visibility:"visible"},400,"ease-out"))}),this.Ks}}var Ns=(t=>(t.UNKNOWN="unknown",t.NON_SUBSCRIBER="non_subscriber",t.SUBSCRIBER="subscriber",t.PAST_SUBSCRIBER="past_subscriber",t))(Ns||{}),ys=(t=>(t.IMPRESSION_PAYWALL="paywall",t.IMPRESSION_AD="ad_shown",t.IMPRESSION_OFFERS="offers_shown",t.ACTION_SUBSCRIPTIONS_LANDING_PAGE="subscriptions_landing_page",t.ACTION_OFFER_SELECTED="offer_selected",t.ACTION_PAYMENT_FLOW_STARTED="payment_flow_start",t.ACTION_PAYMENT_COMPLETED="payment_complete",t.EVENT_CUSTOM="custom",t))(ys||{});const vs={[ys.IMPRESSION_PAYWALL]:o.IMPRESSION_PAYWALL,[ys.IMPRESSION_AD]:o.IMPRESSION_AD,[ys.IMPRESSION_OFFERS]:o.IMPRESSION_OFFERS,[ys.ACTION_SUBSCRIPTIONS_LANDING_PAGE]:o.ACTION_SUBSCRIPTIONS_LANDING_PAGE,[ys.ACTION_OFFER_SELECTED]:o.ACTION_OFFER_SELECTED,[ys.ACTION_PAYMENT_FLOW_STARTED]:o.ACTION_PAYMENT_FLOW_STARTED,[ys.ACTION_PAYMENT_COMPLETED]:o.ACTION_PAYMENT_COMPLETE,[ys.EVENT_CUSTOM]:o.EVENT_CUSTOM},Ps={[o.UNKNOWN]:null,[o.IMPRESSION_PAYWALL]:ys.IMPRESSION_PAYWALL,[o.IMPRESSION_AD]:ys.IMPRESSION_AD,[o.IMPRESSION_OFFERS]:ys.IMPRESSION_OFFERS,[o.IMPRESSION_SUBSCRIBE_BUTTON]:null,[o.IMPRESSION_SMARTBOX]:null,[o.ACTION_SUBSCRIBE]:null,[o.ACTION_PAYMENT_COMPLETE]:ys.ACTION_PAYMENT_COMPLETED,[o.ACTION_ACCOUNT_CREATED]:null,[o.ACTION_ACCOUNT_ACKNOWLEDGED]:null,[o.ACTION_SUBSCRIPTIONS_LANDING_PAGE]:ys.ACTION_SUBSCRIPTIONS_LANDING_PAGE,[o.ACTION_PAYMENT_FLOW_STARTED]:ys.ACTION_PAYMENT_FLOW_STARTED,[o.ACTION_OFFER_SELECTED]:ys.ACTION_OFFER_SELECTED,[o.EVENT_PAYMENT_FAILED]:null,[o.EVENT_CUSTOM]:ys.EVENT_CUSTOM},Ls={[fs.EVENT_SHOWCASE_METER_OFFERED]:[o.EVENT_HAS_METERING_ENTITLEMENTS,o.EVENT_OFFERED_MET
1ER],[fs.EVENT_SHOWCASE_UNLOCKED_BY_SUBSCRIPTION]:[o.EVENT_UNLOCKED_BY_SUBSCRIPTION],[fs.EVENT_SHOWCASE_UNLOCKED_BY_METER]:[o.EVENT_HAS_METERING_ENTITLEMENTS,o.EVENT_UNLOCKED_BY_METER],[fs.EVENT_SHOWCASE_UNLOCKED_FREE_PAGE]:[o.EVENT_UNLOCKED_FREE_PAGE],[fs.EVENT_SHOWCASE_NO_ENTITLEMENTS_REGWALL]:[o.EVENT_NO_ENTITLEMENTS,o.IMPRESSION_REGWALL,o.IMPRESSION_SHOWCASE_REGWALL],[fs.EVENT_SHOWCASE_NO_ENTITLEMENTS_PAYWALL]:[o.EVENT_NO_ENTITLEMENTS,o.IMPRESSION_PAYWALL],[fs.EVENT_SHOWCASE_INELIGIBLE_PAYWALL]:[o.EVENT_INELIGIBLE_PAYWALL,o.EVENT_NO_ENTITLEMENTS]},Gs={[o.IMPRESSION_REGWALL]:a.LOCKED_REGWALL,[o.EVENT_UNLOCKED_BY_METER]:a.UNLOCKED_METER,[o.EVENT_UNLOCKED_BY_SUBSCRIPTION]:a.UNLOCKED_SUBSCRIBER,[o.EVENT_UNLOCKED_FREE_PAGE]:a.UNLOCKED_FREE,[o.IMPRESSION_PAYWALL]:a.LOCKED_PAYWALL,[o.EVENT_INELIGIBLE_PAYWALL]:a.INELIGIBLE_PAYWALL};function Ms(t,s,i,e){return{eventCategory:t,eventAction:s,eventLabel:i,nonInteraction:e}}const ks={[o.IMPRESSION_OFFERS]:Ms("NTG paywall","paywall modal impression","",!0),[o.IMPRESSION_CONTRIBUTION_OFFERS]:Ms("NTG membership","offer impressions","",!0),[o.ACTION_OFFER_SELECTED]:Ms("NTG paywall","click","",!1),[o.ACTION_SWG_SUBSCRIPTION_MINI_PROMPT_CLICK]:Ms("NTG subscription","marketing modal click","",!1),[o.IMPRESSION_SWG_SUBSCRIPTION_MINI_PROMPT]:Ms("NTG subscription","marketing modal impression","",!0),[o.ACTION_SWG_CONTRIBUTION_MINI_PROMPT_CLICK]:Ms("NTG membership","marketing modal click","",!1),[o.IMPRESSION_SWG_CONTRIBUTION_MINI_PROMPT]:Ms("NTG membership","membership modal impression","",!0),[o.IMPRESSION_NEWSLETTER_OPT_IN]:Ms("NTG newsletter","newsletter modal impression","",!0),[o.EVENT_NEWSLETTER_OPTED_IN]:Ms("NTG newsletter","newsletter signup","success",!1),[o.IMPRESSION_BYOP_NEWSLETTER_OPT_IN]:Ms("NTG newsletter","newsletter modal impression","",!0),[o.ACTION_BYOP_NEWSLETTER_OPT_IN_SUBMIT]:Ms("NTG newsletter","newsletter signup","success",!1),[o.IMPRESSION_REGWALL_OPT_IN]:Ms("NTG account","registration modal impression","",!0),[o.EVENT_REGWALL_OPTED_IN]:Ms("NTG account","registration","success",!1),[o.ACTION_SURVEY_DATA_TRANSFER]:Ms("","survey submission","",!1),[o.IMPRESSION_BYO_CTA]:Ms("","custom cta modal impression","",!0),[o.ACTION_BYO_CTA_BUTTON_CLICK]:Ms("","custom cta click","",!1)},Ds={[o.ACTION_PAYMENT_COMPLETE]:Ms("NTG subscription","submit","success",!1)},Us={[o.ACTION_PAYMENT_COMPLETE]:Ms("NTG membership","submit","success",!1)};function xs(t){return vs[t]}function Fs(t){return"[object Object]"===Object.prototype.toString.call(t)}function Bs(t,s){return Object.values(t).includes(s)}function Vs(t){return"function"==typeof t}function Ws(t){return"boolean"==typeof t}const zs={0:"unknown",1:"pop up",2:"inline"};class js{constructor(t){this.Ss=t,this.Cs=t.eventManager()}start(){this.Cs.registerEventListener(this.Ns.bind(this))}Ns(t,s){var i,e,n,r,o,h;const a=js.isGaEligible(this.Ss),l=js.isGtagEligible(this.Ss),u=js.isGtmEligible(this.Ss);if(!(a||l||u))return;const{ga:c,gtag:d,dataLayer:g}=this.Ss.win(),p=(null==(i=t.additionalParameters)?void 0:i.subscriptionFlow)||(null==(n=null==(e=t.additionalParameters)?void 0:e.getSubscriptionFlow)?void 0:n.call(e))||"";let E=function(t,s){if(!t)return;let i;
1return s===ws.SUBSCRIBE?i=Ds[t]:s===ws.CONTRIBUTE&&(i=Us[t]),i||ks[t]}(t.eventType,p);if(!E)return;const _=(null==s?void 0:s.googleAnalyticsParameters)||{},m=(null==(o=null==(r=t.additionalParameters)?void 0:r.getCtaMode)?void 0:o.call(r))||(null==(h=t.additionalParameters)?void 0:h.ctaMode)||null;if(null!=m&&(_.cta_mode=zs[m]),E={...E,eventCategory:_.event_category||E.eventCategory,eventLabel:_.event_label||E.eventLabel},a&&c("send","event",E),l){const t={event_category:E.eventCategory,event_label:E.eventLabel,non_interaction:E.nonInteraction,..._};d("event",E.eventAction,t)}u&&g.push({event:E.eventAction,event_category:E.eventCategory,event_label:E.eventLabel,non_interaction:E.nonInteraction,configurationId:t.configurationId||"",..._})}static isGaEligible(t){return Vs(t.win().ga)}static isGtagEligible(t){return Vs(t.win().gtag)}static isGtmEligible(t){var s;return Vs(null==(s=t.win().dataLayer)?void 0:s.push)}}async function Ys(t,s,i,e,n,r){const h=await async function(t,s,i,e,n){const r=function(t,s,i){var e;return!!(js.isGaEligible(s)||js.isGtagEligible(s)||js.isGtmEligible(s))&&(null==(e=t.getSurveyQuestionsList())||e.map(t=>{var e;const n={eventType:o.ACTION_SURVEY_DATA_TRANSFER,eventOriginator:u.SWG_CLIENT,isFromUserAction:!0,additionalParameters:{ctaMode:i}};null==(e=t.getSurveyAnswersList())||e.map(i=>{const e={googleAnalyticsParameters:{survey_question:t.getQuestionText()||"",survey_question_category:t.getQuestionCategory()||"",survey_answer:i.getAnswerText()||"",survey_answer_category:i.getAnswerCategory()||"",content_id:t.getQuestionCategory()||"",content_group:t.getQuestionText()||"",content_type:i.getAnswerText()||"",event_category:t.getQuestionCategory()||"",event_label:i.getAnswerText()||""}};s.eventManager().logEvent(n,e)})}),!0)}(t,i,e),h=await async function(t,s,i){if(!i)return!1;try{const e={...Ks(t),...qs(t)};return await i({configurationId:s,data:e})}catch(e){return ut("[swg.js] Exception in publisher provided logging callback: ".concat(e)),!1}}(t,s,n);return h||r}(t,e,s,n,r);h?s.eventManager().logSwgEvent(o.EVENT_SURVEY_DATA_TRANSFER_COMPLETE,!0,Hs(n)):s.eventManager().logSwgEvent(o.EVENT_SURVEY_DATA_TRANSFER_FAILED,!1,Hs(n));const a=new W;t.getStorePpsInLocalStorage()&&await async function(t,s){var i,e;const n=rt.PPS_TAXONOMIES,r=t.getSurveyQuestionsList().flatMap(t=>t.getSurveyAnswersList()).map(t=>null==t?void 0:t.getPpsValue()).filter(t=>null!==t),o=await s.storage().get(n,!0);let h=[];try{const t=null==(e=null==(i=JSON.parse(o))?void 0:i[1])?void 0:e.values;h=Array.isArray(t)?t:[]}catch{}const a=Array.from(new Set(r.concat(h))),l={[X]:{values:a}};await Promise.resolve(s.storage().set(n,JSON.stringify(l),!0))}(t,s),a.setSuccess(h),i.execute(a)}function Ks(t){var s;return{he:t.getStorePpsInLocalStorage(),ae:(null==(s=t.getSurveyQuestionsList())?void 0:s.map(t=>{var s;return{le:t.getQuestionId(),ue:t.getQuestionText(),ce:t.getQuestionCategory(),ge:(null==(s=t.getSurveyAnswersList())?void 0:s.map(t=>({ie:t.getAnswerId(),ne:t.getAnswerText(),re:t.getAnswerCategory(),oe:t.getPpsValue()})))||[]}}))||[]}}function qs(t){var s;return{answers:(null==(s=t.getSurveyQuestionsList())?void 0:s.map(t=>{var s;return{questionText:t.getQuestionText(),questionCategory:t.getQuestionCategory(),surveyAnswers:(null==(s=t.getSurveyAnswersList())?void 0:s.map(t=>({answerText:t.getAnswerText(),answerCategory:t.getAnswerCategory()})))||[]}}))||[]}}function Hs(t){const s=new A;return s.setCtaMode(t),s}function Js(t){const s=new Uint8Array(t.length);for(let i=0;i<t.length;i++){const e=t.charCodeAt(i);ct(e<=255,"Characters must be in range [0,255]"),s[i]=e}return s}function Xs(t){const s=new Array(t.length);for(let i=0;i<t.length;i++)s[i]=String.fromCharCode(t[i]);return s.join("")}function $s(t){if("undefined"!=typeof TextDecoder)return new TextDecoder("utf-8").decode(t);const s=Xs(new Uint8Array(t));return decodeURIComponent(escape(s))}function Qs(t){return"undefined"!=typeof TextEncoder?(new TextEncoder).encode(t):Js(unescape(encodeURIComponent(t)))}function Zs(t){return Js(atob(t.replaceAll("-","+").replaceAll("_","/")))}function ti(t){const s=Xs(t);return btoa(s).replaceAll("+","-").replaceAll("/","_").replaceAll("=","")}function si(t,s){try{return JSON.parse(t)}catch(i){return void(s&&s(i))}}function ii(t,s){const i=si(t);return null==i?void 0:i[s]}class ei{constructor(){}decode(t){return this.ti(t).payload}ti(t){function s(){throw new Error('Invalid token: "'.concat(t,'"'))}const i=t.split(".");3!=i.length&&s();const e=Zs(i[0]),n=Zs(i[1]);return{header:si($s(e),s),payload:si($s(n),s),verifiable:"".concat(i[0],".").concat(i[1]),sig:i[2]}}}class ni{constructor(t,s,i,e,n,r,o=null,h=null,a=null,l=null){this.raw=t,this.purchaseData=s,this.userData=i,this.entitlements=e,this.productType=n,this.si=r,this.oldSku=o,this.swgUserToken=h,this.paymentRecurrence=a,this.requestMetadata=l}clone(){return new ni(this.raw,this.purchaseData,this.userData,this.entitlements,this.productType,this.si,this.oldSku,this.swgUserToken)}json(){return{purchaseData:this.purchaseData.json(),userData:this.userData?this.userData.json():null,entitlements:this.entitlements?this.entitlements.json():null,oldSku:this.oldSku,productType:this.productType,swgUserToken:this.swgUserToken}}complete(){return this.si()}}class ri{constructor(t,s){this.raw=t,this.signature=s,this.data=t}clone(){return new ri(this.raw,this.signature)}json(){return{data:this.raw,signature:this.signature}}}class oi{constructor(t,s){this.idToken=t,this.data=s,this.id=s.sub,this.email=s.email,this.emailVerified=s.email_verified,this.name=s.name,this.givenName=s.given_name,this.familyName=s.family_name,this.pictureUrl=s.picture}clone(){return new oi(this.idToken,this.data)}json(){return{id:this.id,email:this.email,emailVerified:this.emailVerified,name:this.name,givenName:this.givenName,fam
1ilyName:this.familyName,pictureUrl:this.pictureUrl}}}const hi={IMMEDIATE_WITH_TIME_PRORATION:1};function ai(t,s,i=null){const e=new A;return e.setSku(t),null!=i&&e.setSubscriptionFlow(i),e.setCtaMode(s?h.CTA_MODE_INLINE:h.CTA_MODE_POPUP),e}class li{constructor(t,s,i=Ts.SUBSCRIPTION,e=!1,n=""){this.Ss=t,this.ii=s,this.ei=i,this.ni=e,this.ri=n,this.oi=t.payClient(),this.ai=t.pageConfig(),this.li=t.analytics(),this.Cs=t.eventManager(),this.ui=t.clientConfigManager()}async start(){const t=await this.ui.getClientConfig();ci.isInlineCta=this.ni,ci.inlineConfigId=this.ri,this.ci(t.useUpdatedOfferFlows,t.paySwgVersion)}ci(t,s){const i={skuId:this.ii.skuId,publicationId:this.ai.getPublicationId()};if(s&&(i.swgVersion=s),this.ii.oldSku){i.oldSku=this.ii.oldSku;const t=this.ii.replaceSkuProrationMode;i.replaceSkuProrationMode=t?hi[t]:hi.IMMEDIATE_WITH_TIME_PRORATION,this.li.setSku(i.oldSku)}this.ii.oneTime&&(i.paymentRecurrence=2),this.ii.metadata&&(i.metadata=this.ii.metadata);let e=ws.SUBSCRIBE;this.ei==Ts.UI_CONTRIBUTION?e=ws.CONTRIBUTE:this.ei==Ts.TIME_BOUND_PASS&&(e=ws.TIME_BOUND_PASS),this.Ss.callbacks().triggerFlowStarted(e,this.ii),this.Cs.logSwgEvent(o.ACTION_PAYMENT_FLOW_STARTED,!0,ai(i.skuId,this.ni)),this.Cs.logSwgEvent(t?o.ACTION_PAY_PAYMENT_FLOW_STARTED:o.ACTION_PLAY_PAYMENT_FLOW_STARTED,!0,ai("",this.ni)),ci.waitingForPayClient=!0,this.oi.start({apiVersion:1,allowedPaymentMethods:["CARD"],environment:Ot().payEnv,playEnvironment:Ot().playEnv,swg:i,i:{startTimeMs:Date.now(),productType:this.ei}},{forceRedirect:this.Ss.config().windowOpenMode==bs.REDIRECT,forceDisableNative:"2"==s})}}const ui=class t{constructor(t){this.Ss=t,this.di=null,this.gi=null,this.T=null,this.vs=t.win(),this.Ps=t.activities(),this.pi=t.dialogManager(),this.Cs=t.eventManager(),this.ui=t.clientConfigManager()}static configurePending(s){const i=s.eventManager();s.payClient().onResponse(async e=>{s.entitlementsManager().blockNextNotification();const n=new t(s),r=async function(t,s,i){const e=!ci.waitingForPayClient;ci.waitingForPayClient=!1;const n=await s;let r,h=o.UNKNOWN;if("object"==typeof n&&n.googleTransactionId){const s=t.analytics().getTransactionId(),i=n.googleTransactionId;e?(t.analytics().setTransactionId(i),h=o.EVENT_GPAY_CANNOT_CONFIRM_TX_ID):s===i?h=o.EVENT_CONFIRM_TX_ID:(r=new A,r.setGpayTransactionId(i),h=o.EVENT_CHANGED_TX_ID)}else r=new A,r.setHadLogged(!e),h=o.EVENT_GPAY_NO_TX_ID;return t.eventManager().logSwgEvent(h,!0,r),function(t,s,i){var e;let n=null,r=null,o=Ts.SUBSCRIPTION,h=null,a=null,l=null;if(s)if("string"==typeof s)r=s;else{const t=s;if(t.swgCallbackData?n=t.swgCallbackData:t.integratorClientCallbackData&&(r=t.integratorClientCallbackData),s.paymentRequest){const t=s.paymentRequest.swg||{};h=t.oldSku,a=t.paymentRecurrence,l=t.metadata,o=(null==(e=s.paymentRequest.i)?void 0:e.productType)||Ts.SUBSCRIPTION}else s.productType&&(o=s.productType)}if(r&&!n&&(r=atob(r),r)&&(n=JSON.parse(r).swgCallbackData),!n)throw new Error("unexpected payment response");return r=JSON.stringify(n),new ni(r,function(t){const s=t.purchaseData,i=t.purchaseDataSignature;return new ri(s,i)}(n),function(t){const s=t.idToken;if(!s)return null;const i=(new ei).decode(s);return new oi(s,i)}(n),function(t,s){return s.signedEntitlements?t.entitlementsManager().parseEntitlements(s):null}(t,n),o,i,h,n.swgUserToken,a,l)}(t,n,i)}(s,e,n.complete.bind(n));s.callbacks().triggerPaymentResponse(r);try{const e=await r,h=di(e.purchaseData);if(s.analytics().setSku(h||""),i.logSwgEvent(o.ACTION_PAYMENT_COMPLETE,!0,ai(h||"",t.isInlineCta,e.productType==Ts.UI_CONTRIBUTION?ws.CONTRIBUTE:e.productType==Ts.TIME_BOUND_PASS?ws.TIME_BOUND_PASS:ws.SUBSCRIBE)),(await s.clientConfigManager().getClientConfig()).useUpdatedOfferFlows&&i.logSwgEvent(o.EVENT_PAY_PAYMENT_COMPLETE,!0,ai("",t.isInlineCta)),e.productType==Ts.UI_CONTRIBUTION)i.logSwgEvent(o.EVENT_CONTRIBUTION_PAYMENT_COMPLETE,!0,ai(h||"",t.isInlineCta,ws.CONTRIBUTE));else if(e.productType==Ts.SUBSCRIPTION){const s=e.oldSku,n=s&&s.length>0?o.EVENT_SUBSCRIPTION_PLAN_CHANGE_COMPLETE:o.EVENT_SUBSCRIPTION_PAYMENT_COMPLETE;i.logSwgEvent(n,!0,ai(h||"",t.isInlineCta,ws.SUBSCRIBE))}else e.productType==Ts.TIME_BOUND_PASS&&i.logSwgEvent(o.EVENT_TIME_BOUND_PASS_PAYMENT_COMPLETE,!0,ai(h||"",t.isInlineCta,ws.TIME_BOUND_PASS));n.start(e)}catch(h){const i=h;if(!es(i))throw s.eventManager().logSwgEvent(o.EVENT_PAYMENT_FAILED,!1,ai("",t.isInlineCta)),s.jserror().error("Pay failed",i),i;{const e=i.productType;let n=ws.SUBSCRIBE;e==Ts.UI_CONTRIBUTION?n=ws.CONTRIBUTE:e==Ts.TIME_BOUND_PASS&&(n=ws.TIME_BOUND_PASS),s.callbacks().triggerFlowCanceled(n),s.eventManager().logSwgEvent(o.ACTION_USER_CANCELED_PAYFLOW,!0,ai("",t.isInlineCta))}}})}async start(s){var i;this.T=di(s.purchaseData),this.Cs.logSwgEvent(o.IMPRESSION_ACCOUNT_CHANGED,!0,ai(this.T||"",t.isInlineCta)),this.Ss.entitlementsManager().reset(!0);const e={publicationId:this.Ss.pageConfig().getPublicationId(),productType:s.productType,isSubscriptionUpdate:!!s.oldSku,isOneTime:!!s.paymentRecurrence};s.userData&&s.entitlements?(e.idToken=s.userData.idToken,this.Ss.entitlementsManager().pushNextEntitlements(s.entitlements.raw),s.swgUserToken&&this.Ss.storage().set($,s.swgUserToken,!0)):e.loginHint=null==(i=s.userData)?void 0:i.email;const n={};this.ui.shouldForceLangInIframes()&&(n.hl=this.ui.getLanguage()),t.isInlineCta&&(n.ctaMode="CTA_MODE_INLINE");const r=Pt("/payconfirmiframe",n),h=await this.ui.getClientConfig();if(e.useUpdatedConfirmUi=h.useUpdatedOfferFlows,e.skipAccountCreationScreen=h.skipAccountCreationScreen,this.di=new us(this.vs,this.Ps,r,Lt(e),this.ui.getLanguage(),!0),this.di.on(S,this.Ei.bind(this)),t.isInlineCta){const s=this._i(t.inlineConfigId);if(!s)return;s.firstChild&&s.removeChild(s.firstChild),as(this.di.getElement(),{width:"100%"}),s.appendChild(this.di.getElement()),this.gi=this.di.init()}else this.di.acceptResult().then(()=>{this.pi.completeView(this.di)}),this.gi=this.pi.openView(this.di);this.gi.then(()=>{this.Ss.callbacks().triggerPayConfirmOpened(this.di)})}Ei(t){const s=t.getJwt();s&&this.Ss.entitlementsManager().pushNextEntitlements(s)}_i(t){var s;if(!t)return null;const i=Array.from(this.vs.document.querySelectorAll("div[rrm-inline-cta]"));if(0===i.length)return null;for(const e of i)if(t===(null==(s=e.getAttribute("rrm-inline-cta"))?void 0:s.trim().replace(/['"“”‘’]/g,"")))return e;return null}async complete(){this.Cs.logSwgEvent(o.ACTION_ACCOUNT_CREATED,!0,ai(this.T||"",t.isInlineCta));const s=Date.now().toString();this.Ss.storage().set(Q,s,!1),this.Ss.entitlementsManager().unblockNextNotification();const i=await this.ui.getClientConfig();if(await this.gi,!i.skipAccountCreationScreen){const t=new d;t.setComplete(!0),this.di.execute(t)}try{await this.di.acceptResult()}catch{}i.skipAccountCreationScreen||this.Cs.logSwgEvent(o.ACTION_ACCOUNT_ACKNOWLEDGED,!0,ai(this.T||"",t.isInlineCta)),this.Ss.entitlementsManager().setToastShown(!0)}};ui.waitingForPayClient=!1,ui.isInlineCta=!1,ui.inlineConfigId="";let ci=ui;function di(t){return ii(t.raw,"productId")||null}let gi=null;function pi(t){if(!gi){gi={};let i="enable-pub-id-suffix-for-storage-key";try{const s=_t(t.location.hash)["swg.experiments"];s&&(i+=","+s)}catch(s){rs.throwAsync(s)}for(let e of i.split(","))if(e=e.trim(),e)try{Ei(t,gi,e)}catch(s){rs.throwAsync(s)}}return gi}function Ei(t,s,i){let e,n,r=!1;const o=i.indexOf(":");if(-1==o?(e=i,n=100,r=!1):(e=i.substring(0,o).trim(),"c"==(i=i.substring(o+1)).substring(i.length-1)&&(r=!0,i=i.substring(0,i.length-1)),n=parseInt(i,10)),isNaN(n))throw new Error("invalid fraction");let h;if(n>99)h=!0;else if(n<1)h=!1;else if(t.sessionStorage){r=r&&n<=20;try{const s="subscribe.google.com:e:"+e+":"+n+(r?"c":"");let i="e"==(a=t.sessionStorage.getItem(s))?"e":"c"==a?"c":null;!i&&100*Math.random()<=n*(r?2:1)&&(i=!r||Math.random()<=.5?"e":"c",t.sessionStorage.setItem(s,i)),h=!!i,"c"==i&&(e="c-"+e)}catch(l){h=!1,rs.throwAsync(l)}}else h=!1;var a;s[e]=h}function _i(t,s){return pi(t)[s]||!1}function mi(t,s,i){pi(t)[s]=i}function fi(t){const s=pi(t),i=[];for(const e in s)s[e]&&i.push(e);return i}const wi="subscribe.google.com";class Ii{constructor(t,s){this.vs=t,this.ai=s,this.mi={}}async get(t,s=!1){const i=this.fi(t),e=this.wi(t),n=await this.Ii(e,s);return null!==n?n:this.Ii(i,s)}Ii(t,s){return this.mi[t]||(this.mi[t]=new Promise(i=>{const e=s?this.vs.localStorage:this.vs.sessionStorage;if(e)try{i(e.getItem(t))}catch{i(null)}else i(null)})),this.mi[t]}async set(t,s,i=!1){const e=this.fi(t),r=this.wi(t);return null!==await this.Ii(r,i)||_i(this.vs,n.ENABLE_PUBLICATION_ID_SUFFIX_FOR_STORAGE_KEY)?(await this.bi(e,i),this.Ti(r,s,i)):this.Ti(e,s,i)}Ti(t,s,i){return this.mi[t]=Promise.resolve(s),new Promise(e=>{const n=i?this.vs.localStorage:this.vs.sessionStorage;if(n)try{n.setItem(t,s)}catch{}e()})}async remove(t,s=!1){const i=this.fi(t),e=this.wi(t);return null!==await this.Ii(e,s)||_i(this.vs,n.ENABLE_PUBLICATION_ID_SUFFIX_FOR_STORAGE_KEY)?this.bi(e,s):this.bi(i,s)}bi(t,s){return delete this.mi[t],new Promise(i=>{const e=s?this.vs.localStorage:this.vs.sessionStorage;if(e)try{e.removeItem(t)}catch{}i()})}fi(t){return wi+":"+t}wi(t){if(Object.values(rt).includes(t))return this.fi(t);const s=this.ai.getPublicationId();return wi+":"+t+":"+s}}function bi(t){const s=Date.now()-12096e5;let i=0;for(;i<t.length&&!(t[i]>=s);i++);return t.slice(i)}const Ti="CTA_MODE_INLINE";function Ri(t,s,i){let e;switch(t){case"TYPE_REGISTRATION_WALL":e={flavor:"basic"};break;case"TYPE_NEWSLETTER_SIGNUP":e={flavor:"custom",customText:os($t,s)};break;default:return}new Os(i,Pt("/toastiframe",e)).open()}function Si(t,s,i,e="",n=!1,r){var o;if(!t.useUpdatedOfferFlows)return Pt("/contributionsiframe");const h={publicationId:i.getPublicationId()};return s.shouldForceLangInIframes()&&(h.hl=s.getLanguage()),(null==(o=t.uiPredicates)?void 0:o.purchaseUnavailableRegion)&&(h.purchaseUnavailableRegion="true"),n&&(h.ctaMode=Ti),e&&(h.configurationId=e),r&&(h.origin=r),Pt("/contributionoffersiframe",h)}function Ai(t,s,i=!1,e=""){const n=s.getSku(),r=s.getOneTime();if(n){const s={skuId:n};r&&(s.oneTime=r),i?t.analytics().addLabels([Ti]):t.analytics().removeLabels([Ti]),new li(t,s,Ts.UI_CONTRIBUTION,i,e).start()}}function Ci(t,s,i,e,n="",r=!1,o){var h;if(!t.useUpdatedOfferFlows){const t=_t(e)["swg.newoffercard"];return Pt("/offersiframe",t?{useNewOfferCard:t}:{})}const a={publicationId:i.getPublicationId()};return s.shouldForceLangInIframes()&&(a.hl=s.getLanguage()),(null==(h=t.uiPredicates)?void 0:h.purchaseUnavailableRegion)&&(a.purchaseUnavailableRegion="true"),r&&(a.ctaMode=Ti),n&&(a.configurationId=n),o&&(a.origin=o),Pt("/subscriptionoffersiframe",a)}function Oi(t,s,i=!1,e=""){const n=s.getSku();if(n){const r={skuId:n},a=s.getOneTime();a&&(r.oneTime=a);const l=s.getOldSku();l&&(r.oldSku=l,t.analytics().setSku(l)),i?t.analytics().addLabels([Ti]):t.analytics().removeLabels([Ti]),t.eventManager().logSwgEvent(o.ACTION_OFFER_SELECTED,!0,function(t,s){const i=new A;return i.setSku(t),i.setCtaMode(s?h.CTA_MODE_INLINE:h.CTA_MODE_POPUP),i}(n,i)),new li(t,r,Ts.SUBSCRIPTION,i,e).start()}}function Ni(t,s){s.getNative()&&t.callbacks().triggerSubscribeRequest()}async function yi(t){const s=t.storage(),i=await s.get("tsp",!0);if(!i)return{};let e;try{e=JSON.parse(i)}catch{return t.eventManager().logSwgEvent(o.EVENT_LOCAL_STORAGE_TIMESTAMPS_PARSING_ERROR),{}}return function(t){return t instanceof Object&&!(t instanceof Array)&&Object.values(Object.values(t).map(t=>3===Object.keys(t).length&&t.impressions.every(t=>!isNaN(t))&&t.dismissals.every(t=>!isNaN(t))&&t.completions.every(t=>!isNaN(t)))).every(Boolean)}(e)?Object.entries(e).reduce((t,[s,i])=>({...t,[s]:{impressions:bi(i.impressions),dismissals:bi(i.dismissals),completions:bi(i.completions)}}),{}):(t.eventManager().logSwgEvent(o.EVENT_LOCAL_STORAGE_TIMESTAMPS_PARSING_ERROR),{})}function vi(t,s,i){var e;if(t.type===ht.TYPE_REWARDED_SURVEY)return!!(js.isGaEligible(s)||js.isGtagEligible(s)||js.isGtmEligible(s))&&!((null==(e=i[t.configurationId]||i[ht.TYPE_REWARDED_SURVEY])?void 0:e.completions)||[]).length;if(t.type===ht.TYPE_REWARDED_AD)if(t.preference===Ss.PREFERENCE_ADSENSE_REWARDED_AD){const t=s.win().adsbygoogle;if(!(null==t?void 0:t.loaded))return s.eventManager().logSwgEvent(o.EVENT_REWARDED_AD_ADSENSE_FILTERED),!1}else{const t=s.win().googletag;if(!(null==t?void 0:t.getVersion()))return s.eventManager().logSwgEvent(o.EVENT_REWARDED_AD_GPT_FILTERED),!1}return!0}const Pi=[ht.TYPE_BYO_CTA,ht.TYPE_REGISTRATION_WALL,ht.TYPE_NEWSLETTER_SIGNUP,ht.TYPE_REWARDED_AD,ht.TYPE_REWARDED_SURVEY],Li={[cs.SUBSCRIPTION]:Ts.SUBSCRIPTION,[cs.SUBSCRIPTION_LARGE]:Ts.SUBSCRIPTION,[cs.CONTRIBUTION]:Ts.UI_CONTRIBUTION,[cs.CONTRIBUTION_LARGE]:Ts.UI_CONTRIBUTION},Gi=Ts.SUBSCRIPTION,Mi=/{EMAIL}/g;class ki{constructor(t,s){var i,e,n;this.Ss=t,this.j=s,this.ei=s.autoPromptType?Li[s.autoPromptType]:Gi,this.pi=t.dialogManager(),this.Ri=t.entitlementsManager(),this.ui=t.clientConfigManager(),this.fetcher=new Es(t.win()),this.rewardedSlotReadyHandler=this.rewardedSlotReady.bind(this),this.rewardedSlotClosedHandler=this.rewardedSlotClosed.bind(this),this.rewardedSlotGrantedHandler=this.rewardedSlotGranted.bind(this),this.slotRenderEndedHandler=this.slotRenderEnded.bind(this);const r=function(t,s,i){const e=t===ht.TYPE_REGISTRATION_WALL,n=!!i||!!(null==s?void 0:s.isConnectionExpected());return e&&n?"GIS_MODE_OVERLAY":"GIS_MODE_DISABLED"}
1(this.j.action,this.Ss.gisInteropManager(),null==(n=null==(e=(i=this.Ss).config)?void 0:e.call(i))?void 0:n.gisInterop),o={origin:Et(t.win().location.href).origin,configurationId:this.j.configurationId||"",isClosable:(!!s.isClosable).toString(),calledManually:s.calledManually.toString(),previewEnabled:(!!s.shouldRenderPreview).toString(),gisMode:r};this.ui.shouldForceLangInIframes()&&(o.hl=this.ui.getLanguage()),this.j.onAlternateAction&&(o.onaa="true"),this.j.onSignIn&&(o.onsi="true"),this.di=new us(t.win(),t.activities(),Pt(Tt[s.action],o),Lt({supportsEventManager:!0,productType:this.ei,windowHeight:t.win().innerHeight}),this.ui.getLanguage(),!0),s.shouldRenderPreview&&s.action!==ht.TYPE_BYO_CTA&&as(this.di.getElement(),{"pointer-events":"none"}),r!==_s.GisModeDisabled&&(this.gisLoginFlow=new gs(this.Ss,this.di,this.j.configurationId))}start(){return this.di.on(w,t=>this.Si(t)),this.di.on(V,t=>Ys(t,this.Ss,this.di,this.j.configurationId,h.CTA_MODE_POPUP,this.j.onResult)),this.di.on(g,this.Ai.bind(this)),this.di.on(L,this.handleRewardedAdLoadAdRequest.bind(this)),this.di.on(M,this.handleRewardedAdViewAdRequest.bind(this)),this.di.on(P,this.handleRewardedAdAlternateActionRequest.bind(this)),this.di.onCancel(()=>{var t,s,i;null==(s=(t=this.j).onCancel)||s.call(t),this.cleanUpGoogletag(),null==(i=this.disposeAd)||i.call(this)}),this.pi.openView(this.di,!1,{shouldDisableBodyScrolling:!0,closeOnBackgroundClick:!!this.j.isClosable})}async Si(t){var s,i,e;const{onResult:n,configurationId:r}=this.j;this.pi.completeView(this.di),null==(s=this.gisLoginFlow)||s.dispose();const o=t.getSwgUserToken();await this.Ri.updateEntitlements(o),null==(i=this.Ss.gisInteropManager())||i.redirectOk(),this.isOptIn(this.j.action)&&n&&n({configurationId:r,data:{email:t.getUserEmail(),displayName:t.getDisplayName(),givenName:t.getGivenName(),familyName:t.getFamilyName(),termsAndConditionsConsent:t.getTermsAndConditionsConsent()}}),this.j.suppressToast||(t.getActionCompleted()?this.Ci(null!=(e=t.getUserEmail())?e:""):t.getAlreadyCompleted()?Ri(this.j.action,this.ui.getLanguage(),this.Ss):this.Oi())}Ci(t){const s=this.ui.getLanguage();let i="";switch(this.j.action){case ht.TYPE_REGISTRATION_WALL:i=os(zt,s).replace(Mi,t);break;case ht.TYPE_NEWSLETTER_SIGNUP:i=os(jt,s).replace(Mi,t);break;default:return}new Os(this.Ss,Pt("/toastiframe",{flavor:"custom",customText:i})).open()}isOptIn(t){return t===ht.TYPE_NEWSLETTER_SIGNUP||t===ht.TYPE_REGISTRATION_WALL}Oi(){const t=this.ui.getLanguage();let s="";switch(this.j.action){case ht.TYPE_REGISTRATION_WALL:s=os(Yt,t);break;case ht.TYPE_NEWSLETTER_SIGNUP:s=os(Kt,t);break;default:return}new Os(this.Ss,Pt("/toastiframe",{flavor:"custom",customText:s})).open()}Ai(t){this.j.onSignIn?this.j.onSignIn():t.getSubscriberOrMember()&&this.Ss.callbacks().triggerLoginRequest({linkRequested:!1})}handleRewardedAdLoadAdRequest(t){if(this.j.preference===Ss.PREFERENCE_ADSENSE_REWARDED_AD){const t=this.Ss.win().adsbygoogle;if(!t)return this.Ss.eventManager().logSwgEvent(o.EVENT_REWARDED_AD_ADSENSE_MISSING_ERROR),void this.sendRewardedAdLoadAdResponse(!1);null==t||t.push({params:{google_adtest:Rt("google_adtest",this.Ss),google_tag_origin:"rrm",google_reactive_ad_format:11,google_wrap_fullscreen_ad:!0,google_video_play_muted:!1,google_acr:this.showASRewardedAd.bind(this)}})}else{const s=this.Ss.win().googletag;if(!s)return this.Ss.eventManager().logSwgEvent(o.EVENT_REWARDED_AD_GPT_MISSING_ERROR),void this.sendRewardedAdLoadAdResponse(!1);s.cmd.push(()=>this.setUpRewardedAd(t.getAdUnit()))}this.rewardedAdTimeout=setTimeout(this.handleRewardedAdLoadAdRequestTimeout.bind(this),5e3)}handleRewardedAdLoadAdRequestTimeout(){this.Ss.eventManager().logSwgEvent(o.EVENT_REWARDED_AD_GPT_ERROR),this.sendRewardedAdLoadAdResponse(!1)}showASRewardedAd(t){clearTimeout(this.rewardedAdTimeout),(null==t?void 0:t.show)||(this.Ss.eventManager().logSwgEvent(o.EVENT_REWARDED_AD_NOT_FILLED),this.sendRewardedAdLoadAdResponse(!1)),this.showRewardedAd=()=>t.show(this.handleASRewardedAdResult.bind(this)),this.disposeAd=null==t?void 0:t.disposeAd,this.sendRewardedAdLoadAdResponse(!0)}async handleASRewardedAdResult(t){var s,i;"viewed"===t.status?await this.rewardedAdGrant(null==(s=null==t?void 0:t.reward)?void 0:s.amount,null==(i=null==t?void 0:t.reward)?void 0:i.type):this.rewardedSlotClosed()}setUpRewardedAd(t){const s=this.Ss.win().googletag;if(this.rewardedAdSlot=s.defineOutOfPageSlot(t,s.enums.OutOfPageFormat.REWARDED),!this.rewardedAdSlot)return this.Ss.eventManager().logSwgEvent(o.EVENT_REWARDED_AD_PAGE_ERROR),void this.sendRewardedAdLoadAdResponse(!1);const i=s.pubads();this.rewardedAdSlot.addService(i),i.addEventListener("rewardedSlotReady",this.rewardedSlotReadyHandler),i.addEventListener("rewardedSlotClosed",this.rewardedSlotClosedHandler),i.addEventListener("rewardedSlotGranted",this.rewardedSlotGrantedHandler),i.addEventListener("slotRenderEnded",this.slotRenderEndedHandler),s.enableServices(),s.display(this.rewardedAdSlot),i.refresh([this.rewardedAdSlot])}rewardedSlotReady(t){clearTimeout(this.rewardedAdTimeout),this.showRewardedAd=t.makeRewardedVisible,this.sendRewardedAdLoadAdResponse(!0)}rewardedSlotClosed(){var t,s;this.cleanUpGoogletag(),this.Ss.eventManager().logSwgEvent(o.ACTION_REWARDED_AD_CLOSE_AD,!0),this.j.onAlternateAction&&this.j.onAlternateAction(),this.pi.completeView(this.di),null==(s=(t=this.j).onResult)||s.call(t,{configurationId:this.j.configurationId,data:{rendered:!0,rewardGranted:!1}})}async rewardedSlotGranted(t){var s,i;this.cleanUpGoogletag(),await this.rewardedAdGrant(null==(s=null==t?void 0:t.payload)?void 0:s.amount,null==(i=null==t?void 0:t.payload)?void 0:i.type)}async rewardedAdGrant(t,s){var i,e;this.Ss.eventManager().logSwgEvent(o.EVENT_REWARDED_AD_GRANTED),null==(e=(i=this.j).onResult)||e.call(i,{configurationId:this.j.configurationId,data:{rendered:!0,rewardGranted:!0,reward:t,type:s}}),this.pi.completeView(this.di),await this.completeAudienceAction()}slotRenderEnded(t){t.slot===this.rewardedAdSlot&&t.isEmpty&&(clearTimeout(this.rewardedAdTimeout),this.Ss.eventManager().logSwgEvent(o.EVENT_REWARDED_AD_NOT_FILLED),this.sendRewardedAdLoadAdResponse(!1))}sendRewardedAdLoadAdResponse(t){var s,i;const e=new G;e.setSuccess(t),this.di.execute(e),t||null==(i=(s=this.j).onResult)||i.call(s,{configurationId:this.j.configurationId,data:{rendered:!1,rewardGranted:!1}})}handleRewardedAdViewAdRequest(){var t;null==(t=this.showRewardedAd)||t.call(this)}handleRewardedAdAlternateActionRequest(){this.j.onAlternateAction&&this.j.onAlternateAction()}cleanUpGoogletag(){var t,s,i,e,n,r;const o=this.Ss.win().googletag;this.rewardedAdSlot&&(null==(t=null==o?void 0:o.destroySlots)||t.call(o,[this.rewardedAdSlot]));const h=null==(s=null==o?void 0:o.pubads)?void 0:s.call(o);null==(i=null==h?void 0:h.removeEventListener)||i.call(h,"rewardedSlotReady",this.rewardedSlotReadyHandler),null==(e=null==h?void 0:h.removeEventListener)||e.call(h,"rewardedSlotClosed",this.rewardedSlotClosedHandler),null==(n=null==h?void 0:h.removeEventListener)||n.call(h,"rewardedSlotGranted",this.rewardedSlotGrantedHandler),null==(r=null==h?void 0:h.removeEventListener)||r.call(h,"slotRenderEnded",this.slotRenderEndedHandler)}async completeAudienceAction(){const t=[["sut",await this.Ss.storage().get($,!0)],["configurationId",this.j.configurationId],["audienceActionType",this.j.action]],s=this.Ss.pageConfig().getPublicationId(),i="/publication/".concat(encodeURIComponent(s),"/completeaudienceaction"),e=t.reduce((t,[s,i])=>mt(t,s,i),yt(i)),n={toArray:()=>[],label:String},r=await this.fetcher.sendPost(e,n);r.updated&&await this.Ri.updateEntitlements(r.swgUserToken)}showNoEntitlementFoundToast(){this.di.execute(new S)}}class Di{constructor(t){this.Fs=t.doc(),this.ui=t.clientConfigManager(),ct(this.ui,"MiniPromptApi requires an instance of ClientConfigManager."),this.Cs=t.eventManager()}init(){const t=this.Fs.getHead();if(!t)return void ut("Unable to retrieve the head node of the current document, which is needed by MiniPromptApi.");const s="".concat(e,"/swg-mini-prompt.css");t.querySelector('link[href="'.concat(s,'"]'))||t.appendChild(ts(this.Fs.getWin().document,"link",{rel:"stylesheet",type:"text/css",href:s}))}create(t){if(t.autoPromptType!==cs.CONTRIBUTION&&t.autoPromptType!==cs.SUBSCRIPTION)return;const s=this.ui.getTheme(),i=this.ui.getLanguage();let e="";t.autoPromptType===cs.CONTRIBUTION?e=os(Vt,i):t.autoPromptType===cs.SUBSCRIPTION&&(e=os(Wt,i));const n=ts(this.Fs.getWin().document,"div",{role:"dialog",lang:i});n.classList.add("swg-mini-prompt-".concat(s));const r=ts(this.Fs.getWin().document,"div",{role:"button"});r.classList.add("swg-mini-prompt-title-container"),r.innerHTML='\n<div class="swg-mini-prompt-icon-$theme$"></div>\n<h1 class="swg-mini-prompt-title-text-$theme$">$textContent$</h1>\n'.replace(/\$theme\$/g,s).replace("$textContent$",e);const o=ts(this.Fs.getWin().document,"div",{});o.classList.add("swg-mini-prompt-close-button-container"),o.innerHTML='\n<div class="swg-mini-prompt-close-icon-$theme$"></div>\n'.replace("$theme$",s),n.appendChild(r),n.appendChild(o),this.Fs.getWin().document.body.appendChild(n),r.addEventListener("click",()=>{this.Ni(t.autoPromptType),"function"==typeof t.clickCallback&&t.clickCallback(),ls(n,"visibility","hidden")}),o.addEventListener("click",()=>{ls(n,"visibility","hidden"),this.yi(t.autoPromptType)}),this.Pi(t.autoPromptType)}Pi(t){let s;t===cs.CONTRIBUTION?s=o.IMPRESSION_SWG_CONTRIBUTION_MINI_PROMPT:t===cs.SUBSCRIPTION&&(s=o.IMPRESSION_SWG_SUBSCRIPTION_MINI_PROMPT),s&&this.Cs.logSwgEvent(s,!1)}Ni(t){let s;t===cs.CONTRIBUTION?s=o.ACTION_SWG_CONTRIBUTION_MINI_PROMPT_CLICK:t===cs.SUBSCRIPTION&&(s=o.ACTION_SWG_SUBSCRIPTION_MINI_PROMPT_CLICK),s&&this.Cs.logSwgEvent(s,!0)}yi(t){let s;t===cs.CONTRIBUTION?s=o.ACTION_SWG_CONTRIBUTION_MINI_PROMPT_CLOSE:t===cs.SUBSCRIPTION&&(s=o.ACTION_SWG_SUBSCRIPTION_MINI_PROMPT_CLOSE),s&&this.Cs.logSwgEvent(s,!0)}}const Ui=[o.IMPRESSION_SWG_CONTRIBUTION_MINI_PROMPT,o.IMPRESSION_SWG_SUBSCRIPTION_MINI_PROMPT,o.IMPRESSION_OFFERS,o.IMPRESSION_CONTRIBUTION_OFFERS],xi=new Map([[o.ACTION_SWG_CONTRIBUTION_MINI_PROMPT_CLOSE,ht.TYPE_CONTRIBUTION],[o.ACTION_CONTRIBUTION_OFFERS_CLOSED,ht.TYPE_CONTRIBUTION],[o.ACTION_NEWSLETTER_OPT_IN_CLOSE,ht.TYPE_NEWSLETTER_SIGNUP],[o.ACTION_BYOP_NEWSLETTER_OPT_IN_CLOSE,ht.TYPE_NEWSLETTER_SIGNUP],[o.ACTION_REGWALL_OPT_IN_CLOSE,ht.TYPE_REGISTRATION_WALL],[o.ACTION_SURVEY_CLOSED,ht.TYPE_REWARDED_SURVEY],[o.ACTION_REWARDED_AD_CLOSE,ht.TYPE_REWARDED_AD],[o.ACTION_BYO_CTA_CLOSE,ht.TYPE_BYO_CTA],[o.ACTION_SWG_SUBSCRIPTION_MINI_PROMPT_CLOSE,ht.TYPE_SUBSCRIPTION],[o.ACTION_SUBSCRIPTION_OFFERS_CLOSED,ht.TYPE_SUBSCRIPTION]]),Fi=new Map([[o.EVENT_CONTRIBUTION_PAYMENT_COMPLETE,ht.TYPE_CONTRIBUTION],[o.ACTION_NEWSLETTER_OPT_IN_BUTTON_CLICK,ht.TYPE_NEWSLETTER_SIGNUP],[o.ACTION_BYOP_NEWSLETTER_OPT_IN_SUBMIT,ht.TYPE_NEWSLETTER_SIGNUP],[o.ACTION_REGWALL_OPT_IN_BUTTON_CLICK,ht.TYPE_REGISTRATION_WALL],[o.ACTION_SURVEY_SUBMIT_CLICK,ht.TYPE_REWARDED_SURVEY],[o.ACTION_REWARDED_AD_VIEW,ht.TYPE_REWARDED_AD],[o.ACTION_BYO_CTA_BUTTON_CLICK,ht.TYPE_BYO_CTA],[o.EVENT_SUBSCRIPTION_PAYMENT_COMPLETE,ht.TYPE_SUBSCRIPTION]]),Bi=new Map([[o.IMPRESSION_SWG_CONTRIBUTION_MINI_PROMPT,ht.TYPE_CONTRIBUTION],[o.IMPRESSION_CONTRIBUTION_OFFERS,ht.TYPE_CONTRIBUTION],[o.IMPRESSION_NEWSLETTER_OPT_IN,ht.TYPE_NEWSLETTER_SIGNUP],[o.IMPRESSION_BYOP_NEWSLETTER_OPT_IN,ht.TYPE_NEWSLETTER_SIGNUP],[o.IMPRESSION_REGWALL_OPT_IN,ht.TYPE_REGISTRATION_WALL],[o.IMPRESSION_SURVEY,ht.TYPE_REWARDED_SURVEY],[o.IMPRESSION_REWARDED_AD,ht.TYPE_REWARDED_AD],[o.IMPRESSION_BYO_CTA,ht.TYPE_BYO_CTA],[o.IMPRESSION_SWG_SUBSCRIPTION_MINI_PROMPT,ht.TYPE_SUBSCRIPTION],[o.IMPRESSION_OFFERS,ht.TYPE_SUBSCRIPTION]]),Vi=[o.EVENT_PAYMENT_FAILED],Wi=[o.ACTION_SWG_BUTTON_SHOW_OFFERS_CLICK,o.ACTION_SWG_BUTTON_SHOW_CONTRIBUTIONS_CLICK],zi=new Set([o.EVENT_NO_ENTITLEMENTS,o.EVENT_HAS_METERING_ENTITLEMENTS,o.EVENT_OFFERED_MET
1ER,o.EVENT_UNLOCKED_BY_METER,o.EVENT_UNLOCKED_FREE_PAGE]);class ji{constructor(t,s){this.Ss=t,this.Li=s,this.Gi=!1,this.Mi=!1,this.ki=!1,this.Di=null,this.Ui=!1,this.alwaysShowBlockingContributionExperiment=!1,this.multiInstanceMonetaryCtaExperiment=!1,this.Fs=t.doc(),this.ai=t.pageConfig(),this.Ri=t.entitlementsManager(),this.ui=t.clientConfigManager(),ct(this.ui,"AutoPromptManager requires an instance of ClientConfigManager."),this.Os=t.storage(),t.eventManager().registerEventListener(this.Ns.bind(this)),this.xi=new Di(t),this.xi.init(),this.Cs=t.eventManager()}async showAutoPrompt(t){if(this.Mi=!1,t.autoPromptType===cs.NONE)return;if(this.Fi=t.contentType,t.alwaysShow)return this.Bi=!0,this.Vi=this.Wi(t.autoPromptType),this.zi=this.Fi!=ds.CLOSED,this.ji=this.zi,void this.Yi()();const[s,i,e]=await Promise.all([this.ui.getClientConfig(),this.Ri.getEntitlements(),this.Ri.getArticle()]);this.Ki(e),this.Ui=!!(null==e?void 0:e.previewEnabled),this.Ui?await this.qi(e,t):await this.Hi(s,i,e,t)}Ki(t){t&&(this.alwaysShowBlockingContributionExperiment=this.Ji(t,r.ALWAYS_SHOW_BLOCKING_CONTRIBUTION_EXPERIMENT),this.multiInstanceMonetaryCtaExperiment=this.Ji(t,r.MULTI_INSTANCE_MONETARY_CTA_EXPERIMENT))}async qi(t,s){var i,e;const n=null==(i=t.audienceActions)?void 0:i.actions;if(!n||0===n.length)return;this.Vi=this.Xi(null==(e=t.audienceActions)?void 0:e.actions,s.autoPromptType),this.zi=this.Fi!=ds.CLOSED,this.ji=this.zi;const r=n[0];this.$i(r)()}async Hi(t,s,i,e){var n,r,o,h,a,l,u,c,d,g;if(this.Bi=!1,!i)return void this.Qi();if(!(null==(n=t.uiPredicates)?void 0:n.canDisplayAutoPrompt))return void this.Qi();if(s.enablesThis())return void this.Qi();let p;if(this.Vi=this.Xi(null==(r=i.audienceActions)?void 0:r.actions,e.autoPromptType),i.actionOrchestration){const s=await this.Zi(t,i);if(s&&(this.zi=this.isOrchestrationClosable(s),p=null==(h=null==(o=i.audienceActions)?void 0:o.actions)?void 0:h.find(t=>t.configurationId===s.configId)),this.se()||this.ee()){this.ji=this.zi;const t=null==(l=null==(a=i.actionOrchestration.interventionFunnel)?void 0:a.interventions)?void 0:l.find(t=>t.type===ht.TYPE_SUBSCRIPTION||t.type===ht.TYPE_CONTRIBUTION);t&&(this.ji=this.isOrchestrationClosable(t))}}else if(this.Fi===ds.CLOSED){const t=null==(c=null==(u=i.audienceActions)?void 0:u.actions)?void 0:c.find(t=>t.type===ht.TYPE_SUBSCRIPTION);t&&(this.zi=!1,this.ji=!1,p={type:t.type,configurationId:t.configurationId})}this.ki=!1,this.ri=null==p?void 0:p.configurationId;const E=p?this.$i(p):void 0;if(!E)return void this.Qi();const _=this.zi?1e3*((null==(g=null==(d=null==t?void 0:t.autoPromptConfig)?void 0:d.clientDisplayTrigger)?void 0:g.displayDelaySeconds)||0):0;_>0?this.Ss.win().setTimeout(E,_):E()}isOrchestrationClosable(t){switch(null==t?void 0:t.closability){case kt.BLOCKING:return!1;case kt.DISMISSIBLE:return!0;default:return this.Fi!=ds.CLOSED}}ee(){return this.Vi===cs.SUBSCRIPTION||this.Vi===cs.SUBSCRIPTION_LARGE}se(){return this.Vi===cs.CONTRIBUTION||this.Vi===cs.CONTRIBUTION_LARGE}pe(t){return t===ht.TYPE_SUBSCRIPTION||t===ht.TYPE_CONTRIBUTION}Xi(t=[],s){const i=t.find(t=>t.type===ht.TYPE_CONTRIBUTION||t.type===ht.TYPE_SUBSCRIPTION);if(!i)return;const e=i.type===ht.TYPE_CONTRIBUTION?s===cs.CONTRIBUTION?cs.CONTRIBUTION:cs.CONTRIBUTION_LARGE:s===cs.SUBSCRIPTION?cs.SUBSCRIPTION:cs.SUBSCRIPTION_LARGE;return this.Wi(e)}async Zi(t,s){var i,e,n,r,h;const a=null==(i=s.audienceActions)?void 0:i.actions;let l=null==(n=null==(e=s.actionOrchestration)?void 0:e.interventionFunnel)?void 0:n.interventions;if(!(null==a?void 0:a.length)||!(null==l?void 0:l.length))return;const u=await yi(this.Ss),c=new Set(a.filter(t=>vi(t,this.Ss,u)).map(t=>t.configurationId));if(0===c.size)return;const d=new Map(s.audienceActions.actions.filter(t=>!!t.numberOfCompletions).map(t=>[t.configurationId,t.numberOfCompletions]));return l=l.filter(s=>this.Ee(s,c,d,t)),0!==l.length?this.Fi===ds.CLOSED?l[0]:function(t,s,i,e,n){if(!function(t){var s,i;return Ut(null==(s=null==t?void 0:t.globalFrequencyCap)?void 0:s.frequencyCapDuration)||Ut(null==(i=null==t?void 0:t.anyPromptFrequencyCap)?void 0:i.frequencyCapDuration)}(n))return t.logSwgEvent(o.EVENT_FREQUENCY_CAP_CONFIG_NOT_FOUND_ERROR),s[0];let r;for(const a of s){const s=xt(t,n,a);if(!Ut(s)||!Ft(s,Bt(i,a))){r=a;break}t.logSwgEvent(o.EVENT_PROMPT_FREQUENCY_CAP_MET)}if(!r)return;const h=function(t,s){var i;return(null==(i=s.globalFrequencyCap)?void 0:i.duration)||t.globalFrequencyCap.frequencyCapDuration}(n,e);if(!Ut(h)||!Ft(h,Array.prototype.concat.apply([],Object.entries(i).filter(([t])=>t!==ot).map(([t,s])=>t===r.configId||t===r.type?s.completions:s.impressions))))return r;t.logSwgEvent(o.EVENT_GLOBAL_FREQUENCY_CAP_MET)}(this.Cs,l,u,null==(r=s.actionOrchestration)?void 0:r.interventionFunnel,null==(h=t.autoPromptConfig)?void 0:h.frequencyCapConfig):void 0}_e(t=!0,s){const i={isClosable:!!this.ji,shouldAnimateFade:t};return this.multiInstanceMonetaryCtaExperiment&&s&&(i.configurationId=s),this.ee()?()=>{this.Li.showOffers(i)}:this.se()?()=>{this.Li.showContributionOptions(i)}:void 0}me(t,s,i){return()=>{const e=new ki(this.Ss,{action:t,configurationId:s,preference:i,autoPromptType:this.Vi,isClosable:this.zi,calledManually:!1,shouldRenderPreview:!!this.Ui,onAlternateAction:this._e(!1,s)});this.setLastAudienceActionFlow(e),e.start()}}setLastAudienceActionFlow(t){this.Di=t}getLastAudienceActionFlow(){return this.Di}Yi(){const t=this._e(!0,this.ri);return()=>{this.Vi===cs.SUBSCRIPTION||this.Vi===cs.CONTRIBUTION?this.xi.create({autoPromptType:this.Vi,clickCallback:t}):this.Vi!==cs.SUBSCRIPTION_LARGE&&this.Vi!==cs.CONTRIBUTION_LARGE||
1!t||t()}}Wi(t){if(this.fe()>480){if(t===cs.SUBSCRIPTION)return this.we(t),cs.SUBSCRIPTION_LARGE;if(t===cs.CONTRIBUTION)return this.we(t),cs.CONTRIBUTION_LARGE}return t}we(t){this.Cs.logEvent({eventType:o.EVENT_DISABLE_MINIPROMPT_DESKTOP,eventOriginator:u.SWG_CLIENT,isFromUserAction:!1,additionalParameters:{publicationid:this.ai.getPublicationId(),promptType:t}})}async Ns(t){t.eventType&&(Wi.find(s=>s===t.eventType)&&(this.ki=!0),await this.Ie(t.eventType))}async Ie(t){if(zi.has(t)){if(this.Mi)return;return this.Mi=!0,void(await this.storeReaderVisit())}if(this.Fi!==ds.CLOSED&&(Bi.has(t)||xi.has(t)||Fi.has(t)||Vi.find(s=>s===t))){if(!this.ki&&Ui.includes(t)){if(this.Gi)return;this.Gi=!0}this.storeEvent(t)}}async setTimestamps(t){const s=JSON.stringify(t);this.Os.set("tsp",s,!0)}async storeReaderVisit(){if(await this.Os.get(nt,!1))return;const t=await yi(this.Ss),s=t[ot]||{impressions:[],dismissals:[],completions:[]};s.impressions.push(Date.now()),t[ot]=s,await this.setTimestamps(t),await this.Os.set(nt,"1",!1)}async storeImpression(t){const s=await yi(this.Ss),i=s[t]||{impressions:[],dismissals:[],completions:[]};if(i.impressions.push(Date.now()),s[t]=i,!this.be()&&this.ri){const t=s[this.ri]||{impressions:[],dismissals:[],completions:[]};t.impressions.push(Date.now()),s[this.ri]=t}this.setTimestamps(s)}async storeDismissal(t){const s=await yi(this.Ss),i=s[t]||{impressions:[],dismissals:[],completions:[]};if(i.dismissals.push(Date.now()),s[t]=i,!this.be()&&this.ri){const t=s[this.ri]||{impressions:[],dismissals:[],completions:[]};t.dismissals.push(Date.now()),s[this.ri]=t}this.setTimestamps(s)}async storeCompletion(t){const s=await yi(this.Ss),i=s[t]||{impressions:[],dismissals:[],completions:[]};if(i.completions.push(Date.now()),s[t]=i,!this.be()&&this.ri){const t=s[this.ri]||{impressions:[],dismissals:[],completions:[]};t.completions.push(Date.now()),s[this.ri]=t}this.setTimestamps(s)}async storeEvent(t){let s;Bi.has(t)?this.ki||(s=Bi.get(t),this.storeImpression(s)):xi.has(t)?(s=xi.get(t),this.storeDismissal(s)):Fi.has(t)?(s=Fi.get(t),this.storeCompletion(s)):Vi.includes(t)&&(this.se()&&this.storeCompletion(ht.TYPE_CONTRIBUTION),this.ee()&&this.storeCompletion(ht.TYPE_SUBSCRIPTION))}fe(){return this.Fs.getWin().innerWidth}be(){return this.Bi||this.Ui}Ee(t,s,i,e){var n;const{repeatability:r,closability:h,configId:a}=t;if(!s.has(a))return!1;if((null==r?void 0:r.type)!==Dt.INFINITE){const t=Dt.FINITE===(null==r?void 0:r.type)&&r.count||1;let s;if(i.has(a)?s=i.get(a):(Dt.FINITE===(null==r?void 0:r.type)&&this.Cs.logSwgEvent(o.EVENT_COMPLETION_COUNT_FOR_REPEATABLE_ACTION_MISSING_ERROR),s=0),s>=t)return!1}const l=!!(null==(n=null==e?void 0:e.uiPredicates)?void 0:n.purchaseUnavailableRegion)&&this.pe(t.type),u=h===kt.DISMISSIBLE,c=this.Fi===ds.CLOSED;return!(this.alwaysShowBlockingContributionExperiment?u:u||!c)||!l}$i(t){return s=t.type,Pi.includes(s)&&t.configurationId?this.me(t.type,t.configurationId,t.preference):this.Yi();var s}Ji(t,s){return this.Ri.parseArticleExperimentConfigFlags(t).includes(s)}Qi(){var t;null==(t=this.Ss.gisInteropManager())||t.yield()}}var Yi=(t=>(t.LIGHT="light",t.DARK="dark",t))(Yi||{});class Ki{constructor(t,s,i,e){this.Ss=t,this.Te=s,this.Re=i,this.Se=e,this.Ls=Pt("/smartboxiframe"),this.Ps=t.activities();const n=this.Ss.clientConfigManager().getLanguage(),r={frameborder:"0",scrolling:"no",title:os(Jt,n)};this.Bs=ts(t.win().document,"iframe",r);const o={publicationId:this.Ss.pageConfig().getPublicationId(),theme:this.Re&&this.Re.theme||"light",lang:this.Re&&this.Re.lang||"en"},h=this.Re&&this.Re.messageTextColor;h&&(o.messageTextColor=h),this.Gs=Lt(o)}Ae(t){var s;t&&t.getIsClicked()&&(null==(s=this.Se)||s.call(this))}start(){as(this.Bs,{opacity:"1",position:"absolute",top:"0",bottom:"0",left:"0",height:"100%",right:"0",width:"100%"}),this.Te.appendChild(this.Bs);const t=this.Ps.addDefaultArguments(this.Gs);return this.Ps.openIframe(this.Bs,this.Ls,t).then(t=>{t.on(D,this.Ae.bind(this))}),this.Bs}}var qi=(t=>(t.SUBSCRIPTION="subscription",t.CONTRIBUTION="contribution",t))(qi||{});const Hi='<div class="swg-button-v2-icon-$theme$"></div>$textContent$';class Ji{constructor(t,s){this.Fs=t,this.Ce=s}init(){const t=this.Fs.getHead();if(!t)return;const s="".concat(e,"/swg-button.css");t.querySelector('link[href="'.concat(s,'"]'))||t.appendChild(ts(this.Fs.getWin().document,"link",{rel:"stylesheet",type:"text/css",href:s}))}create(t,s){const i=ts(this.Fs.getWin().document,"button",{});return this.attach(i,t,s)}attach(t,s,i){const e=this.Oe(t,o.ACTION_SWG_BUTTON_CLICK,s,i).options,n=e.theme;return t.classList.add("swg-button-".concat(n)),t.setAttribute("role","button"),e.lang&&t.setAttribute("lang",e.lang),t.setAttribute("title",os(Wt,t)),this.Ne(o.IMPRESSION_SWG_BUTTON),t}attachSubscribeButton(t,s,i){const e=this.Oe(t,o.ACTION_SWG_BUTTON_SHOW_OFFERS_CLICK,s,i).options,n=e.theme;return t.classList.add("swg-button-v2-".concat(n)),t.setAttribute("role","button"),e.lang&&t.setAttribute("lang",e.lang),e.enable||t.setAttribute("disabled","disabled"),t.innerHTML=Hi.replace("$theme$",n).replace("$textContent$",os(Wt,t)),this.Ne(o.IMPRESSION_SHOW_OFFERS_SWG_BUTTON),t}attachContributeButton(t,s,i){const e=this.Oe(t,o.ACTION_SWG_BUTTON_SHOW_CONTRIBUTIONS_CLICK,s,i).options,n=e.theme;return t.classList.add("swg-button-v2-".concat(n)),t.setAttribute("role","button"),e.lang&&t.setAttribute("lang",e.lang),e.enable||t.setAttribute("disabled","disabled"),t.innerHTML=Hi.replace("$theme$",n).replace("$textContent$",os(Vt,t)),this.Ne(o.IMPRESSION_SHOW_CONTRIBUTIONS_SWG_BUTTON),t}attachButtonsWithAttribute(t,s,i,e){for(const n of s){const s=Array.from(this.Fs.getRootNode().querySelectorAll("[".concat(t,'="').concat(n,'"]')));for(const t of s)"subscription"===n?this.attachSubscribeButton(t,i,e[n]):"contribution"===n&&this.attachContributeButton(t,i,e[n])}}async Ne(t,s){(await this.Ce).eventManager().logSwgEvent(t,s)}ye(t){const s=t&&"function"!=typeof t?t:{theme:Yi.LIGHT},i=s.theme;return i!==Yi.LIGHT&&i!==Yi.DARK&&(s.theme=Yi.LIGHT),s}ve(t,s){return("function"==typeof t?t:null)||s}Oe(t,s,i,e){const n=this.ye(i),r=this.ve(i,e),o=t=>{this.Ne(s,!0),"function"==typeof r&&r(t)};return t.addEventListener("click",o),{options:n,clickFun:o}}attachSmartButton(t,s,i,e){const n=this.Oe(s,o.ACTION_SWG_BUTTON_CLICK,i,e);return s.classList.add("swg-smart-button"),new Ki(t,s,n.options,n.clickFun).start()}}const Xi=!0;class $i{constructor(t,s){var i;
1this.Ss=t,this.di=null,this.vs=t.win(),this.Ps=t.activities(),this.pi=t.dialogManager(),this.Cs=t.eventManager(),this.ui=t.clientConfigManager(),this.Ds=void 0===(null==s?void 0:s.shouldAnimateFade)||(null==s?void 0:s.shouldAnimateFade),this.zi=null!=(i=null==s?void 0:s.isClosable)&&i;const e=t.activities().addDefaultArguments({showNative:t.callbacks().hasSubscribeRequestCallback(),productType:Ts.SUBSCRIPTION,list:(null==s?void 0:s.list)||"default",skus:(null==s?void 0:s.skus)||null,isClosable:this.zi});if(void 0!==(null==s?void 0:s.configurationId)&&(e.configurationId=s.configurationId),null==s?void 0:s.oldSku){e.oldSku=s.oldSku,ct(e.skus,"Need a sku list if old sku is provided!");let t=e.skus;const i=e.oldSku;t=t.filter(t=>t!==i),ct(t.length>0,"Sku list only contained offer user already has"),e.skus=t}if(e.skus&&1===e.skus.length){const t=e.skus[0],s=e.oldSku;if(s){const i=new k;return i.setSku(t),i.setOldSku(s),void Oi(this.Ss,i)}}this.Pe=e.skus||["*"],this.Le=this.ui.getClientConfig(),this.Ge=this.Me(e)}async Me(t){const s=await this.Le,i=(await this.Ss.entitlementsManager().getExperimentConfigFlags()).includes(r.MULTI_INSTANCE_MONETARY_CTA_EXPERIMENT);return new us(this.vs,this.Ps,Ci(s,this.ui,this.Ss.pageConfig(),this.vs.location.hash,t.configurationId,!1,i?Et(this.vs.location.href).origin:void 0),t,this.ui.getLanguage(),!0,!1,this.Ds)}Ai(t){t.getSubscriberOrMember()&&(this.Cs.logSwgEvent(o.ACTION_ALREADY_SUBSCRIBED,!0),this.Ss.callbacks().triggerLoginRequest({linkRequested:!!t.getLinkRequested()}))}async start(){if(this.di=await this.Ge,!this.di)return;this.Ss.callbacks().triggerFlowStarted(ws.SHOW_OFFERS,{skus:this.Pe,source:"SwG"}),this.di.onCancel(()=>{this.Ss.callbacks().triggerFlowCanceled(ws.SHOW_OFFERS)}),this.di.on(k,t=>Oi(this.Ss,t)),this.di.on(g,this.Ai.bind(this)),this.di.on(K,t=>Ni(this.Ss,t));const t=await this.Le;return this.pi.openView(this.di,!1,this.ke(t,this.ui.shouldAllowScroll()))}ke(t,s){return t.useUpdatedOfferFlows?{desktopConfig:{isCenterPositioned:!0,supportsWideScreen:!0},shouldDisableBodyScrolling:!s,closeOnBackgroundClick:this.zi}:{}}showNoEntitlementFoundToast(){this.di&&this.di.execute(new S)}}class Qi{constructor(t,s){this.Ss=t,this.Re=s,this.Ps=t.activities(),this.pi=t.dialogManager(),this.Cs=t.eventManager(),this.di=new us(t.win(),this.Ps,Pt("/optionsiframe"),Lt({publicationId:t.pageConfig().getPublicationId(),productId:t.pageConfig().getProductId(),list:(null==s?void 0:s.list)||"default",skus:(null==s?void 0:s.skus)||null,isClosable:!0}),this.Ss.clientConfigManager().getLanguage(),!1)}start(){return this.Ss.callbacks().triggerFlowStarted(ws.SHOW_SUBSCRIBE_OPTION),this.di.onCancel(()=>{this.Ss.callbacks().triggerFlowCanceled(ws.SHOW_SUBSCRIBE_OPTION)}
1),this.di.on(U,this.De.bind(this)),this.di.acceptResult().then(t=>{const s=t.data,i=new U;s.subscribe&&i.setSubscribe(!0),this.De(i)},t=>{throw this.pi.completeView(this.di),t}),this.Cs.logSwgEvent(o.IMPRESSION_CLICK_TO_SHOW_OFFERS),this.pi.openView(this.di)}De(t){if(t.getSubscribe()){const t=this.Re||{};null==t.isClosable&&(t.isClosable=Xi),this.Cs.logSwgEvent(o.ACTION_VIEW_OFFERS,!0),new $i(this.Ss,t).start()}}}class Zi{constructor(t,s={}){this.Ss=t,this.Re=s,this.vs=t.win(),this.Ps=t.activities(),this.pi=t.dialogManager(),this.Cs=t.eventManager(),this.di=new us(this.vs,this.Ps,Pt("/abbrvofferiframe"),Lt({publicationId:t.pageConfig().getPublicationId(),productId:t.pageConfig().getProductId(),showNative:t.callbacks().hasSubscribeRequestCallback(),list:s.list||"default",skus:s.skus||null,isClosable:!0}),this.Ss.clientConfigManager().getLanguage(),!1)}Ai(t){t.getSubscriberOrMember()&&(this.Cs.logSwgEvent(o.ACTION_ALREADY_SUBSCRIBED,!0),this.Ss.callbacks().triggerLoginRequest({linkRequested:!!t.getLinkRequested()}))}start(){return this.Ss.callbacks().triggerFlowStarted(ws.SHOW_ABBRV_OFFER),this.di.onCancel(()=>{this.Ss.callbacks().triggerFlowCanceled(ws.SHOW_ABBRV_OFFER)}),this.di.on(g,this.Ai.bind(this)),this.di.acceptResult().then(t=>{const s=t.data;return s.viewOffers?(null==this.Re.isClosable&&(this.Re.isClosable=Xi),this.Cs.logSwgEvent(o.ACTION_VIEW_OFFERS,!0),void new $i(this.Ss,this.Re).start()):s.native?(this.Ss.callbacks().triggerSubscribeRequest(),void this.pi.completeView(this.di)):void 0}),this.Cs.logSwgEvent(o.IMPRESSION_CLICK_TO_SHOW_OFFERS_OR_ALREADY_SUBSCRIBED),this.pi.openView(this.di)}}function te(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function se(t){if(t.__esModule)return t;var s=t.default;if("function"==typeof s){var i=function t(){return this instanceof t?Reflect.construct(s,arguments,this.constructor):s.apply(this,arguments)};i.prototype=s.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(t).forEach(function(s){var e=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(i,s,e.get?e:{enumerable:!0,get:function(){return t[s]}})}),i}const ie={IFRAME:"iframe",POPUP:"popup",REDIRECT:"redirect"},ee={OK:"ok",CANCELED:"canceled",FAILED:"failed"};class ne{constructor(t,s,i,e,n,r){this.code=t,this.data=t==ee.OK?s:null,this.mode=i,this.origin=e,this.originVerified=n,this.secureChannel=r,this.ok=t==ee.OK,this.error=t==ee.FAILED?new Error(String(s)||""):null}}const re="AbortError";let oe;function he(t){return function(t){if(t.origin)return t.origin;const s=t.protocol;let i=t.host;return"https:"==s&&i.indexOf(":443")==i.length-4?i=i.replace(":443",""):"http:"==s&&i.indexOf(":80")==i.length-3&&(i=i.replace(":80","")),s+"//"+i}(function(t){return oe||(oe=document.createElement("a")),oe.href=t,oe}(t))}function ae(t,s){const i="AbortError"+(s?": "+s:"");let e=null;if("function"==typeof t.DOMException){const s=t.DOMException;try{e=new s(i,re)}catch(n){}}return e||(e=new Error(i),e.name=re,e.code=20),e}function le(t,s,i){if(s.ok)i(s);else{const e=s.error||ae(t);e.activityResult=s,i(Promise.reject(e))}}function ue(t){const s=t.navigator;return/Trident|MSIE|IEMobile/i.test(s&&s.userAgent)}function ce(t){const s=t.navigator;return/Edge/i.test(s&&s.userAgent)}const de="__ACTIVITIES__";class ge{constructor(t,s,i,e){this.vs=t,this.Ue=s,this.xe=i,this.Fe=e,this.Be=null,this.Ve=!1,this.Us=null,this.We=null,this.ze=null,this.je=null,this.Ye=this.Ke.bind(this)}connect(t){if(this.We)throw new Error("already connected");this.We=t,this.vs.addEventListener("message",this.Ye)}disconnect(){if(this.We&&(this.We=null,this.Us&&(pe(this.Us),this.Us=null),this.vs.removeEventListener("message",this.Ye),this.je)){for(const t in this.je){const s=this.je[t];s.port1&&pe(s.port1),s.port2&&pe(s.port2)}this.je=null}}isConnected(){return null!=this.xe}getTarget(){const t=this.qe();if(!t)throw new Error("not connected");return t}qe(){return this.We&&!this.Be&&("function"==typeof this.Ue?this.Be=this.Ue():this.Be=this.Ue),this.Be}getTargetOrigin(){if(null==this.xe)throw new Error("not connected");return this.xe}sendConnectCommand(){const t=ue(this.vs)||ce(this.vs);this.sendCommand("connect",{acceptsChannel:t})}sendStartCommand(t){let s=null;this.Ve&&"function"==typeof this.vs.MessageChannel&&(s=new this.vs.MessageChannel),s?(this.sendCommand("start",t,[s.port2]),this.He(s.port1)):this.sendCommand("start",t)}sendCommand(t,s,i){const e={sentinel:de,cmd:t,payload:s||null};if(this.Us)this.Us.postMessage(e,i||void 0);else{const s=this.getTarget(),n="connect"==t?null!=this.xe?this.xe:"*":this.getTargetOrigin();s.postMessage(e,n,i||void 0)}}customMessage(t){this.sendCommand("msg",t)}onCustomMessage(t){this.ze=t}startChannel(t){const s=t||"",i=this.Je(s);if(!i.port1){const t=new this.vs.MessageChannel;i.port1=t.port1,i.port2=t.port2,i.resolver(i.port1)}return i.port2&&(this.sendCommand("cnset",{name:s},[i.port2]),i.port2=null),i.promise}
1askChannel(t){const s=t||"",i=this.Je(s);return i.port1||this.sendCommand("cnget",{name:s}),i.promise}Xe(t,s){const i=this.Je(t);i.port1=s,i.resolver(s)}Je(t){this.je||(this.je={});let s=this.je[t];if(!s){let i;const e=new Promise(t=>{i=t});s={port1:null,port2:null,resolver:i,promise:e},this.je[t]=s}return s}He(t){this.Us&&pe(this.Us),this.Us=t,this.Us.onmessage=t=>{const s=t.data,i=s&&s.cmd,e=s&&s.payload||null;i&&this.$e(i,e,t)}}Ke(t){if(this.Fe&&this.qe()!=t.source)return;const s=t.data;if(!s||s.sentinel!=de)return;const i=s.cmd;if(this.Us&&"connect"!=i&&"start"!=i)return;const e=t.origin,n=s.payload||null;null==this.xe&&"start"==i&&(this.xe=e),null==this.xe&&t.source&&this.qe()==t.source&&(this.xe=e),e==this.xe&&this.$e(i,n,t)}$e(t,s,i){if("connect"==t)this.Us&&(pe(this.Us),this.Us=null),this.Ve=s&&s.acceptsChannel||!1,this.We(t,s);else if("start"==t){const e=i.ports&&i.ports[0];e&&this.He(e),this.We(t,s)}else if("msg"==t)null!=this.ze&&null!=s&&this.ze(s);else if("cnget"==t){const t=s.name;this.startChannel(t)}else if("cnset"==t){const t=s.name,e=i.ports[0];this.Xe(t,e)}else this.We(t,s)}}function pe(t){try{t.close()}catch(s){}}let Ee=class{constructor(t,s,i){this.Bs=t,this.C=s,this.Gs=i||null,this.vs=this.Bs.ownerDocument.defaultView,this.xe=he(s),this.Qe=!1,this.Ze=null,this.sn=new Promise(t=>{this.Ze=t}),this.nn=null,this.gi=new Promise(t=>{this.nn=t}),this.rn=null,this.hn=new Promise(t=>{this.rn=t}),this.an=null,this.ln=null,this.un=new ge(this.vs,()=>this.Bs.contentWindow,this.xe,!0)}getMode(){return ie.IFRAME}connect(){if(!function(t){if("isConnected"in t)return t.isConnected;const s=t.ownerDocument&&t.ownerDocument.documentElement;return s&&s.contains(t)||!1}(this.Bs))throw new Error("iframe must be in DOM");return this.un.connect(this.$e.bind(this)),this.Bs.src=this.C,this.sn}disconnect(){this.Qe=!1,this.un.disconnect()}acceptResult(){return this.hn}getTargetWin(){return this.Bs.contentWindow||null}message(t){this.un.customMessage(t)}onMessage(t){this.un.onCustomMessage(t)}
1messageChannel(t){return this.un.askChannel(t)}whenReady(){return this.gi}onResizeRequest(t){this.an=t,Promise.resolve().then(()=>{null!=this.ln&&t(this.ln)})}resized(){if(!this.Qe)return;const t=this.Bs.offsetHeight;this.un.sendCommand("resized",{height:t})}$e(t,s){if("connect"==t)this.Qe=!0,this.un.sendStartCommand(this.Gs),this.Ze();else if("result"==t){if(this.rn){const t=s.code,i=t==ee.FAILED?new Error(s.data||""):s.data,e=new ne(t,i,ie.IFRAME,this.un.getTargetOrigin(),!0,!0);le(this.vs,e,this.rn),this.rn=null,this.un.sendCommand("close"),this.disconnect()}}else"ready"==t?this.nn&&(this.nn(),this.nn=null):"resize"==t&&(this.ln=s.height,this.an&&this.an(this.ln))}};class _e{constructor(t,s,i,e,n,r){if(!e||"_blank"!=e&&"_top"!=e&&"_"==e[0])throw new Error('The only allowed targets are "_blank", "_top" and name targets');this.vs=t,this.cn=s,this.C=i,this.dn=e,this.Gs=n||null,this.Re=r||{},this.Ze=null,this.sn=new Promise(t=>{this.Ze=t}),this.rn=null,this.hn=new Promise(t=>{this.rn=t}),this.gn=null,this.En=null,this.un=null}getMode(){return"_top"==this.dn?ie.REDIRECT:ie.POPUP}open(){return this._n()}whenConnected(){return this.sn}disconnect(){if(this.En&&(this.vs.clearInterval(this.En),this.En=null),this.un&&(this.un.disconnect(),this.un=null),this.gn){try{this.gn.close()}catch(t){}this.gn=null}this.rn=null}getTargetWin(){return this.gn}acceptResult(){return this.hn}message(t){this.un.customMessage(t)}onMessage(t){this.un.onCustomMessage(t)}
1messageChannel(t){return this.un.askChannel(t)}_n(){const t=this.mn();let s,i=this.C;if(!this.Re.skipRequestInUrl){const t=this.Re.returnUrl||function(t){const s=t.indexOf("#");return-1==s?t:t.substring(0,s)}(this.vs.location.href);i=function(t,s,i){return t+(-1==t.indexOf("#")?"#":"&")+encodeURIComponent("__WA__")+"="+encodeURIComponent(i)}(i,0,function(t){const s={requestId:t.requestId,returnUrl:t.returnUrl,args:t.args};return void 0!==t.origin&&(s.origin=t.origin),void 0!==t.originVerified&&(s.originVerified=t.originVerified),JSON.stringify(s)}({requestId:this.cn,returnUrl:t,args:this.Gs}))}let e=this.dn;"_top"!=e&&ue(this.vs)&&(e="_top");try{s=this.vs.open(i,e,t)}catch(n){}if(!s&&"_top"!=e&&!this.Re.disableRedirectFallback){e="_top";try{s=this.vs.open(i,e)}catch(n){}}return s?(this.gn=s,"_top"!=e&&this.fn()):this.wn(new Error("failed to open window")),this.hn.catch(()=>{})}mn(){const t=this.vs.screen,s=t.availWidth||t.width,i=t.availHeight||t.height,e=this.In(),n=ce(this.vs),r=e&&this.vs.outerWidth>this.vs.innerWidth?Math.min(100,this.vs.outerWidth-this.vs.innerWidth):n?100:0,o=e&&this.vs.outerHeight>this.vs.innerHeight?Math.min(100,this.vs.outerHeight-this.vs.innerHeight):n?100:0,h=Math.max(s-r,.5*s),a=Math.max(i-o,.5*i);let l=Math.floor(Math.min(600,.9*h)),u=Math.floor(Math.min(600,.9*a));this.Re.width&&(l=Math.min(this.Re.width,h)),this.Re.height&&(u=Math.min(this.Re.height,a));const c=Math.floor((t.width-l)/2),d=Math.floor((t.height-u)/2),g={height:u,width:l,resizable:"yes",scrollbars:"yes"};n||(g.left=c,g.top=d);let p="";for(const E in g)p&&(p+=","),p+="".concat(E,"=").concat(g[E]);return p}In(){return this.vs==this.vs.top}fn(){this.En=this.vs.setInterval(()=>{this.Tn(!0)},500),this.un=new ge(this.vs,this.gn,null,!0),this.un.connect(this.$e.bind(this))}Tn(t){this.gn&&!this.gn.closed||(this.En&&(this.vs.clearInterval(this.En),this.En=null),this.vs.setTimeout(()=>{try{this.Rn(ee.CANCELED,null)}catch(t){this.wn(t)}},t?3e3:0))}wn(t){this.rn&&this.rn(Promise.reject(t)),this.disconnect()}Rn(t,s){if(this.rn){const i=this.un.isConnected(),e=new ne(t,s,ie.POPUP,i?this.un.getTargetOrigin():he(this.C),i,i);le(this.vs,e,this.rn),this.rn=null}this.un&&this.un.sendCommand("close"),this.disconnect()}$e(t,s){if("connect"==t)this.un.sendStartCommand(this.Gs),this.Ze();else if("result"==t){const t=s.code,i=t==ee.FAILED?new Error(s.data||""):s.data;this.Rn(t,i)}else"check"==t&&this.vs.setTimeout(()=>this.Tn(),200)}}class me{constructor(t,s,i,e,n){this.vs=t,this.Sn=s,this.An=i,this.xe=e,this.Cn=n}getMode(){return ie.REDIRECT}acceptResult(){const t=new ne(this.Sn,this.An,ie.REDIRECT,this.xe,this.Cn,!1);return new Promise(s=>{le(this.vs,t,s)})}}var fe={ActivityPorts:class{constructor(t){this.version="1.24",this.vs=t,this.On=t.location.hash,this.Nn={},this.yn={},this.vn=null,this.Pn=new Promise(t=>{this.vn=t})}openIframe(t,s,i){const e=new Ee(t,s,i);return e.connect().then(()=>e)}open(t,s,i,e,n){return{targetWin:this.Ln(t,s,i,e,n).getTargetWin()}}openWithMessaging(t,s,i,e,n){const r=this.Ln(t,s,i,e,n);return r.whenConnected().then(()=>r)}onResult(t,s){let i=this.Nn[t];i||(i=[],this.Nn[t]=i),i.push(s);const e=this.Gn(t);e&&this.Mn(e,s)}onRedirectError(t){this.Pn.then(t)}Ln(t,s,i,e,n){const r=new _e(this.vs,t,s,i,e,n);return r.open().then(()=>{this.Dn(t,r)}),r}Gn(t){let s=this.yn[t];if(!s&&this.On){try{s=function(t,s,i){const e="__WA_RES__",n=(r=e,(o=s,o?(/^[?#]/.test(o)?o.slice(1):o).split("&").reduce((t,s)=>{const i=s.split("="),e=decodeURIComponent(i[0]||""),n=decodeURIComponent(i[1]||"");return e&&(t[e]=n),t},{}):{})[r]);var r,o;if(!n)return null;const h=JSON.parse(n);if(!h||h.requestId!=i)return null;const a=function(t,s){if(!t)return t;const i=encodeURIComponent(s)+"=";let e=-1;do{if(e=t.indexOf(i,e),-1!=e){const s=e>0?t.substring(e-1,e):"";if(""==s||"?"==s||"#"==s||"&"==s){let s=t.indexOf("&",e+1);-1==s&&(s=t.length),t=t.substring(0,e)+t.substring(s+1)}else e++}}while(-1!=e&&e<t.length);return t}(t.location.hash,e)||"";if(a!=t.location.hash&&t.history&&t.history.replaceState)try{t.history.replaceState(t.history.state,"",a)}catch(g){}const l=h.code,u=h.data,c=h.origin,d=t.document.referrer&&he(t.document.referrer);return new me(t,l,u,c,c==d)}(this.vs,this.On,t)}catch(i){!function(t){setTimeout(()=>{throw t})}(i),this.vn(i)}s&&(this.yn[t]=s)}return s}Mn(t,s){Promise.resolve().then(()=>{s(t)})}Dn(t,s){const i=this.Nn[t];
1i&&i.forEach(t=>{this.Mn(s,t)}),this.yn[t]=s}},ActivityIframePort:Ee,ActivityMessagingPort:class{getTargetWin(){}message(t){}onMessage(t){}messageChannel(t){}},ActivityMode:ie,ActivityOpenOptions:void 0,ActivityPort:class{getMode(){}acceptResult(){}},ActivityRequest:void 0,ActivityResult:ne,ActivityResultCode:ee,ActivityWindowPort:_e,createAbortError:ae,isAbortError:function(t){return!(!t||"object"!=typeof t)&&t.name===re}};const we=t({__proto__:null,default:te(fe)},[fe]);class Ie{constructor(t){this.Us=t}acceptResult(){return this.Us.acceptResult()}}let be=class{constructor(t,s,i,e){this.Ss=i,this.Un=new fe.ActivityIframePort(t,s,e),this.xn={}}whenReady(){return this.Un.whenReady()}async connect(){await this.Un.connect(),this.Un.onMessage(t=>{const s=null==t?void 0:t.RESPONSE;if(!s)return;const i=this.xn[s[0]];i&&i(H(s))}),this.Ss&&this.Ss.eventManager()&&this.on(_,t=>{var s,i;this.Ss.eventManager().logEvent({eventType:t.getEvent(),eventOriginator:u.SWG_SERVER,isFromUserAction:null==(s=t.getMeta())?void 0:s.getIsFromUserAction(),additionalParameters:t.getParams(),configurationId:null==(i=t.getMeta())?void 0:i.getConfigurationId()})})}disconnect(){this.Un.disconnect()}getMode(){return this.Un.getMode()}acceptResult(){return this.Un.acceptResult()}onResizeRequest(t){return this.Un.onResizeRequest(t)}execute(t){this.Un.message({REQUEST:t.toArray()})}on(t,s){let i=null;try{i=J(t)}catch{i=null}if(!i)throw new Error("Invalid data type");if(this.xn[i])throw new Error("Invalid type or duplicate callback for "+i);this.xn[i]=s}resized(){this.Un.resized()}};class Te{constructor(t,s){this.Ss=s,this.Fn=t,this.xn={},this.Fn.onMessage(t=>{const s=null==t?void 0:t.RESPONSE;if(!s)return;const i=this.xn[s[0]];i&&i(H(s))}),this.Ss&&this.Ss.eventManager()&&this.on(_,t=>{var s,i;this.Ss.eventManager().logEvent({eventType:t.getEvent(),eventOriginator:u.SWG_SERVER,isFromUserAction:null==(s=t.getMeta())?void 0:s.getIsFromUserAction(),additionalParameters:t.getParams(),configurationId:null==(i=t.getMeta())?void 0:i.getConfigurationId()})})}acceptResult(){return this.Fn.acceptResult()}execute(t){this.Fn.message({REQUEST:t.toArray()})}on(t,s){let i=null;try{i=J(t)}catch{i=null}if(!i)throw new Error("Invalid data type");if(this.xn[i])throw new Error("Invalid type or duplicate callback for "+i);this.xn[i]=s}}let Re=class{constructor(t){this.Ss=t,this.Ps=new fe.ActivityPorts(t.win())}addDefaultArguments(t){var s;const e=this.Ss,n=e.pageConfig(),r=e.analytics().getContext(),o=Boolean(null==(s=e.isPublisher)?void 0:s.call(e)),h={analyticsContext:r.toArray(),publicationId:n.getPublicationId(),productId:n.getProductId(),_client:"SwG ".concat(i),supportsEventManager:!0};return o&&(h.isPublisherRuntime=!0),Object.assign(h,t||{})}async Bn(t,s,i){const e=new be(t,s,this.Ss,i);return await e.connect(),e}async openIframe(t,s,i,e=!1){e&&(i=this.addDefaultArguments(i));const n=await this.Ss.storage().get($,!0),r=new URL(s).searchParams;n&&!r.has("sut")&&(s=mt(s,"sut",n));const o=this.Ss.pageConfig().getPublicationId();return o&&!r.has("publicationId")&&(s=mt(s,"publicationId",o)),this.Bn(t,s,i)}async openPopupWithMessaging(t,s,i,e,n,r=!1){r&&(e=this.addDefaultArguments(e));const o=await this.Ps.openWithMessaging(t,s,i,e,n);return new Te(o,this.Ss)}open(t,s,i,e,n,r=!1){return r&&(e=this.addDefaultArguments(e)),this.Ps.open(t,s,i,e,n)}onResult(t,s){this.Ps.onResult(t,t=>{s(new Ie(t))})}onRedirectError(t){this.Ps.onRedirectError(t)}getOriginalWebActivityPorts(){return this.Ps}};var Se=(t=>(t[t.PROCESS_EVENT=0]="PROCESS_EVENT",t[t.CANCEL_EVENT=1]="CANCEL_EVENT",t))(Se||{});function Ae(t,s){return"Event has an invalid "+t+"("+s+")"}class Ce{constructor(t){this.Vn=t,this.Wn=[],this.zn=[],this.lastAction=null}static isPublisherEvent(t){return t.eventOriginator===u.PROPENSITY_CLIENT||t.eventOriginator===u.PUBLISHER_CLIENT}registerEventListener(t){if(!Vs(t))throw new Error("Event manager listeners must be a function");this.Wn.push(t)}registerEventFilterer(t){if(!Vs(t))throw new Error("Event manager filterers must be a function");this.zn.push(t)}logEvent(t,s,i){!function(t){if(!Fs(t))throw new Error("Event must be a valid object");
1if(!Bs(o,t.eventType))throw new Error(Ae("eventType",t.eventType));if(!Bs(u,t.eventOriginator))throw new Error(Ae("eventOriginator",t.eventOriginator));if(!Fs(t.additionalParameters)&&null!=t.additionalParameters)throw new Error(Ae("additionalParameters",t.additionalParameters));if(null!=t.isFromUserAction&&!Ws(t.isFromUserAction))throw new Error(Ae("isFromUserAction",t.isFromUserAction))}(t),t.timestamp=null!=i?i:Date.now(),this.lastAction=this.Ke(t,s)}async Ke(t,s){await this.Vn;for(const e of this.zn)try{if(e(t)===Se.CANCEL_EVENT)return}catch(i){lt(i)}for(const e of this.Wn)try{e(t,s)}catch(i){lt(i)}}logSwgEvent(t,s=!1,i=null,e,n=null){this.logEvent({eventType:t,eventOriginator:u.SWG_CLIENT,isFromUserAction:s,additionalParameters:i,configurationId:n},void 0,e)}getReadyPromise(){return this.Vn}}const Oe="0123456789ABCDEF";function Ne(t){return Oe[3&t|8]}function ye(t,s){return(s+t).slice(-s.length)}function ve(t){return new j([Math.floor(t/1e3),t%1e3*1e6],!1)}const Pe={opacity:"0",position:"absolute",top:"-10px",left:"-10px",height:"1px",width:"1px"},Le="AnalyticsService timed out waiting for a response";function Ge(t){const s=new C;return s.setComplete(!1),s.setError(t),s}class Me{constructor(t){var s;this.Ss=t,this.B=new p,this.jn=!1,this.Yn=!1,this.Kn=null,this.qn=[],this.Vs=null,this.Hn=null,this.Jn=!1,this.Xn=null,this.$n=0,this.lastAction=null,this.G=ve(t.creationTimestamp()),this.Fs=t.doc(),this.Ps=t.activities(),this.Bs=ts(this.Fs.getWin().document,"iframe",{title:"Subscribe with Google Service"}),as(this.Bs,Pe),null==(s=this.Fs.getBody())||s.appendChild(this.getElement()),this.Qn(),this.Cs=t.eventManager(),this.Cs.registerEventListener(this.Ns.bind(this))}setReadyForLogging(){this.Jn=!0;for(const t of this.qn)this.Ns(t)}setTransactionId(t){const s=this.B.getTransactionId();if(this.B.setTransactionId(t),null!=s&&s!=t){const t=o.EVENT_NEW_TX_ID,i=new A;i.setOldTransactionId(s),this.Cs.logSwgEvent(t,!0,i)}}getTransactionId(){return this.B.getTransactionId()}getSku(){return this.B.getSku()}setSku(t){this.B.setSku(t)}setUrl(t){this.B.setUrl(t)}addLabels(t){if(t&&t.length>0){const s=[].concat(this.B.getLabelList());for(const i of t)-1==s.indexOf(i)&&s.push(i);this.B.setLabelList(s)}}removeLabels(t){if(t&&t.length>0){const s=[].concat(this.B.getLabelList());for(const i of t){const t=s.indexOf(i);t>-1&&s.splice(t,1)}this.B.setLabelList(s)}}getElement(){return this.Bs}Zn(){return this.Fs.getWin().location.search}ir(){return this.Fs.getWin().document.referrer}er(){const t=this.nr();if(t&&t.length){const s=t[0],i=s.loadEventStart-s.unloadEventEnd;if(i>0)return i}return 0}nr(){return performance.getEntriesByType("navigation")}Qn(){const t=this.B;t.setTransactionId(function(){let t=function(){const t=Date.now().toString(16);return t.substring(t.length-8).toUpperCase()}()+"-",s=0;const i=function(){const t=new Uint8Array(23);self.crypto.getRandomValues(t);for(let s=t.length-1;s>-1;s--)t[s]=t[s]%16;return t}();for(let e=9;e<36;e++)switch(e){case 13:case 18:case 23:t+="-";break;case 14:t+="4";break;case 19:t+=Ne(i[s++]);break;default:t+=Oe[i[s++]]}return t}()+".swg"),t.setReferringOrigin(Et(this.ir()).origin),t.setClientVersion("SwG ".concat(i)),t.setUrl(It(this.Fs)),t.setIsLockedContent(this.Ss.pageConfig().isLocked()),t.setUrlFromMarkup(wt(this.Fs)||"");const s=_t(this.Zn()),e=s.utm_campaign,n=s.utm_medium,r=s.utm_source;e&&t.setUtmCampaign(e),n&&t.setUtmMedium(n),r&&t.setUtmSource(r)}start(){return this.Vs||(this.addLabels(fi(this.Fs.getWin())),this.Vs=this.preparePort()),this.Vs}async preparePort(){let t;try{t=await this.Ps.openIframe(this.Bs,Pt("/serviceiframe"),null,!0)}catch(s){return this.Yn=!0,this.rr(Ge("Could not connect ["+s+"]")),null}return t.on(C,this.rr.bind(this)),await t.whenReady(),this.addLabels(fi(this.Fs.getWin())),t}setReadyToPay(t){this.B.setReadyToPay(t)}close(){var t;null==(t=this.Fs.getBody())||t.removeChild(this.getElement())}getContext(){return this.B}ys(t){const s=new E;s.setEventOriginator(t.eventOriginator),s.setIsFromUserAction(!!t.isFromUserAction),t.configurationId&&s.setConfigurationId(t.configurationId),this.B.setClientTimestamp(ve(t.timestamp));const i=this.er();var e;i>0&&this.B.setLoadEventStartDelay((e=i,new I([Math.floor(e/1e3),e%1e3*1e6],!1))),this.B.setRuntimeCreationTimestamp(this.G);const n=new _;return n.setEvent(t.eventType),n.setContext(this.B),n.setMeta(s),t.additionalParameters instanceof A&&n.setParams(t.additionalParameters),n}lr(){return!0===this.Ss.config().enableSwgAnalytics}Ns(t){t.eventType!==o.EVENT_SUBSCRIPTION_STATE&&t.eventOriginator!==u.SHOWCASE_CLIENT&&(Ce.isPublisherEvent(t)&&!this.lr()||(this.Jn?(this.$n++,this.lastAction=this.cr(t)):this.qn.push(t)))}async cr(t){const s=await this.start(),i=this.ys(t);null==s||s.execute(i)}rr(t){const s=(null==t?void 0:t.getComplete())||!1,i=(null==t?void 0:t.getError())||"Unknown logging Error",e=i===Le;s||lt("Error when logging: "+i),this.$n--,e||(this.jn=!0),null!==this.Kn&&(0===this.$n||this.Yn||e)&&(null!==this.Xn&&(clearTimeout(this.Xn),this.Xn=null),this.Kn(s),this.Hn=null,this.Kn=null)}getLoggingPromise(){return 0===this.$n||this.Yn?Promise.resolve(!0):(null===this.Hn&&(this.Hn=new Promise(t=>{this.Kn=t}),this.Xn=self.setTimeout(()=>{this.Xn=null,this.rr(Ge(Le))},this.jn?200:500)),this.Hn)}}class ke{constructor(){this.dr={},this.yn={},this.gr=null}setOnEntitlementsResponse(t){this.pr(1,t)}triggerEntitlementsResponse(t){return this.Er(1,t.then(t=>t.clone()))}hasEntitlementsResponsePending(){return!!this.yn[1]}setOnLoginRequest(t){this.pr(4,t)}triggerLoginRequest(t){return this.Er(4,t)}setOnLinkProgress(t){this.pr(5,t)}triggerLinkProgress(){return this.Er(5,!0)}resetLinkProgress(){this._r(5)}setOnLinkComplete(t){this.pr(6,t)}triggerLinkComplete(){return this.Er(6,!0)}hasLinkCompletePending(){return!!this.yn[6]}setOnPayConfirmOpened(t){this.pr(9,t)}triggerPayConfirmOpened(t){return this.Er(9,t)}setOnSubscribeRequest(t){this.pr(2,t)}triggerSubscribeRequest(){return this.Er(2,!0)}hasSubscribeRequestCallback(){return!!this.dr[2]}setOnOffersFlowRequest(t){this.pr(10,t)}triggerOffersFlowRequest(){return this.Er(10,!0)}hasOffersFlowRequestCallback(){return!!this.dr[10]}setOnSubscribeResponse(t){ut("[swg.js:setOnSubscribeResponse]: This method has been deprecated, please switch usages to 'setOnPaymentResponse'"),this.pr(3,t)}setOnContributionResponse(t){ut("[swg.js:setOnContributionResponse]: This method has been deprecated, please switch usages to 'setOnPaymentResponse'"),this.pr(3,t)}setOnPaymentResponse(t){this.pr(3,t)}triggerPaymentResponse(t){return this.gr=t.then(t=>{this.Er(3,Promise.resolve(t.clone()))},t=>{if(!es(t))throw t}),!!this.dr[3]}hasPaymentResponsePending(){return!!this.yn[3]}setOnFlowStarted(t){this.pr(7,t)}triggerFlowStarted(t,s={}){return this.Er(7,{flow:t,data:s})}setOnFlowCanceled(t){this.pr(8,t)}triggerFlowCanceled(t,s={}){return this.Er(8,{flow:t,data:s})}pr(t,s){this.dr[t]&&ut("[swg.js]: You have registered multiple callbacks for the same response."),this.dr[t]=s,t in this.yn&&this.wr(t,s,this.yn[t])}Er(t,s){this.yn[t]=s;const i=this.dr[t];return i&&this.wr(t,i,s),!!i}_r(t){t in this.yn&&delete this.yn[t]}async wr(t,s,i){await 0,s(i),this._r(t)}}class De{constructor(t,s){this.displayName=t,this.avatarUrl=s}}
1class Ue{constructor({displayDelaySeconds:t,numImpressionsBetweenPrompts:s,dismissalBackOffSeconds:i,maxDismissalsPerWeek:e,maxDismissalsResultingHideSeconds:n,impressionBackOffSeconds:r,maxImpressions:o,maxImpressionsResultingHideSeconds:h,globalFrequencyCapDurationSeconds:a,globalFrequencyCapDurationNano:l,anyPromptFrequencyCapDurationSeconds:u,anyPromptFrequencyCapDurationNano:c}){this.clientDisplayTrigger=new xe(t,s),this.explicitDismissalConfig=new Fe(i,e,n),this.impressionConfig=new Be(r,o,h),this.frequencyCapConfig=new Ve(new We(new je(a,l)),new ze(new je(u,c)))}}class xe{constructor(t,s){this.displayDelaySeconds=t,this.numImpressionsBetweenPrompts=s}}class Fe{constructor(t,s,i){this.backOffSeconds=t,this.maxDismissalsPerWeek=s,this.maxDismissalsResultingHideSeconds=i}}class Be{constructor(t,s,i){this.backOffSeconds=t,this.maxImpressions=s,this.maxImpressionsResultingHideSeconds=i}}class Ve{constructor(t,s){this.globalFrequencyCap=t,this.anyPromptFrequencyCap=s}}class We{constructor(t){this.frequencyCapDuration=t}}class ze{constructor(t){this.frequencyCapDuration=t}}class je{constructor(t,s){this.seconds=t,this.nanos=s}}class Ye{constructor({attributionParams:t,autoPromptConfig:s,paySwgVersion:i,uiPredicates:e,useUpdatedOfferFlows:n,skipAccountCreationScreen:r}){this.autoPromptConfig=s,this.paySwgVersion=i,this.useUpdatedOfferFlows=n||!1,this.skipAccountCreationScreen=r||!1,this.uiPredicates=e,this.attributionParams=t}}class Ke{constructor(t,s,i){this.canDisplayAutoPrompt=t,this.canDisplayButton=s,this.purchaseUnavailableRegion=i}}class qe{constructor(t,s,i,e={}){this.Ss=t,this.Ir=s,this.As=i,this.br=e,this.Tr=null}fetchClientConfig(t){if(!this.Ir)throw new Error("fetchClientConfig requires publicationId");return this.Tr||(t=t||Promise.resolve(),this.Tr=t.then(()=>this.Rr())),this.Tr}getClientConfig(){return this.Tr||this.Sr()}async Sr(){return new Ye({paySwgVersion:this.Ss.config().paySwgVersion,skipAccountCreationScreen:this.br.skipAccountCreationScreen,useUpdatedOfferFlows:!!this.Ss.config().paySwgVersion||void 0})}async getAutoPromptConfig(){this.Tr||this.fetchClientConfig();const t=await this.Tr;return null==t?void 0:t.autoPromptConfig}getLanguage(){return this.br.lang||"en"}getTheme(){const t=self.matchMedia("(prefers-color-scheme: dark)").matches?Rs.DARK:Rs.LIGHT;return this.br.theme||t}shouldAllowScroll(){return!!this.br.allowScroll}shouldForceLangInIframes(){return!!this.br.forceLangInIframes&&!!this.br.lang}async shouldEnableButton(){var t;if(this.br.disableButton)return Promise.resolve(!1);this.Tr||this.fetchClientConfig();const s=await this.Tr;return null==(t=null==s?void 0:s.uiPredicates)?void 0:t.canDisplayButton}async Rr(){const t=await this.Ss.entitlementsManager().getArticle();if(t)return this.Ar(t.clientConfig);const s=yt("/publication/"+encodeURIComponent(this.Ir)+"/clientconfiguration"),i=await this.As.fetchCredentialedJson(s);return this.Ar(i)}Ar(t){var s,i,e,n,r,o,h,a,l,u,c,d,g,p,E,_,m,f,w;const I=t.autoPromptConfig;let b;I&&(b=new Ue({displayDelaySeconds:null==(s=I.clientDisplayTrigger)?void 0:s.displayDelaySeconds,dismissalBackOffSeconds:null==(i=I.explicitDismissalConfig)?void 0:i.backOffSeconds,maxDismissalsPerWeek:null==(e=I.explicitDismissalConfig)?void 0:e.maxDismissalsPerWeek,maxDismissalsResultingHideSeconds:null==(n=I.explicitDismissalConfig)?void 0:n.maxDismissalsResultingHideSeconds,impressionBackOffSeconds:null==(r=I.impressionConfig)?void 0:r.backOffSeconds,maxImpressions:null==(o=I.impressionConfig)?void 0:o.maxImpressions,maxImpressionsResultingHideSeconds:null==(h=I.impressionConfig)?void 0:h.maxImpressionsResultingHideSeconds,globalFrequencyCapDurationSeconds:null==(u=null==(l=null==(a=I.frequencyCapConfig)?void 0:a.globalFrequencyCap)?void 0:l.frequencyCapDuration)?void 0:u.seconds,globalFrequencyCapDurationNano:null==(g=null==(d=null==(c=I.frequencyCapConfig)?void 0:c.globalFrequencyCap)?void 0:d.frequencyCapDuration)?void 0:g.nano,anyPromptFrequencyCapDurationSeconds:null==(_=null==(E=null==(p=I.frequencyCapConfig)?void 0:p.anyPromptFrequencyCap)?void 0:E.frequencyCapDuration)?void 0:_.seconds,anyPromptFrequencyCapDurationNano:null==(w=null==(f=null==(m=I.frequencyCapConfig)?void 0:m.anyPromptFrequencyCap)?void 0:f.frequencyCapDuration)?void 0:w.nano}));const T=t.uiPredicates;let R;T&&(R=new Ke(T.canDisplayAutoPrompt,T.canDisplayButton,T.purchaseUnavailableRegion));const S=t.attributionParams;let A;S&&(A=new De(S.displayName,S.avatarUrl));const C=this.Ss.config().paySwgVersion||t.paySwgVersion,O=!!this.Ss.config().paySwgVersion||t.useUpdatedOfferFlows;
1return new Ye({autoPromptConfig:b,paySwgVersion:C,useUpdatedOfferFlows:O,skipAccountCreationScreen:this.br.skipAccountCreationScreen,uiPredicates:R,attributionParams:A})}}class He{constructor(t,s){var i,e,n,r;this.Ss=t,this.Re=s,this.vs=t.win(),this.ui=t.clientConfigManager(),this.Ps=t.activities(),this.pi=t.dialogManager(),this.zi=null==(e=null==(i=this.Re)?void 0:i.isClosable)||e,this.Ge=this.Cr(),this.Ds=void 0===(null==(n=this.Re)?void 0:n.shouldAnimateFade)||(null==(r=this.Re)?void 0:r.shouldAnimateFade)}async Cr(){var t,s,i;const e=await this.ui.getClientConfig(),n=(await this.Ss.entitlementsManager().getExperimentConfigFlags()).includes(r.MULTI_INSTANCE_MONETARY_CTA_EXPERIMENT);return new us(this.vs,this.Ps,Si(e,this.ui,this.Ss.pageConfig(),null==(t=this.Re)?void 0:t.configurationId,!1,n?Et(this.vs.location.href).origin:void 0),Lt({productId:this.Ss.pageConfig().getProductId(),publicationId:this.Ss.pageConfig().getPublicationId(),productType:Ts.UI_CONTRIBUTION,list:(null==(s=this.Re)?void 0:s.list)||"default",skus:(null==(i=this.Re)?void 0:i.skus)||null,isClosable:this.zi,supportsEventManager:!0}),this.ui.getLanguage(),!0,!1,this.Ds)}Ai(t){t.getSubscriberOrMember()&&this.Ss.callbacks().triggerLoginRequest({linkRequested:!!t.getLinkRequested()})}async start(){const t=await this.Ge;this.Ss.callbacks().triggerFlowStarted(ws.SHOW_CONTRIBUTION_OPTIONS),t.onCancel(()=>{this.Ss.callbacks().triggerFlowCanceled(ws.SHOW_CONTRIBUTION_OPTIONS)}),t.on(g,this.Ai.bind(this)),t.on(k,t=>Ai(this.Ss,t));const s=await this.ui.getClientConfig();return this.pi.openView(t,!1,this.ke(s,this.ui.shouldAllowScroll()))}ke(t,s){return t.useUpdatedOfferFlows&&!s?{shouldDisableBodyScrolling:!0,closeOnBackgroundClick:this.zi}:{}}async showNoEntitlementFoundToast(){(await this.Ge).execute(new S)}}const Je=String.raw,Xe=Je(_a||(_a=__template(["\n  body {\n    padding: 0;\n    margin: 0;\n  }\n\n  swg-container,\n  swg-loading,\n  swg-loading-animate,\n  swg-loading-image {\n    display: block;\n  }\n\n  swg-loading-container {\n    width: 100% !important;\n    display: flex !important;\n    align-items: center !important;\n    justify-content: center !important;\n    min-height: 148px !important;\n    height: 100% !important;\n    bottom: 0 !important;\n    margin-top: 5px !important;\n    z-index: 2147483647 !important;\n  }\n\n  /**\n  * Since the desktop view has the parent iframe (.swg-dialog) transparent,\n  * this style adds the background with borders to the loading indicator.\n  */\n  @media (min-width: 630px), (min-height: 630px) {\n    swg-loading-container {\n      width: 560px !important;\n      margin-left: auto !important;\n      margin-right: auto !important;\n      border-top-left-radius: 8px !important;\n      border-top-right-radius: 8px !important;\n      background-color: rgba(255, 255, 255, 1) !important;\n      box-shadow:\n        rgba(60, 64, 67, 0.3) 0 1px 1px,\n        rgba(60, 64, 67, 0.15) 0 1px 4px 1px !important;\n    }\n\n    swg-loading-container.centered-on-desktop {\n      height: 120px !important;\n      min-height: 120px !important;\n      border-radius: 8px !important;\n    }\n  }\n\n  swg-loading {\n    z-index: 2147483647 !important;\n    width: 36px;\n    height: 36px;\n    overflow: hidden;\n    animation: mspin-rotate 1568.63ms infinite linear;\n  }\n\n  swg-loading-animate {\n    animation: mspin-revrot 5332ms infinite steps(4);\n  }\n\n  swg-loading-image {\n    background-image: url('","/loader.svg');\n    background-size: 100%;\n    width: 11664px;\n    height: 36px;\n    animation: swg-loading-film 5332ms infinite steps(324);\n  }\n\n  @keyframes swg-loading-film {\n    from {\n      transform: translateX(0);\n    }\n    to {\n      transform: translateX(-11664px);\n    }\n  }\n\n  @keyframes mspin-rotate {\n    from {\n      transform: rotate(0deg);\n    }\n    to {\n      transform: rotate(360deg);\n    }\n  }\n\n  @keyframes mspin-revrot {\n    from {\n      transform: rotate(0deg);\n    }\n    to {\n      transform: rotate(-360deg);\n    }\n  }\n"])),e),$e=Je(_b||(_b=__template(["\n  /** Common styles across all window sizes. */\n  .swg-dialog,\n  .swg-toast,\n  .publisher-toast {\n    box-sizing: border-box;\n  }\n\n  .swg-toast {\n    background-color: rgba(255, 255, 255, 1) !important;\n    max-height: 46px !important;\n  }\n\n  .publisher-toast {\n    background-color: transparent !important;\n    max-width: 360px !important;\n  }\n\n  .swg-toast,\n  .publisher-toast {\n    position: fixed !important;\n    bottom: 0 !important;\n    z-index: 2147483647 !important;\n    border: none !important;\n  }\n\n  /**\n  * Wide desktop screen support, when width is >= 871px and height is >= 641px.\n  */\n  @media (min-width: 871px) and (min-height: 641px) {\n    .swg-dialog.swg-wide-dialog {\n      left: -435px !important;\n    }\n\n    .swg-dialog.swg-wide-dialog,\n    .swg-toast,\n    .publisher-toast {\n      width: 870px !important;\n    }\n  }\n\n  /** Tablet/Medium screen support, when width OR height is <= 640px. */\n  @media (max-width: 640px), (max-height: 640px) {\n    .swg-dialog,\n    .swg-toast {\n      width: 480px !important;\n      left: -240px !important;
1\n      margin-inline-start: calc(100vw - 100vw / 2) !important;\n      border-top-left-radius: 8px !important;\n      border-top-right-radius: 8px !important;\n      box-shadow:\n        rgba(60, 64, 67, 0.3) 0 1px 1px,\n        rgba(60, 64, 67, 0.15) 0 1px 4px 1px !important;\n    }\n\n    .publisher-toast {\n      width: 480px !important;\n      left: -240px !important;\n      margin-inline-start: calc(100vw - 100vw / 2) !important;\n    }\n\n    [dir='rtl'] .swg-dialog,\n    [dir='rtl'] .swg-toast,\n    [dir='rtl'] .publisher-toast {\n      margin-inline-start: calc(100vw - 100vw / 2 - 240px) !important;\n    }\n  }\n\n  /** Desktop/Large screen support, when width AND height are >= 641px. */\n  @media (min-width: 641px) and (min-height: 641px) {\n    .swg-dialog,\n    .swg-toast,\n    .publisher-toast {\n      width: 630px !important;\n    }\n\n    .swg-dialog {\n      left: -315px !important;\n      margin-inline-start: calc(100vw - 100vw / 2) !important;\n      background-color: transparent !important;\n      border: none !important;\n    }\n\n    [dir='rtl'] .swg-dialog {\n      margin-inline-start: calc(100vw - 100vw / 2 - 315px) !important;\n    }\n\n    .swg-toast {\n      border-radius: 4px !important;\n      bottom: 8px !important;\n      box-shadow:\n        0 3px 1px -2px rgb(0 0 0 / 20%),\n        0 2px 2px 0 rgb(0 0 0 / 14%),\n        0 1px 5px 0 rgb(0 0 0 / 12%) !important;\n      left: 8px !important;\n    }\n\n    .publisher-toast {\n      bottom: 8px !important;\n      right: 30px !important;\n    }\n  }\n\n  /** Phone/Small screen support, when width is <= 480px. */\n  @media (max-width: 480px) {\n    .swg-dialog,\n    .swg-toast,\n    .publisher-toast {\n      width: 100% !important;\n      max-width: 100% !important;\n      left: 0 !important;\n      right: 0 !important;\n      margin-inline-start: 0 !important;\n    }\n  }\n\n  /**\n  * Class applied to content page to disable scrolling.\n  */\n  html.swg-disable-scroll,\n  html.swg-disable-scroll * {\n    overflow: hidden !important;\n  }\n"])));class Qe{constructor(t,s,i,e){this.entitlements=t,this.userData=s,this.purchaseDataList=i,this.si=e,this.purchaseData=i[0]}clone(){return new Qe(this.entitlements,this.userData,this.purchaseDataList,this.si)}json(){return{entitlements:this.entitlements.json(),userData:this.userData.json(),purchaseDataList:this.purchaseDataList.map(t=>t.json()),purchaseData:this.purchaseData.json()}}complete(){return this.si()}}class Ze{constructor(t,s){this.Ss=t,this.di=null,this.openPromise=null,this.vs=t.win(),this.Ps=t.activities(),this.pi=t.dialogManager(),this.Re=Object.assign({entitlements:null,consent:!0},s||{})}async start(){const t=this.Re.entitlements;if(!t||!t.getEntitlementForSource("google"))throw new Error('No entitlements with "google" source');this.Ss.callbacks().triggerFlowStarted(ws.COMPLETE_DEFERRED_ACCOUNT_CREATION),this.di=new us(this.vs,this.Ps,Pt("/recoveriframe"),Lt({publicationId:this.Ss.pageConfig().getPublicationId(),productId:this.Ss.pageConfig().getProductId(),entitlements:t.raw||null,consent:this.Re.consent}),this.Ss.clientConfigManager().getLanguage(),!0),this.openPromise=this.pi.openView(this.di);try{const t=await this.di.acceptResult();return this.Or(t.data)}catch(s){throw es(s)?this.Ss.callbacks().triggerFlowCanceled(ws.COMPLETE_DEFERRED_ACCOUNT_CREATION):this.pi.completeView(this.di),s}}Or(t){this.Ss.entitlementsManager().blockNextNotification();const s=t.entitlements,i=t.idToken,e=t.productType,n=this.Ss.entitlementsManager().parseEntitlements({signedEntitlements:s}),r=new oi(i,(new ei).decode(i)),h=t.purchaseDataList?t.purchaseDataList.map(t=>new ri(t.data,t.signature)):[new ri(t.purchaseData.data,t.purchaseData.signature)],a=new ci(this.Ss),l=a.complete.bind(a),u=new Qe(n,r,h,l);this.Ss.eventManager().logSwgEvent(o.ACTION_NEW_DEFERRED_ACCOUNT,!0);const c=Promise.resolve.bind(Promise);return a.start(new ni("",h[0],r,n,e,c)),u}}function tn(t){const s=function(t){return t.readyState}(t);return"loading"!==s&&"uninitialized"!==s}class sn{constructor(t){const s="document"in t;this.vs=s?t:t.defaultView,this.Fs=s?t.document:t}getWin(){return this.vs}getRootNode(){return this.Fs}getRootElement(){return this.Fs.documentElement}getHead(){return this.Fs.head}getBody(){return this.Fs.body}isReady(){return tn(this.Fs)}async whenReady(){var t;await(t=this.Fs,new Promise(s=>{!function(t,s){!function(t,s,i){if(s(t))return void i(t);let e=!1;const n=()=>{s(t)&&!e&&(i(t),e=!0,t.removeEventListener("readystatechange",n))};t.addEventListener("readystatechange",n)}(t,tn,s)}(t,s)}))}}function en(t){return"nodeType"in t||"document"in t?new sn(t):t}const nn={frameborder:"0",scrolling:"no",src:"about:blank"};class rn{constructor(t,s){const i=Object.assign({},nn,s);this.Bs=ts(t,"iframe",i),as(this.Bs,hs),this.Nr=new Promise(t=>{this.Bs.onload=()=>{t()}})}whenReady(){return this.Nr}getElement(){return this.Bs}getDocument(){var t;const s=this.getElement().contentDocument||(null==(t=this.getElement().contentWindow)?void 0:t.document);if(!s)throw new Error("not loaded");return s}getBody(){return this.getDocument().body}isConnected(){return this.getElement().isConnected}}let on=class{constructor(t,s){this.Fs=t,this.yr=this.Fs.getWin().document.createElement("swg-popup-background"),this.yr.setAttribute("role","button"),as(this.yr,{"z-index":s.toString(),display:"none",position:"fixed",top:"0",right:"0",bottom:"0",left:"0","background-color":"rgba(32, 33, 36, .6)"})}getElement(){return this.yr}isAttached(){return!!this.yr.parentNode}attach(){var t;null==(t=this.Fs.getBody())||t.appendChild(this.yr)}destroy(){var t;null==(t=this.Fs.getBody())||t.removeChild(this.yr)}show(t){if(as(this.yr,{display:"block",opacity:t?"0":"1"}),t)return As(this.yr,{opacity:"1"},300,"ease-out")}async hide(t=!0){t&&await As(this.yr,{opacity:"0"},300,"ease-out"),as(this.yr,{display:"none"})}};class hn{constructor(t,s={}){if(this.Fs=t,this.vr=ts(this.Fs,"swg-loading-container",{}),s.additionalClasses)for(const i of s.additionalClasses)this.vr.classList.add(i);this.Pr=ts(this.Fs,"swg-loading",{}),this.vr.appendChild(this.Pr),this.vr.style.setProperty("display","none","important"),this.Lr()}getElement(){return this.vr}show(){this.vr.style.removeProperty("display")}hide(){this.vr.style.setProperty("display","none","important")}Lr(){const t=this.Pr,s=ts(this.Fs,"swg-loading-animate",{});t.appendChild(s);const i=ts(this.Fs,"swg-loading-image",{});s.appendChild(i)}}const an=2147483647,ln={"min-height":"50px",border:"none",display:"block",position:"fixed","z-index":an,"box-sizing":"border-box"},un={position:"absolute",top:"0",left:"0",right:"0",bottom:"0",opacity:"0",height:"0","max-height":"100%","max-width":"100%","min-height":"100%","min-width":"100%",width:"0"};class cn{constructor(t,s,i={},e={},n={},r=!1){this.Fs=t;const o=n.desktopConfig||{},h=!!o.supportsWideScreen,a="swg-dialog ".concat(h?"swg-wide-dialog":""),l=n.iframeCssClassOverride||a,u=os(Ht,s);this.Bs=new rn(t.getWin().document,{class:l,title:u}
1),this.Gr=new on(t,an-1),this.Mr=n.closeOnBackgroundClick,this.kr=r;const c=Object.assign({},ln,i);as(this.Bs.getElement(),c),function(t,s){for(const[i,e]of Object.entries(s))ls(t,i,e)}(this.Bs.getElement(),e),this.Dr=null,this.Ur=null,this.Fr=null,this.Ks=null,this.Br=0,this.Vr=!1,this.Wr=null,this.zr=void 0!==n.maxAllowedHeightRatio?n.maxAllowedHeightRatio:.9,this.jr=!!o.isCenterPositioned,this.Yr=!!n.shouldDisableBodyScrolling,this.Kr=this.Fs.getWin().matchMedia("(min-width: 641px)"),this.qr=null}async open(t=!1){var s;this.kr&&void 0!==this.Mr&&this.Gr.getElement().addEventListener("click",this.Hr.bind(this));const i=this.Bs;if(i.isConnected())throw new Error("already opened");return null==(s=this.Fs.getBody())||s.appendChild(i.getElement()),this.Gr.attach(),t?(as(i.getElement(),{visibility:"hidden",opacity:"0"}),this.Vr=t):this.Jr(),await i.whenReady(),this.Xr(),this}Xr(){const t=this.Bs.getBody(),s=this.Bs.getDocument();ss(en(s),Xe);const i=[];this.isPositionCenterOnDesktop()&&i.push("centered-on-desktop"),this.Dr=new hn(s,{additionalClasses:i}),t.appendChild(this.Dr.getElement()),this.Ur=ts(s,"swg-container",{}),t.appendChild(this.Ur),this.$r(),this.jr&&(this.qr=()=>{this.$r()},this.Kr.addListener(this.qr))}async close(t=!0){var s;let i;if(t){const t=this.Qr()?{opacity:"0"}:{transform:"translateY(100%)"};i=this.Zs(()=>(this.Gr.hide(!0),As(this.getElement(),t,300,"ease-out")))}else i=Promise.resolve();this.Fs.getRootElement().classList.remove("swg-disable-scroll"),await i;const e=this.Bs.getElement();null==(s=e.parentNode)||s.removeChild(e),this.Zr(),this.Gr.destroy(),this.qr&&this.Kr.removeListener(this.qr)}getContainer(){if(!this.Ur)throw new Error("not opened yet");return this.Ur}getIframe(){return this.Bs}getElement(){return this.Bs.getElement()}getLoadingView(){return this.Dr}getMaxAllowedHeightRatio(){return this.zr}isPositionCenterOnDesktop(){return this.jr}so(){var t;this.Fr&&this.Fr.hasLoadingIndicator()?this.Wr=this.Fr:(this.getContainer().textContent="",null==(t=this.Dr)||t.show())}io(){var t,s;this.Wr?((s=this.Wr.getElement()).parentElement&&s.parentElement.removeChild(s),this.Wr=null):null==(t=this.Dr)||t.hide()}getCurrentView(){return this.Fr}async openView(t){var s;as(t.getElement(),un),this.so(),this.Fr=t,this.getContainer().appendChild(t.getElement()),this.Yr&&(null==(s=this.Fs.getRootElement())||s.classList.add("swg-disable-scroll")),t.shouldFadeBody()&&!this.Vr&&this.Gr.show(t.shouldAnimateFade()),await t.init(this),as(t.getElement(),{opacity:"1"}),this.Vr&&(t.shouldFadeBody()&&this.Gr.show(t.shouldAnimateFade()),this.Jr()),this.io()}Jr(){this.Zs(async()=>{as(this.getElement(),{transform:"translateY(100%)",opacity:"1",visibility:"visible"}),this.Qr()&&await As(this.getElement(),{transform:this.eo(),opacity:"1",visibility:"visible"},300,"ease-out"),this.getElement().focus()}),this.Vr=!1}Hr(t){if(t.stopPropagation(),this.Mr){const t=this.Fr;t.execute&&t.execute(new f)}return!1}async resizeView(t,s,i=!0){if(this.Fr!=t)return null;const e=this.oo(s),n=++this.Br,r=()=>n!==this.Br;let o;if(i){const t=this.getElement().offsetHeight;o=e>=t?this.Zs(()=>{if(r())return Promise.resolve();const s={height:"".concat(e,"px")};return this.Qr()||(s.transform="translateY(".concat(e-t,"px)")),as(this.getElement(),s),new Promise(t=>{requestAnimationFrame(async()=>{await As(this.getElement(),{transform:this.eo()},300,"ease-out"),t()})})}):this.Zs(async()=>{const s=r()?Promise.resolve():As(this.getElement(),{transform:this.Qr()?this.eo():"translateY(".concat(t-e,"px)")},300,"ease-out");await s,r()||as(this.getElement(),{height:"".concat(e,"px"),transform:this.eo()})})}else as(this.getElement(),{height:"".concat(e,"px")}),o=Promise.resolve();await o,r()||(this.ho(s),t.resized())}async Zs(t){await this.Ks;try{await t()}catch{}this.Ks=null}oo(t){return Math.min(t,this.Fs.getWin().innerHeight*this.zr)}ho(t){if(this.Qr())return void this.Zr();const s=t+20;as(this.Fs.getRootElement(),{"padding-bottom":"".concat(s,"px")})}Zr(){this.Fs.getRootElement().style.removeProperty("padding-bottom")}$r(){as(this.getElement(),this.ao())}Qr(){return this.jr&&this.Kr.matches}ao(){return this.Qr()?{top:"50%",bottom:"0",transform:this.eo()}:{top:"auto",bottom:"0",transform:this.eo()}}eo(){return this.Qr()?"translateY(-50%)":"translateY(0px)"}}class dn{constructor(t,s){this.doc=t,this.clientConfigManager=s,this.kr=!1,this.lo=null,this.uo=null,this.co=new on(t,2147483647),this.do=null,this.co.getElement().addEventListener("click",()=>{if(this.do)try{this.do.focus()}catch{}})}
1setEnableBackgroundClickExperiment(t){this.kr=t}openDialog(t=!1,s={}){return this.uo||(this.lo=new cn(this.doc,this.clientConfigManager.getLanguage(),{},{},s,this.kr),this.uo=this.lo.open(t)),this.uo}async openView(t,s=!1,i={}){return this.handleCancellations(t),(await this.openDialog(s,i)).openView(t)}async handleCancellations(t){try{await t.whenComplete()}catch(s){throw es(s)&&this.completeView(t),s}}completeView(t){setTimeout(()=>{this.lo&&this.lo.getCurrentView()===t&&this.fs()},100)}completeAll(){this.lo&&this.fs(),this.co.isAttached()&&this.co.destroy()}getDialog(){return this.lo}fs(){var t;null==(t=this.lo)||t.close(),this.lo=null,this.uo=null}popupOpened(t){this.do=t||null,this.co.isAttached()||this.co.attach(),this.co.show(!0)}popupClosed(){this.do=null;try{this.co.hide()}catch{}}}class gn{constructor(t,s){this.intervention=t,this.Ss=s,this.type=t.type,this.configurationId=t.configurationId}async show(t){if(this.intervention.type===ht.TYPE_NEWSLETTER_SIGNUP||this.intervention.type===ht.TYPE_REWARDED_SURVEY||this.intervention.type===ht.TYPE_BYO_CTA||this.intervention.type===ht.TYPE_REWARDED_AD||this.intervention.type===ht.TYPE_REGISTRATION_WALL)return new ki(this.Ss,{action:this.intervention.type,configurationId:this.intervention.configurationId,onResult:t.onResult,isClosable:t.isClosable,calledManually:!0,suppressToast:t.suppressToast,onAlternateAction:t.onAlternateAction,onSignIn:t.onSignIn,preference:this.intervention.preference}).start();throw Error("Can't show ".concat(this.type))}}const pn="google:metering";class En{constructor(t,s,i,e,n,r,o=!1,h=null){this.service=t,this.raw=s,this.entitlements=i,this.po=e,this.Eo=n,this._o=r,this.decryptedDocumentKey=h,this.isReadyToPay=!!o}clone(){return new En(this.service,this.raw,this.entitlements.map(t=>t.clone()),this.po,this.Eo,this._o,this.isReadyToPay,this.decryptedDocumentKey)}json(){return{service:this.service,entitlements:this.entitlements.map(t=>t.json()),isReadyToPay:this.isReadyToPay}}enablesThisWithCacheableEntitlements(){return!!this.getEntitlementForThis()&&!this.enablesThisWithGoogleMetering()&&!this.enablesThisWithGoogleDevMode()}enablesThisWithGoogleMetering(){const t=this.getEntitlementForThis();return!!t&&t.source===pn}enablesThisWithGoogleDevMode(){const t=this.getEntitlementForThis();if(!t)return!1;const s="google"===t.source&&-1!==t.subscriptionToken.indexOf("GOOGLE_DEV_MODE_ORDER"),i="GOOGLE_DEV_MODE_TOKEN"===t.subscriptionToken;return s||i}enablesThis(t){return this.enables(this.po,t)}enablesAny(t){for(let s=0;s<this.entitlements.length;s++)if(this.entitlements[s].products.length>0&&(!t||t==this.entitlements[s].source))return!0;return!1}enables(t,s){return!!t&&!!this.getEntitlementFor(t,s)}getEntitlementForThis(t){return this.getEntitlementFor(this.po,t)}getEntitlementFor(t,s){if(!t)return ut("SwG needs this article to define a product ID (e.g. example.com:premium). Articles can define a product ID using JSON+LD. SwG can check entitlements after this article defines a product ID."),null;const i=this.entitlements.filter(i=>i.enables(t)&&(!s||s===i.source)),e=i.find(({source:t})=>t!==pn),n=i.find(({source:t})=>t===pn);return e||n||null}getEntitlementForSource(t){if(this.entitlements.length>0)for(let s=0;s<this.entitlements.length;s++)if(this.entitlements[s].subscriptionToken&&t==this.entitlements[s].source)return this.entitlements[s];return null}ack(){this.Eo(this)}consume(t){this._o(this,t)}}class _n{constructor(t,s,i,e,n,r){this.source=t,this.products=s,this.subscriptionToken=i,this.subscriptionTokenContents=e,this.subscriptionTimestamp=n,this.readerId=r}clone(){return new _n(this.source,this.products.slice(0),this.subscriptionToken,this.subscriptionTokenContents,this.subscriptionTimestamp,this.readerId)}json(){return{source:this.source,products:this.products,subscriptionToken:this.subscriptionToken,readerId:this.readerId}}enables(t){if(!t)return!1;const s=t.indexOf(":");if(-1!=s){const i=t.substring(0,s+1);if(i+"*"==t&&this.products.filter(t=>t.substring(0,s+1)==i).length>=1)return at("enabled with wildcard productId"),!0;if(this.products.includes(i+"*"))return at("enabled with wildcard entitlement"),!0}return this.products.includes(t)}static parseFromJson(t,s){t||(t={});const i=t.source||"",e=t.products||[],n=t.subscriptionToken||"",r=t.readerId;let o;try{o=n?s.decode(n):null}catch{o=null}const h=t.subscriptionTimestamp;let a;try{const t=h.seconds_,s=h.nanos_;a=new j([t,s],!1)}catch{a=null}return new _n(i,e,n,o,a,r)}static parseListFromJson(t,s){return(Array.isArray(t)?t:[t]).map(t=>_n.parseFromJson(t,s))}getSku(){if("google"!==this.source)return null;const t=ii(this.subscriptionToken,"productId")||null;return t||ut("Unable to retrieve SKU from SwG subscription token"),t}}var mn=(t=>(t[t.LICENSED_BY_GOOGLE=1]="LICENSED_BY_GOOGLE",t[t.METERED_BY_GOOGLE=2]="METERED_BY_GOOGLE",t))(mn||{});const fn="rgba(60, 64, 67, 0.3) 0px -2px 5px, rgba(60, 64, 67, 0.15) 0px -5px 5px",wn="anonymous_user",In={[mn.LICENSED_BY_GOOGLE]:"/metertoastiframe",[mn.METERED_BY_GOOGLE]:"/meteriframe"};class bn{constructor(t,{meterClientType:s=mn.LICENSED_BY_GOOGLE,meterClientUserAttribute:i=wn}={}){this.Ss=t,this.mo=null,this.fo=!1,this.wo=null,this.Io=()=>{}
1,this.vs=t.win(),this.Ps=t.activities(),this.pi=t.dialogManager(),this.bo=s,this.To=i,this.ui=t.clientConfigManager();const e={isClosable:!0,hasSubscriptionCallback:t.callbacks().hasSubscribeRequestCallback()};this.bo===mn.METERED_BY_GOOGLE&&(e.meterType=this.To===wn?"UNKNOWN":"KNOWN");const n=this.Ps.addDefaultArguments(e),r=In[this.bo],o={origin:Et(this.vs.location.href).origin},h=this.ui.getLanguage();this.ui.shouldForceLangInIframes()&&(o.hl=h),this.di=new us(this.vs,this.Ps,Pt(r,o),n,h,!1)}async start(){this.Io=()=>{const t=new Y;t.setClose(!0),this.di.execute(t),this.removeCloseEventListener(),this.Ss.eventManager().logSwgEvent(o.ACTION_METER_TOAST_CLOSED_BY_ARTICLE_INTERACTION,!0),this.mo&&!this.fo&&(this.fo=!0,this.mo())},this.Ss.callbacks().triggerFlowStarted(ws.SHOW_METER_TOAST),this.di.on(K,this.Ro.bind(this)),this.di.on(g,this.Ai.bind(this)),this.Ss.callbacks().hasSubscribeRequestCallback()||this.Ss.callbacks().hasOffersFlowRequestCallback()||ut("[swg.js]: `setOnNativeSubscribeRequest` has not been set before starting the metering flow, so users will not be able to subscribe from the metering dialog directly. Please call `setOnNativeSubscribeRequest` with a subscription flow callback before starting metering."),this.pi.handleCancellations(this.di).catch(t=>{if(this.mo&&!this.fo&&(this.fo=!0,this.mo()),!es(t))throw console.error("[swg.js]: Error occurred during meter toast handling: "+t),t});const t=await this.pi.openDialog();if(this.So(),this.Ao(),await t.openView(this.di),this.vs.addEventListener("click",this.Io),this.vs.addEventListener("touchstart",this.Io),this.vs.addEventListener("mousedown",this.Io),this.Co())ls(this.vs.document.body,"overflow","hidden");else{let t,s;this.wo=()=>{t=t||this.vs.pageYOffset,this.vs.clearTimeout(s),s=this.vs.setTimeout(()=>{Math.abs(this.vs.pageYOffset-t)>100&&this.Io()},100)},this.vs.addEventListener("scroll",this.wo)}this.Ss.eventManager().logSwgEvent(o.IMPRESSION_METER_TOAST),this.Ss.eventManager().logSwgEvent(o.EVENT_OFFERED_METER)}setOnConsumeCallback(t){this.mo=t}removeCloseEventListener(){this.vs.removeEventListener("click",this.Io),this.vs.removeEventListener("touchstart",this.Io),this.vs.removeEventListener("mousedown",this.Io),this.Co()?ls(this.vs.document.body,"overflow","visible"):this.wo&&this.vs.removeEventListener("scroll",this.wo)}So(){const t=this.vs.matchMedia("(max-width: 640px), (max-height: 640px)"),s=this.pi.getDialog().getElement();t.matches&&as(s,{"box-shadow":fn}),t.addListener(t=>{t.matches?as(s,{"box-shadow":fn}):as(s,{"box-shadow":""})})}Ao(){this.vs.matchMedia("(min-width: 640px) and (min-height: 640px)").matches&&as(this.pi.getDialog().getLoadingView().getElement(),{width:"420px",margin:"auto"})}Ro(t){this.removeCloseEventListener(),this.fo=!0,t.getNative()?this.Ss.callbacks().triggerSubscribeRequest():this.Ss.callbacks().triggerOffersFlowRequest()}Co(){return!!this.vs.navigator.userAgent.match(/Android|iPhone|iPad|iPod|BlackBerry|IEMobile/i)}Ai(t){t.getSubscriberOrMember()&&this.Ss.callbacks().triggerLoginRequest({linkRequested:!1})}showNoEntitlementFoundToast(){this.di&&this.di.execute(new S)}}function Tn(t,s=!1){const i=_t(t);return!(!(i.gaa_at&&i.gaa_n&&i.gaa_sig&&i.gaa_ts)||!s&&"na"===i.gaa_at||parseInt(i.gaa_ts,16)<Date.now()/1e3)}const Rn=new Set([ht.TYPE_NEWSLETTER_SIGNUP,ht.TYPE_REWARDED_SURVEY,ht.TYPE_REWARDED_AD,ht.TYPE_BYO_CTA,ht.TYPE_REGISTRATION_WALL]);class Sn{constructor(t,s,i,e,n){this.vs=t,this.ai=s,this.As=i,this.Ss=e,this.Oo=n,this.No=null,this.yo=!1,this.vo=!1,this.Po=!1,this.Lo=null,this.Go=null,this.Mo=0,this.Tr=null,this.entitlementsPostPromise=null,this.Ir=this.ai.getPublicationId(),this.Do=new ei,this.Os=e.storage(),this.li=e.analytics(),this.Uo=e.config(),this.Ss.eventManager().registerEventListener(this.xo.bind(this))}reset(t=!1){this.Tr=null,this.Mo=Math.max(this.Mo,t?3:0),t&&(this.Os.remove(Z),this.Os.remove(tt))}async updateEntitlements(t){this.clear(),t&&await this.Os.set($,t,!0);const s=Date.now().toString();return await this.Os.set(Q,s,!1),await this.getEntitlements()}clear(){this.Tr=null,this.Mo=0,this.unblockNextNotification(),this.Os.remove(Z),this.Os.remove(it),this.Os.remove(tt)}async getEntitlements(t){"string"==typeof t&&(Date.now()>1600289016959&&ut("[swg.js:getEntitlements]: If present, the first param of getEntitlements() should be an object of type GetEntitlementsParamsExternalDef."),t={encryption:{encryptedDocumentKey:t}}),this.Tr||(this.Tr=this.Fo(t));const s=await this.Tr;return null!=s.isReadyToPay&&this.li.setReadyToPay(s.isReadyToPay),s}pushNextEntitlements(t,s){const i=this.Bo(t,!0,s);return!(!i||!i.enablesThis()||(this.Os.set(Z,t),0))}Vo(){return _t(this.vs.location.search).gaa_n}Wo(t){var s;if(!t||t.source!==pn)return;let i,e;if((null==(s=t.subscriptionTokenContents)?void 0:s.metering.clientType)===mn.METERED_BY_GOOGLE)e=l.SUBSCRIBE_WITH_GOOGLE_METERING_SERVICE;else{if(!Tn(this.vs.location.search))return;e=l.GOOGLE_SHOWCASE_METERING_SERVICE,i=this.Vo()}this.Ss.eventManager().logSwgEvent(o.EVENT_UNLOCKED_BY_METER,!1);const n=new T;n.setSource(t.source),n.setJwt(t.subscriptionToken),this.entitlementsPostPromise=this.zo(n,a.UNLOCKED_METER,e,i)}xo(t){var s,i,e,n;if(!Tn(this.vs.location.search,!0))return;const r=function(t){return Gs[t]}(t.eventType);if(!r)return;let o=null;switch(t.eventOriginator){case u.SHOWCASE_CLIENT:o=l.PUBLISHER_ENTITLEMENT;break;case u.SWG_CLIENT:if(r==a.UNLOCKED_METER)return;o=l.GOOGLE_SUBSCRIBER_ENTITLEMENT;break;default:return}const h=this.Vo(),c=null==(i=null==(s=null==t?void 0:t.additionalParameters)?void 0:s.getIsUserRegistered)?void 0:i.call(s),d=null==(n=null==(e=null==t?void 0:t.additionalParameters)?void 0:e.getSubscriptionTimestamp)?void 0:n.call(e);this.entitlementsPostPromise=this.zo(new T,r,o,h,c,d)}async zo(t,s,i,e="",n=null,r=null){const o=new R;o.setUsedEntitlement(t),o.setClientEventTime(ve(Date.now())),o.setEntitlementResult(s),o.setEntitlementSource(i),o.setToken(e),"boolean"==typeof n&&o.setIsUserRegistered(n),r&&o.setSubscriptionTimestamp(r);let h="/publication/".concat(encodeURIComponent(this.Ir),"/article");
1if(h=An(this.vs.location,h),!this.Go){const t={metering:{resource:{hashedCanonicalUrl:await this.jo()}}};this.Go=ti(Qs(JSON.stringify(t)))}const a=await this.Os.get($,!0);a&&(h=mt(h,"sut",a)),h=mt(h,"encodedEntitlementsParams",this.Go),await this.As.sendPost(yt(h),o)}async jo(){return async function(t){var s;const i=null==(s=self.crypto)?void 0:s.subtle;if(!i){const t="Swgjs only works on secure (HTTPS or localhost) pages.";return ut(t),Promise.reject(t)}return function(t){const s=[],i=new DataView(t);for(let e=0;e<i.byteLength;e+=4){const t=i.getUint32(e).toString(16);s.push(ye(t,"00000000"))}return s.join("")}(await i.digest("SHA-512",Qs(t)))}(It(this.Ss.doc()))}async Fo(t){const s=await this.Yo(t);return this.Ko(s),s}async Yo(t){const s=await this.Os.get(Z),i=await this.Os.get(tt),e=!(!t||!t.encryption);if(s&&!e){const t=this.Bo(s,!0,function(t){switch(t){case"true":return!0;case"false":return!1;default:return}}(i));if(t&&t.enablesThis())return this.Mo=0,t}const n=await this.qo(t);return n&&n.enablesThisWithCacheableEntitlements()&&n.raw&&this.Os.set(Z,n.raw),n}async getArticle(){return this.Tr?(await this.Tr,this.No):null}async getExperimentConfigFlags(){const t=await this.getArticle();return this.parseArticleExperimentConfigFlags(t)}parseArticleExperimentConfigFlags(t){if(t){const s=t.experimentConfig;if(null!=s){const t=s.experimentFlags;if(null!=t)return t}}return[]}qo(t){let s=this.Mo;this.Mo=0;const i=async()=>{s--;const e=await this.Rr(t);return e.enablesThis()||s<=0?e:new Promise(t=>{this.vs.setTimeout(()=>{t(i())},550)})};return i()}setToastShown(t){this.Os.set(it,t?"1":"0")}blockNextNotification(){this.yo=!0}blockNextToast(){this.vo=!0}unblockNextNotification(){this.yo=!1}enableMeteredByGoogle(){this.Po=!0}getLastMeterToast(){return this.Lo}parseEntitlements(t){const s=t.isReadyToPay;null==s?this.Os.remove(tt):this.Os.set(tt,String(s));const i=t.signedEntitlements,e=t.decryptedDocumentKey,n=t.swgUserToken;if(n&&this.Ho(n),i){const t=this.Bo(i,!1,s,e);if(t)return t}else{const i=t.entitlements;if(i)return this.Jo("",i,s,e)}return this.Jo("",[],s)}Ho(t){t&&this.Os.set($,t,!0)}Bo(t,s,i,e){try{const n=this.Do.decode(t);if(s){const t=Date.now(),s=n.exp;if(1e3*parseFloat(s)<t)return null}const r=n.entitlements;return r&&this.Jo(t,r,i,e)||null}catch(n){this.vs.setTimeout(()=>{throw n})}return null}Jo(t,s,i,e){return new En("subscribe.google.com",t,_n.parseListFromJson(s,this.Do),this.ai.getProductId(),this.Xo.bind(this),this.$o.bind(this),i,e)}Ko(t){const s=this.yo;this.yo=!1;const i=this.vo;if(this.vo=!1,s)return;this.Ss.callbacks().triggerEntitlementsResponse(Promise.resolve(t)),this.Oo&&t.enablesThisWithGoogleMetering()&&t.consume();const e=t.getEntitlementForThis();e?i||this.Qo(e):this.Ss.eventManager().logSwgEvent(o.EVENT_NO_ENTITLEMENTS,!1)}async Qo(t){if(t.source===pn)return this.Ss.eventManager().logSwgEvent(o.EVENT_HAS_METERING_ENTITLEMENTS,!1),Promise.resolve();const s=new A;s.setIsUserRegistered(!0),t.subscriptionTimestamp&&s.setSubscriptionTimestamp(t.subscriptionTimestamp);const i="privileged"===t.source?o.EVENT_UNLOCKED_FOR_CRAWLER:o.EVENT_UNLOCKED_BY_SUBSCRIPTION;if(this.Ss.eventManager().logSwgEvent(i,!1,s),"1"===await this.Os.get(it))return;const e=t.source||pn;return new Os(this.Ss,Pt("/toastiframe"),Lt({publicationId:this.Ir,source:e})).open()}Xo(t){t.getEntitlementForThis()&&this.setToastShown(!0)}$o(t,s){var i;if(t.enablesThisWithGoogleMetering()){const e=t.getEntitlementForThis(),n=()=>{s&&s(),this.Wo(e)},r=e.subscriptionTokenContents;if(!r)return n();if(!0===(null==(i=r.metering)?void 0:i.showToast)){const t=new bn(this.Ss,{meterClientType:r.metering.clientType,meterClientUserAttribute:r.metering.clientUserAttribute});return t.setOnConsumeCallback(n),this.Lo=t,t.start()}return n()}}async Rr(t){var s;const i=await this.Os.get($,!0),e=await this.Os.get(Q,!1);let n="/publication/".concat(encodeURIComponent(this.Ir),"/article");if(n=An(this.vs.location,n),n=function(t,s){const i=_t(t.hash).rrmPromptRequested;return void 0===i?s:mt(s,"previewConfigId",i)}(this.vs.location,n),n=function(t,s){const i=_t(t.hash).rrmPreviewKey;return void 0===i?s:mt(s,"previewKey",i)}(this.vs.location,n),n=function(t,s){if(!t.referrer)return s;const i=Et(t.referrer).hostname.replace(/^www\./,"");return i&&"localhost"!==i?mt(s,"pageReferrer",i):s}(this.vs.document,n),(null==t?void 0:t.encryption)&&(n=mt(n,"crypt",t.encryption.encryptedDocumentKey)),i&&(n=mt(n,"sut",i)),this.Uo.publisherProvidedId?n=mt(n,"ppid",this.Uo.publisherProvidedId):(null==t?void 0:t.publisherProvidedId)&&"string"==typeof t.publisherProvidedId&&t.publisherProvidedId.length>0&&(n=mt(n,"ppid",t.publisherProvidedId)),e){const t=parseInt(e,10);if(t){const s=Math.floor((Date.now()-t)/1e3);s>=0&&(n=mt(n,"interaction_age",s.toString()))}}n=mt(n,"locked",String(this.ai.isLocked())),n=mt(n,"contentType",this.ai.isLocked()?ds.CLOSED.toString():ds.OPEN.toString());const r=await this.jo();let h=this.Po?{metering:{clientTypes:[mn.METERED_BY_GOOGLE],owner:this.Ir,resource:{hashedCanonicalUrl:r}}}:void 0;if(this.Ir&&(null==(s=null==t?void 0:t.metering)?void 0:s.state)&&Tn(this.vs.location.search)){const s=t.metering.state.id;if("string"==typeof s&&s.length>0){let i=function({attributes:t,category:s}){if(!t)return;const i=Object.keys(t);for(const e of i){const i="".concat(s,"_").concat(e),n=Number(t[e].timestamp),r=n>Date.now()/1e3*2;n&&!r||ut('SwG Entitlements: Please specify a Unix timestamp, in seconds, for the "'.concat(e,'" ').concat(s," attribute. The timestamp you passed (").concat(t[e].timestamp,") looks invali
1d.")),h.metering.state.attributes.push({name:i,timestamp:n})}};h={metering:{clientTypes:[mn.LICENSED_BY_GOOGLE],owner:this.Ir,resource:{hashedCanonicalUrl:r},state:{id:s,attributes:[]},token:this.Vo()}},i({attributes:t.metering.state.standardAttributes,category:"standard"}),i({attributes:t.metering.state.customAttributes,category:"custom"})}else ut("SwG Entitlements: Please specify a metering state ID string, ideally a hash to avoid PII.")}h&&(this.Go=ti(Qs(JSON.stringify(h))),n=mt(n,"encodedEntitlementsParams",this.Go)),n=mt(n,"visitFrequency",function(t,s=Date.now()){const i=t[ot],e=(null==i?void 0:i.impressions)||[],n=s-6048e5,r=e.filter(t=>t>=n).length+1;return r>=4?"VISIT_FREQUENCY_FREQUENT":r>=2?"VISIT_FREQUENCY_CASUAL":"VISIT_FREQUENCY_NEW"}(await yi(this.Ss))),n=yt(n),this.Ss.eventManager().logSwgEvent(o.ACTION_GET_ENTITLEMENTS,!1);const a=await this.As.fetchCredentialedJson(n);this.No=a;const l=this.No.entitlements||{},u=a.errorMessages;if(Number(null==u?void 0:u.length)>0)for(const o of u)ut("SwG Entitlements: "+o);return this.parseEntitlements(l)}async getAvailableInterventions(){var t,s;const i=await this.getArticle();return i?(null==(s=null==(t=i.audienceActions)?void 0:t.actions)?void 0:s.filter(t=>Rn.has(t.type)).map(t=>new gn(t,this.Ss)))||[]:(ut("[swg.js:getAvailableInterventions] Article is null."),null)}}function An(t,s){const i=_t(t.hash)["swg.deventitlement"];return void 0===i?s:mt(s,"devEnt",i)}class Cn{constructor(){}getSearch(){return self.window.location.search}}const On=class t{constructor(t=new Cn){this.locationProvider=t}shouldAllowFreeAccess(){const s=t.GOOGLE_REFERERS_PREFIX_LIST.some(t=>self.document.referrer.toLowerCase().startsWith(t)),i=this.getQueryParamsAsMap(),e=i.has(t.HOLDBACK_QUERY_PARAM)&&i.get(t.HOLDBACK_QUERY_PARAM)===t.HOLDBACK_ENABLED_VALUE;return s&&!e}getQueryParamsAsMap(){const t=new URLSearchParams(this.locationProvider.getSearch()),s=new Map;for(const[i,e]of t.entries())s.set(i.toLowerCase(),e.toLowerCase());return s}};On.GOOGLE_REFERERS_PREFIX_LIST=["https://www.google.","android-app://com.google.android.googlequicksearchbox","android-app://com.google.android.googlequicksearchbox/https/www.google.com","ios-app://com.google.app.ios"],On.HOLDBACK_QUERY_PARAM="eafs_enabled",On.HOLDBACK_ENABLED_VALUE="false";let Nn=On;var yn=(t=>(t[t.WAITING_FOR_PING=1]="WAITING_FOR_PING",t[t.LOADING_COMMUNICATION_IFRAME=2]="LOADING_COMMUNICATION_IFRAME",t[t.COMMUNICATION_IFRAME_ESTABLISHED=3]="COMMUNICATION_IFRAME_ESTABLISHED",t[t.TOKEN_UPDATE_IN_PROGRESS=4]="TOKEN_UPDATE_IN_PROGRESS",t[t.YIELDED=5]="YIELDED",t))(yn||{});function vn(t,s){return t.data.type===s}function Pn(t){return"string"==typeof t.data.sessionId&&t.data.sessionId.length>0}class Ln{constructor(t,s,i,e,n){this.doc=t,this.storage=s,this.entitlementsManager=i,this.pageConfig=e,this.eventManager=n,this.state=1,this.gisSource=null,this.iframeLoaded=!1,this.gisReady=!1,this.signInInProgress=!1,this.hasSessionConnection=!1,this.regwallClickPending=!1,this.completeLoginCallback=null,this.messageHandlerBound=this.messageHandler.bind(this),this.doc.getWin().addEventListener("message",this.messageHandlerBound),this.communicationIframeEstablishedPromise=new Promise(t=>{this.communicationIframeEstablishedPromiseResolve=t});const{promise:r,resolve:o}=Promise.withResolvers();this.updatedTokenPromise=r,this.updatedTokenPromiseResolve=o,this.storage.get(et,!1).then(t=>{"true"===t&&(this.hasSessionConnection=!0)})}getState(){return this.state}isConnectionExpected(){return 1!==this.state||this.hasSessionConnection}setRegwallClickPending(t){this.regwallClickPending=t}isRegwallClickPending(){return this.regwallClickPending}setCompleteLoginCallback(t){this.completeLoginCallback=t}async triggerCompleteLogin(t){return!!this.completeLoginCallback&&await this.completeLoginCallback(t)}async yield(){5!==this.state&&(await this.communicationIframeEstablishedPromise,this.eventManager.logSwgEvent(o.EVENT_GIS_INTEROP_YIELD),this.state=5,this.sendIframe({type:"RRM_GIS_YIELD"}))}redirectOk(){this.state=3,this.signInInProgress=!1,this.sendIframe({type:"RRM_GIS_REDIRECT_OK"})}messageHandler(t){1===this.state?this.handleWaitingForPingState(t):2===this.state?this.handleLoadingCommunicationIframeState(t):3===this.state||5===this.state?this.handleCommunicationIframeEstablishedState(t):4===this.state&&this.handleTokenUpdateInProgressState(t)}handleWaitingForPingState(t){var s;if(vn(t,"RRM_GIS_ERROR"))return void this.eventManager.logSwgEvent(o.EVENT_GIS_INTEROP_WAITING_FOR_PING_ERROR);
1if(!vn(t,"RRM_GIS_PING")||!Pn(t))return;this.state=2,this.sessionId=t.data.sessionId,this.gisSource=t.source,this.gisOrigin=t.origin,this.eventManager.logSwgEvent(o.EVENT_GIS_INTEROP_PING_RECEIVED),this.hasSessionConnection=!0,this.storage.set(et,"true",!1),this.sendGis({type:"RRM_GIS_ACK"});const i=(e=Pt("/rrmgisinterop"),n={sessionId:this.sessionId,role:"RRM"},Object.entries(n).reduce((t,[s,i])=>mt(t,s,i),e));var e,n;this.communicationIframe=ts(this.doc.getRootNode(),"iframe",{src:i,tabindex:"-1","aria-hidden":"true"}),as(this.communicationIframe,{width:"0",height:"0",border:"none",position:"absolute",visibility:"hidden"}),null==(s=this.doc.getBody())||s.appendChild(this.communicationIframe)}handleLoadingCommunicationIframeState(t){vn(t,"RRM_GIS_ERROR")?this.eventManager.logSwgEvent(o.EVENT_GIS_INTEROP_LOADING_IFRAME_ERROR):this.invalidSessionId(t)||(vn(t,"RRM_GIS_IFRAME_LOADED_RRM")?(this.sendGis({type:"RRM_GIS_READY_RRM"}),this.iframeLoaded=!0):vn(t,"RRM_GIS_READY_GIS")&&(this.gisReady=!0),this.iframeLoaded&&this.gisReady&&(this.eventManager.logSwgEvent(o.EVENT_GIS_INTEROP_HANDSHAKE_ESTABLISHED),this.state=3,this.communicationIframeEstablishedPromiseResolve()))}async handleCommunicationIframeEstablishedState(t){if(vn(t,"RRM_GIS_ERROR"))this.eventManager.logSwgEvent(o.EVENT_GIS_INTEROP_OPERATION_ERROR);else if(!this.invalidSessionId(t)&&this.fromIframe(t)&&vn(t,"RRM_GIS_TOKEN_UPDATE_START")){this.eventManager.logSwgEvent(o.EVENT_GIS_INTEROP_TOKEN_UPDATE_START),this.state=4;const t=await this.storage.get($,!0);this.sendIframe({type:"RRM_GIS_SWG_USER_TOKEN",swgUserToken:t,publicationId:this.pageConfig.getPublicationId(),gisOrigin:this.gisOrigin})}}async handleTokenUpdateInProgressState(t){var s;vn(t,"RRM_GIS_ERROR")?this.eventManager.logSwgEvent(o.EVENT_GIS_INTEROP_TOKEN_UPDATE_ERROR):!this.invalidSessionId(t)&&this.fromIframe(t)&&vn(t,"RRM_GIS_TOKEN_UPDATED")&&"string"==typeof(s=t).data.swgUserToken&&s.data.swgUserToken.length>0&&(this.eventManager.logSwgEvent(o.EVENT_GIS_INTEROP_TOKEN_UPDATED),this.updatedTokenPromiseResolve(t.data.swgUserToken),this.signInInProgress||(await this.entitlementsManager.updateEntitlements(t.data.swgUserToken),this.state=3,this.sendIframe({type:"RRM_GIS_REDIRECT_OK"})))}sendGis(t){var s;null==(s=this.gisSource)||s.postMessage({...t,sessionId:this.sessionId},{targetOrigin:this.gisOrigin})}sendIframe(t){var s,i;null==(i=null==(s=this.communicationIframe)?void 0:s.contentWindow)||i.postMessage({...t,sessionId:this.sessionId},{targetOrigin:Nt()})}fromIframe(t){var s;return t.source===(null==(s=this.communicationIframe)?void 0:s.contentWindow)}invalidSessionId(t){return!Pn(t)||t.data.sessionId!==this.sessionId}async signIn(){return await this.communicationIframeEstablishedPromise,this.signInInProgress=!0,this.doc.getWin().google.accounts.id.signIn(),this.updatedTokenPromise}}class Gn{constructor(t){this.Fs=t}async error(...t){await 0;const i=function(t){let s=null,i="";for(const e of t)e instanceof Error&&!s?s=Mn(e):(i&&(i+=" "),i+=e);return s?i&&(s.message=i+": "+s.message):s=new Error(i),s}(t);i.reported||(this.Fs.getWin().document.createElement("img").src="".concat(s,"/swg/_/SubscribewithgoogleClientUi/jserror?error=")+encodeURIComponent(String(i))+"&script="+encodeURIComponent("".concat(s,"/swg/js/v1/swg.js"))+"&line="+(i.lineNumber||1)+"&trace="+encodeURIComponent(i.stack||""),i.reported=!0)}}function Mn(t){const s=Object.getOwnPropertyDescriptor(t,"message");if(s&&s.writable)return t;const{lineNumber:i,message:e,reported:n,stack:r}=t,o=new Error(e);return o.lineNumber=i,o.stack=r,o.reported=n,o}const kn="swg-link";class Dn{constructor(t){this.Ss=t,this.Ps=t.activities(),this.ai=t.pageConfig(),this.pi=t.dialogManager()}start(t={}){this.Ss.callbacks().triggerFlowStarted(ws.LINK_ACCOUNT);const s=this.Ss.config().windowOpenMode==bs.REDIRECT,i=t.ampReaderId?Lt({publicationId:this.ai.getPublicationId(),ampReaderId:t.ampReaderId}):Lt({publicationId:this.ai.getPublicationId()}),e=this.Ps.open(kn,Pt("/linkbackstart"),s?"_top":"_blank",i,{});return this.Ss.eventManager().logSwgEvent(o.IMPRESSION_LINK),this.pi.popupOpened(e&&e.targetWin),Promise.resolve()}}class Un{constructor(t,s){this.Ss=t,this.Zo=s,this.di=null,this.sh=null,this.vs=t.
1win(),this.Ps=t.activities(),this.pi=t.dialogManager(),this.Ri=t.entitlementsManager(),this.dr=t.callbacks(),this.Zo||(this.Zo={}),this.ih=new Promise(t=>{this.sh=t})}static configurePending(t){t.activities().onResult(kn,async function(s){t.entitlementsManager().blockNextNotification(),t.callbacks().triggerLinkProgress(),t.dialogManager().popupClosed();try{const i=await Zt(s,Nt(),!1,!1);t.eventManager().logSwgEvent(o.ACTION_LINK_CONTINUE,!0),t.eventManager().logSwgEvent(o.EVENT_LINK_ACCOUNT_SUCCESS),new Un(t,i).start()}catch(i){t.entitlementsManager().unblockNextNotification(),es(i)?(t.eventManager().logSwgEvent(o.ACTION_LINK_CANCEL,!0),t.callbacks().triggerFlowCanceled(ws.LINK_ACCOUNT)):t.eventManager().logSwgEvent(o.ACTION_LINK_CONTINUE,!0)}})}async start(){if(this.Zo.saveAndRefresh)return this.t(this.Zo,!!this.Zo.linked),Promise.resolve();const t=this.Zo.index||"0";return this.di=new us(this.vs,this.Ps,Pt("/linkconfirmiframe",{},"u/"+t),Lt({productId:this.Ss.pageConfig().getProductId(),publicationId:this.Ss.pageConfig().getPublicationId()}),this.Ss.clientConfigManager().getLanguage(),!0),this.eh(),this.Ss.eventManager().logSwgEvent(o.EVENT_GOOGLE_UPDATED,!0),this.Ss.eventManager().logSwgEvent(o.IMPRESSION_GOOGLE_UPDATED,!0),this.pi.openView(this.di)}async eh(){try{const t=await this.di.acceptResultAndVerify(Nt(),!0,!0);this.t(t,!!t.success)}catch(t){this.vs.setTimeout(()=>{throw t})}this.pi.completeView(this.di)}t(t,s){this.Ss.eventManager().logSwgEvent(o.ACTION_GOOGLE_UPDATED_CLOSE,!0);const i=t.swgUserToken;i&&this.Ss.storage().set($,i,!0),this.dr.triggerLinkComplete(),this.dr.resetLinkProgress(),this.Ri.setToastShown(!0),this.Ri.unblockNextNotification(),this.Ri.reset(s),this.sh()}whenComplete(){return this.ih}}class xn{constructor(t,s){this.Ss=t,this.Se=s,this.nh=null,this.di=null,this.openPromise=null,this.vs=t.win(),this.Ps=t.activities(),this.pi=t.dialogManager()}getRequestPromise(){return this.nh}t(){this.pi.completeView(this.di)}async rh(t){if(this.t(),!t.linked)throw ns("not linked");this.pi.popupClosed(),this.Ss.callbacks().triggerFlowStarted(ws.LINK_ACCOUNT),this.Ss.eventManager().logSwgEvent(o.EVENT_SAVE_SUBSCRIPTION_SUCCESS);const s=new Un(this.Ss,t);return await s.start(),this.Ss.callbacks().triggerLinkProgress(),await s.whenComplete(),!0}async oh(t){if(t&&t.getRequested())try{const t=await this.Se(),s=new N;if(null==t?void 0:t.token){if(t.authCode)throw new Error("Both authCode and token are available");s.setToken(t.token)}else{if(!(null==t?void 0:t.authCode))throw new Error("Neither token or authCode is available");s.setAuthCode(t.authCode)}return this.di.execute(s),t}catch(s){throw this.t(),s}}async start(){const t=this.Ps.addDefaultArguments({isClosable:!0});this.di=new us(this.vs,this.Ps,Pt("/linksaveiframe"),t,this.Ss.clientConfigManager().getLanguage(),!1,!0),this.di.on(y,t=>{this.nh=this.oh(t)}),this.openPromise=this.pi.openView(this.di,!0),this.Ss.eventManager().logSwgEvent(o.IMPRESSION_SAVE_SUBSCR_TO_GOOGLE);try{const t=await this.di.acceptResultAndVerify(Nt(),!0,!0);return await this.rh(t)}catch(s){if(this.t(),es(s))return this.Ss.eventManager().logSwgEvent(o.ACTION_SAVE_SUBSCR_TO_GOOGLE_CANCEL,!0),this.Ss.callbacks().triggerFlowCanceled(ws.LINK_ACCOUNT),!1;throw s}}}class Fn{constructor(t){this.Cs=t.eventManager()}sendSubscriptionState(t,s){if(!Bs(Ns,t))throw new Error("Invalid subscription state provided");if((Ns.SUBSCRIBER==t||Ns.PAST_SUBSCRIBER==t)&&!s)throw new Error("Entitlements must be provided for users with active or expired subscriptions");if(s&&!Fs(s))throw new Error("Entitlements must be an Object");let i=null;s&&(i=JSON.stringify(s)),this.Cs.logEvent({eventType:o.EVENT_SUBSCRIPTION_STATE,eventOriginator:u.PUBLISHER_CLIENT,isFromUserAction:null,additionalParameters:{state:t,productsOrSkus:i}})}sendEvent(t){let s=null;if(!Bs(ys,t.name)||!xs(t.name))throw new Error("Invalid user event provided("+t.name+")");if(t.data){if(!Fs(t.data))throw new Error("Event data must be an Object("+t.data+")");s=Object.assign({},s,t.data)}if(Ws(t.active))s||(s={}),Object.assign(s,{is_active:t.active});else if(null!=t.active)throw new Error("Event active must be a boolean");this.Cs.logEvent({eventType:xs(t.name),eventOriginator:u.PUBLISHER_CLIENT,isFromUserAction:t.active,additionalParameters:s})}}class Bn{constructor(t){this.Ss=t,this.openViewPromise=null,this.vs=t.
1win(),this.Ps=t.activities(),this.pi=t.dialogManager(),this.di=new us(this.vs,this.Ps,Pt("/loginiframe"),Lt({publicationId:t.pageConfig().getPublicationId(),productId:t.pageConfig().getProductId(),userConsent:!1}),this.Ss.clientConfigManager().getLanguage(),!0)}async start(){this.Ss.callbacks().triggerFlowStarted(ws.SHOW_LOGIN_NOTIFICATION),this.openViewPromise=this.pi.openView(this.di);try{await this.di.acceptResult()}catch(t){throw this.pi.completeView(this.di),t}this.pi.completeView(this.di)}}class Vn{constructor(t){this.Ss=t,this.openViewPromise=null,this.vs=t.win(),this.Ps=t.activities(),this.pi=t.dialogManager(),this.di=new us(this.vs,this.Ps,Pt("/loginiframe"),Lt({publicationId:t.pageConfig().getPublicationId(),productId:t.pageConfig().getProductId(),userConsent:!0}),this.Ss.clientConfigManager().getLanguage(),!0)}async start(){this.Ss.callbacks().triggerFlowStarted(ws.SHOW_LOGIN_PROMPT),this.openViewPromise=this.pi.openView(this.di);try{await this.di.acceptResult()}catch(t){throw es(t)?this.Ss.callbacks().triggerFlowCanceled(ws.SHOW_LOGIN_PROMPT):this.pi.completeView(this.di),t}this.pi.completeView(this.di)}}class Wn{constructor(t,s){this.Uo=t,this.As=s}getOffers(t=this.Uo.getProductId()){if(!t)throw new Error("getOffers requires productId in config or arguments");return this.Rr(t)}async Rr(t){const s=yt("/publication/"+encodeURIComponent(this.Uo.getPublicationId())+"/offers?label="+encodeURIComponent(t));return(await this.As.fetchCredentialedJson(s)).offers||[]}}class zn{constructor(t,s){let i,e,n;const r=t.indexOf(":");-1!=r?(e=t,i=e.substring(0,r),n=e.substring(r+1)):(i=t,e=null,n=null),this.Ir=i,this.hh=e,this.S=n,this.ah=s}getPublicationId(){return this.Ir}getProductId(){return this.hh}getLabel(){return this.S}isLocked(){return this.ah}}const jn="__SWG-SEEN__",Yn=["CreativeWork","Article","NewsArticle","Blog","Comment","Course","HowTo","Message","Review","WebPage"],Kn=new RegExp(Yn.join("|"));class qn{constructor(t){this.uh=null,this.dh=null,this.Fs=en(t),this.gh=new Promise((t,s)=>{this.uh=t,this.dh=s}),this.ph=new Jn(this.Fs),this.Eh=new Xn(this.Fs),this._h=new $n(this.Fs)}resolveConfig(){return Promise.resolve().then(this.check.bind(this)),this.Fs.whenReady().then(this.check.bind(this)),this.gh}check(){if(!this.uh||!this.dh)return null;const t=this.ph.check()||this.Eh.check()||this._h.check();return t?(this.uh(t),this.uh=null,this.dh=null):this.Fs.isReady()&&(this.dh("No config could be discovered in the page"),this.uh=null,this.dh=null),at(t),t}}class Hn{checkValue(t,s){return!("string"!=typeof t&&!Array.isArray(t))&&this.mh(this.fh(t),s)}checkSpaceDelimitedList(t,s){const i=t.split(/\s+/);return this.mh(i,s)}mh(t,s){for(let i of t)if(i=i.replace(/^http:\/\/schema.org\//i,""),s.includes(i))return!0;return!1}fh(t){return Array.isArray(t)?t:[t]}}class Jn{constructor(t){this.Fs=t}check(){if(!this.Fs.getBody())return null;const t=Qn(this.Fs.getRootNode(),"subscriptions-product-id");if(!t)return null;const s=Qn(this.Fs.getRootNode(),"subscriptions-accessible-for-free"),i=!(!s||"false"!==s.toLowerCase());return new zn(t,i)}}class Xn{constructor(t){this.Fs=t,this.wh=new Hn}check(){if(!this.Fs.getBody())return null;const t=this.Fs.isReady(),s=Array.from(this.Fs.getRootNode().querySelectorAll('script[type="application/ld+json"]'));for(let i=0;i<s.length;i++){const e=s[i];if(e[jn]||!e.textContent||!t&&!is(e))continue;if(e[jn]=!0,!Kn.test(e.textContent))continue;const n=this.Ih(e);if(n)return n}return null}Ih(t){let s=si(t.textContent);if(!s)return null;Array.isArray(s)||(s=[s]);let i=s;for(let e=0;e<i.length;e++){const t=i[e];if(t["@graph"]&&Array.isArray(t["@graph"])&&(i=i.concat(t["@graph"])),!this.wh.checkValue(t["@type"],Yn))continue;let s=null;const n=this.bh(t,"isPartOf");if(n)for(let i=0;i<n.length&&(s=this.Th(n[i]),!s);i++);if(!s)continue;const r=this.Rh(this.Sh(t,"isAccessibleForFree"),!0);return new zn(s,!r)}return null}Rh(t,s){if("boolean"==typeof t)return t;if("string"==typeof t){const s=t.toLowerCase();if("false"===s)return!1;if("true"===s)return!0}return s}Th(t){return this.wh.checkValue(t["@type"],["Product"])?this.Sh(t,"productID"):null}bh(t,s){const i=t[s];return null==i||""===i?null:Array.isArray(i)?i:[i]}Sh(t,s){const i=this.bh(t,s),e=i&&i[0];return null==e||""===e?null:e}}class $n{constructor(t){this.Fs=t,this.Ah=null,this.hh=null,this.wh=new Hn}Ch(t){const s=t.querySelectorAll("[itemprop='isAccessibleForFree']");for(let i=0;s[i];i++){const t=s[i],e=t.getAttribute("content")||t.textContent;if(e&&this.Oh(t,"alreadySeenForAccessInfo")){let t=null;return"true"===e.toLowerCase()?t=!0:"false"===e.toLowerCase()&&(t=!1),t}}return null}Oh(t,s){for(let i=t;i&&!i[s];i=i.parentNode)if(i[s]=!0,i.hasAttribute&&i.hasAttribute("itemscope")&&i.hasAttribute("itemtype")){const t=i.getAttribute("itemtype");return this.wh.checkSpaceDelimitedList(t,Yn)}return!1}Th(t){const s=t.querySelectorAll('[itemprop="productID"]');for(let i=0;s[i];i++){const t=s[i],e=t.getAttribute("content")||t.textContent,n=t.closest("[itemtype][itemscope]");if(!(n.getAttribute("itemtype").indexOf("http://schema.org/Product")<=-1)&&this.Oh(n.parentElement,"alreadySeenForProductInfo"))return e}return null}Nh(){let t=null;return null!=this.Ah?t=!this.Ah:this.Fs.isReady()&&(t=!1),null!=this.hh&&null!=t?new zn(this.hh,t):null}Ih(){const t=Array.prototype.slice.call(this.Fs.getRootNode().querySelectorAll("[itemscope][itemtype]")).filter(t=>this.wh.checkSpaceDelimitedList(t.getAttribute("itemtype"),Yn));for(const s of t){null==this.Ah&&(this.Ah=this.Ch(s)),this.hh||(this.hh=this.Th(s));const t=this.Nh();if(t)return t}return null}check(){return this.Fs.getBody()?this.Ih():null}}function Qn(t,s){const i=t.querySelector('meta[name="'.concat(s,'"]'));return i?i.getAttribute("content"):null}const Zn=se(we),tr=2147483647,sr={Environment:{LOCAL:"LOCAL",PREPROD:"PREPROD",PRODUCTION:"PRODUCTION",SANDBOX:"SANDBOX",TEST:"TEST",TIN:"TIN"}
1,PaymentMethod:{CARD:"CARD",TOKENIZED_CARD:"TOKENIZED_CARD",UPI:"UPI"},AuthMethod:{CRYPTOGRAM_3DS:"CRYPTOGRAM_3DS",PAN_ONLY:"PAN_ONLY"},ResponseStatus:{CANCELED:"CANCELED",DEVELOPER_ERROR:"DEVELOPER_ERROR"},TotalPriceStatus:{ESTIMATED:"ESTIMATED",FINAL:"FINAL",NOT_CURRENTLY_KNOWN:"NOT_CURRENTLY_KNOWN"},ButtonType:{SHORT:"short",LONG:"long"},ButtonColor:{DEFAULT:"default",BLACK:"black",WHITE:"white"},Id:{POPUP_WINDOW_CONTAINER:"popup-window-container"},STORAGE_KEY_PREFIX:"google.payments.api.storage"};sr.IS_READY_TO_PAY_RESULT_KEY=sr.STORAGE_KEY_PREFIX+".isreadytopay.result",sr.UPI_CAN_MAKE_PAYMENT_CACHE_KEY=sr.STORAGE_KEY_PREFIX+".upi.canMakePaymentCache",sr.CLASS_PREFIX="google-payments-",sr.IFRAME_ACTIVE_CONTAINER_CLASS="".concat(sr.CLASS_PREFIX,"activeContainer"),sr.IFRAME_CONTAINER_CLASS="".concat(sr.CLASS_PREFIX,"dialogContainer"),sr.IFRAME_STYLE_CENTER_CLASS="".concat(sr.CLASS_PREFIX,"dialogCenter"),sr.IFRAME_STYLE_CLASS="".concat(sr.CLASS_PREFIX,"dialog"),sr.IFRAME_STYLE="\n.".concat(sr.IFRAME_STYLE_CLASS," {\n    animation: none 0s ease 0s 1 normal none running;\n    background: none 0 0 / auto repeat scroll padding-box border-box #fff;\n    background-blend-mode: normal;\n    border: 0 none #333;\n    border-radius: 8px 8px 0 0;\n    border-collapse: separate;\n    bottom: 0;\n    box-shadow: #808080 0 3px 0 0, #808080 0 0 22px;\n    box-sizing: border-box;\n    letter-spacing: normal;\n    max-height: 100%;\n    overflow: visible;\n    position: fixed;\n    width: 100%;\n    z-index: ").concat(tr,";\n    -webkit-appearance: none;\n    left: 0;\n}\n@media (min-width: 480px) {\n  .").concat(sr.IFRAME_STYLE_CLASS," {\n    width: 480px !important;\n    left: -240px !important;\n    margin-left: calc(100vw - 100vw / 2) !important;\n  }\n}\n.").concat(sr.IFRAME_CONTAINER_CLASS," {\n  background-color: rgba(0,0,0,0.26);\n  bottom: 0;\n  height: 100%;\n  left: 0;\n  position: absolute;\n  right: 0;\n}\n.iframeContainer {\n  -webkit-overflow-scrolling: touch;\n}\n"),sr.IFRAME_STYLE_CENTER="\n.".concat(sr.IFRAME_STYLE_CENTER_CLASS," {\n  animation: none 0s ease 0s 1 normal none running;\n  background-blend-mode: normal;\n  background: none 0 0 / auto repeat scroll padding-box border-box #fff;\n  border-collapse: separate;\n  border-radius: 8px;\n  border: 0px none #333;\n  bottom: auto;\n  box-shadow: #808080 0 0 22px;\n  box-sizing: border-box;\n  left: -240px;\n  letter-spacing: normal;\n  margin-left: calc(100vw - 100vw / 2) !important;\n  max-height: 90%;\n  overflow: visible;\n  position: absolute;\n  top: 100%;\n  transform: scale(0.8);\n  width: 480px;\n  z-index: ").concat(tr,";\n  -webkit-appearance: none;\n}\n@media (min-height: 667px) {\n  .").concat(sr.IFRAME_STYLE_CENTER_CLASS," {\n    max-height: 600px;\n  }\n}\n.").concat(sr.IFRAME_ACTIVE_CONTAINER_CLASS," {\n  top: 50%;\n  transform: scale(1.0) translateY(-50%);\n}\n"),sr.GPAY_BUTTON_WITH_CARD_INFO_IMAGE="background-image: url(https://pay.google.com/gp/p/generate_gpay_btn_img);",sr.BUTTON_LOCALE_TO_MIN_WIDTH={en:152,bg:163,cs:192,de:183,es:183,fr:183,hr:157,id:186,ja:148,ko:137,ms:186,nl:167,pl:182,pt:193,ru:206,sk:157,sl:211,sr:146,tr:161,uk:207,zh:156},sr.GPAY_GRAYPANE="gpay-graypane",sr.GPAY_BUTTON_CLASS="gpay-button",sr.BUTTON_STYLE="\n.".concat(sr.GPAY_BUTTON_CLASS," {\n  background-origin: content-box;\n  background-position: center center;\n  background-repeat: no-repeat;\n  background-size: contain;\n  border: 0px;\n  border-radius: 4px;\n  box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 1px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;\n  cursor: pointer;\n  height: 40px;\n  min-height: 40px;\n  padding: 11px 24px;\n}\n\n.").concat(sr.GPAY_BUTTON_CLASS,".black {\n  background-color: #000;\n  box-shadow: none;\n  padding: 12px 24px 10px;\n}\n\n.").concat(sr.GPAY_BUTTON_CLASS,".white {\n  background-color: #fff;\n}\n\n.").concat(sr.GPAY_BUTTON_CLASS,".short {\n  min-width: 90px;\n  width: 160px;\n}\n\n.").concat(sr.GPAY_BUTTON_CLASS,".black.short {\n  background-image: url(https://www.gstatic.com/instantbuy/svg/dark_gpay.svg);\n}\n\n.").concat(sr.GPAY_BUTTON_CLASS,".white.short {\n  background-image: url(https://www.gstatic.
1com/instantbuy/svg/light_gpay.svg);\n}\n\n.").concat(sr.GPAY_BUTTON_CLASS,".black.active {\n  background-color: #5f6368;\n}\n\n.").concat(sr.GPAY_BUTTON_CLASS,".black.hover {\n  background-color: #3c4043;\n}\n\n.").concat(sr.GPAY_BUTTON_CLASS,".white.active {\n  background-color: #fff;\n}\n\n.").concat(sr.GPAY_BUTTON_CLASS,".white.focus {\n  box-shadow: #e8e8e8 0 1px 1px 0, #e8e8e8 0 1px 3px;\n}\n\n.").concat(sr.GPAY_BUTTON_CLASS,".white.hover {\n  background-color: #f8f8f8;\n}\n"),sr.GPAY_BUTTON_WITH_OFFER_ICON_ADDITIONAL_STYLE="position: relative;",sr.GPAY_OFFER_ICON_CLASS="gpay-offer-icon",sr.GPAY_OFFER_ICON_SVG='<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="gpay-offer-icon"><defs><path d="M19.41,9.58 L10.41,0.58 C10.05,0.22 9.55,0 9,0 L2,0 C0.9,0 0,0.9 0,2 L0,9 C0,9.55 0.22,10.05 0.59,10.42 L9.59,19.42 C9.95,19.78 10.45,20 11,20 C11.55,20 12.05,19.78 12.41,19.41 L19.41,12.41 C19.78,12.05 20,11.55 20,11 C20,10.45 19.77,9.94 19.41,9.58 Z" id="path-1"></path></defs><g id="buttons_10.05" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Artboard" transform="translate(-40.000000, -43.000000)"><g id="Group-3" transform="translate(40.000000, 43.000000)"><g id="Group-2-Copy-2"><g id="Group-Copy"><g id="ic_loyalty_24px"><mask id="mask-2" fill="white"><use xlink:href="#path-1"></use></mask><use id="gpay-Shape" fill="#FF6100" fill-rule="nonzero" xlink:href="#path-1"></use><path d="M3.5,5 C2.67,5 2,4.33 2,3.5 C2,2.67 2.67,2 3.5,2 C4.33,2 5,2.67 5,3.5 C5,4.33 4.33,5 3.5,5 Z" id="Path" fill="#FFFFFF" fill-rule="nonzero" mask="url(#mask-2)"></path></g></g></g><g id="Group-13-Copy-7" transform="translate(6.000000, 6.000000)" fill="#FFFFFF" fill-rule="nonzero"><g id="Group-13-Copy-2"><path d="M2.15217391,4.55172414 C0.963561082,4.55172414 1.99840144e-14,3.53278598 1.99840144e-14,2.27586207 C1.99840144e-14,1.01893816 0.963561082,6.30606678e-14 2.15217391,6.30606678e-14 C3.34078674,6.30606678e-14 4.30434783,1.01893816 4.30434783,2.27586207 C4.30434783,3.53278598 3.34078674,4.55172414 2.15217391,4.55172414 Z M2.15217391,3.31034483 C2.69245247,3.31034483 3.13043478,2.84719112 3.13043478,2.27586207 C3.13043478,1.70453302 2.69245247,1.24137931 2.15217391,1.24137931 C1.61189535,1.24137931 1.17391304,1.70453302 1.17391304,2.27586207 C1.17391304,2.84719112 1.61189535,3.31034483 2.15217391,3.31034483 Z" id="Combined-Shape"></path><path d="M6.84782609,9 C5.65921326,9 4.69565217,7.98106184 4.69565217,6.72413793 C4.69565217,5.46721402 5.65921326,4.44827586 6.84782609,4.44827586 C8.03643892,4.44827586 9,5.46721402 9,6.72413793 C9,7.98106184 8.03643892,9 6.84782609,9 Z M6.84782609,7.75862069 C7.38810465,7.75862069 7.82608696,7.29546698 7.82608696,6.72413793 C7.82608696,6.15280888 7.38810465,5.68965517 6.84782609,5.68965517 C6.30754753,5.68965517 5.86956522,6.15280888 5.86956522,6.72413793 C5.86956522,7.29546698 6.30754753,7.75862069 6.84782609,7.75862069 Z" id="Combined-Shape"></path><polygon id="Rectangle" transform="translate(4.497720, 4.541938) rotate(34.000000) translate(-4.497720, -4.541938) " points="3.77901778 -0.202295978 4.9740273 -0.171019161 5.21642263 9.28617278 4.02141311 9.25489596"></polygon></g></g></g></g></g></svg>',sr.GPAY_OFFER_ICON_STYLE="\n.".concat(sr.GPAY_OFFER_ICON_CLASS," {\n  position: absolute;\n  right: -5px;\n  top: -5px;\n}\n\n#ic_loyalty_24px use.hover {\n  fill: #FC853B;\n}\n"),sr.GPAY_OFFER_DESCRIPTION_CLASS="gpay-offer-description",sr.GPAY_OFFER_DESCRIPTION_STYLE="\n@import url(//fonts.googleapis.com/css?family=Google+Sans:500);\n.".concat(sr.GPAY_OFFER_DESCRIPTION_CLASS," {\n  text-align: center;\n  font: 10px 'Google Sans';\n  margin-top: 2px;\n  margin-bottom: 0px;\n}\n\n.").concat(sr.GPAY_OFFER_DESCRIPTION_CLASS,".gpay-btn-clicked {\n  color: #3C4043;\n}\n\n.").concat(sr.GPAY_OFFER_DESCRIPTION_CLASS,".short {\n  min-width: 90px;\n  width: 160px;\n}\n\n.").concat(sr.GPAY_OFFER_DESCRIPTION_CLASS,".long {\n  min-width: 152px;\n  width: 240px;\n}\n"),sr.GPAY_BUTTON_CARD_INFO_CLASS="gpay-card-info-btn",sr.GPAY_BUTTON_CARD_INFO_BUTTON_STYLE="\n  .".concat(sr.GPAY_BUTTON_CARD_INFO_CLASS," {\n    background-origin: content-box;\n    background-position: center center;\n    background-repeat: no-repeat;\n    background-size: contain;\n    border: 0px;\n    border-radius: 4px;\n    box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 1px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;\n    cursor: pointer;\n    height: 40px;\n    min-height: 40px;\n    padding: 11px 24px;\n    background-color: #000;\n    box-shadow: none;\n    padding: 9px 24px 10px;\n    min-width: 190px;\n    width: 240px;\n  }\n\n  .").concat(sr.GPAY_BUTTON_CARD_INFO_CLASS,".active {\n    background-color: #5f6368;\n  }\n\n  .").concat(sr.GPAY_BUTTON_CARD_INFO_CLASS,".hover {\n    background-color: #3c4043;\n  }\n  "),sr.TRUSTED_DOMAIN=".google.com";class ir{constructor(t){this.yh=t}postMessage(t,s){this.yh.postMessage(t,s)}}let er=null,nr=null,rr=null,or=null,hr=Date.now(),ar=null,lr=!1,ur=[];class cr{static load(){if(er)return;const t=window.gpayInitParams||{};rr=t.environment||sr.Environment.PRODUCTION,er=document.createElement("iframe"),er.src=cr.Ph(window.location.origin,t.merchantInfo&&t.merchantInfo.merchantId),cr.postMessage({eventType:15,clientLatencyStartMs:Date.now()}),er.height="0",er.width="0",er.style.display="none",er.style.visibility="hidden",er.onload=function(){cr.postMessage({eventType:17,clientLatencyStartMs:Date.now()}),cr.iframeLoaded()},document.body?cr.Lh():document.addEventListener("DOMContentLoaded",()=>cr.Lh())}static Lh(){document.body.appendChild(er),nr=new ir(er.contentWindow)}static sendAndWaitForResponse(t,s,i,e){cr.Gh(function t(s){s.data[i]&&(e(s),cr.Mh(t))});const n=Object.assign({eventType:s},t);cr.postMessage(n)}static Gh(t){window.addEventListener("message",t)}static Mh(t){window.removeEventListener("message",t)}static postMessage(t){if(!lr)return void ur.push(t);const s=Object.assign({buyFlowActivityMode:ar,googleTransactionId:or,originTimeMs:hr},t);nr.postMessage(s,cr.kh())}static setBuyFlowActivityMode(t){ar=t}static setGoogleTransactionId(t){or=t}static setOriginTimeMs(t){hr=t}static setPostMessageService(t){nr=t}static reset(){er=null,ur.length=0,lr=!1,ar=null}static setIframeLoaded(t){lr=t}static iframeLoaded(){lr=!0,ur.forEach(function(t){cr.postMessage(t)}),ur.length=0}static getBuffer(){return ur}static injectIframeForTesting(){cr.reset(),er=document.createElement("p"),cr.iframeLoaded()}static kh(){let t="https://pay";return rr==sr.Environment.SANDBOX?t+=".sandbox":rr==sr.Environment.PREPROD&&(t+="-preprod.sandbox"),t+".google.com"}static Ph(t,s){return"https://pay".concat(rr==sr.Environment.PREPROD?"-preprod.sandbox":rr==sr.Environment.SANDBOX?".sandbox":"",".google.com/gp/p/ui/payframe?origin=").concat(t,"&mid=%{merchantId}")}}class dr{constructor(t){this.Dh=t,this.Se=null}onResult(t){this.Se=t}isReadyToPay(t){const s=this.Uh(t);return new Promise((i,e)=>{s.canMakePayment().then(s=>{window.sessionStorage.setItem(sr.IS_READY_TO_PAY_RESULT_KEY,s.toString());const e={result:s};t.apiVersion>=2&&t.existingPaymentMethodRequired&&(e.paymentMethodPresent=s),i(e)}).catch(function(t){window.sessionStorage.getItem(sr.IS_READY_TO_PAY_RESULT_KEY)?i({result:"true"==window.sessionStorage.getItem(sr.IS_READY_TO_PAY_RESULT_KEY)}):i({result:!1})})})}prefetchPaymentData(t){this.Uh(t,this.Dh,t.transactionInfo.currencyCode,t.transactionInfo.totalPrice)}loadPaymentData(t){this.xh(t)}Uh(t,s,i,e){let n={};return t&&(n=JSON.parse(JSON.stringify(t))),n.apiVersion||(n.apiVersion=1),n.swg&&(n.allowedPaymentMethods=[sr.PaymentMethod.CARD]),s&&s==sr.Environment.TEST&&(n.environment=s),new PaymentRequest([{supportedMethods:["https://google.com/pay"],data:n}],{total:{label:"Estimated Total Price",amount:{currency:i||"USD",value:e||"0"}}})}xh(t){const s=t.transactionInfo&&t.transactionInfo.currencyCode||void 0,i=t.transactionInfo&&t.transactionInfo.totalPrice||void 0,e=this.Uh(t,this.Dh,s,i);this.Se(e.show().then(t=>
1(t.complete("success"),t.details)).catch(function(t){throw t.statusCode=sr.ResponseStatus.CANCELED,t}))}}class gr{constructor(t){this.Fs=t,this.Fh=t.createElement(sr.GPAY_GRAYPANE),pr(this.Fh,{"z-index":2147483647,display:"none",position:"fixed",top:0,right:0,bottom:0,left:0,"background-color":"rgba(32, 33, 36, .6)"}),this.Bh=null,this.Fh.addEventListener("click",()=>{if(this.Bh)try{this.Bh.focus()}catch(t){}})}show(t){return this.Bh=t||null,this.Fs.body.appendChild(this.Fh),pr(this.Fh,{display:"block",opacity:0}),Er(this.Fh,{opacity:1},300,"ease-out")}hide(){if(this.Bh=null,this.Fh.parentElement)return Er(this.Fh,{opacity:0},300,"ease-out").then(()=>{pr(this.Fh,{display:"none"}),this.Fs.body.removeChild(this.Fh)})}}function pr(t,s){for(const i in s)t.style.setProperty(i,s[i].toString(),"important")}function Er(t,s,i,e){const n=t.ownerDocument.defaultView,r=t.style.transition||"";return new Promise(r=>{n.setTimeout(()=>{n.setTimeout(r,i);const o="".concat(i,"ms ").concat(e);pr(t,Object.assign({transition:"transform ".concat(o,", opacity ").concat(o)},s))})}).then(()=>{pr(t,Object.assign({transition:r},s))})}function _r(){if(-1!=window.navigator.userAgent.indexOf("OPR/"))return!1;const t=window.navigator.userAgent.match(/Android/i),s=window.navigator.userAgent.match(/Chrome\/([0-9]+)\./i);return null!=t&&"PaymentRequest"in window&&"Google Inc."==window.navigator.vendor&&null!=s&&Number(s[1])>=59}function mr(t){if(t.apiVersion>=2){const s=Sr(t);if(s&&1==s.length&&s[0]==sr.AuthMethod.CRYPTOGRAM_3DS)return!0}return 1==t.allowedPaymentMethods.length&&t.allowedPaymentMethods[0]==sr.PaymentMethod.TOKENIZED_CARD}function fr(t,s){if(t.apiVersion>=2){const i=Sr(t);return!(!i||!i.includes(s))}return!1}function wr(){return window.location.hostname.endsWith(sr.TRUSTED_DOMAIN)||void 0===window.isSecureContext||window.isSecureContext?null:"Google Pay APIs should be called in secure context!"}function Ir(t){return Object.values(sr.PaymentMethod).includes(t)}function br(t){return Object.values(sr.AuthMethod).includes(t)}function Tr(t){if(!t)return"paymentDataRequest must be set!";if(t.swg)return(s=t.swg)?s.skuId&&s.publicationId?null:"Both skuId and publicationId must be provided":"Swg parameters must be provided";var s;if(!t.transactionInfo)return"transactionInfo must be set!";if(!t.transactionInfo.currencyCode)return"currencyCode in transactionInfo must be set!";if(!t.transactionInfo.totalPriceStatus||!Object.values(sr.TotalPriceStatus).includes(t.transactionInfo.totalPriceStatus))return"totalPriceStatus in transactionInfo must be set to one of NOT_CURRENTLY_KNOWN, ESTIMATED or FINAL!";if("NOT_CURRENTLY_KNOWN"!==t.transactionInfo.totalPriceStatus&&!t.transactionInfo.totalPrice)return"totalPrice in transactionInfo must be set when totalPriceStatus is ESTIMATED or FINAL!";const i=Rr(t);if(i){if(!i.parameters)return"parameters must be set in allowedPaymentMethod!";var e=i.parameters;if(!e.payeeVpa)return"payeeVpa in allowedPaymentMethod parameters must be set!";if(!e.payeeName)return"payeeName in allowedPaymentMethod parameters must be set!";if(!e.referenceUrl)return"referenceUrl in allowedPaymentMethod parameters must be set!";if(!e.mcc)return"mcc in allowedPaymentMethod parameters must be set!";if(!e.transactionReferenceId)return"transactionReferenceId in allowedPaymentMethod parameters must be set!";if("INR"!==t.transactionInfo.currencyCode)return"currencyCode in transactionInfo must be set to INR!";if("FINAL"!==t.transactionInfo.totalPriceStatus)return"totalPriceStatus in transactionInfo must be set to FINAL!";if(!t.transactionInfo.transactionNote)return"transactionNote in transactionInfo must be set!"}return null}function Rr(t){return!_r()||t.apiVersion<2||!t.allowedPaymentMethods?null:Ar(t,sr.PaymentMethod.UPI)}function Sr(t){if(t.allowedPaymentMethods){const s=Ar(t,sr.PaymentMethod.CARD);if(s&&s.parameters)return s.parameters.allowedAuthMethods}return null}function Ar(t,s){for(var i=0;i<t.allowedPaymentMethods.length;i++){const e=t.allowedPaymentMethods[i];if(e.type==s)return e}return null}const{ActivityPort:Cr,ActivityPorts:Or,ActivityIframePort:Nr}=Zn,yr="GPAY",vr="height ".concat(250,"ms"),Pr="Safari";class Lr{constructor(t,s,i,e,n){this.Dh=t,this.activities=e||new Or(window),this.Gr=new gr(window.document),this.Se=null,this.Vh=null,this.Wh=!1,this.Us=null,this.jh=null,this.Yh=s,this.Kh=n||null,this.qh=null}onResult(t){this.Se||(this.Se=t,this.activities.onResult(yr,this.Hh.bind(this)))}Hh(t){this.Gr.hide(),this.Se(t.acceptResult().then(t=>{if(t.origin!=this.Jh())throw new Error("channel mismatch");const s=t.data;if(s.redirectEncryptedCallbackData)return cr.setBuyFlowActivityMode(3),this.Xh(s.redirectEncryptedCallbackData).then(t=>{const i=Object.assign({},s);return delete i.redirectEncryptedCallbackData,Object.assign(i,t)});if(!t.originVerified||!t.secureChannel)throw new Error("channel mismatch");return s},t=>{const s=t.message;let i=t.message;try{i=JSON.parse(s.substring(7))}catch(e){}return i.statusCode&&-1==["DEVELOPER_ERROR","MERCHANT_ACCOUNT_ERROR"].indexOf(i.statusCode)&&(i={statusCode:"CANCELED"}),"AbortError"==i&&(i={statusCode:"CANCELED"}),Promise.reject(i)}))}Xh(t){return new Promise((s,i)=>{const e=this.$h(),n=new XMLHttpRequest;
1n.open("POST",e,!0),"withCredentials"in n&&(n.withCredentials=!0),n.onreadystatechange=()=>{if(!(n.readyState<2)){if(n.status<100||n.status>599)return n.onreadystatechange=null,void i(new Error("Unknown HTTP status ".concat(n.status)));if(4==n.readyState)try{s(JSON.parse(n.responseText))}catch(t){i(t)}}},n.onerror=()=>{i(new Error("Network failure"))},n.onabort=()=>{i(new Error("Request aborted"))},n.send(t)})}isReadyToPay(t){return new Promise((s,i)=>{if(mr(t))return void s({result:!1});const e=window.navigator.userAgent;if(e.indexOf("GSA/")>0&&e.indexOf(Pr)>0)return void s({result:!1});if(e.indexOf("FxiOS")>0)return void s({result:!1});const n=e.indexOf("Chrome")>0||e.indexOf("Firefox")>0||e.indexOf(Pr)>0;n&&t.apiVersion>=2&&t.existingPaymentMethodRequired?(t.environment=this.Dh,cr.sendAndWaitForResponse(t,6,"isReadyToPayResponse",i=>{const e={result:n};t.existingPaymentMethodRequired&&(e.paymentMethodPresent="READY_TO_PAY"==i.data.isReadyToPayResponse),s(e)})):s({result:n})})}prefetchPaymentData(t){}loadPaymentData(t){t.swg||t.apiVersion||(t.apiVersion=1),t.environment=this.Dh,cr.setBuyFlowActivityMode(t.forceRedirect?3:2);const s=this.activities.open(yr,this.Qh(this.Zh(t)),this.sa(t),t,{width:600,height:600});this.Gr.show(s&&s.targetWin)}sa(t){return t.forceRedirect?"_top":"gp-js-popup"}Jh(){if(this.Dh==sr.Environment.LOCAL)return"";let t;return t=this.Dh==sr.Environment.PREPROD?"pay-preprod.sandbox":this.Dh==sr.Environment.SANDBOX?"pay.sandbox":"pay","https://"+t+".google.com"}ia(){return this.Jh()+"/gp/p"}$h(){let t=this.ia()+"/apis/buyflow/process";
1return this.Kh&&(t+="?rk="+encodeURIComponent(this.Kh)),t}Zh(t){const s=t.swg;if(s)return s.swgVersion}Qh(t){if(this.Dh==sr.Environment.TIN)return"/ui/pay";let s=this.ia()+"/ui/pay?swg=true";return t&&(s=s+"&swgVersion="+t),s}getIframeUrl(t,s,i){let e="https://pay.google.com/gp/p/ui/pay?origin=".concat(s,"&swg=true");return t!=sr.Environment.SANDBOX&&t!=sr.Environment.PREPROD||(e="https://pay'+  (environment == Constants.Environment.PREPROD ? '-preprod' : '')+  '.sandbox.google.com/gp/p/ui/pay?origin=".concat(s,"&swg=true")),i&&(e=e+"&swgVersion="+i),e}ea(t,s){this.na(s,"all 250ms ease 0s"),s.height="0px",setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t)},250)}ra(t){const s=function(t){const s=document.createElement("div");s.classList.add(sr.IFRAME_CONTAINER_CLASS);const i=document.createElement("div");i.classList.add("iframeContainer");const e=document.createElement("iframe");return e.classList.add(t),e.setAttribute("frameborder","0"),e.setAttribute("scrolling","no"),i.appendChild(e),s.appendChild(i),document.body.appendChild(s),{container:s,iframe:e}}(this.oa(t)?sr.IFRAME_STYLE_CENTER_CLASS:sr.IFRAME_STYLE_CLASS),i=s.iframe,e=s.container;return e.addEventListener("click",this.ha.bind(this,s)),e.style.display="none",i.style.display="none",i.height="0px",this.na(i,"all 250ms ease 0s"),this.Wh=!1,s}aa(t){this.la(t)}ha(t){t.container.parentNode&&history.back()}la(t){t.container.parentNode&&(this.jh(Promise.reject({errorCode:"CANCELED"})),this.ea(t.container,t.iframe),this.Us&&this.Us.disconnect())}oa(t){return null}ua(t,s,i){t.style.display="block",s.style.display="block",setTimeout(()=>{s.height="280px",this.oa(i)&&s.classList.add(sr.IFRAME_ACTIVE_CONTAINER_CLASS),setTimeout(()=>{this.Wh=!0,this.qh&&(this.na(s,this.qh.transition),s.height=this.qh.height,this.qh=null)},250)},1)}na(t,s){t.style.setProperty("transition",s),t.style.setProperty("-webkit-transition",s)}ca(t,s,i){let e;i.swg||i.apiVersion||(i.apiVersion=1),i.environment=this.Dh;const n=this.getIframeUrl(this.Dh,window.location.origin,this.Zh(i));return this.activities.openIframe(s,n,i).then(t=>(this.Us=t,t.onMessage(t=>{"resize"===t.type&&this.Wh?(e||(e=Date.now()),Date.now()<e+250?this.na(s,t.transition+", "+vr):this.na(s,t.transition),s.height=t.height):this.qh={height:t.height,transition:t.transition}}),t.acceptResult())).then(i=>(this.ea(t,s),history.back(),i.data),i=>(this.ea(t,s),history.back(),Promise.reject(i)))}}class Gr{constructor(){}isUpiRequest(t){return!!Rr(t)}isReadyToPay(t){if(Rr(t))return t.existingPaymentMethodRequired?Promise.resolve({result:!0,paymentMethodPresent:!0}):Promise.resolve({result:!0});throw new Error("No Upi payment method found in handler")}loadPaymentData(t,s,i){const e=s.parameters,n=t.transactionInfo,r=[{supportedMethods:["https://tez.google.com/pay"],data:{pa:e.payeeVpa,pn:e.payeeName,tr:e.transactionReferenceId,url:e.referenceUrl,mc:e.mcc,tn:n.transactionNote}}];e.transactionId&&(r[0].data.tid=e.transactionId);const o={total:{label:"Total",amount:{currency:n.currencyCode,value:n.totalPrice}},displayItems:[{label:"Original Amount",amount:{currency:n.currencyCode,value:n.totalPrice}}]};let h=new PaymentRequest(r,o);i(this.Ea(h).then(t=>t?this._a(h):this.ma()).then(i=>this.fa(i,t,s)).catch(t=>(t.statusCode=sr.ResponseStatus.CANCELED,Promise.reject(t))))}_a(t){return t.show().then(t=>(t.complete("success"),t.details))}Ea(t){const s=window.sessionStorage.getItem(sr.UPI_CAN_MAKE_PAYMENT_CACHE_KEY);return s?Promise.resolve("true"===s):t.canMakePayment?t.canMakePayment().then(t=>(t&&window.sessionStorage.setItem(sr.UPI_CAN_MAKE_PAYMENT_CACHE_KEY,t.toString()),t)):Promise.resolve(!0)}ma(){return window.location.replace("https://play.google.com/store/apps/details?id=com.google.android.apps.nbu.paisa.user"),Promise.reject({errorMessage:"Cannot redirect to Tez page in Google Play."})}fa(t,s,i){const e=JSON.parse(t.tezResponse);if("FAILURE"===e.Status){let t;switch(e.responseCode){case"ZM":t={errorCode:3,errorMessage:"Payment failure due to invalid MPIN."};break;case"Z9":t={errorCode:3,errorMessage:"Payment failure due to insufficient funds."};break;case"91":t={errorCode:1,errorMessage:"Payment failure due to transaction timeout or connection issue."};break;default:t={errorMessage:"Payment cancelled."}}return Promise.reject(t)}const n={paymentMethodType:"UPI",payeeVpa:i.parameters.payeeVpa,status:e.Status,transactionReferenceId:i.parameters.transactionReferenceId,transactionId:i.parameters.transactionId?i.parameters.transactionId:e.txnId,transactionInfo:s.transactionInfo};let r={apiVersion:s.apiVersion,apiVersionMinor:s.apiVersionMinor,paymentMethodData:{type:i.type,tokenizationData:{type:"DIRECT",token:{protocolVersion:"ECv1",signature:"",signedMessage:n}}}};return Promise.resolve(r)}}class Mr{}var kr="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");Mr.uuid=function(t,s){var i,e,n=kr,r=[];if(s=s||n.length,t)for(i=0;i<t;i++)r[i]=n[0|Math.random()*s];else for(r[8]=r[13]=r[18]=r[23]="-",r[14]="4",i=0;i<36;
1i++)r[i]||(e=0|16*Math.random(),r[i]=n[19==i?3&e|8:e]);return r.join("")},Mr.uuidFast=function(){for(var t,s=kr,i=new Array(36),e=0,n=0;n<36;n++)8==n||13==n||18==n||23==n?i[n]="-":14==n?i[n]="4":(e<=2&&(e=33554432+16777216*Math.random()|0),t=15&e,e>>=4,i[n]=s[19==n?3&t|8:t]);return i.join("")},Mr.uuidCompact=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var s=16*Math.random()|0;return("x"==t?s:3&s|8).toString(16)})};const{ActivityPorts:Dr}=Zn,Ur=["actions.google.com","amp-actions.sandbox.google.com","amp-actions-staging.sandbox.google.com","amp-actions-autopush.sandbox.google.com","payments.developers.google.com","payments.google.com"];class xr{constructor(t,s,i,e){var n;this.wa=s,function(t){if(t.environment&&!Object.values(sr.Environment).includes(t.environment))throw new Error("Parameter environment in PaymentOptions can optionally be set to PRODUCTION, otherwise it defaults to TEST. "+t.environment)}(t),this.Ia=null,this.Dh=t.environment||sr.Environment.TEST,xr.Yh||(xr.Yh=this.ba()&&t.i&&t.i.googleTransactionId?t.i.googleTransactionId:(n=this.Dh,Mr.uuidFast()+"."+n)),this.Ta=t,this.Ra=new Lr(this.Dh,xr.Yh,i,e,t.i&&t.i.redirectKey),this.Sa=5;const r=_r();this.Aa=r&&!i?new dr(this.Dh):this.Ra,this.Ca=new Gr,this.Ra.onResult(this.Oa.bind(this)),this.Aa.onResult(this.Oa.bind(this)),cr.load(),r&&cr.setBuyFlowActivityMode(4),cr.setGoogleTransactionId(xr.Yh),cr.postMessage({eventType:9,clientLatencyStartMs:Date.now()}),window.addEventListener("message",t=>this.Na(t))}isReadyToPay(t){t&&(t=Object.assign({},this.Ta,t));const s=Date.now(),i=wr()||function(t){if(!t)return"isReadyToPayRequest must be set!";if(t.apiVersion>=2){if(!("apiVersionMinor"in t))return"apiVersionMinor must be set!";if(!t.allowedPaymentMethods||!Array.isArray(t.allowedPaymentMethods)||0==t.allowedPaymentMethods.length)return"for v2 allowedPaymentMethods must be set to an array containing a list of accepted payment methods";for(var s=0;s<t.allowedPaymentMethods.length;s++){let n=t.allowedPaymentMethods[s];if(n.type==sr.PaymentMethod.CARD){if(!n.parameters)return"Field parameters must be setup in each allowedPaymentMethod";var i=n.parameters.allowedCardNetworks;if(!i||!Array.isArray(i)||0==i.length)return"allowedCardNetworks must be setup in parameters for type CARD";var e=n.parameters.allowedAuthMethods;if(!e||!Array.isArray(e)||0==e.length||!e.every(br))return"allowedAuthMethods must be setup in parameters for type 'CARD'  and must contain 'CRYPTOGRAM_3DS' and/or 'PAN_ONLY'"}}return null}return t.allowedPaymentMethods&&Array.isArray(t.allowedPaymentMethods)&&0!=t.allowedPaymentMethods.length&&t.allowedPaymentMethods.every(Ir)?null:"allowedPaymentMethods must be set to an array containing 'CARD' and/or 'TOKENIZED_CARD'!"}(t);if(i)return new Promise((t,s)=>{xr.ya("isReadyToPay",i),cr.postMessage({eventType:0,error:2}),s({statusCode:sr.ResponseStatus.DEVELOPER_ERROR,statusMessage:i})});const e=this.va(t);return e.then(t=>(cr.postMessage({eventType:0,clientLatencyStartMs:s,isReadyToPayApiResponse:t}),t)),e}va(t){if(this.Ca.isUpiRequest(t))return this.Ca.isReadyToPay(t);if(_r()&&!Fr(t)){if(t.apiVersion>=2)return this.Pa(t);{const s=this.Ra.isReadyToPay(t),i=this.Aa.isReadyToPay(t);return mr(t)?i:i.then(()=>s)}}return this.Ra.isReadyToPay(t)}Pa(t){let s=Promise.resolve({result:!1});t.existingPaymentMethodRequired&&(s=Promise.resolve({result:!1,paymentMethodPresent:!1}));let i=s;if(fr(t,sr.AuthMethod.CRYPTOGRAM_3DS)){const s=JSON.parse(JSON.stringify(t));for(let t=0;t<s.allowedPaymentMethods.length;t++)s.allowedPaymentMethods[t].type==sr.PaymentMethod.CARD&&(s.allowedPaymentMethods[t].parameters.allowedAuthMethods=[sr.AuthMethod.CRYPTOGRAM_3DS]);i=this.Aa.isReadyToPay(s)}let e=s;return fr(t,sr.AuthMethod.PAN_ONLY)&&(e=this.Ra.isReadyToPay(t)),i.then(t=>1==(t&&t.result)?t:e)}prefetchPaymentData(t){const s=wr()||Tr(t);s?xr.ya("prefetchPaymentData",s):(this.La(t),_r()&&!Fr(t)?this.Aa.prefetchPaymentData(t):this.Ra.prefetchPaymentData(t))}loadPaymentData(t){cr.postMessage({eventType:5});const s=wr()||Tr(t);if(this.Sa=t&&t.swg?6:5,s)return void this.wa(new Promise((t,i)=>{cr.postMessage({eventType:1,error:2,buyFlowMode:this.Sa}
1),xr.ya("loadPaymentData",s),i({statusCode:sr.ResponseStatus.DEVELOPER_ERROR,statusMessage:s})}));const i=Rr(t);i?this.Ca.loadPaymentData(t,i,this.Oa.bind(this)):(this.Ia=Date.now(),this.La(t),Fr(t)?this.Ra.loadPaymentData(t):this.Aa.loadPaymentData(t))}static ya(t,s){console.error("DEVELOPER_ERROR in "+t+" : "+s)}createButton(t={}){const s=Date.now();return cr.postMessage({eventType:2,clientLatencyStartMs:s}),null}Na(t){this.ba()&&"logPaymentData"===t.data.name&&cr.postMessage(t.data.data)}ba(){return-1!=Ur.indexOf(window.location.hostname)}Oa(t){t.then(t=>{cr.postMessage({eventType:1,clientLatencyStartMs:this.Ia,buyFlowMode:this.Sa})}).catch(t=>{t.errorCode?cr.postMessage({eventType:1,error:t.errorCode,buyFlowMode:this.Sa}):cr.postMessage({eventType:1,error:6,buyFlowMode:this.Sa})}),this.wa(t)}La(t){const s={startTimeMs:Date.now(),googleTransactionId:xr.Yh};return t.i=t.i?Object.assign(s,t.i):s,t}}function Fr(t){return!0===(t.i&&t.i.disableNative)}class Br{constructor(t){this.Fs=t}preconnect(t){this.Ga(t,"preconnect")}prefetch(t){this.Ga(t,"preconnect prefetch")}Ga(t,s){const i=ts(this.Fs,"link",{rel:s,href:t});this.Fs.head.appendChild(i)}}class Vr{constructor(t){this.Ma=null,this.Zo=null,this.ka=null,this.Da=null,this.vs=t.win(),this.Ps=t.activities(),this.Ua=t.analytics(),this.xa=new Wr(this.vs),this.Fa=new Br(this.vs.document),this.Ba()&&(this.preconnect(this.Fa),this.Va()),this.xa.prepare(),this.Cs=t.eventManager()}Wa(t,s,i){return xr.Yh=s,new xr(t,i,!1,this.Ps.getOriginalWebActivityPorts())}preconnect(t){t.prefetch("https://payments.google.com/payments/v4/js/integrator.js?ss=md"),t.prefetch("https://clients2.google.com/gr/gr_full_2.0.8.js")}Va(){this.Ma=this.Wa({environment:Ot().payEnv,i:{redirectKey:this.xa.restoreKey()}},this.Ua.getTransactionId(),this.za.bind(this))}Ba(){const t=this.vs.location.hash,s=/redirectEncryptedCallbackData/.test(t),i=/swgRequest/.test(t);return s&&i}getType(){return"PAYJS"}start(t,s={}){let i;this.Da=t,this.Ma||(this.preconnect(this.Fa),this.Va()),s.forceRedirect&&(t.forceRedirect=!0),zr(t,"disableNative",!0),zr(t,"disableNgbf",!0);const e=new Promise(t=>{i=t});return this.xa.useVerifier(async e=>{e&&zr(t,"redirectVerifier",e),s.forceRedirect&&(await this.Cs.getReadyPromise(),await this.Ua.getLoggingPromise()),this.Ma.loadPaymentData(t),i(!0)}),e}async onResponse(t){this.ka=t,this.Zo&&(await 0,t(this.Ya(this.Zo,this.Da)))}za(t){this.Zo=t,this.ka&&this.ka(this.Ya(this.Zo,this.Da))}async Ya(t,s){try{const i=await t;return s&&(i.paymentRequest=s),i}catch(i){const t=i;if("object"==typeof t&&"CANCELED"===t.statusCode){const t=ns("Cancelled");throw t.productType=s?s.i.productType:null,t}throw t}}}class Wr{constructor(t){this.vs=t,this.Ka=null,this.qa=null}prepare(){return this.Ha(()=>{})}useVerifier(t){this.Ha(s=>{if(s)try{this.vs.localStorage.setItem(st,s.key)}catch{s=null}t(s&&s.verifier||null)})}restoreKey(){try{return this.vs.localStorage&&this.vs.localStorage.getItem(st)||null}catch{return null}}async Ha(t){this.Ka||(this.Ja()?(this.Ka=this.Xa(),this.qa=await this.Ka):(this.Ka=Promise.resolve(null),this.qa=null)),t(this.qa)}Ja(){let t;try{t=!!this.vs.localStorage}catch{return!1}const s=this.vs.crypto;return!!(t&&s&&s.subtle&&s.subtle.digest)}async Xa(){const t=this.vs.crypto;try{const s=new Uint8Array(16);t.getRandomValues(s);const i=btoa(Xs(s)),e=await t.subtle.digest({name:"SHA-384"},Js(i));return{key:i,verifier:btoa(Xs(new Uint8Array(e)))}}catch{return null}}}function zr(t,s,i){t.i=Object.assign(t.i||{},{[s]:i})}var jr=(t=>(t.GENERAL="general",t.PAYWALL="paywall",t))(jr||{});class Yr{constructor(t,s,i){this.vs=t,this.Ss=s,this.As=i,this.$a=null,this.Qa=1,this.Ir=this.Ss.pageConfig().getPublicationId(),this.Ss.eventManager().registerEventListener(this.Ns.bind(this))}Za(){return this.vs.document.cookie}tl(){if(!this.$a){const t=this.Za().match("(^|;)\\s*__gads\\s*=\\s*([^;]+)");this.$a=t&&encodeURIComponent(t.pop())}return this.$a}il(t){t=mt(t,"u_tz","240"),t=mt(t,"v",String(this.Qa));const s=this.tl();return s&&(t=mt(t,"cookie",s)),mt(t,"cdm",this.vs.location.hostname)}sendSubscriptionState(t,s){let i=vt("/subopt/data");return i=mt(i,"states",this.Ir+":"+t),s&&(i=mt(i,"extrainfo",s)),this.As.fetch(this.il(i),{method:"GET",credentials:"include"})}rl(t,s){let i=vt("/subopt/data");return i=mt(i,"events",this.Ir+":"+t),s&&(i=mt(i,"extrainfo",s)),this.As.fetch(this.il(i),{method:"GET",credentials:"include"})}Ns(t){if(t.eventOriginator===u.SHOWCASE_CLIENT)return;if(!this.Ss.config().enablePropensity&&t.eventOriginator!==u.PROPENSITY_CLIENT)return;let s=t.additionalParameters;if(t.eventType===o.EVENT_SUBSCRIPTION_STATE)return void this.sendSubscriptionState(s.state,s.productsOrSkus);const i=(e=t.eventType)&&Ps[e]||null;var e;null!=i&&(s instanceof A&&(s=void 0),Ws(t.isFromUserAction)&&(Fs(s)||(s={}),s.is_active=t.isFromUserAction),this.rl(i,JSON.stringify(s)))}ol(t){if(!t.header)return{header:{ok:!1},body:{error:"No valid response"}};if(t.header.ok){let s=null;const i=t.scores,e=[];for(let t=0;t<i.length;t++){const n=i[t];let r;if(n.score){const t={value:n.score,bucketed:2==n.score_type};r={product:n.product,score:t}}else r={product:n.product,error:n.error_message};e.push(r),s={header:{ok:!0},body:{scores:e}}}return s}return{header:{ok:!1},body:{error:t.error}}}async getPropensity(t,s){const i=vt("/subopt/pts?products=")+this.Ir+"&type="+s+"&ref="+t,e=await this.As.fetch(this.il(i),{method:"GET",credentials:"include"}),n=await e.json();return this.ol(n)}}class Kr{constructor(t,s,i){this.vs=t,this.al=new Yr(t,s,i),this.Cs=s.eventManager()}sendSubscriptionState(t,s){if(!Object.values(Ns).includes(t))throw new Error("Invalid subscription state provided");
1if((Ns.SUBSCRIBER==t||Ns.PAST_SUBSCRIBER==t)&&!s)throw new Error("Entitlements must be provided for users with active or expired subscriptions");if(s&&!Fs(s))throw new Error("Entitlements must be an Object");let i=null;s&&(i=JSON.stringify(s)),this.al.sendSubscriptionState(t,i)}getPropensity(t){if(t&&!Object.values(jr).includes(t))throw new Error("Invalid propensity type requested");return t||(t=jr.GENERAL),this.al.getPropensity(this.vs.document.referrer,t)}sendEvent(t){const s=xs(t.name);let i=null;if(!Bs(ys,t.name)||!s)throw new Error("Invalid user event provided("+t.name+")");if(t.data){if(!Fs(t.data))throw new Error("Event data must be an Object("+t.data+")");i={},Object.assign(i,t.data)}if(Ws(t.active))i||(i={}),Object.assign(i,{is_active:t.active});else if(null!=t.active)throw new Error("Event active must be a boolean");this.Cs.logEvent({eventType:s,eventOriginator:u.PROPENSITY_CLIENT,isFromUserAction:t.active,additionalParameters:i})}}class qr{constructor(t){this.Ss=t,this.ll=()=>{},this.Ps=t.activities(),this.vs=t.win(),this.ai=t.pageConfig(),this.pi=t.dialogManager()}getRenderPromise(){return this.ul}async startMultipleLinks(t){const{linkTo:s}=t;if(!s||0===s.length)throw new Error("Missing required field: linkTo");const i=this.ai.getPublicationId(),e=s.map(t=>encodeURIComponent("".concat(t.publicationId,",").concat(t.publisherProvidedId))).join("&linkTo="),n=Lt({publicationId:i}),r=Pt("/linksaveiframe",{subscriptionLinking:"true"})+"&linkTo=".concat(e),h=new us(this.vs,this.Ps,r,n,this.Ss.clientConfigManager().getLanguage(),!1);h.onCancel(()=>this.onCancel(s)),h.on(x,this.onResponse.bind(this));const a=new Promise(t=>this.ll=t);try{this.Ss.eventManager().logSwgEvent(o.IMPRESSION_SUBSCRIPTION_LINKING_LOADING);const t={desktopConfig:{isCenterPositioned:!1}};return this.ul=this.pi.openView(h,!1,t),await this.ul,this.Ss.eventManager().logSwgEvent(o.IMPRESSION_SUBSCRIPTION_LINKING_COMPLETE),a}catch(l){throw this.Ss.eventManager().logSwgEvent(o.IMPRESSION_SUBSCRIPTION_LINKING_ERROR),l}}onResponse(t){const s=t.getSuccess()?o.EVENT_SUBSCRIPTION_LINKING_SUCCESS:o.EVENT_SUBSCRIPTION_LINKING_FAILED;this.Ss.eventManager().logSwgEvent(s);const i=t.getLinkResultsList()||[];this.ll({anyFailure:!t.getSuccess(),anySuccess:i.filter(t=>t.getSuccess()).length>0,links:i.map(t=>({publicationId:t.getSwgPublicationId(),publisherProvidedId:t.getPublisherProvidedId(),success:!!t.getSuccess()}))})}onCancel(t){const s=o.ACTION_SUBSCRIPTION_LINKING_CLOSE;this.Ss.eventManager().logSwgEvent(s,!0),this.ll({anyFailure:!0,anySuccess:!1,links:t.map(t=>({publicationId:t.publicationId,publisherProvidedId:t.publisherProvidedId,success:!1}))})}async start(t){const{publisherProvidedId:s}=t;if(!s)throw new Error("Missing required field: publisherProvidedId");const i={linkTo:[{publicationId:this.ai.getPublicationId(),publisherProvidedId:s}]};return this.startMultipleLinks(i).then(t=>({publisherProvidedId:s,success:!t.anyFailure}))}}class Hr{constructor(t,s){this.cl=s,this.openViewPromise=null,this.vs=t.win(),this.Ps=t.activities(),this.pi=t.dialogManager(),this.cl||(this.cl=Promise.reject("No account promise provided")),this.di=new us(this.vs,this.Ps,Pt("/waitforsubscriptionlookupiframe"),Lt({publicationId:t.pageConfig().getPublicationId(),productId:t.pageConfig().getProductId()}),t.clientConfigManager().getLanguage(),!0,!0)}async start(){this.openViewPromise=this.pi.openView(this.di);try{const t=await this.cl;return this.pi.completeView(this.di),t}catch(t){throw this.pi.completeView(this.di),t}}}class Jr{constructor(t,s,i,r,h,a=0){var l;this.dl=a,this.gl=null,this.El=null,i=i||{},this._l=!!i.isPublisher,i.configPromise||(i.configPromise=Promise.resolve()),this.Cs=new Ce(i.configPromise),this.Fs=en(t),this.vs=this.Fs.getWin(),this.Uo={windowOpenMode:"auto",analyticsMode:0,enableSwgAnalytics:!1,enablePropensity:!1},r&&this.fl(r),this.ai=s,this.wl=this.Fs.whenReady(),this.Il=new Gn(this.Fs),this.As=i.fetcher||new Es(this.vs),this.Os=new Ii(this.vs,this.ai),this.dr=new ke,i.enableGoogleAnalytics&&(this.bl=new js(this),this.bl.start()),this.Ps=new Re(this),this.li=new Me(this),this.oi=new Vr(this),this.Tl=new Fn(this),this.Ri=new Sn(this.vs,this.ai,this.As,this,i.enableDefaultMeteringHandler||!1),this.ui=new qe(this,s.getPublicationId(),this.As,h),this.pi=new dn(this.Fs,this.ui),this.Rl=new Kr(this.vs,this,this.As),this.Cs.logSwgEvent(o.IMPRESSION_PAGE_LOAD,!1),this.Sl=new Wn(this.ai,this.As),this.Al=new Ji(this.Fs,Promise.resolve(this));const u=new Br(this.vs.document);u.prefetch("".concat(e,"/loader.svg")),u.preconnect("https://www.gstatic.
1com/"),u.preconnect("https://www.google.com/"),Un.configurePending(this),ci.configurePending(this),ss(this.Fs,$e),this.Ps.onRedirectError(t=>{this.li.addLabels(["redirect"]),this.Cs.logSwgEvent(o.EVENT_PAYMENT_FAILED,!1),this.Il.error("Redirect error",t)}),this.Cl=this.Uo.gisInterop||_i(this.vs,n.ENABLE_GIS_INTEROP)?new Ln(this.Fs,this.Os,this.Ri,this.ai,this.Cs):void 0,(null==i?void 0:i.isBasic)||null==(l=this.Cl)||l.yield()}creationTimestamp(){return this.dl}gisInteropManager(){return this.Cl}doc(){return this.Fs}win(){return this.vs}pageConfig(){return this.ai}jserror(){return this.Il}activities(){return this.Ps}payClient(){return this.oi}dialogManager(){return this.pi}entitlementsManager(){return this.Ri}callbacks(){return this.dr}storage(){return this.Os}clientConfigManager(){return this.ui}analytics(){return this.li}isPublisher(){return this._l}init(){}configure(t){this.fl(t)}fl(t){let s="";for(const i in t){const e=t[i];switch(i){case"windowOpenMode":e!=bs.AUTO&&e!=bs.REDIRECT&&(s="Unknown windowOpenMode: "+e);break;case"experiments":for(const t of e)mi(this.vs,t,!0);this.analytics()&&this.analytics().addLabels(e);break;case"analyticsMode":e!=Is.DEFAULT&&e!=Is.IMPRESSIONS&&(s="Unknown analytics mode: "+e);break;case"enableSwgAnalytics":Ws(e)||(s="enableSwgAnalytics must be a boolean, type: "+typeof e);break;case"enablePropensity":Ws(e)||(s="enablePropensity must be a boolean, type: "+typeof e);break;case"skipAccountCreationScreen":Ws(e)||(s="skipAccountCreationScreen must be a boolean, type: "+typeof e);break;case"publisherProvidedId":null==e||"string"==typeof e&&""!=e||(s="publisherProvidedId must be a string, value: "+e);break;case"paySwgVersion":if("string"!=typeof e){s="paySwgVersion must be a string, type: "+typeof e;break}break;case"gisInterop":void 0===e||Ws(e)||(s="gisInterop must be a boolean, type: "+typeof e);break;default:s="Unknown config property: "+i}}ct(!s,s||void 0),Object.assign(this.Uo,t)}config(){return this.Uo}reset(){this.Ri.reset(),this.closeDialog()}clear(){this.Ri.clear(),this.closeDialog()}closeDialog(){this.pi.completeAll()}start(){if(!this.ai.getProductId()||!this.ai.isLocked())return Promise.resolve();this.getEntitlements()}async getEntitlements(t){(null==t?void 0:t.publisherProvidedId)&&(t.publisherProvidedId=this.Zt);const s=this.Ri.getEntitlements(t);this.clientConfigManager().fetchClientConfig(s);const i=await s;if(this.li.setReadyForLogging(),this.li.start(),i)try{const t=i.entitlements.map(t=>t.getSku()||"unknown subscriptionToken");t.length>0&&this.li.setSku(t.join(","))}catch{}const e=await this.Ri.getExperimentConfigFlags().then(t=>t.includes(r.BACKGROUND_CLICK_BEHAVIOR_EXPERIMENT));return this.pi.setEnableBackgroundClickExperiment(e),i.clone()}setOnEntitlementsResponse(t){this.dr.setOnEntitlementsResponse(t)}getOffers(t){return this.Sl.getOffers(t&&t.productId)}async showOffers(t){return await this.wl,ct(!t||!t.oldSku,"The showOffers() method cannot be used to update a subscription. Use the showUpdateOffers() method instead."),this.gl=new $i(this,t),this.gl.start()}async showUpdateOffers(t){return await this.wl,ct(!!t&&!!t.oldSku,"The showUpdateOffers() method cannot be used for new subscribers. Use the showOffers() method instead."),new $i(this,t).start()}async showSubscribeOption(t){return await this.wl,new Qi(this,t).start()}async showAbbrvOffer(t){return await this.wl,new Zi(this,t).start()}async showContributionOptions(t){return await this.wl,this.El=new He(this,t),this.El.start()}getLastContributionsFlow(){return this.El}async waitForSubscriptionLookup(t){return await this.wl,new Hr(this,t).start()}setOnLoginRequest(t){this.dr.setOnLoginRequest(t)}triggerLoginRequest(t){this.dr.triggerLoginRequest(t)}setOnLinkComplete(t){this.dr.setOnLinkComplete(t)}async linkAccount(t){return await this.wl,new Dn(this).start(t)}async saveSubscription(t){return await this.wl,await new xn(this,t).start()}async showLoginPrompt(){return await this.wl,new Vn(this).start()}async showLoginNotification(){return await this.wl,new Bn(this).start()}setOnNativeSubscribeRequest(t){this.dr.setOnSubscribeRequest(t)}setOnSubscribeResponse(t){this.dr.setOnSubscribeResponse(t)}setOnPaymentResponse(t){this.dr.setOnPaymentResponse(t)}async subscribe(t){return ct("string"==typeof t,"The subscribe() method can only take a sku as its parameter; for subscription updates please use the updateSubscription() method"),await this.wl,new li(this,{skuId:t}).start()}async conferTimeBoundPass(t){return await this.wl,new li(this,{skuId:t,oneTime:!0},Ts.TIME_BOUND_PASS).start()}async updateSubscription(t){return ct(null==t?void 0:t.oldSku,"The updateSubscription() method should be used for subscription updates; for new subscriptions please use the subscribe() method"),await this.wl,new li(this,t).start()}setOnContributionResponse(t){this.dr.setOnContributionResponse(t)}async contribute(t){const s="string"==typeof t?{skuId:t}:t;return await this.wl,new li(this,s,Ts.UI_CONTRIBUTION).start()}async completeDeferredAccountCreation(t=null){return await this.wl,new Ze(this,t).start()}setOnFlowStarted(t){this.dr.setOnFlowStarted(t)}setOnFlowCanceled(t){this.dr.setOnFlowCanceled(t)}createButton(t,s){return this.Al.create(t,s)}attachButton(t,s,i){this.Al.attach(t,s,i)}attachSmartButton(t,s,i){this.Al.attachSmartButton(this,t,s,i)}getPropensityModule(){return Promise.resolve(this.Rl)}eventManager(){return this.Cs}getLastOffersFlow(){return this.gl}getEventManager(){return Promise.resolve(this.Cs)}getLogger(){return Promise.resolve(this.Tl)}setShowcaseEntitlement(t){if(!t||!function(t=bt){return"https"===t.protocol||"https:"===t.protocol}(this.win().location)||!Tn(this.win().location.search,!0))return Promise.resolve();const s=(i=t.entitlement,Ls[i]||[]);var i;const e=new A;
1e.setIsUserRegistered(t.isUserRegistered),t.subscriptionTimestamp&&e.setSubscriptionTimestamp(ve(function(t){let s;return s=t>=1e14||t<=-1e14?Math.floor(t/1e3):t>=1e11||t<=-3e10?t:Math.floor(1e3*t),s}(t.subscriptionTimestamp)));for(let n=0;n<s.length;n++)this.eventManager().logEvent({eventType:s[n],eventOriginator:u.SHOWCASE_CLIENT,isFromUserAction:!1,additionalParameters:e});return Promise.resolve()}consumeShowcaseEntitlementJwt(t,s){this.entitlementsManager().parseEntitlements({signedEntitlements:t}).consume(s)}showBestAudienceAction(){ut("Not implemented yet")}setPublisherProvidedId(t){this.Zt=t}async linkSubscription(t){return await this.wl,new qr(this).start(t)}async processGisCredential(t,s){return t.credential?ms(this,t,s):{fromRrm:!1}}async linkSubscriptions(t){return await this.wl,new qr(this).startMultipleLinks(t)}async getAvailableInterventions(){return await this.getEntitlements(),this.entitlementsManager().getAvailableInterventions()}async getFreeAccess(){return new Nn}}const Xr=Ts.UI_CONTRIBUTION;class $r{constructor(t){this.Ss=t,this.Fs=t.doc(),this.vs=t.win(),this.Ps=t.activities(),this.Ri=t.entitlementsManager(),this.ui=t.clientConfigManager(),this.Os=t.storage(),ct(this.ui,"InlineCta requires an instance of ClientConfigManager.")}Ol(t,s){const i={origin:Et(this.vs.location.href).origin,configurationId:s,isClosable:"true",calledManually:"false",previewEnabled:"false",publicationId:this.Ss.pageConfig().getPublicationId(),ctaMode:"CTA_MODE_INLINE"};return this.ui.shouldForceLangInIframes()&&(i.hl=this.ui.getLanguage()),Pt(t,i)}Si(t,s,i){this.Ri.clear();const e=t.getSwgUserToken();e&&this.Os.set($,e,!0),t.getAlreadyCompleted()&&(this.Nl(i),Ri(s,this.ui.getLanguage(),this.Ss));const n=Date.now().toString();this.Os.set(Q,n,!1),this.Ri.getEntitlements()}Nl(t){t.firstChild&&t.removeChild(t.firstChild)}async yl(t,s,i,e){var n;const o=(e?this.Ri.parseArticleExperimentConfigFlags(e):[]).includes(r.MULTI_INSTANCE_MONETARY_CTA_EXPERIMENT),a=null==(n=t.getAttribute("rrm-inline-cta"))?void 0:n.trim().replace(/['"“”‘’]/g,"");if(!a)return void ut("No Inline CTA Config Id");const l=s.find(t=>t.configurationId===a);if(!l)return void ut("No Inline CTA Matching Action");if(l.type===ht.TYPE_REWARDED_AD||l.type===ht.TYPE_BYO_CTA)return;const u=await yi(this.Ss);if(!vi(l,this.Ss,u))return;const c=Tt[l.type],d=l.type===ht.TYPE_SUBSCRIPTION?Ci(i,this.ui,this.Ss.pageConfig(),this.vs.location.hash,o?a:"",!0,o?Et(this.vs.location.href).origin:void 0):l.type===ht.TYPE_CONTRIBUTION?Si(i,this.ui,this.Ss.pageConfig(),o?a:"",!0,o?Et(this.vs.location.href).origin:void 0):this.Ol(c,a),g=l.type===ht.TYPE_SUBSCRIPTION?this.Ps.addDefaultArguments({showNative:this.Ss.callbacks().hasSubscribeRequestCallback(),productType:Ts.SUBSCRIPTION,list:"default",skus:null,isClosable:!1,supportsEventManager:!0}):l.type===ht.TYPE_CONTRIBUTION?Lt({productId:this.Ss.pageConfig().getProductId(),publicationId:this.Ss.pageConfig().getPublicationId(),productType:Ts.UI_CONTRIBUTION,list:"default",skus:null,isClosable:!1,supportsEventManager:!0}):Lt({supportsEventManager:!0,productType:Xr}),p=new us(this.vs,this.Ps,d,g,this.ui.getLanguage());as(p.getElement(),{width:"100%"}),l.type===ht.TYPE_SUBSCRIPTION?(this.Ss.callbacks().triggerFlowStarted(ws.SHOW_OFFERS,{skus:["*"],source:"SwG"}),p.onCancel(()=>{this.Ss.callbacks().triggerFlowCanceled(ws.SHOW_OFFERS)}),p.on(k,t=>Oi(this.Ss,t,!0,a)),p.on(K,t=>Ni(this.Ss,t))):l.type===ht.TYPE_CONTRIBUTION?(this.Ss.callbacks().triggerFlowStarted(ws.SHOW_CONTRIBUTION_OPTIONS),p.onCancel(()=>{this.Ss.callbacks().triggerFlowCanceled(ws.SHOW_CONTRIBUTION_OPTIONS)}),p.on(k,t=>Ai(this.Ss,t,!0,a))):(p.on(w,s=>this.Si(s,l.type,t)),p.on(V,t=>Ys(t,this.Ss,p,a,h.CTA_MODE_INLINE))),t.appendChild(p.getElement()),await p.init()}async attachInlineCtasWithAttribute(){var t,s,i;const e=Array.from(this.Fs.getWin().document.querySelectorAll("div[rrm-inline-cta]"));if(0===e.length)return;const[n,r,o]=await Promise.all([this.ui.getClientConfig(),this.Ri.getEntitlements(),this.Ri.getArticle()]);if(!(null==(t=n.uiPredicates)?void 0:t.canDisplayAutoPrompt)||!o||r.enablesThis())return void ut("Inline CTA Client Config: "+!(null==(s=n.uiPredicates)?void 0:s.canDisplayAutoPrompt)+"Article: "+!o+"Entitlements: "+!!r.enablesThis());const h=null==(i=o.audienceActions)?void 0:i.actions;if(h&&0!==h.length)for(const a of e)await this.yl(a,h,n,o);else ut("No Inline CTA Actions")}}class Qr{constructor(t){this.vl=null,this.Pl=null,this.Fs=en(t),this.Ll=new Promise(t=>{this.Pl=t})}writeConfigWhenReady(t){return this.vl=t,this.Fs.whenReady().then(()=>{this.Gl()}),this.Ll}Gl(){var t,s,i,e,n,r,o,h,a;if(!this.Pl)return;const l={productID:null==(t=this.vl)?void 0:t.isPartOfProductId,"@type":null==(s=this.vl)?void 0:s.isPartOfType},u={"@context":"http://schema.org","@type":null==(i=this.vl)?void 0:i.type,isAccessibleForFree:null==(e=this.vl)?void 0:e.isAccessibleForFree,isPartOf:l},c=this.Fs.getRootNode().querySelectorAll('script[type="application/ld+json"]');for(let g=0;g<c.length;g++){const t=c[g];if(t.textContent){const s=si(t.textContent);if(!s)continue;let i;return i=Array.isArray(s)?s[0]:s,i["@type"]=this.Ml(i["@type"],null==(n=this.vl)?void 0:n.type),i.isAccessibleForFree=i.isAccessibleForFree||(null==(r=this.vl)?void 0:r.isAccessibleForFree),i.isPartOf?(i.isPartOf["@type"]=this.Ml(i.isPartOf["@type"],null==(o=this.vl)?void 0:o.isPartOfType),i.isPartOf.productID=i.isPartOf.productID||(null==(h=this.vl)?void 0:h.isPartOfProductId)):i.isPartOf=l,t.textContent=JSON.stringify(s),this.Pl(),void(this.Pl=null)}}const d=ts(this.Fs.getWin().document,"script",{type:"application/ld+json"},JSON.stringify(u));null==(a=this.Fs.getHead())||a.appendChild(d),this.Pl(),this.Pl=null}Ml(t,s){if(!t&&!s)return[];if(!t)return s;if(!s)return t;
1const i=this.fh(t),e=this.fh(s),n=i.concat(e.filter(t=>i.indexOf(t)<0));return 1==n.length?n.pop():n}fh(t){return Array.isArray(t)?t:[t]}}const Zr="SWG_BASIC",to="CHECK_ENTITLEMENTS";class so{constructor(t){this.kl=!1,this.Dl=null,this.Ul=null,this.xl=null,this.Oo=!0,this.Fl=!1,this.Uo={},this.dl=Date.now(),this.Fs=en(t),this.Bl=new Promise(t=>{this.Dl=t})}Vl(t){return this.Uo.publisherProvidedId=this.Zt,this.Uo.gisInterop=this.gisInterop,this.kl||!t||this.Ul?t&&this.xl&&this.xl.check():(this.kl=!0,this.xl=new qn(this.Fs),this.xl.resolveConfig().then(t=>{this.xl=null;const s=new io(this.Fs,t,{configPromise:this.Bl.then(),enableDefaultMeteringHandler:this.Oo,isBasic:!0},this.Uo,this.br,this.dl);this.Wl=s,this.Dl(s),this.Dl=null},t=>{this.Dl(Promise.reject(t)),this.Dl=null})),this.Bl}async zl(t){this.Ul=new Qr(this.Fs),await this.Ul.writeConfigWhenReady(t),this.Ul=null,this.Vl(!0)}init({type:t,isAccessibleForFree:s,isPartOfType:i,isPartOfProductId:e,clientOptions:n,autoPromptType:r,alwaysShow:o=!1,disableDefaultMeteringHandler:h=!1,publisherProvidedId:a,gisInterop:l}){this.Oo=!h,this.Zt=a,this.gisInterop=l;const u=this.jl(e);this.zl({type:t,isAccessibleForFree:null!=s?s:u,isPartOfType:i,isPartOfProductId:e});const c=this.Fs.getRootElement().lang;this.br=Object.assign({lang:c},n,{forceLangInIframes:!!c||!!(null==n?void 0:n.lang)});let d=s;u&&(null!=d||(d=!0)),this.setupAndShowAutoPrompt({autoPromptType:r,alwaysShow:o,isClosable:d,contentType:this.Yl(null!=s?s:u)}),this.Fl||this.setOnLoginRequest(),this.processEntitlements()}async setOnEntitlementsResponse(t){(await this.Vl(!1)).setOnEntitlementsResponse(t)}async setOnPaymentResponse(t){(await this.Vl(!1)).setOnPaymentResponse(t)}async setOnLoginRequest(t){t&&(this.Fl=!0),(await this.Vl(!1)).setOnLoginRequest(t)}async setupAndShowAutoPrompt(t){(await this.Vl(!1)).setupAndShowAutoPrompt(t)}async dismissSwgUI(){(await this.Vl(!1)).dismissSwgUI()}async processGisCredential(t,s){return(await this.Vl(!1)).processGisCredential(t,s)}getDiagnostics(){return this.Wl?this.Wl.getDiagnostics():{isGisReady:!1}}async setupButtons(){const t=await this.Vl(!1);await t.setupButtons()}async setupInlineCta(){(await this.Vl(!1)).setupInlineCta()}async processEntitlements(){(await this.Vl(!1)).processEntitlements()}jl(t){return t.endsWith(":openaccess")}Yl(t){return t?ds.OPEN:ds.CLOSED}}class io{constructor(t,s,i={},e,n,r=0){this.dl=r,this.Fs=en(t),this.vs=this.Fs.getWin(),i.configPromise||(i.configPromise=Promise.resolve()),i.fetcher=i.fetcher||new Es(this.vs),i.enableGoogleAnalytics=!0,this.As=i.fetcher,this.Kl=new Jr(t,s,i,e,n,r),this.entitlementsManager().blockNextToast(),s.isLocked()&&this.entitlementsManager().enableMeteredByGoogle(),this.ql(()=>{this.dismissSwgUI(),this.Kl.showOffers({isClosable:!0})}),this.Kl.start(),this.Kl.clientConfigManager().fetchClientConfig(this.Kl.getEntitlements()),this.Hl=new Mt(this,this.As),this.Hl.start(),this.Jl=new ji(this,this.Kl),this.Xl=new $r(this),this.Al=new Ji(this.Fs,Promise.resolve(this.Kl)),this.Al.init()}configuredClassicRuntime(){return this.Kl}creationTimestamp(){return this.dl}gisInteropManager(){return this.Kl.gisInteropManager()}doc(){return this.Fs}win(){return this.vs}config(){return this.Kl.config()}pageConfig(){return this.Kl.pageConfig()}activities(){return this.Kl.activities()}payClient(){return this.Kl.payClient()}dialogManager(){return this.Kl.dialogManager()}entitlementsManager(){return this.Kl.entitlementsManager()}callbacks(){return this.Kl.callbacks()}storage(){return this.Kl.storage()}analytics(){return this.Kl.analytics()}jserror(){return this.Kl.jserror()}eventManager(){return this.Kl.eventManager()}clientConfigManager(){return this.Kl.clientConfigManager()}init(){}setOnEntitlementsResponse(t){this.Kl.setOnEntitlementsResponse(t)}setOnPaymentResponse(t){this.Kl.setOnPaymentResponse(t)}setOnLoginRequest(t){t?this.Kl.setOnLoginRequest(t):this.$l()}$l(){this.Kl.setOnLoginRequest(()=>{const t=this.pageConfig().getPublicationId(),s=Lt({publicationId:t});this.activities().open(to,Pt("/checkentitlements",{publicationId:t}),"_blank",s,{width:600,height:600})})}processEntitlements(){this.activities().onResult(to,this.entitlementsResponseHandler.bind(this))}async entitlementsResponseHandler(t){const s=await Zt(t,Nt(),!0,!1),i=s.jwt;if(i){this.Kl.closeDialog(),this.entitlementsManager().pushNextEntitlements(i);const t=s.usertoken;t&&this.storage().set($,t,!0),new Os(this,Pt("/toastiframe",{flavor:"basic"})).open()}else{const t=this.Kl.getLastOffersFlow();if(t)return void t.showNoEntitlementFoundToast();const s=this.Kl.getLastContributionsFlow();if(s)return void s.showNoEntitlementFoundToast();const i=this.entitlementsManager().getLastMeterToast();if(i)return void i.showNoEntitlementFoundToast();const e=this.Jl.getLastAudienceActionFlow();if(e)return void e.showNoEntitlementFoundToast();const n=this.clientConfigManager().getLanguage(),r=os(qt,n);new Os(this,Pt("/toastiframe",{flavor:"custom",customText:r})).open()}}setupAndShowAutoPrompt(t){return this.Jl.showAutoPrompt(t)}dismissSwgUI(){this.dialogManager().completeAll()}async processGisCredential(t,s){return t.credential?ms(this,t,s):{fromRrm:!1}}
1getDiagnostics(){const t=this.gisInteropManager();return{isGisReady:!!t&&t.getState()!==yn.WAITING_FOR_PING}}async setupButtons(){var t,s,i,e,n,o;const h=await this.clientConfigManager().shouldEnableButton(),a=await this.entitlementsManager().getArticle(),l=this.pageConfig().isLocked(),u=(await this.entitlementsManager().getExperimentConfigFlags()).includes(r.MULTI_INSTANCE_MONETARY_CTA_EXPERIMENT);let c,d;if(u&&a){const r=null==(s=null==(t=a.actionOrchestration)?void 0:t.interventionFunnel)?void 0:s.interventions,h=null==(i=a.audienceActions)?void 0:i.actions;if(d=null==(e=null==r?void 0:r.find(t=>t.type===ht.TYPE_CONTRIBUTION))?void 0:e.configId,l)c=null==(n=null==r?void 0:r.find(t=>t.type===ht.TYPE_SUBSCRIPTION))?void 0:n.configId;else{const t=null==h?void 0:h.filter(t=>t.type===ht.TYPE_SUBSCRIPTION);if(1===(null==t?void 0:t.length))c=t[0].configurationId;else{const s=r?r.filter(t=>t.type===ht.TYPE_SUBSCRIPTION).map(t=>t.configId):[];c=null==(o=null==t?void 0:t.find(t=>t.configurationId&&!s.includes(t.configurationId)))?void 0:o.configurationId}}}this.Al.attachButtonsWithAttribute("swg-standard-button",[qi.SUBSCRIPTION,qi.CONTRIBUTION],{theme:this.clientConfigManager().getTheme(),lang:this.clientConfigManager().getLanguage(),enable:!!h},{[qi.SUBSCRIPTION]:()=>{const t={isClosable:!0};u&&c&&(t.configurationId=c),this.Kl.showOffers(t)},[qi.CONTRIBUTION]:()=>{const t={isClosable:!0};u&&d&&(t.configurationId=d),this.Kl.showContributionOptions(t)}})}async setupInlineCta(){this.win().setTimeout(()=>{this.Xl.attachInlineCtasWithAttribute()},2e3)}ql(t){this.callbacks().setOnOffersFlowRequest(t)}}lt("BasicSubscriptions Runtime: ".concat(i)),function(t){if(t[Zr]&&!Array.isArray(t[Zr]))return;const s=new so(t),i=function(t){return{init:t.init.bind(t),setOnEntitlementsResponse:t.setOnEntitlementsResponse.bind(t),setOnPaymentResponse:t.setOnPaymentResponse.bind(t),setOnLoginRequest:t.setOnLoginRequest.bind(t),setupAndShowAutoPrompt:t.setupAndShowAutoPrompt.bind(t),dismissSwgUI:t.dismissSwgUI.bind(t),processGisCredential:t.processGisCredential.bind(t),getDiagnostics:t.getDiagnostics.bind(t)}}(s);async function e(t){t&&(await 0,t(i))}const n=[].concat(t[Zr]);for(const r of n)e(r);t[Zr]={push:e,getDiagnostics:()=>i.getDiagnostics()},s.setupButtons(),s.setupInlineCta()}(self)}()})()

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.