var log2,Zoomable;(function(n,t){"use strict";function i(n,i,r){var u=r.baseHref(),f=n[0];return function(n,r,e){var s,o;e=e||{};o=e.expires;s=t.isDefined(e.path)?e.path:u;t.isUndefined(r)&&(o="Thu, 01 Jan 1970 00:00:00 GMT",r="");t.isString(o)&&(o=new Date(o));r=encodeURIComponent(n)+"="+encodeURIComponent(r);r=r+(s?";path="+s:"")+(e.domain?";domain="+e.domain:"");r+=o?";expires="+o.toUTCString():"";r+=e.secure?";secure":"";r+=e.samesite?";samesite="+e.samesite:"";e=r.length+1;4096<e&&i.warn("Cookie '"+n+"' possibly not set or overflowed because it was too large ("+e+" > 4096 bytes)!");f.cookie=r}}t.module("ngCookies",["ng"]).info({angularVersion:"1.8.2"}).provider("$cookies",[function(){var n=this.defaults={};this.$get=["$$cookieReader","$$cookieWriter",function(i,r){return{get:function(n){return i()[n]},getObject:function(n){return(n=this.get(n))?t.fromJson(n):n},getAll:function(){return i()},put:function(i,u,f){r(i,u,f?t.extend({},n,f):n)},putObject:function(n,i,r){this.put(n,t.toJson(i),r)},remove:function(i,u){r(i,void 0,u?t.extend({},n,u):n)}}}]}]);i.$inject=["$document","$log","$browser"];t.module("ngCookies").provider("$$cookieWriter",function(){this.$get=i})})(window,window.angular),function(n,t){"use strict";function a(n){var t=[];return f(t,h).chars(n),t.join("")}var u=t.$$minErr("$sanitize"),e,i,o,s,r,h,c,l,f;t.module("ngSanitize",[]).provider("$sanitize",function(){function v(n,t){for(var f={},u=n.split(","),i=0;i<u.length;i++)f[t?r(u[i]):u[i]]=!0;return f}function rt(n){for(var i,r={},t=0,u=n.length;t<u;t++)i=n[t],r[i.name]=i.value;return r}function d(n){return n.replace(/&/g,"&amp;").replace(ut,function(n){var t=n.charCodeAt(0);return n=n.charCodeAt(1),"&#"+(1024*(t-55296)+(n-56320)+65536)+";"}).replace(ft,function(n){return"&#"+n.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function g(t){for(var u,f;t;){if(t.nodeType===n.Node.ELEMENT_NODE)for(var i=t.attributes,r=0,e=i.length;r<e;r++)u=i[r],f=u.name.toLowerCase(),("xmlns:ns1"===f||0===f.lastIndexOf("ns1:",0))&&(t.removeAttributeNode(u),r--,e--);(i=t.firstChild)&&g(i);t=y("nextSibling",t)}}function y(n,t){var i=t[n];if(i&&c.call(t,i))throw u("elclob",t.outerHTML||t.outerText);return i}var w=!1;this.$get=["$$sanitizeUri",function(n){return w&&i(k,et),function(t){var i=[];return l(t,f(i,function(t,i){return!/^unsafe:/.test(n(t,i))})),i.join("")}}];this.enableSvg=function(n){return s(n)?(w=n,this):w};e=t.bind;i=t.extend;o=t.forEach;s=t.isDefined;r=t.lowercase;h=t.noop;l=function(t,i){var r,f;null===t||void 0===t?t="":"string"!=typeof t&&(t=""+t);a.innerHTML=t;r=5;do{if(0===r)throw u("uinput");r--;n.document.documentMode&&g(a);t=a.innerHTML;a.innerHTML=t}while(t!==a.innerHTML);for(r=a.firstChild;r;){switch(r.nodeType){case 1:i.start(r.nodeName.toLowerCase(),rt(r.attributes));break;case 3:i.chars(r.textContent)}if(!(f=r.firstChild)&&(1===r.nodeType&&i.end(r.nodeName.toLowerCase()),f=y("nextSibling",r),!f))for(;null==f;){if(r=y("parentNode",r),r===a)break;f=y("nextSibling",r);1===r.nodeType&&i.end(r.nodeName.toLowerCase())}r=f}for(;r=a.firstChild;)a.removeChild(r)};f=function(n,t){var u=!1,i=e(n,n.push);return{start:function(n,f){n=r(n);!u&&ot[n]&&(u=n);u||!0!==k[n]||(i("<"),i(n),o(f,function(u,f){var e=r(f),o="img"===n&&"src"===e||"background"===e;!0===st[e]&&(!0!==it[e]||t(u,o))&&(i(" "),i(f),i('="'),i(d(u)),i('"'))}),i(">"))},end:function(n){n=r(n);u||!0!==k[n]||!0===nt[n]||(i("<\/"),i(n),i(">"));n==u&&(u=!1)},chars:function(n){u||i(d(n))}}};c=n.Node.prototype.contains||function(n){return!!(this.compareDocumentPosition(n)&16)};var ut=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ft=/([^#-~ |!])/g,nt=v("area,br,col,hr,img,wbr"),b=v("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),p=v("rp,rt"),tt=i({},p,b),b=i({},b,v("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,section,table,ul")),p=i({},p,v("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")),et=v("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),ot=v("script,style"),k=i({},nt,b,p,tt),it=v("background,cite,href,longdesc,src,xlink:href"),tt=v("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,tabindex,target,title,type,valign,value,vspace,width"),p=v("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",!0),st=i({},it,p,tt),a;(function(n){if(n.document&&n.document.implementation)n=n.document.implementation.createHTMLDocument("inert");else throw u("noinert");var t=(n.documentElement||n.getDocumentElement()).getElementsByTagName("body");1===t.length?a=t[0]:(t=n.createElement("html"),a=n.createElement("body"),t.appendChild(a),n.appendChild(t))})(n)}).info({angularVersion:"1.6.4"});t.module("ngSanitize").filter("linky",["$sanitize",function(n){var i=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,r=/^mailto:/i,u=t.$$minErr("linky"),f=t.isDefined,e=t.isFunction,o=t.isObject,s=t.isString;return function(t,h,c){function p(n){n&&l.push(a(n))}function b(n,t){var i,r=k(n);l.push("<a ");for(i in r)l.push(i+'="'+r[i]+'" ');!f(h)||"target"in r||l.push('target="',h,'" ');l.push('href="',n.replace(/"/g,"&quot;"),'">');p(t);l.push("<\/a>")}if(null==t||""===t)return t;if(!s(t))throw u("notstring",t);for(var k=e(c)?c:o(c)?function(){return c}:function(){return{}},v=t,l=[],y,w;t=v.match(i);)y=t[0],t[2]||t[4]||(y=(t[3]?"http://":"mailto:")+y),w=t.index,p(v.substr(0,w)),b(y,t[0].replace(r,"")),v=v.substring(w+t[0].length);return p(v),n(l.join(""))}}])}(window,window.angular),function(n,t){"use strict";function r(n,r,u){i.directive(n,["$parse","$swipe",function(i,f){return function(e,o,s){function a(n){if(!h)return!1;var t=Math.abs(n.y-h.y);return n=(n.x-h.x)*r,c&&75>t&&0<n&&30<n&&.3>t/n}var v=i(s[n]),h,c,l=["touch"];t.isDefined(s.ngSwipeDisableMouse)||l.push("mouse");f.bind(o,{start:function(n){h=n;c=!0},cancel:function(){c=!1},end:function(n,t){a(n)&&e.$apply(function(){o.triggerHandler(u);v(e,{$event:t})})}},l)}}])}var i=t.module("ngTouch",[]);i.info({angularVersion:"1.8.2"});i.factory("$swipe",[function(){function i(n){n=n.originalEvent||n;var t=n.touches&&n.touches.length?n.touches:[n];return n=n.changedTouches&&n.changedTouches[0]||t[0],{x:n.clientX,y:n.clientY}}function n(n,i){var u=[];return t.forEach(n,function(n){(n=r[n][i])&&u.push(n)}),u.join(" ")}var r={mouse:{start:"mousedown",move:"mousemove",end:"mouseup"},touch:{start:"touchstart",move:"touchmove",end:"touchend",cancel:"touchcancel"},pointer:{start:"pointerdown",move:"pointermove",end:"pointerup",cancel:"pointercancel"}};return{bind:function(t,r,u){var e,o,s,h,f=!1,c;u=u||["mouse","touch","pointer"];t.on(n(u,"start"),function(n){s=i(n);f=!0;o=e=0;h=s;r.start&&r.start(s,n)});if(c=n(u,"cancel"),c)t.on(c,function(n){f=!1;r.cancel&&r.cancel(n)});t.on(n(u,"move"),function(n){if(f&&s){var t=i(n);e+=Math.abs(t.x-h.x);o+=Math.abs(t.y-h.y);h=t;10>e&&10>o||(o>e?(f=!1,r.cancel&&r.cancel(n)):(n.preventDefault(),r.move&&r.move(t,n)))}});t.on(n(u,"end"),function(n){f&&(f=!1,r.end&&r.end(i(n),n))})}}}]);r("ngSwipeLeft",-1,"swipeleft");r("ngSwipeRight",1,"swiperight")}(window,window.angular),function(n,t){"use strict";function at(n,t,i){if(!n)throw oi("areq",t||"?",i||"required");return n}function vt(n,t){return!n&&!t?"":n?t?(c(n)&&(n=n.join(" ")),c(t)&&(t=t.join(" ")),n+" "+t):n:t}function ti(n){var t={};return n&&(n.to||n.from)&&(t.to=n.to,t.from=n.from),t}function s(n,t,r){var u="";return n=c(n)?n:n&&o(n)&&n.length?n.split(/\s+/):[],i(n,function(n,i){n&&0<n.length&&(u+=0<i?" ":"",u+=r?t+n:n+t)}),u}function yt(n){if(n instanceof r)switch(n.length){case 0:return n;case 1:if(1===n[0].nodeType)return n;break;default:return r(it(n))}if(1===n.nodeType)return r(n)}function it(n){var t,i;if(!n[0])return n;for(t=0;t<n.length;t++)if(i=n[t],1===i.nodeType)return i}function ii(n,t,r){i(t,function(t){n.addClass(t,r)})}function ri(n,t,r){i(t,function(t){n.removeClass(t,r)})}function w(n){return function(t,i){i.addClass&&(ii(n,t,i.addClass),i.addClass=null);i.removeClass&&(ri(n,t,i.removeClass),i.removeClass=null)}}function b(n){if(n=n||{},!n.$$prepared){var t=n.domOperation||u;n.domOperation=function(){n.$$domOperationFired=!0;t();t=u};n.$$prepared=!0}return n}function l(n,t){pt(n,t);wt(n,t)}function pt(n,t){t.from&&(n.css(t.from),t.from=null)}function wt(n,t){t.to&&(n.css(t.to),t.to=null)}function v(n,t,i){var r=t.options||{},f,e;return i=i.options||{},f=(r.addClass||"")+" "+(i.addClass||""),e=(r.removeClass||"")+" "+(i.removeClass||""),n=ui(n.attr("class"),f,e),i.preparationClasses&&(r.preparationClasses=d(i.preparationClasses,r.preparationClasses),delete i.preparationClasses),f=r.domOperation!==u?r.domOperation:null,ht(r,i),f&&(r.domOperation=f),r.addClass=n.addClass?n.addClass:null,r.removeClass=n.removeClass?n.removeClass:null,t.addClass=r.addClass,t.removeClass=r.removeClass,r}function ui(n,t,r){function e(n){o(n)&&(n=n.split(" "));var t={};return i(n,function(n){n.length&&(t[n]=!0)}),t}var f={},u;return n=e(n),t=e(t),i(t,function(n,t){f[t]=1}),r=e(r),i(r,function(n,t){f[t]=1===f[t]?null:-1}),u={addClass:"",removeClass:""},i(f,function(t,i){var r,f;1===t?(r="addClass",f=!n[i]||n[i+"-remove"]):-1===t&&(r="removeClass",f=n[i]||n[i+"-add"]);f&&(u[r].length&&(u[r]+=" "),u[r]+=i)}),u}function f(n){return n instanceof r?n[0]:n}function fi(n,t,i){var r="";t&&(r=s(t,"ng-",!0));i.addClass&&(r=d(r,s(i.addClass,"-add")));i.removeClass&&(r=d(r,s(i.removeClass,"-remove")));r.length&&(i.preparationClasses=r,n.addClass(r))}function k(n,t){var i=t?"-"+t+"s":"";return y(n,[p,i]),[p,i]}function rt(n,t){var i=t?"paused":"",r=h+"PlayState";return y(n,[r,i]),[r,i]}function y(n,t){n.style[t[0]]=t[1]}function d(n,t){return n?t?n+" "+t:n:t}function bt(n,t,r){var u=Object.create(null),f=n.getComputedStyle(t)||{};return i(r,function(n,t){var i=f[n],r;i&&(r=i.charAt(0),("-"===r||"+"===r||0<=r)&&(i=ei(i)),0===i&&(i=null),u[t]=i)}),u}function ei(n){var t=0;return n=n.split(/\s*,\s*/),i(n,function(n){"s"===n.charAt(n.length-1)&&(n=n.substring(0,n.length-1));n=parseFloat(n)||0;t=t?Math.max(n,t):n}),t}function ut(n){return 0===n||null!=n}function kt(n,t){var i=e,r=n+"s";return t?i+="Duration":r+=" linear all",[i,r]}function dt(){var n=Object.create(null);return{flush:function(){n=Object.create(null)},count:function(t){return(t=n[t])?t.total:0},get:function(t){return(t=n[t])&&t.value},put:function(t,i){n[t]?n[t].total++:n[t]={total:1,value:i}}}}function gt(n,t,r){i(r,function(i){n[i]=ct(n[i])?n[i]:t.style.getPropertyValue(i)})}var e,ft,h,et;void 0===n.ontransitionend&&void 0!==n.onwebkittransitionend?(e="WebkitTransition",ft="webkitTransitionEnd transitionend"):(e="transition",ft="transitionend");void 0===n.onanimationend&&void 0!==n.onwebkitanimationend?(h="WebkitAnimation",et="webkitAnimationEnd animationend"):(h="animation",et="animationend");var g=h+"Delay",ot=h+"Duration",p=e+"Delay",ni=e+"Duration",oi=t.$$minErr("ng"),si={transitionDuration:ni,transitionDelay:p,transitionProperty:e+"Property",animationDuration:ot,animationDelay:g,animationIterationCount:h+"IterationCount"},hi={transitionDuration:ni,transitionDelay:p,animationDuration:ot,animationDelay:g},st,ht,i,c,ct,nt,lt,tt,o,a,r,u;t.module("ngAnimate",[],function(){u=t.noop;st=t.copy;ht=t.extend;r=t.element;i=t.forEach;c=t.isArray;o=t.isString;tt=t.isObject;a=t.isUndefined;ct=t.isDefined;lt=t.isFunction;nt=t.isElement}).info({angularVersion:"1.6.4"}).directive("ngAnimateSwap",["$animate","$rootScope",function(n){return{restrict:"A",transclude:"element",terminal:!0,priority:600,link:function(t,i,r,u,f){var o,e;t.$watchCollection(r.ngAnimateSwap||r["for"],function(r){o&&n.leave(o);e&&(e.$destroy(),e=null);(r||0===r)&&(e=t.$new(),f(e,function(t){o=t;n.enter(t,null,i)}))})}}}]).directive("ngAnimateChildren",["$interpolate",function(n){return{link:function(t,i,r){function f(n){i.data("$$ngAnimateChildren","on"===n||"true"===n)}var u=r.ngAnimateChildren;o(u)&&0===u.length?i.data("$$ngAnimateChildren",!0):(f(n(u)(t)),r.$observe("ngAnimateChildren",f))}}}]).factory("$$rAFScheduler",["$$rAF",function(n){function r(n){i=i.concat(n);u()}function u(){if(i.length){for(var f=i.shift(),r=0;r<f.length;r++)f[r]();t||n(function(){t||u()})}}var i,t;return i=r.queue=[],r.waitUntilQuiet=function(i){t&&t();t=n(function(){t=null;i();u()})},r}]).provider("$$animateQueue",["$animateProvider",function(t){function y(n){if(!n)return null;n=n.split(" ");var t=Object.create(null);return i(n,function(n){t[n]=!0}),t}function h(n,t){if(n&&t){var i=y(t);return n.split(" ").some(function(n){return i[n]})}}function s(n,t,i){return u[n].some(function(n){return n(t,i)})}function e(n,t){var i=0<(n.addClass||"").length,r=0<(n.removeClass||"").length;return t?i&&r:i||r}var u=this.rules={skip:[],cancel:[],join:[]};u.join.push(function(n){return!n.structural&&e(n)});u.skip.push(function(n){return!n.structural&&!e(n)});u.skip.push(function(n,t){return"leave"===t.event&&n.structural});u.skip.push(function(n,t){return t.structural&&2===t.state&&!n.structural});u.cancel.push(function(n,t){return t.structural&&n.structural});u.cancel.push(function(n,t){return 2===t.state&&n.structural});u.cancel.push(function(n,t){if(t.structural)return!1;var i=n.addClass,r=n.removeClass,u=t.addClass,f=t.removeClass;return a(i)&&a(r)||a(u)&&a(f)?!1:h(i,f)||h(r,u)});this.$get=["$$rAF","$rootScope","$rootElement","$document","$$Map","$$animation","$$AnimateRunner","$templateRequest","$$jqLite","$$forceReflow","$$isDocumentHidden",function(u,h,y,p,k,d,g,rt,ut,ft,et){function ii(){var n=!1;return function(t){n?t():h.$$postDigest(function(){n=!0;t()})}}function ri(n,t,r){var u=[],f=lt[r];return f&&i(f,function(i){ti.call(i.node,t)?u.push(i.callback):"leave"===r&&ti.call(i.node,n)&&u.push(i.callback)}),u}function kt(n,t,i){var r=it(t);return n.filter(function(n){return!(n.node===r&&(!i||n.callback===i))})}function ui(n,t,r){function rt(n,t,r,f){lt(function(){var n=ri(ct,y,t);n.length?u(function(){i(n,function(n){n(w,r,f)});"close"!==r||y.parentNode||wt.off(y)}):"close"!==r||y.parentNode||wt.off(y)});n.progress(t,r,f)}function nt(n){var i=w,t=a;t.preparationClasses&&(i.removeClass(t.preparationClasses),t.preparationClasses=null);t.activeClasses&&(i.removeClass(t.activeClasses),t.activeClasses=null);ni(w,a);l(w,a);a.domOperation();k.complete(!n)}var a=st(r),w=yt(n),y=f(w),ct=y&&y.parentNode,a=b(a),k=new g,lt=ii(),it,ht;if((c(a.addClass)&&(a.addClass=a.addClass.join(" ")),a.addClass&&!o(a.addClass)&&(a.addClass=null),c(a.removeClass)&&(a.removeClass=a.removeClass.join(" ")),a.removeClass&&!o(a.removeClass)&&(a.removeClass=null),a.from&&!tt(a.from)&&(a.from=null),a.to&&!tt(a.to)&&(a.to=null),!y)||(r=[y.getAttribute("class"),a.addClass,a.removeClass].join(" "),!hi(r)))return nt(),k;var ut=0<=["enter","move","leave"].indexOf(t),p=et(),ft=!pt||p||vt.get(y);if(r=!ft&&ot.get(y)||{},it=!!r.state,ft||it&&1===r.state||(ft=!oi(y,ct,t)),ft)return p&&rt(k,t,"start"),nt(),p&&rt(k,t,"close"),k;if(ut&&ei(y),p={structural:ut,element:w,event:t,addClass:a.addClass,removeClass:a.removeClass,close:nt,options:a,runner:k},it){if(s("skip",p,r))return 2===r.state?(nt(),k):(v(w,r,p),r.runner);if(s("cancel",p,r))if(2===r.state)r.runner.end();else if(r.structural)r.close();else return v(w,r,p),r.runner;else if(s("join",p,r))if(2===r.state)v(w,p,{});else return fi(w,ut?t:null,a),t=p.event=r.event,a=v(w,r,p),r.runner}else v(w,p,{});return((it=p.structural)||(it="animate"===p.event&&0<Object.keys(p.options.to||{}).length||e(p)),!it)?(nt(),bt(y),k):(ht=(r.counter||0)+1,p.counter=ht,dt(y,1,p),h.$$postDigest(function(){w=yt(n);var i=ot.get(y),r=!i,i=i||{},u=0<(w.parent()||[]).length&&("animate"===i.event||i.structural||e(i));r||i.counter!==ht||!u?(r&&(ni(w,a),l(w,a)),(r||ut&&i.event!==t)&&(a.domOperation(),k.end()),u||bt(y)):(t=!i.structural&&e(i,!0)?"setClass":i.event,dt(y,2),i=d(w,t,i.options),k.setHost(i),rt(k,t,"start",{}),i.done(function(n){nt(!n);(n=ot.get(y))&&n.counter===ht&&bt(y);rt(k,t,"close",{})}))}),k)}function ei(n){n=n.querySelectorAll("[data-ng-animate]");i(n,function(n){var i=parseInt(n.getAttribute("data-ng-animate"),10),t=ot.get(n);if(t)switch(i){case 2:t.runner.end();case 1:ot.delete(n)}})}function bt(n){n.removeAttribute("data-ng-animate");ot.delete(n)}function oi(n,t,i){var c;i=p[0].body;var l=f(y),o=n===i||"HTML"===n.nodeName,u=n===l,s=!1,h=vt.get(n),e;for((n=r.data(n,"$ngAnimatePin"))&&(t=f(n));t;){if(u||(u=t===l),1!==t.nodeType)break;if(n=ot.get(t)||{},!s){if(c=vt.get(t),!0===c&&!1!==h){h=!0;break}else!1===c&&(h=!1);s=n.structural}if((a(e)||!0===e)&&(n=r.data(t,"$$ngAnimateChildren"),ct(n)&&(e=n)),s&&!1===e)break;if(o||(o=t===i),o&&u)break;if(!u&&(n=r.data(t,"$ngAnimatePin"))){t=f(n);continue}t=t.parentNode}return(!s||e)&&!0!==h&&u&&o}function dt(n,t,i){i=i||{};i.state=t;n.setAttribute("data-ng-animate",t);i=(t=ot.get(n))?ht(t,i):i;ot.set(n,i)}var ot=new k,vt=new k,pt=null,si=h.$watch(function(){return 0===rt.totalPendingRequests},function(n){n&&(si(),h.$$postDigest(function(){h.$$postDigest(function(){null===pt&&(pt=!0)})}))}),lt=Object.create(null),gt=t.classNameFilter(),hi=gt?function(n){return gt.test(n)}:function(){return!0},ni=w(ut),ti=n.Node.prototype.contains||function(n){return this===n||!!(this.compareDocumentPosition(n)&16)},wt={on:function(n,t,i){var u=it(t);lt[n]=lt[n]||[];lt[n].push({node:u,callback:i});r(t).on("$destroy",function(){ot.get(u)||wt.off(n,t,i)})},off:function(n,t,i){if(1!==arguments.length||o(arguments[0])){var r=lt[n];r&&(lt[n]=1===arguments.length?null:kt(r,t,i))}else for(r in t=arguments[0],lt)lt[r]=kt(lt[r],t)},pin:function(n,t){at(nt(n),"element","not an element");at(nt(t),"parentElement","not an element");n.data("$ngAnimatePin",t)},push:function(n,t,i,r){return i=i||{},i.domOperation=r,ui(n,t,i)},enabled:function(n,t){var r=arguments.length,i;return 0===r?t=!!pt:nt(n)?(i=f(n),1===r?t=!vt.get(i):vt.set(i,!t)):t=pt=!!n,t}};return wt}]}]).provider("$$animation",["$animateProvider",function(){var n=this.drivers=[];this.$get=["$$jqLite","$rootScope","$injector","$$AnimateRunner","$$Map","$$rAFScheduler",function(t,u,e,o,s,h){function a(n){function u(n){var e,t,i;if(n.processed)return n;for(n.processed=!0,e=n.domNode,t=e.parentNode,r.set(e,n);t;){if(i=r.get(t)){i.processed||(i=u(i));break}t=t.parentNode}return(i||f).children.push(n),n}for(var f={children:[]},r=new s,i,t=0;t<n.length;t++)i=n[t],r.set(i.domNode,n[t]={domNode:i.domNode,fn:i.fn,children:[]});for(t=0;t<n.length;t++)u(n[t]);return function(n){for(var f=[],r=[],u,i,e,t=0;t<n.children.length;t++)r.push(n.children[t]);for(n=r.length,u=0,i=[],t=0;t<r.length;t++)e=r[t],0>=n&&(n=u,u=0,f.push(i),i=[]),i.push(e.fn),e.children.forEach(function(n){u++;r.push(n)}),n--;return i.length&&f.push(i),f}(f)}var c=[],v=w(t);return function(s,y,p){function rt(n){n=n.hasAttribute("ng-animate-ref")?[n]:n.querySelectorAll("[ng-animate-ref]");var t=[];return i(n,function(n){var i=n.getAttribute("ng-animate-ref");i&&i.length&&t.push(n)}),t}function ut(n){var t=[],u={},o,e;return i(n,function(n,e){var o=f(n.element),h=0<=["enter","move"].indexOf(n.event),o=n.structural?rt(o):[],s;o.length?(s=h?"to":"from",i(o,function(n){var t=n.getAttribute("ng-animate-ref");u[t]=u[t]||{};u[t][s]={animationID:e,element:r(n)}})):t.push(n)}),o={},e={},i(u,function(i){var r=i.from,u=i.to,c;if(r&&u){var f=n[r.animationID],s=n[u.animationID],h=r.animationID.toString();e[h]||(c=e[h]={structural:!0,beforeStart:function(){f.beforeStart();s.beforeStart()},close:function(){f.close();s.close()},classes:ft(f.classes,s.classes),from:f,to:s,anchors:[]},c.classes.length?t.push(c):(t.push(f),t.push(s)));e[h].anchors.push({out:r.element,"in":u.element})}else r=r?r.animationID:u.animationID,u=r.toString(),o[u]||(o[u]=!0,t.push(n[r]))}),t}function ft(n,t){var f,i,r,u;for(n=n.split(" "),t=t.split(" "),f=[],i=0;i<n.length;i++)if(r=n[i],"ng-"!==r.substring(0,3))for(u=0;u<t.length;u++)if(r===t[u]){f.push(r);break}return f.join(" ")}function et(t){for(var r,i=n.length-1;0<=i;i--)if(r=e.get(n[i])(t),r)return r}function ot(n,t){function i(n){(n=n.data("$$animationRunner"))&&n.setHost(t)}n.from&&n.to?(i(n.from.element),i(n.to.element)):i(n.element)}function it(){var n=s.data("$$animationRunner");!n||"leave"===y&&p.$$domOperationFired||n.end()}function g(n){s.off("$destroy",it);s.removeData("$$animationRunner");v(s,p);l(s,p);p.domOperation();w&&t.removeClass(s,w);s.removeClass("ng-animate");k.complete(!n)}var nt,k,tt,w,d;if(p=b(p),nt=0<=["enter","move","leave"].indexOf(y),k=new o({end:function(){g()},cancel:function(){g(!0)}}),!n.length)return g(),k;s.data("$$animationRunner",k);tt=vt(s.attr("class"),vt(p.addClass,p.removeClass));w=p.tempClasses;w&&(tt+=" "+w,p.tempClasses=null);nt&&(d="ng-"+y+"-prepare",t.addClass(s,d));c.push({element:s,classes:tt,event:y,structural:nt,options:p,beforeStart:function(){s.addClass("ng-animate");w&&t.addClass(s,w);d&&(t.removeClass(s,d),d=null)},close:g});s.on("$destroy",it);return 1<c.length?k:(u.$$postDigest(function(){var t=[],r,n;i(c,function(n){n.element.data("$$animationRunner")?t.push(n):n.close()});c.length=0;r=ut(t);n=[];i(r,function(t){n.push({domNode:f(t.from?t.from.element:t.element),fn:function(){var n,i,r;t.beforeStart();i=t.close;(t.anchors?t.from.element||t.to.element:t.element).data("$$animationRunner")&&(r=et(t),r&&(n=r.start));n?(n=n(),n.done(function(n){i(!n)}),ot(t,n)):i()}})});h(a(n))}),k)}}]}]).provider("$animateCss",["$animateProvider",function(){var n=dt(),t=dt();this.$get=["$window","$$jqLite","$$AnimateRunner","$timeout","$$forceReflow","$sniffer","$$rAFScheduler","$$animateQueue",function(r,o,a,v,d,nt,tt,it){function lt(n,t){var i=n.parentNode;return(i.$$ngAnimateParentKey||(i.$$ngAnimateParentKey=++dt))+"-"+n.getAttribute("class")+"-"+t}function yt(i,u,f,e){var h;return 0<n.count(f)&&(h=t.get(f),h||(u=s(u,"-stagger"),o.addClass(i,u),h=bt(r,i,e),h.animationDuration=Math.max(h.animationDuration,0),h.transitionDuration=Math.max(h.transitionDuration,0),o.removeClass(i,u),t.put(f,h))),h||{}}function at(i){ht.push(i);tt.waitUntilQuiet(function(){n.flush();t.flush();for(var r=d(),i=0;i<ht.length;i++)ht[i](r);ht.length=0})}function vt(t,i,u){return i=n.get(u),i||(i=bt(r,t,si),"infinite"===i.animationIterationCount&&(i.animationIterationCount=1)),n.put(u,i),t=i,u=t.animationDelay,i=t.transitionDelay,t.maxDelay=u&&i?Math.max(u,i):u||i,t.maxDuration=Math.max(t.animationDuration*t.animationIterationCount,t.transitionDuration),t}var ct=w(o),dt=0,ht=[];return function(t,r){function ki(){ii()}function or(){ii(!0)}function ii(n){if(!(wi||rr&&ei)){wi=!0;ei=!1;w.$$skipPreparationClasses||o.removeClass(t,ci);o.removeClass(t,cr);rt(tt,!1);k(tt,!1);i(dt,function(n){tt.style[n[0]]=""});ct(t,w);l(t,w);Object.keys(pi).length&&i(pi,function(n,t){n?tt.style.setProperty(t,n):tt.style.removeProperty(t)});w.onDone&&w.onDone();oi&&oi.length&&t.off(oi.join(" "),hr);var r=t.data("$$animateCss");r&&(v.cancel(r[0].timer),t.removeData("$$animateCss"));li&&li.complete(!n)}}function sr(n){d.blockTransition&&k(tt,n);d.blockKeyframeAnimation&&rt(tt,!!n)}function di(){return li=new a({end:ki,cancel:or}),at(u),ii(),{$$willAnimate:!1,start:function(){return li},end:ki}}function hr(n){n.stopPropagation();var t=n.originalEvent||n;n=t.$manualTimeStamp||Date.now();t=parseFloat(t.elapsedTime.toFixed(3));Math.max(n-fr,0)>=nr&&t>=ni&&(rr=!0,ii())}function lr(){function n(){var r,u,n,s,c;if(!wi){if(sr(!1),i(dt,function(n){tt.style[n[0]]=n[1]}),ct(t,w),o.addClass(t,cr),d.recalculateTimingStyles){if(bi=tt.getAttribute("class")+" "+ci,yi=lt(tt,bi),ht=vt(tt,bi,yi),ui=ht.maxDelay,ai=Math.max(ui,0),ni=ht.maxDuration,0===ni){ii();return}d.hasTransitions=0<ht.transitionDuration;d.hasAnimations=0<ht.animationDuration}if(d.applyAnimationDelay&&(ui="boolean"!=typeof w.delay&&ut(w.delay)?parseFloat(w.delay):ui,ai=Math.max(ui,0),ht.animationDelay=ui,fi=[g,ui+"s"],dt.push(fi),tt.style[fi[0]]=fi[1]),nr=1e3*ai,ur=1e3*ni,w.easing&&(n=w.easing,d.hasTransitions&&(r=e+"TimingFunction",dt.push([r,n]),tt.style[r]=n),d.hasAnimations&&(r=h+"TimingFunction",dt.push([r,n]),tt.style[r]=n)),ht.transitionDuration&&oi.push(ft),ht.animationDuration&&oi.push(et),fr=Date.now(),u=nr+1.5*ur,r=fr+u,n=t.data("$$animateCss")||[],s=!0,n.length&&(c=n[0],(s=r>c.expectedEndTime)?v.cancel(c.timer):n.push(ii)),s&&(u=v(f,u,!1),n[0]={timer:u,expectedEndTime:r},n.push(ii),t.data("$$animateCss",n)),oi.length)t.on(oi.join(" "),hr);w.to&&(w.cleanupStyles&&gt(pi,tt,Object.keys(w.to)),wt(t,w))}}function f(){var i=t.data("$$animateCss"),n;if(i){for(n=1;n<i.length;n++)i[n]();t.removeData("$$animateCss")}}if(!wi)if(tt.parentNode){var r=function(n){if(rr)ei&&n&&(ei=!1,ii());else if(ei=!n,ht.animationDuration)if(n=rt(tt,ei),ei)dt.push(n);else{var t=dt,i=t.indexOf(n);0<=n&&t.splice(i,1)}},u=0<tr&&(ht.transitionDuration&&0===ri.transitionDuration||ht.animationDuration&&0===ri.animationDuration)&&Math.max(ri.animationDelay,ri.transitionDelay);u?v(n,Math.floor(u*tr*1e3),!1):n();gi.resume=function(){r(!0)};gi.pause=function(){r(!1)}}else ii()}var w=r||{},pi,tt,yi,ri,tr,ht,ui,d,fi;if(w.$$prepared||(w=b(st(w))),pi={},tt=f(t),!tt||!tt.parentNode||!it.enabled())return di();var dt=[],ir=t.attr("class"),bt=ti(w),wi,ei,rr,li,gi,ai,nr,ni,ur,fr,oi=[];if(0===w.duration||!nt.animations&&!nt.transitions)return di();var vi=w.event&&c(w.event)?w.event.join(" "):w.event,er="",si="";vi&&w.structural?er=s(vi,"ng-",!0):vi&&(er=vi);w.addClass&&(si+=s(w.addClass,"-add"));w.removeClass&&(si.length&&(si+=" "),si+=s(w.removeClass,"-remove"));w.applyClassesEarly&&si.length&&ct(t,w);var ci=[er,si].join(" ").trim(),bi=ir+" "+ci,cr=s(ci,"-active"),ir=bt.to&&0<Object.keys(bt.to).length;return(0<(w.keyframeStyle||"").length||ir||ci)?(0<w.stagger?(bt=parseFloat(w.stagger),ri={transitionDelay:bt,animationDelay:bt,transitionDuration:0,animationDuration:0}):(yi=lt(tt,bi),ri=yt(tt,ci,yi,hi)),w.$$skipPreparationClasses||o.addClass(t,ci),w.transitionStyle&&(bt=[e,w.transitionStyle],y(tt,bt),dt.push(bt)),0<=w.duration&&(bt=0<tt.style[e].length,bt=kt(w.duration,bt),y(tt,bt),dt.push(bt)),w.keyframeStyle&&(bt=[h,w.keyframeStyle],y(tt,bt),dt.push(bt)),tr=ri?0<=w.staggerIndex?w.staggerIndex:n.count(yi):0,(vi=0===tr)&&!w.skipBlocking&&k(tt,9999),ht=vt(tt,bi,yi),ui=ht.maxDelay,ai=Math.max(ui,0),ni=ht.maxDuration,d={},d.hasTransitions=0<ht.transitionDuration,d.hasAnimations=0<ht.animationDuration,d.hasTransitionAll=d.hasTransitions&&"all"===ht.transitionProperty,d.applyTransitionDuration=ir&&(d.hasTransitions&&!d.hasTransitionAll||d.hasAnimations&&!d.hasTransitions),d.applyAnimationDuration=w.duration&&d.hasAnimations,d.applyTransitionDelay=ut(w.delay)&&(d.applyTransitionDuration||d.hasTransitions),d.applyAnimationDelay=ut(w.delay)&&d.hasAnimations,d.recalculateTimingStyles=0<si.length,(d.applyTransitionDuration||d.applyAnimationDuration)&&(ni=w.duration?parseFloat(w.duration):ni,d.applyTransitionDuration&&(d.hasTransitions=!0,ht.transitionDuration=ni,bt=0<tt.style[e+"Property"].length,dt.push(kt(ni,bt))),d.applyAnimationDuration&&(d.hasAnimations=!0,ht.animationDuration=ni,dt.push([ot,ni+"s"]))),0===ni&&!d.recalculateTimingStyles)?di():(null!=w.delay&&("boolean"!=typeof w.delay&&(fi=parseFloat(w.delay),ai=Math.max(fi,0)),d.applyTransitionDelay&&dt.push([p,fi+"s"]),d.applyAnimationDelay&&dt.push([g,fi+"s"])),null==w.duration&&0<ht.transitionDuration&&(d.recalculateTimingStyles=d.recalculateTimingStyles||vi),nr=1e3*ai,ur=1e3*ni,w.skipBlocking||(d.blockTransition=0<ht.transitionDuration,d.blockKeyframeAnimation=0<ht.animationDuration&&0<ri.animationDelay&&0===ri.animationDuration),w.from&&(w.cleanupStyles&&gt(pi,tt,Object.keys(w.from)),pt(t,w)),d.blockTransition||d.blockKeyframeAnimation?sr(ni):w.skipBlocking||k(tt,!1),{$$willAnimate:!0,end:ki,start:function(){if(!wi)return gi={end:ki,cancel:or,resume:null,pause:null},li=new a(gi),at(lr),li}}):di()}}]}]).provider("$$animateCssDriver",["$$animationProvider",function(n){n.drivers.push("$$animateCssDriver");this.$get=["$animateCss","$rootScope","$$AnimateRunner","$rootElement","$sniffer","$$jqLite","$document",function(n,t,e,s,h,c,l){function y(n){return n.replace(/\bng-\S+\b/g,"")}function p(n,t){return o(n)&&(n=n.split(" ")),o(t)&&(t=t.split(" ")),n.filter(function(n){return-1===t.indexOf(n)}).join(" ")}function b(t,u,o){function l(n){var t={},r=f(n).getBoundingClientRect();return i(["width","height","top","left"],function(n){var i=r[n];switch(n){case"top":i+=a.scrollTop;break;case"left":i+=a.scrollLeft}t[n]=Math.floor(i)+"px"}),t}function v(){var t=y(o.attr("class")||""),i=p(t,b),t=p(b,t),i=n(s,{to:l(o),addClass:"ng-anchor-in "+i,removeClass:"ng-anchor-out "+t,delay:!0});return i.$$willAnimate?i:null}function c(){s.remove();u.removeClass("ng-animate-shim");o.removeClass("ng-animate-shim")}var s=r(f(u).cloneNode(!0)),b=y(s.attr("class")||""),h,k;return(u.addClass("ng-animate-shim"),o.addClass("ng-animate-shim"),s.addClass("ng-anchor"),w.append(s),t=function(){var t=n(s,{addClass:"ng-anchor-out",delay:!0,from:l(u)});return t.$$willAnimate?t:null}(),!t&&(h=v(),!h))?c():(k=t||h,{start:function(){function i(){n&&n.end()}var t,n=k.start();return n.done(function(){if(n=null,!h&&(h=v()))return n=h.start(),n.done(function(){n=null;c();t.complete()}),n;c();t.complete()}),t=new e({end:i,cancel:i})}})}function k(n,t,r,f){var o=v(n,u),s=v(t,u),h=[];return i(f,function(n){(n=b(r,n.out,n["in"]))&&h.push(n)}),o||s||0!==h.length?{start:function(){function r(){i(n,function(n){n.end()})}var n=[],t;return o&&n.push(o.start()),s&&n.push(s.start()),i(h,function(t){n.push(t.start())}),t=new e({end:r,cancel:r}),e.all(n,function(n){t.complete(n)}),t}}:void 0}function v(t){var r=t.element,i=t.options||{};return t.structural&&(i.event=t.event,i.structural=!0,i.applyClassesEarly=!0,"leave"===t.event&&(i.onDone=i.domOperation)),i.preparationClasses&&(i.event=d(i.event,i.preparationClasses)),t=n(r,i),t.$$willAnimate?t:null}var a,w;return!h.animations&&!h.transitions?u:(a=l[0].body,t=f(s),w=r(t.parentNode&&11===t.parentNode.nodeType||a.contains(t)?t:a),function(n){return n.from&&n.to?k(n.from,n.to,n.classes,n.anchors):v(n)})}]}]).provider("$$animateJs",["$animateProvider",function(n){this.$get=["$injector","$$AnimateRunner","$$jqLite",function(t,r,f){function e(i){var r,f;i=c(i)?i:i.split(" ");for(var e=[],o={},u=0;u<i.length;u++)r=i[u],f=n.$$registeredAnimations[r],f&&!o[r]&&(e.push(t.get(f)),o[r]=!0);return e}var o=w(f);return function(n,t,f,s){function a(){s.domOperation();o(n,s)}function rt(n,t,i,f,e){switch(i){case"animate":t=[t,f.from,f.to,e];break;case"setClass":t=[t,nt,it,e];break;case"addClass":t=[t,nt,e];break;case"removeClass":t=[t,it,e];break;default:t=[t,e]}if(t.push(f),n=n.apply(n,t))if(lt(n.start)&&(n=n.start()),n instanceof r)n.done(e);else if(lt(n))return n;return u}function c(n,t,f,e,o){var s=[];return i(e,function(i){var e=i[o];e&&s.push(function(){var i,s,h=!1,o=function(n){h||(h=!0,(s||u)(n),i.complete(!n))};return i=new r({end:function(){o()},cancel:function(){o(!0)}}),s=rt(e,n,t,f,function(n){o(!1===n)}),i})}),s}function g(n,t,u,f,e){var o=c(n,t,u,f,e),s,h;return 0===o.length&&("beforeSetClass"===e?(s=c(n,"removeClass",u,f,"beforeRemoveClass"),h=c(n,"addClass",u,f,"beforeAddClass")):"setClass"===e&&(s=c(n,"removeClass",u,f,"removeClass"),h=c(n,"addClass",u,f,"addClass")),s&&(o=o.concat(s)),h&&(o=o.concat(h))),0!==o.length?function(n){var t=[];return o.length&&i(o,function(n){t.push(n())}),t.length?r.all(t,n):n(),function(n){i(t,function(t){n?t.cancel():t.end()})}}:void 0}var v=!1,k,d,h;3===arguments.length&&tt(f)&&(s=f,f=null);s=b(s);f||(f=n.attr("class")||"",s.addClass&&(f+=" "+s.addClass),s.removeClass&&(f+=" "+s.removeClass));var nt=s.addClass,it=s.removeClass,w=e(f),y,p;return w.length&&("leave"===t?(d="leave",k="afterLeave"):(d="before"+t.charAt(0).toUpperCase()+t.substr(1),k=t),"enter"!==t&&"move"!==t&&(y=g(n,t,s,w,d)),p=g(n,t,s,w,k)),y||p?{$$willAnimate:!0,end:function(){return h?h.end():(v=!0,a(),l(n,s),h=new r,h.complete(!0)),h},start:function(){function f(t){v=!0;a();l(n,s);h.complete(t)}if(h)return h;h=new r;var i,t=[];return y&&t.push(function(n){i=y(n)}),t.length?t.push(function(n){a();n(!0)}):a(),p&&t.push(function(n){i=p(n)}),h.setHost({end:function(){v||((i||u)(void 0),f(void 0))},cancel:function(){v||((i||u)(!0),f(!0))}}),r.chain(t,f),h}}:void 0}}]}]).provider("$$animateJsDriver",["$$animationProvider",function(n){n.drivers.push("$$animateJsDriver");this.$get=["$$animateJs","$$AnimateRunner",function(n,t){function r(t){return n(t.element,t.event,t.classes,t.options)}return function(n){if(n.from&&n.to){var u=r(n.from),f=r(n.to);if(u||f)return{start:function(){function r(){return function(){i(n,function(n){n.end()})}}var n=[],e;return u&&n.push(u.start()),f&&n.push(f.start()),t.all(n,function(n){e.complete(n)}),e=new t({end:r(),cancel:r()})}}}else return r(n)}}]}])}(window,window.angular);!function(n){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self);t.Promise=n()}}(function(){return function n(t,i,r){function u(f,o){var h,c,s;if(!i[f]){if(!t[f]){if(h="function"==typeof _dereq_&&_dereq_,!o&&h)return h(f,!0);if(e)return e(f,!0);c=new Error("Cannot find module '"+f+"'");throw c.code="MODULE_NOT_FOUND",c;}s=i[f]={exports:{}};t[f][0].call(s.exports,function(n){var i=t[f][1][n];return u(i?i:n)},s,s.exports,n,t,i,r)}return i[f].exports}for(var e="function"==typeof _dereq_&&_dereq_,f=0;f<r.length;f++)u(r[f]);return u}({1:[function(n,t){"use strict";function i(){this._customScheduler=!1;this._isTickUsed=!1;this._lateQueue=new r(16);this._normalQueue=new r(16);this._haveDrainedQueues=!1;var n=this;this.drainQueues=function(){n._drainQueues()};this._schedule=e}function o(n,t,i){this._lateQueue.push(n,t,i);this._queueTick()}function s(n,t,i){this._normalQueue.push(n,t,i);this._queueTick()}function h(n){this._normalQueue._pushOne(n);this._queueTick()}function u(n){for(;n.length()>0;)c(n)}function c(n){var t=n.shift(),i,r;"function"!=typeof t?t._settlePromises():(i=n.shift(),r=n.shift(),t.call(i,r))}var f,e,r;try{throw new Error;}catch(l){f=l}e=n("./schedule");r=n("./queue");i.prototype.setScheduler=function(n){var t=this._schedule;return this._schedule=n,this._customScheduler=!0,t};i.prototype.hasCustomScheduler=function(){return this._customScheduler};i.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues};i.prototype.fatalError=function(n,t){t?(process.stderr.write("Fatal "+(n instanceof Error?n.stack:n)+"\n"),process.exit(2)):this.throwLater(n)};i.prototype.throwLater=function(n,t){if(1===arguments.length&&(t=n,n=function(){throw t;}),"undefined"!=typeof setTimeout)setTimeout(function(){n(t)},0);else try{this._schedule(function(){n(t)})}catch(i){throw new Error("No async scheduler available\n\n    See http://goo.gl/MqrFmX\n");}};i.prototype.invokeLater=o;i.prototype.invoke=s;i.prototype.settlePromises=h;i.prototype._drainQueues=function(){u(this._normalQueue);this._reset();this._haveDrainedQueues=!0;u(this._lateQueue)};i.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))};i.prototype._reset=function(){this._isTickUsed=!1};t.exports=i;t.exports.firstLineError=f},{"./queue":17,"./schedule":18}],2:[function(n,t){"use strict";t.exports=function(n,t,i,r){var u=!1,f=function(n,t){this._reject(t)},e=function(n,t){t.promiseRejectionQueued=!0;t.bindingPromise._then(f,f,null,this,n)},o=function(n,t){0==(50397184&this._bitField)&&this._resolveCallback(t.target)},s=function(n,t){t.promiseRejectionQueued||this._reject(n)};n.prototype.bind=function(f){var c,h,l,a;return u||(u=!0,n.prototype._propagateFrom=r.propagateFromFunction(),n.prototype._boundValue=r.boundValueFunction()),c=i(f),h=new n(t),h._propagateFrom(this,1),l=this._target(),(h._setBoundTo(c),c instanceof n)?(a={promiseRejectionQueued:!1,promise:h,target:l,bindingPromise:c},l._then(t,e,void 0,h,a),c._then(o,s,void 0,h,a),h._setOnCancel(c)):h._resolveCallback(l),h};n.prototype._setBoundTo=function(n){void 0!==n?(this._bitField=2097152|this._bitField,this._boundTo=n):this._bitField=-2097153&this._bitField};n.prototype._isBound=function(){return 2097152==(2097152&this._bitField)};n.bind=function(t,i){return n.resolve(i).bind(t)}}},{}],3:[function(n,t){"use strict";function u(){try{Promise===i&&(Promise=r)}catch(n){}return i}var r,i;"undefined"!=typeof Promise&&(r=Promise);i=n("./promise")();i.noConflict=u;t.exports=i},{"./promise":15}],4:[function(n,t){"use strict";t.exports=function(t,i,r,u){var f=n("./util"),o=f.tryCatch,s=f.errorObj,e=t._async;t.prototype["break"]=t.prototype.cancel=function(){var n,t,i;if(!u.cancellation())return this._warn("cancellation is disabled");for(n=this,t=n;n._isCancellable();){if(!n._cancelBy(t)){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}if(i=n._cancellationParent,null==i||!i._isCancellable()){n._isFollowing()?n._followee().cancel():n._cancelBranched();break}n._isFollowing()&&n._followee().cancel();n._setWillBeCancelled();t=n;n=i}};t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--};t.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0};t.prototype._cancelBy=function(n){return n===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),this._enoughBranchesHaveCancelled()?(this._invokeOnCancel(),!0):!1)};t.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()};t.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),e.invoke(this._cancelPromises,this,void 0))};t.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()};t.prototype._unsetOnCancel=function(){this._onCancelField=void 0};t.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()};t.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()};t.prototype._doInvokeOnCancel=function(n,t){var i,r;if(f.isArray(n))for(i=0;i<n.length;++i)this._doInvokeOnCancel(n[i],t);else void 0!==n&&("function"==typeof n?t||(r=o(n).call(this._boundValue()),r===s&&(this._attachExtraTrace(r.e),e.throwLater(r.e))):n._resultCancelled(this))};t.prototype._invokeOnCancel=function(){var n=this._onCancel();this._unsetOnCancel();e.invoke(this._doInvokeOnCancel,this,n)};t.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())};t.prototype._resultCancelled=function(){this.cancel()}}},{"./util":21}],5:[function(n,t){"use strict";t.exports=function(t){function u(n,u,o){return function(s){var c=o._boundValue(),l,h,a,y,v,p;n:for(l=0;l<n.length;++l)if(h=n[l],h===Error||null!=h&&h.prototype instanceof Error){if(s instanceof h)return i(u).call(c,s)}else if("function"==typeof h){if(a=i(h).call(c,s),a===e)return a;if(a)return i(u).call(c,s)}else if(r.isObject(s)){for(y=f(h),v=0;v<y.length;++v)if(p=y[v],h[p]!=s[p])continue n;return i(u).call(c,s)}return t}}var r=n("./util"),f=n("./es5").keys,i=r.tryCatch,e=r.errorObj;return u}},{"./es5":10,"./util":21}],6:[function(n,t){"use strict";t.exports=function(n){function t(){this._trace=new t.CapturedTrace(u())}function f(){if(r)return new t}function u(){var n=i.length-1;if(n>=0)return i[n]}var r=!1,i=[];return n.prototype._promiseCreated=function(){},n.prototype._pushContext=function(){},n.prototype._popContext=function(){return null},n._peekContext=n.prototype._peekContext=function(){},t.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,i.push(this._trace))},t.prototype._popContext=function(){if(void 0!==this._trace){var n=i.pop(),t=n._promiseCreated;return n._promiseCreated=null,t}return null},t.CapturedTrace=null,t.create=f,t.deactivateLongStackTraces=function(){},t.activateLongStackTraces=function(){var i=n.prototype._pushContext,f=n.prototype._popContext,e=n._peekContext,o=n.prototype._peekContext,s=n.prototype._promiseCreated;t.deactivateLongStackTraces=function(){n.prototype._pushContext=i;n.prototype._popContext=f;n._peekContext=e;n.prototype._peekContext=o;n.prototype._promiseCreated=s;r=!1};r=!0;n.prototype._pushContext=t.prototype._pushContext;n.prototype._popContext=t.prototype._popContext;n._peekContext=n.prototype._peekContext=u;n.prototype._promiseCreated=function(){var n=this._peekContext();n&&null==n._promiseCreated&&(n._promiseCreated=this)}},t}},{}],7:[function(n,t){"use strict";t.exports=function(t,i,r,u){function s(n,t){return{promise:t}}function ut(){return!1}function dt(n,t,i){var r=this;try{n(t,i,function(n){if("function"!=typeof n)throw new TypeError("onCancel must be a function, got: "+f.toString(n));r._attachCancellationCallback(n)})}catch(u){return u}}function gt(n){if(!this._isCancellable())return this;var t=this._onCancel();void 0!==t?f.isArray(t)?t.push(n):this._setOnCancel([t,n]):this._setOnCancel(n)}function ni(){return this._onCancelField}function ti(n){this._onCancelField=n}function ii(){this._cancellationParent=void 0;this._onCancelField=void 0}function ft(n,t){if(0!=(1&t)){this._cancellationParent=n;var i=n._branchesRemainingToCancel;void 0===i&&(i=0);n._branchesRemainingToCancel=i+1}0!=(2&t)&&n._isBound()&&this._setBoundTo(n._boundTo)}function ri(n,t){0!=(2&t)&&n._isBound()&&this._setBoundTo(n._boundTo)}function ui(){var n=this._boundTo;return void 0!==n&&n instanceof t?n.isFulfilled()?n.value():void 0:n}function fi(){this._trace=new o(this._peekContext())}function ei(n,t){var i,r;bi(n)&&(i=this._trace,(void 0!==i&&t&&(i=i._parent),void 0!==i)?i.attachExtraTrace(n):n.__stackCleaned__||(r=b(n),f.notEnumerableProp(n,"stack",r.message+"\n"+r.stack.join("\n")),f.notEnumerableProp(n,"__stackCleaned__",!0)))}function oi(){this._trace=void 0}function si(n,t,i,r,u){var h,c,l,e,a,f,v;if(void 0===n&&null!==t&&g){if(void 0!==u&&u._returnedNonUndefined())return;if(0==(65535&r._bitField))return;if(i&&(i+=" "),h="",c="",t._trace){for(var o=t._trace.stack.split("\n"),s=w(o),f=s.length-1;f>=0;--f)if(l=s[f],!ki.test(l)){e=l.match(di);e&&(h="at "+e[1]+":"+e[2]+":"+e[3]+" ");break}if(s.length>0)for(a=s[0],f=0;f<o.length;++f)if(o[f]===a){f>0&&(c="\n"+o[f-1]);break}}v="a promise was created in a "+i+"handler "+h+"but was not returned from it, see http://goo.gl/rRqMUw"+c;r._warn(v,!0,t)}}function hi(n,t){var i=n+" is deprecated and will be removed in a future version.";return t&&(i+=" Use "+t+" instead."),p(i)}function p(n,i,r){var o,u,f;e.warnings&&(u=new wi(n),i?r._attachExtraTrace(u):e.longStackTraces&&(o=t._peekContext())?o.attachExtraTrace(u):(f=b(u),u.stack=f.message+"\n"+f.stack.join("\n")),y("warning",u)||et(u,"",!0))}function ci(n,t){for(var i=0;i<t.length-1;++i)t[i].push("From previous event:"),t[i]=t[i].join("\n");return i<t.length&&(t[i]=t[i].join("\n")),n+"\n"+t.join("\n")}function li(n){for(var t=0;t<n.length;++t)(0===n[t].length||t+1<n.length&&n[t][0]===n[t+1][0])&&(n.splice(t,1),t--)}function ai(n){for(var t,o,i=n[0],r=1;r<n.length;++r){for(var u=n[r],f=i.length-1,s=i[f],e=-1,t=u.length-1;t>=0;--t)if(u[t]===s){e=t;break}for(t=e;t>=0;--t){if(o=u[t],i[f]!==o)break;i.pop();f--}i=u}}function w(n){for(var r=[],i=0;i<n.length;++i){var t=n[i],u="    (No stack trace)"===t||a.test(t),f=u&&it(t);u&&!f&&(vt&&" "!==t.charAt(0)&&(t="    "+t),r.push(t))}return r}function vi(n){for(var r,t=n.stack.replace(/\s+$/g,"").split("\n"),i=0;i<t.length;++i)if(r=t[i],"    (No stack trace)"===r||a.test(r))break;return i>0&&"SyntaxError"!=n.name&&(t=t.slice(i)),t}function b(n){var t=n.stack,i=n.toString();return t="string"==typeof t&&t.length>0?vi(n):["    (No stack trace)"],{message:i,stack:"SyntaxError"==n.name?t:w(t)}}function et(n,t,i){var r,u;"undefined"!=typeof console&&(f.isObject(n)?(u=n.stack,r=t+v(u,n)):r=t+String(n),"function"==typeof l?l(r,i):("function"==typeof console.log||"object"==typeof console.log)&&console.log(r))}function ot(n,t,i,r){var u=!1;try{"function"==typeof t&&(u=!0,"rejectionHandled"===n?t(r):t(i,r))}catch(f){h.throwLater(f)}"unhandledRejection"===n?y(n,i,r)||u||et(i,"Unhandled rejection "):y(n,r)}function st(n){var t,i,r;if("function"==typeof n)t="[function "+(n.name||"anonymous")+"]";else{if(t=n&&"function"==typeof n.toString?n.toString():f.toString(n),i=/\[object [a-zA-Z0-9$_]+\]/,i.test(t))try{r=JSON.stringify(n);t=r}catch(u){}0===t.length&&(t="(empty array)")}return"(<"+yi(t)+">, no stack trace)"}function yi(n){var t=41;return n.length<t?n:n.substr(0,t-3)+"..."}function k(){return"function"==typeof rt}function d(n){var t=n.match(tr);if(t)return{fileName:t[1],line:parseInt(t[2],10)}}function pi(n,t){var r,i;if(k()){for(var u,o,s=(n.stack||"").split("\n"),h=(t.stack||"").split("\n"),f=-1,e=-1,r=0;r<s.length;++r)if(i=d(s[r]),i){u=i.fileName;f=i.line;break}for(r=0;r<h.length;++r)if(i=d(h[r]),i){o=i.fileName;e=i.line;break}0>f||0>e||!u||!o||u!==o||f>=e||(it=function(n){if(at.test(n))return!0;var t=d(n);return t&&t.fileName===u&&f<=t.line&&t.line<=e?!0:!1})}}function o(n){this._parent=n;this._promisesCreated=0;var t=this._length=1+(void 0===n?0:n._length);rt(this,o);t>32&&this.uncycle()}var ht,ct,l,lt,h=t._async,wi=n("./errors").Warning,f=n("./util"),c=n("./es5"),bi=f.canAttachTrace,at=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,ki=/\((?:timers\.js):\d+:\d+\)/,di=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,a=null,v=null,vt=!1,yt=!(0==f.env("BLUEBIRD_DEBUG")||!f.env("BLUEBIRD_DEBUG")&&"development"!==f.env("NODE_ENV")),pt=!(0==f.env("BLUEBIRD_WARNINGS")||!yt&&!f.env("BLUEBIRD_WARNINGS")),gi=!(0==f.env("BLUEBIRD_LONG_STACK_TRACES")||!yt&&!f.env("BLUEBIRD_LONG_STACK_TRACES")),g=0!=f.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(pt||!!f.env("BLUEBIRD_W_FORGOTTEN_RETURN")),nt,rt,e;!function(){function i(){for(var t=0;t<n.length;++t)n[t]._notifyUnhandledRejection();r()}function r(){n.length=0}var n=[];lt=function(t){n.push(t);setTimeout(i,1)};c.defineProperty(t,"_unhandledRejectionCheck",{value:i});c.defineProperty(t,"_unhandledRejectionClear",{value:r})}();t.prototype.suppressUnhandledRejections=function(){var n=this._target();n._bitField=-1048577&n._bitField|524288};t.prototype._ensurePossibleRejectionHandled=function(){0==(524288&this._bitField)&&(this._setRejectionIsUnhandled(),lt(this))};t.prototype._notifyUnhandledRejectionIsHandled=function(){ot("rejectionHandled",ht,void 0,this)};t.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField};t.prototype._returnedNonUndefined=function(){return 0!=(268435456&this._bitField)};t.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var n=this._settledValue();this._setUnhandledRejectionIsNotified();ot("unhandledRejection",ct,n,this)}};t.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField};t.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField};t.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0};t.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField};t.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField;this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())};t.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0};t.prototype._warn=function(n,t,i){return p(n,t,i||this)};t.onPossiblyUnhandledRejection=function(n){var i=t._getContext();ct=f.contextBind(i,n)};t.onUnhandledRejectionHandled=function(n){var i=t._getContext();ht=f.contextBind(i,n)};nt=function(){};t.longStackTraces=function(){if(h.haveItemsQueued()&&!e.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n    See http://goo.gl/MqrFmX\n");if(!e.longStackTraces&&k()){var n=t.prototype._captureStackTrace,r=t.prototype._attachExtraTrace,u=t.prototype._dereferenceTrace;e.longStackTraces=!0;nt=function(){if(h.haveItemsQueued()&&!e.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n    See http://goo.gl/MqrFmX\n");t.prototype._captureStackTrace=n;t.prototype._attachExtraTrace=r;t.prototype._dereferenceTrace=u;i.deactivateLongStackTraces();e.longStackTraces=!1};t.prototype._captureStackTrace=fi;t.prototype._attachExtraTrace=ei;t.prototype._dereferenceTrace=oi;i.activateLongStackTraces()}};t.hasLongStackTraces=function(){return e.longStackTraces&&k()};var tt={unhandledrejection:{before:function(){var n=f.global.onunhandledrejection;return f.global.onunhandledrejection=null,n},after:function(n){f.global.onunhandledrejection=n}},rejectionhandled:{before:function(){var n=f.global.onrejectionhandled;return f.global.onrejectionhandled=null,n},after:function(n){f.global.onrejectionhandled=n}}},wt=function(){var t=function(n,t){if(!n)return!f.global.dispatchEvent(t);var i;try{return i=n.before(),!f.global.dispatchEvent(t)}finally{n.after(i)}},n;try{return"function"==typeof CustomEvent?(n=new CustomEvent("CustomEvent"),f.global.dispatchEvent(n),function(n,i){n=n.toLowerCase();var u={detail:i,cancelable:!0},r=new CustomEvent(n,u);return c.defineProperty(r,"promise",{value:i.promise}),c.defineProperty(r,"reason",{value:i.reason}),t(tt[n],r)}):"function"==typeof Event?(n=new Event("CustomEvent"),f.global.dispatchEvent(n),function(n,i){n=n.toLowerCase();var r=new Event(n,{cancelable:!0});return r.detail=i,c.defineProperty(r,"promise",{value:i.promise}),c.defineProperty(r,"reason",{value:i.reason}),t(tt[n],r)}):(n=document.createEvent("CustomEvent"),n.initCustomEvent("testingtheevent",!1,!0,{}),f.global.dispatchEvent(n),function(n,i){n=n.toLowerCase();var r=document.createEvent("CustomEvent");return r.initCustomEvent(n,!1,!0,i),t(tt[n],r)})}catch(i){}return function(){return!1}}(),bt=function(){return f.isNode?function(){return process.emit.apply(process,arguments)}:f.global?function(n){var i="on"+n.toLowerCase(),t=f.global[i];return t?(t.apply(f.global,[].slice.call(arguments,1)),!0):!1}:function(){return!1}}(),nr={promiseCreated:s,promiseFulfilled:s,promiseRejected:s,promiseResolved:s,promiseCancelled:s,promiseChained:function(n,t,i){return{promise:t,child:i}},warning:function(n,t){return{warning:t}},unhandledRejection:function(n,t,i){return{reason:t,promise:i}},rejectionHandled:s},y=function(n){var i=!1,t;try{i=bt.apply(null,arguments)}catch(r){h.throwLater(r);i=!0}t=!1;try{t=wt(n,nr[n].apply(null,arguments))}catch(r){h.throwLater(r);t=!0}return t||i};t.config=function(n){var i,s,o;if((n=Object(n),"longStackTraces"in n&&(n.longStackTraces?t.longStackTraces():!n.longStackTraces&&t.hasLongStackTraces()&&nt()),"warnings"in n)&&(i=n.warnings,e.warnings=!!i,g=e.warnings,f.isObject(i)&&"wForgottenReturn"in i&&(g=!!i.wForgottenReturn)),"cancellation"in n&&n.cancellation&&!e.cancellation){if(h.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");t.prototype._clearCancellationData=ii;t.prototype._propagateFrom=ft;t.prototype._onCancel=ni;t.prototype._setOnCancel=ti;t.prototype._attachCancellationCallback=gt;t.prototype._execute=dt;kt=ft;e.cancellation=!0}return("monitoring"in n&&(n.monitoring&&!e.monitoring?(e.monitoring=!0,t.prototype._fireEvent=y):!n.monitoring&&e.monitoring&&(e.monitoring=!1,t.prototype._fireEvent=ut)),"asyncHooks"in n&&f.nodeSupportsAsyncResource)&&(s=e.asyncHooks,o=!!n.asyncHooks,s!==o&&(e.asyncHooks=o,o?r():u())),t};t.prototype._fireEvent=ut;t.prototype._execute=function(n,t,i){try{n(t,i)}catch(r){return r}};t.prototype._onCancel=function(){};t.prototype._setOnCancel=function(){};t.prototype._attachCancellationCallback=function(){};t.prototype._captureStackTrace=function(){};t.prototype._attachExtraTrace=function(){};t.prototype._dereferenceTrace=function(){};t.prototype._clearCancellationData=function(){};t.prototype._propagateFrom=function(){};var kt=ri,it=function(){return!1},tr=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;return f.inherits(o,Error),i.CapturedTrace=o,o.prototype.uncycle=function(){var u=this._length,s,n,c,i,r,h,e;if(!(2>u)){for(var t=[],o={},n=0,f=this;void 0!==f;++n)t.push(f),f=f._parent;for(u=this._length=n,n=u-1;n>=0;--n)s=t[n].stack,void 0===o[s]&&(o[s]=n);for(n=0;u>n;++n)if(c=t[n].stack,i=o[c],void 0!==i&&i!==n){for(i>0&&(t[i-1]._parent=void 0,t[i-1]._length=1),t[n]._parent=void 0,t[n]._length=1,r=n>0?t[n-1]:this,u-1>i?(r._parent=t[i+1],r._parent.uncycle(),r._length=r._parent._length+1):(r._parent=void 0,r._length=1),h=r._length+1,e=n-2;e>=0;--e)t[e]._length=h,h++;return}}},o.prototype.attachExtraTrace=function(n){if(!n.__stackCleaned__){this.uncycle();for(var r=b(n),u=r.message,t=[r.stack],i=this;void 0!==i;)t.push(w(i.stack.split("\n"))),i=i._parent;ai(t);li(t);f.notEnumerableProp(n,"stack",ci(u,t));f.notEnumerableProp(n,"__stackCleaned__",!0)}},rt=function(){var i=/^\s*at\s*/,t=function(n,t){return"string"==typeof n?n:void 0!==t.name&&void 0!==t.message?t.toString():st(t)},r,n,u;if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace)return Error.stackTraceLimit+=6,a=i,v=t,r=Error.captureStackTrace,it=function(n){return at.test(n)},function(n,t){Error.stackTraceLimit+=6;r(n,t);Error.stackTraceLimit-=6};if(n=new Error,"string"==typeof n.stack&&n.stack.split("\n")[0].indexOf("stackDetection@")>=0)return a=/@/,v=t,vt=!0,function(n){n.stack=(new Error).stack};try{throw new Error;}catch(f){u="stack"in f}return"stack"in n||!u||"number"!=typeof Error.stackTraceLimit?(v=function(n,t){return"string"==typeof n?n:"object"!=typeof t&&"function"!=typeof t||void 0===t.name||void 0===t.message?st(t):t.toString()},null):(a=i,v=t,function(n){Error.stackTraceLimit+=6;try{throw new Error;}catch(t){n.stack=t.stack}Error.stackTraceLimit-=6})}([]),"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(l=function(n){console.warn(n)},f.isNode&&process.stderr.isTTY?l=function(n,t){var i=t?"\x1b[33m":"\x1b[31m";console.warn(i+n+"\x1b[0m\n")}:f.isNode||"string"!=typeof(new Error).stack||(l=function(n,t){console.warn("%c"+n,t?"color: darkorange":"color: red")})),e={warnings:pt,longStackTraces:!1,cancellation:!1,monitoring:!1,asyncHooks:!1},gi&&t.longStackTraces(),{asyncHooks:function(){return e.asyncHooks},longStackTraces:function(){return e.longStackTraces},warnings:function(){return e.warnings},cancellation:function(){return e.cancellation},monitoring:function(){return e.monitoring},propagateFromFunction:function(){return kt},boundValueFunction:function(){return ui},checkForgottenReturns:si,setBounds:pi,warn:p,deprecated:hi,CapturedTrace:o,fireDomEvent:wt,fireGlobalEvent:bt}}},{"./errors":9,"./es5":10,"./util":21}],8:[function(n,t){"use strict";t.exports=function(n){function t(){return this.value}function i(){throw this.reason;}n.prototype["return"]=n.prototype.thenReturn=function(i){return i instanceof n&&i.suppressUnhandledRejections(),this._then(t,void 0,void 0,{value:i},void 0)};n.prototype["throw"]=n.prototype.thenThrow=function(n){return this._then(i,void 0,void 0,{reason:n},void 0)};n.prototype.catchThrow=function(n){if(arguments.length<=1)return this._then(void 0,i,void 0,{reason:n},void 0);var t=arguments[1],r=function(){throw t;};return this.caught(n,r)};n.prototype.catchReturn=function(i){var r,u;return arguments.length<=1?(i instanceof n&&i.suppressUnhandledRejections(),this._then(void 0,t,void 0,{value:i},void 0)):(r=arguments[1],r instanceof n&&r.suppressUnhandledRejections(),u=function(){return r},this.caught(i,u))}}},{}],9:[function(n,t){"use strict";function r(n,t){function i(r){return this instanceof i?(u(this,"message","string"==typeof r?r:t),u(this,"name",n),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new i(r)}return y(i,Error),i}function e(n){return this instanceof e?(u(this,"name","OperationalError"),u(this,"message",n),this.cause=n,this.isOperational=!0,void(n instanceof Error?(u(this,"message",n.message),u(this,"stack",n.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new e(n)}var c,l,a=n("./es5"),p=a.freeze,v=n("./util"),y=v.inherits,u=v.notEnumerableProp,w=r("Warning","warning"),b=r("CancellationError","cancellation error"),k=r("TimeoutError","timeout error"),o=r("AggregateError","aggregate error"),s,f,h,i;try{c=TypeError;l=RangeError}catch(d){c=r("TypeError","type error");l=r("RangeError","range error")}for(s="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),f=0;f<s.length;++f)"function"==typeof Array.prototype[s[f]]&&(o.prototype[s[f]]=Array.prototype[s[f]]);a.defineProperty(o.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0});o.prototype.isOperational=!0;h=0;o.prototype.toString=function(){var r=Array(4*h+1).join(" "),f="\n"+r+"AggregateError of:\n",n;for(h++,r=Array(4*h+1).join(" "),n=0;n<this.length;++n){for(var u=this[n]===this?"[Circular AggregateError]":this[n]+"",t=u.split("\n"),i=0;i<t.length;++i)t[i]=r+t[i];u=t.join("\n");f+=u+"\n"}return h--,f};y(e,Error);i=Error.__BluebirdErrorTypes__;i||(i=p({CancellationError:b,TimeoutError:k,OperationalError:e,RejectionError:e,AggregateError:o}),a.defineProperty(Error,"__BluebirdErrorTypes__",{value:i,writable:!1,enumerable:!1,configurable:!1}));t.exports={Error:Error,TypeError:c,RangeError:l,CancellationError:i.CancellationError,OperationalError:i.OperationalError,TimeoutError:i.TimeoutError,AggregateError:i.AggregateError,Warning:w}},{"./es5":10,"./util":21}],10:[function(n,t){var i=function(){"use strict";return void 0===this}();if(i)t.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:i,propertyIsWritable:function(n,t){var i=Object.getOwnPropertyDescriptor(n,t);return!(i&&!i.writable&&!i.set)}};else{var u={}.hasOwnProperty,f={}.toString,e={}.constructor.prototype,r=function(n){var t=[];for(var i in n)u.call(n,i)&&t.push(i);return t},o=function(n,t){return{value:n[t]}},s=function(n,t,i){return n[t]=i.value,n},h=function(n){return n},c=function(n){try{return Object(n).constructor.prototype}catch(t){return e}},l=function(n){try{return"[object Array]"===f.call(n)}catch(t){return!1}};t.exports={isArray:l,keys:r,names:r,defineProperty:s,getDescriptor:o,freeze:h,getPrototypeOf:c,isES5:i,propertyIsWritable:function(){return!0}}}},{}],11:[function(n,t){"use strict";t.exports=function(t,i,r){function o(n,t,i){this.promise=n;this.type=t;this.handler=i;this.called=!1;this.cancelPromise=null}function h(n){this.finallyHandler=n}function e(n,t){return null!=n.cancelPromise?(arguments.length>1?n.cancelPromise._reject(t):n.cancelPromise._cancel(),n.cancelPromise=null,!0):!1}function c(){return u.call(this,this.promise._target()._settledValue())}function l(n){if(!e(this,n))return(f.e=n,f)}function u(n){var u=this.promise,y=this.handler,s,o,v;if(!this.called){if(this.called=!0,s=this.isFinallyHandler()?y.call(u._boundValue()):y.call(u._boundValue(),n),s===r)return s;if(void 0!==s&&(u._setReturnedNonUndefined(),o=i(s,u),o instanceof t)){if(null!=this.cancelPromise){if(o._isCancelled())return v=new a("late cancellation observer"),u._attachExtraTrace(v),f.e=v,f;o.isPending()&&o._attachCancellationCallback(new h(this))}return o._then(c,l,void 0,this,void 0)}}return u.isRejected()?(e(this),f.e=n,f):(e(this),n)}var s=n("./util"),a=t.CancellationError,f=s.errorObj,v=n("./catch_filter")(r);return o.prototype.isFinallyHandler=function(){return 0===this.type},h.prototype._resultCancelled=function(){e(this.finallyHandler)},t.prototype._passThrough=function(n,t,i,r){return"function"!=typeof n?this.then():this._then(i,r,void 0,new o(this,t,n),void 0)},t.prototype.lastly=t.prototype["finally"]=function(n){return this._passThrough(n,0,u,u)},t.prototype.tap=function(n){return this._passThrough(n,1,u)},t.prototype.tapCatch=function(n){var e=arguments.length,i,r,o,f,h;if(1===e)return this._passThrough(n,1,void 0,u);for(r=new Array(e-1),o=0,i=0;e-1>i;++i){if(f=arguments[i],!s.isObject(f))return t.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+s.classString(f)));r[o++]=f}return r.length=o,h=arguments[i],this._passThrough(v(r,h,this),1,void 0,u)},o}},{"./catch_filter":5,"./util":21}],12:[function(n,t){"use strict";t.exports=function(t,i){var r=n("./util");r.canEvaluate;r.tryCatch;r.errorObj;t.join=function(){var n,t=arguments.length-1,u,r;return t>0&&"function"==typeof arguments[t]&&(n=arguments[t]),u=[].slice.call(arguments),n&&u.pop(),r=new i(u).promise(),void 0!==n?r.spread(n):r}}},{"./util":21}],13:[function(n,t){"use strict";t.exports=function(t,i,r,u,f){var e=n("./util"),o=e.tryCatch;t.method=function(n){if("function"!=typeof n)throw new t.TypeError("expecting a function but got "+e.classString(n));return function(){var r=new t(i),u,e;return r._captureStackTrace(),r._pushContext(),u=o(n).apply(this,arguments),e=r._popContext(),f.checkForgottenReturns(u,e,"Promise.method",r),r._resolveFromSyncValue(u),r}};t.attempt=t["try"]=function(n){var r,s,h,c,l;return"function"!=typeof n?u("expecting a function but got "+e.classString(n)):(r=new t(i),r._captureStackTrace(),r._pushContext(),arguments.length>1?(f.deprecated("calling Promise.try with more than 1 argument"),h=arguments[1],c=arguments[2],s=e.isArray(h)?o(n).apply(c,h):o(n).call(c,h)):s=o(n)(),l=r._popContext(),f.checkForgottenReturns(s,l,"Promise.try",r),r._resolveFromSyncValue(s),r)};t.prototype._resolveFromSyncValue=function(n){n===e.errorObj?this._rejectCallback(n.e,!1):this._resolveCallback(n,!0)}}},{"./util":21}],14:[function(n,t){"use strict";function u(n){return n instanceof Error&&r.getPrototypeOf(n)===Error.prototype}function f(n){var t,o,f,e;if(u(n)){for(t=new h(n),t.name=n.name,t.message=n.message,t.stack=n.stack,o=r.keys(n),f=0;f<o.length;++f)e=o[f],c.test(e)||(t[e]=n[e]);return t}return i.markAsOriginatingFromRejection(n),n}function e(n,t){return function(i,r){var u,e;null!==n&&(i?(u=f(o(i)),n._attachExtraTrace(u),n._reject(u)):t?(e=[].slice.call(arguments,1),n._fulfill(e)):n._fulfill(r),n=null)}}var i=n("./util"),o=i.maybeWrapAsError,s=n("./errors"),h=s.OperationalError,r=n("./es5"),c=/^(?:name|message|stack|cause)$/;t.exports=e},{"./errors":9,"./es5":10,"./util":21}],15:[function(n,t){"use strict";t.exports=function(){function k(){}function st(n,t){if(null==n||n.constructor!==i)throw new h("the promise constructor cannot be invoked directly\n\n    See http://goo.gl/MqrFmX\n");if("function"!=typeof t)throw new h("expecting a function but got "+r.classString(t));}function i(n){n!==u&&st(this,n);this._bitField=0;this._fulfillmentHandler0=void 0;this._rejectionHandler0=void 0;this._promise0=void 0;this._receiver0=void 0;this._resolveFromExecutor(n);this._promiseCreated();this._fireEvent("promiseCreated",this)}function ht(n){this.promise._resolveCallback(n)}function ct(n){this.promise._rejectCallback(n,!1)}function e(n){var t=new i(u);t._fulfillmentHandler0=n;t._rejectionHandler0=n;t._promise0=n;t._receiver0=n}var p=function(){return new h("circular promise resolution chain\n\n    See http://goo.gl/MqrFmX\n")},l=function(){return new i.PromiseInspection(this._target())},a=function(n){return i.reject(new h(n))},d={},r=n("./util"),s,h,nt;r.setReflectHandler(l);var it=function(){var n=process.domain;return void 0===n?null:n},lt=function(){return null},g=function(){return{domain:it(),async:null}},at=r.isNode&&r.nodeSupportsAsyncResource?n("async_hooks").AsyncResource:null,rt=function(){return{domain:it(),async:new at("Bluebird::Promise")}},w=r.isNode?g:lt;r.notEnumerableProp(i,"_getContext",w);var vt=function(){w=rt;r.notEnumerableProp(i,"_getContext",rt)},yt=function(){w=g;r.notEnumerableProp(i,"_getContext",g)},ut=n("./es5"),ft=n("./async"),o=new ft;ut.defineProperty(i,"_async",{value:o});s=n("./errors");h=i.TypeError=s.TypeError;i.RangeError=s.RangeError;nt=i.CancellationError=s.CancellationError;i.TimeoutError=s.TimeoutError;i.OperationalError=s.OperationalError;i.RejectionError=s.OperationalError;i.AggregateError=s.AggregateError;var u=function(){},et={},tt={},c=n("./thenables")(i,u),v=n("./promise_array")(i,u,c,a,k),ot=n("./context")(i),f=(ot.create,n("./debuggability")(i,ot,vt,yt)),pt=(f.CapturedTrace,n("./finally")(i,c,tt)),wt=n("./catch_filter")(tt),bt=n("./nodeback"),y=r.errorObj,b=r.tryCatch;return i.prototype.toString=function(){return"[object Promise]"},i.prototype.caught=i.prototype["catch"]=function(n){var f=arguments.length,t,i,e,u;if(f>1){for(i=new Array(f-1),e=0,t=0;f-1>t;++t){if(u=arguments[t],!r.isObject(u))return a("Catch statement predicate: expecting an object but got "+r.classString(u));i[e++]=u}if(i.length=e,n=arguments[t],"function"!=typeof n)throw new h("The last argument to .catch() must be a function, got "+r.toString(n));return this.then(void 0,wt(i,n,this))}return this.then(void 0,n)},i.prototype.reflect=function(){return this._then(l,l,void 0,this,void 0)},i.prototype.then=function(n,t){if(f.warnings()&&arguments.length>0&&"function"!=typeof n&&"function"!=typeof t){var i=".then() only accepts functions but was passed: "+r.classString(n);arguments.length>1&&(i+=", "+r.classString(t));this._warn(i)}return this._then(n,t,void 0,void 0,void 0)},i.prototype.done=function(n,t){var i=this._then(n,t,void 0,void 0,void 0);i._setIsFinal()},i.prototype.spread=function(n){return"function"!=typeof n?a("expecting a function but got "+r.classString(n)):this.all()._then(n,void 0,void 0,et,void 0)},i.prototype.toJSON=function(){var n={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(n.fulfillmentValue=this.value(),n.isFulfilled=!0):this.isRejected()&&(n.rejectionReason=this.reason(),n.isRejected=!0),n},i.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new v(this).promise()},i.prototype.error=function(n){return this.caught(r.originatesFromRejection,n)},i.getNewLibraryCopy=t.exports,i.is=function(n){return n instanceof i},i.fromNode=i.fromCallback=function(n){var t=new i(u),f,r;return t._captureStackTrace(),f=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,r=b(n)(bt(t,f)),r===y&&t._rejectCallback(r.e,!0),t._isFateSealed()||t._setAsyncGuaranteed(),t},i.all=function(n){return new v(n).promise()},i.cast=function(n){var t=c(n);return t instanceof i||(t=new i(u),t._captureStackTrace(),t._setFulfilled(),t._rejectionHandler0=n),t},i.resolve=i.fulfilled=i.cast,i.reject=i.rejected=function(n){var t=new i(u);return t._captureStackTrace(),t._rejectCallback(n,!0),t},i.setScheduler=function(n){if("function"!=typeof n)throw new h("expecting a function but got "+r.classString(n));return o.setScheduler(n)},i.prototype._then=function(n,t,f,e,s){var b=void 0!==s,c=b?s:new i(u),h=this._target(),a=h._bitField,y,v,l,p;return b||(c._propagateFrom(this,3),c._captureStackTrace(),void 0===e&&0!=(2097152&this._bitField)&&(e=0!=(50397184&a)?this._boundValue():h===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,c)),y=w(),0!=(50397184&a)?(p=h._settlePromiseCtx,0!=(33554432&a)?(l=h._rejectionHandler0,v=n):0!=(16777216&a)?(l=h._fulfillmentHandler0,v=t,h._unsetRejectionIsUnhandled()):(p=h._settlePromiseLateCancellationObserver,l=new nt("late cancellation observer"),h._attachExtraTrace(l),v=t),o.invoke(p,h,{handler:r.contextBind(y,v),promise:c,receiver:e,value:l})):h._addCallbacks(n,t,c,e,y),c},i.prototype._length=function(){return 65535&this._bitField},i.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},i.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},i.prototype._setLength=function(n){this._bitField=-65536&this._bitField|65535&n},i.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField;this._fireEvent("promiseFulfilled",this)},i.prototype._setRejected=function(){this._bitField=16777216|this._bitField;this._fireEvent("promiseRejected",this)},i.prototype._setFollowing=function(){this._bitField=67108864|this._bitField;this._fireEvent("promiseResolved",this)},i.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},i.prototype._isFinal=function(){return(4194304&this._bitField)>0},i.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},i.prototype._setCancelled=function(){this._bitField=65536|this._bitField;this._fireEvent("promiseCancelled",this)},i.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},i.prototype._setAsyncGuaranteed=function(){if(!o.hasCustomScheduler()){var n=this._bitField;this._bitField=n|(536870912&n)>>2^134217728}},i.prototype._setNoAsyncGuarantee=function(){this._bitField=-134217729&(536870912|this._bitField)},i.prototype._receiverAt=function(n){var t=0===n?this._receiver0:this[4*n-1];if(t!==d)return void 0===t&&this._isBound()?this._boundValue():t},i.prototype._promiseAt=function(n){return this[4*n-2]},i.prototype._fulfillmentHandlerAt=function(n){return this[4*n-4]},i.prototype._rejectionHandlerAt=function(n){return this[4*n-3]},i.prototype._boundValue=function(){},i.prototype._migrateCallback0=function(n){var i=(n._bitField,n._fulfillmentHandler0),r=n._rejectionHandler0,u=n._promise0,t=n._receiverAt(0);void 0===t&&(t=d);this._addCallbacks(i,r,u,t,null)},i.prototype._migrateCallbackAt=function(n,t){var r=n._fulfillmentHandlerAt(t),u=n._rejectionHandlerAt(t),f=n._promiseAt(t),i=n._receiverAt(t);void 0===i&&(i=d);this._addCallbacks(r,u,f,i,null)},i.prototype._addCallbacks=function(n,t,i,u,f){var e=this._length(),o;return(e>=65531&&(e=0,this._setLength(0)),0===e)?(this._promise0=i,this._receiver0=u,"function"==typeof n&&(this._fulfillmentHandler0=r.contextBind(f,n)),"function"==typeof t&&(this._rejectionHandler0=r.contextBind(f,t))):(o=4*e-4,this[o+2]=i,this[o+3]=u,"function"==typeof n&&(this[o+0]=r.contextBind(f,n)),"function"==typeof t&&(this[o+1]=r.contextBind(f,t))),this._setLength(e+1),e},i.prototype._proxy=function(n,t){this._addCallbacks(void 0,void 0,t,n,null)},i.prototype._resolveCallback=function(n,t){var u,r,f,o,e,s;if(0==(117506048&this._bitField)){if(n===this)return this._rejectCallback(p(),!1);if(u=c(n,this),!(u instanceof i))return this._fulfill(n);if(t&&this._propagateFrom(u,2),r=u._target(),r===this)return void this._reject(p());if(f=r._bitField,0==(50397184&f)){for(o=this._length(),o>0&&r._migrateCallback0(this),e=1;o>e;++e)r._migrateCallbackAt(this,e);this._setFollowing();this._setLength(0);this._setFollowee(u)}else 0!=(33554432&f)?this._fulfill(r._value()):0!=(16777216&f)?this._reject(r._reason()):(s=new nt("late cancellation observer"),r._attachExtraTrace(s),this._reject(s))}},i.prototype._rejectCallback=function(n,t,i){var u=r.ensureErrorObject(n),e=u===n,o;e||i||!f.warnings()||(o="a promise was rejected with a non-error: "+r.classString(n),this._warn(o,!0));this._attachExtraTrace(u,t?e:!1);this._reject(n)},i.prototype._resolveFromExecutor=function(n){var t,i,r;n!==u&&(t=this,this._captureStackTrace(),this._pushContext(),i=!0,r=this._execute(n,function(n){t._resolveCallback(n)},function(n){t._rejectCallback(n,i)}),i=!1,this._popContext(),void 0!==r&&t._rejectCallback(r,!0))},i.prototype._settlePromiseFromHandler=function(n,t,i,u){var o=u._bitField,e,s;0==(65536&o)&&(u._pushContext(),t===et?i&&"number"==typeof i.length?e=b(n).apply(this._boundValue(),i):(e=y,e.e=new h("cannot .spread() a non-array: "+r.classString(i))):e=b(n).call(t,i),s=u._popContext(),o=u._bitField,0==(65536&o)&&(e===tt?u._reject(i):e===y?u._rejectCallback(e.e,!1):(f.checkForgottenReturns(e,s,"",u,this),u._resolveCallback(e))))},i.prototype._target=function(){for(var n=this;n._isFollowing();)n=n._followee();return n},i.prototype._followee=function(){return this._rejectionHandler0},i.prototype._setFollowee=function(n){this._rejectionHandler0=n},i.prototype._settlePromise=function(n,t,r,u){var f=n instanceof i,e=this._bitField,o=0!=(134217728&e);0!=(65536&e)?(f&&n._invokeInternalOnCancel(),r instanceof pt&&r.isFinallyHandler()?(r.cancelPromise=n,b(t).call(r,u)===y&&n._reject(y.e)):t===l?n._fulfill(l.call(r)):r instanceof k?r._promiseCancelled(n):f||n instanceof v?n._cancel():r.cancel()):"function"==typeof t?f?(o&&n._setAsyncGuaranteed(),this._settlePromiseFromHandler(t,r,u,n)):t.call(r,u,n):r instanceof k?r._isResolved()||(0!=(33554432&e)?r._promiseFulfilled(u,n):r._promiseRejected(u,n)):f&&(o&&n._setAsyncGuaranteed(),0!=(33554432&e)?n._fulfill(u):n._reject(u))},i.prototype._settlePromiseLateCancellationObserver=function(n){var r=n.handler,t=n.promise,f=n.receiver,u=n.value;"function"==typeof r?t instanceof i?this._settlePromiseFromHandler(r,f,u,t):r.call(f,u,t):t instanceof i&&t._reject(u)},i.prototype._settlePromiseCtx=function(n){this._settlePromise(n.promise,n.handler,n.receiver,n.value)},i.prototype._settlePromise0=function(n,t){var i=this._promise0,r=this._receiverAt(0);this._promise0=void 0;this._receiver0=void 0;this._settlePromise(i,n,r,t)},i.prototype._clearCallbackDataAtIndex=function(n){var t=4*n-4;this[t+2]=this[t+3]=this[t+0]=this[t+1]=void 0},i.prototype._fulfill=function(n){var t=this._bitField,i;if(!((117506048&t)>>>16)){if(n===this)return i=p(),this._attachExtraTrace(i),this._reject(i);this._setFulfilled();this._rejectionHandler0=n;(65535&t)>0&&(0!=(134217728&t)?this._settlePromises():o.settlePromises(this),this._dereferenceTrace())}},i.prototype._reject=function(n){var t=this._bitField;if(!((117506048&t)>>>16))return this._setRejected(),this._fulfillmentHandler0=n,this._isFinal()?o.fatalError(n,r.isNode):void((65535&t)>0?o.settlePromises(this):this._ensurePossibleRejectionHandled())},i.prototype._fulfillPromises=function(n,t){for(var i=1;n>i;i++){var r=this._fulfillmentHandlerAt(i),u=this._promiseAt(i),f=this._receiverAt(i);this._clearCallbackDataAtIndex(i);this._settlePromise(u,r,f,t)}},i.prototype._rejectPromises=function(n,t){for(var i=1;n>i;i++){var r=this._rejectionHandlerAt(i),u=this._promiseAt(i),f=this._receiverAt(i);this._clearCallbackDataAtIndex(i);this._settlePromise(u,r,f,t)}},i.prototype._settlePromises=function(){var n=this._bitField,t=65535&n,i,r;t>0&&(0!=(16842752&n)?(i=this._fulfillmentHandler0,this._settlePromise0(this._rejectionHandler0,i,n),this._rejectPromises(t,i)):(r=this._rejectionHandler0,this._settlePromise0(this._fulfillmentHandler0,r,n),this._fulfillPromises(t,r)),this._setLength(0));this._clearCancellationData()},i.prototype._settledValue=function(){var n=this._bitField;return 0!=(33554432&n)?this._rejectionHandler0:0!=(16777216&n)?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&ut.defineProperty(i.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),i.defer=i.pending=function(){f.deprecated("Promise.defer","new Promise");var n=new i(u);return{promise:n,resolve:ht,reject:ct}},r.notEnumerableProp(i,"_makeSelfResolutionError",p),n("./method")(i,u,c,a,f),n("./bind")(i,u,c,f),n("./cancel")(i,v,a,f),n("./direct_resolve")(i),n("./synchronous_inspection")(i),n("./join")(i,v,c,u,o),i.Promise=i,i.version="3.7.2",r.toFastProperties(i),r.toFastProperties(i.prototype),e({a:1}),e({b:2}),e({c:3}),e(1),e(function(){}),e(void 0),e(!1),e(new i(u)),f.setBounds(ft.firstLineError,r.lastLineError),i}},{"./async":1,"./bind":2,"./cancel":4,"./catch_filter":5,"./context":6,"./debuggability":7,"./direct_resolve":8,"./errors":9,"./es5":10,"./finally":11,"./join":12,"./method":13,"./nodeback":14,"./promise_array":16,"./synchronous_inspection":19,"./thenables":20,"./util":21,async_hooks:void 0}],16:[function(n,t){"use strict";t.exports=function(t,i,r,u,f){function s(n){switch(n){case-2:return[];case-3:return{};case-6:return new Map}}function e(n){var r=this._promise=new t(i);n instanceof t&&(r._propagateFrom(n,3),n.suppressUnhandledRejections());r._setOnCancel(this);this._values=n;this._length=0;this._totalResolved=0;this._init(void 0,-2)}var o=n("./util");return o.isArray,o.inherits(e,f),e.prototype.length=function(){return this._length},e.prototype.promise=function(){return this._promise},e.prototype._init=function h(n,i){var f=r(this._values,this._promise),e,c;if(f instanceof t){if(f=f._target(),e=f._bitField,this._values=f,0==(50397184&e))return this._promise._setAsyncGuaranteed(),f._then(h,this._reject,void 0,this,i);if(0==(33554432&e))return 0!=(16777216&e)?this._reject(f._reason()):this._cancel();f=f._value()}return(f=o.asArray(f),null===f)?(c=u("expecting an array or an iterable object but got "+o.classString(f)).reason(),void this._promise._rejectCallback(c,!1)):0===f.length?void(-5===i?this._resolveEmptyArray():this._resolve(s(i))):void this._iterate(f)},e.prototype._iterate=function(n){var o=this.getActualLength(n.length),i;this._length=o;this._values=this.shouldCopyValues()?new Array(o):this._values;for(var s=this._promise,e=!1,f=null,u=0;o>u;++u)i=r(n[u],s),i instanceof t?(i=i._target(),f=i._bitField):f=null,e?null!==f&&i.suppressUnhandledRejections():null!==f?0==(50397184&f)?(i._proxy(this,u),this._values[u]=i):e=0!=(33554432&f)?this._promiseFulfilled(i._value(),u):0!=(16777216&f)?this._promiseRejected(i._reason(),u):this._promiseCancelled(u):e=this._promiseFulfilled(i,u);e||s._setAsyncGuaranteed()},e.prototype._isResolved=function(){return null===this._values},e.prototype._resolve=function(n){this._values=null;this._promise._fulfill(n)},e.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},e.prototype._reject=function(n){this._values=null;this._promise._rejectCallback(n,!1)},e.prototype._promiseFulfilled=function(n,t){this._values[t]=n;var i=++this._totalResolved;return i>=this._length?(this._resolve(this._values),!0):!1},e.prototype._promiseCancelled=function(){return this._cancel(),!0},e.prototype._promiseRejected=function(n){return this._totalResolved++,this._reject(n),!0},e.prototype._resultCancelled=function(){var n,i;if(!this._isResolved())if(n=this._values,this._cancel(),n instanceof t)n.cancel();else for(i=0;i<n.length;++i)n[i]instanceof t&&n[i].cancel()},e.prototype.shouldCopyValues=function(){return!0},e.prototype.getActualLength=function(n){return n},e}},{"./util":21}],17:[function(n,t){"use strict";function r(n,t,i,r,u){for(var f=0;u>f;++f)i[f+r]=n[f+t],n[f+t]=void 0}function i(n){this._capacity=n;this._length=0;this._front=0}i.prototype._willBeOverCapacity=function(n){return this._capacity<n};i.prototype._pushOne=function(n){var t=this.length(),i;this._checkCapacity(t+1);i=this._front+t&this._capacity-1;this[i]=n;this._length=t+1};i.prototype.push=function(n,t,i){var r=this.length()+3,u,f;if(this._willBeOverCapacity(r))return this._pushOne(n),this._pushOne(t),void this._pushOne(i);u=this._front+r-3;this._checkCapacity(r);f=this._capacity-1;this[u+0&f]=n;this[u+1&f]=t;this[u+2&f]=i;this._length=r};i.prototype.shift=function(){var n=this._front,t=this[n];return this[n]=void 0,this._front=n+1&this._capacity-1,this._length--,t};i.prototype.length=function(){return this._length};i.prototype._checkCapacity=function(n){this._capacity<n&&this._resizeTo(this._capacity<<1)};i.prototype._resizeTo=function(n){var t=this._capacity;this._capacity=n;var i=this._front,u=this._length,f=i+u&t-1;r(this,0,this,t,f)};t.exports=i},{}],18:[function(n,t){"use strict";var i,r=n("./util"),s=function(){throw new Error("No async scheduler available\n\n    See http://goo.gl/MqrFmX\n");},u=r.getNativePromise(),f,e,o;r.isNode&&"undefined"==typeof MutationObserver?(f=global.setImmediate,e=process.nextTick,i=r.isRecentNode?function(n){f.call(global,n)}:function(n){e.call(process,n)}):"function"==typeof u&&"function"==typeof u.resolve?(o=u.resolve(),i=function(n){o.then(n)}):i="undefined"!=typeof MutationObserver&&("undefined"==typeof window||!window.navigator||!window.navigator.standalone&&!window.cordova)&&"classList"in document.documentElement?function(){var t=document.createElement("div"),i={attributes:!0},n=!1,r=document.createElement("div"),f=new MutationObserver(function(){t.classList.toggle("foo");n=!1}),u;return f.observe(r,i),u=function(){n||(n=!0,r.classList.toggle("foo"))},function(n){var r=new MutationObserver(function(){r.disconnect();n()});r.observe(t,i);u()}}():"undefined"!=typeof setImmediate?function(n){setImmediate(n)}:"undefined"!=typeof setTimeout?function(n){setTimeout(n,0)}:s;t.exports=i},{"./util":21}],19:[function(n,t){"use strict";t.exports=function(n){function t(n){void 0!==n?(n=n._target(),this._bitField=n._bitField,this._settledValueField=n._isFateSealed()?n._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}t.prototype._settledValue=function(){return this._settledValueField};var i=t.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n    See http://goo.gl/MqrFmX\n");return this._settledValue()},r=t.prototype.error=t.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n    See http://goo.gl/MqrFmX\n");return this._settledValue()},u=t.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},f=t.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},e=t.prototype.isPending=function(){return 0==(50397184&this._bitField)},o=t.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};t.prototype.isCancelled=function(){return 0!=(8454144&this._bitField)};n.prototype.__isCancelled=function(){return 65536==(65536&this._bitField)};n.prototype._isCancelled=function(){return this._target().__isCancelled()};n.prototype.isCancelled=function(){return 0!=(8454144&this._target()._bitField)};n.prototype.isPending=function(){return e.call(this._target())};n.prototype.isRejected=function(){return f.call(this._target())};n.prototype.isFulfilled=function(){return u.call(this._target())};n.prototype.isResolved=function(){return o.call(this._target())};n.prototype.value=function(){return i.call(this._target())};n.prototype.reason=function(){var n=this._target();return n._unsetRejectionIsUnhandled(),r.call(n)};n.prototype._value=function(){return this._settledValue()};n.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()};n.PromiseInspection=t}},{}],20:[function(n,t){"use strict";t.exports=function(t,i){function f(n,u){var e,f;if(c(n)){if(n instanceof t)return n;if(e=o(n),e===r)return u&&u._pushContext(),f=t.reject(e.e),u&&u._popContext(),f;if("function"==typeof e)return s(n)?(f=new t(i),n._then(f._fulfill,f._reject,void 0,f,null),f):h(n,e,u)}return n}function e(n){return n.then}function o(n){try{return e(n)}catch(t){return r.e=t,r}}function s(n){try{return l.call(n,"_promise0")}catch(t){return!1}}function h(n,f,e){function c(n){o&&(o._resolveCallback(n),o=null)}function l(n){o&&(o._rejectCallback(n,s,!0),o=null)}var o=new t(i),a=o,s,h;return e&&e._pushContext(),o._captureStackTrace(),e&&e._popContext(),s=!0,h=u.tryCatch(f).call(n,c,l),s=!1,o&&h===r&&(o._rejectCallback(h.e,!0,!0),o=null),a}var u=n("./util"),r=u.errorObj,c=u.isObject,l={}.hasOwnProperty;return f}},{"./util":21}],21:[function(n,t){"use strict";function w(){try{var n=h;return h=null,n.apply(this,arguments)}catch(t){return s.e=t,s}}function b(n){return h=n,w}function f(n){return null==n||n===!0||n===!1||"string"==typeof n||"number"==typeof n}function k(n){return"function"==typeof n||"object"==typeof n&&null!==n}function d(n){return f(n)?new Error(u(n)):n}function g(n,t){for(var u=n.length,r=new Array(u+1),i=0;u>i;++i)r[i]=n[i];return r[i]=t,r}function nt(n,t,r){if(!i.isES5)return{}.hasOwnProperty.call(n,t)?n[t]:void 0;var u=Object.getOwnPropertyDescriptor(n,t);if(null!=u)return null==u.get&&null==u.set?u.value:r}function c(n,t,r){if(f(n))return n;var u={value:r,configurable:!0,enumerable:!1,writable:!0};return i.defineProperty(n,t,u),n}function tt(n){throw n;}function it(n){try{if("function"==typeof n){var t=i.names(n.prototype),r=i.isES5&&t.length>1,u=t.length>0&&!(1===t.length&&"constructor"===t[0]),f=wt.test(n+"")&&i.names(n).length>0;if(r||u||f)return!0}return!1}catch(e){return!1}}function rt(n){function t(){}function i(){return typeof r.foo}t.prototype=n;var r=new t;return i(),i(),n}function ut(n){return bt.test(n)}function ft(n,t,i){for(var u=new Array(n),r=0;n>r;++r)u[r]=t+r+i;return u}function u(n){try{return n+""}catch(t){return"[no string representation]"}}function l(n){return n instanceof Error||null!==n&&"object"==typeof n&&"string"==typeof n.message&&"string"==typeof n.name}function et(n){try{c(n,"isOperational",!0)}catch(t){}}function ot(n){return null==n?!1:n instanceof Error.__BluebirdErrorTypes__.OperationalError||n.isOperational===!0}function e(n){return l(n)&&i.propertyIsWritable(n,"stack")}function o(n){return{}.toString.call(n)}function st(n,t,r){for(var f,e=i.names(n),u=0;u<e.length;++u)if(f=e[u],r(f))try{i.defineProperty(t,f,i.getDescriptor(n,f))}catch(o){}}function ht(n){if(y)return process.env[n]}function ct(){if("function"==typeof Promise)try{var n=new Promise(function(){});if("[object Promise]"===o(n))return Promise}catch(t){}}function lt(n,t){var i,r;return null===n||"function"!=typeof t||t===p?t:(null!==n.domain&&(t=n.domain.bind(t)),i=n.async,null!==i&&(r=t,t=function(){var n=new Array(2).concat([].slice.call(arguments));return n[0]=r,n[1]=this,i.runInAsyncScope.apply(i,n)}),t)}var i=n("./es5"),at="undefined"==typeof navigator,s={e:{}},h,vt="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0!==this?this:null,yt=function(n,t){function i(){this.constructor=n;this.constructor$=t;for(var i in t.prototype)r.call(t.prototype,i)&&"$"!==i.charAt(i.length-1)&&(this[i+"$"]=t.prototype[i])}var r={}.hasOwnProperty;return i.prototype=t.prototype,n.prototype=new i,n.prototype},pt=function(){var n=[Array.prototype,Object.prototype,Function.prototype],r=function(t){for(var i=0;i<n.length;++i)if(n[i]===t)return!0;return!1},u,t;return i.isES5?(u=Object.getOwnPropertyNames,function(n){for(var h,e,t,o,f=[],s=Object.create(null);null!=n&&!r(n);){try{h=u(n)}catch(c){return f}for(e=0;e<h.length;++e)t=h[e],s[t]||(s[t]=!0,o=Object.getOwnPropertyDescriptor(n,t),null!=o&&null==o.get&&null==o.set&&f.push(t));n=i.getPrototypeOf(n)}return f}):(t={}.hasOwnProperty,function(i){var f,u,e;if(r(i))return[];f=[];n:for(u in i)if(t.call(i,u))f.push(u);else{for(e=0;e<n.length;++e)if(t.call(n[e],u))continue n;f.push(u)}return f})}(),wt=/this\s*\.\s*\S+\s*=/,bt=/^[a-z$_][a-z$_0-9]*$/i,kt=function(){return"stack"in new Error?function(n){return e(n)?n:new Error(u(n))}:function(n){if(e(n))return n;try{throw new Error(u(n));}catch(t){return t}}}(),a=function(n){return i.isArray(n)?n:null},v;"undefined"!=typeof Symbol&&Symbol.iterator&&(v="function"==typeof Array.from?function(n){return Array.from(n)}:function(n){for(var t,i=[],r=n[Symbol.iterator]();!(t=r.next()).done;)i.push(t.value);return i},a=function(n){return i.isArray(n)?n:null!=n&&"function"==typeof n[Symbol.iterator]?v(n):null});var dt="undefined"!=typeof process&&"[object process]"===o(process).toLowerCase(),y="undefined"!=typeof process&&"undefined"!=typeof process.env,p,r={setReflectHandler:function(n){p=n},isClass:it,isIdentifier:ut,inheritedDataKeys:pt,getDataPropertyOrDefault:nt,thrower:tt,isArray:i.isArray,asArray:a,notEnumerableProp:c,isPrimitive:f,isObject:k,isError:l,canEvaluate:at,errorObj:s,tryCatch:b,inherits:yt,withAppended:g,maybeWrapAsError:d,toFastProperties:rt,filledRange:ft,toString:u,canAttachTrace:e,ensureErrorObject:kt,originatesFromRejection:ot,markAsOriginatingFromRejection:et,classString:o,copyDescriptors:st,isNode:dt,hasEnvVariables:y,env:ht,global:vt,getNativePromise:ct,contextBind:lt};r.isRecentNode=r.isNode&&function(){var n;return process.versions&&process.versions.node?n=process.versions.node.split(".").map(Number):process.version&&(n=process.version.split(".").map(Number)),0===n[0]&&n[1]>10||n[0]>0}();r.nodeSupportsAsyncResource=r.isNode&&function(){var t=!1,i;try{i=n("async_hooks").AsyncResource;t="function"==typeof i.prototype.runInAsyncScope}catch(r){t=!1}return t}();r.isNode&&r.toFastProperties(process);try{throw new Error;}catch(gt){r.lastLineError=gt}t.exports=r},{"./es5":10,async_hooks:void 0}]},{},[3])(3)});"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise);!function(){"use strict";var t="undefined"!=typeof window&&void 0!==window.document?window.document:{},r="undefined"!=typeof module&&module.exports,f="undefined"!=typeof Element&&"ALLOW_KEYBOARD_INPUT"in Element,n=function(){for(var i,r=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],n=0,f=r.length,u={};n<f;n++)if((i=r[n])&&i[1]in t){for(n=0;n<i.length;n++)u[r[0][n]]=i[n];return u}return!1}(),u={change:n.fullscreenchange,error:n.fullscreenerror},i={request:function(i){return new Promise(function(r,u){var e,o=n.requestFullscreen,s=function(){this.off("change",s);r()}.bind(this);this.on("change",s);i=i||t.documentElement;e=/ Version\/5\.1(?:\.\d+)? Safari\//.test(navigator.userAgent)?i[o]():i[o](f?Element.ALLOW_KEYBOARD_INPUT:{});Promise.resolve(e).catch(u)}.bind(this))},exit:function(){return new Promise(function(i){if(this.isFullscreen){var r=function(){this.off("change",r);i()}.bind(this);t[n.exitFullscreen]();this.on("change",r)}else i()}.bind(this))},toggle:function(n){return this.isFullscreen?this.exit():this.request(n)},onchange:function(n){this.on("change",n)},onerror:function(n){this.on("error",n)},on:function(n,i){var r=u[n];r&&t.addEventListener(r,i,!1)},off:function(n,i){var r=u[n];r&&t.removeEventListener(r,i,!1)},raw:n};n?(Object.defineProperties(i,{isFullscreen:{get:function(){return Boolean(t[n.fullscreenElement])}},element:{enumerable:!0,get:function(){return t[n.fullscreenElement]}},enabled:{enumerable:!0,get:function(){return Boolean(t[n.fullscreenEnabled])}}}),r?(module.exports=i,module.exports.default=i):window.screenfull=i):r?module.exports=!1:window.screenfull=!1}();angular.module("angularScreenfull",[]),function(){"use strict";function n(n){return{restrict:"A",require:"ngsfFullscreen",controller:t,link:function(t,i,r,u){if(r.ngsfFullscreen&&""!==r.ngsfFullscreen){var f=n(r.ngsfFullscreen);f.assign(t,u)}}}}function t(n,t,i,r){var f,u=this;u.onFullscreenChange=function(t){return n.$on("fullscreenchange",t)};u.onFullscreenChangeComplete=function(t){return n.$on("fullscreenchangecomplete",t)};u.requestFullscreen=function(){return u.fullscreenEnabled()?(screenfull.request(i[0]),n.$emit("fullscreenEnabled"),!0):!1};u.removeFullscreen=function(){u.fullscreenEnabled()&&u.isFullscreen()&&u.toggleFullscreen()};u.toggleFullscreen=function(){if(u.fullscreenEnabled()){var t=screenfull.isFullscreen;return screenfull.toggle(i[0]),t?n.$emit("fullscreenDisabled"):n.$emit("fullscreenEnabled"),!0}return!1};u.isFullscreen=function(){return u.fullscreenEnabled()?screenfull.isFullscreen:!1};u.fullscreenEnabled=function(){return"undefined"!=typeof screenfull&&screenfull.enabled};u.fullscreenEnabled()&&(f=function(){r[u.isFullscreen()?"addClass":"removeClass"](i,"fullscreen").then(function(){n.$emit("fullscreenchangecomplete")});n.$emit("fullscreenchange");n.$apply()},t[0].addEventListener(screenfull.raw.fullscreenchange,f),n.$on("$destroy",function(){t[0].removeEventListener(screenfull.raw.fullscreenchange,f)}))}angular.module("angularScreenfull").directive("ngsfFullscreen",n);n.$inject=["$parse"];t.$inject=["$scope","$document","$element","$animate"]}(),function(){"use strict";function n(n){return{restrict:"A",require:"^ngsfFullscreen",link:function(t,i,r,u){u.fullscreenEnabled()?n.removeClass(i,"ng-hide"):n.addClass(i,"ng-hide")}}}angular.module("angularScreenfull").directive("showIfFullscreenEnabled",n);n.$inject=["$animate"]}(),function(){"use strict";function n(n){return{restrict:"A",require:"^ngsfFullscreen",link:function(t,i,r,u){var f=function(){var t=u.isFullscreen();"false"!==r.showIfFullscreen&&!1!==r.showIfFullscreen||(t=!t);t?n.removeClass(i,"ng-hide"):n.addClass(i,"ng-hide")},e;f();e=u.onFullscreenChange(f);t.$on("$destroy",e)}}}angular.module("angularScreenfull").directive("showIfFullscreen",n);n.$inject=["$animate"]}(),function(){"use strict";angular.module("angularScreenfull").directive("ngsfToggleFullscreen",function(){return{restrict:"A",require:"^ngsfFullscreen",link:function(n,t,i,r){t.on("click",function(){r.toggleFullscreen()})}}})}(),function(){"use strict";function n(n,t,i){return{restrict:"A",link:function(r,u,f){i(function(){function e(n){var c,h,a,l,e,v;if(!angular.element(u).hasClass("ng-hide")&&n&&n.target){for(h=n.target;h;h=h.parentNode){if(h===u[0])return;if(l=h.id,e=h.className,v=o.length,e&&e.baseVal!==undefined&&(e=e.baseVal),e||l)for(c=0;c<v;c++)if(a=new RegExp("\\b"+o[c]+"\\b"),l!==undefined&&l===o[c]||e&&a.test(e))return}i(function(){s=t(f.clickOutside);s(r,{event:n})})}}function h(){return"ontouchstart"in window||navigator.maxTouchPoints}var o=f.outsideIfNot!==undefined?f.outsideIfNot.split(/[ ,]+/):[],s;if(h())n.on("touchstart",e);n.on("click",e);r.$on("$destroy",function(){h()&&n.off("touchstart",e);n.off("click",e)})})}}}angular.module("angular-click-outside",[]).directive("clickOutside",["$document","$parse","$timeout",n])}();angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.tooltip","ui.bootstrap.position","ui.bootstrap.stackedMap","ui.bootstrap.popover"]);angular.module("ui.bootstrap.tpls",["uib/template/tooltip/tooltip-html-popup.html","uib/template/tooltip/tooltip-popup.html","uib/template/tooltip/tooltip-template-popup.html","uib/template/popover/popover-html.html","uib/template/popover/popover-template.html","uib/template/popover/popover.html"]);angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){function i(n){var t="-";return n.replace(/[A-Z]/g,function(n,i){return(i?t:"")+n.toLowerCase()})}var r={placement:"top",placementClassPrefix:"",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},n={mouseenter:"mouseleave",click:"click",outsideClick:"outsideClick",focus:"blur",none:""},t={};this.options=function(n){angular.extend(t,n)};this.setTriggers=function(t){angular.extend(n,t)};this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(u,f,e,o,s,h,c,l,a){function y(n){if(27===n.which){var t=v.top();t&&(t.value.close(),t=null)}}var v=a.createNew();return o.on("keyup",y),c.$on("$destroy",function(){o.off("keyup",y)}),function(u,c,a,y){function p(t){var i=(t||y.trigger||a).split(" "),r=i.map(function(t){return n[t]||t});return{show:i,hide:r}}y=angular.extend({},r,t,y);var k=i(u),w=h.startSymbol(),b=h.endSymbol(),d="<div "+k+'-popup uib-title="'+w+"title"+b+'" '+(y.useContentExp?'content-exp="contentExp()" ':'content="'+w+"content"+b+'" ')+'origin-scope="origScope" class="uib-position-measure '+c+'" tooltip-animation-class="fade"uib-tooltip-classes ng-class="{ in: isOpen }" ><\/div>';return{compile:function(){var n=f(d);return function(t,i,r){function g(){f.isOpen?nt():at()}function at(){(!oi||t.$eval(r[c+"Enable"]))&&(vt(),ri(),f.popupDelay?it||(it=e(dt,f.popupDelay,!1)):dt())}function nt(){st();f.popupCloseDelay?rt||(rt=e(k,f.popupCloseDelay,!1)):k()}function dt(){return st(),vt(),f.content?(ii(),void f.$evalAsync(function(){f.isOpen=!0;gt(!0);ot()})):angular.noop}function st(){it&&(e.cancel(it),it=null);d&&(e.cancel(d),d=null)}function k(){f&&f.$evalAsync(function(){f&&(f.isOpen=!1,gt(!1),f.animation?tt||(tt=e(yt,150,!1)):yt())})}function vt(){rt&&(e.cancel(rt),rt=null);tt&&(e.cancel(tt),tt=null)}function ii(){h||(b=f.$new(),h=n(b,function(n){ft?o.find("body").append(n):i.after(n)}),v.add(f,{close:k}),ui())}function yt(){st();vt();fi();h&&(h.remove(),h=null,ht&&e.cancel(ht));v.remove(f);b&&(b.$destroy(),b=null)}function ri(){var n,i,e;f.title=r[c+"Title"];f.content=ct?ct(t):r[u];f.popupClass=r[c+"Class"];f.placement=angular.isDefined(r[c+"Placement"])?r[c+"Placement"]:y.placement;n=s.parsePlacement(f.placement);ut=n[1]?n[0]+"-"+n[1]:n[0];i=parseInt(r[c+"PopupDelay"],10);e=parseInt(r[c+"PopupCloseDelay"],10);f.popupDelay=isNaN(i)?y.popupDelay:i;f.popupCloseDelay=isNaN(e)?y.popupCloseDelay:e}function gt(n){et&&angular.isFunction(et.assign)&&et.assign(t,n)}function ui(){a.length=0;ct?(a.push(t.$watch(ct,function(n){f.content=n;!n&&f.isOpen&&k()})),a.push(b.$watch(function(){pt||(pt=!0,b.$$postDigest(function(){pt=!1;f&&f.isOpen&&ot()}))}))):a.push(r.$observe(u,function(n){f.content=n;!n&&f.isOpen?k():ot()}));a.push(r.$observe(c+"Title",function(n){f.title=n;f.isOpen&&ot()}));a.push(r.$observe(c+"Placement",function(n){f.placement=n?n:y.placement;f.isOpen&&ot()}))}function fi(){a.length&&(angular.forEach(a,function(n){n()}),a.length=0)}function ni(n){f&&f.isOpen&&h&&(i[0].contains(n.target)||h[0].contains(n.target)||nt())}function ti(n){27===n.which&&nt()}function ei(){var u=[],f=[],n=t.$eval(r[c+"Trigger"]);wt();angular.isObject(n)?(Object.keys(n).forEach(function(t){u.push(t);f.push(n[t])}),w={show:u,hide:f}):w=p(n);"none"!==w.show&&w.show.forEach(function(n,t){"outsideClick"===n?(i.on("click",g),o.on("click",ni)):n===w.hide[t]?i.on(n,g):n&&(i.on(n,at),i.on(w.hide[t],nt));i.on("keypress",ti)})}var h,b,tt,it,rt,d,ht,ut,ft=angular.isDefined(y.appendToBody)?y.appendToBody:!1,w=p(void 0),oi=angular.isDefined(r[c+"Enable"]),f=t.$new(!0),pt=!1,et=angular.isDefined(r[c+"IsOpen"])?l(r[c+"IsOpen"]):!1,ct=y.useContentExp?l(r[u]):!1,a=[],ot=function(){h&&h.html()&&(d||(d=e(function(){var n=s.positionElements(i,h,f.placement,ft),r=angular.isDefined(h.offsetHeight)?h.offsetHeight:h.prop("offsetHeight"),u=ft?s.offset(i):s.position(i),t;h.css({top:n.top+"px",left:n.left+"px"});t=n.placement.split("-");h.hasClass(t[0])||(h.removeClass(ut.split("-")[0]),h.addClass(t[0]));h.hasClass(y.placementClassPrefix+n.placement)||(h.removeClass(y.placementClassPrefix+ut),h.addClass(y.placementClassPrefix+n.placement));ht=e(function(){var i=angular.isDefined(h.offsetHeight)?h.offsetHeight:h.prop("offsetHeight"),n=s.adjustTop(t,u,r,i);n&&h.css(n);ht=null},0,!1);h.hasClass("uib-position-measure")?(s.positionArrow(h,n.placement),h.removeClass("uib-position-measure")):ut!==n.placement&&s.positionArrow(h,n.placement);ut=n.placement;d=null},0,!1)))},wt,bt,kt,lt;f.origScope=t;f.isOpen=!1;f.contentExp=function(){return f.content};r.$observe("disabled",function(n){n&&st();n&&f.isOpen&&k()});et&&t.$watch(et,function(n){f&&!n===f.isOpen&&g()});wt=function(){w.show.forEach(function(n){"outsideClick"===n?i.off("click",g):(i.off(n,at),i.off(n,g));i.off("keypress",ti)});w.hide.forEach(function(n){"outsideClick"===n?o.off("click",ni):i.off(n,nt)})};ei();bt=t.$eval(r[c+"Animation"]);f.animation=angular.isDefined(bt)?!!bt:y.animation;lt=c+"AppendToBody";kt=lt in r&&void 0===r[lt]?!0:t.$eval(r[lt]);ft=angular.isDefined(kt)?kt:ft;t.$on("$destroy",function(){wt();yt();f=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(n,t,i,r){return{link:function(u,f,e){var o,s,h,a=u.$eval(e.tooltipTemplateTranscludeScope),l=0,c=function(){s&&(s.remove(),s=null);o&&(o.$destroy(),o=null);h&&(n.leave(h).then(function(){s=null}),s=h,h=null)};u.$watch(t.parseAsResourceUrl(e.uibTooltipTemplateTransclude),function(t){var e=++l;t?(r(t,!0).then(function(r){if(e===l){var u=a.$new(),s=r,v=i(s)(u,function(t){c();n.enter(t,f)});o=u;h=v;o.$emit("$includeContentLoaded",t)}},function(){e===l&&(c(),u.$emit("$includeContentError",t))}),u.$emit("$includeContentRequested",t)):c()});u.$on("$destroy",c)}}}]).directive("uibTooltipClasses",["$uibPosition",function(n){return{restrict:"A",link:function(t,i,r){if(t.placement){var u=n.parsePlacement(t.placement);i.addClass(u[0])}t.popupClass&&i.addClass(t.popupClass);t.animation&&i.addClass(r.tooltipAnimationClass)}}}]).directive("uibTooltipPopup",function(){return{restrict:"A",scope:{content:"@"},templateUrl:"uib/template/tooltip/tooltip-popup.html"}}).directive("uibTooltip",["$uibTooltip",function(n){return n("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{restrict:"A",scope:{contentExp:"&",originScope:"&"},templateUrl:"uib/template/tooltip/tooltip-template-popup.html"}}).directive("uibTooltipTemplate",["$uibTooltip",function(n){return n("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{restrict:"A",scope:{contentExp:"&"},templateUrl:"uib/template/tooltip/tooltip-html-popup.html"}}).directive("uibTooltipHtml",["$uibTooltip",function(n){return n("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]);angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(n,t){var r,u,f={normal:/(auto|scroll)/,hidden:/(auto|scroll|hidden)/},i={auto:/\s?auto?\s?/i,primary:/^(top|bottom|left|right)$/,secondary:/^(top|bottom|left|right|center)$/,vertical:/^(top|bottom)$/},e=/(HTML|BODY)/;return{getRawNode:function(n){return n.nodeName?n:n[0]||n},parseStyle:function(n){return n=parseFloat(n),isFinite(n)?n:0},offsetParent:function(i){function u(n){return"static"===(t.getComputedStyle(n).position||"static")}i=this.getRawNode(i);for(var r=i.offsetParent||n[0].documentElement;r&&r!==n[0].documentElement&&u(r);)r=r.offsetParent;return r||n[0].documentElement},scrollbarWidth:function(i){var e,f;return i?(angular.isUndefined(u)&&(e=n.find("body"),e.addClass("uib-position-body-scrollbar-measure"),u=t.innerWidth-e[0].clientWidth,u=isFinite(u)?u:0,e.removeClass("uib-position-body-scrollbar-measure")),u):(angular.isUndefined(r)&&(f=angular.element('<div class="uib-position-scrollbar-measure"><\/div>'),n.find("body").append(f),r=f[0].offsetWidth-f[0].clientWidth,r=isFinite(r)?r:0,f.remove()),r)},scrollbarPadding:function(n){n=this.getRawNode(n);var u=t.getComputedStyle(n),f=this.parseStyle(u.paddingRight),o=this.parseStyle(u.paddingBottom),i=this.scrollParent(n,!1,!0),r=this.scrollbarWidth(e.test(i.tagName));return{scrollbarWidth:r,widthOverflow:i.scrollWidth>i.clientWidth,right:f+r,originalRight:f,heightOverflow:i.scrollHeight>i.clientHeight,bottom:o+r,originalBottom:o}},isScrollable:function(n,i){n=this.getRawNode(n);var u=i?f.hidden:f.normal,r=t.getComputedStyle(n);return u.test(r.overflow+r.overflowY+r.overflowX)},scrollParent:function(i,r,u){var c,e,s;i=this.getRawNode(i);var l=r?f.hidden:f.normal,h=n[0].documentElement,o=t.getComputedStyle(i);if(u&&l.test(o.overflow+o.overflowY+o.overflowX))return i;if(c="absolute"===o.position,e=i.parentElement||h,e===h||"fixed"===o.position)return h;for(;e.parentElement&&e!==h;){if(s=t.getComputedStyle(e),c&&"static"!==s.position&&(c=!1),!c&&l.test(s.overflow+s.overflowY+s.overflowX))break;e=e.parentElement}return e},position:function(i,r){var u,o,f,e;return i=this.getRawNode(i),u=this.offset(i),r&&(o=t.getComputedStyle(i),u.top-=this.parseStyle(o.marginTop),u.left-=this.parseStyle(o.marginLeft)),f=this.offsetParent(i),e={top:0,left:0},f!==n[0].documentElement&&(e=this.offset(f),e.top+=f.clientTop-f.scrollTop,e.left+=f.clientLeft-f.scrollLeft),{width:Math.round(angular.isNumber(u.width)?u.width:i.offsetWidth),height:Math.round(angular.isNumber(u.height)?u.height:i.offsetHeight),top:Math.round(u.top-e.top),left:Math.round(u.left-e.left)}},offset:function(i){i=this.getRawNode(i);var r=i.getBoundingClientRect();return{width:Math.round(angular.isNumber(r.width)?r.width:i.offsetWidth),height:Math.round(angular.isNumber(r.height)?r.height:i.offsetHeight),top:Math.round(r.top+(t.pageYOffset||n[0].documentElement.scrollTop)),left:Math.round(r.left+(t.pageXOffset||n[0].documentElement.scrollLeft))}},viewportOffset:function(i,r,u){var o;i=this.getRawNode(i);u=u!==!1?!0:!1;var s=i.getBoundingClientRect(),f={top:0,left:0,bottom:0,right:0},e=r?n[0].documentElement:this.scrollParent(i),h=e.getBoundingClientRect();return(f.top=h.top+e.clientTop,f.left=h.left+e.clientLeft,e===n[0].documentElement&&(f.top+=t.pageYOffset,f.left+=t.pageXOffset),f.bottom=f.top+e.clientHeight,f.right=f.left+e.clientWidth,u)&&(o=t.getComputedStyle(e),f.top+=this.parseStyle(o.paddingTop),f.bottom-=this.parseStyle(o.paddingBottom),f.left+=this.parseStyle(o.paddingLeft),f.right-=this.parseStyle(o.paddingRight)),{top:Math.round(s.top-f.top),bottom:Math.round(f.bottom-s.bottom),left:Math.round(s.left-f.left),right:Math.round(f.right-s.right)}},parsePlacement:function(n){var t=i.auto.test(n);return t&&(n=n.replace(i.auto,"")),n=n.split("-"),n[0]=n[0]||"top",i.primary.test(n[0])||(n[0]="top"),n[1]=n[1]||"center",i.secondary.test(n[1])||(n[1]="center"),n[2]=t?!0:!1,n},positionElements:function(n,r,u,f){var c,l,e,h,v,y;if(n=this.getRawNode(n),r=this.getRawNode(r),c=angular.isDefined(r.offsetWidth)?r.offsetWidth:r.prop("offsetWidth"),l=angular.isDefined(r.offsetHeight)?r.offsetHeight:r.prop("offsetHeight"),u=this.parsePlacement(u),e=f?this.offset(n):this.position(n),h={top:0,left:0,placement:""},u[2]){var o=this.viewportOffset(n,f),a=t.getComputedStyle(r),s={width:c+Math.round(Math.abs(this.parseStyle(a.marginLeft)+this.parseStyle(a.marginRight))),height:l+Math.round(Math.abs(this.parseStyle(a.marginTop)+this.parseStyle(a.marginBottom)))};(u[0]="top"===u[0]&&s.height>o.top&&s.height<=o.bottom?"bottom":"bottom"===u[0]&&s.height>o.bottom&&s.height<=o.top?"top":"left"===u[0]&&s.width>o.left&&s.width<=o.right?"right":"right"===u[0]&&s.width>o.right&&s.width<=o.left?"left":u[0],u[1]="top"===u[1]&&s.height-e.height>o.bottom&&s.height-e.height<=o.top?"bottom":"bottom"===u[1]&&s.height-e.height>o.top&&s.height-e.height<=o.bottom?"top":"left"===u[1]&&s.width-e.width>o.right&&s.width-e.width<=o.left?"right":"right"===u[1]&&s.width-e.width>o.left&&s.width-e.width<=o.right?"left":u[1],"center"===u[1])&&(i.vertical.test(u[0])?(v=e.width/2-c/2,o.left+v<0&&s.width-e.width<=o.right?u[1]="left":o.right+v<0&&s.width-e.width<=o.left&&(u[1]="right")):(y=e.height/2-s.height/2,o.top+y<0&&s.height-e.height<=o.bottom?u[1]="top":o.bottom+y<0&&s.height-e.height<=o.top&&(u[1]="bottom")))}switch(u[0]){case"top":h.top=e.top-l;break;case"bottom":h.top=e.top+e.height;break;case"left":h.left=e.left-c;break;case"right":h.left=e.left+e.width}switch(u[1]){case"top":h.top=e.top;break;case"bottom":h.top=e.top+e.height-l;break;case"left":h.left=e.left;break;case"right":h.left=e.left+e.width-c;break;case"center":i.vertical.test(u[0])?h.left=e.left+e.width/2-c/2:h.top=e.top+e.height/2-l/2}return h.top=Math.round(h.top),h.left=Math.round(h.left),h.placement="center"===u[1]?u[0]:u[0]+"-"+u[1],h},adjustTop:function(n,t,i,r){if(-1!==n.indexOf("top")&&i!==r)return{top:t.top-r+"px"}},positionArrow:function(n,r){var o,f,e,u,c;if(n=this.getRawNode(n),o=n.querySelector(".tooltip-inner, .popover-inner"),o&&(f=angular.element(o).hasClass("tooltip-inner"),e=n.querySelector(f?".tooltip-arrow":".arrow"),e)){if(u={top:"",bottom:"",left:"",right:""},r=this.parsePlacement(r),"center"===r[1])return void angular.element(e).css(u);var l="border-"+r[0]+"-width",s=t.getComputedStyle(e)[l],h="border-";h+=i.vertical.test(r[0])?r[0]+"-"+r[1]:r[1]+"-"+r[0];h+="-radius";c=t.getComputedStyle(f?o:n)[h];switch(r[0]){case"top":u.bottom=f?"0":"-"+s;break;case"bottom":u.top=f?"0":"-"+s;break;case"left":u.right=f?"0":"-"+s;break;case"right":u.left=f?"0":"-"+s}u[r[1]]=c;angular.element(e).css(u)}}}}]);angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var n=[];return{add:function(t,i){n.push({key:t,value:i})},get:function(t){for(var i=0;i<n.length;i++)if(t===n[i].key)return n[i]},keys:function(){for(var i=[],t=0;t<n.length;t++)i.push(n[t].key);return i},top:function(){return n[n.length-1]},remove:function(t){for(var r=-1,i=0;i<n.length;i++)if(t===n[i].key){r=i;break}return n.splice(r,1)[0]},removeTop:function(){return n.pop()},length:function(){return n.length}}}}});angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{restrict:"A",scope:{uibTitle:"@",contentExp:"&",originScope:"&"},templateUrl:"uib/template/popover/popover-template.html"}}).directive("uibPopoverTemplate",["$uibTooltip",function(n){return n("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{restrict:"A",scope:{contentExp:"&",uibTitle:"@"},templateUrl:"uib/template/popover/popover-html.html"}}).directive("uibPopoverHtml",["$uibTooltip",function(n){return n("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{restrict:"A",scope:{uibTitle:"@",content:"@"},templateUrl:"uib/template/popover/popover.html"}}).directive("uibPopover",["$uibTooltip",function(n){return n("uibPopover","popover","click")}]);angular.module("uib/template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(n){n.put("uib/template/tooltip/tooltip-html-popup.html",'<div class="tooltip-arrow"><\/div>\n<div class="tooltip-inner" ng-bind-html="contentExp()"><\/div>\n')}]);angular.module("uib/template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(n){n.put("uib/template/tooltip/tooltip-popup.html",'<div class="tooltip-arrow"><\/div>\n<div class="tooltip-inner" ng-bind="content"><\/div>\n')}]);angular.module("uib/template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(n){n.put("uib/template/tooltip/tooltip-template-popup.html",'<div class="tooltip-arrow"><\/div>\n<div class="tooltip-inner"\n  uib-tooltip-template-transclude="contentExp()"\n  tooltip-template-transclude-scope="originScope()"><\/div>\n')}]);angular.module("uib/template/popover/popover-html.html",[]).run(["$templateCache",function(n){n.put("uib/template/popover/popover-html.html",'<div class="arrow"><\/div>\n\n<div class="popover-inner">\n    <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"><\/h3>\n    <div class="popover-content" ng-bind-html="contentExp()"><\/div>\n<\/div>\n')}]);angular.module("uib/template/popover/popover-template.html",[]).run(["$templateCache",function(n){n.put("uib/template/popover/popover-template.html",'<div class="arrow"><\/div>\n\n<div class="popover-inner">\n    <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"><\/h3>\n    <div class="popover-content"\n      uib-tooltip-template-transclude="contentExp()"\n      tooltip-template-transclude-scope="originScope()"><\/div>\n<\/div>\n')}]);angular.module("uib/template/popover/popover.html",[]).run(["$templateCache",function(n){n.put("uib/template/popover/popover.html",'<div class="arrow"><\/div>\n\n<div class="popover-inner">\n    <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"><\/h3>\n    <div class="popover-content" ng-bind="content"><\/div>\n<\/div>\n')}]);angular.module("ui.bootstrap.tooltip").run(function(){angular.$$csp().noInlineStyle||angular.$$uibTooltipCss||angular.element(document).find("head").prepend('<style type="text/css">[uib-tooltip-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-bottom > .tooltip-arrow,[uib-popover-popup].popover.top-left > .arrow,[uib-popover-popup].popover.top-right > .arrow,[uib-popover-popup].popover.bottom-left > .arrow,[uib-popover-popup].popover.bottom-right > .arrow,[uib-popover-popup].popover.left-top > .arrow,[uib-popover-popup].popover.left-bottom > .arrow,[uib-popover-popup].popover.right-top > .arrow,[uib-popover-popup].popover.right-bottom > .arrow,[uib-popover-html-popup].popover.top-left > .arrow,[uib-popover-html-popup].popover.top-right > .arrow,[uib-popover-html-popup].popover.bottom-left > .arrow,[uib-popover-html-popup].popover.bottom-right > .arrow,[uib-popover-html-popup].popover.left-top > .arrow,[uib-popover-html-popup].popover.left-bottom > .arrow,[uib-popover-html-popup].popover.right-top > .arrow,[uib-popover-html-popup].popover.right-bottom > .arrow,[uib-popover-template-popup].popover.top-left > .arrow,[uib-popover-template-popup].popover.top-right > .arrow,[uib-popover-template-popup].popover.bottom-left > .arrow,[uib-popover-template-popup].popover.bottom-right > .arrow,[uib-popover-template-popup].popover.left-top > .arrow,[uib-popover-template-popup].popover.left-bottom > .arrow,[uib-popover-template-popup].popover.right-top > .arrow,[uib-popover-template-popup].popover.right-bottom > .arrow{top:auto;bottom:auto;left:auto;right:auto;margin:0;}[uib-popover-popup].popover,[uib-popover-html-popup].popover,[uib-popover-template-popup].popover{display:block !important;}<\/style>');angular.$$uibTooltipCss=!0});angular.module("ui.bootstrap.position").run(function(){angular.$$csp().noInlineStyle||angular.$$uibPositionCss||angular.element(document).find("head").prepend('<style type="text/css">.uib-position-measure{display:block !important;visibility:hidden !important;position:absolute !important;top:-9999px !important;left:-9999px !important;}.uib-position-scrollbar-measure{position:absolute !important;top:-9999px !important;width:50px !important;height:50px !important;overflow:scroll !important;}.uib-position-body-scrollbar-measure{overflow:scroll !important;}<\/style>');angular.$$uibPositionCss=!0});!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):n.PerfectScrollbar=t()}(this,function(){"use strict";function r(n){return getComputedStyle(n)}function i(n,t){var r,i;for(r in t)i=t[r],"number"==typeof i&&(i+="px"),n.style[r]=i;return n}function l(n){var t=document.createElement("div");return t.className=n,t}function f(n,t){if(!d)throw new Error("No element matching method supported");return d.call(n,t)}function o(n){n.remove?n.remove():n.parentNode&&n.parentNode.removeChild(n)}function y(n,t){return Array.prototype.filter.call(n.children,function(n){return f(n,t)})}function p(n,i){var r=n.element.classList,u=t.state.scrolling(i);r.contains(u)?clearTimeout(g[i]):r.add(u)}function w(n,i){g[i]=setTimeout(function(){return n.isAlive&&n.element.classList.remove(t.state.scrolling(i))},n.settings.scrollingThreshold)}function tt(n,t){p(n,t);w(n,t)}function a(n){if("function"==typeof CustomEvent)return new CustomEvent(n);var t=document.createEvent("CustomEvent");return t.initCustomEvent(n,!1,!1,void 0),t}function it(n,t,i,r,u){var s=i[0],h=i[1],o=i[2],f=i[3],c=i[4],l=i[5],e;void 0===r&&(r=!0);void 0===u&&(u=!1);e=n.element;n.reach[f]=null;e[o]<1&&(n.reach[f]="start");e[o]>n[s]-n[h]-1&&(n.reach[f]="end");t&&(e.dispatchEvent(a("ps-scroll-"+f)),t<0?e.dispatchEvent(a("ps-scroll-"+c)):t>0&&e.dispatchEvent(a("ps-scroll-"+l)),r&&tt(n,f));n.reach[f]&&(t||u)&&e.dispatchEvent(a("ps-"+f+"-reach-"+n.reach[f]))}function n(n){return parseInt(n,10)||0}function rt(n){return f(n,"input,[contenteditable]")||f(n,"select,[contenteditable]")||f(n,"textarea,[contenteditable]")||f(n,"button,[contenteditable]")}function ut(t){var i=r(t);return n(i.width)+n(i.paddingLeft)+n(i.paddingRight)+n(i.borderLeftWidth)+n(i.borderRightWidth)}function b(n,t){return n.settings.minScrollbarLength&&(t=Math.max(t,n.settings.minScrollbarLength)),n.settings.maxScrollbarLength&&(t=Math.min(t,n.settings.maxScrollbarLength)),t}function ft(n,t){var r={width:t.railXWidth},u;r.left=t.isRtl?t.negativeScrollAdjustment+n.scrollLeft+t.containerWidth-t.contentWidth:n.scrollLeft;t.isScrollbarXUsingBottom?r.bottom=t.scrollbarXBottom-n.scrollTop:r.top=t.scrollbarXTop+n.scrollTop;i(t.scrollbarXRail,r);u={top:n.scrollTop,height:t.railYHeight};t.isScrollbarYUsingRight?u.right=t.isRtl?t.contentWidth-(t.negativeScrollAdjustment+n.scrollLeft)-t.scrollbarYRight-t.scrollbarYOuterWidth:t.scrollbarYRight-n.scrollLeft:u.left=t.isRtl?t.negativeScrollAdjustment+n.scrollLeft+2*t.containerWidth-t.contentWidth-t.scrollbarYLeft-t.scrollbarYOuterWidth:t.scrollbarYLeft+n.scrollLeft;i(t.scrollbarYRail,u);i(t.scrollbarX,{left:t.scrollbarXLeft,width:t.scrollbarXWidth-t.railBorderXWidth});i(t.scrollbarY,{top:t.scrollbarYTop,height:t.scrollbarYHeight-t.railBorderYWidth})}function k(n,t){function i(t){o[f]=s+c*(t[r]-h);p(n,e);u(n);t.stopPropagation();t.preventDefault()}function l(){w(n,e);n.event.unbind(n.ownerDocument,"mousemove",i)}var a=t[0],v=t[1],r=t[2],y=t[3],b=t[4],k=t[5],f=t[6],e=t[7],o=n.element,s=null,h=null,c=null;n.event.bind(n[b],"mousedown",function(t){s=o[f];h=t[r];c=(n[v]-n[a])/(n[y]-n[k]);n.event.bind(n.ownerDocument,"mousemove",i);n.event.once(n.ownerDocument,"mouseup",l);t.stopPropagation();t.preventDefault()})}var d="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.msMatchesSelector),t={main:"ps",element:{thumb:function(n){return"ps__thumb-"+n},rail:function(n){return"ps__rail-"+n},consuming:"ps__child--consume"},state:{focus:"ps--focus",active:function(n){return"ps--active-"+n},scrolling:function(n){return"ps--scrolling-"+n}}},g={x:null,y:null},h=function(n){this.element=n;this.handlers={}},nt={isEmpty:{configurable:!0}},e;h.prototype.bind=function(n,t){void 0===this.handlers[n]&&(this.handlers[n]=[]);this.handlers[n].push(t);this.element.addEventListener(n,t,!1)};h.prototype.unbind=function(n,t){var i=this;this.handlers[n]=this.handlers[n].filter(function(r){return!(!t||r===t)||(i.element.removeEventListener(n,r,!1),!1)})};h.prototype.unbindAll=function(){var n=this;for(var t in n.handlers)n.unbind(t)};nt.isEmpty.get=function(){var n=this;return Object.keys(this.handlers).every(function(t){return 0===n.handlers[t].length})};Object.defineProperties(h.prototype,nt);e=function(){this.eventElements=[]};e.prototype.eventElement=function(n){var t=this.eventElements.filter(function(t){return t.element===n})[0];return t||(t=new h(n),this.eventElements.push(t)),t};e.prototype.bind=function(n,t,i){this.eventElement(n).bind(t,i)};e.prototype.unbind=function(n,t,i){var r=this.eventElement(n);r.unbind(t,i);r.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(r),1)};e.prototype.unbindAll=function(){this.eventElements.forEach(function(n){return n.unbindAll()});this.eventElements=[]};e.prototype.once=function(n,t,i){var r=this.eventElement(n),u=function(n){r.unbind(t,u);i(n)};r.bind(t,u)};var v=function(n,t,i,r,u){void 0===r&&(r=!0);void 0===u&&(u=!1);var f;if("top"===t)f=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==t)throw new Error("A proper axis should be provided");f=["contentWidth","containerWidth","scrollLeft","x","left","right"]}it(n,i,f,r,u)},s={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)},u=function(i){var r=i.element;i.containerWidth=r.clientWidth;i.containerHeight=r.clientHeight;i.contentWidth=r.scrollWidth;i.contentHeight=r.scrollHeight;r.contains(i.scrollbarXRail)||(y(r,t.element.rail("x")).forEach(function(n){return o(n)}),r.appendChild(i.scrollbarXRail));r.contains(i.scrollbarYRail)||(y(r,t.element.rail("y")).forEach(function(n){return o(n)}),r.appendChild(i.scrollbarYRail));!i.settings.suppressScrollX&&i.containerWidth+i.settings.scrollXMarginOffset<i.contentWidth?(i.scrollbarXActive=!0,i.railXWidth=i.containerWidth-i.railXMarginWidth,i.railXRatio=i.containerWidth/i.railXWidth,i.scrollbarXWidth=b(i,n(i.railXWidth*i.containerWidth/i.contentWidth)),i.scrollbarXLeft=n((i.negativeScrollAdjustment+r.scrollLeft)*(i.railXWidth-i.scrollbarXWidth)/(i.contentWidth-i.containerWidth))):i.scrollbarXActive=!1;!i.settings.suppressScrollY&&i.containerHeight+i.settings.scrollYMarginOffset<i.contentHeight?(i.scrollbarYActive=!0,i.railYHeight=i.containerHeight-i.railYMarginHeight,i.railYRatio=i.containerHeight/i.railYHeight,i.scrollbarYHeight=b(i,n(i.railYHeight*i.containerHeight/i.contentHeight)),i.scrollbarYTop=n(r.scrollTop*(i.railYHeight-i.scrollbarYHeight)/(i.contentHeight-i.containerHeight))):i.scrollbarYActive=!1;i.scrollbarXLeft>=i.railXWidth-i.scrollbarXWidth&&(i.scrollbarXLeft=i.railXWidth-i.scrollbarXWidth);i.scrollbarYTop>=i.railYHeight-i.scrollbarYHeight&&(i.scrollbarYTop=i.railYHeight-i.scrollbarYHeight);ft(r,i);i.scrollbarXActive?r.classList.add(t.state.active("x")):(r.classList.remove(t.state.active("x")),i.scrollbarXWidth=0,i.scrollbarXLeft=0,r.scrollLeft=0);i.scrollbarYActive?r.classList.add(t.state.active("y")):(r.classList.remove(t.state.active("y")),i.scrollbarYHeight=0,i.scrollbarYTop=0,r.scrollTop=0)},et={"click-rail":function(n){n.event.bind(n.scrollbarY,"mousedown",function(n){return n.stopPropagation()});n.event.bind(n.scrollbarYRail,"mousedown",function(t){var i=t.pageY-window.pageYOffset-n.scrollbarYRail.getBoundingClientRect().top>n.scrollbarYTop?1:-1;n.element.scrollTop+=i*n.containerHeight;u(n);t.stopPropagation()});n.event.bind(n.scrollbarX,"mousedown",function(n){return n.stopPropagation()});n.event.bind(n.scrollbarXRail,"mousedown",function(t){var i=t.pageX-window.pageXOffset-n.scrollbarXRail.getBoundingClientRect().left>n.scrollbarXLeft?1:-1;n.element.scrollLeft+=i*n.containerWidth;u(n);t.stopPropagation()})},"drag-thumb":function(n){k(n,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x"]);k(n,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y"])},keyboard:function(n){function i(i,r){var f=t.scrollTop,u;if(0===i){if(!n.scrollbarYActive)return!1;if(0===f&&r>0||f>=n.contentHeight-n.containerHeight&&r<0)return!n.settings.wheelPropagation}if(u=t.scrollLeft,0===r){if(!n.scrollbarXActive)return!1;if(0===u&&i<0||u>=n.contentWidth-n.containerWidth&&i>0)return!n.settings.wheelPropagation}return!0}var t=n.element,r=function(){return f(t,":hover")},e=function(){return f(n.scrollbarX,":focus")||f(n.scrollbarY,":focus")};n.event.bind(n.ownerDocument,"keydown",function(f){var s,h,o;if(!(f.isDefaultPrevented&&f.isDefaultPrevented()||f.defaultPrevented)&&(r()||e())){if(s=document.activeElement?document.activeElement:n.ownerDocument.activeElement,s){if("IFRAME"===s.tagName)s=s.contentDocument.activeElement;else for(;s.shadowRoot;)s=s.shadowRoot.activeElement;if(rt(s))return}h=0;o=0;switch(f.which){case 37:h=f.metaKey?-n.contentWidth:f.altKey?-n.containerWidth:-30;break;case 38:o=f.metaKey?n.contentHeight:f.altKey?n.containerHeight:30;break;case 39:h=f.metaKey?n.contentWidth:f.altKey?n.containerWidth:30;break;case 40:o=f.metaKey?-n.contentHeight:f.altKey?-n.containerHeight:-30;break;case 32:o=f.shiftKey?n.containerHeight:-n.containerHeight;break;case 33:o=n.containerHeight;break;case 34:o=-n.containerHeight;break;case 36:o=n.contentHeight;break;case 35:o=-n.contentHeight;break;default:return}n.settings.suppressScrollX&&0!==h||n.settings.suppressScrollY&&0!==o||(t.scrollTop-=o,t.scrollLeft+=h,u(n),i(h,o)&&f.preventDefault())}})},wheel:function(n){function e(t,r){var u=0===i.scrollTop,f=i.scrollTop+i.offsetHeight===i.scrollHeight,e=0===i.scrollLeft,o=i.scrollLeft+i.offsetWidth===i.offsetWidth;return!(Math.abs(r)>Math.abs(t)?u||f:e||o)||!n.settings.wheelPropagation}function o(n){var t=n.deltaX,i=-1*n.deltaY;return void 0!==t&&void 0!==i||(t=n.wheelDeltaX/-6,i=n.wheelDeltaY/6),n.deltaMode&&1===n.deltaMode&&(t*=10,i*=10),t!==t&&i!==i&&(t=0,i=n.wheelDelta),n.shiftKey?[-i,-t]:[t,i]}function h(n,u,f){var e,o,h,c;if(!s.isWebKit&&i.querySelector("select:focus"))return!0;if(!i.contains(n))return!1;for(e=n;e&&e!==i;){if(e.classList.contains(t.element.consuming)||(o=r(e),[o.overflow,o.overflowX,o.overflowY].join("").match(/(scroll|auto)/)&&((h=e.scrollHeight-e.clientHeight,h>0&&!(0===e.scrollTop&&f>0||e.scrollTop===h&&f<0))||(c=e.scrollLeft-e.clientWidth,c>0&&!(0===e.scrollLeft&&u<0||e.scrollLeft===c&&u>0)))))return!0;e=e.parentNode}return!1}function f(t){var c=o(t),r=c[0],f=c[1],s;h(t.target,r,f)||(s=!1,n.settings.useBothWheelAxes?n.scrollbarYActive&&!n.scrollbarXActive?(f?i.scrollTop-=f*n.settings.wheelSpeed:i.scrollTop+=r*n.settings.wheelSpeed,s=!0):n.scrollbarXActive&&!n.scrollbarYActive&&(r?i.scrollLeft+=r*n.settings.wheelSpeed:i.scrollLeft-=f*n.settings.wheelSpeed,s=!0):(i.scrollTop-=f*n.settings.wheelSpeed,i.scrollLeft+=r*n.settings.wheelSpeed),u(n),(s=s||e(r,f))&&!t.ctrlKey&&(t.stopPropagation(),t.preventDefault()))}var i=n.element;void 0!==window.onwheel?n.event.bind(i,"wheel",f):void 0!==window.onmousewheel&&n.event.bind(i,"mousewheel",f)},touch:function(n){function w(t,r){var u=i.scrollTop,f=i.scrollLeft,e=Math.abs(t),o=Math.abs(r);if(o>e){if(r<0&&u===n.contentHeight-n.containerHeight||r>0&&0===u)return 0===window.scrollY&&r>0&&s.isChrome}else if(e>o&&(t<0&&f===n.contentWidth-n.containerWidth||t>0&&0===f))return!0;return!0}function v(t,r){i.scrollTop-=r;i.scrollLeft-=t;u(n)}function y(n){return n.targetTouches?n.targetTouches[0]:n}function p(n){return!(n.pointerType&&"pen"===n.pointerType&&0===n.buttons||(!n.targetTouches||1!==n.targetTouches.length)&&(!n.pointerType||"mouse"===n.pointerType||n.pointerType===n.MSPOINTER_TYPE_MOUSE))}function h(n){if(p(n)){var t=y(n);o.pageX=t.pageX;o.pageY=t.pageY;a=(new Date).getTime();null!==e&&clearInterval(e)}}function b(n,u,f){var e,o,s,h;if(!i.contains(n))return!1;for(e=n;e&&e!==i;){if(e.classList.contains(t.element.consuming)||(o=r(e),[o.overflow,o.overflowX,o.overflowY].join("").match(/(scroll|auto)/)&&((s=e.scrollHeight-e.clientHeight,s>0&&!(0===e.scrollTop&&f>0||e.scrollTop===s&&f<0))||(h=e.scrollLeft-e.clientWidth,h>0&&!(0===e.scrollLeft&&u<0||e.scrollLeft===h&&u>0)))))return!0;e=e.parentNode}return!1}function c(n){var e,r;if(p(n)){var s=y(n),u={pageX:s.pageX,pageY:s.pageY},t=u.pageX-o.pageX,i=u.pageY-o.pageY;if(b(n.target,t,i))return;v(t,i);o=u;e=(new Date).getTime();r=e-a;r>0&&(f.x=t/r,f.y=i/r,a=e);w(t,i)&&n.preventDefault()}}function l(){n.settings.swipeEasing&&(clearInterval(e),e=setInterval(function(){n.isInitialized?clearInterval(e):f.x||f.y?Math.abs(f.x)<.01&&Math.abs(f.y)<.01?clearInterval(e):(v(30*f.x,30*f.y),f.x*=.8,f.y*=.8):clearInterval(e)},10))}if(s.supportsTouch||s.supportsIePointer){var i=n.element,o={},a=0,f={},e=null;s.supportsTouch?(n.event.bind(i,"touchstart",h),n.event.bind(i,"touchmove",c),n.event.bind(i,"touchend",l)):s.supportsIePointer&&(window.PointerEvent?(n.event.bind(i,"pointerdown",h),n.event.bind(i,"pointermove",c),n.event.bind(i,"pointerup",l)):window.MSPointerEvent&&(n.event.bind(i,"MSPointerDown",h),n.event.bind(i,"MSPointerMove",c),n.event.bind(i,"MSPointerUp",l)))}}},c=function(f,o){var c=this,a,v,y,s,h;if(void 0===o&&(o={}),"string"==typeof f&&(f=document.querySelector(f)),!f||!f.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");this.element=f;f.classList.add(t.main);this.settings={handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!1,wheelSpeed:1};for(a in o)c.settings[a]=o[a];this.containerWidth=null;this.containerHeight=null;this.contentWidth=null;this.contentHeight=null;v=function(){return f.classList.add(t.state.focus)};y=function(){return f.classList.remove(t.state.focus)};this.isRtl="rtl"===r(f).direction;this.isNegativeScroll=function(){var t=f.scrollLeft,n=null;return f.scrollLeft=-1,n=f.scrollLeft<0,f.scrollLeft=t,n}();this.negativeScrollAdjustment=this.isNegativeScroll?f.scrollWidth-f.clientWidth:0;this.event=new e;this.ownerDocument=f.ownerDocument||document;this.scrollbarXRail=l(t.element.rail("x"));f.appendChild(this.scrollbarXRail);this.scrollbarX=l(t.element.thumb("x"));this.scrollbarXRail.appendChild(this.scrollbarX);this.scrollbarX.setAttribute("tabindex",0);this.event.bind(this.scrollbarX,"focus",v);this.event.bind(this.scrollbarX,"blur",y);this.scrollbarXActive=null;this.scrollbarXWidth=null;this.scrollbarXLeft=null;s=r(this.scrollbarXRail);this.scrollbarXBottom=parseInt(s.bottom,10);isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=n(s.top)):this.isScrollbarXUsingBottom=!0;this.railBorderXWidth=n(s.borderLeftWidth)+n(s.borderRightWidth);i(this.scrollbarXRail,{display:"block"});this.railXMarginWidth=n(s.marginLeft)+n(s.marginRight);i(this.scrollbarXRail,{display:""});this.railXWidth=null;this.railXRatio=null;this.scrollbarYRail=l(t.element.rail("y"));f.appendChild(this.scrollbarYRail);this.scrollbarY=l(t.element.thumb("y"));this.scrollbarYRail.appendChild(this.scrollbarY);this.scrollbarY.setAttribute("tabindex",0);this.event.bind(this.scrollbarY,"focus",v);this.event.bind(this.scrollbarY,"blur",y);this.scrollbarYActive=null;this.scrollbarYHeight=null;this.scrollbarYTop=null;h=r(this.scrollbarYRail);this.scrollbarYRight=parseInt(h.right,10);isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=n(h.left)):this.isScrollbarYUsingRight=!0;this.scrollbarYOuterWidth=this.isRtl?ut(this.scrollbarY):null;this.railBorderYWidth=n(h.borderTopWidth)+n(h.borderBottomWidth);i(this.scrollbarYRail,{display:"block"});this.railYMarginHeight=n(h.marginTop)+n(h.marginBottom);i(this.scrollbarYRail,{display:""});this.railYHeight=null;this.railYRatio=null;this.reach={x:f.scrollLeft<=0?"start":f.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:f.scrollTop<=0?"start":f.scrollTop>=this.contentHeight-this.containerHeight?"end":null};this.isAlive=!0;this.settings.handlers.forEach(function(n){return et[n](c)});this.lastScrollTop=f.scrollTop;this.lastScrollLeft=f.scrollLeft;this.event.bind(this.element,"scroll",function(n){return c.onScroll(n)});u(this)};return c.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,i(this.scrollbarXRail,{display:"block"}),i(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=n(r(this.scrollbarXRail).marginLeft)+n(r(this.scrollbarXRail).marginRight),this.railYMarginHeight=n(r(this.scrollbarYRail).marginTop)+n(r(this.scrollbarYRail).marginBottom),i(this.scrollbarXRail,{display:"none"}),i(this.scrollbarYRail,{display:"none"}),u(this),v(this,"top",0,!1,!0),v(this,"left",0,!1,!0),i(this.scrollbarXRail,{display:""}),i(this.scrollbarYRail,{display:""}))},c.prototype.onScroll=function(){this.isAlive&&(u(this),v(this,"top",this.element.scrollTop-this.lastScrollTop),v(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=this.element.scrollTop,this.lastScrollLeft=this.element.scrollLeft)},c.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),o(this.scrollbarX),o(this.scrollbarY),o(this.scrollbarXRail),o(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},c.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter(function(n){return!n.match(/^ps([-_].+|)$/)}).join(" ")},c});angular.module("perfect_scrollbar",[]).directive("perfectScrollbar",["$parse","$window",function(n,t){var i=["handlers","wheelSpeed","wheelPropagation","swipeEasing","minScrollbarLength","maxScrollbarLength","scrollingThreshold","useBothWheelAxes","suppressScrollX","suppressScrollY","scrollXMarginOffset","scrollYMarginOffset"];return{restrict:"E",transclude:!0,template:"<div><div ng-transclude><\/div><\/div>",replace:!0,link:function(r,u,f){function e(n){r.$evalAsync(function(){"true"==f.scrollDown&&"mouseenter"!=n&&setTimeout(function(){u[0].scrollTop=u.prop("scrollHeight")},100);o.update()})}for(var s,o,c=angular.element(t),l={},h=0,a=i.length;h<a;h++)s=i[h],void 0!==f[s]&&(l[s]=n(f[s])());r.$evalAsync(function(){o=new PerfectScrollbar(u[0],l);var t=n(f.onScroll);u.on("scroll",function(){var n=u.prop("scrollTop"),i=u.prop("scrollHeight")-u[0].clientHeight,f=u.prop("scrollLeft"),e=u.prop("scrollWidth")-u[0].clientWidth;r.$apply(function(){t(r,{scrollTop:n,scrollHeight:i,scrollLeft:f,scrollWidth:e})})})});r.$watch(function(){return u.prop("scrollHeight")},function(n){n&&e("contentSizeChange")});u.on("mouseenter",function(){e("mouseenter")});f.refreshOnChange&&r.$watchCollection(f.refreshOnChange,function(){e()});f.refreshOnResize&&c.on("resize",function(){e()});f.updateOn&&f.updateOn.split(" ").forEach(function(n){r.$on(n,e)});u.on("$destroy",function(){c.off("resize",function(){e()});o.destroy();o=null})}}}]);angular.module("gettext",[]);angular.module("gettext").constant("gettext",function(n){return n});angular.module("gettext").factory("gettextCatalog",["gettextPlurals","gettextFallbackLanguage","$http","$cacheFactory","$interpolate","$rootScope",function(n,t,i,r,u,f){function l(){f.$broadcast("gettextLanguageChanged")}var e,o="$$noContext",s='<span id="test" title="test" class="tested">test<\/span>',a=angular.element("<span>"+s+"<\/span>").html()!==s,h=function(n){return e.debug&&e.currentLanguage!==e.baseLanguage?e.debugPrefix+n:n},c=function(n){return e.showTranslatedMarkers?e.translatedMarkerPrefix+n+e.translatedMarkerSuffix:n};return e={debug:!1,debugPrefix:"[MISSING]: ",showTranslatedMarkers:!1,translatedMarkerPrefix:"[",translatedMarkerSuffix:"]",strings:{},baseLanguage:"en",currentLanguage:"en",cache:r("strings"),setCurrentLanguage:function(n){this.currentLanguage=n;l()},getCurrentLanguage:function(){return this.currentLanguage},setStrings:function(t,i){var h,r,u,s,f,e;this.strings[t]||(this.strings[t]={});h=n(t,1);for(r in i){u=i[r];(a&&(r=angular.element("<span>"+r+"<\/span>").html()),angular.isString(u)||angular.isArray(u))&&(s={},s[o]=u,u=s);for(f in this.strings[t][r]||(this.strings[t][r]={}),u)e=u[f],angular.isArray(e)?this.strings[t][r][f]=e:(this.strings[t][r][f]=[],this.strings[t][r][f][h]=e)}l()},getStringFormFor:function(t,i,r,u){return t?(((this.strings[t]||{})[i]||{})[u||o]||[])[n(t,r)]:null},getString:function(n,i,r){var f=t(this.currentLanguage);return n=this.getStringFormFor(this.currentLanguage,n,1,r)||this.getStringFormFor(f,n,1,r)||h(n),n=i?u(n)(i):n,c(n)},getPlural:function(n,i,r,f,e){var o=t(this.currentLanguage);return i=this.getStringFormFor(this.currentLanguage,i,n,e)||this.getStringFormFor(o,i,n,e)||h(1===n?i:r),f&&(f.$count=n,i=u(i)(f)),c(i)},loadRemote:function(n){return i({method:"GET",url:n,cache:e.cache}).then(function(n){var t=n.data;for(var i in t)e.setStrings(i,t[i]);return n})}}}]);angular.module("gettext").directive("translate",["gettextCatalog","$parse","$animate","$compile","$window","gettextUtil",function(n,t,i,r,u,f){function s(n,t,i){var o=Object.keys(t).filter(function(n){return f.startsWith(n,e)&&n!==e}),r,u;return o.length?(r=n.$new(),u=[],o.forEach(function(o){var s=n.$watch(t[o],function(n){var t,u=(t=o,f.lcFirst(t.replace(e,"")));r[u]=n;i(r)});u.push(s)}),n.$on("$destroy",function(){u.forEach(function(n){n()});r.$destroy()}),r):null}var o=parseInt((/msie (\d+)/i.exec(u.navigator.userAgent)||[])[1],10),e="translateParams";return{restrict:"AE",terminal:!0,compile:function(u,e){f.assert(!e.translatePlural||e.translateN,"translate-n","translate-plural");f.assert(!e.translateN||e.translatePlural,"translate-plural","translate-n");var h=f.trim(u.html()),c=e.translatePlural,l=e.translateContext;return o<=8&&"<!--IE fix-->"===h.slice(-13)&&(h=h.slice(0,-13)),{post:function(u,e,o){function a(t){var o,s,a,v;t=t||null;c?((u=y||(y=u.$new())).$count=w(u),o=n.getPlural(u.$count,h,c,null,l)):o=n.getString(h,null,l);s=e.contents();(s||o)&&(o!==f.trim(s.html())?(a=angular.element("<span>"+o+"<\/span>"),r(a.contents())(t||u),v=a.contents(),i.enter(v,e),i.leave(s)):p&&r(s)(u))}var w=t(o.translateN),y=null,p=!0,v=s(u,o,a);a(v);p=!1;o.translateN&&u.$watch(o.translateN,function(){a(v)});u.$on("gettextLanguageChanged",function(){a(v)})}}}}}]);angular.module("gettext").factory("gettextFallbackLanguage",function(){var n={},t=/([^_]+)_[^_]+$/;return function(i){if(n[i])return n[i];var r=t.exec(i);return r?(n[i]=r[1],r[1]):null}});angular.module("gettext").filter("translate",["gettextCatalog",function(n){function t(t,i){return n.getString(t,null,i)}return t.$stateful=!0,t}]);angular.module("gettext").factory("gettextPlurals",function(){var n={pt_BR:"pt_BR","pt-BR":"pt_BR"};return function(t,i){switch(function(t){return n[t]||(n[t]=t.split(/\-|_/).shift()),n[t]}(t)){case"ay":case"bo":case"cgg":case"dz":case"fa":case"id":case"ja":case"jbo":case"ka":case"kk":case"km":case"ko":case"ky":case"lo":case"ms":case"my":case"sah":case"su":case"th":case"tt":case"ug":case"vi":case"wo":case"zh":return 0;case"is":return i%10!=1||i%100==11?1:0;case"jv":return 0!=i?1:0;case"mk":return 1==i||i%10==1?0:1;case"ach":case"ak":case"am":case"arn":case"br":case"fil":case"fr":case"gun":case"ln":case"mfe":case"mg":case"mi":case"oc":case"pt_BR":case"tg":case"ti":case"tr":case"uz":case"wa":case"zh":return 1<i?1:0;case"lv":return i%10==1&&i%100!=11?0:0!=i?1:2;case"lt":return i%10==1&&i%100!=11?0:2<=i%10&&(i%100<10||20<=i%100)?1:2;case"be":case"bs":case"hr":case"ru":case"sr":case"uk":return i%10==1&&i%100!=11?0:2<=i%10&&i%10<=4&&(i%100<10||20<=i%100)?1:2;case"mnk":return 0==i?0:1==i?1:2;case"ro":return 1==i?0:0==i||0<i%100&&i%100<20?1:2;case"pl":return 1==i?0:2<=i%10&&i%10<=4&&(i%100<10||20<=i%100)?1:2;case"cs":case"sk":return 1==i?0:2<=i&&i<=4?1:2;case"sl":return i%100==1?1:i%100==2?2:i%100==3||i%100==4?3:0;case"mt":return 1==i?0:0==i||1<i%100&&i%100<11?1:10<i%100&&i%100<20?2:3;case"gd":return 1==i||11==i?0:2==i||12==i?1:2<i&&i<20?2:3;case"cy":return 1==i?0:2==i?1:8!=i&&11!=i?2:3;case"kw":return 1==i?0:2==i?1:3==i?2:3;case"ga":return 1==i?0:2==i?1:i<7?2:i<11?3:4;case"ar":return 0==i?0:1==i?1:2==i?2:3<=i%100&&i%100<=10?3:11<=i%100?4:5;default:return 1!=i?1:0}}});angular.module("gettext").factory("gettextUtil",function(){return{trim:String.prototype.trim?function(n){return"string"==typeof n?n.trim():n}:function(n){return"string"==typeof n?n.replace(/^\s*/,"").replace(/\s*$/,""):n},assert:function(n,t,i){if(!n)throw new Error("You should add a "+t+" attribute whenever you add a "+i+" attribute.");},startsWith:function(n,t){return 0===n.indexOf(t)},lcFirst:function(n){return n.charAt(0).toLowerCase()+n.substr(1)}}});!function(n){function t(r){if(i[r])return i[r].exports;var u=i[r]={exports:{},id:r,loaded:!1};return n[r].call(u.exports,u,u.exports,t),u.loaded=!0,u.exports}var i={};return t.m=n,t.c=i,t.p="",t(0)}([function(){"use strict";!function(){var n=angular.module("angularModalService",[]);n.factory("ModalService",["$animate","$document","$compile","$controller","$http","$rootScope","$q","$templateRequest","$timeout",function(n,t,i,r,u,f,e,o,s){function h(){var h=this,c=function(n,t){var i=e.defer();return n?i.resolve(n):t?o(t,!0).then(function(n){i.resolve(n)},function(n){i.reject(n)}):i.reject("No template or templateUrl has been specified."),i.promise},u=function(t,i){var r=t.children();return r.length>0?n.enter(i,t,r[r.length-1]):n.enter(i,t)};h.showModal=function(o){var l=angular.element(t[0].body),h=e.defer(),a=o.controller;return a?(c(o.template,o.templateUrl).then(function(t){function k(t){y.resolve(t);n.leave(c).then(function(){g.resolve(t);a.$destroy();v.close=null;h=null;y=null;b=null;v=null;c=null;a=null});d&&d()}var a=(o.scope||f).$new(),d=f.$on("$locationChangeSuccess",k),y=e.defer(),g=e.defer(),v={$scope:a,close:function(n,t){void 0!==t&&null!==t||(t=0);s(function(){k(n)},t)}},nt,c,p,w,b;o.inputs&&angular.extend(v,o.inputs);nt=i(t);c=nt(a);v.$element=c;p=a[o.controllerAs];w=r(o.controller,v,!1,o.controllerAs);o.controllerAs&&p&&angular.extend(w,p);o.appendElement?u(o.appendElement,c):u(l,c);b={controller:w,scope:a,element:c,close:y.promise,closed:g.promise};h.resolve(b)}).then(null,function(n){h.reject(n)}),h.promise):(h.reject("No controller has been specified."),h.promise)}}return new h}])}()}]);angular.module("youtube-embed",[]).service("youtubeEmbedUtils",["$window","$rootScope",function(n,t){function r(n,t){return n.indexOf(t)>-1}function u(){t.$apply(function(){i.ready=!0})}var i={},f=/https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube(?:-nocookie)?\.com\S*[^\w\s-])([\w-]{11})(?=[^\w-]|$)(?![?=&+%\w.-]*(?:['"][^<>]*>|<\/a>))[?=&+%\w.-]*/gi,e=/t=(\d+)[ms]?(\d+)?s?/;return i.getIdFromURL=function(n){var t=n.replace(f,"$1"),i,u;return r(t,";")?(i=t.split(";"),r(i[1],"%")?(u=decodeURIComponent(i[1]),t=("http://youtube.com"+u).replace(f,"$1")):t=i[0]):r(t,"#")&&(t=t.split("#")[0]),t},i.getTimeFromURL=function(n){var u;if(n=n||"",u=n.match(e),!u)return 0;var f=u[0],t=u[1],i=u[2];return"undefined"!=typeof i?(i=parseInt(i,10),t=parseInt(t,10)):r(f,"m")?(t=parseInt(t,10),i=0):(i=parseInt(t,10),t=0),i+60*t},i.ready=!1,"undefined"==typeof YT?(n.onYouTubeIframeAPIReady=u,console.log("Unable to find YouTube iframe library on this page.")):YT.loaded?i.ready=!0:YT.ready(u),i}]).directive("youtubeVideo",["$window","youtubeEmbedUtils",function(n,t){var r=1,u={"-1":"unstarted",0:"ended",1:"playing",2:"paused",3:"buffering",5:"queued"},i="youtube.player.";return n.YTConfig={host:"https://www.youtube.com"},{restrict:"EA",scope:{videoId:"=?",videoUrl:"=?",player:"=?",playerVars:"=?",playerHeight:"=?",playerWidth:"=?"},link:function(n,f,e){function s(){var t=Array.prototype.slice.call(arguments);n.$apply(function(){n.$emit.apply(n,t)})}function l(t){var r=u[t.data];"undefined"!=typeof r&&s(i+r,n.player,t);n.$apply(function(){n.player.currentState=r})}function a(t){s(i+"ready",n.player,t)}function v(t){s(i+"error",n.player,t)}function y(){var t=angular.copy(n.playerVars),i;return t.start=t.start||n.urlStartTime,i=new YT.Player(o,{height:n.playerHeight,width:n.playerWidth,videoId:n.videoId,playerVars:t,events:{onReady:a,onStateChange:l,onError:v}}),i.id=o,i}function h(){(n.videoId||n.playerVars.list)&&(n.player&&"function"==typeof n.player.destroy&&n.player.destroy(),n.player=y())}var o,c;n.utils=t;o=e.playerId||f[0].id||"unique-youtube-embed-id-"+r++;f[0].id=o;n.playerHeight=n.playerHeight||390;n.playerWidth=n.playerWidth||640;n.playerVars=n.playerVars||{};c=n.$watch(function(){return n.utils.ready&&("undefined"!=typeof n.videoUrl||"undefined"!=typeof n.videoId||"undefined"!=typeof n.playerVars.list)},function(t){t&&(c(),"undefined"!=typeof n.videoUrl?n.$watch("videoUrl",function(t){n.videoId=n.utils.getIdFromURL(t);n.urlStartTime=n.utils.getTimeFromURL(t);h()}):"undefined"!=typeof n.videoId?n.$watch("videoId",function(){n.urlStartTime=null;h()}):n.$watch("playerVars.list",function(){n.urlStartTime=null;h()}))});n.$watchCollection(["playerHeight","playerWidth"],function(){n.player&&n.player.setSize(n.playerWidth,n.playerHeight)});n.$on("$destroy",function(){n.player&&n.player.destroy()})}}}]),function(){function nt(t){function r(n,i,r,u,f,e){for(;f>=0&&e>f;f+=t){var o=u?u[f]:f;r=i(r,n[o],o,n)}return r}return function(u,f,o,s){f=e(f,s,4);var h=!i(u)&&n.keys(u),l=(h||u).length,c=t>0?0:l-1;return arguments.length<3&&(o=u[h?h[c]:c],c+=t),r(u,f,o,h,c,l)}}function tt(n){return function(i,r,f){r=t(r,f);for(var o=u(i),e=n>0?0:o-1;e>=0&&o>e;e+=n)if(r(i[e],e,i))return e;return-1}}function it(t,i,f){return function(e,o,s){var c=0,h=u(e);if("number"==typeof s)t>0?c=s>=0?s:Math.max(s+h,c):h=s>=0?Math.min(s+1,h):s+h+1;else if(f&&s&&h)return s=f(e,o),e[s]===o?s:-1;if(o!==o)return s=i(r.call(e,c,h),n.isNaN),s>=0?s+c:-1;for(s=t>0?c:h-1;s>=0&&h>s;s+=t)if(e[s]===o)return s;return-1}}function rt(t,i){var u=d.length,f=t.constructor,e=n.isFunction(f)&&f.prototype||v,r="constructor";for(n.has(t,r)&&!n.contains(i,r)&&i.push(r);u--;)r=d[u],r in t&&t[r]!==e[r]&&!n.contains(i,r)&&i.push(r)}var a=this,lt=a._,s=Array.prototype,v=Object.prototype,at=Function.prototype,vt=s.push,r=s.slice,o=v.toString,yt=v.hasOwnProperty,pt=Array.isArray,ut=Object.keys,y=at.bind,ft=Object.create,p=function(){},n=function(t){return t instanceof n?t:this instanceof n?void(this._wrapped=t):new n(t)},e,t,h,f,b,k,d,c,ct,l;"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=n),exports._=n):a._=n;n.VERSION="1.8.3";e=function(n,t,i){if(t===void 0)return n;switch(null==i?3:i){case 1:return function(i){return n.call(t,i)};case 2:return function(i,r){return n.call(t,i,r)};case 3:return function(i,r,u){return n.call(t,i,r,u)};case 4:return function(i,r,u,f){return n.call(t,i,r,u,f)}}return function(){return n.apply(t,arguments)}};t=function(t,i,r){return null==t?n.identity:n.isFunction(t)?e(t,i,r):n.isObject(t)?n.matcher(t):n.property(t)};n.iteratee=function(n,i){return t(n,i,1/0)};var w=function(n,t){return function(i){var e=arguments.length,r,u;if(2>e||null==i)return i;for(r=1;e>r;r++)for(var o=arguments[r],s=n(o),h=s.length,f=0;h>f;f++)u=s[f],t&&i[u]!==void 0||(i[u]=o[u]);return i}},et=function(t){if(!n.isObject(t))return{};if(ft)return ft(t);p.prototype=t;var i=new p;return p.prototype=null,i},ot=function(n){return function(t){if(null!=t)return t[n]}},wt=Math.pow(2,53)-1,u=ot("length"),i=function(n){var t=u(n);return"number"==typeof t&&t>=0&&wt>=t};n.each=n.forEach=function(t,r,u){var f,o,s;if(r=e(r,u),i(t))for(f=0,o=t.length;o>f;f++)r(t[f],f,t);else for(s=n.keys(t),f=0,o=s.length;o>f;f++)r(t[s[f]],s[f],t);return t};n.map=n.collect=function(r,u,f){var s;u=t(u,f);for(var o=!i(r)&&n.keys(r),h=(o||r).length,c=Array(h),e=0;h>e;e++)s=o?o[e]:e,c[e]=u(r[s],s,r);return c};n.reduce=n.foldl=n.inject=nt(1);n.reduceRight=n.foldr=nt(-1);n.find=n.detect=function(t,r,u){var f;return f=i(t)?n.findIndex(t,r,u):n.findKey(t,r,u),f!==void 0&&f!==-1?t[f]:void 0};n.filter=n.select=function(i,r,u){var f=[];return r=t(r,u),n.each(i,function(n,t,i){r(n,t,i)&&f.push(n)}),f};n.reject=function(i,r,u){return n.filter(i,n.negate(t(r)),u)};n.every=n.all=function(r,u,f){var s;u=t(u,f);for(var o=!i(r)&&n.keys(r),h=(o||r).length,e=0;h>e;e++)if(s=o?o[e]:e,!u(r[s],s,r))return!1;return!0};n.some=n.any=function(r,u,f){var s;u=t(u,f);for(var o=!i(r)&&n.keys(r),h=(o||r).length,e=0;h>e;e++)if(s=o?o[e]:e,u(r[s],s,r))return!0;return!1};n.contains=n.includes=n.include=function(t,r,u,f){return i(t)||(t=n.values(t)),("number"!=typeof u||f)&&(u=0),n.indexOf(t,r,u)>=0};n.invoke=function(t,i){var u=r.call(arguments,2),f=n.isFunction(i);return n.map(t,function(n){var t=f?i:n[i];return null==t?t:t.apply(n,u)})};n.pluck=function(t,i){return n.map(t,n.property(i))};n.where=function(t,i){return n.filter(t,n.matcher(i))};n.findWhere=function(t,i){return n.find(t,n.matcher(i))};n.max=function(r,u,f){var h,o,e=-1/0,c=-1/0,s,l;if(null==u&&null!=r)for(r=i(r)?r:n.values(r),s=0,l=r.length;l>s;s++)h=r[s],h>e&&(e=h);else u=t(u,f),n.each(r,function(n,t,i){o=u(n,t,i);(o>c||o===-1/0&&e===-1/0)&&(e=n,c=o)});return e};n.min=function(r,u,f){var h,o,e=1/0,c=1/0,s,l;if(null==u&&null!=r)for(r=i(r)?r:n.values(r),s=0,l=r.length;l>s;s++)h=r[s],e>h&&(e=h);else u=t(u,f),n.each(r,function(n,t,i){o=u(n,t,i);(c>o||1/0===o&&1/0===e)&&(e=n,c=o)});return e};n.shuffle=function(t){for(var u,e=i(t)?t:n.values(t),o=e.length,f=Array(o),r=0;o>r;r++)u=n.random(0,r),u!==r&&(f[r]=f[u]),f[u]=e[r];return f};n.sample=function(t,r,u){return null==r||u?(i(t)||(t=n.values(t)),t[n.random(t.length-1)]):n.shuffle(t).slice(0,Math.max(0,r))};n.sortBy=function(i,r,u){return r=t(r,u),n.pluck(n.map(i,function(n,t,i){return{value:n,index:t,criteria:r(n,t,i)}}).sort(function(n,t){var i=n.criteria,r=t.criteria;if(i!==r){if(i>r||i===void 0)return 1;if(r>i||r===void 0)return-1}return n.index-t.index}),"value")};h=function(i){return function(r,u,f){var e={};return u=t(u,f),n.each(r,function(n,t){var f=u(n,t,r);i(e,n,f)}),e}};n.groupBy=h(function(t,i,r){n.has(t,r)?t[r].push(i):t[r]=[i]});n.indexBy=h(function(n,t,i){n[i]=t});n.countBy=h(function(t,i,r){n.has(t,r)?t[r]++:t[r]=1});n.toArray=function(t){return t?n.isArray(t)?r.call(t):i(t)?n.map(t,n.identity):n.values(t):[]};n.size=function(t){return null==t?0:i(t)?t.length:n.keys(t).length};n.partition=function(i,r,u){r=t(r,u);var f=[],e=[];return n.each(i,function(n,t,i){(r(n,t,i)?f:e).push(n)}),[f,e]};n.first=n.head=n.take=function(t,i,r){if(null!=t)return null==i||r?t[0]:n.initial(t,t.length-i)};n.initial=function(n,t,i){return r.call(n,0,Math.max(0,n.length-(null==t||i?1:t)))};n.last=function(t,i,r){if(null!=t)return null==i||r?t[t.length-1]:n.rest(t,Math.max(0,t.length-i))};n.rest=n.tail=n.drop=function(n,t,i){return r.call(n,null==t||i?1:t)};n.compact=function(t){return n.filter(t,n.identity)};f=function(t,r,e,o){for(var s,l,a,h=[],v=0,c=o||0,y=u(t);y>c;c++)if(s=t[c],i(s)&&(n.isArray(s)||n.isArguments(s)))for(r||(s=f(s,r,e)),l=0,a=s.length,h.length+=a;a>l;)h[v++]=s[l++];else e||(h[v++]=s);return h};n.flatten=function(n,t){return f(n,t,!1)};n.without=function(t){return n.difference(t,r.call(arguments,1))};n.uniq=n.unique=function(i,r,f,e){var o,c;n.isBoolean(r)||(e=f,f=r,r=!1);null!=f&&(f=t(f,e));for(var s=[],l=[],h=0,a=u(i);a>h;h++)o=i[h],c=f?f(o,h,i):o,r?(h&&l===c||s.push(o),l=c):f?n.contains(l,c)||(l.push(c),s.push(o)):n.contains(s,o)||s.push(o);return s};n.union=function(){return n.uniq(f(arguments,!0,!0))};n.intersection=function(t){for(var r,i,f=[],o=arguments.length,e=0,s=u(t);s>e;e++)if(r=t[e],!n.contains(f,r)){for(i=1;o>i&&n.contains(arguments[i],r);i++);i===o&&f.push(r)}return f};n.difference=function(t){var i=f(arguments,!0,!0,1);return n.filter(t,function(t){return!n.contains(i,t)})};n.zip=function(){return n.unzip(arguments)};n.unzip=function(t){for(var r=t&&n.max(t,u).length||0,f=Array(r),i=0;r>i;i++)f[i]=n.pluck(t,i);return f};n.object=function(n,t){for(var r={},i=0,f=u(n);f>i;i++)t?r[n[i]]=t[i]:r[n[i][0]]=n[i][1];return r};n.findIndex=tt(1);n.findLastIndex=tt(-1);n.sortedIndex=function(n,i,r,f){var o;r=t(r,f,1);for(var h=r(i),e=0,s=u(n);s>e;)o=Math.floor((e+s)/2),r(n[o])<h?e=o+1:s=o;return e};n.indexOf=it(1,n.findIndex,n.sortedIndex);n.lastIndexOf=it(-1,n.findLastIndex);n.range=function(n,t,i){null==t&&(t=n||0,n=0);i=i||1;for(var u=Math.max(Math.ceil((t-n)/i),0),f=Array(u),r=0;u>r;r++,n+=i)f[r]=n;return f};b=function(t,i,r,u,f){if(!(u instanceof i))return t.apply(r,f);var e=et(t.prototype),o=t.apply(e,f);return n.isObject(o)?o:e};n.bind=function(t,i){if(y&&t.bind===y)return y.apply(t,r.call(arguments,1));if(!n.isFunction(t))throw new TypeError("Bind must be called on a function");var f=r.call(arguments,2),u=function(){return b(t,u,i,this,f.concat(r.call(arguments)))};return u};n.partial=function(t){var i=r.call(arguments,1),u=function(){for(var f=0,o=i.length,e=Array(o),r=0;o>r;r++)e[r]=i[r]===n?arguments[f++]:i[r];for(;f<arguments.length;)e.push(arguments[f++]);return b(t,u,this,this,e)};return u};n.bindAll=function(t){var i,r,u=arguments.length;if(1>=u)throw new Error("bindAll must be passed function names");for(i=1;u>i;i++)r=arguments[i],t[r]=n.bind(t[r],t);return t};n.memoize=function(t,i){var r=function(u){var f=r.cache,e=""+(i?i.apply(this,arguments):u);return n.has(f,e)||(f[e]=t.apply(this,arguments)),f[e]};return r.cache={},r};n.delay=function(n,t){var i=r.call(arguments,2);return setTimeout(function(){return n.apply(null,i)},t)};n.defer=n.partial(n.delay,n,1);n.throttle=function(t,i,r){var f,e,s,u=null,o=0,h;return r||(r={}),h=function(){o=r.leading===!1?0:n.now();u=null;s=t.apply(f,e);u||(f=e=null)},function(){var l=n.now(),c;return o||r.leading!==!1||(o=l),c=i-(l-o),f=this,e=arguments,0>=c||c>i?(u&&(clearTimeout(u),u=null),o=l,s=t.apply(f,e),u||(f=e=null)):u||r.trailing===!1||(u=setTimeout(h,c)),s}};n.debounce=function(t,i,r){var u,f,e,s,o,h=function(){var c=n.now()-s;i>c&&c>=0?u=setTimeout(h,i-c):(u=null,r||(o=t.apply(e,f),u||(e=f=null)))};return function(){e=this;f=arguments;s=n.now();var c=r&&!u;return u||(u=setTimeout(h,i)),c&&(o=t.apply(e,f),e=f=null),o}};n.wrap=function(t,i){return n.partial(i,t)};n.negate=function(n){return function(){return!n.apply(this,arguments)}};n.compose=function(){var n=arguments,t=n.length-1;return function(){for(var r=t,i=n[t].apply(this,arguments);r--;)i=n[r].call(this,i);return i}};n.after=function(n,t){return function(){if(--n<1)return t.apply(this,arguments)}};n.before=function(n,t){var i;return function(){return--n>0&&(i=t.apply(this,arguments)),1>=n&&(t=null),i}};n.once=n.partial(n.before,2);k=!{toString:null}.propertyIsEnumerable("toString");d=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];n.keys=function(t){var i,r;if(!n.isObject(t))return[];if(ut)return ut(t);i=[];for(r in t)n.has(t,r)&&i.push(r);return k&&rt(t,i),i};n.allKeys=function(t){var i,r;if(!n.isObject(t))return[];i=[];for(r in t)i.push(r);return k&&rt(t,i),i};n.values=function(t){for(var r=n.keys(t),u=r.length,f=Array(u),i=0;u>i;i++)f[i]=t[r[i]];return f};n.mapObject=function(i,r,u){r=t(r,u);for(var f,o=n.keys(i),h=o.length,s={},e=0;h>e;e++)f=o[e],s[f]=r(i[f],f,i);return s};n.pairs=function(t){for(var r=n.keys(t),u=r.length,f=Array(u),i=0;u>i;i++)f[i]=[r[i],t[r[i]]];return f};n.invert=function(t){for(var u={},r=n.keys(t),i=0,f=r.length;f>i;i++)u[t[r[i]]]=r[i];return u};n.functions=n.methods=function(t){var i=[];for(var r in t)n.isFunction(t[r])&&i.push(r);return i.sort()};n.extend=w(n.allKeys);n.extendOwn=n.assign=w(n.keys);n.findKey=function(i,r,u){r=t(r,u);for(var f,o=n.keys(i),e=0,s=o.length;s>e;e++)if(f=o[e],r(i[f],f,i))return f};n.pick=function(t,i,r){var c,o,l={},u=t,s,v,h,a;if(null==u)return l;for(n.isFunction(i)?(o=n.allKeys(u),c=e(i,r)):(o=f(arguments,!1,!1,1),c=function(n,t,i){return t in i},u=Object(u)),s=0,v=o.length;v>s;s++)h=o[s],a=u[h],c(a,h,u)&&(l[h]=a);return l};n.omit=function(t,i,r){if(n.isFunction(i))i=n.negate(i);else{var u=n.map(f(arguments,!1,!1,1),String);i=function(t,i){return!n.contains(u,i)}}return n.pick(t,i,r)};n.defaults=w(n.allKeys,!0);n.create=function(t,i){var r=et(t);return i&&n.extendOwn(r,i),r};n.clone=function(t){return n.isObject(t)?n.isArray(t)?t.slice():n.extend({},t):t};n.tap=function(n,t){return t(n),n};n.isMatch=function(t,i){var e=n.keys(i),o=e.length,f,r,u;if(null==t)return!o;for(f=Object(t),r=0;o>r;r++)if(u=e[r],i[u]!==f[u]||!(u in f))return!1;return!0};c=function(t,i,r,u){var h,a,e,s,f,l,v;if(t===i)return 0!==t||1/t==1/i;if(null==t||null==i)return t===i;if(t instanceof n&&(t=t._wrapped),i instanceof n&&(i=i._wrapped),h=o.call(t),h!==o.call(i))return!1;switch(h){case"[object RegExp]":case"[object String]":return""+t==""+i;case"[object Number]":return+t!=+t?+i!=+i:0==+t?1/+t==1/i:+t==+i;case"[object Date]":case"[object Boolean]":return+t==+i}if(a="[object Array]"===h,!a&&("object"!=typeof t||"object"!=typeof i||(e=t.constructor,s=i.constructor,e!==s&&!(n.isFunction(e)&&e instanceof e&&n.isFunction(s)&&s instanceof s)&&"constructor"in t&&"constructor"in i)))return!1;for(r=r||[],u=u||[],f=r.length;f--;)if(r[f]===t)return u[f]===i;if(r.push(t),u.push(i),a){if(f=t.length,f!==i.length)return!1;for(;f--;)if(!c(t[f],i[f],r,u))return!1}else{if(v=n.keys(t),f=v.length,n.keys(i).length!==f)return!1;for(;f--;)if(l=v[f],!n.has(i,l)||!c(t[l],i[l],r,u))return!1}return r.pop(),u.pop(),!0};n.isEqual=function(n,t){return c(n,t)};n.isEmpty=function(t){return null==t?!0:i(t)&&(n.isArray(t)||n.isString(t)||n.isArguments(t))?0===t.length:0===n.keys(t).length};n.isElement=function(n){return!(!n||1!==n.nodeType)};n.isArray=pt||function(n){return"[object Array]"===o.call(n)};n.isObject=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n};n.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(t){n["is"+t]=function(n){return o.call(n)==="[object "+t+"]"}});n.isArguments(arguments)||(n.isArguments=function(t){return n.has(t,"callee")});"function"!=typeof/./&&"object"!=typeof Int8Array&&(n.isFunction=function(n){return"function"==typeof n||!1});n.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))};n.isNaN=function(t){return n.isNumber(t)&&t!==+t};n.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"===o.call(n)};n.isNull=function(n){return null===n};n.isUndefined=function(n){return n===void 0};n.has=function(n,t){return null!=n&&yt.call(n,t)};n.noConflict=function(){return a._=lt,this};n.identity=function(n){return n};n.constant=function(n){return function(){return n}};n.noop=function(){};n.property=ot;n.propertyOf=function(n){return null==n?function(){}:function(t){return n[t]}};n.matcher=n.matches=function(t){return t=n.extendOwn({},t),function(i){return n.isMatch(i,t)}};n.times=function(n,t,i){var u=Array(Math.max(0,n)),r;for(t=e(t,i,1),r=0;n>r;r++)u[r]=t(r);return u};n.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))};n.now=Date.now||function(){return(new Date).getTime()};var st={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},bt=n.invert(st),ht=function(t){var r=function(n){return t[n]},i="(?:"+n.keys(t).join("|")+")",u=RegExp(i),f=RegExp(i,"g");return function(n){return n=null==n?"":""+n,u.test(n)?n.replace(f,r):n}};n.escape=ht(st);n.unescape=ht(bt);n.result=function(t,i,r){var u=null==t?void 0:t[i];return u===void 0&&(u=r),n.isFunction(u)?u.call(t):u};ct=0;n.uniqueId=function(n){var t=++ct+"";return n?n+t:t};n.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var g=/(.)^/,kt={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},dt=/\\|'|\r|\n|\u2028|\u2029/g,gt=function(n){return"\\"+kt[n]};n.template=function(t,i,r){var o,f,h;!i&&r&&(i=r);i=n.defaults({},i,n.templateSettings);var c=RegExp([(i.escape||g).source,(i.interpolate||g).source,(i.evaluate||g).source].join("|")+"|$","g"),e=0,u="__p+='";t.replace(c,function(n,i,r,f,o){return u+=t.slice(e,o).replace(dt,gt),e=o+n.length,i?u+="'+\n((__t=("+i+"))==null?'':_.escape(__t))+\n'":r?u+="'+\n((__t=("+r+"))==null?'':__t)+\n'":f&&(u+="';\n"+f+"\n__p+='"),n});u+="';\n";i.variable||(u="with(obj||{}){\n"+u+"}\n");u="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+u+"return __p;\n";try{o=new Function(i.variable||"obj","_",u)}catch(s){throw s.source=u,s;}return f=function(t){return o.call(this,t,n)},h=i.variable||"obj",f.source="function("+h+"){\n"+u+"}",f};n.chain=function(t){var i=n(t);return i._chain=!0,i};l=function(t,i){return t._chain?n(i).chain():i};n.mixin=function(t){n.each(n.functions(t),function(i){var r=n[i]=t[i];n.prototype[i]=function(){var t=[this._wrapped];return vt.apply(t,arguments),l(this,r.apply(n,t))}})};n.mixin(n);n.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var i=s[t];n.prototype[t]=function(){var n=this._wrapped;return i.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],l(this,n)}});n.each(["concat","join","slice"],function(t){var i=s[t];n.prototype[t]=function(){return l(this,i.apply(this._wrapped,arguments))}});n.prototype.value=function(){return this._wrapped};n.prototype.valueOf=n.prototype.toJSON=n.prototype.value;n.prototype.toString=function(){return""+this._wrapped};"function"==typeof define&&define.amd&&define("underscore",[],function(){return n})}.call(this);!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):n.QRious=t()}(this,function(){"use strict";function w(n,t){var i;return"function"==typeof Object.create?i=Object.create(n):(h.prototype=n,i=new h,h.prototype=null),t&&l(!0,i,t),i}function b(n,t,i,r){var u=this;return"string"!=typeof n&&(r=i,i=t,t=n,n=null),"function"!=typeof t&&(r=i,i=t,t=function(){return u.apply(this,arguments)}),l(!1,t,u,r),t.prototype=w(u.prototype,i),t.prototype.constructor=t,t.class_=n||u.class_,t.super_=u,t}function l(n,t,i){for(var r,u,f=0,e=(i=d.call(arguments,2)).length;f<e;f++){u=i[f];for(r in u)n&&!k.call(u,r)||(t[r]=u[r])}}function o(){}var h=function(){},k=Object.prototype.hasOwnProperty,d=Array.prototype.slice,g=b,c,p;o.class_="Nevis";o.super_=Object;o.extend=g;var t=o,a=t.extend(function(n,t,i){this.qrious=n;this.element=t;this.element.qrious=n;this.enabled=Boolean(i)},{draw:function(){},getElement:function(){return this.enabled||(this.enabled=!0,this.render()),this.element},getModuleSize:function(n){var t=this.qrious,i=t.padding||0,r=Math.floor((t.size-2*i)/n.width);return Math.max(1,r)},getOffset:function(n){var t=this.qrious,i=t.padding,r,u;return null!=i?i:(r=this.getModuleSize(n),u=Math.floor((t.size-r*n.width)/2),Math.max(0,u))},render:function(n){this.enabled&&(this.resize(),this.reset(),this.draw(n))},reset:function(){},resize:function(){}}),nt=a.extend({draw:function(n){var t,i,f=this.qrious,r=this.getModuleSize(n),e=this.getOffset(n),u=this.element.getContext("2d");for(u.fillStyle=f.foreground,u.globalAlpha=f.foregroundAlpha,t=0;t<n.width;t++)for(i=0;i<n.width;i++)n.buffer[i*n.width+t]&&u.fillRect(r*t+e,r*i+e,r,r)},reset:function(){var i=this.qrious,n=this.element.getContext("2d"),t=i.size;n.lineWidth=1;n.clearRect(0,0,t,t);n.fillStyle=i.background;n.globalAlpha=i.backgroundAlpha;n.fillRect(0,0,t,t)},resize:function(){var n=this.element;n.width=n.height=this.qrious.size}}),tt=t.extend(null,{BLOCK:[0,11,15,19,23,27,31,16,18,20,22,24,26,28,20,22,24,24,26,28,28,22,24,24,26,26,28,28,24,24,26,26,26,28,28,24,26,26,26,28,28]}),e=t.extend(null,{BLOCKS:[1,0,19,7,1,0,16,10,1,0,13,13,1,0,9,17,1,0,34,10,1,0,28,16,1,0,22,22,1,0,16,28,1,0,55,15,1,0,44,26,2,0,17,18,2,0,13,22,1,0,80,20,2,0,32,18,2,0,24,26,4,0,9,16,1,0,108,26,2,0,43,24,2,2,15,18,2,2,11,22,2,0,68,18,4,0,27,16,4,0,19,24,4,0,15,28,2,0,78,20,4,0,31,18,2,4,14,18,4,1,13,26,2,0,97,24,2,2,38,22,4,2,18,22,4,2,14,26,2,0,116,30,3,2,36,22,4,4,16,20,4,4,12,24,2,2,68,18,4,1,43,26,6,2,19,24,6,2,15,28,4,0,81,20,1,4,50,30,4,4,22,28,3,8,12,24,2,2,92,24,6,2,36,22,4,6,20,26,7,4,14,28,4,0,107,26,8,1,37,22,8,4,20,24,12,4,11,22,3,1,115,30,4,5,40,24,11,5,16,20,11,5,12,24,5,1,87,22,5,5,41,24,5,7,24,30,11,7,12,24,5,1,98,24,7,3,45,28,15,2,19,24,3,13,15,30,1,5,107,28,10,1,46,28,1,15,22,28,2,17,14,28,5,1,120,30,9,4,43,26,17,1,22,28,2,19,14,28,3,4,113,28,3,11,44,26,17,4,21,26,9,16,13,26,3,5,107,28,3,13,41,26,15,5,24,30,15,10,15,28,4,4,116,28,17,0,42,26,17,6,22,28,19,6,16,30,2,7,111,28,17,0,46,28,7,16,24,30,34,0,13,24,4,5,121,30,4,14,47,28,11,14,24,30,16,14,15,30,6,4,117,30,6,14,45,28,11,16,24,30,30,2,16,30,8,4,106,26,8,13,47,28,7,22,24,30,22,13,15,30,10,2,114,28,19,4,46,28,28,6,22,28,33,4,16,30,8,4,122,30,22,3,45,28,8,26,23,30,12,28,15,30,3,10,117,30,3,23,45,28,4,31,24,30,11,31,15,30,7,7,116,30,21,7,45,28,1,37,23,30,19,26,15,30,5,10,115,30,19,10,47,28,15,25,24,30,23,25,15,30,13,3,115,30,2,29,46,28,42,1,24,30,23,28,15,30,17,0,115,30,10,23,46,28,10,35,24,30,19,35,15,30,17,1,115,30,14,21,46,28,29,19,24,30,11,46,15,30,13,6,115,30,14,23,46,28,44,7,24,30,59,1,16,30,12,7,121,30,12,26,47,28,39,14,24,30,22,41,15,30,6,14,121,30,6,34,47,28,46,10,24,30,2,64,15,30,17,4,122,30,29,14,46,28,49,10,24,30,24,46,15,30,4,18,122,30,13,32,46,28,48,14,24,30,42,32,15,30,20,4,117,30,40,7,47,28,43,22,24,30,10,67,15,30,19,6,118,30,18,31,47,28,34,34,24,30,20,61,15,30],FINAL_FORMAT:[30660,29427,32170,30877,26159,25368,27713,26998,21522,20773,24188,23371,17913,16590,20375,19104,13663,12392,16177,14854,9396,8579,11994,11245,5769,5054,7399,6608,1890,597,3340,2107],LEVELS:{L:1,M:2,Q:3,H:4}}),u=t.extend(null,{EXPONENT:[1,2,4,8,16,32,64,128,29,58,116,232,205,135,19,38,76,152,45,90,180,117,234,201,143,3,6,12,24,48,96,192,157,39,78,156,37,74,148,53,106,212,181,119,238,193,159,35,70,140,5,10,20,40,80,160,93,186,105,210,185,111,222,161,95,190,97,194,153,47,94,188,101,202,137,15,30,60,120,240,253,231,211,187,107,214,177,127,254,225,223,163,91,182,113,226,217,175,67,134,17,34,68,136,13,26,52,104,208,189,103,206,129,31,62,124,248,237,199,147,59,118,236,197,151,51,102,204,133,23,46,92,184,109,218,169,79,158,33,66,132,21,42,84,168,77,154,41,82,164,85,170,73,146,57,114,228,213,183,115,230,209,191,99,198,145,63,126,252,229,215,179,123,246,241,255,227,219,171,75,150,49,98,196,149,55,110,220,165,87,174,65,130,25,50,100,200,141,7,14,28,56,112,224,221,167,83,166,81,162,89,178,121,242,249,239,195,155,43,86,172,69,138,9,18,36,72,144,61,122,244,245,247,243,251,235,203,139,11,22,44,88,176,125,250,233,207,131,27,54,108,216,173,71,142,0],LOG:[255,0,1,25,2,50,26,198,3,223,51,238,27,104,199,75,4,100,224,14,52,141,239,129,28,193,105,248,200,8,76,113,5,138,101,47,225,36,15,33,53,147,142,218,240,18,130,69,29,181,194,125,106,39,249,185,201,154,9,120,77,228,114,166,6,191,139,98,102,221,48,253,226,152,37,179,16,145,34,136,54,208,148,206,143,150,219,189,241,210,19,92,131,56,70,64,30,66,182,163,195,72,126,110,107,58,40,84,250,133,186,61,202,94,155,159,10,21,121,43,78,212,229,172,115,243,167,87,7,112,192,247,140,128,99,13,103,74,222,237,49,197,254,24,227,165,153,119,38,184,180,124,17,68,146,217,35,32,137,46,55,63,209,91,149,188,207,205,144,135,151,178,220,252,190,97,242,86,211,171,20,42,93,158,132,60,57,83,71,109,65,162,31,45,67,216,183,123,164,118,196,23,73,236,127,12,111,246,108,161,59,82,41,157,85,170,251,96,134,177,187,204,62,90,203,89,95,176,156,169,160,81,11,245,22,235,122,117,44,215,79,174,213,233,230,231,173,232,116,214,244,234,168,80,88,175]}),it=t.extend(null,{BLOCK:[3220,1468,2713,1235,3062,1890,2119,1549,2344,2936,1117,2583,1330,2470,1667,2249,2028,3780,481,4011,142,3098,831,3445,592,2517,1776,2234,1951,2827,1070,2660,1345,3177]}),n=t.extend(function(t){var f,s,i,o,u,h=t.value.length,r;for(this._badness=[],this._level=e.LEVELS[t.level],this._polynomial=[],this._value=t.value,this._version=0,this._stringBuffer=[];this._version<40&&(this._version++,i=4*(this._level-1)+16*(this._version-1),o=e.BLOCKS[i++],u=e.BLOCKS[i++],f=e.BLOCKS[i++],s=e.BLOCKS[i],i=f*(o+u)+u-3+(this._version<=9),!(h<=i)););this._dataBlock=f;this._eccBlock=s;this._neccBlock1=o;this._neccBlock2=u;r=this.width=17+4*this._version;this.buffer=n._createArray(r*r);this._ecc=n._createArray(f+(f+s)*(o+u)+u);this._mask=n._createArray((r*(r+1)+1)/2);this._insertFinders();this._insertAlignments();this.buffer[8+r*(r-8)]=1;this._insertTimingGap();this._reverseMask();this._insertTimingRowAndColumn();this._insertVersion();this._syncMask();this._convertBitStream(h);this._calculatePolynomial();this._appendEccToData();this._interleaveBlocks();this._pack();this._finish()},{_addAlignment:function(n,t){var i,r=this.buffer,u=this.width;for(r[n+u*t]=1,i=-2;i<2;i++)r[n+i+u*(t-2)]=1,r[n-2+u*(t+i+1)]=1,r[n+2+u*(t+i)]=1,r[n+i+1+u*(t+2)]=1;for(i=0;i<2;i++)this._setMask(n-1,t+i),this._setMask(n+1,t-i),this._setMask(n-i,t-1),this._setMask(n+i,t+1)},_appendData:function(t,i,r,f){for(var h,e,c=this._polynomial,s=this._stringBuffer,o=0;o<f;o++)s[r+o]=0;for(o=0;o<i;o++){if(255!==(h=u.LOG[s[t+o]^s[r]]))for(e=1;e<f;e++)s[r+e-1]=s[r+e]^u.EXPONENT[n._modN(h+c[f-e])];else for(e=r;e<r+f;e++)s[e]=s[e+1];s[r+f-1]=255===h?0:u.EXPONENT[n._modN(h+c[0])]}},_appendEccToData:function(){for(var t=0,i=this._dataBlock,r=this._calculateMaxLength(),u=this._eccBlock,n=0;n<this._neccBlock1;n++)this._appendData(t,i,r,u),t+=i,r+=u;for(n=0;n<this._neccBlock2;n++)this._appendData(t,i+1,r,u),t+=i+1,r+=u},_applyMask:function(n){var r,u,i,t,e=this.buffer,f=this.width;switch(n){case 0:for(t=0;t<f;t++)for(i=0;i<f;i++)i+t&1||this._isMasked(i,t)||(e[i+t*f]^=1);break;case 1:for(t=0;t<f;t++)for(i=0;i<f;i++)1&t||this._isMasked(i,t)||(e[i+t*f]^=1);break;case 2:for(t=0;t<f;t++)for(r=0,i=0;i<f;i++,r++)3===r&&(r=0),r||this._isMasked(i,t)||(e[i+t*f]^=1);break;case 3:for(u=0,t=0;t<f;t++,u++)for(3===u&&(u=0),r=u,i=0;i<f;i++,r++)3===r&&(r=0),r||this._isMasked(i,t)||(e[i+t*f]^=1);break;case 4:for(t=0;t<f;t++)for(r=0,u=t>>1&1,i=0;i<f;i++,r++)3===r&&(r=0,u=!u),u||this._isMasked(i,t)||(e[i+t*f]^=1);break;case 5:for(u=0,t=0;t<f;t++,u++)for(3===u&&(u=0),r=0,i=0;i<f;i++,r++)3===r&&(r=0),(i&t&1)+!(!r|!u)||this._isMasked(i,t)||(e[i+t*f]^=1);break;case 6:for(u=0,t=0;t<f;t++,u++)for(3===u&&(u=0),r=0,i=0;i<f;i++,r++)3===r&&(r=0),(i&t&1)+(r&&r===u)&1||this._isMasked(i,t)||(e[i+t*f]^=1);break;case 7:for(u=0,t=0;t<f;t++,u++)for(3===u&&(u=0),r=0,i=0;i<f;i++,r++)3===r&&(r=0),(r&&r===u)+(i+t&1)&1||this._isMasked(i,t)||(e[i+t*f]^=1)}},_calculateMaxLength:function(){return this._dataBlock*(this._neccBlock1+this._neccBlock2)+this._neccBlock2},_calculatePolynomial:function(){var t,r,f=this._eccBlock,i=this._polynomial;for(i[0]=1,t=0;t<f;t++){for(i[t+1]=1,r=t;r>0;r--)i[r]=i[r]?i[r-1]^u.EXPONENT[n._modN(u.LOG[i[r]]+t)]:i[r-1];i[0]=u.EXPONENT[n._modN(u.LOG[i[0]]+t)]}for(t=0;t<=f;t++)i[t]=u.LOG[i[t]]},_checkBadness:function(){for(var e,l,f,i,c=0,o=this._badness,u=this.buffer,t=this.width,s,a,h,r=0;r<t-1;r++)for(i=0;i<t-1;i++)(u[i+t*r]&&u[i+1+t*r]&&u[i+t*(r+1)]&&u[i+1+t*(r+1)]||!(u[i+t*r]||u[i+1+t*r]||u[i+t*(r+1)]||u[i+1+t*(r+1)]))&&(c+=n.N2);for(s=0,r=0;r<t;r++){for(f=0,o[0]=0,e=0,i=0;i<t;i++)e===(l=u[i+t*r])?o[f]++:o[++f]=1,s+=(e=l)?1:-1;c+=this._getBadness(f)}for(s<0&&(s=-s),a=0,h=s,h+=h<<2,h<<=1;h>t*t;)h-=t*t,a++;for(c+=a*n.N4,i=0;i<t;i++){for(f=0,o[0]=0,e=0,r=0;r<t;r++)e===(l=u[i+t*r])?o[f]++:o[++f]=1,e=l;c+=this._getBadness(f)}return c},_convertBitStream:function(n){for(var r,o=this._ecc,e=this._version,t,f,i,u=0;u<n;u++)o[u]=this._value.charCodeAt(u);if(t=this._stringBuffer=o.slice(),f=this._calculateMaxLength(),n>=f-2&&(n=f-2,e>9&&n--),i=n,e>9){for(t[i+2]=0,t[i+3]=0;i--;)r=t[i],t[i+3]|=255&r<<4,t[i+2]=r>>4;t[2]|=255&n<<4;t[1]=n>>4;t[0]=64|n>>12}else{for(t[i+1]=0,t[i+2]=0;i--;)r=t[i],t[i+2]|=255&r<<4,t[i+1]=r>>4;t[1]|=255&n<<4;t[0]=64|n>>4}for(i=n+3-(e<10);i<f;)t[i++]=236,t[i++]=17},_getBadness:function(t){for(var u=0,r=this._badness,i=0;i<=t;i++)r[i]>=5&&(u+=n.N1+r[i]-5);for(i=3;i<t-1;i+=2)r[i-2]===r[i+2]&&r[i+2]===r[i-1]&&r[i-1]===r[i+1]&&3*r[i-1]===r[i]&&(0===r[i-3]||i+3>t||3*r[i-3]>=4*r[i]||3*r[i+3]>=4*r[i])&&(u+=n.N3);return u},_finish:function(){var f,n,u,i,r,t;for(this._stringBuffer=this.buffer.slice(),u=0,i=3e4,n=0;n<8&&(this._applyMask(n),(f=this._checkBadness())<i&&(i=f,u=n),7!==u);n++)this.buffer=this._stringBuffer.slice();for(u!==n&&this._applyMask(u),i=e.FINAL_FORMAT[u+(this._level-1<<3)],r=this.buffer,t=this.width,n=0;n<8;n++,i>>=1)1&i&&(r[t-1-n+8*t]=1,n<6?r[8+t*n]=1:r[8+t*(n+1)]=1);for(n=0;n<7;n++,i>>=1)1&i&&(r[8+t*(t-7+n)]=1,n?r[6-n+8*t]=1:r[7+8*t]=1)},_interleaveBlocks:function(){for(var n,i=this._dataBlock,r=this._ecc,s=this._eccBlock,u=0,h=this._calculateMaxLength(),f=this._neccBlock1,o=this._neccBlock2,e=this._stringBuffer,t=0;t<i;t++){for(n=0;n<f;n++)r[u++]=e[t+n*i];for(n=0;n<o;n++)r[u++]=e[f*i+t+n*(i+1)]}for(n=0;n<o;n++)r[u++]=e[f*i+t+n*(i+1)];for(t=0;t<s;t++)for(n=0;n<f+o;n++)r[u++]=e[h+t+n*s];this._stringBuffer=r},_insertAlignments:function(){var n,i,t,r=this._version,u=this.width;if(r>1)for(n=tt.BLOCK[r],t=u-7;;){for(i=u-7;i>n-3&&(this._addAlignment(i,t),!(i<n));)i-=n;if(t<=n+9)break;t-=n;this._addAlignment(6,t);this._addAlignment(t,6)}},_insertFinders:function(){for(var t,n,i,u=this.buffer,r=this.width,f=0;f<3;f++){for(t=0,i=0,1===f&&(t=r-7),2===f&&(i=r-7),u[i+3+r*(t+3)]=1,n=0;n<6;n++)u[i+n+r*t]=1,u[i+r*(t+n+1)]=1,u[i+6+r*(t+n)]=1,u[i+n+1+r*(t+6)]=1;for(n=1;n<5;n++)this._setMask(i+n,t+1),this._setMask(i+1,t+n+1),this._setMask(i+5,t+n),this._setMask(i+n+1,t+5);for(n=2;n<4;n++)u[i+n+r*(t+2)]=1,u[i+2+r*(t+n+1)]=1,u[i+4+r*(t+n)]=1,u[i+n+1+r*(t+4)]=1}},_insertTimingGap:function(){for(var n,i=this.width,t=0;t<7;t++)this._setMask(7,t),this._setMask(i-8,t),this._setMask(7,t+i-7);for(n=0;n<8;n++)this._setMask(n,7),this._setMask(n+i-8,7),this._setMask(n,i-8)},_insertTimingRowAndColumn:function(){for(var i=this.buffer,t=this.width,n=0;n<t-14;n++)1&n?(this._setMask(8+n,6),this._setMask(6,8+n)):(i[8+n+6*t]=1,i[6+t*(8+n)]=1)},_insertVersion:function(){var f,r,n,t,e=this.buffer,u=this._version,i=this.width;if(u>6)for(f=it.BLOCK[u-7],r=17,n=0;n<6;n++)for(t=0;t<3;t++,r--)1&(r>11?u>>r-12:f>>r)?(e[5-n+i*(2-t+i-11)]=1,e[2-t+i-11+i*(5-n)]=1):(this._setMask(5-n,2-t+i-11),this._setMask(2-t+i-11,5-n))},_isMasked:function(t,i){var r=n._getMaskBit(t,i);return 1===this._mask[r]},_pack:function(){for(var f,e,i=1,o=1,u=this.width,n=u-1,t=u-1,s=(this._dataBlock+this._eccBlock)*(this._neccBlock1+this._neccBlock2)+this._neccBlock2,r=0;r<s;r++)for(f=this._stringBuffer[r],e=0;e<8;e++,f<<=1){128&f&&(this.buffer[n+u*t]=1);do o?n--:(n++,i?0!==t?t--:(i=!i,6==(n-=2)&&(n--,t=9)):t!==u-1?t++:(i=!i,6==(n-=2)&&(n--,t-=8))),o=!o;while(this._isMasked(n,t))}},_reverseMask:function(){for(var t,i=this.width,n=0;n<9;n++)this._setMask(n,8);for(n=0;n<8;n++)this._setMask(n+i-8,8),this._setMask(8,n);for(t=0;t<7;t++)this._setMask(8,t+i-7)},_setMask:function(t,i){var r=n._getMaskBit(t,i);this._mask[r]=1},_syncMask:function(){for(var t,i=this.width,n=0;n<i;n++)for(t=0;t<=n;t++)this.buffer[t+i*n]&&this._setMask(t,n)}},{_createArray:function(n){for(var i=[],t=0;t<n;t++)i[t]=0;return i},_getMaskBit:function(n,t){var i;return n>t&&(i=n,n=t,t=i),i=t,i+=t*t,i>>=1,i+n},_modN:function(n){for(;n>=255;)n=((n-=255)>>8)+(255&n);return n},N1:3,N2:3,N3:40,N4:10}),rt=n,ut=a.extend({draw:function(){this.element.src=this.qrious.toDataURL()},reset:function(){this.element.src=""},resize:function(){var n=this.element;n.width=n.height=this.qrious.size}}),i=t.extend(function(n,t,i,r){this.name=n;this.modifiable=Boolean(t);this.defaultValue=i;this._valueTransformer=r},{transform:function(n){var t=this._valueTransformer;return"function"==typeof t?t(n,this):n}}),r=t.extend(null,{abs:function(n){return null!=n?Math.abs(n):null},hasOwn:function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},noop:function(){},toUpperCase:function(n){return null!=n?n.toUpperCase():null}}),f=t.extend(function(n){this.options={};n.forEach(function(n){this.options[n.name]=n},this)},{exists:function(n){return null!=this.options[n]},get:function(n,t){return f._get(this.options[n],t)},getAll:function(n){var t,i=this.options,u={};for(t in i)r.hasOwn(i,t)&&(u[t]=f._get(i[t],n));return u},init:function(n,t,i){"function"!=typeof i&&(i=r.noop);var e,u;for(e in this.options)r.hasOwn(this.options,e)&&(u=this.options[e],f._set(u,u.defaultValue,t),f._createAccessor(u,t,i));this._setAll(n,t,!0)},set:function(n,t,i){return this._set(n,t,i)},setAll:function(n,t){return this._setAll(n,t)},_set:function(n,t,i,r){var u=this.options[n];if(!u)throw new Error("Invalid option: "+n);if(!u.modifiable&&!r)throw new Error("Option cannot be modified: "+n);return f._set(u,t,i)},_setAll:function(n,t,i){if(!n)return!1;var u,f=!1;for(u in n)r.hasOwn(n,u)&&this._set(u,n[u],t,i)&&(f=!0);return f}},{_createAccessor:function(n,t,i){var r={get:function(){return f._get(n,t)}};n.modifiable&&(r.set=function(r){f._set(n,r,t)&&i(r,n)});Object.defineProperty(t,n.name,r)},_get:function(n,t){return t["_"+n.name]},_set:function(n,t,i){var r="_"+n.name,f=i[r],u=n.transform(null!=t?t:n.defaultValue);return i[r]=u,u!==f}}),ft=f,et=t.extend(function(){this._services={}},{getService:function(n){var t=this._services[n];if(!t)throw new Error("Service is not being managed with name: "+n);return t},setService:function(n,t){if(this._services[n])throw new Error("Service is already managed with name: "+n);t&&(this._services[n]=t)}}),s=new ft([new i("background",!0,"white"),new i("backgroundAlpha",!0,1,r.abs),new i("element"),new i("foreground",!0,"black"),new i("foregroundAlpha",!0,1,r.abs),new i("level",!0,"L",r.toUpperCase),new i("mime",!0,"image/png"),new i("padding",!0,null,r.abs),new i("size",!0,100,r.abs),new i("value",!0,"")]),v=new et,y=t.extend(function(n){s.init(n,this,this.update.bind(this));var t=s.get("element",this),i=v.getService("element"),u=t&&i.isCanvas(t)?t:i.createCanvas(),r=t&&i.isImage(t)?t:i.createImage();this._canvasRenderer=new nt(this,u,!0);this._imageRenderer=new ut(this,r,r===t);this.update()},{get:function(){return s.getAll(this)},set:function(n){s.setAll(n,this)&&this.update()},toDataURL:function(n){return this.canvas.toDataURL(n||this.mime)},update:function(){var n=new rt({level:this.level,value:this.value});this._canvasRenderer.render(n);this._imageRenderer.render(n)}},{use:function(n){v.setService(n.getName(),n)}});return Object.defineProperties(y.prototype,{canvas:{get:function(){return this._canvasRenderer.getElement()}},image:{get:function(){return this._imageRenderer.getElement()}}}),c=y,p=t.extend({getName:function(){}}).extend({createCanvas:function(){},createImage:function(){},getName:function(){return"element"},isCanvas:function(){},isImage:function(){}}).extend({createCanvas:function(){return document.createElement("canvas")},createImage:function(){return document.createElement("img")},isCanvas:function(n){return n instanceof HTMLCanvasElement},isImage:function(n){return n instanceof HTMLImageElement}}),c.use(new p),c});!function(){}(Zoomable||(Zoomable={}));!function(n){var t=function(){function n(n,t,i,r){this.id=n;this.typeId=i;this.geometry=t;this.userDefined=r;this.saved=!0}return n.prototype.getGeometryWKT=function(){var t=new ol.format.WKT,n=this.geometry,i;return n instanceof ol.geom.Circle?(i=ol.geom.Polygon.fromCircle(n),t.writeGeometry(i)):t.writeGeometry(n)},n}();n.Annotation=t}(Zoomable||(Zoomable={}));!function(n){var t;!function(n){n.Image="image";n.Point="point";n.Circle="circle";n.Polygon="polygon";n.Arrow="arrow"}(t=n.AnnotationShapeType||(n.AnnotationShapeType={}))}(Zoomable||(Zoomable={}));!function(n){var t=function(){function t(t,i,r){this._interaction=null;this._selectedFeature=null;this._justDrawedFeature=null;this._annotationsList={};this._overlayClickedFlag=!1;this._annotationEditMode=!1;this._pointerDown=!1;this._configuration=t;this._map=r;this._layerSet=i;this._popup=new n.Popup(t.popupContainerId);this.registerEvents();this.initPopup()}return t.prototype.loadAnnotations=function(t){var u,i,f,e,r;if("undefined"!=typeof t&&t){for(u=0;u<t.length;u++){if(i=t[u],i.coord.constructor!==Array&&"string"!=typeof i.coord)return;if(f=this._layerSet.getTypeById(i.typeId),!f)return;e=n.Geometry.createGeometryByAnnoDefinition(f.geometryType,i);r=new n.Annotation(n.Tools.newGuid(),e,i.typeId,i.userDefined);this._annotationsList[r.id]=r;this._layerSet.seedFeature(r);this._configuration.annotationOverlayCssClass&&"Point"===e.getType()&&this.createAnnotationOverlay(r.geometry.getCoordinates(),this._configuration.annotationOverlayCssClass)}this._map.updateSize()}},t.prototype.activateAddingAnnotation=function(n){if(this._configuration.enableAnnotating){this._map.removeInteraction(this._interaction);"undefined"==typeof n&&(n=!1);var t=this._layerSet.getActiveType();this._interaction=new ol.interaction.Draw({source:this._layerSet.getActiveSource(),type:t.geometryType,freehand:n,maxPoints:t.maxPoints});this._interaction.on("drawend",this.onInteractionDrawEnd,this);this._interaction.set("freehand",n);this._map.addInteraction(this._interaction)}},t.prototype.deactivateAddingAnnotation=function(){this._map.removeInteraction(this._interaction);this._interaction=null},t.prototype.getAnnotations=function(){return this._annotationsList},t.prototype.saveSelectedAnnotation=function(n){this._selectedFeature&&(this._annotationsList[this._selectedFeature.getId()].userDefined=n,this._annotationsList[this._selectedFeature.getId()].saved=!0)},t.prototype.deleteSelectedAnnotation=function(){this._popup.isDefined()&&this._popup.hide();this._selectedFeature&&(delete this._annotationsList[this._selectedFeature.getId()],this._layerSet.getActiveSource().removeFeature(this._selectedFeature))},t.prototype.deleteAnnotationWithUserDefinedProperty=function(t){var u,f,e,o,s;this._popup.isDefined()&&this._popup.hide();var h=Object.keys(t)[0],c=n.Tools.getObjectValues(t)[0],i=null,r=this._annotationsList;for(u in r)if(r.hasOwnProperty(u)){if(f=r[u],e=f.userDefined,!e)continue;if(e[h]===c){i=f;break}}if(i)return o=this._layerSet.getLayerById(i.typeId).getSource(),s=o.getFeatureById(i.id),o.removeFeature(s),void delete this._annotationsList[i.id]},t.prototype.clickAnnotation=function(n){var t=null,i=this._annotationsList,r,u;for(r in i)if(i.hasOwnProperty(r)&&(u=i[r],u.id===n)){t=u;break}if(null!==t){var f=t.geometry.getCoordinates(),e=this._map.getPixelFromCoordinate(f),o=this._map.forEachFeatureAtPixel(e,function(n){return n});this.processFeatureClick(o);this._overlayClickedFlag=!0}},t.prototype.setNewAnnotationType=function(n){this._layerSet.setActiveSource(n)},t.prototype.changeSelectedAnnotationType=function(n){var t=new ol.Feature({geometry:this._selectedFeature.getGeometry()});t.setId(this._selectedFeature.getId());this._layerSet.getActiveSource().removeFeature(this._selectedFeature);this._layerSet.setActiveSource(n);this._layerSet.getActiveSource().addFeature(t);this._selectedFeature=t;this._annotationsList[this._selectedFeature.getId()].typeId=n},t.prototype.showAllAnnotations=function(){this._layerSet.removeAllFeatures();this._layerSet.seedFeatures(this._annotationsList)},t.prototype.hideAllAnnotations=function(){this._layerSet.removeAllFeatures()},t.prototype.showAnnotationsOnlyWithUserDefinedProperty=function(t){var f,e,i,r,u;this._layerSet.removeAllFeatures();f=Object.keys(t)[0];e=n.Tools.getObjectValues(t)[0];for(i in this._annotationsList)if(this._annotationsList.hasOwnProperty(i)){if(r=this._annotationsList[i],u=r.userDefined,!u)return;u[f]===e&&this._layerSet.seedFeature(r)}},t.prototype.zoomToAnnotationWithUserDefinedProperty=function(t){var e=Object.keys(t)[0],o=n.Tools.getObjectValues(t)[0],f,u;this._popup.isDefined()&&this._popup.hide();var i=this._annotationsList,s=function(t){var f,s,h,u;if(i.hasOwnProperty(t)){if(f=i[t],s=f.userDefined,!s)return{value:void 0};s[e]===o&&(h=r._map.getView().getZoom(),r.zoomTotalOut(),u=r,setTimeout(function(){var t=n.Geometry.getCentralCoordinates(f.geometry);u._map.getView().animate({center:[t[0],t[1]],duration:300});setTimeout(function(){u._map.getView().animate({zoom:h,duration:300});setTimeout(function(){var n=u._map.getPixelFromCoordinate(t),i=u._map.forEachFeatureAtPixel(n,function(n){return f.id===n.getId()?n:null},{hitTolerance:5});u.processFeatureClick(i)},300)},300)},300))}},r=this;for(f in i)if(u=s(f),"object"==typeof u)return u.value},t.prototype.hidePopup=function(){this._popup.isDefined()&&this._popup.hide()},t.prototype.silent=function(){this._map.un("singleclick",this.onMapClickEnd);this._map.un("dblclick",this.onMapClickEnd);this._map.un("pointermove",this.onPointerMove);this._map.un("pointerdown",this.onMapPointerDown);this._map.un("pointerup",this.onMapPointerUp)},t.prototype.revive=function(){this.registerEvents()},t.prototype.createOverlay=function(n,t,i){return new ol.Overlay({element:n,position:t,positioning:"center-center",stopEvent:i})},t.prototype.initPopup=function(){var n=this;this._popup.isDefined()&&(this._map.addOverlay(this._popup.getOverlay()),this._popup.setCallbacks(this._configuration.onPopupShown,function(){n._pointerDown||(n._annotationEditMode=!1);n._configuration.onPopupHidden&&n._configuration.onPopupHidden()}))},t.prototype.registerEvents=function(){this._map.on("singleclick",this.onMapClickEnd,this);this._map.on("dblclick",this.onMapClickEnd,this);this._map.on("pointerdown",this.onMapPointerDown,this);this._map.on("pointerup",this.onMapPointerUp,this);this._map.on("pointermove",this.onPointerMove,this)},t.prototype.onInteractionDrawEnd=function(t){var i=t.feature,r;i.setId(n.Tools.newGuid());this._annotationsList[i.getId()]=new n.Annotation(i.getId(),i.getGeometry(),this._layerSet.getActiveType().id,null);r=this._interaction.get("freehand");this.stopInteraction(this._interaction);this._interaction=null;this._justDrawedFeature=i;r&&this.processFeatureClick(i)},t.prototype.onMapPointerDown=function(){this._pointerDown=!0;this._annotationEditMode=!0},t.prototype.onMapPointerUp=function(){this._pointerDown=!1},t.prototype.onMapClickEnd=function(n){var t,i;if(null===this._interaction){if(t=this._map.forEachFeatureAtPixel(n.pixel,function(n){return n},{hitTolerance:10}),t&&"undefined"==typeof t.getId()&&(t=this._justDrawedFeature),t)this.processFeatureClick(t);else{if(this._overlayClickedFlag)return void(this._overlayClickedFlag=!1);this._selectedFeature&&(i=this._annotationsList[this._selectedFeature.getId()],i&&!i.saved&&(delete this._annotationsList[this._selectedFeature.getId()],this._layerSet.getActiveSource().removeFeature(this._selectedFeature)));this._selectedFeature=null;this._popup&&this._popup.hide();this._annotationEditMode=!1}this._justDrawedFeature=null}},t.prototype.onPointerMove=function(n){var i=this._map.getTarget(),r=document.getElementById(i),t=n.originalEvent,u=[t.offsetX,t.offsetY],f=this._map.forEachFeatureAtPixel(u,function(n){return n});r.style.cursor=f?"pointer":"";this.handleAnnotationHover(n)},t.prototype.handleAnnotationHover=function(n){var r;if(this._configuration.onAnnotationHover&&this._popup&&!this._annotationEditMode){var t=n.originalEvent,u=[t.offsetX,t.offsetY],i=this._map.forEachFeatureAtPixel(u,function(n){return n});i?(r=this._annotationsList[i.getId()],this._configuration.onAnnotationHover(r),this._popup.showAt(n.coordinate)):this._popup.hide()}},t.prototype.processFeatureClick=function(t){var i,r,u;t&&(this._annotationEditMode=!0,this._selectedFeature=t,this.fireAnnotationClicked(t),i=this._annotationsList[this._selectedFeature.getId()],this._layerSet.setActiveSource(i.typeId),r=this._layerSet.getTypeById(i.typeId).type,u=n.Geometry.getCentralCoordinates(t.getGeometry(),r),this._popup&&this._popup.showAt(u))},t.prototype.fireAnnotationClicked=function(n){if(this._configuration.onAnnotationClicked){var t=this._annotationsList[n.getId()];this._configuration.onAnnotationClicked(t)}},t.prototype.zoomTotalOut=function(){this._map.getView().animate({zoom:this._map.getView().getMinZoom(),duration:300})},t.prototype.createAnnotationOverlay=function(t,i){var r=n.Tools.createHTMLElement("div",i,null,null),u=this.createOverlay(r,t,!0);this._map.addOverlay(u)},t.prototype.stopInteraction=function(n){this._map.removeInteraction(n);this.controlDoubleClickZoom(!1);var t=this;setTimeout(function(){t.controlDoubleClickZoom(!0)},251)},t.prototype.controlDoubleClickZoom=function(n){for(var r,i=this._map.getInteractions(),t=0;t<i.getLength();t++)r=i.item(t),r instanceof ol.interaction.DoubleClickZoom&&r.setActive(n)},t}();n.Annotator=t}(Zoomable||(Zoomable={}));!function(n){var t=function(){function t(n){this.initConfiguration(n)}return t.prototype.initConfiguration=function(n){this.initBaseParameters(n);this.initPyramid(n);this.initAnnotating(n);this.initMeasurements(n);this.initOverviewControl(n);this.initCallbacks(n);this.initialRotation=n.initialRotation||0;this.snapshotButtonId=n.snapshotButtonId||null},t.prototype.initCallbacks=function(n){this.onPopupShown=n.onPopupShown||null;this.onPopupHidden=n.onPopupHidden||null;this.onAnnotationClicked=n.onAnnotationClicked||null;this.onAnnotationHover=n.onAnnotationHover||null;this.onTileLoad=n.onTileLoad||null},t.prototype.calculateInitialZoom=function(n){if("undefined"!=typeof n.initialZoomLevel&&n.initialZoomLevel)return n.initialZoomLevel;var t="undefined"!=typeof n.adaptInitialZoomByWidth&&n.adaptInitialZoomByWidth,i="undefined"!=typeof n.adaptInitialZoomByHeight&&n.adaptInitialZoomByHeight;return t||i?t?this.adaptInitialZoom(n.width,n.adaptInitialZoomByWidth):i?this.adaptInitialZoom(n.height,n.adaptInitialZoomByHeight):0:0},t.prototype.adaptInitialZoom=function(n,t){for(var f,u,r=1,i=n;i>t;)r++,i=Math.ceil(i/2);return f=2*i,f-t<t-i&&(r-=1),u=this.numberOfZoomLevels-r,u<0?0:u},t.prototype.calculateZoomLevelOffset=function(t,i,r){var u=t>i?t:i,f=Math.ceil(n.Tools.MathLog2(u)+1);return f-r},t.prototype.calculateNumberOfZoomLevels=function(n,t,i){for(var r=n>t?n:t,u=1;r>i;)u++,r=Math.ceil(r/2);return u},t.prototype.checkRequired=function(n){for(var i,t=0;t<n.length;t++)if(i=n[t],"undefined"==typeof i||!i)throw"One of the required settings is undefined";},t.prototype.validateAnnotationPins=function(t){for(var i,r=0;r<t.length;r++)if(i=t[r],"undefined"!=typeof i.type&&i.type||(i.type=n.AnnotationShapeType.Point),i.type===n.AnnotationShapeType.Point&&("undefined"!=typeof i.properties&&i.properties||(i.properties={fillColor:"#dd0000",strokeColor:"#ffffff",strokeWidth:2,radius:6}),i.properties.fillColor=i.properties.fillColor||"#dd0000",i.properties.strokeColor=i.properties.strokeColor||"#ffffff",i.properties.strokeWidth=i.properties.strokeWidth||2,i.properties.radius=i.properties.radius||6),i.type===n.AnnotationShapeType.Image){if("undefined"==typeof i.imageSrc||!i.imageSrc)throw"The image source for the annotation pin "+i.id+" is undefined. Use 'imageSrc' property";if("undefined"!=typeof i.properties&&i.properties&&"undefined"!=typeof i.properties.anchor&&i.properties.anchor&&2!=i.properties.anchor.length)throw"The annotation type "+i.id+" has the incorrect anchor property. Must be an array with two numbers.";}return t},t.prototype.validateMeasurementStyles=function(n){var t,i;return"undefined"==typeof n&&(n={}),this.validateObjectProperty(n,"drawing"),t=n.drawing,this.validateObjectProperty(t,"fillColor","rgba(255, 255, 255, 0.2)"),this.validateObjectProperty(t,"stroke"),this.validateObjectProperty(t.stroke,"color","rgba(0, 0, 0, 0.5)"),this.validateObjectProperty(t.stroke,"lineDash",[10,10]),this.validateObjectProperty(t.stroke,"width",2),this.validateObjectProperty(t,"point"),this.validateObjectProperty(t.point,"radius",5),this.validateObjectProperty(t.point,"strokeColor","rgba(0, 0, 0, 0.7)"),this.validateObjectProperty(t.point,"fillColor","rgba(255, 255, 255, 0.2)"),this.validateObjectProperty(n,"final"),i=n.final,this.validateObjectProperty(i,"fillColor","rgba(255, 255, 255, 0.2)"),this.validateObjectProperty(i,"stroke"),this.validateObjectProperty(i.stroke,"color","#ffcc33"),this.validateObjectProperty(i.stroke,"width",2),this.validateObjectProperty(i,"point"),this.validateObjectProperty(i.point,"radius",7),this.validateObjectProperty(i.point,"fillColor","#ffcc33"),n},t.prototype.validateObjectProperty=function(n,t,i){"undefined"==typeof i&&(i={});var r=!!n&&Object.prototype.hasOwnProperty.call(n,t);return r?void("undefined"!=typeof n[t]&&n[t]||(n[t]=i)):void(n[t]=i)},t.prototype.initBaseParameters=function(n){this.checkRequired([n.containerId,n.url,n.width,n.height]);this.containerId=n.containerId;this.url=n.url;this.width=n.width;this.height=n.height;"/"!==n.url.slice(-1)&&(n.url+="/");n.url+="{z}/{x}_{y}.jpg";this.url=n.url;this.onResolutionChanged=n.onResolutionChanged;this.extraZoomEnabled=n.extraZoomEnabled},t.prototype.initPyramid=function(n){this.tileSize=n.tileSize||256;this.onePixelPyramid=n.onePixelPyramid||!1;this.numberOfZoomLevels=this.calculateNumberOfZoomLevels(n.width,n.height,n.tileSize);this.zoomLevelOffset=n.onePixelPyramid?this.calculateZoomLevelOffset(n.width,n.height,this.numberOfZoomLevels):0;this.minZoomLevel=n.minZoomLevel||0;this.center=n.center;this.initialZoomLevel=this.calculateInitialZoom(n);this.zoomControl=n.zoomControl||!1},t.prototype.initAnnotating=function(n){this.enableAnnotating=n.enableAnnotating||!1;this.annotationTypes=this.validateAnnotationPins(n.annotationTypes);this.popupContainerId=n.popupContainerId||null;this.annotationOverlayCssClass=n.annotationOverlayCssClass||null},t.prototype.initMeasurements=function(n){"undefined"!=typeof n.metersPerPixel&&n.metersPerPixel||(n.metersPerPixel=1);this.metersPerPixel=n.metersPerPixel;this.scaleLineControl=n.scaleLineControl||!1;this.measurementStyles=this.validateMeasurementStyles(n.measurementStyles)},t.prototype.initOverviewControl=function(n){this.overviewControl=n.overviewControl||!1;this.overviewControlCollapsed=n.overviewControlCollapsed||!1;this.overviewControlCollapsible=n.overviewControlCollapsible||!1;this.overviewControlLabel=n.overviewControlLabel||"»";this.overviewControlCollapseLabel=n.overviewControlCollapseLabel||"«"},t}(),i;n.Configuration=t;!function(n){n[n.BlobStorageTiles=1]="BlobStorageTiles";n[n.BlobStorageZipNotSupportedAnymore=2]="BlobStorageZipNotSupportedAnymore";n[n.BlobStorageSzi=3]="BlobStorageSzi"}(i=n.TileDataSourceType||(n.TileDataSourceType={}))}(Zoomable||(Zoomable={}));!function(n){var t=function(){function n(){}return n.prototype.toBase64=function(n){for(var u,f,o,l,t,s="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=new Uint8Array(n),a=r.byteLength,c=a%3,h=a-c,e=0;e<h;e+=3)t=r[e]<<16|r[e+1]<<8|r[e+2],u=(16515072&t)>>18,f=(258048&t)>>12,o=(4032&t)>>6,l=63&t,s+=i[u]+i[f]+i[o]+i[l];return 1===c?(t=r[h],u=(252&t)>>2,f=(3&t)<<4,s+=i[u]+i[f]+"=="):2===c&&(t=r[h]<<8|r[h+1],u=(64512&t)>>10,f=(1008&t)>>4,o=(15&t)<<2,s+=i[u]+i[f]+i[o]+"="),s},n}();n.Encoder=t}(Zoomable||(Zoomable={}));!function(n){var t;!function(n){function t(n,t){var i,r;switch(n.getType()){case"Point":i=n.getCoordinates();break;case"Circle":i=n.getCenter();break;case"Polygon":r=n.getExtent();i=ol.extent.getCenter(r);break;case"LineString":if("arrow"===t){i=n.getCoordinates()[1];break}r=n.getExtent();i=ol.extent.getCenter(r)}return i}function i(n,t){var u,i,r;if("string"==typeof t.coord)return u=new ol.format.WKT,u.readGeometry(t.coord);i=parseInt(t.coord[0]);r=parseInt(t.coord[1]);switch(n){case"Point":return new ol.geom.Point([i,r]);case"Circle":return new ol.geom.Circle([i,r],parseInt(t.radius));case"Polygon":return new ol.geom.Polygon([t.coord]);case"LineString":return new ol.geom.LineString([t.coord]);default:return new ol.geom.Point([i,r])}}n.getCentralCoordinates=t;n.createGeometryByAnnoDefinition=i}(t=n.Geometry||(n.Geometry={}))}(Zoomable||(Zoomable={}));!function(n){var t;!function(n){n.Point="Point";n.Circle="Circle";n.Polygon="Polygon";n.LineString="LineString"}(t=n.GeometryType||(n.GeometryType={}))}(Zoomable||(Zoomable={}));!function(n){var t=function(){function t(t){this._measurementsSource=new ol.source.Vector;this._overlays=[];this._interaction=null;this._measureTooltip=null;this._measureTooltipElement=null;this._viewCache=null;this._bindedImage=null;this._customeEventKeysOrigin=null;this._customeEventKeysForeign=null;this.hidePopup=function(){this._annotator.hidePopup()};this._configuration=new n.Configuration(t);var i=new n.LayerSet(this._configuration.annotationTypes);this._factory=new n.MapFactory;this._map=this._factory.create(this._configuration,i);this._annotator=new n.Annotator(this._configuration,i,this._map);this._map.addLayer(this.createMeasurementsLayer());this.registerEvents()}return t.prototype.getAnnotator=function(){return this._annotator},t.prototype.loadAnnotations=function(n){this._annotator.loadAnnotations(n)},t.prototype.activateAddingAnnotation=function(n){this._annotator.activateAddingAnnotation(n)},t.prototype.deactivateAddingAnnotation=function(){this._annotator.deactivateAddingAnnotation()},t.prototype.getAnnotations=function(){return this._annotator.getAnnotations()},t.prototype.saveSelectedAnnotation=function(n){this._annotator.saveSelectedAnnotation(n)},t.prototype.deleteSelectedAnnotation=function(){this._annotator.deleteSelectedAnnotation()},t.prototype.deleteAnnotationWithUserDefinedProperty=function(n){this._annotator.deleteAnnotationWithUserDefinedProperty(n)},t.prototype.clickAnnotation=function(n){this._annotator.clickAnnotation(n)},t.prototype.setNewAnnotationType=function(n){this._annotator.setNewAnnotationType(n)},t.prototype.changeSelectedAnnotationType=function(n){this._annotator.changeSelectedAnnotationType(n)},t.prototype.showAllAnnotations=function(){this._annotator.showAllAnnotations()},t.prototype.hideAllAnnotations=function(){this._annotator.hideAllAnnotations()},t.prototype.showAnnotationsOnlyWithUserDefinedProperty=function(n){this._annotator.showAnnotationsOnlyWithUserDefinedProperty(n)},t.prototype.zoomToAnnotationWithUserDefinedProperty=function(n){this._annotator.zoomToAnnotationWithUserDefinedProperty(n)},t.prototype.addOverlay=function(t,i,r,u){var e=n.Tools.createHTMLElement("div",i,r,u),f=this._annotator.createOverlay(e,t,!1);this._map.addOverlay(f);this._overlays.push(f)},t.prototype.removeOverlays=function(){for(var t,n=0;n<this._overlays.length;n++)t=this._overlays[n],this._map.removeOverlay(t);this._overlays=[]},t.prototype.zoomin=function(){this.zoom(.5)},t.prototype.zoomout=function(){this.zoom(2)},t.prototype.enableExtraZoom=function(){this._configuration.extraZoomEnabled=!0;var n=this._factory.createView(this._configuration,this._map.getView());this._map.setView(n)},t.prototype.disableExtraZoom=function(){this._configuration.extraZoomEnabled=!1;var n=this._factory.createView(this._configuration,this._map.getView());this._map.setView(n)},t.prototype.rotate=function(n){var r=n*Math.PI/180,t=this._map.getView(),i;return t.animate({duration:1e3,rotation:t.getRotation()+r}),i=t.getRotation(),180*i/Math.PI},t.prototype.updateSize=function(){this._map.updateSize()},t.prototype.activateMeasuring=function(n,t){this._map.removeInteraction(this._interaction);this._annotator.silent();var i=n===!0?"Polygon":"LineString";this._interaction=this.createMeasureInteraction(i);this._map.addInteraction(this._interaction);this.createMeasureTooltip();this.createMeasureCallbacks(t)},t.prototype.deactivateMeasuring=function(){this._map.removeInteraction(this._interaction);this._interaction=null;this._annotator.revive()},t.prototype.bindTo=function(n){var t=n.getView();this._viewCache=this._map.getView();this._map.setView(t)},t.prototype.bindWithOffset=function(n,t,i){"undefined"!=typeof t&&t||(t=0);"undefined"!=typeof i&&i||(i=0);this._bindedImage=n;var r=this,u=this._bindedImage.getView(),f=this._map.getView();this._customeEventKeysOrigin=f.on(["change:resolution","change:center"],function(f){r.updateView(f,u,t,i);n.updateSize()});this._customeEventKeysForeign=u.on(["change:resolution","change:center"],function(n){r.updateView(n,f,-t,-i);r.updateSize()})},t.prototype.updateView=function(n,t,i,r){var u=n.target.get(n.key);"center"===n.key&&(u=[u[0]+i,u[1]+r]);t.set(n.key,u,!0)},t.prototype.unBind=function(){var n,t;if(this._viewCache)return void this._map.setView(this._viewCache);if(this._bindedImage){for(n=0;n<this._customeEventKeysOrigin.length;n++)t=this._customeEventKeysOrigin[n],ol.Observable.unByKey(t);for(n=0;n<this._customeEventKeysForeign.length;n++)t=this._customeEventKeysForeign[n],ol.Observable.unByKey(t)}},t.prototype.getView=function(){return this._map.getView()},t.prototype.destroy=function(){document.getElementById(this._configuration.containerId).innerHTML=""},t.prototype.registerEvents=function(){var n,t;this._configuration.snapshotButtonId&&(n=document.getElementById(this._configuration.snapshotButtonId),n&&(t=this,n.addEventListener("click",function(){t._map.once("postcompose",function(n){var t=n.context.canvas;window.navigator.msSaveBlob?window.navigator.msSaveBlob(t.msToBlob(),"image-capture.png"):t.toBlob(function(n){saveAs(n,"image-capture.png")})});t._map.renderSync()})))},t.prototype.zoom=function(n){var t=this._map.getView();n<1&&t.getZoom()>=t.getMaxZoom()||n>1&&t.getZoom()<=t.getMinZoom()||t.animate({duration:200,resolution:t.getResolution()*n})},t.prototype.createMeasureTooltip=function(){this._measureTooltipElement&&this._measureTooltipElement.parentNode.removeChild(this._measureTooltipElement);this._measureTooltipElement=document.createElement("div");this._measureTooltipElement.className="tooltip tooltip-measure";this._measureTooltip=new ol.Overlay({element:this._measureTooltipElement,offset:[0,-15],positioning:"bottom-center"});this._map.addOverlay(this._measureTooltip)},t.prototype.createMeasurementsLayer=function(){return new ol.layer.Vector({source:this._measurementsSource,style:new ol.style.Style({fill:new ol.style.Fill({color:this._configuration.measurementStyles.final.fillColor}),stroke:new ol.style.Stroke({color:this._configuration.measurementStyles.final.stroke.color,width:this._configuration.measurementStyles.final.stroke.width})})})},t.prototype.createMeasureInteraction=function(n){return new ol.interaction.Draw({source:this._measurementsSource,type:n,maxPoints:"LineString"===n?2:void 0,style:new ol.style.Style({fill:new ol.style.Fill({color:this._configuration.measurementStyles.drawing.fillColor}),stroke:new ol.style.Stroke({color:this._configuration.measurementStyles.drawing.stroke.color,lineDash:this._configuration.measurementStyles.drawing.stroke.lineDash,width:this._configuration.measurementStyles.drawing.stroke.width}),image:new ol.style.Circle({radius:this._configuration.measurementStyles.drawing.point.radius,stroke:new ol.style.Stroke({color:this._configuration.measurementStyles.drawing.point.strokeColor}),fill:new ol.style.Fill({color:this._configuration.measurementStyles.drawing.point.fillColor})})})})},t.prototype.createMeasureCallbacks=function(n){var i,t=this;this._interaction.on("drawstart",function(n){t._sketch=n.feature;var r=n.coordinate;i=t._sketch.getGeometry().on("change",function(n){var u,i=n.target;i instanceof ol.geom.Polygon?(u=t.calculateArea(i),r=i.getInteriorPoint().getCoordinates()):i instanceof ol.geom.LineString&&(u=t.calculateLength(i),r=i.getLastCoordinate());t._measureTooltipElement.innerHTML=u;t._measureTooltip.setPosition(r)})},this);this._interaction.on("drawend",function(){t._measureTooltipElement.className="tooltip tooltip-static";t._measureTooltip.setOffset([0,-7]);t._sketch=null;t._measureTooltipElement=null;t.createMeasureTooltip();ol.Observable.unByKey(i);t.stopInteraction(t._interaction);t._annotator.revive();n&&n()},this)},t.prototype.calculateLength=function(n){var f=n.getLength(),i=f*this._configuration.metersPerPixel,t="m",r=i,u;return i<.001?(t="μm",r*=1e6):i<1?(t="mm",r*=1e3):i<1e3?t="m":(t="km",r/=1e3),u=this.calibratePrecision(r),u+" "+t},t.prototype.calculateArea=function(n){var f=n.getArea(),i=f*this._configuration.metersPerPixel*this._configuration.metersPerPixel,t="m<sup>2<\/sup>",r=i,u;return i<1e-6?(t="μm",r*=1e12):i<1?(t="mm",r*=1e6):i<1e7?t="m":(t="km",r/=1e6),u=this.calibratePrecision(r),u+" "+t+"<sup>2<\/sup>"},t.prototype.calibratePrecision=function(n){var i=n.toString().split(".")[0].length,t=1;return i>1&&(t=0),n.toFixed(t)},t.prototype.stopInteraction=function(n){this._map.removeInteraction(n);this.controlDoubleClickZoom(!1);var t=this;setTimeout(function(){t.controlDoubleClickZoom(!0)},251)},t.prototype.controlDoubleClickZoom=function(n){for(var r,i=this._map.getInteractions(),t=0;t<i.getLength();t++)r=i.item(t),r instanceof ol.interaction.DoubleClickZoom&&r.setActive(n)},t}();n.Image=t}(Zoomable||(Zoomable={}));!function(n){var t=function(){function t(t){if(this._sziContainerMap={mapHeader:null,mapBody:null},t.tileDataSourceType===n.TileDataSourceType.BlobStorageZipNotSupportedAnymore)throw new Error("This TileDataSourceType is not supported ");this._sziContainer=new n.SziContainer;this._configuration=t}return t.prototype.initialize=function(t,i){var r=this;return new Promise(function(u){var f=new Promise(function(n){n()});r._configuration.tileDataSourceType===n.TileDataSourceType.BlobStorageSzi&&(f=r._sziContainer.getMap(r._configuration.tilesMapUrl,r._configuration.tryToCacheTilesMap));f.then(function(f){r._configuration.tileDataSourceType===n.TileDataSourceType.BlobStorageSzi&&r._configuration.tilesMapUrl&&(r._sziContainerMap=f,t.onTileLoad=r.onTileLoadSzi.bind(r));i&&i(t);u(new n.Image(t))})})},t.prototype.onTileLoadSzi=function(n,t){this._sziContainer.getTile(this._configuration.tilesZipUrl,this._sziContainerMap,n.getTileCoord(),t).then(function(t){n.getImage().crossOrigin=null;n.getImage().src=t})},t}();n.ImageInitializer=t}(Zoomable||(Zoomable={}));!function(n){var t=function(){function t(t){this._vectorLayers={};this._annotationTypesDict={};for(var u=function(i){var u=t[i],f=void 0,e=void 0,o,s,h;switch(u.type){case"point":e=n.GeometryType.Point;f=new ol.style.Style({image:new ol.style.Circle({stroke:new ol.style.Stroke({color:u.properties.strokeColor,width:u.properties.strokeWidth}),radius:u.properties.radius,fill:new ol.style.Fill({color:u.properties.fillColor})})});break;case"image":e=n.GeometryType.Point;o="fraction";s=[.5,.5];"undefined"!=typeof u.properties&&u.properties&&"undefined"!=typeof u.properties.anchor&&u.properties.anchor&&(o="pixels",s=u.properties.anchor);f=new ol.style.Style({image:new ol.style.Icon({src:u.imageSrc,anchorXUnits:o,anchorYUnits:o,anchor:s})});break;case"circle":e=n.GeometryType.Circle;f=new ol.style.Style({stroke:new ol.style.Stroke({color:u.properties.strokeColor,width:u.properties.strokeWidth}),fill:new ol.style.Fill({color:u.properties.fillColor})});break;case"polygon":e=n.GeometryType.Polygon;f=new ol.style.Style({stroke:new ol.style.Stroke({color:u.properties.strokeColor,width:u.properties.strokeWidth}),fill:new ol.style.Fill({color:u.properties.fillColor})});break;case"arrow":e=n.GeometryType.LineString;f=new ol.style.Style({stroke:new ol.style.Stroke({color:u.properties.strokeColor,width:u.properties.strokeWidth}),fill:new ol.style.Fill({color:u.properties.fillColor})});u.maxPoints=2;f=function(n){var i=n.getGeometry(),t=[new ol.style.Style({stroke:new ol.style.Stroke({color:u.properties.strokeColor,width:u.properties.strokeWidth})})];return i.forEachSegment(function(n,i){var r=i[0]-n[0],f=i[1]-n[1],e=Math.atan2(f,r);t.push(new ol.style.Style({geometry:new ol.geom.Point(i),image:new ol.style.Icon({src:"data:image/svg+xml,%3Csvg xmlns:svg='http://www.w3.org/2000/svg' xmlns='http://www.w3.org/2000/svg' height='32' id='Layer_1' version='1.1' viewBox='0 0 18 32' width='18' xml:space='preserve'%3E%3Cpolyline points='0,6 17,16 0,26' id='pl' style='fill:none;stroke:"+u.properties.strokeColor.replace("#","%23")+";stroke-width:"+u.properties.strokeWidth+"'/%3E%3C/svg%3E",anchor:[.75,.5],rotateWithView:!0,rotation:-e})}))}),t}}h=new ol.layer.Vector({source:new ol.source.Vector({wrapX:!1,useSpatialIndex:!1}),style:f});r._vectorLayers[u.id]=h;u.geometryType=e;r._annotationTypesDict[u.id]=u},r=this,i=0;i<t.length;i++)u(i);this._activeTypeId=Object.keys(this._vectorLayers)[0];this._activeLayer=this._vectorLayers[this._activeTypeId]}return t.prototype.getActiveSource=function(){return this._activeLayer.getSource()},t.prototype.setActiveSource=function(n){var t=!!this._vectorLayers&&Object.prototype.hasOwnProperty.call(this._vectorLayers,n.toString());t&&(this._activeTypeId=n,this._activeLayer=this._vectorLayers[n])},t.prototype.getActiveType=function(){return this._annotationTypesDict[this._activeTypeId]},t.prototype.getTypeById=function(n){return this._annotationTypesDict[n]},t.prototype.getFeaturesAll=function(){for(var r,n=[],i=this.getLayers(),t=0;t<i.length;t++)r=i[t],n.push(r.getSource().getFeatures());return n=[].concat.apply([],n),n?n:null},t.prototype.getLayers=function(){return n.Tools.getObjectValues(this._vectorLayers)},t.prototype.getLayerById=function(n){return this._vectorLayers[n]},t.prototype.seedFeature=function(n){var t=new ol.Feature({geometry:n.geometry});t.setId(n.id);n.typeId&&this.setActiveSource(n.typeId);this.getActiveSource().addFeature(t)},t.prototype.seedFeatures=function(n){var t,i;for(t in n)n.hasOwnProperty(t)&&(i=n[t],this.seedFeature(i))},t.prototype.removeAllFeatures=function(){var n,t;for(n in this._vectorLayers)this._vectorLayers.hasOwnProperty(n)&&(t=this._vectorLayers[n],t.getSource().clear())},t}();n.LayerSet=t}(Zoomable||(Zoomable={}));!function(n){var t=function(){function n(){}return n.prototype.create=function(n,t){var r=this.initLayers(n,t.getLayers()),i=new ol.Map({target:n.containerId,layers:r,view:this.createView(n),controls:ol.control.defaults({attribution:!1,rotate:!1,zoom:n.zoomControl}),loadTilesWhileAnimating:!0,loadTilesWhileInteracting:!0,interactions:ol.interaction.defaults({altShiftDragRotate:!1,pinchRotate:!1}),moveTolerance:5}),u;return n.scaleLineControl&&(u=new ol.control.ScaleLine({units:"metric"}),i.addControl(u)),this.addOverviewControl(n,i,r[0]),i},n.prototype.createView=function(n,t){void 0===t&&(t=null);var r=new ol.proj.Projection({code:"ZoomableImageProjection",units:"pixels",extent:[0,-n.height,n.width,0],metersPerUnit:n.metersPerPixel,getPointResolution:function(n){return n}}),u=t?t.get("center"):n.center?n.center:[n.width/2,-n.height/2],f=t?t.get("rotation"):n.initialRotation*Math.PI/180,e=this.calculateResolutions(n),i=new ol.View({projection:r,center:u,zoom:t?t.getZoom():n.initialZoomLevel,resolutions:e,extent:[0,-n.height,n.width,0],rotation:f});return i.on("change:resolution",function(){n.onResolutionChanged&&"function"==typeof n.onResolutionChanged&&n.onResolutionChanged()}),i},n.prototype.addOverviewControl=function(n,t,i){if(n.overviewControl){var r=new ol.control.OverviewMap({className:"ol-overviewmap",layers:[i],collapsible:n.overviewControlCollapsible,collapsed:n.overviewControlCollapsed,tipLabel:"",label:n.overviewControlLabel,collapseLabel:n.overviewControlCollapseLabel});t.addControl(r)}},n.prototype.initLayers=function(n,t){var r=[],i,u;for(r.push(this.initBaseLayer(n)),i=0;i<t.length;i++)u=t[i],r.push(u);return r},n.prototype.initBaseLayer=function(n){var i=new ol.source.Zoomify({size:[n.width,n.height],tileSize:n.tileSize,crossOrigin:n.snapshotButtonId?"undefined":null}),t;return i.setTileUrlFunction(function(t){var i=n.zoomLevelOffset;return n.url.replace("{z}",(i+t[0]).toString()).replace("{x}",t[1].toString()).replace("{y}",(-t[2]-1).toString())}),t=n.onTileLoad,"undefined"!=typeof t&&null!==t&&i.setTileLoadFunction(function(i){t(i,n.zoomLevelOffset)}),new ol.layer.Tile({source:i,preload:3})},n.prototype.calculateResolutions=function(n){for(var t=[],r=n.numberOfZoomLevels-(1+n.minZoomLevel),i=r;i>=0;i--)t.push(Math.pow(2,i));return n.extraZoomEnabled&&(t.push(.5),t.push(.25)),t},n}();n.MapFactory=t}(Zoomable||(Zoomable={}));!function(n){var t=function(){function n(n){var i,t;this._isDefined=!0;this._isShown=!1;void 0!==typeof n&&n||(this._isDefined=!1);this._popupContainerElement=document.getElementById(n);this._popupContainerElement||(this._isDefined=!1);i={};i.duration=250;t={};t.element=this._popupContainerElement;t.autoPan=!0;t.autoPanAnimation=i;t.positioning="bottom-center";this._popupOverlay=new ol.Overlay(t)}return n.prototype.isDefined=function(){return this._isDefined},n.prototype.setCallbacks=function(n,t){this._onPopupShown=n;this._onPopupHidden=t},n.prototype.getOverlay=function(){return this._popupOverlay},n.prototype.hide=function(){return this._popupContainerElement&&this._isShown?(this._popupContainerElement.style.display="none",this._popupOverlay.setPosition(void 0),this._isShown=!1,void(this._onPopupHidden&&this._onPopupHidden())):null},n.prototype.showAt=function(n){return this._popupContainerElement?(this._popupContainerElement.style.display="block",this._popupOverlay.setPosition(n),this._onPopupShown&&!this._isShown&&this._onPopupShown(),void(this._isShown=!0)):null},n}();n.Popup=t}(Zoomable||(Zoomable={}));log2=Math.log2||function(n){return Math.log(n)*Math.LOG2E};!function(n){var t=function(){function t(){this.encoder=new n.Encoder;this.httpClient=window.axios.create()}return t.prototype.getMap=function(n,t){var i=this,r=t?n:n+"?"+(new Date).getTime().toString();return this.httpClient.get(r,{responseType:"arraybuffer"}).then(function(n){var t={signature:null,version:null,tilesContainerType:null,mapHeader:{imageWidth:null,imageHeight:null,tileSize:null,overlap:null,tileExtension:null,layout:null,dziOffset:null,dziLength:null,propertiesOffset:null,propertiesLength:null},mapBody:null},u=new Uint8Array(n.data),r,f;if(t.signature=i.readInt32(u,0),1819242339!==t.signature&&2054123373!==t.signature)throw new Error("sziContainer can not process map - unknown signature");if(t.version=u.subarray(4,5)[0],t.tilesContainerType=u.subarray(5,6)[0],20!==t.version||1!==t.tilesContainerType&&2!==t.tilesContainerType){if(21!==t.version||1!==t.tilesContainerType&&2!==t.tilesContainerType)throw new Error("sziContainer can not process map of this version/tilesContainerType");r=u.subarray(6,82);t.mapHeader.imageWidth=i.readInt32(r,0);t.mapHeader.imageHeight=i.readInt32(r,4);t.mapHeader.tileSize=i.readInt16(r,8);t.mapHeader.overlap=i.readInt16(r,10);t.mapHeader.tileExtension=r[12];t.mapHeader.layout=r[13];t.mapHeader.dziOffset=i.readInt32(r,14);t.mapHeader.dziLength=i.readInt32(r,22);t.mapHeader.propertiesOffset=i.readInt32(r,26);t.mapHeader.propertiesLength=i.readInt32(r,34);t.mapHeader.associatedImages={};t.mapHeader.associatedImages.macroOffset=i.readInt32(r,38);t.mapHeader.associatedImages.macroLength=i.readInt32(r,46);t.mapHeader.associatedImages.labelOffset=i.readInt32(r,50);t.mapHeader.associatedImages.labelLength=i.readInt32(r,58);t.mapHeader.associatedImages.thumbnailOffset=i.readInt32(r,62);t.mapHeader.associatedImages.thumbnailLength=i.readInt32(r,70);f=(u.length-80)/4;t.mapBody=new Int32Array(n.data,80,f)}else r=u.subarray(6,46),t.mapHeader.imageWidth=i.readInt32(r,0),t.mapHeader.imageHeight=i.readInt32(r,4),t.mapHeader.tileSize=i.readInt16(r,8),t.mapHeader.overlap=i.readInt16(r,10),t.mapHeader.tileExtension=r[12],t.mapHeader.layout=r[13],t.mapHeader.dziOffset=i.readInt32(r,14),t.mapHeader.dziLength=i.readInt32(r,22),t.mapHeader.propertiesOffset=i.readInt32(r,26),t.mapHeader.propertiesLength=i.readInt32(r,34),f=(u.length-44)/4,t.mapBody=new Int32Array(n.data,44,f);return t.levels=i.calculateLevels(t.mapHeader.imageWidth,t.mapHeader.imageHeight,t.mapHeader.tileSize),t})},t.prototype.getTile=function(n,t,i,r){var d=this,g=i[0],nt=i[1],tt=-i[2]-1,y=t.levels[g+r],h=y.tilesBefore+y.tilesInY*nt+tt,u=0,s=0,p=2147483647,c=4294967295,w,f,b,o,v,k;if(20===t.version){if(1===t.tilesContainerType)f=2*h,u=t.mapBody[f],u<0&&(u=p+1+Math.abs(-2147483648-u)),w=t.mapBody[f+1],s=u+w;else if(2===t.tilesContainerType){var f=3*h,l=t.mapBody[f],e=t.mapBody[f+1];if(e<0)throw new Error("sziContainer can not process map - unknown signature");o=0;l<0&&(o=c+1);u=c*e+l+e+o;s=u+t.mapBody[f+2]}}else{if(21!==t.version)throw new Error("sziContainer can not process map of this version");if(1===t.tilesContainerType)f=2*h,u=t.mapBody[f],u<0&&(u=p+1+Math.abs(-2147483648-u)),b=t.mapBody[f+1],s=u+b;else if(2===t.tilesContainerType){var a=3*h,l=t.mapBody[a],e=t.mapBody[a+1];if(e<0)throw new Error("sziContainer can not process map - unknown signature");o=0;l<0&&(o=c+1);u=c*e+l+e+o;s=u+t.mapBody[a+2]}}return v="bytes="+u+"-"+s,k={headers:{"x-ms-range":v,"Content-Type":"image/jpeg"},responseType:"arraybuffer"},this.httpClient.get(n+"?"+v,k).then(function(n){return"data:image/jpeg;base64,"+d.encoder.toBase64(n.data)})},t.prototype.calculateLevels=function(n,t,i){for(var h,r,e=n,o=t,l=n>t?n:t,s=Math.ceil(log2(l)+1),u=Array.apply(null,Array(s-1)).map(function(){}),f=s-1;f>=0;f--){var a=Math.ceil(e/i),c=Math.ceil(o/i),v=a*c;u[f]={tilesNumber:v,tilesInY:c,num:f};e=Math.ceil(e/2);o=Math.ceil(o/2)}for(h=0,r=0;r<s;r++)u[r].tilesBefore=h,h+=u[r].tilesNumber;return u},t.prototype.readInt16=function(n,t){return n[t]|n[t+1]<<8},t.prototype.readInt32=function(n,t){return n[t]|n[t+1]<<8|n[t+2]<<16|n[t+3]<<24},t}();n.SziContainer=t}(Zoomable||(Zoomable={}));!function(n){var t;!function(n){function t(){function n(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return n()+n()+"-"+n()+"-"+n()+"-"+n()+"-"+n()+n()+n()}function i(n,t,i,r){var u=document.createElement(n);return u.setAttribute("class",t),i&&(u.innerHTML=i),r&&(u.onclick=r),u}function r(n){return Math.log(n)*Math.LOG2E}function u(n){var t=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&t.push(n[i]);return t}n.newGuid=t;n.createHTMLElement=i;n.MathLog2=r;n.getObjectValues=u}(t=n.Tools||(n.Tools={}))}(Zoomable||(Zoomable={}));!function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.axios=t():n.axios=t()}(this,function(){return function(n){function t(r){if(i[r])return i[r].exports;var u=i[r]={exports:{},id:r,loaded:!1};return n[r].call(u.exports,u,u.exports,t),u.loaded=!0,u.exports}var i={};return t.m=n,t.c=i,t.p="",t(0)}([function(n,t,i){n.exports=i(1)},function(n,t,i){"use strict";function f(n){var t=new u(n),i=o(u.prototype.request,t);return e.extend(i,u.prototype,t),e.extend(i,t),i}var e=i(2),o=i(3),u=i(4),s=i(22),h=i(10),r=f(h);r.Axios=u;r.create=function(n){return f(s(r.defaults,n))};r.Cancel=i(23);r.CancelToken=i(24);r.isCancel=i(9);r.all=function(n){return Promise.all(n)};r.spread=i(25);n.exports=r;n.exports.default=r},function(n,t,i){"use strict";function o(n){return"[object Array]"===r.call(n)}function f(n){return"undefined"==typeof n}function l(n){return null!==n&&!f(n)&&null!==n.constructor&&!f(n.constructor)&&"function"==typeof n.constructor.isBuffer&&n.constructor.isBuffer(n)}function a(n){return"[object ArrayBuffer]"===r.call(n)}function v(n){return"undefined"!=typeof FormData&&n instanceof FormData}function y(n){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer&&n.buffer instanceof ArrayBuffer}function p(n){return"string"==typeof n}function w(n){return"number"==typeof n}function s(n){return null!==n&&"object"==typeof n}function b(n){return"[object Date]"===r.call(n)}function k(n){return"[object File]"===r.call(n)}function d(n){return"[object Blob]"===r.call(n)}function h(n){return"[object Function]"===r.call(n)}function g(n){return s(n)&&h(n.pipe)}function nt(n){return"undefined"!=typeof URLSearchParams&&n instanceof URLSearchParams}function tt(n){return n.replace(/^\s*/,"").replace(/\s*$/,"")}function it(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document}function u(n,t){var i,u,r;if(null!==n&&"undefined"!=typeof n)if("object"!=typeof n&&(n=[n]),o(n))for(i=0,u=n.length;i<u;i++)t.call(null,n[i],i,n);else for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&t.call(null,n[r],r,n)}function c(){function i(t,i){n[i]="object"==typeof n[i]&&"object"==typeof t?c(n[i],t):t}for(var n={},t=0,r=arguments.length;t<r;t++)u(arguments[t],i);return n}function e(){function i(t,i){n[i]="object"==typeof n[i]&&"object"==typeof t?e(n[i],t):"object"==typeof t?e({},t):t}for(var n={},t=0,r=arguments.length;t<r;t++)u(arguments[t],i);return n}function rt(n,t,i){return u(t,function(t,r){n[r]=i&&"function"==typeof t?ut(t,i):t}),n}var ut=i(3),r=Object.prototype.toString;n.exports={isArray:o,isArrayBuffer:a,isBuffer:l,isFormData:v,isArrayBufferView:y,isString:p,isNumber:w,isObject:s,isUndefined:f,isDate:b,isFile:k,isBlob:d,isFunction:h,isStream:g,isURLSearchParams:nt,isStandardBrowserEnv:it,forEach:u,merge:c,deepMerge:e,extend:rt,trim:tt}},function(n){"use strict";n.exports=function(n,t){return function(){for(var r=new Array(arguments.length),i=0;i<r.length;i++)r[i]=arguments[i];return n.apply(t,r)}}},function(n,t,i){"use strict";function r(n){this.defaults=n;this.interceptors={request:new f,response:new f}}var u=i(2),o=i(5),f=i(6),s=i(7),e=i(22);r.prototype.request=function(n){"string"==typeof n?(n=arguments[1]||{},n.url=arguments[0]):n=n||{};n=e(this.defaults,n);n.method=n.method?n.method.toLowerCase():this.defaults.method?this.defaults.method.toLowerCase():"get";var t=[s,void 0],i=Promise.resolve(n);for(this.interceptors.request.forEach(function(n){t.unshift(n.fulfilled,n.rejected)}),this.interceptors.response.forEach(function(n){t.push(n.fulfilled,n.rejected)});t.length;)i=i.then(t.shift(),t.shift());return i};r.prototype.getUri=function(n){return n=e(this.defaults,n),o(n.url,n.params,n.paramsSerializer).replace(/^\?/,"")};u.forEach(["delete","get","head","options"],function(n){r.prototype[n]=function(t,i){return this.request(u.merge(i||{},{method:n,url:t}))}});u.forEach(["post","put","patch"],function(n){r.prototype[n]=function(t,i,r){return this.request(u.merge(r||{},{method:n,url:t,data:i}))}});n.exports=r},function(n,t,i){"use strict";function u(n){return encodeURIComponent(n).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var r=i(2);n.exports=function(n,t,i){var f,e,o;return t?(i?f=i(t):r.isURLSearchParams(t)?f=t.toString():(e=[],r.forEach(t,function(n,t){null!==n&&"undefined"!=typeof n&&(r.isArray(n)?t+="[]":n=[n],r.forEach(n,function(n){r.isDate(n)?n=n.toISOString():r.isObject(n)&&(n=JSON.stringify(n));e.push(u(t)+"="+u(n))}))}),f=e.join("&")),f&&(o=n.indexOf("#"),o!==-1&&(n=n.slice(0,o)),n+=(n.indexOf("?")===-1?"?":"&")+f),n):n}},function(n,t,i){"use strict";function r(){this.handlers=[]}var u=i(2);r.prototype.use=function(n,t){return this.handlers.push({fulfilled:n,rejected:t}),this.handlers.length-1};r.prototype.eject=function(n){this.handlers[n]&&(this.handlers[n]=null)};r.prototype.forEach=function(n){u.forEach(this.handlers,function(t){null!==t&&n(t)})};n.exports=r},function(n,t,i){"use strict";function r(n){n.cancelToken&&n.cancelToken.throwIfRequested()}var f=i(2),u=i(8),e=i(9),o=i(10);n.exports=function(n){r(n);n.headers=n.headers||{};n.data=u(n.data,n.headers,n.transformRequest);n.headers=f.merge(n.headers.common||{},n.headers[n.method]||{},n.headers);f.forEach(["delete","get","head","post","put","patch","common"],function(t){delete n.headers[t]});var t=n.adapter||o.adapter;return t(n).then(function(t){return r(n),t.data=u(t.data,t.headers,n.transformResponse),t},function(t){return e(t)||(r(n),t&&t.response&&(t.response.data=u(t.response.data,t.response.headers,n.transformResponse))),Promise.reject(t)})}},function(n,t,i){"use strict";var r=i(2);n.exports=function(n,t,i){return r.forEach(i,function(i){n=i(n,t)}),n}},function(n){"use strict";n.exports=function(n){return!(!n||!n.__CANCEL__)}},function(n,t,i){"use strict";function f(n,t){!r.isUndefined(n)&&r.isUndefined(n["Content-Type"])&&(n["Content-Type"]=t)}function o(){var n;return"undefined"!=typeof XMLHttpRequest?n=i(12):"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(n=i(12)),n}var r=i(2),e=i(11),s={"Content-Type":"application/x-www-form-urlencoded"},u={adapter:o(),transformRequest:[function(n,t){return e(t,"Accept"),e(t,"Content-Type"),r.isFormData(n)||r.isArrayBuffer(n)||r.isBuffer(n)||r.isStream(n)||r.isFile(n)||r.isBlob(n)?n:r.isArrayBufferView(n)?n.buffer:r.isURLSearchParams(n)?(f(t,"application/x-www-form-urlencoded;charset=utf-8"),n.toString()):r.isObject(n)?(f(t,"application/json;charset=utf-8"),JSON.stringify(n)):n}],transformResponse:[function(n){if("string"==typeof n)try{n=JSON.parse(n)}catch(n){}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(n){return n>=200&&n<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}};r.forEach(["delete","get","head"],function(n){u.headers[n]={}});r.forEach(["post","put","patch"],function(n){u.headers[n]=r.merge(s)});n.exports=u},function(n,t,i){"use strict";var r=i(2);n.exports=function(n,t){r.forEach(n,function(i,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(n[t]=i,delete n[r])})}},function(n,t,i){"use strict";var r=i(2),f=i(13),e=i(5),o=i(16),s=i(19),h=i(20),u=i(14);n.exports=function(n){return new Promise(function(t,c){var a=n.data,v=n.headers,l,w,b,y,k,p;if(r.isFormData(a)&&delete v["Content-Type"],l=new XMLHttpRequest,n.auth&&(w=n.auth.username||"",b=n.auth.password||"",v.Authorization="Basic "+btoa(w+":"+b)),y=o(n.baseURL,n.url),(l.open(n.method.toUpperCase(),e(y,n.params,n.paramsSerializer),!0),l.timeout=n.timeout,l.onreadystatechange=function(){if(l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))){var i="getAllResponseHeaders"in l?s(l.getAllResponseHeaders()):null,r=n.responseType&&"text"!==n.responseType?l.response:l.responseText,u={data:r,status:l.status,statusText:l.statusText,headers:i,config:n,request:l};f(t,c,u);l=null}},l.onabort=function(){l&&(c(u("Request aborted",n,"ECONNABORTED",l)),l=null)},l.onerror=function(){c(u("Network Error",n,null,l));l=null},l.ontimeout=function(){var t="timeout of "+n.timeout+"ms exceeded";n.timeoutErrorMessage&&(t=n.timeoutErrorMessage);c(u(t,n,"ECONNABORTED",l));l=null},r.isStandardBrowserEnv())&&(k=i(21),p=(n.withCredentials||h(y))&&n.xsrfCookieName?k.read(n.xsrfCookieName):void 0,p&&(v[n.xsrfHeaderName]=p)),"setRequestHeader"in l&&r.forEach(v,function(n,t){"undefined"==typeof a&&"content-type"===t.toLowerCase()?delete v[t]:l.setRequestHeader(t,n)}),r.isUndefined(n.withCredentials)||(l.withCredentials=!!n.withCredentials),n.responseType)try{l.responseType=n.responseType}catch(t){if("json"!==n.responseType)throw t;}"function"==typeof n.onDownloadProgress&&l.addEventListener("progress",n.onDownloadProgress);"function"==typeof n.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",n.onUploadProgress);n.cancelToken&&n.cancelToken.promise.then(function(n){l&&(l.abort(),c(n),l=null)});void 0===a&&(a=null);l.send(a)})}},function(n,t,i){"use strict";var r=i(14);n.exports=function(n,t,i){var u=i.config.validateStatus;!u||u(i.status)?n(i):t(r("Request failed with status code "+i.status,i.config,null,i.request,i))}},function(n,t,i){"use strict";var r=i(15);n.exports=function(n,t,i,u,f){var e=new Error(n);return r(e,t,i,u,f)}},function(n){"use strict";n.exports=function(n,t,i,r,u){return n.config=t,i&&(n.code=i),n.request=r,n.response=u,n.isAxiosError=!0,n.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},n}},function(n,t,i){"use strict";var r=i(17),u=i(18);n.exports=function(n,t){return n&&!r(t)?u(n,t):t}},function(n){"use strict";n.exports=function(n){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(n)}},function(n){"use strict";n.exports=function(n,t){return t?n.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):n}},function(n,t,i){"use strict";var r=i(2),u=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];n.exports=function(n){var t,f,e,i={};return n?(r.forEach(n.split("\n"),function(n){if(e=n.indexOf(":"),t=r.trim(n.substr(0,e)).toLowerCase(),f=r.trim(n.substr(e+1)),t){if(i[t]&&u.indexOf(t)>=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([f]):i[t]?i[t]+", "+f:f}}),i):i}},function(n,t,i){"use strict";var r=i(2);n.exports=r.isStandardBrowserEnv()?function(){function i(t){var i=t;return u&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}var t,u=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");return t=i(window.location.href),function(n){var u=r.isString(n)?i(n):n;return u.protocol===t.protocol&&u.host===t.host}}():function(){return function(){return!0}}()},function(n,t,i){"use strict";var r=i(2);n.exports=r.isStandardBrowserEnv()?function(){return{write:function(n,t,i,u,f,e){var o=[];o.push(n+"="+encodeURIComponent(t));r.isNumber(i)&&o.push("expires="+new Date(i).toGMTString());r.isString(u)&&o.push("path="+u);r.isString(f)&&o.push("domain="+f);e===!0&&o.push("secure");document.cookie=o.join("; ")},read:function(n){var t=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(n,t,i){"use strict";var r=i(2);n.exports=function(n,t){var o,s;t=t||{};var i={},u=["url","method","params","data"],f=["headers","auth","proxy"],e=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];return r.forEach(u,function(n){"undefined"!=typeof t[n]&&(i[n]=t[n])}),r.forEach(f,function(u){r.isObject(t[u])?i[u]=r.deepMerge(n[u],t[u]):"undefined"!=typeof t[u]?i[u]=t[u]:r.isObject(n[u])?i[u]=r.deepMerge(n[u]):"undefined"!=typeof n[u]&&(i[u]=n[u])}),r.forEach(e,function(r){"undefined"!=typeof t[r]?i[r]=t[r]:"undefined"!=typeof n[r]&&(i[r]=n[r])}),o=u.concat(f).concat(e),s=Object.keys(t).filter(function(n){return o.indexOf(n)===-1}),r.forEach(s,function(r){"undefined"!=typeof t[r]?i[r]=t[r]:"undefined"!=typeof n[r]&&(i[r]=n[r])}),i}},function(n){"use strict";function t(n){this.message=n}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};t.prototype.__CANCEL__=!0;n.exports=t},function(n,t,i){"use strict";function r(n){var i,t;if("function"!=typeof n)throw new TypeError("executor must be a function.");this.promise=new Promise(function(n){i=n});t=this;n(function(n){t.reason||(t.reason=new u(n),i(t.reason))})}var u=i(23);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason;};r.source=function(){var n,t=new r(function(t){n=t});return{token:t,cancel:n}};n.exports=r},function(n){"use strict";n.exports=function(n){return function(t){return n.apply(null,t)}}}])})