-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathzingchart-debug.min.js
8 lines (7 loc) · 6.44 KB
/
zingchart-debug.min.js
1
2
3
4
5
6
7
8
/*
All of the code within the ZingChart software is developed and copyrighted by ZingChart, Inc., and may not be copied,
replicated, or used in any other software or application without prior permission from ZingChart. All usage must coincide with the
ZingChart End User License Agreement which can be requested by email at [email protected].
Build 2.9.16
*/
ZC.A8Y={},ZC.WJ.push("debug"),ZC.AO.WX=function(e){for(var r,t="",o=!1,c=!1,a=0,i="",s=0,n=(e=e.replace(/\t|\r|\n/g,"")).length;s<n;s++)switch(r=e.substr(s,1)){case'"':o=!o,t+=e.substr(s,1),i=r;break;case"{":t+=e.substr(s,1),o||(t+="\n"+new Array(a+1).join(" "),a++,i=r);break;case"}":o||(t+="\n"+new Array(a).join(" "),a--,i=r),t+=e.substr(s,1);break;case"[":var u=e.indexOf("]",s),l=e.indexOf("}",s);l=-1===l?999999:l;var p=e.indexOf("{",s);p=-1===p?999999:p,u<ZC.CY(l,p)?(c=!0,t+=e.substr(s,1)):(c=!1,t+=e.substr(s,1),t+="\n"+new Array(a+1).join(" "),a++),i=r;break;case"]":c&&(c=!1),"}"===i&&(a--,t+="\n"+new Array(a).join(" ")),t+=e.substr(s,1),i=r;break;case" ":o&&(t+=e.substr(s,1),i=r);break;case",":t+=e.substr(s,1),o||c||(t+="\n"+new Array(a).join(" ")),i=r;break;default:t+=e.substr(s,1),i=r}return t},ZC.QA.prototype.A5Y=function(){var e=this;ZC.AO.C0("source_show",e,e.FI());var r=ZC.Q.HW({cls:"zc-abs zc-viewsource zc-style",id:e.K+"-viewsource",p:ZC.AM(e.K+"-top"),wh:e.I-(ZC.quirks?0:10)+"/"+(e.F-(ZC.quirks?0:10))});r.style.zIndex=99,r.innerHTML=ZC._h_('<div class="zc-form-row-label zc-form-s1"> <a href="javascript:void(0)" id="'+e.K+'-viewsource-originalsource" class="zc-tab-active">'+ZC.HG["viewsource-originalsource"]+'</a> <a href="javascript:void(0)" id="'+e.K+'-viewsource-jsonsource" class="zc-tab-inactive">'+ZC.HG["viewsource-jsonsource"]+'</a></div><div class="zc-form-row-element"><textarea id="'+e.K+'-viewsource-json" style="width:'+(e.I-35)+"px;height:"+(e.F-95)+'px;"></textarea></div><div class="zc-form-row-element zc-form-row-last" id="'+e.K+'-viewsource-actions"><input type="button" value="'+ZC.HG["viewsource-close"]+'" id="'+e.K+'-viewsource-close" /></div>'),zingchart.EDITSOURCE&&(ZC.AM(e.K+"-viewsource-actions").innerHTML+='<input type="button" value="'+ZC.HG["viewsource-apply"]+'" id="'+e.K+'-viewsource-apply" />'),ZC.A4("#"+e.K+"-viewsource-json").val(ZC.AO.WX(e.E.source)),ZC.A4("#"+e.K+"-viewsource-jsonsource").bind("click",function(){ZC.AM(e.K+"-viewsource-jsonsource").className="zc-tab-active",ZC.AM(e.K+"-viewsource-originalsource").className="zc-tab-inactive",ZC.A4("#"+e.K+"-viewsource-json").val(ZC.AO.WX(e.E.json))}),ZC.A4("#"+e.K+"-viewsource-originalsource").bind("click",function(){ZC.AM(e.K+"-viewsource-jsonsource").className="zc-tab-inactive",ZC.AM(e.K+"-viewsource-originalsource").className="zc-tab-active",ZC.A4("#"+e.K+"-viewsource-json").val(ZC.AO.WX(e.E.source))}),ZC.A4("#"+e.K+"-viewsource-close").bind("click",function(){ZC.AO.C0("source_hide",e,e.FI()),ZC.Q.EW(e.K+"-viewsource")}),zingchart.EDITSOURCE&&ZC.A4("#"+e.K+"-viewsource-apply").bind("click",function(){ZC.AO.C0("source_hide",e,e.FI());var r=ZC.A4("#"+e.K+"-viewsource-json").val();ZC.Q.EW(e.K+"-viewsource"),zingchart.exec(e.K,"setdata",{data:r})})},ZC.QA.prototype.A72=function(){var e=this;if(e.I<300||e.F<300)window.open("http://www.zingchart.com/support/","","");else{var r=ZC.Q.HW({cls:"zc-abs zc-bugreport zc-style",id:e.K+"-bugreport",p:ZC.AM(e.K+"-top"),wh:e.I-(ZC.quirks?0:10)+"/"+(e.F-(ZC.quirks?0:10))}),t="";t+='<div class="zc-form-row-label zc-form-s0">'+ZC.HG["bugreport-header"]+'</div><div class="zc-form-row-label"><input type="checkbox" id="'+e.K+'-chkdata" checked="checked" /><label for="'+e.K+'-chkdata">'+ZC.HG["bugreport-senddata"]+"</label>",ZC.canvas&&(t+=' <input type="checkbox" id="'+e.K+'-chkcapture" checked="checked" /><label for="'+e.K+'-chkcapture">'+ZC.HG["bugreport-sendcapture"]+"</label>"),t+='</div><div class="zc-form-row-label zc-form-s1">'+ZC.HG["bugreport-yourcomment"]+'</div><div class="zc-form-row-element"><textarea id="'+e.K+'-bugreport-comment" style="width:'+(e.I-35)+"px;height:"+((e.F-300)/2-10)+'px;"></textarea></div><div class="zc-form-row-label zc-form-s1">'+ZC.HG["bugreport-jsondata"]+'</div><div class="zc-form-row-element"><textarea id="'+e.K+'-bugreport-json" style="width:'+(e.I-35)+"px;height:"+(e.F-210)/2+'px;"></textarea></div><div class="zc-form-row-label zc-form-s1">'+ZC.HG["bugreport-youremail"]+(e.I>=510?" <span>("+ZC.HG["bugreport-infoemail"]+")</span>":"")+'</div><div class="zc-form-row-element"><input type="email" id="'+e.K+'-bugreport-email" style="width:'+(e.I-35)+'px;" /></div><div class="zc-form-row-element zc-form-row-last"><input type="button" value="'+ZC.HG["bugreport-submit"]+'" id="'+e.K+'-bugreport-submit" /><input type="button" value="'+ZC.HG["bugreport-cancel"]+'" id="'+e.K+'-bugreport-cancel" /></div>',r.innerHTML=ZC._h_(t),ZC.A4("#"+e.K+"-bugreport-json").val("PARSED\n----------\n"+ZC.AO.WX(e.E.json)+"\n\nORIGINAL\n----------\n"+ZC.AO.WX(e.E.source)),ZC.A4("#"+e.K+"-bugreport-cancel").bind("click",function(){ZC.Q.EW(e.K+"-bugreport")}),ZC.A4("#"+e.K+"-bugreport-submit").bind("click",function(){var r=ZC.A4("#"+e.K+"-bugreport-email");if(0!==r.val().length)if(/^((\w+\+*\-*)+\.?)+@((\w+\+*\-*)+\.?)*[\w-]+\.[a-z]{2,6}$/.test(r.val())){var t="",o=function(){var o=("Parsed:"+e.E.json+" Original:"+e.E.source).replace(/\r|\n|\t|(\s{2,})/g,""),c="",a=[];ZC.A4("#"+e.K+"-chkcapture").attr("checked")&&a.push("****IMAGE:",t),ZC.A4("#"+e.K+"-chkdata").attr("checked")&&a.push("****JSON:",o),a.push("****COMMENT:",ZC.A4("#"+e.K+"-bugreport-comment").val(),"****EMAIL:",r.val(),"****VERSION:",ZC.VERSION,"****WIDTH:",e.I,"****HEIGHT:",e.F,"****URL:",window.location.href,"****UA:",navigator.userAgent,"****RENDER:",e.AC.toUpperCase(),"****RESOLUTION:",screen.width+"x"+screen.height);for(var i=0;i<a.length-1;i+=2)c+=a[i]+encodeURIComponent(a[i+1]);c+="****END";var s=ZC.Q.ABA(ZC.AM(e.K+"-bugreport")),n=s.createElement("FORM");n.action=document.location.protocol+"//www.zingchart.com/support/submitreportH5.php",n.method="post",s.body.appendChild(n);var u=s.createElement("INPUT");u.type="text",u.name="data",u.value=c,n.appendChild(u),n.submit(),window.setTimeout(function(){alert(ZC.HG["bugreport-confirm"]),ZC.Q.EW(e.K+"-bugreport")},1e3)};"canvas"===e.AC?(t=zingchart.exec(e.K,"getimagedata",{}),o()):t=zingchart.exec(e.K,"getimagedata",{callback:function(e){t=e,o()}})}else window.setTimeout(function(){alert(ZC.HG["bugreport-validemailmandatory"])},1e3);else window.setTimeout(function(){alert(ZC.HG["bugreport-emailmandatory"])},1e3)})}};