(function() { var c=1; var x = document.getElementById("Sureview338"); var sureview_logo_container=document.createElement("div"); var vdo = document.createElement("div"); var vi_maindiv = document.createElement("div"); var teads = document.createElement("script"); teads.id="sureview_2"; var third_party = document.createElement("script"); var adipolo = document.createElement("div"); var teads_main_div = document.createElement("div"); var vdo_id=""; var is_active_adipolo=0; var is_active_teads=0; var is_active_aniview=0; var is_active_vdo=0; var is_active_valueImpression=0; var ad_displaying=0; var running_ads=0; var by_tag_name=""; var placement_salector=""; var no_of_tag=""; var placed_by=""; var priority1="2"; var priority2="1"; var priority3="4"; var refreshIntervalId; var iframe="iframe"; var is_added_smc_header=0; var vdo_player; var teads_player; var teads_ads_duration=10000; var vdo_ads_duration=10000; var setlogo_intval; var setlogoTeads_intval; var dailyMotionStyle = document.createElement('style'); dailyMotionStyle.innerHTML="#dailymotion-pip-large-viewport{ --dm--pip-left: 0px;} #dailymotion-pip-large-viewport{ --dm--pip-left: 0; --dm--pip-right: auto; } #dailymotion-pip-small-viewport {--dm--pip-size-width: 200px !important; --dm--pip-size-height: 110px !important;} .dm-player.dm-player-close-show #dailymotion-pip-large-viewport .dm__close-button, .dm-player.dm-player-close-show #dailymotion-pip-small-viewport .dm__close-button { visibility: visible !important;} .dm-player.dm-player-close-show .dm__close-button { visibility: visible !important; } .dm__close-button { position: absolute !important; top: var(--dm-close-top, -28px) !important; right: unset !important; width: var(--dm-close-width, 25px) !important; height: var(--dm-close-height, 25px) !important; background: var(--dm-close-bg, #000) !important; opacity: var(--dm-close-opacity, 0.45) !important; border-radius: 50% !important; padding: var(--dm-close-padding, 7px) !important; border: var(--dm-close-border, 0) !important; cursor: pointer; visibility: hidden; } .dailymotion-player-wrapper#dailymotion-pip-small-viewport .dm__close-button { left: 0px !important; right: unset !important; }"; top.document.getElementsByTagName('head')[0].appendChild(dailyMotionStyle); var dailyMotionStyle = document.createElement('style'); dailyMotionStyle.innerHTML="#dailymotion-pip-small-viewport, #dailymotion-pip-large-viewport { width: var(--dm--pip-size-width, 410px) !important; left: var(--dm--pip-left, 0) !important; height: var(--dm--pip-size-height, 231px) !important; transition: right .5s ease !important; right: var(--dm--pip-right, initial) !important;} .dailymotion-player-wrapper#dailymotion-pip-small-viewport .dm__close-button { left: 0px !important; right: unset !important; }"; var reduce_size_for_big_screen= document.createElement('style'); reduce_size_for_big_screen.innerHTML="@media screen and (min-width: 640px) {.dm-player { padding-left: 20% !important; padding-right: 20% !important; }} #dailymotion-pip-small-viewport .dailymotion-player, #dailymotion-pip-small-viewport .dm__pip-new-controls{ border-radius: 10px; }"; top.document.getElementsByTagName('head')[0].appendChild(reduce_size_for_big_screen); placement_salector=0; setTimeout(function(){ by_tag_name="p"; placed_by="1"; no_of_tag="1"; var daily_motion_ads=document.createElement("div"); daily_motion_ads.className="dm-player sureview-ads"; daily_motion_ads.id="daily_motion_ads_div"; daily_motion_ads.style.cssText="padding-top: 10px; padding-bottom: 10px;"; var script_daily_motion=document.createElement("script"); script_daily_motion.src="https://statics.dmcdn.net/c/dm-ce.min.js"; script_daily_motion.type="text/javascript"; var ani_placement=is_avail_selector(by_tag_name,placed_by); if(ani_placement!=0){ try{ if(placed_by!="3"){ ani_placement[no_of_tag].appendChild(daily_motion_ads); ani_placement[no_of_tag].appendChild(script_daily_motion); }else{ ani_placement.appendChild(daily_motion_ads); ani_placement.appendChild(script_daily_motion); } top.document.getElementById("daily_motion_ads_div").setAttribute("owners", "sureview"); top.document.getElementById("daily_motion_ads_div").setAttribute("sort", "recent"); top.document.getElementById("daily_motion_ads_div").setAttribute("playerId", "x918a"); top.document.getElementById("daily_motion_ads_div").setAttribute("mute", "true"); top.document.getElementById("daily_motion_ads_div").setAttribute("loop", "true"); top.document.getElementById("daily_motion_ads_div").setAttribute("closeButton", "true"); top.document.getElementById("daily_motion_ads_div").setAttribute("hideButton", "false"); top.document.getElementById("daily_motion_ads_div").setAttribute("playlistId", "x7ib3p"); top.document.getElementById("daily_motion_ads_div").setAttribute("referrerPolicy", "no-referrer-when-downgrade"); top.document.getElementById("daily_motion_ads_div").setAttribute("enable_google_policy_ui", "true"); top.document.getElementById("daily_motion_ads_div").setAttribute("showAdOnly", "5"); new_logo(9); }catch (exception_var) { } } var widget_code="PGRpdiBpZD0ic3VyZXZpZXctc3RpY2t5MDAxLWJhbm5lciIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmNmY2ZjYwMDsgcG9zaXRpb246IGZpeGVkOyBib3R0b206IC01MHB4OyBsZWZ0OjA7IG92ZXJmbG93OiBoaWRkZW47IGRpcmVjdGlvbjogbHRyICFpbXBvcnRhbnQ7IHRyYW5zZm9ybTogc2NhbGUoMC41Nik7IG1heC13aWR0aDogMzAwcHg7IHJpZ2h0OiAtNTBweDsgbWFyZ2luOiBhdXRvOyB6LWluZGV4OiA5OTk5OTk5OTkgIWltcG9ydGFudDsgZGlzcGxheTogbm9uZTsiPg0KCTxkaXYgY2xhc3M9ImNyb3NzLXN2LXN0aWNreTAwMS1iYW5uZXIiIGlkPSJjcm9zcy1zdi1zdGlja3kwMDEtYmFubmVyIiBzdHlsZT0iZGlzcGxheTogZmxleDsgYmFja2dyb3VuZDogIzAwMDAwMDsgZGlyZWN0aW9uOiBsdHIgIWltcG9ydGFudDsgYm9yZGVyLXJhZGl1czogNXB4IDVweCAwcHggMHB4OyBtYXgtaGVpZ2h0OiAzNXB4OyBkaXNwbGF5OiBmbGV4OyBhbGlnbi1pdGVtczogY2VudGVyOyBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjsiPg0KCQk8aW1nIGlkPSJzdXJldmlldy1zdGlja3kwMDEtYmFubmVyLXJlbW92ZSIgc3JjPSJkYXRhOmltYWdlL3BuZztiYXNlNjQsaVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQURBQUFBQXdDQVlBQUFCWEF2bUhBQUFBQ1hCSVdYTUFBQXNUQUFBTEV3RUFtcHdZQUFBQklFbEVRVlI0bk8yWjNRNEJNUkJHeTdzTEYwSzQ0QWJ2S0g1dWp6UzdRbGpXdH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KCJzdXJldmlldy1zdGlja3kwMDEtYmFubmVyIikuc3R5bGUuZGlzcGxheSA9ICJub25lIjsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbChTVmluaXRJbnRlcnZhbCk7DQoJCQkJU1Zpbml0SW50ZXJ2YWwgPSBzZXRJbnRlcnZhbChyZWZyZXNoU1ZTbG90LCAyMjAwMCwgc3Zfc3RpY2t5MDAxX3Nsb3QpOw0KCQkJfTsNCgkJfSkoKTsNCgk8L3NjcmlwdD4NCjwvZGl2Pg=="; var googleBs64Code=widget_code; top.svJQInj_1 = {}; by_tag_name="p"; placed_by="1"; no_of_tag="0"; if (!top.window.jQuery) { var dJqDynamic = document.createElement("script"); dJqDynamic.src = atob("aHR0cHM6Ly9hamF4Lmdvb2dsZWFwaXMuY29tL2FqYXgvbGlicy9qcXVlcnkvMy43LjAvanF1ZXJ5Lm1pbi5qcw=="); top.document.getElementsByTagName("head")[0].append(dJqDynamic); dJqDynamic.onload = function(){ top.svJQInj_1 = jQuery.noConflict(true); } }else{ } var widget_code="ICAgPGRpdiBpZD0idGVzdC1zdXJldmlldyI+DQogICAgICAgIDxzY3JpcHQ+DQogICAgICAgIHZhciBtYWluID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgiZGl2Iik7DQogICAgICAgICAgICAgICAgICAgIHZhciBtYWluX2NvbnRhaW5lciA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoImRpdiIpOw0KICAgICAgICAgICAgICAgICAgICBtYWluX2NvbnRhaW5lci5pZCA9ICJzdi1naW1hLWNvbnN0LWNvbnRuciI7DQogICAgICAgICAgICAgICAgICAgIG1haW5fY29udGFpbmVyLmNsYXNzTmFtZSA9ICJzdi1jb250ZW50LXBhcmVudCBzdmlld19mbG9hdF9wbGF5ZXJfb3V0c3RyZWFtIGNvbGxhcHNlIjsNCg0KDQogICAgICAgICAgICAgICAgICAgIHZhciBsaW5rID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgibGluayIpOw0KICAgICAgICAgICAgICAgICAgICBsaW5rLnR5cGUgPSAidGV4dC9jc3MiOw0KICAgICAgICAgICAgICAgICAgICBsaW5rLnJlbCA9ICJzdHlsZXNoZWV0IjsNCiAgICAgICAgICAgICAgICAgICAgbGluay5ocmVmID0gImh0dHBzOi8vYXBwLnN1cmV2aWV3LnR2L2Fzc2V0cy9vdXRzdHJlYW1fcGxheWVyL3N0eWxlLmNzcyI7DQogICAgICAgICAgICAgICAgICAgIG1haW4uYXBwZW5kQ2hpbGQobGluayk7DQogICAgICAgICAgICAgICAgICAgIA0KICAgICAgICAgICAgICAgICAgICB2YXIgc3R5bGVFbGVtZW50PSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdzdHlsZScpOw0KICAgICAgICAgICAgICAgICAgICBzdHlsZUVsZW1lbnQuaW5uZXJIVE1MPSIuc3ZpZXdfZmxvYXRfcGxheWVyX291dHN0cmVhbXsgYm90dG9tOiAxMjBweCAhaW1wb3J0YW50O30iOw0KICAgICAgICAgICAgICAgICAgICBtYWluLmFwcGVuZENoaWxkKHN0eWxlRWxlbWVudCk7DQoNCiAgICAgICAgICAgICAgICAgICAgdmFyIGNyZWRpdF9jb250YWluZXIgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCJkaXYiKTsNCiAgICAgICAgICAgICAgICAgICAgY3JlZGl0X2NvbnRhaW5lci5jbGFzc05hbWU9ImNyZWRpdC1jb250YWluZXIiOw0KICAgICAgICAgICAgICAgICAgICB2YXIgc3Bhbl9hZHYgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCJzcGFuIik7DQogICAgICAgICAgICAgICAgICAgIHNwYW5fYWR2LmlubmVySFRNTD0iLS0iOw0KICAgICAgICAgICAgICAgICAgICBjcmVkaXRfY29udGFpbmVyLmFwcGVuZENoaWxkKHNwYW5fYWR2KTsNCiAgICAgICAgICAgICAgICAgICAgbWFpbl9jb250YWluZXIuYXBwZW5kQ2hpbGQoY3Jl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yBib3JkZXItc3R5bGU6IHVuc2V0OyBtYXJnaW4tbGVmdDogLTRweDsiOw0KICAgICAgICAgICAgICAgICAgICBjbG9zZV9zdWJfc3ViX2NvbnRhaW5lci5hcHBlbmRDaGlsZChjcm9zc19pbWFnZSk7DQogICAgICAgICAgICAgICAgICAgIGNsb3NlX3N1Yl9jb250YWluZXIuYXBwZW5kQ2hpbGQoY2xvc2Vfc3ViX3N1Yl9jb250YWluZXIpOw0KICAgICAgICAgICAgICAgICAgICBjbG9zZV9jb250YWluZXIuYXBwZW5kQ2hpbGQoY2xvc2Vfc3ViX2NvbnRhaW5lcik7DQogICAgICAgICAgICAgICAgICAgIG1haW5fY29udGFpbmVyLmFwcGVuZENoaWxkKGNsb3NlX2NvbnRhaW5lcik7DQoNCiAgICAgICAgICAgICAgICAgICAgdmFyIGltYWZyYW1lX2NvbnRhaW5lciA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoImRpdiIpOw0KICAgICAgICAgICAgICAgICAgICBpbWFmcmFtZV9jb250YWluZXIuY2xhc3NOYW1lPSJzdi1pbWFmcmFtZS1jb250YWluZXIgc3YtaW1hZnJhbWUtY29udGFpbmVyLW1vYmlsZSI7DQogICAgICAgICAgICAgICAgICAgIHZhciBwbGF5ZXJfY29udGFpbmVyID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgiZGl2Iik7DQogICAgICAgICAgICAgICAgICAgIHBsYXllcl9jb250YWluZXIuaWQ9InZpZGVvLXBsYXllci1jb250YWluZXIiOw0KICAgICAgICAgICAgICAgICAgICBpbWFmcmFtZV9jb250YWluZXIuYXBwZW5kQ2hpbGQocGxheWVyX2NvbnRhaW5lcik7DQoNCiAgICAgICAgICAgICAgICAgICAgdmFyIHN2X2xvZ29fY29udGFpbmVyID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgiZGl2Iik7DQogICAgICAgICAgICAgICAgICAgIHN2X2xvZ29fY29udGFpbmVyLmNsYXNzTmFtZT0ic3YtbG9nbyI7DQogICAgICAgICAgICAgICAgICAgIHN2X2xvZ29fY29udGFpbmVyLmFkZEV2ZW50TGlzdGVuZXIoImNsaWNrIiwgZnVuY3Rpb24oKXsNCiAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5vcGVuKCdodHRwczovL3N1cmV2aWV3LnR2JywgJ19ibGFuaycpOw0KICAgICAgICAgICAgICAgICAgICB9KTsNCg0KICAgICAgICAgICAgICAgICAgICB2YXIgc3ZfbG9nbyA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoImltZyIpOw0KICAgICAgICAgICAgICAgICAgICBzdl9sb2dvLnNyYyA9Imh0dHBzOi8vYXBwLnN1cmV2aWV3LnR2L2NvbnRyb2xzL3N1cmV2aWV3LWljb24uc3ZnIjsNCiAgICAgICAgICAgICAgICAgICAgc3ZfbG9nb19jb250YWluZXIuYXBwZW5kQ2hpbGQoc3ZfbG9nbyk7DQogICAgICAgICAgICAgICAgICAgIGltYWZyYW1lX2NvbnRhaW5lci5hcHBlbmRDaGlsZChzdl9sb2dvX2NvbnRhaW5lcik7DQogICAgICAgICAgICAgICAgICAgIA0KICAgICAgICAgICAgICAgICAgICB2YXIgYnJuX3BsYWNlbWVudF9mb290ZXJfY29udGFpbmVyID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgiZGl2Iik7DQogICAgICAgICAgICAgICAgICAgIGJybl9wbGFjZW1lbnRfZm9vdGVyX2NvbnRhaW5lci5jbGFzc05hbWU9ImJ0bi1wbGFjZW1lbnQtZm9vdGVyIjsNCiAgICAgICAgICAgICAgICAgICAgaW1hZnJhbWVfY29udGFpbmVyLmFwcGVuZENoaWxkKGJybl9wbGFjZW1lbnRfZm9vdGVyX2NvbnRhaW5lcik7DQoNCiAgICAgICAgICAgICAgICAgICAgdmFyIHBsYXllcl90b2dnZXJfY29udGFpbmVyID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgiZGl2Iik7DQogICAgICAgICAgICAgICAgICAgIHBsYXllcl90b2dnZXJfY29udGFpbmVyLmNsYXNzTmFtZT0icGxheWVyLXRvZ2dsZS1jb250YWluZXIiOw0KICAgICAgICAgICAgICAgICAgICB2YXIgcGxheV9wYXVzZV9idG4gPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCJidXR0b24iKTsNCiAgICAgICAgICAgICAgICAgICAgcGxheV9wYXVzZV9idG4uaWQ9InBsYXllci10b2dnbGUiOw0KICAgICAgICAgICAgICAgICAgICBwbGF5X3BhdXNlX2J0bi5jbGFzc05hbWU9InZpZGVvLWJ0bi1wYXVzZSI7DQogICAgICAgICAgICAgICAgICAgIHZhciBwbGF5cGF1c2VfaWNvbiA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoImltZyIpOw0KICAgICAgICAgICAgICAgICAgICBwbGF5X3BhdXNlX2J0bi5hcHBlbmRDaGlsZChwbGF5cGF1c2VfaWNvbik7DQogICAgICAgICAgICAgICAgICAgIHBsYXllcl90b2dnZXJfY29udGFpbmVyLmFwcGVuZENoaWxkKHBsYXlfcGF1c2VfYnRuKTsNCiAgICAgICAgICAgICAgICAgICAgaW1hZnJhbWVfY29udGFpbmVyLmFwcGVuZENoaWxkKHBsYXllcl90b2dnZXJfY29udGFpbmVyKTsNCg0KICAgICAgICAgICAgICAgICAgICB2YXIgc291bmRfdG9nZ2VyX2NvbnRhaW5lciA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoImRpdiIpOw0KICAgICAgICAgICAgICAgICAgICBzb3VuZF90b2dnZXJfY29udGFpbmVyLmNsYXNzTmFtZT0ic291bmQtdG9nZ2xlLWNvbnRhaW5lciI7DQogICAgICAgICAgICAgICAgICAgIHZhciBzb3VuZF9wYXVzZV9idG4gPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCJidXR0b24iKTsNCiAgICAgICAgICAgICAgICAgICAgc291bmRfcGF1c2VfYnRuLmlkPSJzb3VuZC10b2dnbGUiOw0KICAgICAgICAgICAgICAgICAgICBzb3VuZF9wYXVzZV9idG4uY2xhc3NOYW1lPSJzb3VuZC1idG4tcGF1c2UiOw0KICAgICAgICAgICAgICAgICAgICB2YXIgc291bmRfaWNvbiA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoImltZyIpOw0KICAgICAgICAgICAgICAgICAgICBzb3VuZF9wYXVzZV9idG4uYXBwZW5kQ2hpbGQoc291bmRfaWNvbik7DQogICAgICAgICAgICAgICAgICAgIHNvdW5kX3RvZ2dlcl9jb250YWluZXIuYXBwZW5kQ2hpbGQoc291bmRfcGF1c2VfYnRuKTsNCiAgICAgICAgICAgICAgICAgICAgaW1hZnJhbWVfY29udGFpbmVyLmFwcGVuZENoaWxkKHNvdW5kX3RvZ2dlcl9jb250YWluZXIpOw0KDQogICAgICAgICAgICAgICAgICAgIG1haW5fY29udGFpbmVyLmFwcGVuZENoaWxkKGltYWZyYW1lX2NvbnRhaW5lcik7DQogICAgICAgICAgICAgICAgICAgIA0KICAgICAgICAgICAgICAgICAgICANCg0KICAgICAgICAgICAgICAgICAgICBtYWluLmFwcGVuZENoaWxkKG1haW5fY29udGFpbmVyKTsNCiAgICAgICAgICAgICAgICAgICAgDQogICAgICAgICAgICAgICAgICAgIHZhciB4eXogPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgidGVzdC1zdXJldmlldyIpOw0KICAgICAgICAgICAgICAgICAgICB4eXouYXBwZW5kQ2hpbGQobWFpbik7DQogICAgICAgICAgICAgICAgICAgIDwvc2NyaXB0Pg0KICAgICAgICAgICAgICAgICAgICA8c2NyaXB0Pg0KICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93LmN1cnJQbGF5ZXI9IiI7DQogICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cuc3ZfcGdfcmVxPTA7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGNvbnN0cnVjdEFkQ29udGFpbmVyID0gZnVuY3Rpb24gKCkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cuc3ZfcGdfcmVxPXdpbmRvdy5zdl9wZ19yZXErMTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYod2luZG93LnN2X3BnX3JlcTw9MTApew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGF2YWlsYWJsZUFkQ29udGFpbmVySWRzID0gWyJzdi1naW1hLTEiLCAic3YtZ2ltYS0yIiwgInN2LWdpbWEtMyIsICJzdi1naW1hLTQiLCAic3YtZ2ltYS01IiwgInN2LWdpbWEtNiIsICJzdi1naW1hLTciLCAic3YtZ2ltYS04IiwgInN2LWdpbWEtOSIsInN2LWdpbWEtMTAiXTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzdlBhcmVudFNsb3RzID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoInZpZGVvLXBsYXllci1jb250YWluZXIiKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBhdmFpbGFibGVQbGF5ZXJzID0gc3ZQYXJlbnRTbG90cy5jaGlsZHJlbjsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkaXN0YW50UGxheWVySURzID0gW107DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoYXZhaWxhYmxlUGxheWVycy5sZW5ndGggPiAwKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBhdmFpbGFibGVQbGF5ZXJzLmxlbmd0aDsgaSsrKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBlYWNoUGxheWVySWQgPSBhdmFpbGFibGVQbGF5ZXJzW2ldLmlkOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBpbmRleCA9IGF2YWlsYWJsZUFkQ29udGFpbmVySWRzLmluZGV4T2YoZWFjaFBsYXllcklkKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGluZGV4ID4gLTEpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGF2YWlsYWJsZUFkQ29udGFpbmVySWRzLnNwbGljZShpbmRleCwgMSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoYXZhaWxhYmxlQWRDb250YWluZXJJZHMubGVuZ3RoID4gMCkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBhZENvbnRhaW5lciA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoImRpdiIpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBhZENvbnRhaW5lcklkID0gYXZhaWxhYmxlQWRDb250YWluZXJJZHMucG9wKCk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRDb250YWluZXIuaWQgPSBhZENvbnRhaW5lcklkOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJ2aWRlby1wbGF5ZXItY29udGFpbmVyIikuYXBwZW5kQ2hpbGQoYWRDb250YWluZXIpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBhZENvbnRhaW5lcklkOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGxvYWRHSU1BKHBsYXllckNvbnRhaW5lcklEKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0YXJnZXRQbGF5ZXJDb250YWluZXJJZCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHBsYXllckNvbnRhaW5lcklEKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGFkRGlzcGxheUNvbnRhaW5lciA9IG5ldyBnb29nbGUuaW1hLkFkRGlzcGxheUNvbnRhaW5lcih0YXJnZXRQbGF5ZXJDb250YWluZXJJZCk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkRGlzcGxheUNvbnRhaW5lci5pbml0aWFsaXplKCk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhcmdldFBsYXllckNvbnRhaW5lcklkLnNldEF0dHJpYnV0ZSgiZGF0YS1naW1hLXAtaWQiLCBhZERpc3BsYXlDb250YWluZXIuWik7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBnSU1BTG9hZGVyID0gbmV3IGdvb2dsZS5pbWEuQWRzTG9hZGVyKGFkRGlzcGxheUNvbnRhaW5lcik7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdJTUFMb2FkZXIuYWRkRXZlbnRMaXN0ZW5lcihnb29nbGUuaW1hLkFkc01hbmFnZXJMb2FkZWRFdmVudC5UeXBlLkFEU19NQU5BR0VSX0xPQURFRCwgb25BZHNNYW5hZ2VyTG9hZGVkLCBmYWxzZSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdJTUFMb2FkZXIuZ2V0U2V0dGluZ3MoKS5zZXRGZWF0dXJlRmxhZ3MoeydkaXNhYmxlQ2xpY2tBZFBhdXNlJzogdHJ1ZX0pOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnSU1BTG9hZGVyLmFkZEV2ZW50TGlzdGVuZXIoZ29vZ2xlLmltYS5BZEVycm9yRXZlbnQuVHlwZS5BRF9FUlJPUiwgb25BZHNFcnJvciwgZmFsc2UpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZ0lNQUxvYWRlcjsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBjb25maWd1cmVHSU1BKCkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZ0lNQUNvbmYgPSBuZXcgZ29vZ2xlLmltYS5BZHNSZXF1ZXN0KCk7DQoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ0lNQUNvbmYuYWRUYWdVcmwgPSAnaHR0cHM6Ly9wdWJhZHMuZy5kb3VibGVjbGljay5uZXQvZ2FtcGFkL2Fkcz9pdT0vMjI3MjkzMTU1NzQsMjMwMDQ2NjIxODQvSnVibmEvSnVibmFfcWF0YXJwbGF0Zm9ybSZkZXNjcmlwdGlvbl91cmw9aHR0cHMlM0ElMkYlMkZxYXRhcnBsYXRmb3JtLm5ldCUyRiZ0ZmNkPTAmbnBhPTAmc3o9NDAweDMwMCU3QzY0MHg0ODAmZ2RmcF9yZXE9MSZ1bnZpZXdlZF9wb3NpdGlvbl9zdGFydD0xJm91dHB1dD12YXN0JmVudj12cCZpbXBsPXMmdnBtdXRlPTEmY29ycmVsYXRvcj0nOw0KDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdJTUFDb25mLmxpbmVhckFkU2xvdFdpZHRoID0gNDQwOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnSU1BQ29uZi5saW5lYXJBZFNsb3RIZWlnaHQgPSAyNDA7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdJTUFDb25mLm5vbkxpbmVhckFkU2xvdFdpZHRoID0gMjQwOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnSU1BQ29uZi5ub25MaW5lYXJBZFNsb3RIZWlnaHQgPSAxNTA7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBnSU1BQ29uZjsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgb25BZHNNYW5hZ2VyTG9hZGVkID0gZnVuY3Rpb24gKGFkc01hbmFnZXJMb2FkZWRFdmVudCkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZHNNYW5hZ2VyID0gYWRzTWFuYWdlckxvYWRlZEV2ZW50LmdldEFkc01hbmFnZXIoZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgndmlkZW8nKSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkc01hbmFnZXIuYWRkRXZlbnRMaXN0ZW5lcigNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnb29nbGUuaW1hLkFkRXZlbnQuVHlwZS5TVEFSVEVELA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQWRTdGFydGVkKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRzTWFuYWdlci5hZGRFdmVudExpc3RlbmVyKA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdvb2dsZS5pbWEuQWRFdmVudC5UeXBlLlJFU1VNRUQsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRzUmVzdW1lKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRzTWFuYWdlci5hZGRFdmVudExpc3RlbmVyKA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdvb2dsZS5pbWEuQWRFdmVudC5UeXBlLlBBVVNFRCwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZHNQYXVzZSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkc01hbmFnZXIuYWRkRXZlbnRMaXN0ZW5lcigNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnb29nbGUuaW1hLkFkRXZlbnQuVHlwZS5WT0xVTUVfTVVURUQsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRzTXV0ZSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkc01hbmFnZXIuYWRkRXZlbnRMaXN0ZW5lcigNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnb29nbGUuaW1hLkFkRXZlbnQuVHlwZS5WT0xVTUVfQ0hBTkdFRCwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZHNVbk11dGUpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZHNNYW5hZ2VyLmFkZEV2ZW50TGlzdGVuZXIoDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ29vZ2xlLmltYS5BZEV2ZW50LlR5cGUuQ0xJQ0ssDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25BZHNDbGljayk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkc01hbmFnZXIuYWRkRXZlbnRMaXN0ZW5lcigNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnb29nbGUuaW1hLkFkRXZlbnQuVHlwZS5DT01QTEVURSwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkFkc0NvbXBsZXRlKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRzTWFuYWdlci5zZXRWb2x1bWUoMCk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZHNNYW5hZ2VyLmluaXQoMTc5LCAxMDEsIGdvb2dsZS5pbWEuVmlld01vZGUuTk9STUFMKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkc01hbmFnZXIuc3RhcnQoKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoYWRFcnJvcikgew0KDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgaXNfcGxheWluZyA9IDA7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGlzX211dGVkID0gMTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgYWRzTWFuYWdlcjsNCg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkZXN0cm95UGxheWVyID0gZnVuY3Rpb24gKHBsYXllcklkKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGVsZW1lbnQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCdkaXZbZGF0YS1naW1hLXAtaWQ9IicgKyBwbGF5ZXJJZCArICciXScpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGVtZW50LnJlbW92ZSgpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGluaXRBZHMoKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwbGF5ZXJDb250YWluZXJJRCA9IGNvbnN0cnVjdEFkQ29udGFpbmVyKCk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBnSU1BTG9hZGVyID0gbG9hZEdJTUEocGxheWVyQ29udGFpbmVySUQpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZ0lNQUNvbmYgPSBjb25maWd1cmVHSU1BKCk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdJTUFMb2FkZXIucmVxdWVzdEFkcyhnSU1BQ29uZik7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIG9uQWRzQ29tcGxldGUoZSkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgic3ZpZXctY2xvc2Utc2VjdGlvbiIpLmNsYXNzTGlzdC5yZW1vdmUoImNsb3NlX2J0bl9zZWNfYWZ0ZXJfMTAiKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRzTWFuYWdlci5zZXRWb2x1bWUoMCk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzX211dGVkPTE7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwbGF5ZXJJZCA9IGUudGFyZ2V0LmcuWjsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3ZHaW1hQ29uc3RDb250bnIgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgic3YtZ2ltYS1jb25zdC1jb250bnIiKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3ZHaW1hQ29uc3RDb250bnIuY2xhc3NMaXN0LmFkZCgiY29sbGFwc2UiKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXN0cm95UGxheWVyKHBsYXllcklkKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluaXRBZHMoKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgMjAwMCk7DQoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gb25BZFN0YXJ0ZWQoZSkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzdkdpbWFDb25zdENvbnRuciA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJzdi1naW1hLWNvbnN0LWNvbnRuciIpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdkdpbWFDb25zdENvbnRuci5jbGFzc0xpc3QucmVtb3ZlKCJjb2xsYXBzZSIpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpc19wbGF5aW5nID0gMTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWZ0ZXJfMTBfc2VjKCk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGFkc1BhdXNlKGUpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXNfcGxheWluZyA9IDA7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGFkc1Jlc3VtZShlKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzX3BsYXlpbmcgPSAxOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBhZHNNdXRlKGUpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXNfbXV0ZWQgPSAxOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBhZHNVbk11dGUoZSkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpc19tdXRlZCA9IDA7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIG9uQWRzQ2xpY2soZSkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBvbkFkc0Vycm9yKGUpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzdHJveVBsYXllcihlLmN1cnJlbnRUYXJnZXQuZy5aKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5pdEFkcygpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiB0b2dnbGVWaWRlb1BsYXllcigpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlzX3BsYXlpbmcpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkc01hbmFnZXIucGF1c2UoKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzX3BsYXlpbmcgPSAwOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoInBsYXllci10b2dnbGUiKS5jbGFzc05hbWUgPSAidmlkZW8tYnRuLXBsYXkiOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Ugew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRzTWFuYWdlci5yZXN1bWUoKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzX3BsYXlpbmcgPSAxOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoInBsYXllci10b2dnbGUiKS5jbGFzc05hbWUgPSAidmlkZW8tYnRuLXBhdXNlIjsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiB0b2dnbGVTb3VuZEJ1dHRvbigpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlzX211dGVkID09PSAxKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpc19tdXRlZD0wOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRzTWFuYWdlci5zZXRWb2x1bWUoMSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgic291bmQtdG9nZ2xlIikuY2xhc3NOYW1lID0gInNvdW5kLWJ0bi1wbGF5IjsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzX211dGVkPTE7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZHNNYW5hZ2VyLnNldFZvbHVtZSgwKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJzb3VuZC10b2dnbGUiKS5jbGFzc05hbWUgPSAic291bmQtYnRuLXBhdXNlIjsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcGxheVBhdXNlID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ3BsYXllci10b2dnbGUnKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbGF5UGF1c2UuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLCB0b2dnbGVWaWRlb1BsYXllcik7DQoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgc291bmRVbm11dGVidG4gPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnc291bmQtdG9nZ2xlJyk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgc291bmRVbm11dGVidG4uYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLCB0b2dnbGVTb3VuZEJ1dHRvbik7DQoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgR0lNQVNka1NjcmlwdCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoInNjcmlwdCIpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdJTUFTZGtTY3JpcHQudHlwZSA9ICJ0ZXh0L2phdmFzY3JpcHQiOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdJTUFTZGtTY3JpcHQub25sb2FkID0gZnVuY3Rpb24gKCkgeyANCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5pdEFkcygpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgR0lNQVNka1NjcmlwdC5zcmMgPSAiLy9pbWFzZGsuZ29vZ2xlYXBpcy5jb20vanMvc2RrbG9hZGVyL2ltYTMuanMiOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKCJoZWFkIilbMF0uYXBwZW5kQ2hpbGQoR0lNQVNka1NjcmlwdCk7DQoNCg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvcC5kb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnaGlkZVN2aWV3U21hcnRCYW5uZXInKS5vbmNsaWNrID0gZnVuY3Rpb24gKGV2dCkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzdkdpbWFDb25zdENvbnRuciA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJzdi1naW1hLWNvbnN0LWNvbnRuciIpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZHNNYW5hZ2VyLnBhdXNlKCk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN2R2ltYUNvbnN0Q29udG5yLmNsYXNzTGlzdC5hZGQoImNvbGxhcHNlIik7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfTsNCg0KDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcigidmlzaWJpbGl0eWNoYW5nZSIsIGZ1bmN0aW9uIChldmVudCkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZG9jdW1lbnQuaGlkZGVuKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b2dnbGVWaWRlb1BsYXllcigpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvZ2dsZVZpZGVvUGxheWVyKCk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTsNCg0KDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGlzSW5WaWV3cG9ydChlbCkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgcmVjdCA9IGVsLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICgNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWN0LnRvcCA+PSAwICYmDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVjdC5sZWZ0ID49IDAgJiYNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWN0LmJvdHRvbSA8PSAod2luZG93LmlubmVySGVpZ2h0IHx8IGRvY3VtZW50LmRvY3VtZW50RWxlbWVudC5jbGllbnRIZWlnaHQpICYmDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVjdC5yaWdodCA8PSAod2luZG93LmlubmVyV2lkdGggfHwgZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50LmNsaWVudFdpZHRoKQ0KDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgYm94ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnN2LWNvbnRlbnQtcGFyZW50Jyk7DQoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcignc2Nyb2xsJywgZnVuY3Rpb24gKCkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbWVzc2FnZVRleHQgPSBpc0luVmlld3BvcnQoYm94KTsNCg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobWVzc2FnZVRleHQpew0KDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsNCg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KDQoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFzc2l2ZTogdHJ1ZQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTsNCg0KDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gYWZ0ZXJfMTBfc2VjKCl7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoInN2aWV3LWNsb3NlLXNlY3Rpb24iKS5jbGFzc0xpc3QuYWRkKCJjbG9zZV9idG5fc2VjX2FmdGVyXzEwIik7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCA1MDAwKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBvcGVuSU5Ib3VzZSgpew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cub3BlbignaHR0cHM6Ly9zdXJldmlldy50dicsICdfYmxhbmsnKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQoNCiAgICAgICAgICAgICAgICAgICAgPC9zY3JpcHQ+DQogICAgPC9kaXY+"; var googleBs64Code=widget_code; top.svJQInj_1 = {}; by_tag_name="p"; placed_by="1"; no_of_tag="0"; if (!top.window.jQuery) { var dJqDynamic = document.createElement("script"); dJqDynamic.src = atob("aHR0cHM6Ly9hamF4Lmdvb2dsZWFwaXMuY29tL2FqYXgvbGlicy9qcXVlcnkvMy43LjAvanF1ZXJ5Lm1pbi5qcw=="); top.document.getElementsByTagName("head")[0].append(dJqDynamic); dJqDynamic.onload = function(){ top.svJQInj_1 = jQuery.noConflict(true); if(placed_by=='1'){ top.svJQInj_1(by_tag_name).eq(no_of_tag).append(atob(googleBs64Code)); }else if(placed_by=='2'){ top.svJQInj_1("."+by_tag_name).eq(no_of_tag).append(atob(googleBs64Code)); }else if(placed_by=='3'){ top.svJQInj_1("#"+by_tag_name).append(atob(googleBs64Code)); } } }else{ if(placed_by=='1'){ top.jQuery(by_tag_name).eq(no_of_tag).append(atob(googleBs64Code)); }else if(placed_by=='2'){ top.jQuery("."+by_tag_name).eq(no_of_tag).append(atob(googleBs64Code)); }else if(placed_by=='3'){ top.jQuery("#"+by_tag_name).append(atob(googleBs64Code)); } } setTimeout(function(){ try{ }catch{ } if(document.getElementsByClassName('teads-inread').length>0){ var teadsMarginStyle = document.createElement('style'); teadsMarginStyle.innerHTML=".teads-inread {padding-bottom:10px !important;}"; document.getElementsByClassName('teads-inread')[0].appendChild(teadsMarginStyle); } },8000); },800); function set_aniview_after15sec(){ setlogoTeads_intval=setInterval(function(){ try{ document.querySelector(".teads-inread").remove(); }catch{ } },15000); } function new_logo(company_id){ var isLogoTriggered = false; var isLogoTriggeredTeads = false; if(company_id==2){ var test_id=338; setlogoTeads_intval=setInterval(function(){ teads_primary_div=document.getElementById('teads0'); if(test_id==64 && !isLogoTriggeredTeads){ isLogoTriggeredTeads = true; clearInterval(setlogoTeads_intval); var bottom_div = document.createElement("div"); bottom_div.id="sureview_branding_2"; bottom_div.style.cssText="line-height:0px;"; bottom_div.className="sureviewBottomDiv sureviewtv"; var anchor1=document.createElement("a"); anchor1.href="http://sureview.tv/"; anchor1.target="_BLANK"; var bottom_logo_img = document.createElement("img"); bottom_logo_img.id="sureview_logo_bottom_2"; bottom_logo_img.src="https://app.sureview.tv/logo/sureview_logo.svg"; bottom_logo_img.style.cssText="height: 18px !important; margin: 0 !important; margin-top: 2px !important; width: 70px !important;"; anchor1.appendChild(bottom_logo_img); bottom_div.appendChild(anchor1); teads_primary_div.appendChild(bottom_div); }else{ } },1000); }else{ daily_motion_ads=document.getElementById('daily_motion_ads_div'); setlogo_intval=setInterval(function(){ if(document.getElementsByClassName('dm-player-wrapper').length > 0 && !isLogoTriggered){ isLogoTriggered = true; clearInterval(setlogo_intval); var bottom_div = document.createElement("div"); bottom_div.id="sureview_branding"; bottom_div.style.cssText="line-height:0px;"; bottom_div.className="sureviewBottomDiv sureviewtv"; var anchor1=document.createElement("a"); anchor1.href="http://sureview.tv/"; anchor1.target="_BLANK"; var bottom_logo_img = document.createElement("img"); bottom_logo_img.id="sureview_logo_bottom"; bottom_logo_img.src="https://app.sureview.tv/logo/sureview_logo.svg"; bottom_logo_img.style.cssText="height: 18px !important; margin: 0 !important; margin-top: 2px !important; width: 70px !important;"; anchor1.appendChild(bottom_logo_img); bottom_div.appendChild(anchor1); daily_motion_ads.appendChild(bottom_div); is_dm_ready(); } },1000); } } function is_dm_ready(){ var is_dm_sv_ready = setInterval(function(){ if(top.document.querySelectorAll(".dailymotion-player-wrapper .dm__close-button").length > 0){ clearInterval(is_dm_sv_ready); document.querySelector(".dailymotion-player-wrapper .dm__close-button").innerHTML += ''; } },500); } function is_avail_selector(name, by){ if(by==1){ placement_salector=document.getElementsByTagName(name); if(placement_salector.length>0){ return placement_salector; }else{ return 0; } }else if(by==2){ placement_salector=document.getElementsByClassName(name); if(placement_salector.length>0){ return placement_salector; }else{ return 0; } }else if(by==3){ placement_salector=top.document.getElementById(name); if(placement_salector===null){ return 0; }else{ return placement_salector; } }else if(by==4){ placement_salector=document.querySelectorAll(name); if(placement_salector===null){ return 0; }else{ return placement_salector; } }else{ placement_salector=document.getElementById(name); if(placement_salector===null){ return 0; }else{ return placement_salector; } } } function set_bottom_logo(company){ var counter=1; setlogo_intval=setInterval(function(){ counter++; try{ document.getElementById("sureview_branding").remove(); }catch(error){ } var sureview_div=document.getElementById('Sureview338').clientWidth; try{ if(company==1){ var video_div=document.getElementsByClassName('ima-ad-container')[0].clientWidth; }else if(company==2){ var video_div=document.getElementsByClassName('teads-player')[0].clientWidth; }else if(company==4){ var video_div=document.getElementById('ifr_ICAgPGRpdiBpZD0idGVzdC1zdXJldmlldyI+DQogICAgICAgIDxzY3JpcHQ+DQogICAgICAgIHZhciBtYWluID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgiZGl2Iik7DQogICAgICAgICAgICAgICAgICAgIHZhciBtYWluX2NvbnRhaW5lciA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoImRpdiIpOw0KICAgICAgICAgICAgICAgICAgICBtYWluX2NvbnRhaW5lci5pZCA9ICJzdi1naW1hLWNvbnN0LWNvbnRuciI7DQogICAgICAgICAgICAgICAgICAgIG1haW5fY29udGFpbmVyLmNsYXNzTmFtZSA9ICJzdi1jb250ZW50LXBhcmVudCBzdmlld19mbG9hdF9wbGF5ZXJfb3V0c3RyZWFtIGNvbGxhcHNlIjsNCg0KDQogICAgICAgICAgICAgICAgICAgIHZhciBsaW5rID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgibGluayIpOw0KICAgICAgICAgICAgICAgICAgICBsaW5rLnR5cGUgPSAidGV4dC9jc3MiOw0KICAgICAgICAgICAgICAgICAgICBsaW5rLnJlbCA9ICJzdHlsZXNoZWV0IjsNCiAgICAgICAgICAgICAgICAgICAgbGluay5ocmVmID0gImh0dHBzOi8vYXBwLnN1cmV2aWV3LnR2L2Fzc2V0cy9vdXRzdHJlYW1fcGxheWVyL3N0eWxlLmNzcyI7DQogICAgICAgICAgICAgICAgICAgIG1haW4uYXBwZW5kQ2hpbGQobGluayk7DQogICAgICAgICAgICAgICAgICAgIA0KICAgICAgICAgICAgICAgICAgICB2YXIgc3R5bGVFbGVtZW50PSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdzdHlsZScpOw0KICAgICAgICAgICAgICAgICAgICBzdHlsZUVsZW1lbnQuaW5uZXJIVE1MPSIuc3ZpZXdfZmxvYXRfcGxheWVyX291dHN0cmVhbXsgYm90dG9tOiAxMjBweCAhaW1wb3J0YW50O30iOw0KICAgICAgICAgICAgICAgICAgICBtYWluLmFwcGVuZENoaWxkKHN0eWxlRWxlbWVudCk7DQoNCiAgICAgICAgICAgICAgICAgICAgdmFyIGNyZWRpdF9jb250YWluZXIgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCJkaXYiKTsNCiAgICAgICAgICAgICAgICAgICAgY3JlZGl0X2NvbnRhaW5lci5jbGFzc05hbWU9ImNyZWRpdC1jb250YWluZXIiOw0KICAgICAgICAgICAgICAgICAgICB2YXIgc3Bhbl9hZHYgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCJzcGFuIik7DQogICAgICAgICAgICAgICAgICAgIHNwYW5fYWR2LmlubmVySFRNTD0iLS0iOw0KICAgICAgICAgICAgICAgICAgICBjcmVkaXRfY29udGFpbmVyLmFwc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c29yOiBwb2ludGVyOyBtYXJnaW4tbGVmdDogYXV0bzsgbWFyZ2luOiB1bnNldDsgdmVydGljYWwtYWxpZ246IHVuc2V0OyBib3JkZXItc3R5bGU6IHVuc2V0OyBtYXJnaW4tbGVmdDogLTRweDsiOw0KICAgICAgICAgICAgICAgICAgICBjbG9zZV9zdWJfc3ViX2NvbnRhaW5lci5hcHBlbmRDaGlsZChjcm9zc19pbWFnZSk7DQogICAgICAgICAgICAgICAgICAgIGNsb3NlX3N1Yl9jb250YWluZXIuYXBwZW5kQ2hpbGQoY2xvc2Vfc3ViX3N1Yl9jb250YWluZXIpOw0KICAgICAgICAgICAgICAgICAgICBjbG9zZV9jb250YWluZXIuYXBwZW5kQ2hpbGQoY2xvc2Vfc3ViX2NvbnRhaW5lcik7DQogICAgICAgICAgICAgICAgICAgIG1haW5fY29udGFpbmVyLmFwcGVuZENoaWxkKGNsb3NlX2NvbnRhaW5lcik7DQoNCiAgICAgICAgICAgICAgICAgICAgdmFyIGltYWZyYW1lX2NvbnRhaW5lciA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoImRpdiIpOw0KICAgICAgICAgICAgICAgICAgICBpbWFmcmFtZV9jb250YWluZXIuY2xhc3NOYW1lPSJzdi1pbWFmcmFtZS1jb250YWluZXIgc3YtaW1hZnJhbWUtY29udGFpbmVyLW1vYmlsZSI7DQogICAgICAgICAgICAgICAgICAgIHZhciBwbGF5ZXJfY29udGFpbmVyID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgiZGl2Iik7DQogICAgICAgICAgICAgICAgICAgIHBsYXllcl9jb250YWluZXIuaWQ9InZpZGVvLXBsYXllci1jb250YWluZXIiOw0KICAgICAgICAgICAgICAgICAgICBpbWFmcmFtZV9jb250YWluZXIuYXBwZW5kQ2hpbGQocGxheWVyX2NvbnRhaW5lcik7DQoNCiAgICAgICAgICAgICAgICAgICAgdmFyIHN2X2xvZ29fY29udGFpbmVyID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgiZGl2Iik7DQogICAgICAgICAgICAgICAgICAgIHN2X2xvZ29fY29udGFpbmVyLmNsYXNzTmFtZT0ic3YtbG9nbyI7DQogICAgICAgICAgICAgICAgICAgIHN2X2xvZ29fY29udGFpbmVyLmFkZEV2ZW50TGlzdGVuZXIoImNsaWNrIiwgZnVuY3Rpb24oKXsNCiAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5vcGVuKCdodHRwczovL3N1cmV2aWV3LnR2JywgJ19ibGFuaycpOw0KICAgICAgICAgICAgICAgICAgICB9KTsNCg0KICAgICAgICAgICAgICAgICAgICB2YXIgc3ZfbG9nbyA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoImltZyIpOw0KICAgICAgICAgICAgICAgICAgICBzdl9sb2dvLnNyYyA9Imh0dHBzOi8vYXBwLnN1cmV2aWV3LnR2L2NvbnRyb2xzL3N1cmV2aWV3LWljb24uc3ZnIjsNCiAgICAgICAgICAgICAgICAgICAgc3ZfbG9nb19jb250YWluZXIuYXBwZW5kQ2hpbGQoc3ZfbG9nbyk7DQogICAgICAgICAgICAgICAgICAgIGltYWZyYW1lX2NvbnRhaW5lci5hcHBlbmRDaGlsZChzdl9sb2dvX2NvbnRhaW5lcik7DQogICAgICAgICAgICAgICAgICAgIA0KICAgICAgICAgICAgICAgICAgICB2YXIgYnJuX3BsYWNlbWVudF9mb290ZXJfY29udGFpbmVyID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgiZGl2Iik7DQogICAgICAgICAgICAgICAgICAgIGJybl9wbGFjZW1lbnRfZm9vdGVyX2NvbnRhaW5lci5jbGFzc05hbWU9ImJ0bi1wbGFjZW1lbnQtZm9vdGVyIjsNCiAgICAgICAgICAgICAgICAgICAgaW1hZnJhbWVfY29udGFpbmVyLmFwcGVuZENoaWxkKGJybl9wbGFjZW1lbnRfZm9vdGVyX2NvbnRhaW5lcik7DQoNCiAgICAgICAgICAgICAgICAgICAgdmFyIHBsYXllcl90b2dnZXJfY29udGFpbmVyID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgiZGl2Iik7DQogICAgICAgICAgICAgICAgICAgIHBsYXllcl90b2dnZXJfY29udGFpbmVyLmNsYXNzTmFtZT0icGxheWVyLXRvZ2dsZS1jb250YWluZXIiOw0KICAgICAgICAgICAgICAgICAgICB2YXIgcGxheV9wYXVzZV9idG4gPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCJidXR0b24iKTsNCiAgICAgICAgICAgICAgICAgICAgcGxheV9wYXVzZV9idG4uaWQ9InBsYXllci10b2dnbGUiOw0KICAgICAgICAgICAgICAgICAgICBwbGF5X3BhdXNlX2J0bi5jbGFzc05hbWU9InZpZGVvLWJ0bi1wYXVzZSI7DQogICAgICAgICAgICAgICAgICAgIHZhciBwbGF5cGF1c2VfaWNvbiA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoImltZyIpOw0KICAgICAgICAgICAgICAgICAgICBwbGF5X3BhdXNlX2J0bi5hcHBlbmRDaGlsZChwbGF5cGF1c2VfaWNvbik7DQogICAgICAgICAgICAgICAgICAgIHBsYXllcl90b2dnZXJfY29udGFpbmVyLmFwcGVuZENoaWxkKHBsYXlfcGF1c2VfYnRuKTsNCiAgICAgICAgICAgICAgICAgICAgaW1hZnJhbWVfY29udGFpbmVyLmFwcGVuZENoaWxkKHBsYXllcl90b2dnZXJfY29udGFpbmVyKTsNCg0KICAgICAgICAgICAgICAgICAgICB2YXIgc291bmRfdG9nZ2VyX2NvbnRhaW5lciA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoImRpdiIpOw0KICAgICAgICAgICAgICAgICAgICBzb3VuZF90b2dnZXJfY29udGFpbmVyLmNsYXNzTmFtZT0ic291bmQtdG9nZ2xlLWNvbnRhaW5lciI7DQogICAgICAgICAgICAgICAgICAgIHZhciBzb3VuZF9wYXVzZV9idG4gPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCJidXR0b24iKTsNCiAgICAgICAgICAgICAgICAgICAgc291bmRfcGF1c2VfYnRuLmlkPSJzb3VuZC10b2dnbGUiOw0KICAgICAgICAgICAgICAgICAgICBzb3VuZF9wYXVzZV9idG4uY2xhc3NOYW1lPSJzb3VuZC1idG4tcGF1c2UiOw0KICAgICAgICAgICAgICAgICAgICB2YXIgc291bmRfaWNvbiA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoImltZyIpOw0KICAgICAgICAgICAgICAgICAgICBzb3VuZF9wYXVzZV9idG4uYXBwZW5kQ2hpbGQoc291bmRfaWNvbik7DQogICAgICAgICAgICAgICAgICAgIHNvdW5kX3RvZ2dlcl9jb250YWluZXIuYXBwZW5kQ2hpbGQoc291bmRfcGF1c2VfYnRuKTsNCiAgICAgICAgICAgICAgICAgICAgaW1hZnJhbWVfY29udGFpbmVyLmFwcGVuZENoaWxkKHNvdW5kX3RvZ2dlcl9jb250YWluZXIpOw0KDQogICAgICAgICAgICAgICAgICAgIG1haW5fY29udGFpbmVyLmFwcGVuZENoaWxkKGltYWZyYW1lX2NvbnRhaW5lcik7DQogICAgICAgICAgICAgICAgICAgIA0KICAgICAgICAgICAgICAgICAgICANCg0KICAgICAgICAgICAgICAgICAgICBtYWluLmFwcGVuZENoaWxkKG1haW5fY29udGFpbmVyKTsNCiAgICAgICAgICAgICAgICAgICAgDQogICAgICAgICAgICAgICAgICAgIHZhciB4eXogPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgidGVzdC1zdXJldmlldyIpOw0KICAgICAgICAgICAgICAgICAgICB4eXouYXBwZW5kQ2hpbGQobWFpbik7DQogICAgICAgICAgICAgICAgICAgIDwvc2NyaXB0Pg0KICAgICAgICAgICAgICAgICAgICA8c2NyaXB0Pg0KICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93LmN1cnJQbGF5ZXI9IiI7DQogICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cuc3ZfcGdfcmVxPTA7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGNvbnN0cnVjdEFkQ29udGFpbmVyID0gZnVuY3Rpb24gKCkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cuc3ZfcGdfcmVxPXdpbmRvdy5zdl9wZ19yZXErMTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYod2luZG93LnN2X3BnX3JlcTw9MTApew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGF2YWlsYWJsZUFkQ29udGFpbmVySWRzID0gWyJzdi1naW1hLTEiLCAic3YtZ2ltYS0yIiwgInN2LWdpbWEtMyIsICJzdi1naW1hLTQiLCAic3YtZ2ltYS01IiwgInN2LWdpbWEtNiIsICJzdi1naW1hLTciLCAic3YtZ2ltYS04IiwgInN2LWdpbWEtOSIsInN2LWdpbWEtMTAiXTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzdlBhcmVudFNsb3RzID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoInZpZGVvLXBsYXllci1jb250YWluZXIiKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBhdmFpbGFibGVQbGF5ZXJzID0gc3ZQYXJlbnRTbG90cy5jaGlsZHJlbjsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkaXN0YW50UGxheWVySURzID0gW107DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoYXZhaWxhYmxlUGxheWVycy5sZW5ndGggPiAwKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBhdmFpbGFibGVQbGF5ZXJzLmxlbmd0aDsgaSsrKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBlYWNoUGxheWVySWQgPSBhdmFpbGFibGVQbGF5ZXJzW2ldLmlkOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBpbmRleCA9IGF2YWlsYWJsZUFkQ29udGFpbmVySWRzLmluZGV4T2YoZWFjaFBsYXllcklkKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGluZGV4ID4gLTEpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGF2YWlsYWJsZUFkQ29udGFpbmVySWRzLnNwbGljZShpbmRleCwgMSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoYXZhaWxhYmxlQWRDb250YWluZXJJZHMubGVuZ3RoID4gMCkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBhZENvbnRhaW5lciA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoImRpdiIpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBhZENvbnRhaW5lcklkID0gYXZhaWxhYmxlQWRDb250YWluZXJJZHMucG9wKCk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRDb250YWluZXIuaWQgPSBhZENvbnRhaW5lcklkOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJ2aWRlby1wbGF5ZXItY29udGFpbmVyIikuYXBwZW5kQ2hpbGQoYWRDb250YWluZXIpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBhZENvbnRhaW5lcklkOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGxvYWRHSU1BKHBsYXllckNvbnRhaW5lcklEKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0YXJnZXRQbGF5ZXJDb250YWluZXJJZCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHBsYXllckNvbnRhaW5lcklEKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGFkRGlzcGxheUNvbnRhaW5lciA9IG5ldyBnb29nbGUuaW1hLkFkRGlzcGxheUNvbnRhaW5lcih0YXJnZXRQbGF5ZXJDb250YWluZXJJZCk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkRGlzcGxheUNvbnRhaW5lci5pbml0aWFsaXplKCk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhcmdldFBsYXllckNvbnRhaW5lcklkLnNldEF0dHJpYnV0ZSgiZGF0YS1naW1hLXAtaWQiLCBhZERpc3BsYXlDb250YWluZXIuWik7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBnSU1BTG9hZGVyID0gbmV3IGdvb2dsZS5pbWEuQWRzTG9hZGVyKGFkRGlzcGxheUNvbnRhaW5lcik7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdJTUFMb2FkZXIuYWRkRXZlbnRMaXN0ZW5lcihnb29nbGUuaW1hLkFkc01hbmFnZXJMb2FkZWRFdmVudC5UeXBlLkFEU19NQU5BR0VSX0xPQURFRCwgb25BZHNNYW5hZ2VyTG9hZGVkLCBmYWxzZSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdJTUFMb2FkZXIuZ2V0U2V0dGluZ3MoKS5zZXRGZWF0dXJlRmxhZ3MoeydkaX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ICAgICAgICAgICAgICAgICAgIGdJTUFDb25mLm5vbkxpbmVhckFkU2xvdFdpZHRoID0gMjQwOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnSU1BQ29uZi5ub25MaW5lYXJBZFNsb3RIZWlnaHQgPSAxNTA7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBnSU1BQ29uZjsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgb25BZHNNYW5hZ2VyTG9hZGVkID0gZnVuY3Rpb24gKGFkc01hbmFnZXJMb2FkZWRFdmVudCkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZHNNYW5hZ2VyID0gYWRzTWFuYWdlckxvYWRlZEV2ZW50LmdldEFkc01hbmFnZXIoZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgndmlkZW8nKSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkc01hbmFnZXIuYWRkRXZlbnRMaXN0ZW5lcigNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnb29nbGUuaW1hLkFkRXZlbnQuVHlwZS5TVEFSVEVELA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQWRTdGFydGVkKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRzTWFuYWdlci5hZGRFdmVudExpc3RlbmVyKA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdvb2dsZS5pbWEuQWRFdmVudC5UeXBlLlJFU1VNRUQsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRzUmVzdW1lKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRzTWFuYWdlci5hZGRFdmVudExpc3RlbmVyKA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdvb2dsZS5pbWEuQWRFdmVudC5UeXBlLlBBVVNFRCwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZHNQYXVzZSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkc01hbmFnZXIuYWRkRXZlbnRMaXN0ZW5lcigNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnb29nbGUuaW1hLkFkRXZlbnQuVHlwZS5WT0xVTUVfTVVURUQsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRzTXV0ZSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkc01hbmFnZXIuYWRkRXZlbnRMaXN0ZW5lcigNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnb29nbGUuaW1hLkFkRXZlbnQuVHlwZS5WT0xVTUVfQ0hBTkdFRCwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZHNVbk11dGUpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZHNNYW5hZ2VyLmFkZEV2ZW50TGlzdGVuZXIoDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ29vZ2xlLmltYS5BZEV2ZW50LlR5cGUuQ0xJQ0ssDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25BZHNDbGljayk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkc01hbmFnZXIuYWRkRXZlbnRMaXN0ZW5lcigNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnb29nbGUuaW1hLkFkRXZlbnQuVHlwZS5DT01QTEVURSwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkFkc0NvbXBsZXRlKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRzTWFuYWdlci5zZXRWb2x1bWUoMCk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZHNNYW5hZ2VyLmluaXQoMTc5LCAxMDEsIGdvb2dsZS5pbWEuVmlld01vZGUuTk9STUFMKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkc01hbmFnZXIuc3RhcnQoKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoYWRFcnJvcikgew0KDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgaXNfcGxheWluZyA9IDA7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGlzX211dGVkID0gMTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgYWRzTWFuYWdlcjsNCg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkZXN0cm95UGxheWVyID0gZnVuY3Rpb24gKHBsYXllcklkKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGVsZW1lbnQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCdkaXZbZGF0YS1naW1hLXAtaWQ9IicgKyBwbGF5ZXJJZCArICciXScpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGVtZW50LnJlbW92ZSgpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGluaXRBZHMoKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwbGF5ZXJDb250YWluZXJJRCA9IGNvbnN0cnVjdEFkQ29udGFpbmVyKCk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBnSU1BTG9hZGVyID0gbG9hZEdJTUEocGxheWVyQ29udGFpbmVySUQpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZ0lNQUNvbmYgPSBjb25maWd1cmVHSU1BKCk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdJTUFMb2FkZXIucmVxdWVzdEFkcyhnSU1BQ29uZik7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIG9uQWRzQ29tcGxldGUoZSkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgic3ZpZXctY2xvc2Utc2VjdGlvbiIpLmNsYXNzTGlzdC5yZW1vdmUoImNsb3NlX2J0bl9zZWNfYWZ0ZXJfMTAiKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRzTWFuYWdlci5zZXRWb2x1bWUoMCk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzX211dGVkPTE7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwbGF5ZXJJZCA9IGUudGFyZ2V0LmcuWjsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3ZHaW1hQ29uc3RDb250bnIgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgic3YtZ2ltYS1jb25zdC1jb250bnIiKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3ZHaW1hQ29uc3RDb250bnIuY2xhc3NMaXN0LmFkZCgiY29sbGFwc2UiKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXN0cm95UGxheWVyKHBsYXllcklkKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluaXRBZHMoKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgMjAwMCk7DQoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gb25BZFN0YXJ0ZWQoZSkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzdkdpbWFDb25zdENvbnRuciA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJzdi1naW1hLWNvbnN0LWNvbnRuciIpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdkdpbWFDb25zdENvbnRuci5jbGFzc0xpc3QucmVtb3ZlKCJjb2xsYXBzZSIpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpc19wbGF5aW5nID0gMTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWZ0ZXJfMTBfc2VjKCk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGFkc1BhdXNlKGUpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXNfcGxheWluZyA9IDA7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGFkc1Jlc3VtZShlKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzX3BsYXlpbmcgPSAxOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBhZHNNdXRlKGUpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXNfbXV0ZWQgPSAxOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBhZHNVbk11dGUoZSkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpc19tdXRlZCA9IDA7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIG9uQWRzQ2xpY2soZSkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBvbkFkc0Vycm9yKGUpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzdHJveVBsYXllcihlLmN1cnJlbnRUYXJnZXQuZy5aKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5pdEFkcygpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiB0b2dnbGVWaWRlb1BsYXllcigpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlzX3BsYXlpbmcpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkc01hbmFnZXIucGF1c2UoKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzX3BsYXlpbmcgPSAwOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoInBsYXllci10b2dnbGUiKS5jbGFzc05hbWUgPSAidmlkZW8tYnRuLXBsYXkiOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Ugew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRzTWFuYWdlci5yZXN1bWUoKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzX3BsYXlpbmcgPSAxOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoInBsYXllci10b2dnbGUiKS5jbGFzc05hbWUgPSAidmlkZW8tYnRuLXBhdXNlIjsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiB0b2dnbGVTb3VuZEJ1dHRvbigpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlzX211dGVkID09PSAxKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpc19tdXRlZD0wOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRzTWFuYWdlci5zZXRWb2x1bWUoMSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgic291bmQtdG9nZ2xlIikuY2xhc3NOYW1lID0gInNvdW5kLWJ0bi1wbGF5IjsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzX211dGVkPTE7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZHNNYW5hZ2VyLnNldFZvbHVtZSgwKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJzb3VuZC10b2dnbGUiKS5jbGFzc05hbWUgPSAic291bmQtYnRuLXBhdXNlIjsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcGxheVBhdXNlID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ3BsYXllci10b2dnbGUnKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbGF5UGF1c2UuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLCB0b2dnbGVWaWRlb1BsYXllcik7DQoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgc291bmRVbm11dGVidG4gPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnc291bmQtdG9nZ2xlJyk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgc291bmRVbm11dGVidG4uYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLCB0b2dnbGVTb3VuZEJ1dHRvbik7DQoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgR0lNQVNka1NjcmlwdCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoInNjcmlwdCIpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdJTUFTZGtTY3JpcHQudHlwZSA9ICJ0ZXh0L2phdmFzY3JpcHQiOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdJTUFTZGtTY3JpcHQub25sb2FkID0gZnVuY3Rpb24gKCkgeyANCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5pdEFkcygpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgR0lNQVNka1NjcmlwdC5zcmMgPSAiLy9pbWFzZGsuZ29vZ2xlYXBpcy5jb20vanMvc2RrbG9hZGVyL2ltYTMuanMiOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKCJoZWFkIilbMF0uYXBwZW5kQ2hpbGQoR0lNQVNka1NjcmlwdCk7DQoNCg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvcC5kb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnaGlkZVN2aWV3U21hcnRCYW5uZXInKS5vbmNsaWNrID0gZnVuY3Rpb24gKGV2dCkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzdkdpbWFDb25zdENvbnRuciA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJzdi1naW1hLWNvbnN0LWNvbnRuciIpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZHNNYW5hZ2VyLnBhdXNlKCk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN2R2ltYUNvbnN0Q29udG5yLmNsYXNzTGlzdC5hZGQoImNvbGxhcHNlIik7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfTsNCg0KDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcigidmlzaWJpbGl0eWNoYW5nZSIsIGZ1bmN0aW9uIChldmVudCkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZG9jdW1lbnQuaGlkZGVuKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b2dnbGVWaWRlb1BsYXllcigpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvZ2dsZVZpZGVvUGxheWVyKCk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTsNCg0KDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGlzSW5WaWV3cG9ydChlbCkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgcmVjdCA9IGVsLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICgNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWN0LnRvcCA+PSAwICYmDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVjdC5sZWZ0ID49IDAgJiYNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWN0LmJvdHRvbSA8PSAod2luZG93LmlubmVySGVpZ2h0IHx8IGRvY3VtZW50LmRvY3VtZW50RWxlbWVudC5jbGllbnRIZWlnaHQpICYmDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVjdC5yaWdodCA8PSAod2luZG93LmlubmVyV2lkdGggfHwgZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50LmNsaWVudFdpZHRoKQ0KDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgYm94ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnN2LWNvbnRlbnQtcGFyZW50Jyk7DQoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcignc2Nyb2xsJywgZnVuY3Rpb24gKCkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbWVzc2FnZVRleHQgPSBpc0luVmlld3BvcnQoYm94KTsNCg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobWVzc2FnZVRleHQpew0KDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsNCg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KDQoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFzc2l2ZTogdHJ1ZQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTsNCg0KDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gYWZ0ZXJfMTBfc2VjKCl7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoInN2aWV3LWNsb3NlLXNlY3Rpb24iKS5jbGFzc0xpc3QuYWRkKCJjbG9zZV9idG5fc2VjX2FmdGVyXzEwIik7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCA1MDAwKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBvcGVuSU5Ib3VzZSgpew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cub3BlbignaHR0cHM6Ly9zdXJldmlldy50dicsICdfYmxhbmsnKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQoNCiAgICAgICAgICAgICAgICAgICAgPC9zY3JpcHQ+DQogICAgPC9kaXY+').clientWidth; }else if(company==9){ var video_div=document.getElementsByClassName("dm-player")[0].clientWidth; }else{ video_div=sureview_div; } var diff=(sureview_div)-(video_div); var padd='0px'; if(diff>10){ padd=diff/2+"px"; } var bottom_div = document.createElement("div"); bottom_div.id="sureview_branding"; bottom_div.className="sureviewBottomDiv sureviewtv"; var anchor1=document.createElement("a"); anchor1.href="http://sureview.tv/"; anchor1.target="_BLANK"; var bottom_logo_img = document.createElement("img"); bottom_logo_img.id="sureview_logo_bottom"; bottom_logo_img.src="https://app.sureview.tv/logo/sureview_logo.svg"; anchor1.appendChild(bottom_logo_img); bottom_div.appendChild(anchor1); if(company==1){ try{ vdo_player= document.getElementsByClassName("vdo_content")[0].getElementsByTagName("video-js")[0].getElementsByClassName('ima-ad-container')[0].getElementsByTagName('div')[1].getElementsByTagName('video')[0]; if(vdo_player.duration>5){ x.appendChild(bottom_div); document.getElementById("sureview_logo_bottom").style.padding = "0px "+padd+" 0px 0px"; if(video_div>0){ clearInterval(setlogo_intval); } }else{ if(counter==2){ clearInterval(setlogo_intval); } } }catch(error){ if(counter==2){ clearInterval(setlogo_intval); } } }else if(company==2){ try{ teads_player=document.getElementsByClassName("teads-inread")[0].getElementsByTagName("iframe")[0].contentDocument.getElementsByTagName("iframe")[0].contentDocument.getElementsByTagName('video')[0]; if(teads_player.duration>5){ x.appendChild(bottom_div); document.getElementById("sureview_logo_bottom").style.padding = "0px "+padd+" 0px 0px"; if(video_div>0){ clearInterval(setlogo_intval); } }else{ } }catch(error){ } }else if(company==9){ } }catch(Error){ if(counter==10){ clearInterval(setlogo_intval); } } },1000); } function get_video_duration(){ refreshIntervalId=setInterval(function(){ try{ vdo_player= document.getElementsByClassName("vdo_content")[0].getElementsByTagName("video-js")[0].getElementsByClassName('ima-ad-container')[0].getElementsByTagName('div')[1].getElementsByTagName('video')[0]; if(isNaN(vdo_player.duration) || vdo_player.duration==0){ setTimeout(function(){ clearInterval(refreshIntervalId); change_ads(2); },1000); }else{ } }catch(error){ try{ teads_player=document.getElementsByClassName("teads-inread")[0].getElementsByTagName("iframe")[0].contentDocument.getElementsByTagName("iframe")[0].contentDocument.getElementsByTagName('video')[0]; setTimeout(function(){ if(teads_player.currentTime===0){ change_ads(1); clearInterval(refreshIntervalId); }else{ } },10000); if(isNaN(teads_player.duration)){ setTimeout(function(){ change_ads(1); },10000); }else{ if(teads_player.duration==teads_player.currentTime){ setTimeout(function(){ change_ads(1); },10000); } } }catch(error){ clearInterval(refreshIntervalId); try{ teads_player=document.getElementsByClassName("teads-inread")[0].getElementsByTagName("iframe")[0].children; }catch(error){ change_ads(1); } } } }, 10000); } function change_ads(ads_id){ clearInterval(refreshIntervalId); if(ads_id==1){ add_vdo(); }else if(ads_id==2){ add_teads(); } } function add_vdo(){ if(is_active_vdo==1){ set_bottom_logo(1); try{ document.querySelector('script[src*="vdo.ai"]').remove(); }catch(error){ console.log("VDO ERROR",error); } document.getElementsByClassName("sureview-content")[0].innerHTML = ""; running_ads=1; if(placement_salector!=0){ try { placement_salector[no_of_tag].appendChild(x); } catch (exception_var) { } ad_displaying=1; x.appendChild(vdo); (function(v,d,o,ai) {ai=d.createElement('script');ai.defer=true;ai.async=true;ai.src=v.location.protocol+o;d.head.appendChild(ai);})(window, document, '//a.vdo.ai/core/'+vdo_id+'/vdo.ai.js'); }else{ x.appendChild(vdo); (function(v,d,o,ai) {ai=d.createElement('script');ai.defer=true;ai.async=true;ai.src=v.location.protocol+o;d.head.appendChild(ai);})(window, document, '//a.vdo.ai/core/'+vdo_id+'/vdo.ai.js'); } } } function add_teads(){ if(is_active_teads==1){ set_bottom_logo(2); clearInterval(setlogo_intval); document.getElementsByClassName("sureview-content")[0].innerHTML = ""; running_ads=2; if(placement_salector!=0){ ad_displaying=1; x.appendChild(teads_main_div); try { placement_salector[no_of_tag].appendChild(x); }catch (exception_var) { } }else{ x.appendChild(teads_main_div); } } } function remove_logo_2(){ try{ document.getElementById("sureview_branding").remove(); }catch(error){ } } const box = document.getElementById('Sureview338'); document.addEventListener('scroll', function () { var inVpPartial = isElementPartiallyInViewport(box); if(inVpPartial==true){ }else{ } }, { passive: true }); function isElementPartiallyInViewport(el) { if (typeof jQuery !== 'undefined' && el instanceof jQuery) el = el[0]; var rect = el.getBoundingClientRect(); var windowHeight = (window.innerHeight || document.documentElement.clientHeight); var windowWidth = (window.innerWidth || document.documentElement.clientWidth); var vertInView = (rect.top <= windowHeight) && ((rect.top + rect.height) >= 0); var horInView = (rect.left <= windowWidth) && ((rect.left + rect.width) >= 0); return (vertInView && horInView); } })();