1
0
mirror of https://github.com/bitwarden/web synced 2025-12-06 00:03:28 +00:00
Files
web/js/lib.min.js
2017-11-08 22:03:30 -05:00

1 line
380 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

function _init(){"use strict";$.AdminLTE.layout={activate:function(){var t=this;t.fix(),t.fixSidebar(),$("body, html, .wrapper").css("height","auto"),$(window,".wrapper").resize(function(){t.fix(),t.fixSidebar()})},fix:function(){$(".layout-boxed > .wrapper").css("overflow","hidden");var t=$(".main-footer").outerHeight()||0,e=$(".main-header").outerHeight()+t,n=$(window).height(),r=$(".sidebar").height()||0;if($("body").hasClass("fixed"))$(".content-wrapper, .right-side").css("min-height",n-t);else{var i;n>=r?($(".content-wrapper, .right-side").css("min-height",n-e),i=n-e):($(".content-wrapper, .right-side").css("min-height",r),i=r);var o=$($.AdminLTE.options.controlSidebarOptions.selector);void 0!==o&&o.height()>i&&$(".content-wrapper, .right-side").css("min-height",o.height())}},fixSidebar:function(){$("body").hasClass("fixed")?(void 0===$.fn.slimScroll&&window.console&&window.console.error("Error: the fixed layout requires the slimscroll plugin!"),$.AdminLTE.options.sidebarSlimScroll&&void 0!==$.fn.slimScroll&&($(".sidebar").slimScroll({destroy:!0}).height("auto"),$(".sidebar").slimScroll({height:$(window).height()-$(".main-header").height()+"px",color:"rgba(0,0,0,0.2)",size:"3px"}))):void 0!==$.fn.slimScroll&&$(".sidebar").slimScroll({destroy:!0}).height("auto")}},$.AdminLTE.pushMenu={activate:function(t){var e=$.AdminLTE.options.screenSizes;$(document).on("click",t,function(t){t.preventDefault(),$(window).width()>e.sm-1?$("body").hasClass("sidebar-collapse")?$("body").removeClass("sidebar-collapse").trigger("expanded.pushMenu"):$("body").addClass("sidebar-collapse").trigger("collapsed.pushMenu"):$("body").hasClass("sidebar-open")?$("body").removeClass("sidebar-open").removeClass("sidebar-collapse").trigger("collapsed.pushMenu"):$("body").addClass("sidebar-open").trigger("expanded.pushMenu")}),$(".content-wrapper").click(function(){$(window).width()<=e.sm-1&&$("body").hasClass("sidebar-open")&&$("body").removeClass("sidebar-open")}),($.AdminLTE.options.sidebarExpandOnHover||$("body").hasClass("fixed")&&$("body").hasClass("sidebar-mini"))&&this.expandOnHover()},expandOnHover:function(){var t=this,e=$.AdminLTE.options.screenSizes.sm-1;$(".main-sidebar").hover(function(){$("body").hasClass("sidebar-mini")&&$("body").hasClass("sidebar-collapse")&&$(window).width()>e&&t.expand()},function(){$("body").hasClass("sidebar-mini")&&$("body").hasClass("sidebar-expanded-on-hover")&&$(window).width()>e&&t.collapse()})},expand:function(){$("body").removeClass("sidebar-collapse").addClass("sidebar-expanded-on-hover")},collapse:function(){$("body").hasClass("sidebar-expanded-on-hover")&&$("body").removeClass("sidebar-expanded-on-hover").addClass("sidebar-collapse")}},$.AdminLTE.tree=function(t){var e=this,n=$.AdminLTE.options.animationSpeed;$(document).off("click",t+" li a").on("click",t+" li a",function(t){var r=$(this),i=r.next();if(i.is(".treeview-menu")&&i.is(":visible")&&!$("body").hasClass("sidebar-collapse"))i.slideUp(n,function(){i.removeClass("menu-open")}),i.parent("li").removeClass("active");else if(i.is(".treeview-menu")&&!i.is(":visible")){var o=r.parents("ul").first();o.find("ul:visible").slideUp(n).removeClass("menu-open");var a=r.parent("li");i.slideDown(n,function(){i.addClass("menu-open"),o.find("li.active").removeClass("active"),a.addClass("active"),e.layout.fix()})}i.is(".treeview-menu")&&t.preventDefault()})},$.AdminLTE.controlSidebar={activate:function(){var t=this,e=$.AdminLTE.options.controlSidebarOptions,n=$(e.selector);$(e.toggleBtnSelector).on("click",function(r){r.preventDefault(),n.hasClass("control-sidebar-open")||$("body").hasClass("control-sidebar-open")?t.close(n,e.slide):t.open(n,e.slide)});var r=$(".control-sidebar-bg");t._fix(r),$("body").hasClass("fixed")?t._fixForFixed(n):$(".content-wrapper, .right-side").height()<n.height()&&t._fixForContent(n)},open:function(t,e){e?t.addClass("control-sidebar-open"):$("body").addClass("control-sidebar-open")},close:function(t,e){e?t.removeClass("control-sidebar-open"):$("body").removeClass("control-sidebar-open")},_fix:function(t){var e=this;if($("body").hasClass("layout-boxed")){if(t.css("position","absolute"),t.height($(".wrapper").height()),e.hasBindedResize)return;$(window).resize(function(){e._fix(t)}),e.hasBindedResize=!0}else t.css({position:"fixed",height:"auto"})},_fixForFixed:function(t){t.css({position:"fixed","max-height":"100%",overflow:"auto","padding-bottom":"50px"})},_fixForContent:function(t){$(".content-wrapper, .right-side").css("min-height",t.height())}},$.AdminLTE.boxWidget={selectors:$.AdminLTE.options.boxWidgetOptions.boxWidgetSelectors,icons:$.AdminLTE.options.boxWidgetOptions.boxWidgetIcons,animationSpeed:$.AdminLTE.options.animationSpeed,activate:function(t){var e=this;t||(t=document),$(t).on("click",e.selectors.collapse,function(t){t.preventDefault(),e.collapse($(this))}),$(t).on("click",e.selectors.remove,function(t){t.preventDefault(),e.remove($(this))})},collapse:function(t){var e=this,n=t.parents(".box").first(),r=n.find("> .box-body, > .box-footer, > form >.box-body, > form > .box-footer");n.hasClass("collapsed-box")?(t.children(":first").removeClass(e.icons.open).addClass(e.icons.collapse),r.slideDown(e.animationSpeed,function(){n.removeClass("collapsed-box")})):(t.children(":first").removeClass(e.icons.collapse).addClass(e.icons.open),r.slideUp(e.animationSpeed,function(){n.addClass("collapsed-box")}))},remove:function(t){t.parents(".box").first().slideUp(this.animationSpeed)}}}!function(t,e){"use strict";function n(t){return["a:","button:","button:button","button:submit","input:button","input:submit"].indexOf(t.tagName.toLowerCase()+":"+(t.type||""))>=0}function r(t){return n(t)?t.innerText||t.value:t.id||t.name||t.tagName}function i(t){return"analytics"===t.substr(0,9)&&-1===["On","Event","If","Properties","EventType"].indexOf(t.substr(9))}function o(t){var e=t.slice(9);return void 0!==e&&null!==e&&e.length>0?e.substring(0,1).toLowerCase()+e.substring(1):e}var a=window.angulartics||(window.angulartics={});a.waitForVendorCount=0,a.waitForVendorApi=function(t,e,n,r,i){i||a.waitForVendorCount++,r||(r=n,n=void 0),!Object.prototype.hasOwnProperty.call(window,t)||void 0!==n&&void 0===window[t][n]?setTimeout(function(){a.waitForVendorApi(t,e,n,r,!0)},e):(a.waitForVendorCount--,r(window[t]))},t.module("angulartics",[]).provider("$analytics",function(){function e(t){return function(){a.waitForVendorCount&&(d[t]||(d[t]=[]),d[t].push(arguments))}}function n(e,n,r){return f[e]||(f[e]=[]),f[e].push(n),h[n]=r,function(){if(!this.settings.optOut){var n=Array.prototype.slice.apply(arguments);return this.$inject(["$q",t.bind(this,function(r){return r.all(f[e].map(function(e){if((h[e]||{}).async){var i=r.defer(),o=t.copy(n);return o.unshift(i.resolve),e.apply(this,o),i.promise}return r.when(e.apply(this,n))},this))})])}}}function r(t,e){e?setTimeout(t,e):t()}function i(e,i,o){if(!c.developerMode){g[e]=n(e,i,o);var a=c[e],s=a?a.bufferFlushDelay:null,u=null!==s?s:c.bufferFlushDelay;t.forEach(d[e],function(t,e){r(function(){i.apply(this,t)},e*u)})}}function o(t){return t.replace(/^./,function(t){return t.toUpperCase()})}function s(t){var r="register"+o(t);m[r]=function(e,n){i(t,e,n)},g[t]=n(t,e(t))}function u(e,n,r){t.forEach(n,r);for(var i in e)l[i]=e[i]}var l=this,c={pageTracking:{autoTrackFirstPage:!0,autoTrackVirtualPages:!0,trackRelativePath:!1,trackRoutes:!0,trackStates:!0,autoBasePath:!1,basePath:"",excludedRoutes:[],queryKeysWhitelisted:[],queryKeysBlacklisted:[]},eventTracking:{},bufferFlushDelay:1e3,trackExceptions:!1,optOut:!1,developerMode:!1},p=["pageTrack","eventTrack","exceptionTrack","transactionTrack","setAlias","setUsername","setUserProperties","setUserPropertiesOnce","setSuperProperties","setSuperPropertiesOnce","incrementProperty","userTimings","clearCookies"],d={},f={},h={},g={settings:c};g.setOptOut=function(t){this.settings.optOut=t,y()},g.getOptOut=function(){return this.settings.optOut};var m={$get:["$injector",function(t){return v(t)}],api:g,settings:c,virtualPageviews:function(t){this.settings.pageTracking.autoTrackVirtualPages=t},trackStates:function(t){this.settings.pageTracking.trackStates=t},trackRoutes:function(t){this.settings.pageTracking.trackRoutes=t},excludeRoutes:function(t){this.settings.pageTracking.excludedRoutes=t},queryKeysWhitelist:function(t){this.settings.pageTracking.queryKeysWhitelisted=t},queryKeysBlacklist:function(t){this.settings.pageTracking.queryKeysBlacklisted=t},firstPageview:function(t){this.settings.pageTracking.autoTrackFirstPage=t},withBase:function(e){this.settings.pageTracking.basePath=e?t.element(document).find("base").attr("href"):""},withAutoBase:function(t){this.settings.pageTracking.autoBasePath=t},trackExceptions:function(t){this.settings.trackExceptions=t},developerMode:function(t){this.settings.developerMode=t}},v=function(e){return t.extend(g,{$inject:e.invoke})},y=function(){u(m,p,s)};u(m,p,s)}).run(["$rootScope","$window","$analytics","$injector",function(e,n,r,i){function o(t){for(var e=0;e<r.settings.pageTracking.excludedRoutes.length;e++){var n=r.settings.pageTracking.excludedRoutes[e];if(n instanceof RegExp&&n.test(t)||t.indexOf(n)>-1)return!0}return!1}function a(t,e){for(var n=[],r=0;r<t.length;r++)-1===e.indexOf(t[r])&&n.push(t[r]);return n}function s(t,e,n){if(/\?/.test(t)&&e.length>0){for(var r=t.split("?"),i=r[0],o=r[1].split("&"),s=[],u=0;u<e.length;u++)for(var l=e[u],c=0;c<o.length;c++)(l instanceof RegExp&&l.test(o[c])||o[c].indexOf(l)>-1)&&s.push(o[c]);var p="white"==n?s:a(o,s);return p.length>0?i+"?"+p.join("&"):i}return t}function u(t){return s(t,r.settings.pageTracking.queryKeysWhitelisted,"white")}function l(t){return s(t,r.settings.pageTracking.queryKeysBlacklisted,"black")}function c(t,e){o(t)||(t=l(t=u(t)),r.pageTrack(t,e))}r.settings.pageTracking.autoTrackFirstPage&&i.invoke(["$location",function(t){var e=!0;if(i.has("$route")){var o=i.get("$route");if(o)for(var a in o.routes){e=!1;break}else null===o&&(e=!1)}else if(i.has("$state")){var s=i.get("$state");for(var u in s.get()){e=!1;break}}e&&(r.settings.pageTracking.autoBasePath&&(r.settings.pageTracking.basePath=n.location.pathname),r.settings.pageTracking.trackRelativePath?c(r.settings.pageTracking.basePath+t.url(),t):c(t.absUrl(),t))}]),r.settings.pageTracking.autoTrackVirtualPages&&i.invoke(["$location",function(t){r.settings.pageTracking.autoBasePath&&(r.settings.pageTracking.basePath=n.location.pathname+"#");var o=!0;if(r.settings.pageTracking.trackRoutes&&i.has("$route")){var a=i.get("$route");if(a)for(var s in a.routes){o=!1;break}else null===a&&(o=!1);e.$on("$routeChangeSuccess",function(e,n){n&&(n.$$route||n).redirectTo||c(r.settings.pageTracking.basePath+t.url(),t)})}r.settings.pageTracking.trackStates&&(i.has("$state")&&!i.has("$transitions")&&(o=!1,e.$on("$stateChangeSuccess",function(e,n){c(r.settings.pageTracking.basePath+t.url(),t)})),i.has("$state")&&i.has("$transitions")&&(o=!1,i.invoke(["$transitions",function(e){e.onSuccess({},function(e){e.options().notify&&c(r.settings.pageTracking.basePath+t.url(),t)})}]))),o&&e.$on("$locationChangeSuccess",function(e,n){n&&(n.$$route||n).redirectTo||(r.settings.pageTracking.trackRelativePath?c(r.settings.pageTracking.basePath+t.url(),t):c(t.absUrl(),t))})}]),r.settings.developerMode&&t.forEach(r,function(t,e){"function"==typeof t&&(r[e]=function(){})})}]).directive("analyticsOn",["$analytics",function(e){return{restrict:"A",link:function(n,a,s){var u=s.analyticsOn||"click",l={};t.forEach(s.$attr,function(t,e){i(e)&&(l[o(e)]=s[e],s.$observe(e,function(t){l[o(e)]=t}))}),t.element(a[0]).bind(u,function(i){var o=s.analyticsEvent||r(a[0]);l.eventType=i.type,s.analyticsIf&&!n.$eval(s.analyticsIf)||(s.analyticsProperties&&t.extend(l,n.$eval(s.analyticsProperties)),e.eventTrack(o,l))})}}}]).config(["$provide",function(t){t.decorator("$exceptionHandler",["$delegate","$injector",function(t,e){return function(n,r){var i=t(n,r),o=e.get("$analytics");return o.settings.trackExceptions&&o.exceptionTrack(n,r),i}}])}])}(angular),function(){var t;(t=angular.module("ui.bootstrap.showErrors",[])).directive("showErrors",["$timeout","showErrorsConfig","$interpolate",function(t,e,n){var r,i,o;return i=function(t){var n;return n=e.trigger,t&&null!=t.trigger&&(n=t.trigger),n},r=function(t){var n;return n=e.showSuccess,t&&null!=t.showSuccess&&(n=t.showSuccess),n},o=function(e,o,a,s){var u,l,c,p,d,f,h,g;if(u=!1,d=e.$eval(a.showErrors),f=r(d),g=i(d),l=o[0].querySelector(".form-control[name]"),p=angular.element(l),!(c=n(p.attr("name")||"")(e)))throw"show-errors element has no child input elements with a 'name' attribute and a 'form-control' class";return p.bind(g,function(){return u=!0,h(s[c].$invalid)}),e.$watch(function(){return s[c]&&s[c].$invalid},function(t){if(u)return h(t)}),e.$on("show-errors-check-validity",function(){return h(s[c].$invalid)}),e.$on("show-errors-reset",function(){return t(function(){return o.removeClass("has-error"),o.removeClass("has-success"),u=!1},0,!1)}),h=function(t){if(o.toggleClass("has-error",t),f)return o.toggleClass("has-success",!t)}},{restrict:"A",require:"^form",compile:function(t,e){if(-1===e.showErrors.indexOf("skipFormGroupCheck")&&!t.hasClass("form-group")&&!t.hasClass("input-group"))throw"show-errors element does not have the 'form-group' or 'input-group' class";return o}}}]),t.provider("showErrorsConfig",function(){var t,e;t=!1,e="blur",this.showSuccess=function(e){return t=e},this.trigger=function(t){return e=t},this.$get=function(){return{showSuccess:t,trigger:e}}})}.call(this),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).angularCreditCards=t()}}(function(){return function t(e,n,r){function i(a,s){if(!n[a]){if(!e[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return i(n||t)},c,c.exports,t,e,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(t,e,n){"use strict";function r(t){return{restrict:"A",require:"ngModel",compile:function(e,n){return n.$set("maxlength",4),n.$set("pattern","[0-9]*"),n.$set("xAutocompletetype","cc-csc"),function(e,n,r,a){a.$validators.ccCvc=function(n){return a.$isEmpty(a.$viewValue)||i.isValid(n,t(r.ccType)(e))},r.ccType&&e.$watch(r.ccType,o.call(a.$validate,a))}}}}var i=t("creditcards").cvc,o=t("function-bind");e.exports=r,r.$inject=["$parse"]},{creditcards:13,"function-bind":18}],2:[function(t,e,n){"use strict";function r(t,e){function n(t){var n=t.month,r=t.year,i=null==n&&null==r||!!n&&!!r&&!o.isPast(n,r);a.$setValidity("ccExp",i,e)}var r={$setValidity:i},a=e.inheritedData("$formController")||r,s={year:{},month:{}};this.setMonth=function(t){s.month=t},this.setYear=function(t){s.year=t},this.$watch=function(){t.$watch(function(){return{month:s.month.$modelValue,year:s.year.$modelValue}},n,!0)}}function i(){}var o=t("creditcards").expiration,a=o.month,s=o.year,u=t("ap");n=e.exports=function(){return{restrict:"AE",require:"ccExp",controller:r,link:function(t,e,n,r){r.$watch()}}},r.$inject=["$scope","$element"];var l={setMonth:i,setYear:i};n.month=function(){return{restrict:"A",require:["ngModel","^?ccExp"],compile:function(t,e){return e.$set("maxlength",2),e.$set("pattern","[0-9]*"),e.$set("xAutocompletetype","cc-exp-month"),function(t,e,n,r){var i=r[0];(r[1]||l).setMonth(i),i.$parsers.unshift(a.parse),i.$validators.ccExpMonth=function(t){return i.$isEmpty(i.$viewValue)||a.isValid(t)}}}}},n.year=function(){return{restrict:"A",require:["ngModel","^?ccExp"],compile:function(t,e){var n=void 0!==e.fullYear;return e.$set("maxlength",n?4:2),e.$set("pattern","[0-9]*"),e.$set("xAutocompletetype","cc-exp-year"),function(t,e,r,i){var o=i[0];(i[1]||l).setYear(o),o.$parsers.unshift(u.partialRight(s.parse,!n)),o.$formatters.unshift(function(t){return t?s.format(t,!n):""}),o.$validators.ccExpYear=function(t){return o.$isEmpty(o.$viewValue)||s.isValid(t)&&!s.isPast(t)}}}}}},{ap:5,creditcards:13}],3:[function(t,e,n){(function(n){"use strict";var r="undefined"!=typeof window?window.angular:void 0!==n?n.angular:null,i=t("creditcards"),o=t("./number"),a=t("./cvc"),s=t("./expiration");e.exports=r.module("credit-cards",[]).value("creditcards",i).directive("ccNumber",o).directive("ccExp",s).directive("ccExpMonth",s.month).directive("ccExpYear",s.year).directive("ccCvc",a).name}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./cvc":1,"./expiration":2,"./number":4,creditcards:13}],4:[function(t,e,n){"use strict";function r(t,e){return{restrict:"A",require:["ngModel","ccNumber"],controller:function(){this.type=null,this.eagerType=null},compile:function(n,r){return r.$set("pattern","[0-9]*"),r.$set("xAutocompletetype","cc-number"),function(n,r,s,u){function l(){return p.$viewValue}function c(t,n){e(function(){if(t.setSelectionRange)t.setSelectionRange(n,n);else if(t.createTextRange){var e=t.createTextRange();e.move("character",n),e.select()}},0)}var p=u[0],d=u[1];n.$watch(s.ngModel,function(t){p.$ccType=d.type=i.type(t)}),null!=s.ccEagerType&&n.$watch(l,function(t){t=i.parse(t),p.$ccEagerType=d.eagerType=i.type(t,!0)}),s.ccType&&n.$watch(s.ccType,function(){p.$validate()}),null!=s.ccFormat&&(p.$formatters.unshift(i.format),r.on("input",function(){var t=r.val(),e=l();if(t){var n=r[0],o=i.format(i.parse(t)),a=n.selectionEnd;p.$setViewValue(o),p.$render(),e&&e.length<o.length&&(a=o.length),c(n,a)}})),p.$parsers.unshift(i.parse),p.$validators.ccNumber=function(t){return p.$isEmpty(p.$viewValue)||i.isValid(t)},p.$validators.ccNumberType=function(e){if(p.$isEmpty(p.$viewValue))return!0;var r=t(s.ccType)(n);return r||i.isValid(e),o(r).some(a(i.isValid,e))}}}}}var i=t("creditcards").card,o=t("cast-array"),a=t("ap").partial;e.exports=r,r.$inject=["$parse","$timeout"]},{ap:5,"cast-array":6,creditcards:13}],5:[function(t,e,n){function r(t,e){return function(){var n=[].slice.call(arguments),r=t.slice();return r.push.apply(r,n),e.apply(this,r)}}function i(t,e){return function(){var n=[].slice.call(arguments);return n.push.apply(n,t),e.apply(this,n)}}function o(t){return r([].slice.call(arguments,1),t)}function a(t){return i([].slice.call(arguments,1),t)}(n=e.exports=r).pa=i,n.apa=function(t,e,n){return function(){return n.apply(this,t.concat.apply(t,arguments).concat(e))}},n.partial=o,n.partialRight=a,n.curry=function(t){return o(o,t)},n.curryRight=function(t){return o(a,t)}},{}],6:[function(t,e,n){"use strict";var r=t("isarray");e.exports=function(t){return r(t)?t:[t]}},{isarray:22}],7:[function(t,e,n){"use strict";var r=n.types=t("./src/types");n.Type=t("./src/type"),n.find=function(t){for(var e in r){var n=r[e];if(t(n))return n}}},{"./src/type":8,"./src/types":9}],8:[function(t,e,n){"use strict";function r(t,e){i(this,{name:t},e)}var i=t("xtend/mutable");e.exports=r,r.prototype.cvcLength=3,r.prototype.luhn=!0,r.prototype.groupPattern=/(\d{1,4})(\d{1,4})?(\d{1,4})?(\d{1,4})?/,r.prototype.group=function(t){return(t.match(this.groupPattern)||[]).slice(1).filter(Boolean)},r.prototype.test=function(t,e){return this[e?"eagerPattern":"pattern"].test(t)}},{"xtend/mutable":30}],9:[function(t,e,n){"use strict";var r=t("./type"),i=/(\d{1,4})(\d{1,4})?(\d{1,4})?(\d{1,4})?(\d{1,3})?/;n.visa=new r("Visa",{pattern:/^4\d{12}(\d{3}|\d{6})?$/,eagerPattern:/^4/,groupPattern:i}),n.maestro=new r("Maestro",{pattern:/^(?:5[06789]\d\d|(?!6011[0234])(?!60117[4789])(?!60118[6789])(?!60119)(?!64[456789])(?!65)6\d{3})\d{8,15}$/,eagerPattern:/^(5(018|0[23]|[68])|6[37]|60111|60115|60117([56]|7[56])|60118[0-5]|64[0-3]|66)/,groupPattern:i}),n.forbrugsforeningen=new r("Forbrugsforeningen",{pattern:/^600722\d{10}$/,eagerPattern:/^600/}),n.dankort=new r("Dankort",{pattern:/^5019\d{12}$/,eagerPattern:/^5019/}),n.masterCard=new r("MasterCard",{pattern:/^(5[1-5][0-9]{2}|222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)\d{12}$/,eagerPattern:/^(2|5[1-5])/}),n.americanExpress=new r("American Express",{pattern:/^3[47]\d{13}$/,eagerPattern:/^3[47]/,groupPattern:/(\d{1,4})(\d{1,6})?(\d{1,5})?/,cvcLength:4}),n.dinersClub=new r("Diners Club",{pattern:/^3(0[0-5]|[68]\d)\d{11}$/,eagerPattern:/^3(0|[68])/,groupPattern:/(\d{1,4})?(\d{1,6})?(\d{1,4})?/}),n.discover=new r("Discover",{pattern:/^6(011(0[0-9]|[2-4]\d|74|7[7-9]|8[6-9]|9[0-9])|4[4-9]\d{3}|5\d{4})\d{10}$/,eagerPattern:/^6(011(0[0-9]|[2-4]|74|7[7-9]|8[6-9]|9[0-9])|4[4-9]|5)/}),n.jcb=new r("JCB",{pattern:/^35\d{14}$/,eagerPattern:/^35/}),n.unionPay=new r("UnionPay",{pattern:/^62[0-5]\d{13,16}$/,eagerPattern:/^62/,groupPattern:i,luhn:!1}),n.troy=new r("Troy",{pattern:/^9792\d{12}$/,eagerPattern:/^9792/})},{"./type":8}],10:[function(t,e,n){"use strict";function r(t,e){return o.find(function(n){return n.test(t,e)})}var i=t("fast-luhn"),o=t("./types");e.exports={types:o,parse:function(t){return"string"!=typeof t?"":t.replace(/[^\d]/g,"")},format:function(t,e){var n=r(t,!0);return n?n.group(t).join(e||" "):t},type:function(t,e){var n=r(t,e);return n?n.name:void 0},luhn:i,isValid:function(t,e){return!!(e=e?o.get(e):r(t))&&(!e.luhn||i(t))&&e.test(t)}}},{"./types":14,"fast-luhn":16}],11:[function(t,e,n){"use strict";var r=t("./types"),i=/^\d{3,4}$/;e.exports={isValid:function(t,e){return!("string"!=typeof t||!i.test(t)||e&&r.get(e).cvcLength!==t.length)}}},{"./types":14}],12:[function(t,e,n){"use strict";var r=t("is-valid-month"),i=t("parse-int"),o=t("parse-year");e.exports={isPast:function(t,e){return Date.now()>=new Date(e,t)},month:{parse:function(t){return i(t)},isValid:r},year:{parse:o,format:function(t,e){return t=t.toString(),e?t.substr(2,4):t},isValid:function(t){return"number"==typeof t&&(t=i(t))>0},isPast:function(t){return(new Date).getFullYear()>t}}}},{"is-valid-month":21,"parse-int":24,"parse-year":25}],13:[function(t,e,n){"use strict";e.exports={card:t("./card"),cvc:t("./cvc"),expiration:t("./expiration")}},{"./card":10,"./cvc":11,"./expiration":12}],14:[function(t,e,n){"use strict";var r=t("creditcards-types"),i=t("to-camel-case"),o=t("xtend");e.exports=o(r,{get:function(t){return r.types[i(t)]}})},{"creditcards-types":7,"to-camel-case":26,xtend:29}],15:[function(t,e,n){"use strict";var r=t("zero-fill"),i=t("parse-int"),o=r(2);e.exports=function(t,e){var n=(e=e||new Date).getFullYear().toString().substr(0,2);return t=i(t),i(n+o(t))}},{"parse-int":24,"zero-fill":31}],16:[function(t,e,n){"use strict";e.exports=function(t){return function(e){if("string"!=typeof e)throw new TypeError("Expected string input");if(!e)return!1;for(var n,r=e.length,i=1,o=0;r;)n=parseInt(e.charAt(--r),10),o+=(i^=1)?t[n]:n;return!!o&&o%10==0}}([0,2,4,6,8,1,3,5,7,9])},{}],17:[function(t,e,n){"use strict";var r=Array.prototype.slice,i=Object.prototype.toString;e.exports=function(t){var e=this;if("function"!=typeof e||"[object Function]"!==i.call(e))throw new TypeError("Function.prototype.bind called on incompatible "+e);for(var n,o=r.call(arguments,1),a=Math.max(0,e.length-o.length),s=[],u=0;u<a;u++)s.push("$"+u);if(n=Function("binder","return function ("+s.join(",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof n){var i=e.apply(this,o.concat(r.call(arguments)));return Object(i)===i?i:this}return e.apply(t,o.concat(r.call(arguments)))}),e.prototype){var l=function(){};l.prototype=e.prototype,n.prototype=new l,l.prototype=null}return n}},{}],18:[function(t,e,n){"use strict";var r=t("./implementation");e.exports=Function.prototype.bind||r},{"./implementation":17}],19:[function(t,e,n){"use strict";var r=t("number-is-nan");e.exports=Number.isFinite||function(t){return!("number"!=typeof t||r(t)||t===1/0||t===-1/0)}},{"number-is-nan":23}],20:[function(t,e,n){var r=t("is-finite");e.exports=Number.isInteger||function(t){return"number"==typeof t&&r(t)&&Math.floor(t)===t}},{"is-finite":19}],21:[function(t,e,n){"use strict";var r=t("is-integer");e.exports=function(t){return!("number"!=typeof t||!r(t))&&(t>=1&&t<=12)}},{"is-integer":20}],22:[function(t,e,n){e.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},{}],23:[function(t,e,n){"use strict";e.exports=Number.isNaN||function(t){return t!==t}},{}],24:[function(t,e,n){"use strict";var r=t("is-integer");e.exports=function(t){return"number"==typeof t?r(t)?t:void 0:"string"==typeof t&&/^-?\d+$/.test(t)?parseInt(t,10):void 0}},{"is-integer":20}],25:[function(t,e,n){"use strict";var r=t("parse-int"),i=t("expand-year");e.exports=function(t,e,n){if(null!=(t=r(t)))return e?i(t,n):t}},{"expand-year":15,"parse-int":24}],26:[function(t,e,n){var r=t("to-space-case");e.exports=function(t){return r(t).replace(/\s(\w)/g,function(t,e){return e.toUpperCase()})}},{"to-space-case":28}],27:[function(t,e,n){function r(t){return t.replace(u,function(t,e){return e?" "+e:""})}function i(t){return t.replace(l,function(t,e,n){return e+" "+n.toLowerCase().split("").join(" ")})}e.exports=function(t){return o.test(t)?t.toLowerCase():a.test(t)?(r(t)||t).toLowerCase():s.test(t)?i(t).toLowerCase():t.toLowerCase()};var o=/\s/,a=/(_|-|\.|:)/,s=/([a-z][A-Z]|[A-Z][a-z])/,u=/[\W_]+(.|$)/g,l=/(.)([A-Z]+)/g},{}],28:[function(t,e,n){var r=t("to-no-case");e.exports=function(t){return r(t).replace(/[\W_]+(.|$)/g,function(t,e){return e?" "+e:""}).trim()}},{"to-no-case":27}],29:[function(t,e,n){e.exports=function(){for(var t={},e=0;e<arguments.length;e++){var n=arguments[e];for(var i in n)r.call(n,i)&&(t[i]=n[i])}return t};var r=Object.prototype.hasOwnProperty},{}],30:[function(t,e,n){e.exports=function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)r.call(n,i)&&(t[i]=n[i])}return t};var r=Object.prototype.hasOwnProperty},{}],31:[function(t,e,n){e.exports=function t(e,n,r){return void 0===n?function(n,r){return t(e,n,r)}:(void 0===r&&(r="0"),(e-=n.toString().length)>0?new Array(e+(/\./.test(n)?2:1)).join(r)+n:n+"")}},{}]},{},[3])(3)}),function(t,e){"use strict";function n(t,n,r){function i(t,r,i){var a,s;s=(i=i||{}).expires,a=e.isDefined(i.path)?i.path:o,e.isUndefined(r)&&(s="Thu, 01 Jan 1970 00:00:00 GMT",r=""),e.isString(s)&&(s=new Date(s));var u=encodeURIComponent(t)+"="+encodeURIComponent(r);u+=a?";path="+a:"",u+=i.domain?";domain="+i.domain:"",u+=s?";expires="+s.toUTCString():"";var l=(u+=i.secure?";secure":"").length+1;return l>4096&&n.warn("Cookie '"+t+"' possibly not set or overflowed because it was too large ("+l+" > 4096 bytes)!"),u}var o=r.baseHref(),a=t[0];return function(t,e,n){a.cookie=i(t,e,n)}}e.module("ngCookies",["ng"]).info({angularVersion:"1.6.6"}).provider("$cookies",[function(){function t(t){return t?e.extend({},n,t):n}var n=this.defaults={};this.$get=["$$cookieReader","$$cookieWriter",function(n,r){return{get:function(t){return n()[t]},getObject:function(t){var n=this.get(t);return n?e.fromJson(n):n},getAll:function(){return n()},put:function(e,n,i){r(e,n,t(i))},putObject:function(t,n,r){this.put(t,e.toJson(n),r)},remove:function(e,n){r(e,void 0,t(n))}}}]}]),e.module("ngCookies").factory("$cookieStore",["$cookies",function(t){return{get:function(e){return t.getObject(e)},put:function(e,n){t.putObject(e,n)},remove:function(e){t.remove(e)}}}]),n.$inject=["$document","$log","$browser"],e.module("ngCookies").provider("$$cookieWriter",function(){this.$get=n})}(window,window.angular),angular.module("angular-jwt",["angular-jwt.options","angular-jwt.interceptor","angular-jwt.jwt","angular-jwt.authManager"]),angular.module("angular-jwt.authManager",[]).provider("authManager",function(){this.$get=["$rootScope","$injector","$location","jwtHelper","jwtInterceptor","jwtOptions",function(t,e,n,r,i,o){function a(t){return Array.isArray(t)?e.invoke(t,this,{options:null}):t()}function s(t){if(Array.isArray(t)||angular.isFunction(t))return e.invoke(t,c,{});throw new Error("unauthenticatedRedirector must be a function")}function u(){t.isAuthenticated=!0}function l(){t.isAuthenticated=!1}var c=o.getConfig();t.isAuthenticated=!1;var p=e.has("$state")?"$stateChangeStart":"$routeChangeStart";return t.$on(p,function(t,e){if(!e)return!1;var n=e.$$route?e.$$route:e.data;if(n&&!0===n.requiresLogin){var i=a(c.tokenGetter);i&&!r.isTokenExpired(i)||(t.preventDefault(),s(c.unauthenticatedRedirector))}}),{authenticate:u,unauthenticate:l,getToken:function(){return a(c.tokenGetter)},redirect:function(){return s(c.unauthenticatedRedirector)},checkAuthOnRefresh:function(){t.$on("$locationChangeStart",function(){var e=a(c.tokenGetter);e&&(r.isTokenExpired(e)?t.$broadcast("tokenHasExpired",e):u())})},redirectWhenUnauthenticated:function(){t.$on("unauthenticated",function(){s(c.unauthenticatedRedirector),l()})},isAuthenticated:function(){var t=a(c.tokenGetter);if(t)return!r.isTokenExpired(t)}}}]}),angular.module("angular-jwt.interceptor",[]).provider("jwtInterceptor",function(){this.urlParam,this.authHeader,this.authPrefix,this.whiteListedDomains,this.tokenGetter;var t=this;this.$get=["$q","$injector","$rootScope","urlUtils","jwtOptions",function(e,n,r,i,o){function a(t){if(!i.isSameOrigin(t)&&!s.whiteListedDomains.length)throw new Error("As of v0.1.0, requests to domains other than the application's origin must be white listed. Use jwtOptionsProvider.config({ whiteListedDomains: [<domain>] }); to whitelist.");for(var e=i.urlResolve(t).hostname.toLowerCase(),n=0;n<s.whiteListedDomains.length;n++){var r=s.whiteListedDomains[n],o=r instanceof RegExp?r:new RegExp(r,"i");if(e.match(o))return!0}return!!i.isSameOrigin(t)}var s=angular.extend({},o.getConfig(),t);return{request:function(t){if(t.skipAuthorization||!a(t.url))return t;if(s.urlParam){if(t.params=t.params||{},t.params[s.urlParam])return t}else if(t.headers=t.headers||{},t.headers[s.authHeader])return t;return e.when(n.invoke(s.tokenGetter,this,{options:t})).then(function(e){return e&&(s.urlParam?t.params[s.urlParam]=e:t.headers[s.authHeader]=s.authPrefix+e),t})},responseError:function(t){return 401===t.status&&r.$broadcast("unauthenticated",t),e.reject(t)}}}]}),angular.module("angular-jwt.jwt",[]).service("jwtHelper",["$window",function(t){this.urlBase64Decode=function(e){var n=e.replace(/-/g,"+").replace(/_/g,"/");switch(n.length%4){case 0:break;case 2:n+="==";break;case 3:n+="=";break;default:throw"Illegal base64url string!"}return t.decodeURIComponent(escape(t.atob(n)))},this.decodeToken=function(t){var e=t.split(".");if(3!==e.length)throw new Error("JWT must have 3 parts");var n=this.urlBase64Decode(e[1]);if(!n)throw new Error("Cannot decode the token");return angular.fromJson(n)},this.getTokenExpirationDate=function(t){var e=this.decodeToken(t);if(void 0===e.exp)return null;var n=new Date(0);return n.setUTCSeconds(e.exp),n},this.isTokenExpired=function(t,e){var n=this.getTokenExpirationDate(t);return e=e||0,null!==n&&!(n.valueOf()>(new Date).valueOf()+1e3*e)}}]),angular.module("angular-jwt.options",[]).provider("jwtOptions",function(){var t={};this.config=function(e){t=e},this.$get=function(){function e(){this.config=angular.extend({},n,t)}var n={urlParam:null,authHeader:"Authorization",authPrefix:"Bearer ",whiteListedDomains:[],tokenGetter:function(){return null},loginPath:"/",unauthenticatedRedirectPath:"/",unauthenticatedRedirector:["$location",function(t){t.path(this.unauthenticatedRedirectPath)}]};return e.prototype.getConfig=function(){return this.config},new e}}),angular.module("angular-jwt.interceptor").service("urlUtils",function(){function t(t){var n=t;return e.setAttribute("href",n),n=e.href,e.setAttribute("href",n),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}var e=document.createElement("a"),n=t(window.location.href);return{urlResolve:t,isSameOrigin:function(e){var r=angular.isString(e)?t(e):e;return r.protocol===n.protocol&&r.host===n.host}}}),function(t,e){"use strict";function n(){function t(t,e){if(t)return i(t)?t.indexOf(e)>=0:t.hasOwnProperty(e)}return["$animate",function(e){return{restrict:"AE",transclude:"element",priority:1,terminal:!0,require:"^^ngMessages",link:function(n,r,o,a,s){var u,l=r[0],c=o.ngMessage||o.when,p=o.ngMessageExp||o.whenExp,d=function(t){u=t?i(t)?t:t.split(/[\s,]+/):null,a.reRender()};p?(d(n.$eval(p)),n.$watchCollection(p,d)):d(c);var f,h;a.register(l,h={test:function(e){return t(u,e)},attach:function(){f||s(function(t,n){e.enter(t,null,r);var i=(f=t).$$attachId=a.getAttachId();f.on("$destroy",function(){f&&f.$$attachId===i&&(a.deregister(l),h.detach()),n.$destroy()})})},detach:function(){if(f){var t=f;f=null,e.leave(t)}}})}}}]}var r,i,o,a;e.module("ngMessages",[],function(){r=e.forEach,i=e.isArray,o=e.isString,a=e.element}).info({angularVersion:"1.6.6"}).directive("ngMessages",["$animate",function(t){function e(t,e){return o(e)&&0===e.length||n(t.$eval(e))}function n(t){return o(t)?t.length:!!t}return{require:"ngMessages",restrict:"AE",controller:["$element","$scope","$attrs",function(i,o,a){function s(t,e){for(var n=e,r=[];n&&n!==t;){var i=n.$$ngMessageNode;if(i&&i.length)return g[i];n.childNodes.length&&-1===r.indexOf(n)?(r.push(n),n=n.childNodes[n.childNodes.length-1]):n.previousSibling?n=n.previousSibling:(n=n.parentNode,r.push(n))}}function u(t,e,n){var r=g[n];if(c.head){var i=s(t,e);i?(r.next=i.next,i.next=r):(r.next=c.head,c.head=r)}else c.head=r}function l(t,e,n){var r=g[n],i=s(t,e);i?i.next=r.next:c.head=r.next}var c=this,p=0,d=0;this.getAttachId=function(){return d++};var f,h,g=this.messages={};this.render=function(s){f=!1,h=s=s||{};for(var u=e(o,a.ngMessagesMultiple)||e(o,a.multiple),l=[],p={},d=c.head,g=!1,m=0;null!=d;){m++;var v=d.message,y=!1;g||r(s,function(t,e){if(!y&&n(t)&&v.test(e)){if(p[e])return;p[e]=!0,y=!0,v.attach()}}),y?g=!u:l.push(v),d=d.next}r(l,function(t){t.detach()}),l.length!==m?t.setClass(i,"ng-active","ng-inactive"):t.setClass(i,"ng-inactive","ng-active")},o.$watchCollection(a.ngMessages||a.for,c.render),i.on("$destroy",function(){r(g,function(t){t.message.detach()})}),this.reRender=function(){f||(f=!0,o.$evalAsync(function(){f&&h&&c.render(h)}))},this.register=function(t,e){var n=p.toString();g[n]={message:e},u(i[0],t,n),t.$$ngMessageNode=n,p++,c.reRender()},this.deregister=function(t){var e=t.$$ngMessageNode;delete t.$$ngMessageNode,l(i[0],t,e),delete g[e],c.reRender()}}]}}]).directive("ngMessagesInclude",["$templateRequest","$document","$compile",function(t,e,n){function r(t,r){var i=n.$$createComment?n.$$createComment("ngMessagesInclude",r):e[0].createComment(" ngMessagesInclude: "+r+" "),o=a(i);t.after(o),t.remove()}return{restrict:"AE",require:"^^ngMessages",link:function(e,i,a){var s=a.ngMessagesInclude||a.src;t(s).then(function(t){e.$$destroyed||(o(t)&&!t.trim()?r(i,s):n(t)(e,function(t){i.after(t),r(i,s)}))})}}}]).directive("ngMessage",n()).directive("ngMessageExp",n())}(window,window.angular),function(t,e){"use strict";function n(t){return null!=t&&""!==t&&"hasOwnProperty"!==t&&a.test("."+t)}function r(t,r){if(!n(r))throw o("badmember",'Dotted member path "@{0}" is invalid.',r);for(var i=r.split("."),a=0,s=i.length;a<s&&e.isDefined(t);a++){var u=i[a];t=null!==t?t[u]:void 0}return t}function i(t,n){n=n||{},e.forEach(n,function(t,e){delete n[e]});for(var r in t)!t.hasOwnProperty(r)||"$"===r.charAt(0)&&"$"===r.charAt(1)||(n[r]=t[r]);return n}var o=e.$$minErr("$resource"),a=/^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/;e.module("ngResource",["ng"]).info({angularVersion:"1.6.6"}).provider("$resource",function(){var t=/^https?:\/\/\[[^\]]*][^/]*/,n=this;this.defaults={stripTrailingSlashes:!0,cancellable:!1,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},delete:{method:"DELETE"}}},this.$get=["$http","$log","$q","$timeout",function(a,s,u,l){function c(t,e){this.template=t,this.defaults=h({},n.defaults,e),this.urlParams={}}function p(t,e,w,$){function k(t,n){var i={};return n=h({},e,n),f(n,function(e,n){y(e)&&(e=e(t)),i[n]=e&&e.charAt&&"@"===e.charAt(0)?r(t,e.substr(1)):e}),i}function C(t){return t.resource}function x(t){i(t||{},this)}var T=new c(t,$);return w=h({},n.defaults.actions,w),x.prototype.toJSON=function(){var t=h({},this);return delete t.$promise,delete t.$resolved,delete t.$cancelRequest,t},f(w,function(t,e){var n=!0===t.hasBody||!1!==t.hasBody&&/^(POST|PUT|PATCH)$/i.test(t.method),r=t.timeout,c=v(t.cancellable)?t.cancellable:T.defaults.cancellable;r&&!b(r)&&(s.debug("ngResource:\n Only numeric values are allowed as `timeout`.\n Promises are not supported in $resource, because the same value would be used for multiple requests. If you are looking for a way to cancel requests, you should use the `cancellable` option."),delete t.timeout,r=null),x[e]=function(s,p,v,b){var w,$,S,E={};switch(arguments.length){case 4:S=b,$=v;case 3:case 2:if(!y(p)){E=s,w=p,$=v;break}if(y(s)){$=s,S=p;break}$=p,S=v;case 1:y(s)?$=s:n?w=s:E=s;break;case 0:break;default:throw o("badargs","Expected up to 4 arguments [params, data, success, error], got {0} arguments",arguments.length)}var D,A,B=this instanceof x,I=B?w:t.isArray?[]:new x(w),O={},M=t.interceptor&&t.interceptor.response||C,P=t.interceptor&&t.interceptor.responseError||void 0,_=!!S,R=!!P;f(t,function(t,e){switch(e){default:O[e]=g(t);break;case"params":case"isArray":case"interceptor":case"cancellable":}}),!B&&c&&(D=u.defer(),O.timeout=D.promise,r&&(A=l(D.resolve,r))),n&&(O.data=w),T.setUrlParams(O,h({},k(w,t.params||{}),E),t.url);var L=a(O).then(function(n){var r=n.data;if(r){if(m(r)!==!!t.isArray)throw o("badcfg","Error in resource configuration for action `{0}`. Expected response to contain an {1} but got an {2} (Request: {3} {4})",e,t.isArray?"array":"object",m(r)?"array":"object",O.method,O.url);if(t.isArray)I.length=0,f(r,function(t){"object"==typeof t?I.push(new x(t)):I.push(t)});else{var a=I.$promise;i(r,I),I.$promise=a}}return n.resource=I,n},function(t){return t.resource=I,u.reject(t)});return L=L.finally(function(){I.$resolved=!0,!B&&c&&(I.$cancelRequest=d,l.cancel(A),D=A=O.timeout=null)}),L=L.then(function(t){var e=M(t);return($||d)(e,t.headers,t.status,t.statusText),e},_||R?function(t){return _&&!R&&L.catch(d),_&&S(t),R?P(t):u.reject(t)}:void 0),B?L:(I.$promise=L,I.$resolved=!1,c&&(I.$cancelRequest=function(t){L.catch(d),null!==D&&D.resolve(t)}),I)},x.prototype["$"+e]=function(t,n,r){y(t)&&(r=n,n=t,t={});var i=x[e].call(this,t,this,n,r);return i.$promise||i}}),x.bind=function(n){var r=h({},e,n);return p(t,r,w,$)},x}var d=e.noop,f=e.forEach,h=e.extend,g=e.copy,m=e.isArray,v=e.isDefined,y=e.isFunction,b=e.isNumber,w=e.$$encodeUriQuery,$=e.$$encodeUriSegment;return c.prototype={setUrlParams:function(e,n,r){var i,a,s=this,u=r||s.template,l="",c=s.urlParams=Object.create(null);f(u.split(/\W/),function(t){if("hasOwnProperty"===t)throw o("badname","hasOwnProperty is not a valid parameter name.");!new RegExp("^\\d+$").test(t)&&t&&new RegExp("(^|[^\\\\]):"+t+"(\\W|$)").test(u)&&(c[t]={isQueryParamValue:new RegExp("\\?.*=:"+t+"(?:\\W|$)").test(u)})}),u=u.replace(/\\:/g,":"),u=u.replace(t,function(t){return l=t,""}),n=n||{},f(s.urlParams,function(t,e){i=n.hasOwnProperty(e)?n[e]:s.defaults[e],v(i)&&null!==i?(a=t.isQueryParamValue?w(i,!0):$(i),u=u.replace(new RegExp(":"+e+"(\\W|$)","g"),function(t,e){return a+e})):u=u.replace(new RegExp("(/?):"+e+"(\\W|$)","g"),function(t,e,n){return"/"===n.charAt(0)?n:e+n})}),s.defaults.stripTrailingSlashes&&(u=u.replace(/\/+$/,"")||"/"),u=u.replace(/\/\.(?=\w+($|\?))/,"."),e.url=l+u.replace(/\/(\\|%5C)\./,"/."),f(n,function(t,n){s.urlParams[n]||(e.params=e.params||{},e.params[n]=t)})}},p}]})}(window,window.angular);var app=angular.module("angular-promise-polyfill",[]).run(["$q","$window",function(t,e){e.Promise=function(e){return t(e)},e.Promise.all=t.all.bind(t),e.Promise.reject=t.reject.bind(t),e.Promise.resolve=t.when.bind(t),e.Promise.race=function(e){for(var n=t.defer(),r=0;r<e.length;r++)e[r].then(function(t){n&&(n.resolve(t),n=null)}),e[r].catch(function(t){n&&(n.reject(t),n=null)});return n.promise}}]);if("object"==typeof module&&(module.exports=app.name),function(t,e){"use strict";function n(t){var e=[];return p(e,u).chars(t),e.join("")}var r,i,o,a,s,u,l,c,p,d=e.$$minErr("$sanitize");e.module("ngSanitize",[]).provider("$sanitize",function(){function n(t,e){var n,r={},i=t.split(",");for(n=0;n<i.length;n++)r[e?s(i[n]):i[n]]=!0;return r}function f(t){for(var e={},n=0,r=t.length;n<r;n++){var i=t[n];e[i.name]=i.value}return e}function h(t){return t.replace(/&/g,"&amp;").replace(y,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(b,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function g(e){for(;e;){if(e.nodeType===t.Node.ELEMENT_NODE)for(var n=e.attributes,r=0,i=n.length;r<i;r++){var o=n[r],a=o.name.toLowerCase();"xmlns:ns1"!==a&&0!==a.lastIndexOf("ns1:",0)||(e.removeAttributeNode(o),r--,i--)}var s=e.firstChild;s&&g(s),e=m("nextSibling",e)}}function m(t,e){var n=e[t];if(n&&l.call(e,n))throw d("elclob","Failed to sanitize html because the element is clobbered: {0}",e.outerHTML||e.outerText);return n}var v=!1;this.$get=["$$sanitizeUri",function(t){return v&&i(D,S),function(e){var n=[];return c(e,p(n,function(e,n){return!/^unsafe:/.test(t(e,n))})),n.join("")}}],this.enableSvg=function(t){return a(t)?(v=t,this):v},r=e.bind,i=e.extend,o=e.forEach,a=e.isDefined,s=e.lowercase,u=e.noop,c=function(t,e){null===t||void 0===t?t="":"string"!=typeof t&&(t=""+t);var n=M(t);if(!n)return"";var r=5;do{if(0===r)throw d("uinput","Failed to sanitize html because the input is unstable");r--,t=n.innerHTML,n=M(t)}while(t!==n.innerHTML);for(var i=n.firstChild;i;){switch(i.nodeType){case 1:e.start(i.nodeName.toLowerCase(),f(i.attributes));break;case 3:e.chars(i.textContent)}var o;if(!((o=i.firstChild)||(1===i.nodeType&&e.end(i.nodeName.toLowerCase()),o=m("nextSibling",i))))for(;null==o&&(i=m("parentNode",i))!==n;)o=m("nextSibling",i),1===i.nodeType&&e.end(i.nodeName.toLowerCase());i=o}for(;i=n.firstChild;)n.removeChild(i)},p=function(t,e){var n=!1,i=r(t,t.push);return{start:function(t,r){t=s(t),!n&&E[t]&&(n=t),n||!0!==D[t]||(i("<"),i(t),o(r,function(n,r){var o=s(r),a="img"===t&&"src"===o||"background"===o;!0!==O[o]||!0===A[o]&&!e(n,a)||(i(" "),i(r),i('="'),i(h(n)),i('"'))}),i(">"))},end:function(t){t=s(t),n||!0!==D[t]||!0===w[t]||(i("</"),i(t),i(">")),t==n&&(n=!1)},chars:function(t){n||i(h(t))}}},l=t.Node.prototype.contains||function(t){return!!(16&this.compareDocumentPosition(t))};var y=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,b=/([^#-~ |!])/g,w=n("area,br,col,hr,img,wbr"),$=n("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),k=n("rp,rt"),C=i({},k,$),x=i({},$,n("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")),T=i({},k,n("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")),S=n("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"),E=n("script,style"),D=i({},w,x,T,C),A=n("background,cite,href,longdesc,src,xlink:href"),B=n("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"),I=n("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),O=i({},A,I,B),M=function(t,e){var n;if(!e||!e.implementation)throw d("noinert","Can't create an inert html document");var r=((n=e.implementation.createHTMLDocument("inert")).documentElement||n.getDocumentElement()).querySelector("body");return r.innerHTML='<svg><g onload="this.parentNode.remove()"></g></svg>',r.querySelector("svg")?(r.innerHTML='<svg><p><style><img src="</style><img src=x onerror=alert(1)//">',r.querySelector("svg img")?function(e){e="<remove></remove>"+e;try{var n=(new t.DOMParser).parseFromString(e,"text/html").body;return n.firstChild.remove(),n}catch(t){return}}:function(t){return r.innerHTML=t,e.documentMode&&g(r),r}):function(e){e="<remove></remove>"+e;try{e=encodeURI(e)}catch(t){return}var n=new t.XMLHttpRequest;n.responseType="document",n.open("GET","data:text/html;charset=utf-8,"+e,!1),n.send(null);var r=n.response.body;return r.firstChild.remove(),r}}(t,t.document)}).info({angularVersion:"1.6.6"}),e.module("ngSanitize").filter("linky",["$sanitize",function(t){var r=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,i=/^mailto:/i,o=e.$$minErr("linky"),a=e.isDefined,s=e.isFunction,u=e.isObject,l=e.isString;return function(e,c,p){function d(t){t&&y.push(n(t))}if(null==e||""===e)return e;if(!l(e))throw o("notstring","Expected string but received: {0}",e);for(var f,h,g,m=s(p)?p:u(p)?function(){return p}:function(){return{}},v=e,y=[];f=v.match(r);)h=f[0],f[2]||f[4]||(h=(f[3]?"http://":"mailto:")+h),g=f.index,d(v.substr(0,g)),function(t,e){var n,r=m(t);y.push("<a ");for(n in r)y.push(n+'="'+r[n]+'" ');!a(c)||"target"in r||y.push('target="',c,'" '),y.push('href="',t.replace(/"/g,"&quot;"),'">'),d(e),y.push("</a>")}(h,f[0].replace(i,"")),v=v.substring(g+f[0].length);return d(v),t(y.join(""))}}])}(window,window.angular),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).angularStripe=t()}}(function(){return function t(e,n,r){function i(a,s){if(!n[a]){if(!e[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return i(n||t)},c,c.exports,t,e,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(t,e,n){(function(t){"use strict";function n(t){return function(e){if("function"!=typeof t)throw new Error(e||"$q is not a function")}}var r="undefined"!=typeof window?window.angular:void 0!==t?t.angular:null;e.exports=r.module("assert-q-constructor",[]).factory("assertQConstructor",n).name,n.$inject=["$q"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(t,e,n){(function(n){"use strict";var r=t("./promisify");e.exports=("undefined"!=typeof window?window.angular:void 0!==n?n.angular:null).module("promisify",[]).service("promisify",r).name}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./promisify":3}],3:[function(t,e,n){(function(n){"use strict";function r(t,e){function n(n,r){function o(){var o=arguments;return t(function(t,a){var u=e.$apply.bind(e);try{n.apply(r,s(o).concat(i(u,t,a)))}catch(t){setTimeout(function(){u(function(){a(t)})})}})}return r=r||{},"string"==typeof n&&(n=r[n]),a(n),o.__isPromisifed__=!0,o}return o.extend(n,{promisifyAll:function(t){return o.forEach(t,function(e,r){r+="Async",e&&"function"==typeof e&&!e.__isPromisifed__&&(t[r]=n(e,t))})}})}function i(t,e,n){return function(r,i){var o=arguments;t(function(){return r?n(r):o.length<=2?e(i):void e(s(o,1))})}}var o="undefined"!=typeof window?window.angular:void 0!==n?n.angular:null,a=t("assert-function"),s=t("to-array");e.exports=r,r.$inject=["$q","$rootScope"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"assert-function":12,"to-array":34}],4:[function(t,e,n){(function(n){"use strict";function r(t){t("angular-stripe: For Angular <= 1.2 support, first load https://github.com/bendrucker/angular-q-constructor")}var i="undefined"!=typeof window?window.angular:void 0!==n?n.angular:null,o=t("./provider");e.exports=i.module("angular-stripe",[t("angular-q-promisify"),t("angular-assert-q-constructor")]).provider("stripe",o).run(r).name,r.$inject=["assertQConstructor"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./provider":6,"angular-assert-q-constructor":1,"angular-q-promisify":2}],5:[function(t,e,n){"use strict";function r(t,e){return function(){var n=Array.prototype.pop.call(arguments);t.apply(e,arguments),n()}}var i=t("lazy-async"),o=t("dot-prop"),a=t("load-script-global"),s=t("stripe-errback");e.exports=function(t,e){var n=s.methods.async.concat(s.methods.sync),u=i(n,function(e){a({url:t,global:"Stripe"},function(t,n){if(t)return e(t);var i=s(n);i.setPublishableKey=r(i.setPublishableKey,i),e(null,i)})});return n.reduce(function(t,n){var r=o.get(u,n);return o.set(t,n,e(r)),t},{})}},{"dot-prop":17,"lazy-async":25,"load-script-global":27,"stripe-errback":33}],6:[function(t,e,n){"use strict";var r=t("./lazy");e.exports=function(){var t=null,e=null;this.url="https://js.stripe.com/v2/",this.setPublishableKey=function(e){t=e},this.$get=function(n,i){return e||((e=r(this.url,n)).setPublishableKey(t),e)},this.$get.$inject=["promisify","$exceptionHandler"]}},{"./lazy":5}],7:[function(t,e,n){var r=t("is-number"),i=t("array-slice");e.exports=function(t,e){if(!Array.isArray(t))throw new Error("array-last expects an array as the first argument.");if(0===t.length)return null;var n=i(t,t.length-(r(e)?+e:1));return 1==+e||null==e?n[0]:n}},{"array-slice":8,"is-number":20}],8:[function(t,e,n){"use strict";function r(t,e,n){var r=t.length>>>0;return e=null==e?n||0:e<0?Math.max(r+e,0):Math.min(e,r)}e.exports=function(t,e,n){var i=t.length>>>0,o=[];for(e=r(t,e),n=r(t,n,i);e<n;)o.push(t[e++]);return o}},{}],9:[function(t,e,n){"use strict";function r(t){var e;(e=a.length?a.pop():new i).task=t,o(e)}function i(){this.task=null}var o=t("./raw"),a=[],s=[],u=o.makeRequestCallFromTimer(function(){if(s.length)throw s.shift()});e.exports=r,i.prototype.call=function(){try{this.task.call()}catch(t){r.onerror?r.onerror(t):(s.push(t),u())}finally{this.task=null,a[a.length]=this}}},{"./raw":10}],10:[function(t,e,n){(function(t){"use strict";function n(t){a.length||(o(),s=!0),a[a.length]=t}function r(){for(;u<a.length;){var t=u;if(u+=1,a[t].call(),u>l){for(var e=0,n=a.length-u;e<n;e++)a[e]=a[e+u];a.length-=u,u=0}}a.length=0,u=0,s=!1}function i(t){return function(){function e(){clearTimeout(n),clearInterval(r),t()}var n=setTimeout(e,0),r=setInterval(e,50)}}e.exports=n;var o,a=[],s=!1,u=0,l=1024,c=void 0!==t?t:self,p=c.MutationObserver||c.WebKitMutationObserver;o="function"==typeof p?function(t){var e=1,n=new p(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}(r):i(r),n.requestFlush=o,n.makeRequestCallFromTimer=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],11:[function(t,e,n){"use strict";var r=t("assert-ok"),i=t("simple-format"),o=t("print-value");e.exports=function(t,e){r(t===e,i("expected `%s` to equal `%s`",o(t),o(e)))}},{"assert-ok":13,"print-value":30,"simple-format":32}],12:[function(t,e,n){"use strict";e.exports=function(t){if("function"!=typeof t)throw new TypeError("Expected function, got: "+t)}},{}],13:[function(t,e,n){"use strict";e.exports=function(t,e){if(!t)throw new Error(e||"Expected true, got "+t)}},{}],14:[function(t,e,n){"use strict";var r=t("to-array");e.exports=function(t){return t=Array.isArray(t)?t:r(arguments),function(){var e=arguments;return t.map(function(t){return t.apply(null,e)})}}},{"to-array":34}],15:[function(t,e,n){!function(t){"use strict";var n=0,r=Math.pow(36,4),i=function(t,e){var n="000000000"+t;return n.substr(n.length-e)},o=function(){return i((Math.random()*r<<0).toString(36),4)},a=function(){return n=n<r?n:0,++n-1},s=function(){var t,e=(new Date).getTime().toString(36),n=s.fingerprint(),r=o()+o();return t=i(a().toString(36),4),"c"+e+t+n+r};s.slug=function(){var t,e=(new Date).getTime().toString(36),n=s.fingerprint().slice(0,1)+s.fingerprint().slice(-1),r=o().slice(-2);return t=a().toString(36).slice(-4),e.slice(-2)+t+n+r},s.globalCount=function(){var t=function(){var t,e=0;for(t in window)e++;return e}();return s.globalCount=function(){return t},t},s.fingerprint=function(){return i((navigator.mimeTypes.length+navigator.userAgent.length).toString(36)+s.globalCount().toString(36),4)},t.register?t.register("cuid",s):void 0!==e?e.exports=s:t.cuid=s}(this.applitude||this)},{}],16:[function(t,e,n){var r=t("wrappy");e.exports=r(function(t){var e=!0;return i(function(){e=!1}),function(){var n=arguments,r=this;e?i(function(){t.apply(r,n)}):t.apply(r,n)}});var i=t("asap")},{asap:9,wrappy:35}],17:[function(t,e,n){"use strict";function r(t){for(var e=t.split("."),n=[],r=0;r<e.length;r++){for(var i=e[r];"\\"===i[i.length-1]&&void 0!==e[r+1];)i=i.slice(0,-1)+".",i+=e[++r];n.push(i)}return n}var i=t("is-obj");e.exports.get=function(t,e){if(!i(t)||"string"!=typeof e)return t;for(var n=r(e),o=0;o<n.length;o++){var a=Object.getOwnPropertyDescriptor(t,n[o])||Object.getOwnPropertyDescriptor(Object.prototype,n[o]);if(a&&!a.enumerable)return;if(void 0===(t=t[n[o]])||null===t){if(o!==n.length-1)return;break}}return t},e.exports.set=function(t,e,n){if(i(t)&&"string"==typeof e)for(var o=r(e),a=0;a<o.length;a++){var s=o[a];i(t[s])||(t[s]={}),a===o.length-1&&(t[s]=n),t=t[s]}},e.exports.delete=function(t,e){if(i(t)&&"string"==typeof e)for(var n=r(e),o=0;o<n.length;o++){var a=n[o];if(o===n.length-1)return void delete t[a];t=t[a]}},e.exports.has=function(t,e){if(!i(t)||"string"!=typeof e)return!1;for(var n=r(e),o=0;o<n.length;o++)if(void 0===(t=t[n[o]]))return!1;return!0}},{"is-obj":21}],18:[function(t,e,n){"use strict";var r=t("assert-function");e.exports=function(){function t(){for(var t=arguments,n=0,r=e.length;n<r;n++)e[n].apply(null,t)}var e=[];return t.add=function(t){return r(t),e.push(t),function(){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return void e.splice(n,1)}},t}},{"assert-function":12}],19:[function(t,e,n){(function(t){var n;n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},e.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],20:[function(t,e,n){"use strict";e.exports=function(t){return!!+t||0===t||"0"===t}},{}],21:[function(t,e,n){"use strict";e.exports=function(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}},{}],22:[function(t,e,n){e.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},{}],23:[function(t,e,n){"use strict";var r=t("isarray");e.exports=function(t){return null!=t&&"object"==typeof t&&!r(t)}},{isarray:22}],24:[function(t,e,n){function r(t,e){var n=[],r=[];return null==e&&(e=function(t,e){return n[0]===e?"[Circular ~]":"[Circular ~."+r.slice(0,n.indexOf(e)).join(".")+"]"}),function(i,o){if(n.length>0){var a=n.indexOf(this);~a?n.splice(a+1):n.push(this),~a?r.splice(a,1/0,i):r.push(i),~n.indexOf(o)&&(o=e.call(this,i,o))}else n.push(o);return null==t?o:t.call(this,i,o)}}(e.exports=function(t,e,n,i){return JSON.stringify(t,r(e,i),n)}).getSerialize=r},{}],25:[function(t,e,n){"use strict";var r=t("assert-ok"),i=t("assert-equal"),o=t("dot-prop"),a=t("to-array"),s=t("array-last"),u=t("dezalgo"),l=t("call-all-fns");e.exports=function(t,e){function n(t){return function(){var e=arguments;c(function(n,r){if(!n)return o.get(r,t).apply(null,e);var i=s(a(e));return"function"==typeof i?i(n):void 0})}}function c(t){if(t=u(t),p||d)return t(d,p);f.push(t)}r(Array.isArray(t),"methods are required"),i(typeof e,"function","load fn is required");var p=null,d=null,f=[];return e(function(t,e){d=t,p=e,l(f)(t,e),f=null}),t.reduce(function(t,e){return o.set(t,e,n(e)),t},{})}},{"array-last":7,"assert-equal":11,"assert-ok":13,"call-all-fns":14,dezalgo:16,"dot-prop":26,"to-array":34}],26:[function(t,e,n){"use strict";function r(t){for(var e=t.split("."),n=[],r=0;r<e.length;r++){for(var i=e[r];"\\"===i[i.length-1];)i=i.slice(0,-1)+".",i+=e[++r];n.push(i)}return n}var i=t("is-obj");e.exports.get=function(t,e){if(!i(t)||"string"!=typeof e)return t;for(var n=r(e),o=0;o<n.length&&void 0!==(t=t[n[o]]);o++);return t},e.exports.set=function(t,e,n){if(i(t)&&"string"==typeof e)for(var o=r(e),a=0;a<o.length;a++){var s=o[a];i(t[s])||(t[s]={}),a===o.length-1&&(t[s]=n),t=t[s]}},e.exports.delete=function(t,e){if(i(t)&&"string"==typeof e)for(var n=r(e),o=0;o<n.length;o++){var a=n[o];if(o===n.length-1)return void delete t[a];t=t[a]}},e.exports.has=function(t,e){if(!i(t)||"string"!=typeof e)return!1;for(var n=r(e),o=0;o<n.length;o++)if(void 0===(t=t[n[o]]))return!1;return!0}},{"is-obj":21}],27:[function(t,e,n){"use strict";function r(t,e){function n(){return h[t.global]}function r(e){h[t.global]=e}if(!n())return r(p()),n().add(e),function(t,e){n()(t,e),r(p())};n().add(e)}function i(t){return s[t.global]}function o(t,e){var n=f();return s[n]=function(){e(null,i(t)),delete s[n]},n}var a=t("load-script"),s=t("global/window"),u=t("xtend"),l=t("assert-ok"),c=t("dezalgo"),p=t("ear"),d=t("query-extend"),f=t("cuid");e.exports=function(t,e){if(l(t,"options required"),l(t.url,"url required"),l(t.global,"global required"),l(e,"callback required"),t=u(t),e=c(e),i(t))return e(null,i(t));if(e=r(t,e)){if(t.jsonp){var n=o(t,e);t.url=d(t.url,{callback:n})}a(t.url,t,function(n){if(n)return e(n);if(!t.jsonp){var r=i(t);if(!r)return e(new Error("expected: `window."+t.global+"`, actual: `"+r+"`"));e(null,r)}})}};var h={}},{"assert-ok":13,cuid:15,dezalgo:16,ear:18,"global/window":19,"load-script":28,"query-extend":31,xtend:36}],28:[function(t,e,n){function r(t,e){for(var n in e)t.setAttribute(n,e[n])}function i(t,e){t.onload=function(){this.onerror=this.onload=null,e(null,t)},t.onerror=function(){this.onerror=this.onload=null,e(new Error("Failed to load "+this.src),t)}}function o(t,e){t.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||(this.onreadystatechange=null,e(null,t))}}e.exports=function(t,e,n){var a=document.head||document.getElementsByTagName("head")[0],s=document.createElement("script");"function"==typeof e&&(n=e,e={}),e=e||{},n=n||function(){},s.type=e.type||"text/javascript",s.charset=e.charset||"utf8",s.async=!("async"in e)||!!e.async,s.src=t,e.attrs&&r(s,e.attrs),e.text&&(s.text=""+e.text),("onload"in s?i:o)(s,n),s.onload||i(s,n),a.appendChild(s)}},{}],29:[function(t,e,n){"use strict";e.exports=function(t){var e=1,n="",r=t.split("%"),i=r.length;i>0&&(n+=r[0]);for(var o=1;o<i;o++){if("s"===r[o][0]||"d"===r[o][0]){var a=arguments[e++];n+="d"===r[o][0]?Math.floor(a):a}else r[o][0]?n+="%"+r[o][0]:n+="%"+r[++o][0];n+=r[o].substring(1)}return n}},{}],30:[function(t,e,n){"use strict";function r(t){return o(t)||Array.isArray(t)}function i(t){return a(t,null,"")}var o=t("isobject"),a=t("json-stringify-safe");e.exports=function(t){return(r(t)?i:String)(t)}},{isobject:23,"json-stringify-safe":24}],31:[function(t,e,n){!function(t){var n=function(t){var e={};return t?(l(t.split("&"),function(t){var n=t.split("="),r=i(n[0]),o=decodeURIComponent(r.val),a=n[1]&&decodeURIComponent(n[1]);"array"===r.type?(e[o]||(e[o]=[]),e[o].push(a)):"string"===r.type&&(e[o]=a)}),e):e},r=function(t){var e,n=[];for(var r in t)t.hasOwnProperty(r)&&(void 0!==t[r]?(e=encodeURIComponent(r),o(t[r])?l(t[r],function(t){n.push(e+"[]="+encodeURIComponent(t))}):n.push(e+"="+encodeURIComponent(t[r]))):n.push(encodeURIComponent(r)));return n.length?"?"+n.join("&"):""},i=function(t){var e=t.indexOf("[");return-1===e?{type:"string",val:t}:{type:"array",val:t.substr(0,e)}},o=function(t){return"[object Array]"===Object.prototype.toString.call(t)},a=function(t){var e=t.lastIndexOf("?"),n=-1!==e,r=void 0;return n&&e>0?r=t.substring(0,e):!n&&t&&t.length>0&&(r=t),{base:r,query:n?t.substring(e+1):void 0}},s=function(){for(var t={},e=0;e<arguments.length;e++){var n=arguments[e];for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])}return t},u=function(){var t=Array.prototype.slice.call(arguments,0),e=!0===t[t.length-1],i="";if(!t.length)return i;e&&t.pop();var o=c(t,function(t){if("string"==typeof t){var e=a(t);return e.base&&(i=e.base),n(e.query)}return t});return e?s.apply({},o):i+r(s.apply({},o))},l=function(t,e){for(var n=0,r=t.length;n<r;n++)e(t[n],n)},c=function(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(e(t[r],r));return n};void 0!==e&&e.exports?e.exports=u:t.queryExtend=u}(this)},{}],32:[function(t,e,n){"use strict";var r=t("pff"),i=t("to-array"),o=/%[sdj]/;e.exports=function(t){return o.test(t)?r.apply(null,arguments):i(arguments).join(" ")}},{pff:29,"to-array":34}],33:[function(t,e,n){"use strict";function r(t){if("function"!=typeof t)throw new Error("Stripe.js must be provided");var e={};return s.async.forEach(function(n){var r=n.split("."),o=r[0],s=r[1];a.set(e,n,i(s,t[o]))}),s.sync.forEach(function(n){a.set(e,n,a.get(t,n))}),e}function i(t,e){return function(){var n=Array.prototype.slice.call(arguments),r=n.pop();e[t].apply(e,n.concat(function(t,e){if(e.error)return r(o(new Error,e.error,{status:t}));r(null,e)}))}}var o=t("xtend/mutable"),a=t("dot-prop"),s=r.methods={async:["card.createToken","bankAccount.createToken","piiData.createToken","bitcoinReceiver.createReceiver","bitcoinReceiver.pollReceiver","bitcoinReceiver.getReceiver"],sync:["setPublishableKey","card.validateCardNumber","card.validateExpiry","card.validateCVC","card.cardType","bankAccount.validateRoutingNumber","bankAccount.validateAccountNumber","bitcoinReceiver.cancelReceiverPoll"]};e.exports=r},{"dot-prop":17,"xtend/mutable":37}],34:[function(t,e,n){e.exports=function(t,e){for(var n=[],r=(e=e||0)||0;r<t.length;r++)n[r-e]=t[r];return n}},{}],35:[function(t,e,n){function r(t,e){function n(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];var r=t.apply(this,e),i=e[e.length-1];return"function"==typeof r&&r!==i&&Object.keys(i).forEach(function(t){r[t]=i[t]}),r}if(t&&e)return r(t)(e);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach(function(e){n[e]=t[e]}),n}e.exports=r},{}],36:[function(t,e,n){e.exports=function(){for(var t={},e=0;e<arguments.length;e++){var n=arguments[e];for(var i in n)r.call(n,i)&&(t[i]=n[i])}return t};var r=Object.prototype.hasOwnProperty},{}],37:[function(t,e,n){e.exports=function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)r.call(n,i)&&(t[i]=n[i])}return t};var r=Object.prototype.hasOwnProperty},{}]},{},[4])(4)}),function(){"use strict";function t(t,e,n,r,i,o,a){function s(e,n){function r(){return!h.length}var i=function(t){for(var e=0;e<h.length;e++)if(h[e].toastId===t)return h[e]}(e);i&&!i.deleting&&(i.deleting=!0,i.isOpened=!1,t.leave(i.el).then(function(){i.scope.options.onHidden&&i.scope.options.onHidden(!!n,i),i.scope.$destroy();var t=h.indexOf(i);delete m[i.scope.message],h.splice(t,1);var e=o.maxOpened;e&&h.length>=e&&h[e-1].open.resolve(),r()&&(d.remove(),d=null,v=a.defer())}))}function u(t,e,n,r){return angular.isObject(n)&&(r=n,n=null),p({iconClass:t,message:e,optionsOverride:r,title:n})}function l(){return angular.extend({},o)}function c(e){if(d)return v.promise;(d=angular.element("<div></div>")).attr("id",e.containerId),d.addClass(e.positionClass),d.css({"pointer-events":"auto"});var n=angular.element(document.querySelector(e.target));if(!n||!n.length)throw"Target for toasts doesn't exist";return t.enter(d,n).then(function(){v.resolve()}),v.promise}function p(n){function o(t,e,n){function r(e){if(n[e])return function(){n[e](t)}}n.allowHtml?(t.scope.allowHtml=!0,t.scope.title=i.trustAsHtml(e.title),t.scope.message=i.trustAsHtml(e.message)):(t.scope.title=e.title,t.scope.message=e.message),t.scope.toastType=t.iconClass,t.scope.toastId=t.toastId,t.scope.extraData=n.extraData,t.scope.options={extendedTimeOut:n.extendedTimeOut,messageClass:n.messageClass,onHidden:n.onHidden,onShown:r("onShown"),onTap:r("onTap"),progressBar:n.progressBar,tapToDismiss:n.tapToDismiss,timeOut:n.timeOut,titleClass:n.titleClass,toastClass:n.toastClass},n.closeButton&&(t.scope.options.closeHtml=n.closeHtml)}function u(t){var n=angular.element("<div toast></div>");return e.get("$compile")(n)(t)}var p=l();if(!function(){var t=p.preventDuplicates&&n.message===g,e=p.preventOpenDuplicates&&m[n.message];return!(!t&&!e&&(g=n.message,m[n.message]=!0,1))}()){var v=function(){var t={toastId:f++,isOpened:!1,scope:r.$new(),open:a.defer()};return t.iconClass=n.iconClass,n.optionsOverride&&(angular.extend(p,function(t){for(var e=["containerId","iconClasses","maxOpened","newestOnTop","positionClass","preventDuplicates","preventOpenDuplicates","templates"],n=0,r=e.length;n<r;n++)delete t[e[n]];return t}(n.optionsOverride)),t.iconClass=n.optionsOverride.iconClass||t.iconClass),o(t,n,p),t.el=u(t.scope),t}();if(h.push(v),p.autoDismiss&&p.maxOpened&&h.length>p.maxOpened)for(var y=h.slice(0,h.length-p.maxOpened),b=0,w=y.length;b<w;b++)s(y[b].toastId);return(p.maxOpened&&h.length<=p.maxOpened||!p.maxOpened)&&v.open.resolve(),v.open.promise.then(function(){c(p).then(function(){if(v.isOpened=!0,p.newestOnTop)t.enter(v.el,d).then(function(){v.scope.init()});else{var e=d[0].lastChild?angular.element(d[0].lastChild):null;t.enter(v.el,d,e).then(function(){v.scope.init()})}})}),v}}var d,f=0,h=[],g="",m={},v=a.defer();return{active:function(){return h.length},clear:function(t){if(1!==arguments.length||t)if(t)s(t.toastId);else for(var e=0;e<h.length;e++)s(h[e].toastId)},error:function(t,e,n){return u(l().iconClasses.error,t,e,n)},info:function(t,e,n){return u(l().iconClasses.info,t,e,n)},remove:s,success:function(t,e,n){return u(l().iconClasses.success,t,e,n)},warning:function(t,e,n){return u(l().iconClasses.warning,t,e,n)},refreshTimer:function(t,e){t&&t.isOpened&&h.indexOf(t)>=0&&t.scope.refreshTimer(e)}}}angular.module("toastr",[]).factory("toastr",t),t.$inject=["$animate","$injector","$document","$rootScope","$sce","toastrConfig","$q"]}(),function(){"use strict";angular.module("toastr").constant("toastrConfig",{allowHtml:!1,autoDismiss:!1,closeButton:!1,closeHtml:"<button>&times;</button>",containerId:"toast-container",extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},maxOpened:0,messageClass:"toast-message",newestOnTop:!0,onHidden:null,onShown:null,onTap:null,positionClass:"toast-top-right",preventDuplicates:!1,preventOpenDuplicates:!1,progressBar:!1,tapToDismiss:!0,target:"body",templates:{toast:"directives/toast/toast.html",progressbar:"directives/progressbar/progressbar.html"},timeOut:5e3,titleClass:"toast-title",toastClass:"toast"})}(),function(){"use strict";function t(t){return{require:"^toast",templateUrl:function(){return t.templates.progressbar},link:function(t,e,n,r){function i(){var t=(s-(new Date).getTime())/a*100;e.css("width",t+"%")}var o,a,s;r.progressBar=t,t.start=function(t){o&&clearInterval(o),a=parseFloat(t),s=(new Date).getTime()+a,o=setInterval(i,10)},t.stop=function(){o&&clearInterval(o)},t.$on("$destroy",function(){clearInterval(o)})}}}angular.module("toastr").directive("progressBar",t),t.$inject=["toastrConfig"]}(),function(){"use strict";angular.module("toastr").controller("ToastController",function(){this.progressBar=null,this.startProgressBar=function(t){this.progressBar&&this.progressBar.start(t)},this.stopProgressBar=function(){this.progressBar&&this.progressBar.stop()}})}(),function(){"use strict";function t(t,e,n,r){return{templateUrl:function(){return n.templates.toast},controller:"ToastController",link:function(n,i,o,a){function s(t){return a.startProgressBar(t),e(function(){a.stopProgressBar(),r.remove(n.toastId)},t,1)}function u(){n.progressBar=!1,a.stopProgressBar()}var l;if(n.toastClass=n.options.toastClass,n.titleClass=n.options.titleClass,n.messageClass=n.options.messageClass,n.progressBar=n.options.progressBar,n.options.closeHtml){var c=angular.element(n.options.closeHtml),p=t.get("$compile");c.addClass("toast-close-button"),c.attr("ng-click","close(true, $event)"),p(c)(n),i.children().prepend(c)}n.init=function(){n.options.timeOut&&(l=s(n.options.timeOut)),n.options.onShown&&n.options.onShown()},i.on("mouseenter",function(){u(),l&&e.cancel(l)}),n.tapToast=function(){angular.isFunction(n.options.onTap)&&n.options.onTap(),n.options.tapToDismiss&&n.close(!0)},n.close=function(t,e){e&&angular.isFunction(e.stopPropagation)&&e.stopPropagation(),r.remove(n.toastId,t)},n.refreshTimer=function(t){l&&(e.cancel(l),l=s(t||n.options.timeOut))},i.on("mouseleave",function(){0===n.options.timeOut&&0===n.options.extendedTimeOut||(n.$apply(function(){n.progressBar=n.options.progressBar}),l=s(n.options.extendedTimeOut))})}}}angular.module("toastr").directive("toast",t),t.$inject=["$injector","$interval","toastrConfig","toastr"]}(),function(){"use strict";function t(t,e,n,r,i,o,a){function s(e,n){function r(){return!h.length}var i=function(t){for(var e=0;e<h.length;e++)if(h[e].toastId===t)return h[e]}(e);i&&!i.deleting&&(i.deleting=!0,i.isOpened=!1,t.leave(i.el).then(function(){i.scope.options.onHidden&&i.scope.options.onHidden(!!n,i),i.scope.$destroy();var t=h.indexOf(i);delete m[i.scope.message],h.splice(t,1);var e=o.maxOpened;e&&h.length>=e&&h[e-1].open.resolve(),r()&&(d.remove(),d=null,v=a.defer())}))}function u(t,e,n,r){return angular.isObject(n)&&(r=n,n=null),p({iconClass:t,message:e,optionsOverride:r,title:n})}function l(){return angular.extend({},o)}function c(e){if(d)return v.promise;(d=angular.element("<div></div>")).attr("id",e.containerId),d.addClass(e.positionClass),d.css({"pointer-events":"auto"});var n=angular.element(document.querySelector(e.target));if(!n||!n.length)throw"Target for toasts doesn't exist";return t.enter(d,n).then(function(){v.resolve()}),v.promise}function p(n){function o(t,e,n){function r(e){if(n[e])return function(){n[e](t)}}n.allowHtml?(t.scope.allowHtml=!0,t.scope.title=i.trustAsHtml(e.title),t.scope.message=i.trustAsHtml(e.message)):(t.scope.title=e.title,t.scope.message=e.message),t.scope.toastType=t.iconClass,t.scope.toastId=t.toastId,t.scope.extraData=n.extraData,t.scope.options={extendedTimeOut:n.extendedTimeOut,messageClass:n.messageClass,onHidden:n.onHidden,onShown:r("onShown"),onTap:r("onTap"),progressBar:n.progressBar,tapToDismiss:n.tapToDismiss,timeOut:n.timeOut,titleClass:n.titleClass,toastClass:n.toastClass},n.closeButton&&(t.scope.options.closeHtml=n.closeHtml)}function u(t){var n=angular.element("<div toast></div>");return e.get("$compile")(n)(t)}var p=l();if(!function(){var t=p.preventDuplicates&&n.message===g,e=p.preventOpenDuplicates&&m[n.message];return!(!t&&!e&&(g=n.message,m[n.message]=!0,1))}()){var v=function(){var t={toastId:f++,isOpened:!1,scope:r.$new(),open:a.defer()};return t.iconClass=n.iconClass,n.optionsOverride&&(angular.extend(p,function(t){for(var e=["containerId","iconClasses","maxOpened","newestOnTop","positionClass","preventDuplicates","preventOpenDuplicates","templates"],n=0,r=e.length;n<r;n++)delete t[e[n]];return t}(n.optionsOverride)),t.iconClass=n.optionsOverride.iconClass||t.iconClass),o(t,n,p),t.el=u(t.scope),t}();if(h.push(v),p.autoDismiss&&p.maxOpened&&h.length>p.maxOpened)for(var y=h.slice(0,h.length-p.maxOpened),b=0,w=y.length;b<w;b++)s(y[b].toastId);return(p.maxOpened&&h.length<=p.maxOpened||!p.maxOpened)&&v.open.resolve(),v.open.promise.then(function(){c(p).then(function(){if(v.isOpened=!0,p.newestOnTop)t.enter(v.el,d).then(function(){v.scope.init()});else{var e=d[0].lastChild?angular.element(d[0].lastChild):null;t.enter(v.el,d,e).then(function(){v.scope.init()})}})}),v}}var d,f=0,h=[],g="",m={},v=a.defer();return{active:function(){return h.length},clear:function(t){if(1!==arguments.length||t)if(t)s(t.toastId);else for(var e=0;e<h.length;e++)s(h[e].toastId)},error:function(t,e,n){return u(l().iconClasses.error,t,e,n)},info:function(t,e,n){return u(l().iconClasses.info,t,e,n)},remove:s,success:function(t,e,n){return u(l().iconClasses.success,t,e,n)},warning:function(t,e,n){return u(l().iconClasses.warning,t,e,n)},refreshTimer:function(t,e){t&&t.isOpened&&h.indexOf(t)>=0&&t.scope.refreshTimer(e)}}}angular.module("toastr",[]).factory("toastr",t),t.$inject=["$animate","$injector","$document","$rootScope","$sce","toastrConfig","$q"]}(),function(){"use strict";angular.module("toastr").constant("toastrConfig",{allowHtml:!1,autoDismiss:!1,closeButton:!1,closeHtml:"<button>&times;</button>",containerId:"toast-container",extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},maxOpened:0,messageClass:"toast-message",newestOnTop:!0,onHidden:null,onShown:null,onTap:null,positionClass:"toast-top-right",preventDuplicates:!1,preventOpenDuplicates:!1,progressBar:!1,tapToDismiss:!0,target:"body",templates:{toast:"directives/toast/toast.html",progressbar:"directives/progressbar/progressbar.html"},timeOut:5e3,titleClass:"toast-title",toastClass:"toast"})}(),function(){"use strict";function t(t){return{require:"^toast",templateUrl:function(){return t.templates.progressbar},link:function(t,e,n,r){function i(){var t=(s-(new Date).getTime())/a*100;e.css("width",t+"%")}var o,a,s;r.progressBar=t,t.start=function(t){o&&clearInterval(o),a=parseFloat(t),s=(new Date).getTime()+a,o=setInterval(i,10)},t.stop=function(){o&&clearInterval(o)},t.$on("$destroy",function(){clearInterval(o)})}}}angular.module("toastr").directive("progressBar",t),t.$inject=["toastrConfig"]}(),function(){"use strict";angular.module("toastr").controller("ToastController",function(){this.progressBar=null,this.startProgressBar=function(t){this.progressBar&&this.progressBar.start(t)},this.stopProgressBar=function(){this.progressBar&&this.progressBar.stop()}})}(),function(){"use strict";function t(t,e,n,r){return{templateUrl:function(){return n.templates.toast},controller:"ToastController",link:function(n,i,o,a){function s(t){return a.startProgressBar(t),e(function(){a.stopProgressBar(),r.remove(n.toastId)},t,1)}function u(){n.progressBar=!1,a.stopProgressBar()}var l;if(n.toastClass=n.options.toastClass,n.titleClass=n.options.titleClass,n.messageClass=n.options.messageClass,n.progressBar=n.options.progressBar,n.options.closeHtml){var c=angular.element(n.options.closeHtml),p=t.get("$compile");c.addClass("toast-close-button"),c.attr("ng-click","close(true, $event)"),p(c)(n),i.children().prepend(c)}n.init=function(){n.options.timeOut&&(l=s(n.options.timeOut)),n.options.onShown&&n.options.onShown()},i.on("mouseenter",function(){u(),l&&e.cancel(l)}),n.tapToast=function(){angular.isFunction(n.options.onTap)&&n.options.onTap(),n.options.tapToDismiss&&n.close(!0)},n.close=function(t,e){e&&angular.isFunction(e.stopPropagation)&&e.stopPropagation(),r.remove(n.toastId,t)},n.refreshTimer=function(t){l&&(e.cancel(l),l=s(t||n.options.timeOut))},i.on("mouseleave",function(){0===n.options.timeOut&&0===n.options.extendedTimeOut||(n.$apply(function(){n.progressBar=n.options.progressBar}),l=s(n.options.extendedTimeOut))})}}}angular.module("toastr").directive("toast",t),t.$inject=["$injector","$interval","toastrConfig","toastr"]}(),angular.module("toastr").run(["$templateCache",function(t){t.put("directives/progressbar/progressbar.html",'<div class="toast-progress"></div>\n'),t.put("directives/toast/toast.html",'<div class="{{toastClass}} {{toastType}}" ng-click="tapToast()">\n <div ng-switch on="allowHtml">\n <div ng-switch-default ng-if="title" class="{{titleClass}}" aria-label="{{title}}">{{title}}</div>\n <div ng-switch-default class="{{messageClass}}" aria-label="{{message}}">{{message}}</div>\n <div ng-switch-when="true" ng-if="title" class="{{titleClass}}" ng-bind-html="title"></div>\n <div ng-switch-when="true" class="{{messageClass}}" ng-bind-html="message"></div>\n </div>\n <progress-bar ng-if="progressBar"></progress-bar>\n</div>\n')}]),angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.tabindex","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.datepicker","ui.bootstrap.position","ui.bootstrap.datepickerPopup","ui.bootstrap.debounce","ui.bootstrap.multiMap","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["uib/template/accordion/accordion-group.html","uib/template/accordion/accordion.html","uib/template/alert/alert.html","uib/template/carousel/carousel.html","uib/template/carousel/slide.html","uib/template/datepicker/datepicker.html","uib/template/datepicker/day.html","uib/template/datepicker/month.html","uib/template/datepicker/year.html","uib/template/datepickerPopup/popup.html","uib/template/modal/window.html","uib/template/pager/pager.html","uib/template/pagination/pagination.html","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","uib/template/progressbar/bar.html","uib/template/progressbar/progress.html","uib/template/progressbar/progressbar.html","uib/template/rating/rating.html","uib/template/tabs/tab.html","uib/template/tabs/tabset.html","uib/template/timepicker/timepicker.html","uib/template/typeahead/typeahead-match.html","uib/template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.collapse",[]).directive("uibCollapse",["$animate","$q","$parse","$injector",function(t,e,n,r){var i=r.has("$animateCss")?r.get("$animateCss"):null;return{link:function(r,o,a){function s(t){return m?{width:t.scrollWidth+"px"}:{height:t.scrollHeight+"px"}}function u(){o.hasClass("collapse")&&o.hasClass("in")||e.resolve(d(r)).then(function(){o.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),i?i(o,{addClass:"in",easing:"ease",css:{overflow:"hidden"},to:s(o[0])}).start().finally(l):t.addClass(o,"in",{css:{overflow:"hidden"},to:s(o[0])}).then(l)},angular.noop)}function l(){o.removeClass("collapsing").addClass("collapse").css(v),f(r)}function c(){if(!o.hasClass("collapse")&&!o.hasClass("in"))return p();e.resolve(h(r)).then(function(){o.css(s(o[0])).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),i?i(o,{removeClass:"in",to:y}).start().finally(p):t.removeClass(o,"in",{to:y}).then(p)},angular.noop)}function p(){o.css(y),o.removeClass("collapsing").addClass("collapse"),g(r)}var d=n(a.expanding),f=n(a.expanded),h=n(a.collapsing),g=n(a.collapsed),m=!1,v={},y={};(m=!!("horizontal"in a))?(v={width:""},y={width:"0"}):(v={height:""},y={height:"0"}),r.$eval(a.uibCollapse)||o.addClass("in").addClass("collapse").attr("aria-expanded",!0).attr("aria-hidden",!1).css(v),r.$watch(a.uibCollapse,function(t){t?c():u()})}}}]),angular.module("ui.bootstrap.tabindex",[]).directive("uibTabindexToggle",function(){return{restrict:"A",link:function(t,e,n){n.$observe("disabled",function(t){n.$set("tabindex",t?-1:null)})}}}),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse","ui.bootstrap.tabindex"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(t,e,n){this.groups=[],this.closeOthers=function(r){(angular.isDefined(e.closeOthers)?t.$eval(e.closeOthers):n.closeOthers)&&angular.forEach(this.groups,function(t){t!==r&&(t.isOpen=!1)})},this.addGroup=function(t){var e=this;this.groups.push(t),t.$on("$destroy",function(n){e.removeGroup(t)})},this.removeGroup=function(t){var e=this.groups.indexOf(t);-1!==e&&this.groups.splice(e,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(t,e){return e.templateUrl||"uib/template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,restrict:"A",templateUrl:function(t,e){return e.templateUrl||"uib/template/accordion/accordion-group.html"},scope:{heading:"@",panelClass:"@?",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(t){this.heading=t}},link:function(t,e,n,r){e.addClass("panel"),r.addGroup(t),t.openClass=n.openClass||"panel-open",t.panelClass=n.panelClass||"panel-default",t.$watch("isOpen",function(n){e.toggleClass(t.openClass,!!n),n&&r.closeOthers(t)}),t.toggleOpen=function(e){t.isDisabled||e&&32!==e.which||(t.isOpen=!t.isOpen)};var i="accordiongroup-"+t.$id+"-"+Math.floor(1e4*Math.random());t.headingId=i+"-tab",t.panelId=i+"-panel"}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(t,e,n,r,i){r.setHeading(i(t,angular.noop))}}}).directive("uibAccordionTransclude",function(){return{require:"^uibAccordionGroup",link:function(t,e,n,r){t.$watch(function(){return r[n.uibAccordionTransclude]},function(t){if(t){var n=angular.element(e[0].querySelector("uib-accordion-header,data-uib-accordion-header,x-uib-accordion-header,uib\\:accordion-header,[uib-accordion-header],[data-uib-accordion-header],[x-uib-accordion-header]"));n.html(""),n.append(t)}})}}}),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$element","$attrs","$interpolate","$timeout",function(t,e,n,r,i){t.closeable=!!n.close,e.addClass("alert"),n.$set("role","alert"),t.closeable&&e.addClass("alert-dismissible");var o=angular.isDefined(n.dismissOnTimeout)?r(n.dismissOnTimeout)(t.$parent):null;o&&i(function(){t.close()},parseInt(o,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",restrict:"A",templateUrl:function(t,e){return e.templateUrl||"uib/template/alert/alert.html"},transclude:!0,scope:{close:"&"}}}),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(t){this.activeClass=t.activeClass||"active",this.toggleEvent=t.toggleEvent||"click"}]).directive("uibBtnRadio",["$parse",function(t){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(e,n,r,i){var o=i[0],a=i[1],s=t(r.uibUncheckable);n.find("input").css({display:"none"}),a.$render=function(){n.toggleClass(o.activeClass,angular.equals(a.$modelValue,e.$eval(r.uibBtnRadio)))},n.on(o.toggleEvent,function(){if(!r.disabled){var t=n.hasClass(o.activeClass);t&&!angular.isDefined(r.uncheckable)||e.$apply(function(){a.$setViewValue(t?null:e.$eval(r.uibBtnRadio)),a.$render()})}}),r.uibUncheckable&&e.$watch(s,function(t){r.$set("uncheckable",t?"":void 0)})}}}]).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(t,e,n,r){function i(){return a(n.btnCheckboxTrue,!0)}function o(){return a(n.btnCheckboxFalse,!1)}function a(e,n){return angular.isDefined(e)?t.$eval(e):n}var s=r[0],u=r[1];e.find("input").css({display:"none"}),u.$render=function(){e.toggleClass(s.activeClass,angular.equals(u.$modelValue,i()))},e.on(s.toggleEvent,function(){n.disabled||t.$apply(function(){u.$setViewValue(e.hasClass(s.activeClass)?o():i()),u.$render()})})}}}),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$timeout","$animate",function(t,e,n,r,i){function o(t){for(var e=0;e<h.length;e++)h[e].slide.active=e===t}function a(n,r,a){if(!v){if(angular.extend(n,{direction:a}),angular.extend(h[m].slide||{},{direction:a}),i.enabled(e)&&!t.$currentTransition&&h[r].element&&f.slides.length>1){h[r].element.data(g,n.direction);var s=f.getCurrentIndex();angular.isNumber(s)&&h[s].element&&h[s].element.data(g,n.direction),t.$currentTransition=!0,i.on("addClass",h[r].element,function(e,n){"close"===n&&(t.$currentTransition=null,i.off("addClass",e))})}t.active=n.index,m=n.index,o(r),l()}}function s(t){for(var e=0;e<h.length;e++)if(h[e].slide===t)return e}function u(){p&&(n.cancel(p),p=null)}function l(){u();var e=+t.interval;!isNaN(e)&&e>0&&(p=n(c,e))}function c(){var e=+t.interval;d&&!isNaN(e)&&e>0&&h.length?t.next():t.pause()}var p,d,f=this,h=f.slides=t.slides=[],g="uib-slideDirection",m=t.active,v=!1;e.addClass("carousel"),f.addSlide=function(e,n){h.push({slide:e,element:n}),h.sort(function(t,e){return+t.slide.index-+e.slide.index}),(e.index===t.active||1===h.length&&!angular.isNumber(t.active))&&(t.$currentTransition&&(t.$currentTransition=null),m=e.index,t.active=e.index,o(m),f.select(h[s(e)]),1===h.length&&t.play())},f.getCurrentIndex=function(){for(var t=0;t<h.length;t++)if(h[t].slide.index===m)return t},f.next=t.next=function(){var e=(f.getCurrentIndex()+1)%h.length;{if(0!==e||!t.noWrap())return f.select(h[e],"next");t.pause()}},f.prev=t.prev=function(){var e=f.getCurrentIndex()-1<0?h.length-1:f.getCurrentIndex()-1;{if(!t.noWrap()||e!==h.length-1)return f.select(h[e],"prev");t.pause()}},f.removeSlide=function(e){var n=s(e);h.splice(n,1),h.length>0&&m===n?n>=h.length?(m=h.length-1,t.active=m,o(m),f.select(h[h.length-1])):(m=n,t.active=m,o(m),f.select(h[n])):m>n&&(m--,t.active=m),0===h.length&&(m=null,t.active=null)},f.select=t.select=function(e,n){var r=s(e.slide);void 0===n&&(n=r>f.getCurrentIndex()?"next":"prev"),e.slide.index===m||t.$currentTransition||a(e.slide,r,n)},t.indexOfSlide=function(t){return+t.slide.index},t.isActive=function(e){return t.active===e.slide.index},t.isPrevDisabled=function(){return 0===t.active&&t.noWrap()},t.isNextDisabled=function(){return t.active===h.length-1&&t.noWrap()},t.pause=function(){t.noPause||(d=!1,u())},t.play=function(){d||(d=!0,l())},e.on("mouseenter",t.pause),e.on("mouseleave",t.play),t.$on("$destroy",function(){v=!0,u()}),t.$watch("noTransition",function(t){i.enabled(e,!t)}),t.$watch("interval",l),t.$watchCollection("slides",function(e){e.length||(t.$currentTransition=null)}),t.$watch("active",function(t){if(angular.isNumber(t)&&m!==t){for(var e=0;e<h.length;e++)if(h[e].slide.index===t){t=e;break}h[t]&&(o(t),f.select(h[t]),m=t)}})}]).directive("uibCarousel",function(){return{transclude:!0,controller:"UibCarouselController",controllerAs:"carousel",restrict:"A",templateUrl:function(t,e){return e.templateUrl||"uib/template/carousel/carousel.html"},scope:{active:"=",interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}).directive("uibSlide",["$animate",function(t){return{require:"^uibCarousel",restrict:"A",transclude:!0,templateUrl:function(t,e){return e.templateUrl||"uib/template/carousel/slide.html"},scope:{actual:"=?",index:"=?"},link:function(e,n,r,i){n.addClass("item"),i.addSlide(e,n),e.$on("$destroy",function(){i.removeSlide(e)}),e.$watch("active",function(e){t[e?"addClass":"removeClass"](n,"active")})}}}]).animation(".item",["$animateCss",function(t){function e(t,e,n){t.removeClass(e),n&&n()}return{beforeAddClass:function(n,r,i){if("active"===r){var o=!1,a=n.data("uib-slideDirection"),s="next"===a?"left":"right",u=e.bind(this,n,s+" "+a,i);return n.addClass(a),t(n,{addClass:s}).start().done(u),function(){o=!0}}i()},beforeRemoveClass:function(n,r,i){if("active"===r){var o=!1,a="next"===n.data("uib-slideDirection")?"left":"right",s=e.bind(this,n,a,i);return t(n,{addClass:a}).start().done(s),function(){o=!0}}i()}}}]),angular.module("ui.bootstrap.dateparser",[]).service("uibDateParser",["$log","$locale","dateFilter","orderByFilter","filterFilter",function(t,e,n,r,i){function o(t){return i(m,{key:t},!0)[0]}function a(t){var e=[],n=t.split(""),i=t.indexOf("'");if(i>-1){var o=!1;t=t.split("");for(var a=i;a<t.length;a++)o?("'"===t[a]&&(a+1<t.length&&"'"===t[a+1]?(t[a+1]="$",n[a+1]=""):(n[a]="",o=!1)),t[a]="$"):"'"===t[a]&&(t[a]="$",n[a]="",o=!0);t=t.join("")}return angular.forEach(m,function(r){var i=t.indexOf(r.key);if(i>-1){t=t.split(""),n[i]="("+r.regex+")",t[i]="$";for(var o=i+1,a=i+r.key.length;o<a;o++)n[o]="",t[o]="$";t=t.join(""),e.push({index:i,key:r.key,apply:r.apply,matcher:r.regex})}}),{regex:new RegExp("^"+n.join("")+"$"),map:r(e,"index")}}function s(t){for(var e,n,r=[],i=0;i<t.length;)if(angular.isNumber(n)){if("'"===t.charAt(i))(i+1>=t.length||"'"!==t.charAt(i+1))&&(r.push(u(t,n,i)),n=null);else if(i===t.length)for(;n<t.length;)e=l(t,n),r.push(e),n=e.endIdx;i++}else"'"!==t.charAt(i)?(e=l(t,i),r.push(e.parser),i=e.endIdx):(n=i,i++);return r}function u(t,e,n){return function(){return t.substr(e+1,n-e-1)}}function l(t,e){for(var n=t.substr(e),r=0;r<m.length;r++)if(new RegExp("^"+m[r].key).test(n)){var i=m[r];return{endIdx:e+i.key.length,parser:i.formatter}}return{endIdx:e+1,parser:function(){return n.charAt(0)}}}function c(t,e,n){return!(n<1)&&(1===e&&n>28?29===n&&(t%4==0&&t%100!=0||t%400==0):3!==e&&5!==e&&8!==e&&10!==e||n<31)}function p(t){return parseInt(t,10)}function d(t,e){t=t.replace(/:/g,"");var n=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(n)?e:n}function f(t,e){return(t=new Date(t.getTime())).setMinutes(t.getMinutes()+e),t}function h(t,e,n){n=n?-1:1;var r=t.getTimezoneOffset();return f(t,n*(d(e,r)-r))}var g,m,v=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){g=e.id,this.parsers={},this.formatters={},m=[{key:"yyyy",regex:"\\d{4}",apply:function(t){this.year=+t},formatter:function(t){var e=new Date;return e.setFullYear(Math.abs(t.getFullYear())),n(e,"yyyy")}},{key:"yy",regex:"\\d{2}",apply:function(t){t=+t,this.year=t<69?t+2e3:t+1900},formatter:function(t){var e=new Date;return e.setFullYear(Math.abs(t.getFullYear())),n(e,"yy")}},{key:"y",regex:"\\d{1,4}",apply:function(t){this.year=+t},formatter:function(t){var e=new Date;return e.setFullYear(Math.abs(t.getFullYear())),n(e,"y")}},{key:"M!",regex:"0?[1-9]|1[0-2]",apply:function(t){this.month=t-1},formatter:function(t){var e=t.getMonth();return/^[0-9]$/.test(e)?n(t,"MM"):n(t,"M")}},{key:"MMMM",regex:e.DATETIME_FORMATS.MONTH.join("|"),apply:function(t){this.month=e.DATETIME_FORMATS.MONTH.indexOf(t)},formatter:function(t){return n(t,"MMMM")}},{key:"MMM",regex:e.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(t){this.month=e.DATETIME_FORMATS.SHORTMONTH.indexOf(t)},formatter:function(t){return n(t,"MMM")}},{key:"MM",regex:"0[1-9]|1[0-2]",apply:function(t){this.month=t-1},formatter:function(t){return n(t,"MM")}},{key:"M",regex:"[1-9]|1[0-2]",apply:function(t){this.month=t-1},formatter:function(t){return n(t,"M")}},{key:"d!",regex:"[0-2]?[0-9]{1}|3[0-1]{1}",apply:function(t){this.date=+t},formatter:function(t){var e=t.getDate();return/^[1-9]$/.test(e)?n(t,"dd"):n(t,"d")}},{key:"dd",regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(t){this.date=+t},formatter:function(t){return n(t,"dd")}},{key:"d",regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(t){this.date=+t},formatter:function(t){return n(t,"d")}},{key:"EEEE",regex:e.DATETIME_FORMATS.DAY.join("|"),formatter:function(t){return n(t,"EEEE")}},{key:"EEE",regex:e.DATETIME_FORMATS.SHORTDAY.join("|"),formatter:function(t){return n(t,"EEE")}},{key:"HH",regex:"(?:0|1)[0-9]|2[0-3]",apply:function(t){this.hours=+t},formatter:function(t){return n(t,"HH")}},{key:"hh",regex:"0[0-9]|1[0-2]",apply:function(t){this.hours=+t},formatter:function(t){return n(t,"hh")}},{key:"H",regex:"1?[0-9]|2[0-3]",apply:function(t){this.hours=+t},formatter:function(t){return n(t,"H")}},{key:"h",regex:"[0-9]|1[0-2]",apply:function(t){this.hours=+t},formatter:function(t){return n(t,"h")}},{key:"mm",regex:"[0-5][0-9]",apply:function(t){this.minutes=+t},formatter:function(t){return n(t,"mm")}},{key:"m",regex:"[0-9]|[1-5][0-9]",apply:function(t){this.minutes=+t},formatter:function(t){return n(t,"m")}},{key:"sss",regex:"[0-9][0-9][0-9]",apply:function(t){this.milliseconds=+t},formatter:function(t){return n(t,"sss")}},{key:"ss",regex:"[0-5][0-9]",apply:function(t){this.seconds=+t},formatter:function(t){return n(t,"ss")}},{key:"s",regex:"[0-9]|[1-5][0-9]",apply:function(t){this.seconds=+t},formatter:function(t){return n(t,"s")}},{key:"a",regex:e.DATETIME_FORMATS.AMPMS.join("|"),apply:function(t){12===this.hours&&(this.hours=0),"PM"===t&&(this.hours+=12)},formatter:function(t){return n(t,"a")}},{key:"Z",regex:"[+-]\\d{4}",apply:function(t){var e=t.match(/([+-])(\d{2})(\d{2})/),n=e[1],r=e[2],i=e[3];this.hours+=p(n+r),this.minutes+=p(n+i)},formatter:function(t){return n(t,"Z")}},{key:"ww",regex:"[0-4][0-9]|5[0-3]",formatter:function(t){return n(t,"ww")}},{key:"w",regex:"[0-9]|[1-4][0-9]|5[0-3]",formatter:function(t){return n(t,"w")}},{key:"GGGG",regex:e.DATETIME_FORMATS.ERANAMES.join("|").replace(/\s/g,"\\s"),formatter:function(t){return n(t,"GGGG")}},{key:"GGG",regex:e.DATETIME_FORMATS.ERAS.join("|"),formatter:function(t){return n(t,"GGG")}},{key:"GG",regex:e.DATETIME_FORMATS.ERAS.join("|"),formatter:function(t){return n(t,"GG")}},{key:"G",regex:e.DATETIME_FORMATS.ERAS.join("|"),formatter:function(t){return n(t,"G")}}],angular.version.major>=1&&angular.version.minor>4&&m.push({key:"LLLL",regex:e.DATETIME_FORMATS.STANDALONEMONTH.join("|"),apply:function(t){this.month=e.DATETIME_FORMATS.STANDALONEMONTH.indexOf(t)},formatter:function(t){return n(t,"LLLL")}})},this.init(),this.getParser=function(t){var e=o(t);return e&&e.apply||null},this.overrideParser=function(t,e){var n=o(t);n&&angular.isFunction(e)&&(this.parsers={},n.apply=e)}.bind(this),this.filter=function(t,n){return angular.isDate(t)&&!isNaN(t)&&n?(n=e.DATETIME_FORMATS[n]||n,e.id!==g&&this.init(),this.formatters[n]||(this.formatters[n]=s(n)),this.formatters[n].reduce(function(e,n){return e+n(t)},"")):""},this.parse=function(n,r,i){if(!angular.isString(n)||!r)return n;r=(r=e.DATETIME_FORMATS[r]||r).replace(v,"\\$&"),e.id!==g&&this.init(),this.parsers[r]||(this.parsers[r]=a(r));var o=this.parsers[r],s=o.regex,u=o.map,l=n.match(s),p=!1;if(l&&l.length){var d,f;angular.isDate(i)&&!isNaN(i.getTime())?d={year:i.getFullYear(),month:i.getMonth(),date:i.getDate(),hours:i.getHours(),minutes:i.getMinutes(),seconds:i.getSeconds(),milliseconds:i.getMilliseconds()}:(i&&t.warn("dateparser:","baseDate is not a valid date"),d={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var h=1,m=l.length;h<m;h++){var y=u[h-1];"Z"===y.matcher&&(p=!0),y.apply&&y.apply.call(d,l[h])}var b=p?Date.prototype.setUTCFullYear:Date.prototype.setFullYear,w=p?Date.prototype.setUTCHours:Date.prototype.setHours;return c(d.year,d.month,d.date)&&(!angular.isDate(i)||isNaN(i.getTime())||p?(f=new Date(0),b.call(f,d.year,d.month,d.date),w.call(f,d.hours||0,d.minutes||0,d.seconds||0,d.milliseconds||0)):(f=new Date(i),b.call(f,d.year,d.month,d.date),w.call(f,d.hours,d.minutes,d.seconds,d.milliseconds))),f}},this.toTimezone=function(t,e){return t&&e?h(t,e):t},this.fromTimezone=function(t,e){return t&&e?h(t,e,!0):t},this.timezoneToOffset=d,this.addDateMinutes=f,this.convertTimezoneToLocal=h}]),angular.module("ui.bootstrap.isClass",[]).directive("uibIsClass",["$animate",function(t){var e=/^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/,n=/^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;return{restrict:"A",compile:function(r,i){function o(e,r){var i=e.match(n),o=r.$eval(i[1]),a=i[2],s=l[e];if(!s){var c=function(e){var n=null;u.some(function(t){if(t.scope.$eval(p)===e)return n=t,!0}),s.lastActivated!==n&&(s.lastActivated&&t.removeClass(s.lastActivated.element,o),n&&t.addClass(n.element,o),s.lastActivated=n)};l[e]=s={lastActivated:null,scope:r,watchFn:c,compareWithExp:a,watcher:r.$watch(a,c)}}s.watchFn(r.$eval(a))}function a(t){var e=t.targetScope,n=s.indexOf(e);if(s.splice(n,1),u.splice(n,1),s.length){var r=s[0];angular.forEach(l,function(t){t.scope===e&&(t.watcher=r.$watch(t.compareWithExp,t.watchFn),t.scope=r)})}else l={}}var s=[],u=[],l={},c=i.uibIsClass.match(e),p=c[2],d=c[1].split(",");return function(t,e,n){s.push(t),u.push({scope:t,element:e}),d.forEach(function(e,n){o(e,t)}),t.$on("$destroy",a)}}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.isClass"]).value("$datepickerSuppressError",!1).value("$datepickerLiteralWarning",!0).constant("uibDatepickerConfig",{datepickerMode:"day",formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",maxDate:null,maxMode:"year",minDate:null,minMode:"day",monthColumns:3,ngModelOptions:{},shortcutPropagation:!1,showWeeks:!0,yearColumns:5,yearRows:4}).controller("UibDatepickerController",["$scope","$element","$attrs","$parse","$interpolate","$locale","$log","dateFilter","uibDatepickerConfig","$datepickerLiteralWarning","$datepickerSuppressError","uibDateParser",function(t,e,n,r,i,o,a,s,u,l,c,p){function d(e){t.datepickerMode=e,t.datepickerOptions.datepickerMode=e}function f(e){var n;if(angular.version.minor<6)(n=e.$options||t.datepickerOptions.ngModelOptions||u.ngModelOptions||{}).getOption=function(t){return n[t]};else{var r=e.$options.getOption("timezone")||(t.datepickerOptions.ngModelOptions?t.datepickerOptions.ngModelOptions.timezone:null)||(u.ngModelOptions?u.ngModelOptions.timezone:null);n=e.$options.createChild(u.ngModelOptions).createChild(t.datepickerOptions.ngModelOptions).createChild(e.$options).createChild({timezone:r})}return n}var h=this,g={$setViewValue:angular.noop},m={},v=[];e.addClass("uib-datepicker"),n.$set("role","application"),t.datepickerOptions||(t.datepickerOptions={}),this.modes=["day","month","year"],["customClass","dateDisabled","datepickerMode","formatDay","formatDayHeader","formatDayTitle","formatMonth","formatMonthTitle","formatYear","maxDate","maxMode","minDate","minMode","monthColumns","showWeeks","shortcutPropagation","startingDay","yearColumns","yearRows"].forEach(function(e){switch(e){case"customClass":case"dateDisabled":t[e]=t.datepickerOptions[e]||angular.noop;break;case"datepickerMode":t.datepickerMode=angular.isDefined(t.datepickerOptions.datepickerMode)?t.datepickerOptions.datepickerMode:u.datepickerMode;break;case"formatDay":case"formatDayHeader":case"formatDayTitle":case"formatMonth":case"formatMonthTitle":case"formatYear":h[e]=angular.isDefined(t.datepickerOptions[e])?i(t.datepickerOptions[e])(t.$parent):u[e];break;case"monthColumns":case"showWeeks":case"shortcutPropagation":case"yearColumns":case"yearRows":h[e]=angular.isDefined(t.datepickerOptions[e])?t.datepickerOptions[e]:u[e];break;case"startingDay":angular.isDefined(t.datepickerOptions.startingDay)?h.startingDay=t.datepickerOptions.startingDay:angular.isNumber(u.startingDay)?h.startingDay=u.startingDay:h.startingDay=(o.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7;break;case"maxDate":case"minDate":t.$watch("datepickerOptions."+e,function(t){t?angular.isDate(t)?h[e]=p.fromTimezone(new Date(t),m.getOption("timezone")):(l&&a.warn("Literal date support has been deprecated, please switch to date object usage"),h[e]=new Date(s(t,"medium"))):h[e]=u[e]?p.fromTimezone(new Date(u[e]),m.getOption("timezone")):null,h.refreshView()});break;case"maxMode":case"minMode":t.datepickerOptions[e]?t.$watch(function(){return t.datepickerOptions[e]},function(n){h[e]=t[e]=angular.isDefined(n)?n:t.datepickerOptions[e],("minMode"===e&&h.modes.indexOf(t.datepickerOptions.datepickerMode)<h.modes.indexOf(h[e])||"maxMode"===e&&h.modes.indexOf(t.datepickerOptions.datepickerMode)>h.modes.indexOf(h[e]))&&(t.datepickerMode=h[e],t.datepickerOptions.datepickerMode=h[e])}):h[e]=t[e]=u[e]||null}}),t.uniqueId="datepicker-"+t.$id+"-"+Math.floor(1e4*Math.random()),t.disabled=angular.isDefined(n.disabled)||!1,angular.isDefined(n.ngDisabled)&&v.push(t.$parent.$watch(n.ngDisabled,function(e){t.disabled=e,h.refreshView()})),t.isActive=function(e){return 0===h.compare(e.date,h.activeDate)&&(t.activeDateId=e.uid,!0)},this.init=function(e){m=f(g=e),t.datepickerOptions.initDate?(h.activeDate=p.fromTimezone(t.datepickerOptions.initDate,m.getOption("timezone"))||new Date,t.$watch("datepickerOptions.initDate",function(t){t&&(g.$isEmpty(g.$modelValue)||g.$invalid)&&(h.activeDate=p.fromTimezone(t,m.getOption("timezone")),h.refreshView())})):h.activeDate=new Date;var n=g.$modelValue?new Date(g.$modelValue):new Date;this.activeDate=isNaN(n)?p.fromTimezone(new Date,m.getOption("timezone")):p.fromTimezone(n,m.getOption("timezone")),g.$render=function(){h.render()}},this.render=function(){if(g.$viewValue){var t=new Date(g.$viewValue);!isNaN(t)?this.activeDate=p.fromTimezone(t,m.getOption("timezone")):c||a.error('Datepicker directive: "ng-model" value must be a Date object')}this.refreshView()},this.refreshView=function(){if(this.element){t.selectedDt=null,this._refreshView(),t.activeDt&&(t.activeDateId=t.activeDt.uid);var e=g.$viewValue?new Date(g.$viewValue):null;e=p.fromTimezone(e,m.getOption("timezone")),g.$setValidity("dateDisabled",!e||this.element&&!this.isDisabled(e))}},this.createDateObject=function(e,n){var r=g.$viewValue?new Date(g.$viewValue):null;r=p.fromTimezone(r,m.getOption("timezone"));var i=new Date;i=p.fromTimezone(i,m.getOption("timezone"));var o=this.compare(e,i),a={date:e,label:p.filter(e,n),selected:r&&0===this.compare(e,r),disabled:this.isDisabled(e),past:o<0,current:0===o,future:o>0,customClass:this.customClass(e)||null};return r&&0===this.compare(e,r)&&(t.selectedDt=a),h.activeDate&&0===this.compare(a.date,h.activeDate)&&(t.activeDt=a),a},this.isDisabled=function(e){return t.disabled||this.minDate&&this.compare(e,this.minDate)<0||this.maxDate&&this.compare(e,this.maxDate)>0||t.dateDisabled&&t.dateDisabled({date:e,mode:t.datepickerMode})},this.customClass=function(e){return t.customClass({date:e,mode:t.datepickerMode})},this.split=function(t,e){for(var n=[];t.length>0;)n.push(t.splice(0,e));return n},t.select=function(e){if(t.datepickerMode===h.minMode){var n=g.$viewValue?p.fromTimezone(new Date(g.$viewValue),m.getOption("timezone")):new Date(0,0,0,0,0,0,0);n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n=p.toTimezone(n,m.getOption("timezone")),g.$setViewValue(n),g.$render()}else h.activeDate=e,d(h.modes[h.modes.indexOf(t.datepickerMode)-1]),t.$emit("uib:datepicker.mode");t.$broadcast("uib:datepicker.focus")},t.move=function(t){var e=h.activeDate.getFullYear()+t*(h.step.years||0),n=h.activeDate.getMonth()+t*(h.step.months||0);h.activeDate.setFullYear(e,n,1),h.refreshView()},t.toggleMode=function(e){e=e||1,t.datepickerMode===h.maxMode&&1===e||t.datepickerMode===h.minMode&&-1===e||(d(h.modes[h.modes.indexOf(t.datepickerMode)+e]),t.$emit("uib:datepicker.mode"))},t.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};t.$on("uib:datepicker.focus",function(){h.element[0].focus()}),t.keydown=function(e){var n=t.keys[e.which];if(n&&!e.shiftKey&&!e.altKey&&!t.disabled)if(e.preventDefault(),h.shortcutPropagation||e.stopPropagation(),"enter"===n||"space"===n){if(h.isDisabled(h.activeDate))return;t.select(h.activeDate)}else!e.ctrlKey||"up"!==n&&"down"!==n?(h.handleKeyDown(n,e),h.refreshView()):t.toggleMode("up"===n?1:-1)},e.on("keydown",function(e){t.$apply(function(){t.keydown(e)})}),t.$on("$destroy",function(){for(;v.length;)v.shift()()})}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(t,e,n){function r(t,e){return 1!==e||t%4!=0||t%100==0&&t%400!=0?o[e]:29}function i(t){var e=new Date(t);e.setDate(e.getDate()+4-(e.getDay()||7));var n=e.getTime();return e.setMonth(0),e.setDate(1),Math.floor(Math.round((n-e)/864e5)/7)+1}var o=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=e,this.init=function(e){angular.extend(e,this),t.showWeeks=e.showWeeks,e.refreshView()},this.getDates=function(t,e){for(var n,r=new Array(e),i=new Date(t),o=0;o<e;)n=new Date(i),r[o++]=n,i.setDate(i.getDate()+1);return r},this._refreshView=function(){var e=this.activeDate.getFullYear(),r=this.activeDate.getMonth(),o=new Date(this.activeDate);o.setFullYear(e,r,1);var a=this.startingDay-o.getDay(),s=a>0?7-a:-a,u=new Date(o);s>0&&u.setDate(1-s);for(var l=this.getDates(u,42),c=0;c<42;c++)l[c]=angular.extend(this.createDateObject(l[c],this.formatDay),{secondary:l[c].getMonth()!==r,uid:t.uniqueId+"-"+c});t.labels=new Array(7);for(var p=0;p<7;p++)t.labels[p]={abbr:n(l[p].date,this.formatDayHeader),full:n(l[p].date,"EEEE")};if(t.title=n(this.activeDate,this.formatDayTitle),t.rows=this.split(l,7),t.showWeeks){t.weekNumbers=[];for(var d=(11-this.startingDay)%7,f=t.rows.length,h=0;h<f;h++)t.weekNumbers.push(i(t.rows[h][d].date))}},this.compare=function(t,e){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate()),r=new Date(e.getFullYear(),e.getMonth(),e.getDate());return n.setFullYear(t.getFullYear()),r.setFullYear(e.getFullYear()),n-r},this.handleKeyDown=function(t,e){var n=this.activeDate.getDate();if("left"===t)n-=1;else if("up"===t)n-=7;else if("right"===t)n+=1;else if("down"===t)n+=7;else if("pageup"===t||"pagedown"===t){var i=this.activeDate.getMonth()+("pageup"===t?-1:1);this.activeDate.setMonth(i,1),n=Math.min(r(this.activeDate.getFullYear(),this.activeDate.getMonth()),n)}else"home"===t?n=1:"end"===t&&(n=r(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(n)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(t,e,n){this.step={years:1},this.element=e,this.init=function(t){angular.extend(t,this),t.refreshView()},this._refreshView=function(){for(var e,r=new Array(12),i=this.activeDate.getFullYear(),o=0;o<12;o++)(e=new Date(this.activeDate)).setFullYear(i,o,1),r[o]=angular.extend(this.createDateObject(e,this.formatMonth),{uid:t.uniqueId+"-"+o});t.title=n(this.activeDate,this.formatMonthTitle),t.rows=this.split(r,this.monthColumns),t.yearHeaderColspan=this.monthColumns>3?this.monthColumns-2:1},this.compare=function(t,e){var n=new Date(t.getFullYear(),t.getMonth()),r=new Date(e.getFullYear(),e.getMonth());return n.setFullYear(t.getFullYear()),r.setFullYear(e.getFullYear()),n-r},this.handleKeyDown=function(t,e){var n=this.activeDate.getMonth();if("left"===t)n-=1;else if("up"===t)n-=this.monthColumns;else if("right"===t)n+=1;else if("down"===t)n+=this.monthColumns;else if("pageup"===t||"pagedown"===t){var r=this.activeDate.getFullYear()+("pageup"===t?-1:1);this.activeDate.setFullYear(r)}else"home"===t?n=0:"end"===t&&(n=11);this.activeDate.setMonth(n)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(t,e,n){function r(t){return parseInt((t-1)/o,10)*o+1}var i,o;this.element=e,this.yearpickerInit=function(){i=this.yearColumns,o=this.yearRows*i,this.step={years:o}},this._refreshView=function(){for(var e,n=new Array(o),a=0,s=r(this.activeDate.getFullYear());a<o;a++)(e=new Date(this.activeDate)).setFullYear(s+a,0,1),n[a]=angular.extend(this.createDateObject(e,this.formatYear),{uid:t.uniqueId+"-"+a});t.title=[n[0].label,n[o-1].label].join(" - "),t.rows=this.split(n,i),t.columns=i},this.compare=function(t,e){return t.getFullYear()-e.getFullYear()},this.handleKeyDown=function(t,e){var n=this.activeDate.getFullYear();"left"===t?n-=1:"up"===t?n-=i:"right"===t?n+=1:"down"===t?n+=i:"pageup"===t||"pagedown"===t?n+=("pageup"===t?-1:1)*o:"home"===t?n=r(this.activeDate.getFullYear()):"end"===t&&(n=r(this.activeDate.getFullYear())+o-1),this.activeDate.setFullYear(n)}}]).directive("uibDatepicker",function(){return{templateUrl:function(t,e){return e.templateUrl||"uib/template/datepicker/datepicker.html"},scope:{datepickerOptions:"=?"},require:["uibDatepicker","^ngModel"],restrict:"A",controller:"UibDatepickerController",controllerAs:"datepicker",link:function(t,e,n,r){var i=r[0],o=r[1];i.init(o)}}}).directive("uibDaypicker",function(){return{templateUrl:function(t,e){return e.templateUrl||"uib/template/datepicker/day.html"},require:["^uibDatepicker","uibDaypicker"],restrict:"A",controller:"UibDaypickerController",link:function(t,e,n,r){var i=r[0];r[1].init(i)}}}).directive("uibMonthpicker",function(){return{templateUrl:function(t,e){return e.templateUrl||"uib/template/datepicker/month.html"},require:["^uibDatepicker","uibMonthpicker"],restrict:"A",controller:"UibMonthpickerController",link:function(t,e,n,r){var i=r[0];r[1].init(i)}}}).directive("uibYearpicker",function(){return{templateUrl:function(t,e){return e.templateUrl||"uib/template/datepicker/year.html"},require:["^uibDatepicker","uibYearpicker"],restrict:"A",controller:"UibYearpickerController",link:function(t,e,n,r){var i=r[0];angular.extend(i,r[1]),i.yearpickerInit(),i.refreshView()}}}),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(t,e){var n,r,i={normal:/(auto|scroll)/,hidden:/(auto|scroll|hidden)/},o={auto:/\s?auto?\s?/i,primary:/^(top|bottom|left|right)$/,secondary:/^(top|bottom|left|right|center)$/,vertical:/^(top|bottom)$/},a=/(HTML|BODY)/;return{getRawNode:function(t){return t.nodeName?t:t[0]||t},parseStyle:function(t){return t=parseFloat(t),isFinite(t)?t:0},offsetParent:function(n){for(var r=(n=this.getRawNode(n)).offsetParent||t[0].documentElement;r&&r!==t[0].documentElement&&function(t){return"static"===(e.getComputedStyle(t).position||"static")}(r);)r=r.offsetParent;return r||t[0].documentElement},scrollbarWidth:function(i){if(i){if(angular.isUndefined(r)){var o=t.find("body");o.addClass("uib-position-body-scrollbar-measure"),r=e.innerWidth-o[0].clientWidth,r=isFinite(r)?r:0,o.removeClass("uib-position-body-scrollbar-measure")}return r}if(angular.isUndefined(n)){var a=angular.element('<div class="uib-position-scrollbar-measure"></div>');t.find("body").append(a),n=a[0].offsetWidth-a[0].clientWidth,n=isFinite(n)?n:0,a.remove()}return n},scrollbarPadding:function(t){t=this.getRawNode(t);var n=e.getComputedStyle(t),r=this.parseStyle(n.paddingRight),i=this.parseStyle(n.paddingBottom),o=this.scrollParent(t,!1,!0),s=this.scrollbarWidth(a.test(o.tagName));return{scrollbarWidth:s,widthOverflow:o.scrollWidth>o.clientWidth,right:r+s,originalRight:r,heightOverflow:o.scrollHeight>o.clientHeight,bottom:i+s,originalBottom:i}},isScrollable:function(t,n){t=this.getRawNode(t);var r=n?i.hidden:i.normal,o=e.getComputedStyle(t);return r.test(o.overflow+o.overflowY+o.overflowX)},scrollParent:function(n,r,o){n=this.getRawNode(n);var a=r?i.hidden:i.normal,s=t[0].documentElement,u=e.getComputedStyle(n);if(o&&a.test(u.overflow+u.overflowY+u.overflowX))return n;var l="absolute"===u.position,c=n.parentElement||s;if(c===s||"fixed"===u.position)return s;for(;c.parentElement&&c!==s;){var p=e.getComputedStyle(c);if(l&&"static"!==p.position&&(l=!1),!l&&a.test(p.overflow+p.overflowY+p.overflowX))break;c=c.parentElement}return c},position:function(n,r){n=this.getRawNode(n);var i=this.offset(n);if(r){var o=e.getComputedStyle(n);i.top-=this.parseStyle(o.marginTop),i.left-=this.parseStyle(o.marginLeft)}var a=this.offsetParent(n),s={top:0,left:0};return a!==t[0].documentElement&&((s=this.offset(a)).top+=a.clientTop-a.scrollTop,s.left+=a.clientLeft-a.scrollLeft),{width:Math.round(angular.isNumber(i.width)?i.width:n.offsetWidth),height:Math.round(angular.isNumber(i.height)?i.height:n.offsetHeight),top:Math.round(i.top-s.top),left:Math.round(i.left-s.left)}},offset:function(n){var r=(n=this.getRawNode(n)).getBoundingClientRect();return{width:Math.round(angular.isNumber(r.width)?r.width:n.offsetWidth),height:Math.round(angular.isNumber(r.height)?r.height:n.offsetHeight),top:Math.round(r.top+(e.pageYOffset||t[0].documentElement.scrollTop)),left:Math.round(r.left+(e.pageXOffset||t[0].documentElement.scrollLeft))}},viewportOffset:function(n,r,i){i=!1!==i;var o=(n=this.getRawNode(n)).getBoundingClientRect(),a={top:0,left:0,bottom:0,right:0},s=r?t[0].documentElement:this.scrollParent(n),u=s.getBoundingClientRect();if(a.top=u.top+s.clientTop,a.left=u.left+s.clientLeft,s===t[0].documentElement&&(a.top+=e.pageYOffset,a.left+=e.pageXOffset),a.bottom=a.top+s.clientHeight,a.right=a.left+s.clientWidth,i){var l=e.getComputedStyle(s);a.top+=this.parseStyle(l.paddingTop),a.bottom-=this.parseStyle(l.paddingBottom),a.left+=this.parseStyle(l.paddingLeft),a.right-=this.parseStyle(l.paddingRight)}return{top:Math.round(o.top-a.top),bottom:Math.round(a.bottom-o.bottom),left:Math.round(o.left-a.left),right:Math.round(a.right-o.right)}},parsePlacement:function(t){var e=o.auto.test(t);return e&&(t=t.replace(o.auto,"")),t=t.split("-"),t[0]=t[0]||"top",o.primary.test(t[0])||(t[0]="top"),t[1]=t[1]||"center",o.secondary.test(t[1])||(t[1]="center"),t[2]=!!e,t},positionElements:function(t,n,r,i){t=this.getRawNode(t),n=this.getRawNode(n);var a=angular.isDefined(n.offsetWidth)?n.offsetWidth:n.prop("offsetWidth"),s=angular.isDefined(n.offsetHeight)?n.offsetHeight:n.prop("offsetHeight");r=this.parsePlacement(r);var u=i?this.offset(t):this.position(t),l={top:0,left:0,placement:""};if(r[2]){var c=this.viewportOffset(t,i),p=e.getComputedStyle(n),d={width:a+Math.round(Math.abs(this.parseStyle(p.marginLeft)+this.parseStyle(p.marginRight))),height:s+Math.round(Math.abs(this.parseStyle(p.marginTop)+this.parseStyle(p.marginBottom)))};if(r[0]="top"===r[0]&&d.height>c.top&&d.height<=c.bottom?"bottom":"bottom"===r[0]&&d.height>c.bottom&&d.height<=c.top?"top":"left"===r[0]&&d.width>c.left&&d.width<=c.right?"right":"right"===r[0]&&d.width>c.right&&d.width<=c.left?"left":r[0],r[1]="top"===r[1]&&d.height-u.height>c.bottom&&d.height-u.height<=c.top?"bottom":"bottom"===r[1]&&d.height-u.height>c.top&&d.height-u.height<=c.bottom?"top":"left"===r[1]&&d.width-u.width>c.right&&d.width-u.width<=c.left?"right":"right"===r[1]&&d.width-u.width>c.left&&d.width-u.width<=c.right?"left":r[1],"center"===r[1])if(o.vertical.test(r[0])){var f=u.width/2-a/2;c.left+f<0&&d.width-u.width<=c.right?r[1]="left":c.right+f<0&&d.width-u.width<=c.left&&(r[1]="right")}else{var h=u.height/2-d.height/2;c.top+h<0&&d.height-u.height<=c.bottom?r[1]="top":c.bottom+h<0&&d.height-u.height<=c.top&&(r[1]="bottom")}}switch(r[0]){case"top":l.top=u.top-s;break;case"bottom":l.top=u.top+u.height;break;case"left":l.left=u.left-a;break;case"right":l.left=u.left+u.width}switch(r[1]){case"top":l.top=u.top;break;case"bottom":l.top=u.top+u.height-s;break;case"left":l.left=u.left;break;case"right":l.left=u.left+u.width-a;break;case"center":o.vertical.test(r[0])?l.left=u.left+u.width/2-a/2:l.top=u.top+u.height/2-s/2}return l.top=Math.round(l.top),l.left=Math.round(l.left),l.placement="center"===r[1]?r[0]:r[0]+"-"+r[1],l},adjustTop:function(t,e,n,r){if(-1!==t.indexOf("top")&&n!==r)return{top:e.top-r+"px"}},positionArrow:function(t,n){var r=(t=this.getRawNode(t)).querySelector(".tooltip-inner, .popover-inner");if(r){var i=angular.element(r).hasClass("tooltip-inner"),a=i?t.querySelector(".tooltip-arrow"):t.querySelector(".arrow");if(a){var s={top:"",bottom:"",left:"",right:""};if("center"!==(n=this.parsePlacement(n))[1]){var u="border-"+n[0]+"-width",l=e.getComputedStyle(a)[u],c="border-";o.vertical.test(n[0])?c+=n[0]+"-"+n[1]:c+=n[1]+"-"+n[0],c+="-radius";var p=e.getComputedStyle(i?r:t)[c];switch(n[0]){case"top":s.bottom=i?"0":"-"+l;break;case"bottom":s.top=i?"0":"-"+l;break;case"left":s.right=i?"0":"-"+l;break;case"right":s.left=i?"0":"-"+l}s[n[1]]=p,angular.element(a).css(s)}else angular.element(a).css(s)}}}}}]),angular.module("ui.bootstrap.datepickerPopup",["ui.bootstrap.datepicker","ui.bootstrap.position"]).value("$datepickerPopupLiteralWarning",!0).constant("uibDatepickerPopupConfig",{altInputFormats:[],appendToBody:!1,clearText:"Clear",closeOnDateSelection:!0,closeText:"Done",currentText:"Today",datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"uib/template/datepickerPopup/popup.html",datepickerTemplateUrl:"uib/template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},onOpenFocus:!0,showButtonBar:!0,placement:"auto bottom-left"}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$log","$parse","$window","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout","uibDatepickerConfig","$datepickerPopupLiteralWarning",function(t,e,n,r,i,o,a,s,u,l,c,p,d,f,h,g){function m(e){var n=p.parse(e,C,t.date);if(isNaN(n))for(var r=0;r<_.length;r++)if(n=p.parse(e,_[r],t.date),!isNaN(n))return n;return n}function v(t){if(angular.isNumber(t)&&(t=new Date(t)),!t)return null;if(angular.isDate(t)&&!isNaN(t))return t;if(angular.isString(t)){var e=m(t);if(!isNaN(e))return p.toTimezone(e,M.getOption("timezone"))}return M.getOption("allowInvalid")?t:void 0}function y(t,e){var r=t||e;return!n.ngRequired&&!r||(angular.isNumber(r)&&(r=new Date(r)),!r||(!(!angular.isDate(r)||isNaN(r))||!!angular.isString(r)&&!isNaN(m(r))))}function b(n){if(t.isOpen||!t.disabled){var r=P[0],i=e[0].contains(n.target),o=void 0!==r.contains&&r.contains(n.target);!t.isOpen||i||o||t.$apply(function(){t.isOpen=!1})}}function w(n){27===n.which&&t.isOpen?(n.preventDefault(),n.stopPropagation(),t.$apply(function(){t.isOpen=!1}),e[0].focus()):40!==n.which||t.isOpen||(n.preventDefault(),n.stopPropagation(),t.$apply(function(){t.isOpen=!0}))}function $(){if(t.isOpen){var r=angular.element(P[0].querySelector(".uib-datepicker-popup")),i=n.popupPlacement?n.popupPlacement:d.placement,o=l.positionElements(e,r,i,T);r.css({top:o.top+"px",left:o.left+"px"}),r.hasClass("uib-position-measure")&&r.removeClass("uib-position-measure")}}function k(t){var e;return angular.version.minor<6?(e=angular.isObject(t.$options)?t.$options:{timezone:null}).getOption=function(t){return e[t]}:e=t.$options,e}var C,x,T,S,E,D,A,B,I,O,M,P,_,R=!1,L=[];this.init=function(i){if(O=i,M=k(O),x=angular.isDefined(n.closeOnDateSelection)?t.$parent.$eval(n.closeOnDateSelection):d.closeOnDateSelection,T=angular.isDefined(n.datepickerAppendToBody)?t.$parent.$eval(n.datepickerAppendToBody):d.appendToBody,S=angular.isDefined(n.onOpenFocus)?t.$parent.$eval(n.onOpenFocus):d.onOpenFocus,E=angular.isDefined(n.datepickerPopupTemplateUrl)?n.datepickerPopupTemplateUrl:d.datepickerPopupTemplateUrl,D=angular.isDefined(n.datepickerTemplateUrl)?n.datepickerTemplateUrl:d.datepickerTemplateUrl,_=angular.isDefined(n.altInputFormats)?t.$parent.$eval(n.altInputFormats):d.altInputFormats,t.showButtonBar=angular.isDefined(n.showButtonBar)?t.$parent.$eval(n.showButtonBar):d.showButtonBar,d.html5Types[n.type]?(C=d.html5Types[n.type],R=!0):(C=n.uibDatepickerPopup||d.datepickerPopup,n.$observe("uibDatepickerPopup",function(t,e){var n=t||d.datepickerPopup;if(n!==C&&(C=n,O.$modelValue=null,!C))throw new Error("uibDatepickerPopup must have a date format specified.")})),!C)throw new Error("uibDatepickerPopup must have a date format specified.");if(R&&n.uibDatepickerPopup)throw new Error("HTML5 date input types do not support custom formats.");(A=angular.element("<div uib-datepicker-popup-wrap><div uib-datepicker></div></div>")).attr({"ng-model":"date","ng-change":"dateSelection(date)","template-url":E}),(B=angular.element(A.children()[0])).attr("template-url",D),t.datepickerOptions||(t.datepickerOptions={}),R&&"month"===n.type&&(t.datepickerOptions.datepickerMode="month",t.datepickerOptions.minMode="month"),B.attr("datepicker-options","datepickerOptions"),R?O.$formatters.push(function(e){return t.date=p.fromTimezone(e,M.getOption("timezone")),e}):(O.$$parserName="date",O.$validators.date=y,O.$parsers.unshift(v),O.$formatters.push(function(e){return O.$isEmpty(e)?(t.date=e,e):(angular.isNumber(e)&&(e=new Date(e)),t.date=p.fromTimezone(e,M.getOption("timezone")),p.filter(t.date,C))})),O.$viewChangeListeners.push(function(){t.date=m(O.$viewValue)}),e.on("keydown",w),P=r(A)(t),A.remove(),T?s.find("body").append(P):e.after(P),t.$on("$destroy",function(){for(!0===t.isOpen&&(u.$$phase||t.$apply(function(){t.isOpen=!1})),P.remove(),e.off("keydown",w),s.off("click",b),I&&I.off("scroll",$),angular.element(a).off("resize",$);L.length;)L.shift()()})},t.getText=function(e){return t[e+"Text"]||d[e+"Text"]},t.isDisabled=function(e){"today"===e&&(e=p.fromTimezone(new Date,M.getOption("timezone")));var n={};return angular.forEach(["minDate","maxDate"],function(e){t.datepickerOptions[e]?angular.isDate(t.datepickerOptions[e])?n[e]=new Date(t.datepickerOptions[e]):(g&&i.warn("Literal date support has been deprecated, please switch to date object usage"),n[e]=new Date(c(t.datepickerOptions[e],"medium"))):n[e]=null}),t.datepickerOptions&&n.minDate&&t.compare(e,n.minDate)<0||n.maxDate&&t.compare(e,n.maxDate)>0},t.compare=function(t,e){return new Date(t.getFullYear(),t.getMonth(),t.getDate())-new Date(e.getFullYear(),e.getMonth(),e.getDate())},t.dateSelection=function(n){t.date=n;var r=t.date?p.filter(t.date,C):null;e.val(r),O.$setViewValue(r),x&&(t.isOpen=!1,e[0].focus())},t.keydown=function(n){27===n.which&&(n.stopPropagation(),t.isOpen=!1,e[0].focus())},t.select=function(e,n){if(n.stopPropagation(),"today"===e){var r=new Date;angular.isDate(t.date)?(e=new Date(t.date)).setFullYear(r.getFullYear(),r.getMonth(),r.getDate()):(e=p.fromTimezone(r,M.getOption("timezone"))).setHours(0,0,0,0)}t.dateSelection(e)},t.close=function(n){n.stopPropagation(),t.isOpen=!1,e[0].focus()},t.disabled=angular.isDefined(n.disabled)||!1,n.ngDisabled&&L.push(t.$parent.$watch(o(n.ngDisabled),function(e){t.disabled=e})),t.$watch("isOpen",function(r){r?t.disabled?t.isOpen=!1:f(function(){$(),S&&t.$broadcast("uib:datepicker.focus"),s.on("click",b);var r=n.popupPlacement?n.popupPlacement:d.placement;T||l.parsePlacement(r)[2]?(I=I||angular.element(l.scrollParent(e)))&&I.on("scroll",$):I=null,angular.element(a).on("resize",$)},0,!1):(s.off("click",b),I&&I.off("scroll",$),angular.element(a).off("resize",$))}),t.$on("uib:datepicker.mode",function(){f($,0,!1)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{datepickerOptions:"=?",isOpen:"=?",currentText:"@",clearText:"@",closeText:"@"},link:function(t,e,n,r){var i=r[0];r[1].init(i)}}}).directive("uibDatepickerPopupWrap",function(){return{restrict:"A",transclude:!0,templateUrl:function(t,e){return e.templateUrl||"uib/template/datepickerPopup/popup.html"}}}),angular.module("ui.bootstrap.debounce",[]).factory("$$debounce",["$timeout",function(t){return function(e,n){var r;return function(){var i=this,o=Array.prototype.slice.call(arguments);r&&t.cancel(r),r=t(function(){e.apply(i,o)},n)}}}]),angular.module("ui.bootstrap.multiMap",[]).factory("$$multiMap",function(){return{createNew:function(){var t={};return{entries:function(){return Object.keys(t).map(function(e){return{key:e,value:t[e]}})},get:function(e){return t[e]},hasKey:function(e){return!!t[e]},keys:function(){return Object.keys(t)},put:function(e,n){t[e]||(t[e]=[]),t[e].push(n)},remove:function(e,n){var r=t[e];if(r){var i=r.indexOf(n);-1!==i&&r.splice(i,1),r.length||delete t[e]}}}}}}),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.multiMap","ui.bootstrap.position"]).constant("uibDropdownConfig",{appendToOpenClass:"uib-dropdown-open",openClass:"open"}).service("uibDropdownService",["$document","$rootScope","$$multiMap",function(t,e,n){var r=null,i=n.createNew();this.isOnlyOpen=function(t,e){var n=i.get(e);return!(!n||!n.reduce(function(e,n){return n.scope===t?n:e},{}))&&1===n.length},this.open=function(e,n,a){if(r||t.on("click",o),r&&r!==e&&(r.isOpen=!1),r=e,a){var s=i.get(a);s?-1===s.map(function(t){return t.scope}).indexOf(e)&&i.put(a,{scope:e}):i.put(a,{scope:e})}},this.close=function(e,n,a){if(r===e&&(t.off("click",o),t.off("keydown",this.keybindFilter),r=null),a){var s=i.get(a);if(s){var u=s.reduce(function(t,n){return n.scope===e?n:t},{});u&&i.remove(a,u)}}};var o=function(t){if(r&&r.isOpen&&!(t&&"disabled"===r.getAutoClose()||t&&3===t.which)){var n=r.getToggleElement();if(!(t&&n&&n[0].contains(t.target))){var i=r.getDropdownElement();t&&"outsideClick"===r.getAutoClose()&&i&&i[0].contains(t.target)||(r.focusToggleElement(),r.isOpen=!1,e.$$phase||r.$apply())}}};this.keybindFilter=function(t){if(r){var e=r.getDropdownElement(),n=r.getToggleElement(),i=e&&e[0].contains(t.target),a=n&&n[0].contains(t.target);27===t.which?(t.stopPropagation(),r.focusToggleElement(),o()):r.isKeynavEnabled()&&-1!==[38,40].indexOf(t.which)&&r.isOpen&&(i||a)&&(t.preventDefault(),t.stopPropagation(),r.focusDropdownEntry(t.which))}}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(t,e,n,r,i,o,a,s,u,l,c){function p(){e.append(h.dropdownMenu)}var d,f,h=this,g=t.$new(),m=i.appendToOpenClass,v=i.openClass,y=angular.noop,b=n.onToggle?r(n.onToggle):angular.noop,w=!1,$=u.find("body");e.addClass("dropdown"),this.init=function(){n.isOpen&&(f=r(n.isOpen),y=f.assign,t.$watch(f,function(t){g.isOpen=!!t})),w=angular.isDefined(n.keyboardNav)},this.toggle=function(t){return g.isOpen=arguments.length?!!t:!g.isOpen,angular.isFunction(y)&&y(g,g.isOpen),g.isOpen},this.isOpen=function(){return g.isOpen},g.getToggleElement=function(){return h.toggleElement},g.getAutoClose=function(){return n.autoClose||"always"},g.getElement=function(){return e},g.isKeynavEnabled=function(){return w},g.focusDropdownEntry=function(t){var n=h.dropdownMenu?angular.element(h.dropdownMenu).find("a"):e.find("ul").eq(0).find("a");switch(t){case 40:angular.isNumber(h.selectedOption)?h.selectedOption=h.selectedOption===n.length-1?h.selectedOption:h.selectedOption+1:h.selectedOption=0;break;case 38:angular.isNumber(h.selectedOption)?h.selectedOption=0===h.selectedOption?0:h.selectedOption-1:h.selectedOption=n.length-1}n[h.selectedOption].focus()},g.getDropdownElement=function(){return h.dropdownMenu},g.focusToggleElement=function(){h.toggleElement&&h.toggleElement[0].focus()},g.$watch("isOpen",function(i,f){var w=null,k=!1;if(angular.isDefined(n.dropdownAppendTo)){var C=r(n.dropdownAppendTo)(g);C&&(w=angular.element(C))}if(angular.isDefined(n.dropdownAppendToBody)&&!1!==r(n.dropdownAppendToBody)(g)&&(k=!0),k&&!w&&(w=$),w&&h.dropdownMenu&&(i?(w.append(h.dropdownMenu),e.on("$destroy",p)):(e.off("$destroy",p),p())),w&&h.dropdownMenu){var x,T,S,E=s.positionElements(e,h.dropdownMenu,"bottom-left",!0),D=0;if(x={top:E.top+"px",display:i?"block":"none"},(T=h.dropdownMenu.hasClass("dropdown-menu-right"))?(x.left="auto",(S=s.scrollbarPadding(w)).heightOverflow&&S.scrollbarWidth&&(D=S.scrollbarWidth),x.right=window.innerWidth-D-(E.left+e.prop("offsetWidth"))+"px"):(x.left=E.left+"px",x.right="auto"),!k){var A=s.offset(w);x.top=E.top-A.top+"px",T?x.right=window.innerWidth-(E.left-A.left+e.prop("offsetWidth"))+"px":x.left=E.left-A.left+"px"}h.dropdownMenu.css(x)}var B=w||e,I=w?m:v,O=B.hasClass(I),M=o.isOnlyOpen(t,w);if(O===!i){a[w?M?"removeClass":"addClass":i?"addClass":"removeClass"](B,I).then(function(){angular.isDefined(i)&&i!==f&&b(t,{open:!!i})})}if(i)h.dropdownMenuTemplateUrl?c(h.dropdownMenuTemplateUrl).then(function(t){d=g.$new(),l(t.trim())(d,function(t){var e=t;h.dropdownMenu.replaceWith(e),h.dropdownMenu=e,u.on("keydown",o.keybindFilter)})}):u.on("keydown",o.keybindFilter),g.focusToggleElement(),o.open(g,e,w);else{if(o.close(g,e,w),h.dropdownMenuTemplateUrl){d&&d.$destroy();var P=angular.element('<ul class="dropdown-menu"></ul>');h.dropdownMenu.replaceWith(P),h.dropdownMenu=P}h.selectedOption=null}angular.isFunction(y)&&y(t,i)})}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(t,e,n,r){r.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"A",require:"?^uibDropdown",link:function(t,e,n,r){if(r&&!angular.isDefined(n.dropdownNested)){e.addClass("dropdown-menu");var i=n.templateUrl;i&&(r.dropdownMenuTemplateUrl=i),r.dropdownMenu||(r.dropdownMenu=e)}}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(t,e,n,r){if(r){e.addClass("dropdown-toggle"),r.toggleElement=e;var i=function(i){i.preventDefault(),e.hasClass("disabled")||n.disabled||t.$apply(function(){r.toggle()})};e.on("click",i),e.attr({"aria-haspopup":!0,"aria-expanded":!1}),t.$watch(r.isOpen,function(t){e.attr("aria-expanded",!!t)}),t.$on("$destroy",function(){e.off("click",i)})}}}}),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var t=[];return{add:function(e,n){t.push({key:e,value:n})},get:function(e){for(var n=0;n<t.length;n++)if(e===t[n].key)return t[n]},keys:function(){for(var e=[],n=0;n<t.length;n++)e.push(t[n].key);return e},top:function(){return t[t.length-1]},remove:function(e){for(var n=-1,r=0;r<t.length;r++)if(e===t[r].key){n=r;break}return t.splice(n,1)[0]},removeTop:function(){return t.pop()},length:function(){return t.length}}}}}),angular.module("ui.bootstrap.modal",["ui.bootstrap.multiMap","ui.bootstrap.stackedMap","ui.bootstrap.position"]).provider("$uibResolve",function(){var t=this;this.resolver=null,this.setResolver=function(t){this.resolver=t},this.$get=["$injector","$q",function(e,n){var r=t.resolver?e.get(t.resolver):null;return{resolve:function(t,i,o,a){if(r)return r.resolve(t,i,o,a);var s=[];return angular.forEach(t,function(t){angular.isFunction(t)||angular.isArray(t)?s.push(n.resolve(e.invoke(t))):angular.isString(t)?s.push(n.resolve(e.get(t))):s.push(n.resolve(t))}),n.all(s).then(function(e){var n={},r=0;return angular.forEach(t,function(t,i){n[i]=e[r++]}),n})}}}]}).directive("uibModalBackdrop",["$animate","$injector","$uibModalStack",function(t,e,n){function r(e,r,i){i.modalInClass&&(t.addClass(r,i.modalInClass),e.$on(n.NOW_CLOSING_EVENT,function(n,o){var a=o();e.modalOptions.animation?t.removeClass(r,i.modalInClass).then(a):a()}))}return{restrict:"A",compile:function(t,e){return t.addClass(e.backdropClass),r}}}]).directive("uibModalWindow",["$uibModalStack","$q","$animateCss","$document",function(t,e,n,r){return{scope:{index:"@"},restrict:"A",transclude:!0,templateUrl:function(t,e){return e.templateUrl||"uib/template/modal/window.html"},link:function(i,o,a){o.addClass(a.windowTopClass||""),i.size=a.size,i.close=function(e){var n=t.getTop();n&&n.value.backdrop&&"static"!==n.value.backdrop&&e.target===e.currentTarget&&(e.preventDefault(),e.stopPropagation(),t.dismiss(n.key,"backdrop click"))},o.on("click",i.close),i.$isRendered=!0;var s=e.defer();i.$$postDigest(function(){s.resolve()}),s.promise.then(function(){var s=null;a.modalInClass&&(s=n(o,{addClass:a.modalInClass}).start(),i.$on(t.NOW_CLOSING_EVENT,function(t,e){var r=e();n(o,{removeClass:a.modalInClass}).start().then(r)})),e.when(s).then(function(){var e=t.getTop();if(e&&t.modalRendered(e.key),!r[0].activeElement||!o[0].contains(r[0].activeElement)){var n=o[0].querySelector("[autofocus]");n?n.focus():o[0].focus()}})})}}}]).directive("uibModalAnimationClass",function(){return{compile:function(t,e){e.modalAnimation&&t.addClass(e.uibModalAnimationClass)}}}).directive("uibModalTransclude",["$animate",function(t){return{link:function(e,n,r,i,o){o(e.$parent,function(e){n.empty(),t.enter(e,n)})}}}]).factory("$uibModalStack",["$animate","$animateCss","$document","$compile","$rootScope","$q","$$multiMap","$$stackedMap","$uibPosition",function(t,e,n,r,i,o,a,s,u){function l(t){return t.replace(A,function(t,e){return(e?"-":"")+t.toLowerCase()})}function c(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)}function p(){for(var t=-1,e=C.keys(),n=0;n<e.length;n++)C.get(e[n]).value.backdrop&&(t=n);return t>-1&&t<S&&(t=S),t}function d(t,e){var n=C.get(t).value,r=n.appendTo;C.remove(t),(E=C.top())&&(S=parseInt(E.value.modalDomEl.attr("index"),10)),g(n.modalDomEl,n.modalScope,function(){var e=n.openedClass||k;x.remove(e,t);var i=x.hasKey(e);r.toggleClass(e,i),!i&&$&&$.heightOverflow&&$.scrollbarWidth&&($.originalRight?r.css({paddingRight:$.originalRight+"px"}):r.css({paddingRight:""}),$=null),f(!0)},n.closedDeferred),h(),e&&e.focus?e.focus():r.focus&&r.focus()}function f(t){var e;C.length()>0&&(e=C.top().value).modalDomEl.toggleClass(e.windowTopClass||"",t)}function h(){if(b&&-1===p()){var t=w;g(b,w,function(){t=null}),b=void 0,w=void 0}}function g(e,n,r,i){function a(){a.done||(a.done=!0,t.leave(e).then(function(){r&&r(),e.remove(),i&&i.resolve()}),n.$destroy())}var s,u=null;return n.$broadcast(T.NOW_CLOSING_EVENT,function(){return s||(s=o.defer(),u=s.promise),function(){s.resolve()}}),o.when(u).then(a)}function m(t){if(t.isDefaultPrevented())return t;var e=C.top();if(e)switch(t.which){case 27:e.value.keyboard&&(t.preventDefault(),i.$apply(function(){T.dismiss(e.key,"escape key press")}));break;case 9:var n=T.loadFocusElementList(e),r=!1;t.shiftKey?(T.isFocusInFirstItem(t,n)||T.isModalFocused(t,e))&&(r=T.focusLastFocusableElement(n)):T.isFocusInLastItem(t,n)&&(r=T.focusFirstFocusableElement(n)),r&&(t.preventDefault(),t.stopPropagation())}}function v(t,e,n){return!t.value.modalScope.$broadcast("modal.closing",e,n).defaultPrevented}function y(){Array.prototype.forEach.call(document.querySelectorAll("["+D+"]"),function(t){var e=parseInt(t.getAttribute(D),10)-1;t.setAttribute(D,e),e||(t.removeAttribute(D),t.removeAttribute("aria-hidden"))})}var b,w,$,k="modal-open",C=s.createNew(),x=a.createNew(),T={NOW_CLOSING_EVENT:"modal.stack.now-closing"},S=0,E=null,D="data-bootstrap-modal-aria-hidden-count",A=/[A-Z]/g;return i.$watch(p,function(t){w&&(w.index=t)}),n.on("keydown",m),i.$on("$destroy",function(){n.off("keydown",m)}),T.open=function(e,o){function a(t){if(t&&"BODY"!==t[0].tagName)return function(t){var e=t.parent()?t.parent().children():[];return Array.prototype.filter.call(e,function(e){return e!==t[0]})}(t).forEach(function(t){var e="true"===t.getAttribute("aria-hidden"),n=parseInt(t.getAttribute(D),10);n||(n=e?1:0),t.setAttribute(D,n+1),t.setAttribute("aria-hidden","true")}),a(t.parent())}var s=n[0].activeElement,c=o.openedClass||k;f(!1),E=C.top(),C.add(e,{deferred:o.deferred,renderDeferred:o.renderDeferred,closedDeferred:o.closedDeferred,modalScope:o.scope,backdrop:o.backdrop,keyboard:o.keyboard,openedClass:o.openedClass,windowTopClass:o.windowTopClass,animation:o.animation,appendTo:o.appendTo}),x.put(c,e);var d=o.appendTo,h=p();h>=0&&!b&&((w=i.$new(!0)).modalOptions=o,w.index=h,(b=angular.element('<div uib-modal-backdrop="modal-backdrop"></div>')).attr({class:"modal-backdrop","ng-style":"{'z-index': 1040 + (index && 1 || 0) + index*10}","uib-modal-animation-class":"fade","modal-in-class":"in"}),o.backdropClass&&b.addClass(o.backdropClass),o.animation&&b.attr("modal-animation","true"),r(b)(w),t.enter(b,d),u.isScrollable(d)&&($=u.scrollbarPadding(d)).heightOverflow&&$.scrollbarWidth&&d.css({paddingRight:$.right+"px"}));var g;o.component?(g=document.createElement(l(o.component.name)),(g=angular.element(g)).attr({resolve:"$resolve","modal-instance":"$uibModalInstance",close:"$close($value)",dismiss:"$dismiss($value)"})):g=o.content,S=E?parseInt(E.value.modalDomEl.attr("index"),10)+1:0;var m=angular.element('<div uib-modal-window="modal-window"></div>');m.attr({class:"modal","template-url":o.windowTemplateUrl,"window-top-class":o.windowTopClass,role:"dialog","aria-labelledby":o.ariaLabelledBy,"aria-describedby":o.ariaDescribedBy,size:o.size,index:S,animate:"animate","ng-style":"{'z-index': 1050 + $$topModalIndex*10, display: 'block'}",tabindex:-1,"uib-modal-animation-class":"fade","modal-in-class":"in"}).append(g),o.windowClass&&m.addClass(o.windowClass),o.animation&&m.attr("modal-animation","true"),d.addClass(c),o.scope&&(o.scope.$$topModalIndex=S),t.enter(r(m)(o.scope),d),C.top().value.modalDomEl=m,C.top().value.modalOpener=s,a(m)},T.close=function(t,e){var n=C.get(t);return y(),n&&v(n,e,!0)?(n.value.modalScope.$$uibDestructionScheduled=!0,n.value.deferred.resolve(e),d(t,n.value.modalOpener),!0):!n},T.dismiss=function(t,e){var n=C.get(t);return y(),n&&v(n,e,!1)?(n.value.modalScope.$$uibDestructionScheduled=!0,n.value.deferred.reject(e),d(t,n.value.modalOpener),!0):!n},T.dismissAll=function(t){for(var e=this.getTop();e&&this.dismiss(e.key,t);)e=this.getTop()},T.getTop=function(){return C.top()},T.modalRendered=function(t){var e=C.get(t);e&&e.value.renderDeferred.resolve()},T.focusFirstFocusableElement=function(t){return t.length>0&&(t[0].focus(),!0)},T.focusLastFocusableElement=function(t){return t.length>0&&(t[t.length-1].focus(),!0)},T.isModalFocused=function(t,e){if(t&&e){var n=e.value.modalDomEl;if(n&&n.length)return(t.target||t.srcElement)===n[0]}return!1},T.isFocusInFirstItem=function(t,e){return e.length>0&&(t.target||t.srcElement)===e[0]},T.isFocusInLastItem=function(t,e){return e.length>0&&(t.target||t.srcElement)===e[e.length-1]},T.loadFocusElementList=function(t){if(t){var e=t.value.modalDomEl;if(e&&e.length){var n=e[0].querySelectorAll("a[href], area[href], input:not([disabled]):not([tabindex='-1']), button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']), textarea:not([disabled]):not([tabindex='-1']), iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true]");return n?Array.prototype.filter.call(n,function(t){return c(t)}):n}}},T}]).provider("$uibModal",function(){var t={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$rootScope","$q","$document","$templateRequest","$controller","$uibResolve","$uibModalStack",function(e,n,r,i,o,a,s){function u(t){return t.template?n.when(t.template):i(angular.isFunction(t.templateUrl)?t.templateUrl():t.templateUrl)}var l={},c=null;return l.getPromiseChain=function(){return c},l.open=function(i){function l(){return m}var p=n.defer(),d=n.defer(),f=n.defer(),h=n.defer(),g={result:p.promise,opened:d.promise,closed:f.promise,rendered:h.promise,close:function(t){return s.close(g,t)},dismiss:function(t){return s.dismiss(g,t)}};if(i=angular.extend({},t.options,i),i.resolve=i.resolve||{},i.appendTo=i.appendTo||r.find("body").eq(0),!i.appendTo.length)throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");if(!i.component&&!i.template&&!i.templateUrl)throw new Error("One of component or template or templateUrl options is required.");var m;m=i.component?n.when(a.resolve(i.resolve,{},null,null)):n.all([u(i),a.resolve(i.resolve,{},null,null)]);var v;return v=c=n.all([c]).then(l,l).then(function(t){function n(e,n,r,i){e.$scope=a,e.$scope.$resolve={},r?e.$scope.$uibModalInstance=g:e.$uibModalInstance=g;var o=n?t[1]:t;angular.forEach(o,function(t,n){i&&(e[n]=t),e.$scope.$resolve[n]=t})}var r=i.scope||e,a=r.$new();a.$close=g.close,a.$dismiss=g.dismiss,a.$on("$destroy",function(){a.$$uibDestructionScheduled||a.$dismiss("$uibUnscheduledDestruction")});var u,l,c={scope:a,deferred:p,renderDeferred:h,closedDeferred:f,animation:i.animation,backdrop:i.backdrop,keyboard:i.keyboard,backdropClass:i.backdropClass,windowTopClass:i.windowTopClass,windowClass:i.windowClass,windowTemplateUrl:i.windowTemplateUrl,ariaLabelledBy:i.ariaLabelledBy,ariaDescribedBy:i.ariaDescribedBy,size:i.size,openedClass:i.openedClass,appendTo:i.appendTo},m={},v={};i.component?(n(m,!1,!0,!1),m.name=i.component,c.component=m):i.controller&&(n(v,!0,!1,!0),l=o(i.controller,v,!0,i.controllerAs),i.controllerAs&&i.bindToController&&((u=l.instance).$close=a.$close,u.$dismiss=a.$dismiss,angular.extend(u,{$resolve:v.$scope.$resolve},r)),u=l(),angular.isFunction(u.$onInit)&&u.$onInit()),i.component||(c.content=t[0]),s.open(g,c),d.resolve(!0)},function(t){d.reject(t),p.reject(t)}).finally(function(){c===v&&(c=null)}),g},l}]};return t}),angular.module("ui.bootstrap.paging",[]).factory("uibPaging",["$parse",function(t){return{create:function(e,n,r){e.setNumPages=r.numPages?t(r.numPages).assign:angular.noop,e.ngModelCtrl={$setViewValue:angular.noop},e._watchers=[],e.init=function(t,i){e.ngModelCtrl=t,e.config=i,t.$render=function(){e.render()},r.itemsPerPage?e._watchers.push(n.$parent.$watch(r.itemsPerPage,function(t){e.itemsPerPage=parseInt(t,10),n.totalPages=e.calculateTotalPages(),e.updatePage()})):e.itemsPerPage=i.itemsPerPage,n.$watch("totalItems",function(t,r){(angular.isDefined(t)||t!==r)&&(n.totalPages=e.calculateTotalPages(),e.updatePage())})},e.calculateTotalPages=function(){var t=e.itemsPerPage<1?1:Math.ceil(n.totalItems/e.itemsPerPage);return Math.max(t||0,1)},e.render=function(){n.page=parseInt(e.ngModelCtrl.$viewValue,10)||1},n.selectPage=function(t,r){r&&r.preventDefault(),(!n.ngDisabled||!r)&&n.page!==t&&t>0&&t<=n.totalPages&&(r&&r.target&&r.target.blur(),e.ngModelCtrl.$setViewValue(t),e.ngModelCtrl.$render())},n.getText=function(t){return n[t+"Text"]||e.config[t+"Text"]},n.noPrevious=function(){return 1===n.page},n.noNext=function(){return n.page===n.totalPages},e.updatePage=function(){e.setNumPages(n.$parent,n.totalPages),n.page>n.totalPages?n.selectPage(n.totalPages):e.ngModelCtrl.$render()},n.$on("$destroy",function(){for(;e._watchers.length;)e._watchers.shift()()})}}}]),angular.module("ui.bootstrap.pager",["ui.bootstrap.paging","ui.bootstrap.tabindex"]).controller("UibPagerController",["$scope","$attrs","uibPaging","uibPagerConfig",function(t,e,n,r){t.align=angular.isDefined(e.align)?t.$parent.$eval(e.align):r.align,n.create(this,t,e)}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("uibPager",["uibPagerConfig",function(t){return{scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],restrict:"A",controller:"UibPagerController",controllerAs:"pager",templateUrl:function(t,e){return e.templateUrl||"uib/template/pager/pager.html"},link:function(e,n,r,i){n.addClass("pager");var o=i[0],a=i[1];a&&o.init(a,t)}}}]),angular.module("ui.bootstrap.pagination",["ui.bootstrap.paging","ui.bootstrap.tabindex"]).controller("UibPaginationController",["$scope","$attrs","$parse","uibPaging","uibPaginationConfig",function(t,e,n,r,i){function o(t,e,n){return{number:t,text:e,active:n}}function a(t,e){var n=[],r=1,i=e,a=angular.isDefined(u)&&u<e;a&&(l?(i=(r=Math.max(t-Math.floor(u/2),1))+u-1)>e&&(r=(i=e)-u+1):(r=(Math.ceil(t/u)-1)*u+1,i=Math.min(r+u-1,e)));for(var s=r;s<=i;s++){var f=o(s,d(s),s===t);n.push(f)}if(a&&u>0&&(!l||c||p)){if(r>1){if(!p||r>3){var h=o(r-1,"...",!1);n.unshift(h)}if(p){if(3===r){var g=o(2,"2",!1);n.unshift(g)}var m=o(1,"1",!1);n.unshift(m)}}if(i<e){if(!p||i<e-2){var v=o(i+1,"...",!1);n.push(v)}if(p){if(i===e-2){var y=o(e-1,e-1,!1);n.push(y)}var b=o(e,e,!1);n.push(b)}}}return n}var s=this,u=angular.isDefined(e.maxSize)?t.$parent.$eval(e.maxSize):i.maxSize,l=angular.isDefined(e.rotate)?t.$parent.$eval(e.rotate):i.rotate,c=angular.isDefined(e.forceEllipses)?t.$parent.$eval(e.forceEllipses):i.forceEllipses,p=angular.isDefined(e.boundaryLinkNumbers)?t.$parent.$eval(e.boundaryLinkNumbers):i.boundaryLinkNumbers,d=angular.isDefined(e.pageLabel)?function(n){return t.$parent.$eval(e.pageLabel,{$page:n})}:angular.identity;t.boundaryLinks=angular.isDefined(e.boundaryLinks)?t.$parent.$eval(e.boundaryLinks):i.boundaryLinks,t.directionLinks=angular.isDefined(e.directionLinks)?t.$parent.$eval(e.directionLinks):i.directionLinks,e.$set("role","menu"),r.create(this,t,e),e.maxSize&&s._watchers.push(t.$parent.$watch(n(e.maxSize),function(t){u=parseInt(t,10),s.render()}));var f=this.render;this.render=function(){f(),t.page>0&&t.page<=t.totalPages&&(t.pages=a(t.page,t.totalPages))}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,boundaryLinkNumbers:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0,forceEllipses:!1}).directive("uibPagination",["$parse","uibPaginationConfig",function(t,e){return{scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],restrict:"A",controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(t,e){return e.templateUrl||"uib/template/pagination/pagination.html"},link:function(t,n,r,i){n.addClass("pagination");var o=i[0],a=i[1];a&&o.init(a,e)}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){function t(t){var e=/[A-Z]/g;return t.replace(e,function(t,e){return(e?"-":"")+t.toLowerCase()})}var e={placement:"top",placementClassPrefix:"",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},n={mouseenter:"mouseleave",click:"click",outsideClick:"outsideClick",focus:"blur",none:""},r={};this.options=function(t){angular.extend(r,t)},this.setTriggers=function(t){angular.extend(n,t)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(i,o,a,s,u,l,c,p,d){function f(t){if(27===t.which){var e=h.top();e&&(e.value.close(),e=null)}}var h=d.createNew();return s.on("keyup",f),c.$on("$destroy",function(){s.off("keyup",f)}),function(i,c,d,f){function g(t){var e=(t||f.trigger||d).split(" ");return{show:e,hide:e.map(function(t){return n[t]||t})}}f=angular.extend({},e,r,f);var m=t(i),v=l.startSymbol(),y=l.endSymbol(),b="<div "+m+'-popup uib-title="'+v+"title"+y+'" '+(f.useContentExp?'content-exp="contentExp()" ':'content="'+v+"content"+y+'" ')+'origin-scope="origScope" class="uib-position-measure '+c+'" tooltip-animation-class="fade"uib-tooltip-classes ng-class="{ in: isOpen }" ></div>';return{compile:function(t,e){var n=o(b);return function(t,e,r,o){function l(){q.isOpen?m():d()}function d(){U&&!t.$eval(r[c+"Enable"])||(w(),C(),q.popupDelay?O||(O=a(v,q.popupDelay,!1)):v())}function m(){y(),q.popupCloseDelay?M||(M=a(b,q.popupCloseDelay,!1)):b()}function v(){if(y(),w(),!q.content)return angular.noop;$(),q.$evalAsync(function(){q.isOpen=!0,x(!0),H()})}function y(){O&&(a.cancel(O),O=null),P&&(a.cancel(P),P=null)}function b(){q&&q.$evalAsync(function(){q&&(q.isOpen=!1,x(!1),q.animation?I||(I=a(k,150,!1)):k())})}function w(){M&&(a.cancel(M),M=null),I&&(a.cancel(I),I=null)}function $(){A||(B=q.$new(),A=n(B,function(t){L?s.find("body").append(t):e.after(t)}),h.add(q,{close:b}),T())}function k(){y(),w(),S(),A&&(A.remove(),A=null,_&&a.cancel(_)),h.remove(q),B&&(B.$destroy(),B=null)}function C(){q.title=r[c+"Title"],q.content=V?V(t):r[i],q.popupClass=r[c+"Class"],q.placement=angular.isDefined(r[c+"Placement"])?r[c+"Placement"]:f.placement;var e=u.parsePlacement(q.placement);R=e[1]?e[0]+"-"+e[1]:e[0];var n=parseInt(r[c+"PopupDelay"],10),o=parseInt(r[c+"PopupCloseDelay"],10);q.popupDelay=isNaN(n)?f.popupDelay:n,q.popupCloseDelay=isNaN(o)?f.popupCloseDelay:o}function x(e){F&&angular.isFunction(F.assign)&&F.assign(t,e)}function T(){z.length=0,V?(z.push(t.$watch(V,function(t){q.content=t,!t&&q.isOpen&&b()})),z.push(B.$watch(function(){j||(j=!0,B.$$postDigest(function(){j=!1,q&&q.isOpen&&H()}))}))):z.push(r.$observe(i,function(t){q.content=t,!t&&q.isOpen?b():H()})),z.push(r.$observe(c+"Title",function(t){q.title=t,q.isOpen&&H()})),z.push(r.$observe(c+"Placement",function(t){q.placement=t||f.placement,q.isOpen&&H()}))}function S(){z.length&&(angular.forEach(z,function(t){t()}),z.length=0)}function E(t){q&&q.isOpen&&A&&(e[0].contains(t.target)||A[0].contains(t.target)||m())}function D(t){27===t.which&&m()}var A,B,I,O,M,P,_,R,L=!!angular.isDefined(f.appendToBody)&&f.appendToBody,N=g(void 0),U=angular.isDefined(r[c+"Enable"]),q=t.$new(!0),j=!1,F=!!angular.isDefined(r[c+"IsOpen"])&&p(r[c+"IsOpen"]),V=!!f.useContentExp&&p(r[i]),z=[],H=function(){A&&A.html()&&(P||(P=a(function(){var t=u.positionElements(e,A,q.placement,L),n=angular.isDefined(A.offsetHeight)?A.offsetHeight:A.prop("offsetHeight"),r=L?u.offset(e):u.position(e);A.css({top:t.top+"px",left:t.left+"px"});var i=t.placement.split("-");A.hasClass(i[0])||(A.removeClass(R.split("-")[0]),A.addClass(i[0])),A.hasClass(f.placementClassPrefix+t.placement)||(A.removeClass(f.placementClassPrefix+R),A.addClass(f.placementClassPrefix+t.placement)),_=a(function(){var t=angular.isDefined(A.offsetHeight)?A.offsetHeight:A.prop("offsetHeight"),e=u.adjustTop(i,r,n,t);e&&A.css(e),_=null},0,!1),A.hasClass("uib-position-measure")?(u.positionArrow(A,t.placement),A.removeClass("uib-position-measure")):R!==t.placement&&u.positionArrow(A,t.placement),R=t.placement,P=null},0,!1)))};q.origScope=t,q.isOpen=!1,q.contentExp=function(){return q.content},r.$observe("disabled",function(t){t&&y(),t&&q.isOpen&&b()}),F&&t.$watch(F,function(t){q&&!t===q.isOpen&&l()});var K=function(){N.show.forEach(function(t){"outsideClick"===t?e.off("click",l):(e.off(t,d),e.off(t,l)),e.off("keypress",D)}),N.hide.forEach(function(t){"outsideClick"===t?s.off("click",E):e.off(t,m)})};!function(){var n=[],i=[],o=t.$eval(r[c+"Trigger"]);K(),angular.isObject(o)?(Object.keys(o).forEach(function(t){n.push(t),i.push(o[t])}),N={show:n,hide:i}):N=g(o),"none"!==N.show&&N.show.forEach(function(t,n){"outsideClick"===t?(e.on("click",l),s.on("click",E)):t===N.hide[n]?e.on(t,l):t&&(e.on(t,d),e.on(N.hide[n],m)),e.on("keypress",D)})}();var W=t.$eval(r[c+"Animation"]);q.animation=angular.isDefined(W)?!!W:f.animation;var G,Y=c+"AppendToBody";G=Y in r&&void 0===r[Y]||t.$eval(r[Y]),L=angular.isDefined(G)?G:L,t.$on("$destroy",function(){K(),k(),q=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(t,e,n,r){return{link:function(i,o,a){var s,u,l,c=i.$eval(a.tooltipTemplateTranscludeScope),p=0,d=function(){u&&(u.remove(),u=null),s&&(s.$destroy(),s=null),l&&(t.leave(l).then(function(){u=null}),u=l,l=null)};i.$watch(e.parseAsResourceUrl(a.uibTooltipTemplateTransclude),function(e){var a=++p;e?(r(e,!0).then(function(r){if(a===p){var i=c.$new(),u=n(r)(i,function(e){d(),t.enter(e,o)});l=u,(s=i).$emit("$includeContentLoaded",e)}},function(){a===p&&(d(),i.$emit("$includeContentError",e))}),i.$emit("$includeContentRequested",e)):d()}),i.$on("$destroy",d)}}}]).directive("uibTooltipClasses",["$uibPosition",function(t){return{restrict:"A",link:function(e,n,r){if(e.placement){var i=t.parsePlacement(e.placement);n.addClass(i[0])}e.popupClass&&n.addClass(e.popupClass),e.animation&&n.addClass(r.tooltipAnimationClass)}}}]).directive("uibTooltipPopup",function(){return{restrict:"A",scope:{content:"@"},templateUrl:"uib/template/tooltip/tooltip-popup.html"}}).directive("uibTooltip",["$uibTooltip",function(t){return t("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{restrict:"A",scope:{contentExp:"&",originScope:"&"},templateUrl:"uib/template/tooltip/tooltip-template-popup.html"}}).directive("uibTooltipTemplate",["$uibTooltip",function(t){return t("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(t){return t("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),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(t){return t("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(t){return t("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{restrict:"A",scope:{uibTitle:"@",content:"@"},templateUrl:"uib/template/popover/popover.html"}}).directive("uibPopover",["$uibTooltip",function(t){return t("uibPopover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(t,e,n){function r(){return angular.isDefined(t.maxParam)?t.maxParam:n.max}var i=this,o=angular.isDefined(e.animate)?t.$parent.$eval(e.animate):n.animate;this.bars=[],t.max=r(),this.addBar=function(t,e,n){o||e.css({transition:"none"}),this.bars.push(t),t.max=r(),t.title=n&&angular.isDefined(n.title)?n.title:"progressbar",t.$watch("value",function(e){t.recalculatePercentage()}),t.recalculatePercentage=function(){var e=i.bars.reduce(function(t,e){return e.percent=+(100*e.value/e.max).toFixed(2),t+e.percent},0);e>100&&(t.percent-=e-100)},t.$on("$destroy",function(){e=null,i.removeBar(t)})},this.removeBar=function(t){this.bars.splice(this.bars.indexOf(t),1),this.bars.forEach(function(t){t.recalculatePercentage()})},t.$watch("maxParam",function(t){i.bars.forEach(function(t){t.max=r(),t.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{maxParam:"=?max"},templateUrl:"uib/template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"uib/template/progressbar/bar.html",link:function(t,e,n,r){r.addBar(t,e,n)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",maxParam:"=?max",type:"@"},templateUrl:"uib/template/progressbar/progressbar.html",link:function(t,e,n,r){r.addBar(t,angular.element(e.children()[0]),{title:n.title})}}}),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,enableReset:!0,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(t,e,n){var r={$setViewValue:angular.noop},i=this;this.init=function(i){(r=i).$render=this.render,r.$formatters.push(function(t){return angular.isNumber(t)&&t<<0!==t&&(t=Math.round(t)),t}),this.stateOn=angular.isDefined(e.stateOn)?t.$parent.$eval(e.stateOn):n.stateOn,this.stateOff=angular.isDefined(e.stateOff)?t.$parent.$eval(e.stateOff):n.stateOff,this.enableReset=angular.isDefined(e.enableReset)?t.$parent.$eval(e.enableReset):n.enableReset;var o=angular.isDefined(e.titles)?t.$parent.$eval(e.titles):n.titles;this.titles=angular.isArray(o)&&o.length>0?o:n.titles;var a=angular.isDefined(e.ratingStates)?t.$parent.$eval(e.ratingStates):new Array(angular.isDefined(e.max)?t.$parent.$eval(e.max):n.max);t.range=this.buildTemplateObjects(a)},this.buildTemplateObjects=function(t){for(var e=0,n=t.length;e<n;e++)t[e]=angular.extend({index:e},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(e)},t[e]);return t},this.getTitle=function(t){return t>=this.titles.length?t+1:this.titles[t]},t.rate=function(e){if(!t.readonly&&e>=0&&e<=t.range.length){var n=i.enableReset&&r.$viewValue===e?0:e;r.$setViewValue(n),r.$render()}},t.enter=function(e){t.readonly||(t.value=e),t.onHover({value:e})},t.reset=function(){t.value=r.$viewValue,t.onLeave()},t.onKeydown=function(e){/(37|38|39|40)/.test(e.which)&&(e.preventDefault(),e.stopPropagation(),t.rate(t.value+(38===e.which||39===e.which?1:-1)))},this.render=function(){t.value=r.$viewValue,t.title=i.getTitle(t.value-1)}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],restrict:"A",scope:{readonly:"=?readOnly",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"uib/template/rating/rating.html",link:function(t,e,n,r){var i=r[0],o=r[1];i.init(o)}}}),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(t){function e(t){for(var e=0;e<r.tabs.length;e++)if(r.tabs[e].index===t)return e}var n,r=this;r.tabs=[],r.select=function(t,o){if(!i){var a=e(n),s=r.tabs[a];if(s){if(s.tab.onDeselect({$event:o,$selectedIndex:t}),o&&o.isDefaultPrevented())return;s.tab.active=!1}var u=r.tabs[t];u?(u.tab.onSelect({$event:o}),u.tab.active=!0,r.active=u.index,n=u.index):!u&&angular.isDefined(n)&&(r.active=null,n=null)}},r.addTab=function(t){if(r.tabs.push({tab:t,index:t.index}),r.tabs.sort(function(t,e){return t.index>e.index?1:t.index<e.index?-1:0}),t.index===r.active||!angular.isDefined(r.active)&&1===r.tabs.length){var n=e(t.index);r.select(n)}},r.removeTab=function(t){for(var e,n=0;n<r.tabs.length;n++)if(r.tabs[n].tab===t){e=n;break}if(r.tabs[e].index===r.active){var i=e===r.tabs.length-1?e-1:e+1%r.tabs.length;r.select(i)}r.tabs.splice(e,1)},t.$watch("tabset.active",function(t){angular.isDefined(t)&&t!==n&&r.select(e(t))});var i;t.$on("$destroy",function(){i=!0})}]).directive("uibTabset",function(){return{transclude:!0,replace:!0,scope:{},bindToController:{active:"=?",type:"@"},controller:"UibTabsetController",controllerAs:"tabset",templateUrl:function(t,e){return e.templateUrl||"uib/template/tabs/tabset.html"},link:function(t,e,n){t.vertical=!!angular.isDefined(n.vertical)&&t.$parent.$eval(n.vertical),t.justified=!!angular.isDefined(n.justified)&&t.$parent.$eval(n.justified)}}}).directive("uibTab",["$parse",function(t){return{require:"^uibTabset",replace:!0,templateUrl:function(t,e){return e.templateUrl||"uib/template/tabs/tab.html"},transclude:!0,scope:{heading:"@",index:"=?",classes:"@?",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},controllerAs:"tab",link:function(e,n,r,i,o){e.disabled=!1,r.disable&&e.$parent.$watch(t(r.disable),function(t){e.disabled=!!t}),angular.isUndefined(r.index)&&(i.tabs&&i.tabs.length?e.index=Math.max.apply(null,i.tabs.map(function(t){return t.index}))+1:e.index=0),angular.isUndefined(r.classes)&&(e.classes=""),e.select=function(t){if(!e.disabled){for(var n,r=0;r<i.tabs.length;r++)if(i.tabs[r].tab===e){n=r;break}i.select(n,t)}},i.addTab(e),e.$on("$destroy",function(){i.removeTab(e)}),e.$transcludeFn=o}}}]).directive("uibTabHeadingTransclude",function(){return{restrict:"A",require:"^uibTab",link:function(t,e){t.$watch("headingElement",function(t){t&&(e.html(""),e.append(t))})}}}).directive("uibTabContentTransclude",function(){function t(t){return t.tagName&&(t.hasAttribute("uib-tab-heading")||t.hasAttribute("data-uib-tab-heading")||t.hasAttribute("x-uib-tab-heading")||"uib-tab-heading"===t.tagName.toLowerCase()||"data-uib-tab-heading"===t.tagName.toLowerCase()||"x-uib-tab-heading"===t.tagName.toLowerCase()||"uib:tab-heading"===t.tagName.toLowerCase())}return{restrict:"A",require:"^uibTabset",link:function(e,n,r){var i=e.$eval(r.uibTabContentTransclude).tab;i.$transcludeFn(i.$parent,function(e){angular.forEach(e,function(e){t(e)?i.headingElement=e:n.append(e)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("uibTimepickerConfig",{hourStep:1,minuteStep:1,secondStep:1,showMeridian:!0,showSeconds:!1,meridians:null,readonlyInput:!1,mousewheel:!0,arrowkeys:!0,showSpinners:!0,templateUrl:"uib/template/timepicker/timepicker.html"}).controller("UibTimepickerController",["$scope","$element","$attrs","$parse","$log","$locale","uibTimepickerConfig",function(t,e,n,r,i,o,a){function s(){var e=+t.hours;if((t.showMeridian?e>0&&e<13:e>=0&&e<24)&&""!==t.hours)return t.showMeridian&&(12===e&&(e=0),t.meridian===x[1]&&(e+=12)),e}function u(){var e=+t.minutes;if(e>=0&&e<60&&""!==t.minutes)return e}function l(){var e=+t.seconds;return e>=0&&e<60?e:void 0}function c(t,e){return null===t?"":angular.isDefined(t)&&t.toString().length<2&&!e?"0"+t:t.toString()}function p(t){d(),C.$setViewValue(new Date($)),f(t)}function d(){y&&y.$setValidity("hours",!0),b&&b.$setValidity("minutes",!0),w&&w.$setValidity("seconds",!0),C.$setValidity("time",!0),t.invalidHours=!1,t.invalidMinutes=!1,t.invalidSeconds=!1}function f(e){if(C.$modelValue){var n=$.getHours(),r=$.getMinutes(),i=$.getSeconds();t.showMeridian&&(n=0===n||12===n?12:n%12),t.hours="h"===e?n:c(n,!T),"m"!==e&&(t.minutes=c(r)),t.meridian=$.getHours()<12?x[0]:x[1],"s"!==e&&(t.seconds=c(i)),t.meridian=$.getHours()<12?x[0]:x[1]}else t.hours=null,t.minutes=null,t.seconds=null,t.meridian=x[0]}function h(t){$=m($,t),p()}function g(t,e){return m(t,60*e)}function m(t,e){var n=new Date(t.getTime()+1e3*e),r=new Date(t);return r.setHours(n.getHours(),n.getMinutes(),n.getSeconds()),r}function v(){return(null===t.hours||""===t.hours)&&(null===t.minutes||""===t.minutes)&&(!t.showSeconds||t.showSeconds&&(null===t.seconds||""===t.seconds))}var y,b,w,$=new Date,k=[],C={$setViewValue:angular.noop},x=angular.isDefined(n.meridians)?t.$parent.$eval(n.meridians):a.meridians||o.DATETIME_FORMATS.AMPMS,T=!angular.isDefined(n.padHours)||t.$parent.$eval(n.padHours);t.tabindex=angular.isDefined(n.tabindex)?n.tabindex:0,e.removeAttr("tabindex"),this.init=function(e,r){(C=e).$render=this.render,C.$formatters.unshift(function(t){return t?new Date(t):null});var i=r.eq(0),o=r.eq(1),s=r.eq(2);y=i.controller("ngModel"),b=o.controller("ngModel"),w=s.controller("ngModel"),(angular.isDefined(n.mousewheel)?t.$parent.$eval(n.mousewheel):a.mousewheel)&&this.setupMousewheelEvents(i,o,s),(angular.isDefined(n.arrowkeys)?t.$parent.$eval(n.arrowkeys):a.arrowkeys)&&this.setupArrowkeyEvents(i,o,s),t.readonlyInput=angular.isDefined(n.readonlyInput)?t.$parent.$eval(n.readonlyInput):a.readonlyInput,this.setupInputEvents(i,o,s)};var S=a.hourStep;n.hourStep&&k.push(t.$parent.$watch(r(n.hourStep),function(t){S=+t}));var E=a.minuteStep;n.minuteStep&&k.push(t.$parent.$watch(r(n.minuteStep),function(t){E=+t}));var D;k.push(t.$parent.$watch(r(n.min),function(t){var e=new Date(t);D=isNaN(e)?void 0:e}));var A;k.push(t.$parent.$watch(r(n.max),function(t){var e=new Date(t);A=isNaN(e)?void 0:e}));var B=!1;n.ngDisabled&&k.push(t.$parent.$watch(r(n.ngDisabled),function(t){B=t})),t.noIncrementHours=function(){var t=g($,60*S);return B||t>A||t<$&&t<D},t.noDecrementHours=function(){var t=g($,60*-S);return B||t<D||t>$&&t>A},t.noIncrementMinutes=function(){var t=g($,E);return B||t>A||t<$&&t<D},t.noDecrementMinutes=function(){var t=g($,-E);return B||t<D||t>$&&t>A},t.noIncrementSeconds=function(){var t=m($,I);return B||t>A||t<$&&t<D},t.noDecrementSeconds=function(){var t=m($,-I);return B||t<D||t>$&&t>A},t.noToggleMeridian=function(){return $.getHours()<12?B||g($,720)>A:B||g($,-720)<D};var I=a.secondStep;n.secondStep&&k.push(t.$parent.$watch(r(n.secondStep),function(t){I=+t})),t.showSeconds=a.showSeconds,n.showSeconds&&k.push(t.$parent.$watch(r(n.showSeconds),function(e){t.showSeconds=!!e})),t.showMeridian=a.showMeridian,n.showMeridian&&k.push(t.$parent.$watch(r(n.showMeridian),function(e){if(t.showMeridian=!!e,C.$error.time){var n=s(),r=u();angular.isDefined(n)&&angular.isDefined(r)&&($.setHours(n),p())}else f()})),this.setupMousewheelEvents=function(e,n,r){var i=function(t){t.originalEvent&&(t=t.originalEvent);var e=t.wheelDelta?t.wheelDelta:-t.deltaY;return t.detail||e>0};e.on("mousewheel wheel",function(e){B||t.$apply(i(e)?t.incrementHours():t.decrementHours()),e.preventDefault()}),n.on("mousewheel wheel",function(e){B||t.$apply(i(e)?t.incrementMinutes():t.decrementMinutes()),e.preventDefault()}),r.on("mousewheel wheel",function(e){B||t.$apply(i(e)?t.incrementSeconds():t.decrementSeconds()),e.preventDefault()})},this.setupArrowkeyEvents=function(e,n,r){e.on("keydown",function(e){B||(38===e.which?(e.preventDefault(),t.incrementHours(),t.$apply()):40===e.which&&(e.preventDefault(),t.decrementHours(),t.$apply()))}),n.on("keydown",function(e){B||(38===e.which?(e.preventDefault(),t.incrementMinutes(),t.$apply()):40===e.which&&(e.preventDefault(),t.decrementMinutes(),t.$apply()))}),r.on("keydown",function(e){B||(38===e.which?(e.preventDefault(),t.incrementSeconds(),t.$apply()):40===e.which&&(e.preventDefault(),t.decrementSeconds(),t.$apply()))})},this.setupInputEvents=function(e,n,r){if(t.readonlyInput)return t.updateHours=angular.noop,t.updateMinutes=angular.noop,void(t.updateSeconds=angular.noop);var i=function(e,n,r){C.$setViewValue(null),C.$setValidity("time",!1),angular.isDefined(e)&&(t.invalidHours=e,y&&y.$setValidity("hours",!1)),angular.isDefined(n)&&(t.invalidMinutes=n,b&&b.$setValidity("minutes",!1)),angular.isDefined(r)&&(t.invalidSeconds=r,w&&w.$setValidity("seconds",!1))};t.updateHours=function(){var t=s(),e=u();C.$setDirty(),angular.isDefined(t)&&angular.isDefined(e)?($.setHours(t),$.setMinutes(e),$<D||$>A?i(!0):p("h")):i(!0)},e.on("blur",function(e){C.$setTouched(),v()?d():null===t.hours||""===t.hours?i(!0):!t.invalidHours&&t.hours<10&&t.$apply(function(){t.hours=c(t.hours,!T)})}),t.updateMinutes=function(){var t=u(),e=s();C.$setDirty(),angular.isDefined(t)&&angular.isDefined(e)?($.setHours(e),$.setMinutes(t),$<D||$>A?i(void 0,!0):p("m")):i(void 0,!0)},n.on("blur",function(e){C.$setTouched(),v()?d():null===t.minutes?i(void 0,!0):!t.invalidMinutes&&t.minutes<10&&t.$apply(function(){t.minutes=c(t.minutes)})}),t.updateSeconds=function(){var t=l();C.$setDirty(),angular.isDefined(t)?($.setSeconds(t),p("s")):i(void 0,void 0,!0)},r.on("blur",function(e){v()?d():!t.invalidSeconds&&t.seconds<10&&t.$apply(function(){t.seconds=c(t.seconds)})})},this.render=function(){var e=C.$viewValue;isNaN(e)?(C.$setValidity("time",!1),i.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(e&&($=e),$<D||$>A?(C.$setValidity("time",!1),t.invalidHours=!0,t.invalidMinutes=!0):d(),f())},t.showSpinners=angular.isDefined(n.showSpinners)?t.$parent.$eval(n.showSpinners):a.showSpinners,t.incrementHours=function(){t.noIncrementHours()||h(60*S*60)},t.decrementHours=function(){t.noDecrementHours()||h(60*-S*60)},t.incrementMinutes=function(){t.noIncrementMinutes()||h(60*E)},t.decrementMinutes=function(){t.noDecrementMinutes()||h(60*-E)},t.incrementSeconds=function(){t.noIncrementSeconds()||h(I)},t.decrementSeconds=function(){t.noDecrementSeconds()||h(-I)},t.toggleMeridian=function(){var e=u(),n=s();t.noToggleMeridian()||(angular.isDefined(e)&&angular.isDefined(n)?h(720*($.getHours()<12?60:-60)):t.meridian=t.meridian===x[0]?x[1]:x[0])},t.blur=function(){C.$setTouched()},t.$on("$destroy",function(){for(;k.length;)k.shift()()})}]).directive("uibTimepicker",["uibTimepickerConfig",function(t){return{require:["uibTimepicker","?^ngModel"],restrict:"A",controller:"UibTimepickerController",controllerAs:"timepicker",scope:{},templateUrl:function(e,n){return n.templateUrl||t.templateUrl},link:function(t,e,n,r){var i=r[0],o=r[1];o&&i.init(o,e.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.debounce","ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(t){var e=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(n){var r=n.match(e);if(!r)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+n+'".');return{itemName:r[3],source:t(r[4]),viewMapper:t(r[2]||r[1]),modelMapper:t(r[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$$debounce","$uibPosition","uibTypeaheadParser",function(t,e,n,r,i,o,a,s,u,l,c,p,d){function f(){q.moveInProgress||(q.moveInProgress=!0,q.$digest()),Z()}function h(){q.position=B?p.offset(e):p.position(e),q.position.top+=e.prop("offsetHeight")}function g(t){var e;return angular.version.minor<6?(e=t.$options||{}).getOption=function(t){return e[t]}:e=t.$options,e}var m,v,y=[9,13,27,38,40],b=t.$eval(n.typeaheadMinLength);b||0===b||(b=1),t.$watch(n.typeaheadMinLength,function(t){b=t||0===t?t:1});var w=t.$eval(n.typeaheadWaitMs)||0,$=!1!==t.$eval(n.typeaheadEditable);t.$watch(n.typeaheadEditable,function(t){$=!1!==t});var k,C,x=i(n.typeaheadLoading).assign||angular.noop,T=n.typeaheadShouldSelect?i(n.typeaheadShouldSelect):function(t,e){var n=e.$event;return 13===n.which||9===n.which},S=i(n.typeaheadOnSelect),E=!!angular.isDefined(n.typeaheadSelectOnBlur)&&t.$eval(n.typeaheadSelectOnBlur),D=i(n.typeaheadNoResults).assign||angular.noop,A=n.typeaheadInputFormatter?i(n.typeaheadInputFormatter):void 0,B=!!n.typeaheadAppendToBody&&t.$eval(n.typeaheadAppendToBody),I=n.typeaheadAppendTo?t.$eval(n.typeaheadAppendTo):null,O=!1!==t.$eval(n.typeaheadFocusFirst),M=!!n.typeaheadSelectOnExact&&t.$eval(n.typeaheadSelectOnExact),P=i(n.typeaheadIsOpen).assign||angular.noop,_=t.$eval(n.typeaheadShowHint)||!1,R=i(n.ngModel),L=i(n.ngModel+"($$$p)"),N=function(e,n){return angular.isFunction(R(t))&&v.getOption("getterSetter")?L(e,{$$$p:n}):R.assign(e,n)},U=d.parse(n.uibTypeahead),q=t.$new(),j=t.$on("$destroy",function(){q.$destroy()});q.$on("$destroy",j);var F="typeahead-"+q.$id+"-"+Math.floor(1e4*Math.random());e.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":F});var V,z;_&&((V=angular.element("<div></div>")).css("position","relative"),e.after(V),(z=e.clone()).attr("placeholder",""),z.attr("tabindex","-1"),z.val(""),z.css({position:"absolute",top:"0px",left:"0px","border-color":"transparent","box-shadow":"none",opacity:1,background:"none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)",color:"#999"}),e.css({position:"relative","vertical-align":"top","background-color":"transparent"}),z.attr("id")&&z.removeAttr("id"),V.append(z),z.after(e));var H=angular.element("<div uib-typeahead-popup></div>");H.attr({id:F,matches:"matches",active:"activeIdx",select:"select(activeIdx, evt)","move-in-progress":"moveInProgress",query:"query",position:"position","assign-is-open":"assignIsOpen(isOpen)",debounce:"debounceUpdate"}),angular.isDefined(n.typeaheadTemplateUrl)&&H.attr("template-url",n.typeaheadTemplateUrl),angular.isDefined(n.typeaheadPopupTemplateUrl)&&H.attr("popup-template-url",n.typeaheadPopupTemplateUrl);var K=function(){_&&z.val("")},W=function(){q.matches=[],q.activeIdx=-1,e.attr("aria-expanded",!1),K()},G=function(t){return F+"-option-"+t};q.$watch("activeIdx",function(t){t<0?e.removeAttr("aria-activedescendant"):e.attr("aria-activedescendant",G(t))});var Y=function(t,e){return!!(q.matches.length>e&&t)&&t.toUpperCase()===q.matches[e].label.toUpperCase()},Q=function(n,r){var i={$viewValue:n};x(t,!0),D(t,!1),o.when(U.source(t,i)).then(function(o){var a=n===m.$viewValue;if(a&&k)if(o&&o.length>0){q.activeIdx=O?0:-1,D(t,!1),q.matches.length=0;for(var s=0;s<o.length;s++)i[U.itemName]=o[s],q.matches.push({id:G(s),label:U.viewMapper(q,i),model:o[s]});if(q.query=n,h(),e.attr("aria-expanded",!0),M&&1===q.matches.length&&Y(n,0)&&(angular.isNumber(q.debounceUpdate)||angular.isObject(q.debounceUpdate)?c(function(){q.select(0,r)},angular.isNumber(q.debounceUpdate)?q.debounceUpdate:q.debounceUpdate.default):q.select(0,r)),_){var u=q.matches[0].label;angular.isString(n)&&n.length>0&&u.slice(0,n.length).toUpperCase()===n.toUpperCase()?z.val(n+u.slice(n.length)):z.val("")}}else W(),D(t,!0);a&&x(t,!1)},function(){W(),x(t,!1),D(t,!0)})};B&&(angular.element(u).on("resize",f),s.find("body").on("scroll",f));var Z=c(function(){q.matches.length&&h(),q.moveInProgress=!1},200);q.moveInProgress=!1,q.query=void 0;var J,X=function(t){J=a(function(){Q(t)},w)},tt=function(){J&&a.cancel(J)};W(),q.assignIsOpen=function(e){P(t,e)},q.select=function(r,i){var o,s,u={};C=!0,u[U.itemName]=s=q.matches[r].model,o=U.modelMapper(t,u),N(t,o),m.$setValidity("editable",!0),m.$setValidity("parse",!0),S(t,{$item:s,$model:o,$label:U.viewMapper(t,u),$event:i}),W(),!1!==q.$eval(n.typeaheadFocusOnSelect)&&a(function(){e[0].focus()},0,!1)},e.on("keydown",function(e){if(0!==q.matches.length&&-1!==y.indexOf(e.which)){var n=T(t,{$event:e});if(-1===q.activeIdx&&n||9===e.which&&e.shiftKey)return W(),void q.$digest();e.preventDefault();var r;switch(e.which){case 27:e.stopPropagation(),W(),t.$digest();break;case 38:q.activeIdx=(q.activeIdx>0?q.activeIdx:q.matches.length)-1,q.$digest(),(r=H[0].querySelectorAll(".uib-typeahead-match")[q.activeIdx]).parentNode.scrollTop=r.offsetTop;break;case 40:q.activeIdx=(q.activeIdx+1)%q.matches.length,q.$digest(),(r=H[0].querySelectorAll(".uib-typeahead-match")[q.activeIdx]).parentNode.scrollTop=r.offsetTop;break;default:n&&q.$apply(function(){angular.isNumber(q.debounceUpdate)||angular.isObject(q.debounceUpdate)?c(function(){q.select(q.activeIdx,e)},angular.isNumber(q.debounceUpdate)?q.debounceUpdate:q.debounceUpdate.default):q.select(q.activeIdx,e)})}}}),e.on("focus",function(t){k=!0,0!==b||m.$viewValue||a(function(){Q(m.$viewValue,t)},0)}),e.on("blur",function(t){E&&q.matches.length&&-1!==q.activeIdx&&!C&&(C=!0,q.$apply(function(){angular.isObject(q.debounceUpdate)&&angular.isNumber(q.debounceUpdate.blur)?c(function(){q.select(q.activeIdx,t)},q.debounceUpdate.blur):q.select(q.activeIdx,t)})),!$&&m.$error.editable&&(m.$setViewValue(),q.$apply(function(){m.$setValidity("editable",!0),m.$setValidity("parse",!0)}),e.val("")),k=!1,C=!1});var et=function(n){e[0]!==n.target&&3!==n.which&&0!==q.matches.length&&(W(),l.$$phase||t.$digest())};s.on("click",et),t.$on("$destroy",function(){s.off("click",et),(B||I)&&nt.remove(),B&&(angular.element(u).off("resize",f),s.find("body").off("scroll",f)),H.remove(),_&&V.remove()});var nt=r(H)(q);B?s.find("body").append(nt):I?angular.element(I).eq(0).append(nt):e.after(nt),this.init=function(e){v=g(m=e),q.debounceUpdate=i(v.getOption("debounce"))(t),m.$parsers.unshift(function(e){return k=!0,0===b||e&&e.length>=b?w>0?(tt(),X(e)):Q(e):(x(t,!1),tt(),W()),$?e:e?void m.$setValidity("editable",!1):(m.$setValidity("editable",!0),null)}),m.$formatters.push(function(e){var n,r,i={};return $||m.$setValidity("editable",!0),A?(i.$model=e,A(t,i)):(i[U.itemName]=e,n=U.viewMapper(t,i),i[U.itemName]=void 0,r=U.viewMapper(t,i),n!==r?n:e)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","uibTypeahead"],link:function(t,e,n,r){r[1].init(r[0])}}}).directive("uibTypeaheadPopup",["$$debounce",function(t){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&",assignIsOpen:"&",debounce:"&"},replace:!0,templateUrl:function(t,e){return e.popupTemplateUrl||"uib/template/typeahead/typeahead-popup.html"},link:function(e,n,r){e.templateUrl=r.templateUrl,e.isOpen=function(){var t=e.matches.length>0;return e.assignIsOpen({isOpen:t}),t},e.isActive=function(t){return e.active===t},e.selectActive=function(t){e.active=t},e.selectMatch=function(n,r){var i=e.debounce();angular.isNumber(i)||angular.isObject(i)?t(function(){e.select({activeIdx:n,evt:r})},angular.isNumber(i)?i:i.default):e.select({activeIdx:n,evt:r})}}}}]).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(t,e,n){return{scope:{index:"=",match:"=",query:"="},link:function(r,i,o){var a=n(o.templateUrl)(r.$parent)||"uib/template/typeahead/typeahead-match.html";t(a).then(function(t){var n=angular.element(t.trim());i.replaceWith(n),e(n)(r)})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(t,e,n){function r(t){return t.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function i(t){return/<.*>/g.test(t)}var o;return o=e.has("$sanitize"),function(e,a){return!o&&i(e)&&n.warn("Unsafe use of typeahead please use ngSanitize"),e=a?(""+e).replace(new RegExp(r(a),"gi"),"<strong>$&</strong>"):e,o||(e=t.trustAsHtml(e)),e}}]),angular.module("uib/template/accordion/accordion-group.html",[]).run(["$templateCache",function(t){t.put("uib/template/accordion/accordion-group.html",'<div role="tab" id="{{::headingId}}" aria-selected="{{isOpen}}" class="panel-heading" ng-keypress="toggleOpen($event)">\n <h4 class="panel-title">\n <a role="button" data-toggle="collapse" href aria-expanded="{{isOpen}}" aria-controls="{{::panelId}}" tabindex="0" class="accordion-toggle" ng-click="toggleOpen()" uib-accordion-transclude="heading" ng-disabled="isDisabled" uib-tabindex-toggle><span uib-accordion-header ng-class="{\'text-muted\': isDisabled}">{{heading}}</span></a>\n </h4>\n</div>\n<div id="{{::panelId}}" aria-labelledby="{{::headingId}}" aria-hidden="{{!isOpen}}" role="tabpanel" class="panel-collapse collapse" uib-collapse="!isOpen">\n <div class="panel-body" ng-transclude></div>\n</div>\n')}]),angular.module("uib/template/accordion/accordion.html",[]).run(["$templateCache",function(t){t.put("uib/template/accordion/accordion.html",'<div role="tablist" class="panel-group" ng-transclude></div>')}]),angular.module("uib/template/alert/alert.html",[]).run(["$templateCache",function(t){t.put("uib/template/alert/alert.html",'<button ng-show="closeable" type="button" class="close" ng-click="close({$event: $event})">\n <span aria-hidden="true">&times;</span>\n <span class="sr-only">Close</span>\n</button>\n<div ng-transclude></div>\n')}]),angular.module("uib/template/carousel/carousel.html",[]).run(["$templateCache",function(t){t.put("uib/template/carousel/carousel.html",'<div class="carousel-inner" ng-transclude></div>\n<a role="button" href class="left carousel-control" ng-click="prev()" ng-class="{ disabled: isPrevDisabled() }" ng-show="slides.length > 1">\n <span aria-hidden="true" class="glyphicon glyphicon-chevron-left"></span>\n <span class="sr-only">previous</span>\n</a>\n<a role="button" href class="right carousel-control" ng-click="next()" ng-class="{ disabled: isNextDisabled() }" ng-show="slides.length > 1">\n <span aria-hidden="true" class="glyphicon glyphicon-chevron-right"></span>\n <span class="sr-only">next</span>\n</a>\n<ol class="carousel-indicators" ng-show="slides.length > 1">\n <li ng-repeat="slide in slides | orderBy:indexOfSlide track by $index" ng-class="{ active: isActive(slide) }" ng-click="select(slide)">\n <span class="sr-only">slide {{ $index + 1 }} of {{ slides.length }}<span ng-if="isActive(slide)">, currently active</span></span>\n </li>\n</ol>\n')}]),angular.module("uib/template/carousel/slide.html",[]).run(["$templateCache",function(t){t.put("uib/template/carousel/slide.html",'<div class="text-center" ng-transclude></div>\n')}]),angular.module("uib/template/datepicker/datepicker.html",[]).run(["$templateCache",function(t){t.put("uib/template/datepicker/datepicker.html",'<div ng-switch="datepickerMode">\n <div uib-daypicker ng-switch-when="day" tabindex="0" class="uib-daypicker"></div>\n <div uib-monthpicker ng-switch-when="month" tabindex="0" class="uib-monthpicker"></div>\n <div uib-yearpicker ng-switch-when="year" tabindex="0" class="uib-yearpicker"></div>\n</div>\n')}]),angular.module("uib/template/datepicker/day.html",[]).run(["$templateCache",function(t){t.put("uib/template/datepicker/day.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-left"></i><span class="sr-only">previous</span></button></th>\n <th colspan="{{::5 + showWeeks}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-right"></i><span class="sr-only">next</span></button></th>\n </tr>\n <tr>\n <th ng-if="showWeeks" class="text-center"></th>\n <th ng-repeat="label in ::labels track by $index" class="text-center"><small aria-label="{{::label.full}}">{{::label.abbr}}</small></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-weeks" ng-repeat="row in rows track by $index" role="row">\n <td ng-if="showWeeks" class="text-center h6"><em>{{ weekNumbers[$index] }}</em></td>\n <td ng-repeat="dt in row" class="uib-day text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default btn-sm"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-muted\': dt.secondary, \'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/datepicker/month.html",[]).run(["$templateCache",function(t){t.put("uib/template/datepicker/month.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-left"></i><span class="sr-only">previous</span></button></th>\n <th colspan="{{::yearHeaderColspan}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-right"></i><span class="sr-only">next</span></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-months" ng-repeat="row in rows track by $index" role="row">\n <td ng-repeat="dt in row" class="uib-month text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/datepicker/year.html",[]).run(["$templateCache",function(t){t.put("uib/template/datepicker/year.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-left"></i><span class="sr-only">previous</span></button></th>\n <th colspan="{{::columns - 2}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-right"></i><span class="sr-only">next</span></button></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-years" ng-repeat="row in rows track by $index" role="row">\n <td ng-repeat="dt in row" class="uib-year text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/datepickerPopup/popup.html",[]).run(["$templateCache",function(t){t.put("uib/template/datepickerPopup/popup.html",'<ul role="presentation" class="uib-datepicker-popup dropdown-menu uib-position-measure" dropdown-nested ng-if="isOpen" ng-keydown="keydown($event)" ng-click="$event.stopPropagation()">\n <li ng-transclude></li>\n <li ng-if="showButtonBar" class="uib-button-bar">\n <span class="btn-group pull-left">\n <button type="button" class="btn btn-sm btn-info uib-datepicker-current" ng-click="select(\'today\', $event)" ng-disabled="isDisabled(\'today\')">{{ getText(\'current\') }}</button>\n <button type="button" class="btn btn-sm btn-danger uib-clear" ng-click="select(null, $event)">{{ getText(\'clear\') }}</button>\n </span>\n <button type="button" class="btn btn-sm btn-success pull-right uib-close" ng-click="close($event)">{{ getText(\'close\') }}</button>\n </li>\n</ul>\n')}]),angular.module("uib/template/modal/window.html",[]).run(["$templateCache",function(t){t.put("uib/template/modal/window.html","<div class=\"modal-dialog {{size ? 'modal-' + size : ''}}\"><div class=\"modal-content\" uib-modal-transclude></div></div>\n")}]),angular.module("uib/template/pager/pager.html",[]).run(["$templateCache",function(t){t.put("uib/template/pager/pager.html",'<li ng-class="{disabled: noPrevious()||ngDisabled, previous: align}"><a href ng-click="selectPage(page - 1, $event)" ng-disabled="noPrevious()||ngDisabled" uib-tabindex-toggle>{{::getText(\'previous\')}}</a></li>\n<li ng-class="{disabled: noNext()||ngDisabled, next: align}"><a href ng-click="selectPage(page + 1, $event)" ng-disabled="noNext()||ngDisabled" uib-tabindex-toggle>{{::getText(\'next\')}}</a></li>\n')}]),angular.module("uib/template/pagination/pagination.html",[]).run(["$templateCache",function(t){t.put("uib/template/pagination/pagination.html",'<li role="menuitem" ng-if="::boundaryLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-first"><a href ng-click="selectPage(1, $event)" ng-disabled="noPrevious()||ngDisabled" uib-tabindex-toggle>{{::getText(\'first\')}}</a></li>\n<li role="menuitem" ng-if="::directionLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-prev"><a href ng-click="selectPage(page - 1, $event)" ng-disabled="noPrevious()||ngDisabled" uib-tabindex-toggle>{{::getText(\'previous\')}}</a></li>\n<li role="menuitem" ng-repeat="page in pages track by $index" ng-class="{active: page.active,disabled: ngDisabled&&!page.active}" class="pagination-page"><a href ng-click="selectPage(page.number, $event)" ng-disabled="ngDisabled&&!page.active" uib-tabindex-toggle>{{page.text}}</a></li>\n<li role="menuitem" ng-if="::directionLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-next"><a href ng-click="selectPage(page + 1, $event)" ng-disabled="noNext()||ngDisabled" uib-tabindex-toggle>{{::getText(\'next\')}}</a></li>\n<li role="menuitem" ng-if="::boundaryLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-last"><a href ng-click="selectPage(totalPages, $event)" ng-disabled="noNext()||ngDisabled" uib-tabindex-toggle>{{::getText(\'last\')}}</a></li>\n')}]),angular.module("uib/template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(t){t.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(t){t.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(t){t.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(t){t.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(t){t.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(t){t.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("uib/template/progressbar/bar.html",[]).run(["$templateCache",function(t){t.put("uib/template/progressbar/bar.html",'<div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" ng-transclude></div>\n')}]),angular.module("uib/template/progressbar/progress.html",[]).run(["$templateCache",function(t){t.put("uib/template/progressbar/progress.html",'<div class="progress" ng-transclude aria-labelledby="{{::title}}"></div>')}]),angular.module("uib/template/progressbar/progressbar.html",[]).run(["$templateCache",function(t){t.put("uib/template/progressbar/progressbar.html",'<div class="progress">\n <div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" ng-transclude></div>\n</div>\n')}]),angular.module("uib/template/rating/rating.html",[]).run(["$templateCache",function(t){t.put("uib/template/rating/rating.html",'<span ng-mouseleave="reset()" ng-keydown="onKeydown($event)" tabindex="0" role="slider" aria-valuemin="0" aria-valuemax="{{range.length}}" aria-valuenow="{{value}}" aria-valuetext="{{title}}">\n <span ng-repeat-start="r in range track by $index" class="sr-only">({{ $index < value ? \'*\' : \' \' }})</span>\n <i ng-repeat-end ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" class="glyphicon" ng-class="$index < value && (r.stateOn || \'glyphicon-star\') || (r.stateOff || \'glyphicon-star-empty\')" ng-attr-title="{{r.title}}"></i>\n</span>\n')}]),angular.module("uib/template/tabs/tab.html",[]).run(["$templateCache",function(t){t.put("uib/template/tabs/tab.html",'<li ng-class="[{active: active, disabled: disabled}, classes]" class="uib-tab nav-item">\n <a href ng-click="select($event)" class="nav-link" uib-tab-heading-transclude>{{heading}}</a>\n</li>\n')}]),angular.module("uib/template/tabs/tabset.html",[]).run(["$templateCache",function(t){t.put("uib/template/tabs/tabset.html",'<div>\n <ul class="nav nav-{{tabset.type || \'tabs\'}}" ng-class="{\'nav-stacked\': vertical, \'nav-justified\': justified}" ng-transclude></ul>\n <div class="tab-content">\n <div class="tab-pane"\n ng-repeat="tab in tabset.tabs"\n ng-class="{active: tabset.active === tab.index}"\n uib-tab-content-transclude="tab">\n </div>\n </div>\n</div>\n')}]),angular.module("uib/template/timepicker/timepicker.html",[]).run(["$templateCache",function(t){t.put("uib/template/timepicker/timepicker.html",'<table class="uib-timepicker">\n <tbody>\n <tr class="text-center" ng-show="::showSpinners">\n <td class="uib-increment hours"><a ng-click="incrementHours()" ng-class="{disabled: noIncrementHours()}" class="btn btn-link" ng-disabled="noIncrementHours()" tabindex="-1"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td>&nbsp;</td>\n <td class="uib-increment minutes"><a ng-click="incrementMinutes()" ng-class="{disabled: noIncrementMinutes()}" class="btn btn-link" ng-disabled="noIncrementMinutes()" tabindex="-1"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td ng-show="showSeconds">&nbsp;</td>\n <td ng-show="showSeconds" class="uib-increment seconds"><a ng-click="incrementSeconds()" ng-class="{disabled: noIncrementSeconds()}" class="btn btn-link" ng-disabled="noIncrementSeconds()" tabindex="-1"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n <tr>\n <td class="form-group uib-time hours" ng-class="{\'has-error\': invalidHours}">\n <input type="text" placeholder="HH" ng-model="hours" ng-change="updateHours()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementHours()" ng-blur="blur()">\n </td>\n <td class="uib-separator">:</td>\n <td class="form-group uib-time minutes" ng-class="{\'has-error\': invalidMinutes}">\n <input type="text" placeholder="MM" ng-model="minutes" ng-change="updateMinutes()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementMinutes()" ng-blur="blur()">\n </td>\n <td ng-show="showSeconds" class="uib-separator">:</td>\n <td class="form-group uib-time seconds" ng-class="{\'has-error\': invalidSeconds}" ng-show="showSeconds">\n <input type="text" placeholder="SS" ng-model="seconds" ng-change="updateSeconds()" class="form-control text-center" ng-readonly="readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementSeconds()" ng-blur="blur()">\n </td>\n <td ng-show="showMeridian" class="uib-time am-pm"><button type="button" ng-class="{disabled: noToggleMeridian()}" class="btn btn-default text-center" ng-click="toggleMeridian()" ng-disabled="noToggleMeridian()" tabindex="{{::tabindex}}">{{meridian}}</button></td>\n </tr>\n <tr class="text-center" ng-show="::showSpinners">\n <td class="uib-decrement hours"><a ng-click="decrementHours()" ng-class="{disabled: noDecrementHours()}" class="btn btn-link" ng-disabled="noDecrementHours()" tabindex="-1"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td>&nbsp;</td>\n <td class="uib-decrement minutes"><a ng-click="decrementMinutes()" ng-class="{disabled: noDecrementMinutes()}" class="btn btn-link" ng-disabled="noDecrementMinutes()" tabindex="-1"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td ng-show="showSeconds">&nbsp;</td>\n <td ng-show="showSeconds" class="uib-decrement seconds"><a ng-click="decrementSeconds()" ng-class="{disabled: noDecrementSeconds()}" class="btn btn-link" ng-disabled="noDecrementSeconds()" tabindex="-1"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(t){t.put("uib/template/typeahead/typeahead-match.html",'<a href\n tabindex="-1"\n ng-bind-html="match.label | uibTypeaheadHighlight:query"\n ng-attr-title="{{match.label}}"></a>\n')}]),angular.module("uib/template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(t){t.put("uib/template/typeahead/typeahead-popup.html",'<ul class="dropdown-menu" ng-show="isOpen() && !moveInProgress" ng-style="{top: position().top+\'px\', left: position().left+\'px\'}" role="listbox" aria-hidden="{{!isOpen()}}">\n <li class="uib-typeahead-match" ng-repeat="match in matches track by $index" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)" ng-click="selectMatch($index, $event)" role="option" id="{{::match.id}}">\n <div uib-typeahead-match index="$index" match="match" query="query" template-url="templateUrl"></div>\n </li>\n</ul>\n')}]),angular.module("ui.bootstrap.carousel").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibCarouselCss&&angular.element(document).find("head").prepend('<style type="text/css">.ng-animate.item:not(.left):not(.right){-webkit-transition:0s ease-in-out left;transition:0s ease-in-out left}</style>'),angular.$$uibCarouselCss=!0}),angular.module("ui.bootstrap.datepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-datepicker .uib-title{width:100%;}.uib-day button,.uib-month button,.uib-year button{min-width:100%;}.uib-left,.uib-right{width:100%}</style>'),angular.$$uibDatepickerCss=!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}),angular.module("ui.bootstrap.datepickerPopup").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerpopupCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-datepicker-popup.dropdown-menu{display:block;float:none;margin:0;}.uib-button-bar{padding:10px 9px 2px;}</style>'),angular.$$uibDatepickerpopupCss=!0}),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.timepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTimepickerCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-time input{width:50px;}</style>'),angular.$$uibTimepickerCss=!0}),angular.module("ui.bootstrap.typeahead").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTypeaheadCss&&angular.element(document).find("head").prepend('<style type="text/css">[uib-typeahead-popup].dropdown-menu{display:block;}</style>'),angular.$$uibTypeaheadCss=!0}),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router"),function(t,e,n){"use strict";function r(t,e){return V(new(V(function(){},{prototype:t})),e)}function i(t){return F(arguments,function(e){e!==t&&F(e,function(e,n){t.hasOwnProperty(n)||(t[n]=e)})}),t}function o(t,e){var n=[];for(var r in t.path){if(t.path[r]!==e.path[r])break;n.push(t.path[r])}return n}function a(t){if(Object.keys)return Object.keys(t);var e=[];return F(t,function(t,n){e.push(n)}),e}function s(t,e){if(Array.prototype.indexOf)return t.indexOf(e,Number(arguments[2])||0);var n=t.length>>>0,r=Number(arguments[2])||0;for((r=r<0?Math.ceil(r):Math.floor(r))<0&&(r+=n);r<n;r++)if(r in t&&t[r]===e)return r;return-1}function u(t,e,n,r){var i,u=o(n,r),l={},c=[];for(var p in u)if(u[p]&&u[p].params&&(i=a(u[p].params)).length)for(var d in i)s(c,i[d])>=0||(c.push(i[d]),l[i[d]]=t[i[d]]);return V({},l,e)}function l(t,e,n){if(!n){n=[];for(var r in t)n.push(r)}for(var i=0;i<n.length;i++){var o=n[i];if(t[o]!=e[o])return!1}return!0}function c(t,e){var n={};return F(t,function(t){n[t]=e[t]}),n}function p(t){var e={},n=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));return F(n,function(n){n in t&&(e[n]=t[n])}),e}function d(t){var e={},n=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));for(var r in t)-1==s(n,r)&&(e[r]=t[r]);return e}function f(t,e){var n=j(t),r=n?[]:{};return F(t,function(t,i){e(t,i)&&(r[n?r.length:i]=t)}),r}function h(t,e){var n=j(t)?[]:{};return F(t,function(t,r){n[r]=e(t,r)}),n}function g(t){return t.then(n,function(){})&&t}function m(t,e){var r=1,o=2,u={},l=[],c=u,p=V(t.when(u),{$$promises:u,$$values:u});this.study=function(u){function f(t,n){if(b[n]!==o){if(y.push(n),b[n]===r)throw y.splice(0,s(y,n)),new Error("Cyclic dependency: "+y.join(" -> "));if(b[n]=r,U(t))v.push(n,[function(){return e.get(t)}],l);else{var i=e.annotate(t);F(i,function(t){t!==n&&u.hasOwnProperty(t)&&f(u[t],t)}),v.push(n,t,i)}y.pop(),b[n]=o}}function h(t){return q(t)&&t.then&&t.$$promises}if(!q(u))throw new Error("'invocables' must be an object");var m=a(u||{}),v=[],y=[],b={};return F(u,f),u=y=b=null,function(r,o,a){function s(){--w||($||i(b,o.$$values),f.$$values=b,f.$$promises=f.$$promises||!0,delete f.$$inheritedValues,l.resolve(b))}function u(t){f.$$failure=t,l.reject(t)}if(h(r)&&a===n&&(a=o,o=r,r=null),r){if(!q(r))throw new Error("'locals' must be an object")}else r=c;if(o){if(!h(o))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else o=p;var l=t.defer(),f=g(l.promise),y=f.$$promises={},b=V({},r),w=1+v.length/3,$=!1;if(g(f),L(o.$$failure))return u(o.$$failure),f;o.$$inheritedValues&&i(b,d(o.$$inheritedValues,m)),V(y,o.$$promises),o.$$values?($=i(b,d(o.$$values,m)),f.$$inheritedValues=d(o.$$values,m),s()):(o.$$inheritedValues&&(f.$$inheritedValues=d(o.$$inheritedValues,m)),o.then(s,u));for(var k=0,C=v.length;k<C;k+=3)r.hasOwnProperty(v[k])?s():function(n,i,o){function l(t){p.reject(t),u(t)}function c(){if(!L(f.$$failure))try{p.resolve(e.invoke(i,a,b)),p.promise.then(function(t){b[n]=t,s()},l)}catch(t){l(t)}}var p=t.defer(),d=0;F(o,function(t){y.hasOwnProperty(t)&&!r.hasOwnProperty(t)&&(d++,y[t].then(function(e){b[t]=e,--d||c()},l))}),d||c(),y[n]=g(p.promise)}(v[k],v[k+1],v[k+2]);return f}},this.resolve=function(t,e,n,r){return this.study(t)(e,n,r)}}function v(t,e,n,r){this.fromConfig=function(t,e,n){return L(t.template)?this.fromString(t.template,e):L(t.templateUrl)?this.fromUrl(t.templateUrl,e):L(t.templateProvider)?this.fromProvider(t.templateProvider,e,n):null},this.fromString=function(t,e){return N(t)?t(e):t},this.fromUrl=function(i,o){return N(i)&&(i=i(o)),null==i?null:r?t.get(i,{cache:e,headers:{Accept:"text/html"}}).then(function(t){return t.data}):n.get("$templateRequest")(i)},this.fromProvider=function(t,e,r){return n.invoke(t,null,r||{params:e})}}function y(t,e,i){function o(e,n,r,i){if(m.push(e),h[e])return h[e];if(!/^\w+([-.]+\w+)*(?:\[\])?$/.test(e))throw new Error("Invalid parameter name '"+e+"' in pattern '"+t+"'");if(g[e])throw new Error("Duplicate parameter name '"+e+"' in pattern '"+t+"'");return g[e]=new K.Param(e,n,r,i),g[e]}function a(t,e,n,r){var i=["",""],o=t.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!e)return o;switch(n){case!1:i=["(",")"+(r?"?":"")];break;case!0:o=o.replace(/\/$/,""),i=["(?:/(",")|/)?"];break;default:i=["("+n+"|",")?"]}return o+i[0]+e+i[1]}function s(i,o){var a,s,u,l,c;return a=i[2]||i[3],c=e.params[a],u=t.substring(d,i.index),(s=o?i[4]:i[4]||("*"==i[1]?".*":null))&&(l=K.type(s)||r(K.type("string"),{pattern:new RegExp(s,e.caseInsensitive?"i":n)})),{id:a,regexp:s,segment:u,type:l,cfg:c}}e=V({params:{}},q(e)?e:{});var u,l=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,c=/([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,p="^",d=0,f=this.segments=[],h=i?i.params:{},g=this.params=i?i.params.$$new():new K.ParamSet,m=[];this.source=t;for(var v,y,b;(u=l.exec(t))&&!((v=s(u,!1)).segment.indexOf("?")>=0);)y=o(v.id,v.type,v.cfg,"path"),p+=a(v.segment,y.type.pattern.source,y.squash,y.isOptional),f.push(v.segment),d=l.lastIndex;var w=(b=t.substring(d)).indexOf("?");if(w>=0){var $=this.sourceSearch=b.substring(w);if(b=b.substring(0,w),this.sourcePath=t.substring(0,d+w),$.length>0)for(d=0;u=c.exec($);)y=o((v=s(u,!0)).id,v.type,v.cfg,"search"),d=l.lastIndex}else this.sourcePath=t,this.sourceSearch="";p+=a(b)+(!1===e.strict?"/?":"")+"$",f.push(b),this.regexp=new RegExp(p,e.caseInsensitive?"i":n),this.prefix=f[0],this.$$paramNames=m}function b(t){V(this,t)}function w(){function t(t){return null!=t?t.toString().replace(/(~|\/)/g,function(t){return{"~":"~~","/":"~2F"}[t]}):t}function i(){return{strict:d,caseInsensitive:p}}function o(t){return N(t)||j(t)&&N(t[t.length-1])}function u(){for(;$.length;){var t=$.shift();if(t.pattern)throw new Error("You cannot override a type's .pattern at runtime.");e.extend(m[t.name],c.invoke(t.def))}}function l(t){V(this,t||{})}K=this;var c,p=!1,d=!0,g=!1,m={},v=!0,$=[],k={string:{encode:t,decode:function(t){return null!=t?t.toString().replace(/(~~|~2F)/g,function(t){return{"~~":"~","~2F":"/"}[t]}):t},is:function(t){return null==t||!L(t)||"string"==typeof t},pattern:/[^/]*/},int:{encode:t,decode:function(t){return parseInt(t,10)},is:function(t){return t!==n&&null!==t&&this.decode(t.toString())===t},pattern:/\d+/},bool:{encode:function(t){return t?1:0},decode:function(t){return 0!==parseInt(t,10)},is:function(t){return!0===t||!1===t},pattern:/0|1/},date:{encode:function(t){return this.is(t)?[t.getFullYear(),("0"+(t.getMonth()+1)).slice(-2),("0"+t.getDate()).slice(-2)].join("-"):n},decode:function(t){if(this.is(t))return t;var e=this.capture.exec(t);return e?new Date(e[1],e[2]-1,e[3]):n},is:function(t){return t instanceof Date&&!isNaN(t.valueOf())},equals:function(t,e){return this.is(t)&&this.is(e)&&t.toISOString()===e.toISOString()},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:e.toJson,decode:e.fromJson,is:e.isObject,equals:e.equals,pattern:/[^/]*/},any:{encode:e.identity,decode:e.identity,equals:e.equals,pattern:/.*/}};w.$$getDefaultValue=function(t){if(!o(t.value))return t.value;if(!c)throw new Error("Injectable functions cannot be called at configuration time");return c.invoke(t.value)},this.caseInsensitive=function(t){return L(t)&&(p=t),p},this.strictMode=function(t){return L(t)&&(d=t),d},this.defaultSquashPolicy=function(t){if(!L(t))return g;if(!0!==t&&!1!==t&&!U(t))throw new Error("Invalid squash policy: "+t+". Valid policies: false, true, arbitrary-string");return g=t,t},this.compile=function(t,e){return new y(t,V(i(),e))},this.isMatcher=function(t){if(!q(t))return!1;var e=!0;return F(y.prototype,function(n,r){N(n)&&(e=e&&L(t[r])&&N(t[r]))}),e},this.type=function(t,e,n){if(!L(e))return m[t];if(m.hasOwnProperty(t))throw new Error("A type named '"+t+"' has already been defined.");return m[t]=new b(V({name:t},e)),n&&($.push({name:t,def:n}),v||u()),this},F(k,function(t,e){m[e]=new b(V({name:e},t))}),m=r(m,{}),this.$get=["$injector",function(t){return c=t,v=!1,u(),F(k,function(t,e){m[e]||(m[e]=new b(t))}),this}],this.Param=function(t,r,i,u){function l(){if(!c)throw new Error("Injectable functions cannot be called at configuration time");var t=c.invoke(i.$$fn);if(null!==t&&t!==n&&!p.type.is(t))throw new Error("Default value ("+t+") for parameter '"+p.id+"' is not an instance of Type ("+p.type.name+")");return t}var p=this;i=function(t){var e=q(t)?a(t):[];return-1===s(e,"value")&&-1===s(e,"type")&&-1===s(e,"squash")&&-1===s(e,"array")&&(t={value:t}),t.$$fn=o(t.value)?t.value:function(){return t.value},t}(i),r=function(n,r,i){if(n.type&&r)throw new Error("Param '"+t+"' has two type configurations.");return r||(n.type?e.isString(n.type)?m[n.type]:n.type instanceof b?n.type:new b(n.type):"config"===i?m.any:m.string)}(i,r,u);var d=function(){var e={array:"search"===u&&"auto"},n=t.match(/\[\]$/)?{array:!0}:{};return V(e,n,i).array}();"string"!==(r=d?r.$asArray(d,"search"===u):r).name||d||"path"!==u||i.value!==n||(i.value="");var v=i.value!==n,y=function(t,e){var n=t.squash;if(!e||!1===n)return!1;if(!L(n)||null==n)return g;if(!0===n||U(n))return n;throw new Error("Invalid squash policy: '"+n+"'. Valid policies: false, true, or arbitrary string")}(i,v),w=function(t,e,r,i){var o,a,u=[{from:"",to:r||e?n:""},{from:null,to:r||e?n:""}];return o=j(t.replace)?t.replace:[],U(i)&&o.push({from:i,to:n}),a=h(o,function(t){return t.from}),f(u,function(t){return-1===s(a,t.from)}).concat(o)}(i,d,v,y);V(this,{id:t,type:r,location:u,array:d,squash:y,replace:w,isOptional:v,value:function(t){function e(t){return function(e){return e.from===t}}return t=function(t){var n=h(f(p.replace,e(t)),function(t){return t.to});return n.length?n[0]:t}(t),L(t)?p.type.$normalize(t):l()},dynamic:n,config:i,toString:function(){return"{Param:"+t+" "+r+" squash: '"+y+"' optional: "+v+"}"}})},l.prototype={$$new:function(){return r(this,V(new l,{$$parent:this}))},$$keys:function(){for(var t=[],e=[],n=this,r=a(l.prototype);n;)e.push(n),n=n.$$parent;return e.reverse(),F(e,function(e){F(a(e),function(e){-1===s(t,e)&&-1===s(r,e)&&t.push(e)})}),t},$$values:function(t){var e={},n=this;return F(n.$$keys(),function(r){e[r]=n[r].value(t&&t[r])}),e},$$equals:function(t,e){var n=!0,r=this;return F(r.$$keys(),function(i){var o=t&&t[i],a=e&&e[i];r[i].type.equals(o,a)||(n=!1)}),n},$$validates:function(t){var r,i,o,a,s,u=this.$$keys();for(r=0;r<u.length&&(i=this[u[r]],(o=t[u[r]])!==n&&null!==o||!i.isOptional);r++){if(a=i.type.$normalize(o),!i.type.is(a))return!1;if(s=i.type.encode(a),e.isString(s)&&!i.type.pattern.exec(s))return!1}return!0},$$parent:n},this.ParamSet=l}function $(t,r){function i(t){var e=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(t.source);return null!=e?e[1].replace(/\\(.)/g,"$1"):""}function o(t,e){return t.replace(/\$(\$|\d{1,2})/,function(t,n){return e["$"===n?0:Number(n)]})}function a(t,e,n){if(!n)return!1;var r=t.invoke(e,e,{$match:n});return!L(r)||r}function s(r,i,o,a,s){function d(t,e,n){return"/"===m?t:e?m.slice(0,-1)+t:n?m.slice(1)+t:t}function f(t){function e(t){var e=t(o,r);return!!e&&(U(e)&&r.replace().url(e),!0)}if(!t||!t.defaultPrevented){g&&r.url();g=n;var i,a=l.length;for(i=0;i<a;i++)if(e(l[i]))return;c&&e(c)}}function h(){return u=u||i.$on("$locationChangeSuccess",f)}var g,m=a.baseHref(),v=r.url();return p||h(),{sync:function(){f()},listen:function(){return h()},update:function(t){t?v=r.url():r.url()!==v&&(r.url(v),r.replace())},push:function(t,e,i){var o=t.format(e||{});null!==o&&e&&e["#"]&&(o+="#"+e["#"]),r.url(o),g=i&&i.$$avoidResync?r.url():n,i&&i.replace&&r.replace()},href:function(n,i,o){if(!n.validates(i))return null;var a=t.html5Mode();e.isObject(a)&&(a=a.enabled),a=a&&s.history;var u=n.format(i);if(o=o||{},a||null===u||(u="#"+t.hashPrefix()+u),null!==u&&i&&i["#"]&&(u+="#"+i["#"]),u=d(u,a,o.absolute),!o.absolute||!u)return u;var l=!a&&u?"/":"",c=r.port();return c=80===c||443===c?"":":"+c,[r.protocol(),"://",r.host(),c,l,u].join("")}}}var u,l=[],c=null,p=!1;this.rule=function(t){if(!N(t))throw new Error("'rule' must be a function");return l.push(t),this},this.otherwise=function(t){if(U(t)){var e=t;t=function(){return e}}else if(!N(t))throw new Error("'rule' must be a function");return c=t,this},this.when=function(t,e){var n,s=U(e);if(U(t)&&(t=r.compile(t)),!s&&!N(e)&&!j(e))throw new Error("invalid 'handler' in when()");var u={matcher:function(t,e){return s&&(n=r.compile(e),e=["$match",function(t){return n.format(t)}]),V(function(n,r){return a(n,e,t.exec(r.path(),r.search()))},{prefix:U(t.prefix)?t.prefix:""})},regex:function(t,e){if(t.global||t.sticky)throw new Error("when() RegExp must not be global or sticky");return s&&(n=e,e=["$match",function(t){return o(n,t)}]),V(function(n,r){return a(n,e,t.exec(r.path()))},{prefix:i(t)})}},l={matcher:r.isMatcher(t),regex:t instanceof RegExp};for(var c in l)if(l[c])return this.rule(u[c](t,e));throw new Error("invalid 'what' in when()")},this.deferIntercept=function(t){t===n&&(t=!0),p=t},this.$get=s,s.$inject=["$location","$rootScope","$injector","$browser","$sniffer"]}function k(t,i){function o(t){return 0===t.indexOf(".")||0===t.indexOf("^")}function d(t,e){if(!t)return n;var r=U(t),i=r?t:t.name;if(o(i)){if(!e)throw new Error("No reference point given for path '"+i+"'");e=d(e);for(var a=i.split("."),s=0,u=a.length,l=e;s<u;s++)if(""!==a[s]||0!==s){if("^"!==a[s])break;if(!l.parent)throw new Error("Path '"+i+"' not valid for state '"+e.name+"'");l=l.parent}else l=e;a=a.slice(s).join("."),i=l.name+(l.name&&a?".":"")+a}var c=x[i];return!c||!r&&(r||c!==t&&c.self!==t)?n:c}function f(t,e){T[t]||(T[t]=[]),T[t].push(e)}function m(t){for(var e=T[t]||[];e.length;)v(e.shift())}function v(e){var n=(e=r(e,{self:e,resolve:e.resolve||{},toString:function(){return this.name}})).name;if(!U(n)||n.indexOf("@")>=0)throw new Error("State must have a valid name");if(x.hasOwnProperty(n))throw new Error("State '"+n+"' is already defined");var i=-1!==n.indexOf(".")?n.substring(0,n.lastIndexOf(".")):U(e.parent)?e.parent:q(e.parent)&&U(e.parent.name)?e.parent.name:"";if(i&&!x[i])return f(i,e.self);for(var o in E)N(E[o])&&(e[o]=E[o](e,E.$delegates[o]));return x[n]=e,!e[S]&&e.url&&t.when(e.url,["$match","$stateParams",function(t,n){C.$current.navigable==e&&l(t,n)||C.transitionTo(e,t,{inherit:!0,location:!1})}]),m(n),e}function y(t){return t.indexOf("*")>-1}function b(t){for(var e=t.split("."),n=C.$current.name.split("."),r=0,i=e.length;r<i;r++)"*"===e[r]&&(n[r]="*");return"**"===e[0]&&(n=n.slice(s(n,e[1]))).unshift("**"),"**"===e[e.length-1]&&(n.splice(s(n,e[e.length-2])+1,Number.MAX_VALUE),n.push("**")),e.length==n.length&&n.join("")===e.join("")}function w(t,i,o,s,l,p,f,m,v){function w(e,n,r,o){var a=t.$broadcast("$stateNotFound",e,n,r);if(a.defaultPrevented)return f.update(),B;if(!a.retry)return null;if(o.$retry)return f.update(),I;var s=C.transition=i.when(a.retry);return s.then(function(){return s!==C.transition?(t.$broadcast("$stateChangeCancel",e.to,e.toParams,n,r),D):(e.options.$retry=!0,C.transitionTo(e.to,e.toParams,e.options))},function(){return B}),f.update(),s}function T(t,n,r,a,u,p){var d=r?n:c(t.params.$$keys(),n),f={$stateParams:d};u.resolve=l.resolve(t.resolve,f,u.resolve,t);var h=[u.resolve.then(function(t){u.globals=t})];return a&&h.push(a),i.all(h).then(function(){var n=[];return F(t.views,function(r,i){var a=r.resolve&&r.resolve!==t.resolve?r.resolve:{};a.$template=[function(){return o.load(i,{view:r,locals:u.globals,params:d,notify:p.notify})||""}],n.push(l.resolve(a,u.globals,u.resolve,t).then(function(n){if(N(r.controllerProvider)||j(r.controllerProvider)){var o=e.extend({},a,u.globals);n.$$controller=s.invoke(r.controllerProvider,null,o)}else n.$$controller=r.controller;n.$$state=t,n.$$controllerAs=r.controllerAs,n.$$resolveAs=r.resolveAs,u[i]=n}))}),i.all(n).then(function(){return u.globals})}).then(function(t){return u})}var E=new Error("transition superseded"),D=g(i.reject(E)),A=g(i.reject(new Error("transition prevented"))),B=g(i.reject(new Error("transition aborted"))),I=g(i.reject(new Error("transition failed")));return k.locals={resolve:null,globals:{$stateParams:{}}},C={params:{},current:k.self,$current:k,transition:null},C.reload=function(t){return C.transitionTo(C.current,p,{reload:t||!0,inherit:!1,notify:!0})},C.go=function(t,e,n){return C.transitionTo(t,e,V({inherit:!0,relative:C.$current},n))},C.transitionTo=function(e,n,o){n=n||{},o=V({location:!0,inherit:!1,relative:null,notify:!0,reload:!1,$retry:!1},o||{});var a,l=C.$current,h=C.params,m=l.path,v=d(e,o.relative),y=n["#"];if(!L(v)){var b={to:e,toParams:n,options:o},x=w(b,l.self,h,o);if(x)return x;if(e=b.to,n=b.toParams,o=b.options,v=d(e,o.relative),!L(v)){if(!o.relative)throw new Error("No such state '"+e+"'");throw new Error("Could not resolve '"+e+"' from state '"+o.relative+"'")}}if(v[S])throw new Error("Cannot transition to abstract state '"+e+"'");if(o.inherit&&(n=u(p,n||{},C.$current,v)),!v.params.$$validates(n))return I;n=v.params.$$values(n);var B=(e=v).path,O=0,M=B[O],P=k.locals,_=[];if(o.reload){if(U(o.reload)||q(o.reload)){if(q(o.reload)&&!o.reload.name)throw new Error("Invalid reload state object");var R=!0===o.reload?m[0]:d(o.reload);if(o.reload&&!R)throw new Error("No such reload state '"+(U(o.reload)?o.reload:o.reload.name)+"'");for(;M&&M===m[O]&&M!==R;)P=_[O]=M.locals,M=B[++O]}}else for(;M&&M===m[O]&&M.ownParams.$$equals(n,h);)P=_[O]=M.locals,M=B[++O];if($(e,n,l,h,P,o))return y&&(n["#"]=y),C.params=n,z(C.params,p),z(c(e.params.$$keys(),p),e.locals.globals.$stateParams),o.location&&e.navigable&&e.navigable.url&&(f.push(e.navigable.url,n,{$$avoidResync:!0,replace:"replace"===o.location}),f.update(!0)),C.transition=null,i.when(C.current);if(n=c(e.params.$$keys(),n||{}),y&&(n["#"]=y),o.notify&&t.$broadcast("$stateChangeStart",e.self,n,l.self,h,o).defaultPrevented)return t.$broadcast("$stateChangeCancel",e.self,n,l.self,h),null==C.transition&&f.update(),A;for(var N=i.when(P),j=O;j<B.length;j++,M=B[j])P=_[j]=r(P),N=T(M,n,M===e,N,P,o);var F=C.transition=N.then(function(){var r,i,a;if(C.transition!==F)return t.$broadcast("$stateChangeCancel",e.self,n,l.self,h),D;for(r=m.length-1;r>=O;r--)(a=m[r]).self.onExit&&s.invoke(a.self.onExit,a.self,a.locals.globals),a.locals=null;for(r=O;r<B.length;r++)(i=B[r]).locals=_[r],i.self.onEnter&&s.invoke(i.self.onEnter,i.self,i.locals.globals);return C.transition!==F?(t.$broadcast("$stateChangeCancel",e.self,n,l.self,h),D):(C.$current=e,C.current=e.self,C.params=n,z(C.params,p),C.transition=null,o.location&&e.navigable&&f.push(e.navigable.url,e.navigable.locals.globals.$stateParams,{$$avoidResync:!0,replace:"replace"===o.location}),o.notify&&t.$broadcast("$stateChangeSuccess",e.self,n,l.self,h),f.update(!0),C.current)}).then(null,function(r){return r===E?D:C.transition!==F?(t.$broadcast("$stateChangeCancel",e.self,n,l.self,h),D):(C.transition=null,(a=t.$broadcast("$stateChangeError",e.self,n,l.self,h,r)).defaultPrevented||f.update(),i.reject(r))});return g(F),F},C.is=function(t,e,r){var i=d(t,(r=V({relative:C.$current},r||{})).relative);return L(i)?C.$current===i&&(!e||a(e).reduce(function(t,n){var r=i.params[n];return t&&!r||r.type.equals(p[n],e[n])},!0)):n},C.includes=function(t,e,r){if(r=V({relative:C.$current},r||{}),U(t)&&y(t)){if(!b(t))return!1;t=C.$current.name}var i=d(t,r.relative);if(!L(i))return n;if(!L(C.$current.includes[i.name]))return!1;if(!e)return!0;for(var o=a(e),s=0;s<o.length;s++){var u=o[s],l=i.params[u];if(l&&!l.type.equals(p[u],e[u]))return!1}return a(e).reduce(function(t,n){var r=i.params[n];return t&&!r||r.type.equals(p[n],e[n])},!0)},C.href=function(t,e,r){var i=d(t,(r=V({lossy:!0,inherit:!0,absolute:!1,relative:C.$current},r||{})).relative);if(!L(i))return null;r.inherit&&(e=u(p,e||{},C.$current,i));var o=i&&r.lossy?i.navigable:i;return o&&o.url!==n&&null!==o.url?f.href(o.url,c(i.params.$$keys().concat("#"),e||{}),{absolute:r.absolute}):null},C.get=function(t,e){if(0===arguments.length)return h(a(x),function(t){return x[t].self});var n=d(t,e||C.$current);return n&&n.self?n.self:null},C}function $(t,e,n,r,i,o){if(!o.reload&&t===n&&(i===n.locals||!1===t.self.reloadOnSearch&&function(t,e,n){var r=t.params.$$keys().filter(function(e){return"search"!=t.params[e].location}),i=p.apply({},[t.params].concat(r));return new K.ParamSet(i).$$equals(e,n)}(n,r,e)))return!0}var k,C,x={},T={},S="abstract",E={parent:function(t){if(L(t.parent)&&t.parent)return d(t.parent);var e=/^(.+)\.[^.]+$/.exec(t.name);return e?d(e[1]):k},data:function(t){return t.parent&&t.parent.data&&(t.data=t.self.data=r(t.parent.data,t.data)),t.data},url:function(t){var e=t.url,n={params:t.params||{}};if(U(e))return"^"==e.charAt(0)?i.compile(e.substring(1),n):(t.parent.navigable||k).url.concat(e,n);if(!e||i.isMatcher(e))return e;throw new Error("Invalid url '"+e+"' in state '"+t+"'")},navigable:function(t){return t.url?t:t.parent?t.parent.navigable:null},ownParams:function(t){var e=t.url&&t.url.params||new K.ParamSet;return F(t.params||{},function(t,n){e[n]||(e[n]=new K.Param(n,null,t,"config"))}),e},params:function(t){var e=p(t.ownParams,t.ownParams.$$keys());return t.parent&&t.parent.params?V(t.parent.params.$$new(),e):new K.ParamSet},views:function(t){var e={};return F(L(t.views)?t.views:{"":t},function(n,r){r.indexOf("@")<0&&(r+="@"+t.parent.name),n.resolveAs=n.resolveAs||t.resolveAs||"$resolve",e[r]=n}),e},path:function(t){return t.parent?t.parent.path.concat(t):[]},includes:function(t){var e=t.parent?V({},t.parent.includes):{};return e[t.name]=!0,e},$delegates:{}};(k=v({name:"",url:"^",views:null,abstract:!0})).navigable=null,this.decorator=function(t,e){return U(t)&&!L(e)?E[t]:N(e)&&U(t)?(E[t]&&!E.$delegates[t]&&(E.$delegates[t]=E[t]),E[t]=e,this):this},this.state=function(t,e){return q(t)?e=t:e.name=t,v(e),this},this.$get=w,w.$inject=["$rootScope","$q","$view","$injector","$resolve","$stateParams","$urlRouter","$location","$urlMatcherFactory"]}function C(){function t(t,e){return{load:function(t,n){var r;return(n=V({template:null,controller:null,view:null,locals:null,notify:!0,async:!0,params:{}},n)).view&&(r=e.fromConfig(n.view,n.params,n.locals)),r}}}this.$get=t,t.$inject=["$rootScope","$templateFactory"]}function x(t,n,r,i,o){function a(t,n){if(l)return{enter:function(t,n,r){e.version.minor>2?l.enter(t,null,n).then(r):l.enter(t,null,n,r)},leave:function(t,n){e.version.minor>2?l.leave(t).then(n):l.leave(t,n)}};if(u){var r=u&&u(n,t);return{enter:function(t,e,n){r.enter(t,null,e),n()},leave:function(t,e){r.leave(t),e()}}}return{enter:function(t,e,n){e.after(t),n()},leave:function(t,e){t.remove(),e()}}}var s=n.has?function(t){return n.has(t)?n.get(t):null}:function(t){try{return n.get(t)}catch(t){return null}},u=s("$animator"),l=s("$animate");return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(n,s,u){return function(n,s,l){function c(){if(d&&(d.remove(),d=null),h&&(h.$destroy(),h=null),f){var t=f.data("$uiViewAnim");y.leave(f,function(){t.$$animLeave.resolve(),d=null}),d=f,f=null}}function p(a){var p,d=S(n,l,s,i),b=d&&t.$current&&t.$current.locals[d];if(a||b!==g){p=n.$new(),g=t.$current.locals[d],p.$emit("$viewContentLoading",d);var w=u(p,function(t){var i=o.defer(),a=o.defer(),u={$animEnter:i.promise,$animLeave:a.promise,$$animLeave:a};t.data("$uiViewAnim",u),y.enter(t,s,function(){i.resolve(),h&&h.$emit("$viewContentAnimationEnded"),(e.isDefined(v)&&!v||n.$eval(v))&&r(t)}),c()});f=w,(h=p).$emit("$viewContentLoaded",d),h.$eval(m)}}var d,f,h,g,m=l.onload||"",v=l.autoscroll,y=a(l,n);s.inheritedData("$uiView");n.$on("$stateChangeSuccess",function(){p(!1)}),p(!0)}}}}function T(t,n,r,i){return{restrict:"ECA",priority:-400,compile:function(o){var a=o.html();return o.empty?o.empty():o[0].innerHTML=null,function(o,s,u){var l=r.$current,c=S(o,u,s,i),p=l&&l.locals[c];if(!p)return s.html(a),void t(s.contents())(o);s.data("$uiView",{name:c,state:p.$$state}),s.html(p.$template?p.$template:a);var d=e.extend({},p);o[p.$$resolveAs]=d;var f=t(s.contents());if(p.$$controller){p.$scope=o,p.$element=s;var h=n(p.$$controller,p);p.$$controllerAs&&(o[p.$$controllerAs]=h,o[p.$$controllerAs][p.$$resolveAs]=d),N(h.$onInit)&&h.$onInit(),s.data("$ngControllerController",h),s.children().data("$ngControllerController",h)}f(o)}}}}function S(t,e,n,r){var i=r(e.uiView||e.name||"")(t),o=n.inheritedData("$uiView");return i.indexOf("@")>=0?i:i+"@"+(o?o.state.name:"")}function E(t,e){var n,r=t.match(/^\s*({[^}]*})\s*$/);if(r&&(t=e+"("+r[1]+")"),!(n=t.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/))||4!==n.length)throw new Error("Invalid state ref '"+t+"'");return{state:n[1],paramExpr:n[3]||null}}function D(t){var e=t.parent().inheritedData("$uiView");if(e&&e.state&&e.state.name)return e.state}function A(t){var e="[object SVGAnimatedString]"===Object.prototype.toString.call(t.prop("href")),n="FORM"===t[0].nodeName;return{attr:n?"action":e?"xlink:href":"href",isAnchor:"A"===t.prop("tagName").toUpperCase(),clickable:!n}}function B(t,e,n,r,i){return function(o){var a=o.which||o.button,s=i();if(!(a>1||o.ctrlKey||o.metaKey||o.shiftKey||t.attr("target"))){var u=n(function(){e.go(s.state,s.params,s.options)});o.preventDefault();var l=r.isAnchor&&!s.href?1:0;o.preventDefault=function(){l--<=0&&n.cancel(u)}}}}function I(t,e){return{relative:D(t)||e.$current,inherit:!0}}function O(t,n){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(r,i,o,a){var s,u=E(o.uiSref,t.current.name),l={state:u.state,href:null,params:null},c=A(i),p=a[1]||a[0],d=null;l.options=V(I(i,t),o.uiSrefOpts?r.$eval(o.uiSrefOpts):{});var f=function(n){n&&(l.params=e.copy(n)),l.href=t.href(u.state,l.params,l.options),d&&d(),p&&(d=p.$$addStateInfo(u.state,l.params)),null!==l.href&&o.$set(c.attr,l.href)};u.paramExpr&&(r.$watch(u.paramExpr,function(t){t!==l.params&&f(t)},!0),l.params=e.copy(r.$eval(u.paramExpr))),f(),c.clickable&&(s=B(i,t,n,c,function(){return l}),i[i.on?"on":"bind"]("click",s),r.$on("$destroy",function(){i[i.off?"off":"unbind"]("click",s)}))}}}function M(t,e){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(n,r,i,o){function a(e){p.state=e[0],p.params=e[1],p.options=e[2],p.href=t.href(p.state,p.params,p.options),d&&d(),l&&(d=l.$$addStateInfo(p.state,p.params)),p.href&&i.$set(u.attr,p.href)}var s,u=A(r),l=o[1]||o[0],c="["+[i.uiState,i.uiStateParams||null,i.uiStateOpts||null].map(function(t){return t||"null"}).join(", ")+"]",p={state:null,params:null,options:null,href:null},d=null;n.$watch(c,a,!0),a(n.$eval(c)),u.clickable&&(s=B(r,t,e,u,function(){return p}),r[r.on?"on":"bind"]("click",s),n.$on("$destroy",function(){r[r.off?"off":"unbind"]("click",s)}))}}}function P(t,e,n){return{restrict:"A",controller:["$scope","$element","$attrs","$timeout",function(e,r,i,o){function a(e,n,i){var o=t.get(e,D(r)),a=s(e,n),u={state:o||{name:e},params:n,hash:a};return g.push(u),m[a]=i,function(){var t=g.indexOf(u);-1!==t&&g.splice(t,1)}}function s(t,n){if(!U(t))throw new Error("state should be a string");return q(n)?t+H(n):(n=e.$eval(n),q(n)?t+H(n):t)}function u(){for(var t=0;t<g.length;t++)p(g[t].state,g[t].params)?l(r,m[g[t].hash]):c(r,m[g[t].hash]),d(g[t].state,g[t].params)?l(r,f):c(r,f)}function l(t,e){o(function(){t.addClass(e)})}function c(t,e){t.removeClass(e)}function p(e,n){return t.includes(e.name,n)}function d(e,n){return t.is(e.name,n)}var f,h,g=[],m={};f=n(i.uiSrefActiveEq||"",!1)(e);try{h=e.$eval(i.uiSrefActive)}catch(t){}h=h||n(i.uiSrefActive||"",!1)(e),q(h)&&F(h,function(n,r){if(U(n)){var i=E(n,t.current.name);a(i.state,e.$eval(i.paramExpr),r)}}),this.$$addStateInfo=function(t,e){if(!(q(h)&&g.length>0)){var n=a(t,e,h);return u(),n}},e.$on("$stateChangeSuccess",u),u()}]}}function _(t){var e=function(e,n){return t.is(e,n)};return e.$stateful=!0,e}function R(t){var e=function(e,n,r){return t.includes(e,n,r)};return e.$stateful=!0,e}var L=e.isDefined,N=e.isFunction,U=e.isString,q=e.isObject,j=e.isArray,F=e.forEach,V=e.extend,z=e.copy,H=e.toJson;e.module("ui.router.util",["ng"]),e.module("ui.router.router",["ui.router.util"]),e.module("ui.router.state",["ui.router.router","ui.router.util"]),e.module("ui.router",["ui.router.state"]),e.module("ui.router.compat",["ui.router"]),m.$inject=["$q","$injector"],e.module("ui.router.util").service("$resolve",m),e.module("ui.router.util").provider("$templateFactory",function(){var t=e.version.minor<3;this.shouldUnsafelyUseHttp=function(e){t=!!e},this.$get=["$http","$templateCache","$injector",function(e,n,r){return new v(e,n,r,t)}]});var K;y.prototype.concat=function(t,e){var n={caseInsensitive:K.caseInsensitive(),strict:K.strictMode(),squash:K.defaultSquashPolicy()};return new y(this.sourcePath+t+this.sourceSearch,V(n,e),this)},y.prototype.toString=function(){return this.source},y.prototype.exec=function(t,e){var n=this.regexp.exec(t);if(!n)return null;e=e||{};var r,i,o,a=this.parameters(),s=a.length,u=this.segments.length-1,l={};if(u!==n.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");var c,p;for(r=0;r<u;r++){for(o=a[r],c=this.params[o],p=n[r+1],i=0;i<c.replace.length;i++)c.replace[i].from===p&&(p=c.replace[i].to);p&&!0===c.array&&(p=function(t){function e(t){return t.split("").reverse().join("")}return h(h(e(t).split(/-(?!\\)/),e),function(t){return t.replace(/\\-/g,"-")}).reverse()}(p)),L(p)&&(p=c.type.decode(p)),l[o]=c.value(p)}for(;r<s;r++){for(l[o=a[r]]=this.params[o].value(e[o]),c=this.params[o],p=e[o],i=0;i<c.replace.length;i++)c.replace[i].from===p&&(p=c.replace[i].to);L(p)&&(p=c.type.decode(p)),l[o]=c.value(p)}return l},y.prototype.parameters=function(t){return L(t)?this.params[t]||null:this.$$paramNames},y.prototype.validates=function(t){return this.params.$$validates(t)},y.prototype.format=function(t){t=t||{};var e=this.segments,n=this.parameters(),r=this.params;if(!this.validates(t))return null;var i,o=!1,a=e.length-1,s=n.length,u=e[0];for(i=0;i<s;i++){var l=i<a,c=n[i],p=r[c],d=p.value(t[c]),f=p.isOptional&&p.type.equals(p.value(),d),g=!!f&&p.squash,m=p.type.encode(d);if(l){var v=e[i+1],y=i+1===a;if(!1===g)null!=m&&(j(m)?u+=h(m,function(t){return encodeURIComponent(t).replace(/-/g,function(t){return"%5C%"+t.charCodeAt(0).toString(16).toUpperCase()})}).join("-"):u+=encodeURIComponent(m)),u+=v;else if(!0===g){var b=u.match(/\/$/)?/\/?(.*)/:/(.*)/;u+=v.match(b)[1]}else U(g)&&(u+=g+v);y&&!0===p.squash&&"/"===u.slice(-1)&&(u=u.slice(0,-1))}else{if(null==m||f&&!1!==g)continue;if(j(m)||(m=[m]),0===m.length)continue;m=h(m,encodeURIComponent).join("&"+c+"="),u+=(o?"&":"?")+c+"="+m,o=!0}}return u},b.prototype.is=function(t,e){return!0},b.prototype.encode=function(t,e){return t},b.prototype.decode=function(t,e){return t},b.prototype.equals=function(t,e){return t==e},b.prototype.$subPattern=function(){var t=this.pattern.toString();return t.substr(1,t.length-2)},b.prototype.pattern=/.*/,b.prototype.toString=function(){return"{Type:"+this.name+"}"},b.prototype.$normalize=function(t){return this.is(t)?t:this.decode(t)},b.prototype.$asArray=function(t,e){if(!t)return this;if("auto"===t&&!e)throw new Error("'auto' array mode is for query parameters only");return new function(t,e){function r(t,e){return function(){return t[e].apply(t,arguments)}}function i(t){return j(t)?t:L(t)?[t]:[]}function o(t){switch(t.length){case 0:return n;case 1:return"auto"===e?t[0]:t;default:return t}}function a(t){return!t}function s(t,e){return function(n){if(j(n)&&0===n.length)return n;var r=h(n=i(n),t);return!0===e?0===f(r,a).length:o(r)}}this.encode=s(r(t,"encode")),this.decode=s(r(t,"decode")),this.is=s(r(t,"is"),!0),this.equals=function(t){return function(e,n){var r=i(e),o=i(n);if(r.length!==o.length)return!1;for(var a=0;a<r.length;a++)if(!t(r[a],o[a]))return!1;return!0}}(r(t,"equals")),this.pattern=t.pattern,this.$normalize=s(r(t,"$normalize")),this.name=t.name,this.$arrayMode=e}(this,t)},e.module("ui.router.util").provider("$urlMatcherFactory",w),e.module("ui.router.util").run(["$urlMatcherFactory",function(t){}]),$.$inject=["$locationProvider","$urlMatcherFactoryProvider"],e.module("ui.router.router").provider("$urlRouter",$),k.$inject=["$urlRouterProvider","$urlMatcherFactoryProvider"],e.module("ui.router.state").factory("$stateParams",function(){return{}}).constant("$state.runtime",{autoinject:!0}).provider("$state",k).run(["$injector",function(t){t.get("$state.runtime").autoinject&&t.get("$state")}]),C.$inject=[],e.module("ui.router.state").provider("$view",C),e.module("ui.router.state").provider("$uiViewScroll",function(){var t=!1;this.useAnchorScroll=function(){t=!0},this.$get=["$anchorScroll","$timeout",function(e,n){return t?e:function(t){return n(function(){t[0].scrollIntoView()},0,!1)}}]}),x.$inject=["$state","$injector","$uiViewScroll","$interpolate","$q"],T.$inject=["$compile","$controller","$state","$interpolate"],e.module("ui.router.state").directive("uiView",x),e.module("ui.router.state").directive("uiView",T),O.$inject=["$state","$timeout"],M.$inject=["$state","$timeout"],P.$inject=["$state","$stateParams","$interpolate"],e.module("ui.router.state").directive("uiSref",O).directive("uiSrefActive",P).directive("uiSrefActiveEq",P).directive("uiState",M),_.$inject=["$state"],R.$inject=["$state"],e.module("ui.router.state").filter("isState",_).filter("includedByState",R)}(window,window.angular),function(t,e,n){"use strict";e.module("angulartics.google.analytics",["angulartics"]).config(["$analyticsProvider",function(n){function r(){var e=t.GoogleAnalyticsObject;return e&&t[e]}function i(){return!e.isUndefined(t._gaq)}function o(t){var e,n={};for(e in t)e.indexOf("dimension")&&e.indexOf("metric")||(n[e]=t[e]);return n}n.settings.pageTracking.trackRelativePath=!0,n.settings.ga={additionalAccountNames:void 0,additionalAccountHitTypes:{pageview:!0,event:!0,exception:!1,ecommerce:!1,userTiming:!1,setUserProperties:!1,userId:!1},disableEventTracking:null,disablePageTracking:null,enhancedEcommerce:!1,transport:null,userId:null},n.registerPageTrack(function(t,r){r=r||{},n.settings.ga.disablePageTracking||a("pageview","send",e.extend({},r,{hitType:"pageview",page:t}))}),n.registerEventTrack(function(r,i){if(!n.settings.ga.disableEventTracking&&(r||r+""=="0")){if(i=i||{},i.category=i.category||"Event",i.value){var o=parseInt(i.value,10);i.value=isNaN(o)?0:o}e.isFunction(i.hitCallback)||(i.hitCallback=null),i.nonInteraction=i.nonInteraction||i.noninteraction,a("event","send",e.extend({},i,{hitType:"event",eventCategory:i.category,eventAction:r,eventLabel:i.label,eventValue:i.value,nonInteraction:i.nonInteraction,page:i.page||t.location.hash.substring(1)||t.location.pathname,hitCallback:i.hitCallback}))}}),n.registerExceptionTrack(function(e,n){a("exception","send",{hitType:"event",eventCategory:"Exceptions",eventAction:e.toString(),eventLabel:e.stack,nonInteraction:!0,page:t.location.hash.substring(1)||t.location.pathname,isException:!0})}),n.registerSetUsername(function(t){n.settings.ga.userId=t}),n.registerSetUserProperties(function(t){t&&a("setUserProperties","set",o(t))}),n.registerUserTimings(function(n){if(!e.isObject(n)||e.isArray(n))return console.log("Required argument properties is missing or not an object");e.forEach(["timingCategory","timingVar","timingValue"],function(t){if(e.isUndefined(n[t]))return console.log("Argument properties missing required property "+t)}),a("userTiming","send",{hitType:"timing",timingCategory:n.timingCategory,timingVar:n.timingVar,timingValue:n.timingValue,timingLabel:n.timingLabel,optSampleRate:n.optSampleRate,page:n.page||t.location.hash.substring(1)||t.location.pathname})}),n.registerTransactionTrack(function(t){var n,r;if(a("ecommerce","require","ecommerce"),a("ecommerce","ecommerce:addTransaction",t),t.products)for(r=0;r<t.products.length;r++)(n=t.products[r]).sku=n.id,n.id=t.id,a("ecommerce","ecommerce:addItem",t.products[r]);t.currencyCode&&a("ecommerce","_set",t.currencyCode),a("ecommerce","ecommerce:send",e.copy(t))});var a=function(){function o(r,i){var o,a=n.settings.ga.userId,s=t.GoogleAnalyticsObject;t[s].apply(this,r),i&&(o=e.copy(r),a&&!n.settings.ga.additionalAccountHitTypes.userId&&o[2]&&"object"==typeof o[2]&&delete o[2].userId,e.forEach(n.settings.ga.additionalAccountNames,function(e){o[0]=e+"."+o[0],t[s].apply(this,o)}))}var a;return i()&&(a=function(r,i,o){if("set"===r)return console.log('Classic Analytics does not support the "set" command or Custom Dimensions. Command ignored.');var a;if("send"===r)switch(i.hitType){case"pageview":a=["_trackPageview",i.page];break;case"event":a=["_trackEvent",i.category,i.action,i.label,i.value,i.nonInteraction];break;case"timing":a=["_trackTiming",i.timingCategory,i.timingVar,i.timingValue,i.timingLabel,i.optSampleRate]}if("ecommerce:addTransaction"===r&&(a=["_addTrans",i.id,i.affiliation,i.revenue,i.tax,i.shipping,i.billingCity,i.billingRegion,i.billingCountry]),"ecommerce:addItem"===r&&(a=["_addItem",i.id,i.sku,i.name,i.category,i.price,i.quantity]),"_set"===r&&(a=["_set","currencyCode",i]),"ecommerce:send"===r&&(a=["_trackTrans"]),!a)return console.log("Unable to find command "+r+" or fieldsObj missing required properties. Command ignored.");t._gaq.push(a),o&&e.forEach(n.settings.ga.additionalAccountNames,function(e){var n=[].slice.call(a);n[0]=e+"."+n[0],t._gaq.push(n)})}),r()&&(a=function(t,r,i){var a,s=n.settings.ga.userId;if("require"===t&&"ecommerce"===r)return a=r,n.settings.ga.enhancedEcommerce&&(a="ec"),o([t,a],i);if(s&&e.isObject(r)&&(r.userId=s),n.settings.ga.transport&&(r.transport=n.settings.ga.transport),t.indexOf("ecommerce:")>-1&&n.settings.ga.enhancedEcommerce)switch(t){case"ecommerce:addTransaction":t=["ec:setAction","purchase"];break;case"ecommerce:addItem":t="ec:addProduct",r.id=r.sku;break;case"ecommerce:send":t="send",r.hitType="event",r.eventCategory="Angulartics Enhanced Ecommerce",r.eventAction="Purchase",r.nonInteraction=!0}o(t instanceof Array?t.concat(r):[t,r],i)}),a?function(t,e,r){var i=n.settings.ga.additionalAccountHitTypes[t];a(e,r,i)}:e.noop}()}])}(window,window.angular),function(t,e){if("function"==typeof define&&define.amd)define([],e);else if("object"==typeof module&&module.exports)module.exports=e();else{var n=e();n._onReady(n.init),t.Duo=n}}(this,function(){function t(t,e){throw new Error("Duo Web SDK error: "+t+(e?"\nSee "+e+" for more information":""))}function e(t){return t.replace(/([a-z])([A-Z])/,"$1-$2").toLowerCase()}function n(t,n){return"dataset"in t?t.dataset[n]:t.getAttribute("data-"+e(n))}function r(t,e,n,r){"addEventListener"in window?t.addEventListener(e,r,!1):t.attachEvent(n,r)}function i(t,e,n,r){"removeEventListener"in window?t.removeEventListener(e,r,!1):t.detachEvent(n,r)}function o(t){r(document,"DOMContentLoaded","onreadystatechange",t)}function a(t){i(document,"DOMContentLoaded","onreadystatechange",t)}function s(t){r(window,"message","onmessage",t)}function u(t){i(window,"message","onmessage",t)}function l(e){if(e){0===e.indexOf("ERR|")&&t(e.split("|")[1]),-1!==e.indexOf(":")&&2===e.split(":").length||t("Duo was given a bad token. This might indicate a configuration problem with one of Duo's client libraries.","https://www.duosecurity.com/docs/duoweb#first-steps");var n=e.split(":");return y=e,b=n[0],w=n[1],{sigRequest:e,duoSig:n[0],appSig:n[1]}}}function c(){if(!($=document.getElementById(E)))throw new Error('This page does not contain an iframe for Duo to use.Add an element like <iframe id="duo_iframe"></iframe> to this page. See https://www.duosecurity.com/docs/duoweb#3.-show-the-iframe for more information.');g(),a(c)}function p(t){return Boolean(t.origin==="https://"+v&&"string"==typeof t.data&&(t.data.match(C)||t.data.match(x)||t.data.match(T)))}function d(t){t&&(t.host&&(v=t.host),t.sig_request&&l(t.sig_request),t.post_action&&(D=t.post_action),t.post_argument&&(A=t.post_argument),t.iframe&&(t.iframe.tagName?$=t.iframe:"string"==typeof t.iframe&&(E=t.iframe)),"function"==typeof t.submit_callback&&(k=t.submit_callback)),($=document.getElementById(E))?g():o(c),a(d)}function f(t){if(p(t))if(t.data.match(T)){var e=t.data.substring("DUO_OPEN_WINDOW|".length);h(e)&&window.open(e,"_self")}else m(t.data),u(f)}function h(t){if(!t)return!1;var e=document.createElement("a");if(e.href=t,"duotrustedendpoints:"===e.protocol)return!0;if("https:"!==e.protocol)return!1;for(var n=0;n<S.length;n++)if(e.hostname.endsWith("."+S[n])||e.hostname===S[n])return!0;return!1}function g(){v||(v=n($,"host"))||t("No API hostname is given for Duo to use. Be sure to pass a `host` parameter to Duo.init, or through the `data-host` attribute on the iframe element.","https://www.duosecurity.com/docs/duoweb#3.-show-the-iframe"),b&&w||(l(n($,"sigRequest")),b&&w||t("No valid signed request is given. Be sure to give the `sig_request` parameter to Duo.init, or use the `data-sig-request` attribute on the iframe element.","https://www.duosecurity.com/docs/duoweb#3.-show-the-iframe")),""===D&&(D=n($,"postAction")||D),"sig_response"===A&&(A=n($,"postArgument")||A),$.src=["https://",v,"/frame/web/v1/auth?tx=",b,"&parent=",encodeURIComponent(document.location.href),"&v=2.6"].join(""),s(f)}function m(t){var e=document.createElement("input");e.type="hidden",e.name=A,e.value=t+":"+w;var n=document.getElementById("duo_form");n||(n=document.createElement("form"),$.parentElement.insertBefore(n,$.nextSibling)),n.method="POST",n.action=D,n.appendChild(e),"function"==typeof k?k.call(null,n):n.submit()}var v,y,b,w,$,k,C=/^(?:AUTH|ENROLL)+\|[A-Za-z0-9\+\/=]+\|[A-Za-z0-9\+\/=]+$/,x=/^ERR\|[\w\s\.\(\)]+$/,T=/^DUO_OPEN_WINDOW\|/,S=["duo.com","duosecurity.com","duomobile.s3-us-west-1.amazonaws.com"],E="duo_iframe",D="",A="sig_response";return{init:d,_onReady:o,_parseSigRequest:l,_isDuoMessage:p,_doPostBack:m}}),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Clipboard=t()}}(function(){return function t(e,n,r){function i(a,s){if(!n[a]){if(!e[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return i(n||t)},c,c.exports,t,e,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(t,e,n){var r=9;if("undefined"!=typeof Element&&!Element.prototype.matches){var i=Element.prototype;i.matches=i.matchesSelector||i.mozMatchesSelector||i.msMatchesSelector||i.oMatchesSelector||i.webkitMatchesSelector}e.exports=function(t,e){for(;t&&t.nodeType!==r;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}},{}],2:[function(t,e,n){function r(t,e,n,r){return function(n){n.delegateTarget=i(n.target,e),n.delegateTarget&&r.call(t,n)}}var i=t("./closest");e.exports=function(t,e,n,i,o){var a=r.apply(this,arguments);return t.addEventListener(n,a,o),{destroy:function(){t.removeEventListener(n,a,o)}}}},{"./closest":1}],3:[function(t,e,n){n.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},n.nodeList=function(t){var e=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"in t&&(0===t.length||n.node(t[0]))},n.string=function(t){return"string"==typeof t||t instanceof String},n.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},{}],4:[function(t,e,n){function r(t,e,n){return t.addEventListener(e,n),{destroy:function(){t.removeEventListener(e,n)}}}function i(t,e,n){return Array.prototype.forEach.call(t,function(t){t.addEventListener(e,n)}),{destroy:function(){Array.prototype.forEach.call(t,function(t){t.removeEventListener(e,n)})}}}function o(t,e,n){return s(document.body,t,e,n)}var a=t("./is"),s=t("delegate");e.exports=function(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!a.string(e))throw new TypeError("Second argument must be a String");if(!a.fn(n))throw new TypeError("Third argument must be a Function");if(a.node(t))return r(t,e,n);if(a.nodeList(t))return i(t,e,n);if(a.string(t))return o(t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},{"./is":3,delegate:2}],5:[function(t,e,n){e.exports=function(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var r=window.getSelection(),i=document.createRange();i.selectNodeContents(t),r.removeAllRanges(),r.addRange(i),e=r.toString()}return e}},{}],6:[function(t,e,n){function r(){}r.prototype={on:function(t,e,n){var r=this.e||(this.e={});return(r[t]||(r[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){function r(){i.off(t,r),e.apply(n,arguments)}var i=this;return r._=e,this.on(t,r,n)},emit:function(t){var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),r=0,i=n.length;for(r;r<i;r++)n[r].fn.apply(n[r].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),r=n[t],i=[];if(r&&e)for(var o=0,a=r.length;o<a;o++)r[o].fn!==e&&r[o].fn._!==e&&i.push(r[o]);return i.length?n[t]=i:delete n[t],this}},e.exports=r},{}],7:[function(t,e,n){!function(r,i){if(void 0!==n)i(e,t("select"));else{var o={exports:{}};i(o,r.select),r.clipboardAction=o.exports}}(this,function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var r=function(t){return t&&t.__esModule?t:{default:t}}(e),i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=function(){function t(e){n(this,t),this.resolveOptions(e),this.initSelection()}return o(t,[{key:"resolveOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,r.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,r.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":i(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),t}();t.exports=a})},{select:5}],8:[function(t,e,n){!function(r,i){if(void 0!==n)i(e,t("./clipboard-action"),t("tiny-emitter"),t("good-listener"));else{var o={exports:{}};i(o,r.clipboardAction,r.tinyEmitter,r.goodListener),r.clipboard=o.exports}}(this,function(t,e,n,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function u(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}var l=i(e),c=i(n),p=i(r),d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),h=function(t){function e(t,n){o(this,e);var r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.resolveOptions(n),r.listenClick(t),r}return s(e,c.default),f(e,[{key:"resolveOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===d(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,p.default)(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new l.default({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return u("action",t)}},{key:"defaultTarget",value:function(t){var e=u("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return u("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach(function(t){n=n&&!!document.queryCommandSupported(t)}),n}}]),e}();t.exports=h})},{"./clipboard-action":7,"good-listener":4,"tiny-emitter":6}]},{},[8])(8)}),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.forge=e():t.forge=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=10)}([function(t,e){t.exports={options:{usePureJavaScript:!1}}},function(t,e,n){function r(t){if(8!==t&&16!==t&&24!==t&&32!==t)throw new Error("Only 8, 16, 24, or 32 bits supported: "+t)}function i(t){if(this.data="",this.read=0,"string"==typeof t)this.data=t;else if(a.isArrayBuffer(t)||a.isArrayBufferView(t)){var e=new Uint8Array(t);try{this.data=String.fromCharCode.apply(null,e)}catch(t){for(var n=0;n<e.length;++n)this.putByte(e[n])}}else(t instanceof i||"object"==typeof t&&"string"==typeof t.data&&"number"==typeof t.read)&&(this.data=t.data,this.read=t.read);this._constructedStringLength=0}var o=n(0),a=t.exports=o.util=o.util||{};!function(){if("undefined"!=typeof process&&process.nextTick)return a.nextTick=process.nextTick,void("function"==typeof setImmediate?a.setImmediate=setImmediate:a.setImmediate=a.nextTick);if("function"==typeof setImmediate)return a.setImmediate=function(){return setImmediate.apply(void 0,arguments)},void(a.nextTick=function(t){return setImmediate(t)});if(a.setImmediate=function(t){setTimeout(t,0)},"undefined"!=typeof window&&"function"==typeof window.postMessage){var t="forge.setImmediate",e=[];a.setImmediate=function(n){e.push(n),1===e.length&&window.postMessage(t,"*")},window.addEventListener("message",function(n){if(n.source===window&&n.data===t){n.stopPropagation();var r=e.slice();e.length=0,r.forEach(function(t){t()})}},!0)}if("undefined"!=typeof MutationObserver){var n=Date.now(),r=!0,i=document.createElement("div"),e=[];new MutationObserver(function(){var t=e.slice();e.length=0,t.forEach(function(t){t()})}).observe(i,{attributes:!0});var o=a.setImmediate;a.setImmediate=function(t){Date.now()-n>15?(n=Date.now(),o(t)):(e.push(t),1===e.length&&i.setAttribute("a",r=!r))}}a.nextTick=a.setImmediate}(),a.isNodejs="undefined"!=typeof process&&process.versions&&process.versions.node,a.isArray=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},a.isArrayBuffer=function(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer},a.isArrayBufferView=function(t){return t&&a.isArrayBuffer(t.buffer)&&void 0!==t.byteLength},a.ByteBuffer=i,a.ByteStringBuffer=i;a.ByteStringBuffer.prototype._optimizeConstructedString=function(t){this._constructedStringLength+=t,this._constructedStringLength>4096&&(this.data.substr(0,1),this._constructedStringLength=0)},a.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},a.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},a.ByteStringBuffer.prototype.putByte=function(t){return this.putBytes(String.fromCharCode(t))},a.ByteStringBuffer.prototype.fillWithByte=function(t,e){t=String.fromCharCode(t);for(var n=this.data;e>0;)1&e&&(n+=t),(e>>>=1)>0&&(t+=t);return this.data=n,this._optimizeConstructedString(e),this},a.ByteStringBuffer.prototype.putBytes=function(t){return this.data+=t,this._optimizeConstructedString(t.length),this},a.ByteStringBuffer.prototype.putString=function(t){return this.putBytes(a.encodeUtf8(t))},a.ByteStringBuffer.prototype.putInt16=function(t){return this.putBytes(String.fromCharCode(t>>8&255)+String.fromCharCode(255&t))},a.ByteStringBuffer.prototype.putInt24=function(t){return this.putBytes(String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(255&t))},a.ByteStringBuffer.prototype.putInt32=function(t){return this.putBytes(String.fromCharCode(t>>24&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(255&t))},a.ByteStringBuffer.prototype.putInt16Le=function(t){return this.putBytes(String.fromCharCode(255&t)+String.fromCharCode(t>>8&255))},a.ByteStringBuffer.prototype.putInt24Le=function(t){return this.putBytes(String.fromCharCode(255&t)+String.fromCharCode(t>>8&255)+String.fromCharCode(t>>16&255))},a.ByteStringBuffer.prototype.putInt32Le=function(t){return this.putBytes(String.fromCharCode(255&t)+String.fromCharCode(t>>8&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>24&255))},a.ByteStringBuffer.prototype.putInt=function(t,e){r(e);var n="";do{e-=8,n+=String.fromCharCode(t>>e&255)}while(e>0);return this.putBytes(n)},a.ByteStringBuffer.prototype.putSignedInt=function(t,e){return t<0&&(t+=2<<e-1),this.putInt(t,e)},a.ByteStringBuffer.prototype.putBuffer=function(t){return this.putBytes(t.getBytes())},a.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)},a.ByteStringBuffer.prototype.getInt16=function(){var t=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,t},a.ByteStringBuffer.prototype.getInt24=function(){var t=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,t},a.ByteStringBuffer.prototype.getInt32=function(){var t=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,t},a.ByteStringBuffer.prototype.getInt16Le=function(){var t=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,t},a.ByteStringBuffer.prototype.getInt24Le=function(){var t=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,t},a.ByteStringBuffer.prototype.getInt32Le=function(){var t=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,t},a.ByteStringBuffer.prototype.getInt=function(t){r(t);var e=0;do{e=(e<<8)+this.data.charCodeAt(this.read++),t-=8}while(t>0);return e},a.ByteStringBuffer.prototype.getSignedInt=function(t){var e=this.getInt(t),n=2<<t-2;return e>=n&&(e-=n<<1),e},a.ByteStringBuffer.prototype.getBytes=function(t){var e;return t?(t=Math.min(this.length(),t),e=this.data.slice(this.read,this.read+t),this.read+=t):0===t?e="":(e=0===this.read?this.data:this.data.slice(this.read),this.clear()),e},a.ByteStringBuffer.prototype.bytes=function(t){return void 0===t?this.data.slice(this.read):this.data.slice(this.read,this.read+t)},a.ByteStringBuffer.prototype.at=function(t){return this.data.charCodeAt(this.read+t)},a.ByteStringBuffer.prototype.setAt=function(t,e){return this.data=this.data.substr(0,this.read+t)+String.fromCharCode(e)+this.data.substr(this.read+t+1),this},a.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},a.ByteStringBuffer.prototype.copy=function(){var t=a.createBuffer(this.data);return t.read=this.read,t},a.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},a.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},a.ByteStringBuffer.prototype.truncate=function(t){var e=Math.max(0,this.length()-t);return this.data=this.data.substr(this.read,e),this.read=0,this},a.ByteStringBuffer.prototype.toHex=function(){for(var t="",e=this.read;e<this.data.length;++e){var n=this.data.charCodeAt(e);n<16&&(t+="0"),t+=n.toString(16)}return t},a.ByteStringBuffer.prototype.toString=function(){return a.decodeUtf8(this.bytes())},a.DataBuffer=function(t,e){e=e||{},this.read=e.readOffset||0,this.growSize=e.growSize||1024;var n=a.isArrayBuffer(t),r=a.isArrayBufferView(t);if(n||r)return this.data=n?new DataView(t):new DataView(t.buffer,t.byteOffset,t.byteLength),void(this.write="writeOffset"in e?e.writeOffset:this.data.byteLength);this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==t&&void 0!==t&&this.putBytes(t),"writeOffset"in e&&(this.write=e.writeOffset)},a.DataBuffer.prototype.length=function(){return this.write-this.read},a.DataBuffer.prototype.isEmpty=function(){return this.length()<=0},a.DataBuffer.prototype.accommodate=function(t,e){if(this.length()>=t)return this;e=Math.max(e||this.growSize,t);var n=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),r=new Uint8Array(this.length()+e);return r.set(n),this.data=new DataView(r.buffer),this},a.DataBuffer.prototype.putByte=function(t){return this.accommodate(1),this.data.setUint8(this.write++,t),this},a.DataBuffer.prototype.fillWithByte=function(t,e){this.accommodate(e);for(var n=0;n<e;++n)this.data.setUint8(t);return this},a.DataBuffer.prototype.putBytes=function(t,e){if(a.isArrayBufferView(t)){var n=(r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)).byteLength-r.byteOffset;return this.accommodate(n),(i=new Uint8Array(this.data.buffer,this.write)).set(r),this.write+=n,this}if(a.isArrayBuffer(t)){r=new Uint8Array(t);return this.accommodate(r.byteLength),(i=new Uint8Array(this.data.buffer)).set(r,this.write),this.write+=r.byteLength,this}if(t instanceof a.DataBuffer||"object"==typeof t&&"number"==typeof t.read&&"number"==typeof t.write&&a.isArrayBufferView(t.data)){var r=new Uint8Array(t.data.byteLength,t.read,t.length());this.accommodate(r.byteLength);var i=new Uint8Array(t.data.byteLength,this.write);return i.set(r),this.write+=r.byteLength,this}if(t instanceof a.ByteStringBuffer&&(t=t.data,e="binary"),e=e||"binary","string"==typeof t){var o;if("hex"===e)return this.accommodate(Math.ceil(t.length/2)),o=new Uint8Array(this.data.buffer,this.write),this.write+=a.binary.hex.decode(t,o,this.write),this;if("base64"===e)return this.accommodate(3*Math.ceil(t.length/4)),o=new Uint8Array(this.data.buffer,this.write),this.write+=a.binary.base64.decode(t,o,this.write),this;if("utf8"===e&&(t=a.encodeUtf8(t),e="binary"),"binary"===e||"raw"===e)return this.accommodate(t.length),o=new Uint8Array(this.data.buffer,this.write),this.write+=a.binary.raw.decode(o),this;if("utf16"===e)return this.accommodate(2*t.length),o=new Uint16Array(this.data.buffer,this.write),this.write+=a.text.utf16.encode(o),this;throw new Error("Invalid encoding: "+e)}throw Error("Invalid parameter: "+t)},a.DataBuffer.prototype.putBuffer=function(t){return this.putBytes(t),t.clear(),this},a.DataBuffer.prototype.putString=function(t){return this.putBytes(t,"utf16")},a.DataBuffer.prototype.putInt16=function(t){return this.accommodate(2),this.data.setInt16(this.write,t),this.write+=2,this},a.DataBuffer.prototype.putInt24=function(t){return this.accommodate(3),this.data.setInt16(this.write,t>>8&65535),this.data.setInt8(this.write,t>>16&255),this.write+=3,this},a.DataBuffer.prototype.putInt32=function(t){return this.accommodate(4),this.data.setInt32(this.write,t),this.write+=4,this},a.DataBuffer.prototype.putInt16Le=function(t){return this.accommodate(2),this.data.setInt16(this.write,t,!0),this.write+=2,this},a.DataBuffer.prototype.putInt24Le=function(t){return this.accommodate(3),this.data.setInt8(this.write,t>>16&255),this.data.setInt16(this.write,t>>8&65535,!0),this.write+=3,this},a.DataBuffer.prototype.putInt32Le=function(t){return this.accommodate(4),this.data.setInt32(this.write,t,!0),this.write+=4,this},a.DataBuffer.prototype.putInt=function(t,e){r(e),this.accommodate(e/8);do{e-=8,this.data.setInt8(this.write++,t>>e&255)}while(e>0);return this},a.DataBuffer.prototype.putSignedInt=function(t,e){return r(e),this.accommodate(e/8),t<0&&(t+=2<<e-1),this.putInt(t,e)},a.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)},a.DataBuffer.prototype.getInt16=function(){var t=this.data.getInt16(this.read);return this.read+=2,t},a.DataBuffer.prototype.getInt24=function(){var t=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,t},a.DataBuffer.prototype.getInt32=function(){var t=this.data.getInt32(this.read);return this.read+=4,t},a.DataBuffer.prototype.getInt16Le=function(){var t=this.data.getInt16(this.read,!0);return this.read+=2,t},a.DataBuffer.prototype.getInt24Le=function(){var t=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,t},a.DataBuffer.prototype.getInt32Le=function(){var t=this.data.getInt32(this.read,!0);return this.read+=4,t},a.DataBuffer.prototype.getInt=function(t){r(t);var e=0;do{e=(e<<8)+this.data.getInt8(this.read++),t-=8}while(t>0);return e},a.DataBuffer.prototype.getSignedInt=function(t){var e=this.getInt(t),n=2<<t-2;return e>=n&&(e-=n<<1),e},a.DataBuffer.prototype.getBytes=function(t){var e;return t?(t=Math.min(this.length(),t),e=this.data.slice(this.read,this.read+t),this.read+=t):0===t?e="":(e=0===this.read?this.data:this.data.slice(this.read),this.clear()),e},a.DataBuffer.prototype.bytes=function(t){return void 0===t?this.data.slice(this.read):this.data.slice(this.read,this.read+t)},a.DataBuffer.prototype.at=function(t){return this.data.getUint8(this.read+t)},a.DataBuffer.prototype.setAt=function(t,e){return this.data.setUint8(t,e),this},a.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},a.DataBuffer.prototype.copy=function(){return new a.DataBuffer(this)},a.DataBuffer.prototype.compact=function(){if(this.read>0){var t=new Uint8Array(this.data.buffer,this.read),e=new Uint8Array(t.byteLength);e.set(t),this.data=new DataView(e),this.write-=this.read,this.read=0}return this},a.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},a.DataBuffer.prototype.truncate=function(t){return this.write=Math.max(0,this.length()-t),this.read=Math.min(this.read,this.write),this},a.DataBuffer.prototype.toHex=function(){for(var t="",e=this.read;e<this.data.byteLength;++e){var n=this.data.getUint8(e);n<16&&(t+="0"),t+=n.toString(16)}return t},a.DataBuffer.prototype.toString=function(t){var e=new Uint8Array(this.data,this.read,this.length());if("binary"===(t=t||"utf8")||"raw"===t)return a.binary.raw.encode(e);if("hex"===t)return a.binary.hex.encode(e);if("base64"===t)return a.binary.base64.encode(e);if("utf8"===t)return a.text.utf8.decode(e);if("utf16"===t)return a.text.utf16.decode(e);throw new Error("Invalid encoding: "+t)},a.createBuffer=function(t,e){return e=e||"raw",void 0!==t&&"utf8"===e&&(t=a.encodeUtf8(t)),new a.ByteBuffer(t)},a.fillString=function(t,e){for(var n="";e>0;)1&e&&(n+=t),(e>>>=1)>0&&(t+=t);return n},a.xorBytes=function(t,e,n){for(var r="",i="",o="",a=0,s=0;n>0;--n,++a)i=t.charCodeAt(a)^e.charCodeAt(a),s>=10&&(r+=o,o="",s=0),o+=String.fromCharCode(i),++s;return r+=o},a.hexToBytes=function(t){var e="",n=0;for(!0&t.length&&(n=1,e+=String.fromCharCode(parseInt(t[0],16)));n<t.length;n+=2)e+=String.fromCharCode(parseInt(t.substr(n,2),16));return e},a.bytesToHex=function(t){return a.createBuffer(t).toHex()},a.int32ToBytes=function(t){return String.fromCharCode(t>>24&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(255&t)};var s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];a.encode64=function(t,e){for(var n,r,i,o="",a="",u=0;u<t.length;)n=t.charCodeAt(u++),r=t.charCodeAt(u++),i=t.charCodeAt(u++),o+=s.charAt(n>>2),o+=s.charAt((3&n)<<4|r>>4),isNaN(r)?o+="==":(o+=s.charAt((15&r)<<2|i>>6),o+=isNaN(i)?"=":s.charAt(63&i)),e&&o.length>e&&(a+=o.substr(0,e)+"\r\n",o=o.substr(e));return a+=o},a.decode64=function(t){t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var e,n,r,i,o="",a=0;a<t.length;)e=u[t.charCodeAt(a++)-43],n=u[t.charCodeAt(a++)-43],r=u[t.charCodeAt(a++)-43],i=u[t.charCodeAt(a++)-43],o+=String.fromCharCode(e<<2|n>>4),64!==r&&(o+=String.fromCharCode((15&n)<<4|r>>2),64!==i&&(o+=String.fromCharCode((3&r)<<6|i)));return o},a.encodeUtf8=function(t){return unescape(encodeURIComponent(t))},a.decodeUtf8=function(t){return decodeURIComponent(escape(t))},a.binary={raw:{},hex:{},base64:{}},a.binary.raw.encode=function(t){return String.fromCharCode.apply(null,t)},a.binary.raw.decode=function(t,e,n){var r=e;r||(r=new Uint8Array(t.length));for(var i=n=n||0,o=0;o<t.length;++o)r[i++]=t.charCodeAt(o);return e?i-n:r},a.binary.hex.encode=a.bytesToHex,a.binary.hex.decode=function(t,e,n){var r=e;r||(r=new Uint8Array(Math.ceil(t.length/2)));var i=0,o=n=n||0;for(1&t.length&&(i=1,r[o++]=parseInt(t[0],16));i<t.length;i+=2)r[o++]=parseInt(t.substr(i,2),16);return e?o-n:r},a.binary.base64.encode=function(t,e){for(var n,r,i,o="",a="",u=0;u<t.byteLength;)n=t[u++],r=t[u++],i=t[u++],o+=s.charAt(n>>2),o+=s.charAt((3&n)<<4|r>>4),isNaN(r)?o+="==":(o+=s.charAt((15&r)<<2|i>>6),o+=isNaN(i)?"=":s.charAt(63&i)),e&&o.length>e&&(a+=o.substr(0,e)+"\r\n",o=o.substr(e));return a+=o},a.binary.base64.decode=function(t,e,n){var r=e;r||(r=new Uint8Array(3*Math.ceil(t.length/4))),t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var i,o,a,s,l=0,c=n=n||0;l<t.length;)i=u[t.charCodeAt(l++)-43],o=u[t.charCodeAt(l++)-43],a=u[t.charCodeAt(l++)-43],s=u[t.charCodeAt(l++)-43],r[c++]=i<<2|o>>4,64!==a&&(r[c++]=(15&o)<<4|a>>2,64!==s&&(r[c++]=(3&a)<<6|s));return e?c-n:r.subarray(0,c)},a.text={utf8:{},utf16:{}},a.text.utf8.encode=function(t,e,n){t=a.encodeUtf8(t);var r=e;r||(r=new Uint8Array(t.length));for(var i=n=n||0,o=0;o<t.length;++o)r[i++]=t.charCodeAt(o);return e?i-n:r},a.text.utf8.decode=function(t){return a.decodeUtf8(String.fromCharCode.apply(null,t))},a.text.utf16.encode=function(t,e,n){var r=e;r||(r=new Uint8Array(2*t.length));for(var i=new Uint16Array(r.buffer),o=n=n||0,a=n,s=0;s<t.length;++s)i[a++]=t.charCodeAt(s),o+=2;return e?o-n:r},a.text.utf16.decode=function(t){return String.fromCharCode.apply(null,new Uint16Array(t.buffer))},a.deflate=function(t,e,n){if(e=a.decode64(t.deflate(a.encode64(e)).rval),n){var r=2;32&e.charCodeAt(1)&&(r=6),e=e.substring(r,e.length-4)}return e},a.inflate=function(t,e,n){var r=t.inflate(a.encode64(e)).rval;return null===r?null:a.decode64(r)};var l=function(t,e,n){if(!t)throw new Error("WebStorage not available.");var r;if(null===n?r=t.removeItem(e):(n=a.encode64(JSON.stringify(n)),r=t.setItem(e,n)),void 0!==r&&!0!==r.rval){var i=new Error(r.error.message);throw i.id=r.error.id,i.name=r.error.name,i}},c=function(t,e){if(!t)throw new Error("WebStorage not available.");var n=t.getItem(e);if(t.init)if(null===n.rval){if(n.error){var r=new Error(n.error.message);throw r.id=n.error.id,r.name=n.error.name,r}n=null}else n=n.rval;return null!==n&&(n=JSON.parse(a.decode64(n))),n},p=function(t,e,n,r){var i=c(t,e);null===i&&(i={}),i[n]=r,l(t,e,i)},d=function(t,e,n){var r=c(t,e);return null!==r&&(r=n in r?r[n]:null),r},f=function(t,e,n){var r=c(t,e);if(null!==r&&n in r){delete r[n];var i=!0;for(var o in r){i=!1;break}i&&(r=null),l(t,e,r)}},h=function(t,e){l(t,e,null)},g=function(t,e,n){var r=null;void 0===n&&(n=["web","flash"]);var i,o=!1,a=null;for(var s in n){i=n[s];try{if("flash"===i||"both"===i){if(null===e[0])throw new Error("Flash local storage not available.");r=t.apply(this,e),o="flash"===i}"web"!==i&&"both"!==i||(e[0]=localStorage,r=t.apply(this,e),o=!0)}catch(t){a=t}if(o)break}if(!o)throw a;return r};a.setItem=function(t,e,n,r,i){g(p,arguments,i)},a.getItem=function(t,e,n,r){return g(d,arguments,r)},a.removeItem=function(t,e,n,r){g(f,arguments,r)},a.clearItems=function(t,e,n){g(h,arguments,n)},a.parseUrl=function(t){var e=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;e.lastIndex=0;var n=e.exec(t),r=null===n?null:{full:t,scheme:n[1],host:n[2],port:n[3],path:n[4]};return r&&(r.fullHost=r.host,r.port?80!==r.port&&"http"===r.scheme?r.fullHost+=":"+r.port:443!==r.port&&"https"===r.scheme&&(r.fullHost+=":"+r.port):"http"===r.scheme?r.port=80:"https"===r.scheme&&(r.port=443),r.full=r.scheme+"://"+r.fullHost),r};var m=null;a.getQueryVariables=function(t){var e,n=function(t){for(var e={},n=t.split("&"),r=0;r<n.length;r++){var i,o,a=n[r].indexOf("=");a>0?(i=n[r].substring(0,a),o=n[r].substring(a+1)):(i=n[r],o=null),i in e||(e[i]=[]),i in Object.prototype||null===o||e[i].push(unescape(o))}return e};return void 0===t?(null===m&&(m="undefined"!=typeof window&&window.location&&window.location.search?n(window.location.search.substring(1)):{}),e=m):e=n(t),e},a.parseFragment=function(t){var e=t,n="",r=t.indexOf("?");r>0&&(e=t.substring(0,r),n=t.substring(r+1));var i=e.split("/");return i.length>0&&""===i[0]&&i.shift(),{pathString:e,queryString:n,path:i,query:""===n?{}:a.getQueryVariables(n)}},a.makeRequest=function(t){var e=a.parseFragment(t),n={path:e.pathString,query:e.queryString,getPath:function(t){return void 0===t?e.path:e.path[t]},getQuery:function(t,n){var r;return void 0===t?r=e.query:(r=e.query[t])&&void 0!==n&&(r=r[n]),r},getQueryLast:function(t,e){var r=n.getQuery(t);return r?r[r.length-1]:e}};return n},a.makeLink=function(t,e,n){t=jQuery.isArray(t)?t.join("/"):t;var r=jQuery.param(e||{});return n=n||"",t+(r.length>0?"?"+r:"")+(n.length>0?"#"+n:"")},a.setPath=function(t,e,n){if("object"==typeof t&&null!==t)for(var r=0,i=e.length;r<i;){var o=e[r++];if(r==i)t[o]=n;else{var a=o in t;(!a||a&&"object"!=typeof t[o]||a&&null===t[o])&&(t[o]={}),t=t[o]}}},a.getPath=function(t,e,n){for(var r=0,i=e.length,o=!0;o&&r<i&&"object"==typeof t&&null!==t;){var a=e[r++];(o=a in t)&&(t=t[a])}return o?t:n},a.deletePath=function(t,e){if("object"==typeof t&&null!==t)for(var n=0,r=e.length;n<r;){var i=e[n++];if(n==r)delete t[i];else{if(!(i in t)||"object"!=typeof t[i]||null===t[i])break;t=t[i]}}},a.isEmpty=function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0},a.format=function(t){for(var e,n,r=/%./g,i=0,o=[],a=0;e=r.exec(t);){(n=t.substring(a,r.lastIndex-2)).length>0&&o.push(n),a=r.lastIndex;var s=e[0][1];switch(s){case"s":case"o":i<arguments.length?o.push(arguments[1+i++]):o.push("<?>");break;case"%":o.push("%");break;default:o.push("<%"+s+"?>")}}return o.push(t.substring(a)),o.join("")},a.formatNumber=function(t,e,n,r){var i=t,o=isNaN(e=Math.abs(e))?2:e,a=void 0===n?",":n,s=void 0===r?".":r,u=i<0?"-":"",l=parseInt(i=Math.abs(+i||0).toFixed(o),10)+"",c=l.length>3?l.length%3:0;return u+(c?l.substr(0,c)+s:"")+l.substr(c).replace(/(\d{3})(?=\d)/g,"$1"+s)+(o?a+Math.abs(i-l).toFixed(o).slice(2):"")},a.formatSize=function(t){return t=t>=1073741824?a.formatNumber(t/1073741824,2,".","")+" GiB":t>=1048576?a.formatNumber(t/1048576,2,".","")+" MiB":t>=1024?a.formatNumber(t/1024,0)+" KiB":a.formatNumber(t,0)+" bytes"},a.bytesFromIP=function(t){return-1!==t.indexOf(".")?a.bytesFromIPv4(t):-1!==t.indexOf(":")?a.bytesFromIPv6(t):null},a.bytesFromIPv4=function(t){if(4!==(t=t.split(".")).length)return null;for(var e=a.createBuffer(),n=0;n<t.length;++n){var r=parseInt(t[n],10);if(isNaN(r))return null;e.putByte(r)}return e.getBytes()},a.bytesFromIPv6=function(t){for(var e=0,n=2*(8-(t=t.split(":").filter(function(t){return 0===t.length&&++e,!0})).length+e),r=a.createBuffer(),i=0;i<8;++i)if(t[i]&&0!==t[i].length){var o=a.hexToBytes(t[i]);o.length<2&&r.putByte(0),r.putBytes(o)}else r.fillWithByte(0,n),n=0;return r.getBytes()},a.bytesToIP=function(t){return 4===t.length?a.bytesToIPv4(t):16===t.length?a.bytesToIPv6(t):null},a.bytesToIPv4=function(t){if(4!==t.length)return null;for(var e=[],n=0;n<t.length;++n)e.push(t.charCodeAt(n));return e.join(".")},a.bytesToIPv6=function(t){if(16!==t.length)return null;for(var e=[],n=[],r=0,i=0;i<t.length;i+=2){for(var o=a.bytesToHex(t[i]+t[i+1]);"0"===o[0]&&"0"!==o;)o=o.substr(1);if("0"===o){var s=n[n.length-1],u=e.length;s&&u===s.end+1?(s.end=u,s.end-s.start>n[r].end-n[r].start&&(r=n.length-1)):n.push({start:u,end:u})}e.push(o)}if(n.length>0){var l=n[r];l.end-l.start>0&&(e.splice(l.start,l.end-l.start+1,""),0===l.start&&e.unshift(""),7===l.end&&e.push(""))}return e.join(":")},a.estimateCores=function(t,e){function n(t,s,u){if(0===s){var l=Math.floor(t.reduce(function(t,e){return t+e},0)/t.length);return a.cores=Math.max(1,l),URL.revokeObjectURL(o),e(null,a.cores)}r(u,function(e,r){t.push(i(u,r)),n(t,s-1,u)})}function r(t,e){for(var n=[],r=[],i=0;i<t;++i){var a=new Worker(o);a.addEventListener("message",function(i){if(r.push(i.data),r.length===t){for(var o=0;o<t;++o)n[o].terminate();e(null,r)}}),n.push(a)}for(i=0;i<t;++i)n[i].postMessage(i)}function i(t,e){for(var n=[],r=0;r<t;++r)for(var i=e[r],o=n[r]=[],a=0;a<t;++a)if(r!==a){var s=e[a];(i.st>s.st&&i.st<s.et||s.st>i.st&&s.st<i.et)&&o.push(a)}return n.reduce(function(t,e){return Math.max(t,e.length)},0)}if("function"==typeof t&&(e=t,t={}),t=t||{},"cores"in a&&!t.update)return e(null,a.cores);if("undefined"!=typeof navigator&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return a.cores=navigator.hardwareConcurrency,e(null,a.cores);if("undefined"==typeof Worker)return a.cores=1,e(null,a.cores);if("undefined"==typeof Blob)return a.cores=2,e(null,a.cores);var o=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(t){for(var e=Date.now(),n=e+4;Date.now()<n;);self.postMessage({st:e,et:n})})}.toString(),")()"],{type:"application/javascript"}));n([],5,16)}},function(t,e,n){var r=n(0);t.exports=r.md=r.md||{},r.md.algorithms=r.md.algorithms||{}},function(t,e,n){var r=n(0);n(6),n(9),n(17),n(1),r.random&&r.random.getBytes?t.exports=r.random:function(e){function n(){var t=r.prng.create(i);return t.getBytes=function(e,n){return t.generate(e,n)},t.getBytesSync=function(e){return t.generate(e)},t}var i={},o=new Array(4),a=r.util.createBuffer();i.formatKey=function(t){var e=r.util.createBuffer(t);return t=new Array(4),t[0]=e.getInt32(),t[1]=e.getInt32(),t[2]=e.getInt32(),t[3]=e.getInt32(),r.aes._expandKey(t,!1)},i.formatSeed=function(t){var e=r.util.createBuffer(t);return t=new Array(4),t[0]=e.getInt32(),t[1]=e.getInt32(),t[2]=e.getInt32(),t[3]=e.getInt32(),t},i.cipher=function(t,e){return r.aes._updateBlock(t,e,o,!1),a.putInt32(o[0]),a.putInt32(o[1]),a.putInt32(o[2]),a.putInt32(o[3]),a.getBytes()},i.increment=function(t){return++t[3],t},i.md=r.md.sha256;var s=n(),u=null;if("undefined"!=typeof window){var l=window.crypto||window.msCrypto;l&&l.getRandomValues&&(u=function(t){return l.getRandomValues(t)})}if(r.options.usePureJavaScript||!r.util.isNodejs&&!u){if("undefined"==typeof window||window.document,s.collectInt(+new Date,32),"undefined"!=typeof navigator){var c="";for(var p in navigator)try{"string"==typeof navigator[p]&&(c+=navigator[p])}catch(t){}s.collect(c),c=null}e&&(e().mousemove(function(t){s.collectInt(t.clientX,16),s.collectInt(t.clientY,16)}),e().keypress(function(t){s.collectInt(t.charCode,8)}))}if(r.random)for(var p in s)r.random[p]=s[p];else r.random=s;r.random.createInstance=n,t.exports=r.random}("undefined"!=typeof jQuery?jQuery:null)},function(t,e,n){var r=n(0);n(2),n(1),(t.exports=r.hmac=r.hmac||{}).create=function(){var t=null,e=null,n=null,i=null,o={};return o.start=function(o,a){if(null!==o)if("string"==typeof o){if(!((o=o.toLowerCase())in r.md.algorithms))throw new Error('Unknown hash algorithm "'+o+'"');e=r.md.algorithms[o].create()}else e=o;if(null===a)a=t;else{if("string"==typeof a)a=r.util.createBuffer(a);else if(r.util.isArray(a)){u=a;a=r.util.createBuffer();for(l=0;l<u.length;++l)a.putByte(u[l])}var s=a.length();s>e.blockLength&&(e.start(),e.update(a.bytes()),a=e.digest()),n=r.util.createBuffer(),i=r.util.createBuffer(),s=a.length();for(l=0;l<s;++l){u=a.at(l);n.putByte(54^u),i.putByte(92^u)}if(s<e.blockLength)for(var u=e.blockLength-s,l=0;l<u;++l)n.putByte(54),i.putByte(92);t=a,n=n.bytes(),i=i.bytes()}e.start(),e.update(n)},o.update=function(t){e.update(t)},o.getMac=function(){var t=e.digest().bytes();return e.start(),e.update(i),e.update(t),e.digest()},o.digest=o.getMac,o}},function(t,e){},function(t,e,n){function r(t,e){u.cipher.registerAlgorithm(t,function(){return new u.aes.Algorithm(t,e)})}function i(){h=!0,p=[0,1,2,4,8,16,32,64,128,27,54];for(var t=new Array(256),e=0;e<128;++e)t[e]=e<<1,t[e+128]=e+128<<1^283;l=new Array(256),c=new Array(256),d=new Array(4),f=new Array(4);for(e=0;e<4;++e)d[e]=new Array(256),f[e]=new Array(256);for(var n,r,i,o,a,s,u,g=0,m=0,e=0;e<256;++e){o=(o=m^m<<1^m<<2^m<<3^m<<4)>>8^255&o^99,l[g]=o,c[o]=g,s=(a=t[o])<<24^o<<16^o<<8^o^a,u=((n=t[g])^(r=t[n])^(i=t[r]))<<24^(g^i)<<16^(g^r^i)<<8^g^n^i;for(var v=0;v<4;++v)d[v][g]=s,f[v][o]=u,s=s<<24|s>>>8,u=u<<24|u>>>8;0===g?g=m=1:(g=n^t[t[t[n^i]]],m^=t[t[m]])}}function o(t,e){for(var n,r=t.slice(0),i=1,o=r.length,a=g*(o+6+1),s=o;s<a;++s)n=r[s-1],s%o==0?(n=l[n>>>16&255]<<24^l[n>>>8&255]<<16^l[255&n]<<8^l[n>>>24]^p[i]<<24,i++):o>6&&s%o==4&&(n=l[n>>>24]<<24^l[n>>>16&255]<<16^l[n>>>8&255]<<8^l[255&n]),r[s]=r[s-o]^n;if(e){for(var u,c=f[0],d=f[1],h=f[2],m=f[3],v=r.slice(0),s=0,y=(a=r.length)-g;s<a;s+=g,y-=g)if(0===s||s===a-g)v[s]=r[y],v[s+1]=r[y+3],v[s+2]=r[y+2],v[s+3]=r[y+1];else for(var b=0;b<g;++b)u=r[y+b],v[s+(3&-b)]=c[l[u>>>24]]^d[l[u>>>16&255]]^h[l[u>>>8&255]]^m[l[255&u]];r=v}return r}function a(t,e,n,r){var i,o,a,s,u,p=t.length/4-1;r?(i=f[0],o=f[1],a=f[2],s=f[3],u=c):(i=d[0],o=d[1],a=d[2],s=d[3],u=l);var h,g,m,v,y,b,w;h=e[0]^t[0],g=e[r?3:1]^t[1],m=e[2]^t[2],v=e[r?1:3]^t[3];for(var $=3,k=1;k<p;++k)y=i[h>>>24]^o[g>>>16&255]^a[m>>>8&255]^s[255&v]^t[++$],b=i[g>>>24]^o[m>>>16&255]^a[v>>>8&255]^s[255&h]^t[++$],w=i[m>>>24]^o[v>>>16&255]^a[h>>>8&255]^s[255&g]^t[++$],v=i[v>>>24]^o[h>>>16&255]^a[g>>>8&255]^s[255&m]^t[++$],h=y,g=b,m=w;n[0]=u[h>>>24]<<24^u[g>>>16&255]<<16^u[m>>>8&255]<<8^u[255&v]^t[++$],n[r?3:1]=u[g>>>24]<<24^u[m>>>16&255]<<16^u[v>>>8&255]<<8^u[255&h]^t[++$],n[2]=u[m>>>24]<<24^u[v>>>16&255]<<16^u[h>>>8&255]<<8^u[255&g]^t[++$],n[r?1:3]=u[v>>>24]<<24^u[h>>>16&255]<<16^u[g>>>8&255]<<8^u[255&m]^t[++$]}function s(t){var e,n="AES-"+((t=t||{}).mode||"CBC").toUpperCase(),r=(e=t.decrypt?u.cipher.createDecipher(n,t.key):u.cipher.createCipher(n,t.key)).start;return e.start=function(t,n){var i=null;n instanceof u.util.ByteBuffer&&(i=n,n={}),(n=n||{}).output=i,n.iv=t,r.call(e,n)},e}var u=n(0);n(12),n(13),n(1),t.exports=u.aes=u.aes||{},u.aes.startEncrypting=function(t,e,n,r){var i=s({key:t,output:n,decrypt:!1,mode:r});return i.start(e),i},u.aes.createEncryptionCipher=function(t,e){return s({key:t,output:null,decrypt:!1,mode:e})},u.aes.startDecrypting=function(t,e,n,r){var i=s({key:t,output:n,decrypt:!0,mode:r});return i.start(e),i},u.aes.createDecryptionCipher=function(t,e){return s({key:t,output:null,decrypt:!0,mode:e})},u.aes.Algorithm=function(t,e){h||i();var n=this;n.name=t,n.mode=new e({blockSize:16,cipher:{encrypt:function(t,e){return a(n._w,t,e,!1)},decrypt:function(t,e){return a(n._w,t,e,!0)}}}),n._init=!1},u.aes.Algorithm.prototype.initialize=function(t){if(!this._init){var e,n=t.key;if("string"!=typeof n||16!==n.length&&24!==n.length&&32!==n.length){if(u.util.isArray(n)&&(16===n.length||24===n.length||32===n.length)){e=n,n=u.util.createBuffer();for(i=0;i<e.length;++i)n.putByte(e[i])}}else n=u.util.createBuffer(n);if(!u.util.isArray(n)){e=n,n=[];var r=e.length();if(16===r||24===r||32===r){r>>>=2;for(var i=0;i<r;++i)n.push(e.getInt32())}}if(!u.util.isArray(n)||4!==n.length&&6!==n.length&&8!==n.length)throw new Error("Invalid key parameter.");var a=this.mode.name,s=-1!==["CFB","OFB","CTR","GCM"].indexOf(a);this._w=o(n,t.decrypt&&!s),this._init=!0}},u.aes._expandKey=function(t,e){return h||i(),o(t,e)},u.aes._updateBlock=a,r("AES-ECB",u.cipher.modes.ecb),r("AES-CBC",u.cipher.modes.cbc),r("AES-CFB",u.cipher.modes.cfb),r("AES-OFB",u.cipher.modes.ofb),r("AES-CTR",u.cipher.modes.ctr),r("AES-GCM",u.cipher.modes.gcm);var l,c,p,d,f,h=!1,g=4},function(t,e,n){function r(t,e){a[t]=e,a[e]=t}function i(t,e){a[t]=e}var o=n(0);o.pki=o.pki||{};var a=t.exports=o.pki.oids=o.oids=o.oids||{};r("1.2.840.113549.1.1.1","rsaEncryption"),r("1.2.840.113549.1.1.4","md5WithRSAEncryption"),r("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),r("1.2.840.113549.1.1.7","RSAES-OAEP"),r("1.2.840.113549.1.1.8","mgf1"),r("1.2.840.113549.1.1.9","pSpecified"),r("1.2.840.113549.1.1.10","RSASSA-PSS"),r("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),r("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),r("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),r("1.3.14.3.2.7","desCBC"),r("1.3.14.3.2.26","sha1"),r("2.16.840.1.101.3.4.2.1","sha256"),r("2.16.840.1.101.3.4.2.2","sha384"),r("2.16.840.1.101.3.4.2.3","sha512"),r("1.2.840.113549.2.5","md5"),r("1.2.840.113549.1.7.1","data"),r("1.2.840.113549.1.7.2","signedData"),r("1.2.840.113549.1.7.3","envelopedData"),r("1.2.840.113549.1.7.4","signedAndEnvelopedData"),r("1.2.840.113549.1.7.5","digestedData"),r("1.2.840.113549.1.7.6","encryptedData"),r("1.2.840.113549.1.9.1","emailAddress"),r("1.2.840.113549.1.9.2","unstructuredName"),r("1.2.840.113549.1.9.3","contentType"),r("1.2.840.113549.1.9.4","messageDigest"),r("1.2.840.113549.1.9.5","signingTime"),r("1.2.840.113549.1.9.6","counterSignature"),r("1.2.840.113549.1.9.7","challengePassword"),r("1.2.840.113549.1.9.8","unstructuredAddress"),r("1.2.840.113549.1.9.14","extensionRequest"),r("1.2.840.113549.1.9.20","friendlyName"),r("1.2.840.113549.1.9.21","localKeyId"),r("1.2.840.113549.1.9.22.1","x509Certificate"),r("1.2.840.113549.1.12.10.1.1","keyBag"),r("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),r("1.2.840.113549.1.12.10.1.3","certBag"),r("1.2.840.113549.1.12.10.1.4","crlBag"),r("1.2.840.113549.1.12.10.1.5","secretBag"),r("1.2.840.113549.1.12.10.1.6","safeContentsBag"),r("1.2.840.113549.1.5.13","pkcs5PBES2"),r("1.2.840.113549.1.5.12","pkcs5PBKDF2"),r("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),r("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),r("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),r("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),r("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),r("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),r("1.2.840.113549.2.7","hmacWithSHA1"),r("1.2.840.113549.2.8","hmacWithSHA224"),r("1.2.840.113549.2.9","hmacWithSHA256"),r("1.2.840.113549.2.10","hmacWithSHA384"),r("1.2.840.113549.2.11","hmacWithSHA512"),r("1.2.840.113549.3.7","des-EDE3-CBC"),r("2.16.840.1.101.3.4.1.2","aes128-CBC"),r("2.16.840.1.101.3.4.1.22","aes192-CBC"),r("2.16.840.1.101.3.4.1.42","aes256-CBC"),r("2.5.4.3","commonName"),r("2.5.4.5","serialName"),r("2.5.4.6","countryName"),r("2.5.4.7","localityName"),r("2.5.4.8","stateOrProvinceName"),r("2.5.4.10","organizationName"),r("2.5.4.11","organizationalUnitName"),r("2.16.840.1.113730.1.1","nsCertType"),i("2.5.29.1","authorityKeyIdentifier"),i("2.5.29.2","keyAttributes"),i("2.5.29.3","certificatePolicies"),i("2.5.29.4","keyUsageRestriction"),i("2.5.29.5","policyMapping"),i("2.5.29.6","subtreesConstraint"),i("2.5.29.7","subjectAltName"),i("2.5.29.8","issuerAltName"),i("2.5.29.9","subjectDirectoryAttributes"),i("2.5.29.10","basicConstraints"),i("2.5.29.11","nameConstraints"),i("2.5.29.12","policyConstraints"),i("2.5.29.13","basicConstraints"),r("2.5.29.14","subjectKeyIdentifier"),r("2.5.29.15","keyUsage"),i("2.5.29.16","privateKeyUsagePeriod"),r("2.5.29.17","subjectAltName"),r("2.5.29.18","issuerAltName"),r("2.5.29.19","basicConstraints"),i("2.5.29.20","cRLNumber"),i("2.5.29.21","cRLReason"),i("2.5.29.22","expirationDate"),i("2.5.29.23","instructionCode"),i("2.5.29.24","invalidityDate"),i("2.5.29.25","cRLDistributionPoints"),i("2.5.29.26","issuingDistributionPoint"),i("2.5.29.27","deltaCRLIndicator"),i("2.5.29.28","issuingDistributionPoint"),i("2.5.29.29","certificateIssuer"),i("2.5.29.30","nameConstraints"),r("2.5.29.31","cRLDistributionPoints"),r("2.5.29.32","certificatePolicies"),i("2.5.29.33","policyMappings"),i("2.5.29.34","policyConstraints"),r("2.5.29.35","authorityKeyIdentifier"),i("2.5.29.36","policyConstraints"),r("2.5.29.37","extKeyUsage"),i("2.5.29.46","freshestCRL"),i("2.5.29.54","inhibitAnyPolicy"),r("1.3.6.1.4.1.11129.2.4.2","timestampList"),r("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),r("1.3.6.1.5.5.7.3.1","serverAuth"),r("1.3.6.1.5.5.7.3.2","clientAuth"),r("1.3.6.1.5.5.7.3.3","codeSigning"),r("1.3.6.1.5.5.7.3.4","emailProtection"),r("1.3.6.1.5.5.7.3.8","timeStamping")},function(t,e,n){function r(t,e,n){this.data=[],null!=t&&("number"==typeof t?this.fromNumber(t,e,n):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}function i(){return new r(null)}function o(t,e,n,r,i,o){for(var a=16383&e,s=e>>14;--o>=0;){var u=16383&this.data[t],l=this.data[t++]>>14,c=s*u+l*a;i=((u=a*u+((16383&c)<<14)+n.data[r]+i)>>28)+(c>>14)+s*l,n.data[r++]=268435455&u}return i}function a(t){return S.charAt(t)}function s(t,e){var n=E[t.charCodeAt(e)];return null==n?-1:n}function u(t){var e=i();return e.fromInt(t),e}function l(t){var e,n=1;return 0!=(e=t>>>16)&&(t=e,n+=16),0!=(e=t>>8)&&(t=e,n+=8),0!=(e=t>>4)&&(t=e,n+=4),0!=(e=t>>2)&&(t=e,n+=2),0!=(e=t>>1)&&(t=e,n+=1),n}function c(t){this.m=t}function p(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function d(t,e){return t&e}function f(t,e){return t|e}function h(t,e){return t^e}function g(t,e){return t&~e}function m(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function v(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function y(){}function b(t){return t}function w(t){this.r2=i(),this.q3=i(),r.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}function $(){return{nextBytes:function(t){for(var e=0;e<t.length;++e)t[e]=Math.floor(256*Math.random())}}}var k=n(0);t.exports=k.jsbn=k.jsbn||{};var C;k.jsbn.BigInteger=r,"undefined"==typeof navigator?(r.prototype.am=o,C=28):"Microsoft Internet Explorer"==navigator.appName?(r.prototype.am=function(t,e,n,r,i,o){for(var a=32767&e,s=e>>15;--o>=0;){var u=32767&this.data[t],l=this.data[t++]>>15,c=s*u+l*a;i=((u=a*u+((32767&c)<<15)+n.data[r]+(1073741823&i))>>>30)+(c>>>15)+s*l+(i>>>30),n.data[r++]=1073741823&u}return i},C=30):"Netscape"!=navigator.appName?(r.prototype.am=function(t,e,n,r,i,o){for(;--o>=0;){var a=e*this.data[t++]+n.data[r]+i;i=Math.floor(a/67108864),n.data[r++]=67108863&a}return i},C=26):(r.prototype.am=o,C=28),r.prototype.DB=C,r.prototype.DM=(1<<C)-1,r.prototype.DV=1<<C;r.prototype.FV=Math.pow(2,52),r.prototype.F1=52-C,r.prototype.F2=2*C-52;var x,T,S="0123456789abcdefghijklmnopqrstuvwxyz",E=new Array;for(x="0".charCodeAt(0),T=0;T<=9;++T)E[x++]=T;for(x="a".charCodeAt(0),T=10;T<36;++T)E[x++]=T;for(x="A".charCodeAt(0),T=10;T<36;++T)E[x++]=T;c.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},c.prototype.revert=function(t){return t},c.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},c.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},c.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},p.prototype.convert=function(t){var e=i();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(r.ZERO)>0&&this.m.subTo(e,e),e},p.prototype.revert=function(t){var e=i();return t.copyTo(e),this.reduce(e),e},p.prototype.reduce=function(t){for(;t.t<=this.mt2;)t.data[t.t++]=0;for(var e=0;e<this.m.t;++e){var n=32767&t.data[e],r=n*this.mpl+((n*this.mph+(t.data[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(n=e+this.m.t,t.data[n]+=this.m.am(0,r,t,e,0,this.m.t);t.data[n]>=t.DV;)t.data[n]-=t.DV,t.data[++n]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},p.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},p.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},r.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t.data[e]=this.data[e];t.t=this.t,t.s=this.s},r.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this.data[0]=t:t<-1?this.data[0]=t+this.DV:this.t=0},r.prototype.fromString=function(t,e){var n;if(16==e)n=4;else if(8==e)n=3;else if(256==e)n=8;else if(2==e)n=1;else if(32==e)n=5;else{if(4!=e)return void this.fromRadix(t,e);n=2}this.t=0,this.s=0;for(var i=t.length,o=!1,a=0;--i>=0;){var u=8==n?255&t[i]:s(t,i);u<0?"-"==t.charAt(i)&&(o=!0):(o=!1,0==a?this.data[this.t++]=u:a+n>this.DB?(this.data[this.t-1]|=(u&(1<<this.DB-a)-1)<<a,this.data[this.t++]=u>>this.DB-a):this.data[this.t-1]|=u<<a,(a+=n)>=this.DB&&(a-=this.DB))}8==n&&0!=(128&t[0])&&(this.s=-1,a>0&&(this.data[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),o&&r.ZERO.subTo(this,this)},r.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this.data[this.t-1]==t;)--this.t},r.prototype.dlShiftTo=function(t,e){var n;for(n=this.t-1;n>=0;--n)e.data[n+t]=this.data[n];for(n=t-1;n>=0;--n)e.data[n]=0;e.t=this.t+t,e.s=this.s},r.prototype.drShiftTo=function(t,e){for(var n=t;n<this.t;++n)e.data[n-t]=this.data[n];e.t=Math.max(this.t-t,0),e.s=this.s},r.prototype.lShiftTo=function(t,e){var n,r=t%this.DB,i=this.DB-r,o=(1<<i)-1,a=Math.floor(t/this.DB),s=this.s<<r&this.DM;for(n=this.t-1;n>=0;--n)e.data[n+a+1]=this.data[n]>>i|s,s=(this.data[n]&o)<<r;for(n=a-1;n>=0;--n)e.data[n]=0;e.data[a]=s,e.t=this.t+a+1,e.s=this.s,e.clamp()},r.prototype.rShiftTo=function(t,e){e.s=this.s;var n=Math.floor(t/this.DB);if(n>=this.t)e.t=0;else{var r=t%this.DB,i=this.DB-r,o=(1<<r)-1;e.data[0]=this.data[n]>>r;for(var a=n+1;a<this.t;++a)e.data[a-n-1]|=(this.data[a]&o)<<i,e.data[a-n]=this.data[a]>>r;r>0&&(e.data[this.t-n-1]|=(this.s&o)<<i),e.t=this.t-n,e.clamp()}},r.prototype.subTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n<i;)r+=this.data[n]-t.data[n],e.data[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r-=t.s;n<this.t;)r+=this.data[n],e.data[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r-=t.data[n],e.data[n++]=r&this.DM,r>>=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e.data[n++]=this.DV+r:r>0&&(e.data[n++]=r),e.t=n,e.clamp()},r.prototype.multiplyTo=function(t,e){var n=this.abs(),i=t.abs(),o=n.t;for(e.t=o+i.t;--o>=0;)e.data[o]=0;for(o=0;o<i.t;++o)e.data[o+n.t]=n.am(0,i.data[o],e,o,0,n.t);e.s=0,e.clamp(),this.s!=t.s&&r.ZERO.subTo(e,e)},r.prototype.squareTo=function(t){for(var e=this.abs(),n=t.t=2*e.t;--n>=0;)t.data[n]=0;for(n=0;n<e.t-1;++n){var r=e.am(n,e.data[n],t,2*n,0,1);(t.data[n+e.t]+=e.am(n+1,2*e.data[n],t,2*n+1,r,e.t-n-1))>=e.DV&&(t.data[n+e.t]-=e.DV,t.data[n+e.t+1]=1)}t.t>0&&(t.data[t.t-1]+=e.am(n,e.data[n],t,2*n,0,1)),t.s=0,t.clamp()},r.prototype.divRemTo=function(t,e,n){var o=t.abs();if(!(o.t<=0)){var a=this.abs();if(a.t<o.t)return null!=e&&e.fromInt(0),void(null!=n&&this.copyTo(n));null==n&&(n=i());var s=i(),u=this.s,c=t.s,p=this.DB-l(o.data[o.t-1]);p>0?(o.lShiftTo(p,s),a.lShiftTo(p,n)):(o.copyTo(s),a.copyTo(n));var d=s.t,f=s.data[d-1];if(0!=f){var h=f*(1<<this.F1)+(d>1?s.data[d-2]>>this.F2:0),g=this.FV/h,m=(1<<this.F1)/h,v=1<<this.F2,y=n.t,b=y-d,w=null==e?i():e;for(s.dlShiftTo(b,w),n.compareTo(w)>=0&&(n.data[n.t++]=1,n.subTo(w,n)),r.ONE.dlShiftTo(d,w),w.subTo(s,s);s.t<d;)s.data[s.t++]=0;for(;--b>=0;){var $=n.data[--y]==f?this.DM:Math.floor(n.data[y]*g+(n.data[y-1]+v)*m);if((n.data[y]+=s.am(0,$,n,b,0,d))<$)for(s.dlShiftTo(b,w),n.subTo(w,n);n.data[y]<--$;)n.subTo(w,n)}null!=e&&(n.drShiftTo(d,e),u!=c&&r.ZERO.subTo(e,e)),n.t=d,n.clamp(),p>0&&n.rShiftTo(p,n),u<0&&r.ZERO.subTo(n,n)}}},r.prototype.invDigit=function(){if(this.t<1)return 0;var t=this.data[0];if(0==(1&t))return 0;var e=3&t;return e=e*(2-(15&t)*e)&15,e=e*(2-(255&t)*e)&255,e=e*(2-((65535&t)*e&65535))&65535,(e=e*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},r.prototype.isEven=function(){return 0==(this.t>0?1&this.data[0]:this.s)},r.prototype.exp=function(t,e){if(t>4294967295||t<1)return r.ONE;var n=i(),o=i(),a=e.convert(this),s=l(t)-1;for(a.copyTo(n);--s>=0;)if(e.sqrTo(n,o),(t&1<<s)>0)e.mulTo(o,a,n);else{var u=n;n=o,o=u}return e.revert(n)},r.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var n,r=(1<<e)-1,i=!1,o="",s=this.t,u=this.DB-s*this.DB%e;if(s-- >0)for(u<this.DB&&(n=this.data[s]>>u)>0&&(i=!0,o=a(n));s>=0;)u<e?(n=(this.data[s]&(1<<u)-1)<<e-u,n|=this.data[--s]>>(u+=this.DB-e)):(n=this.data[s]>>(u-=e)&r,u<=0&&(u+=this.DB,--s)),n>0&&(i=!0),i&&(o+=a(n));return i?o:"0"},r.prototype.negate=function(){var t=i();return r.ZERO.subTo(this,t),t},r.prototype.abs=function(){return this.s<0?this.negate():this},r.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var n=this.t;if(0!=(e=n-t.t))return this.s<0?-e:e;for(;--n>=0;)if(0!=(e=this.data[n]-t.data[n]))return e;return 0},r.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+l(this.data[this.t-1]^this.s&this.DM)},r.prototype.mod=function(t){var e=i();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(r.ZERO)>0&&t.subTo(e,e),e},r.prototype.modPowInt=function(t,e){var n;return n=t<256||e.isEven()?new c(e):new p(e),this.exp(t,n)},r.ZERO=u(0),r.ONE=u(1),y.prototype.convert=b,y.prototype.revert=b,y.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n)},y.prototype.sqrTo=function(t,e){t.squareTo(e)},w.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=i();return t.copyTo(e),this.reduce(e),e},w.prototype.revert=function(t){return t},w.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},w.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},w.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var D=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],A=(1<<26)/D[D.length-1];r.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},r.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),n=Math.pow(t,e),r=u(n),o=i(),a=i(),s="";for(this.divRemTo(r,o,a);o.signum()>0;)s=(n+a.intValue()).toString(t).substr(1)+s,o.divRemTo(r,o,a);return a.intValue().toString(t)+s},r.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var n=this.chunkSize(e),i=Math.pow(e,n),o=!1,a=0,u=0,l=0;l<t.length;++l){var c=s(t,l);c<0?"-"==t.charAt(l)&&0==this.signum()&&(o=!0):(u=e*u+c,++a>=n&&(this.dMultiply(i),this.dAddOffset(u,0),a=0,u=0))}a>0&&(this.dMultiply(Math.pow(e,a)),this.dAddOffset(u,0)),o&&r.ZERO.subTo(this,this)},r.prototype.fromNumber=function(t,e,n){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,n),this.testBit(t-1)||this.bitwiseTo(r.ONE.shiftLeft(t-1),f,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(r.ONE.shiftLeft(t-1),this);else{var i=new Array,o=7&t;i.length=1+(t>>3),e.nextBytes(i),o>0?i[0]&=(1<<o)-1:i[0]=0,this.fromString(i,256)}},r.prototype.bitwiseTo=function(t,e,n){var r,i,o=Math.min(t.t,this.t);for(r=0;r<o;++r)n.data[r]=e(this.data[r],t.data[r]);if(t.t<this.t){for(i=t.s&this.DM,r=o;r<this.t;++r)n.data[r]=e(this.data[r],i);n.t=this.t}else{for(i=this.s&this.DM,r=o;r<t.t;++r)n.data[r]=e(i,t.data[r]);n.t=t.t}n.s=e(this.s,t.s),n.clamp()},r.prototype.changeBit=function(t,e){var n=r.ONE.shiftLeft(t);return this.bitwiseTo(n,e,n),n},r.prototype.addTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n<i;)r+=this.data[n]+t.data[n],e.data[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r+=t.s;n<this.t;)r+=this.data[n],e.data[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r+=t.data[n],e.data[n++]=r&this.DM,r>>=this.DB;r+=t.s}e.s=r<0?-1:0,r>0?e.data[n++]=r:r<-1&&(e.data[n++]=this.DV+r),e.t=n,e.clamp()},r.prototype.dMultiply=function(t){this.data[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},r.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this.data[this.t++]=0;for(this.data[e]+=t;this.data[e]>=this.DV;)this.data[e]-=this.DV,++e>=this.t&&(this.data[this.t++]=0),++this.data[e]}},r.prototype.multiplyLowerTo=function(t,e,n){var r=Math.min(this.t+t.t,e);for(n.s=0,n.t=r;r>0;)n.data[--r]=0;var i;for(i=n.t-this.t;r<i;++r)n.data[r+this.t]=this.am(0,t.data[r],n,r,0,this.t);for(i=Math.min(t.t,e);r<i;++r)this.am(0,t.data[r],n,r,0,e-r);n.clamp()},r.prototype.multiplyUpperTo=function(t,e,n){--e;var r=n.t=this.t+t.t-e;for(n.s=0;--r>=0;)n.data[r]=0;for(r=Math.max(e-this.t,0);r<t.t;++r)n.data[this.t+r-e]=this.am(e-r,t.data[r],n,0,0,this.t+r-e);n.clamp(),n.drShiftTo(1,n)},r.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,n=this.s<0?t-1:0;if(this.t>0)if(0==e)n=this.data[0]%t;else for(var r=this.t-1;r>=0;--r)n=(e*n+this.data[r])%t;return n},r.prototype.millerRabin=function(t){var e=this.subtract(r.ONE),n=e.getLowestSetBit();if(n<=0)return!1;for(var i,o=e.shiftRight(n),a=$(),s=0;s<t;++s){do{i=new r(this.bitLength(),a)}while(i.compareTo(r.ONE)<=0||i.compareTo(e)>=0);var u=i.modPow(o,this);if(0!=u.compareTo(r.ONE)&&0!=u.compareTo(e)){for(var l=1;l++<n&&0!=u.compareTo(e);)if(0==(u=u.modPowInt(2,this)).compareTo(r.ONE))return!1;if(0!=u.compareTo(e))return!1}}return!0},r.prototype.clone=function(){var t=i();return this.copyTo(t),t},r.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]},r.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24},r.prototype.shortValue=function(){return 0==this.t?this.s:this.data[0]<<16>>16},r.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this.data[0]<=0?0:1},r.prototype.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var n,r=this.DB-t*this.DB%8,i=0;if(t-- >0)for(r<this.DB&&(n=this.data[t]>>r)!=(this.s&this.DM)>>r&&(e[i++]=n|this.s<<this.DB-r);t>=0;)r<8?(n=(this.data[t]&(1<<r)-1)<<8-r,n|=this.data[--t]>>(r+=this.DB-8)):(n=this.data[t]>>(r-=8)&255,r<=0&&(r+=this.DB,--t)),0!=(128&n)&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(i>0||n!=this.s)&&(e[i++]=n);return e},r.prototype.equals=function(t){return 0==this.compareTo(t)},r.prototype.min=function(t){return this.compareTo(t)<0?this:t},r.prototype.max=function(t){return this.compareTo(t)>0?this:t},r.prototype.and=function(t){var e=i();return this.bitwiseTo(t,d,e),e},r.prototype.or=function(t){var e=i();return this.bitwiseTo(t,f,e),e},r.prototype.xor=function(t){var e=i();return this.bitwiseTo(t,h,e),e},r.prototype.andNot=function(t){var e=i();return this.bitwiseTo(t,g,e),e},r.prototype.not=function(){for(var t=i(),e=0;e<this.t;++e)t.data[e]=this.DM&~this.data[e];return t.t=this.t,t.s=~this.s,t},r.prototype.shiftLeft=function(t){var e=i();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},r.prototype.shiftRight=function(t){var e=i();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},r.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this.data[t])return t*this.DB+m(this.data[t]);return this.s<0?this.t*this.DB:-1},r.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,n=0;n<this.t;++n)t+=v(this.data[n]^e);return t},r.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this.data[e]&1<<t%this.DB)},r.prototype.setBit=function(t){return this.changeBit(t,f)},r.prototype.clearBit=function(t){return this.changeBit(t,g)},r.prototype.flipBit=function(t){return this.changeBit(t,h)},r.prototype.add=function(t){var e=i();return this.addTo(t,e),e},r.prototype.subtract=function(t){var e=i();return this.subTo(t,e),e},r.prototype.multiply=function(t){var e=i();return this.multiplyTo(t,e),e},r.prototype.divide=function(t){var e=i();return this.divRemTo(t,e,null),e},r.prototype.remainder=function(t){var e=i();return this.divRemTo(t,null,e),e},r.prototype.divideAndRemainder=function(t){var e=i(),n=i();return this.divRemTo(t,e,n),new Array(e,n)},r.prototype.modPow=function(t,e){var n,r,o=t.bitLength(),a=u(1);if(o<=0)return a;n=o<18?1:o<48?3:o<144?4:o<768?5:6,r=o<8?new c(e):e.isEven()?new w(e):new p(e);var s=new Array,d=3,f=n-1,h=(1<<n)-1;if(s[1]=r.convert(this),n>1){var g=i();for(r.sqrTo(s[1],g);d<=h;)s[d]=i(),r.mulTo(g,s[d-2],s[d]),d+=2}var m,v,y=t.t-1,b=!0,$=i();for(o=l(t.data[y])-1;y>=0;){for(o>=f?m=t.data[y]>>o-f&h:(m=(t.data[y]&(1<<o+1)-1)<<f-o,y>0&&(m|=t.data[y-1]>>this.DB+o-f)),d=n;0==(1&m);)m>>=1,--d;if((o-=d)<0&&(o+=this.DB,--y),b)s[m].copyTo(a),b=!1;else{for(;d>1;)r.sqrTo(a,$),r.sqrTo($,a),d-=2;d>0?r.sqrTo(a,$):(v=a,a=$,$=v),r.mulTo($,s[m],a)}for(;y>=0&&0==(t.data[y]&1<<o);)r.sqrTo(a,$),v=a,a=$,$=v,--o<0&&(o=this.DB-1,--y)}return r.revert(a)},r.prototype.modInverse=function(t){var e=t.isEven();if(this.isEven()&&e||0==t.signum())return r.ZERO;for(var n=t.clone(),i=this.clone(),o=u(1),a=u(0),s=u(0),l=u(1);0!=n.signum();){for(;n.isEven();)n.rShiftTo(1,n),e?(o.isEven()&&a.isEven()||(o.addTo(this,o),a.subTo(t,a)),o.rShiftTo(1,o)):a.isEven()||a.subTo(t,a),a.rShiftTo(1,a);for(;i.isEven();)i.rShiftTo(1,i),e?(s.isEven()&&l.isEven()||(s.addTo(this,s),l.subTo(t,l)),s.rShiftTo(1,s)):l.isEven()||l.subTo(t,l),l.rShiftTo(1,l);n.compareTo(i)>=0?(n.subTo(i,n),e&&o.subTo(s,o),a.subTo(l,a)):(i.subTo(n,i),e&&s.subTo(o,s),l.subTo(a,l))}return 0!=i.compareTo(r.ONE)?r.ZERO:l.compareTo(t)>=0?l.subtract(t):l.signum()<0?(l.addTo(t,l),l.signum()<0?l.add(t):l):l},r.prototype.pow=function(t){return this.exp(t,new y)},r.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),n=t.s<0?t.negate():t.clone();if(e.compareTo(n)<0){var r=e;e=n,n=r}var i=e.getLowestSetBit(),o=n.getLowestSetBit();if(o<0)return e;for(i<o&&(o=i),o>0&&(e.rShiftTo(o,e),n.rShiftTo(o,n));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),e.compareTo(n)>=0?(e.subTo(n,e),e.rShiftTo(1,e)):(n.subTo(e,n),n.rShiftTo(1,n));return o>0&&n.lShiftTo(o,n),n},r.prototype.isProbablePrime=function(t){var e,n=this.abs();if(1==n.t&&n.data[0]<=D[D.length-1]){for(e=0;e<D.length;++e)if(n.data[0]==D[e])return!0;return!1}if(n.isEven())return!1;for(e=1;e<D.length;){for(var r=D[e],i=e+1;i<D.length&&r<A;)r*=D[i++];for(r=n.modInt(r);e<i;)if(r%D[e++]==0)return!1}return n.millerRabin(t)}},function(t,e,n){function r(){s=String.fromCharCode(128),s+=o.util.fillString(String.fromCharCode(0),64),l=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],u=!0}function i(t,e,n){for(var r,i,o,a,s,u,c,p,d,f,h,g,m,v=n.length();v>=64;){for(s=0;s<16;++s)e[s]=n.getInt32();for(;s<64;++s)r=((r=e[s-2])>>>17|r<<15)^(r>>>19|r<<13)^r>>>10,i=((i=e[s-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,e[s]=r+e[s-7]+i+e[s-16]|0;for(u=t.h0,c=t.h1,p=t.h2,d=t.h3,f=t.h4,h=t.h5,g=t.h6,m=t.h7,s=0;s<64;++s)o=(u>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),a=u&c|p&(u^c),r=m+((f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7))+(g^f&(h^g))+l[s]+e[s],m=g,g=h,h=f,f=d+r>>>0,d=p,p=c,c=u,u=r+(i=o+a)>>>0;t.h0=t.h0+u|0,t.h1=t.h1+c|0,t.h2=t.h2+p|0,t.h3=t.h3+d|0,t.h4=t.h4+f|0,t.h5=t.h5+h|0,t.h6=t.h6+g|0,t.h7=t.h7+m|0,v-=64}}var o=n(0);n(2),n(1);var a=t.exports=o.sha256=o.sha256||{};o.md.sha256=o.md.algorithms.sha256=a,a.create=function(){u||r();var t=null,e=o.util.createBuffer(),n=new Array(64),a={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8};return a.start=function(){a.messageLength=0,a.fullMessageLength=a.messageLength64=[];for(var n=a.messageLengthSize/4,r=0;r<n;++r)a.fullMessageLength.push(0);return e=o.util.createBuffer(),t={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},a},a.start(),a.update=function(r,s){"utf8"===s&&(r=o.util.encodeUtf8(r));var u=r.length;a.messageLength+=u,u=[u/4294967296>>>0,u>>>0];for(var l=a.fullMessageLength.length-1;l>=0;--l)a.fullMessageLength[l]+=u[1],u[1]=u[0]+(a.fullMessageLength[l]/4294967296>>>0),a.fullMessageLength[l]=a.fullMessageLength[l]>>>0,u[0]=u[1]/4294967296>>>0;return e.putBytes(r),i(t,n,e),(e.read>2048||0===e.length())&&e.compact(),a},a.digest=function(){var r=o.util.createBuffer();r.putBytes(e.bytes());var u=a.fullMessageLength[a.fullMessageLength.length-1]+a.messageLengthSize&a.blockLength-1;r.putBytes(s.substr(0,a.blockLength-u));for(var l,c=8*a.fullMessageLength[0],p=0;p<a.fullMessageLength.length-1;++p)c+=(l=8*a.fullMessageLength[p+1])/4294967296>>>0,r.putInt32(c>>>0),c=l>>>0;r.putInt32(c);var d={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3,h4:t.h4,h5:t.h5,h6:t.h6,h7:t.h7};i(d,n,r);var f=o.util.createBuffer();return f.putInt32(d.h0),f.putInt32(d.h1),f.putInt32(d.h2),f.putInt32(d.h3),f.putInt32(d.h4),f.putInt32(d.h5),f.putInt32(d.h6),f.putInt32(d.h7),f},a};var s=null,u=!1,l=null},function(t,e,n){n(11),n(6),n(14),n(4),n(9),n(3),t.exports=n(0)},function(t,e,n){var r=n(0);n(4),n(2),n(1);var i,o=r.pkcs5=r.pkcs5||{};r.util.isNodejs&&!r.options.usePureJavaScript&&(i=n(5)),t.exports=r.pbkdf2=o.pbkdf2=function(t,e,n,o,a,s){function u(){if(w>d)return s(null,y);h.start(null,null),h.update(e),h.update(r.util.int32ToBytes(w)),g=v=h.digest().getBytes(),b=2,l()}function l(){if(b<=n)return h.start(null,null),h.update(v),m=h.digest().getBytes(),g=r.util.xorBytes(g,m,c),v=m,++b,r.util.setImmediate(l);y+=w<d?g:g.substr(0,f),++w,u()}if("function"==typeof a&&(s=a,a=null),r.util.isNodejs&&!r.options.usePureJavaScript&&i.pbkdf2&&(null===a||"object"!=typeof a)&&(i.pbkdf2Sync.length>4||!a||"sha1"===a))return"string"!=typeof a&&(a="sha1"),t=new Buffer(t,"binary"),e=new Buffer(e,"binary"),s?4===i.pbkdf2Sync.length?i.pbkdf2(t,e,n,o,function(t,e){if(t)return s(t);s(null,e.toString("binary"))}):i.pbkdf2(t,e,n,o,a,function(t,e){if(t)return s(t);s(null,e.toString("binary"))}):4===i.pbkdf2Sync.length?i.pbkdf2Sync(t,e,n,o).toString("binary"):i.pbkdf2Sync(t,e,n,o,a).toString("binary");if(void 0!==a&&null!==a||(a="sha1"),"string"==typeof a){if(!(a in r.md.algorithms))throw new Error("Unknown hash algorithm: "+a);a=r.md[a].create()}var c=a.digestLength;if(o>4294967295*c){var p=new Error("Derived key is too long.");if(s)return s(p);throw p}var d=Math.ceil(o/c),f=o-(d-1)*c,h=r.hmac.create();h.start(a,t);var g,m,v,y="";if(!s){for(w=1;w<=d;++w){h.start(null,null),h.update(e),h.update(r.util.int32ToBytes(w)),g=v=h.digest().getBytes();for(b=2;b<=n;++b)h.start(null,null),h.update(v),m=h.digest().getBytes(),g=r.util.xorBytes(g,m,c),v=m;y+=w<d?g:g.substr(0,f)}return y}var b,w=1;u()}},function(t,e,n){var r=n(0);n(1),t.exports=r.cipher=r.cipher||{},r.cipher.algorithms=r.cipher.algorithms||{},r.cipher.createCipher=function(t,e){var n=t;if("string"==typeof n&&(n=r.cipher.getAlgorithm(n))&&(n=n()),!n)throw new Error("Unsupported algorithm: "+t);return new r.cipher.BlockCipher({algorithm:n,key:e,decrypt:!1})},r.cipher.createDecipher=function(t,e){var n=t;if("string"==typeof n&&(n=r.cipher.getAlgorithm(n))&&(n=n()),!n)throw new Error("Unsupported algorithm: "+t);return new r.cipher.BlockCipher({algorithm:n,key:e,decrypt:!0})},r.cipher.registerAlgorithm=function(t,e){t=t.toUpperCase(),r.cipher.algorithms[t]=e},r.cipher.getAlgorithm=function(t){return(t=t.toUpperCase())in r.cipher.algorithms?r.cipher.algorithms[t]:null};var i=r.cipher.BlockCipher=function(t){this.algorithm=t.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=t.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=t.decrypt,this.algorithm.initialize(t)};i.prototype.start=function(t){t=t||{};var e={};for(var n in t)e[n]=t[n];e.decrypt=this._decrypt,this._finish=!1,this._input=r.util.createBuffer(),this.output=t.output||r.util.createBuffer(),this.mode.start(e)},i.prototype.update=function(t){for(t&&this._input.putBuffer(t);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()},i.prototype.finish=function(t){!t||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(e){return t(this.blockSize,e,!1)},this.mode.unpad=function(e){return t(this.blockSize,e,!0)});var e={};return e.decrypt=this._decrypt,e.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,e))&&(this._finish=!0,this.update(),!(this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,e))&&!(this.mode.afterFinish&&!this.mode.afterFinish(this.output,e)))}},function(t,e,n){function r(t){if("string"==typeof t&&(t=a.util.createBuffer(t)),a.util.isArray(t)&&t.length>4){var e=t;t=a.util.createBuffer();for(var n=0;n<e.length;++n)t.putByte(e[n])}return a.util.isArray(t)||(t=[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()]),t}function i(t){t[t.length-1]=t[t.length-1]+1&4294967295}function o(t){return[t/4294967296|0,4294967295&t]}var a=n(0);n(1),a.cipher=a.cipher||{};var s=t.exports=a.cipher.modes=a.cipher.modes||{};s.ecb=function(t){t=t||{},this.name="ECB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},s.ecb.prototype.start=function(t){},s.ecb.prototype.encrypt=function(t,e,n){if(t.length()<this.blockSize&&!(n&&t.length()>0))return!0;for(r=0;r<this._ints;++r)this._inBlock[r]=t.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var r=0;r<this._ints;++r)e.putInt32(this._outBlock[r])},s.ecb.prototype.decrypt=function(t,e,n){if(t.length()<this.blockSize&&!(n&&t.length()>0))return!0;for(r=0;r<this._ints;++r)this._inBlock[r]=t.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var r=0;r<this._ints;++r)e.putInt32(this._outBlock[r])},s.ecb.prototype.pad=function(t,e){var n=t.length()===this.blockSize?this.blockSize:this.blockSize-t.length();return t.fillWithByte(n,n),!0},s.ecb.prototype.unpad=function(t,e){if(e.overflow>0)return!1;var n=t.length(),r=t.at(n-1);return!(r>this.blockSize<<2)&&(t.truncate(r),!0)},s.cbc=function(t){t=t||{},this.name="CBC",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},s.cbc.prototype.start=function(t){if(null===t.iv){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else{if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=r(t.iv),this._prev=this._iv.slice(0)}},s.cbc.prototype.encrypt=function(t,e,n){if(t.length()<this.blockSize&&!(n&&t.length()>0))return!0;for(r=0;r<this._ints;++r)this._inBlock[r]=this._prev[r]^t.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var r=0;r<this._ints;++r)e.putInt32(this._outBlock[r]);this._prev=this._outBlock},s.cbc.prototype.decrypt=function(t,e,n){if(t.length()<this.blockSize&&!(n&&t.length()>0))return!0;for(r=0;r<this._ints;++r)this._inBlock[r]=t.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var r=0;r<this._ints;++r)e.putInt32(this._prev[r]^this._outBlock[r]);this._prev=this._inBlock.slice(0)},s.cbc.prototype.pad=function(t,e){var n=t.length()===this.blockSize?this.blockSize:this.blockSize-t.length();return t.fillWithByte(n,n),!0},s.cbc.prototype.unpad=function(t,e){if(e.overflow>0)return!1;var n=t.length(),r=t.at(n-1);return!(r>this.blockSize<<2)&&(t.truncate(r),!0)},s.cfb=function(t){t=t||{},this.name="CFB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=a.util.createBuffer(),this._partialBytes=0},s.cfb.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=r(t.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},s.cfb.prototype.encrypt=function(t,e,n){var r=t.length();if(0===r)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&r>=this.blockSize)for(o=0;o<this._ints;++o)this._inBlock[o]=t.getInt32()^this._outBlock[o],e.putInt32(this._inBlock[o]);else{var i=(this.blockSize-r)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(o=0;o<this._ints;++o)this._partialBlock[o]=t.getInt32()^this._outBlock[o],this._partialOutput.putInt32(this._partialBlock[o]);if(i>0)t.read-=this.blockSize;else for(var o=0;o<this._ints;++o)this._inBlock[o]=this._partialBlock[o];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!n)return e.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;e.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}},s.cfb.prototype.decrypt=function(t,e,n){var r=t.length();if(0===r)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&r>=this.blockSize)for(o=0;o<this._ints;++o)this._inBlock[o]=t.getInt32(),e.putInt32(this._inBlock[o]^this._outBlock[o]);else{var i=(this.blockSize-r)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(o=0;o<this._ints;++o)this._partialBlock[o]=t.getInt32(),this._partialOutput.putInt32(this._partialBlock[o]^this._outBlock[o]);if(i>0)t.read-=this.blockSize;else for(var o=0;o<this._ints;++o)this._inBlock[o]=this._partialBlock[o];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!n)return e.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;e.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}},s.ofb=function(t){t=t||{},this.name="OFB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=a.util.createBuffer(),this._partialBytes=0},s.ofb.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=r(t.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},s.ofb.prototype.encrypt=function(t,e,n){var r=t.length();if(0===t.length())return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&r>=this.blockSize)for(o=0;o<this._ints;++o)e.putInt32(t.getInt32()^this._outBlock[o]),this._inBlock[o]=this._outBlock[o];else{var i=(this.blockSize-r)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(o=0;o<this._ints;++o)this._partialOutput.putInt32(t.getInt32()^this._outBlock[o]);if(i>0)t.read-=this.blockSize;else for(var o=0;o<this._ints;++o)this._inBlock[o]=this._outBlock[o];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!n)return e.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;e.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}},s.ofb.prototype.decrypt=s.ofb.prototype.encrypt,s.ctr=function(t){t=t||{},this.name="CTR",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=a.util.createBuffer(),this._partialBytes=0},s.ctr.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=r(t.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},s.ctr.prototype.encrypt=function(t,e,n){var r=t.length();if(0===r)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&r>=this.blockSize)for(a=0;a<this._ints;++a)e.putInt32(t.getInt32()^this._outBlock[a]);else{var o=(this.blockSize-r)%this.blockSize;o>0&&(o=this.blockSize-o),this._partialOutput.clear();for(var a=0;a<this._ints;++a)this._partialOutput.putInt32(t.getInt32()^this._outBlock[a]);if(o>0&&(t.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!n)return e.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;e.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}i(this._inBlock)},s.ctr.prototype.decrypt=s.ctr.prototype.encrypt,s.gcm=function(t){t=t||{},this.name="GCM",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=a.util.createBuffer(),this._partialBytes=0,this._R=3774873600},s.gcm.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");var e=a.util.createBuffer(t.iv);this._cipherLength=0;var n;if(n="additionalData"in t?a.util.createBuffer(t.additionalData):a.util.createBuffer(),this._tagLength="tagLength"in t?t.tagLength:128,this._tag=null,t.decrypt&&(this._tag=a.util.createBuffer(t.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var r=e.length();if(12===r)this._j0=[e.getInt32(),e.getInt32(),e.getInt32(),1];else{for(this._j0=[0,0,0,0];e.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[e.getInt32(),e.getInt32(),e.getInt32(),e.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(o(8*r)))}this._inBlock=this._j0.slice(0),i(this._inBlock),this._partialBytes=0,n=a.util.createBuffer(n),this._aDataLength=o(8*n.length());var s=n.length()%this.blockSize;for(s&&n.fillWithByte(0,this.blockSize-s),this._s=[0,0,0,0];n.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[n.getInt32(),n.getInt32(),n.getInt32(),n.getInt32()])},s.gcm.prototype.encrypt=function(t,e,n){var r=t.length();if(0===r)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&r>=this.blockSize){for(s=0;s<this._ints;++s)e.putInt32(this._outBlock[s]^=t.getInt32());this._cipherLength+=this.blockSize}else{var o=(this.blockSize-r)%this.blockSize;o>0&&(o=this.blockSize-o),this._partialOutput.clear();for(s=0;s<this._ints;++s)this._partialOutput.putInt32(t.getInt32()^this._outBlock[s]);if(0===o||n){if(n){var a=r%this.blockSize;this._cipherLength+=a,this._partialOutput.truncate(this.blockSize-a)}else this._cipherLength+=this.blockSize;for(var s=0;s<this._ints;++s)this._outBlock[s]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!n)return t.read-=this.blockSize,e.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;e.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),i(this._inBlock)},s.gcm.prototype.decrypt=function(t,e,n){var r=t.length();if(r<this.blockSize&&!(n&&r>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),i(this._inBlock),this._hashBlock[0]=t.getInt32(),this._hashBlock[1]=t.getInt32(),this._hashBlock[2]=t.getInt32(),this._hashBlock[3]=t.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var o=0;o<this._ints;++o)e.putInt32(this._outBlock[o]^this._hashBlock[o]);r<this.blockSize?this._cipherLength+=r%this.blockSize:this._cipherLength+=this.blockSize},s.gcm.prototype.afterFinish=function(t,e){var n=!0;e.decrypt&&e.overflow&&t.truncate(this.blockSize-e.overflow),this.tag=a.util.createBuffer();var r=this._aDataLength.concat(o(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,r);var i=[];this.cipher.encrypt(this._j0,i);for(var s=0;s<this._ints;++s)this.tag.putInt32(this._s[s]^i[s]);return this.tag.truncate(this.tag.length()%(this._tagLength/8)),e.decrypt&&this.tag.bytes()!==this._tag&&(n=!1),n},s.gcm.prototype.multiply=function(t,e){for(var n=[0,0,0,0],r=e.slice(0),i=0;i<128;++i)t[i/32|0]&1<<31-i%32&&(n[0]^=r[0],n[1]^=r[1],n[2]^=r[2],n[3]^=r[3]),this.pow(r,r);return n},s.gcm.prototype.pow=function(t,e){for(var n=1&t[3],r=3;r>0;--r)e[r]=t[r]>>>1|(1&t[r-1])<<31;e[0]=t[0]>>>1,n&&(e[0]^=this._R)},s.gcm.prototype.tableMultiply=function(t){for(var e=[0,0,0,0],n=0;n<32;++n){var r=t[n/8|0]>>>4*(7-n%8)&15,i=this._m[n][r];e[0]^=i[0],e[1]^=i[1],e[2]^=i[2],e[3]^=i[3]}return e},s.gcm.prototype.ghash=function(t,e,n){return e[0]^=n[0],e[1]^=n[1],e[2]^=n[2],e[3]^=n[3],this.tableMultiply(e)},s.gcm.prototype.generateHashTable=function(t,e){for(var n=8/e,r=4*n,i=16*n,o=new Array(i),a=0;a<i;++a){var s=[0,0,0,0],u=(r-1-a%r)*e;s[a/r|0]=1<<e-1<<u,o[a]=this.generateSubHashTable(this.multiply(s,t),e)}return o},s.gcm.prototype.generateSubHashTable=function(t,e){var n=1<<e,r=n>>>1,i=new Array(n);i[r]=t.slice(0);for(var o=r>>>1;o>0;)this.pow(i[2*o],i[o]=[]),o>>=1;for(o=2;o<r;){for(var a=1;a<o;++a){var s=i[o],u=i[a];i[o+a]=[s[0]^u[0],s[1]^u[1],s[2]^u[2],s[3]^u[3]]}o*=2}for(i[0]=[0,0,0,0],o=r+1;o<n;++o){var l=i[o^r];i[o]=[t[0]^l[0],t[1]^l[1],t[2]^l[2],t[3]^l[3]]}return i}},function(t,e,n){function r(t,e,n){var r=p.util.createBuffer(),i=Math.ceil(e.n.bitLength()/8);if(t.length>i-11){var o=new Error("Message is too long for PKCS#1 v1.5 padding.");throw o.length=t.length,o.max=i-11,o}r.putByte(0),r.putByte(n);var a,s=i-3-t.length;if(0===n||1===n){a=0===n?0:255;for(c=0;c<s;++c)r.putByte(a)}else for(;s>0;){for(var u=0,l=p.random.getBytes(s),c=0;c<s;++c)0===(a=l.charCodeAt(c))?++u:r.putByte(a);s=u}return r.putByte(0),r.putBytes(t),r}function i(t,e,n,r){var i=Math.ceil(e.n.bitLength()/8),o=p.util.createBuffer(t),a=o.getByte(),s=o.getByte();if(0!==a||n&&0!==s&&1!==s||!n&&2!=s||n&&0===s&&void 0===r)throw new Error("Encryption block is invalid.");var u=0;if(0===s){u=i-3-r;for(var l=0;l<u;++l)if(0!==o.getByte())throw new Error("Encryption block is invalid.")}else if(1===s)for(u=0;o.length()>1;){if(255!==o.getByte()){--o.read;break}++u}else if(2===s)for(u=0;o.length()>1;){if(0===o.getByte()){--o.read;break}++u}if(0!==o.getByte()||u!==i-3-o.length())throw new Error("Encryption block is invalid.");return o.getBytes()}function o(t,e,n){function r(){i(t.pBits,function(e,r){return e?n(e):(t.p=r,null!==t.q?o(e,t.q):void i(t.qBits,o))})}function i(t,e){p.prime.generateProbablePrime(t,a,e)}function o(e,a){if(e)return n(e);if(t.q=a,t.p.compareTo(t.q)<0){var s=t.p;t.p=t.q,t.q=s}if(0!==t.p.subtract(d.ONE).gcd(t.e).compareTo(d.ONE))return t.p=null,void r();if(0!==t.q.subtract(d.ONE).gcd(t.e).compareTo(d.ONE))return t.q=null,void i(t.qBits,o);if(t.p1=t.p.subtract(d.ONE),t.q1=t.q.subtract(d.ONE),t.phi=t.p1.multiply(t.q1),0!==t.phi.gcd(t.e).compareTo(d.ONE))return t.p=t.q=null,void r();if(t.n=t.p.multiply(t.q),t.n.bitLength()!==t.bits)return t.q=null,void i(t.qBits,o);var u=t.e.modInverse(t.phi);t.keys={privateKey:h.rsa.setPrivateKey(t.n,t.e,u,t.p,t.q,u.mod(t.p1),u.mod(t.q1),t.q.modInverse(t.p)),publicKey:h.rsa.setPublicKey(t.n,t.e)},n(null,t.keys)}"function"==typeof e&&(n=e,e={});var a={algorithm:{name:(e=e||{}).algorithm||"PRIMEINC",options:{workers:e.workers||2,workLoad:e.workLoad||100,workerScript:e.workerScript}}};"prng"in e&&(a.prng=e.prng),r()}function a(t){var e=t.toString(16);e[0]>="8"&&(e="00"+e);var n=p.util.hexToBytes(e);return n.length>1&&(0===n.charCodeAt(0)&&0==(128&n.charCodeAt(1))||255===n.charCodeAt(0)&&128==(128&n.charCodeAt(1)))?n.substr(1):n}function s(t){return t<=100?27:t<=150?18:t<=200?15:t<=250?12:t<=300?9:t<=350?8:t<=400?7:t<=500?6:t<=600?5:t<=800?4:t<=1250?3:2}function u(t){return"undefined"!=typeof window&&"object"==typeof window.crypto&&"object"==typeof window.crypto.subtle&&"function"==typeof window.crypto.subtle[t]}function l(t){return"undefined"!=typeof window&&"object"==typeof window.msCrypto&&"object"==typeof window.msCrypto.subtle&&"function"==typeof window.msCrypto.subtle[t]}function c(t){for(var e=p.util.hexToBytes(t.toString(16)),n=new Uint8Array(e.length),r=0;r<e.length;++r)n[r]=e.charCodeAt(r);return n}var p=n(0);if(n(15),n(8),n(7),n(16),n(19),n(3),n(1),void 0===d)var d=p.jsbn.BigInteger;var f=p.asn1;p.pki=p.pki||{},t.exports=p.pki.rsa=p.rsa=p.rsa||{};var h=p.pki,g=[6,4,2,4,2,4,6,2],m={name:"PrivateKeyInfo",tagClass:f.Class.UNIVERSAL,type:f.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:f.Class.UNIVERSAL,type:f.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:f.Class.UNIVERSAL,type:f.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:f.Class.UNIVERSAL,type:f.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:f.Class.UNIVERSAL,type:f.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},v={name:"RSAPrivateKey",tagClass:f.Class.UNIVERSAL,type:f.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:f.Class.UNIVERSAL,type:f.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:f.Class.UNIVERSAL,type:f.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:f.Class.UNIVERSAL,type:f.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:f.Class.UNIVERSAL,type:f.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:f.Class.UNIVERSAL,type:f.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:f.Class.UNIVERSAL,type:f.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:f.Class.UNIVERSAL,type:f.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:f.Class.UNIVERSAL,type:f.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:f.Class.UNIVERSAL,type:f.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},y={name:"RSAPublicKey",tagClass:f.Class.UNIVERSAL,type:f.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:f.Class.UNIVERSAL,type:f.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:f.Class.UNIVERSAL,type:f.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},b=p.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:f.Class.UNIVERSAL,type:f.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:f.Class.UNIVERSAL,type:f.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:f.Class.UNIVERSAL,type:f.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:f.Class.UNIVERSAL,type:f.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:f.Class.UNIVERSAL,type:f.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},w=function(t){var e;if(!(t.algorithm in h.oids)){var n=new Error("Unknown message digest algorithm.");throw n.algorithm=t.algorithm,n}e=h.oids[t.algorithm];var r=f.oidToDer(e).getBytes(),i=f.create(f.Class.UNIVERSAL,f.Type.SEQUENCE,!0,[]),o=f.create(f.Class.UNIVERSAL,f.Type.SEQUENCE,!0,[]);o.value.push(f.create(f.Class.UNIVERSAL,f.Type.OID,!1,r)),o.value.push(f.create(f.Class.UNIVERSAL,f.Type.NULL,!1,""));var a=f.create(f.Class.UNIVERSAL,f.Type.OCTETSTRING,!1,t.digest().getBytes());return i.value.push(o),i.value.push(a),f.toDer(i).getBytes()},$=function(t,e,n){if(n)return t.modPow(e.e,e.n);if(!e.p||!e.q)return t.modPow(e.d,e.n);e.dP||(e.dP=e.d.mod(e.p.subtract(d.ONE))),e.dQ||(e.dQ=e.d.mod(e.q.subtract(d.ONE))),e.qInv||(e.qInv=e.q.modInverse(e.p));var r;do{r=new d(p.util.bytesToHex(p.random.getBytes(e.n.bitLength()/8)),16)}while(r.compareTo(e.n)>=0||!r.gcd(e.n).equals(d.ONE));for(var i=(t=t.multiply(r.modPow(e.e,e.n)).mod(e.n)).mod(e.p).modPow(e.dP,e.p),o=t.mod(e.q).modPow(e.dQ,e.q);i.compareTo(o)<0;)i=i.add(e.p);var a=i.subtract(o).multiply(e.qInv).mod(e.p).multiply(e.q).add(o);return a=a.multiply(r.modInverse(e.n)).mod(e.n)};h.rsa.encrypt=function(t,e,n){var i,o=n,a=Math.ceil(e.n.bitLength()/8);!1!==n&&!0!==n?(o=2===n,i=r(t,e,n)):(i=p.util.createBuffer()).putBytes(t);for(var s=new d(i.toHex(),16),u=$(s,e,o).toString(16),l=p.util.createBuffer(),c=a-Math.ceil(u.length/2);c>0;)l.putByte(0),--c;return l.putBytes(p.util.hexToBytes(u)),l.getBytes()},h.rsa.decrypt=function(t,e,n,r){var o=Math.ceil(e.n.bitLength()/8);if(t.length!==o){var a=new Error("Encrypted message length is invalid.");throw a.length=t.length,a.expected=o,a}var s=new d(p.util.createBuffer(t).toHex(),16);if(s.compareTo(e.n)>=0)throw new Error("Encrypted message is invalid.");for(var u=$(s,e,n).toString(16),l=p.util.createBuffer(),c=o-Math.ceil(u.length/2);c>0;)l.putByte(0),--c;return l.putBytes(p.util.hexToBytes(u)),!1!==r?i(l.getBytes(),e,n):l.getBytes()},h.rsa.createKeyPairGenerationState=function(t,e,n){"string"==typeof t&&(t=parseInt(t,10)),t=t||2048;var r,i=(n=n||{}).prng||p.random,o={nextBytes:function(t){for(var e=i.getBytesSync(t.length),n=0;n<t.length;++n)t[n]=e.charCodeAt(n)}},a=n.algorithm||"PRIMEINC";if("PRIMEINC"!==a)throw new Error("Invalid key generation algorithm: "+a);return(r={algorithm:a,state:0,bits:t,rng:o,eInt:e||65537,e:new d(null),p:null,q:null,qBits:t>>1,pBits:t-(t>>1),pqState:0,num:null,keys:null}).e.fromInt(r.eInt),r},h.rsa.stepKeyPairGenerationState=function(t,e){"algorithm"in t||(t.algorithm="PRIMEINC");var n=new d(null);n.fromInt(30);for(var r,i=0,o=+new Date,a=0;null===t.keys&&(e<=0||a<e);){if(0===t.state){var u=null===t.p?t.pBits:t.qBits,l=u-1;0===t.pqState?(t.num=new d(u,t.rng),t.num.testBit(l)||t.num.bitwiseTo(d.ONE.shiftLeft(l),function(t,e){return t|e},t.num),t.num.dAddOffset(31-t.num.mod(n).byteValue(),0),i=0,++t.pqState):1===t.pqState?t.num.bitLength()>u?t.pqState=0:t.num.isProbablePrime(s(t.num.bitLength()))?++t.pqState:t.num.dAddOffset(g[i++%8],0):2===t.pqState?t.pqState=0===t.num.subtract(d.ONE).gcd(t.e).compareTo(d.ONE)?3:0:3===t.pqState&&(t.pqState=0,null===t.p?t.p=t.num:t.q=t.num,null!==t.p&&null!==t.q&&++t.state,t.num=null)}else if(1===t.state)t.p.compareTo(t.q)<0&&(t.num=t.p,t.p=t.q,t.q=t.num),++t.state;else if(2===t.state)t.p1=t.p.subtract(d.ONE),t.q1=t.q.subtract(d.ONE),t.phi=t.p1.multiply(t.q1),++t.state;else if(3===t.state)0===t.phi.gcd(t.e).compareTo(d.ONE)?++t.state:(t.p=null,t.q=null,t.state=0);else if(4===t.state)t.n=t.p.multiply(t.q),t.n.bitLength()===t.bits?++t.state:(t.q=null,t.state=0);else if(5===t.state){var c=t.e.modInverse(t.phi);t.keys={privateKey:h.rsa.setPrivateKey(t.n,t.e,c,t.p,t.q,c.mod(t.p1),c.mod(t.q1),t.q.modInverse(t.p)),publicKey:h.rsa.setPublicKey(t.n,t.e)}}a+=(r=+new Date)-o,o=r}return null!==t.keys},h.rsa.generateKeyPair=function(t,e,n,r){if(1===arguments.length?"object"==typeof t?(n=t,t=void 0):"function"==typeof t&&(r=t,t=void 0):2===arguments.length?"number"==typeof t?"function"==typeof e?(r=e,e=void 0):"number"!=typeof e&&(n=e,e=void 0):(n=t,r=e,t=void 0,e=void 0):3===arguments.length&&("number"==typeof e?"function"==typeof n&&(r=n,n=void 0):(r=n,n=e,e=void 0)),n=n||{},void 0===t&&(t=n.bits||2048),void 0===e&&(e=n.e||65537),!p.options.usePureJavaScript&&r&&t>=256&&t<=16384&&(65537===e||3===e)){if(u("generateKey")&&u("exportKey"))return window.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:c(e),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(t){return window.crypto.subtle.exportKey("pkcs8",t.privateKey)}).then(void 0,function(t){r(t)}).then(function(t){if(t){var e=h.privateKeyFromAsn1(f.fromDer(p.util.createBuffer(t)));r(null,{privateKey:e,publicKey:h.setRsaPublicKey(e.n,e.e)})}});if(l("generateKey")&&l("exportKey")){var i=window.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:c(e),hash:{name:"SHA-256"}},!0,["sign","verify"]);return i.oncomplete=function(t){var e=t.target.result,n=window.msCrypto.subtle.exportKey("pkcs8",e.privateKey);n.oncomplete=function(t){var e=t.target.result,n=h.privateKeyFromAsn1(f.fromDer(p.util.createBuffer(e)));r(null,{privateKey:n,publicKey:h.setRsaPublicKey(n.n,n.e)})},n.onerror=function(t){r(t)}},void(i.onerror=function(t){r(t)})}}var a=h.rsa.createKeyPairGenerationState(t,e,n);if(!r)return h.rsa.stepKeyPairGenerationState(a,0),a.keys;o(a,n,r)},h.setRsaPublicKey=h.rsa.setPublicKey=function(t,e){var n={n:t,e:e};return n.encrypt=function(t,e,i){if("string"==typeof e?e=e.toUpperCase():void 0===e&&(e="RSAES-PKCS1-V1_5"),"RSAES-PKCS1-V1_5"===e)e={encode:function(t,e,n){return r(t,e,2).getBytes()}};else if("RSA-OAEP"===e||"RSAES-OAEP"===e)e={encode:function(t,e){return p.pkcs1.encode_rsa_oaep(e,t,i)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(e))e={encode:function(t){return t}};else if("string"==typeof e)throw new Error('Unsupported encryption scheme: "'+e+'".');var o=e.encode(t,n,!0);return h.rsa.encrypt(o,n,!0)},n.verify=function(t,e,r){"string"==typeof r?r=r.toUpperCase():void 0===r&&(r="RSASSA-PKCS1-V1_5"),"RSASSA-PKCS1-V1_5"===r?r={verify:function(t,e){return e=i(e,n,!0),t===f.fromDer(e).value[1].value}}:"NONE"!==r&&"NULL"!==r&&null!==r||(r={verify:function(t,e){return e=i(e,n,!0),t===e}});var o=h.rsa.decrypt(e,n,!0,!1);return r.verify(t,o,n.n.bitLength())},n},h.setRsaPrivateKey=h.rsa.setPrivateKey=function(t,e,n,r,o,a,s,u){var l={n:t,e:e,d:n,p:r,q:o,dP:a,dQ:s,qInv:u};return l.decrypt=function(t,e,n){"string"==typeof e?e=e.toUpperCase():void 0===e&&(e="RSAES-PKCS1-V1_5");var r=h.rsa.decrypt(t,l,!1,!1);if("RSAES-PKCS1-V1_5"===e)e={decode:i};else if("RSA-OAEP"===e||"RSAES-OAEP"===e)e={decode:function(t,e){return p.pkcs1.decode_rsa_oaep(e,t,n)}};else{if(-1===["RAW","NONE","NULL",null].indexOf(e))throw new Error('Unsupported encryption scheme: "'+e+'".');e={decode:function(t){return t}}}return e.decode(r,l,!1)},l.sign=function(t,e){var n=!1;"string"==typeof e&&(e=e.toUpperCase()),void 0===e||"RSASSA-PKCS1-V1_5"===e?(e={encode:w},n=1):"NONE"!==e&&"NULL"!==e&&null!==e||(e={encode:function(){return t}},n=1);var r=e.encode(t,l.n.bitLength());return h.rsa.encrypt(r,l,n)},l},h.wrapRsaPrivateKey=function(t){return f.create(f.Class.UNIVERSAL,f.Type.SEQUENCE,!0,[f.create(f.Class.UNIVERSAL,f.Type.INTEGER,!1,f.integerToDer(0).getBytes()),f.create(f.Class.UNIVERSAL,f.Type.SEQUENCE,!0,[f.create(f.Class.UNIVERSAL,f.Type.OID,!1,f.oidToDer(h.oids.rsaEncryption).getBytes()),f.create(f.Class.UNIVERSAL,f.Type.NULL,!1,"")]),f.create(f.Class.UNIVERSAL,f.Type.OCTETSTRING,!1,f.toDer(t).getBytes())])},h.privateKeyFromAsn1=function(t){var e={},n=[];if(f.validate(t,m,e,n)&&(t=f.fromDer(p.util.createBuffer(e.privateKey))),e={},n=[],!f.validate(t,v,e,n)){var r=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw r.errors=n,r}var i,o,a,s,u,l,c,g;return i=p.util.createBuffer(e.privateKeyModulus).toHex(),o=p.util.createBuffer(e.privateKeyPublicExponent).toHex(),a=p.util.createBuffer(e.privateKeyPrivateExponent).toHex(),s=p.util.createBuffer(e.privateKeyPrime1).toHex(),u=p.util.createBuffer(e.privateKeyPrime2).toHex(),l=p.util.createBuffer(e.privateKeyExponent1).toHex(),c=p.util.createBuffer(e.privateKeyExponent2).toHex(),g=p.util.createBuffer(e.privateKeyCoefficient).toHex(),h.setRsaPrivateKey(new d(i,16),new d(o,16),new d(a,16),new d(s,16),new d(u,16),new d(l,16),new d(c,16),new d(g,16))},h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(t){return f.create(f.Class.UNIVERSAL,f.Type.SEQUENCE,!0,[f.create(f.Class.UNIVERSAL,f.Type.INTEGER,!1,f.integerToDer(0).getBytes()),f.create(f.Class.UNIVERSAL,f.Type.INTEGER,!1,a(t.n)),f.create(f.Class.UNIVERSAL,f.Type.INTEGER,!1,a(t.e)),f.create(f.Class.UNIVERSAL,f.Type.INTEGER,!1,a(t.d)),f.create(f.Class.UNIVERSAL,f.Type.INTEGER,!1,a(t.p)),f.create(f.Class.UNIVERSAL,f.Type.INTEGER,!1,a(t.q)),f.create(f.Class.UNIVERSAL,f.Type.INTEGER,!1,a(t.dP)),f.create(f.Class.UNIVERSAL,f.Type.INTEGER,!1,a(t.dQ)),f.create(f.Class.UNIVERSAL,f.Type.INTEGER,!1,a(t.qInv))])},h.publicKeyFromAsn1=function(t){var e={},n=[];if(f.validate(t,b,e,n)){var r=f.derToOid(e.publicKeyOid);if(r!==h.oids.rsaEncryption)throw(i=new Error("Cannot read public key. Unknown OID.")).oid=r,i;t=e.rsaPublicKey}if(n=[],!f.validate(t,y,e,n)){var i=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.");throw i.errors=n,i}var o=p.util.createBuffer(e.publicKeyModulus).toHex(),a=p.util.createBuffer(e.publicKeyExponent).toHex();return h.setRsaPublicKey(new d(o,16),new d(a,16))},h.publicKeyToAsn1=h.publicKeyToSubjectPublicKeyInfo=function(t){return f.create(f.Class.UNIVERSAL,f.Type.SEQUENCE,!0,[f.create(f.Class.UNIVERSAL,f.Type.SEQUENCE,!0,[f.create(f.Class.UNIVERSAL,f.Type.OID,!1,f.oidToDer(h.oids.rsaEncryption).getBytes()),f.create(f.Class.UNIVERSAL,f.Type.NULL,!1,"")]),f.create(f.Class.UNIVERSAL,f.Type.BITSTRING,!1,[h.publicKeyToRSAPublicKey(t)])])},h.publicKeyToRSAPublicKey=function(t){return f.create(f.Class.UNIVERSAL,f.Type.SEQUENCE,!0,[f.create(f.Class.UNIVERSAL,f.Type.INTEGER,!1,a(t.n)),f.create(f.Class.UNIVERSAL,f.Type.INTEGER,!1,a(t.e))])}},function(t,e,n){function r(t,e,n){if(n>e){var r=new Error("Too few bytes to parse DER.");throw r.available=t.length(),r.remaining=e,r.requested=n,r}}function i(t,e,n,o){var u;r(t,e,2);var l=t.getByte();e--;var c=192&l,p=31&l;u=t.length();var d=s(t,e);if(e-=u-t.length(),void 0!==d&&d>e){if(o.strict){var f=new Error("Too few bytes to read ASN.1 value.");throw f.available=t.length(),f.remaining=e,f.requested=d,f}d=e}var h,g,m=32==(32&l);if(m)if(h=[],void 0===d)for(;;){if(r(t,e,2),t.bytes(2)===String.fromCharCode(0,0)){t.getBytes(2),e-=2;break}u=t.length(),h.push(i(t,e,n+1,o)),e-=u-t.length()}else for(;d>0;)u=t.length(),h.push(i(t,d,n+1,o)),e-=u-t.length(),d-=u-t.length();if(void 0===h&&c===a.Class.UNIVERSAL&&p===a.Type.BITSTRING&&(g=t.bytes(d)),void 0===h&&o.decodeBitStrings&&c===a.Class.UNIVERSAL&&p===a.Type.BITSTRING&&d>1){var v=t.read,y=e,b=0;if(p===a.Type.BITSTRING&&(r(t,e,1),b=t.getByte(),e--),0===b)try{u=t.length();var w=i(t,e,n+1,{verbose:o.verbose,strict:!0,decodeBitStrings:!0}),$=u-t.length();e-=$,p==a.Type.BITSTRING&&$++;var k=w.tagClass;$!==d||k!==a.Class.UNIVERSAL&&k!==a.Class.CONTEXT_SPECIFIC||(h=[w])}catch(t){}void 0===h&&(t.read=v,e=y)}if(void 0===h){if(void 0===d){if(o.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");d=e}if(p===a.Type.BMPSTRING)for(h="";d>0;d-=2)r(t,e,2),h+=String.fromCharCode(t.getInt16()),e-=2;else h=t.getBytes(d)}var C=void 0===g?null:{bitStringContents:g};return a.create(c,p,m,h,C)}var o=n(0);n(1),n(7);var a=t.exports=o.asn1=o.asn1||{};a.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},a.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30},a.create=function(t,e,n,r,i){if(o.util.isArray(r)){for(var s=[],u=0;u<r.length;++u)void 0!==r[u]&&s.push(r[u]);r=s}var l={tagClass:t,type:e,constructed:n,composed:n||o.util.isArray(r),value:r};return i&&"bitStringContents"in i&&(l.bitStringContents=i.bitStringContents,l.original=a.copy(l)),l},a.copy=function(t,e){var n;if(o.util.isArray(t)){n=[];for(var r=0;r<t.length;++r)n.push(a.copy(t[r],e));return n}return"string"==typeof t?t:(n={tagClass:t.tagClass,type:t.type,constructed:t.constructed,composed:t.composed,value:a.copy(t.value,e)},e&&!e.excludeBitStringContents&&(n.bitStringContents=t.bitStringContents),n)},a.equals=function(t,e,n){if(o.util.isArray(t)){if(!o.util.isArray(e))return!1;if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)return!!a.equals(t[r],e[r])}if(typeof t!=typeof e)return!1;if("string"==typeof t)return t===e;var i=t.tagClass===e.tagClass&&t.type===e.type&&t.constructed===e.constructed&&t.composed===e.composed&&a.equals(t.value,e.value);return n&&n.includeBitStringContents&&(i=i&&t.bitStringContents===e.bitStringContents),i},a.getBerValueLength=function(t){var e=t.getByte();if(128!==e){return 128&e?t.getInt((127&e)<<3):e}};var s=function(t,e){var n=t.getByte();if(e--,128!==n){var i;if(128&n){var o=127&n;r(t,e,o),i=t.getInt(o<<3)}else i=n;if(i<0)throw new Error("Negative length: "+i);return i}};a.fromDer=function(t,e){return void 0===e&&(e={strict:!0,decodeBitStrings:!0}),"boolean"==typeof e&&(e={strict:e,decodeBitStrings:!0}),"strict"in e||(e.strict=!0),"decodeBitStrings"in e||(e.decodeBitStrings=!0),"string"==typeof t&&(t=o.util.createBuffer(t)),i(t,t.length(),0,e)},a.toDer=function(t){var e=o.util.createBuffer(),n=t.tagClass|t.type,r=o.util.createBuffer(),i=!1;if("bitStringContents"in t&&(i=!0,t.original&&(i=a.equals(t,t.original))),i)r.putBytes(t.bitStringContents);else if(t.composed){t.constructed?n|=32:r.putByte(0);for(l=0;l<t.value.length;++l)void 0!==t.value[l]&&r.putBuffer(a.toDer(t.value[l]))}else if(t.type===a.Type.BMPSTRING)for(l=0;l<t.value.length;++l)r.putInt16(t.value.charCodeAt(l));else t.type===a.Type.INTEGER&&t.value.length>1&&(0===t.value.charCodeAt(0)&&0==(128&t.value.charCodeAt(1))||255===t.value.charCodeAt(0)&&128==(128&t.value.charCodeAt(1)))?r.putBytes(t.value.substr(1)):r.putBytes(t.value);if(e.putByte(n),r.length()<=127)e.putByte(127&r.length());else{var s=r.length(),u="";do{u+=String.fromCharCode(255&s),s>>>=8}while(s>0);e.putByte(128|u.length);for(var l=u.length-1;l>=0;--l)e.putByte(u.charCodeAt(l))}return e.putBuffer(r),e},a.oidToDer=function(t){var e=t.split("."),n=o.util.createBuffer();n.putByte(40*parseInt(e[0],10)+parseInt(e[1],10));for(var r,i,a,s,u=2;u<e.length;++u){r=!0,i=[],a=parseInt(e[u],10);do{s=127&a,a>>>=7,r||(s|=128),i.push(s),r=!1}while(a>0);for(var l=i.length-1;l>=0;--l)n.putByte(i[l])}return n},a.derToOid=function(t){var e;"string"==typeof t&&(t=o.util.createBuffer(t));var n=t.getByte();e=Math.floor(n/40)+"."+n%40;for(var r=0;t.length()>0;)r<<=7,128&(n=t.getByte())?r+=127&n:(e+="."+(r+n),r=0);return e},a.utcTimeToDate=function(t){var e=new Date,n=parseInt(t.substr(0,2),10);n=n>=50?1900+n:2e3+n;var r=parseInt(t.substr(2,2),10)-1,i=parseInt(t.substr(4,2),10),o=parseInt(t.substr(6,2),10),a=parseInt(t.substr(8,2),10),s=0;if(t.length>11){var u=t.charAt(10),l=10;"+"!==u&&"-"!==u&&(s=parseInt(t.substr(10,2),10),l+=2)}if(e.setUTCFullYear(n,r,i),e.setUTCHours(o,a,s,0),l&&("+"===(u=t.charAt(l))||"-"===u)){var c=60*parseInt(t.substr(l+1,2),10)+parseInt(t.substr(l+4,2),10);c*=6e4,"+"===u?e.setTime(+e-c):e.setTime(+e+c)}return e},a.generalizedTimeToDate=function(t){var e=new Date,n=parseInt(t.substr(0,4),10),r=parseInt(t.substr(4,2),10)-1,i=parseInt(t.substr(6,2),10),o=parseInt(t.substr(8,2),10),a=parseInt(t.substr(10,2),10),s=parseInt(t.substr(12,2),10),u=0,l=0,c=!1;"Z"===t.charAt(t.length-1)&&(c=!0);var p=t.length-5,d=t.charAt(p);return"+"!==d&&"-"!==d||(l=60*parseInt(t.substr(p+1,2),10)+parseInt(t.substr(p+4,2),10),l*=6e4,"+"===d&&(l*=-1),c=!0),"."===t.charAt(14)&&(u=1e3*parseFloat(t.substr(14),10)),c?(e.setUTCFullYear(n,r,i),e.setUTCHours(o,a,s,u),e.setTime(+e+l)):(e.setFullYear(n,r,i),e.setHours(o,a,s,u)),e},a.dateToUtcTime=function(t){if("string"==typeof t)return t;var e="",n=[];n.push((""+t.getUTCFullYear()).substr(2)),n.push(""+(t.getUTCMonth()+1)),n.push(""+t.getUTCDate()),n.push(""+t.getUTCHours()),n.push(""+t.getUTCMinutes()),n.push(""+t.getUTCSeconds());for(var r=0;r<n.length;++r)n[r].length<2&&(e+="0"),e+=n[r];return e+="Z"},a.dateToGeneralizedTime=function(t){if("string"==typeof t)return t;var e="",n=[];n.push(""+t.getUTCFullYear()),n.push(""+(t.getUTCMonth()+1)),n.push(""+t.getUTCDate()),n.push(""+t.getUTCHours()),n.push(""+t.getUTCMinutes()),n.push(""+t.getUTCSeconds());for(var r=0;r<n.length;++r)n[r].length<2&&(e+="0"),e+=n[r];return e+="Z"},a.integerToDer=function(t){var e=o.util.createBuffer();if(t>=-128&&t<128)return e.putSignedInt(t,8);if(t>=-32768&&t<32768)return e.putSignedInt(t,16);if(t>=-8388608&&t<8388608)return e.putSignedInt(t,24);if(t>=-2147483648&&t<2147483648)return e.putSignedInt(t,32);var n=new Error("Integer too large; max is 32-bits.");throw n.integer=t,n},a.derToInteger=function(t){"string"==typeof t&&(t=o.util.createBuffer(t));var e=8*t.length();if(e>32)throw new Error("Integer too large; max is 32-bits.");return t.getSignedInt(e)},a.validate=function(t,e,n,r){var i=!1;if(t.tagClass!==e.tagClass&&void 0!==e.tagClass||t.type!==e.type&&void 0!==e.type)r&&(t.tagClass!==e.tagClass&&r.push("["+e.name+'] Expected tag class "'+e.tagClass+'", got "'+t.tagClass+'"'),t.type!==e.type&&r.push("["+e.name+'] Expected type "'+e.type+'", got "'+t.type+'"'));else if(t.constructed===e.constructed||void 0===e.constructed){if(i=!0,e.value&&o.util.isArray(e.value))for(var s=0,u=0;i&&u<e.value.length;++u)i=e.value[u].optional||!1,t.value[s]&&((i=a.validate(t.value[s],e.value[u],n,r))?++s:e.value[u].optional&&(i=!0)),!i&&r&&r.push("["+e.name+'] Tag class "'+e.tagClass+'", type "'+e.type+'" expected value length "'+e.value.length+'", got "'+t.value.length+'"');if(i&&n&&(e.capture&&(n[e.capture]=t.value),e.captureAsn1&&(n[e.captureAsn1]=t),e.captureBitStringContents&&"bitStringContents"in t&&(n[e.captureBitStringContents]=t.bitStringContents),e.captureBitStringValue&&"bitStringContents"in t)){if(t.bitStringContents.length<2)n[e.captureBitStringValue]="";else{if(0!==t.bitStringContents.charCodeAt(0))throw new Error("captureBitStringValue only supported for zero unused bits");n[e.captureBitStringValue]=t.bitStringContents.slice(1)}}}else r&&r.push("["+e.name+'] Expected constructed "'+e.constructed+'", got "'+t.constructed+'"');return i};var u=/[^\\u0000-\\u00ff]/;a.prettyPrint=function(t,e,n){var r="";e=e||0,n=n||2,e>0&&(r+="\n");for(var i="",s=0;s<e*n;++s)i+=" ";switch(r+=i+"Tag: ",t.tagClass){case a.Class.UNIVERSAL:r+="Universal:";break;case a.Class.APPLICATION:r+="Application:";break;case a.Class.CONTEXT_SPECIFIC:r+="Context-Specific:";break;case a.Class.PRIVATE:r+="Private:"}if(t.tagClass===a.Class.UNIVERSAL)switch(r+=t.type,t.type){case a.Type.NONE:r+=" (None)";break;case a.Type.BOOLEAN:r+=" (Boolean)";break;case a.Type.INTEGER:r+=" (Integer)";break;case a.Type.BITSTRING:r+=" (Bit string)";break;case a.Type.OCTETSTRING:r+=" (Octet string)";break;case a.Type.NULL:r+=" (Null)";break;case a.Type.OID:r+=" (Object Identifier)";break;case a.Type.ODESC:r+=" (Object Descriptor)";break;case a.Type.EXTERNAL:r+=" (External or Instance of)";break;case a.Type.REAL:r+=" (Real)";break;case a.Type.ENUMERATED:r+=" (Enumerated)";break;case a.Type.EMBEDDED:r+=" (Embedded PDV)";break;case a.Type.UTF8:r+=" (UTF8)";break;case a.Type.ROID:r+=" (Relative Object Identifier)";break;case a.Type.SEQUENCE:r+=" (Sequence)";break;case a.Type.SET:r+=" (Set)";break;case a.Type.PRINTABLESTRING:r+=" (Printable String)";break;case a.Type.IA5String:r+=" (IA5String (ASCII))";break;case a.Type.UTCTIME:r+=" (UTC time)";break;case a.Type.GENERALIZEDTIME:r+=" (Generalized time)";break;case a.Type.BMPSTRING:r+=" (BMP String)"}else r+=t.type;if(r+="\n",r+=i+"Constructed: "+t.constructed+"\n",t.composed){for(var l=0,c="",s=0;s<t.value.length;++s)void 0!==t.value[s]&&(l+=1,c+=a.prettyPrint(t.value[s],e+1,n),s+1<t.value.length&&(c+=","));r+=i+"Sub values: "+l+c}else{if(r+=i+"Value: ",t.type===a.Type.OID){var p=a.derToOid(t.value);r+=p,o.pki&&o.pki.oids&&p in o.pki.oids&&(r+=" ("+o.pki.oids[p]+") ")}if(t.type===a.Type.INTEGER)try{r+=a.derToInteger(t.value)}catch(e){r+="0x"+o.util.bytesToHex(t.value)}else if(t.type===a.Type.BITSTRING){if(t.value.length>1?r+="0x"+o.util.bytesToHex(t.value.slice(1)):r+="(none)",t.value.length>0){var d=t.value.charCodeAt(0);1==d?r+=" (1 unused bit shown)":d>1&&(r+=" ("+d+" unused bits shown)")}}else t.type===a.Type.OCTETSTRING?(u.test(t.value)||(r+="("+t.value+") "),r+="0x"+o.util.bytesToHex(t.value)):t.type===a.Type.UTF8?r+=o.util.decodeUtf8(t.value):t.type===a.Type.PRINTABLESTRING||t.type===a.Type.IA5String?r+=t.value:u.test(t.value)?r+="0x"+o.util.bytesToHex(t.value):0===t.value.length?r+="[null]":r+=t.value}return r}},function(t,e,n){function r(t,e,n){n||(n=i.md.sha1.create());for(var r="",o=Math.ceil(e/n.digestLength),a=0;a<o;++a){var s=String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,255&a);n.start(),n.update(t+s),r+=n.digest().getBytes()}return r.substring(0,e)}var i=n(0);n(1),n(3),n(18);var o=t.exports=i.pkcs1=i.pkcs1||{};o.encode_rsa_oaep=function(t,e,n){var o,a,s,u;"string"==typeof n?(o=n,a=arguments[3]||void 0,s=arguments[4]||void 0):n&&(o=n.label||void 0,a=n.seed||void 0,s=n.md||void 0,n.mgf1&&n.mgf1.md&&(u=n.mgf1.md)),s?s.start():s=i.md.sha1.create(),u||(u=s);var l=Math.ceil(t.n.bitLength()/8),c=l-2*s.digestLength-2;if(e.length>c)throw(m=new Error("RSAES-OAEP input message length is too long.")).length=e.length,m.maxLength=c,m;o||(o=""),s.update(o,"raw");for(var p=s.digest(),d="",f=c-e.length,h=0;h<f;h++)d+="\0";var g=p.getBytes()+d+""+e;if(a){if(a.length!==s.digestLength){var m=new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.");throw m.seedLength=a.length,m.digestLength=s.digestLength,m}}else a=i.random.getBytes(s.digestLength);var v=r(a,l-s.digestLength-1,u),y=i.util.xorBytes(g,v,g.length),b=r(y,s.digestLength,u);return"\0"+i.util.xorBytes(a,b,a.length)+y},o.decode_rsa_oaep=function(t,e,n){var o,a,s;"string"==typeof n?(o=n,a=arguments[3]||void 0):n&&(o=n.label||void 0,a=n.md||void 0,n.mgf1&&n.mgf1.md&&(s=n.mgf1.md));var u=Math.ceil(t.n.bitLength()/8);if(e.length!==u)throw(v=new Error("RSAES-OAEP encoded message length is invalid.")).length=e.length,v.expectedLength=u,v;if(void 0===a?a=i.md.sha1.create():a.start(),s||(s=a),u<2*a.digestLength+2)throw new Error("RSAES-OAEP key is too short for the hash function.");o||(o=""),a.update(o,"raw");for(var l=a.digest().getBytes(),c=e.charAt(0),p=e.substring(1,a.digestLength+1),d=e.substring(1+a.digestLength),f=r(d,a.digestLength,s),h=r(i.util.xorBytes(p,f,p.length),u-a.digestLength-1,s),g=i.util.xorBytes(d,h,d.length),m=g.substring(0,a.digestLength),v="\0"!==c,y=0;y<a.digestLength;++y)v|=l.charAt(y)!==m.charAt(y);for(var b=1,w=a.digestLength,$=a.digestLength;$<g.length;$++){var k=g.charCodeAt($),C=1&k^1;v|=k&(b?65534:0),w+=b&=C}if(v||1!==g.charCodeAt(w))throw new Error("Invalid RSAES-OAEP padding.");return g.substring(w+1)}},function(t,e,n){var r=n(0);n(1);var i=null;!r.util.isNodejs||r.options.usePureJavaScript||process.versions["node-webkit"]||(i=n(5)),(t.exports=r.prng=r.prng||{}).create=function(t){function e(t){if(s.pools[0].messageLength>=32)return o(),t();var e=32-s.pools[0].messageLength<<5;s.seedFile(e,function(e,n){if(e)return t(e);s.collect(n),o(),t()})}function n(){if(s.pools[0].messageLength>=32)return o();var t=32-s.pools[0].messageLength<<5;s.collect(s.seedFileSync(t)),o()}function o(){var t=s.plugin.md.create();t.update(s.pools[0].digest().getBytes()),s.pools[0].start();for(var e=1,n=1;n<32;++n)(e=31===e?2147483648:e<<2)%s.reseeds==0&&(t.update(s.pools[n].digest().getBytes()),s.pools[n].start());var r=t.digest().getBytes();t.start(),t.update(r);var i=t.digest().getBytes();s.key=s.plugin.formatKey(r),s.seed=s.plugin.formatSeed(i),s.reseeds=4294967295===s.reseeds?0:s.reseeds+1,s.generated=0}function a(t){var e=null;if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;n&&n.getRandomValues&&(e=function(t){return n.getRandomValues(t)})}var i=r.util.createBuffer();if(e)for(;i.length()<t;){var o=Math.max(1,Math.min(t-i.length(),65536)/4),a=new Uint32Array(Math.floor(o));try{e(a);for(p=0;p<a.length;++p)i.putInt32(a[p])}catch(t){if(!("undefined"!=typeof QuotaExceededError&&t instanceof QuotaExceededError))throw t}}if(i.length()<t)for(var s,u,l,c=Math.floor(65536*Math.random());i.length()<t;){u=16807*(65535&c),u+=(32767&(s=16807*(c>>16)))<<16,c=4294967295&(u=(2147483647&(u+=s>>15))+(u>>31));for(var p=0;p<3;++p)l=c>>>(p<<3),l^=Math.floor(256*Math.random()),i.putByte(String.fromCharCode(255&l))}return i.getBytes(t)}for(var s={plugin:t,key:null,seed:null,time:null,reseeds:0,generated:0},u=t.md,l=new Array(32),c=0;c<32;++c)l[c]=u.create();return s.pools=l,s.pool=0,s.generate=function(t,n){function i(p){if(p)return n(p);if(c.length()>=t)return n(null,c.getBytes(t));if(s.generated>1048575&&(s.key=null),null===s.key)return r.util.nextTick(function(){e(i)});var d=o(s.key,s.seed);s.generated+=d.length,c.putBytes(d),s.key=u(o(s.key,a(s.seed))),s.seed=l(o(s.key,s.seed)),r.util.setImmediate(i)}if(!n)return s.generateSync(t);var o=s.plugin.cipher,a=s.plugin.increment,u=s.plugin.formatKey,l=s.plugin.formatSeed,c=r.util.createBuffer();s.key=null,i()},s.generateSync=function(t){var e=s.plugin.cipher,i=s.plugin.increment,o=s.plugin.formatKey,a=s.plugin.formatSeed;s.key=null;for(var u=r.util.createBuffer();u.length()<t;){s.generated>1048575&&(s.key=null),null===s.key&&n();var l=e(s.key,s.seed);s.generated+=l.length,u.putBytes(l),s.key=o(e(s.key,i(s.seed))),s.seed=a(e(s.key,s.seed))}return u.getBytes(t)},i?(s.seedFile=function(t,e){i.randomBytes(t,function(t,n){if(t)return e(t);e(null,n.toString())})},s.seedFileSync=function(t){return i.randomBytes(t).toString()}):(s.seedFile=function(t,e){try{e(null,a(t))}catch(t){e(t)}},s.seedFileSync=a),s.collect=function(t){for(var e=t.length,n=0;n<e;++n)s.pools[s.pool].update(t.substr(n,1)),s.pool=31===s.pool?0:s.pool+1},s.collectInt=function(t,e){for(var n="",r=0;r<e;r+=8)n+=String.fromCharCode(t>>r&255);s.collect(n)},s.registerWorker=function(t){if(t===self)s.seedFile=function(t,e){function n(t){var r=t.data;r.forge&&r.forge.prng&&(self.removeEventListener("message",n),e(r.forge.prng.err,r.forge.prng.bytes))}self.addEventListener("message",n),self.postMessage({forge:{prng:{needed:t}}})};else{t.addEventListener("message",function(e){var n=e.data;n.forge&&n.forge.prng&&s.seedFile(n.forge.prng.needed,function(e,n){t.postMessage({forge:{prng:{err:e,bytes:n}}})})})}},s}},function(t,e,n){function r(){s=String.fromCharCode(128),s+=o.util.fillString(String.fromCharCode(0),64),u=!0}function i(t,e,n){for(var r,i,o,a,s,u,l,c=n.length();c>=64;){for(i=t.h0,o=t.h1,a=t.h2,s=t.h3,u=t.h4,l=0;l<16;++l)r=n.getInt32(),e[l]=r,r=(i<<5|i>>>27)+(s^o&(a^s))+u+1518500249+r,u=s,s=a,a=(o<<30|o>>>2)>>>0,o=i,i=r;for(;l<20;++l)r=(r=e[l-3]^e[l-8]^e[l-14]^e[l-16])<<1|r>>>31,e[l]=r,r=(i<<5|i>>>27)+(s^o&(a^s))+u+1518500249+r,u=s,s=a,a=(o<<30|o>>>2)>>>0,o=i,i=r;for(;l<32;++l)r=(r=e[l-3]^e[l-8]^e[l-14]^e[l-16])<<1|r>>>31,e[l]=r,r=(i<<5|i>>>27)+(o^a^s)+u+1859775393+r,u=s,s=a,a=(o<<30|o>>>2)>>>0,o=i,i=r;for(;l<40;++l)r=(r=e[l-6]^e[l-16]^e[l-28]^e[l-32])<<2|r>>>30,e[l]=r,r=(i<<5|i>>>27)+(o^a^s)+u+1859775393+r,u=s,s=a,a=(o<<30|o>>>2)>>>0,o=i,i=r;for(;l<60;++l)r=(r=e[l-6]^e[l-16]^e[l-28]^e[l-32])<<2|r>>>30,e[l]=r,r=(i<<5|i>>>27)+(o&a|s&(o^a))+u+2400959708+r,u=s,s=a,a=(o<<30|o>>>2)>>>0,o=i,i=r;for(;l<80;++l)r=(r=e[l-6]^e[l-16]^e[l-28]^e[l-32])<<2|r>>>30,e[l]=r,r=(i<<5|i>>>27)+(o^a^s)+u+3395469782+r,u=s,s=a,a=(o<<30|o>>>2)>>>0,o=i,i=r;t.h0=t.h0+i|0,t.h1=t.h1+o|0,t.h2=t.h2+a|0,t.h3=t.h3+s|0,t.h4=t.h4+u|0,c-=64}}var o=n(0);n(2),n(1);var a=t.exports=o.sha1=o.sha1||{};o.md.sha1=o.md.algorithms.sha1=a,a.create=function(){u||r();var t=null,e=o.util.createBuffer(),n=new Array(80),a={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8};return a.start=function(){a.messageLength=0,a.fullMessageLength=a.messageLength64=[];for(var n=a.messageLengthSize/4,r=0;r<n;++r)a.fullMessageLength.push(0);return e=o.util.createBuffer(),t={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},a},a.start(),a.update=function(r,s){"utf8"===s&&(r=o.util.encodeUtf8(r));var u=r.length;a.messageLength+=u,u=[u/4294967296>>>0,u>>>0];for(var l=a.fullMessageLength.length-1;l>=0;--l)a.fullMessageLength[l]+=u[1],u[1]=u[0]+(a.fullMessageLength[l]/4294967296>>>0),a.fullMessageLength[l]=a.fullMessageLength[l]>>>0,u[0]=u[1]/4294967296>>>0;return e.putBytes(r),i(t,n,e),(e.read>2048||0===e.length())&&e.compact(),a},a.digest=function(){var r=o.util.createBuffer();r.putBytes(e.bytes());var u=a.fullMessageLength[a.fullMessageLength.length-1]+a.messageLengthSize&a.blockLength-1;r.putBytes(s.substr(0,a.blockLength-u));for(var l,c=8*a.fullMessageLength[0],p=0;p<a.fullMessageLength.length-1;++p)c+=(l=8*a.fullMessageLength[p+1])/4294967296>>>0,r.putInt32(c>>>0),c=l>>>0;r.putInt32(c);var d={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3,h4:t.h4};i(d,n,r);var f=o.util.createBuffer();return f.putInt32(d.h0),f.putInt32(d.h1),f.putInt32(d.h2),f.putInt32(d.h3),f.putInt32(d.h4),f},a};var s=null,u=!1},function(t,e,n){var r=n(0);n(1),n(8),n(3),function(){function e(t,e,r,i){return"workers"in r?o(t,e,r,i):n(t,e,r,i)}function n(t,e,n,r){var o=a(t,e),u=s(o.bitLength());"millerRabinTests"in n&&(u=n.millerRabinTests);var l=10;"maxBlockTime"in n&&(l=n.maxBlockTime),i(o,t,e,0,u,l,r)}function i(t,e,n,o,s,u,l){var p=+new Date;do{if(t.bitLength()>e&&(t=a(e,n)),t.isProbablePrime(s))return l(null,t);t.dAddOffset(c[o++%8],0)}while(u<0||+new Date-p<u);r.util.setImmediate(function(){i(t,e,n,o,s,u,l)})}function o(t,e,i,o){function s(){c=Math.max(1,c);for(var n=[],r=0;r<c;++r)n[r]=new Worker(f);for(var i=c,r=0;r<c;++r)n[r].addEventListener("message",function(r){if(!s){--i;var c=r.data;if(c.found){for(var f=0;f<n.length;++f)n[f].terminate();return s=!0,o(null,new l(c.prime,16))}u.bitLength()>t&&(u=a(t,e));var h=u.toString(16);r.target.postMessage({hex:h,workLoad:p}),u.dAddOffset(d,0)}});var s=!1}if("undefined"==typeof Worker)return n(t,e,i,o);var u=a(t,e),c=i.workers,p=i.workLoad||100,d=30*p/8,f=i.workerScript||"forge/prime.worker.js";if(-1===c)return r.util.estimateCores(function(t,e){t&&(e=2),c=e-1,s()});s()}function a(t,e){var n=new l(t,e),r=t-1;return n.testBit(r)||n.bitwiseTo(l.ONE.shiftLeft(r),d,n),n.dAddOffset(31-n.mod(p).byteValue(),0),n}function s(t){return t<=100?27:t<=150?18:t<=200?15:t<=250?12:t<=300?9:t<=350?8:t<=400?7:t<=500?6:t<=600?5:t<=800?4:t<=1250?3:2}if(r.prime)t.exports=r.prime;else{var u=t.exports=r.prime=r.prime||{},l=r.jsbn.BigInteger,c=[6,4,2,4,2,4,6,2],p=new l(null);p.fromInt(30);var d=function(t,e){return t|e};u.generateProbablePrime=function(t,n,i){"function"==typeof n&&(i=n,n={});var o=(n=n||{}).algorithm||"PRIMEINC";"string"==typeof o&&(o={name:o}),o.options=o.options||{};var a=n.prng||r.random,s={nextBytes:function(t){for(var e=a.getBytesSync(t.length),n=0;n<t.length;++n)t[n]=e.charCodeAt(n)}};if("PRIMEINC"===o.name)return e(t,s,o.options,i);throw new Error("Invalid prime generation algorithm: "+o.name)}}}()}])}),function(t,e){"use strict";"function"==typeof define&&define.amd?define(["angular"],e):t.hasOwnProperty("angular")?e(t.angular):"object"==typeof exports&&(module.exports=e(require("angular")))}(this,function(t){"use strict";function e(t,e){var n;try{n=t[e]}catch(t){n=!1}if(n){var r="__"+Math.round(1e7*Math.random());try{t[e].setItem(r,r),t[e].removeItem(r,r)}catch(t){n=!1}}return n}function n(n){var r=e(window,n);return function(){var i="ngStorage-";this.setKeyPrefix=function(t){if("string"!=typeof t)throw new TypeError("[ngStorage] - "+n+"Provider.setKeyPrefix() expects a String.");i=t};var o=t.toJson,a=t.fromJson;this.setSerializer=function(t){if("function"!=typeof t)throw new TypeError("[ngStorage] - "+n+"Provider.setSerializer expects a function.");o=t},this.setDeserializer=function(t){if("function"!=typeof t)throw new TypeError("[ngStorage] - "+n+"Provider.setDeserializer expects a function.");a=t},this.supported=function(){return!!r},this.get=function(t){return r&&a(r.getItem(i+t))},this.set=function(t,e){return r&&r.setItem(i+t,o(e))},this.remove=function(t){r&&r.removeItem(i+t)},this.$get=["$rootScope","$window","$log","$timeout","$document",function(r,s,u,l,c){var p,d,f=i.length,h=e(s,n),g=h||(u.warn("This browser does not support Web Storage!"),{setItem:t.noop,getItem:t.noop,removeItem:t.noop}),m={$default:function(e){for(var n in e)t.isDefined(m[n])||(m[n]=t.copy(e[n]));return m.$sync(),m},$reset:function(t){for(var e in m)"$"===e[0]||delete m[e]&&g.removeItem(i+e);return m.$default(t)},$sync:function(){for(var t,e=0,n=g.length;e<n;e++)(t=g.key(e))&&i===t.slice(0,f)&&(m[t.slice(f)]=a(g.getItem(t)))},$apply:function(){var e;if(d=null,!t.equals(m,p)){e=t.copy(p),t.forEach(m,function(n,r){t.isDefined(n)&&"$"!==r[0]&&(g.setItem(i+r,o(n)),delete e[r])});for(var n in e)g.removeItem(i+n);p=t.copy(m)}},$supported:function(){return!!h}};return m.$sync(),p=t.copy(m),r.$watch(function(){d||(d=l(m.$apply,100,!1))}),s.addEventListener&&s.addEventListener("storage",function(e){if(e.key){var n=c[0];n.hasFocus&&n.hasFocus()||i!==e.key.slice(0,f)||(e.newValue?m[e.key.slice(f)]=a(e.newValue):delete m[e.key.slice(f)],p=t.copy(m),r.$apply())}}),s.addEventListener&&s.addEventListener("beforeunload",function(){m.$apply()}),m}]}}return(t=t&&t.module?t:window.angular).module("ngStorage",[]).provider("$localStorage",n("localStorage")).provider("$sessionStorage",n("sessionStorage"))}),function(){"use strict";var t,e;"object"==typeof module&&module.exports?(t=require("angular"),e=require("clipboard"),module.exports="ngclipboard"):(t=window.angular,e=window.Clipboard),t.module("ngclipboard",[]).directive("ngclipboard",function(){return{restrict:"A",scope:{ngclipboardSuccess:"&",ngclipboardError:"&"},link:function(t,n){var r=new e(n[0]);r.on("success",function(e){t.$apply(function(){t.ngclipboardSuccess({e:e})})}),r.on("error",function(e){t.$apply(function(){t.ngclipboardError({e:e})})})}}})}(),function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&"undefined"!=typeof exports?module.exports=e():t.Papa=e()}(this,function(){"use strict";function t(t){this._handle=null,this._paused=!1,this._finished=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(t){var e=p(t);e.chunkSize=parseInt(e.chunkSize),t.step||t.chunk||(e.chunkSize=null),this._handle=new o(e),this._handle.streamer=this,this._config=e}.call(this,t),this.parseChunk=function(t){if(this.isFirstChunk&&f(this._config.beforeFirstChunk)){var e=this._config.beforeFirstChunk(t);void 0!==e&&(t=e)}this.isFirstChunk=!1;var n=this._partialLine+t;this._partialLine="";var r=this._handle.parse(n,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var i=r.meta.cursor;this._finished||(this._partialLine=n.substring(i-this._baseIndex),this._baseIndex=i),r&&r.data&&(this._rowCount+=r.data.length);var o=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(v)g.postMessage({results:r,workerId:$.WORKER_ID,finished:o});else if(f(this._config.chunk)){if(this._config.chunk(r,this._handle),this._paused)return;r=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(r.data),this._completeResults.errors=this._completeResults.errors.concat(r.errors),this._completeResults.meta=r.meta),!o||!f(this._config.complete)||r&&r.meta.aborted||this._config.complete(this._completeResults,this._input),o||r&&r.meta.paused||this._nextChunk(),r}},this._sendError=function(t){f(this._config.error)?this._config.error(t):v&&this._config.error&&g.postMessage({workerId:$.WORKER_ID,error:t,finished:!1})}}function e(e){function n(t){var e=t.getResponseHeader("Content-Range");return null===e?-1:parseInt(e.substr(e.lastIndexOf("/")+1))}(e=e||{}).chunkSize||(e.chunkSize=$.RemoteChunkSize),t.call(this,e);var r;this._nextChunk=m?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(t){this._input=t,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(r=new XMLHttpRequest,this._config.withCredentials&&(r.withCredentials=this._config.withCredentials),m||(r.onload=d(this._chunkLoaded,this),r.onerror=d(this._chunkError,this)),r.open("GET",this._input,!m),this._config.downloadRequestHeaders){var t=this._config.downloadRequestHeaders;for(var e in t)r.setRequestHeader(e,t[e])}if(this._config.chunkSize){var n=this._start+this._config.chunkSize-1;r.setRequestHeader("Range","bytes="+this._start+"-"+n),r.setRequestHeader("If-None-Match","webkit-no-cache")}try{r.send()}catch(t){this._chunkError(t.message)}m&&0===r.status?this._chunkError():this._start+=this._config.chunkSize}},this._chunkLoaded=function(){4==r.readyState&&(r.status<200||r.status>=400?this._chunkError():(this._finished=!this._config.chunkSize||this._start>n(r),this.parseChunk(r.responseText)))},this._chunkError=function(t){var e=r.statusText||t;this._sendError(e)}}function n(e){(e=e||{}).chunkSize||(e.chunkSize=$.LocalChunkSize),t.call(this,e);var n,r,i="undefined"!=typeof FileReader;this.stream=function(t){this._input=t,r=t.slice||t.webkitSlice||t.mozSlice,i?((n=new FileReader).onload=d(this._chunkLoaded,this),n.onerror=d(this._chunkError,this)):n=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var t=this._input;if(this._config.chunkSize){var e=Math.min(this._start+this._config.chunkSize,this._input.size);t=r.call(t,this._start,e)}var o=n.readAsText(t,this._config.encoding);i||this._chunkLoaded({target:{result:o}})},this._chunkLoaded=function(t){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(t.target.result)},this._chunkError=function(){this._sendError(n.error)}}function r(e){e=e||{},t.call(this,e);var n,r;this.stream=function(t){return n=t,r=t,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var t=this._config.chunkSize,e=t?r.substr(0,t):r;return r=t?r.substr(t):"",this._finished=!r,this.parseChunk(e)}}}function i(e){e=e||{},t.call(this,e);var n=[],r=!0;this.stream=function(t){this._input=t,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._nextChunk=function(){n.length?this.parseChunk(n.shift()):r=!0},this._streamData=d(function(t){try{n.push("string"==typeof t?t:t.toString(this._config.encoding)),r&&(r=!1,this.parseChunk(n.shift()))}catch(t){this._streamError(t)}},this),this._streamError=d(function(t){this._streamCleanUp(),this._sendError(t.message)},this),this._streamEnd=d(function(){this._streamCleanUp(),this._finished=!0,this._streamData("")},this),this._streamCleanUp=d(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function o(t){function e(){if(x&&m&&(d("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+$.DefaultDelimiter+"'"),m=!1),t.skipEmptyLines)for(var e=0;e<x.data.length;e++)1===x.data[e].length&&""===x.data[e][0]&&x.data.splice(e--,1);return n()&&r(),s()}function n(){return t.header&&0===C.length}function r(){if(x){for(var t=0;n()&&t<x.data.length;t++)for(var e=0;e<x.data[t].length;e++)C.push(x.data[t][e]);x.data.splice(0,1)}}function i(e){return t.dynamicTypingFunction&&void 0===t.dynamicTyping[e]&&(t.dynamicTyping[e]=t.dynamicTypingFunction(e)),!0===(t.dynamicTyping[e]||t.dynamicTyping)}function o(t,e){return i(t)?"true"===e||"TRUE"===e||"false"!==e&&"FALSE"!==e&&c(e):e}function s(){if(!x||!t.header&&!t.dynamicTyping)return x;for(var e=0;e<x.data.length;e++){for(var n=t.header?{}:[],r=0;r<x.data[e].length;r++){var i=r,a=x.data[e][r];t.header&&(i=r>=C.length?"__parsed_extra":C[r]),a=o(i,a),"__parsed_extra"===i?(n[i]=n[i]||[],n[i].push(a)):n[i]=a}x.data[e]=n,t.header&&(r>C.length?d("FieldMismatch","TooManyFields","Too many fields: expected "+C.length+" fields but parsed "+r,e):r<C.length&&d("FieldMismatch","TooFewFields","Too few fields: expected "+C.length+" fields but parsed "+r,e))}return t.header&&x.meta&&(x.meta.fields=C),x}function u(e,n,r){for(var i,o,s,u=[",","\t","|",";",$.RECORD_SEP,$.UNIT_SEP],l=0;l<u.length;l++){var c=u[l],p=0,d=0,f=0;s=void 0;for(var h=new a({delimiter:c,newline:n,preview:10}).parse(e),g=0;g<h.data.length;g++)if(r&&1===h.data[g].length&&0===h.data[g][0].length)f++;else{var m=h.data[g].length;d+=m,void 0!==s?m>1&&(p+=Math.abs(m-s),s=m):s=m}h.data.length>0&&(d/=h.data.length-f),(void 0===o||p<o)&&d>1.99&&(o=p,i=c)}return t.delimiter=i,{successful:!!i,bestDelimiter:i}}function l(t){var e=(t=t.substr(0,1048576)).split("\r"),n=t.split("\n"),r=n.length>1&&n[0].length<e[0].length;if(1===e.length||r)return"\n";for(var i=0,o=0;o<e.length;o++)"\n"===e[o][0]&&i++;return i>=e.length/2?"\r\n":"\r"}function c(t){return v.test(t)?parseFloat(t):t}function d(t,e,n,r){x.errors.push({type:t,code:e,message:n,row:r})}var h,g,m,v=/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i,y=this,b=0,w=!1,k=!1,C=[],x={data:[],errors:[],meta:{}};if(f(t.step)){var T=t.step;t.step=function(r){if(x=r,n())e();else{if(e(),0===x.data.length)return;b+=r.data.length,t.preview&&b>t.preview?g.abort():T(x,y)}}}this.parse=function(n,r,i){if(t.newline||(t.newline=l(n)),m=!1,t.delimiter)f(t.delimiter)&&(t.delimiter=t.delimiter(n),x.meta.delimiter=t.delimiter);else{var o=u(n,t.newline,t.skipEmptyLines);o.successful?t.delimiter=o.bestDelimiter:(m=!0,t.delimiter=$.DefaultDelimiter),x.meta.delimiter=t.delimiter}var s=p(t);return t.preview&&t.header&&s.preview++,h=n,g=new a(s),x=g.parse(h,r,i),e(),w?{meta:{paused:!0}}:x||{meta:{paused:!1}}},this.paused=function(){return w},this.pause=function(){w=!0,g.abort(),h=h.substr(g.getCharIndex())},this.resume=function(){w=!1,y.streamer.parseChunk(h)},this.aborted=function(){return k},this.abort=function(){k=!0,g.abort(),x.meta.aborted=!0,f(t.complete)&&t.complete(x),h=""}}function a(t){var e=(t=t||{}).delimiter,n=t.newline,r=t.comments,i=t.step,o=t.preview,a=t.fastMode,s=t.quoteChar||'"';if(("string"!=typeof e||$.BAD_DELIMITERS.indexOf(e)>-1)&&(e=","),r===e)throw"Comment character same as delimiter";!0===r?r="#":("string"!=typeof r||$.BAD_DELIMITERS.indexOf(r)>-1)&&(r=!1),"\n"!=n&&"\r"!=n&&"\r\n"!=n&&(n="\n");var u=0,l=!1;this.parse=function(t,c,p){function d(t){C.push(t),S=u}function h(e){return p?m():(void 0===e&&(e=t.substr(u)),T.push(e),u=y,d(T),k&&v(),m())}function g(e){u=e,d(T),T=[],B=t.indexOf(n,u)}function m(t){return{data:C,errors:x,meta:{delimiter:e,linebreak:n,aborted:l,truncated:!!t,cursor:S+(c||0)}}}function v(){i(m()),C=[],x=[]}if("string"!=typeof t)throw"Input must be a string";var y=t.length,b=e.length,w=n.length,$=r.length,k=f(i);u=0;var C=[],x=[],T=[],S=0;if(!t)return m();if(a||!1!==a&&-1===t.indexOf(s)){for(var E=t.split(n),D=0;D<E.length;D++){T=E[D];if(u+=T.length,D!==E.length-1)u+=n.length;else if(p)return m();if(!r||T.substr(0,$)!==r){if(k){if(C=[],d(T.split(e)),v(),l)return m()}else d(T.split(e));if(o&&D>=o)return C=C.slice(0,o),m(!0)}}return m()}for(var A=t.indexOf(e,u),B=t.indexOf(n,u),I=new RegExp(s+s,"g");;)if(t[u]!==s)if(r&&0===T.length&&t.substr(u,$)===r){if(-1===B)return m();u=B+w,B=t.indexOf(n,u),A=t.indexOf(e,u)}else if(-1!==A&&(A<B||-1===B))T.push(t.substring(u,A)),u=A+b,A=t.indexOf(e,u);else{if(-1===B)break;if(T.push(t.substring(u,B)),g(B+w),k&&(v(),l))return m();if(o&&C.length>=o)return m(!0)}else{var O=u;for(u++;;){if(-1===(O=t.indexOf(s,O+1)))return p||x.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:C.length,index:u}),h();if(O===y-1)return h(t.substring(u,O).replace(I,s));if(t[O+1]!==s){if(t[O+1]===e){T.push(t.substring(u,O).replace(I,s)),u=O+1+b,A=t.indexOf(e,u),B=t.indexOf(n,u);break}if(t.substr(O+1,w)===n){if(T.push(t.substring(u,O).replace(I,s)),g(O+1+w),A=t.indexOf(e,u),k&&(v(),l))return m();if(o&&C.length>=o)return m(!0);break}}else O++}}return h()},this.abort=function(){l=!0},this.getCharIndex=function(){return u}}function s(){if(!$.WORKERS_SUPPORTED)return!1;if(!y&&null===$.SCRIPT_PATH)throw new Error("Script path cannot be determined automatically when Papa Parse is loaded asynchronously. You need to set Papa.SCRIPT_PATH manually.");var t=$.SCRIPT_PATH||h;t+=(-1!==t.indexOf("?")?"&":"?")+"papaworker";var e=new g.Worker(t);return e.onmessage=u,e.id=w++,b[e.id]=e,e}function u(t){var e=t.data,n=b[e.workerId],r=!1;if(e.error)n.userError(e.error,e.file);else if(e.results&&e.results.data){var i={abort:function(){r=!0,l(e.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:c,resume:c};if(f(n.userStep)){for(var o=0;o<e.results.data.length&&(n.userStep({data:[e.results.data[o]],errors:e.results.errors,meta:e.results.meta},i),!r);o++);delete e.results}else f(n.userChunk)&&(n.userChunk(e.results,i,e.file),delete e.results)}e.finished&&!r&&l(e.workerId,e.results)}function l(t,e){var n=b[t];f(n.userComplete)&&n.userComplete(e),n.terminate(),delete b[t]}function c(){throw"Not implemented."}function p(t){if("object"!=typeof t)return t;var e=t instanceof Array?[]:{};for(var n in t)e[n]=p(t[n]);return e}function d(t,e){return function(){t.apply(e,arguments)}}function f(t){return"function"==typeof t}var h,g="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==g?g:{},m=!g.document&&!!g.postMessage,v=m&&/(\?|&)papaworker(=|&|$)/.test(g.location.search),y=!1,b={},w=0,$={};if($.parse=function(t,o){var a=(o=o||{}).dynamicTyping||!1;if(f(a)&&(o.dynamicTypingFunction=a,a={}),o.dynamicTyping=a,o.worker&&$.WORKERS_SUPPORTED){var u=s();return u.userStep=o.step,u.userChunk=o.chunk,u.userComplete=o.complete,u.userError=o.error,o.step=f(o.step),o.chunk=f(o.chunk),o.complete=f(o.complete),o.error=f(o.error),delete o.worker,void u.postMessage({input:t,config:o,workerId:u.id})}var l=null;return"string"==typeof t?l=o.download?new e(o):new r(o):!0===t.readable&&f(t.read)&&f(t.on)?l=new i(o):(g.File&&t instanceof File||t instanceof Object)&&(l=new n(o)),l.stream(t)},$.unparse=function(t,e){function n(t){if("object"!=typeof t)return[];var e=[];for(var n in t)e.push(n);return e}function r(t,e){var n="";"string"==typeof t&&(t=JSON.parse(t)),"string"==typeof e&&(e=JSON.parse(e));var r=t instanceof Array&&t.length>0,o=!(e[0]instanceof Array);if(r&&s){for(var a=0;a<t.length;a++)a>0&&(n+=u),n+=i(t[a],a);e.length>0&&(n+=l)}for(var c=0;c<e.length;c++){for(var p=r?t.length:e[c].length,d=0;d<p;d++){d>0&&(n+=u);var f=r&&o?t[d]:d;n+=i(e[c][f],d)}c<e.length-1&&(n+=l)}return n}function i(t,e){return void 0===t||null===t?"":(t=t.toString().replace(p,c+c),"boolean"==typeof a&&a||a instanceof Array&&a[e]||o(t,$.BAD_DELIMITERS)||t.indexOf(u)>-1||" "===t.charAt(0)||" "===t.charAt(t.length-1)?c+t+c:t)}function o(t,e){for(var n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return!0;return!1}var a=!1,s=!0,u=",",l="\r\n",c='"';"object"==typeof e&&("string"==typeof e.delimiter&&1===e.delimiter.length&&-1===$.BAD_DELIMITERS.indexOf(e.delimiter)&&(u=e.delimiter),("boolean"==typeof e.quotes||e.quotes instanceof Array)&&(a=e.quotes),"string"==typeof e.newline&&(l=e.newline),"string"==typeof e.quoteChar&&(c=e.quoteChar),"boolean"==typeof e.header&&(s=e.header));var p=new RegExp(c,"g");if("string"==typeof t&&(t=JSON.parse(t)),t instanceof Array){if(!t.length||t[0]instanceof Array)return r(null,t);if("object"==typeof t[0])return r(n(t[0]),t)}else if("object"==typeof t)return"string"==typeof t.data&&(t.data=JSON.parse(t.data)),t.data instanceof Array&&(t.fields||(t.fields=t.meta&&t.meta.fields),t.fields||(t.fields=t.data[0]instanceof Array?t.fields:n(t.data[0])),t.data[0]instanceof Array||"object"==typeof t.data[0]||(t.data=[t.data])),r(t.fields||[],t.data||[]);throw"exception: Unable to serialize unrecognized input"},$.RECORD_SEP=String.fromCharCode(30),$.UNIT_SEP=String.fromCharCode(31),$.BYTE_ORDER_MARK="\ufeff",$.BAD_DELIMITERS=["\r","\n",'"',$.BYTE_ORDER_MARK],$.WORKERS_SUPPORTED=!m&&!!g.Worker,$.SCRIPT_PATH=null,$.LocalChunkSize=10485760,$.RemoteChunkSize=5242880,$.DefaultDelimiter=",",$.Parser=a,$.ParserHandle=o,$.NetworkStreamer=e,$.FileStreamer=n,$.StringStreamer=r,$.ReadableStreamStreamer=i,g.jQuery){var k=g.jQuery;k.fn.parse=function(t){function e(){if(0!==o.length){var e=o[0];if(f(t.before)){var i=t.before(e.file,e.inputElem);if("object"==typeof i){if("abort"===i.action)return void n("AbortError",e.file,e.inputElem,i.reason);if("skip"===i.action)return void r();"object"==typeof i.config&&(e.instanceConfig=k.extend(e.instanceConfig,i.config))}else if("skip"===i)return void r()}var a=e.instanceConfig.complete;e.instanceConfig.complete=function(t){f(a)&&a(t,e.file,e.inputElem),r()},$.parse(e.file,e.instanceConfig)}else f(t.complete)&&t.complete()}function n(e,n,r,i){f(t.error)&&t.error({name:e},n,r,i)}function r(){o.splice(0,1),e()}var i=t.config||{},o=[];return this.each(function(t){if(!("INPUT"===k(this).prop("tagName").toUpperCase()&&"file"===k(this).attr("type").toLowerCase()&&g.FileReader)||!this.files||0===this.files.length)return!0;for(var e=0;e<this.files.length;e++)o.push({file:this.files[e],inputElem:this,instanceConfig:k.extend({},i)})}),e(),this}}return v?g.onmessage=function(t){var e=t.data;if(void 0===$.WORKER_ID&&e&&($.WORKER_ID=e.workerId),"string"==typeof e.input)g.postMessage({workerId:$.WORKER_ID,results:$.parse(e.input,e.config),finished:!0});else if(g.File&&e.input instanceof File||e.input instanceof Object){var n=$.parse(e.input,e.config);n&&g.postMessage({workerId:$.WORKER_ID,results:n,finished:!0})}}:$.WORKERS_SUPPORTED&&(h=function(){var t=document.getElementsByTagName("script");return t.length?t[t.length-1].src:""}(),document.body?document.addEventListener("DOMContentLoaded",function(){y=!0},!0):y=!0),e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n.prototype=Object.create(t.prototype),n.prototype.constructor=n,r.prototype=Object.create(r.prototype),r.prototype.constructor=r,i.prototype=Object.create(t.prototype),i.prototype.constructor=i,$}),"undefined"==typeof jQuery)throw new Error("AdminLTE requires jQuery");$.AdminLTE={},$.AdminLTE.options={navbarMenuSlimscroll:!0,navbarMenuSlimscrollWidth:"3px",navbarMenuHeight:"200px",animationSpeed:500,sidebarToggleSelector:"[data-toggle='offcanvas']",sidebarPushMenu:!0,sidebarSlimScroll:!0,sidebarExpandOnHover:!1,enableBoxRefresh:!0,enableBSToppltip:!0,BSTooltipSelector:"[data-toggle='tooltip']",enableFastclick:!1,enableControlTreeView:!0,enableControlSidebar:!0,controlSidebarOptions:{toggleBtnSelector:"[data-toggle='control-sidebar']",selector:".control-sidebar",slide:!0},enableBoxWidget:!0,boxWidgetOptions:{boxWidgetIcons:{collapse:"fa-minus",open:"fa-plus",remove:"fa-times"},boxWidgetSelectors:{remove:'[data-widget="remove"]',collapse:'[data-widget="collapse"]'}},directChat:{enable:!0,contactToggleSelector:'[data-widget="chat-pane-toggle"]'},colors:{lightBlue:"#3c8dbc",red:"#f56954",green:"#00a65a",aqua:"#00c0ef",yellow:"#f39c12",blue:"#0073b7",navy:"#001F3F",teal:"#39CCCC",olive:"#3D9970",lime:"#01FF70",orange:"#FF851B",fuchsia:"#F012BE",purple:"#8E24AA",maroon:"#D81B60",black:"#222222",gray:"#d2d6de"},screenSizes:{xs:480,sm:768,md:992,lg:1200}},$(function(){"use strict";$("body").removeClass("hold-transition"),"undefined"!=typeof AdminLTEOptions&&$.extend(!0,$.AdminLTE.options,AdminLTEOptions);var t=$.AdminLTE.options;_init(),$.AdminLTE.layout.activate(),t.enableControlTreeView&&$.AdminLTE.tree(".sidebar"),t.enableControlSidebar&&$.AdminLTE.controlSidebar.activate(),t.navbarMenuSlimscroll&&void 0!==$.fn.slimscroll&&$(".navbar .menu").slimscroll({height:t.navbarMenuHeight,alwaysVisible:!1,size:t.navbarMenuSlimscrollWidth}).css("width","100%"),t.sidebarPushMenu&&$.AdminLTE.pushMenu.activate(t.sidebarToggleSelector),t.enableBSToppltip&&$("body").tooltip({selector:t.BSTooltipSelector,container:"body"}),t.enableBoxWidget&&$.AdminLTE.boxWidget.activate(),t.enableFastclick&&"undefined"!=typeof FastClick&&FastClick.attach(document.body),t.directChat.enable&&$(document).on("click",t.directChat.contactToggleSelector,function(){$(this).parents(".direct-chat").first().toggleClass("direct-chat-contacts-open")}),$('.btn-group[data-toggle="btn-toggle"]').each(function(){var t=$(this);$(this).find(".btn").on("click",function(e){t.find(".btn.active").removeClass("active"),$(this).addClass("active"),e.preventDefault()})})}),function(t){"use strict";t.fn.boxRefresh=function(e){function n(t){t.append(o),i.onLoadStart.call(t)}function r(t){t.find(o).remove(),i.onLoadDone.call(t)}var i=t.extend({trigger:".refresh-btn",source:"",onLoadStart:function(t){return t},onLoadDone:function(t){return t}},e),o=t('<div class="overlay"><div class="fa fa-refresh fa-spin"></div></div>');return this.each(function(){if(""!==i.source){var e=t(this);e.find(i.trigger).first().on("click",function(t){t.preventDefault(),n(e),e.find(".box-body").load(i.source,function(){r(e)})})}else window.console&&window.console.log("Please specify a source first - boxRefresh()")})}}(jQuery),function(t){"use strict";t.fn.activateBox=function(){t.AdminLTE.boxWidget.activate(this)},t.fn.toggleBox=function(){var e=t(t.AdminLTE.boxWidget.selectors.collapse,this);t.AdminLTE.boxWidget.collapse(e)},t.fn.removeBox=function(){var e=t(t.AdminLTE.boxWidget.selectors.remove,this);t.AdminLTE.boxWidget.remove(e)}}(jQuery),function(t){"use strict";t.fn.todolist=function(e){var n=t.extend({onCheck:function(t){return t},onUncheck:function(t){return t}},e);return this.each(function(){void 0!==t.fn.iCheck?(t("input",this).on("ifChecked",function(){var e=t(this).parents("li").first();e.toggleClass("done"),n.onCheck.call(e)}),t("input",this).on("ifUnchecked",function(){var e=t(this).parents("li").first();e.toggleClass("done"),n.onUncheck.call(e)})):t("input",this).on("change",function(){var e=t(this).parents("li").first();e.toggleClass("done"),t("input",e).is(":checked")?n.onCheck.call(e):n.onUncheck.call(e)})})}}(jQuery);