Client-side support for the original DiskDump API is finally limping along

This commit is contained in:
Jeff Parsons 2016-02-22 17:38:57 -08:00
commit 3dd7512f4f
33 changed files with 1334 additions and 1054 deletions

View file

@ -1,13 +1,13 @@
(function(){var f;function p(a,b){var c="";void 0===b?b=8:8<b&&(b=8);if(null==a||isNaN(a))for(;0<b--;)c="?"+c;else for(;0<b--;){var d=a&15,d=d+(0<=d&&9>=d?48:55),c=String.fromCharCode(d)+c;a>>=4}return c}function q(a){return"0x"+p(a,2)}function r(a){return"0x"+p(a,4)}function aa(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0<c&&(b=b.substr(0,c));return b}function ba(a){var b="",c=a.lastIndexOf(".");0<=c&&(b=a.substr(c+1).toLowerCase());return b}
var ca={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};function da(a){return a.replace(/[&<>"']/g,function(a){return ca[a]})}var ea=Date.now||function(){return+new Date};
function t(a,b){var c=0,d=null;if("object"==typeof resources&&(d=resources[a]))b&&b(a,d,c);else{var e=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");e.onreadystatechange=function(){4===e.readyState&&(d=e.responseText,200==e.status||!e.status&&d.length&&"file:"==(window?window.location.protocol:"file:")||(c=e.status||-1),b&&b(a,d,c))};e.open("GET",a,!0);e.send()}}function u(a){window&&window.alert(a)}
function v(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function fa(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0<a?setTimeout(d,0):c()}d()}
function t(a,b){var c=0,d=null;if("object"==typeof resources&&(d=resources[a]))b&&b(a,d,c);else{var e=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");e.onreadystatechange=function(){4===e.readyState&&(d=e.responseText,200==e.status||!e.status&&d.length&&"file:"==(window?window.location.protocol:"file:")||(c=e.status||-1),b&&b(a,d,c))};var g="",h;for(h in null)null.hasOwnProperty(h)&&(g&&(g+="&"),g+=h+"="+encodeURIComponent(null[h]));g=g.replace(/%20/g,
"+");e.open("POST",a,!0);e.setRequestHeader("Content-type","application/x-www-form-urlencoded");e.send(g)}}function u(a){window&&window.alert(a)}function v(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function fa(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0<a?setTimeout(d,0):c()}d()}
function ga(a,b){function c(){b(100===d)&&(e=setTimeout(c,d),d=100)}var d=0,e=null,g=!1;a.onmousedown=function(){g||e||(d=500,c())};a.ontouchstart=function(){e||(d=500,c())};a.onmouseup=a.onmouseout=function(){e&&(clearTimeout(e),e=null)};a.ontouchend=a.ontouchcancel=function(){e&&(clearTimeout(e),e=null);g=!0}}var w={init:[],show:[],exit:[]},ha=!1,ia=!0;function ja(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function x(a){w.init.push(a)}
function ka(a){if(ia)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){u("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks.")}}function z(a){!ia&&a?(ia=!0,ha&&la("init")):ia=a}function la(a){w[a]&&ka(w[a])}ja("onload",function(){ha=!0;ka(w.init)});ja("onpageshow",function(){ka(w.show)});ja(v("Opera")||v("iOS")?"onunload":"onbeforeunload",function(){ka(w.exit)});
function A(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id;this.name=b.name;void 0===this.id&&(this.id="");b=this.id.indexOf(".");0<b?(this.rb=this.id.substr(0,b),this.qb=this.id.substr(b+1)):this.qb=this.id;this[a]=c;this.C={Za:!1,Ba:!1,jb:!1,M:!1,Ca:!1};this.cb=null;this.C.Ca=!1;this.H={};this.u=null;this.la=d||0;B.push(this)}var ma=void 0;
if(window){ma||(ma=window.location.search.substr(1));for(var na,oa=/\+/g,pa=/([^&=]+)=?([^&]*)/g;na=pa.exec(ma);)na[1].replace(oa," "),na[2].replace(oa," ")}function qa(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b}function C(a){var b;b||(b=A);a.prototype=qa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}var B=[],D={};
function ra(a,b){if(void 0!==a){var c;b&&0<(c=b.indexOf("."))&&(a=b.substr(0,c+1)+a);for(c=0;c<B.length;c++)if(B[c].id===a)return B[c]}return null}function E(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){u(c.message+" ("+a+")")}return b}document&&!document.ELEMENT_NODE&&(document.ELEMENT_NODE=1);
function F(a,b){for(var c=G(b.parentNode,"c1pjs-control"),d=0;d<c.length;d++)for(var e=c[d].childNodes,g=0;g<e.length;g++){var h=e[g];if(h.nodeType===document.ELEMENT_NODE){var k=h.getAttribute("class");if(k)for(var l=k.split(" "),m=0;m<l.length;m++)switch(k=l[m],k){case "c1pjs-binding":(k=E(h))&&k.binding&&a.T(k.type,k.binding,h,k.value),m=l.length}}}}
function ra(a,b){if(void 0!==a){var c;b&&0<(c=b.indexOf("."))&&(a=b.substr(0,c+1)+a);for(c=0;c<B.length;c++)if(B[c].id===a)return B[c]}return null}function E(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){u(c.message+" ("+a+")")}return b}
function F(a,b){for(var c=G(b.parentNode,"c1pjs-control"),d=0;d<c.length;d++)for(var e=c[d].childNodes,g=0;g<e.length;g++){var h=e[g];if(1===h.nodeType){var k=h.getAttribute("class");if(k)for(var l=k.split(" "),m=0;m<l.length;m++)switch(k=l[m],k){case "c1pjs-binding":(k=E(h))&&k.binding&&a.T(k.type,k.binding,h,k.value),m=l.length}}}}
function G(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var e=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)e.test(a[b].className)&&c.push(a[b]);return c}
A.prototype={constructor:A,parent:null,toString:function(){return this.name?this.name:this.id||this.type},T:function(a,b,c){switch(b){case "clear":return this.H[b]||(this.H[b]=c,c.onclick=function(a){return function(){a.H.print&&(a.H.print.value="")}}(this)),!0;case "print":return this.H[b]||(this.gb=this.H[b]=c,c.value="",this.l=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),
this.$a=function(a,b,c){this.l(a,"notice",c)}),!0;default:return!1}},log:function(){},l:function(){},status:function(a){this.l(this.qb+": "+a)},$a:function(a,b){b||u(a)},X:function(a){this.C.Ca||(this.C.Za=!1!==a,this.C.Za&&(a=this.cb,this.cb=null,a&&a()))}};function H(a,b){if(a.u){a===a.u?b|=0:b=b||a.la;var c=a.u.la&b;return!!b&&c===b||!!(c&a.u.Pe)}return!1}function I(a,b){if(a.C.jb)return a.C.Ba&&(a.C.Ba=!1),a.C.jb=!1;if(a.C.Ca)return a.l(a.toString()+" error"),!1;a.C.Ba=b;return a.C.Ba}

View file

@ -1,12 +1,11 @@
(function(){var e;function p(a,b){var c="";void 0===b?b=8:8<b&&(b=8);if(null==a||isNaN(a))for(;0<b--;)c="?"+c;else for(;0<b--;){var d=a&15,d=d+(0<=d&&9>=d?48:55),c=String.fromCharCode(d)+c;a>>=4}return c}function aa(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0<c&&(b=b.substr(0,c));return b}function ba(a){var b="",c=a.lastIndexOf(".");0<=c&&(b=a.substr(c+1).toLowerCase());return b}var ca={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};
function da(a){return a.replace(/[&<>"']/g,function(a){return ca[a]})}var q=Date.now||function(){return+new Date};
function r(a,b){var c=0,d=null;if("object"==typeof resources&&(d=resources[a]))b&&b(a,d,c);else{var f=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");f.onreadystatechange=function(){4===f.readyState&&(d=f.responseText,200==f.status||!f.status&&d.length&&"file:"==(window?window.location.protocol:"file:")||(c=f.status||-1),b&&b(a,d,c))};f.open("GET",a,!0);f.send()}}function t(a){window&&window.alert(a)}
function v(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var w={init:[],show:[],exit:[]},ea=!1,x=!0;function fa(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function y(a){w.init.push(a)}
function z(a){if(x)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){t("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks.")}}function A(a){!x&&a?(x=!0,ea&&ga("init")):x=a}function ga(a){w[a]&&z(w[a])}fa("onload",function(){ea=!0;z(w.init)});fa("onpageshow",function(){z(w.show)});fa(v("Opera")||v("iOS")?"onunload":"onbeforeunload",function(){z(w.exit)});
function r(a,b){var c=0,d=null;if("object"==typeof resources&&(d=resources[a]))b&&b(a,d,c);else{var f=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");f.onreadystatechange=function(){4===f.readyState&&(d=f.responseText,200==f.status||!f.status&&d.length&&"file:"==(window?window.location.protocol:"file:")||(c=f.status||-1),b&&b(a,d,c))};var g="",k;for(k in null)null.hasOwnProperty(k)&&(g&&(g+="&"),g+=k+"="+encodeURIComponent(null[k]));g=g.replace(/%20/g,
"+");f.open("POST",a,!0);f.setRequestHeader("Content-type","application/x-www-form-urlencoded");f.send(g)}}function t(a){window&&window.alert(a)}function v(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var w={init:[],show:[],exit:[]},ea=!1,x=!0;function fa(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}
function y(a){w.init.push(a)}function z(a){if(x)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){t("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks.")}}function A(a){!x&&a?(x=!0,ea&&ga("init")):x=a}function ga(a){w[a]&&z(w[a])}fa("onload",function(){ea=!0;z(w.init)});fa("onpageshow",function(){z(w.show)});fa(v("Opera")||v("iOS")?"onunload":"onbeforeunload",function(){z(w.exit)});
function B(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id;this.name=b.name;void 0===this.id&&(this.id="");b=this.id.indexOf(".");0<b?(this.Da=this.id.substr(0,b),this.Ca=this.id.substr(b+1)):this.Ca=this.id;this[a]=c;this.u={va:!1,pa:!1,Aa:!1,H:!1,qa:!1};this.xa=null;this.u.qa=!1;this.A={};C.push(this)}var ha=void 0;if(window){ha||(ha=window.location.search.substr(1));for(var ia,ja=/\+/g,ka=/([^&=]+)=?([^&]*)/g;ia=ka.exec(ha);)ia[1].replace(ja," "),ia[2].replace(ja," ")}
function la(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b}function D(a){var b;b||(b=B);a.prototype=la(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}var C=[],E={};function F(a,b){if(void 0!==a){var c;b&&0<(c=b.indexOf("."))&&(a=b.substr(0,c+1)+a);for(c=0;c<C.length;c++)if(C[c].id===a)return C[c]}return null}
function G(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){t(c.message+" ("+a+")")}return b}document&&!document.ELEMENT_NODE&&(document.ELEMENT_NODE=1);
function H(a,b){for(var c=I(b.parentNode,"c1pjs-control"),d=0;d<c.length;d++)for(var f=c[d].childNodes,g=0;g<f.length;g++){var k=f[g];if(k.nodeType===document.ELEMENT_NODE){var h=k.getAttribute("class");if(h)for(var l=h.split(" "),m=0;m<l.length;m++)switch(h=l[m],h){case "c1pjs-binding":(h=G(k))&&h.binding&&a.J(h.type,h.binding,k,h.value),m=l.length}}}}
function G(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){t(c.message+" ("+a+")")}return b}function H(a,b){for(var c=I(b.parentNode,"c1pjs-control"),d=0;d<c.length;d++)for(var f=c[d].childNodes,g=0;g<f.length;g++){var k=f[g];if(1===k.nodeType){var h=k.getAttribute("class");if(h)for(var l=h.split(" "),m=0;m<l.length;m++)switch(h=l[m],h){case "c1pjs-binding":(h=G(k))&&h.binding&&a.J(h.type,h.binding,k,h.value),m=l.length}}}}
function I(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var f=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)f.test(a[b].className)&&c.push(a[b]);return c}
B.prototype={constructor:B,parent:null,toString:function(){return this.name?this.name:this.id||this.type},J:function(a,b,c){switch(b){case "clear":return this.A[b]||(this.A[b]=c,c.onclick=function(a){return function(){a.A.print&&(a.A.print.value="")}}(this)),!0;case "print":return this.A[b]||(this.ya=this.A[b]=c,c.value="",this.F=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),
this.wa=function(a,b,c){this.F(a,"notice",c)}),!0;default:return!1}},log:function(){},F:function(){},status:function(a){this.F(this.Ca+": "+a)},wa:function(a,b){b||t(a)},N:function(a){this.u.qa||(this.u.va=!1!==a,this.u.va&&(a=this.xa,this.xa=null,a&&a()))}};function ma(a,b){if(a.u.Aa)return a.u.pa&&(a.u.pa=!1),a.u.Aa=!1;if(a.u.qa)return a.F(a.toString()+" error"),!1;a.u.pa=b;return a.u.pa}function J(a,b){b&&(a.u.va?b():a.xa=b);return a.u.va}function na(a,b){a.u.qa=!0;a.wa(b)}