mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2024-12-04 09:50:18 +01:00
1 line
No EOL
18 KiB
JavaScript
1 line
No EOL
18 KiB
JavaScript
require=function t(e,n,r){function i(u,s){if(!n[u]){if(!e[u]){var a="function"==typeof require&&require;if(!s&&a)return a(u,!0);if(o)return o(u,!0);throw new Error("Cannot find module '"+u+"'")}var c=n[u]={exports:{}};e[u][0].call(c.exports,function(t){var n=e[u][1][t];return i(n?n:t)},c,c.exports,t,e,n,r)}return n[u].exports}for(var o="function"==typeof require&&require,u=0;u<r.length;u++)i(r[u]);return i}({1:[function(t,e){(function(){var n,r;r=t("./random"),n=function(t,e,n,i){var o,u,s;return o=-1,s=-1,u=!1,{next:function(){var a;if(o>=i.length-1){if(-1===s)return null;u=!0}return u?o>=s?(o--,"\b"):(u=!1,s=-1,i.charAt(++o)):(o++,u=-1!==s&&o%n===0,r.integerInRange(0,100)>e?(a=t.getAdjacentCharacter(i.charAt(o)),null==a?i.charAt(o):(-1===s&&(s=o,u=1===r.integerInRange(0,1)),a)):i.charAt(o))}}},e.exports=n}).call(this)},{"./random":4}],2:[function(t,e){(function(){var n,r,i,o;o=t("./random"),i=[["`","1","2","3","4","5","6","7","8","9","0","-","="],["","Q","W","E","R","T","Y","U","I","O","P","[","]","\\"],["","A","S","D","F","G","H","J","K","L",";","'"],["","Z","X","C","V","B","N","M",",",".","/"]],r=function(t){return t===t.toLowerCase()},n=function(t){var e,u,s,a,c,l,f,p,m,h;for(l=f=0,m=i.length;m>f;l=f+=1)for(a=p=0,h=i[l].length;h>p;a=p+=1)if(i[l][a].toLowerCase()===t.toLowerCase())return c=o.integerInRange(-1,1),s=l+c,(s>=i.length||0>s)&&(s+=-2*c),a>=i[s].length&&(a=i[s].length-1),c=0===c?[-1,1][o.integerInRange(0,1)]:o.integerInRange(-1,1),u=a+c,(u>=i[s].length||0>u)&&(u+=-2*c),e=i[s][u],""===e?n(t):r(t)?e.toLowerCase():e;return null},e.exports.getAdjacentCharacter=n}).call(this)},{"./random":4}],3:[function(t,e){(function(){var n,r,i;i=t("assert"),r=t("./sequence"),n=function(){function t(t){this.onWait=t,this._sequences=[],this._waiting=!0,"function"==typeof this.onWait&&this.onWait()}return t.prototype._next=function(){var t,e,n,r,i;for(e=null,i=this._sequences,n=0,r=i.length;r>n;n++)if(t=i[n],null!=t){if(t.empty())continue;e=t;break}return null!=e?e.next(this._next.bind(this)):(this._sequences=[],this._waiting=!0,"function"==typeof this.onWait?this.onWait():void 0)},t.prototype.then=function(t,e){return i.ok(null!=t,"The priority must be specified"),i.strictEqual(typeof t,"number","Priority must be a number"),i.strictEqual(~~t,t,"Priority must be an integer"),i.ok(t>=0,"Priority must be a positive integer"),i.ok(null!=e,"The function must be specified"),null==this._sequences[t]&&(this._sequences[t]=new r),this._sequences[t].add(e),this._waiting?(this._waiting=!1,this._next()):void 0},t}(),e.exports=n}).call(this)},{"./sequence":5,assert:9}],4:[function(t,e){(function(){var n,r;n=t("assert"),r=function(t,e){return n.ok(null!=t,"The minimum must be specified"),n.strictEqual(typeof t,"number","Min must be a Number"),n.strictEqual(~~t,t,"Min must be an integer"),n.ok(null!=e,"The maximum must be specified"),n.strictEqual(typeof e,"number","Max must be a Number"),n.strictEqual(~~e,e,"Max must be an integer"),n.strictEqual(e>=t,!0,"Min must be less than or equal to Max"),t===e?t:Math.floor(Math.random()*(e-t+1))+t},e.exports.integerInRange=r}).call(this)},{assert:9}],5:[function(t,e){(function(){var n,r;r=t("assert"),n=function(){function t(){this._queue=[]}return t.prototype.next=function(t){var e;return this.empty()?void 0:(e=this._queue.shift())(t)},t.prototype.add=function(t){return r.ok(null!=t,"The function must be specified"),this._queue.push(t)},t.prototype.empty=function(){return 0===this._queue.length},t}(),e.exports=n}).call(this)},{assert:9}],6:[function(t,e){(function(n){(function(){var r,i,o,u,s;o=t("assert"),r=t("./prioritysequence"),s=t("./random"),u=t("./charactergenerator"),i=function(){function t(){this._prioritySequence=new r(function(t){return function(){return t._sequenceLevel=0}}(this))}return t.prototype.setTargetDomElement=function(t){return o.ok(t instanceof Element,"TargetDomElement must be an instance of Element"),this.targetDomElement=t},t.prototype.setAccuracy=function(t){return o.strictEqual(typeof t,"number","Accuracy must be a number"),o.ok(t>0&&100>=t,"Accuracy must be greater than 0 and less than or equal to 100"),this.accuracy=t},t.prototype.setMinimumSpeed=function(t){return o.strictEqual(typeof t,"number","MinimumSpeed must be a number"),o.ok(t>0,"MinimumSpeed must be greater than 0"),this.minimumSpeed=null!=this.maximumSpeed&&t>this.maximumSpeed?this.maximumSpeed:t},t.prototype.setMaximumSpeed=function(t){return o.strictEqual(typeof t,"number","MaximumSpeed must be a number"),o.ok(t>0,"MaximumSpeed must be greater than 0"),this.maximumSpeed=null!=this.minimumSpeed&&this.minimumSpeed>t?minimumSpeed:t},t.prototype.setKeyboardLayout=function(t){return o.strictEqual(typeof t.getAdjacentCharacter,"function","KeyboardLayout must have an exported getAdjacentCharacter method"),this.keyboardLayout=t},t.prototype._makeChainable=function(t,e){var r;return r=Object.create(this),r._sequenceLevel=this._sequenceLevel,this._prioritySequence.then(this._sequenceLevel,function(i){return n.nextTick(function(){return e(function(){return null!=t&&t.call(r),i()})})}),null!=t&&this._sequenceLevel++,null==t||this.hasOwnProperty("_prioritySequence")?this:void 0},t.prototype.clear=function(t){return this._makeChainable(t,function(t){return function(e){for(var n;null!=(n=t.targetDomElement.lastChild);)t.targetDomElement.removeChild(n);return e()}}(this))},t.prototype.waitRange=function(t,e,n){return this._makeChainable(n,function(){return function(n){return setTimeout(n,s.integerInRange(t,e))}}(this))},t.prototype.wait=function(t,e){return this.waitRange(t,t,e)},t.prototype.put=function(t,e){return this._makeChainable(e,function(e){return function(n){var r,i;for(i=document.createElement("div"),i.innerHTML=t;null!=(r=i.firstChild);)e.targetDomElement.appendChild(r);return n()}}(this))},t.prototype["delete"]=function(t){return this._makeChainable(t,function(t){return function(e){return t.targetDomElement.removeChild(t.targetDomElement.lastChild),e()}}(this))},t.prototype.type=function(t,e){var n,r,i;for(r=(this.minimumSpeed+this.maximumSpeed)/2,i=u(this.keyboardLayout,this.accuracy,r,t);null!==(n=i.next());)"\b"!==n?this.put(n):this["delete"](),this.waitRange(~~(1e3/this.maximumSpeed),~~(1e3/this.minimumSpeed));return this.wait(0,e)},t}(),e.exports=i}).call(this)}).call(this,t("FWaASH"))},{"./charactergenerator":1,"./prioritysequence":3,"./random":4,FWaASH:13,assert:9}],OPj7T5:[function(t,e){(function(){var n,r,i;i=t("assert"),n=t("./typewriter"),r=function(e){var r;return r=new n,r.setTargetDomElement(e),{withAccuracy:function(t){return this.accuracy=t,r.setAccuracy(this.accuracy),this},withMinimumSpeed:function(t){return this.minimumSpeed=t,r.setMinimumSpeed(this.minimumSpeed),this},withMaximumSpeed:function(t){return this.maximumSpeed=t,r.setMaximumSpeed(this.maximumSpeed),this},withKeyboardLayout:function(t){return this.keyboardLayout=t,r.setKeyboardLayout(this.keyboardLayout),this},build:function(){return i.ok(null!=this.accuracy,"Accuracy must be set"),i.ok(null!=this.minimumSpeed,"MinimumSpeed must be set"),i.ok(null!=this.maximumSpeed,"MaximumSpeed must be set"),null==this.keyboardLayout&&r.setKeyboardLayout(t("./defaultkeyboardlayout")),r}}},e.exports=r}).call(this)},{"./defaultkeyboardlayout":2,"./typewriter":6,assert:9}],typewriter:[function(t,e){e.exports=t("OPj7T5")},{}],9:[function(t,e){function n(t,e){return p.isUndefined(e)?""+e:!p.isNumber(e)||!isNaN(e)&&isFinite(e)?p.isFunction(e)||p.isRegExp(e)?e.toString():e:e.toString()}function r(t,e){return p.isString(t)?t.length<e?t:t.slice(0,e):t}function i(t){return r(JSON.stringify(t.actual,n),128)+" "+t.operator+" "+r(JSON.stringify(t.expected,n),128)}function o(t,e,n,r,i){throw new d.AssertionError({message:n,actual:t,expected:e,operator:r,stackStartFunction:i})}function u(t,e){t||o(t,!0,e,"==",d.ok)}function s(t,e){if(t===e)return!0;if(p.isBuffer(t)&&p.isBuffer(e)){if(t.length!=e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}return p.isDate(t)&&p.isDate(e)?t.getTime()===e.getTime():p.isRegExp(t)&&p.isRegExp(e)?t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase:p.isObject(t)||p.isObject(e)?c(t,e):t==e}function a(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function c(t,e){if(p.isNullOrUndefined(t)||p.isNullOrUndefined(e))return!1;if(t.prototype!==e.prototype)return!1;if(a(t))return a(e)?(t=m.call(t),e=m.call(e),s(t,e)):!1;try{var n,r,i=g(t),o=g(e)}catch(u){return!1}if(i.length!=o.length)return!1;for(i.sort(),o.sort(),r=i.length-1;r>=0;r--)if(i[r]!=o[r])return!1;for(r=i.length-1;r>=0;r--)if(n=i[r],!s(t[n],e[n]))return!1;return!0}function l(t,e){return t&&e?"[object RegExp]"==Object.prototype.toString.call(e)?e.test(t):t instanceof e?!0:e.call({},t)===!0?!0:!1:!1}function f(t,e,n,r){var i;p.isString(n)&&(r=n,n=null);try{e()}catch(u){i=u}if(r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),t&&!i&&o(i,n,"Missing expected exception"+r),!t&&l(i,n)&&o(i,n,"Got unwanted exception"+r),t&&i&&n&&!l(i,n)||!t&&i)throw i}var p=t("util/"),m=Array.prototype.slice,h=Object.prototype.hasOwnProperty,d=e.exports=u;d.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=i(this),this.generatedMessage=!0);var e=t.stackStartFunction||o;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var n=new Error;if(n.stack){var r=n.stack,u=e.name,s=r.indexOf("\n"+u);if(s>=0){var a=r.indexOf("\n",s+1);r=r.substring(a+1)}this.stack=r}}},p.inherits(d.AssertionError,Error),d.fail=o,d.ok=u,d.equal=function(t,e,n){t!=e&&o(t,e,n,"==",d.equal)},d.notEqual=function(t,e,n){t==e&&o(t,e,n,"!=",d.notEqual)},d.deepEqual=function(t,e,n){s(t,e)||o(t,e,n,"deepEqual",d.deepEqual)},d.notDeepEqual=function(t,e,n){s(t,e)&&o(t,e,n,"notDeepEqual",d.notDeepEqual)},d.strictEqual=function(t,e,n){t!==e&&o(t,e,n,"===",d.strictEqual)},d.notStrictEqual=function(t,e,n){t===e&&o(t,e,n,"!==",d.notStrictEqual)},d.throws=function(){f.apply(this,[!0].concat(m.call(arguments)))},d.doesNotThrow=function(){f.apply(this,[!1].concat(m.call(arguments)))},d.ifError=function(t){if(t)throw t};var g=Object.keys||function(t){var e=[];for(var n in t)h.call(t,n)&&e.push(n);return e}},{"util/":11}],10:[function(t,e){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],11:[function(t,e,n){(function(e,r){function i(t,e){var r={seen:[],stylize:u};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),d(e)?r.showHidden=e:e&&n._extend(r,e),x(r.showHidden)&&(r.showHidden=!1),x(r.depth)&&(r.depth=2),x(r.colors)&&(r.colors=!1),x(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=o),a(r,t,r.depth)}function o(t,e){var n=i.styles[e];return n?"["+i.colors[n][0]+"m"+t+"["+i.colors[n][1]+"m":t}function u(t){return t}function s(t){var e={};return t.forEach(function(t){e[t]=!0}),e}function a(t,e,r){if(t.customInspect&&e&&O(e.inspect)&&e.inspect!==n.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(r,t);return v(i)||(i=a(t,i,r)),i}var o=c(t,e);if(o)return o;var u=Object.keys(e),d=s(u);if(t.showHidden&&(u=Object.getOwnPropertyNames(e)),k(e)&&(u.indexOf("message")>=0||u.indexOf("description")>=0))return l(e);if(0===u.length){if(O(e)){var g=e.name?": "+e.name:"";return t.stylize("[Function"+g+"]","special")}if(S(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(q(e))return t.stylize(Date.prototype.toString.call(e),"date");if(k(e))return l(e)}var y="",b=!1,w=["{","}"];if(h(e)&&(b=!0,w=["[","]"]),O(e)){var x=e.name?": "+e.name:"";y=" [Function"+x+"]"}if(S(e)&&(y=" "+RegExp.prototype.toString.call(e)),q(e)&&(y=" "+Date.prototype.toUTCString.call(e)),k(e)&&(y=" "+l(e)),0===u.length&&(!b||0==e.length))return w[0]+y+w[1];if(0>r)return S(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var E;return E=b?f(t,e,r,d,u):u.map(function(n){return p(t,e,r,d,n,b)}),t.seen.pop(),m(E,y,w)}function c(t,e){if(x(e))return t.stylize("undefined","undefined");if(v(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return b(e)?t.stylize(""+e,"number"):d(e)?t.stylize(""+e,"boolean"):g(e)?t.stylize("null","null"):void 0}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function f(t,e,n,r,i){for(var o=[],u=0,s=e.length;s>u;++u)o.push(D(e,String(u))?p(t,e,n,r,String(u),!0):"");return i.forEach(function(i){i.match(/^\d+$/)||o.push(p(t,e,n,r,i,!0))}),o}function p(t,e,n,r,i,o){var u,s,c;if(c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},c.get?s=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(s=t.stylize("[Setter]","special")),D(r,i)||(u="["+i+"]"),s||(t.seen.indexOf(c.value)<0?(s=g(n)?a(t,c.value,null):a(t,c.value,n-1),s.indexOf("\n")>-1&&(s=o?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n"))):s=t.stylize("[Circular]","special")),x(u)){if(o&&i.match(/^\d+$/))return s;u=JSON.stringify(""+i),u.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(u=u.substr(1,u.length-2),u=t.stylize(u,"name")):(u=u.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),u=t.stylize(u,"string"))}return u+": "+s}function m(t,e,n){var r=0,i=t.reduce(function(t,e){return r++,e.indexOf("\n")>=0&&r++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}function h(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function g(t){return null===t}function y(t){return null==t}function b(t){return"number"==typeof t}function v(t){return"string"==typeof t}function w(t){return"symbol"==typeof t}function x(t){return void 0===t}function S(t){return E(t)&&"[object RegExp]"===_(t)}function E(t){return"object"==typeof t&&null!==t}function q(t){return E(t)&&"[object Date]"===_(t)}function k(t){return E(t)&&("[object Error]"===_(t)||t instanceof Error)}function O(t){return"function"==typeof t}function j(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function _(t){return Object.prototype.toString.call(t)}function A(t){return 10>t?"0"+t.toString(10):t.toString(10)}function M(){var t=new Date,e=[A(t.getHours()),A(t.getMinutes()),A(t.getSeconds())].join(":");return[t.getDate(),N[t.getMonth()],e].join(" ")}function D(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var C=/%[sdj%]/g;n.format=function(t){if(!v(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(i(arguments[n]));return e.join(" ")}for(var n=1,r=arguments,o=r.length,u=String(t).replace(C,function(t){if("%%"===t)return"%";if(n>=o)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return t}}),s=r[n];o>n;s=r[++n])u+=g(s)||!E(s)?" "+s:" "+i(s);return u},n.deprecate=function(t,i){function o(){if(!u){if(e.throwDeprecation)throw new Error(i);e.traceDeprecation?console.trace(i):console.error(i),u=!0}return t.apply(this,arguments)}if(x(r.process))return function(){return n.deprecate(t,i).apply(this,arguments)};if(e.noDeprecation===!0)return t;var u=!1;return o};var L,T={};n.debuglog=function(t){if(x(L)&&(L=e.env.NODE_DEBUG||""),t=t.toUpperCase(),!T[t])if(new RegExp("\\b"+t+"\\b","i").test(L)){var r=e.pid;T[t]=function(){var e=n.format.apply(n,arguments);console.error("%s %d: %s",t,r,e)}}else T[t]=function(){};return T[t]},n.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},n.isArray=h,n.isBoolean=d,n.isNull=g,n.isNullOrUndefined=y,n.isNumber=b,n.isString=v,n.isSymbol=w,n.isUndefined=x,n.isRegExp=S,n.isObject=E,n.isDate=q,n.isError=k,n.isFunction=O,n.isPrimitive=j,n.isBuffer=t("./support/isBuffer");var N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];n.log=function(){console.log("%s - %s",M(),n.format.apply(n,arguments))},n.inherits=t("inherits"),n._extend=function(t,e){if(!e||!E(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t}}).call(this,t("FWaASH"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":10,FWaASH:13,inherits:12}],12:[function(t,e){e.exports="function"==typeof Object.create?function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},{}],13:[function(t,e){function n(){}var r=e.exports={};r.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,e="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};if(e){var n=[];return window.addEventListener("message",function(t){var e=t.source;if((e===window||null===e)&&"process-tick"===t.data&&(t.stopPropagation(),n.length>0)){var r=n.shift();r()}},!0),function(t){n.push(t),window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.on=n,r.addListener=n,r.once=n,r.off=n,r.removeListener=n,r.removeAllListeners=n,r.emit=n,r.binding=function(){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(){throw new Error("process.chdir is not supported")}},{}]},{},[]); |