You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
1.0 MiB
24 lines
1.0 MiB
10 years ago
|
function BigInteger(e,t,n){null!=e&&("number"==typeof e?this.fromNumber(e,t,n):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function nbi(){return new BigInteger(null)}function am1(e,t,n,i,a,o){for(;--o>=0;){var s=t*this[e++]+n[i]+a;a=Math.floor(s/67108864),n[i++]=67108863&s}return a}function am2(e,t,n,i,a,o){for(var s=32767&t,r=t>>15;--o>=0;){var l=32767&this[e],c=this[e++]>>15,d=r*l+c*s;l=s*l+((32767&d)<<15)+n[i]+(1073741823&a),a=(l>>>30)+(d>>>15)+r*c+(a>>>30),n[i++]=1073741823&l}return a}function am3(e,t,n,i,a,o){for(var s=16383&t,r=t>>14;--o>=0;){var l=16383&this[e],c=this[e++]>>14,d=r*l+c*s;l=s*l+((16383&d)<<14)+n[i]+a,a=(l>>28)+(d>>14)+r*c,n[i++]=268435455&l}return a}function int2char(e){return BI_RM.charAt(e)}function intAt(e,t){var n=BI_RC[e.charCodeAt(t)];return null==n?-1:n}function bnpCopyTo(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s}function bnpFromInt(e){this.t=1,this.s=0>e?-1:0,e>0?this[0]=e:-1>e?this[0]=e+this.DV:this.t=0}function nbv(e){var t=nbi();return t.fromInt(e),t}function bnpFromString(e,t,n){var i;if(16==t)i=4;else if(8==t)i=3;else if(256==t)i=8;else if(2==t)i=1;else if(32==t)i=5;else{if(4!=t)return void this.fromRadix(e,t);i=2}this.t=0,this.s=0;for(var a=e.length,o=!1,s=0;--a>=0;){var r=8==i?255&e[a]:intAt(e,a);0>r?"-"==e.charAt(a)&&(o=!0):(o=!1,0==s?this[this.t++]=r:s+i>this.DB?(this[this.t-1]|=(r&(1<<this.DB-s)-1)<<s,this[this.t++]=r>>this.DB-s):this[this.t-1]|=r<<s,s+=i,s>=this.DB&&(s-=this.DB))}8==i&&0!=(128&e[0])&&n&&(this.s=-1,s>0&&(this[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),o&&BigInteger.ZERO.subTo(this,this)}function bnpClamp(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t}function bnToString(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var n,i=(1<<t)-1,a=!1,o="",s=this.t,r=this.DB-s*this.DB%t;if(s-->0)for(r<this.DB&&(n=this[s]>>r)>0&&(a=!0,o=int2char(n));s>=0;)t>r?(n=(this[s]&(1<<r)-1)<<t-r,n|=this[--s]>>(r+=this.DB-t)):(n=this[s]>>(r-=t)&i,0>=r&&(r+=this.DB,--s)),n>0&&(a=!0),a&&(o+=int2char(n));return a?o:"0"}function bnNegate(){var e=nbi();return BigInteger.ZERO.subTo(this,e),e}function bnAbs(){return this.s<0?this.negate():this}function bnCompareTo(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(t=n-e.t,0!=t)return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0}function nbits(e){var t,n=1;return 0!=(t=e>>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),0!=(t=e>>1)&&(e=t,n+=1),n}function bnBitLength(){return this.t<=0?0:this.DB*(this.t-1)+nbits(this[this.t-1]^this.s&this.DM)}function bnpDLShiftTo(e,t){var n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s}function bnpDRShiftTo(e,t){for(var n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s}function bnpLShiftTo(e,t){var n,i=e%this.DB,a=this.DB-i,o=(1<<a)-1,s=Math.floor(e/this.DB),r=this.s<<i&this.DM;for(n=this.t-1;n>=0;--n)t[n+s+1]=this[n]>>a|r,r=(this[n]&o)<<i;for(n=s-1;n>=0;--n)t[n]=0;t[s]=r,t.t=this.t+s+1,t.s=this.s,t.clamp()}function bnpRShiftTo(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)return void(t.t=0);var i=e%this.DB,a=this.DB-i,o=(1<<i)-1;t[0]=this[n]>>i;for(var s=n+1;s<this.t;++s)t[s-n-1]|=(this[s]&o)<<a,t[s-n]=this[s]>>i;i>0&&(t[this.t-n-1]|=(this.s&o)<<a),t.t=this.t-n,t.clamp()}function bnpSubTo(e,t){for(var n=0,i=0,a=Math.min(e.t,this.t);a>n;)i+=this[n]-e[n],t[n++]=i&this.DM,i>>=this.DB;if(e.t<this.t){for(i-=e.s;n<this.t;)i+=this[n],t[n++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;n<e.t;)i-=e[n],t[n++]=i&this.DM,i>>=this.DB;i-=e.s}t.s=0>i?-1:0,-1>i?t[n++]=this.DV+i:i>0&&(t[n++]=i),t.t=n,t.clamp()}function bnpMultiplyTo(e,t){var n=this.abs(),i=e.abs(),a=n.t;for(t.t=a+i.t;--a>=0;)t[a]=0;for(a=0;a<i.t;++a)t[a+n.t]=n.am(0,i[a],t,a,0,n.t);t.s=0,t.clamp(),this.s!=e.s&&BigInteger.ZERO.subTo(t,t)}function bnpSquareTo(e){for(var t=this.abs(),n=e.t=2*t.t;--n>=0;)e[n]=0;for(n=0;n<t.t-1;++n){var i=t.a
|
|||
|
}function onCtrlEnter(e,t){$(e).on("keydown",function(e){return 13==e.keyCode&&(e.ctrlKey||e.metaKey)?(t(),cancelEvent(e)):void 0})}function setFieldSelection(e,t,n){e=$(e)[0];try{if(e.focus(),(void 0===t||t===!1)&&(t=e.value.length),(void 0===n||n===!1)&&(n=t),e.createTextRange){var i=e.createTextRange();i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",t),i.select()}else e.setSelectionRange&&e.setSelectionRange(t,n)}catch(a){}}function getFieldSelection(e){if(e.selectionStart)return e.selectionStart;if(!document.selection)return 0;var t="",n=document.selection.createRange(),i=n.text,a=n.duplicate(),o=0;try{a.moveToElementText(e)}catch(s){return 0}return n.text=i+t,o=a.text.indexOf(t),n.moveStart("character",-1),n.text="",o}function getRichValue(e){if(!e)return"";var t=[],n=[];return getRichElementValue(e,t,n),n.length&&t.push(n.join("")),t.join("\n")}function getRichValueWithCaret(e){if(!e)return[];var t,n,i=[],a=[],o=window.getSelection?window.getSelection():!1;if(o&&o.rangeCount){var s=o.getRangeAt(0);s.startContainer&&s.startContainer==s.endContainer&&s.startOffset==s.endOffset&&(t=s.startContainer,n=s.startOffset)}getRichElementValue(e,i,a,t,n),a.length&&i.push(a.join(""));var r=i.join("\n"),l=r.indexOf("");return-1!=l&&(r=r.substr(0,l)+r.substr(l+1)),[r,l]}function getRichElementValue(e,t,n,i,a){if(3!=e.nodeType){if(1==e.nodeType){var o,s="DIV"==e.tagName||"P"==e.tagName;s&&n.length||"BR"==e.tagName?(t.push(n.join("")),n.splice(0,n.length)):"IMG"==e.tagName&&e.alt&&n.push(e.alt),i===e&&n.push("");for(var o=e.firstChild;o;)getRichElementValue(o,t,n,i,a),o=o.nextSibling;s&&n.length&&(t.push(n.join("")),n.splice(0,n.length))}}else if(i===e){var r=e.nodeValue;n.push(r.substr(0,a)+""+r.substr(a))}else n.push(e.nodeValue)}function setRichFocus(e,t){if(e.focus(),window.getSelection&&document.createRange){var n=document.createRange();t?n.selectNode(t):n.selectNodeContents(e),n.collapse(!1);var i=window.getSelection();i.removeAllRanges(),i.addRange(n)}else if(void 0!==document.body.createTextRange){var a=document.body.createTextRange();a.moveToElementText(t||e),a.collapse(!1),a.select()}}function onContentLoaded(e){setZeroTimeout(e)}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<t.length;a++)t[a]<i&&n.push(t[a]);return n}function listUniqSorted(e){e=e||[];for(var t=[],n=!1,i=0;i<e.length;i++)e[i]!==n&&t.push(e[i]),n=e[i];return t}function templateUrl(e){var t={confirm_modal:"desktop",error_modal:"desktop",media_modal_layout:"desktop",slider:"desktop",reply_message:"desktop",chat_invite_link_modal:"desktop"},n=t[e]||(Config.Mobile?"mobile":"desktop");return"partials/"+n+"/"+e+".html"}function encodeEntities(e){return e.replace(/&/g,"&").replace(/([^\#-~| |!])/g,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}function calcImageInBox(e,t,n,i,a){var o=n,s=i;return e/t>n/i?s=parseInt(t*n/e):(o=parseInt(e*i/t),o>n&&(s=parseInt(s*n/o),o=n)),a&&o>=e&&s>=t&&(o=e,s=t),{w:o,h:s}}function versionCompare(e,t){"string"!=typeof e&&(e=""),"string"!=typeof t&&(t=""),e=e.replace(/^\s+|\s+$/g,"").split("."),t=t.replace(/^\s+|\s+$/g,"").split(".");var n,i=Math.max(e.length,t.length);for(n=0;i>n;n++)if(e[n]!=t[n])return e[n]>t[n]?1:-1;return 0}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;n<e.length;n++)!n||n%2||t.push(n%16?n%4?" ":" ":"\n"),t.push((e[n]<16?"0":"")+e[n].toString(16));console.log(t.join(""))}function bytesToHex(e){e=e||[];for(var t=[],n=0;n<e.length;n++)t.push((e[n]<16?"0":"")+(e[n]||0).toString(16));return t.join("")}function bytesFromHex(e){var t,n=e.length,i=0,a=[];for(e.length%2&&(a.push(parseInt(e.charAt(0),16)),i++),t=i;n>t;t+=2)a.push(parseInt(e.substr(t,2),16));re
|
|||
|
}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),i=e.length;i--;)$.attrHandle[n[i]]=t}function s(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||K)-(~e.sourceIndex||K);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function r(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return i(function(t){return t=+t,i(function(n,i){for(var a,o=e([],n.length,t),s=o.length;s--;)n[a=o[s]]&&(n[a]=!(i[a]=n[a]))})})}function d(e){return e&&typeof e.getElementsByTagName!==G&&e}function u(){}function p(e){for(var t=0,n=e.length,i="";n>t;t++)i+=e[t].value;return i}function m(e,t,n){var i=t.dir,a=n&&"parentNode"===i,o=j++;return t.first?function(t,n,o){for(;t=t[i];)if(1===t.nodeType||a)return e(t,n,o)}:function(t,n,s){var r,l,c=[q,o];if(s){for(;t=t[i];)if((1===t.nodeType||a)&&e(t,n,s))return!0}else for(;t=t[i];)if(1===t.nodeType||a){if(l=t[B]||(t[B]={}),(r=l[i])&&r[0]===q&&r[1]===o)return c[2]=r[2];if(l[i]=c,c[2]=e(t,n,s))return!0}}}function h(e){return e.length>1?function(t,n,i){for(var a=e.length;a--;)if(!e[a](t,n,i))return!1;return!0}:e[0]}function g(e,n,i){for(var a=0,o=n.length;o>a;a++)t(e,n[a],i);return i}function f(e,t,n,i,a){for(var o,s=[],r=0,l=e.length,c=null!=t;l>r;r++)(o=e[r])&&(!n||n(o,i,a))&&(s.push(o),c&&t.push(r));return s}function _(e,t,n,a,o,s){return a&&!a[B]&&(a=_(a)),o&&!o[B]&&(o=_(o,s)),i(function(i,s,r,l){var c,d,u,p=[],m=[],h=s.length,_=i||g(t||"*",r.nodeType?[r]:r,[]),v=!e||!i&&t?_:f(_,p,e,r,l),y=n?o||(i?e:h||a)?[]:s:v;if(n&&n(v,y,r,l),a)for(c=f(y,m),a(c,[],r,l),d=c.length;d--;)(u=c[d])&&(y[m[d]]=!(v[m[d]]=u));if(i){if(o||e){if(o){for(c=[],d=y.length;d--;)(u=y[d])&&c.push(v[d]=u);o(null,y=[],c,l)}for(d=y.length;d--;)(u=y[d])&&(c=o?tt.call(i,u):p[d])>-1&&(i[c]=!(s[c]=u))}}else y=f(y===s?y.splice(h,y.length):y),o?o(null,s,y,l):Q.apply(s,y)})}function v(e){for(var t,n,i,a=e.length,o=$.relative[e[0].type],s=o||$.relative[" "],r=o?1:0,l=m(function(e){return e===t},s,!0),c=m(function(e){return tt.call(t,e)>-1},s,!0),d=[function(e,n,i){return!o&&(i||n!==x)||((t=n).nodeType?l(e,n,i):c(e,n,i))}];a>r;r++)if(n=$.relative[e[r].type])d=[m(h(d),n)];else{if(n=$.filter[e[r].type].apply(null,e[r].matches),n[B]){for(i=++r;a>i&&!$.relative[e[i].type];i++);return _(r>1&&h(d),r>1&&p(e.slice(0,r-1).concat({value:" "===e[r-2].type?"*":""})).replace(lt,"$1"),n,i>r&&v(e.slice(r,i)),a>i&&v(e=e.slice(i)),a>i&&p(e))}d.push(n)}return h(d)}function y(e,n){var a=n.length>0,o=e.length>0,s=function(i,s,r,l,c){var d,u,p,m=0,h="0",g=i&&[],_=[],v=x,y=i||o&&$.find.TAG("*",c),b=q+=null==v?1:Math.random()||.1,w=y.length;for(c&&(x=s!==D&&s);h!==w&&null!=(d=y[h]);h++){if(o&&d){for(u=0;p=e[u++];)if(p(d,s,r)){l.push(d);break}c&&(q=b)}a&&((d=!p&&d)&&m--,i&&g.push(d))}if(m+=h,a&&h!==m){for(u=0;p=n[u++];)p(g,_,s,r);if(i){if(m>0)for(;h--;)g[h]||_[h]||(_[h]=X.call(l));_=f(_)}Q.apply(l,_),c&&!i&&_.length>0&&m+n.length>1&&t.uniqueSort(l)}return c&&(q=b,x=v),g};return a?i(s):s}var b,w,$,k,S,C,M,A,x,E,T,I,D,P,N,U,O,L,R,B="sizzle"+-new Date,F=e.document,q=0,j=0,H=n(),z=n(),V=n(),W=function(e,t){return e===t&&(T=!0),0},G="undefined",K=1<<31,Y={}.hasOwnProperty,Z=[],X=Z.pop,J=Z.push,Q=Z.push,et=Z.slice,tt=Z.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},nt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",it="[\\x20\\t\\r\\n\\f]",at="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ot=at.replace("w","w#"),st="\\["+it+"*("+at+")(?:"+it+"*([*^$|!~]?=)"+it+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ot+"))|)"+it+"*\\]",rt=":("+at+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+st+")*)|.*)\\)|)",lt=new RegExp("^"+it+"+|((?:^|[^\\\\])(?:\\\\.)*)"+it+"+$","g"),ct=new RegExp("^"+it+"*,"+it+"*"),dt=new RegExp("^"+it+"*([>+~]|"+it+")"+it+"*"),ut=new RegE
|
|||
|
}for(u=0;(r=p[u++])&&!t.isPropagationStopped();)t.type=u>1?l:c.bindType||m,o=(at._data(r,"events")||{})[t.type]&&at._data(r,"handle"),o&&o.apply(r,n),o=s&&r[s],o&&o.apply&&at.acceptData(r)&&(t.result=o.apply(r,n),t.result===!1&&t.preventDefault());if(t.type=m,!a&&!t.isDefaultPrevented()&&(!c._default||c._default.apply(p.pop(),n)===!1)&&at.acceptData(i)&&s&&i[m]&&!at.isWindow(i)){d=i[s],d&&(i[s]=null),at.event.triggered=m;try{i[m]()}catch(g){}at.event.triggered=void 0,d&&(i[s]=d)}return t.result}},dispatch:function(e){e=at.event.fix(e);var t,n,i,a,o,s=[],r=Y.call(arguments),l=(at._data(this,"events")||{})[e.type]||[],c=at.event.special[e.type]||{};if(r[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){for(s=at.event.handlers.call(this,e,l),t=0;(a=s[t++])&&!e.isPropagationStopped();)for(e.currentTarget=a.elem,o=0;(i=a.handlers[o++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,n=((at.event.special[i.origType]||{}).handle||i.handler).apply(a.elem,r),void 0!==n&&(e.result=n)===!1&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,i,a,o,s=[],r=t.delegateCount,l=e.target;if(r&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(a=[],o=0;r>o;o++)i=t[o],n=i.selector+" ",void 0===a[n]&&(a[n]=i.needsContext?at(n,this).index(l)>=0:at.find(n,this,null,[l]).length),a[n]&&a.push(i);a.length&&s.push({elem:l,handlers:a})}return r<t.length&&s.push({elem:this,handlers:t.slice(r)}),s},fix:function(e){if(e[at.expando])return e;var t,n,i,a=e.type,o=e,s=this.fixHooks[a];for(s||(this.fixHooks[a]=s=Pt.test(a)?this.mouseHooks:Dt.test(a)?this.keyHooks:{}),i=s.props?this.props.concat(s.props):this.props,e=new at.Event(o),t=i.length;t--;)n=i[t],e[n]=o[n];return e.target||(e.target=o.srcElement||ht),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,i,a,o=t.button,s=t.fromElement;return null==e.pageX&&null!=t.clientX&&(i=e.target.ownerDocument||ht,a=i.documentElement,n=i.body,e.pageX=t.clientX+(a&&a.scrollLeft||n&&n.scrollLeft||0)-(a&&a.clientLeft||n&&n.clientLeft||0),e.pageY=t.clientY+(a&&a.scrollTop||n&&n.scrollTop||0)-(a&&a.clientTop||n&&n.clientTop||0)),!e.relatedTarget&&s&&(e.relatedTarget=s===e.target?t.toElement:s),e.which||void 0===o||(e.which=1&o?1:2&o?3:4&o?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==h()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===h()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return at.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(e){return at.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,i){var a=at.extend(new at.Event,n,{type:e,isSimulated:!0,originalEvent:{}});i?at.event.trigger(a,null,t):at.event.dispatch.call(t,a),a.isDefaultPrevented()&&n.preventDefault()}},at.removeEvent=ht.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var i="on"+t;e.detachEvent&&(typeof e[i]===kt&&(e[i]=null),e.detachEvent(i,n))},at.Event=function(e,t){return this instanceof at.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValu
|
|||
|
});if(c)for(t=(e||"").match(yt)||[];l>r;r++)if(n=this[r],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Tn," "):"")){for(o=0;a=t[o++];)for(;i.indexOf(" "+a+" ")>=0;)i=i.replace(" "+a+" "," ");s=e?at.trim(i):"",n.className!==s&&(n.className=s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):this.each(at.isFunction(e)?function(n){at(this).toggleClass(e.call(this,n,this.className,t),t)}:function(){if("string"===n)for(var t,i=0,a=at(this),o=e.match(yt)||[];t=o[i++];)a.hasClass(t)?a.removeClass(t):a.addClass(t);else(n===kt||"boolean"===n)&&(this.className&&at._data(this,"__className__",this.className),this.className=this.className||e===!1?"":at._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,i=this.length;i>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(Tn," ").indexOf(t)>=0)return!0;return!1}}),at.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){at.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),at.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var In=at.now(),Dn=/\?/,Pn=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;at.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var n,i=null,a=at.trim(t+"");return a&&!at.trim(a.replace(Pn,function(e,t,a,o){return n&&t&&(i=0),0===i?e:(n=a||t,i+=!o-!a,"")}))?Function("return "+a)():at.error("Invalid JSON: "+t)},at.parseXML=function(t){var n,i;if(!t||"string"!=typeof t)return null;try{e.DOMParser?(i=new DOMParser,n=i.parseFromString(t,"text/xml")):(n=new ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(t))}catch(a){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||at.error("Invalid XML: "+t),n};var Nn,Un,On=/#.*$/,Ln=/([?&])_=[^&]*/,Rn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Bn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Fn=/^(?:GET|HEAD)$/,qn=/^\/\//,jn=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hn={},zn={},Vn="*/".concat("*");try{Un=location.href}catch(Wn){Un=ht.createElement("a"),Un.href="",Un=Un.href}Nn=jn.exec(Un.toLowerCase())||[],at.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Un,type:"GET",isLocal:Bn.test(Nn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Vn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":at.parseJSON,"text xml":at.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?q(q(e,at.ajaxSettings),t):q(at.ajaxSettings,e)},ajaxPrefilter:B(Hn),ajaxTransport:B(zn),ajax:function(e,t){function n(e,t,n,i){var a,d,_,v,b,$=t;2!==y&&(y=2,r&&clearTimeout(r),c=void 0,s=i||"",w.readyState=e>0?4:0,a=e>=200&&300>e||304===e,n&&(v=j(u,w,n)),v=H(u,v,w,a),a?(u.ifModified&&(b=w.getResponseHeader("Last-Modified"),b&&(at.lastModified[o]=b),b=w.getResponseHeader("etag"),b&&(at.etag[o]=b)),204===e||"HEAD"===u.type?$="nocontent":304===e?$="notmodified":($=v.state,d=v.data,_=v.error,a=!_)):(_=$,(e||!$)&&($="error",0>e&&(e=0))),w.status=e,w.statusText=(t||$)+"",a?h.resolveWith(p,[d,$,w]):h.rejectWith(p,[w,$,_]),w.statusCode(f),f=void 0,l&&m.trigger(a?"ajaxSuccess":"ajaxError",[w,u,a?d:_]),g.fireWith(p,[w,$]),l&&(m.trigger("ajaxComplete",[w,u]),--at.active|
|
|||
|
}function n(){l=!0}function i(){return l?(l=!1,""):r}function a(){var e,t,n,a=Array.prototype.slice.call(arguments),o=a.pop(),s=[],r=1==a.length,l=!0,p=i();for(t=0;t<a.length;t++)if(n=a[t]=p+a[t],"xt_"!=n.substr(0,3)&&void 0!==c[n])s.push(c[n]);else if(u){try{e=localStorage.getItem(n)}catch(m){u=!1}try{e=void 0===e||null===e?!1:JSON.parse(e)}catch(m){e=!1}s.push(c[n]=e)}else d?l=!1:s.push(c[n]=!1);return l?o(r?s[0]:s):void chrome.storage.local.get(a,function(e){var i;for(s=[],t=0;t<a.length;t++)n=a[t],i=e[n],i=void 0===i||null===i?!1:JSON.parse(i),s.push(c[n]=i);o(r?s[0]:s)})}function o(e,t){var n,a,o={},s=i();for(n in e)if(e.hasOwnProperty(n))if(a=e[n],n=s+n,c[n]=a,a=JSON.stringify(a),u)try{localStorage.setItem(n,a)}catch(r){u=!1}else o[n]=a;return u||!d?void(t&&t()):void chrome.storage.local.set(o,t)}function s(){var e,t,n,a=Array.prototype.slice.call(arguments),o=i();for("function"==typeof a[a.length-1]&&(n=a.pop()),e=0;e<a.length;e++)if(t=a[e]=o+a[e],delete c[t],u)try{localStorage.removeItem(t)}catch(s){u=!1}d?chrome.storage.local.remove(a,n):n&&n()}var r="",l=!1,c={},d=!!(e.chrome&&chrome.storage&&chrome.storage.local),u=!d&&!!e.localStorage;e.ConfigStorage={prefix:t,noPrefix:n,get:a,set:o,remove:s}}(this),function(){try{window==window.top||window.chrome&&chrome.app&&chrome.app.window?document.documentElement.style.display="block":top.location=self.location}catch(e){console.error("CJ protection",e)}if(window.safeConfirm=function(e,t){"string"==typeof e&&(e={message:e});var n=!1;try{n=confirm(e.message)}catch(i){n=!0}setTimeout(function(){t(n)},10)},window.applicationCache&&!Config.Modes.packed&&window.addEventListener){var t=window.applicationCache,n=!1,i=!1,a=function(e){clearTimeout(i),i=setTimeout(function(){try{t.update()}catch(e){console.log("appCache.update: "+e)}},e||3e5)},o=function(){t.addEventListener("updateready",function(){t.status==t.UPDATEREADY&&(n||(safeConfirm({type:"WEBOGRAM_UPDATED_RELOAD",message:"A new version of Webogram is downloaded. Launch it?"},function(e){e?window.location.reload():n=!0}),a()))},!1),t.addEventListener("noupdate",function(){a()},!1),t.addEventListener("error",function(){a()},!1)};a(3e3),window.addEventListener("load",o)}}(),function(){var e=[Config.Navigator.osX?"osx":"non_osx",Config.Navigator.retina?"is_2x":"is_1x"];Config.Modes.ios_standalone&&e.push("ios_standalone"),$(document.body).addClass(e.join(" ")),ConfigStorage.get("layout_selected","i18n_locale",function(e){var t=e[0],n=e[1],i="en-us",a={dom:!1,i18n_ng:!1,i18n_messages:!1,i18n_fallback:!1},o=function(){var e,t=!0;for(e in a)if(a.hasOwnProperty(e)&&a[e]===!1){t=!1;break}t&&(a.boot=!1,angular.bootstrap(document,["myApp"]))};switch(t){case"mobile":Config.Mobile=!0;break;case"desktop":Config.Mobile=!1;break;default:var s=$(window).width();Config.Mobile=Config.Navigator.mobile||s>10&&480>s}$("head").append('<link rel="stylesheet" href="css/'+(Config.Mobile?"mobile.css":"desktop.css")+'" />'),n||(n=(navigator.language||"").toLowerCase(),n=Config.I18n.aliases[n]||n);for(var r=0;r<Config.I18n.supported.length;r++)if(Config.I18n.supported[r]==n){Config.I18n.locale=n;break}a.i18n_ng=Config.I18n.locale==i,$.getJSON("js/locales/"+Config.I18n.locale+".json").success(function(e){Config.I18n.messages=e,a.i18n_messages=!0,Config.I18n.locale==i&&(a.i18n_fallback=!0),o()}),Config.I18n.locale!=i&&$.getJSON("js/locales/"+i+".json").success(function(e){Config.I18n.fallback_messages=e,a.i18n_fallback=!0,o()}),$(document).ready(function(){a.dom=!0,a.i18n_ng?o():$("<script>").appendTo("body").on("load",function(){a.i18n_ng=!0,o()}).attr("src","vendor/angular/i18n/angular-locale_"+Config.I18n.locale+".js")})})}(),function(e,t,n){"use strict";var i,a,o,s,r,l,c,d,u,p,m,h,g,f,_,v,y,b,w,$,k,S,C,M,A,x,E,T,I,D,P;C={paneClass:"nano-pane",sliderClass:"nano-slider",contentClass:"nano-content",iOSNativeScrolling:!1,preventPageScrolling:!1,disableResize:!1,alwaysVisible:!1,flashDelay:1500,sliderMinHeight:20,sliderMaxHeight:null,documentContext:null,windowContext:null},b="scrollbar",y="scroll",u="mousedown",p="mouseenter",m="mousemove",g="mousewh
|
|||
|
}function o(){var e=r.yOffset;if(k(e))e=e();else if(I(e)){var n=e[0],i=t.getComputedStyle(n);e="fixed"!==i.position?0:n.getBoundingClientRect().bottom}else w(e)||(e=0);return e}function s(e){if(e){e.scrollIntoView();var n=o();if(n){var i=e.getBoundingClientRect().top;t.scrollBy(0,i-n)}}else t.scrollTo(0,0)}function r(){var e,t=n.hash();t?(e=l.getElementById(t))?s(e):(e=a(l.getElementsByName(t)))?s(e):"top"===t&&s(null):s(null)}var l=t.document;return e&&i.$watch(function(){return n.hash()},function(e,t){(e!==t||""!==e)&&Dt(function(){i.$evalAsync(r)})}),r}]}function jt(){this.$get=["$$rAF","$timeout",function(e,t){return e.supported?function(t){return e(t)}:function(e){return t(e,0,!1)}}]}function Ht(e,t,i,a){function s(e){try{e.apply(null,B(arguments,1))}finally{if($--,0===$)for(;k.length;)try{k.pop()()}catch(t){i.error(t)}}}function r(e,t){!function n(){o(C,function(e){e()}),S=t(n,e)}()}function l(){c(),d()}function c(){M=e.history.state,M=_(M)?null:M,L(M,P)&&(M=P),P=M}function d(){(x!==p.url()||A!==M)&&(x=p.url(),A=M,o(I,function(e){e(p.url(),M)}))}function u(e){try{return decodeURIComponent(e)}catch(t){return e}}var p=this,m=t[0],g=e.location,f=e.history,v=e.setTimeout,y=e.clearTimeout,w={};p.isMock=!1;var $=0,k=[];p.$$completeOutstandingRequest=s,p.$$incOutstandingRequestCount=function(){$++},p.notifyWhenNoOutstandingRequests=function(e){o(C,function(e){e()}),0===$?e():k.push(e)};var S,C=[];p.addPollFn=function(e){return _(S)&&r(100,v),C.push(e),e};var M,A,x=g.href,E=t.find("base"),T=null;c(),A=M,p.url=function(t,n,i){if(_(i)&&(i=null),g!==e.location&&(g=e.location),f!==e.history&&(f=e.history),t){var o=A===i;if(x===t&&(!a.history||o))return;var s=x&&_n(x)===_n(t);return x=t,A=i,!a.history||s&&o?(s||(T=t),n?g.replace(t):g.href=t):(f[n?"replaceState":"pushState"](i,"",t),c(),A=M),p}return T||g.href.replace(/%27/g,"'")},p.state=function(){return M};var I=[],D=!1,P=null;p.onUrlChange=function(t){return D||(a.history&&Vi(e).on("popstate",l),Vi(e).on("hashchange",l),D=!0),I.push(t),t},p.$$checkUrlChange=d,p.baseHref=function(){var e=E.attr("href");return e?e.replace(/^(https?\:)?\/\/[^\/]*/,""):""};var N={},U="",O=p.baseHref();p.cookies=function(e,t){var a,o,s,r,l;if(!e){if(m.cookie!==U)for(U=m.cookie,o=U.split("; "),N={},r=0;r<o.length;r++)s=o[r],l=s.indexOf("="),l>0&&(e=u(s.substring(0,l)),N[e]===n&&(N[e]=u(s.substring(l+1))));return N}t===n?m.cookie=encodeURIComponent(e)+"=;path="+O+";expires=Thu, 01 Jan 1970 00:00:00 GMT":b(t)&&(a=(m.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+";path="+O).length+1,a>4096&&i.warn("Cookie '"+e+"' possibly not set or overflowed because it was too large ("+a+" > 4096 bytes)!"))},p.defer=function(e,t){var n;return $++,n=v(function(){delete w[n],s(e)},t||0),w[n]=!0,n},p.defer.cancel=function(e){return w[e]?(delete w[e],y(e),s(h),!0):!1}}function zt(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,i){return new Ht(e,i,t,n)}]}function Vt(){this.$get=function(){function e(e,n){function a(e){e!=p&&(m?m==e&&(m=e.n):m=e,o(e.n,e.p),o(e,p),p=e,p.n=null)}function o(e,t){e!=t&&(e&&(e.p=t),t&&(t.n=e))}if(e in t)throw i("$cacheFactory")("iid","CacheId '{0}' is already taken!",e);var s=0,r=u({},n,{id:e}),l={},c=n&&n.capacity||Number.MAX_VALUE,d={},p=null,m=null;return t[e]={put:function(e,t){if(c<Number.MAX_VALUE){var n=d[e]||(d[e]={key:e});a(n)}if(!_(t))return e in l||s++,l[e]=t,s>c&&this.remove(m.key),t},get:function(e){if(c<Number.MAX_VALUE){var t=d[e];if(!t)return;a(t)}return l[e]},remove:function(e){if(c<Number.MAX_VALUE){var t=d[e];if(!t)return;t==p&&(p=t.p),t==m&&(m=t.n),o(t.n,t.p),delete d[e]}delete l[e],s--},removeAll:function(){l={},s=0,d={},p=m=null},destroy:function(){l=null,r=null,d=null,delete t[e]},info:function(){return u({},r,{size:s})}}}var t={};return e.info=function(){var e={};return o(t,function(t,n){e[n]=t.info()}),e},e.get=function(e){return t[e]},e}}function Wt(){this.$get=["$cacheFactory",function(e){return e("templates")}]}function Gt(e,i){function a(e,t){var n=/^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/,i={};return o(e,function(e,a){var o=e.match(n);if
|
|||
|
}}),c.absUrl()!=m&&a.url(c.absUrl(),!0);var g=!0;return a.onUrlChange(function(e,t){i.$evalAsync(function(){var n=c.absUrl(),a=c.$$state;c.$$parse(e),c.$$state=t,i.$broadcast("$locationChangeStart",e,n,t,a).defaultPrevented?(c.$$parse(n),c.$$state=a,r(n,!1,a)):(g=!1,l(n,a))}),i.$$phase||i.$digest()}),i.$watch(function(){var e=a.url(),t=a.state(),n=c.$$replace,s=e!==c.absUrl()||c.$$html5&&o.history&&t!==c.$$state;(g||s)&&(g=!1,i.$evalAsync(function(){i.$broadcast("$locationChangeStart",c.absUrl(),e,c.$$state,t).defaultPrevented?(c.$$parse(e),c.$$state=t):(s&&r(c.absUrl(),n,t===c.$$state?null:c.$$state),l(e,t))})),c.$$replace=!1}),c}]}function Mn(){var e=!0,t=this;this.debugEnabled=function(t){return v(t)?(e=t,this):e},this.$get=["$window",function(n){function i(e){return e instanceof Error&&(e.stack?e=e.message&&-1===e.stack.indexOf(e.message)?"Error: "+e.message+"\n"+e.stack:e.stack:e.sourceURL&&(e=e.message+"\n"+e.sourceURL+":"+e.line)),e}function a(e){var t=n.console||{},a=t[e]||t.log||h,s=!1;try{s=!!a.apply}catch(r){}return s?function(){var e=[];return o(arguments,function(t){e.push(i(t))}),a.apply(t,e)}:function(e,t){a(e,null==t?"":t)}}return{log:a("log"),info:a("info"),warn:a("warn"),error:a("error"),debug:function(){var n=a("debug");return function(){e&&n.apply(t,arguments)}}()}}]}function An(e,t){if("__defineGetter__"===e||"__defineSetter__"===e||"__lookupGetter__"===e||"__lookupSetter__"===e||"__proto__"===e)throw Xa("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",t);return e}function xn(e,t){if(e){if(e.constructor===e)throw Xa("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e.window===e)throw Xa("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",t);if(e.children&&(e.nodeName||e.prop&&e.attr&&e.find))throw Xa("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",t);if(e===Object)throw Xa("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",t)}return e}function En(e,t){if(e){if(e.constructor===e)throw Xa("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e===Ja||e===Qa||e===eo)throw Xa("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",t)}}function Tn(e){return e.constant}function In(e,t,n,i){xn(e,i);for(var a,o=t.split("."),s=0;o.length>1;s++){a=An(o.shift(),i);var r=xn(e[a],i);r||(r={},e[a]=r),e=r}return a=An(o.shift(),i),xn(e[a],i),e[a]=n,n}function Dn(e){return"constructor"==e}function Pn(e,t,i,a,o,s,r){An(e,s),An(t,s),An(i,s),An(a,s),An(o,s);var l=function(e){return xn(e,s)},c=r||Dn(e)?l:g,d=r||Dn(t)?l:g,u=r||Dn(i)?l:g,p=r||Dn(a)?l:g,m=r||Dn(o)?l:g;return function(s,r){var l=r&&r.hasOwnProperty(e)?r:s;return null==l?l:(l=c(l[e]),t?null==l?n:(l=d(l[t]),i?null==l?n:(l=u(l[i]),a?null==l?n:(l=p(l[a]),o?null==l?n:l=m(l[o]):l):l):l):l)}}function Nn(e,t){return function(n,i){return e(n,i,xn,t)}}function Un(e,t,i){var a=t.expensiveChecks,s=a?ro:so,r=s[e];if(r)return r;var l=e.split("."),c=l.length;if(t.csp)r=6>c?Pn(l[0],l[1],l[2],l[3],l[4],i,a):function(e,t){var o,s=0;do o=Pn(l[s++],l[s++],l[s++],l[s++],l[s++],i,a)(e,t),t=n,e=o;while(c>s);return o};else{var d="";a&&(d+="s = eso(s, fe);\nl = eso(l, fe);\n");var u=a;o(l,function(e,t){An(e,i);var n=(t?"s":'((l&&l.hasOwnProperty("'+e+'"))?l:s)')+"."+e;(a||Dn(e))&&(n="eso("+n+", fe)",u=!0),d+="if(s == null) return undefined;\ns="+n+";\n"}),d+="return s;";var p=new Function("s","l","eso","fe",d);p.toString=f(d),u&&(p=Nn(p,i)),r=p}return r.sharedGetter=!0,r.assign=function(t,n){return In(t,e,n,e)},s[e]=r,r}function On(e){return k(e.valueOf)?e.valueOf():lo.call(e)}function Ln(){var e=lt(),t=lt();this.$get=["$filter","$sniffer",function(n,i){function a(e){var t=e;return e.sharedGetter&&(t=function(t,n){return e(t,n)},t.literal=e.literal,t.constant=e.constant,t.assign=e.assign),t}function s(e,t){for(var n=0,i=e.length;i>n;n++){var a=e[n];a.constant||(a.inputs?s(a.inputs,t):-1===t.indexOf(a)&&t.push(
|
|||
|
},i.$observe("min",function(e){v(e)&&!w(e)&&(e=parseFloat(e,10)),r=w(e)&&!isNaN(e)?e:n,a.$validate()})}if(i.max||i.ngMax){var l;a.$validators.max=function(e){return a.$isEmpty(e)||_(l)||l>=e},i.$observe("max",function(e){v(e)&&!w(e)&&(e=parseFloat(e,10)),l=w(e)&&!isNaN(e)?e:n,a.$validate()})}}function Ei(e,t,n,i,a,o){ki(e,t,n,i,a,o),wi(i),i.$$parserName="url",i.$validators.url=function(e){return i.$isEmpty(e)||xo.test(e)}}function Ti(e,t,n,i,a,o){ki(e,t,n,i,a,o),wi(i),i.$$parserName="email",i.$validators.email=function(e){return i.$isEmpty(e)||Eo.test(e)}}function Ii(e,t,n,i){_(n.name)&&t.attr("name",c());var a=function(e){t[0].checked&&i.$setViewValue(n.value,e&&e.type)};t.on("click",a),i.$render=function(){var e=n.value;t[0].checked=e==i.$viewValue},n.$observe("value",i.$render)}function Di(e,t,n,a,o){var s;if(v(a)){if(s=e(a),!s.constant)throw i("ngModel")("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,a);return s(t)}return o}function Pi(e,t,n,i,a,o,s,r){var l=Di(r,e,"ngTrueValue",n.ngTrueValue,!0),c=Di(r,e,"ngFalseValue",n.ngFalseValue,!1),d=function(e){i.$setViewValue(t[0].checked,e&&e.type)};t.on("click",d),i.$render=function(){t[0].checked=i.$viewValue},i.$isEmpty=function(e){return e!==l},i.$formatters.push(function(e){return L(e,l)}),i.$parsers.push(function(e){return e?l:c})}function Ni(e){function t(e,t,l){t===n?i("$pending",e,l):a("$pending",e,l),E(t)?t?(u(r.$error,e,l),d(r.$$success,e,l)):(d(r.$error,e,l),u(r.$$success,e,l)):(u(r.$error,e,l),u(r.$$success,e,l)),r.$pending?(o(Wo,!0),r.$valid=r.$invalid=n,s("",null)):(o(Wo,!1),r.$valid=Ui(r.$error),r.$invalid=!r.$valid,s("",r.$valid));var c;c=r.$pending&&r.$pending[e]?n:r.$error[e]?!1:r.$$success[e]?!0:null,s(e,c),p.$setValidity(e,c,r)}function i(e,t,n){r[e]||(r[e]={}),d(r[e],t,n)}function a(e,t,i){r[e]&&u(r[e],t,i),Ui(r[e])&&(r[e]=n)}function o(e,t){t&&!c[e]?(m.addClass(l,e),c[e]=!0):!t&&c[e]&&(m.removeClass(l,e),c[e]=!1)}function s(e,t){e=e?"-"+tt(e,"-"):"",o(Fo+e,t===!0),o(qo+e,t===!1)}var r=e.ctrl,l=e.$element,c={},d=e.set,u=e.unset,p=e.parentForm,m=e.$animate;c[qo]=!(c[Fo]=l.hasClass(Fo)),r.$setValidity=t}function Ui(e){if(e)for(var t in e)return!1;return!0}function Oi(e,t){return e="ngClass"+e,["$animate",function(n){function i(e,t){var n=[];e:for(var i=0;i<e.length;i++){for(var a=e[i],o=0;o<t.length;o++)if(a==t[o])continue e;n.push(a)}return n}function a(e){if(na(e))return e;if(b(e))return e.split(" ");if(y(e)){var t=[];return o(e,function(e,n){e&&(t=t.concat(n.split(" ")))}),t}return e}return{restrict:"AC",link:function(s,r,l){function c(e){var t=u(e,1);l.$addClass(t)}function d(e){var t=u(e,-1);l.$removeClass(t)}function u(e,t){var n=r.data("$classCounts")||{},i=[];return o(e,function(e){(t>0||n[e])&&(n[e]=(n[e]||0)+t,n[e]===+(t>0)&&i.push(e))}),r.data("$classCounts",n),i.join(" ")}function p(e,t){var a=i(t,e),o=i(e,t);a=u(a,1),o=u(o,-1),a&&a.length&&n.addClass(r,a),o&&o.length&&n.removeClass(r,o)}function m(e){if(t===!0||s.$index%2===t){var n=a(e||[]);if(h){if(!L(e,h)){var i=a(h);p(i,n)}}else c(n)}h=O(e)}var h;s.$watch(l[e],m,!0),l.$observe("class",function(){m(s.$eval(l[e]))}),"ngClass"!==e&&s.$watch("$index",function(n,i){var o=1&n;if(o!==(1&i)){var r=a(s.$eval(l[e]));o===t?c(r):d(r)}})}}}]}var Li=/^\/(.+)\/([a-z]*)$/,Ri="validity",Bi=function(e){return b(e)?e.toLowerCase():e},Fi=Object.prototype.hasOwnProperty,qi=function(e){return b(e)?e.toUpperCase():e},ji=function(e){return b(e)?e.replace(/[A-Z]/g,function(e){return String.fromCharCode(32|e.charCodeAt(0))}):e},Hi=function(e){return b(e)?e.replace(/[a-z]/g,function(e){return String.fromCharCode(-33&e.charCodeAt(0))}):e};"i"!=="I".toLowerCase()&&(Bi=ji,qi=Hi);var zi,Vi,Wi,Gi,Ki=[].slice,Yi=[].splice,Zi=[].push,Xi=Object.prototype.toString,Ji=i("ng"),Qi=e.angular||(e.angular={}),ea=0;zi=t.documentMode,h.$inject=[],g.$inject=[];var ta,na=Array.isArray,ia=function(e){return b(e)?e.trim():e},aa=function(e){return e.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},oa=function(){if(v(oa.isActive_))return oa.isActive_;var e=!(!t.querySelector("[ng-csp]")&
|
|||
|
a.$$setOptions(i[2]&&i[2].$options),o.$addControl(a),n.$observe("name",function(e){a.$name!==e&&o.$$renameControl(a,e)}),e.$on("$destroy",function(){o.$removeControl(a)})},post:function(e,t,n,i){var a=i[0];a.$options&&a.$options.updateOn&&t.on(a.$options.updateOn,function(e){a.$$debounceViewValueCommit(e&&e.type)}),t.on("blur",function(){a.$touched||e.$apply(function(){a.$setTouched()})})}}}}},Yo=f({restrict:"A",require:"ngModel",link:function(e,t,n,i){i.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}}),Zo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,i){i&&(n.required=!0,i.$validators.required=function(e){return!n.required||!i.$isEmpty(e)},n.$observe("required",function(){i.$validate()}))}}},Xo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,a,o){if(o){var s,r=a.ngPattern||a.pattern;a.$observe("pattern",function(e){if(b(e)&&e.length>0&&(e=new RegExp(e)),e&&!e.test)throw i("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",r,e,z(t));s=e||n,o.$validate()}),o.$validators.pattern=function(e){return o.$isEmpty(e)||_(s)||s.test(e)}}}}},Jo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,i){if(i){var a=0;n.$observe("maxlength",function(e){a=p(e)||0,i.$validate()}),i.$validators.maxlength=function(e,t){return i.$isEmpty(e)||t.length<=a}}}}},Qo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,i){if(i){var a=0;n.$observe("minlength",function(e){a=p(e)||0,i.$validate()}),i.$validators.minlength=function(e,t){return i.$isEmpty(e)||t.length>=a}}}}},es=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(e,t,i,a){var s=t.attr(i.$attr.ngList)||", ",r="false"!==i.ngTrim,l=r?ia(s):s,c=function(e){if(!_(e)){var t=[];return e&&o(e.split(l),function(e){e&&t.push(r?ia(e):e)}),t}};a.$parsers.push(c),a.$formatters.push(function(e){return na(e)?e.join(s):n}),a.$isEmpty=function(e){return!e||!e.length}}}},ts=/^(true|false|\d+)$/,ns=function(){return{restrict:"A",priority:100,compile:function(e,t){return ts.test(t.ngValue)?function(e,t,n){n.$set("value",e.$eval(n.ngValue))}:function(e,t,n){e.$watch(n.ngValue,function(e){n.$set("value",e)})}}}},is=function(){return{restrict:"A",controller:["$scope","$attrs",function(e,t){var i=this;this.$options=e.$eval(t.ngModelOptions),this.$options.updateOn!==n?(this.$options.updateOnDefault=!1,this.$options.updateOn=ia(this.$options.updateOn.replace(Oo,function(){return i.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},as=["$compile",function(e){return{restrict:"AC",compile:function(t){return e.$$addBindingClass(t),function(t,i,a){e.$$addBindingInfo(i,a.ngBind),i=i[0],t.$watch(a.ngBind,function(e){i.textContent=e===n?"":e})}}}}],os=["$interpolate","$compile",function(e,t){return{compile:function(i){return t.$$addBindingClass(i),function(i,a,o){var s=e(a.attr(o.$attr.ngBindTemplate));t.$$addBindingInfo(a,s.expressions),a=a[0],o.$observe("ngBindTemplate",function(e){a.textContent=e===n?"":e})}}}}],ss=["$sce","$parse","$compile",function(e,t,n){return{restrict:"A",compile:function(i,a){var o=t(a.ngBindHtml),s=t(a.ngBindHtml,function(e){return(e||"").toString()});return n.$$addBindingClass(i),function(t,i,a){n.$$addBindingInfo(i,a.ngBindHtml),t.$watch(s,function(){i.html(e.getTrustedHtml(o(t))||"")})}}}}],rs=Oi("",!0),ls=Oi("Odd",0),cs=Oi("Even",1),ds=vi({compile:function(e,t){t.$set("ngCloak",n),e.removeClass("ng-cloak")}}),us=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],ps={},ms={blur:!0,focus:!0};o("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(e){var t=Kt("ng-"+e);ps[t]=["$parse","$rootScope",function(n,i){return{restrict:"A",compile:function(a,o){var s=n(o[t],null,!0);return function(t,n){n.on(e,function(n){var a=function(){s(t,{$event:n})};ms[e]&&i.$$phase?t.$evalAsync(a):t.$apply(a)})}}}}]});var hs=["$animate",function(e){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,rest
|
|||
|
return e=p(e)?e:e.split(/\s+/),d(e,function(e,i){e&&e.length>0&&(n+=(i>0?" ":"")+e+t)}),n}var E,T,I,D,P="";e.ontransitionend===n&&e.onwebkittransitionend!==n?(P="-webkit-",E="WebkitTransition",T="webkitTransitionEnd transitionend"):(E="transition",T="transitionend"),e.onanimationend===n&&e.onwebkitanimationend!==n?(P="-webkit-",I="WebkitAnimation",D="webkitAnimationEnd animationend"):(I="animation",D="animationend");var N,U="Duration",O="Property",L="Delay",R="IterationCount",B="PlayState",F="$$ngAnimateKey",q="$$ngAnimateCSS3Data",j=3,H=1.5,z=1e3,V={},W=0,G=[],K=null,Y=0,Z=[];return{animate:function(e,t,n,i,a,o){return o=o||{},o.from=n,o.to=i,M("animate",e,t,a,o)},enter:function(e,t,n){return n=n||{},M("enter",e,"ng-enter",t,n)},leave:function(e,t,n){return n=n||{},M("leave",e,"ng-leave",t,n)},move:function(e,t,n){return n=n||{},M("move",e,"ng-move",t,n)},beforeSetClass:function(e,t,n,i,a){a=a||{};var o=x(n,"-remove")+" "+x(t,"-add"),s=S("setClass",e,o,a.from);return s?(u(e,i),s):(l(),void i())},beforeAddClass:function(e,t,n,i){i=i||{};var a=S("addClass",e,x(t,"-add"),i.from);return a?(u(e,n),a):(l(),void n())},beforeRemoveClass:function(e,t,n,i){i=i||{};var a=S("removeClass",e,x(t,"-remove"),i.from);return a?(u(e,n),a):(l(),void n())},setClass:function(e,t,n,i,a){a=a||{},n=x(n,"-remove"),t=x(t,"-add");var o=n+" "+t;return C("setClass",e,o,i,a.to)},addClass:function(e,t,n,i){return i=i||{},C("addClass",e,x(t,"-add"),n,i.to)},removeClass:function(e,t,n,i){return i=i||{},C("removeClass",e,x(t,"-remove"),n,i.to)}}}])}])}(window,window.angular),function(e,t){"use strict";function n(){this.$get=["$$sanitizeUri",function(e){return function(t){var n=[];return o(t,l(n,function(t,n){return!/^unsafe/.test(e(t,n))})),n.join("")}}]}function i(e){var n=[],i=l(n,t.noop);return i.chars(e),n.join("")}function a(e){var t,n={},i=e.split(",");for(t=0;t<i.length;t++)n[i[t]]=!0;return n}function o(e,n){function i(e,i,o,r){if(i=t.lowercase(i),S[i])for(;y.last()&&C[y.last()];)a("",y.last());k[i]&&y.last()==i&&a("",i),r=b[i]||!!r,r||y.push(i);var l={};o.replace(p,function(e,t,n,i,a){var o=n||i||a||"";l[t]=s(o)}),n.start&&n.start(i,l,r)}function a(e,i){var a,o=0;if(i=t.lowercase(i))for(o=y.length-1;o>=0&&y[o]!=i;o--);if(o>=0){for(a=y.length-1;a>=o;a--)n.end&&n.end(y[a]);y.length=o}}"string"!=typeof e&&(e=null===e||"undefined"==typeof e?"":""+e);var o,r,l,v,y=[],w=e;for(y.last=function(){return y[y.length-1]};e;){if(v="",r=!0,y.last()&&A[y.last()]?(e=e.replace(new RegExp("(.*)<\\s*\\/\\s*"+y.last()+"[^>]*>","i"),function(e,t){return t=t.replace(g,"$1").replace(_,"$1"),n.chars&&n.chars(s(t)),""}),a("",y.last())):(0===e.indexOf("<!--")?(o=e.indexOf("--",4),o>=0&&e.lastIndexOf("-->",o)===o&&(n.comment&&n.comment(e.substring(4,o)),e=e.substring(o+3),r=!1)):f.test(e)?(l=e.match(f),l&&(e=e.replace(l[0],""),r=!1)):h.test(e)?(l=e.match(u),l&&(e=e.substring(l[0].length),l[0].replace(u,a),r=!1)):m.test(e)&&(l=e.match(d),l?(l[4]&&(e=e.substring(l[0].length),l[0].replace(d,i)),r=!1):(v+="<",e=e.substring(1))),r&&(o=e.indexOf("<"),v+=0>o?e:e.substring(0,o),e=0>o?"":e.substring(o),n.chars&&n.chars(s(v)))),e==w)throw c("badparse","The sanitizer was unable to parse the following block of html: {0}",e);w=e}a()}function s(e){if(!e)return"";var t=N.exec(e),n=t[1],i=t[3],a=t[2];return a&&(P.innerHTML=a.replace(/</g,"<"),a="textContent"in P?P.textContent:P.innerText),n+a+i}function r(e){return e.replace(/&/g,"&").replace(v,function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1);return"&#"+(1024*(t-55296)+(n-56320)+65536)+";"}).replace(y,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}function l(e,n){var i=!1,a=t.bind(e,e.push);return{start:function(e,o,s){e=t.lowercase(e),!i&&A[e]&&(i=e),i||x[e]!==!0||(a("<"),a(e),t.forEach(o,function(i,o){var s=t.lowercase(o),l="img"===e&&"src"===s||"background"===s;D[s]!==!0||E[s]===!0&&!n(i,l)||(a(" "),a(o),a('="'),a(r(i)),a('"'))}),a(s?"/>":">"))},end:function(e){e=t.lowercase(e),i||x[e]!==!0||(a("</"),a(e),a(">")),e==i&&(i=!1)},chars:function(e){i||a(r(e))}}}var c=t.$$minErr("$sanitize
|
|||
|
Classic.prototype.convert=cConvert,Classic.prototype.revert=cRevert,Classic.prototype.reduce=cReduce,Classic.prototype.mulTo=cMulTo,Classic.prototype.sqrTo=cSqrTo,Montgomery.prototype.convert=montConvert,Montgomery.prototype.revert=montRevert,Montgomery.prototype.reduce=montReduce,Montgomery.prototype.mulTo=montMulTo,Montgomery.prototype.sqrTo=montSqrTo,BigInteger.prototype.copyTo=bnpCopyTo,BigInteger.prototype.fromInt=bnpFromInt,BigInteger.prototype.fromString=bnpFromString,BigInteger.prototype.clamp=bnpClamp,BigInteger.prototype.dlShiftTo=bnpDLShiftTo,BigInteger.prototype.drShiftTo=bnpDRShiftTo,BigInteger.prototype.lShiftTo=bnpLShiftTo,BigInteger.prototype.rShiftTo=bnpRShiftTo,BigInteger.prototype.subTo=bnpSubTo,BigInteger.prototype.multiplyTo=bnpMultiplyTo,BigInteger.prototype.squareTo=bnpSquareTo,BigInteger.prototype.divRemTo=bnpDivRemTo,BigInteger.prototype.invDigit=bnpInvDigit,BigInteger.prototype.isEven=bnpIsEven,BigInteger.prototype.exp=bnpExp,BigInteger.prototype.toString=bnToString,BigInteger.prototype.negate=bnNegate,BigInteger.prototype.abs=bnAbs,BigInteger.prototype.compareTo=bnCompareTo,BigInteger.prototype.bitLength=bnBitLength,BigInteger.prototype.mod=bnMod,BigInteger.prototype.modPowInt=bnModPowInt,BigInteger.ZERO=nbv(0),BigInteger.ONE=nbv(1),NullExp.prototype.convert=nNop,NullExp.prototype.revert=nNop,NullExp.prototype.mulTo=nMulTo,NullExp.prototype.sqrTo=nSqrTo,Barrett.prototype.convert=barrettConvert,Barrett.prototype.revert=barrettRevert,Barrett.prototype.reduce=barrettReduce,Barrett.prototype.mulTo=barrettMulTo,Barrett.prototype.sqrTo=barrettSqrTo;var lowprimes=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],lplim=(1<<26)/lowprimes[lowprimes.length-1];BigInteger.prototype.chunkSize=bnpChunkSize,BigInteger.prototype.toRadix=bnpToRadix,BigInteger.prototype.fromRadix=bnpFromRadix,BigInteger.prototype.fromNumber=bnpFromNumber,BigInteger.prototype.bitwiseTo=bnpBitwiseTo,BigInteger.prototype.changeBit=bnpChangeBit,BigInteger.prototype.addTo=bnpAddTo,BigInteger.prototype.dMultiply=bnpDMultiply,BigInteger.prototype.dAddOffset=bnpDAddOffset,BigInteger.prototype.multiplyLowerTo=bnpMultiplyLowerTo,BigInteger.prototype.multiplyUpperTo=bnpMultiplyUpperTo,BigInteger.prototype.modInt=bnpModInt,BigInteger.prototype.millerRabin=bnpMillerRabin,BigInteger.prototype.clone=bnClone,BigInteger.prototype.intValue=bnIntValue,BigInteger.prototype.byteValue=bnByteValue,BigInteger.prototype.shortValue=bnShortValue,BigInteger.prototype.signum=bnSigNum,BigInteger.prototype.toByteArray=bnToByteArray,BigInteger.prototype.equals=bnEquals,BigInteger.prototype.min=bnMin,BigInteger.prototype.max=bnMax,BigInteger.prototype.and=bnAnd,BigInteger.prototype.or=bnOr,BigInteger.prototype.xor=bnXor,BigInteger.prototype.andNot=bnAndNot,BigInteger.prototype.not=bnNot,BigInteger.prototype.shiftLeft=bnShiftLeft,BigInteger.prototype.shiftRight=bnShiftRight,BigInteger.prototype.getLowestSetBit=bnGetLowestSetBit,BigInteger.prototype.bitCount=bnBitCount,BigInteger.prototype.testBit=bnTestBit,BigInteger.prototype.setBit=bnSetBit,BigInteger.prototype.clearBit=bnClearBit,BigInteger.prototype.flipBit=bnFlipBit,BigInteger.prototype.add=bnAdd,BigInteger.prototype.subtract=bnSubtract,BigInteger.prototype.multiply=bnMultiply,BigInteger.prototype.divide=bnDivide,BigInteger.prototype.remainder=bnRemainder,BigInteger.prototype.divideAndRemainder=bnDivideAndRemainder,BigInteger.prototype.modPow=bnModPow,BigInteger.prototype.modInverse=bnModInverse,BigInteger.prototype.pow=bnP
|
|||
|
default:e(Error("unknown compression method: "+a.p))}if(a.h=_[v++],g=_[v++]|_[v++]<<8|_[v++]<<16|_[v++]<<24,a.H=new Date(1e3*g),a.N=_[v++],a.M=_[v++],0<(4&a.h)&&(a.I=_[v++]|_[v++]<<8,v+=a.I),0<(8&a.h)){for(h=[],m=0;0<(u=_[v++]);)h[m++]=String.fromCharCode(u);a.name=h.join("")}if(0<(16&a.h)){for(h=[],m=0;0<(u=_[v++]);)h[m++]=String.fromCharCode(u);a.J=h.join("")}0<(2&a.h)&&(a.B=65535&n(_,0,v),a.B!==(_[v++]|_[v++]<<8)&&e(Error("invalid header crc16"))),s=_[_.length-4]|_[_.length-3]<<8|_[_.length-2]<<16|_[_.length-1]<<24,_.length-v-4-4<512*s&&(c=s),r=new o(_,{index:v,bufferSize:c}),a.data=l=r.g(),v=r.c,a.K=f=(_[v++]|_[v++]<<8|_[v++]<<16|_[v++]<<24)>>>0,n(l,d,d)!==f&&e(Error("invalid CRC-32 checksum: 0x"+n(l,d,d).toString(16)+" / 0x"+f.toString(16))),a.L=s=(_[v++]|_[v++]<<8|_[v++]<<16|_[v++]<<24)>>>0,(4294967295&l.length)!==s&&e(Error("invalid input size: "+(4294967295&l.length)+" / "+s)),this.m.push(a),this.c=v}this.s=!0;var y,b,w,$=this.m,k=0,S=0;for(y=0,b=$.length;b>y;++y)S+=$[y].data.length;if(p)for(w=new Uint8Array(S),y=0;b>y;++y)w.set($[y].data,k),k+=$[y].data.length;else{for(w=[],y=0;b>y;++y)w[y]=$[y].data;w=Array.prototype.concat.apply([],w)}return w},t("Zlib.Gunzip",c),t("Zlib.Gunzip.prototype.decompress",c.prototype.g),t("Zlib.Gunzip.prototype.getMembers",c.prototype.F)}.call(this),this.goog={provide:function(){},math:{}},goog.provide("goog.math.Long"),goog.math.Long=function(e,t){this.low_=0|e,this.high_=0|t},goog.math.Long.IntCache_={},goog.math.Long.fromInt=function(e){if(e>=-128&&128>e){var t=goog.math.Long.IntCache_[e];if(t)return t}var n=new goog.math.Long(0|e,0>e?-1:0);return e>=-128&&128>e&&(goog.math.Long.IntCache_[e]=n),n},goog.math.Long.fromNumber=function(e){return isNaN(e)||!isFinite(e)?goog.math.Long.ZERO:e<=-goog.math.Long.TWO_PWR_63_DBL_?goog.math.Long.MIN_VALUE:e+1>=goog.math.Long.TWO_PWR_63_DBL_?goog.math.Long.MAX_VALUE:0>e?goog.math.Long.fromNumber(-e).negate():new goog.math.Long(e%goog.math.Long.TWO_PWR_32_DBL_|0,e/goog.math.Long.TWO_PWR_32_DBL_|0)},goog.math.Long.fromBits=function(e,t){return new goog.math.Long(e,t)},goog.math.Long.fromString=function(e,t){if(0==e.length)throw Error("number format error: empty string");var n=t||10;if(2>n||n>36)throw Error("radix out of range: "+n);if("-"==e.charAt(0))return goog.math.Long.fromString(e.substring(1),n).negate();if(e.indexOf("-")>=0)throw Error('number format error: interior "-" character: '+e);for(var i=goog.math.Long.fromNumber(Math.pow(n,8)),a=goog.math.Long.ZERO,o=0;o<e.length;o+=8){var s=Math.min(8,e.length-o),r=parseInt(e.substring(o,o+s),n);if(8>s){var l=goog.math.Long.fromNumber(Math.pow(n,s));a=a.multiply(l).add(goog.math.Long.fromNumber(r))}else a=a.multiply(i),a=a.add(goog.math.Long.fromNumber(r))}return a},goog.math.Long.TWO_PWR_16_DBL_=65536,goog.math.Long.TWO_PWR_24_DBL_=1<<24,goog.math.Long.TWO_PWR_32_DBL_=goog.math.Long.TWO_PWR_16_DBL_*goog.math.Long.TWO_PWR_16_DBL_,goog.math.Long.TWO_PWR_31_DBL_=goog.math.Long.TWO_PWR_32_DBL_/2,goog.math.Long.TWO_PWR_48_DBL_=goog.math.Long.TWO_PWR_32_DBL_*goog.math.Long.TWO_PWR_16_DBL_,goog.math.Long.TWO_PWR_64_DBL_=goog.math.Long.TWO_PWR_32_DBL_*goog.math.Long.TWO_PWR_32_DBL_,goog.math.Long.TWO_PWR_63_DBL_=goog.math.Long.TWO_PWR_64_DBL_/2,goog.math.Long.ZERO=goog.math.Long.fromInt(0),goog.math.Long.ONE=goog.math.Long.fromInt(1),goog.math.Long.NEG_ONE=goog.math.Long.fromInt(-1),goog.math.Long.MAX_VALUE=goog.math.Long.fromBits(-1,2147483647),goog.math.Long.MIN_VALUE=goog.math.Long.fromBits(0,-2147483648),goog.math.Long.TWO_PWR_24_=goog.math.Long.fromInt(1<<24),goog.math.Long.prototype.toInt=function(){return this.low_},goog.math.Long.prototype.toNumber=function(){return this.high_*goog.math.Long.TWO_PWR_32_DBL_+this.getLowBitsUnsigned()},goog.math.Long.prototype.toString=function(e){var t=e||10;if(2>t||t>36)throw Error("radix out of range: "+t);if(this.isZero())return"0";if(this.isNegative()){if(this.equals(goog.math.Long.MIN_VALUE)){var n=goog.math.Long.fromNumber(t),i=this.div(n),a=i.multiply(n).subtract(this);return i.toString(t)+a.toInt().toString(t)}return"-"+this.negate().toString(t)}for(var
|
|||
|
}function Bt(e,t,n,i,a){for(n=t+n;n>t;){var o=e[t++];i[a++]=o>>16&255,i[a++]=o>>8&255,i[a++]=o>>0&255,i[a++]=o>>24&255}}function Ft(e,t,n,i,a){for(n=t+n;n>t;){var o=e[t++];i[a++]=o>>16&240|o>>12&15,i[a++]=o>>0&240|o>>28&15}}function qt(e,t,n,i,a){for(n=t+n;n>t;){var o=e[t++];i[a++]=o>>24&255,i[a++]=o>>16&255,i[a++]=o>>8&255,i[a++]=o>>0&255}}function jt(e,t,n,i){return E(e,8)!=_i?0:(t[0]=E(e,vi)+1,n[0]=E(e,vi)+1,i[0]=E(e,1),E(e,yi),1)}function Ht(e,t){var n=h;return 4>e?e+1:(n=e-2>>1,(2+(1&e)<<n)+E(t,n)+1)}function zt(e,t){if(t.Q+8>t.ya){var n=e.Y,i=0;for(u(n!=m);0!=n[i].s;){var a=n,o=t,s=o.T>>o.g&1;o.L?o.fa=1:(++o.g,8<=o.g&&A(o),o.Q==o.ya&&32==o.g&&(o.L=1)),i=i+a[i].s+s}return n[i].kc}for(n=e.Y,i=0,u(n!=m);0!=n[i].s;)a=n,o=t.T>>t.g&1,++t.g,i=i+a[i].s+o;return n[i].kc}function Vt(e,t){if(e!=m)for(var n=h,i=h,n=0;t>n;++n)for(var a=e[n].va,i=0;$i>i;++i)D(a[i])}function Wt(e,t,n){return t=0==e.eb?0:e.ac[e.bd+e.Ec*(n>>e.eb)+(t>>e.eb)],u(t<e.hc),e.Db[+t]}function Gt(n,i,a,o){var s=n.Na,r=n.O,l=r+i,c=a,d=o;for(o=n.Xa,a=n.vb,t(o,a,c,d,n.l*i);0<s--;){i=n.nc[s];var p=r,g=l,f=c,v=d,d=o,c=a;switch(u(g>p),u(g<=i.Vb),i.Qc){case Ii:for(f=0,i=c+(g-p)*i.U;i>c;){var g=d,v=c,y=g[v]>>8&255,b=(16711935&g[v])>>>0,b=b+(y<<16|y),b=16711935&b;d[c++]=((4278255360&g[v])>>>0|b)>>>0,32==p&&f++}break;case Ei:var w=i,$=p,f=g,v=d,y=c,b=w.U;if(0==$){var k=h;for(Dt(v,y,ki),k=1;b>k;++k)Dt(v,y+k,v[y+k-1]);y+=b,++$}for(var S=(1<<w.n)-1,C=St(b,w.n),M=w.u,w=+($>>w.n)*C;f>$;){var A=M,x=w,E=m;for(Dt(v,y,v[y-b+0]),E=Io[A[x++]>>8&15],k=1;b>k;++k){var T=_;0==(k&S)&&(E=Io[A[x++]>>8&15]),T=E(v[y+k-1],v,y+k-b),Dt(v,y+k,T)}y+=b,++$,0==($&S)&&(w+=C)}g!=i.Vb&&(i=i.U,t(d,c-i,d,c+(g-p-1)*i,i));break;case Ti:for(f=i.U,v=(1<<i.n)-1,y=St(f,i.n),b=i.u,i=+(p>>i.n)*y;g>p;){for(k=b,$=i,S=e(Do),C=h,C=0;f>C;++C)0==(C&v)&&(M=k[$++],w=S,w.Cc=M>>0&255,w.Bc=M>>8&255,w.Kc=M>>16&255),M=d[c+C],w=M>>>8,A=M>>>16,x=M,A+=Lt(S.Cc,w),A&=255,x+=Lt(S.Bc,w),x+=Lt(S.Kc,A),x&=255,d[c+C]=(4278255360&M|A<<16|x)>>>0;c+=f,++p,0==(p&v)&&(i+=y)}break;case Di:f==d&&0<i.n?(f=(g-p)*St(i.U,i.n),v=c+(g-p)*i.U-f,memmove(d,v,d,c,f),Rt(i,p,g,d,v,d,c)):Rt(i,p,g,f,v,d,c)}c=o,d=a}}function Kt(e,t){var n=e.V,i=e.Ha+e.l*e.O,a=t-e.O;if(!(0>=a)){Gt(e,a,n,i);var o=e.N,n=e.Xa,s=[e.vb],i=e.O,a=t,r=s,l=o.width;if(u(a>i),u(o.t<o.Ka),a>o.K&&(a=o.K),i<o.k){var c=o.k-i,i=o.k;r[0]+=l*c}if(i>=a?i=0:(r[0]+=o.t,o.w=i-o.k,o.m=o.Ka-o.t,o.h=a-i,i=1),i){if(s=s[0],i=e.Ib,a=o.width,i.J<Yn){var d=i.c.RGBA,r=d.ma,p=d.Sa+e.xa*d.f;if(o.I)n=EmitRescaledRows(e,n,s,a,o.h,r,p,d.f);else{for(var l=i.J,c=o.m,o=o.h,d=d.f,m=o;0<m--;){var h=n,g=s,f=c,_=r,v=p;switch(l){case Rn:for(f=g+f;f>g;){var y=h[g++];_[v++]=y>>16&255,_[v++]=y>>8&255,_[v++]=y>>0&255}break;case Bn:Bt(h,g,f,_,v);break;case Vn:Bt(h,g,f,_,v),WebPApplyAlphaMultiply(_,0,f,1,0);break;case Fn:for(f=g+f;f>g;)y=h[g++],_[v++]=y>>0&255,_[v++]=y>>8&255,_[v++]=y>>16&255;break;case qn:qt(h,g,f,_,v);break;case Wn:qt(h,g,f,_,v),WebPApplyAlphaMultiply(_,0,f,1,0);break;case jn:qt(h,g,f,_,v);break;case Gn:qt(h,g,f,_,v),WebPApplyAlphaMultiply(_,1,f,1,0);break;case Hn:Ft(h,g,f,_,v);break;case Kn:Ft(h,g,f,_,v),WebPApplyAlphaMultiply4444(_,f,1,0);break;case zn:for(f=g+f;f>g;)y=h[g++],_[v++]=y>>16&248|y>>13&7,_[v++]=y>>5&224|y>>3&31;break;default:u(0)}s+=a,p+=d}n=o}e.xa+=n}else e.xa=o.I?EmitRescaledRowsYUVA(e,n,s,a,o.h):EmitRowsYUVA(e,n,s,a,o.m,o.h);u(e.xa<=i.height)}e.O=t,u(e.O<=e.v)}}function Yt(e,t,n,i,a,o){var s=1,r=0,l=0,c=e.o,d=e.cb,p=d.Db,g=n,f=n;n+=i*a,a=Mi+Ai;var _=a+d.xb,v=0<d.xb?d.Yb:m,y=d.Dc,b=!1;u(p!=m);e:for(;!c.L&&n>g;){var w=h;if(b||(0==(r&y)&&(p=Wt(d,r,l)),x(c),w=zt(p.va[Ro],c)),Mi>w||b){if(!b){var $=s=b=h,k=h;x(c),b=zt(p.va[Bo],c),s=w,x(c),$=zt(p.va[Fo],c),x(c),k=zt(p.va[qo],c),t[g]=(k<<24>>>0)+(b<<16)+(s<<8)+$}if(b=!1,++g,++r,r>=i&&(r=0,++l,o!=m&&0==l%Po&&o(e,l),v!=m))for(;g>f;)s=t[f++],v.ea[Ki*s>>>v.bb]=s}else if(a>w){for($=$=h,s=Ht(w-Mi,c),w=zt(p.va[jo],c),x(c),$=Ht(w,c),$>Wo?$-=Wo:(w=Go[$-1],w=(w>>4)*i+(8-(15&w)),$=w>=1?w:1),w=h,w=0;s>w;++w)t[g+w]=t[g+w-$];for(g+=s,r+=s;r>=i;)r-=i,++l,o!=m&&0==l%Po&&o(e,l);if(n>g&&(p=Wt(d,r,l),v!=m))for(;g>f;)s=t[f++],v.ea[Ki*s>>>v.bb]=s}else if(_>w
|
|||
|
this.WebPGetDecoderVersion=this.Ld=function(){return 512};var $o=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],ko=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],So=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],Co=d([ca,da],"");l(4,g);var Mo=[[0,0,0,0],[1,0,0,0],[0,1,0,0],[1,1,0,0],[0,0,1,0],[1,0,1,0],[0,1,1,0],[1,1,1,0],[0,0,0,1],[1,0,0,1],[0,1,0,1],[1,1,0,1],[0,0,1,1],[1,0,1,1],[0,1,1,1],[1,1,1,1]],Ao=134480385,xo=16,Eo=-227,To=482,Io=[Ot,function(e){return e},function(e,t,n){return t[n+0]},function(e,t,n){return t[n+1]},function(e,t,n){return t[n-1]},function(e,t,n){return Pt(Pt(e,t[n+1]),t[n+0])},function(e,t,n){return Pt(e,t[n-1])},function(e,t,n){return Pt(e,t[n+0])},function(e,t,n){return Pt(t[n-1],t[n+0])},function(e,t,n){return Pt(t[n+0],t[n+1])},function(e,t,n){return Pt(Pt(e,t[n-1]),Pt(t[n+0],t[n+1]))},function(e,t,n){return 0>=Math.abs((e>>24&255)-(t[n-1]>>24&255))-Math.abs((t[n+0]>>24&255)-(t[n-1]>>24&255))+(Math.abs((e>>16&255)-(t[n-1]>>16&255))-Math.abs((t[n+0]>>16&255)-(t[n-1]>>16&255)))+(Math.abs((e>>8&255)-(t[n-1]>>8&255))-Math.abs((t[n+0]>>8&255)-(t[n-1]>>8&255)))+(Math.abs((255&e)-(255&t[n-1]))-Math.abs((255&t[n+0])-(255&t[n-1])))?t[n+0]:e},function(e,t,n){return(Nt((e>>24&255)+(t[n+0]>>24&255)-(t[n-1]>>24&255))<<24|Nt((e>>16&255)+(t[n+0]>>16&255)-(t[n-1]>>16&255))<<16|Nt((e>>8&255)+(t[n+0]>>8&255)-(t[n-1]>>8&255))<<8|Nt((255&e)+(255&t[n+0])-(255&t[n-1])))>>>0},function(e,t,n){var i=t[n-1];return e=Pt(e,t[n+0]),(Ut(e>>24&255,i>>24&255)<<24|Ut(e>>16&255,i>>16&255)<<16|Ut(e>>8&255,i>>8&255)<<8|Ut(e>>0&255,i>>0&255))>>>0},Ot,Ot],Do={Cc:g,Bc:g,Kc:g},Po=16,No=16,Uo=16,Oo=[2,3,7],Lo=[3,3,11],Ro=0,Bo=1,Fo=2,qo=3,jo=4,Ho=[Mi+Ai,Mi,Mi,Mi,40],zo=19,Vo=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Wo=120,Go=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],Ko=1<<xo-1,Yo=l(256,0),Zo=l(256,0),Xo=l(256,f),Jo=l(256,f),Qo=l(To-Eo,g),es=l(To-Eo,g),ts=0,ns=Array(Xn),is=[function(e,t,n,i,a,o,s,r,l,c,d,u,p){mn(e,t,n,i,a,o,s,r,l,c,d,u,p,Ct,3)},hn,function(e,t,n,i,a,o,s,r,l,c,d,u,p){mn(e,t,n,i,a,o,s,r,l,c,d,u,p,Et,3)},gn,fn,_n,function(e,t,n,i,a,o,s,r,l,c,d,u,p){mn(e,t,n,i,a,o,s,r,l,c,d,u,p,Mt,2)},hn,gn,fn,_n];this.Hd=function(e,t,n,i){return Nn(Rn,e,t,n,i)},this.Id=function(e,t,n,i){return Nn(Bn,e,t,n,i)},this.Jd=function(e,t,n,i){return Nn(Hn,e,t,n,i)},this.Ed=function(e,t,n,i){return Nn(jn,e,t,n,i)},this.Fd=function(e,t,n,i){return Nn(Fn,e,t,n,i)},this.Gd=function(e,t,n,i){return Nn(qn,e,t,n,i)},this.WebPDecode=this.Dd=function(t,n,i){var a=e(di),o="VP8StatusCode";return i==m?ti:(o=Un(t,[0],[n],i.input),o!=Qn?o==si?ni:o:(a.j=i.j,a.Qa=i.Qa,o=Pn(t,0,[n],a)))}}}();var _logTimer=(new Date).getTime();!function(e){function t(){return{shortIndexes:{},fullTexts:{}}}function n(e){return e=e.replace(o," ").replace(s,""),e=e.replace(/[^A-Za-z0-9]/g,function(e){return Config.LatinizeMap[e]||e}),e=e.toLowerCase()}function i(e,t,i){if(void 0!==i.fullTexts[e])return!1;if(t=n(t),!t.length)return!1;var a=i.shortIndexes;i.fullTexts[e]=t,angular.forEach(t.split(" "),function(t){var n,i,o=Math.min(t.length,3);for(i=1;o>=i;i++)n=t.substr(0,i),void 0===a[n]?a[n]=[e]:a[n].push(e)})}function a(e,t){var i=t.shortIndexes,a=t.fullTexts;e=n(e);var o,s,r,l,c,d=e.split(" "),u=!1;for(s=0;s<d.length;s++){if(o=i[d[s].substr(0,3)],!o){u=[];break}(u===!1||u.length>o.length)&&(u=o)}for(o={},r=0;r<u.length;r++){for(c=!0,l=a[u[r]],s=0;s<d.length;s++)if(-1==l.indexOf(d[s])){c=!1;break}c&&(o[u[r]]=!0)}return o}var o=/[`~!@#$%^&*()\-_=+\[\]\\|{}'";:\/?.>,<\s]+/g,s=/^\s+|\s$/g;e.SearchIndexManager={createIndex:t,indexObject:i,cleanSearchText:n,search:a}}(window),function(e){function t(e){var t=(tsNow(),new WebPDecoder),n=t.WebPDecoderConfig,i=n.j,s=n.input;if(!t.WebPInitDecoderConfig(n)
|
|||
|
l.storeLongP(0,0,"auth_key_id"),l.storeLong(i.generateID(),"msg_id"),l.storeInt(a,"request_length");var c=l.getBuffer(),d=new Int32Array(c),u=c.byteLength,p=new ArrayBuffer(u+a),m=new Int32Array(p);m.set(d),m.set(r,d.length);var h,g=f?p:m;try{h=o.post(e.chooseServer(t),g,{responseType:"arraybuffer",transformRequest:null})}catch(_){h=s.reject({code:406,type:"NETWORK_BAD_RESPONSE",originalError:_})}return h.then(function(e){if(!e.data||!e.data.byteLength)return s.reject({code:406,type:"NETWORK_BAD_RESPONSE"});try{{var t=new TLDeserialization(e.data,{mtproto:!0});t.fetchLong("auth_key_id"),t.fetchLong("msg_id"),t.fetchInt("msg_len")}}catch(n){return s.reject({code:406,type:"NETWORK_BAD_RESPONSE",originalError:n})}return t},function(e){return e.message||e.type||(e={code:406,type:"NETWORK_BAD_REQUEST",originalError:e}),s.reject(e)})}function c(e){var n=e.deferred,i=new TLSerialization({mtproto:!0});i.storeMethod("req_pq",{nonce:e.nonce}),console.log(dT(),"Send req_pq",bytesToHex(e.nonce)),l(e.dcID,i.getBuffer()).then(function(i){var o=i.fetchObject("ResPQ");if("resPQ"!=o._)throw new Error("resPQ response invalid: "+o._);if(!bytesCmp(e.nonce,o.nonce))throw new Error("resPQ nonce mismatch");if(e.serverNonce=o.server_nonce,e.pq=o.pq,e.fingerprints=o.server_public_key_fingerprints,console.log(dT(),"Got ResPQ",bytesToHex(e.serverNonce),bytesToHex(e.pq),e.fingerprints),e.publicKey=t.select(e.fingerprints),!e.publicKey)throw new Error("No public key found");console.log(dT(),"PQ factorization start",e.pq),a.factorize(e.pq).then(function(t){e.p=t[0],e.q=t[1],console.log(dT(),"PQ factorization done",t[2]),d(e)},function(e){console.log("Worker error",e,e.stack),n.reject(e)})},function(e){console.log(dT(),"req_pq error",e.message),n.reject(e)}),r(function(){t.prepare()})}function d(e){var t=e.deferred;e.newNonce=new Array(32),n.nextBytes(e.newNonce);var i=new TLSerialization({mtproto:!0});i.storeObject({_:"p_q_inner_data",pq:e.pq,p:e.p,q:e.q,nonce:e.nonce,server_nonce:e.serverNonce,new_nonce:e.newNonce},"P_Q_inner_data","DECRYPTED_DATA");var a=sha1BytesSync(i.getBuffer()).concat(i.getBytes()),o=new TLSerialization({mtproto:!0});o.storeMethod("req_DH_params",{nonce:e.nonce,server_nonce:e.serverNonce,p:e.p,q:e.q,public_key_fingerprint:e.publicKey.fingerprint,encrypted_data:rsaEncrypt(e.publicKey,a)}),console.log(dT(),"Send req_DH_params"),l(e.dcID,o.getBuffer()).then(function(n){var i=n.fetchObject("Server_DH_Params","RESPONSE");if("server_DH_params_fail"!=i._&&"server_DH_params_ok"!=i._)return t.reject(new Error("Server_DH_Params response invalid: "+i._)),!1;if(!bytesCmp(e.nonce,i.nonce))return t.reject(new Error("Server_DH_Params nonce mismatch")),!1;if(!bytesCmp(e.serverNonce,i.server_nonce))return t.reject(new Error("Server_DH_Params server_nonce mismatch")),!1;if("server_DH_params_fail"==i._){var a=sha1BytesSync(e.newNonce).slice(-16);return bytesCmp(a,i.new_nonce_hash)?(t.reject(new Error("server_DH_params_fail")),!1):(t.reject(new Error("server_DH_params_fail new_nonce_hash mismatch")),!1)}try{u(e,i.encrypted_answer)}catch(o){return t.reject(o),!1}p(e)},function(e){t.reject(e)})}function u(e,t){e.localTime=tsNow(),e.tmpAesKey=sha1BytesSync(e.newNonce.concat(e.serverNonce)).concat(sha1BytesSync(e.serverNonce.concat(e.newNonce)).slice(0,12)),e.tmpAesIv=sha1BytesSync(e.serverNonce.concat(e.newNonce)).slice(12).concat(sha1BytesSync([].concat(e.newNonce,e.newNonce)),e.newNonce.slice(0,4));var n=aesDecryptSync(t,e.tmpAesKey,e.tmpAesIv),a=n.slice(0,20),o=n.slice(20),s=bytesToArrayBuffer(o),r=new TLDeserialization(s,{mtproto:!0}),l=r.fetchObject("Server_DH_inner_data");if("server_DH_inner_data"!=l._)throw new Error("server_DH_inner_data response invalid: "+constructor);if(!bytesCmp(e.nonce,l.nonce))throw new Error("server_DH_inner_data nonce mismatch");if(!bytesCmp(e.serverNonce,l.server_nonce))throw new Error("server_DH_inner_data serverNonce mismatch");console.log(dT(),"Done decrypting answer"),e.g=l.g,e.dhPrime=l.dh_prime,e.gA=l.g_a,e.serverTime=l.server_time,e.retry=0;var c=r.getOffset();if(!bytesCmp(a,sha1BytesSync(o.slice(0,c))))thro
|
|||
|
}]),angular.module("myApp.services",["myApp.i18n","izhukov.utils"]).service("AppUsersManager",["$rootScope","$modal","$modalStack","$filter","$q","qSync","MtpApiFileManager","MtpApiManager","RichTextProcessor","ErrorService","Storage","_",function(e,t,n,i,a,o,s,r,l,c,d,u){function p(){return O?O:O=r.invokeApi("contacts.getContacts",{hash:""}).then(function(e){var t,n;L=[],_(e.users);for(var n=0;n<e.contacts.length;n++)t=e.contacts[n].user_id,L.push(t),SearchIndexManager.indexObject(t,m(t),j);return L})}function m(e){var t=B[e];return t?(t.first_name||"")+" "+(t.last_name||"")+" "+(t.phone||"")+" "+(t.username||""):!1}function h(e){return p().then(function(t){if(angular.isString(e)&&e.length){for(var n=SearchIndexManager.search(e,j),i=[],a=0;a<t.length;a++)n[t[a]]&&i.push(t[a]);t=i}return t})}function g(e){return e&&e.toLowerCase()||""}function f(e){var t=g(e),n=F[t];return n&&g(B[n].username)==t?o.when(n):r.invokeApi("contacts.resolveUsername",{username:e}).then(function(e){return v(e),e.id})}function _(e){angular.forEach(e,v)}function v(t,n){if(angular.isObject(t)&&!(n&&angular.isObject(B[t.id])&&B[t.id].first_name)){var a=t.id;t.phone&&(t.rPhone=i("phoneNumber")(t.phone)),t.num=Math.abs(a)%8+1,t.first_name?(t.rFirstName=l.wrapRichText(t.first_name,{noLinks:!0,noLinebreaks:!0}),t.rFullName=t.last_name?l.wrapRichText(t.first_name+" "+(t.last_name||""),{noLinks:!0,noLinebreaks:!0}):t.rFirstName):(t.rFirstName=l.wrapRichText(t.last_name,{noLinks:!0,noLinebreaks:!0})||t.rPhone||u("user_first_name_deleted"),t.rFullName=l.wrapRichText(t.last_name,{noLinks:!0,noLinebreaks:!0})||t.rPhone||u("user_name_deleted")),t.username&&(F[g(t.username)]=a),t.sortName=SearchIndexManager.cleanSearchText(t.first_name+" "+(t.last_name||""));var o=t.sortName.split(" "),s=o.shift(),r=o.pop();t.initials=s.charAt(0)+(r?r.charAt(0):s.charAt(1)),t.sortStatus=y(t.status);var c=B[a];void 0===c?c=B[a]=t:safeReplaceObject(c,t),e.$broadcast("user_update",a),void 0!==q[a]&&safeReplaceObject(q[a],t&&t.photo&&t.photo.photo_small||{empty:!0})}}function y(e){if(e){var t=e.expires||e.was_online;if(t)return t;{tsNow(!0)+H}switch(e._){case"userStatusRecently":return tsNow(!0)+H-259200;case"userStatusLastWeek":return tsNow(!0)+H-604800;case"userStatusLastMonth":return tsNow(!0)+H-2592e3}}return 0}function b(e){return angular.isObject(e)?e:B[e]||{id:e,deleted:!0,num:1}}function w(){return b(R)}function $(e){return angular.isObject(B[e])}function k(e,t){var n=b(e);return 333e3==e?{placeholder:"img/placeholders/[email protected]"}:(void 0===q[e]&&(q[e]=n&&n.photo&&n.photo.photo_small||{empty:!0}),{num:n.num,placeholder:"img/placeholders/"+t+"Avatar"+n.num+"@2x.png",location:q[e]})}function S(e){var t=b(e);return"u"+e+(t.access_hash?"_"+t.access_hash:"")}function C(e){var t=b(e);return"userSelf"==t._?{_:"inputUserSelf"}:{_:"inputUserForeign",user_id:e,access_hash:t.access_hash||0}}function M(){var t=tsNow(!0)+H;angular.forEach(B,function(n){n.status&&"userStatusOnline"==n.status._&&n.status.expires<t&&(n.status=n.status.wasStatus||{_:"userStatusOffline",was_online:n.status.expires},delete n.status.wasStatus,e.$broadcast("user_update",n.id))})}function A(t){var n=b(t);if(n&&n.status&&"userStatusOnline"!=n.status._&&"userStatusEmpty"!=n.status._){var i;"userStatusOffline"!=n.status._&&(delete n.status.wasStatus,i!=angular.copy(n.status)),n.status={_:"userStatusOnline",expires:tsNow(!0)+H+60,wasStatus:i},n.sortStatus=y(n.status),e.$broadcast("user_update",t)}}function x(e){var t=b(e);return t}function E(n,i){var a=e.$new();a.userID=n,a.override=i||{};t.open({templateUrl:templateUrl("user_modal"),controller:"UserModalController",scope:a,windowClass:"user_modal_window mobile_modal"})}function T(e,t,n){return r.invokeApi("contacts.importContacts",{contacts:[{_:"inputPhoneContact",client_id:"1",phone:e,first_name:t,last_name:n}],replace:!1}).then(function(e){_(e.users);var t=!1;return angular.forEach(e.imported,function(e){P(t=e.user_id,!0)}),t||!1})}function I(e){var t,n,i=[];for(t=0;t<e.length;t++)for(n=0;n<e[t].phones.length;n++)i.push({_:"inputPhoneContact"
|
|||
|
}var tt,nt={},it={},at={},ot={},st={count:null,dialogs:[]},rt={},lt={},ct={},dt=e.when(),ut=-1,pt=SearchIndexManager.createIndex(),mt={query:!1},ht={},gt=[],ft=[],_t=!1,vt=0,yt=tsNow(!0),bt=yt-yt%86400,wt=new Date,$t=!1;Config.Modes.packed&&b.get("max_seen_msg").then(function(e){$t=e||0}),b.get("server_time_offset").then(function(e){e&&(vt=e)});var kt=i("dateOrTime");wt.setHours(0),wt.setMinutes(0),wt.setSeconds(0),tt=bt-Math.floor(+wt/1e3),v.start(),window.navigator.mozSetMessageHandler&&window.navigator.mozSetMessageHandler("activity",function(e){var n=e.source;console.log(dT(),"Received activity",n.name,n.data),"share"===n.name&&n.data.blobs.length>0&&y.selectPeers({confirm_type:"EXT_SHARE_PEER"}).then(function(e){angular.forEach(e,function(e){var t=c.getPeerID(e);angular.forEach(n.data.blobs,function(e){B(t,e,{isMedia:!0})})}),1==e.length&&t.$broadcast("history_focus",{peerString:e[0]})})});var St=!1,Ct={},Mt=!1,At={};return t.$on("apiUpdate",function(e,n){switch(n._){case"updateMessageID":lt[n.id]=n.random_id;break;case"updateNewMessage":var i=n.message,o=V(i),s=ot[o];if(void 0!==s){var l=s.history;if(-1!=l.indexOf(i.id))return!1;var d=l[0];l.unshift(i.id),i.id>0&&i.id<d&&l.sort(function(e,t){return t-e}),null!==s.count&&s.count++}else s=ot[o]={count:null,history:[i.id],pending:[]};L([i]),i.out||r.forceUserOnline(i.from_id);var u,p=lt[i.id];p&&((u=H(p,i))&&t.$broadcast("history_update",{peerID:o}),delete lt[i.id]),u||(void 0===Ct[o]&&(Ct[o]=[]),Ct[o].push(i.id),St||(St=a(Q,0)));var m,h=Z(o),g=!i.out&&i.unread;if(h.length?(m=h[0],h[1]>0&&(st.dialogs.splice(h[1],1),st.dialogs.unshift(m)),m.top_message=i.id,g&&m.unread_count++):(SearchIndexManager.indexObject(o,c.getPeerSearchText(o),pt),m={peerID:o,unread_count:g?1:0,top_message:i.id},st.dialogs.unshift(m)),At[o]=m,Mt||(Mt=a(et,0)),g&&(t.selectedPeerID!=o||t.idle.isIDLE)){var f=16&i.flags?i.from_id:o,_=v.getPeerMuted(f),y=t.idle.isIDLE&&S.isOtherDeviceActive()?3e4:1e3;setTimeout(function(){_.then(function(e){i.unread&&!e&&b.get("notify_nopreview").then(function(e){J(i,e)})})},y)}X(i.id);break;case"updateReadHistoryInbox":case"updateReadHistoryOutbox":var w,i,$,k=n.max_id,C="updateReadHistoryOutbox"==n._,o=c.getPeerID(n.peer),h=Z(o),l=(ot[o]||{}).history||[],M=!1,A=l.length,x=!1;for(o>0&&C&&r.forceUserOnline(o),$=0;A>$;$++)if(w=l[$],!(w>k)&&(i=nt[w],i.out==C)){if(!i.unread)break;i&&i.unread&&(i.unread=!1,it[w]&&(it[w].unread=!1,x||(x=!0)),at[w]&&(at[w].unread=!1),i.out||(h&&(M=--h[0].unread_count),v.cancel("msg"+w)))}M!==!1&&t.$broadcast("dialog_unread",{peerID:o,count:M}),x&&t.$broadcast("messages_read");break;case"updateReadMessagesContents":var $,w,i,E,T=n.messages,I=T.length;for($=0;I>$;$++)w=T[$],(i=nt[w])&&delete i.media_unread,(E=it[w])&&delete E.media_unread;break;case"updateDeleteMessages":var w,i,$,o,h,l,D={};for($=0;$<n.messages.length;$++)w=n.messages[$],i=nt[w],i&&(o=V(i),l=D[o]||(D[o]={count:0,unread:0,msgs:{}}),!i.out&&i.unread&&(l.unread++,v.cancel("msg"+w)),l.count++,l.msgs[w]=!0,it[w]&&(it[w].deleted=!0,delete it[w]),at[w]&&(at[w].deleted=!0,delete at[w]),i.deleted=!0,nt[w]={deleted:!0,id:w,from_id:i.from_id,to_id:i.to_id,flags:i.flags,out:i.out,unread:i.unread,date:i.date});angular.forEach(D,function(e,n){var i=Z(n);i&&e.unread&&(i[0].unread_count-=e.unread,t.$broadcast("dialog_unread",{peerID:n,count:i[0].unread_count}));var a=ot[n];if(void 0!==a){for(var o=[],s=[],r=0;r<a.history.length;r++)e.msgs[a.history[r]]||o.push(a.history[r]);a.history=o;for(var r=0;r<a.pending.length;r++)e.msgs[a.pending[r]]||s.push(a.pending[r]);a.pending=s,t.$broadcast("history_delete",{peerID:n,msgs:e.msgs})}})}}),t.$on("webpage_updated",function(e,t){angular.forEach(t.msgs,function(e){var n=it[e];n&&(n.media={_:"messageMediaWebPage",webpage:h.wrapForHistory(t.id)})})}),{getDialogs:M,getHistory:E,getSearch:T,getMessage:I,readHistory:N,readMessages:U,flushHistory:O,deleteMessages:D,saveMessages:L,sendText:R,sendFile:B,sendOther:F,forwardMessages:q,openChatInviteLink:z,getMessagePeer:V,wrapForDialog:W,wrapForHistory:G,regroupWrappedHistory:Y}}]).service("AppPhotosManager"
|
|||
|
i.find("audio")[0].volume=e}}function y(e){var t=E[e];if(t){I>0&&I--;try{t.close?t.close():S&&t.index==T&&window.external.msSiteModeClearIconOverlay()}catch(n){}delete I[e]}}function b(){S?window.external.msSiteModeClearIconOverlay():angular.forEach(E,function(e){try{e.close&&e.close()}catch(t){}}),E={},I=0}function w(){if(F)return!1;if(navigator.push&&Config.Navigator.ffos&&Config.Modes.packed){var e=navigator.push.register();e.onsuccess=function(){clearTimeout(j),console.log(dT(),"Push registered",e.result),F=e.result,o.invokeApi("account.registerDevice",{token_type:4,token:F,device_model:navigator.userAgent||"Unknown UserAgent",system_version:navigator.platform||"Unknown Platform",app_version:Config.App.version,app_sandbox:!1,lang_code:navigator.language||"en"})},e.onerror=function(e){console.error("Push register error",e,e.toString()),j=setTimeout(w,q),q=Math.min(3e4,1.5*q)}}}function k(){return D}navigator.vibrate=navigator.vibrate||navigator.mozVibrate||navigator.webkitVibrate;var S=!1;try{window.external&&window.external.msIsSiteMode()&&(S=!0)}catch(C){}var M,A,x=S||"Notification"in window||"mozNotification"in navigator,E={},T=0,I=0,D=!!navigator.vibrate,P=!1,N=!1,U={},O=$('link[rel="icon"]:first')[0],L=a.pluralize("page_title_pluralize_notifications"),R=document.title,B=!1;e.$watch("idle.isIDLE",function(e){e||b(),Config.Navigator.mobile||(n.cancel(M),e?(R=document.title,M=n(function(){var e=tsNow();!I||e%2e3>1e3?B&&(B=!1,document.title=R,u()):(B=!0,document.title=L(I),u("favicon_unread.ico"))},1e3)):(B=!1,document.title=R,u()))}),e.$on("apiUpdate",function(e,t){switch(t._){case"updateNotifySettings":if("notifyPeer"==t.peer._){var n=s.getPeerID(t.peer.peer);p(n,t.notify_settings)}}});var F=!1;return window.navigator.mozSetMessageHandler&&(window.navigator.mozSetMessageHandler("push",function(t){console.log(dT(),"received push",t),e.$broadcast("push_received")}),window.navigator.mozSetMessageHandler("push-register",function(e){console.log(dT(),"received push",e),F=!1,w()})),{start:g,notify:_,cancel:y,clear:b,getPeerSettings:d,getPeerMuted:h,savePeerSettings:p,updatePeerSettings:m,getVibrateSupport:k,testSound:v};var q,j}]).service("PasswordManager",["$timeout","$q","$rootScope","MtpApiManager","CryptoWorker","MtpSecureRandom",function(e,t,n,i,a,o){function s(e){return i.invokeApi("account.getPassword",{},e).then(function(e){return e})}function r(e,n){var a,s,r={new_settings:{_:"account.passwordInputSettings",flags:0,hint:n.hint||""}};if(a="string"==typeof n.cur_password&&n.cur_password.length>0?u(e.current_salt,n.cur_password):t.when([]),"string"==typeof n.new_password&&n.new_password.length>0){var l=new Array(8),c=bufferConcat(e.new_salt,l);o.nextBytes(l),s=u(c,n.new_password),r.new_settings.new_salt=c,r.new_settings.flags|=1}else"string"==typeof n.new_password&&(r.new_settings.flags|=1,r.new_settings.new_salt=[]),s=t.when([]);return"string"==typeof n.email&&(r.new_settings.flags|=2,r.new_settings.email=n.email||""),t.all([a,s]).then(function(e){return r.current_password_hash=e[0],r.new_settings.new_password_hash=e[1],i.invokeApi("account.updatePasswordSettings",r)})}function l(e,t,n){return u(e.current_salt,t).then(function(e){return i.invokeApi("auth.checkPassword",{password_hash:e},n)})}function c(e,t){return i.invokeApi("auth.requestPasswordRecovery",{},t)}function d(e,t){return i.invokeApi("auth.recoverPassword",{code:e},t)}function u(e,t){for(var n=unescape(encodeURIComponent(t)),i=new ArrayBuffer(n.length),o=new Uint8Array(i),s=0,r=n.length;r>s;s++)o[s]=n.charCodeAt(s);return i=bufferConcat(bufferConcat(e,o),e),a.sha256Hash(i)}return{check:l,getState:s,requestRecovery:c,recover:d,updateSettings:r}}]).service("ErrorService",["$rootScope","$modal","$window",function(e,t,n){function i(n,i){if(s>=1)return console.log("Skip error box, too many open",s,n,i),!1;i=i||{};var a=e.$new();angular.extend(a,n),s++;var o=t.open({templateUrl:templateUrl("error_modal"),scope:a,windowClass:i.windowClass||"error_modal_window"});return o.result["finally"](function(){s--}),o}function a(e,t){return i({title:e,description:t})}f
|
|||
|
}var p,m,h,g=!1,v=!1,m=a.messages[a.messages.length-1],y=!m||!m.unread;for(h=0;u>h;h++)p=t[h],-1===a.ids.indexOf(p)&&(m=r.wrapForHistory(p),a.messages.push(m),a.ids.push(p),!v&&l&&(m.unread&&!m.out&&y?v=p:y=!m.unread),!g&&m.out&&(g=!0));r.regroupWrappedHistory(a.messages,-u-2)&&(o=!0),c&&(e.historyState.typing.length&&e.historyState.typing.splice(0,e.historyState.typing.length),e.$broadcast("ui_history_append_new",{idleScroll:O&&!g&&l}),l?v&&(e.historyUnreadAfter=v,O=!0,s=!0):n(function(){r.readHistory(e.curDialog.inputPeer)}))}}),o&&e.$broadcast("messages_regroup"),s&&e.$broadcast("messages_unread_after")}),e.$on("history_delete",function(t,n){var i=f(n.peerID);if(i){var a,o=[];for(a=0;a<i.messages.length;a++)n.msgs[i.messages[a].id]||o.push(i.messages[a]);i.messages=o,r.regroupWrappedHistory(i.messages),e.$broadcast("messages_regroup"),n.peerID==e.curDialog.peerID&&(e.state.empty=!o.length)}}),e.$on("dialog_flush",function(t,n){var i=f(n.peerID);i&&(i.messages=[],i.ids=[],n.peerID==e.curDialog.peerID&&(e.state.empty=!0))}),e.$on("history_focus",function(){e.historyFilter.mediaType&&D()}),e.$on("apiUpdate",function(t,i){switch(i._){case"updateUserTyping":case"updateChatUserTyping":o.forceUserOnline(i.user_id),o.hasUser(i.user_id)&&e.curDialog.peerID==("updateUserTyping"==i._?i.user_id:-i.chat_id)&&(-1==e.historyState.typing.indexOf(i.user_id)&&e.historyState.typing.push(i.user_id),n.cancel(X[i.user_id]),X[i.user_id]=n(function(){var t=e.historyState.typing.indexOf(i.user_id);-1!==t&&e.historyState.typing.splice(t,1)},6e3))}}),e.$on("history_need_less",b),e.$on("history_need_more",w),i.$watch("idle.isIDLE",function(t){t||!e.curDialog||!e.curDialog.peerID||e.historyFilter.mediaType||e.historyState.skipped||r.readHistory(e.curDialog.inputPeer),t||(O=!1)})}]).controller("AppImPanelController",["$scope",function(e){e.$on("user_update",angular.noop)}]).controller("AppImSendController",["$scope","$timeout","MtpApiManager","Storage","AppChatsManager","AppUsersManager","AppPeersManager","AppDocsManager","AppMessagesManager","MtpApiFileManager",function(e,t,n,i,a,o,s,r,l){function c(n){return e.$broadcast("ui_message_before_send"),t(function(){var t=e.draftMessage.text;if(angular.isString(t)&&t.length>0){t=t.replace(/:([a-z0-9\-\+\*_]+?):/gi,function(e,t){var n=EmojiHelper.shortcuts[t];return void 0!==n?EmojiHelper.emojis[n][0]:e});var n=0,i={replyToMsgID:e.draftMessage.replyToMessage&&e.draftMessage.replyToMessage.id};do!function(e,t,n){setTimeout(function(){l.sendText(e,t,i)},n)}(e.curDialog.peerID,t.substr(0,4096),n),t=t.substr(4096),n+=100;while(t.length)}u(),e.$broadcast("ui_message_send")}),cancelEvent(n)}function d(){var t=e.curDialog.peerID;return!t||t>0?(safeReplaceObject(e.mentions,{}),void e.$broadcast("mentions_update")):void a.getChatFull(-t).then(function(t){var n=(t.participants||{}).participants||[],i=[],a=SearchIndexManager.createIndex();angular.forEach(n,function(e){var t=o.getUser(e.user_id);t.username&&(i.push(t),SearchIndexManager.indexObject(t.id,o.getUserSearchText(t.id),a))}),safeReplaceObject(e.mentions,{users:i,index:a}),e.$broadcast("mentions_update")})}function u(t){d(),m(),t?i.get("draft"+e.curDialog.peerID).then(function(t){e.draftMessage.text=t||"",e.$broadcast("ui_peer_draft")}):(e.draftMessage.text="",e.$broadcast("ui_peer_draft"))}function p(t){e.draftMessage.replyToMessage=l.wrapForDialog(t),e.$broadcast("ui_peer_reply")}function m(){delete e.draftMessage.replyToMessage,e.$broadcast("ui_peer_reply")}function h(t){if(t&&t.length){e.historyFilter.mediaType||e.historyState.skipped||l.readHistory(e.curDialog.inputPeer);var n={};n["draft"+e.curDialog.peerID]=t,i.set(n)}else i.remove("draft"+e.curDialog.peerID)}function g(){n.invokeApi("messages.setTyping",{peer:e.curDialog.inputPeer,action:{_:"sendMessageTypingAction"}})}function f(t){if(angular.isArray(t)&&t.length){var n={replyToMsgID:e.draftMessage.replyToMessage&&e.draftMessage.replyToMessage.id,isMedia:e.draftMessage.isMedia};delete e.draftMessage.replyToMessage;for(var i=0;i<t.length;i++)l.sendFile(e.curDialog.peerID,t[i],n),e.$broadcast("ui_m
|
|||
|
}),t.close(n)}},e.toggleSearch=function(){e.$broadcast("dialogs_search_toggle")}}]).controller("ChatCreateModalController",["$scope","$modalInstance","$rootScope","MtpApiManager","AppUsersManager","AppChatsManager","ApiUpdatesManager",function(e,t,n,i,a,o,s){e.group={name:""},e.createGroup=function(){if(e.group.name){e.group.creating=!0;var r=[];return angular.forEach(e.userIDs,function(e){r.push(a.getUserInput(e))}),i.invokeApi("messages.createChat",{title:e.group.name,users:r}).then(function(e){if(s.processUpdateMessage(e),e.updates&&e.updates.length){for(var i,a=0,r=e.updates.length;r>a;a++)if(i=e.updates[a],"updateNewMessage"==i._){n.$broadcast("history_focus",{peerString:o.getChatString(i.message.to_id.chat_id)});break}t.close()}})["finally"](function(){delete e.group.creating})}}}]).controller("ChatEditModalController",["$scope","$modalInstance","$rootScope","MtpApiManager","AppUsersManager","AppChatsManager","ApiUpdatesManager",function(e,t,n,i,a,o,s){var r=o.getChat(e.chatID);e.group={name:r.title},e.updateGroup=function(){return e.group.name?e.group.name==r.title?t.close():(e.group.updating=!0,i.invokeApi("messages.editChatTitle",{chat_id:e.chatID,title:e.group.name}).then(function(t){s.processUpdateMessage(t);var i=o.getChatString(e.chatID);n.$broadcast("history_focus",{peerString:i})})["finally"](function(){delete e.group.updating})):void 0}}]).controller("ChatInviteLinkModalController",["_","$scope","$timeout","$modalInstance","AppChatsManager","ErrorService",function(e,t,n,i,a,o){function s(e){e&&(t.exportedInvite.revoking=!0),a.getChatInviteLink(t.chatID,e).then(function(e){t.exportedInvite={link:e},n(function(){t.$broadcast("ui_invite_select")},100)})["finally"](function(){delete t.exportedInvite.revoking})}t.exportedInvite={link:e("group_invite_link_loading_raw")},t.revokeLink=function(){o.confirm({type:"REVOKE_GROUP_INVITE_LINK"}).then(function(){s(!0)})},s()}]).controller("ImportContactModalController",["$scope","$modalInstance","$rootScope","AppUsersManager","ErrorService","PhonebookContactsService",function(e,t,n,i,a,o){void 0===e.importContact&&(e.importContact={}),e.phonebookAvailable=o.isAvailable(),e.doImport=function(){e.importContact&&e.importContact.phone&&(e.progress={enabled:!0},i.importContact(e.importContact.phone,e.importContact.first_name||"",e.importContact.last_name||"").then(function(e){e||a.show({error:{code:404,type:"USER_NOT_USING_TELEGRAM"}}),t.close(e)})["finally"](function(){delete e.progress.enabled}))},e.importPhonebook=function(){o.openPhonebookImport().result.then(function(e){e?t.close(e[0]):t.dismiss()})}}]).controller("CountrySelectModalController",["$scope","$modalInstance","$rootScope","_",function(e,t,n,i){e.search={},e.slice={limit:20,limitDelta:20};for(var a=SearchIndexManager.createIndex(),o=0;o<Config.CountryCodes.length;o++){var s=Config.CountryCodes[o][0];s+=" "+i(Config.CountryCodes[o][1]+"_raw"),s+=" "+Config.CountryCodes[o].slice(2).join(" "),SearchIndexManager.indexObject(o,s,a)}e.$watch("search.query",function(t){var n=!1,o={};angular.isString(t)&&t.length&&(n=!0,o=SearchIndexManager.search(t,a)),e.countries=[],e.slice.limit=20;for(var s,r=0;r<Config.CountryCodes.length;r++)if(!n||o[r])for(s=2;s<Config.CountryCodes[r].length;s++)e.countries.push({name:i(Config.CountryCodes[r][1]+"_raw"),code:Config.CountryCodes[r][s]});String.prototype.localeCompare&&e.countries.sort(function(e,t){return e.name.localeCompare(t.name)})})}]).controller("PhonebookModalController",["$scope","$modalInstance","$rootScope","AppUsersManager","PhonebookContactsService","ErrorService",function(e,t,n,i,a,o){function s(){var t=!1,n={};if(angular.isString(e.search.query)&&e.search.query.length){t=!0,n=SearchIndexManager.search(e.search.query,r),e.contacts=[],delete e.contactsEmpty;for(var i=0;i<e.phonebook.length;i++)(!t||n[i])&&e.contacts.push(e.phonebook[i])}else e.contacts=e.phonebook,e.contactsEmpty=!e.contacts.length;e.slice.limit=20}e.search={},e.phonebook=[],e.selectedContacts={},e.selectedCount=0,e.slice={limit:20,limitDelta:20},e.progress={enabled:!1},e.multiSelect=!0;var r=Searc
|
|||
|
}]),function(e,t,n,i){function a(e){ConfigStorage.get("emojis_popular",function(t){var n=[];if(t&&t.length){for(var i=0,a=t.length;a>i;i++)n.push({code:t[i][0],rate:t[i][1]});return void e(n)}ConfigStorage.get("emojis_recent",function(t){t=t||b||[];for(var i,a,o=0,s=t.length;s>o;o++)i=t[o],Array.isArray(i)&&(i=i[0]),i&&"string"==typeof i&&(":"==i.charAt(0)&&(i=i.substr(1,i.length-2)),(a=f[i])&&n.push({code:a,rate:1}));e(n)})})}function o(e){a(function(t){for(var n=!1,i=t.length,a=[],o=0;i>o;o++)t[o].code==e&&(n=!0,t[o].rate++),a.push([t[o].code,t[o].rate]);n?a.sort(function(e,t){return t[1]-e[1]}):(a.length>41&&(a=a.slice(0,41)),a.push([e,1])),ConfigStorage.set({emojis_popular:a})})}function s(){if(y===!1){y=SearchIndexManager.createIndex();var e;for(e in f)f.hasOwnProperty(e)&&SearchIndexManager.indexObject(f[e],e,y)}}function r(e){s();var t,n=SearchIndexManager.search(e,y),i=[];for(t in n)n.hasOwnProperty(t)&&i.push(t);return i}var l,c,d,u,p,m,h,g,t={},f={},_={},v={},y=!1,b="joy,kissing_heart,heart,heart_eyes,blush,grin,+1,relaxed,pensive,smile,sob,kiss,unamused,flushed,stuck_out_tongue_winking_eye,see_no_evil,wink,smiley,cry,stuck_out_tongue_closed_eyes,scream,rage,smirk,disappointed,sweat_smile,kissing_closed_eyes,speak_no_evil,relieved,grinning,yum,laughing,ok_hand,neutral_face,confused".split(",");for(l=0,h=n.length;h>l;l++)for(m=i[l][1],c=0,g=n[l].length;g>c;c++)d=n[l][c],p=Config.Emoji[d],u=p[1][0],t[d]=[p[0],u],f[u]=d,_[d]=[l,c,Math.floor(c/m),c%m];e.EmojiHelper={emojis:t,shortcuts:f,spritesheetPositions:_,stickers:v,getPopularEmoji:a,pushPopularEmoji:o,indexEmojis:s,searchEmojis:r}}(window,Config.Emoji,Config.EmojiCategories,Config.EmojiCategorySpritesheetDimens),EmojiTooltip.prototype.onMouseEnter=function(e){this.hideTimeout?(clearTimeout(this.hideTimeout),delete this.hideTimeout):e&&!this.showTimeout&&(this.showTimeout=setTimeout(this.show.bind(this),200))},EmojiTooltip.prototype.onMouseLeave=function(e){if(this.hideTimeout)e&&this.showTimeout&&(clearTimeout(this.showTimeout),delete this.showTimeout);else{var t=this;this.hideTimeout=setTimeout(function(){t.hide()},400)}},EmojiTooltip.prototype.getScrollWidth=function(){var e=$("<div>").css({position:"absolute",width:100,height:100,overflow:"scroll",top:-9999}).appendTo($(document.body)),t=e[0].offsetWidth-e[0].clientWidth;return e.remove(),t},EmojiTooltip.prototype.createTooltip=function(){if(this.tooltipEl)return!1;var e=this;this.tooltipEl=$('<div class="composer_emoji_tooltip noselect"><div class="composer_emoji_tooltip_tabs"></div><div class="composer_emoji_tooltip_content_wrap nano mobile_scrollable_wrap"><div class="composer_emoji_tooltip_content nano-content clearfix"></div></div><div class="composer_emoji_tooltip_footer"><a class="composer_emoji_tooltip_settings"></a></div><div class="composer_emoji_tooltip_tail"><i class="icon icon-tooltip-tail"></i></div></div>').appendTo(document.body),this.tabsEl=$(".composer_emoji_tooltip_tabs",this.tooltip),this.contentWrapEl=$(".composer_emoji_tooltip_content_wrap",this.tooltip),this.contentEl=$(".composer_emoji_tooltip_content",this.tooltip),this.footerEl=$(".composer_emoji_tooltip_footer",this.tooltip),this.settingsEl=$(".composer_emoji_tooltip_settings",this.tooltip);var t=this.getScrollWidth();return t>0&&this.tooltipEl.css({width:parseInt(this.tooltipEl.css("width"))+t}),angular.forEach(["recent","smile","flower","bell","car","grid","stickers"],function(t,n){var i=$('<a class="composer_emoji_tooltip_tab composer_emoji_tooltip_tab_'+t+'"></a>').on("mousedown",function(t){return e.selectTab(n),cancelEvent(t)}).appendTo(e.tabsEl);Config.Navigator.touch||i.on("mouseenter mouseleave",function(t){clearTimeout(e.selectTabTimeout),"mouseenter"==t.type&&(e.selectTabTimeout=setTimeout(function(){e.selectTab(n)},300))})}),Config.Mobile||this.contentWrapEl.nanoScroller({preventPageScrolling:!0,tabIndex:-1}),this.contentEl.on("mousedown",function(t){t=t.originalEvent||t;var n,i,a=$(t.target);return"A"!=a[0].tagName&&(a=$(a[0].parentNode)),(n=a.attr("data-code"))&&(e.onEmojiSelected&&e.onEmojiSelected(n),EmojiHelper.p
|
|||
|
}),$(e).on("resize",i)}return{link:t}}]).directive("myHistory",["$window","$timeout","$rootScope","$transition",function(e,t,n,i){function a(a,o){function s(e){var n,i;if(!e&&(i=$(".im_message_focus:visible",u)[0])){var a=u.clientHeight,o=u.scrollTop,s=i.offsetTop,r=i.clientHeight;(!o||s>o+a||o>s+r)&&(u.scrollTop=Math.max(0,s-Math.floor(a/2)+26)),A=!1}else(n=$(".im_message_unread_split:visible",u)[0])?(u.scrollTop=Math.max(0,n.offsetTop-52),A=!1):(u.scrollTop=u.scrollHeight,A=!0);w(),t(function(){$(u).trigger("scroll"),x=u.scrollTop})}function r(t){if(o.is(":visible")||$(o[0].parentNode.parentNode).is(":visible")){$(h).is(":visible")&&$(h).css({height:$(_).height()}),g&&g.offsetHeight||(g=$(".tg_page_head")[0]),f&&f.offsetHeight||(f=$(".footer_wrap")[0]);var n=f?f.offsetHeight:0;n&&n++;var i=$(e).height()-m.offsetHeight-(g?g.offsetHeight:48)-n;$(c).css({height:i}),l(),t!==!0&&(A&&onContentLoaded(function(){u.scrollTop=u.scrollHeight,w()}),w(100))}}function l(){$(d).css({marginTop:0});var e=u.offsetHeight-d.offsetHeight-20-(Config.Mobile?0:39);d.offsetHeight>0&&e>0&&$(d).css({marginTop:e}),$(c).nanoScroller()}var c=$(".im_history_wrap",o)[0],d=$(".im_history_messages",o)[0],u=($(".im_history",o)[0],$(".im_history_scrollable_wrap",o)[0]),p=$(".im_history_scrollable",o)[0],m=$(".im_bottom_panel_wrap",o)[0],h=$(".im_send_form_wrap",o)[0],g=$(".tg_page_head")[0],f=$(".footer_wrap")[0],_=$(".im_send_form",o)[0],v=!1,y=!1;onContentLoaded(function(){u.scrollTop=u.scrollHeight}),$(c).nanoScroller({preventPageScrolling:!0,tabIndex:-1,iOSNativeScrolling:!0});var b,w=function(e){t(function(){$(u).hasClass("im_history_to_bottom")||$(c).nanoScroller()},e||0)},k=!1,S=["transform","webkitTransform","MozTransform","msTransform","OTransform"];for(b=0;b<S.length;b++)if(S[b]in d.style){k=S[b];break}var C=!1,M=!1;a.$on("ui_history_append_new",function(e,t){if(!A&&!t.my)return void onContentLoaded(function(){$(c).nanoScroller()});if(t.idleScroll)return void onContentLoaded(function(){$(c).nanoScroller(),s(!0)});var a,o=C&&!n.idle.isIDLE&&d.clientHeight>0;if(o)a=u.scrollHeight;else{var r=parseInt($(u).css("paddingRight"));$(p).css({bottom:0,paddingRight:r}),$(u).addClass("im_history_to_bottom")}onContentLoaded(function(){if(o){M=!0,$(d).removeClass("im_history_appending"),u.scrollTop=u.scrollHeight,$(d).css(k,"translate(0px, "+(u.scrollHeight-a)+"px)"),$(c).nanoScroller();var e={};e[k]="translate(0px, 0px)",$(d).addClass("im_history_appending"),i($(d),e).then(function(){M=!1,$(d).removeClass("im_history_appending"),l()})}else $(u).removeClass("im_history_to_bottom"),$(p).css({bottom:"",paddingRight:0}),u.scrollTop=u.scrollHeight,l()})}),a.$on("ui_history_change",function(){var e=parseInt($(u).css("paddingRight"));$(u).addClass("im_history_to_bottom"),u.scrollHeight,$(p).css({bottom:0,paddingRight:e}),onContentLoaded(function(){$(u).removeClass("im_history_to_bottom"),$(p).css({bottom:"",paddingRight:""}),r(!0),v=!1,y=!1,s()})}),a.$on("ui_history_change_scroll",function(){onContentLoaded(s)}),a.$on("ui_history_focus",function(){A||(u.scrollTop=u.scrollHeight,w(),A=!0)}),a.$on("ui_history_prepend",function(){var e=u.scrollHeight,n=u.scrollTop,i=parseInt($(u).css("paddingRight")),o=u.clientHeight;$(u).addClass("im_history_to_bottom"),u.scrollHeight,$(p).css({bottom:-(e-n-o),paddingRight:i});var r=function(){$(u).removeClass("im_history_to_bottom"),$(p).css({bottom:"",paddingRight:""}),x>=0?s():u.scrollTop=n+u.scrollHeight-e,l(),v=!1,t(function(){u.scrollHeight!=e&&$(u).trigger("scroll")}),clearTimeout(c),d()},c=setTimeout(r,0),d=a.$on("$viewContentLoaded",r)}),a.$on("ui_history_append",function(){var e=u.scrollHeight;onContentLoaded(function(){A=!1,l(),y=!1,x>=0&&s(),t(function(){u.scrollHeight!=e&&$(u).trigger("scroll")})})}),a.$on("ui_panel_update",function(){onContentLoaded(function(){r(),a.$broadcast("ui_message_send"),t(function(){$(u).trigger("scroll")})})}),a.$on("ui_selection_clear",function(){window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeA
|
|||
10 years ago
|
}}),$(e).on("resize",o),o(),onContentLoaded(o)}return{link:n}}]).directive("myContactsListMobile",["$window","$timeout",function(e){function t(t,n){function i(){$(n).css({height:$(e).height()-(o&&o.offsetHeight||0)-(a&&a.offsetHeight||0)-64})}var a=$(".contacts_modal_search")[0],o=$(".contacts_modal_panel")[0];$(e).on("resize",i),t.$on("contacts_change",function(){onContentLoaded(i)}),onContentLoaded(i)}return{link:t}}]).directive("myCountriesListMobile",["$window","$timeout",function(e){function t(t,n){function i(){$(n).css({height:$(e).height()-(o&&o.offsetHeight||0)-(a&&a.offsetHeight||0)-64})}var a=$(".countries_modal_search")[0],o=$(".countries_modal_panel")[0];$(e).on("resize",i),onContentLoaded(i)}return{link:t}}]).directive("myInfiniteScrollerMobile",function(){function e(e,t){var n=t[0],i=!1;$(n).on("scroll",function(){t.is(":visible")&&!i&&n.scrollTop>=n.scrollHeight-n.clientHeight-300&&(i=!0,e.$apply(function(){e.slice.limit+=e.slice.limitDelta||20}),onContentLoaded(function(){i=!1}))})}return{link:e,scope:!0}});
|