Files
icehrm/web/dist/common.js
2019-02-03 13:57:59 +01:00

3 lines
39 KiB
JavaScript

!function(){return function t(r,e,n){function o(a,f){if(!e[a]){if(!r[a]){var u="function"==typeof require&&require;if(!f&&u)return u(a,!0);if(i)return i(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var h=e[a]={exports:{}};r[a][0].call(h.exports,function(t){return o(r[a][1][t]||t)},h,h.exports,t,r,e,n)}return e[a].exports}for(var i="function"==typeof require&&require,a=0;a<n.length;a++)o(n[a]);return o}}()({1:[function(t,r,e){"use strict";e.byteLength=function(t){var r=s(t),e=r[0],n=r[1];return 3*(e+n)/4-n},e.toByteArray=function(t){for(var r,e=s(t),n=e[0],a=e[1],f=new i(function(t,r,e){return 3*(r+e)/4-e}(0,n,a)),u=0,h=a>0?n-4:n,c=0;c<h;c+=4)r=o[t.charCodeAt(c)]<<18|o[t.charCodeAt(c+1)]<<12|o[t.charCodeAt(c+2)]<<6|o[t.charCodeAt(c+3)],f[u++]=r>>16&255,f[u++]=r>>8&255,f[u++]=255&r;2===a&&(r=o[t.charCodeAt(c)]<<2|o[t.charCodeAt(c+1)]>>4,f[u++]=255&r);1===a&&(r=o[t.charCodeAt(c)]<<10|o[t.charCodeAt(c+1)]<<4|o[t.charCodeAt(c+2)]>>2,f[u++]=r>>8&255,f[u++]=255&r);return f},e.fromByteArray=function(t){for(var r,e=t.length,o=e%3,i=[],a=0,f=e-o;a<f;a+=16383)i.push(h(t,a,a+16383>f?f:a+16383));1===o?(r=t[e-1],i.push(n[r>>2]+n[r<<4&63]+"==")):2===o&&(r=(t[e-2]<<8)+t[e-1],i.push(n[r>>10]+n[r>>4&63]+n[r<<2&63]+"="));return i.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,u=a.length;f<u;++f)n[f]=a[f],o[a.charCodeAt(f)]=f;function s(t){var r=t.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=t.indexOf("=");return-1===e&&(e=r),[e,e===r?0:4-e%4]}function h(t,r,e){for(var o,i,a=[],f=r;f<e;f+=3)o=(t[f]<<16&16711680)+(t[f+1]<<8&65280)+(255&t[f+2]),a.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},{}],2:[function(t,r,e){"use strict";var n=t("base64-js"),o=t("ieee754");e.Buffer=f,e.SlowBuffer=function(t){+t!=t&&(t=0);return f.alloc(+t)},e.INSPECT_MAX_BYTES=50;var i=2147483647;function a(t){if(t>i)throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=new Uint8Array(t);return r.__proto__=f.prototype,r}function f(t,r,e){if("number"==typeof t){if("string"==typeof r)throw new TypeError('The "string" argument must be of type string. Received type number');return h(t)}return u(t,r,e)}function u(t,r,e){if("string"==typeof t)return function(t,r){"string"==typeof r&&""!==r||(r="utf8");if(!f.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var e=0|p(t,r),n=a(e),o=n.write(t,r);o!==e&&(n=n.slice(0,o));return n}(t,r);if(ArrayBuffer.isView(t))return c(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(W(t,ArrayBuffer)||t&&W(t.buffer,ArrayBuffer))return function(t,r,e){if(r<0||t.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<r+(e||0))throw new RangeError('"length" is outside of buffer bounds');var n;n=void 0===r&&void 0===e?new Uint8Array(t):void 0===e?new Uint8Array(t,r):new Uint8Array(t,r,e);return n.__proto__=f.prototype,n}(t,r,e);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return f.from(n,r,e);var o=function(t){if(f.isBuffer(t)){var r=0|l(t.length),e=a(r);return 0===e.length?e:(t.copy(e,0,0,r),e)}if(void 0!==t.length)return"number"!=typeof t.length||F(t.length)?a(0):c(t);if("Buffer"===t.type&&Array.isArray(t.data))return c(t.data)}(t);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return f.from(t[Symbol.toPrimitive]("string"),r,e);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function s(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function h(t){return s(t),a(t<0?0:0|l(t))}function c(t){for(var r=t.length<0?0:0|l(t.length),e=a(r),n=0;n<r;n+=1)e[n]=255&t[n];return e}function l(t){if(t>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|t}function p(t,r){if(f.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||W(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var e=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===e)return 0;for(var o=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":return D(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return j(t).length;default:if(o)return n?-1:D(t).length;r=(""+r).toLowerCase(),o=!0}}function y(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function d(t,r,e,n,o){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),F(e=+e)&&(e=o?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(o)return-1;e=t.length-1}else if(e<0){if(!o)return-1;e=0}if("string"==typeof r&&(r=f.from(r,n)),f.isBuffer(r))return 0===r.length?-1:g(t,r,e,n,o);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):g(t,[r],e,n,o);throw new TypeError("val must be string, number or Buffer")}function g(t,r,e,n,o){var i,a=1,f=t.length,u=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;a=2,f/=2,u/=2,e/=2}function s(t,r){return 1===a?t[r]:t.readUInt16BE(r*a)}if(o){var h=-1;for(i=e;i<f;i++)if(s(t,i)===s(r,-1===h?0:i-h)){if(-1===h&&(h=i),i-h+1===u)return h*a}else-1!==h&&(i-=i-h),h=-1}else for(e+u>f&&(e=f-u),i=e;i>=0;i--){for(var c=!0,l=0;l<u;l++)if(s(t,i+l)!==s(r,l)){c=!1;break}if(c)return i}return-1}function v(t,r,e,n){e=Number(e)||0;var o=t.length-e;n?(n=Number(n))>o&&(n=o):n=o;var i=r.length;n>i/2&&(n=i/2);for(var a=0;a<n;++a){var f=parseInt(r.substr(2*a,2),16);if(F(f))return a;t[e+a]=f}return a}function w(t,r,e,n){return P(D(r,t.length-e),t,e,n)}function b(t,r,e,n){return P(function(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}(r),t,e,n)}function m(t,r,e,n){return b(t,r,e,n)}function E(t,r,e,n){return P(j(r),t,e,n)}function A(t,r,e,n){return P(function(t,r){for(var e,n,o,i=[],a=0;a<t.length&&!((r-=2)<0);++a)e=t.charCodeAt(a),n=e>>8,o=e%256,i.push(o),i.push(n);return i}(r,t.length-e),t,e,n)}function S(t,r,e){return 0===r&&e===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(r,e))}function C(t,r,e){e=Math.min(t.length,e);for(var n=[],o=r;o<e;){var i,a,f,u,s=t[o],h=null,c=s>239?4:s>223?3:s>191?2:1;if(o+c<=e)switch(c){case 1:s<128&&(h=s);break;case 2:128==(192&(i=t[o+1]))&&(u=(31&s)<<6|63&i)>127&&(h=u);break;case 3:i=t[o+1],a=t[o+2],128==(192&i)&&128==(192&a)&&(u=(15&s)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(h=u);break;case 4:i=t[o+1],a=t[o+2],f=t[o+3],128==(192&i)&&128==(192&a)&&128==(192&f)&&(u=(15&s)<<18|(63&i)<<12|(63&a)<<6|63&f)>65535&&u<1114112&&(h=u)}null===h?(h=65533,c=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),o+=c}return function(t){var r=t.length;if(r<=B)return String.fromCharCode.apply(String,t);var e="",n=0;for(;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=B));return e}(n)}e.kMaxLength=i,f.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}(),f.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),f.poolSize=8192,f.from=function(t,r,e){return u(t,r,e)},f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,f.alloc=function(t,r,e){return function(t,r,e){return s(t),t<=0?a(t):void 0!==r?"string"==typeof e?a(t).fill(r,e):a(t).fill(r):a(t)}(t,r,e)},f.allocUnsafe=function(t){return h(t)},f.allocUnsafeSlow=function(t){return h(t)},f.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==f.prototype},f.compare=function(t,r){if(W(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),W(r,Uint8Array)&&(r=f.from(r,r.offset,r.byteLength)),!f.isBuffer(t)||!f.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;for(var e=t.length,n=r.length,o=0,i=Math.min(e,n);o<i;++o)if(t[o]!==r[o]){e=t[o],n=r[o];break}return e<n?-1:n<e?1:0},f.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return f.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var n=f.allocUnsafe(r),o=0;for(e=0;e<t.length;++e){var i=t[e];if(W(i,Uint8Array)&&(i=f.from(i)),!f.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o),o+=i.length}return n},f.byteLength=p,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)y(this,r,r+1);return this},f.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)y(this,r,r+3),y(this,r+1,r+2);return this},f.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)y(this,r,r+7),y(this,r+1,r+6),y(this,r+2,r+5),y(this,r+3,r+4);return this},f.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?C(this,0,t):function(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,r,e);case"utf8":case"utf-8":return C(this,r,e);case"ascii":return _(this,r,e);case"latin1":case"binary":return U(this,r,e);case"base64":return S(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},f.prototype.toLocaleString=f.prototype.toString,f.prototype.equals=function(t){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===f.compare(this,t)},f.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},f.prototype.compare=function(t,r,e,n,o){if(W(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),!f.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),r<0||e>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&r>=e)return 0;if(n>=o)return-1;if(r>=e)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),a=(e>>>=0)-(r>>>=0),u=Math.min(i,a),s=this.slice(n,o),h=t.slice(r,e),c=0;c<u;++c)if(s[c]!==h[c]){i=s[c],a=h[c];break}return i<a?-1:a<i?1:0},f.prototype.includes=function(t,r,e){return-1!==this.indexOf(t,r,e)},f.prototype.indexOf=function(t,r,e){return d(this,t,r,e,!0)},f.prototype.lastIndexOf=function(t,r,e){return d(this,t,r,e,!1)},f.prototype.write=function(t,r,e,n){if(void 0===r)n="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)n=r,e=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r>>>=0,isFinite(e)?(e>>>=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var o=this.length-r;if((void 0===e||e>o)&&(e=o),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return v(this,t,r,e);case"utf8":case"utf-8":return w(this,t,r,e);case"ascii":return b(this,t,r,e);case"latin1":case"binary":return m(this,t,r,e);case"base64":return E(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,r,e);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var B=4096;function _(t,r,e){var n="";e=Math.min(t.length,e);for(var o=r;o<e;++o)n+=String.fromCharCode(127&t[o]);return n}function U(t,r,e){var n="";e=Math.min(t.length,e);for(var o=r;o<e;++o)n+=String.fromCharCode(t[o]);return n}function T(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var o="",i=r;i<e;++i)o+=L(t[i]);return o}function M(t,r,e){for(var n=t.slice(r,e),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function x(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function R(t,r,e,n,o,i){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<i)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function k(t,r,e,n,o,i){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function I(t,r,e,n,i){return r=+r,e>>>=0,i||k(t,0,e,4),o.write(t,r,e,n,23,4),e+4}function N(t,r,e,n,i){return r=+r,e>>>=0,i||k(t,0,e,8),o.write(t,r,e,n,52,8),e+8}f.prototype.slice=function(t,r){var e=this.length;(t=~~t)<0?(t+=e)<0&&(t=0):t>e&&(t=e),(r=void 0===r?e:~~r)<0?(r+=e)<0&&(r=0):r>e&&(r=e),r<t&&(r=t);var n=this.subarray(t,r);return n.__proto__=f.prototype,n},f.prototype.readUIntLE=function(t,r,e){t>>>=0,r>>>=0,e||x(t,r,this.length);for(var n=this[t],o=1,i=0;++i<r&&(o*=256);)n+=this[t+i]*o;return n},f.prototype.readUIntBE=function(t,r,e){t>>>=0,r>>>=0,e||x(t,r,this.length);for(var n=this[t+--r],o=1;r>0&&(o*=256);)n+=this[t+--r]*o;return n},f.prototype.readUInt8=function(t,r){return t>>>=0,r||x(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,r){return t>>>=0,r||x(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,r){return t>>>=0,r||x(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,r){return t>>>=0,r||x(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,r){return t>>>=0,r||x(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,r,e){t>>>=0,r>>>=0,e||x(t,r,this.length);for(var n=this[t],o=1,i=0;++i<r&&(o*=256);)n+=this[t+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*r)),n},f.prototype.readIntBE=function(t,r,e){t>>>=0,r>>>=0,e||x(t,r,this.length);for(var n=r,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*r)),i},f.prototype.readInt8=function(t,r){return t>>>=0,r||x(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,r){t>>>=0,r||x(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt16BE=function(t,r){t>>>=0,r||x(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt32LE=function(t,r){return t>>>=0,r||x(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,r){return t>>>=0,r||x(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,r){return t>>>=0,r||x(t,4,this.length),o.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,r){return t>>>=0,r||x(t,4,this.length),o.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,r){return t>>>=0,r||x(t,8,this.length),o.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,r){return t>>>=0,r||x(t,8,this.length),o.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r>>>=0,e>>>=0,n)||R(this,t,r,e,Math.pow(2,8*e)-1,0);var o=1,i=0;for(this[r]=255&t;++i<e&&(o*=256);)this[r+i]=t/o&255;return r+e},f.prototype.writeUIntBE=function(t,r,e,n){(t=+t,r>>>=0,e>>>=0,n)||R(this,t,r,e,Math.pow(2,8*e)-1,0);var o=e-1,i=1;for(this[r+o]=255&t;--o>=0&&(i*=256);)this[r+o]=t/i&255;return r+e},f.prototype.writeUInt8=function(t,r,e){return t=+t,r>>>=0,e||R(this,t,r,1,255,0),this[r]=255&t,r+1},f.prototype.writeUInt16LE=function(t,r,e){return t=+t,r>>>=0,e||R(this,t,r,2,65535,0),this[r]=255&t,this[r+1]=t>>>8,r+2},f.prototype.writeUInt16BE=function(t,r,e){return t=+t,r>>>=0,e||R(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=255&t,r+2},f.prototype.writeUInt32LE=function(t,r,e){return t=+t,r>>>=0,e||R(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t,r+4},f.prototype.writeUInt32BE=function(t,r,e){return t=+t,r>>>=0,e||R(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t,r+4},f.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r>>>=0,!n){var o=Math.pow(2,8*e-1);R(this,t,r,e,o-1,-o)}var i=0,a=1,f=0;for(this[r]=255&t;++i<e&&(a*=256);)t<0&&0===f&&0!==this[r+i-1]&&(f=1),this[r+i]=(t/a>>0)-f&255;return r+e},f.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r>>>=0,!n){var o=Math.pow(2,8*e-1);R(this,t,r,e,o-1,-o)}var i=e-1,a=1,f=0;for(this[r+i]=255&t;--i>=0&&(a*=256);)t<0&&0===f&&0!==this[r+i+1]&&(f=1),this[r+i]=(t/a>>0)-f&255;return r+e},f.prototype.writeInt8=function(t,r,e){return t=+t,r>>>=0,e||R(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=255&t,r+1},f.prototype.writeInt16LE=function(t,r,e){return t=+t,r>>>=0,e||R(this,t,r,2,32767,-32768),this[r]=255&t,this[r+1]=t>>>8,r+2},f.prototype.writeInt16BE=function(t,r,e){return t=+t,r>>>=0,e||R(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=255&t,r+2},f.prototype.writeInt32LE=function(t,r,e){return t=+t,r>>>=0,e||R(this,t,r,4,2147483647,-2147483648),this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4},f.prototype.writeInt32BE=function(t,r,e){return t=+t,r>>>=0,e||R(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t,r+4},f.prototype.writeFloatLE=function(t,r,e){return I(this,t,r,!0,e)},f.prototype.writeFloatBE=function(t,r,e){return I(this,t,r,!1,e)},f.prototype.writeDoubleLE=function(t,r,e){return N(this,t,r,!0,e)},f.prototype.writeDoubleBE=function(t,r,e){return N(this,t,r,!1,e)},f.prototype.copy=function(t,r,e,n){if(!f.isBuffer(t))throw new TypeError("argument should be a Buffer");if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-e&&(n=t.length-r+e);var o=n-e;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(r,e,n);else if(this===t&&e<r&&r<n)for(var i=o-1;i>=0;--i)t[i+r]=this[i+e];else Uint8Array.prototype.set.call(t,this.subarray(e,n),r);return o},f.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!f.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var o=t.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(t=o)}}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;var i;if(r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(i=r;i<e;++i)this[i]=t;else{var a=f.isBuffer(t)?t:f.from(t,n),u=a.length;if(0===u)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<e-r;++i)this[i+r]=a[i%u]}return this};var O=/[^+\/0-9A-Za-z-_]/g;function L(t){return t<16?"0"+t.toString(16):t.toString(16)}function D(t,r){var e;r=r||1/0;for(var n=t.length,o=null,i=[],a=0;a<n;++a){if((e=t.charCodeAt(a))>55295&&e<57344){if(!o){if(e>56319){(r-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(r-=3)>-1&&i.push(239,191,189);continue}o=e;continue}if(e<56320){(r-=3)>-1&&i.push(239,191,189),o=e;continue}e=65536+(o-55296<<10|e-56320)}else o&&(r-=3)>-1&&i.push(239,191,189);if(o=null,e<128){if((r-=1)<0)break;i.push(e)}else if(e<2048){if((r-=2)<0)break;i.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;i.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;i.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return i}function j(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(O,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function P(t,r,e,n){for(var o=0;o<n&&!(o+e>=r.length||o>=t.length);++o)r[o+e]=t[o];return o}function W(t,r){return t instanceof r||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===r.name}function F(t){return t!=t}},{"base64-js":1,ieee754:3}],3:[function(t,r,e){e.read=function(t,r,e,n,o){var i,a,f=8*o-n-1,u=(1<<f)-1,s=u>>1,h=-7,c=e?o-1:0,l=e?-1:1,p=t[r+c];for(c+=l,i=p&(1<<-h)-1,p>>=-h,h+=f;h>0;i=256*i+t[r+c],c+=l,h-=8);for(a=i&(1<<-h)-1,i>>=-h,h+=n;h>0;a=256*a+t[r+c],c+=l,h-=8);if(0===i)i=1-s;else{if(i===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),i-=s}return(p?-1:1)*a*Math.pow(2,i-n)},e.write=function(t,r,e,n,o,i){var a,f,u,s=8*i-o-1,h=(1<<s)-1,c=h>>1,l=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,y=n?1:-1,d=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(f=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(u=Math.pow(2,-a))<1&&(a--,u*=2),(r+=a+c>=1?l/u:l*Math.pow(2,1-c))*u>=2&&(a++,u/=2),a+c>=h?(f=0,a=h):a+c>=1?(f=(r*u-1)*Math.pow(2,o),a+=c):(f=r*Math.pow(2,c-1)*Math.pow(2,o),a=0));o>=8;t[e+p]=255&f,p+=y,f/=256,o-=8);for(a=a<<o|f,s+=o;s>0;t[e+p]=255&a,p+=y,a/=256,s-=8);t[e+p-y]|=128*d}},{}],4:[function(t,r,e){(function(n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var Aes={cipher:function(t,r){for(var e=r.length/4-1,n=[[],[],[],[]],o=0;o<16;o++)n[o%4][Math.floor(o/4)]=t[o];n=Aes.addRoundKey(n,r,0,4);for(var i=1;i<e;i++)n=Aes.subBytes(n,4),n=Aes.shiftRows(n,4),n=Aes.mixColumns(n,4),n=Aes.addRoundKey(n,r,i,4);n=Aes.subBytes(n,4),n=Aes.shiftRows(n,4),n=Aes.addRoundKey(n,r,e,4);var a=new Array(16);for(o=0;o<16;o++)a[o]=n[o%4][Math.floor(o/4)];return a},keyExpansion:function(t){for(var r=t.length/4,e=r+6,n=new Array(4*(e+1)),o=new Array(4),i=0;i<r;i++){var a=[t[4*i],t[4*i+1],t[4*i+2],t[4*i+3]];n[i]=a}for(i=r;i<4*(e+1);i++){n[i]=new Array(4);for(var f=0;f<4;f++)o[f]=n[i-1][f];if(i%r==0){o=Aes.subWord(Aes.rotWord(o));for(f=0;f<4;f++)o[f]^=Aes.rCon[i/r][f]}else r>6&&i%r==4&&(o=Aes.subWord(o));for(f=0;f<4;f++)n[i][f]=n[i-r][f]^o[f]}return n},subBytes:function(t,r){for(var e=0;e<4;e++)for(var n=0;n<r;n++)t[e][n]=Aes.sBox[t[e][n]];return t},shiftRows:function(t,r){for(var e=new Array(4),n=1;n<4;n++){for(var o=0;o<4;o++)e[o]=t[n][(o+n)%r];for(o=0;o<4;o++)t[n][o]=e[o]}return t},mixColumns:function(t,r){for(var e=0;e<4;e++){for(var n=new Array(4),o=new Array(4),i=0;i<4;i++)n[i]=t[i][e],o[i]=128&t[i][e]?t[i][e]<<1^283:t[i][e]<<1;t[0][e]=o[0]^n[1]^o[1]^n[2]^n[3],t[1][e]=n[0]^o[1]^n[2]^o[2]^n[3],t[2][e]=n[0]^n[1]^o[2]^n[3]^o[3],t[3][e]=n[0]^o[0]^n[1]^n[2]^o[3]}return t},addRoundKey:function(t,r,e,n){for(var o=0;o<4;o++)for(var i=0;i<n;i++)t[o][i]^=r[4*e+i][o];return t},subWord:function(t){for(var r=0;r<4;r++)t[r]=Aes.sBox[t[r]];return t},rotWord:function(t){for(var r=t[0],e=0;e<3;e++)t[e]=t[e+1];return t[3]=r,t},sBox:[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],rCon:[[0,0,0,0],[1,0,0,0],[2,0,0,0],[4,0,0,0],[8,0,0,0],[16,0,0,0],[32,0,0,0],[64,0,0,0],[128,0,0,0],[27,0,0,0],[54,0,0,0]]};if(void 0!==r&&r.exports&&(r.exports=Aes),"function"==typeof define&&define.amd&&define([],function(){return Aes}),void 0!==r&&r.exports)Aes=t("./aes");Aes.Ctr={},Aes.Ctr.encrypt=function(t,r,e){if(128!=e&&192!=e&&256!=e)return"";t=String(t).utf8Encode(),r=String(r).utf8Encode();for(var n=e/8,o=new Array(n),i=0;i<n;i++)o[i]=isNaN(r.charCodeAt(i))?0:r.charCodeAt(i);var a=Aes.cipher(o,Aes.keyExpansion(o));a=a.concat(a.slice(0,n-16));var f=new Array(16),u=(new Date).getTime(),s=u%1e3,h=Math.floor(u/1e3),c=Math.floor(65535*Math.random());for(i=0;i<2;i++)f[i]=s>>>8*i&255;for(i=0;i<2;i++)f[i+2]=c>>>8*i&255;for(i=0;i<4;i++)f[i+4]=h>>>8*i&255;var l="";for(i=0;i<8;i++)l+=String.fromCharCode(f[i]);for(var p=Aes.keyExpansion(a),y=Math.ceil(t.length/16),d=new Array(y),g=0;g<y;g++){for(var v=0;v<4;v++)f[15-v]=g>>>8*v&255;for(v=0;v<4;v++)f[15-v-4]=g/4294967296>>>8*v;var w=Aes.cipher(f,p),b=g<y-1?16:(t.length-1)%16+1,m=new Array(b);for(i=0;i<b;i++)m[i]=w[i]^t.charCodeAt(16*g+i),m[i]=String.fromCharCode(m[i]);d[g]=m.join("")}var E=l+d.join("");return E=E.base64Encode()},Aes.Ctr.decrypt=function(t,r,e){if(128!=e&&192!=e&&256!=e)return"";t=String(t).base64Decode(),r=String(r).utf8Encode();for(var n=e/8,o=new Array(n),i=0;i<n;i++)o[i]=isNaN(r.charCodeAt(i))?0:r.charCodeAt(i);var a=Aes.cipher(o,Aes.keyExpansion(o));a=a.concat(a.slice(0,n-16));var f=new Array(8),u=t.slice(0,8);for(i=0;i<8;i++)f[i]=u.charCodeAt(i);for(var s=Aes.keyExpansion(a),h=Math.ceil((t.length-8)/16),c=new Array(h),l=0;l<h;l++)c[l]=t.slice(8+16*l,8+16*l+16);t=c;var p=new Array(t.length);for(l=0;l<h;l++){for(var y=0;y<4;y++)f[15-y]=l>>>8*y&255;for(y=0;y<4;y++)f[15-y-4]=(l+1)/4294967296-1>>>8*y&255;var d=Aes.cipher(f,s),g=new Array(t[l].length);for(i=0;i<t[l].length;i++)g[i]=d[i]^t[l].charCodeAt(i),g[i]=String.fromCharCode(g[i]);p[l]=g.join("")}var v=p.join("");return v=v.utf8Decode()},void 0===String.prototype.utf8Encode&&(String.prototype.utf8Encode=function(){return unescape(encodeURIComponent(this))}),void 0===String.prototype.utf8Decode&&(String.prototype.utf8Decode=function(){try{return decodeURIComponent(escape(this))}catch(t){return this}}),void 0===String.prototype.base64Encode&&(String.prototype.base64Encode=function(){if("undefined"!=typeof btoa)return btoa(this);if(void 0!==n)return new n(this,"utf8").toString("base64");throw new Error("No Base64 Encode")}),void 0===String.prototype.base64Decode&&(String.prototype.base64Decode=function(){if("undefined"!=typeof atob)return atob(this);if(void 0!==n)return new n(this,"base64").toString("utf8");throw new Error("No Base64 Decode")}),void 0!==r&&r.exports&&(r.exports=Aes.Ctr),"function"==typeof define&&define.amd&&define(["Aes"],function(){return Aes.Ctr}),e.default=Aes}).call(this,t("buffer").Buffer)},{"./aes":8,buffer:2}],5:[function(t,r,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(r,e,n){return e&&t(r.prototype,e),n&&t(r,n),r}}();var o=function(){function t(){!function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,t),this.baseUrl="",this.templates={}}return n(t,[{key:"setBaseUrl",value:function(t){this.baseUrl=t}},{key:"setTemplates",value:function(t){this.templates=t}},{key:"setTimeUtils",value:function(t){this.timeUtils=t}},{key:"getNotifications",value:function(t,r){var e=this;$.getJSON(this.baseUrl,{a:"getNotifications"},function(t){"SUCCESS"===t.status&&e.renderNotifications(t.data[1],t.data[0])})}},{key:"clearPendingNotifications",value:function(t,r){$.getJSON(this.baseUrl,{a:"clearNotifications"},function(t){})}},{key:"renderNotifications",value:function(t,r){if(0!==t.length){var e=this.templates.notifications;r>0?(e=e.replace("#_count_#",r),e=r>1?e.replace("#_header_#","You have "+r+" new notifications"):e.replace("#_header_#","You have "+r+" new notification")):e=(e=e.replace("#_count_#","")).replace("#_header_#","You have no new notifications");var n="";for(var o in t)n+=this.renderNotification(t[o]);e=e.replace("#_notifications_#",n);var i=$(e);0===r&&i.find(".label-danger").remove(),i.attr("id","notifications"),$("#notifications").replaceWith(i),$(".navbar .menu").slimscroll({height:"320px",alwaysVisible:!1,size:"3px"}).css("width","100%"),this.timeUtils.convertToRelativeTime($(".notificationTime"))}}},{key:"renderNotification",value:function(t){var r=this.templates.notification;r=r.replace("#_image_#",t.image);try{var e=JSON.parse(t.action);r=r.replace("#_url_#",this.baseUrl.replace("service.php","?")+e.url)}catch(t){r=r.replace("#_url_#","")}return r=(r=(r=r.replace("#_time_#",t.time)).replace("#_fromName_#",t.type)).replace("#_message_#",this.getLineBreakString(t.message,27))}},{key:"getLineBreakString",value:function(t,r){var e="";try{for(var n=t.split(" "),o=0,i=0;i<n.length;i++)(o+=n[i].length+1)>r?(e+=n[i]+"<br/>",o=0):e+=n[i]+" "}catch(t){}return e}}]),t}();e.default=o},{}],6:[function(t,r,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(r,e,n){return e&&t(r.prototype,e),n&&t(r,n),r}}();var RequestCache=function(){function RequestCache(){!function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,RequestCache)}return n(RequestCache,[{key:"getKey",value:function(t,r){var e=t+"|";for(var n in r)e+=n+"="+r[n]+"|";return e}},{key:"invalidateTable",value:function(t){for(var r=void 0,e=0;e<localStorage.length;e++)(r=localStorage.key(e)).indexOf("t="+t)>0&&localStorage.removeItem(r)}},{key:"getData",value:function(t){var r=void 0;if("undefined"==typeof Storage)return null;var e=localStorage.getItem(t);return void 0!==e&&null!=e&&""!==e?void 0===(r=JSON.parse(e))||null==r?null:void 0!==r.status&&null!=r.status&&"SUCCESS"!==r.status?null:r:null}},{key:"setData",value:function(t,r){if("undefined"==typeof Storage)return null;if(void 0!==r.status&&null!=r.status&&"SUCCESS"!==r.status)return null;var e=JSON.stringify(r);return localStorage.setItem(t,e),e}}]),RequestCache}();e.default=RequestCache},{}],7:[function(t,r,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(r,e,n){return e&&t(r.prototype,e),n&&t(r,n),r}}();var o=function(){function t(){!function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,t)}return n(t,[{key:"setServerGMToffset",value:function(t){this.serverGMToffset=t}},{key:"getMySQLFormatDate",value:function(t){var r=function(t){return t<10?"0"+t:t};return t.getUTCFullYear()+"-"+r(t.getUTCMonth()+1)+"-"+r(t.getUTCDate())}},{key:"convertToRelativeTime",value:function(t){var r=function(t,r){var e="am",n=t;n>=12&&(e="pm",n>12&&(n-=12));var o="";r<10&&(o="0");var i="";return 0===t&&(i="0")," at "+i+n+":"+o+r+e},e=new Date,n=["January","February","March","April","May","June","July","August","September","October","November","December"],o=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],i=60*(this.serverGMToffset- -(new Date).getTimezoneOffset()/60)*60*1e3;t.each(function(){try{var t=$(this).html().split(" "),a=t[0],f=t[1],u=a.split("-"),s=u[0],h=u[1]-1,c=u[2],l=f.split(":"),p=l[0],y=l[1],d=l[2],g=new Date(s,h,c,p,y,d).getTime(),v=new Date(g-i),w=v.toString("d"),b=v.getFullYear(),m=v.getHours(),E=v.getMinutes(),A=o[v.getDay()]+", "+n[v.getMonth()]+" "+w+", "+b+r(m,E),S=(e.getTime()-v.getTime())/1e3,C=Math.abs(S/60),B=Math.abs(S/3600),_=Math.abs(S/86400),U=Math.abs(S/31536e3),T="";if(_>1)T=w+" "+n[v.getMonth()].substring(0,3),U>1&&(T=T+" "+s),T+=r(m,E);else if(B>=1){var M=Math.round(B);T=1===M?"about an hour ago":M+" hours ago"}else if(C>=1){var x=Math.round(C);T=1===x?"about a minute ago":x+" minutes ago"}else C<1&&(T="less than a minute ago");$(this).html(T),$(this).attr("title",A)}catch(t){}})}}]),t}();e.default=o},{}],8:[function(t,r,e){(function(n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var Aes={cipher:function(t,r){for(var e=r.length/4-1,n=[[],[],[],[]],o=0;o<16;o++)n[o%4][Math.floor(o/4)]=t[o];n=Aes.addRoundKey(n,r,0,4);for(var i=1;i<e;i++)n=Aes.subBytes(n,4),n=Aes.shiftRows(n,4),n=Aes.mixColumns(n,4),n=Aes.addRoundKey(n,r,i,4);n=Aes.subBytes(n,4),n=Aes.shiftRows(n,4),n=Aes.addRoundKey(n,r,e,4);var a=new Array(16);for(o=0;o<16;o++)a[o]=n[o%4][Math.floor(o/4)];return a},keyExpansion:function(t){for(var r=t.length/4,e=r+6,n=new Array(4*(e+1)),o=new Array(4),i=0;i<r;i++){var a=[t[4*i],t[4*i+1],t[4*i+2],t[4*i+3]];n[i]=a}for(i=r;i<4*(e+1);i++){n[i]=new Array(4);for(var f=0;f<4;f++)o[f]=n[i-1][f];if(i%r==0){o=Aes.subWord(Aes.rotWord(o));for(f=0;f<4;f++)o[f]^=Aes.rCon[i/r][f]}else r>6&&i%r==4&&(o=Aes.subWord(o));for(f=0;f<4;f++)n[i][f]=n[i-r][f]^o[f]}return n},subBytes:function(t,r){for(var e=0;e<4;e++)for(var n=0;n<r;n++)t[e][n]=Aes.sBox[t[e][n]];return t},shiftRows:function(t,r){for(var e=new Array(4),n=1;n<4;n++){for(var o=0;o<4;o++)e[o]=t[n][(o+n)%r];for(o=0;o<4;o++)t[n][o]=e[o]}return t},mixColumns:function(t,r){for(var e=0;e<4;e++){for(var n=new Array(4),o=new Array(4),i=0;i<4;i++)n[i]=t[i][e],o[i]=128&t[i][e]?t[i][e]<<1^283:t[i][e]<<1;t[0][e]=o[0]^n[1]^o[1]^n[2]^n[3],t[1][e]=n[0]^o[1]^n[2]^o[2]^n[3],t[2][e]=n[0]^n[1]^o[2]^n[3]^o[3],t[3][e]=n[0]^o[0]^n[1]^n[2]^o[3]}return t},addRoundKey:function(t,r,e,n){for(var o=0;o<4;o++)for(var i=0;i<n;i++)t[o][i]^=r[4*e+i][o];return t},subWord:function(t){for(var r=0;r<4;r++)t[r]=Aes.sBox[t[r]];return t},rotWord:function(t){for(var r=t[0],e=0;e<3;e++)t[e]=t[e+1];return t[3]=r,t},sBox:[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],rCon:[[0,0,0,0],[1,0,0,0],[2,0,0,0],[4,0,0,0],[8,0,0,0],[16,0,0,0],[32,0,0,0],[64,0,0,0],[128,0,0,0],[27,0,0,0],[54,0,0,0]]};if(void 0!==r&&r.exports&&(r.exports=Aes),"function"==typeof define&&define.amd&&define([],function(){return Aes}),void 0!==r&&r.exports)Aes=t("./aes");Aes.Ctr={},Aes.Ctr.encrypt=function(t,r,e){if(128!=e&&192!=e&&256!=e)return"";t=String(t).utf8Encode(),r=String(r).utf8Encode();for(var n=e/8,o=new Array(n),i=0;i<n;i++)o[i]=isNaN(r.charCodeAt(i))?0:r.charCodeAt(i);var a=Aes.cipher(o,Aes.keyExpansion(o));a=a.concat(a.slice(0,n-16));var f=new Array(16),u=(new Date).getTime(),s=u%1e3,h=Math.floor(u/1e3),c=Math.floor(65535*Math.random());for(i=0;i<2;i++)f[i]=s>>>8*i&255;for(i=0;i<2;i++)f[i+2]=c>>>8*i&255;for(i=0;i<4;i++)f[i+4]=h>>>8*i&255;var l="";for(i=0;i<8;i++)l+=String.fromCharCode(f[i]);for(var p=Aes.keyExpansion(a),y=Math.ceil(t.length/16),d=new Array(y),g=0;g<y;g++){for(var v=0;v<4;v++)f[15-v]=g>>>8*v&255;for(v=0;v<4;v++)f[15-v-4]=g/4294967296>>>8*v;var w=Aes.cipher(f,p),b=g<y-1?16:(t.length-1)%16+1,m=new Array(b);for(i=0;i<b;i++)m[i]=w[i]^t.charCodeAt(16*g+i),m[i]=String.fromCharCode(m[i]);d[g]=m.join("")}var E=l+d.join("");return E=E.base64Encode()},Aes.Ctr.decrypt=function(t,r,e){if(128!=e&&192!=e&&256!=e)return"";t=String(t).base64Decode(),r=String(r).utf8Encode();for(var n=e/8,o=new Array(n),i=0;i<n;i++)o[i]=isNaN(r.charCodeAt(i))?0:r.charCodeAt(i);var a=Aes.cipher(o,Aes.keyExpansion(o));a=a.concat(a.slice(0,n-16));var f=new Array(8),u=t.slice(0,8);for(i=0;i<8;i++)f[i]=u.charCodeAt(i);for(var s=Aes.keyExpansion(a),h=Math.ceil((t.length-8)/16),c=new Array(h),l=0;l<h;l++)c[l]=t.slice(8+16*l,8+16*l+16);t=c;var p=new Array(t.length);for(l=0;l<h;l++){for(var y=0;y<4;y++)f[15-y]=l>>>8*y&255;for(y=0;y<4;y++)f[15-y-4]=(l+1)/4294967296-1>>>8*y&255;var d=Aes.cipher(f,s),g=new Array(t[l].length);for(i=0;i<t[l].length;i++)g[i]=d[i]^t[l].charCodeAt(i),g[i]=String.fromCharCode(g[i]);p[l]=g.join("")}var v=p.join("");return v=v.utf8Decode()},void 0===String.prototype.utf8Encode&&(String.prototype.utf8Encode=function(){return unescape(encodeURIComponent(this))}),void 0===String.prototype.utf8Decode&&(String.prototype.utf8Decode=function(){try{return decodeURIComponent(escape(this))}catch(t){return this}}),void 0===String.prototype.base64Encode&&(String.prototype.base64Encode=function(){if("undefined"!=typeof btoa)return btoa(this);if(void 0!==n)return new n(this,"utf8").toString("base64");throw new Error("No Base64 Encode")}),void 0===String.prototype.base64Decode&&(String.prototype.base64Decode=function(){if("undefined"!=typeof atob)return atob(this);if(void 0!==n)return new n(this,"base64").toString("utf8");throw new Error("No Base64 Decode")}),void 0!==r&&r.exports&&(r.exports=Aes.Ctr),"function"==typeof define&&define.amd&&define(["Aes"],function(){return Aes.Ctr}),e.default=Aes}).call(this,t("buffer").Buffer)},{"./aes":8,buffer:2}],9:[function(t,r,e){"use strict";var n=a(t("./Notifications")),o=a(t("./TimeUtils")),i=a(t("./RequestCache"));function a(t){return t&&t.__esModule?t:{default:t}}t("./Aes");window.RequestCache=i.default,window.setupTimeUtils=function(t){var r=new o.default;return r.setServerGMToffset(t),r},window.setupNotifications=function(t){var r=new n.default;return r.setBaseUrl(t),r.setTimeUtils(timeUtils),r}},{"./Aes":4,"./Notifications":5,"./RequestCache":6,"./TimeUtils":7}]},{},[9]);
//# sourceMappingURL=common.js.map