diff --git a/app.manifest b/app.manifest index a60c5348..c143dd81 100644 --- a/app.manifest +++ b/app.manifest @@ -1,5 +1,5 @@ CACHE MANIFEST -# Time: Fri Nov 28 2014 15:39:36 GMT+0000 (GMT) +# Time: Sun Nov 30 2014 14:59:35 GMT-0800 (PST) CACHE: diff --git a/css/desktop.css b/css/desktop.css index 808a59b9..e77cf0c9 100644 --- a/css/desktop.css +++ b/css/desktop.css @@ -1089,6 +1089,7 @@ div.im_panel_own_photo { max-width: 1000px; margin: 0 auto; color: rgba(255, 255, 255, 0.6); + position: relative; } .media_modal_title_wrap { @@ -1106,6 +1107,8 @@ div.im_panel_own_photo { .media_modal_info_wrap { line-height: 16px; padding: 24px 20px; + position: absolute; + left: 0; } .media_modal_author { font-size: 13px; @@ -1130,6 +1133,8 @@ a.media_modal_date:hover { } .media_modal_bottom_actions { width: 204px; + position: absolute; + right: 0; } .media_modal_action_btn { float: left; diff --git a/js/app.js b/js/app.js index b738deab..008862f5 100644 --- a/js/app.js +++ b/js/app.js @@ -2,7 +2,7 @@ function BigInteger(e,t,n){null!=e&&("number"==typeof e?this.fromNumber(e,t,n):n }function onCtrlEnter(e,t){$(e).on("keydown",function(e){return 13==e.keyCode&&(e.ctrlKey||e.metaKey)?(t(),cancelEvent(e)):void 0})}function onContentLoaded(e){setTimeout(e,0)}function tsNow(e){var t=+new Date+(window.tsOffset||0);return e?Math.floor(t/1e3):t}function safeReplaceObject(e,t){for(var n in e)t.hasOwnProperty(n)||"$"==n.charAt(0)||delete e[n];for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}function listMergeSorted(e,t){e=e||[],t=t||[];for(var n=angular.copy(e),i=e.length?e[e.length-1]:4294967295,a=0;a/g,">")}function calcImageInBox(e,t,n,i,a){var o=n,r=i;return e/t>n/i?r=parseInt(t*n/e):(o=parseInt(e*i/t),o>n&&(r=parseInt(r*n/o),o=n)),a&&o>=e&&r>=t&&(o=e,r=t),{w:o,h:r}}function bigint(e){return new BigInteger(e.toString(16),16)}function bigStringInt(e){return new BigInteger(e,10)}function dHexDump(e){for(var t=[],n=0;nt;t+=2)a.push(parseInt(e.substr(t,2),16));return a}function bytesToBase64(e){for(var t,n="",i=e.length,a=0,o=0;i>o;o++)t=o%3,a|=e[o]<<(16>>>t&24),(2===t||i-o===1)&&(n+=String.fromCharCode(uint6ToBase64(a>>>18&63),uint6ToBase64(a>>>12&63),uint6ToBase64(a>>>6&63),uint6ToBase64(63&a)),a=0);return n.replace(/A(?=A$|$)/g,"=")}function uint6ToBase64(e){return 26>e?e+65:52>e?e+71:62>e?e-4:62===e?43:63===e?47:65}function base64ToBlob(e,t){for(var n=1024,i=atob(e),a=i.length,o=Math.ceil(a/n),r=new Array(o),s=0;o>s;++s){for(var l=s*n,c=Math.min(l+n,a),d=new Array(c-l),u=l,p=0;c>u;++p,++u)d[p]=i[u].charCodeAt(0);r[s]=new Uint8Array(d)}return blobConstruct(r,t)}function dataUrlToBlob(e){var t=e.split(","),n=t[1],i=t[0].split(":")[1].split(";")[0],a=base64ToBlob(n,i);return a}function blobConstruct(e,t){var n;try{n=new Blob(e,{type:t})}catch(i){var a=new BlobBuilder;angular.forEach(e,function(e){a.append(e)}),n=a.getBlob(t)}return n}function bytesCmp(e,t){var n=e.length;if(n!=t.length)return!1;for(var i=0;n>i;i++)if(e[i]!=t[i])return!1;return!0}function bytesXor(e,t){for(var n=e.length,i=[],a=0;n>a;++a)i[a]=e[a]^t[a];return i}function bytesToWords(e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var t,n=e.length,i=[];for(t=0;n>t;t++)i[t>>>2]|=e[t]<<24-t%4*8;return new CryptoJS.lib.WordArray.init(i,n)}function bytesFromWords(e){for(var t=e.words,n=e.sigBytes,i=[],a=0;n>a;a++)i.push(t[a>>>2]>>>24-a%4*8&255);return i}function bytesFromBigInt(e,t){for(var n=e.toByteArray();!n[0]&&(!t||n.length>t);)n=n.slice(1);return n}function bytesFromLeemonBigInt(e){var t=bigInt2str(e,16);return bytesFromHex(t)}function bytesToArrayBuffer(e){return new Uint8Array(e).buffer}function convertToArrayBuffer(e){return e instanceof ArrayBuffer?e:void 0!==e.buffer&&e.buffer.byteLength==e.length*e.BYTES_PER_ELEMENT?e.buffer:bytesToArrayBuffer(e)}function convertToUint8Array(e){return void 0!==e.buffer?e:new Uint8Array(e)}function convertToByteArray(e){if(Array.isArray(e))return e;e=convertToUint8Array(e);for(var t=[],n=0,i=e.length;i>n;n++)t.push(e[n]);return t}function bytesFromArrayBuffer(e){for(var t=e.byteLength,n=new Uint8Array(e),i=[],a=0;t>a;++a)i[a]=n[a];return i}function bufferConcat(e,t){var n=e.byteLength||e.length,i=t.byteLength||t.length,a=new Uint8Array(n+i);return a.set(e instanceof ArrayBuffer?new Uint8Array(e):e,0),a.set(t instanceof ArrayBuffer?new Uint8Array(t):t,n),a.buffer}function longToInts(e){var t=bigStringInt(e).divideAndRemainder(bigint(4294967296));return[t[0].intValue(),t[1].intValue()]}function longToBytes(e){return bytesFromWords({words:longToInts(e),sigBytes:8}).reverse()}function longFromInts(e,t){return bigint(e).shiftLeft(32).add(bigint(t)).toString(10)}function intToUint(e){return e=parseInt(e),0>e&&(e+=4294967296),e}function uintToInt(e){return e>2147483647&&(e-=4294967296),e}function sha1HashSync(e){this.rushaInstance=this.rushaInstance||new Rusha(1048576);var t=rushaInstance.rawDigest(e).buffer;return t}function sha1BytesSync(e){return bytesFromArrayBuffer(sha1HashSync(e))}function rsaEncrypt(e,t){t=addPadding(t,255);var n=new BigInteger(e.modulus,16),i=new BigInteger(e.exponent,16),a=new BigInteger(t),o=a.modPowInt(i,n),r=bytesFromBigInt(o,256);return r}function addPadding(e,t){t=t||16;var n=e.byteLength||e.length,i=t-n%t;if(i>0&&t>i){var a=new Array(i);(new SecureRandom).nextBytes(a),e=e instanceof ArrayBuffer?bufferConcat(e,a):e.concat(a)}return e}function aesEncryptSync(e,t,n){e.byteLength||e.length;e=addPadding(e);var i=CryptoJS.AES.encrypt(bytesToWords(e),bytesToWords(t),{iv:bytesToWords(n),padding:CryptoJS.pad.NoPadding,mode:CryptoJS.mode.IGE}).ciphertext,a=bytesFromWords(i);return a}function aesDecryptSync(e,t,n){var i=CryptoJS.AES.decrypt({ciphertext:bytesToWords(e)},bytesToWords(t),{iv:bytesToWords(n),padding:CryptoJS.pad.NoPadding,mode:CryptoJS.mode.IGE}),a=bytesFromWords(i);return a}function gzipUncompress(e){var t=new Zlib.Gunzip(e).decompress();return t}function nextRandomInt(e){return Math.floor(Math.random()*e)}function pqPrimeFactorization(e){var t=new BigInteger(e),n=!1;try{n=pqPrimeLeemon(str2bigInt(t.toString(16),16,Math.ceil(64/bpe)+1))}catch(i){console.error("Pq leemon Exception",i)}if(n===!1&&t.bitLength()<=64)try{n=pqPrimeLong(goog.math.Long.fromString(t.toString(16),16))}catch(i){console.error("Pq long Exception",i)}return n===!1&&(n=pqPrimeBigInteger(t)),n}function pqPrimeBigInteger(e){for(var t,n=0,i=0;3>i;i++){for(var a=(15&nextRandomInt(128))+17,o=bigint(nextRandomInt(1e9)+1),r=o.clone(),s=1<l;l++){++n;for(var c=o.clone(),d=o.clone(),u=bigint(a);!d.equals(BigInteger.ZERO);)d.and(BigInteger.ONE).equals(BigInteger.ZERO)||(u=u.add(c),u.compareTo(e)>0&&(u=u.subtract(e))),c=c.add(c),c.compareTo(e)>0&&(c=c.subtract(e)),d=d.shiftRight(1);o=u.clone();var p=o.compareTo(r)<0?r.subtract(o):o.subtract(r);if(t=p.gcd(e),!t.equals(BigInteger.ONE))break;0==(l&l-1)&&(r=o.clone())}if(t.compareTo(BigInteger.ONE)>0)break}var m,h,f=e.divide(t);return t.compareTo(f)>0?(m=f,h=t):(m=t,h=f),[bytesFromBigInt(m),bytesFromBigInt(h),n]}function gcdLong(e,t){for(;e.notEquals(goog.math.Long.ZERO)&&t.notEquals(goog.math.Long.ZERO);){for(;t.and(goog.math.Long.ONE).equals(goog.math.Long.ZERO);)t=t.shiftRight(1);for(;e.and(goog.math.Long.ONE).equals(goog.math.Long.ZERO);)e=e.shiftRight(1);e.compare(t)>0?e=e.subtract(t):t=t.subtract(e)}return t.equals(goog.math.Long.ZERO)?e:t}function pqPrimeLong(e){for(var t,n=0,i=0;3>i;i++){for(var a=goog.math.Long.fromInt((15&nextRandomInt(128))+17),o=goog.math.Long.fromInt(nextRandomInt(1e9)+1),r=o,s=1<l;l++){++n;for(var c=o,d=o,u=a;d.notEquals(goog.math.Long.ZERO);)d.and(goog.math.Long.ONE).notEquals(goog.math.Long.ZERO)&&(u=u.add(c),u.compare(e)>0&&(u=u.subtract(e))),c=c.add(c),c.compare(e)>0&&(c=c.subtract(e)),d=d.shiftRight(1);o=u;var p=o.compare(r)<0?r.subtract(o):o.subtract(r);if(t=gcdLong(p,e),t.notEquals(goog.math.Long.ONE))break;0==(l&l-1)&&(r=o)}if(t.compare(goog.math.Long.ONE)>0)break}var m,h,f=e.div(t);return t.compare(f)>0?(m=f,h=t):(m=t,h=f),[bytesFromHex(m.toString(16)),bytesFromHex(h.toString(16)),n]}function pqPrimeLeemon(e){var t,n,i,a,o,r,s,l=64,c=Math.ceil(l/bpe)+1,d=0,u=new Array(c),p=new Array(c),m=new Array(c),o=new Array(c),h=new Array(c),f=new Array(c),g=new Array(c);for(t=0;3>t;t++){for(n=(15&nextRandomInt(128))+17,copyInt_(f,nextRandomInt(1e9)+1),copy_(g,f),a=1<i;i++){for(++d,copy_(u,f),copy_(p,f),copyInt_(m,n);!isZero(p);)1&p[0]&&(add_(m,u),greater(m,e)&&sub_(m,e)),add_(u,u),greater(u,e)&&sub_(u,e),rightShift_(p,1);if(copy_(f,m),greater(f,g)?(copy_(h,f),sub_(h,g)):(copy_(h,g),sub_(h,f)),eGCD_(h,e,o,u,p),!equalsInt(o,1))break;0==(i&i-1)&©_(g,f)}if(greater(o,one))break}return divide_(e,o,f,g),greater(o,f)?(r=f,s=o):(r=o,s=f),[bytesFromLeemonBigInt(r),bytesFromLeemonBigInt(s),d]}function bytesModPow(e,t,n){try{var i=str2bigInt(bytesToHex(e),16),a=str2bigInt(bytesToHex(t),16),o=str2bigInt(bytesToHex(n),16),r=powMod(i,a,o);return bytesFromHex(bigInt2str(r,16))}catch(s){console.error("mod pow error",s)}return bytesFromBigInt(new BigInteger(e).modPow(new BigInteger(t),new BigInteger(n)))}function TLSerialization(e){return e=e||{},this.maxLength=e.startMaxLength||2048,this.offset=0,this.createBuffer(),this.mtproto=e.mtproto||!1,this}function TLDeserialization(e,t){return t=t||{},this.offset=0,this.override=t.override||{},this.buffer=e,this.intView=new Uint32Array(this.buffer),this.byteView=new Uint8Array(this.buffer),this.mtproto=t.mtproto||!1,this}!function(e){"use strict";for(var t,n,i={},a=function(){},o="memory".split(","),r="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(",");t=o.pop();)e[t]=e[t]||i;for(;n=r.pop();)e[n]=e[n]||a}(this.console=this.console||{}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){var n;if(null==this)throw new TypeError('"this" is null or not defined');var i=Object(this),a=i.length>>>0;if(0===a)return-1;var o=+t||0;if(1/0===Math.abs(o)&&(o=0),o>=a)return-1;for(n=Math.max(o>=0?o:a-Math.abs(o),0);a>n;){if(n in i&&i[n]===e)return n;n++}return-1}),Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),"function"!=typeof Object.create&&(Object.create=function(){var e=function(){};return function(t){if(arguments.length>1)throw Error("Second argument not supported");if("object"!=typeof t)throw TypeError("Argument must be an object");e.prototype=t;var n=new e;return e.prototype=null,n}}()),Function.prototype.bind||(Function.prototype.bind=function(e){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var t=Array.prototype.slice.call(arguments,1),n=this,i=function(){},a=function(){return n.apply(this instanceof i&&e?this:e,t.concat(Array.prototype.slice.call(arguments)))};return i.prototype=this.prototype,a.prototype=new i,a}),function(e){function t(t){i.push(t),e.postMessage(a,"*")}function n(t){if(t.source==e&&t.data==a&&(t.stopPropagation(),i.length>0)){var n=i.shift();n()}}var i=[],a="zero-timeout-message";e.addEventListener("message",n,!0);var o=e.setTimeout;e.setTimeout=function(e,n){return!n||5>=n?t(e):o(e,n)},e.setZeroTimeout=t}(this),!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=e.length,n=at.type(e);return"function"===n||at.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function i(e,t,n){if(at.isFunction(t))return at.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return at.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(pt.test(t))return at.filter(t,e,n);t=at.filter(t,e)}return at.grep(e,function(e){return at.inArray(e,t)>=0!==n})}function a(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function o(e){var t=bt[e]={};return at.each(e.match(vt)||[],function(e,n){t[n]=!0}),t}function r(){ht.addEventListener?(ht.removeEventListener("DOMContentLoaded",s,!1),e.removeEventListener("load",s,!1)):(ht.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(ht.addEventListener||"load"===event.type||"complete"===ht.readyState)&&(r(),at.ready())}function l(e,t,n){if(void 0===n&&1===e.nodeType){var i="data-"+t.replace(St,"-$1").toLowerCase();if(n=e.getAttribute(i),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:Ct.test(n)?at.parseJSON(n):n}catch(a){}at.data(e,t,n)}else n=void 0}return n}function c(e){var t;for(t in e)if(("data"!==t||!at.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function d(e,t,n,i){if(at.acceptData(e)){var a,o,r=at.expando,s=e.nodeType,l=s?at.cache:e,c=s?e[r]:e[r]&&r;if(c&&l[c]&&(i||l[c].data)||void 0!==n||"string"!=typeof t)return c||(c=s?e[r]=K.pop()||at.guid++:r),l[c]||(l[c]=s?{}:{toJSON:at.noop}),("object"==typeof t||"function"==typeof t)&&(i?l[c]=at.extend(l[c],t):l[c].data=at.extend(l[c].data,t)),o=l[c],i||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[at.camelCase(t)]=n),"string"==typeof t?(a=o[t],null==a&&(a=o[at.camelCase(t)])):a=o,a}}function u(e,t,n){if(at.acceptData(e)){var i,a,o=e.nodeType,r=o?at.cache:e,s=o?e[at.expando]:at.expando;if(r[s]){if(t&&(i=n?r[s]:r[s].data)){at.isArray(t)?t=t.concat(at.map(t,at.camelCase)):t in i?t=[t]:(t=at.camelCase(t),t=t in i?[t]:t.split(" ")),a=t.length;for(;a--;)delete i[t[a]];if(n?!c(i):!at.isEmptyObject(i))return}(n||(delete r[s].data,c(r[s])))&&(o?at.cleanData([e],!0):nt.deleteExpando||r!=r.window?delete r[s]:r[s]=null)}}}function p(){return!0}function m(){return!1}function h(){try{return ht.activeElement}catch(e){}}function f(e){var t=Ot.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function g(e,t){var n,i,a=0,o=typeof e.getElementsByTagName!==kt?e.getElementsByTagName(t||"*"):typeof e.querySelectorAll!==kt?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(i=n[a]);a++)!t||at.nodeName(i,t)?o.push(i):at.merge(o,g(i,t));return void 0===t||t&&at.nodeName(e,t)?at.merge([e],o):o}function _(e){Et.test(e.type)&&(e.defaultChecked=e.checked)}function y(e,t){return at.nodeName(e,"table")&&at.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function v(e){return e.type=(null!==at.find.attr(e,"type"))+"/"+e.type,e}function b(e){var t=Gt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function w(e,t){for(var n,i=0;null!=(n=e[i]);i++)at._data(n,"globalEval",!t||at._data(t[i],"globalEval"))}function $(e,t){if(1===t.nodeType&&at.hasData(e)){var n,i,a,o=at._data(e),r=at._data(t,o),s=o.events;if(s){delete r.handle,r.events={};for(n in s)for(i=0,a=s[n].length;a>i;i++)at.event.add(t,n,s[n][i])}r.data&&(r.data=at.extend({},r.data))}}function k(e,t){var n,i,a;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!nt.noCloneEvent&&t[at.expando]){a=at._data(t);for(i in a.events)at.removeEvent(t,i,a.handle);t.removeAttribute(at.expando)}"script"===n&&t.text!==e.text?(v(t).text=e.text,b(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),nt.html5Clone&&e.innerHTML&&!at.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Et.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function C(t,n){var i,a=at(n.createElement(t)).appendTo(n.body),o=e.getDefaultComputedStyle&&(i=e.getDefaultComputedStyle(a[0]))?i.display:at.css(a[0],"display");return a.detach(),o}function S(e){var t=ht,n=Qt[e];return n||(n=C(e,t),"none"!==n&&n||(Jt=(Jt||at("