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.

32 lines
572 KiB

!function(o){"use strict";for(var r,e,i={},n=function(){},t="memory".split(","),p="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(",");r=t.pop();)o[r]=o[r]||i;for(;e=p.pop();)o[e]=o[e]||n}(this.console=this.console||{});
!function(e,t){function n(e){var t=e.length,n=ct.type(e);return ct.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}function r(e){var t=kt[e]={};return ct.each(e.match(pt)||[],function(e,n){t[n]=!0}),t}function i(e,n,r,i){if(ct.acceptData(e)){var o,a,s=ct.expando,u=e.nodeType,l=u?ct.cache:e,c=u?e[s]:e[s]&&s;if(c&&l[c]&&(i||l[c].data)||r!==t||"string"!=typeof n)return c||(c=u?e[s]=tt.pop()||ct.guid++:s),l[c]||(l[c]=u?{}:{toJSON:ct.noop}),("object"==typeof n||"function"==typeof n)&&(i?l[c]=ct.extend(l[c],n):l[c].data=ct.extend(l[c].data,n)),a=l[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[ct.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[ct.camelCase(n)])):o=a,o}}function o(e,t,n){if(ct.acceptData(e)){var r,i,o=e.nodeType,a=o?ct.cache:e,u=o?e[ct.expando]:ct.expando;if(a[u]){if(t&&(r=n?a[u]:a[u].data)){ct.isArray(t)?t=t.concat(ct.map(t,ct.camelCase)):t in r?t=[t]:(t=ct.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;for(;i--;)delete r[t[i]];if(n?!s(r):!ct.isEmptyObject(r))return}(n||(delete a[u].data,s(a[u])))&&(o?ct.cleanData([e],!0):ct.support.deleteExpando||a!=a.window?delete a[u]:a[u]=null)}}}function a(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(St,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:Et.test(r)?ct.parseJSON(r):r}catch(o){}ct.data(e,n,r)}else r=t}return r}function s(e){var t;for(t in e)if(("data"!==t||!ct.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function u(){return!0}function l(){return!1}function c(){try{return G.activeElement}catch(e){}}function f(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function p(e,t,n){if(ct.isFunction(t))return ct.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return ct.grep(e,function(e){return e===t!==n});if("string"==typeof t){if($t.test(t))return ct.filter(t,e,n);t=ct.filter(t,e)}return ct.grep(e,function(e){return ct.inArray(e,t)>=0!==n})}function d(e){var t=Ut.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function h(e,t){return ct.nodeName(e,"table")&&ct.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function g(e){return e.type=(null!==ct.find.attr(e,"type"))+"/"+e.type,e}function m(e){var t=on.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function y(e,t){for(var n,r=0;null!=(n=e[r]);r++)ct._data(n,"globalEval",!t||ct._data(t[r],"globalEval"))}function v(e,t){if(1===t.nodeType&&ct.hasData(e)){var n,r,i,o=ct._data(e),a=ct._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)ct.event.add(t,n,s[n][r])}a.data&&(a.data=ct.extend({},a.data))}}function b(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!ct.support.noCloneEvent&&t[ct.expando]){i=ct._data(t);for(r in i.events)ct.removeEvent(t,r,i.handle);t.removeAttribute(ct.expando)}"script"===n&&t.text!==e.text?(g(t).text=e.text,m(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),ct.support.html5Clone&&e.innerHTML&&!ct.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&tn.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function x(e,n){var r,i,o=0,a=typeof e.getElementsByTagName!==Y?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==Y?e.querySelectorAll(n||"*"):t;if(!a)for(a=[],r=e.childNodes||e;null!=(i=r[o]);o++)!n||ct.nodeName(i,n)?a.push(i):ct.merge(a,x(i,n));return n===t||n&&ct.nodeName(e,n)?ct.merge([e],a):a}function T(e){tn.test(e.type)&&(e.defaultChecked=e.checked)}function w(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=kn.length;i--;)if(t=kn[i]+n,t in e)return t;return r}function C(e,t){return e=t||e,"none"===ct.css(e,"display")||!ct.contains(e.ownerDocument,e)}function N(e,t){for(var n,r
if(m){if(o){for(;g;){for(f=t;f=f[g];)if(s?f.nodeName.toLowerCase()===y:1===f.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){for(c=m[P]||(m[P]={}),l=c[e]||[],d=l[0]===W&&l[1],p=l[0]===W&&l[2],f=d&&m.childNodes[d];f=++d&&f&&f[g]||(p=d=0)||h.pop();)if(1===f.nodeType&&++p&&f===t){c[e]=[W,d,p];break}}else if(v&&(l=(t[P]||(t[P]={}))[e])&&l[0]===W)p=l[1];else for(;(f=++d&&f&&f[g]||(p=d=0)||h.pop())&&((s?f.nodeName.toLowerCase()!==y:1!==f.nodeType)||!++p||(v&&((f[P]||(f[P]={}))[e]=[W,p]),f!==t)););return p-=i,p===r||0===p%r&&p/r>=0}}},PSEUDO:function(e,t){var r,o=k.pseudos[e]||k.setFilters[e.toLowerCase()]||n.error("unsupported pseudo: "+e);return o[P]?o(t):o.length>1?(r=[e,e,"",t],k.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,n){for(var r,i=o(e,t),a=i.length;a--;)r=nt.call(e,i[a]),e[r]=!(n[r]=i[a])}):function(e){return o(e,0,r)}):o}},pseudos:{not:i(function(e){var t=[],n=[],r=A(e.replace(lt,"$1"));return r[P]?i(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:i(function(e){return function(t){return n(e,t).length>0}}),contains:i(function(e){return function(t){return(t.textContent||t.innerText||E(t)).indexOf(e)>-1}}),lang:i(function(e){return mt.test(e||"")||n.error("unsupported lang: "+e),e=e.replace(Ct,Nt).toLowerCase(),function(t){var n;do if(n=_?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===q},focus:function(e){return e===H.activeElement&&(!H.hasFocus||H.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!k.pseudos.empty(e)},header:function(e){return Tt.test(e.nodeName)},input:function(e){return xt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[0>n?n+t:n]}),even:c(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=0>n?n+t:n;t>++r;)e.push(r);return e})}},k.pseudos.nth=k.pseudos.eq;for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})k.pseudos[w]=u(w);for(w in{submit:!0,reset:!0})k.pseudos[w]=l(w);f.prototype=k.filters=k.pseudos,k.setFilters=new f,A=n.compile=function(e,t){var n,r=[],i=[],o=X[e+" "];if(!o){for(t||(t=p(e)),n=t.length;n--;)o=v(t[n]),o[P]?r.push(o):i.push(o);o=X(e,b(i,r))}return o},C.sortStable=P.split("").sort(V).join("")===P,C.detectDuplicates=U,L(),C.sortDetached=o(function(e){return 1&e.compareDocumentPosition(H.createElement("div"))}),o(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||a("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),C.attributes&&o(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||a("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),o(function(e){return null==e.getAttribute("disabled")})||a(rt,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}
},prevAll:function(e){return ct.dir(e,"previousSibling")},nextUntil:function(e,t,n){return ct.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return ct.dir(e,"previousSibling",n)},siblings:function(e){return ct.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return ct.sibling(e.firstChild)},contents:function(e){return ct.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:ct.merge([],e.childNodes)}},function(e,t){ct.fn[e]=function(n,r){var i=ct.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=ct.filter(r,i)),this.length>1&&(Xt[e]||(i=ct.unique(i)),It.test(e)&&(i=i.reverse())),this.pushStack(i)}}),ct.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?ct.find.matchesSelector(r,e)?[r]:[]:ct.find.matches(e,ct.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){for(var i=[],o=e[n];o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!ct(o).is(r));)1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});var Ut="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Vt=/ jQuery\d+="(?:null|\d+)"/g,Yt=RegExp("<(?:"+Ut+")[\\s/>]","i"),Jt=/^\s+/,Gt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Qt=/<([\w:]+)/,Kt=/<tbody/i,Zt=/<|&#?\w+;/,en=/<(?:script|style|link)/i,tn=/^(?:checkbox|radio)$/i,nn=/checked\s*(?:[^=]|=\s*.checked.)/i,rn=/^$|\/(?:java|ecma)script/i,on=/^true\/(.*)/,an=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,sn={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:ct.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},un=d(G),ln=un.appendChild(G.createElement("div"));sn.optgroup=sn.option,sn.tbody=sn.tfoot=sn.colgroup=sn.caption=sn.thead,sn.th=sn.td,ct.fn.extend({text:function(e){return ct.access(this,function(e){return e===t?ct.text(this):this.empty().append((this[0]&&this[0].ownerDocument||G).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=h(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=h(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,r=e?ct.filter(e,this):this,i=0;null!=(n=r[i]);i++)t||1!==n.nodeType||ct.cleanData(x(n)),n.parentNode&&(t&&ct.contains(n.ownerDocument,n)&&y(x(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&ct.cleanData(x(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&ct.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return ct.clone(this,e,t)})},html:function(e){return ct.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(Vt,""):t;if(!("string"!=typeof e||en.test(e)||!ct.support.htmlSerialize&&Yt.test(e)||!ct.support.leadingWhitespace&&Jt.test(e)||sn[(Qt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(Gt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(ct.cleanData(x(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=ct.map(this,function(e){return[e.nextSibling,e.parentNode]
!function(t,e,i){"use strict";var s,o,n,l,r,h,c,a,p,d,g,u,v,f,S,m,T,y,b,w,x,$,H,C,O,E,A,Y,D;x={paneClass:"pane",sliderClass:"slider",contentClass:"content",iOSNativeScrolling:!1,preventPageScrolling:!1,disableResize:!1,alwaysVisible:!1,flashDelay:1500,sliderMinHeight:20,sliderMaxHeight:null,documentContext:null,windowContext:null},m="scrollbar",S="scroll",a="mousedown",p="mousemove",g="mousewheel",d="mouseup",f="resize",r="drag",y="up",v="panedown",n="DOMMouseScroll",l="down",b="wheel",h="keydown",c="keyup",T="touchmove",s="Microsoft Internet Explorer"===e.navigator.appName&&/msie 7./i.test(e.navigator.appVersion)&&e.ActiveXObject,o=null,O=e.requestAnimationFrame,w=e.cancelAnimationFrame,A=i.createElement("div").style,D=function(){var t,e,i,s,o,n;for(s=["t","webkitT","MozT","msT","OT"],t=o=0,n=s.length;n>o;t=++o)if(i=s[t],e=s[t]+"ransform",e in A)return s[t].substr(0,s[t].length-1);return!1}(),Y=function(t){return D===!1?!1:""===D?t:D+t.charAt(0).toUpperCase()+t.substr(1)},E=Y("transform"),H=E!==!1,$=function(){var t,e,s;return t=i.createElement("div"),e=t.style,e.position="absolute",e.width="100px",e.height="100px",e.overflow=S,e.top="-9999px",i.body.appendChild(t),s=t.offsetWidth-t.clientWidth,i.body.removeChild(t),s},C=function(){var t,i,s;return i=e.navigator.userAgent,(t=/(?=.+Mac OS X)(?=.+Firefox)/.test(i))?(s=/Firefox\/\d{2}\./.exec(i),s&&(s=s[0].replace(/\D+/g,"")),t&&+s>23):!1},u=function(){function h(s,n){this.el=s,this.options=n,o||(o=$()),this.$el=t(this.el),this.doc=t(this.options.documentContext||i),this.win=t(this.options.windowContext||e),this.$content=this.$el.children("."+n.contentClass),this.$content.attr("tabindex",this.options.tabIndex||0),this.content=this.$content[0],this.options.iOSNativeScrolling&&null!=this.el.style.WebkitOverflowScrolling?this.nativeScrolling():this.generate(),this.createEvents(),this.addEvents(),this.reset()}return h.prototype.preventScrolling=function(t,e){if(this.isActive)if(t.type===n)(e===l&&t.originalEvent.detail>0||e===y&&t.originalEvent.detail<0)&&t.preventDefault();else if(t.type===g){if(!t.originalEvent||!t.originalEvent.wheelDelta)return;(e===l&&t.originalEvent.wheelDelta<0||e===y&&t.originalEvent.wheelDelta>0)&&t.preventDefault()}},h.prototype.nativeScrolling=function(){this.$content.css({WebkitOverflowScrolling:"touch"}),this.iOSNativeScrolling=!0,this.isActive=!0},h.prototype.updateScrollValues=function(){var t;t=this.content,this.maxScrollTop=t.scrollHeight-t.clientHeight,this.prevScrollTop=this.contentScrollTop||0,this.contentScrollTop=t.scrollTop,this.iOSNativeScrolling||(this.maxSliderTop=this.paneHeight-this.sliderHeight,this.sliderTop=0===this.maxScrollTop?0:this.contentScrollTop*this.maxSliderTop/this.maxScrollTop)},h.prototype.setOnScrollStyles=function(){var t,e=this;H?(t={},t[E]="translate(0, "+this.sliderTop+"px)"):t={top:this.sliderTop},O?this.scrollRAF||(this.scrollRAF=O(function(){e.scrollRAF=null,e.slider.css(t)})):this.slider.css(t)},h.prototype.createEvents=function(){var t=this;this.events={down:function(e){return t.isBeingDragged=!0,t.offsetY=e.pageY-t.slider.offset().top,t.pane.addClass("active"),t.doc.bind(p,t.events[r]).bind(d,t.events[y]),!1},drag:function(e){return t.sliderY=e.pageY-t.$el.offset().top-t.offsetY,t.scroll(),t.updateScrollValues(),t.contentScrollTop>=t.maxScrollTop&&t.prevScrollTop!==t.maxScrollTop?t.$el.trigger("scrollend"):0===t.contentScrollTop&&0!==t.prevScrollTop&&t.$el.trigger("scrolltop"),!1},up:function(){return t.isBeingDragged=!1,t.pane.removeClass("active"),t.doc.unbind(p,t.events[r]).unbind(d,t.events[y]),!1},resize:function(){t.reset()},panedown:function(e){return t.sliderY=(e.offsetY||e.originalEvent.layerY)-.5*t.sliderHeight,t.scroll(),t.events.down(e),!1},scroll:function(e){t.isBeingDragged||(t.updateScrollValues(),t.iOSNativeScrolling||(t.sliderY=t.sliderTop,t.setOnScrollStyles()),null!=e&&(t.contentScrollTop>=t.maxScrollTop?(t.options.preventPageScrolling&&t.preventScrolling(e,l),t.prevScrollTop!==t.maxScrollTop&&t.$el.trigger("scrollend")):0===t.contentScrollTop&&(t.options.preventPageScrolling&&t.preventS
!function(e,t,i){var n=1,o=3,a=["p","div","pre","form"],r=27,s=9;e.emojiarea={path:"",spritesheetPath:"",spritesheetDimens:[],iconSize:20,icons:{},defaults:{button:null,buttonLabel:"Emojis",buttonPosition:"after"}},e.fn.emojiarea=function(t){return t=e.extend({},e.emojiarea.defaults,t),this.each(function(){var n=e(this);"contentEditable"in i.body&&t.wysiwyg!==!1?new h(n,t):new l(n,t)})};var c={};c.restoreSelection=function(){return t.getSelection?function(e){var i=t.getSelection();i.removeAllRanges();for(var n=0,o=e.length;o>n;++n)i.addRange(e[n])}:i.selection&&i.selection.createRange?function(e){e&&e.select()}:void 0}(),c.saveSelection=function(){return t.getSelection?function(){var e=t.getSelection(),i=[];if(e.rangeCount)for(var n=0,o=e.rangeCount;o>n;++n)i.push(e.getRangeAt(n));return i}:i.selection&&i.selection.createRange?function(){var e=i.selection;return"none"!==e.type.toLowerCase()?e.createRange():null}:void 0}(),c.replaceSelection=function(){return t.getSelection?function(e){var n,o=t.getSelection(),a="string"==typeof e?i.createTextNode(e):e;o.getRangeAt&&o.rangeCount&&(n=o.getRangeAt(0),n.deleteContents(),n.insertNode(i.createTextNode(" ")),n.insertNode(a),n.setStart(a,0),t.setTimeout(function(){n=i.createRange(),n.setStartAfter(a),n.collapse(!0),o.removeAllRanges(),o.addRange(n)},0))}:i.selection&&i.selection.createRange?function(e){var t=i.selection.createRange();"string"==typeof e?t.text=e:t.pasteHTML(e.outerHTML)}:void 0}(),c.insertAtCursor=function(e,t){e=" "+e;var n,o,a,r=t.value;"undefined"!=typeof t.selectionStart&&"undefined"!=typeof t.selectionEnd?(o=t.selectionStart,n=t.selectionEnd,t.value=r.substring(0,o)+e+r.substring(t.selectionEnd),t.selectionStart=t.selectionEnd=o+e.length):"undefined"!=typeof i.selection&&"undefined"!=typeof i.selection.createRange&&(t.focus(),a=i.selection.createRange(),a.text=e,a.select())},c.extend=function(e,t){if("undefined"!=typeof e&&e||(e={}),"object"==typeof t)for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e},c.escapeRegex=function(e){return(e+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")},c.htmlEntities=function(e){return String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")};var u=function(){};u.prototype.setup=function(){var e=this;this.$editor.on("focus",function(){e.hasFocus=!0}),this.$editor.on("blur",function(){e.hasFocus=!1}),this.setupButton()},u.prototype.setupButton=function(){var t,i=this;this.options.button?t=e(this.options.button):this.options.button!==!1?(t=e('<a href="javascript:void(0)">'),t.html(this.options.buttonLabel),t.addClass("emoji-button"),t.attr({title:this.options.buttonLabel}),this.$editor[this.options.buttonPosition](t)):t=e(""),t.on("click",function(e){p.show(i),e.stopPropagation()}),this.$button=t},u.createIcon=function(t){var i=t[0],n=t[1],o=t[2],a=t[3],r=e.emojiarea.spritesheetPath,s=-(e.emojiarea.iconSize*o),u=-(e.emojiarea.iconSize*n),l=e.emojiarea.spritesheetDimens[i][1]*e.emojiarea.iconSize,h=e.emojiarea.spritesheetDimens[i][0]*e.emojiarea.iconSize,p="display:inline-block;";return p+="width:"+e.emojiarea.iconSize+"px;",p+="height:"+e.emojiarea.iconSize+"px;",p+="background:url('"+r.replace("!",i)+"') "+s+"px "+u+"px no-repeat;",p+="background-size:"+l+"px "+h+"px;",'<img src="img/blank.gif" class="img" style="'+p+'" alt="'+c.htmlEntities(a)+'">'};var l=function(e,t){this.options=t,this.$textarea=e,this.$editor=e,this.setup()};l.prototype.insert=function(t){e.emojiarea.icons.hasOwnProperty(t)&&(c.insertAtCursor(t,this.$textarea[0]),this.$textarea.trigger("change"))},l.prototype.val=function(){return this.$textarea.val()},c.extend(l.prototype,u.prototype);var h=function(t,n){var o=this;this.options=n||{},this.$textarea=t,this.$editor=e("<div>").addClass("emoji-wysiwyg-editor"),this.$editor.text(t.val()),this.$editor.attr({contenteditable:"true"});var a="blur change";this.options.norealTime||(a+=" keyup"),this.$editor.on(a,function(e){return o.onChange.apply(o,[e])}),this.$editor.on("paste",function(e){return o.onPaste.apply(o,[e])}),this.$editor.on("mousedown focus",function(){i.ex
!function(t,e,n){"use strict";function r(t){return function(){var e,n,r=arguments[0],i="["+(t?t+":":"")+r+"] ",o=arguments[1],s=arguments,a=function(t){return"function"==typeof t?t.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof t?"undefined":"string"!=typeof t?JSON.stringify(t):t};for(e=i+o.replace(/\{\d+\}/g,function(t){var e,n=+t.slice(1,-1);return n+2<s.length?(e=s[n+2],"function"==typeof e?e.toString().replace(/ ?\{[\s\S]*$/,""):"undefined"==typeof e?"undefined":"string"!=typeof e?H(e):e):t}),e=e+"\nhttp://errors.angularjs.org/1.2.9/"+(t?t+"/":"")+r,n=2;n<arguments.length;n++)e=e+(2==n?"?":"&")+"p"+(n-2)+"="+encodeURIComponent(a(arguments[n]));return new Error(e)}}function i(t){if(null==t||k(t))return!1;var e=t.length;return 1===t.nodeType&&e?!0:w(t)||S(t)||0===e||"number"==typeof e&&e>0&&e-1 in t}function o(t,e,n){var r;if(t)if(C(t))for(r in t)"prototype"==r||"length"==r||"name"==r||t.hasOwnProperty&&!t.hasOwnProperty(r)||e.call(n,t[r],r);else if(t.forEach&&t.forEach!==o)t.forEach(e,n);else if(i(t))for(r=0;r<t.length;r++)e.call(n,t[r],r);else for(r in t)t.hasOwnProperty(r)&&e.call(n,t[r],r);return t}function s(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e.sort()}function a(t,e,n){for(var r=s(t),i=0;i<r.length;i++)e.call(n,t[r[i]],r[i]);return r}function u(t){return function(e,n){t(n,e)}}function c(){for(var t,e=wr.length;e;){if(e--,t=wr[e].charCodeAt(0),57==t)return wr[e]="A",wr.join("");if(90!=t)return wr[e]=String.fromCharCode(t+1),wr.join("");wr[e]="0"}return wr.unshift("0"),wr.join("")}function l(t,e){e?t.$$hashKey=e:delete t.$$hashKey}function f(t){var e=t.$$hashKey;return o(arguments,function(e){e!==t&&o(e,function(e,n){t[n]=e})}),l(t,e),t}function h(t){return parseInt(t,10)}function p(t,e){return f(new(f(function(){},{prototype:t})),e)}function $(){}function d(t){return t}function v(t){return function(){return t}}function g(t){return"undefined"==typeof t}function m(t){return"undefined"!=typeof t}function y(t){return null!=t&&"object"==typeof t}function w(t){return"string"==typeof t}function x(t){return"number"==typeof t}function b(t){return"[object Date]"===gr.call(t)}function S(t){return"[object Array]"===gr.call(t)}function C(t){return"function"==typeof t}function E(t){return"[object RegExp]"===gr.call(t)}function k(t){return t&&t.document&&t.location&&t.alert&&t.setInterval}function A(t){return t&&t.$evalAsync&&t.$watch}function O(t){return"[object File]"===gr.call(t)}function T(t){return!(!t||!(t.nodeName||t.on&&t.find))}function M(t,e,n){var r=[];return o(t,function(t,i,o){r.push(e.call(n,t,i,o))}),r}function P(t,e){return-1!=j(t,e)}function j(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0;n<t.length;n++)if(e===t[n])return n;return-1}function N(t,e){var n=j(t,e);return n>=0&&t.splice(n,1),e}function D(t,e){if(k(t)||A(t))throw mr("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");if(e){if(t===e)throw mr("cpi","Can't copy! Source and destination are identical.");if(S(t)){e.length=0;for(var n=0;n<t.length;n++)e.push(D(t[n]))}else{var r=e.$$hashKey;o(e,function(t,n){delete e[n]});for(var i in t)e[i]=D(t[i]);l(e,r)}}else e=t,t&&(S(t)?e=D(t,[]):b(t)?e=new Date(t.getTime()):E(t)?e=new RegExp(t.source):y(t)&&(e=D(t,{})));return e}function R(t,e){e=e||{};for(var n in t)t.hasOwnProperty(n)&&"$"!==n.charAt(0)&&"$"!==n.charAt(1)&&(e[n]=t[n]);return e}function q(t,e){if(t===e)return!0;if(null===t||null===e)return!1;if(t!==t&&e!==e)return!0;var r,i,o,s=typeof t,a=typeof e;if(s==a&&"object"==s){if(!S(t)){if(b(t))return b(e)&&t.getTime()==e.getTime();if(E(t)&&E(e))return t.toString()==e.toString();if(A(t)||A(e)||k(t)||k(e)||S(e))return!1;o={};for(i in t)if("$"!==i.charAt(0)&&!C(t[i])){if(!q(t[i],e[i]))return!1;o[i]=!0}for(i in e)if(!o.hasOwnProperty(i)&&"$"!==i.charAt(0)&&e[i]!==n&&!C(e[i]))return!1;return!0}if(!S(e))return!1;if((r=t.length)==e.length){for(i=0;r>i;i++)if(!q(t[i],e[i]))return!1;return!0}}return!1}function I(){return e.securityPolicy&&e.securityPolicy.isActive||e.querySelector&&!(!e.querySelector("[ng-csp]")&&!e.querySelector("[data-ng-csp
s.$scope[l]=a}return a}}]}function _e(){this.$get=["$window",function(t){return fr(t.document)}]}function Fe(){this.$get=["$log",function(t){return function(){t.error.apply(t,arguments)}}]}function He(t){var e,n,r,i={};return t?(o(t.split("\n"),function(t){r=t.indexOf(":"),e=sr(xr(t.substr(0,r))),n=xr(t.substr(r+1)),e&&(i[e]?i[e]+=", "+n:i[e]=n)}),i):i}function Le(t){var e=y(t)?t:n;return function(n){return e||(e=He(t)),n?e[sr(n)]||null:e}}function Be(t,e,n){return C(n)?n(t,e):(o(n,function(n){t=n(t,e)}),t)}function ze(t){return t>=200&&300>t}function We(){var t=/^\s*(\[|\{[^\{])/,e=/[\}\]]\s*$/,r=/^\)\]\}',?\n/,i={"Content-Type":"application/json;charset=utf-8"},s=this.defaults={transformResponse:[function(n){return w(n)&&(n=n.replace(r,""),t.test(n)&&e.test(n)&&(n=L(n))),n}],transformRequest:[function(t){return y(t)&&!O(t)?H(t):t}],headers:{common:{Accept:"application/json, text/plain, */*"},post:D(i),put:D(i),patch:D(i)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"},u=this.interceptors=[],c=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(t,e,r,i,l,h){function p(t){function r(t){var e=f({},t,{data:Be(t.data,t.headers,a.transformResponse)});return ze(t.status)?e:l.reject(e)}function i(t){function e(t){var e;o(t,function(n,r){C(n)&&(e=n(),null!=e?t[r]=e:delete t[r])})}var n,r,i,a=s.headers,u=f({},t.headers);a=f({},a.common,a[sr(t.method)]),e(a),e(u);t:for(n in a){r=sr(n);for(i in u)if(sr(i)===r)continue t;u[n]=a[n]}return u}var a={transformRequest:s.transformRequest,transformResponse:s.transformResponse},u=i(t);f(a,t),a.headers=u,a.method=ar(a.method);var c=Dn(a.url)?e.cookies()[a.xsrfCookieName||s.xsrfCookieName]:n;c&&(u[a.xsrfHeaderName||s.xsrfHeaderName]=c);var h=function(t){u=t.headers;var e=Be(t.data,Le(u),t.transformRequest);return g(t.data)&&o(u,function(t,e){"content-type"===sr(e)&&delete u[e]}),g(t.withCredentials)&&!g(s.withCredentials)&&(t.withCredentials=s.withCredentials),v(t,e,u).then(r,r)},p=[h,n],$=l.when(a);for(o(E,function(t){(t.request||t.requestError)&&p.unshift(t.request,t.requestError),(t.response||t.responseError)&&p.push(t.response,t.responseError)});p.length;){var d=p.shift(),m=p.shift();$=$.then(d,m)}return $.success=function(t){return $.then(function(e){t(e.data,e.status,e.headers,a)}),$},$.error=function(t){return $.then(null,function(e){t(e.data,e.status,e.headers,a)}),$},$}function $(){o(arguments,function(t){p[t]=function(e,n){return p(f(n||{},{method:t,url:e}))}})}function d(){o(arguments,function(t){p[t]=function(e,n,r){return p(f(r||{},{method:t,url:e,data:n}))}})}function v(e,n,r){function o(t,e,n){c&&(ze(t)?c.put(d,[t,e,He(n)]):c.remove(d)),a(e,t,n),i.$$phase||i.$apply()}function a(t,n,r){n=Math.max(n,0),(ze(n)?h.resolve:h.reject)({data:t,status:n,headers:Le(r),config:e})}function u(){var t=j(p.pendingRequests,e);-1!==t&&p.pendingRequests.splice(t,1)}var c,f,h=l.defer(),$=h.promise,d=x(e.url,e.params);if(p.pendingRequests.push(e),$.then(u,u),(e.cache||s.cache)&&e.cache!==!1&&"GET"==e.method&&(c=y(e.cache)?e.cache:y(s.cache)?s.cache:b),c)if(f=c.get(d),m(f)){if(f.then)return f.then(u,u),f;S(f)?a(f[1],f[0],D(f[2])):a(f,200,{})}else c.put(d,$);return g(f)&&t(e.method,d,n,o,r,e.timeout,e.withCredentials,e.responseType),$}function x(t,e){if(!e)return t;var n=[];return a(e,function(t,e){null===t||g(t)||(S(t)||(t=[t]),o(t,function(t){y(t)&&(t=H(t)),n.push(Y(e)+"="+Y(t))}))}),t+(-1==t.indexOf("?")?"?":"&")+n.join("&")}var b=r("$http"),E=[];return o(u,function(t){E.unshift(w(t)?h.get(t):h.invoke(t))}),o(c,function(t,e){var n=w(t)?h.get(t):h.invoke(t);E.splice(e,0,{response:function(t){return n(l.when(t))},responseError:function(t){return n(l.reject(t))}})}),p.pendingRequests=[],$("get","delete","head","jsonp"),d("post","put"),p.defaults=s,p}]}function Je(e){return 8>=lr&&"patch"===sr(e)?new ActiveXObject("Microsoft.XMLHTTP"):new t.XMLHttpRequest}function Qe(){this.$get=["$browser","$window","$document",function(t,e,n){return Ze(t,Je,t.defer,e.angular.callbacks,n[0])}]}function Ze(t,e,n,r,i){function s(t,e){var
var n,r,i=[];for(e>t.length?e=t.length:e<-t.length&&(e=-t.length),e>0?(n=0,r=e):(n=t.length+e,r=t.length);r>n;n++)i.push(t[n]);return i}}function Zn(t){return function(e,n,r){function i(t,e){for(var r=0;r<n.length;r++){var i=n[r](t,e);if(0!==i)return i}return 0}function o(t,e){return B(e)?function(e,n){return t(n,e)}:t}function s(t,e){var n=typeof t,r=typeof e;return n==r?("string"==n&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e?0:e>t?-1:1):r>n?-1:1}if(!S(e))return e;if(!n)return e;n=S(n)?n:[n],n=M(n,function(e){var n=!1,r=e||d;return w(e)&&(("+"==e.charAt(0)||"-"==e.charAt(0))&&(n="-"==e.charAt(0),e=e.substring(1)),r=t(e)),o(function(t,e){return s(r(t),r(e))},n)});for(var a=[],u=0;u<e.length;u++)a.push(e[u]);return a.sort(o(i,r))}}function Yn(t){return C(t)&&(t={link:t}),t.restrict=t.restrict||"AC",v(t)}function Kn(t,e){function n(e,n){n=n?"-"+X(n,"-"):"",t.removeClass((e?Ci:Si)+n).addClass((e?Si:Ci)+n)}var r=this,i=t.parent().controller("form")||$i,s=0,a=r.$error={},u=[];r.$name=e.name||e.ngForm,r.$dirty=!1,r.$pristine=!0,r.$valid=!0,r.$invalid=!1,i.$addControl(r),t.addClass(Ei),n(!0),r.$addControl=function(t){re(t.$name,"input"),u.push(t),t.$name&&(r[t.$name]=t)},r.$removeControl=function(t){t.$name&&r[t.$name]===t&&delete r[t.$name],o(a,function(e,n){r.$setValidity(n,!0,t)}),N(u,t)},r.$setValidity=function(t,e,o){var u=a[t];if(e)u&&(N(u,o),u.length||(s--,s||(n(e),r.$valid=!0,r.$invalid=!1),a[t]=!1,n(!0,t),i.$setValidity(t,!0,r)));else{if(s||n(e),u){if(P(u,o))return}else a[t]=u=[],s++,n(!1,t),i.$setValidity(t,!1,r);u.push(o),r.$valid=!1,r.$invalid=!0}},r.$setDirty=function(){t.removeClass(Ei).addClass(ki),r.$dirty=!0,r.$pristine=!1,i.$setDirty()},r.$setPristine=function(){t.removeClass(ki).addClass(Ei),r.$dirty=!1,r.$pristine=!0,o(u,function(t){t.$setPristine()})}}function Gn(t,e,r,i){return t.$setValidity(e,r),r?i:n}function Xn(t,e,n,i,o,s){if(!o.android){var a=!1;e.on("compositionstart",function(){a=!0}),e.on("compositionend",function(){a=!1})}var u=function(){if(!a){var r=e.val();B(n.ngTrim||"T")&&(r=xr(r)),i.$viewValue!==r&&(t.$$phase?i.$setViewValue(r):t.$apply(function(){i.$setViewValue(r)}))}};if(o.hasEvent("input"))e.on("input",u);else{var c,l=function(){c||(c=s.defer(function(){u(),c=null}))};e.on("keydown",function(t){var e=t.keyCode;91===e||e>15&&19>e||e>=37&&40>=e||l()}),o.hasEvent("paste")&&e.on("paste cut",l)}e.on("change",u),i.$render=function(){e.val(i.$isEmpty(i.$viewValue)?"":i.$viewValue)};var f,p,$=n.ngPattern;if($){var d=function(t,e){return Gn(i,"pattern",i.$isEmpty(e)||t.test(e),e)};p=$.match(/^\/(.*)\/([gim]*)$/),p?($=new RegExp(p[1],p[2]),f=function(t){return d($,t)}):f=function(n){var i=t.$eval($);if(!i||!i.test)throw r("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",$,i,z(e));return d(i,n)},i.$formatters.push(f),i.$parsers.push(f)}if(n.ngMinlength){var v=h(n.ngMinlength),g=function(t){return Gn(i,"minlength",i.$isEmpty(t)||t.length>=v,t)};i.$parsers.push(g),i.$formatters.push(g)}if(n.ngMaxlength){var m=h(n.ngMaxlength),y=function(t){return Gn(i,"maxlength",i.$isEmpty(t)||t.length<=m,t)};i.$parsers.push(y),i.$formatters.push(y)}}function tr(t,e,r,i,o,s){if(Xn(t,e,r,i,o,s),i.$parsers.push(function(t){var e=i.$isEmpty(t);return e||wi.test(t)?(i.$setValidity("number",!0),""===t?null:e?t:parseFloat(t)):(i.$setValidity("number",!1),n)}),i.$formatters.push(function(t){return i.$isEmpty(t)?"":""+t}),r.min){var a=function(t){var e=parseFloat(r.min);return Gn(i,"min",i.$isEmpty(t)||t>=e,t)};i.$parsers.push(a),i.$formatters.push(a)}if(r.max){var u=function(t){var e=parseFloat(r.max);return Gn(i,"max",i.$isEmpty(t)||e>=t,t)};i.$parsers.push(u),i.$formatters.push(u)}i.$formatters.push(function(t){return Gn(i,"number",i.$isEmpty(t)||x(t),t)})}function er(t,e,n,r,i,o){Xn(t,e,n,r,i,o);var s=function(t){return Gn(r,"url",r.$isEmpty(t)||mi.test(t),t)};r.$formatters.push(s),r.$parsers.push(s)}function nr(t,e,n,r,i,o){Xn(t,e,n,r,i,o);var s=function(t){return Gn(r,"email",r.$isEmpty(t)||yi.test(t),t)};r.$formatters.push(s),r.$parsers.push(s)}function rr(t,e,n,r){g(n.name)&&e.attr
}function a(t){return t.clone[t.clone.length-1]}var u="$$NG_REMOVED",c=r("ngRepeat");return{transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,link:function(r,l,f,h,p){var $,d,v,g,m,y,w,x,b,S=f.ngRepeat,C=S.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?\s*$/),E={$id:Ae};if(!C)throw c("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",S);if(y=C[1],w=C[2],$=C[3],$?(d=t($),v=function(t,e,n){return b&&(E[b]=t),E[x]=e,E.$index=n,d(r,E)}):(g=function(t,e){return Ae(e)},m=function(t){return t}),C=y.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/),!C)throw c("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",y);x=C[3]||C[1],b=C[2];var k={};r.$watchCollection(w,function(t){var f,h,$,d,y,w,C,E,A,O,T,M,P=l[0],j={},N=[];if(i(t))O=t,A=v||g;else{A=v||m,O=[];for(w in t)t.hasOwnProperty(w)&&"$"!=w.charAt(0)&&O.push(w);O.sort()}for(d=O.length,h=N.length=O.length,f=0;h>f;f++)if(w=t===O?f:O[f],C=t[w],E=A(w,C,f),re(E,"`track by` id"),k.hasOwnProperty(E))T=k[E],delete k[E],j[E]=T,N[f]=T;else{if(j.hasOwnProperty(E))throw o(N,function(t){t&&t.scope&&(k[t.id]=t)}),c("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}",S,E);N[f]={id:E},j[E]=!1}for(w in k)k.hasOwnProperty(w)&&(T=k[w],M=oe(T.clone),n.leave(M),o(M,function(t){t[u]=!0}),T.scope.$destroy());for(f=0,h=O.length;h>f;f++){if(w=t===O?f:O[f],C=t[w],T=N[f],N[f-1]&&(P=a(N[f-1])),T.scope){y=T.scope,$=P;do $=$.nextSibling;while($&&$[u]);s(T)!=$&&n.move(oe(T.clone),null,fr(P)),P=a(T)}else y=r.$new();y[x]=C,b&&(y[b]=w),y.$index=f,y.$first=0===f,y.$last=f===d-1,y.$middle=!(y.$first||y.$last),y.$odd=!(y.$even=0===(1&f)),T.scope||p(y,function(t){t[t.length++]=e.createComment(" end ngRepeat: "+S+" "),n.enter(t,null,fr(P)),P=t,T.scope=y,T.clone=t,j[T.id]=T})}k=j})}}}],Yi=["$animate",function(t){return function(e,n,r){e.$watch(r.ngShow,function(e){t[B(e)?"removeClass":"addClass"](n,"ng-hide")})}}],Ki=["$animate",function(t){return function(e,n,r){e.$watch(r.ngHide,function(e){t[B(e)?"addClass":"removeClass"](n,"ng-hide")})}}],Gi=Yn(function(t,e,n){t.$watch(n.ngStyle,function(t,n){n&&t!==n&&o(n,function(t,n){e.css(n,"")}),t&&e.css(t)},!0)}),Xi=["$animate",function(t){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(e,n,r,i){var s,a,u=r.ngSwitch||r.on,c=[];e.$watch(u,function(n){for(var u=0,l=c.length;l>u;u++)c[u].$destroy(),t.leave(a[u]);a=[],c=[],(s=i.cases["!"+n]||i.cases["?"])&&(e.$eval(r.change),o(s,function(n){var r=e.$new();c.push(r),n.transclude(r,function(e){var r=n.element;a.push(e),t.enter(e,r.parent(),r)})}))})}}}],to=Yn({transclude:"element",priority:800,require:"^ngSwitch",link:function(t,e,n,r,i){r.cases["!"+n.ngSwitchWhen]=r.cases["!"+n.ngSwitchWhen]||[],r.cases["!"+n.ngSwitchWhen].push({transclude:i,element:e})}}),eo=Yn({transclude:"element",priority:800,require:"^ngSwitch",link:function(t,e,n,r,i){r.cases["?"]=r.cases["?"]||[],r.cases["?"].push({transclude:i,element:e})}}),no=Yn({controller:["$element","$transclude",function(t,e){if(!e)throw r("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",z(t));this.$transclude=e}],link:function(t,e,n,r){r.$transclude(function(t){e.empty(),e.append(t)})}}),ro=["$templateCache",function(t){return{restrict:"E",terminal:!0,compile:function(e,n){if("text/ng-template"==n.type){var r=n.id,i=e[0].text;t.put(r,i)}}}}],io=r("ngOptions"),oo=v({terminal:!0}),so=["$compile","$parse",function(t,r){var i=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,a={$setViewValue:$};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(t,e,n){var r,i,o=this,s={},u=a;o.databound=n.ngModel,o.init=func
!function(e,r){"use strict";function t(){function e(e,t){return r.extend(new(r.extend(function(){},{prototype:e})),t)}function t(e,r){var t=r.caseInsensitiveMatch,n={originalPath:e,regexp:e},a=n.keys=[];return e=e.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?|\*])?/g,function(e,r,t,n){var o="?"===n?n:null,i="*"===n?n:null;return a.push({name:t,optional:!!o}),r=r||"",""+(o?"":r)+"(?:"+(o?r:"")+(i&&"(.+?)"||"([^/]+)")+(o||"")+")"+(o||"")}).replace(/([\/$\*])/g,"\\$1"),n.regexp=new RegExp("^"+e+"$",t?"i":""),n}var n={};this.when=function(e,a){if(n[e]=r.extend({reloadOnSearch:!0},a,e&&t(e,a)),e){var o="/"==e[e.length-1]?e.substr(0,e.length-1):e+"/";n[o]=r.extend({redirectTo:e},t(o,a))}return this},this.otherwise=function(e){return this.when(null,e),this},this.$get=["$rootScope","$location","$routeParams","$q","$injector","$http","$templateCache","$sce",function(t,a,o,i,c,u,l,s){function p(e,r){var t=r.keys,n={};if(!r.regexp)return null;var a=r.regexp.exec(e);if(!a)return null;for(var o=1,i=a.length;i>o;++o){var c=t[o-1],u="string"==typeof a[o]?decodeURIComponent(a[o]):a[o];c&&u&&(n[c.name]=u)}return n}function $(){var e=h(),n=m.current;e&&n&&e.$$route===n.$$route&&r.equals(e.pathParams,n.pathParams)&&!e.reloadOnSearch&&!d?(n.params=e.params,r.copy(n.params,o),t.$broadcast("$routeUpdate",n)):(e||n)&&(d=!1,t.$broadcast("$routeChangeStart",e,n),m.current=e,e&&e.redirectTo&&(r.isString(e.redirectTo)?a.path(f(e.redirectTo,e.params)).search(e.params).replace():a.url(e.redirectTo(e.pathParams,a.path(),a.search())).replace()),i.when(e).then(function(){if(e){var t,n,a=r.extend({},e.resolve);return r.forEach(a,function(e,t){a[t]=r.isString(e)?c.get(e):c.invoke(e)}),r.isDefined(t=e.template)?r.isFunction(t)&&(t=t(e.params)):r.isDefined(n=e.templateUrl)&&(r.isFunction(n)&&(n=n(e.params)),n=s.getTrustedResourceUrl(n),r.isDefined(n)&&(e.loadedTemplateUrl=n,t=u.get(n,{cache:l}).then(function(e){return e.data}))),r.isDefined(t)&&(a.$template=t),i.all(a)}}).then(function(a){e==m.current&&(e&&(e.locals=a,r.copy(e.params,o)),t.$broadcast("$routeChangeSuccess",e,n))},function(r){e==m.current&&t.$broadcast("$routeChangeError",e,n,r)}))}function h(){var t,o;return r.forEach(n,function(n){!o&&(t=p(a.path(),n))&&(o=e(n,{params:r.extend({},a.search(),t),pathParams:t}),o.$$route=n)}),o||n[null]&&e(n[null],{params:{},pathParams:{}})}function f(e,t){var n=[];return r.forEach((e||"").split(":"),function(e,r){if(0===r)n.push(e);else{var a=e.match(/(\w+)(.*)/),o=a[1];n.push(t[o]),n.push(a[2]||""),delete t[o]}}),n.join("")}var d=!1,m={routes:n,reload:function(){d=!0,t.$evalAsync($)}};return t.$on("$locationChangeSuccess",$),m}]}function n(){this.$get=function(){return{}}}function a(e,t,n){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(a,o,i,c,u){function l(){p&&(p.$destroy(),p=null),$&&(n.leave($),$=null)}function s(){var i=e.current&&e.current.locals,c=i&&i.$template;if(r.isDefined(c)){var s=a.$new(),d=e.current,m=u(s,function(e){n.enter(e,null,$||o,function(){!r.isDefined(h)||h&&!a.$eval(h)||t()}),l()});$=m,p=d.scope=s,p.$emit("$viewContentLoaded"),p.$eval(f)}else l()}var p,$,h=i.autoscroll,f=i.onload||"";a.$on("$routeChangeSuccess",s),s()}}}function o(e,r,t){return{restrict:"ECA",priority:-400,link:function(n,a){var o=t.current,i=o.locals;a.html(i.$template);var c=e(a.contents());if(o.controller){i.$scope=n;var u=r(o.controller,i);o.controllerAs&&(n[o.controllerAs]=u),a.data("$ngControllerController",u),a.children().data("$ngControllerController",u)}c(n)}}}var i=r.module("ngRoute",["ng"]).provider("$route",t);i.provider("$routeParams",n),i.directive("ngView",a),i.directive("ngView",o),a.$inject=["$route","$anchorScroll","$animate"],o.$inject=["$compile","$controller","$route"]}(window,window.angular);
!function(n,t,a){"use strict";t.module("ngAnimate",["ng"]).factory("$$animateReflow",["$window","$timeout",function(n,t){var a=n.requestAnimationFrame||n.webkitRequestAnimationFrame||function(n){return t(n,10,!1)},e=n.cancelAnimationFrame||n.webkitCancelAnimationFrame||function(n){return t.cancel(n)};return function(n){var t=a(n);return function(){e(t)}}}]).config(["$provide","$animateProvider",function(e,i){function r(n){for(var t=0;t<n.length;t++){var a=n[t];if(a.nodeType==f)return a}}function o(n,t){return r(n)==r(t)}var s=t.noop,u=t.forEach,l=i.$$selectors,f=1,c="$$ngAnimateState",m="ng-animate",d={running:!0};e.decorator("$animate",["$delegate","$injector","$sniffer","$rootElement","$timeout","$rootScope","$document",function(n,a,e,f,v,p){function g(n){return v(n,0,!1)}function y(n){if(n){var t=[],i={},r=n.substr(1).split(".");(e.transitions||e.animations)&&r.push("");for(var o=0;o<r.length;o++){var s=r[o],u=l[s];u&&!i[s]&&(t.push(a.get(u)),i[s]=!0)}return t}}function C(n,t,a,e,i,o,l){function f(n){if(A(),n===!0)return void S();var t=a.data(c);t&&(t.done=S,a.data(c,t)),d(I,"after",S)}function d(e,i,r){function o(n,t){var a=t+"Complete",i=e[n];i[a]=!0,(i[l]||s)();for(var o=0;o<e.length;o++)if(!e[o][a])return;r()}"after"==i?D():C();var l=i+"End";u(e,function(e,r){var s=function(){o(r,i)};return"before"!=i||"enter"!=n&&"move"!=n?void(e[i]?e[l]=R?e[i](a,t,s):e[i](a,s):s()):void s()})}function p(e){a.triggerHandler("$animate:"+e,{event:n,className:t})}function C(){g(function(){p("before")})}function D(){g(function(){p("after")})}function x(){l&&g(l)}function A(){A.hasBeenRun||(A.hasBeenRun=!0,o())}function S(){if(!S.hasBeenRun){S.hasBeenRun=!0;var n=a.data(c);n&&(R?b(a):(n.closeAnimationTimeout=g(function(){b(a)}),a.data(c,n))),x()}}var k,N,M=r(a);if(M&&(k=M.className,N=k+" "+t),!M||!w(N))return A(),C(),D(),void S();var F=(" "+N).replace(/\s+/g,".");e||(e=i?i.parent():a.parent());var E=y(F),R="addClass"==n||"removeClass"==n,T=a.data(c)||{};if($(a,e)||0===E.length)return A(),C(),D(),void S();var I=[],P=R?!(T.disabled||T.running&&T.structural):!0;if(P&&u(E,function(e){if(!e.allowCancel||e.allowCancel(a,n,t)){var i,r=e[n];"leave"==n?(i=r,r=null):i=e["before"+n.charAt(0).toUpperCase()+n.substr(1)],I.push({before:i,after:r})}}),0===I.length)return A(),C(),D(),void x();var O=" ",B=O+k+O;if(T.running){v.cancel(T.closeAnimationTimeout),b(a),h(T.animations);var q=R&&!T.structural,W=q&&T.className==t&&n!=T.event;T.beforeComplete||W?(T.done||s)(!0):q&&(B="removeClass"==T.event?B.replace(O+T.className+O,O):B+T.className+O)}var j=O+t+O;return"addClass"==n&&B.indexOf(j)>=0||"removeClass"==n&&-1==B.indexOf(j)?(A(),C(),D(),void x()):(a.addClass(m),a.data(c,{running:!0,event:n,className:t,structural:!R,animations:I,done:f}),void d(I,"before",f))}function D(n){var a=r(n);u(a.querySelectorAll("."+m),function(n){n=t.element(n);var a=n.data(c);a&&(h(a.animations),b(n))})}function h(n){var t=!0;u(n,function(n){n.beforeComplete||(n.beforeEnd||s)(t),n.afterComplete||(n.afterEnd||s)(t)})}function b(n){o(n,f)?d.disabled||(d.running=!1,d.structural=!1):(n.removeClass(m),n.removeData(c))}function $(n,t){if(d.disabled)return!0;if(o(n,f))return d.disabled||d.running;do{if(0===t.length)break;var a=o(t,f),e=a?d:t.data(c),i=e&&(!!e.disabled||!!e.running);if(a||i)return i;if(a)return!0}while(t=t.parent());return!0}f.data(c,d),p.$$postDigest(function(){p.$$postDigest(function(){d.running=!1})});var x=i.classNameFilter(),w=x?function(n){return x.test(n)}:function(){return!0};return{enter:function(t,a,e,i){this.enabled(!1,t),n.enter(t,a,e),p.$$postDigest(function(){C("enter","ng-enter",t,a,e,s,i)})},leave:function(t,a){D(t),this.enabled(!1,t),p.$$postDigest(function(){C("leave","ng-leave",t,null,null,function(){n.leave(t)},a)})},move:function(t,a,e,i){D(t),this.enabled(!1,t),n.move(t,a,e),p.$$postDigest(function(){C("move","ng-move",t,a,e,s,i)})},addClass:function(t,a,e){C("addClass",a,t,null,null,function(){n.addClass(t,a)},e)},removeClass:function(t,a,e){C("removeClass",a,t,null,null,function(){n.removeClass(t,a)},e)},enabled:function(n,t){switch(argumen
!function(e,t){"use strict";function r(){this.$get=["$$sanitizeUri",function(e){return function(t){var r=[];return s(t,c(r,function(t,r){return!/^unsafe/.test(e(t,r))})),r.join("")}}]}function n(e){var r=[],n=c(r,t.noop);return n.chars(e),r.join("")}function a(e){var t,r={},n=e.split(",");for(t=0;t<n.length;t++)r[n[t]]=!0;return r}function s(e,r){function n(e,n,s,o){if(n=t.lowercase(n),k[n])for(;v.last()&&y[v.last()];)a("",v.last());z[n]&&v.last()==n&&a("",n),o=w[n]||!!o,o||v.push(n);var c={};s.replace(f,function(e,t,r,n,a){var s=r||n||a||"";c[t]=i(s)}),r.start&&r.start(n,c,o)}function a(e,n){var a,s=0;if(n=t.lowercase(n))for(s=v.length-1;s>=0&&v[s]!=n;s--);if(s>=0){for(a=v.length-1;a>=s;a--)r.end&&r.end(v[a]);v.length=s}}var s,o,c,v=[],x=e;for(v.last=function(){return v[v.length-1]};e;){if(o=!0,v.last()&&C[v.last()])e=e.replace(new RegExp("(.*)<\\s*\\/\\s*"+v.last()+"[^>]*>","i"),function(e,t){return t=t.replace(d,"$1").replace(b,"$1"),r.chars&&r.chars(i(t)),""}),a("",v.last());else if(0===e.indexOf("<!--")?(s=e.indexOf("--",4),s>=0&&e.lastIndexOf("-->",s)===s&&(r.comment&&r.comment(e.substring(4,s)),e=e.substring(s+3),o=!1)):m.test(e)?(c=e.match(m),c&&(e=e.replace(c[0],""),o=!1)):g.test(e)?(c=e.match(p),c&&(e=e.substring(c[0].length),c[0].replace(p,a),o=!1)):h.test(e)&&(c=e.match(u),c&&(e=e.substring(c[0].length),c[0].replace(u,n),o=!1)),o){s=e.indexOf("<");var $=0>s?e:e.substring(0,s);e=0>s?"":e.substring(s),r.chars&&r.chars(i($))}if(e==x)throw l("badparse","The sanitizer was unable to parse the following block of html: {0}",e);x=e}a()}function i(e){if(!e)return"";var t=S.exec(e),r=t[1],n=t[3],a=t[2];return a&&(A.innerHTML=a.replace(/</g,"&lt;"),a="textContent"in A?A.textContent:A.innerText),r+a+n}function o(e){return e.replace(/&/g,"&amp;").replace(v,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function c(e,r){var n=!1,a=t.bind(e,e.push);return{start:function(e,s,i){e=t.lowercase(e),!n&&C[e]&&(n=e),n||E[e]!==!0||(a("<"),a(e),t.forEach(s,function(n,s){var i=t.lowercase(s),c="img"===e&&"src"===i||"background"===i;T[i]!==!0||O[i]===!0&&!r(n,c)||(a(" "),a(s),a('="'),a(o(n)),a('"'))}),a(i?"/>":">"))},end:function(e){e=t.lowercase(e),n||E[e]!==!0||(a("</"),a(e),a(">")),e==n&&(n=!1)},chars:function(e){n||a(o(e))}}}var l=t.$$minErr("$sanitize"),u=/^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,p=/^<\s*\/\s*([\w:-]+)[^>]*>/,f=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,h=/^</,g=/^<\s*\//,d=/<!--(.*?)-->/g,m=/<!DOCTYPE([^>]*?)>/i,b=/<!\[CDATA\[(.*?)]]>/g,v=/([^\#-~| |!])/g,w=a("area,br,col,hr,img,wbr"),x=a("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),$=a("rp,rt"),z=t.extend({},$,x),k=t.extend({},x,a("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")),y=t.extend({},$,a("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),C=a("script,style"),E=t.extend({},w,k,y,z),O=a("background,cite,href,longdesc,src,usemap"),T=t.extend({},O,a("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,target,title,type,valign,value,vspace,width")),A=document.createElement("pre"),S=/^(\s*)([\s\S]*?)(\s*)$/;t.module("ngSanitize",[]).provider("$sanitize",r),t.module("ngSanitize").filter("linky",["$sanitize",function(e){var r=/((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>]/,a=/^mailto:/;return function(s,i){function o(e){e&&h.push(n(e))}function c(e,r){h.push("<a "),t.isDefined(i)&&(h.push('target="'),h.push(i),h.push('" ')),h.push('href="'),h.push(e),h.push('">'),o(r),h.push("</a>")}if(!s)return s;for(var l,u,p,f=s,h=[];l=f.match(r);)u=l[0],l[2]==l[3]&&(u="mailto:"+u),p=l.index,o(f.substr(0,p)
angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.transition","ui.bootstrap.collapse","ui.bootstrap.dropdownToggle","ui.bootstrap.modal","ui.bootstrap.position","ui.bootstrap.bindHtml","ui.bootstrap.tooltip"]),angular.module("ui.bootstrap.tpls",["template/modal/backdrop.html","template/modal/window.html","template/tooltip/tooltip-html-unsafe-popup.html","template/tooltip/tooltip-popup.html"]),angular.module("ui.bootstrap.transition",[]).factory("$transition",["$q","$timeout","$rootScope",function(t,n,e){function o(t){for(var n in t)if(void 0!==a.style[n])return t[n]}var i=function(o,a,l){l=l||{};var r=t.defer(),s=i[l.animation?"animationEndEventName":"transitionEndEventName"],c=function(){e.$apply(function(){o.unbind(s,c),r.resolve(o)})};return s&&o.bind(s,c),n(function(){angular.isString(a)?o.addClass(a):angular.isFunction(a)?a(o):angular.isObject(a)&&o.css(a),s||r.resolve(o)}),r.promise.cancel=function(){s&&o.unbind(s,c),r.reject("Transition cancelled")},r.promise},a=document.createElement("trans"),l={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"},r={WebkitTransition:"webkitAnimationEnd",MozTransition:"animationend",OTransition:"oAnimationEnd",transition:"animationend"};return i.transitionEndEventName=o(l),i.animationEndEventName=o(r),i}]),angular.module("ui.bootstrap.collapse",["ui.bootstrap.transition"]).directive("collapse",["$transition",function(t){return{link:function(n,e,o){function i(n){function o(){c===i&&(c=void 0)}var i=t(e,n);return c&&c.cancel(),c=i,i.then(o,o),i}function a(){p?(p=!1,l()):(e.removeClass("collapse").addClass("collapsing"),i({height:e[0].scrollHeight+"px"}).then(l))}function l(){e.removeClass("collapsing"),e.addClass("collapse in"),e.css({height:"auto"})}function r(){if(p)p=!1,s(),e.css({height:0});else{e.css({height:e[0].scrollHeight+"px"});{e[0].offsetWidth}e.removeClass("collapse in").addClass("collapsing"),i({height:0}).then(s)}}function s(){e.removeClass("collapsing"),e.addClass("collapse")}var c,p=!0;n.$watch(o.collapse,function(t){t?r():a()})}}}]),angular.module("ui.bootstrap.dropdownToggle",[]).directive("dropdownToggle",["$document","$location",function(t){var n=null,e=angular.noop;return{restrict:"CA",link:function(o,i){o.$watch("$location.path",function(){e()}),i.parent().bind("click",function(){e()}),i.bind("click",function(o){var a=i===n;o.preventDefault(),o.stopPropagation(),n&&e(),a||i.hasClass("disabled")||i.prop("disabled")||(i.parent().addClass("open"),n=i,e=function(o){o&&(o.preventDefault(),o.stopPropagation()),t.unbind("click",e),i.parent().removeClass("open"),e=angular.noop,n=null},t.bind("click",e))})}}}]),angular.module("ui.bootstrap.modal",["ui.bootstrap.transition"]).factory("$$stackedMap",function(){return{createNew:function(){var t=[];return{add:function(n,e){t.push({key:n,value:e})},get:function(n){for(var e=0;e<t.length;e++)if(n==t[e].key)return t[e]},keys:function(){for(var n=[],e=0;e<t.length;e++)n.push(t[e].key);return n},top:function(){return t[t.length-1]},remove:function(n){for(var e=-1,o=0;o<t.length;o++)if(n==t[o].key){e=o;break}return t.splice(e,1)[0]},removeTop:function(){return t.splice(t.length-1,1)[0]},length:function(){return t.length}}}}}).directive("modalBackdrop",["$timeout",function(t){return{restrict:"EA",replace:!0,templateUrl:"template/modal/backdrop.html",link:function(n){n.animate=!1,t(function(){n.animate=!0})}}}]).directive("modalWindow",["$modalStack","$timeout",function(t,n){return{restrict:"EA",scope:{index:"@",animate:"="},replace:!0,transclude:!0,templateUrl:"template/modal/window.html",link:function(e,o,i){e.windowClass=i.windowClass||"",n(function(){e.animate=!0,o[0].focus()}),e.close=function(n){var e=t.getTop();e&&e.value.backdrop&&"static"!=e.value.backdrop&&n.target===n.currentTarget&&(n.preventDefault(),n.stopPropagation(),t.dismiss(e.key,"backdrop click"))}}}}]).factory("$modalStack",["$transition","$timeout","$document","$compile","$rootScope","$$stackedMap",function(t,n,e,o,i,a){function l(){for(var t=-1,n=f.keys(),e=0;e<n.length
!function(){"use strict";var e=angular.module("pasvaz.bindonce",[]);e.directive("bindonce",function(){var e=function(e){if(e&&0!==e.length){var t=angular.lowercase(""+e);e=!("f"===t||"0"===t||"false"===t||"no"===t||"n"===t||"[]"===t)}else e=!1;return e},t=parseInt((/msie (\d+)/.exec(angular.lowercase(navigator.userAgent))||[])[1],10);isNaN(t)&&(t=parseInt((/trident\/.*; rv:(\d+)/.exec(angular.lowercase(navigator.userAgent))||[])[1],10));var r={restrict:"AM",controller:["$scope","$element","$attrs","$interpolate",function(r,a,i,n){var c=function(t,r,a){var i="show"===r?"":"none",n="hide"===r?"":"none";t.css("display",e(a)?i:n)},o=function(e,t){if(angular.isObject(t)&&!angular.isArray(t)){var r=[];angular.forEach(t,function(e,t){e&&r.push(t)}),t=r}t&&e.addClass(angular.isArray(t)?t.join(" "):t)},s=function(e,t){e.transclude(t,function(t){var r=e.element.parent(),a=e.element&&e.element[e.element.length-1],i=r&&r[0]||a&&a.parentNode,n=a&&a.nextSibling||null;angular.forEach(t,function(e){i.insertBefore(e,n)})})},l={watcherRemover:void 0,binders:[],group:i.boName,element:a,ran:!1,addBinder:function(e){this.binders.push(e),this.ran&&this.runBinders()},setupWatcher:function(e){var t=this;this.watcherRemover=r.$watch(e,function(e){void 0!==e&&(t.removeWatcher(),t.checkBindonce(e))},!0)},checkBindonce:function(e){var t=this,r=e.$promise?e.$promise.then:e.then;"function"==typeof r?r(function(){t.runBinders()}):t.runBinders()},removeWatcher:function(){void 0!==this.watcherRemover&&(this.watcherRemover(),this.watcherRemover=void 0)},runBinders:function(){for(;this.binders.length>0;){var r=this.binders.shift();if(!this.group||this.group==r.group){var a=r.scope.$eval(r.interpolate?n(r.value):r.value);switch(r.attr){case"boIf":e(a)&&s(r,r.scope.$new());break;case"boSwitch":var i,l=r.controller[0];(i=l.cases["!"+a]||l.cases["?"])&&(r.scope.$eval(r.attrs.change),angular.forEach(i,function(e){s(e,r.scope.$new())}));break;case"boSwitchWhen":var u=r.controller[0];u.cases["!"+r.attrs.boSwitchWhen]=u.cases["!"+r.attrs.boSwitchWhen]||[],u.cases["!"+r.attrs.boSwitchWhen].push({transclude:r.transclude,element:r.element});break;case"boSwitchDefault":var u=r.controller[0];u.cases["?"]=u.cases["?"]||[],u.cases["?"].push({transclude:r.transclude,element:r.element});break;case"hide":case"show":c(r.element,r.attr,a);break;case"class":o(r.element,a);break;case"text":r.element.text(a);break;case"html":r.element.html(a);break;case"style":r.element.css(a);break;case"src":r.element.attr(r.attr,a),t&&r.element.prop("src",a);break;case"attr":angular.forEach(r.attrs,function(e,t){var a,i;t.match(/^boAttr./)&&r.attrs[t]&&(a=t.replace(/^boAttr/,"").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=r.scope.$eval(r.attrs[t]),r.element.attr(a,i))});break;case"href":case"alt":case"title":case"id":case"value":r.element.attr(r.attr,a)}}}this.ran=!0}};return l}],link:function(e,t,r,a){var i=r.bindonce&&e.$eval(r.bindonce);void 0!==i?a.checkBindonce(i):(a.setupWatcher(r.bindonce),t.bind("$destroy",a.removeWatcher))}};return r}),angular.forEach([{directiveName:"boShow",attribute:"show"},{directiveName:"boHide",attribute:"hide"},{directiveName:"boClass",attribute:"class"},{directiveName:"boText",attribute:"text"},{directiveName:"boBind",attribute:"text"},{directiveName:"boHtml",attribute:"html"},{directiveName:"boSrcI",attribute:"src",interpolate:!0},{directiveName:"boSrc",attribute:"src"},{directiveName:"boHrefI",attribute:"href",interpolate:!0},{directiveName:"boHref",attribute:"href"},{directiveName:"boAlt",attribute:"alt"},{directiveName:"boTitle",attribute:"title"},{directiveName:"boId",attribute:"id"},{directiveName:"boStyle",attribute:"style"},{directiveName:"boValue",attribute:"value"},{directiveName:"boAttr",attribute:"attr"},{directiveName:"boIf",transclude:"element",terminal:!0,priority:1e3},{directiveName:"boSwitch",require:"boSwitch",controller:function(){this.cases={}}},{directiveName:"boSwitchWhen",transclude:"element",priority:800,require:"^boSwitch"},{directiveName:"boSwitchDefault",transclude:"element",priority:800,require:"^boSwitch"}],function(t){var
function BigInteger(t,i,r){null!=t&&("number"==typeof t?this.fromNumber(t,i,r):null==i&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,i))}function nbi(){return new BigInteger(null)}function am1(t,i,r,n,o,e){for(;--e>=0;){var s=i*this[t++]+r[n]+o;o=Math.floor(s/67108864),r[n++]=67108863&s}return o}function am2(t,i,r,n,o,e){for(var s=32767&i,h=i>>15;--e>=0;){var p=32767&this[t],u=this[t++]>>15,a=h*p+u*s;p=s*p+((32767&a)<<15)+r[n]+(1073741823&o),o=(p>>>30)+(a>>>15)+h*u+(o>>>30),r[n++]=1073741823&p}return o}function am3(t,i,r,n,o,e){for(var s=16383&i,h=i>>14;--e>=0;){var p=16383&this[t],u=this[t++]>>14,a=h*p+u*s;p=s*p+((16383&a)<<14)+r[n]+o,o=(p>>28)+(a>>14)+h*u,r[n++]=268435455&p}return o}function int2char(t){return BI_RM.charAt(t)}function intAt(t,i){var r=BI_RC[t.charCodeAt(i)];return null==r?-1:r}function bnpCopyTo(t){for(var i=this.t-1;i>=0;--i)t[i]=this[i];t.t=this.t,t.s=this.s}function bnpFromInt(t){this.t=1,this.s=0>t?-1:0,t>0?this[0]=t:-1>t?this[0]=t+this.DV:this.t=0}function nbv(t){var i=nbi();return i.fromInt(t),i}function bnpFromString(t,i,r){var n;if(16==i)n=4;else if(8==i)n=3;else if(256==i)n=8;else if(2==i)n=1;else if(32==i)n=5;else{if(4!=i)return void this.fromRadix(t,i);n=2}this.t=0,this.s=0;for(var o=t.length,e=!1,s=0;--o>=0;){var h=8==n?255&t[o]:intAt(t,o);0>h?"-"==t.charAt(o)&&(e=!0):(e=!1,0==s?this[this.t++]=h:s+n>this.DB?(this[this.t-1]|=(h&(1<<this.DB-s)-1)<<s,this[this.t++]=h>>this.DB-s):this[this.t-1]|=h<<s,s+=n,s>=this.DB&&(s-=this.DB))}8==n&&0!=(128&t[0])&&r&&(this.s=-1,s>0&&(this[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),e&&BigInteger.ZERO.subTo(this,this)}function bnpClamp(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t}function bnToString(t){if(this.s<0)return"-"+this.negate().toString(t);var i;if(16==t)i=4;else if(8==t)i=3;else if(2==t)i=1;else if(32==t)i=5;else{if(4!=t)return this.toRadix(t);i=2}var r,n=(1<<i)-1,o=!1,e="",s=this.t,h=this.DB-s*this.DB%i;if(s-->0)for(h<this.DB&&(r=this[s]>>h)>0&&(o=!0,e=int2char(r));s>=0;)i>h?(r=(this[s]&(1<<h)-1)<<i-h,r|=this[--s]>>(h+=this.DB-i)):(r=this[s]>>(h-=i)&n,0>=h&&(h+=this.DB,--s)),r>0&&(o=!0),o&&(e+=int2char(r));return o?e:"0"}function bnNegate(){var t=nbi();return BigInteger.ZERO.subTo(this,t),t}function bnAbs(){return this.s<0?this.negate():this}function bnCompareTo(t){var i=this.s-t.s;if(0!=i)return i;var r=this.t;if(i=r-t.t,0!=i)return this.s<0?-i:i;for(;--r>=0;)if(0!=(i=this[r]-t[r]))return i;return 0}function nbits(t){var i,r=1;return 0!=(i=t>>>16)&&(t=i,r+=16),0!=(i=t>>8)&&(t=i,r+=8),0!=(i=t>>4)&&(t=i,r+=4),0!=(i=t>>2)&&(t=i,r+=2),0!=(i=t>>1)&&(t=i,r+=1),r}function bnBitLength(){return this.t<=0?0:this.DB*(this.t-1)+nbits(this[this.t-1]^this.s&this.DM)}function bnpDLShiftTo(t,i){var r;for(r=this.t-1;r>=0;--r)i[r+t]=this[r];for(r=t-1;r>=0;--r)i[r]=0;i.t=this.t+t,i.s=this.s}function bnpDRShiftTo(t,i){for(var r=t;r<this.t;++r)i[r-t]=this[r];i.t=Math.max(this.t-t,0),i.s=this.s}function bnpLShiftTo(t,i){var r,n=t%this.DB,o=this.DB-n,e=(1<<o)-1,s=Math.floor(t/this.DB),h=this.s<<n&this.DM;for(r=this.t-1;r>=0;--r)i[r+s+1]=this[r]>>o|h,h=(this[r]&e)<<n;for(r=s-1;r>=0;--r)i[r]=0;i[s]=h,i.t=this.t+s+1,i.s=this.s,i.clamp()}function bnpRShiftTo(t,i){i.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)return void(i.t=0);var n=t%this.DB,o=this.DB-n,e=(1<<n)-1;i[0]=this[r]>>n;for(var s=r+1;s<this.t;++s)i[s-r-1]|=(this[s]&e)<<o,i[s-r]=this[s]>>n;n>0&&(i[this.t-r-1]|=(this.s&e)<<o),i.t=this.t-r,i.clamp()}function bnpSubTo(t,i){for(var r=0,n=0,o=Math.min(t.t,this.t);o>r;)n+=this[r]-t[r],i[r++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n-=t.s;r<this.t;)n+=this[r],i[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<t.t;)n-=t[r],i[r++]=n&this.DM,n>>=this.DB;n-=t.s}i.s=0>n?-1:0,-1>n?i[r++]=this.DV+n:n>0&&(i[r++]=n),i.t=r,i.clamp()}function bnpMultiplyTo(t,i){var r=this.abs(),n=t.abs(),o=r.t;for(i.t=o+n.t;--o>=0;)i[o]=0;for(o=0;o<n.t;++o)i[o+r.t]=r.am(0,n[o],i,o,0,r.t);i.s=0,i.clamp(),this.s!=t.s&&BigInteger.ZERO.subTo(i,i)}function bnpSquareTo(t){for(var i=this.abs(),r=t.t=2*i.t;--r>=0;)t[r]=0;for(r=0;r<i.t-1;++r){var n=i.a
var CryptoJS=CryptoJS||function(t,e){var r={},i=r.lib={},n=i.Base=function(){function t(){}return{extend:function(e){t.prototype=this;var r=new t;return e&&r.mixIn(e),r.hasOwnProperty("init")||(r.init=function(){r.$super.init.apply(this,arguments)}),r.init.prototype=r,r.$super=this,r},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),o=i.WordArray=n.extend({init:function(t,r){t=this.words=t||[],this.sigBytes=r!=e?r:4*t.length},toString:function(t){return(t||c).stringify(this)},concat:function(t){var e=this.words,r=t.words,i=this.sigBytes,n=t.sigBytes;if(this.clamp(),i%4)for(var o=0;n>o;o++){var s=r[o>>>2]>>>24-o%4*8&255;e[i+o>>>2]|=s<<24-(i+o)%4*8}else if(r.length>65535)for(var o=0;n>o;o+=4)e[i+o>>>2]=r[o>>>2];else for(var o=0;o<r.length;o++)e.push(r[o]);return this.sigBytes+=n,this},clamp:function(){var e=this.words,r=this.sigBytes;e[r>>>2]&=4294967295<<32-r%4*8,e.length=t.ceil(r/4)},clone:function(){var t=n.clone.call(this);return t.words=this.words.slice(0),t},random:function(e){for(var r=[],i=0;e>i;i+=4)r.push(4294967296*t.random()|0);return new o.init(r,e)}}),s=r.enc={},c=s.Hex={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;r>n;n++){var o=e[n>>>2]>>>24-n%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;e>i;i+=2)r[i>>>3]|=parseInt(t.substr(i,2),16)<<24-i%8*4;return new o.init(r,e/2)}},a=s.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;r>n;n++){var o=e[n>>>2]>>>24-n%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;e>i;i++)r[i>>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;return new o.init(r,e)}},f=s.Utf8={stringify:function(t){try{return decodeURIComponent(escape(a.stringify(t)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(t){return a.parse(unescape(encodeURIComponent(t)))}},h=i.BufferedBlockAlgorithm=n.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=f.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var r=this._data,i=r.words,n=r.sigBytes,s=this.blockSize,c=4*s,a=n/c;a=e?t.ceil(a):t.max((0|a)-this._minBufferSize,0);var f=a*s,h=t.min(4*f,n);if(f){for(var u=0;f>u;u+=s)this._doProcessBlock(i,u);var p=i.splice(0,f);r.sigBytes-=h}return new o.init(p,h)},clone:function(){var t=n.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),u=(i.Hasher=h.extend({cfg:n.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){h.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){t&&this._append(t);var e=this._doFinalize();return e},blockSize:16,_createHelper:function(t){return function(e,r){return new t.init(r).finalize(e)}},_createHmacHelper:function(t){return function(e,r){return new u.HMAC.init(t,r).finalize(e)}}}),r.algo={});return r}(Math);CryptoJS.lib.Cipher||function(t){var e=CryptoJS,r=e.lib,i=r.Base,n=r.WordArray,o=r.BufferedBlockAlgorithm,s=e.enc,c=(s.Utf8,s.Base64),a=e.algo,f=a.EvpKDF,h=r.Cipher=o.extend({cfg:i.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,r){this.cfg=this.cfg.extend(r),this._xformMode=t,this._key=e,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){t&&this._append(t);var e=this._doFinalize();return e},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?x:k}return function(e){return{encrypt:function(r,i,n){return t(i).encrypt(e,r,i,n)},decrypt:function(r,i,n){return t(i).decrypt(e,r,i,n)}}}}()}),u
(function(){"use strict";function t(t){throw t}function r(t,r){var e=t.split("."),i=c;!(e[0]in i)&&i.execScript&&i.execScript("var "+e[0]);for(var n;e.length&&(n=e.shift());)e.length||r===f?i=i[n]?i[n]:i[n]={}:i[n]=r}function e(t,r,e){var i,n="number"==typeof r?r:r=0,s="number"==typeof e?e:t.length;for(i=-1,n=7&s;n--;++r)i=i>>>8^g[255&(i^t[r])];for(n=s>>3;n--;r+=8)i=i>>>8^g[255&(i^t[r])],i=i>>>8^g[255&(i^t[r+1])],i=i>>>8^g[255&(i^t[r+2])],i=i>>>8^g[255&(i^t[r+3])],i=i>>>8^g[255&(i^t[r+4])],i=i>>>8^g[255&(i^t[r+5])],i=i>>>8^g[255&(i^t[r+6])],i=i>>>8^g[255&(i^t[r+7])];return(4294967295^i)>>>0}function i(){}function n(t){var r,e,i,n,s,a,h,o,u,f=t.length,c=0,p=Number.POSITIVE_INFINITY;for(o=0;f>o;++o)t[o]>c&&(c=t[o]),t[o]<p&&(p=t[o]);for(r=1<<c,e=new(l?Uint32Array:Array)(r),i=1,n=0,s=2;c>=i;){for(o=0;f>o;++o)if(t[o]===i){for(a=0,h=n,u=0;i>u;++u)a=a<<1|1&h,h>>=1;for(u=a;r>u;u+=s)e[u]=i<<16|o;++n}++i,n<<=1,s<<=1}return[e,c,p]}function s(r,e){switch(this.i=[],this.j=32768,this.d=this.f=this.c=this.n=0,this.input=l?new Uint8Array(r):r,this.o=!1,this.k=k,this.w=!1,(e||!(e={}))&&(e.index&&(this.c=e.index),e.bufferSize&&(this.j=e.bufferSize),e.bufferType&&(this.k=e.bufferType),e.resize&&(this.w=e.resize)),this.k){case m:this.a=32768,this.b=new(l?Uint8Array:Array)(32768+this.j+258);break;case k:this.a=0,this.b=new(l?Uint8Array:Array)(this.j),this.e=this.D,this.q=this.A,this.l=this.C;break;default:t(Error("invalid inflate mode"))}}function a(r,e){for(var i,n=r.f,s=r.d,a=r.input,h=r.c;e>s;)i=a[h++],i===f&&t(Error("input buffer is broken")),n|=i<<s,s+=8;return i=n&(1<<e)-1,r.f=n>>>e,r.d=s-e,r.c=h,i}function h(t,r){for(var e,i,n,s=t.f,a=t.d,h=t.input,o=t.c,u=r[0],c=r[1];c>a&&(e=h[o++],e!==f);)s|=e<<a,a+=8;return i=u[s&(1<<c)-1],n=i>>>16,t.f=s>>n,t.d=a-n,t.c=o,65535&i}function o(t){function r(t,r,e){var i,n,s,o;for(o=0;t>o;)switch(i=h(this,r)){case 16:for(s=3+a(this,2);s--;)e[o++]=n;break;case 17:for(s=3+a(this,3);s--;)e[o++]=0;n=0;break;case 18:for(s=11+a(this,7);s--;)e[o++]=0;n=0;break;default:n=e[o++]=i}return e}var e,i,s,o,u=a(t,5)+257,f=a(t,5)+1,c=a(t,4)+4,p=new(l?Uint8Array:Array)(N.length);for(o=0;c>o;++o)p[N[o]]=a(t,3);e=n(p),i=new(l?Uint8Array:Array)(u),s=new(l?Uint8Array:Array)(f),t.l(n(r.call(t,u,e,i)),n(r.call(t,f,e,s)))}function u(t){this.input=t,this.c=0,this.m=[],this.s=!1}var f=void 0,c=this,l="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array;new(l?Uint8Array:Array)(256);var p;for(p=0;256>p;++p)for(var y=p,b=7,y=y>>>1;y;y>>>=1)--b;var d=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444
this.goog={provide:function(){},math:{}},goog.provide("goog.math.Long"),goog.math.Long=function(o,t){this.low_=0|o,this.high_=0|t},goog.math.Long.IntCache_={},goog.math.Long.fromInt=function(o){if(o>=-128&&128>o){var t=goog.math.Long.IntCache_[o];if(t)return t}var g=new goog.math.Long(0|o,0>o?-1:0);return o>=-128&&128>o&&(goog.math.Long.IntCache_[o]=g),g},goog.math.Long.fromNumber=function(o){return isNaN(o)||!isFinite(o)?goog.math.Long.ZERO:o<=-goog.math.Long.TWO_PWR_63_DBL_?goog.math.Long.MIN_VALUE:o+1>=goog.math.Long.TWO_PWR_63_DBL_?goog.math.Long.MAX_VALUE:0>o?goog.math.Long.fromNumber(-o).negate():new goog.math.Long(o%goog.math.Long.TWO_PWR_32_DBL_|0,o/goog.math.Long.TWO_PWR_32_DBL_|0)},goog.math.Long.fromBits=function(o,t){return new goog.math.Long(o,t)},goog.math.Long.fromString=function(o,t){if(0==o.length)throw Error("number format error: empty string");var g=t||10;if(2>g||g>36)throw Error("radix out of range: "+g);if("-"==o.charAt(0))return goog.math.Long.fromString(o.substring(1),g).negate();if(o.indexOf("-")>=0)throw Error('number format error: interior "-" character: '+o);for(var n=goog.math.Long.fromNumber(Math.pow(g,8)),h=goog.math.Long.ZERO,r=0;r<o.length;r+=8){var i=Math.min(8,o.length-r),a=parseInt(o.substring(r,r+i),g);if(8>i){var e=goog.math.Long.fromNumber(Math.pow(g,i));h=h.multiply(e).add(goog.math.Long.fromNumber(a))}else h=h.multiply(n),h=h.add(goog.math.Long.fromNumber(a))}return h},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(o){var t=o||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 g=goog.math.Long.fromNumber(t),n=this.div(g),h=n.multiply(g).subtract(this);return n.toString(t)+h.toInt().toString(t)}return"-"+this.negate().toString(t)}for(var r=goog.math.Long.fromNumber(Math.pow(t,6)),h=this,i="";;){var a=h.div(r),e=h.subtract(a.multiply(r)).toInt(),m=e.toString(t);if(h=a,h.isZero())return m+i;for(;m.length<6;)m="0"+m;i=""+m+i}},goog.math.Long.prototype.getHighBits=function(){return this.high_},goog.math.Long.prototype.getLowBits=function(){return this.low_},goog.math.Long.prototype.getLowBitsUnsigned=function(){return this.low_>=0?this.low_:goog.math.Long.TWO_PWR_32_DBL_+this.low_},goog.math.Long.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(goog.math.Long.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var o=0!=this.high_?this.high_:this.low_,t=31;t>0&&0==(o&1<<t);t--);return 0!=this.high_?t+33:t+1},goog.math.Long.prototype.isZero=function(){return 0==this.high_&&0==this.low_},goog.math.Long.prototype.isNegative=function(){return this.high_<0},goog.math.Long.prototype.isOdd=function(){return 1==(1&this.low_)},goog.math.Long.prototype.equals=function(o){return this.high_==o.high_&&this.low_==o.low_},goog.math.Long.prototype.notEquals=function(o){return this.high_!=o.high_||this.low_!=o.low_},goog.math.Long.prototype.lessThan=function(o){return this.compare(o)<0},goog.math.Long.prototype.lessThanOrEqual=function(o){return this.compare(o)<=0},goog.math.Long.prototype.greaterThan=function(o){return
Config=window.Config||{},Config.Schema=Config.Schema||{},Config.Schema.MTProto={constructors:[{id:"481674261",predicate:"vector",params:[],type:"Vector t"},{id:"85337187",predicate:"resPQ",params:[{name:"nonce",type:"int128"},{name:"server_nonce",type:"int128"},{name:"pq",type:"bytes"},{name:"server_public_key_fingerprints",type:"Vector<long>"}],type:"ResPQ"},{id:"-2083955988",predicate:"p_q_inner_data",params:[{name:"pq",type:"bytes"},{name:"p",type:"bytes"},{name:"q",type:"bytes"},{name:"nonce",type:"int128"},{name:"server_nonce",type:"int128"},{name:"new_nonce",type:"int256"}],type:"P_Q_inner_data"},{id:"2043348061",predicate:"server_DH_params_fail",params:[{name:"nonce",type:"int128"},{name:"server_nonce",type:"int128"},{name:"new_nonce_hash",type:"int128"}],type:"Server_DH_Params"},{id:"-790100132",predicate:"server_DH_params_ok",params:[{name:"nonce",type:"int128"},{name:"server_nonce",type:"int128"},{name:"encrypted_answer",type:"bytes"}],type:"Server_DH_Params"},{id:"-1249309254",predicate:"server_DH_inner_data",params:[{name:"nonce",type:"int128"},{name:"server_nonce",type:"int128"},{name:"g",type:"int"},{name:"dh_prime",type:"bytes"},{name:"g_a",type:"bytes"},{name:"server_time",type:"int"}],type:"Server_DH_inner_data"},{id:"1715713620",predicate:"client_DH_inner_data",params:[{name:"nonce",type:"int128"},{name:"server_nonce",type:"int128"},{name:"retry_id",type:"long"},{name:"g_b",type:"bytes"}],type:"Client_DH_Inner_Data"},{id:"1003222836",predicate:"dh_gen_ok",params:[{name:"nonce",type:"int128"},{name:"server_nonce",type:"int128"},{name:"new_nonce_hash1",type:"int128"}],type:"Set_client_DH_params_answer"},{id:"1188831161",predicate:"dh_gen_retry",params:[{name:"nonce",type:"int128"},{name:"server_nonce",type:"int128"},{name:"new_nonce_hash2",type:"int128"}],type:"Set_client_DH_params_answer"},{id:"-1499615742",predicate:"dh_gen_fail",params:[{name:"nonce",type:"int128"},{name:"server_nonce",type:"int128"},{name:"new_nonce_hash3",type:"int128"}],type:"Set_client_DH_params_answer"},{id:"-212046591",predicate:"rpc_result",params:[{name:"req_msg_id",type:"long"},{name:"result",type:"Object"}],type:"RpcResult"},{id:"558156313",predicate:"rpc_error",params:[{name:"error_code",type:"int"},{name:"error_message",type:"string"}],type:"RpcError"},{id:"1579864942",predicate:"rpc_answer_unknown",params:[],type:"RpcDropAnswer"},{id:"-847714938",predicate:"rpc_answer_dropped_running",params:[],type:"RpcDropAnswer"},{id:"-1539647305",predicate:"rpc_answer_dropped",params:[{name:"msg_id",type:"long"},{name:"seq_no",type:"int"},{name:"bytes",type:"int"}],type:"RpcDropAnswer"},{id:"155834844",predicate:"future_salt",params:[{name:"valid_since",type:"int"},{name:"valid_until",type:"int"},{name:"salt",type:"long"}],type:"FutureSalt"},{id:"-1370486635",predicate:"future_salts",params:[{name:"req_msg_id",type:"long"},{name:"now",type:"int"},{name:"salts",type:"vector<future_salt>"}],type:"FutureSalts"},{id:"880243653",predicate:"pong",params:[{name:"msg_id",type:"long"},{name:"ping_id",type:"long"}],type:"Pong"},{id:"-501201412",predicate:"destroy_session_ok",params:[{name:"session_id",type:"long"}],type:"DestroySessionRes"},{id:"1658015945",predicate:"destroy_session_none",params:[{name:"session_id",type:"long"}],type:"DestroySessionRes"},{id:"-1631450872",predicate:"new_session_created",params:[{name:"first_msg_id",type:"long"},{name:"unique_id",type:"long"},{name:"server_salt",type:"long"}],type:"NewSession"},{id:"1945237724",predicate:"msg_container",params:[{name:"messages",type:"vector<%Message>"}],type:"MessageContainer"},{id:"1538843921",predicate:"message",params:[{name:"msg_id",type:"long"},{name:"seqno",type:"int"},{name:"bytes",type:"int"},{name:"body",type:"Object"}],type:"Message"},{id:"-530561358",predicate:"msg_copy",params:[{name:"orig_message",type:"Message"}],type:"MessageCopy"},{id:"812830625",predicate:"gzip_packed",params:[{name:"packed_data",type:"bytes"}],type:"Object"},{id:"1658238041",predicate:"msgs_ack",params:[{name:"msg_ids",type:"Vector<long>"}],type:"MsgsAck"},{id:"-1477445615",predicate:"bad_msg_
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){for(var t=[],n=0;n<e.length;n++)t.push((e[n]<16?"0":"")+e[n].toString(16));return t.join("")}function bytesFromHex(e){var t,n=e.length,r=[];for(t=0;n>t;t+=2)r.push(parseInt(e.substr(t,2),16));return r}function bytesToBase64(e){for(var t,n="",r=e.length,o=0,s=0;r>s;s++)t=s%3,o|=e[s]<<(16>>>t&24),(2===t||r-s===1)&&(n+=String.fromCharCode(uint6ToBase64(o>>>18&63),uint6ToBase64(o>>>12&63),uint6ToBase64(o>>>6&63),uint6ToBase64(63&o)),o=0);return n.replace(/A(?=A$|$)/g,"=")}function uint6ToBase64(e){return 26>e?e+65:52>e?e+71:62>e?e-4:62===e?43:63===e?47:65}function bytesCmp(e,t){var n=e.length;if(n!=t.length)return!1;for(var r=0;n>r;r++)if(e[r]!=t[r])return!1;return!0}function bytesXor(e,t){for(var n=e.length,r=[],o=0;n>o;++o)r[o]=e[o]^t[o];return r}function bytesToWords(e){for(var t=e.length,n=[],r=0;t>r;r++)n[r>>>2]|=e[r]<<24-r%4*8;return new CryptoJS.lib.WordArray.init(n,t)}function bytesFromWords(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;n>o;o++)r.push(t[o>>>2]>>>24-o%4*8&255);return r}function bytesFromBigInt(e,t){for(var n=e.toByteArray();!n[0]&&(!t||n.length>t);)n=n.slice(1);return n}function bytesToArrayBuffer(e){return new Uint8Array(e).buffer}function bytesFromArrayBuffer(e){for(var t=e.byteLength,n=new Uint8Array(e),r=[],o=0;t>o;++o)r[o]=n[o];return r}function longToInts(e){var t=bigStringInt(e).divideAndRemainder(bigint(4294967296));return[t[0].intValue(),t[1].intValue()]}function longToBytes(e){return bytesFromWords({words:longToInts(e),sigBytes:8}).reverse()}function longFromInts(e,t){return bigint(e).shiftLeft(32).add(bigint(t)).toString(10)}function intToUint(e){return e=parseInt(e),0>e&&(e+=4294967296),e}function uintToInt(e){return e>2147483647&&(e-=4294967296),e}function sha1Hash(e){var t=sha1.hash(e,!0);return t}function rsaEncrypt(e,t){var n=255-t.length;if(n>0){var r=new Array(n);(new SecureRandom).nextBytes(r),t=t.concat(r)}var o=new BigInteger(e.modulus,16),s=new BigInteger(e.exponent,16),i=new BigInteger(t),a=i.modPowInt(s,o),c=bytesFromBigInt(a,256);return c}function aesEncrypt(e,t,n){var r=16-e.length%16;if(r>0&&16>r){var o=new Array(r);(new SecureRandom).nextBytes(o),e=e.concat(o)}var s=CryptoJS.AES.encrypt(bytesToWords(e),bytesToWords(t),{iv:bytesToWords(n),padding:CryptoJS.pad.NoPadding,mode:CryptoJS.mode.IGE}).ciphertext,i=bytesFromWords(s);return i}function aesDecrypt(e,t,n){var r=CryptoJS.AES.decrypt({ciphertext:bytesToWords(e)},bytesToWords(t),{iv:bytesToWords(n),padding:CryptoJS.pad.NoPadding,mode:CryptoJS.mode.IGE}),o=bytesFromWords(r);return o}function gzipUncompress(e){var t=new Zlib.Gunzip(e).decompress();return t}function nextRandomInt(e){return Math.floor(Math.random()*e)}function pqPrimeFactorization(e){var t=new BigInteger(e),n=!1;if(console.log("PQ start",e,t.bitLength()),t.bitLength()<=64)try{n=pqPrimeLong(goog.math.Long.fromString(t.toString(16),16))}catch(r){console.error(r)}return n===!1&&(n=pqPrimeBigInteger(t)),console.log("PQ finish"),n}function pqPrimeBigInteger(e){for(var t,n=0,r=0;3>r;r++){for(var o=(15&nextRandomInt(128))+17,s=bigint(nextRandomInt(1e9)+1),i=s.clone(),a=1<<r+18,c=1;a>c;c++){++n;for(var f=s.clone(),h=s.clone(),u=bigint(o);!h.equals(BigInteger.ZERO);)h.and(BigInteger.ONE).equals(BigInteger.ZERO)||(u=u.add(f),u.compareTo(e)>0&&(u=u.subtract(e))),f=f.add(f),f.compareTo(e)>0&&(f=f.subtract(e)),h=h.shiftRight(1);s=u.clone();var d=s.compareTo(i)<0?i.subtract(s):s.subtract(i);if(t=d.gcd(e),!t.equals(BigInteger.ONE))break;0==(c&c-1)&&(i=s.clone())}if(t.compareTo(BigInteger.ONE)>0)break}var l,g,p=e.divide(t);return t.compareTo(p)>0?(l=p,g=t):(l=t,g=p),[bytesFromBigInt(l),bytesFromBigInt(g)]}function gcdLong(e,t){for(;e.notEquals(goog.math.Long.ZERO)&&t.notEquals(goog.math.Long.ZERO);){for(;t.and(goog.math.Long.ONE).equals(goog.math.Long.ZERO);)t=t.shiftRight(1);for(;e.and(g
delete h.sentMessages[e],delete h.pendingMessages[e],t.reject()}}),h.toggleOffline(!0)})}},u.prototype.getEncryptedMessage=function(e){var t=this;return r.hash(e).then(function(n){var r=n.slice(-16);return t.getMsgKeyIv(r,!0).then(function(t){return o.encrypt(e,t[0],t[1]).then(function(e){return{bytes:e,msgKey:r}})})})},u.prototype.getDecryptedMessage=function(e,t){return this.getMsgKeyIv(e,!1).then(function(e){return o.decrypt(t,e[0],e[1])})},u.prototype.sendEncryptedRequest=function(t){var n=this,r=new TLSerialization({startMaxLength:t.body.length+64});return r.storeIntBytes(this.serverSalt,64,"salt"),r.storeIntBytes(this.sessionID,64,"session_id"),r.storeLong(t.msg_id,"message_id"),r.storeInt(t.seq_no,"seq_no"),r.storeInt(t.body.length,"message_data_length"),r.storeRawBytes(t.body,"message_data"),this.getEncryptedMessage(r.getBytes()).then(function(t){var r=new TLSerialization({startMaxLength:t.bytes.length+256});r.storeIntBytes(n.authKeyID,64,"auth_key_id"),r.storeIntBytes(t.msgKey,128,"msg_key"),r.storeRawBytes(t.bytes,"encrypted_data"),delete i.defaults.headers.post["Content-Type"],delete i.defaults.headers.common.Accept;var o=r.getArray();return"ArrayBufferView"in window||(o=o.buffer),i.post("http://"+e.chooseServer(n.dcID)+"/apiw1",o,{responseType:"arraybuffer",transformRequest:null})})},u.prototype.parseResponse=function(e){var t=new TLDeserialization(e),n=t.fetchIntBytes(64,"auth_key_id");if(!bytesCmp(n,this.authKeyID))throw new Error("Invalid server auth_key_id: "+bytesToHex(n));var o=t.fetchIntBytes(128,"msg_key"),s=e.byteLength-t.getOffset(),i=t.fetchRawBytes(s,"encrypted_data");return this.getDecryptedMessage(o,i).then(function(e){var t=bytesToArrayBuffer(e),n=new TLDeserialization(t,{mtproto:!0}),s=(n.fetchIntBytes(64,"salt"),n.fetchIntBytes(64,"session_id")),i=n.fetchLong("message_id"),a=n.fetchInt("seq_no"),c=n.fetchRawBytes(!1,"message_data"),f=n.getOffset();return r.hash(e.slice(0,f)).then(function(e){if(!bytesCmp(o,e.slice(-16)))throw new Error("server msgKey mismatch");var t=bytesToArrayBuffer(c),n=new TLDeserialization(t,{mtproto:!0}),r=n.fetchObject("","INPUT");return{response:r,messageID:i,sessionID:s,seqNo:a}})})},u.prototype.applyServerSalt=function(e){var t=longToBytes(e),n={};return n["dc"+this.dcID+"_server_salt"]=bytesToHex(t),s.set(n),this.serverSalt=t,!0},u.prototype.sheduleRequest=function(e){this.offline&&this.checkConnection("forced shedule");var t=tsNow()+e;return e&&this.nextReq&&this.nextReq<=t?!1:(c.cancel(this.nextReqPromise),this.nextReqPromise=c(this.performSheduledRequest.bind(this),e||0),void(this.nextReq=t))},u.prototype.onSessionCreate=function(e){console.log(dT(),"New session created",bytesToHex(e))},u.prototype.ackMessage=function(e){this.pendingAcks.push(e),this.sheduleRequest(3e4)},u.prototype.reqResendMessage=function(e){console.log(dT(),"Req resend",e),this.pendingResends.push(e),this.sheduleRequest(100)},u.prototype.cleanupSent=function(){var e=this,t=!1;return angular.forEach(this.sentMessages,function(n,r){if(n.notContentRelated&&void 0===e.pendingMessages[r])delete e.sentMessages[r];else if(n.container){for(var o=0;o<n.inner.length;o++)if(void 0!==e.sentMessages[n.inner[o]])return void(t=!0);delete e.sentMessages[r]}else t=!0}),!t},u.prototype.processMessageAck=function(e){var t=this.sentMessages[e];return t&&!t.acked?(delete t.body,t.acked=!0,!0):!1},u.prototype.processError=function(e){var t=(e.error_message||"").match(/^([A-Z_0-9]+\b)(: (.+))?/)||[];return e.error_code=uintToInt(e.error_code),{code:!e.error_code||e.error_code<=0?500:e.error_code,type:t[1]||"UNKNOWN",description:t[3]||"CODE#"+e.error_code+" "+e.error_message,originalError:e}},u.prototype.processMessage=function(e,n,r){switch(e._){case"msg_container":for(var o=e.messages.length,s=0;o>s;s++)this.processMessage(e.messages[s],n,r);break;case"bad_server_salt":console.log(dT(),"Bad server salt",e);var i=this.sentMessages[e.bad_msg_id];if(!i||i.seq_no!=e.bad_msg_seqno)throw console.log(e.bad_msg_id,e.bad_msg_seqno),new Error("Bad server salt for invalid message");this.applyServerSalt(e.new_server_salt),
function dT(){return"["+(((new Date).getTime()-_logTimer)/1e3).toFixed(3)+"]"}function checkClick(e,t){return 1==e.which&&(e.ctrlKey||e.metaKey)||2==e.which?!0:(t||e.preventDefault(),!1)}function checkDragEvent(e){if(!e||e.target&&("IMG"==e.target.tagName||"A"==e.target.tagName))return!1;if(!e.dataTransfer||!e.dataTransfer.types)return!0;for(var t=0;t<e.dataTransfer.types.length;t++)if("Files"==e.dataTransfer.types[t])return!0;return!1}function cancelEvent(e){return e=e||window.event,e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),!1}function onCtrlEnter(e,t){$(e).on("keydown",function(e){return 13==e.keyCode&&(e.ctrlKey||e.metaKey)?(t(),cancelEvent(e)):void 0})}function onContentLoaded(e){setTimeout(e,0)}function tsNow(e){var t=+new Date;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 safeConfirm(e){try{return confirm(e)}catch(t){return!0}}var _logTimer=(new Date).getTime();
"use strict";window._testMode=location.search.indexOf("test=1")>0,window._debugMode=location.search.indexOf("debug=1")>0,window._osX=-1!=(navigator.platform||"").toLowerCase().indexOf("mac")||-1!=(navigator.userAgent||"").toLowerCase().indexOf("mac"),window._retina=window.devicePixelRatio>1,window._osX||$("body").addClass("non_osx"),$("body").addClass(window._retina?"is_2x":"is_1x"),$(window).on("load",function(){setTimeout(function(){window.scrollTo(0,1)},0)}),angular.module("myApp",["ngRoute","ngAnimate","ngSanitize","ui.bootstrap","pasvaz.bindonce","mtproto.services","myApp.filters","myApp.services","myApp.templates","myApp.directives","myApp.controllers"]).config(["$locationProvider","$routeProvider","$compileProvider",function(e,o,i){var t,n,r,a,s,l,m,p={},d={};for(n=0;n<Config.EmojiCategories.length;n++)for(m=Config.EmojiCategorySpritesheetDimens[n][1],t=0;t<Config.EmojiCategories[n].length;t++)a=Config.Emoji[Config.EmojiCategories[n][t]],r=a[1][0],s=Math.floor(t/m),l=t%m,p[":"+r+":"]=[n,s,l,":"+r+":"],d[r]=a[0];$.emojiarea.spritesheetPath="img/emojisprite_!.png",$.emojiarea.spritesheetDimens=Config.EmojiCategorySpritesheetDimens,$.emojiarea.iconSize=20,$.emojiarea.icons=p,$.emojiarea.reverseIcons=d,i.imgSrcSanitizationWhitelist(/^\s*(https?|ftp|file|blob|filesystem|chrome-extension|app):|data:image\//),i.aHrefSanitizationWhitelist(/^\s*(https?|ftp|file|mailto|blob|filesystem|chrome-extension|app):|data:image\//),o.when("/",{templateUrl:"partials/welcome.html",controller:"AppWelcomeController"}),o.when("/login",{templateUrl:"partials/login.html",controller:"AppLoginController"}),o.when("/im",{templateUrl:"partials/im.html",controller:"AppIMController",reloadOnSearch:!1}),o.otherwise({redirectTo:"/"})}]);
"use strict";angular.module("myApp.services",[]).service("AppConfigManager",["$q",function(e){function t(){for(var t=Array.prototype.slice.call(arguments),a=[],o=1==t.length,d=!0,c=0;c<t.length;c++)t[c]=n+t[c];if(angular.forEach(t,function(e){if(void 0!==r[e])a.push(r[e]);else if(s){var t=localStorage.getItem(e);t=void 0===t||null===t?!1:JSON.parse(t),a.push(r[e]=t)}else i?d=!1:a.push(r[e]=!1)}),d)return e.when(o?a[0]:a);var u=e.defer();return chrome.storage.local.get(t,function(e){a=[],angular.forEach(t,function(t){var o=e[t];o=void 0===o||null===o?!1:JSON.parse(o),a.push(r[t]=o)}),u.resolve(o?a[0]:a)}),u.promise}function a(t){var a={};if(angular.forEach(t,function(e,t){a[n+t]=JSON.stringify(e),r[n+t]=e}),s)return angular.forEach(a,function(e,t){localStorage.setItem(t,e)}),e.when();if(!i)return e.when();var o=e.defer();return chrome.storage.local.set(a,function(){o.resolve()}),o.promise}function o(){for(var t=Array.prototype.slice.call(arguments),a=0;a<t.length;a++)t[a]=n+t[a];if(angular.forEach(t,function(e){delete r[e]}),s)return angular.forEach(t,function(e){localStorage.removeItem(e)}),e.when();if(!i)return e.when();var o=e.defer();return chrome.storage.local.remove(t,function(){o.resolve()}),o.promise}var n=window._testMode?"t_":"",r={},i=!!(window.chrome&&chrome.storage&&chrome.storage.local),s=!i&&!!window.localStorage;return{get:t,set:a,remove:o}}]).service("AppUsersManager",["$rootScope","$modal","$modalStack","$filter","MtpApiFileManager","MtpApiManager","RichTextProcessor","SearchIndexManager",function(e,t,a,o,n,r,i,s){function d(){return M?M:M=r.invokeApi("contacts.getContacts",{hash:""}).then(function(e){var t,a;A=[],l(e.users);for(var a=0;a<e.contacts.length;a++)t=e.contacts[a].user_id,A.push(t),s.indexObject(t,c(t),U);return A})}function c(e){var t=S[e];return t?(t.first_name||"")+" "+(t.last_name||"")+" "+(t.phone||""):!1}function u(e){return d().then(function(t){if(angular.isString(e)&&e.length){for(var a=s.search(e,U),o=[],n=0;n<t.length;n++)a[t[n]]&&o.push(t[n]);t=o}return t})}function l(e){angular.forEach(e,p)}function p(e){angular.isObject(e)&&(e.phone&&(e.rPhone=o("phoneNumber")(e.phone)),e.first_name?(e.rFirstName=i.wrapRichText(e.first_name,{noLinks:!0,noLinebreaks:!0}),e.rFullName=i.wrapRichText(e.first_name+" "+(e.last_name||""),{noLinks:!0,noLinebreaks:!0})):(e.rFirstName=i.wrapRichText(e.last_name,{noLinks:!0,noLinebreaks:!0})||e.rPhone||"DELETED",e.rFullName=i.wrapRichText(e.last_name,{noLinks:!0,noLinebreaks:!0})||e.rPhone||"DELETED"),e.sortName=s.cleanSearchText(e.first_name+" "+(e.last_name||"")),e.sortStatus=e.status&&(e.status.expires||e.status.was_online)||0,void 0===S[e.id]?S[e.id]=e:safeReplaceObject(S[e.id],e),void 0!==D[e.id]&&safeReplaceObject(D[e.id],e&&e.photo&&e.photo.photo_small||{empty:!0}))}function h(e){return angular.isObject(e)?e:S[e]||{id:e,deleted:!0}}function g(e){return angular.isObject(S[e])}function m(e,t){var a=h(e);if(333e3==e)return{placeholder:"img/placeholders/DialogListAvatarSystem@2x.png"};void 0===D[e]&&(D[e]=a&&a.photo&&a.photo.photo_small||{empty:!0});var o=Math.abs(e)%8+1;return{num:o,placeholder:"img/placeholders/"+t+"Avatar"+o+"@2x.png",location:D[e]}}function f(e){var t=h(e);return"u"+e+(t.access_hash?"_"+t.access_hash:"")}function _(e){var t=h(e);return t}function v(a){var o=e.$new();o.userID=a;t.open({templateUrl:"partials/user_modal.html",controller:"UserModalController",scope:o,windowClass:"user_modal_window"})}function w(e,t,a){return r.invokeApi("contacts.importContacts",{contacts:[{_:"inputPhoneContact",client_id:"1",phone:e,first_name:t,last_name:a}],replace:!1}).then(function(e){l(e.users);var t=!1;return angular.forEach(e.imported,function(e){b(t=e.user_id,!0)}),t})}function y(e){var t=[];return angular.forEach(e,function(e){t.push({_:"inputUserContact",user_id:e})}),r.invokeApi("contacts.deleteContacts",{id:t},function(){angular.forEach(e,function(e){b(e,!1)})})}function b(e,t){if(angular.isArray(A)){var a=o=A.indexOf(e),o=-1!=a;t!=o&&(t?(A.push(e),s.indexObject(e,c(e),U)):A.splice(a,1))}}var M,A,S={},D={},U=s.createIndex();return e.openUse
break;case"updateShortChatMessage":if(!a.hasUser(e.from_id)||!o.hasChat(e.chat_id)){console.log("User or chat not found",e.from_id,e.chat_id,"getDiff"),s();break}d({_:"updateNewMessage",message:{_:"message",id:e.id,from_id:e.from_id,to_id:n.getOutputPeer(-e.chat_id),out:!1,unread:!0,date:e.date,message:e.message,media:{_:"messageMediaEmpty"}},pts:e.pts})}return!0}function s(e){return l.invalid&&!e?!1:(l.invalid=!0,void r.invokeApi("updates.getDifference",{pts:l.pts,date:l.date,qts:0}).then(function(e){if("updates.differenceEmpty"==e._)return l.date=e.date,l.seq=e.seq,delete l.invalid,!1;a.saveApiUsers(e.users),o.saveApiChats(e.chats),angular.forEach(e.other_updates,function(e){d(e,!0)}),angular.forEach(e.new_messages,function(e){d({_:"updateNewMessage",message:e,pts:l.pts},!0)});var t=e.intermediate_state||e.state;l.seq=t.seq,l.pts=t.pts,l.date=t.date,"updates.differenceSlice"==e._?s(!0):delete l.invalid}))}function d(t,a){return l.invalid&&!a?!1:(t.pts&&(l.pts=t.pts),void e.$broadcast("apiUpdate",t))}function c(e,t){return l.invalid?!1:(t=t||e)?t!=l.seq+1?(t>l.seq&&(console.warn("Seq hole",t,l.seq),s()),!1):(l.seq=e,!0):!0}function u(){t.setUpdatesProcessor(i),r.invokeApi("updates.getState").then(function(e){l.seq=e.seq,l.pts=e.pts,l.date=e.date,delete l.invalid})}var l={invalid:!0};return{saveUpdate:d,saveSeq:c,attach:u}}]).service("RichTextProcessor",["$sce","$sanitize",function(e,t){function a(e){return e.replace(/&/g,"&amp;").replace(/([^\#-~| |!])/g,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function o(e){for(var t,a,o,n,r=0;r<Config.EmojiCategories.length;r++)if(n=Config.EmojiCategorySpritesheetDimens[r][1],t=Config.EmojiCategories[r].indexOf(e),t>-1)return a=Math.floor(t/n),o=t%n,{category:r,row:a,column:o};return console.error("emoji not found in spritesheet",e),null}function n(n,i){if(!n||!n.length)return"";i=i||{},n=n.replace(/\ufe0f/g,"",n);for(var p,h,g,m=n,f=[],_=!1;p=m.match(u);)f.push(a(m.substr(0,p.index))),p[1]?i.noLinks?f.push(a(p[0])):p[3]?f.push('<a href="',a("mailto:"+p[3]+p[4]),'" target="_blank">',a(p[3]+p[4]),"</a>"):f.push('<a href="',a(p[2]+"://"+p[4]),'" target="_blank">',a(p[2]+"://"+p[4]),"</a>"):p[5]?f.push(i.noLinebreaks?" ":"<br/>"):p[6]&&((r=s[p[6]])&&(g=o(r))?(h=a(d[r][1][0]),_=!0,f.push('<span class="emoji emoji-',g.category,"-",c*g.column,"-",c*g.row,'" ','title="',h,'">',":",h,":</span>")):f.push(a(p[6]))),m=m.substr(p.index+p[0].length);if(f.push(a(m)),n=t(f.join("")),_&&(n=n.replace(/<span class="emoji emoji-(\d)-(\d+)-(\d+)"(.+?)<\/span>/g,'<span class="emoji emoji-spritesheet-$1" style="background-position: -$2px -$3px;" $4</span>')),!i.noLinks){var v=n.match(l),w=v&&v[1];w&&(n=n+'<div class="im_message_iframe_video"><iframe type="text/html" frameborder="0" src="http://www.youtube.com/embed/'+w+'?autoplay=0&amp;controls=2"></iframe></div>')}return e.trustAs("html",n)}var r,i=[],s={},d=Config.Emoji,c=18;for(r in d)i.push(d[r][0]),s[d[r][0]]=r;var u=new RegExp("((?:(ftp|https?)://|(?:mailto:)?([A-Za-z0-9._%+-]+@))(\\S*\\.\\S*[^\\s.;,(){}<>\"']))|(\\n)|("+i.join("|")+")","i"),l=/(?:https?:\/\/)?(?:www\.)?youtu(?:|.be|be.com|.b)(?:\/v\/|\/watch\\?v=|e\/|\/watch(?:.+)v=)(.{11})(?:\&[^\s]*)?/;return{wrapRichText:n}}]).service("IdleManager",["$rootScope","$window","$timeout",function(e,t,a){function o(){i||(i=!0,$(t).on("blur focus keydown mousedown touchstart",n))}function n(o){"mousemove"==o.type&&$(t).off("mousemove",n);var i="blur"==o.type||"timeout"==o.type?!0:!1;a.cancel(r),i||(r=a(function(){n({type:"timeout"})},3e4)),e.idle.isIDLE!=i&&(e.$apply(function(){e.idle.isIDLE=i}),i&&"timeout"==o.type&&$(t).on("mousemove",n))}e.idle={isIDLE:!1};var r,i=!1;return{start:o}}]).service("StatusManager",["$timeout","$rootScope","MtpApiManager","IdleManager",function(e,t,a){function o(){d||(d=!0,t.$watch("idle.isIDLE",r),t.$watch("offline",r))}function n(e){var o=tsNow();if(!(e&&!s||!e&&5e4>o-s||t.offline))return s=e?0:o,a.invokeApi("account.updateStatus",{offline:e})}function r(){i&&e.cancel(i),t.idle.isIDLE?i=e(function(){n(!0)},5e3):(n(!1),i=e(r,
"use strict";angular.module("myApp.controllers",[]).controller("AppWelcomeController",["$scope","$location","MtpApiManager",function(e,t,o){o.getUserID().then(function(o){o?t.url("/im"):e.showWelcome=!0})}]).controller("AppLoginController",["$scope","$location","$timeout","MtpApiManager","ErrorService",function(e,t,o,n,r){function a(e){n.setUserAuth(i.dcID,{expires:e.expires,id:e.user.id}),o.cancel(c),t.url("/im")}function s(){o.cancel(c),--e.callPending.remaining?c=o(s,1e3):(e.callPending.success=!1,n.invokeApi("auth.sendCall",{phone_number:e.credentials.phone_number,phone_code_hash:e.credentials.phone_code_hash},i).then(function(){e.callPending.success=!0}))}n.getUserID().then(function(e){return e?void t.url("/im"):void 0});var i={dcID:1,createNetworker:!0};e.credentials={},e.progress={},e.callPending={};var c;e.sendCode=function(){o.cancel(c),e.progress.enabled=!0,n.invokeApi("auth.checkPhone",{phone_number:e.credentials.phone_number},i).then(function(t){return e.progress.enabled=!1,t.phone_registered?(e.progress.enabled=!0,void n.invokeApi("auth.sendCode",{phone_number:e.credentials.phone_number,sms_type:0,api_id:2496,api_hash:"8da85b0d5bfe62527e5b244c209159c3"},i).then(function(t){e.progress.enabled=!1,e.credentials.phone_code_hash=t.phone_code_hash,e.credentials.phone_occupied=t.phone_registered,e.error={},e.callPending.remaining=t.send_call_timeout,s()},function(t){switch(e.progress.enabled=!1,console.log("sendCode error",t),t.type){case"PHONE_NUMBER_INVALID":e.error={field:"phone"}}})):(r.show({error:{code:400,type:"ACCOUNT_REQUIRED"},phone:e.credentials.phone_number}),!1)},function(t){switch(e.progress.enabled=!1,t.type){case"PHONE_NUMBER_INVALID":e.error={field:"phone"};break;default:r.alert("Unknown error occured","Please check your internet connection or install the latest version of Google Chrome browser.")}})},e.logIn=function(t){var o="auth.signIn",r={phone_number:e.credentials.phone_number,phone_code_hash:e.credentials.phone_code_hash,phone_code:e.credentials.phone_code};t&&(o="auth.signUp",angular.extend(r,{first_name:e.credentials.first_name,last_name:e.credentials.last_name})),e.progress.enabled=!0,n.invokeApi(o,r,i).then(a,function(t){if(e.progress.enabled=!1,400==t.code&&"PHONE_NUMBER_UNOCCUPIED"==t.type)return e.logIn(!0);if(400==t.code&&"PHONE_NUMBER_OCCUPIED"==t.type)return e.logIn(!1);switch(t.type){case"FIRSTNAME_INVALID":e.error={field:"first_name"};break;case"LASTNAME_INVALID":e.error={field:"last_name"};break;case"PHONE_CODE_INVALID":e.error={field:"phone_code"}}})}}]).controller("AppIMController",["$scope","$location","$routeParams","$modal","$rootScope","$modalStack","MtpApiManager","AppUsersManager","ContactsSelectService",function(e,t,o,n,r,a,s,i,c){function l(){e.curDialog={peer:o.p||!1}}e.$on("$routeUpdate",l),e.$on("history_focus",function(o,n){a.dismissAll(),n.peerString==e.curDialog.peer?e.$broadcast("ui_history_focus"):t.url("/im?p="+n.peerString)}),e.isLoggedIn=!0,e.openSettings=function(){n.open({templateUrl:"partials/settings_modal.html",controller:"SettingsModalController",scope:r.$new(),windowClass:"settings_modal_window"})},e.openContacts=function(){c.selectContact().then(function(t){e.dialogSelect(i.getUserString(t))})},e.openGroup=function(){c.selectContacts().then(function(t){if(1==t.length)e.dialogSelect(i.getUserString(t[0]));else if(t.length>1){var o=r.$new();o.userIDs=t,n.open({templateUrl:"partials/chat_create_modal.html",controller:"ChatCreateModalController",scope:o,windowClass:"contacts_modal_window"})}})},e.dialogSelect=function(e){r.$broadcast("history_focus",{peerString:e})},l()}]).controller("AppImDialogsController",["$scope","$location","MtpApiManager","AppUsersManager","AppChatsManager","AppMessagesManager","AppPeersManager",function(e,t,o,n,r,a){function s(){l=0,u=0,p=!1,d={},c=!1,a.getDialogs(e.search.query,u).then(function(t){e.dialogs=[],e.contacts=[],t.dialogs.length&&(l+=t.dialogs.length,u=t.dialogs[t.dialogs.length-1].top_message,p=null===t.count||l<t.count,angular.forEach(t.dialogs,function(t){d[t.peerID]=!0,e.dialogs.push(a.wrapForDialog(t.top_messag
"use strict";angular.module("myApp.filters",[]).filter("userName",[function(){return function(t){return t&&(t.first_name||t.last_name)?t.first_name+" "+t.last_name:"DELETED"}}]).filter("userFirstName",[function(){return function(t){return t&&(t.first_name||t.last_name)?t.first_name||t.last_name:"DELETED"}}]).filter("userStatus",["$filter",function(t){return function(r){return r&&r.status&&"userStatusEmpty"!=r.status._?"userStatusOnline"==r.status._?"online":"last seen "+t("relativeTime")(r.status.was_online):"offline"}}]).filter("chatTitle",[function(){return function(t){return t&&t.title?t.title:"DELETED"}}]).filter("dateOrTime",["$filter",function(t){var r={};return function(e){if(r[e])return r[e];var n=1e3*e,u=Math.abs(tsNow()-n),i="HH:mm";return u>5184e5?i="shortDate":u>432e5&&(i="EEE"),r[e]=t("date")(n,i)}}]).filter("duration",[function(){return function(t){var r=t%60,e=Math.floor((t-r)/60);return 10>r&&(r="0"+r),e+":"+r}}]).filter("phoneNumber",[function(){return function(t){var r=" ";return t=(t||"").replace(/\D/g,""),"7"==t.charAt(0)&&11==t.length?"+"+t.charAt(0)+r+"("+t.substr(1,3)+")"+r+t.substr(4,3)+"-"+t.substr(7,2)+"-"+t.substr(9,2):"+"+t}}]).filter("formatSize",[function(){return function(t){return t?1024>t?t+" b":1048576>t?Math.round(t/1024*10)/10+" Kb":Math.round(t/1048576*100)/100+" Mb":"0"}}]).filter("formatSizeProgress",["$filter",function(t){return function(r){var e=t("formatSize")(r.done),n=e.split(" "),u=t("formatSize")(r.total),i=u.split(" ");return i[1]===n[1]?n[0]+" of "+i[0]+" "+(n[1]||""):e+" of "+u}}]).filter("nl2br",[function(){return function(t){return t.replace(/\n/g,"<br/>")}}]).filter("richText",["$filter",function(t){return function(r){return t("linky")(r,"_blank").replace(/\n|&#10;/g,"<br/>")}}]).filter("relativeTime",["$filter",function(t){return function(r){var e=1e3*r,n=Math.abs(tsNow()-e);return 6e4>n?"just now":3e6>n?Math.ceil(n/6e4)+" minutes ago":1e7>n?Math.ceil(n/36e5)+" hours ago":t("dateOrTime")(r)}}]);
angular.module("myApp.templates",[]).run(["$templateCache",function(n){n.put("partials/chat_create_modal.html",'<div class="contacts_modal_wrap" my-modal-position>\n\n <div class="modal-header">\n <a class="modal-close-link" ng-click="$close()">Close</a>\n <h4 class="modal-title">Create Group</h4>\n </div>\n\n <div class="modal-body">\n\n <form ng-submit="createGroup()">\n\n <div class="contacts_modal_group_title">\n <input class="form-control" my-focused type="text" placeholder="Group name" ng-model="group.name"/>\n </div>\n\n <div class="contacts_modal_panel clearfix">\n\n <div class="contacts_modal_actions pull-right">\n <button class="btn btn-default" ng-click="$dismiss()"> Cancel </button>\n\n <button class="btn btn-success" type="submit"> Create </button>\n </div>\n\n </div>\n\n </form>\n\n </div>\n\n</div>'),n.put("partials/chat_edit_modal.html",'<div class="contacts_modal_wrap" my-modal-position>\n\n <div class="modal-header">\n <a class="modal-close-link" ng-click="$close()">Close</a>\n <h4 class="modal-title">Edit Group Title</h4>\n </div>\n\n <div class="modal-body">\n\n <form ng-submit="updateGroup()">\n\n <div class="contacts_modal_group_title">\n <input class="form-control" my-focused type="text" placeholder="Group name" ng-model="group.name"/>\n </div>\n\n <div class="contacts_modal_panel clearfix">\n\n <div class="contacts_modal_actions pull-right">\n <button class="btn btn-default" ng-click="$dismiss()"> Cancel </button>\n\n <button class="btn btn-success" type="submit"> Save </button>\n </div>\n\n </div>\n\n </form>\n\n </div>\n\n</div>'),n.put("partials/chat_modal.html",'<div class="chat_modal_wrap" my-modal-position>\n\n <div class="modal-header">\n <a class="modal-close-link" ng-click="$close()">Close</a>\n <h4 class="modal-title">Group Info</h4>\n </div>\n\n <div class="modal-body">\n\n <div class="chat_modal_photo_wrap pull-left">\n\n <div class="chat_modal_photo">\n <img\n class="user_modal_image"\n my-load-thumb\n thumb="chatFull.thumb"\n />\n <div class="chat_modal_photo_change_wrap" ng-if="chatFull.chat._ != \'chatForbidden\' &amp;&amp; !chatFull.chat.left">\n <div ng-if="photo.updating" class="chat_modal_photo_loading">Updating<span my-loading-dots></span></div>\n <div ng-if="!photo.updating">\n <div class="chat_modal_photo_update_link">\n <input my-file-upload type="file" multiple="false" class="im_attach_input" size="120" multiple="false" accept="image/x-png, image/png, image/gif, image/jpeg" />\n Update photo\n </div>\n <a ng-if="chatFull.thumb.location" href="" ng-click="deletePhoto()" class="chat_modal_photo_delete_link">Delete photo</a>\n </div>\n </div>\n </div>\n\n </div>\n\n\n <div class="chat_modal_info_wrap clearfix">\n <h4 class="chat_modal_header" ng-bind-html="chatFull.chat.rTitle"></h4>\n <p class="chat_modal_members_count" ng-if="chatFull.chat.participants_count > 0">\n <ng-pluralize count="chatFull.chat.participants_count"\n when="{\'0\': \'No members\', \'one\': \'1 member\', \'other\': \'{} members\'}">\n </ng-pluralize>\n </p>\n\n <div class="chat_modal_settings_wrap">\n\n <div class="chat_modal_actions_wrap clearfix">\n\n <button ng-if="!chatFull.chat.left &amp;&amp; chatFull.participants.participants.length" class="btn btn-primary chat_modal_send_btn" ng-click="inviteToGroup()">Add member</button>\n <button ng-if="chatFull.chat._ != \'chatForbidden\' &amp;&amp; chatFull.chat.left" class="btn btn-primary chat_modal_send_btn" ng-click="returnToGroup()">Return to group</button>\n <button ng-if="chatFull.chat._ == \'chatForbidden\'" class="btn btn-danger chat_modal_delete_btn" ng-click="flushHistory()">Delete chat</button>\n\n <div class="dropdown chat_modal_oth
}]);
"use strict";angular.module("myApp.directives",["myApp.filters"]).directive("myDialog",function(){return{restrict:"AE",scope:!0,translude:!1,templateUrl:"partials/dialog.html"}}).directive("myMessage",function(){return{restrict:"AE",scope:!0,translude:!1,templateUrl:"partials/message.html"}}).directive("myDialogsList",["$window","$timeout",function(e,t){function o(o,i,r){function n(){return r.modal?($(i).css({height:$(e).height()-200}),void u()):(l&&l.offsetHeight||(l=$(".tg_page_head")[0]),c&&c.offsetHeight||(c=$(".im_page_footer")[0]),$(i).css({height:$(e).height()-c.offsetHeight-(l?l.offsetHeight:44)-72}),void u())}var a=$(".im_dialogs_wrap",i)[0],s=$(".im_dialogs_scrollable_wrap",i)[0],l=$(".tg_page_head")[0],c=$(".im_page_footer")[0],d=!1;onContentLoaded(function(){$(a).nanoScroller({preventPageScrolling:!0,tabIndex:-1,iOSNativeScrolling:!0})});var u=function(){onContentLoaded(function(){$(a).nanoScroller()})};o.$on("ui_dialogs_prepend",u),o.$on("ui_dialogs_append",function(){onContentLoaded(function(){u(),d=!1,t(function(){$(s).trigger("scroll")})})}),o.$on("ui_dialogs_change",function(){onContentLoaded(function(){u(),d=!1,t(function(){$(s).trigger("scroll")})})}),$(s).on("scroll",function(){!d&&s.scrollTop>=s.scrollHeight-s.clientHeight-300&&(o.$emit("dialogs_need_more"),d=!0)}),$(e).on("resize",n),n(),setTimeout(n,1e3)}return{link:o}}]).directive("myContactsList",["$window","$timeout",function(e){function t(t,o){function i(){$(o).css({height:$(e).height()-(n&&n.offsetHeight||0)-(r&&r.offsetHeight||0)-200}),$(a).nanoScroller()}var r=$(".contacts_modal_search")[0],n=$(".contacts_modal_panel")[0],a=$(".contacts_wrap",o)[0];onContentLoaded(function(){$(a).nanoScroller({preventPageScrolling:!0,tabIndex:-1,iOSNativeScrolling:!0}),i()}),$(e).on("resize",i),t.$on("contacts_change",function(){onContentLoaded(i)})}return{link:t}}]).directive("myHistory",["$window","$timeout","$transition",function(e,t,o){function i(i,r){function n(t){if(r.is(":visible")&&$(r[0].parentNode).is(":visible")){$(f).is(":visible")&&$(f).css({height:$(_).height()}),p&&p.offsetHeight||(p=$(".tg_page_head")[0]),m&&m.offsetHeight||(m=$(".im_page_footer")[0]);var o=$(e).height()-h.offsetHeight-g.offsetHeight-(p?p.offsetHeight:44)-m.offsetHeight;$(s).css({height:o}),$(c).css({minHeight:o-44}),a(),t!==!0&&(k&&onContentLoaded(function(){d.scrollTop=d.scrollHeight,b()}),b(100))}}function a(){$(l).css({marginTop:0}),l.offsetHeight>0&&l.offsetHeight<=d.offsetHeight&&$(l).css({marginTop:d.offsetHeight-l.offsetHeight-20-44+"px"}),$(s).nanoScroller()}var s=$(".im_history_wrap",r)[0],l=$(".im_history_messages",r)[0],c=$(".im_history",r)[0],d=$(".im_history_scrollable_wrap",r)[0],u=$(".im_history_scrollable",r)[0],h=$(".im_history_panel_wrap",r)[0],g=$(".im_bottom_panel_wrap",r)[0],f=$(".im_send_form_wrap",r)[0],p=$(".tg_page_head")[0],m=$(".im_page_footer")[0],_=$(".im_send_form",r)[0],v=!1;onContentLoaded(function(){d.scrollTop=d.scrollHeight,$(s).nanoScroller({preventPageScrolling:!0,tabIndex:-1,iOSNativeScrolling:!0})});var y,b=function(e){t(function(){$(d).hasClass("im_history_to_bottom")||$(s).nanoScroller()},e||0)},w=!1,C=["transform","webkitTransform","MozTransform","msTransform","OTransform"];for(y=0;y<C.length;y++)if(C[y]in l.style){w=C[y];break}var H=w?!0:!1,T=!1;i.$on("ui_history_append",function(e,t){if(k||t.my){H||($(u).css({bottom:0}),$(d).addClass("im_history_to_bottom"));var i=d.scrollHeight;onContentLoaded(function(){if(H){T=!0,$(l).removeClass("im_history_appending"),d.scrollTop=d.scrollHeight,$(l).css(w,"translate(0px, "+(d.scrollHeight-i)+"px)"),$(s).nanoScroller();var e={};e[w]="translate(0px, 0px)",$(l).addClass("im_history_appending"),o($(l),e).then(function(){T=!1,$(l).removeClass("im_history_appending"),a()})}else $(d).removeClass("im_history_to_bottom"),$(u).css({bottom:""}),d.scrollTop=d.scrollHeight,a(),$(s).nanoScroller()})}}),i.$on("ui_history_change",function(){$(d).addClass("im_history_to_bottom"),$(u).css({bottom:0}),onContentLoaded(function(){$(d).removeClass("im_history_to_bottom"),$(u).css({bottom:""}),n(!0);var e=$(".im_me