}catch(e){console.error("CJ protection",e)}if(window.safeConfirm=function(e,t){"string"==typeofe&&(e={message:e});varn=!1;try{n=confirm(e.message)}catch(i){n=!0}setTimeout(function(){t(n)},10)},window.applicationCache&&!Config.Modes.packed&&window.addEventListener){vart=window.applicationCache,n=!1,i=!1,r=function(e){clearTimeout(i),i=setTimeout(function(){try{t.update()}catch(e){console.log("appCache.update: "+e)}},e||3e5)},o=function(){t.addEventListener("updateready",function(){t.status==t.UPDATEREADY&&(n||(safeConfirm({type:"WEBOGRAM_UPDATED_RELOAD",message:"A new version of Webogram is downloaded. Launch it?"},function(e){e?window.location.reload():n=!0}),r()))},!1),t.addEventListener("noupdate",function(){r()},!1),t.addEventListener("error",function(){r()},!1)};r(3e3),window.addEventListener("load",o)}}(),function(e,t,n){"use strict";vari,r,o,a,s,c,l,u,p,d,f,h,g,m,y,v,_,b,w,$,S,C,k,M,x,T,E,A,D;S={paneClass:"nano-pane",sliderClass:"nano-slider",contentClass:"nano-content",iOSNativeScrolling:!1,preventPageScrolling:!1,disableResize:!1,alwaysVisible:!1,flashDelay:1500,sliderMinHeight:20,sliderMaxHeight:null,documentContext:null,windowContext:null},v="scrollbar",y="scroll",u="mousedown",p="mousemove",f="mousewheel",d="mouseup",m="resize",s="drag",b="up",g="panedown",o="DOMMouseScroll",a="down",w="wheel",c="keydown",l="keyup",_="touchmove",i="Microsoft Internet Explorer"===t.navigator.appName&&/msie 7./i.test(t.navigator.appVersion)&&t.ActiveXObject,r=null,x=t.requestAnimationFrame,$=t.cancelAnimationFrame,E=n.createElement("div").style,D=function(){vare,t,n,i,r,o;for(i=["t","webkitT","MozT","msT","OT"],e=r=0,o=i.length;o>r;e=++r)if(n=i[e],t=i[e]+"ransform",tinE)returni[e].substr(0,i[e].length-1);return!1}(),A=function(e){returnD===!1?!1:""===D?e:D+e.charAt(0).toUpperCase()+e.substr(1)},T=A("transform"),k=T!==!1,C=function(){vare,t,i;returne=n.createElement("div"),t=e.style,t.position="absolute",t.width="100px",t.height="100px",t.overflow=y,t.top="-9999px",n.body.appendChild(e),i=e.offsetWidth-e.clientWidth,n.body.removeChild(e),i},M=function(){vare,n,i;returnn=t.navigator.userAgent,(e=/(?=.+Mac OS X)(?=.+Firefox)/.test(n))?(i=/Firefox\/\d{2}\./.exec(n),i&&(i=i[0].replace(/\D+/g,"")),e&&+i>23):!1},h=function(){functionc(i,o){this.el=i,this.options=o,r||(r=C()),this.$el=e(this.el),this.doc=e(this.options.documentContext||n),this.win=e(this.options.windowContext||t),this.$content=this.$el.children("."+o.contentClass),this.$content.attr("tabindex",this.options.tabIndex||0),this.content=this.$content[0],this.previousPosition=0,this.options.iOSNativeScrolling&&null!=this.el.style.WebkitOverflowScrolling?this.nativeScrolling():this.generate(),this.createEvents(),this.addEvents(),this.reset()}returnc.prototype.preventScrolling=function(e,t){if(this.isActive)if(e.type===o)(t===a&&e.originalEvent.detail>0||t===b&&e.originalEvent.detail<0)&&e.preventDefault();elseif(e.type===f){if(!e.originalEvent||!e.originalEvent.wheelDelta)return;(t===a&&e.originalEvent.wheelDelta<0||t===b&&e.originalEvent.wheelDelta>0)&&e.preventDefault()}},c.prototype.nativeScrolling=function(){this.$content.css({WebkitOverflowScrolling:"touch"}),this.iOSNativeScrolling=!0,this.isActive=!0},c.prototype.updateScrollValues=function(){vare,t;e=this.content,this.maxScrollTop=e.scrollHeight-e.clientHeight,this.prevScrollTop=this.contentScrollTop||0,this.contentScrollTop=e.scrollTop,t=this.contentScrollTop>this.previousPosition?"down":this.contentScrollTop<this.previousPosition?"up":"same",this.previousPosition=this.contentScrollTop,"same"!==t&&this.$el.trigger("update",{position:this.contentScrollTop,maximum:this.maxScrollTop,direction:t}),this.iOSNativeScrolling||(this.maxSliderTop=this.paneHeight-this.sliderHeight,this.sliderTop=0===this.maxScrollTop?0:this.contentScrollTop*this.maxSliderTop/this.maxScrollTop)},c.prototype.setOnScrollStyles=function(){vare;k?(e={},e[T]="translate(0, "+this.sliderTop+"px)"):e={top:this.sliderTop},x?this.scrollRAF||(this.scrollRAF=x(function(t){returnfunction(){t.scrollRAF=null,t.slider.css(e)}}(this))):this.s
c=R(c,n.childNodes),n=s.firstChild,n.textContent=""}returns.textContent="",s.innerHTML="",o(c,function(e){s.appendChild(e)}),s}functionmt(e,n){n=n||t;vari;return(i=Zi.exec(e))?[n.createElement(i[1])]:(i=gt(e,n))?i.childNodes:[]}functionyt(e){if(einstanceofyt)returne;if(b(e)&&(e=Oi(e)),!(thisinstanceofyt)){if(b(e)&&"<"!=e.charAt(0))throwXi("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");returnnewyt(e)}b(e)?xt(this,mt(e)):xt(this,e)}functionvt(e){returne.cloneNode(!0)}function_t(e){wt(e);for(vart=0,n=e.childNodes||[];t<n.length;t++)_t(n[t])}functionbt(e,t,n,i){if(v(i))throwXi("offargs","jqLite#off() does not support the `selector` argument");varr=$t(e,"events"),a=$t(e,"handle");a&&(y(t)?o(r,function(t,n){Wi(e,n,t),deleter[n]}):o(t.split(" "),function(t){y(n)?(Wi(e,t,r[t]),deleter[t]):L(r[t]||[],n)}))}functionwt(e,t){vari=e[Hi],r=ji[i];if(r){if(t)returnvoiddeleteji[i].data[t];r.handle&&(r.events.$destroy&&r.handle({},"$destroy"),bt(e)),deleteji[i],e[Hi]=n}}function$t(e,t,n){vari=e[Hi],r=ji[i||-1];returnv(n)?(r||(e[Hi]=i=pt(),r=ji[i]={}),void(r[t]=n)):r&&r[t]}functionSt(e,t,n){vari=$t(e,"data"),r=v(n),o=!r&&v(t),a=o&&!_(t);if(i||a||$t(e,"data",i={}),r)i[t]=n;else{if(!o)returni;if(a)returni&&i[t];p(i,t)}}functionCt(e,t){returne.getAttribute?(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1:!1}functionkt(e,t){t&&e.setAttribute&&o(t.split(" "),function(t){e.setAttribute("class",Oi((" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+Oi(t)+" "," ")))})}functionMt(e,t){if(t&&e.setAttribute){varn=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");o(t.split(" "),function(e){e=Oi(e),-1===n.indexOf(" "+e+" ")&&(n+=e+" ")}),e.setAttribute("class",Oi(n))}}functionxt(e,t){if(t){t=t.nodeName||!v(t.length)||M(t)?[t]:t;for(varn=0;n<t.length;n++)e.push(t[n])}}functionTt(e,t){returnEt(e,"$"+(t||"ngController")+"Controller")}functionEt(e,t,i){e=Ti(e),9==e[0].nodeType&&(e=e.find("html"));for(varr=S(t)?t:[t];e.length;){for(varo=e[0],a=0,s=r.length;s>a;a++)if((i=e.data(r[a]))!==n)returni;e=Ti(o.parentNode||11===o.nodeType&&o.host)}}functionAt(e){for(vart=0,n=e.childNodes;t<n.length;t++)_t(n[t]);for(;e.firstChild;)e.removeChild(e.firstChild)}functionDt(e,t){varn=nr[t.toLowerCase()];returnn&&ir[e.nodeName]&&n}functionIt(e,n){vari=function(i,r){if(i.preventDefault||(i.preventDefault=function(){i.returnValue=!1}),i.stopPropagation||(i.stopPropagation=function(){i.cancelBubble=!0}),i.target||(i.target=i.srcElement||t),y(i.defaultPrevented)){vara=i.preventDefault;i.preventDefault=function(){i.defaultPrevented=!0,a.call(i)},i.defaultPrevented=!1}i.isDefaultPrevented=function(){returni.defaultPrevented||i.returnValue===!1};vars=F(n[r||i.type]||[]);o(s,function(t){t.call(e,i)}),8>=xi?(i.preventDefault=null,i.stopPropagation=null,i.isDefaultPrevented=null):(deletei.preventDefault,deletei.stopPropagation,deletei.isDefaultPrevented)};returni.elem=e,i}functionPt(e){vart,i=typeofe;return"object"==i&&null!==e?"function"==typeof(t=e.$$hashKey)?t=e.$$hashKey():t===n&&(t=e.$$hashKey=l()):t=e,i+":"+t}functionNt(e){o(e,this.put,this)}functionLt(e){vart=e.toString().replace(sr,""),n=t.match(rr);returnn?"function("+(n[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}functionBt(e,t,n){vari,r,a,s;if("function"==typeofe){if(!(i=e.$inject)){if(i=[],e.length){if(t)throwb(n)&&n||(n=e.name||Lt(e)),cr("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",n);r=e.toString().replace(sr,""),a=r.match(rr),o(a[1].split(or),function(e){e.replace(ar,function(e,t,n){i.push(n)})})}e.$inject=i}}elseS(e)?(s=e.length-1,ot(e[s],"fn"),i=e.slice(0,s)):ot(e,"fn",!0);returni}functionFt(e,t){functioni(e){returnfunction(t,n){return_(t)?voido(t,c(e)):e(t,n)}}functionr(e,t){if(at(e,"service"),(C(t)||S(t))&&(t=k.instantiate(t)),!t.$get)throwcr("pget","Provider '{0}' must define $get factory method.",e);return$[e+y]=t}functiona(e,t){returnr(e,{$ge
un(n,this,e),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){vare=Z(this.$$search),t=this.$$hash?"#"+Y(this.$$hash):"";this.$$url=cn(this.$$path)+(e?"?"+e:"")+t,this.$$absUrl=i+this.$$url.substr(1)},this.$$rewrite=function(r){varo,a;return(o=pn(e,r))!==n?(a=o,(o=pn(t,o))!==n?i+(pn("/",o)||o):e+a):(o=pn(i,r))!==n?i+o:i==r+"/"?i:void0}}functionmn(e,t){varn=fn(e);ln(e,this,e),this.$$parse=function(i){functionr(e,t,n){vari,r=/^\/[A-Z]:(\/.*)/;return0===t.indexOf(n)&&(t=t.replace(n,"")),r.exec(t)?e:(i=r.exec(e),i?i[1]:e)}varo=pn(e,i)||pn(n,i),a="#"==o.charAt(0)?pn(t,o):this.$$html5?o:"";if(!b(a))throwmr("ihshprfx",'Invalid url "{0}", missing hash prefix "{1}".',i,t);un(a,this,e),this.$$path=r(this.$$path,a,e),this.$$compose()},this.$$compose=function(){varn=Z(this.$$search),i=this.$$hash?"#"+Y(this.$$hash):"";this.$$url=cn(this.$$path)+(n?"?"+n:"")+i,this.$$absUrl=e+(this.$$url?t+this.$$url:"")},this.$$rewrite=function(t){returndn(e)==dn(t)?t:void0}}functionyn(e,t){this.$$html5=!0,mn.apply(this,arguments);varn=fn(e);this.$$rewrite=function(i){varr;returne==dn(i)?i:(r=pn(n,i))?e+t+r:n===i+"/"?n:void0},this.$$compose=function(){varn=Z(this.$$search),i=this.$$hash?"#"+Y(this.$$hash):"";this.$$url=cn(this.$$path)+(n?"?"+n:"")+i,this.$$absUrl=e+t+this.$$url}}functionvn(e){returnfunction(){returnthis[e]}}function_n(e,t){returnfunction(n){returny(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}functionbn(){vart="",n=!1;this.hashPrefix=function(e){returnv(e)?(t=e,this):t},this.html5Mode=function(e){returnv(e)?(n=e,this):n},this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(i,r,o,a){functions(e){i.$broadcast("$locationChangeSuccess",c.absUrl(),e)}varc,l,u,p=r.baseHref(),d=r.url();n?(u=hn(d)+(p||"/"),l=o.history?gn:yn):(u=dn(d),l=mn),c=newl(u,"#"+t),c.$$parse(c.$$rewrite(d)),a.on("click",function(n){if(!n.ctrlKey&&!n.metaKey&&2!=n.which){for(varo=Ti(n.target);"a"!==$i(o[0].nodeName);)if(o[0]===a[0]||!(o=o.parent())[0])return;vars=o.prop("href");if(_(s)&&"[object SVGAnimatedString]"===s.toString()&&(s=jn(s.animVal).href),l===yn){varp=o.attr("href")||o.attr("xlink:href");if(p.indexOf("://")<0){vard="#"+t;if("/"==p[0])s=u+d+p;elseif("#"==p[0])s=u+d+(c.path()||"/")+p;else{for(varf=c.path().split("/"),h=p.split("/"),g=0;g<h.length;g++)"."!=h[g]&&(".."==h[g]?f.pop():h[g].length&&f.push(h[g]));s=u+d+f.join("/")}}}varm=c.$$rewrite(s);s&&!o.attr("target")&&m&&!n.isDefaultPrevented()&&(n.preventDefault(),m!=r.url()&&(c.$$parse(m),i.$apply(),e.angular["ff-684208-preventDefault"]=!0))}}),c.absUrl()!=d&&r.url(c.absUrl(),!0),r.onUrlChange(function(e){c.absUrl()!=e&&(i.$evalAsync(function(){vart=c.absUrl();c.$$parse(e),i.$broadcast("$locationChangeStart",e,t).defaultPrevented?(c.$$parse(t),r.url(t)):s(t)}),i.$$phase||i.$digest())});varf=0;returni.$watch(function(){vare=r.url(),t=c.$$replace;returnf&&e==c.absUrl()||(f++,i.$evalAsync(function(){i.$broadcast("$locationChangeStart",c.absUrl(),e).defaultPrevented?c.$$parse(e):(r.url(c.absUrl(),t),s(e))})),c.$$replace=!1,f}),c}]}functionwn(){vare=!0,t=this;this.debugEnabled=function(t){returnv(t)?(e=t,this):e},this.$get=["$window",function(n){functioni(e){returneinstanceofError&&(e.stack?e=e.message&&-1===e.stack.indexOf(e.message)?"Error: "+e.message+"\n"+e.stack:e.stack:e.sourceURL&&(e=e.message+"\n"+e.sourceURL+":"+e.line)),e}functionr(e){vart=n.console||{},r=t[e]||t.log||h,a=!1;try{a=!!r.apply}catch(s){}returna?function(){vare=[];returno(arguments,function(t){e.push(i(t))}),r.apply(t,e)}:function(e,t){r(e,null==t?"":t)}}return{log:r("log"),info:r("info"),warn:r("warn"),error:r("error"),debug:function(){varn=r("debug");returnfunction(){e&&n.apply(t,arguments)}}()}}]}function$n(e,t){if("constructor"===e)throwvr("isecfld",'Referencing "constructor" field in Angular expressions is disallowed! Expression: {0}',t);returne}functionSn(e,t){if(e){if(e.constructor===e)throwvr("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e.document&&e.location&&e.alert&&e.se
a(E)!=h&&n.move(ct(E.clone),null,Ti(D)),D=s(E)}else_=i.$new();_[w]=C,$&&(_[$]=b),_.$index=p,_.$first=0===p,_.$last=p===g-1,_.$middle=!(_.$first||_.$last),_.$odd=!(_.$even=0===(1&p)),E.scope||f(_,function(e){e[e.length++]=t.createComment(" end ngRepeat: "+S+" "),n.enter(e,null,Ti(D)),D=e,E.scope=_,E.clone=e,I[E.id]=E})}M=I})}}}],xo=["$animate",function(e){returnfunction(t,n,i){t.$watch(i.ngShow,function(t){e[W(t)?"removeClass":"addClass"](n,"ng-hide")})}}],To=["$animate",function(e){returnfunction(t,n,i){t.$watch(i.ngHide,function(t){e[W(t)?"addClass":"removeClass"](n,"ng-hide")})}}],Eo=ci(function(e,t,n){e.$watch(n.ngStyle,function(e,n){n&&e!==n&&o(n,function(e,n){t.css(n,"")}),e&&t.css(e)},!0)}),Ao=["$animate",function(e){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(t,n,i,r){vara=i.ngSwitch||i.on,s=[],c=[],l=[],u=[];t.$watch(a,function(n){vara,p;for(a=0,p=l.length;p>a;++a)l[a].remove();for(l.length=0,a=0,p=u.length;p>a;++a){vard=c[a];u[a].$destroy(),l[a]=d,e.leave(d,function(){l.splice(a,1)})}c.length=0,u.length=0,(s=r.cases["!"+n]||r.cases["?"])&&(t.$eval(i.change),o(s,function(n){vari=t.$new();u.push(i),n.transclude(i,function(t){vari=n.element;c.push(t),e.enter(t,i.parent(),i)})}))})}}}],Do=ci({transclude:"element",priority:800,require:"^ngSwitch",link:function(e,t,n,i,r){i.cases["!"+n.ngSwitchWhen]=i.cases["!"+n.ngSwitchWhen]||[],i.cases["!"+n.ngSwitchWhen].push({transclude:r,element:t})}}),Io=ci({transclude:"element",priority:800,require:"^ngSwitch",link:function(e,t,n,i,r){i.cases["?"]=i.cases["?"]||[],i.cases["?"].push({transclude:r,element:t})}}),Po=ci({link:function(e,t,n,r,o){if(!o)throwi("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",G(t));o(function(e){t.empty(),t.append(e)})}}),No=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,n){if("text/ng-template"==n.type){vari=n.id,r=t[0].text;e.put(i,r)}}}}],Lo=i("ngOptions"),Bo=m({terminal:!0}),Fo=["$compile","$parse",function(e,i){varr=/^\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]+?))?$/,s={$setViewValue:h};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(e,t,n){vari,r,o=this,a={},c=s;o.databound=n.ngModel,o.init=function(e,t,n){c=e,i=t,r=n},o.addOption=function(t){at(t,'"option value"'),a[t]=!0,c.$viewValue==t&&(e.val(t),r.parent()&&r.remove())},o.removeOption=function(e){this.hasOption(e)&&(deletea[e],c.$viewValue==e&&this.renderUnknownOption(e))},o.renderUnknownOption=function(t){varn="? "+Pt(t)+" ?";r.val(n),e.prepend(r),e.val(n),r.prop("selected",!0)},o.hasOption=function(e){returna.hasOwnProperty(e)},t.$on("$destroy",function(){o.renderUnknownOption=h})}],link:function(s,c,l,u){functionp(e,t,n,i){n.$render=function(){vare=n.$viewValue;i.hasOption(e)?(k.parent()&&k.remove(),t.val(e),""===e&&h.prop("selected",!0)):y(e)&&h?t.val(""):i.renderUnknownOption(e)},t.on("change",function(){e.$apply(function(){k.parent()&&k.remove(),n.$setViewValue(t.val())})})}functiond(e,t,n){vari;n.$render=function(){vare=newNt(n.$viewValue);o(t.find("option"),function(t){t.selected=v(e.get(t.value))})},e.$watch(function(){O(i,n.$viewValue)||(i=B(n.$viewValue),n.$render())}),t.on("change",function(){e.$apply(function(){vare=[];o(t.find("option"),function(t){t.selected&&e.push(t.value)}),n.$setViewValue(e)})})}functionf(t,o,s){functionc(){vare,n,i,r,c,l,m,b,M,x,T,E,A,D,I,P={"":[]},N=[""],L=s.$modelValue,B=g(t)||[],F=d?a(B):B,O={},U=!1;if(_)if(y&&S(L)){U=newNt([]);for(varR=0;R<L.length;R++)O[p]=L[R],U.put(y(t,O),L[R])}elseU=newNt(L);for(T=0;M=F.length,M>T;T++){if(m=T,d){if(m=F[T],"$"===m.charAt(0))continue;O[d]=m}if(O[p]=B[m],e=f(t,O)||"",(n=P[e])||(n=P[e]=[],N.push(e)),_)E=v(U.remove(y?y(t,O):h(t,O)));else{if(y){varq={};q[p]=L,E=y(t,q)===y(t,O)}elseE=L===h(t,O);U=U||E
},remove:function(t){for(varn=-1,i=0;i<e.length;i++)if(t==e[i].key){n=i;break}returne.splice(n,1)[0]},removeTop:function(){returne.splice(e.length-1,1)[0]},length:function(){returne.length}}}}}).directive("modalBackdrop",["$timeout",function(e){return{restrict:"EA",replace:!0,templateUrl:"template/modal/backdrop.html",link:function(t){t.animate=!1,e(function(){t.animate=!0})}}}]).directive("modalWindow",["$modalStack","$timeout",function(e,t){return{restrict:"EA",scope:{index:"@",animate:"=",nav:"="},replace:!0,transclude:!0,templateUrl:"template/modal/window.html",link:function(n,i,r){n.windowClass=r.windowClass||"",t(function(){n.animate=!0,i[0].focus()}),n.close=function(t){varn=e.getTop();n&&n.value.backdrop&&"static"!=n.value.backdrop&&t.target===t.currentTarget&&(t.preventDefault(),t.stopPropagation(),e.dismiss(n.key,"backdrop click"))}}}}]).factory("$modalStack",["$transition","$timeout","$document","$compile","$rootScope","$$stackedMap",function(e,t,n,i,r,o){functiona(){for(vare=-1,t=f.keys(),n=0;n<t.length;n++)f.get(t[n]).value.backdrop&&(e=n);returne}functions(e){vart=n.find("body").eq(0),i=f.get(e).value;f.remove(e),l(i.modalDomEl,i.modalScope,0,c),t.toggleClass(d,f.length()>0)}functionc(){if(u&&-1==a()){vare=p;l(u,p,0,function(){e.$destroy(),e=null}),u=void0,p=void0}}functionl(n,i,r,o){functiona(){a.done||(a.done=!0,n.remove(),o&&o())}i.animate=!1;vars=e.transitionEndEventName;if(s){varc=t(a,r);n.bind(s,function(){t.cancel(c),a(),i.$apply()})}elset(a,0)}varu,p,d="modal-open",f=o.createNew(),h={};returnr.$watch(a,function(e){p&&(p.index=e)}),n.bind("keydown",function(e){vart;27===e.which&&(t=f.top(),t&&t.value.keyboard&&r.$apply(function(){h.dismiss(t.key)}))}),h.open=function(e,t){f.add(e,{deferred:t.deferred,modalScope:t.scope,backdrop:t.backdrop,keyboard:t.keyboard});varo=n.find("body").eq(0),s=a();s>=0&&!u&&(p=r.$new(!0),p.index=s,u=i("<div modal-backdrop></div>")(p),o.append(u));varc=angular.element("<div modal-window></div>");c.attr("window-class",t.windowClass),c.attr("index",f.length()-1),c.attr("animate","animate"),c.attr("nav","nav"),c.html(t.content);varl=i(c)(t.scope);f.top().value.modalDomEl=l,o.append(l),o.addClass(d)},h.close=function(e,t){varn=f.get(e).value;n&&(n.deferred.resolve(t),s(e))},h.dismiss=function(e,t){varn=f.get(e).value;n&&(n.deferred.reject(t),s(e))},h.dismissAll=function(e){for(vart=this.getTop();t;)this.dismiss(t.key,e),t=this.getTop()},h.getTop=function(){returnf.top()},h}]).provider("$modal",function(){vare={options:{backdrop:!0,keyboard:!0},$get:["$injector","$rootScope","$q","$http","$templateCache","$controller","$modalStack",function(t,n,i,r,o,a,s){functionc(e){returne.template?i.when(e.template):r.get(e.templateUrl,{cache:o}).then(function(e){returne.data})}functionl(e){varn=[];returnangular.forEach(e,function(e){(angular.isFunction(e)||angular.isArray(e))&&n.push(i.when(t.invoke(e)))}),n}varu={};returnu.open=function(t){varr=i.defer(),o=i.defer(),u={result:r.promise,opened:o.promise,close:function(e){s.close(u,e)},dismiss:function(e){s.dismiss(u,e)}};if(t=angular.extend({},e.options,t),t.resolve=t.resolve||{},!t.template&&!t.templateUrl)thrownewError("One of template or templateUrl options is required.");varp=i.all([c(t)].concat(l(t.resolve)));returnp.then(function(e){vari=(t.scope||n).$new();i.$close=u.close,i.$dismiss=u.dismiss;varo,c={},l=1;t.controller&&(c.$scope=i,c.$modalInstance=u,angular.forEach(t.resolve,function(t,n){c[n]=e[l++]}),o=a(t.controller,c)),s.open(u,{scope:i,deferred:r,content:e[0],backdrop:t.backdrop,keyboard:t.keyboard,windowClass:t.windowClass})},function(e){r.reject(e)}),p.then(function(){o.resolve(!0)},function(){o.reject(!1)}),u},u}]};returne}),angular.module("ui.bootstrap.position",[]).factory("$position",["$document","$window",function(e,t){functionn(e,n){returne.currentStyle?e.currentStyle[n]:t.getComputedStyle?t.getComputedStyle(e)[n]:e.style[n]}functioni(e){return"static"===(n(e,"position")||"static")}varr=function(t){for(varn=e[0],r=t.offsetParent||n;r&&r!==n&&i(r);)r=r.offsetParent;ret
}returne.prototype.get=function(e){returne<<=2,this.bytes[e]*s+(this.bytes[e+1]<<16|this.bytes[e+2]<<8|this.bytes[e+3])},e.prototype.set=function(e,t){varn=Math.floor(t/s),i=t-n*s;e<<=2,this.bytes[e]=n,this.bytes[e+1]=i>>16,this.bytes[e+2]=i>>8&255,this.bytes[e+3]=255&i},e}();e.hash=a}(sha1||(sha1={})),function(){"use strict";functione(e){throwe}functiont(e,t){varn=e.split("."),i=p;!(n[0]ini)&&i.execScript&&i.execScript("var "+n[0]);for(varr;n.length&&(r=n.shift());)n.length||t===u?i=i[r]?i[r]:i[r]={}:i[r]=t}functionn(e,t,n){vari,r="number"==typeoft?t:t=0,o="number"==typeofn?n:e.length;for(i=-1,r=7&o;r--;++t)i=i>>>8^y[255&(i^e[t])];for(r=o>>3;r--;t+=8)i=i>>>8^y[255&(i^e[t])],i=i>>>8^y[255&(i^e[t+1])],i=i>>>8^y[255&(i^e[t+2])],i=i>>>8^y[255&(i^e[t+3])],i=i>>>8^y[255&(i^e[t+4])],i=i>>>8^y[255&(i^e[t+5])],i=i>>>8^y[255&(i^e[t+6])],i=i>>>8^y[255&(i^e[t+7])];return(4294967295^i)>>>0}functioni(){}functionr(e){vart,n,i,r,o,a,s,c,l,u=e.length,p=0,f=Number.POSITIVE_INFINITY;for(c=0;u>c;++c)e[c]>p&&(p=e[c]),e[c]<f&&(f=e[c]);for(t=1<<p,n=new(d?Uint32Array:Array)(t),i=1,r=0,o=2;p>=i;){for(c=0;u>c;++c)if(e[c]===i){for(a=0,s=r,l=0;i>l;++l)a=a<<1|1&s,s>>=1;for(l=a;t>l;l+=o)n[l]=i<<16|c;++r}++i,r<<=1,o<<=1}return[n,p,f]}functiono(t,n){switch(this.i=[],this.j=32768,this.d=this.f=this.c=this.n=0,this.input=d?newUint8Array(t):t,this.o=!1,this.k=$,this.w=!1,(n||!(n={}))&&(n.index&&(this.c=n.index),n.bufferSize&&(this.j=n.bufferSize),n.bufferType&&(this.k=n.bufferType),n.resize&&(this.w=n.resize)),this.k){casew:this.a=32768,this.b=new(d?Uint8Array:Array)(32768+this.j+258);break;case$:this.a=0,this.b=new(d?Uint8Array:Array)(this.j),this.e=this.D,this.q=this.A,this.l=this.C;break;default:e(Error("invalid inflate mode"))}}functiona(t,n){for(vari,r=t.f,o=t.d,a=t.input,s=t.c;n>o;)i=a[s++],i===u&&e(Error("input buffer is broken")),r|=i<<o,o+=8;returni=r&(1<<n)-1,t.f=r>>>n,t.d=o-n,t.c=s,i}functions(e,t){for(varn,i,r,o=e.f,a=e.d,s=e.input,c=e.c,l=t[0],p=t[1];p>a&&(n=s[c++],n!==u);)o|=n<<a,a+=8;returni=l[o&(1<<p)-1],r=i>>>16,e.f=o>>r,e.d=a-r,e.c=c,65535&i}functionc(e){functiont(e,t,n){vari,r,o,c;for(c=0;e>c;)switch(i=s(this,t)){case16:for(o=3+a(this,2);o--;)n[c++]=r;break;case17:for(o=3+a(this,3);o--;)n[c++]=0;r=0;break;case18:for(o=11+a(this,7);o--;)n[c++]=0;r=0;break;default:r=n[c++]=i}returnn}varn,i,o,c,l=a(e,5)+257,u=a(e,5)+1,p=a(e,4)+4,f=new(d?Uint8Array:Array)(M.length);for(c=0;p>c;++c)f[M[c]]=a(e,3);n=r(f),i=new(d?Uint8Array:Array)(l),o=new(d?Uint8Array:Array)(u),e.l(r(t.call(e,l,n,i)),r(t.call(e,u,n,o)))}functionl(e){this.input=e,this.c=0,this.m=[],this.s=!1}varu=void0,p=this,d="undefined"!=typeofUint8Array&&"undefined"!=typeofUint16Array&&"undefined"!=typeofUint32Array;new(d?Uint8Array:Array)(256);varf;for(f=0;256>f;++f)for(varh=f,g=7,h=h>>>1;h;h>>>=1)--g;varm=[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,
},t.file?t.file(function(t){e.write(t)},function(e){i.reject(e)}):e.write(tinstanceofBlob?t:newBlob([bytesToArrayBuffer(t)])),i.promise}functiono(t,i,r){if(!e.chrome||!chrome.fileSystem||!chrome.fileSystem.chooseEntry)returnn.reject();varo=n.defer();returnchrome.fileSystem.chooseEntry({type:"saveFile",suggestedName:t,accepts:[{mimeTypes:[r],extensions:[i]}]},function(e){o.resolve(e)}),o.promise}functiona(e){vart=n.defer();returne.createWriter(function(e){t.resolve(e)},function(e){t.reject(e)}),t.promise}functions(e,n){vari=[],r={write:function(e){i.push(e),t(function(){r.onwriteend&&r.onwriteend()})},truncate:function(){i=[]},finalize:function(){vart;try{t=newBlob(i,{type:e})}catch(r){varo=newBlobBuilder;angular.forEach(i,function(e){o.append(e)}),t=o.getBlob(e)}returnn&&n(t),t}};returnr}functionc(e,t){returnvoid0!==e.toURL?e.toURL(t):einstanceofBlob?URL.createObjectURL(e):"data:"+t+";base64,"+bytesToBase64(e)}functionl(e,n,i){varr=$("<a>Download</a>").css({position:"absolute",top:1,left:1}).attr("href",e).attr("target","_blank").attr("download",i).appendTo("body");r[0].dataset.downloadurl=[n,i,e].join(":"),r[0].click(),t(function(){r.remove()},100)}returne.URL=e.URL||e.webkitURL,e.BlobBuilder=e.BlobBuilder||e.WebKitBlobBuilder||e.MozBlobBuilder,{copy:i,write:r,getFileWriter:a,getFakeFileWriter:s,chooseSave:o,getUrl:c,download:l}}]).service("IdbFileStorage",["$q","$window","FileManager",function(e,t,n){functioni(){returnd}functionr(){if(c)returnc;try{vart=indexedDB.open(l,p),n=e.defer(),i=function(e){e.createObjectStore(u)}}catch(r){returnd=!1,e.reject(r)}returnt.onsuccess=function(){db=t.result,db.onerror=function(e){d=!1,console.error("Error creating/accessing IndexedDB database",e),n.reject(e)},db.setVersion&&db.version!=p?db.setVersion(p).onsuccess=function(){i(db),n.resolve(db)}:n.resolve(db)},t.onerror=function(e){d=!1,console.error("Error creating/accessing IndexedDB database",e),n.reject(e)},t.onupgradeneeded=function(e){i(e.target.result)},c=n.promise}functiono(t,n){returnr().then(function(i){try{varr=e.defer(),o=i.transaction([u],IDBTransaction.READ_WRITE||"readwrite").objectStore(u),a=o.put(n,t)}catch(s){returnd=!1,e.reject(s)}returna.onsuccess=function(){r.resolve(n)},a.onerror=function(e){r.reject(e)},r.promise})}functiona(t){returnr().then(function(n){vari=e.defer(),r=n.transaction([u],IDBTransaction.READ||"readonly").objectStore(u),o=r.get(t);returno.onsuccess=function(e){void0===e.target.result?i.reject():i.resolve(e.target.result)},o.onerror=function(e){i.reject(e)},i.promise})}functions(t,i){varr=n.getFakeFileWriter(i,function(e){o(t,e)});returne.when(r)}t.indexedDB=t.indexedDB||t.webkitIndexedDB||t.mozIndexedDB||t.OIndexedDB||t.msIndexedDB,t.IDBTransaction=t.IDBTransaction||t.webkitIDBTransaction||t.OIDBTransaction||t.msIDBTransaction;varc,l="cachedFiles",u="files",p=1,d=void0!==t.indexedDB&&void0!==t.IDBTransaction;returnr(),{isAvailable:i,saveFile:o,getFile:a,getFileWriter:s}}]).service("TmpfsFileStorage",["$q","$window","FileManager",function(e,t,n){functioni(){if(c)returnc;if(!t.requestFileSystem)returnc=e.reject({type:"FS_BROWSER_UNSUPPORTED",description:"requestFileSystem not present"});varn=e.defer();returnt.requestFileSystem(t.TEMPORARY,5242880,function(e){cachedFs=e,n.resolve()},function(e){l=!1,n.reject(e)}),c=n.promise}functionr(){returnl}functiono(t,n){returnn=n||1,i().then(function(){vari=e.defer();returncachedFs.root.getFile(t,{create:!1},function(e){e.file(function(t){t.size>=n?i.resolve(e):i.reject(newError("FILE_NOT_FOUND"))},function(e){console.log(dT(),"error",e),i.reject(e)})},function(){i.reject(newError("FILE_NOT_FOUND"))}),i.promise})}functiona(e,t){returns(e).then(function(e){returnn.write(e,t).then(function(){returne.finalize()})})}functions(t){returni().then(function(){vari=e.defer();returncachedFs.root.getFile(t,{create:!0},function(e){n.getFileWriter(e).then(function(t){t.finalize=function(){returne},i.resolve(t)},function(e){i.reject(e)})},function(e){i.reject(e)}),i.promise})}t.requestFileSystem=t.req