function config(n){n.setDefaults({style:"box"})}function groupBy(n,t,i,r){"use strict";var u=r?r.join(","):"";return n.reduce(function(n,r){var f=t.map(function(n){return r[n]}).join(",");return f!==u&&(n[f]=n[f]||[],(!i||n[f].length<i)&&n[f].push(r)),n},{})}function getQueryStringValue(n){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(n).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}function onReCaptchaSuccess(n){var t=angular.element(document.getElementById("LaurelBurchCtrl")).scope(),t=angular.element(document.getElementById("enterGiveawayModal")).scope();t.$apply(function(){t.base.capResponse=n})}function onReCaptchaSuccess(n){var t=angular.element(document.getElementById("SurveyCtrl")).scope(),t=angular.element(document.getElementById("surveyModal")).scope();t.$apply(function(){t.base.capResponse=n})}var app,paperblanksCtrls;(function(n){"use strict";function kl(n){if(o(n))r(n.objectMaxDepth)&&(ro.objectMaxDepth=lf(n.objectMaxDepth)?n.objectMaxDepth:NaN),r(n.urlErrorParamsEnabled)&&dt(n.urlErrorParamsEnabled)&&(ro.urlErrorParamsEnabled=n.urlErrorParamsEnabled);else return ro}function lf(n){return d(n)&&0<n}function l(n,t){return t=t||Error,function(){for(var r=arguments[0],f,i,u="["+(n?n+":":"")+r+"] http://errors.angularjs.org/1.7.2/"+(n?n+"/":"")+r,r=1;r<arguments.length;r++)u=u+(1==r?"?":"&")+"p"+(r-1)+"=",f=encodeURIComponent,i=arguments[r],i="function"==typeof i?i.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof i?"undefined":"string"!=typeof i?JSON.stringify(i):i,u+=f(i);return new t(u)}}function ni(n){if(null==n||er(n))return!1;if(c(n)||h(n)||f&&n instanceof f)return!0;var t="length"in Object(n)&&n.length;return d(t)&&(0<=t&&t-1 in n||"function"==typeof n.item)}function t(n,i,r){var u,f,o;if(n)if(e(n))for(u in n)"prototype"!==u&&"length"!==u&&"name"!==u&&n.hasOwnProperty(u)&&i.call(r,n[u],u,n);else if(c(n)||ni(n))for(o="object"!=typeof n,u=0,f=n.length;u<f;u++)(o||u in n)&&i.call(r,n[u],u,n);else if(n.forEach&&n.forEach!==t)n.forEach(i,r,n);else if(wo(n))for(u in n)i.call(r,n[u],u,n);else if("function"==typeof n.hasOwnProperty)for(u in n)n.hasOwnProperty(u)&&i.call(r,n[u],u,n);else for(u in n)vt.call(n,u)&&i.call(r,n[u],u,n);return n}function po(n,t,i){for(var r=Object.keys(n).sort(),u=0;u<r.length;u++)t.call(i,n[r[u]],r[u]);return r}function af(n){return function(t,i){n(i,t)}}function dl(){return++tf}function vf(n,t,i){for(var f,u,r,l=n.$$hashKey,s=0,v=t.length;s<v;++s)if(f=t[s],o(f)||e(f))for(var a=Object.keys(f),h=0,y=a.length;h<y;h++)u=a[h],r=f[u],i&&o(r)?et(r)?n[u]=new Date(r.valueOf()):fr(r)?n[u]=new RegExp(r):r.nodeName?n[u]=r.cloneNode(!0):bf(r)?n[u]=r.clone():(o(n[u])||(n[u]=c(r)?[]:{}),vf(n[u],[r],!0)):n[u]=r;return l?n.$$hashKey=l:delete n.$$hashKey,n}function v(n){return vf(n,kt.call(arguments,1),!1)}function gl(n){return vf(n,kt.call(arguments,1),!0)}function it(n){return parseInt(n,10)}function yf(n,t){return v(Object.create(n),t)}function s(){}function vi(n){return n}function st(n){return function(){return n}}function pf(n){return e(n.toString)&&n.toString!==ut}function u(n){return"undefined"==typeof n}function r(n){return"undefined"!=typeof n}function o(n){return null!==n&&"object"==typeof n}function wo(n){return null!==n&&"object"==typeof n&&!fc(n)}function h(n){return"string"==typeof n}function d(n){return"number"==typeof n}function et(n){return"[object Date]"===ut.call(n)}function c(n){return Array.isArray(n)||n instanceof Array}function wf(n){switch(ut.call(n)){case"[object Error]":return!0;case"[object Exception]":return!0;case"[object DOMException]":return!0;default:return n instanceof Error}}function e(n){return"function"==typeof n}function fr(n){return"[object RegExp]"===ut.call(n)}function er(n){return n&&n.window===n}function or(n){return n&&n.$evalAsync&&n.$watch}function dt(n){return"boolean"==typeof n}function na(n){return n&&d(n.length)&&up.test(ut.call(n))}function bf(n){return!(!n||!(n.nodeName||n.prop&&n.attr&&n.find))}function ta(n){var i={},t;for(n=n.split(","),t=0;t<n.length;t++)i[n[t]]=!0;return i}function ht(n){return a(n.nodeName||n[0]&&n[0].nodeName)}function sr(n,t){var i=n.indexOf(t);return 0<=i&&n.splice(i,1),i}function ri(n,i,r){function h(n,t,i){var f,r,e;if(i--,0>i)return"...";if(f=t.$$hashKey,c(n))for(r=0,e=n.length;r<e;r++)t.push(u(n[r],i));else if(wo(n))for(r in n)t[r]=u(n[r],i);else if(n&&"function"==typeof n.hasOwnProperty)for(r in n)n.hasOwnProperty(r)&&(t[r]=u(n[r],i));else for(r in n)vt.call(n,r)&&(t[r]=u(n[r],i));return f?t.$$hashKey=f:delete t.$$hashKey,t}function u(n,t){var i,r;if(!o(n))return n;if(i=f.indexOf(n),-1!==i)return s[i];if(er(n)||or(n))throw si("cpws");return i=!1,r=l(n),void 0===r&&(r=c(n)?[]:Object.create(fc(n)),i=!0),f.push(n),s.push(r),i?h(n,r,t):r}function l(n){switch(ut.call(n)){case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Float32Array]":case"[object Float64Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return new n.constructor(u(n.buffer),n.byteOffset,n.length);case"[object ArrayBuffer]":if(!n.slice){var t=new ArrayBuffer(n.byteLength);return new Uint8Array(t).set(new Uint8Array(n)),t}return n.slice(0);case"[object Boolean]":case"[object Number]":case"[object String]":case"[object Date]":return new n.constructor(n.valueOf());case"[object RegExp]":return t=new RegExp(n.source,n.toString().match(/[^/]*$/)[0]),t.lastIndex=n.lastIndex,t;case"[object Blob]":return new n.constructor([n],{type:n.type})}if(e(n.cloneNode))return n.cloneNode(!0)}var f=[],s=[];if(r=lf(r)?r:NaN,i){if(na(i)||"[object ArrayBuffer]"===ut.call(i))throw si("cpta");if(n===i)throw si("cpi");return c(i)?i.length=0:t(i,function(n,t){"$$hashKey"!==t&&delete i[t]}),f.push(n),s.push(i),h(n,i,r)}return u(n,r)}function kf(n,t){return n===t||n!==n&&t!==t}function ct(n,t){if(n===t)return!0;if(null===n||null===t)return!1;if(n!==n&&t!==t)return!0;var u=typeof n,i;if(u===typeof t&&"object"===u)if(c(n)){if(!c(t))return!1;if((u=n.length)===t.length){for(i=0;i<u;i++)if(!ct(n[i],t[i]))return!1;return!0}}else{if(et(n))return et(t)?kf(n.getTime(),t.getTime()):!1;if(fr(n))return fr(t)?n.toString()===t.toString():!1;if(or(n)||or(t)||er(n)||er(t)||c(t)||et(t)||fr(t))return!1;u=p();for(i in n)if("$"!==i.charAt(0)&&!e(n[i])){if(!ct(n[i],t[i]))return!1;u[i]=!0}for(i in t)if(!(i in u)&&"$"!==i.charAt(0)&&r(t[i])&&!e(t[i]))return!1;return!0}return!1}function hr(n,t,i){return n.concat(kt.call(t,i))}function yi(n,t){var i=2<arguments.length?kt.call(arguments,2):[];return!e(t)||t instanceof RegExp?t:i.length?function(){return arguments.length?t.apply(n,hr(i,arguments,0)):t.apply(n,i)}:function(){return arguments.length?t.apply(n,arguments):t.call(n)}}function bo(t,i){var r=i;return"string"==typeof t&&"$"===t.charAt(0)&&"$"===t.charAt(1)?r=void 0:er(i)?r="$WINDOW":i&&n.document===i?r="$DOCUMENT":or(i)&&(r="$SCOPE"),r}function cr(n,t){if(!u(n))return d(t)||(t=t?2:null),JSON.stringify(n,bo,t)}function ko(n){return h(n)?JSON.parse(n):n}function df(n,t){n=n.replace(fp,"");var i=Date.parse("Jan 01, 1970 00:00:00 "+n)/6e4;return rt(i)?t:i}function go(n,t){return n=new Date(n.getTime()),n.setMinutes(n.getMinutes()+t),n}function gf(n,t,i){i=i?-1:1;var r=n.getTimezoneOffset();return t=df(t,r),go(n,i*(t-r))}function pt(n){n=f(n).clone().empty();var t=f("<div><\/div>").append(n).html();try{return n[0].nodeType===ti?a(t):t.match(/^(<[^>]+>)/)[1].replace(/^<([\w-]+)/,function(n,t){return"<"+a(t)})}catch(i){return a(t)}}function ns(n){try{return decodeURIComponent(n)}catch(t){}}function ne(n){var i={};return t((n||"").split("&"),function(n){var f,t,u;n&&(t=n=n.replace(/\+/g,"%20"),f=n.indexOf("="),-1!==f&&(t=n.substring(0,f),u=n.substring(f+1)),t=ns(t),r(t)&&(u=r(u)?ns(u):!0,vt.call(i,t)?c(i[t])?i[t].push(u):i[t]=[i[t],u]:i[t]=u))}),i}function te(n){var i=[];return t(n,function(n,r){c(n)?t(n,function(n){i.push(ot(r,!0)+(!0===n?"":"="+ot(n,!0)))}):i.push(ot(r,!0)+(!0===n?"":"="+ot(n,!0)))}),i.length?i.join("&"):""}function lr(n){return ot(n,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ot(n,t){return encodeURIComponent(n).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,t?"%20":"+")}function ia(n,t){for(var i,u=gi.length,r=0;r<u;++r)if(i=gi[r]+t,h(i=n.getAttribute(i)))return i;return null}function ra(i,r){var u,f,e={};t(gi,function(n){n+="app";!u&&i.hasAttribute&&i.hasAttribute(n)&&(u=i,f=i.getAttribute(n))});t(gi,function(n){n+="app";var t;!u&&(t=i.querySelector("["+n.replace(":","\\:")+"]"))&&(u=t,f=t.getAttribute(n))});u&&(ep?(e.strictDi=null!==ia(u,"strict-di"),r(u,f?[f]:[],e)):n.console.error("AngularJS: disabling automatic bootstrap. <script> protocol indicates an extension, document.location.href does not match."))}function ts(i,r,u){o(u)||(u={});u=v({strictDi:!1},u);var s=function(){if(i=f(i),i.injector()){var t=i[0]===n.document?"document":pt(i);throw si("btstrpd",t.replace(/</,"&lt;").replace(/>/,"&gt;"));}return r=r||[],r.unshift(["$provide",function(n){n.value("$rootElement",i)}]),u.debugInfoEnabled&&r.push(["$compileProvider",function(n){n.debugInfoEnabled(!0)}]),r.unshift("ng"),t=vr(r,u.strictDi),t.invoke(["$rootScope","$rootElement","$compile","$injector",function(n,t,i,r){n.$apply(function(){t.data("$injector",r);i(t)(n)})}]),t},h=/^NG_ENABLE_DEBUG_INFO!/,c=/^NG_DEFER_BOOTSTRAP!/;if(n&&h.test(n.name)&&(u.debugInfoEnabled=!0,n.name=n.name.replace(h,"")),n&&!c.test(n.name))return s();n.name=n.name.replace(c,"");ft.resumeBootstrap=function(n){return t(n,function(n){r.push(n)}),s()};e(ft.resumeDeferredBootstrap)&&ft.resumeDeferredBootstrap()}function ua(){n.name="NG_ENABLE_DEBUG_INFO!"+n.name;n.location.reload()}function fa(n){if(n=ft.element(n).injector(),!n)throw si("test");return n.get("$$testability")}function is(n,t){return t=t||"_",n.replace(op,function(n,i){return(i?t:"")+n.toLowerCase()})}function ea(){var i,t;oc||(t=rf(),(nf=u(t)?n.jQuery:t?n[t]:void 0)&&nf.fn.on?(f=nf,v(nf.fn,{scope:nr.scope,isolateScope:nr.isolateScope,controller:nr.controller,injector:nr.injector,inheritedData:nr.inheritedData})):f=w,i=f.cleanData,f.cleanData=function(n){for(var r,u=0,t;null!=(t=n[u]);u++)(r=f._data(t).events)&&r.$destroy&&f(t).triggerHandler("$destroy");i(n)},ft.element=f,oc=!0)}function ar(n,t,i){if(!n)throw si("areq",t||"?",i||"required");return n}function iu(n,t,i){return i&&c(n)&&(n=n[n.length-1]),ar(e(n),t,"not a function, got "+(n&&"object"==typeof n?n.constructor.name||"Object":typeof n)),n}function pi(n,t){if("hasOwnProperty"===n)throw si("badname",t);}function oa(n,t,i){if(!t)return n;t=t.split(".");for(var u,f=n,o=t.length,r=0;r<o;r++)u=t[r],n&&(n=(f=n)[u]);return!i&&e(n)?yi(f,n):n}function ru(n){for(var t=n[0],u=n[n.length-1],i,r=1;t!==u&&(t=t.nextSibling);r++)(i||n[r]!==t)&&(i||(i=f(kt.call(n,0,r))),i.push(t));return i||n}function p(){return Object.create(null)}function ie(n){if(null==n)return"";switch(typeof n){case"string":break;case"number":n=""+n;break;default:n=!pf(n)||c(n)||et(n)?cr(n):n.toString()}return n}function sa(n){function t(n,t,i){return n[t]||(n[t]=i())}var u=l("$injector"),i=l("ng");return n=t(n,"angular",Object),n.$$minErr=n.$$minErr||l,t(n,"module",function(){var n={};return function(f,s,h){var c={};if("hasOwnProperty"===f)throw i("badname","module");return s&&n.hasOwnProperty(f)&&(n[f]=null),t(n,f,function(){function t(n,t,i,r){return r||(r=l),function(){return r[i||"push"]([n,t,arguments]),v}}function n(n,t,i){return i||(i=l),function(r,u){return u&&e(u)&&(u.$$moduleName=f),i.push([n,t,arguments]),v}}if(!s)throw u("nomod",f);var l=[],a=[],y=[],p=t("$injector","invoke","push",a),v={_invokeQueue:l,_configBlocks:a,_runBlocks:y,info:function(n){if(r(n)){if(!o(n))throw i("aobj","value");return c=n,this}return c},requires:s,name:f,provider:n("$provide","provider"),factory:n("$provide","factory"),service:n("$provide","service"),value:t("$provide","value"),constant:t("$provide","constant","unshift"),decorator:n("$provide","decorator",a),animation:n("$animateProvider","register"),filter:n("$filterProvider","register"),controller:n("$controllerProvider","register"),directive:n("$compileProvider","directive"),component:n("$compileProvider","component"),config:p,run:function(n){return y.push(n),this}};return h&&p(h),v})}})}function wt(n,t){if(c(n)){t=t||[];for(var i=0,r=n.length;i<r;i++)t[i]=n[i]}else if(o(n))for(i in t=t||{},n)("$"!==i.charAt(0)||"$"!==i.charAt(1))&&(t[i]=n[i]);return t||n}function ha(n,t){var i=[];return lf(t)&&(n=ft.copy(n,null,t)),JSON.stringify(n,function(n,t){if(t=bo(n,t),o(t)){if(0<=i.indexOf(t))return"...";i.push(t)}return t})}function ca(i){v(i,{errorHandlingConfig:kl,bootstrap:ts,copy:ri,extend:v,merge:gl,equals:ct,element:f,forEach:t,injector:vr,noop:s,bind:yi,toJson:cr,fromJson:ko,identity:vi,isUndefined:u,isDefined:r,isString:h,isFunction:e,isObject:o,isNumber:d,isElement:bf,isArray:c,version:sp,isDate:et,callbacks:{$$counter:0},getTestability:fa,reloadWithDebugInfo:ua,$$minErr:l,$$csp:hi,$$encodeUriSegment:lr,$$encodeUriQuery:ot,$$lowercase:a,$$stringify:ie,$$uppercase:gu});uo=sa(n);uo("ng",["ngLocale"],["$provide",function(n){n.provider({$$sanitizeUri:uy});n.provider("$compile",vs).directive({a:nl,input:sl,textarea:sl,form:ib,script:gk,select:id,option:rd,ngBind:cb,ngBindHtml:ab,ngBindTemplate:lb,ngClass:yb,ngClassEven:wb,ngClassOdd:pb,ngCloak:bb,ngController:kb,ngForm:rb,ngHide:vk,ngIf:gb,ngInclude:nk,ngInit:ik,ngNonBindable:fk,ngPluralize:hk,ngRef:ck,ngRepeat:lk,ngShow:ak,ngStyle:yk,ngSwitch:pk,ngSwitchWhen:wk,ngSwitchDefault:bk,ngOptions:sk,ngTransclude:dk,ngModel:ll,ngList:rk,ngChange:vb,pattern:pl,ngPattern:pl,required:yl,ngRequired:yl,minlength:bl,ngMinlength:bl,maxlength:wl,ngMaxlength:wl,ngValue:hb,ngModelOptions:uk}).directive({ngInclude:tk}).directive(gr).directive(hl);n.provider({$anchorScroll:ba,$animate:iw,$animateCss:fw,$$animateJs:nw,$$animateQueue:tw,$$AnimateRunner:uw,$$animateAsyncRun:rw,$browser:ga,$cacheFactory:nv,$controller:rv,$document:uv,$$isDocumentHidden:fv,$exceptionHandler:ev,$filter:lh,$$forceReflow:ow,$interpolate:vv,$interval:yv,$http:hv,$httpParamSerializer:ov,$httpParamSerializerJQLike:sv,$httpBackend:lv,$xhrFactory:cv,$jsonpCallbacks:aw,$location:pv,$log:wv,$parse:gv,$rootScope:ry,$q:ny,$$q:ty,$sce:oy,$sceDelegate:ey,$sniffer:sy,$templateCache:tv,$templateRequest:hy,$$testability:cy,$timeout:ly,$window:vy,$$rAF:iy,$$jqLite:pa,$$Map:pp,$$cookieReader:yy})}]).info({angularVersion:"1.7.2"})}function uu(n,t){return t.toUpperCase()}function fu(n){return n.replace(hp,uu)}function re(n){return n=n.nodeType,1===n||!n||9===n}function rs(n,i){var u,r,f=i.createDocumentFragment(),e=[];if(eo.test(n)){for(u=f.appendChild(i.createElement("div")),r=(ap.exec(n)||["",""])[1].toLowerCase(),r=yt[r]||yt._default,u.innerHTML=r[1]+n.replace(vp,"<$1><\/$2>")+r[2],r=r[0];r--;)u=u.lastChild;e=hr(e,u.childNodes);u=f.firstChild;u.textContent=""}else e.push(i.createTextNode(n));return f.textContent="",f.innerHTML="",t(e,function(n){f.appendChild(n)}),f}function w(t){var i,r;if(t instanceof w)return t;if(h(t)&&(t=y(t),i=!0),!(this instanceof w)){if(i&&"<"!==t.charAt(0))throw fo("nosel");return new w(t)}i?(i=n.document,t=(r=lp.exec(t))?[i.createElement(r[1])]:(r=rs(t,i))?r.childNodes:[],oe(this,t)):e(t)?hs(t):oe(this,t)}function ue(n){return n.cloneNode(!0)}function eu(n,t){!t&&re(n)&&f.cleanData([n]);n.querySelectorAll&&f.cleanData(n.querySelectorAll("*"))}function us(n){for(var t in n)return!1;return!0}function fs(n){var i=n.ng339,t=i&&ci[i],r=t&&t.events,t=t&&t.data;t&&!us(t)||r&&!us(r)||(delete ci[i],n.ng339=void 0)}function es(n,i,u,f){var e,o,s;if(r(f))throw fo("offargs");if(e=(f=ou(n))&&f.events,o=f&&f.handle,o){if(i)s=function(t){var i=e[t];r(u)&&sr(i||[],u);r(u)&&i&&0<i.length||(n.removeEventListener(t,o),delete e[t])},t(i.split(" "),function(n){s(n);uf[n]&&s(uf[n])});else for(i in e)"$destroy"!==i&&n.removeEventListener(i,o),delete e[i];fs(n)}}function fe(n,t){var i=n.ng339;(i=i&&ci[i])&&(t?delete i.data[t]:i.data={},fs(n))}function ou(n,t){var i=n.ng339,i=i&&ci[i];return t&&!i&&(n.ng339=i=++sc,i=ci[i]={events:{},data:{},handle:void 0}),i}function ee(n,t,i){if(re(n)){var u,f=r(i),e=!f&&t&&!o(t),s=!t;if(n=(n=ou(n,!e))&&n.data,f)n[fu(t)]=i;else{if(s)return n;if(e)return n&&n[fu(t)];for(u in t)n[fu(u)]=t[u]}}}function su(n,t){return n.getAttribute?-1<(" "+(n.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" "):!1}function hu(n,i){if(i&&n.setAttribute){var u=(" "+(n.getAttribute("class")||"")+" ").replace(/[\n\t]/g," "),r=u;t(i.split(" "),function(n){n=y(n);r=r.replace(" "+n+" "," ")});r!==u&&n.setAttribute("class",y(r))}}function cu(n,i){if(i&&n.setAttribute){var u=(" "+(n.getAttribute("class")||"")+" ").replace(/[\n\t]/g," "),r=u;t(i.split(" "),function(n){n=y(n);-1===r.indexOf(" "+n+" ")&&(r+=n+" ")});r!==u&&n.setAttribute("class",y(r))}}function oe(n,t){var i,r;if(t)if(t.nodeType)n[n.length++]=t;else if(i=t.length,"number"==typeof i&&t.window!==t){if(i)for(r=0;r<i;r++)n[n.length++]=t[r]}else n[n.length++]=t}function os(n,t){return lu(n,"$"+(t||"ngController")+"Controller")}function lu(n,t,i){for(9===n.nodeType&&(n=n.documentElement),t=c(t)?t:[t];n;){for(var u=0,e=t.length;u<e;u++)if(r(i=f.data(n,t[u])))return i;n=n.parentNode||11===n.nodeType&&n.host}}function ss(n){for(eu(n,!0);n.firstChild;)n.removeChild(n.firstChild)}function au(n,t){t||eu(n);var i=n.parentNode;i&&i.removeChild(n)}function la(t,i){if(i=i||n,"complete"===i.document.readyState)i.setTimeout(t);else f(i).on("load",t)}function hs(t){function i(){n.document.removeEventListener("DOMContentLoaded",i);n.removeEventListener("load",i);t()}"complete"===n.document.readyState?n.setTimeout(t):(n.document.addEventListener("DOMContentLoaded",i),n.addEventListener("load",i))}function cs(n,t){var i=ff[t.toLowerCase()];return i&&oo[ht(n)]&&i}function aa(n,t){var i=function(i,r){var f,e,s,h,o;if(i.isDefaultPrevented=function(){return i.defaultPrevented},f=t[r||i.type],e=f?f.length:0,e)for(u(i.immediatePropagationStopped)&&(s=i.stopImmediatePropagation,i.stopImmediatePropagation=function(){i.immediatePropagationStopped=!0;i.stopPropagation&&i.stopPropagation();s&&s.call(i)}),i.isImmediatePropagationStopped=function(){return!0===i.immediatePropagationStopped},h=f.specialHandlerWrapper||va,1<e&&(f=wt(f)),o=0;o<e;o++)i.isImmediatePropagationStopped()||h(n,i,f[o])};return i.elem=n,i}function va(n,t,i){i.call(n,t)}function ya(n,t,i){var r=t.relatedTarget;r&&(r===n||yp.call(n,r))||i.call(n,t)}function pa(){this.$get=function(){return v(w,{hasClass:function(n,t){return n.attr&&(n=n[0]),su(n,t)},addClass:function(n,t){return n.attr&&(n=n[0]),cu(n,t)},removeClass:function(n,t){return n.attr&&(n=n[0]),hu(n,t)}})}}function wi(n,t){var i=n&&n.$$hashKey;return i?("function"==typeof i&&(i=n.$$hashKey()),i):(i=typeof n,"function"===i||"object"===i&&null!==n?n.$$hashKey=i+":"+(t||dl)():i+":"+n)}function ls(){this._keys=[];this._values=[];this._lastKey=NaN;this._lastIndex=-1}function as(n){return n=Function.prototype.toString.call(n).replace(gp,""),n.match(wp)||n.match(bp)}function wa(n){return(n=as(n))?"function("+(n[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function vr(n,i){function l(n){return function(i,r){if(o(i))t(i,af(n));else return n(i,r)}}function k(n,t){if(pi(n,"service"),(e(t)||c(t))&&(t=f.instantiate(t)),!t.$get)throw li("pget",n);return s[n+"Provider"]=t}function it(n,t){return function(){var i=r.invoke(t,this);if(u(i))throw li("undef",n);return i}}function v(n,t,i){return k(n,{$get:!1!==i?it(n,t):t})}function y(n){ar(u(n)||c(n),"modulesToLoad","not an array");var o=[],i;return t(n,function(n){function u(n){for(var i,r,t=0,u=n.length;t<u;t++)i=n[t],r=f.get(i[0]),r[i[1]].apply(r,i[2])}if(!g.get(n)){g.set(n,!0);try{h(n)?(i=uo(n),r.modules[n]=i,o=o.concat(y(i.requires)).concat(i._runBlocks),u(i._invokeQueue),u(i._configBlocks)):e(n)?o.push(f.invoke(n)):c(n)?o.push(f.invoke(n)):iu(n,"module")}catch(t){throw c(n)&&(n=n[n.length-1]),t.message&&t.stack&&-1===t.stack.indexOf(t.message)&&(t=t.message+"\n"+t.stack),li("modulerr",n,t.stack||t.message||t);}}}),o}function d(n,t){function r(i,r){if(n.hasOwnProperty(i)){if(n[i]===w)throw li("cdep",i+" <- "+a.join(" <- "));return n[i]}try{return a.unshift(i),n[i]=w,n[i]=t(i,r),n[i]}catch(u){throw n[i]===w&&delete n[i],u;}finally{a.shift()}}function u(n,t,u){var o=[],e,s,f;for(n=vr.$$annotate(n,i,u),e=0,s=n.length;e<s;e++){if(f=n[e],"string"!=typeof f)throw li("itkn",f);o.push(t&&t.hasOwnProperty(f)?t[f]:r(f,u))}return o}return{invoke:function(n,t,i,r){if("string"==typeof i&&(r=i,i=null),i=u(n,i,r),c(n)&&(n=n[n.length-1]),r=n,bt||"function"!=typeof r)r=!1;else{var f=r.$$ngIsClass;dt(f)||(f=r.$$ngIsClass=/^class\b/.test(Function.prototype.toString.call(r)));r=f}return r?(i.unshift(null),new(Function.prototype.bind.apply(n,i))):n.apply(t,i)},instantiate:function(n,t,i){var r=c(n)?n[n.length-1]:n;return n=u(n,t,i),n.unshift(null),new(Function.prototype.bind.apply(r,n))},get:r,annotate:vr.$$annotate,has:function(t){return s.hasOwnProperty(t+"Provider")||n.hasOwnProperty(t)}}}var tt,r;i=!0===i;var w={},a=[],g=new ef,s={$provide:{provider:l(k),factory:l(v),service:l(function(n,t){return v(n,["$injector",function(n){return n.instantiate(t)}])}),value:l(function(n,t){return v(n,st(t),!1)}),constant:l(function(n,t){pi(n,"constant");s[n]=t;nt[n]=t}),decorator:function(n,t){var i=f.get(n+"Provider"),u=i.$get;i.$get=function(){var n=r.invoke(u,i);return r.invoke(t,null,{$delegate:n})}}}},f=s.$injector=d(s,function(n,t){ft.isString(t)&&a.push(t);throw li("unpr",a.join(" <- "));}),nt={},b=d(nt,function(n,t){var i=f.get(n+"Provider",t);return r.invoke(i.$get,i,void 0,n)}),r=b;return s.$injectorProvider={$get:st(b)},r.modules=f.modules=p(),tt=y(n),r=b.get("$injector"),r.strictDi=i,t(tt,function(n){n&&r.invoke(n)}),r.loadNewModules=function(n){t(y(n),function(n){n&&r.invoke(n)})},r}function ba(){var n=!0;this.disableAutoScrolling=function(){n=!1};this.$get=["$window","$location","$rootScope",function(t,i,r){function s(n){var t=null;return Array.prototype.some.call(n,function(n){if("a"===ht(n))return t=n,!0}),t}function u(n){if(n){n.scrollIntoView();var i;i=f.yOffset;e(i)?i=i():bf(i)?(i=i[0],i="fixed"!==t.getComputedStyle(i).position?0:i.getBoundingClientRect().bottom):d(i)||(i=0);i&&(n=n.getBoundingClientRect().top,t.scrollBy(0,n-i))}else t.scrollTo(0,0)}function f(n){n=h(n)?n:d(n)?n.toString():i.hash();var t;n?(t=o.getElementById(n))?u(t):(t=s(o.getElementsByName(n)))?u(t):"top"===n&&u(null):u(null)}var o=t.document;return n&&r.$watch(function(){return i.hash()},function(n,t){n===t&&""===n||la(function(){r.$evalAsync(f)})}),f}]}function yr(n,t){return!n&&!t?"":n?t?(c(n)&&(n=n.join(" ")),c(t)&&(t=t.join(" ")),n+" "+t):n:t}function ka(n){h(n)&&(n=n.split(" "));var i=p();return t(n,function(n){n.length&&(i[n]=!0)}),i}function ui(n){return o(n)?n:{}}function da(n,i,r,e){function k(n){try{n.apply(null,kt.call(arguments,1))}finally{if(l--,0===l)for(;b.length;)try{b.pop()()}catch(t){r.error(t)}}}function d(){v=null;tt()}function g(){h=ot();h=u(h)?null:h;ct(h,nt)&&(h=nt);y=nt=h}function tt(){var n=y;g();(a!==o.url()||n!==h)&&(a=o.url(),y=h,t(it,function(n){n(o.url(),h)}))}var o=this,c=n.location,p=n.history,ut=n.setTimeout,ft=n.clearTimeout,w={},l,b;o.isMock=!1;l=0;b=[];o.$$completeOutstandingRequest=k;o.$$incOutstandingRequestCount=function(){l++};o.notifyWhenNoOutstandingRequests=function(n){0===l?n():b.push(n)};var h,y,a=c.href,et=i.find("base"),v=null,ot=e.history?function(){try{return p.state}catch(n){}}:s;g();o.url=function(t,i,r){var s,f;return(u(r)&&(r=null),c!==n.location&&(c=n.location),p!==n.history&&(p=n.history),t)?(s=y===r,a===t&&(!e.history||s))?o:(f=a&&fi(a)===fi(t),a=t,y=r,!e.history||f&&s?(f||(v=t),i?c.replace(t):f?(i=c,r=t.indexOf("#"),r=-1===r?"":t.substr(r),i.hash=r):c.href=t,c.href!==t&&(v=t)):(p[i?"replaceState":"pushState"](r,"",t),g()),v&&(v=t),o):v||c.href};o.state=function(){return h};var it=[],rt=!1,nt=null;o.onUrlChange=function(t){if(!rt){if(e.history)f(n).on("popstate",d);f(n).on("hashchange",d);rt=!0}return it.push(t),t};o.$$applicationDestroyed=function(){f(n).off("hashchange popstate",d)};o.$$checkUrlChange=tt;o.baseHref=function(){var n=et.attr("href");return n?n.replace(/^(https?:)?\/\/[^/]*/,""):""};o.defer=function(n,t){var i;return l++,i=ut(function(){delete w[i];k(n)},t||0),w[i]=!0,i};o.defer.cancel=function(n){return w[n]?(delete w[n],ft(n),k(s),!0):!1}}function ga(){this.$get=["$window","$log","$sniffer","$document",function(n,t,i,r){return new da(n,r,t,i)}]}function nv(){this.$get=function(){function i(t,i){function a(n){n!==o&&(r?r===n&&(r=n.n):r=n,c(n.n,n.p),c(n,o),o=n,o.n=null)}function c(n,t){n!==t&&(n&&(n.p=t),t&&(t.n=n))}if(t in n)throw l("$cacheFactory")("iid",t);var s=0,y=v({},i,{id:t}),f=p(),h=i&&i.capacity||Number.MAX_VALUE,e=p(),o=null,r=null;return n[t]={put:function(n,t){if(!u(t)){if(h<Number.MAX_VALUE){var i=e[n]||(e[n]={key:n});a(i)}return n in f||s++,f[n]=t,s>h&&this.remove(r.key),t}},get:function(n){if(h<Number.MAX_VALUE){var t=e[n];if(!t)return;a(t)}return f[n]},remove:function(n){if(h<Number.MAX_VALUE){var t=e[n];if(!t)return;t===o&&(o=t.p);t===r&&(r=t.n);c(t.n,t.p);delete e[n]}n in f&&(delete f[n],s--)},removeAll:function(){f=p();s=0;e=p();o=r=null},destroy:function(){e=y=f=null;delete n[t]},info:function(){return v({},y,{size:s})}}}var n={};return i.info=function(){var i={};return t(n,function(n,t){i[t]=n.info()}),i},i.get=function(t){return n[t]},i}}function tv(){this.$get=["$cacheFactory",function(n){return n("templates")}]}function vs(i,l){function it(n,i,r){var f=/^([@&]|[=<](\*?))(\??)\s*([\w$]*)$/,u=p();return t(n,function(n,t){if(n=n.trim(),n in rt)u[t]=rt[n];else{var e=n.match(f);if(!e)throw k("iscp",i,t,n,r?"controller bindings definition":"isolate scope definition");u[t]={mode:e[1][0],collection:"*"===e[2],optional:"?"===e[3],attrName:e[4]||t};e[4]&&(rt[n]=u[t])}}),u}function et(n){var t=n.charAt(0);if(!t||t!==a(t))throw k("baddir",n);if(n!==n.trim())throw k("baddir",n);}function ot(n){var i=n.require||n.controller&&n.name;return!c(i)&&o(i)&&t(i,function(n,t){var r=n.match(ft);n.substring(r[0].length)||(i[t]=r[0]+t)}),i}var b={},at=/^\s*directive:\s*([\w-]+)\s+(.*)$/,yt=/(([\w-]+)(?::([^;]+))?;?)/,wt=ta("ngSrc,ngSrcset,src,srcset"),ft=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,gt=/^(on[a-z]+|formaction)$/,rt=p(),w,g,d,nt,tt;this.directive=function ni(n,r){return ar(n,"name"),pi(n,"directive"),h(n)?(et(n),ar(r,"directiveFactory"),b.hasOwnProperty(n)||(b[n]=[],i.factory(n+"Directive",["$injector","$exceptionHandler",function(i,r){var u=[];return t(b[n],function(t,f){var o,c,s;try{if(o=i.invoke(t),e(o)?o={compile:st(o)}:!o.compile&&o.link&&(o.compile=st(o.link)),o.priority=o.priority||0,o.index=f,o.name=o.name||n,o.require=ot(o),c=o,s=o.restrict,s&&(!h(s)||!/[EACM]/.test(s)))throw k("badrestrict",s,n);c.restrict=s||"EA";o.$$moduleName=t.$$moduleName;u.push(o)}catch(l){r(l)}}),u}])),b[n].push(r)):t(n,af(ni)),this};this.component=function ii(n,i){function r(n){function r(t){return e(t)||c(t)?function(i,r){return n.invoke(t,this,{$element:i,$attrs:r})}:t}var o=i.template||i.templateUrl?i.template:"",f={controller:u,controllerAs:iv(i.controller)||i.controllerAs||"$ctrl",template:r(o),templateUrl:r(i.templateUrl),transclude:i.transclude,scope:{},bindToController:i.bindings||{},restrict:"E",require:i.require};return t(i,function(n,t){"$"===t.charAt(0)&&(f[t]=n)}),f}if(!h(n))return t(n,af(yi(this,ii))),this;var u=i.controller||function(){};return t(i,function(n,t){"$"===t.charAt(0)&&(r[t]=n,e(u)&&(u[t]=n))}),r.$inject=["$injector"],this.directive(n,r)};this.aHrefSanitizationWhitelist=function(n){return r(n)?(l.aHrefSanitizationWhitelist(n),this):l.aHrefSanitizationWhitelist()};this.imgSrcSanitizationWhitelist=function(n){return r(n)?(l.imgSrcSanitizationWhitelist(n),this):l.imgSrcSanitizationWhitelist()};w=!0;this.debugInfoEnabled=function(n){return r(n)?(w=n,this):w};g=!1;this.strictComponentBindingsEnabled=function(n){return r(n)?(g=n,this):g};d=10;this.onChangesTtl=function(n){return arguments.length?(d=n,this):d};nt=!0;this.commentDirectivesEnabled=function(n){return arguments.length?(nt=n,this):nt};tt=!0;this.cssClassDirectivesEnabled=function(n){return arguments.length?(tt=n,this):tt};this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$sce","$animate",function(i,r,l,rt,et,ot,st,ni,ii){function pr(){try{if(!--cr)throw ui=void 0,k("infchng",d);st.$apply(function(){for(var n=0,t=ui.length;n<t;++n)try{ui[n]()}catch(i){l(i)}ui=void 0})}finally{cr++}}function li(n,t){if(t)for(var u=Object.keys(t),r,i=0,f=u.length;i<f;i++)r=u[i],this[r]=t[r];else this.$attr={};this.$$element=n}function wr(n,t,i){hr.innerHTML="<span "+t+">";t=hr.firstChild.attributes;var r=t[0];t.removeNamedItem(r.name);r.value=i;n.attributes.setNamedItem(r)}function ai(n,t){try{n.addClass(t)}catch(i){}}function ri(n,t,i,r,u){var o,e;return n instanceof f||(n=f(n)),o=pi(n,t,n,i,r,u),ri.$$addScopeClass(n),e=null,function(t,i,r){var s,h,c;if(!n)throw k("multilink");if(ar(t,"scope"),u&&u.needsNewScope&&(t=t.$parent.$new()),r=r||{},s=r.parentBoundTranscludeFn,h=r.transcludeControllers,r=r.futureParentElement,s&&s.$$boundTransclude&&(s=s.$$boundTransclude),e||(e=(r=r&&r[0])?"foreignobject"!==ht(r)&&ut.call(r).match(/SVG/)?"svg":"html":"html"),r="html"!==e?f(ki(e,f("<div><\/div>").append(n).html())):i?nr.clone.call(n):n,h)for(c in h)r.data("$"+c+"Controller",h[c].instance);return ri.$$addScopeInfo(r,t),i&&i(r,t),o&&o(t,r,r,s),i||(n=o=null),r}}function pi(n,t,i,r,u,e){function p(n,i,r,u){var o,h,c,e,a,y,l;if(v)for(l=Array(i.length),e=0;e<s.length;e+=3)o=s[e],l[o]=i[o];else l=i;for(e=0,a=s.length;e<a;)h=l[s[e++]],i=s[e++],o=s[e++],i?(i.scope?(c=n.$new(),ri.$$addScopeInfo(f(h),c)):c=n,y=i.transcludeOnThisElement?ei(n,i.transclude,u):!i.templateOnThisElement&&u?u:!u&&t?ei(n,t):null,i(o,c,h,r,y)):o&&o(n,h.childNodes,void 0,u)}for(var s=[],w=c(n)||n instanceof f,h,l,a,y,v,o=0;o<n.length;o++)h=new li,11===bt&&br(n,o,w),l=wi(n[o],[],h,0===o?r:void 0,u),(e=l.length?tr(l,n[o],h,t,i,null,[],[],e):null)&&e.scope&&ri.$$addScopeClass(h.$$element),h=e&&e.terminal||!(a=n[o].childNodes)||!a.length?null:pi(a,e?(e.transcludeOnThisElement||!e.templateOnThisElement)&&e.transclude:t),(e||h)&&(s.push(o,e,h),y=!0,v=v||e),e=null;return y?p:null}function br(n,t,i){var u=n[t],f=u.parentNode,r;if(u.nodeType===ti)for(;;){if(r=f?u.nextSibling:n[t+1],!r||r.nodeType!==ti)break;u.nodeValue+=r.nodeValue;r.parentNode&&r.parentNode.removeChild(r);i&&r===n[t+1]&&n.splice(t+1,1)}}function ei(n,t,i){function u(r,u,f,e,o){return r||(r=n.$new(!1,o),r.$$transcluded=!0),t(r,u,{parentBoundTranscludeFn:i,transcludeControllers:f,futureParentElement:e})}var f=u.$$slots=p(),r;for(r in t.$$slots)f[r]=t.$$slots[r]?ei(n,t.$$slots[r],i):null;return u}function wi(n,t,i,r,u){var s=i.$attr,c,w,b;switch(n.nodeType){case 1:c=ht(n);si(t,lt(c),"E",r,u);for(var f,e,l,a,v=n.attributes,p=0,k=v&&v.length;p<k;p++)w=!1,b=!1,f=v[p],e=f.name,l=f.value,f=lt(e),(a=su.test(f))&&(e=e.replace(lc,"").substr(8).replace(/_(.)/g,function(n,t){return t.toUpperCase()})),(f=f.match(hu))&&gr(f[1])&&(w=e,b=e.substr(0,e.length-5)+"end",e=e.substr(0,e.length-6)),f=lt(e.toLowerCase()),s[f]=e,(a||!i.hasOwnProperty(f))&&(i[f]=l,cs(n,f)&&(i[f]=!0)),uu(n,t,l,f,a),si(t,f,"A",r,u,w,b);if("input"===c&&"hidden"===n.getAttribute("type")&&n.setAttribute("autocomplete","off"),!ou)break;if(s=n.className,o(s)&&(s=s.animVal),h(s)&&""!==s)for(;n=yt.exec(s);)f=lt(n[2]),si(t,f,"C",r,u)&&(i[f]=y(n[3])),s=s.substr(n.index+n[0].length);break;case ti:iu(t,n.nodeValue);break;case 8:if(!eu)break;kr(n,t,i,r,u)}return t.sort(tu),t}function kr(n,t,i,r,u){var f,e;try{f=at.exec(n.nodeValue);f&&(e=lt(f[1]),si(t,e,"M",r,u)&&(i[e]=y(f[2])))}catch(o){}}function di(n,t,i){var r=[],u=0;if(t&&n.hasAttribute&&n.hasAttribute(t)){do{if(!n)throw k("uterdir",t,i);1===n.nodeType&&(n.hasAttribute(t)&&u++,n.hasAttribute(i)&&u--);r.push(n);n=n.nextSibling}while(0<u)}else r.push(n);return f(r)}function gi(n,t,i){return function(r,u,f,e,o){return u=di(u[0],t,i),n(r,u,f,e,o)}}function bi(n,t,i,r,u,f){var e;return n?ri(t,i,r,u,f):function(){return e||(e=ri(t,i,r,u,f),t=i=f=null),e.apply(this,arguments)}}function tr(i,r,s,h,a,w,b,d,g){function tr(n,t,i,r){n&&(i&&(n=gi(n,i,r)),n.require=nt.require,n.directiveName=st,(tt===nt||nt.$$isolateScope)&&(n=ur(n,{isolateScope:!0})),b.push(n));t&&(i&&(t=gi(t,i,r)),t.require=nt.require,t.directiveName=st,(tt===nt||nt.$$isolateScope)&&(t=ur(t,{isolateScope:!0})),d.push(t))}function yt(n,i,h,a,y){function lt(n,t,i,r){var e,f;if(or(n)||(r=i,i=t,t=n,n=void 0),ii&&(e=it),i||(i=ii?w.parent():w),r){if(f=y.$$slots[r],f)return f(n,t,e,i,st);if(u(f))throw k("noslot",r,pt(w));}else return y(n,t,e,i,st)}var g,rt,p,nt,et,it,ut,w,ht,st;r===h?(a=s,w=s.$$element):(w=f(h),a=new li(w,s));et=i;tt?nt=i.$new(!0):ft&&(et=i.$parent);y&&(ut=lt,ut.$$boundTransclude=y,ut.isSlotFilled=function(n){return!!y.$$slots[n]});ot&&(it=dr(w,a,ut,ot,nt,i,tt));tt&&(ri.$$addScopeInfo(w,nt,!0,!(ct&&(ct===tt||ct===tt.$$originalDirective))),ri.$$addScopeClass(w,!0),nt.$$isolateBindings=tt.$$isolateBindings,rt=er(i,a,nt,nt.$$isolateBindings,tt),rt.removeWatches&&nt.$on("$destroy",rt.removeWatches));for(g in it)rt=ot[g],p=it[g],ht=rt.$$bindings.bindToController,p.instance=p(),w.data("$"+rt.name+"Controller",p.instance),p.bindingInfo=er(et,a,p.instance,ht,rt);for(t(ot,function(n,t){var i=n.require;n.bindToController&&!c(i)&&o(i)&&v(it[t].instance,oi(t,i,w,it))}),t(it,function(n){var t=n.instance;if(e(t.$onChanges))try{t.$onChanges(n.bindingInfo.initialChanges)}catch(i){l(i)}if(e(t.$onInit))try{t.$onInit()}catch(r){l(r)}e(t.$doCheck)&&(et.$watch(function(){t.$doCheck()}),t.$doCheck());e(t.$onDestroy)&&et.$on("$destroy",function(){t.$onDestroy()})}),g=0,rt=b.length;g<rt;g++)p=b[g],fr(p,p.isolateScope?nt:i,w,a,p.require&&oi(p.directiveName,p.require,w,it),ut);for(st=i,tt&&(tt.template||null===tt.templateUrl)&&(st=nt),n&&n(st,h.childNodes,void 0,y),g=d.length-1;0<=g;g--)p=d[g],fr(p,p.isolateScope?nt:i,w,a,p.require&&oi(p.directiveName,p.require,w,it),ut);t(it,function(n){n=n.instance;e(n.$postLink)&&n.$postLink()})}var ni,ei,et,nr,si,ci,sr,ai;g=g||{};for(var gt=-Number.MAX_VALUE,ft=g.newScopeDirective,ot=g.controllerDirectives,tt=g.newIsolateScopeDirective,ct=g.templateDirective,ti=g.nonTlbTranscludeDirective,vi=!1,pi=!1,ii=g.hasElementTranscludeDirective,it=s.$$element=f(r),nt,st,ut,wt=h,bt,at=!1,ui=!1,rt,vt=0,dt=i.length;vt<dt;vt++){if(nt=i[vt],ni=nt.$$start,ei=nt.$$end,ni&&(it=di(r,ni,ei)),ut=void 0,gt>nt.priority)break;if((rt=nt.scope)&&(nt.templateUrl||(o(rt)?(fi("new/isolated scope",tt||ft,nt,it),tt=nt):fi("new/isolated scope",tt,nt,it)),ft=ft||nt),st=nt.name,!at&&(nt.replace&&(nt.templateUrl||nt.template)||nt.transclude&&!nt.$$tlb)){for(rt=vt+1;at=i[rt++];)if(at.transclude&&!at.$$tlb||at.replace&&(at.templateUrl||at.template)){ui=!0;break}at=!0}if(!nt.templateUrl&&nt.controller&&(ot=ot||p(),fi("'"+st+"' controller",ot[st],nt,it),ot[st]=nt),rt=nt.transclude)if(vi=!0,nt.$$tlb||(fi("transclusion",ti,nt,it),ti=nt),"element"===rt)ii=!0,gt=nt.priority,ut=it,it=s.$$element=f(ri.$$createComment(st,s[st])),r=it[0],hi(a,kt.call(ut,0),r),wt=bi(ui,ut,h,gt,w&&w.name,{nonTlbTranscludeDirective:ti});else{if(et=p(),o(rt)){ut=n.document.createDocumentFragment();nr=p();si=p();t(rt,function(n,t){var i="?"===n.charAt(0);n=i?n.substring(1):n;nr[n]=t;et[t]=null;si[t]=i});t(it.contents(),function(t){var i=nr[lt(ht(t))];i?(si[i]=!0,et[i]=et[i]||n.document.createDocumentFragment(),et[i].appendChild(t)):ut.appendChild(t)});t(si,function(n,t){if(!n)throw k("reqslot",t);});for(ci in et)et[ci]&&(et[ci]=bi(ui,et[ci].childNodes,h));ut=ut.childNodes}else ut=f(ue(r)).contents();it.empty();wt=bi(ui,ut,h,void 0,void 0,{needsNewScope:nt.$$isolateScope||nt.$$newScope});wt.$$slots=et}if(nt.template)if(pi=!0,fi("template",ct,nt,it),ct=nt,rt=e(nt.template)?nt.template(it,s):nt.template,rt=yr(rt),nt.replace){if(w=nt,ut=eo.test(rt)?ps(ki(nt.templateNamespace,y(rt))):[],r=ut[0],1!==ut.length||1!==r.nodeType)throw k("tplrt",st,"");hi(a,it,r);dt={$attr:{}};rt=wi(r,[],dt);sr=i.splice(vt+1,i.length-(vt+1));(tt||ft)&&ir(rt,tt,ft);i=i.concat(rt).concat(sr);rr(s,dt);dt=i.length}else it.html(rt);if(nt.templateUrl)pi=!0,fi("template",ct,nt,it),ct=nt,nt.replace&&(w=nt),yt=nu(i.splice(vt,i.length-vt),it,s,a,vi&&wt,b,d,{controllerDirectives:ot,newScopeDirective:ft!==nt&&ft,newIsolateScopeDirective:tt,templateDirective:ct,nonTlbTranscludeDirective:ti}),dt=i.length;else if(nt.compile)try{bt=nt.compile(it,s,wt);ai=nt.$$originalDirective||nt;e(bt)?tr(null,yi(ai,bt),ni,ei):bt&&tr(yi(ai,bt.pre),yi(ai,bt.post),ni,ei)}catch(hr){l(hr,pt(it))}nt.terminal&&(yt.terminal=!0,gt=Math.max(gt,nt.priority))}return yt.scope=ft&&!0===ft.scope,yt.transcludeOnThisElement=vi,yt.templateOnThisElement=pi,yt.transclude=wt,g.hasElementTranscludeDirective=ii,yt}function oi(n,i,r,u){var f,s,e,l;if(h(i)){if(e=i.match(ft),i=i.substring(e[0].length),s=e[1]||e[3],e="?"===e[2],"^^"===s?r=r.parent():f=(f=u&&u[i])&&f.instance,f||(l="$"+i+"Controller",f=s?r.inheritedData(l):r.data(l)),!f&&!e)throw k("ctreq",i,n);}else if(c(i))for(f=[],s=0,e=i.length;s<e;s++)f[s]=oi(n,i[s],r,u);else o(i)&&(f={},t(i,function(t,i){f[i]=oi(n,t,r,u)}));return f||null}function dr(n,t,i,r,u,f,e){var c=p(),l;for(l in r){var o=r[l],s={$scope:o===e||o.$$isolateScope?u:f,$element:n,$attrs:t,$transclude:i},h=o.controller;"@"===h&&(h=t[o.name]);s=ot(h,s,!0,o.controllerAs);c[o.name]=s;n.data("$"+o.name+"Controller",s.instance)}return c}function ir(n,t,i){for(var r=0,u=n.length;r<u;r++)n[r]=yf(n[r],{$$isolateScope:t,$$newScope:i})}function si(n,t,r,f,e,s,h){var c,v,p;if(t===e)return null;if(c=null,b.hasOwnProperty(t))for(e=i.get(t+"Directive"),v=0,p=e.length;v<p;v++)if(t=e[v],(u(f)||f>t.priority)&&-1!==t.restrict.indexOf(r)){if(s&&(t=yf(t,{$$start:s,$$end:h})),!t.$$bindings){var l=c=t,y=t.name,a={isolateScope:null,bindToController:null};if(o(l.scope)&&(!0===l.bindToController?(a.bindToController=it(l.scope,y,!0),a.isolateScope={}):a.isolateScope=it(l.scope,y,!1)),o(l.bindToController)&&(a.bindToController=it(l.bindToController,y,!0)),a.bindToController&&!l.controller)throw k("noctrl",y);c=c.$$bindings=a;o(c.isolateScope)&&(t.$$isolateBindings=c.isolateScope)}n.push(t);c=t}return c}function gr(n){if(b.hasOwnProperty(n))for(var r=i.get(n+"Directive"),t=0,u=r.length;t<u;t++)if(n=r[t],n.multiElement)return!0;return!1}function rr(n,i){var r=i.$attr,u=n.$attr;t(n,function(t,u){"$"!==u.charAt(0)&&(i[u]&&i[u]!==t&&(t=t.length?t+(("style"===u?";":" ")+i[u]):i[u]),n.$set(u,t,!0,r[u]))});t(i,function(t,i){n.hasOwnProperty(i)||"$"===i.charAt(0)||(n[i]=t,"class"!==i&&"style"!==i&&(u[i]=r[i]))})}function nu(n,i,r,u,s,h,c,a){var p=[],w,b,d=i[0],v=n.shift(),nt=yf(v,{templateUrl:null,transclude:null,replace:null,$$originalDirective:v}),g=e(v.templateUrl)?v.templateUrl(i,r):v.templateUrl,tt=v.templateNamespace;return i.empty(),rt(g).then(function(e){var l,rt,it,ft;if(e=yr(e),v.replace){if(e=eo.test(e)?ps(ki(tt,y(e))):[],l=e[0],1!==e.length||1!==l.nodeType)throw k("tplrt",v.name,g);e={$attr:{}};hi(u,i,l);it=wi(l,[],e);o(v.scope)&&ir(it,!0);n=it.concat(n);rr(r,e)}else l=d,i.html(e);for(n.unshift(nt),w=tr(n,l,r,s,i,v,h,c,a),t(u,function(n,t){n===l&&(u[t]=i[0])}),b=pi(i[0].childNodes,s);p.length;){e=p.shift();rt=p.shift();var et=p.shift(),ut=p.shift(),it=i[0];e.$$destroyed||(rt!==d&&(ft=rt.className,a.hasElementTranscludeDirective&&v.replace||(it=ue(l)),hi(et,f(rt),it),ai(f(it),ft)),rt=w.transcludeOnThisElement?ei(e,w.transclude,ut):ut,w(b,e,it,u,rt))}p=null}).catch(function(n){wf(n)&&l(n)}),function(n,t,i,r,u){n=u;t.$$destroyed||(p?p.push(t,i,r,n):(w.transcludeOnThisElement&&(n=ei(t,w.transclude,u)),w(b,t,i,r,n)))}}function tu(n,t){var i=t.priority-n.priority;return 0!==i?i:n.name!==t.name?n.name<t.name?-1:1:n.index-t.index}function fi(n,t,i,r){function u(n){return n?" (module: "+n+")":""}if(t)throw k("multidir",t.name,u(t.$$moduleName),i.name,u(i.$$moduleName),n,pt(r));}function iu(n,t){var i=r(t,!0);i&&n.push({priority:0,compile:function(n){n=n.parent();var t=!!n.length;return t&&ri.$$addBindingClass(n),function(n,r){var u=r.parent();t||ri.$$addBindingClass(u);ri.$$addBindingInfo(u,i.expressions);n.$watch(i,function(n){r[0].nodeValue=n})}}})}function ki(t,i){t=a(t||"html");switch(t){case"svg":case"math":var r=n.document.createElement("div");return r.innerHTML="<"+t+">"+i+"<\/"+t+">",r.childNodes[0].childNodes;default:return i}}function ru(n,t){if("srcdoc"===t)return ni.HTML;var i=ht(n);return"src"===t||"ngSrc"===t?-1===["img","video","audio","source","track"].indexOf(i)?ni.RESOURCE_URL:ni.MEDIA_URL:"xlinkHref"===t?"image"===i?ni.MEDIA_URL:"a"===i?ni.URL:ni.RESOURCE_URL:"form"===i&&"action"===t||"base"===i&&"href"===t||"link"===i&&"href"===t?ni.RESOURCE_URL:"a"===i&&("href"===t||"ngHref"===t)?ni.URL:void 0}function uu(n,t,i,u,f){var o=ru(n,u),s=wt[u]||f,e=r(i,!f,o,s);if(e){if("multiple"===u&&"select"===ht(n))throw k("selmulti",pt(n));if(gt.test(u))throw k("nodomevents");t.push({priority:100,compile:function(){return{pre:function(n,t,f){t=f.$$observers||(f.$$observers=p());var h=f[u];h!==i&&(e=h&&r(h,!0,o,s),i=h);e&&(f[u]=e(n),(t[u]||(t[u]=[])).$$inter=!0,(f.$$observers&&f.$$observers[u].$$scope||n).$watch(e,function(n,t){"class"===u&&n!==t?f.$updateClass(n,t):f.$set(u,n)}))}}}})}}function hi(t,i,r){var e=i[0],s=i.length,c=e.parentNode,u,o,h;if(t)for(u=0,o=t.length;u<o;u++)if(t[u]===e){for(t[u++]=r,o=u+s-1,h=t.length;u<h;u++,o++)o<h?t[u]=t[o]:delete t[u];t.length-=s-1;t.context===e&&(t.context=r);break}for(c&&c.replaceChild(r,e),t=n.document.createDocumentFragment(),u=0;u<s;u++)t.appendChild(i[u]);for(f.hasData(e)&&(f.data(r,f.data(e)),f(e).off("$destroy")),f.cleanData(t.querySelectorAll("*")),u=1;u<s;u++)delete i[u];i[0]=r;i.length=1}function ur(n,t){return v(function(){return n.apply(null,arguments)},n,t)}function fr(n,t,i,r,u,f){try{n(t,i,r,u,f)}catch(e){l(e,pt(i))}}function ci(n,t){if(g)throw k("missingattr",n,t);}function er(n,i,u,f,o){function v(t,i,r){e(u.$onChanges)&&!kf(i,r)&&(ui||(n.$$postDigest(pr),ui=[]),c||(c={},ui.push(y)),c[t]&&(r=c[t].previousValue),c[t]=new vu(r,i))}function y(){u.$onChanges(c);c=void 0}var l=[],a={},c;return t(f,function(t,f){var e=t.attrName,c=t.optional,p,y,d,b,g,w;switch(t.mode){case"@":c||vt.call(i,e)||(ci(e,o.name),u[f]=i[e]=void 0);c=i.$observe(e,function(n){(h(n)||dt(n))&&(v(f,n,u[f]),u[f]=n)});i.$$observers[e].$$scope=n;p=i[e];h(p)?u[f]=r(p)(n):dt(p)&&(u[f]=p);a[f]=new vu(ho,u[f]);l.push(c);break;case"=":if(!vt.call(i,e)){if(c)break;ci(e,o.name);i[e]=void 0}if(c&&!i[e])break;y=et(i[e]);b=y.literal?ct:kf;d=y.assign||function(){p=u[f]=y(n);throw k("nonassign",i[e],e,o.name);};p=u[f]=y(n);c=function(t){return b(t,u[f])||(b(t,p)?d(n,t=u[f]):u[f]=t),p=t};c.$stateful=!0;c=t.collection?n.$watchCollection(i[e],c):n.$watch(et(i[e],c),null,y.literal);l.push(c);break;case"<":if(!vt.call(i,e)){if(c)break;ci(e,o.name);i[e]=void 0}if(c&&!i[e])break;y=et(i[e]);g=y.literal;w=u[f]=y(n);a[f]=new vu(ho,u[f]);c=n[t.collection?"$watchCollection":"$watch"](y,function(n,t){if(t===n){if(t===w||g&&ct(t,w))return;t=w}v(f,n,t);u[f]=n});l.push(c);break;case"&":if(c||vt.call(i,e)||ci(e,o.name),y=i.hasOwnProperty(e)?et(i[e]):s,y===s&&c)break;u[f]=function(t){return y(n,t)}}}),{initialChanges:a,removeWatches:l.length&&function(){for(var n=0,t=l.length;n<t;++n)l[n]()}}}var fu=/^\w/,hr=n.document.createElement("div"),eu=nt,ou=tt,cr=d,ui;li.prototype={$normalize:lt,$addClass:function(n){n&&0<n.length&&ii.addClass(this.$$element,n)},$removeClass:function(n){n&&0<n.length&&ii.removeClass(this.$$element,n)},$updateClass:function(n,t){var i=ys(n,t);i&&i.length&&ii.addClass(this.$$element,i);(i=ys(t,n))&&i.length&&ii.removeClass(this.$$element,i)},$set:function(n,i,r,f){var o=cs(this.$$element[0],n),e=so[n],a=n;if(o?(this.$$element.prop(n,i),f=o):e&&(this[e]=i,a=e),this[n]=i,f?this.$attr[n]=f:(f=this.$attr[n])||(this.$attr[n]=f=is(n,"-")),"img"===ht(this.$$element)&&"srcset"===n&&i){if(!h(i))throw k("srcset",i.toString());for(var o="",e=y(i),s=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,s=/\s/.test(e)?s:/(,)/,e=e.split(s),s=Math.floor(e.length/2),c=0;c<s;c++)var v=2*c,o=o+ni.getTrustedMediaUrl(y(e[v])),o=o+(" "+y(e[v+1]));e=y(e[2*c]).split(/\s/);o+=ni.getTrustedMediaUrl(y(e[0]));2===e.length&&(o+=" "+y(e[1]));this[n]=i=o}!1!==r&&(null===i||u(i)?this.$$element.removeAttr(f):fu.test(f)?this.$$element.attr(f,i):wr(this.$$element[0],f,i));(n=this.$$observers)&&t(n[a],function(n){try{n(i)}catch(t){l(t)}})},$observe:function(n,t){var i=this,f=i.$$observers||(i.$$observers=p()),r=f[n]||(f[n]=[]);return r.push(t),st.$evalAsync(function(){r.$$inter||!i.hasOwnProperty(n)||u(i[n])||t(i[n])}),function(){sr(r,t)}}};var lr=r.startSymbol(),vr=r.endSymbol(),yr="{{"===lr&&"}}"===vr?vi:function(n){return n.replace(/\{\{/g,lr).replace(/}}/g,vr)},su=/^ngAttr[A-Z]/,hu=/^(.+)Start$/;return ri.$$addBindingInfo=w?function(n,t){var i=n.data("$binding")||[];c(t)?i=i.concat(t):i.push(t);n.data("$binding",i)}:s,ri.$$addBindingClass=w?function(n){ai(n,"ng-binding")}:s,ri.$$addScopeInfo=w?function(n,t,i,r){n.data(i?r?"$isolateScopeNoTemplate":"$isolateScope":"$scope",t)}:s,ri.$$addScopeClass=w?function(n,t){ai(n,t?"ng-isolate-scope":"ng-scope")}:s,ri.$$createComment=function(t,i){var r="";return w&&(r=" "+(t||"")+": ",i&&(r+=i+" ")),n.document.createComment(r)},ri}]}function vu(n,t){this.previousValue=n;this.currentValue=t}function lt(n){return n.replace(lc,"").replace(ew,function(n,t,i){return i?t.toUpperCase():t})}function ys(n,t){var r="",e=n.split(/\s+/),o=t.split(/\s+/),u=0,f,i;n:for(;u<e.length;u++){for(f=e[u],i=0;i<o.length;i++)if(f===o[i])continue n;r+=(0<r.length?" ":"")+f}return r}function ps(n){var t,i;if(n=f(n),t=n.length,1>=t)return n;for(;t--;)i=n[t],(8===i.nodeType||i.nodeType===ti&&""===i.nodeValue.trim())&&ip.call(n,t,1);return n}function iv(n,t){if(t&&h(t))return t;if(h(n)){var i=vc.exec(n);if(i)return i[3]}}function rv(){var n={};this.has=function(t){return n.hasOwnProperty(t)};this.register=function(t,i){pi(t,"controller");o(t)?v(n,t):n[t]=i};this.$get=["$injector",function(t){function i(n,t,i,r){if(!n||!o(n.$scope))throw l("$controller")("noscp",r,t);n.$scope[t]=i}return function(r,u,f,s){var l,a,y;if(f=!0===f,s&&h(s)&&(y=s),h(r)){if(s=r.match(vc),!s)throw ac("ctrlfmt",r);if(a=s[1],y=y||s[3],r=n.hasOwnProperty(a)?n[a]:oa(u.$scope,a,!0),!r)throw ac("ctrlreg",a);iu(r,a,!0)}return f?(f=(c(r)?r[r.length-1]:r).prototype,l=Object.create(f||null),y&&i(u,y,l,a||r.name),v(function(){var n=t.invoke(r,l,u,a);return n!==l&&(o(n)||e(n))&&(l=n,y&&i(u,y,l,a||r.name)),l},{instance:l,identifier:y})):(l=t.instantiate(r,u,a),y&&i(u,y,l,a||r.name),l)}}]}function uv(){this.$get=["$window",function(n){return f(n.document)}]}function fv(){this.$get=["$document","$rootScope",function(n,t){function r(){u=i.hidden}var i=n[0],u=i&&i.hidden;n.on("visibilitychange",r);return t.$on("$destroy",function(){n.off("visibilitychange",r)}),function(){return u}}]}function ev(){this.$get=["$log",function(n){return function(){n.error.apply(n,arguments)}}]}function se(n){return o(n)?et(n)?n.toISOString():cr(n):n}function ov(){this.$get=function(){return function(n){if(!n)return"";var i=[];return po(n,function(n,r){null===n||u(n)||e(n)||(c(n)?t(n,function(n){i.push(ot(r)+"="+ot(se(n)))}):i.push(ot(r)+"="+ot(se(n))))}),i.join("&")}}}function sv(){this.$get=function(){return function(n){function i(n,u,f){c(n)?t(n,function(n,t){i(n,u+"["+(o(n)?t:"")+"]")}):o(n)&&!et(n)?po(n,function(n,t){i(n,u+(f?"":"[")+t+(f?"":"]"))}):(e(n)&&(n=n()),r.push(ot(u)+"="+(null==n?"":ot(se(n)))))}if(!n)return"";var r=[];return i(n,"",!0),r.join("&")}}}function he(n,t){var r,i,u;if(h(n)&&(r=n.replace(cw,"").trim(),r&&(i=t("Content-Type"),i=i&&0===i.indexOf(yc),(u=i)||(u=(u=r.match(sw))&&hw[u[0]].test(r)),u)))try{n=ko(r)}catch(f){if(!i)return n;throw of("baddata",n,f);}return n}function ws(n){var i=p(),r;return h(n)?t(n.split("\n"),function(n){r=n.indexOf(":");var t=a(y(n.substr(0,r)));n=y(n.substr(r+1));t&&(i[t]=i[t]?i[t]+", "+n:n)}):o(n)&&t(n,function(n,t){var r=a(t),u=y(n);r&&(i[r]=i[r]?i[r]+", "+u:u)}),i}function bs(n){var t;return function(i){return t||(t=ws(n)),i?(i=t[a(i)],void 0===i&&(i=null),i):t}}function ks(n,i,r,u){return e(u)?u(n,i,r):(t(u,function(t){n=t(n,i,r)}),n)}function hv(){var n=this.defaults={transformResponse:[he],transformRequest:[function(n){return o(n)&&"[object File]"!==ut.call(n)&&"[object Blob]"!==ut.call(n)&&"[object FormData]"!==ut.call(n)?cr(n):n}],headers:{common:{Accept:"application/json, text/plain, */*"},post:wt(co),put:wt(co),patch:wt(co)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer",jsonpCallbackParam:"callback"},i=!1,f,y;this.useApplyAsync=function(n){return r(n)?(i=!!n,this):i};f=this.interceptors=[];y=this.xsrfWhitelistedOrigins=[];this.$get=["$browser","$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector","$sce",function(p,w,b,k,d,g,nt,tt){function it(i){function y(n,t){for(var u,f,i=0,r=t.length;i<r;)u=t[i++],f=t[i++],n=n.then(u,f);return t.length=0,n}function b(n,i){var r,u={};return t(n,function(n,t){e(n)?(r=n(i),null!=r&&(u[t]=r)):u[t]=n}),u}function w(n){var t=v({},n);return t.data=ks(n.data,n.headers,n.status,r.transformResponse),n=n.status,200<=n&&300>n?t:g.reject(t)}var r,f,c;if(!o(i))throw l("$http")("badreq",i);if(!h(tt.valueOf(i.url)))throw l("$http")("badreq",i.url);return r=v({method:"get",transformRequest:n.transformRequest,transformResponse:n.transformResponse,paramSerializer:n.paramSerializer,jsonpCallbackParam:n.jsonpCallbackParam},i),r.headers=function(t){var i=n.headers,u=v({},t.headers),r,f,e,i=v({},i.common,i[a(t.method)]);n:for(r in i){f=a(r);for(e in u)if(a(e)===f)continue n;u[r]=i[r]}return b(u,wt(t))}(i),r.method=gu(r.method),r.paramSerializer=h(r.paramSerializer)?nt.get(r.paramSerializer):r.paramSerializer,p.$$incOutstandingRequestCount(),f=[],c=[],i=g.resolve(r),t(rt,function(n){(n.request||n.requestError)&&f.unshift(n.request,n.requestError);(n.response||n.responseError)&&c.push(n.response,n.responseError)}),i=y(i,f),i=i.then(function(i){var r=i.headers,f=ks(i.data,bs(r),void 0,i.transformRequest);return u(f)&&t(r,function(n,t){"content-type"===a(t)&&delete r[t]}),u(i.withCredentials)&&!u(n.withCredentials)&&(i.withCredentials=n.withCredentials),ft(i,f).then(w,w)}),i=y(i,c),i.finally(function(){p.$$completeOutstandingRequest(s)})}function ft(f,s){function rt(n){if(n){var r={};return t(n,function(n,t){r[t]=function(t){function r(){n(t)}i?d.$applyAsync(r):d.$$phase?r():d.$apply(r)}}),r}}function at(n,t,r,u,f){function e(){p(t,n,r,u,f)}y&&(200<=n&&300>n?y.put(v,[n,t,ws(r),u,f]):y.remove(v));i?d.$applyAsync(e):(e(),d.$$phase||d.$apply())}function p(n,t,i,r,u){t=-1<=t?t:0;(200<=t&&300>t?k.resolve:k.reject)({data:n,status:t,headers:bs(i),config:f,statusText:r,xhrStatus:u})}function ft(n){p(n.data,n.status,wt(n.headers()),n.statusText,n.xhrStatus)}function ht(){var n=it.pendingRequests.indexOf(f);-1!==n&&it.pendingRequests.splice(n,1)}var k=g.defer(),nt=k.promise,y,l,ct=f.headers,lt="jsonp"===a(f.method),v=f.url;return lt?v=tt.getTrustedResourceUrl(v):h(v)||(v=tt.valueOf(v)),v=et(v,f.paramSerializer(f.params)),lt&&(v=ot(v,f.jsonpCallbackParam)),it.pendingRequests.push(f),nt.then(ht,ht),(f.cache||n.cache)&&!1!==f.cache&&("GET"===f.method||"JSONP"===f.method)&&(y=o(f.cache)?f.cache:o(n.cache)?n.cache:st),y&&(l=y.get(v),r(l)?l&&e(l.then)?l.then(ft,ft):c(l)?p(l[1],l[0],wt(l[2]),l[3],l[4]):p(l,200,{},"OK","complete"):y.put(v,nt)),u(l)&&((l=ut(f.url)?b()[f.xsrfCookieName||n.xsrfCookieName]:void 0)&&(ct[f.xsrfHeaderName||n.xsrfHeaderName]=l),w(f.method,v,s,at,ct,f.timeout,f.withCredentials,f.responseType,rt(f.eventHandlers),rt(f.uploadEventHandlers))),nt}function et(n,t){return 0<t.length&&(n+=(-1===n.indexOf("?")?"?":"&")+t),n}function ot(n,i){var r=n.split("?");if(2<r.length)throw of("badjsonp",n);return r=ne(r[1]),t(r,function(t,r){if("JSON_CALLBACK"===t)throw of("badjsonp",n);if(r===i)throw of("badjsonp",i,n);}),n+=(-1===n.indexOf("?")?"?":"&")+i+"=JSON_CALLBACK"}var st=k("$http"),rt,ut;return n.paramSerializer=h(n.paramSerializer)?nt.get(n.paramSerializer):n.paramSerializer,rt=[],t(f,function(n){rt.unshift(h(n)?nt.get(n):nt.invoke(n))}),ut=ay(y),it.pendingRequests=[],function(){t(arguments,function(n){it[n]=function(t,i){return it(v({},i||{},{method:n,url:t}))}})}("get","delete","head","jsonp"),function(){t(arguments,function(n){it[n]=function(t,i,r){return it(v({},r||{},{method:n,url:t,data:i}))}})}("post","put","patch"),it.defaults=n,it}]}function cv(){this.$get=function(){return function(){return new n.XMLHttpRequest}}}function lv(){this.$get=["$browser","$jsonpCallbacks","$document","$xhrFactory",function(n,t,i,r){return av(n,r,n.defer,t,i[0])}]}function av(n,i,f,o,s){function h(n,t,i){n=n.replace("JSON_CALLBACK",t);var r=s.createElement("script"),u=null;return r.type="text/javascript",r.src=n,r.async=!0,u=function(n){r.removeEventListener("load",u);r.removeEventListener("error",u);s.body.removeChild(r);r=null;var f=-1,e="unknown";n&&("load"!==n.type||o.wasCalled(t)||(n={type:"error"}),e=n.type,f="error"===n.type?404:200);i&&i(f,e)},r.addEventListener("load",u),r.addEventListener("error",u),s.body.appendChild(r),u}return function(s,c,l,v,y,p,w,b,k,d){function ft(n){rt="timeout"===n;it&&it();g&&g.abort()}function nt(n,t,i,u,e,o){r(ut)&&f.cancel(ut);it=g=null;n(t,i,u,e,o)}var tt,it,g,rt,ut;if(c=c||n.url(),"jsonp"===a(s))tt=o.createCallback(c),it=h(c,tt,function(n,t){var i=200===n&&o.getResponse(tt);nt(v,n,i,"",t,"complete");o.removeCallback(tt)});else{if(g=i(s,c),rt=!1,g.open(s,c,!0),t(y,function(n,t){r(n)&&g.setRequestHeader(t,n)}),g.onload=function(){var i=g.statusText||"",t="response"in g?g.response:g.responseText,n=1223===g.status?204:g.status;0===n&&(n=t?200:"file"===at(c).protocol?404:0);nt(v,n,t,g.getAllResponseHeaders(),i,"complete")},g.onerror=function(){nt(v,-1,null,null,"","error")},g.ontimeout=function(){nt(v,-1,null,null,"","timeout")},g.onabort=function(){nt(v,-1,null,null,"",rt?"timeout":"abort")},t(k,function(n,t){g.addEventListener(t,n)}),t(d,function(n,t){g.upload.addEventListener(t,n)}),w&&(g.withCredentials=!0),b)try{g.responseType=b}catch(et){if("json"!==b)throw et;}g.send(u(l)?null:l)}0<p?ut=f(function(){ft("timeout")},p):p&&e(p.then)&&p.then(function(){ft(r(p.$$timeoutId)?"timeout":"abort")})}}function vv(){var n="{{",t="}}";this.startSymbol=function(t){return t?(n=t,this):n};this.endSymbol=function(n){return n?(t=n,this):t};this.$get=["$parse","$exceptionHandler","$sce",function(i,f,e){function h(n){return"\\\\\\"+n}function o(i){return i.replace(y,n).replace(p,t)}function l(n,t,i,r){var u=n.$watch(function(n){return u(),r(n)},t,i);return u}function s(s,h,y,p){function ot(n){try{return n=y&&!d?e.getTrusted(y,n):e.valueOf(n),p&&!r(n)?n:ie(n)}catch(t){f(ai.interr(s,t))}}var d=y===e.URL||y===e.MEDIA_URL,et,ut;if(!s.length||-1===s.indexOf(n))return h&&!d?void 0:(h=o(s),d&&(h=e.getTrusted(y,h)),h=st(h),h.exp=s,h.expressions=[],h.$$watchDelegate=l,h);p=!!p;for(var g,nt,b=0,k=[],tt,ft=s.length,w=[],it=[],rt;b<ft;)if(-1!==(g=s.indexOf(n,b))&&-1!==(nt=s.indexOf(t,g+c)))b!==g&&w.push(o(s.substring(b,g))),b=s.substring(g+c,nt),k.push(b),b=nt+a,it.push(w.length),w.push("");else{b!==ft&&w.push(o(s.substring(b)));break}return rt=1===w.length&&1===it.length,et=d&&rt?void 0:ot,tt=k.map(function(n){return i(n,et)}),!h||k.length?(ut=function(n){for(var t=0,i=k.length;t<i;t++){if(p&&u(n[t]))return;w[it[t]]=n[t]}return d?e.getTrusted(y,rt?w[0]:w.join("")):(y&&1<w.length&&ai.throwNoconcat(s),w.join(""))},v(function(n){var t=0,i=k.length,r=Array(i);try{for(;t<i;t++)r[t]=tt[t](n);return ut(r)}catch(u){f(ai.interr(s,u))}},{exp:s,expressions:k,$$watchDelegate:function(n,t){var i;return n.$watchGroup(tt,function(r,u){var f=ut(r);t.call(this,f,r!==u?i:f,n);i=f})}})):void 0}var c=n.length,a=t.length,y=new RegExp(n.replace(/./g,h),"g"),p=new RegExp(t.replace(/./g,h),"g");return s.startSymbol=function(){return n},s.endSymbol=function(){return t},s}]}function yv(){this.$get=["$rootScope","$window","$q","$$q","$browser",function(n,t,i,u,f){function o(o,s,h,c){function p(){w?o.apply(null,b):o(a)}var w=4<arguments.length,b=w?kt.call(arguments,4):[],k=t.setInterval,d=t.clearInterval,a=0,y=r(c)&&!c,v=(y?u:i).defer(),l=v.promise;return h=r(h)?h:0,l.$$intervalId=k(function(){y?f.defer(p):n.$evalAsync(p);v.notify(a++);0<h&&a>=h&&(v.resolve(a),d(l.$$intervalId),delete e[l.$$intervalId]);y||n.$apply()},s),e[l.$$intervalId]=v,l}var e={};return o.cancel=function(n){if(!n)return!1;if(!n.hasOwnProperty("$$intervalId"))throw lw("badprom");if(!e.hasOwnProperty(n.$$intervalId))return!1;n=n.$$intervalId;var i=e[n];return i.promise.$$state.pur=!0,i.reject("canceled"),t.clearInterval(n),delete e[n],!0},o}]}function ce(n){n=n.split("/");for(var t=n.length;t--;)n[t]=lr(n[t].replace(/%2F/g,"/"));return n.join("/")}function ds(n,t){var i=at(n);t.$$protocol=i.protocol;t.$$host=i.hostname;t.$$port=it(i.port)||yw[i.protocol]||null}function gs(n,t,i){var r,u;if(pw.test(n))throw kr("badpath",n);for(r="/"!==n.charAt(0),r&&(n="/"+n),n=at(n),r=(r&&"/"===n.pathname.charAt(0)?n.pathname.substring(1):n.pathname).split("/"),u=r.length;u--;)r[u]=decodeURIComponent(r[u]),i&&(r[u]=r[u].replace(/\//g,"%2F"));i=r.join("/");t.$$path=i;t.$$search=ne(n.search);t.$$hash=decodeURIComponent(n.hash);t.$$path&&"/"!==t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function le(n,t){return n.slice(0,t.length)===t}function gt(n,t){if(le(t,n))return t.substr(n.length)}function fi(n){var t=n.indexOf("#");return-1===t?n:n.substr(0,t)}function pr(n){return n.replace(/(#.+)|#$/,"$1")}function ae(n,t,i){this.$$html5=!0;i=i||"";ds(n,this);this.$$parse=function(n){var i=gt(t,n);if(!h(i))throw kr("ipthprfx",n,t);gs(i,this,!0);this.$$path||(this.$$path="/");this.$$compose()};this.$$compose=function(){var n=te(this.$$search),i=this.$$hash?"#"+lr(this.$$hash):"";this.$$url=ce(this.$$path)+(n?"?"+n:"")+i;this.$$absUrl=t+this.$$url.substr(1);this.$$urlUpdatedByLocation=!0};this.$$parseLinkUrl=function(u,f){if(f&&"#"===f[0])return this.hash(f.slice(1)),!0;var e,o;return r(e=gt(n,u))?(o=e,o=i&&r(e=gt(i,e))?t+(gt("/",e)||e):n+o):r(e=gt(t,u))?o=t+e:t===u+"/"&&(o=t),o&&this.$$parse(o),!!o}}function ve(n,t,i){ds(n,this);this.$$parse=function(r){var e=gt(n,r)||gt(t,r),f,o;u(e)||"#"!==e.charAt(0)?this.$$html5?f=e:(f="",u(e)&&(n=r,this.replace())):(f=gt(i,e),u(f)&&(f=e));gs(f,this,!1);r=this.$$path;e=n;o=/^\/[A-Z]:(\/.*)/;le(f,e)&&(f=f.replace(e,""));o.exec(f)||(r=(f=o.exec(r))?f[1]:r);this.$$path=r;this.$$compose()};this.$$compose=function(){var t=te(this.$$search),r=this.$$hash?"#"+lr(this.$$hash):"";this.$$url=ce(this.$$path)+(t?"?"+t:"")+r;this.$$absUrl=n+(this.$$url?i+this.$$url:"");this.$$urlUpdatedByLocation=!0};this.$$parseLinkUrl=function(t){return fi(n)===fi(t)?(this.$$parse(t),!0):!1}}function nh(n,t,i){this.$$html5=!0;ve.apply(this,arguments);this.$$parseLinkUrl=function(r,u){if(u&&"#"===u[0])return this.hash(u.slice(1)),!0;var f,e;return n===fi(r)?f=r:(e=gt(t,r))?f=n+i+e:t===r+"/"&&(f=t),f&&this.$$parse(f),!!f};this.$$compose=function(){var t=te(this.$$search),r=this.$$hash?"#"+lr(this.$$hash):"";this.$$url=ce(this.$$path)+(t?"?"+t:"")+r;this.$$absUrl=n+i+this.$$url;this.$$urlUpdatedByLocation=!0}}function yu(n){return function(){return this[n]}}function th(n,t){return function(i){return u(i)?this[n]:(this[n]=t(i),this.$$compose(),this)}}function pv(){var t="!",n={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(n){return r(n)?(t=n,this):t};this.html5Mode=function(t){return dt(t)?(n.enabled=t,this):o(t)?(dt(t.enabled)&&(n.enabled=t.enabled),dt(t.requireBase)&&(n.requireBase=t.requireBase),(dt(t.rewriteLinks)||h(t.rewriteLinks))&&(n.rewriteLinks=t.rewriteLinks),this):n};this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(i,r,e,s,c){function b(n,t,i){var u=l.url(),f=l.$$state;try{r.url(n,t,i);l.$$state=r.state()}catch(e){throw l.url(u),l.$$state=f,e;}}function k(n,t){i.$broadcast("$locationChangeSuccess",l.absUrl(),n,l.$$state,t)}var l,v,a,y,w,d,p;if(v=r.baseHref(),a=r.url(),n.enabled){if(!v&&n.requireBase)throw kr("nobase");y=a.substring(0,a.indexOf("/",a.indexOf("//")+2))+(v||"/");v=e.history?ae:nh}else y=fi(a),v=ve;w=y.substr(0,fi(y).lastIndexOf("/")+1);l=new v(y,w,"#"+t);l.$$parseLinkUrl(a,a);l.$$state=r.state();d=/^\s*(javascript|mailto):/i;s.on("click",function(t){var e=n.rewriteLinks,c,a;if(e&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey&&2!==t.which&&2!==t.button){for(c=f(t.target);"a"!==ht(c[0]);)if(c[0]===s[0]||!(c=c.parent())[0])return;h(e)&&u(c.attr(e))||(e=c.prop("href"),a=c.attr("href")||c.attr("xlink:href"),o(e)&&"[object SVGAnimatedString]"===e.toString()&&(e=at(e.animVal).href),d.test(e)||!e||c.attr("target")||t.isDefaultPrevented()||!l.$$parseLinkUrl(e,a)||(t.preventDefault(),l.absUrl()!==r.url()&&i.$apply()))}});pr(l.absUrl())!==pr(a)&&r.url(l.absUrl(),!0);p=!0;r.onUrlChange(function(n,t){le(n,w)?(i.$evalAsync(function(){var r=l.absUrl(),u=l.$$state,f;n=pr(n);l.$$parse(n);l.$$state=t;f=i.$broadcast("$locationChangeStart",n,r,t,u).defaultPrevented;l.absUrl()===n&&(f?(l.$$parse(r),l.$$state=u,b(r,!1,u)):(p=!1,k(r,u)))}),i.$$phase||i.$digest()):c.location.href=n});return i.$watch(function(){if(p||l.$$urlUpdatedByLocation){l.$$urlUpdatedByLocation=!1;var t=pr(r.url()),f=pr(l.absUrl()),n=r.state(),o=l.$$replace,u=t!==f||l.$$html5&&e.history&&n!==l.$$state;(p||u)&&(p=!1,i.$evalAsync(function(){var r=l.absUrl(),f=i.$broadcast("$locationChangeStart",r,t,l.$$state,n).defaultPrevented;l.absUrl()===r&&(f?(l.$$parse(t),l.$$state=n):(u&&b(r,o,n===l.$$state?null:l.$$state),k(t,n)))}))}l.$$replace=!1}),l}]}function wv(){var n=!0,i=this;this.debugEnabled=function(t){return r(t)?(n=t,this):n};this.$get=["$window",function(r){function f(n){return wf(n)&&(n.stack&&e?n=n.message&&-1===n.stack.indexOf(n.message)?"Error: "+n.message+"\n"+n.stack:n.stack:n.sourceURL&&(n=n.message+"\n"+n.sourceURL+":"+n.line)),n}function u(n){var i=r.console||{},u=i[n]||i.log||s;return function(){var n=[];return t(arguments,function(t){n.push(f(t))}),Function.prototype.apply.call(u,i,n)}}var e=bt||/\bEdge\//.test(r.navigator&&r.navigator.userAgent);return{log:u("log"),info:u("info"),warn:u("warn"),error:u("error"),debug:function(){var t=u("debug");return function(){n&&t.apply(i,arguments)}}()}}]}function bv(n){return n+""}function kv(n,t){return"undefined"!=typeof n?n:t}function ih(n,t){return"undefined"==typeof n?t:"undefined"==typeof t?n:n+t}function dv(n,t){switch(n.type){case i.MemberExpression:if(n.computed)return!1;break;case i.UnaryExpression:return 1;case i.BinaryExpression:return"+"!==n.operator?1:!1;case i.CallExpression:return!1}return void 0===t?lo:t}function b(n,r,u){var f,o,e=n.isPure=dv(n,u);switch(n.type){case i.Program:f=!0;t(n.body,function(n){b(n.expression,r,e);f=f&&n.expression.constant});n.constant=f;break;case i.Literal:n.constant=!0;n.toWatch=[];break;case i.UnaryExpression:b(n.argument,r,e);n.constant=n.argument.constant;n.toWatch=n.argument.toWatch;break;case i.BinaryExpression:b(n.left,r,e);b(n.right,r,e);n.constant=n.left.constant&&n.right.constant;n.toWatch=n.left.toWatch.concat(n.right.toWatch);break;case i.LogicalExpression:b(n.left,r,e);b(n.right,r,e);n.constant=n.left.constant&&n.right.constant;n.toWatch=n.constant?[]:[n];break;case i.ConditionalExpression:b(n.test,r,e);b(n.alternate,r,e);b(n.consequent,r,e);n.constant=n.test.constant&&n.alternate.constant&&n.consequent.constant;n.toWatch=n.constant?[]:[n];break;case i.Identifier:n.constant=!1;n.toWatch=[n];break;case i.MemberExpression:b(n.object,r,e);n.computed&&b(n.property,r,e);n.constant=n.object.constant&&(!n.computed||n.property.constant);n.toWatch=n.constant?[]:[n];break;case i.CallExpression:f=u=n.filter?!r(n.callee.name).$stateful:!1;o=[];t(n.arguments,function(n){b(n,r,e);f=f&&n.constant;o.push.apply(o,n.toWatch)});n.constant=f;n.toWatch=u?o:[n];break;case i.AssignmentExpression:b(n.left,r,e);b(n.right,r,e);n.constant=n.left.constant&&n.right.constant;n.toWatch=[n];break;case i.ArrayExpression:f=!0;o=[];t(n.elements,function(n){b(n,r,e);f=f&&n.constant;o.push.apply(o,n.toWatch)});n.constant=f;n.toWatch=o;break;case i.ObjectExpression:f=!0;o=[];t(n.properties,function(n){b(n.value,r,e);f=f&&n.value.constant;o.push.apply(o,n.value.toWatch);n.computed&&(b(n.key,r,!1),f=f&&n.key.constant,o.push.apply(o,n.key.toWatch))});n.constant=f;n.toWatch=o;break;case i.ThisExpression:n.constant=!1;n.toWatch=[];break;case i.LocalsExpression:n.constant=!1;n.toWatch=[]}}function rh(n){if(1===n.length){n=n[0].expression;var t=n.toWatch;return 1!==t.length?t:t[0]!==n?t:void 0}}function uh(n){return n.type===i.Identifier||n.type===i.MemberExpression}function fh(n){if(1===n.body.length&&uh(n.body[0].expression))return{type:i.AssignmentExpression,left:n.body[0].expression,right:{type:i.NGValueParameter},operator:"="}}function eh(n){this.$filter=n}function oh(n){this.$filter=n}function pu(n,t,r){this.ast=new i(n,r);this.astCompiler=r.csp?new oh(t):new eh(t)}function ye(n){return e(n.valueOf)?n.valueOf():bw.call(n)}function gv(){var u=p(),f={"true":!0,"false":!1,"null":null,undefined:void 0},n,i;this.addLiteral=function(n,t){f[n]=t};this.setIdentifierFns=function(t,r){return n=t,i=r,this};this.$get=["$filter",function(o){function v(n,t){var i,r;switch(typeof n){case"string":return r=n=n.trim(),i=u[r],i||(i=new dr(c),i=new pu(i,o,c).parse(n),u[r]=l(i)),a(i,t);case"function":return a(n,t);default:return a(s,t)}}function h(n,t,i){return null==n||null==t?n===t:"object"!=typeof n||(n=ye(n),"object"!=typeof n||i)?n===t||n!==n&&t!==t:!1}function y(n,t,i,r,u){var f=r.inputs,e,s;if(1===f.length)return s=h,f=f[0],n.$watch(function(n){var t=f(n);return h(t,s,f.isPure)||(e=r(n,void 0,void 0,[t]),s=t&&ye(t)),e},t,i,u);for(var c=[],l=[],o=0,a=f.length;o<a;o++)c[o]=h,l[o]=null;return n.$watch(function(n){for(var i,u=!1,t=0,o=f.length;t<o;t++)i=f[t](n),(u||(u=!h(i,c[t],f[t].isPure)))&&(l[t]=i,c[t]=i&&ye(i));return u&&(e=r(n,void 0,void 0,l)),e},t,i,u)}function p(n,t,i,u,f){function a(){s(o)&&h()}function e(n,t,i,r){return o=y&&r?r[0]:c(n,t,i,r),s(o)&&n.$$postDigest(a),v(o)}var s=u.literal?w:r,h,o,c=u.$$intercepted||u,v=u.$$interceptor||vi,y=u.inputs&&!c.inputs;return e.literal=u.literal,e.constant=u.constant,e.inputs=u.inputs,l(e),h=n.$watch(e,t,i,f)}function w(n){var i=!0;return t(n,function(n){r(n)||(i=!1)}),i}function b(n,t,i,r){var u=n.$watch(function(n){return u(),r(n)},t,i);return u}function l(n){return n.constant?n.$$watchDelegate=b:n.oneTime?n.$$watchDelegate=p:n.inputs&&(n.$$watchDelegate=y),n}function k(n,t){function i(i){return t(n(i))}return i.$stateful=n.$stateful||t.$stateful,i.$$pure=n.$$pure&&t.$$pure,i}function a(n,t){if(!t)return n;n.$$interceptor&&(t=k(n.$$interceptor,t),n=n.$$intercepted);var r=!1,i=function(i,u,f,e){return i=r&&e?e[0]:n(i,u,f,e),t(i)};return i.$$intercepted=n,i.$$interceptor=t,i.literal=n.literal,i.oneTime=n.oneTime,i.constant=n.constant,t.$stateful||(r=!n.inputs,i.inputs=n.inputs?n.inputs:[n],t.$$pure||(i.inputs=i.inputs.map(function(n){return n.isPure===lo?function(t){return n(t)}:n}))),l(i)}var c={csp:hi().noUnsafeEval,literals:ri(f),isIdentifierStart:e(n)&&n,isIdentifierContinue:e(i)&&i};return v.$$getAst=function(n){var t=new dr(c);return new pu(t,o,c).getAst(n).ast},v}]}function ny(){var n=!0;this.$get=["$rootScope","$exceptionHandler",function(t,i){return sh(function(n){t.$evalAsync(n)},i,n)}];this.errorOnUnhandledRejections=function(t){return r(t)?(n=t,this):n}}function ty(){var n=!0;this.$get=["$browser","$exceptionHandler",function(t,i){return sh(function(n){t.defer(n)},i,n)}];this.errorOnUnhandledRejections=function(t){return r(t)?(n=t,this):n}}function sh(n,i,r){function tt(){return new et}function et(){var n=this.promise=new f;this.resolve=function(t){h(n,t)};this.reject=function(t){a(n,t)};this.notify=function(t){g(n,t)}}function f(){this.$$state={status:0}}function it(){for(var t,n;!y&&b.length;)t=b.shift(),t.pur||(t.pur=!0,n=t.value,n="Possibly unhandled rejection: "+("function"==typeof n?n.toString().replace(/ \{[\s\S]*$/,""):u(n)?"undefined":"string"!=typeof n?ha(n,void 0):n),wf(t.value)?i(t.value,n):i(n))}function k(t){!r||t.pending||2!==t.status||t.pur||(0===y&&0===b.length&&n(it),b.push(t));!t.processScheduled&&t.pending&&(t.processScheduled=!0,++y,n(function(){var c,u,o,f,l;o=t.pending;t.processScheduled=!1;t.pending=void 0;try{for(f=0,l=o.length;f<l;++f){t.pur=!0;u=o[f][0];c=o[f][t.status];try{e(c)?h(u,c(t.value)):1===t.status?h(u,t.value):a(u,t.value)}catch(s){a(u,s);s&&!0===s.$$passToExceptionHandler&&i(s)}}}finally{--y;r&&0===y&&n(it)}}))}function h(n,t){n.$$state.status||(t===n?d(n,ft("qcycle",t)):rt(n,t))}function rt(n,t){function f(t){i||(i=!0,rt(n,t))}function u(t){i||(i=!0,d(n,t))}function s(t){g(n,t)}var r,i=!1;try{(o(t)||e(t))&&(r=t.then);e(r)?(n.$$state.status=-1,r.call(t,f,u,s)):(n.$$state.value=t,n.$$state.status=1,k(n.$$state))}catch(h){u(h)}}function a(n,t){n.$$state.status||d(n,t)}function d(n,t){n.$$state.value=t;n.$$state.status=2;k(n.$$state)}function g(t,r){var u=t.$$state.pending;0>=t.$$state.status&&u&&u.length&&n(function(){for(var t,f,n=0,o=u.length;n<o;n++){f=u[n][0];t=u[n][3];try{g(f,e(t)?t(r):r)}catch(s){i(s)}}})}function p(n){var t=new f;return a(t,n),t}function ut(n,t,i){var r=null;try{e(i)&&(r=i())}catch(u){return p(u)}return r&&e(r.then)?r.then(function(){return t(n)},p):t(n)}function w(n,t,i,r){var u=new f;return h(u,n),u.then(t,i,r)}function s(n){if(!e(n))throw ft("norslvr",n);var t=new f;return n(function(n){h(t,n)},function(n){a(t,n)}),t}var ft=l("$q",TypeError),y=0,b=[],nt;return v(f.prototype,{then:function(n,t,i){if(u(n)&&u(t)&&u(i))return this;var r=new f;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([r,n,t,i]),0<this.$$state.status&&k(this.$$state),r},"catch":function(n){return this.then(null,n)},"finally":function(n,t){return this.then(function(t){return ut(t,nt,n)},function(t){return ut(t,p,n)},t)}}),nt=w,s.prototype=f.prototype,s.defer=tt,s.reject=p,s.when=w,s.resolve=nt,s.all=function(n){var i=new f,r=0,u=c(n)?[]:{};return t(n,function(n,t){r++;w(n).then(function(n){u[t]=n;--r||h(i,u)},function(n){a(i,n)})}),0===r&&h(i,u),i},s.race=function(n){var i=tt();return t(n,function(n){w(n).then(i.resolve,i.reject)}),i.promise},s}function iy(){this.$get=["$window","$timeout",function(n,t){var i=n.requestAnimationFrame||n.webkitRequestAnimationFrame,f=n.cancelAnimationFrame||n.webkitCancelAnimationFrame||n.webkitCancelRequestAnimationFrame,r=!!i,u=r?function(n){var t=i(n);return function(){f(t)}}:function(n){var i=t(n,16.66,!1);return function(){t.cancel(i)}};return u.supported=r,u}]}function ry(){function h(n){function t(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$id=++tf;this.$$ChildScope=null;this.$$suspended=!1}return t.prototype=n,t}var r=10,f=l("$rootScope"),n=null,i=null;this.digestTtl=function(n){return arguments.length&&(r=n),r};this.$get=["$exceptionHandler","$parse","$browser",function(c,l,a){function ft(n){n.currentScope.$$destroyed=!0}function b(n){9===bt&&(n.$$childHead&&b(n.$$childHead),n.$$nextSibling&&b(n.$$nextSibling));n.$parent=n.$$nextSibling=n.$$prevSibling=n.$$childHead=n.$$childTail=n.$root=n.$$watchers=null}function p(){this.$id=++tf;this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this.$root=this;this.$$suspended=this.$$destroyed=!1;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$$isolateBindings=null}function nt(n){if(v.$$phase)throw f("inprog",v.$$phase);v.$$phase=n}function k(n,t){do n.$$watchersCount+=t;while(n=n.$parent)}function tt(n,t,i){do n.$$listenerCount[i]-=t,0===n.$$listenerCount[i]&&delete n.$$listenerCount[i];while(n=n.$parent)}function it(){}function ut(){for(;d.length;)try{d.shift()()}catch(n){c(n)}i=null}function et(){null===i&&(i=a.defer(function(){v.$apply(ut)}))}p.prototype={constructor:p,$new:function(n,t){var i;return t=t||this,n?(i=new p,i.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=h(this)),i=new this.$$ChildScope),i.$parent=t,i.$$prevSibling=t.$$childTail,t.$$childHead?(t.$$childTail.$$nextSibling=i,t.$$childTail=i):t.$$childHead=t.$$childTail=i,(n||t!==this)&&i.$on("$destroy",ft),i},$watch:function(t,i,r,u){var o=l(t);if(i=e(i)?i:s,o.$$watchDelegate)return o.$$watchDelegate(this,i,r,o,t);var h=this,f=h.$$watchers,c={fn:i,last:it,get:o,exp:u||t,eq:!!r};return n=null,f||(f=h.$$watchers=[],f.$$digestWatchIndex=-1),f.unshift(c),f.$$digestWatchIndex++,k(this,1),function(){var t=sr(f,c);0<=t&&(k(h,-1),t<f.$$digestWatchIndex&&f.$$digestWatchIndex--);n=null}},$watchGroup:function(n,i){function c(){o=!1;try{h?(h=!1,i(r,r,u)):i(r,f,u)}finally{for(var t=0;t<n.length;t++)f[t]=r[t]}}var f=Array(n.length),r=Array(n.length),e=[],u=this,o=!1,h=!0,s;return n.length?1===n.length?this.$watch(n[0],function(n,t,u){r[0]=n;f[0]=t;i(r,n===t?r:f,u)}):(t(n,function(n,t){var i=u.$watch(n,function(n){r[t]=n;o||(o=!0,u.$evalAsync(c))});e.push(i)}),function(){for(;e.length;)e.shift()()}):(s=!0,u.$evalAsync(function(){s&&i(r,r,u)}),function(){s=!1})},$watchCollection:function(n,t){function h(n){i=n;var t,c,s,h;if(!u(i)){if(o(i))if(ni(i))for(r!==a&&(r=a,e=r.length=0,f++),n=i.length,e!==n&&(f++,r.length=e=n),t=0;t<n;t++)h=r[t],s=i[t],c=h!==h&&s!==s,c||h===s||(f++,r[t]=s);else{r!==v&&(r=v={},e=0,f++);n=0;for(t in i)vt.call(i,t)&&(n++,s=i[t],h=r[t],t in r?(c=h!==h&&s!==s,c||h===s||(f++,r[t]=s)):(e++,r[t]=s,f++));if(e>n)for(t in f++,r)vt.call(i,t)||(e--,delete r[t])}else r!==i&&(r=i,f++);return f}}h.$$pure=l(n).literal;h.$stateful=!h.$$pure;var c=this,i,r,s,p=1<t.length,f=0,w=l(n,h),a=[],v={},y=!0,e=0;return this.$watch(w,function(){if(y?(y=!1,t(i,i,c)):t(i,s,c),p)if(o(i))if(ni(i)){s=Array(i.length);for(var n=0;n<i.length;n++)s[n]=i[n]}else for(n in s={},i)vt.call(i,n)&&(s[n]=i[n]);else s=i})},$digest:function(){var u,s,h,p,et,o,l,tt=r,t,ft=y.length?v:this,b=[],k,d;nt("$digest");a.$$checkUrlChange();this===v&&null!==i&&(a.defer.cancel(i),ut());n=null;do{for(l=!1,t=ft,o=0;o<y.length;o++){try{d=y[o];p=d.fn;p(d.scope,d.locals)}catch(ot){c(ot)}n=null}y.length=0;n:do{if(o=!t.$$suspended&&t.$$watchers)for(o.$$digestWatchIndex=o.length;o.$$digestWatchIndex--;)try{if(u=o[o.$$digestWatchIndex])if(et=u.get,(s=et(t))===(h=u.last)||(u.eq?ct(s,h):rt(s)&&rt(h))){if(u===n){l=!1;break n}}else l=!0,n=u,u.last=u.eq?ri(s,null):s,p=u.fn,p(s,h===it?s:h,t),5>tt&&(k=4-tt,b[k]||(b[k]=[]),b[k].push({msg:e(u.exp)?"fn: "+(u.exp.name||u.exp.toString()):u.exp,newVal:s,oldVal:h}))}catch(st){c(st)}if(!(o=!t.$$suspended&&t.$$watchersCount&&t.$$childHead||t!==ft&&t.$$nextSibling))for(;t!==ft&&!(o=t.$$nextSibling);)t=t.$parent}while(t=o);if((l||y.length)&&!tt--)throw v.$$phase=null,f("infdig",r,b);}while(l||y.length);for(v.$$phase=null;g<w.length;)try{w[g++]()}catch(ht){c(ht)}w.length=g=0;a.$$checkUrlChange()},$suspend:function(){this.$$suspended=!0},$isSuspended:function(){return this.$$suspended},$resume:function(){this.$$suspended=!1},$destroy:function(){var n,t;if(!this.$$destroyed){n=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;this===v&&a.$$applicationDestroyed();k(this,-this.$$watchersCount);for(t in this.$$listenerCount)tt(this,this.$$listenerCount[t],t);n&&n.$$childHead===this&&(n.$$childHead=this.$$nextSibling);n&&n.$$childTail===this&&(n.$$childTail=this.$$prevSibling);this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling);this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling);this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=s;this.$on=this.$watch=this.$watchGroup=function(){return s};this.$$listeners={};this.$$nextSibling=null;b(this)}},$eval:function(n,t){return l(n)(this,t)},$evalAsync:function(n,t){v.$$phase||y.length||a.defer(function(){y.length&&v.$digest()});y.push({scope:this,fn:l(n),locals:t})},$$postDigest:function(n){w.push(n)},$apply:function(n){try{nt("$apply");try{return this.$eval(n)}finally{v.$$phase=null}}catch(i){c(i)}finally{try{v.$digest()}catch(t){throw c(t),t;}}},$applyAsync:function(n){function t(){i.$eval(n)}var i=this;n&&d.push(t);n=l(n);et()},$on:function(n,t){var r=this.$$listeners[n],i,u;r||(this.$$listeners[n]=r=[]);r.push(t);i=this;do i.$$listenerCount[n]||(i.$$listenerCount[n]=0),i.$$listenerCount[n]++;while(i=i.$parent);return u=this,function(){var i=r.indexOf(t);-1!==i&&(delete r[i],tt(u,1,n))}},$emit:function(n){var o=[],r,i=this,e=!1,u={name:n,targetScope:i,stopPropagation:function(){e=!0},preventDefault:function(){u.defaultPrevented=!0},defaultPrevented:!1},s=hr([u],arguments,1),t,f;do{for(r=i.$$listeners[n]||o,u.currentScope=i,t=0,f=r.length;t<f;t++)if(r[t])try{r[t].apply(null,s)}catch(h){c(h)}else r.splice(t,1),t--,f--;if(e)break;i=i.$parent}while(i);return u.currentScope=null,u},$broadcast:function(n){var t=this,i=this,u={name:n,targetScope:this,preventDefault:function(){u.defaultPrevented=!0},defaultPrevented:!1},e,r,f;if(!this.$$listenerCount[n])return u;for(e=hr([u],arguments,1);t=i;){for(u.currentScope=t,i=t.$$listeners[n]||[],r=0,f=i.length;r<f;r++)if(i[r])try{i[r].apply(null,e)}catch(o){c(o)}else i.splice(r,1),r--,f--;if(!(i=t.$$listenerCount[n]&&t.$$childHead||t!==this&&t.$$nextSibling))for(;t!==this&&!(i=t.$$nextSibling);)t=t.$parent}return u.currentScope=null,u}};var v=new p,y=v.$$asyncQueue=[],w=v.$$postDigestQueue=[],d=v.$$applyAsyncQueue=[],g=0;return v}]}function uy(){var n=/^\s*(https?|s?ftp|mailto|tel|file):/,t=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(t){return r(t)?(n=t,this):n};this.imgSrcSanitizationWhitelist=function(n){return r(n)?(t=n,this):t};this.$get=function(){return function(i,r){var f=r?t:n,u=at(i&&i.trim()).href;return""===u||u.match(f)?i:"unsafe:"+u}}}function fy(n){if("self"===n)return n;if(h(n)){if(-1<n.indexOf("***"))throw ii("iwcard",n);return n=ec(n).replace(/\\\*\\\*/g,".*").replace(/\\\*/g,"[^:/.?&;]*"),new RegExp("^"+n+"$")}if(fr(n))return new RegExp("^"+n.source+"$");throw ii("imatcher");}function hh(n){var i=[];return r(n)&&t(n,function(n){i.push(fy(n))}),i}function ey(){this.SCE_CONTEXTS=nt;var t=["self"],i=[];this.resourceUrlWhitelist=function(n){return arguments.length&&(t=hh(n)),t};this.resourceUrlBlacklist=function(n){return arguments.length&&(i=hh(n)),i};this.$get=["$injector","$$sanitizeUri",function(r,f){function c(t,i){var r;return"self"===t?(r=pe(i,wc))||(n.document.baseURI?r=n.document.baseURI:(ir||(ir=n.document.createElement("a"),ir.href=".",ir=ir.cloneNode(!1)),r=ir.href),r=pe(i,r)):r=!!t.exec(i.href),r}function s(n){var t=function(n){this.$$unwrapTrustedValue=function(){return n}};return n&&(t.prototype=new n),t.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},t.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},t}var l=function(){throw ii("unsafe");},h,o;return r.has("$sanitize")&&(l=r.get("$sanitize")),h=s(),o={},o[nt.HTML]=s(h),o[nt.CSS]=s(h),o[nt.MEDIA_URL]=s(h),o[nt.URL]=s(o[nt.MEDIA_URL]),o[nt.JS]=s(h),o[nt.RESOURCE_URL]=s(o[nt.URL]),{trustAs:function(n,t){var i=o.hasOwnProperty(n)?o[n]:null;if(!i)throw ii("icontext",n,t);if(null===t||u(t)||""===t)return t;if("string"!=typeof t)throw ii("itype",n);return new i(t)},getTrusted:function(n,r){var h,s,v,a;if(null===r||u(r)||""===r)return r;if(h=o.hasOwnProperty(n)?o[n]:null,h&&r instanceof h)return r.$$unwrapTrustedValue();if(e(r.$$unwrapTrustedValue)&&(r=r.$$unwrapTrustedValue()),n===nt.MEDIA_URL||n===nt.URL)return f(r,n===nt.MEDIA_URL);if(n===nt.RESOURCE_URL){for(h=at(r.toString()),a=!1,s=0,v=t.length;s<v;s++)if(c(t[s],h)){a=!0;break}if(a)for(s=0,v=i.length;s<v;s++)if(c(i[s],h)){a=!1;break}if(a)return r;throw ii("insecurl",r.toString());}if(n===nt.HTML)return l(r);throw ii("unsafe");},valueOf:function(n){return n instanceof h?n.$$unwrapTrustedValue():n}}}]}function oy(){var n=!0;this.enabled=function(t){return arguments.length&&(n=!!t),n};this.$get=["$parse","$sceDelegate",function(i,r){var u;if(n&&8>bt)throw ii("iequirks");u=wt(nt);u.isEnabled=function(){return n};u.trustAs=r.trustAs;u.getTrusted=r.getTrusted;u.valueOf=r.valueOf;n||(u.trustAs=u.getTrusted=function(n,t){return t},u.valueOf=vi);u.parseAs=function(n,t){var r=i(t);return r.literal&&r.constant?r:i(t,function(t){return u.getTrusted(n,t)})};var f=u.parseAs,e=u.getTrusted,o=u.trustAs;return t(nt,function(n,t){var i=a(t);u[("parse_as_"+i).replace(ao,uu)]=function(t){return f(n,t)};u[("get_trusted_"+i).replace(ao,uu)]=function(t){return e(n,t)};u[("trust_as_"+i).replace(ao,uu)]=function(t){return o(n,t)}}),u}]}function sy(){this.$get=["$window","$document",function(n,t){var r={},h=!((!n.nw||!n.nw.process)&&n.chrome&&(n.chrome.app&&n.chrome.app.runtime||!n.chrome.app&&n.chrome.runtime&&n.chrome.runtime.id))&&n.history&&n.history.pushState,e=it((/android (\d+)/.exec(a((n.navigator||{}).userAgent))||[])[1]),c=/Boxee/i.test((n.navigator||{}).userAgent),f=t[0]||{},i=f.body&&f.body.style,o=!1,s=!1;return i&&(o=!!("transition"in i||"webkitTransition"in i),s=!!("animation"in i||"webkitAnimation"in i)),{history:!(!h||4>e||c),hasEvent:function(n){if("input"===n&&bt)return!1;if(u(r[n])){var t=f.createElement("div");r[n]="on"+n in t}return r[n]},csp:hi(),transitions:o,animations:s,android:e}}]}function hy(){var n;this.httpOptions=function(t){return t?(n=t,this):n};this.$get=["$exceptionHandler","$templateCache","$http","$q","$sce",function(t,i,r,f,e){function o(s,l){o.totalPendingRequests++;(!h(s)||u(i.get(s)))&&(s=e.getTrustedResourceUrl(s));var a=r.defaults&&r.defaults.transformResponse;return c(a)?a=a.filter(function(n){return n!==he}):a===he&&(a=null),r.get(s,v({cache:i,transformResponse:a},n)).finally(function(){o.totalPendingRequests--}).then(function(n){return i.put(s,n.data)},function(n){return l||(n=kw("tpload",s,n.status,n.statusText),t(n)),f.reject(n)})}return o.totalPendingRequests=0,o}]}function cy(){this.$get=["$rootScope","$browser","$location",function(n,i,r){return{findBindings:function(n,i,r){n=n.getElementsByClassName("ng-binding");var u=[];return t(n,function(n){var f=ft.element(n).data("$binding");f&&t(f,function(t){r?new RegExp("(^|\\s)"+ec(i)+"(\\s|\\||$)").test(t)&&u.push(n):-1!==t.indexOf(i)&&u.push(n)})}),u},findModels:function(n,t,i){for(var f,u=["ng-","data-ng-","ng\\:"],r=0;r<u.length;++r)if(f=n.querySelectorAll("["+u[r]+"model"+(i?"=":"*=")+'"'+t+'"]'),f.length)return f},getLocation:function(){return r.url()},setLocation:function(t){t!==r.url()&&(r.url(t),n.$digest())},whenStable:function(n){i.notifyWhenNoOutstandingRequests(n)}}}]}function ly(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(n,t,i,u,f){function h(h,c,l){e(h)||(l=c,c=h,h=s);var w=kt.call(arguments,3),p=r(l)&&!l,a=(p?u:i).defer(),v=a.promise,y;return y=t.defer(function(){try{a.resolve(h.apply(null,w))}catch(t){a.reject(t);f(t)}finally{delete o[v.$$timeoutId]}p||n.$apply()},c),v.$$timeoutId=y,o[y]=a,v}var o={};return h.cancel=function(n){if(!n)return!1;if(!n.hasOwnProperty("$$timeoutId"))throw dw("badprom");if(!o.hasOwnProperty(n.$$timeoutId))return!1;n=n.$$timeoutId;var i=o[n];return i.promise.$$state.pur=!0,i.reject("canceled"),delete o[n],t.defer.cancel(n)},h}]}function at(n){return h(n)?(bt&&(tt.setAttribute("href",n),n=tt.href),tt.setAttribute("href",n),{href:tt.href,protocol:tt.protocol?tt.protocol.replace(/:$/,""):"",host:tt.host,search:tt.search?tt.search.replace(/^\?/,""):"",hash:tt.hash?tt.hash.replace(/^#/,""):"",hostname:tt.hostname,port:tt.port,pathname:"/"===tt.pathname.charAt(0)?tt.pathname:"/"+tt.pathname}):n}function ay(n){var t=[wc].concat(n.map(at));return function(n){return n=at(n),t.some(pe.bind(null,n))}}function pe(n,t){return n=at(n),t=at(t),n.protocol===t.protocol&&n.host===t.host}function vy(){this.$get=st(n)}function ch(n){function r(n){try{return decodeURIComponent(n)}catch(t){return n}}var f=n[0]||{},t={},i="";return function(){var n,e,o,s,h;try{n=f.cookie||""}catch(c){n=""}if(n!==i)for(i=n,n=i.split("; "),t={},o=0;o<n.length;o++)e=n[o],s=e.indexOf("="),0<s&&(h=r(e.substring(0,s)),u(t[h])&&(t[h]=r(e.substring(s+1))));return t}}function yy(){this.$get=ch}function lh(n){function i(r,u){if(o(r)){var f={};return t(r,function(n,t){f[t]=i(t,n)}),f}return n.factory(r+"Filter",u)}this.register=i;this.$get=["$injector",function(n){return function(t){return n.get(t+"Filter")}}];i("currency",ah);i("date",bh);i("filter",py);i("json",dy);i("limitTo",gy);i("lowercase",dc);i("number",vh);i("orderBy",kh);i("uppercase",gc)}function py(){return function(n,t,i,r){if(!ni(n)){if(null==n)return n;throw l("filter")("notarray",n);}r=r||"$";var u;switch(we(t)){case"function":break;case"boolean":case"null":case"number":case"string":u=!0;case"object":t=wy(t,i,r,u);break;default:return n}return Array.prototype.filter.call(n,t)}}function wy(n,t,i,r){var f=o(n)&&i in n;return!0===t?t=ct:e(t)||(t=function(n,t){return u(n)?!1:null===n||null===t?n===t:o(t)||o(n)&&!pf(n)?!1:(n=a(""+n),t=a(""+t),-1!==n.indexOf(t))}),function(u){return f&&!o(u)?ei(u,n[i],t,i,!1):ei(u,n,t,i,r)}}function ei(n,t,i,r,f,o){var h=we(n),l=we(t),s;if("string"===l&&"!"===t.charAt(0))return!ei(n,t.substring(1),i,r,f);if(c(n))return n.some(function(n){return ei(n,t,i,r,f)});switch(h){case"object":if(f){for(s in n)if(s.charAt&&"$"!==s.charAt(0)&&ei(n[s],t,i,r,!0))return!0;return o?!1:ei(n,t,i,r,!1)}if("object"===l){for(s in t)if(o=t[s],!e(o)&&!u(o)&&(h=s===r,!ei(h?n:n[s],o,i,r,h,h)))return!1;return!0}return i(n,t);case"function":return!1;default:return i(n,t)}}function we(n){return null===n?"null":typeof n}function ah(n){var t=n.NUMBER_FORMATS;return function(n,i,r){u(i)&&(i=t.CURRENCY_SYM);u(r)&&(r=t.PATTERNS[1].maxFrac);var f=i?/\u00A4/g:/\s*\u00A4\s*/g;return null==n?n:yh(n,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,r).replace(f,i)}}function vh(n){var t=n.NUMBER_FORMATS;return function(n,i){return null==n?n:yh(n,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,i)}}function by(n){var e=0,r,t,i,f,u;for(-1<(t=n.indexOf(kc))&&(n=n.replace(kc,"")),0<(i=n.search(/e/i))?(0>t&&(t=i),t+=+n.slice(i+1),n=n.substring(0,i)):0>t&&(t=n.length),i=0;n.charAt(i)===vo;i++);if(i===(u=n.length))r=[0],t=1;else{for(u--;n.charAt(u)===vo;)u--;for(t-=i,r=[],f=0;i<=u;i++,f++)r[f]=+n.charAt(i)}return t>bc&&(r=r.splice(0,bc-1),e=t-1,t=1),{d:r,e:e,i:t}}function ky(n,t,i,r){var f=n.d,o=f.length-n.i,e;if(t=u(t)?Math.min(Math.max(i,o),r):+t,i=t+n.i,r=f[i],0<i)for(f.splice(Math.max(n.i,i)),e=i;e<f.length;e++)f[e]=0;else for(o=Math.max(0,o),n.i=1,f.length=Math.max(1,i=t+1),f[0]=0,e=1;e<i;e++)f[e]=0;if(5<=r)if(0>i-1){for(r=0;r>i;r--)f.unshift(0),n.i++;f.unshift(1);n.i++}else f[i-1]++;for(;o<Math.max(0,t);o++)f.push(0);(t=f.reduceRight(function(n,t,i,r){return t+=n,r[i]=t%10,Math.floor(t/10)},0))&&(f.unshift(t),n.i++)}function yh(n,t,i,r,u){if(!h(n)&&!d(n)||isNaN(n))return"";var s=!isFinite(n),o=!1,e=Math.abs(n)+"",f="";if(s)f="∞";else{for(o=by(e),ky(o,u,t.minFrac,t.maxFrac),f=o.d,e=o.i,u=o.e,s=[],o=f.reduce(function(n,t){return n&&!t},!0);0>e;)f.unshift(0),e++;for(0<e?s=f.splice(e,f.length):(s=f,f=[0]),e=[],f.length>=t.lgSize&&e.unshift(f.splice(-t.lgSize,f.length).join(""));f.length>t.gSize;)e.unshift(f.splice(-t.gSize,f.length).join(""));f.length&&e.unshift(f.join(""));f=e.join(i);s.length&&(f+=r+s.join(""));u&&(f+="e+"+u)}return 0>n&&!o?t.negPre+f+t.negSuf:t.posPre+f+t.posSuf}function wu(n,t,i,r){var u="";for((0>n||r&&0>=n)&&(r?n=-n+1:(n=-n,u="-")),n=""+n;n.length<t;)n=vo+n;return i&&(n=n.substr(n.length-t)),u+n}function g(n,t,i,r,u){return i=i||0,function(f){return f=f["get"+n](),(0<i||f>-i)&&(f+=i),0===f&&-12===i&&(f=12),wu(f,t,r,u)}}function wr(n,t,i){return function(r,u){var f=r["get"+n](),e=gu((i?"STANDALONE":"")+(t?"SHORT":"")+n);return u[e][f]}}function ph(n){var t=new Date(n,0,1).getDay();return new Date(n,0,(4>=t?5:12)-t)}function wh(n){return function(t){var i=ph(t.getFullYear());return t=+new Date(t.getFullYear(),t.getMonth(),t.getDate()+(4-t.getDay()))-+i,t=1+Math.round(t/6048e5),wu(t,n)}}function be(n,t){return 0>=n.getFullYear()?t.ERAS[0]:t.ERAS[1]}function bh(n){function i(n){var t;if(t=n.match(r)){n=new Date(0);var i=0,u=0,f=t[8]?n.setUTCFullYear:n.setFullYear,e=t[8]?n.setUTCHours:n.setHours;t[9]&&(i=it(t[9]+t[10]),u=it(t[9]+t[11]));f.call(n,it(t[1]),it(t[2])-1,it(t[3]));i=it(t[4]||0)-i;u=it(t[5]||0)-u;f=it(t[6]||0);t=Math.round(1e3*parseFloat("0."+(t[7]||0)));e.call(n,i,u,f,t)}return n}var r=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(r,u,f){var c="",e=[],s,l,o;if(u=u||"mediumDate",u=n.DATETIME_FORMATS[u]||u,h(r)&&(r=tb.test(r)?it(r):i(r)),d(r)&&(r=new Date(r)),!et(r)||!isFinite(r.getTime()))return r;for(;u;)(l=nb.exec(u))?(e=hr(e,l,1),u=e.pop()):(e.push(u),u=null);return o=r.getTimezoneOffset(),f&&(o=df(f,o),r=gf(r,f,!0)),t(e,function(t){s=gw[t];c+=s?s(r,n.DATETIME_FORMATS,o):"''"===t?"'":t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),c}}function dy(){return function(n,t){return u(t)&&(t=2),cr(n,t)}}function gy(){return function(n,t,i){return(t=Infinity===Math.abs(Number(t))?Number(t):it(t),rt(t))?n:(d(n)&&(n=n.toString()),!ni(n))?n:(i=!i||isNaN(i)?0:it(i),i=0>i?Math.max(0,n.length+i):i,0<=t?ke(n,i,i+t):0===i?ke(n,t,n.length):ke(n,Math.max(0,i+t),i))}}function ke(n,t,i){return h(n)?n.slice(t,i):kt.call(n,t,i)}function kh(n){function r(t){return t.map(function(t){var r=1,i=vi,u;return e(t)?i=t:h(t)&&(("+"===t.charAt(0)||"-"===t.charAt(0))&&(r="-"===t.charAt(0)?-1:1,t=t.substring(1)),""!==t&&(i=n(t),i.constant)&&(u=i(),i=function(n){return n[u]})),{get:i,descending:r}})}function t(n){switch(typeof n){case"number":case"boolean":case"string":return!0;default:return!1}}function i(n,t){var f=0,u=n.type,i=t.type,r;return u===i?(i=n.value,r=t.value,"string"===u?(i=i.toLowerCase(),r=r.toLowerCase()):"object"===u&&(o(i)&&(i=n.index),o(r)&&(r=t.index)),i!==r&&(f=i<r?-1:1)):f="undefined"===u?1:"undefined"===i?-1:"null"===u?1:"null"===i?-1:u<i?-1:1,f}return function(n,u,f,o){if(null==n)return n;if(!ni(n))throw l("orderBy")("notarray",n);c(u)||(u=[u]);0===u.length&&(u=["+"]);var s=r(u),h=f?-1:1,a=e(o)?o:i;return n=Array.prototype.map.call(n,function(n,i){return{value:n,tieBreaker:{value:i,type:"number",index:i},predicateValues:s.map(function(r){var u=r.get(n);if(r=typeof u,null===u)r="null";else if("object"===r)n:{if(e(u.valueOf)&&(u=u.valueOf(),t(u)))break n;pf(u)&&(u=u.toString(),t(u))}return{value:u,type:r,index:i}})}}),n.sort(function(n,t){for(var u,r=0,f=s.length;r<f;r++)if(u=a(n.predicateValues[r],t.predicateValues[r]),u)return u*s[r].descending*h;return(a(n.tieBreaker,t.tieBreaker)||i(n.tieBreaker,t.tieBreaker))*h}),n.map(function(n){return n.value})}}function bi(n){return e(n)&&(n={link:n}),n.restrict=n.restrict||"AC",st(n)}function bu(n,t,i,r,u){this.$$controls=[];this.$error={};this.$$success={};this.$pending=void 0;this.$name=u(t.name||t.ngForm||"")(i);this.$dirty=!1;this.$valid=this.$pristine=!0;this.$submitted=this.$invalid=!1;this.$$parentForm=rr;this.$$element=n;this.$$animate=r;dh(this)}function dh(n){n.$$classCache={};n.$$classCache[cl]=!(n.$$classCache[nu]=n.$$element.hasClass(nu))}function gh(n){function i(n,t,i){i&&!n.$$classCache[t]?(n.$$animate.addClass(n.$$element,t),n.$$classCache[t]=!0):!i&&n.$$classCache[t]&&(n.$$animate.removeClass(n.$$element,t),n.$$classCache[t]=!1)}function r(n,t,r){t=t?"-"+is(t,"-"):"";i(n,nu+t,!0===r);i(n,cl+t,!1===r)}var f=n.set,t=n.unset;n.clazz.prototype.$setValidity=function(n,e,o){u(e)?(this.$pending||(this.$pending={}),f(this.$pending,n,o)):(this.$pending&&t(this.$pending,n,o),nc(this.$pending)&&(this.$pending=void 0));dt(e)?e?(t(this.$error,n,o),f(this.$$success,n,o)):(f(this.$error,n,o),t(this.$$success,n,o)):(t(this.$error,n,o),t(this.$$success,n,o));this.$pending?(i(this,"ng-pending",!0),this.$valid=this.$invalid=void 0,r(this,"",null)):(i(this,"ng-pending",!1),this.$valid=nc(this.$error),this.$invalid=!this.$valid,r(this,"",this.$valid));e=this.$pending&&this.$pending[n]?void 0:this.$error[n]?!1:this.$$success[n]?!0:null;r(this,n,e);this.$$parentForm.$setValidity(n,e,this)}}function nc(n){if(n)for(var t in n)if(n.hasOwnProperty(t))return!1;return!0}function de(n){n.$formatters.push(function(t){return n.$isEmpty(t)?t:t.toString()})}function ki(n,t,i,r,f,e){var c=a(t[0].type),h,o,s,l;if(!f.android){h=!1;t.on("compositionstart",function(){h=!0});t.on("compositionupdate",function(n){(u(n.data)||""===n.data)&&(h=!1)});t.on("compositionend",function(){h=!1;s()})}if(s=function(n){if(o&&(e.defer.cancel(o),o=null),!h){var u=t.val();n=n&&n.type;"password"===c||i.ngTrim&&"false"===i.ngTrim||(u=y(u));(r.$viewValue!==u||""===u&&r.$$hasNativeValidators)&&r.$setViewValue(u,n)}},f.hasEvent("input"))t.on("input",s);else{l=function(n,t,i){o||(o=e.defer(function(){o=null;t&&t.value===i||s(n)}))};t.on("keydown",function(n){var t=n.keyCode;91===t||15<t&&19>t||37<=t&&40>=t||l(n,this,this.value)});if(f.hasEvent("paste"))t.on("paste cut drop",l)}t.on("change",s);if(el[c]&&r.$$hasNativeValidators&&c===i.type)t.on("keydown wheel mousedown",function(n){if(!o){var t=this.validity,i=t.badInput,r=t.typeMismatch;o=e.defer(function(){o=null;t.badInput===i&&t.typeMismatch===r||s(n)})}});r.$render=function(){var n=r.$isEmpty(r.$viewValue)?"":r.$viewValue;t.val()!==n&&t.val(n)}}function ku(n,i){return function(r,u){var e,f;if(et(r))return r;if(h(r)){if('"'===r.charAt(0)&&'"'===r.charAt(r.length-1)&&(r=r.substring(1,r.length-1)),ub.test(r))return new Date(r);if(n.lastIndex=0,e=n.exec(r))return e.shift(),f=u?{yyyy:u.getFullYear(),MM:u.getMonth()+1,dd:u.getDate(),HH:u.getHours(),mm:u.getMinutes(),ss:u.getSeconds(),sss:u.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},t(e,function(n,t){t<i.length&&(f[i[t]]=+n)}),e=new Date(f.yyyy,f.MM-1,f.dd,f.HH,f.mm,f.ss||0,1e3*f.sss||0),100>f.yyyy&&e.setFullYear(f.yyyy),e}return NaN}}function br(n,t,i,f){return function(e,o,s,h,c,l,a){function p(n){return n&&!(n.getTime&&n.getTime()!==n.getTime())}function k(n){return r(n)&&!et(n)?d(n)||void 0:n}function d(n,t){var u=h.$options.getOption("timezone"),r;return y&&y!==u&&(t=go(t,df(y))),r=i(n,t),!isNaN(r)&&u&&(r=gf(r,u)),r}var v,y,w,b;ge(e,o,s,h,n);ki(e,o,s,h,c,l);h.$parsers.push(function(i){if(h.$isEmpty(i))return null;if(t.test(i))return d(i,v);h.$$parserName=n});h.$formatters.push(function(n){if(n&&!et(n))throw tu("datefmt",n);if(p(n)){v=n;var t=h.$options.getOption("timezone");return t&&(y=t,v=gf(v,t,!0)),a("date")(n,f,t)}return y=v=null,""});(r(s.min)||s.ngMin)&&(h.$validators.min=function(n){return!p(n)||u(w)||i(n)>=w},s.$observe("min",function(n){w=k(n);h.$validate()}));(r(s.max)||s.ngMax)&&(h.$validators.max=function(n){return!p(n)||u(b)||i(n)<=b},s.$observe("max",function(n){b=k(n);h.$validate()}))}}function ge(n,t,i,r,u){(r.$$hasNativeValidators=o(t[0].validity))&&r.$parsers.push(function(n){var i=t.prop("validity")||{};if(i.badInput||i.typeMismatch)r.$$parserName=u;else return n})}function tc(n){n.$parsers.push(function(t){if(n.$isEmpty(t))return null;if(ob.test(t))return parseFloat(t);n.$$parserName="number"});n.$formatters.push(function(t){if(!n.$isEmpty(t)){if(!d(t))throw tu("numfmt",t);t=t.toString()}return t})}function di(n){return r(n)&&!d(n)&&(n=parseFloat(n)),rt(n)?void 0:n}function no(n){var t=n.toString(),i=t.indexOf(".");return-1===i?-1<n&&1>n&&(n=/e-(\d+)$/.exec(t))?Number(n[1]):0:t.length-i-1}function ic(n,t,i){n=Number(n);var u=(n|0)!==n,f=(t|0)!==t,e=(i|0)!==i;if(u||f||e){var r=u?no(n):0,o=f?no(t):0,s=e?no(i):0,r=Math.max(r,o,s),r=Math.pow(10,r);n*=r;t*=r;i*=r;u&&(n=Math.round(n));f&&(t=Math.round(t));e&&(i=Math.round(i))}return 0==(n-t)%i}function rc(n,t,i,u,f){if(r(u)){if(n=n(u),!n.constant)throw tu("constexpr",i,u);return n(t)}return f}function to(n,i){function u(n,t){var u,i,f,r;if(!n||!n.length)return[];if(!t||!t.length)return n;u=[];i=0;n:for(;i<n.length;i++){for(f=n[i],r=0;r<t.length;r++)if(f===t[r])continue n;u.push(f)}return u}function f(n){var t=n;return c(n)?t=n.map(f).join(" "):o(n)&&(t=Object.keys(n).filter(function(t){return n[t]}).join(" ")),t}n="ngClass"+n;var r;return["$parse",function(e){return{restrict:"AC",link:function(o,s,h){function a(n,i){var r=[];return t(n,function(n){(0<i||c[n])&&(c[n]=(c[n]||0)+i,c[n]===+(0<i)&&r.push(n))}),r.join(" ")}function y(n){if(n===i){var t=l,t=a(t&&t.split(" "),1);h.$addClass(t)}else t=l,t=a(t&&t.split(" "),-1),h.$removeClass(t);v=n}var c=s.data("$classCounts"),v=!0,l;c||(c=p(),s.data("$classCounts",c));"ngClass"!==n&&(r||(r=e("$index",function(n){return n&1})),o.$watch(r,y));o.$watch(e(h[n],f),function(n){if(v===i){var t=l&&l.split(" "),f=n&&n.split(" "),r=u(t,f),t=u(f,t),r=a(r,-1),t=a(t,1);h.$addClass(t);h.$removeClass(r)}l=n})}}}]}function du(n,t,i,r,u,f,e,o,s){this.$modelValue=this.$viewValue=Number.NaN;this.$$rawModelValue=void 0;this.$validators={};this.$asyncValidators={};this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$untouched=!0;this.$touched=!1;this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$error={};this.$$success={};this.$pending=void 0;this.$name=s(i.name||"",!1)(n);this.$$parentForm=rr;this.$options=cf;this.$$updateEvents="";this.$$updateEventHandler=this.$$updateEventHandler.bind(this);this.$$parsedNgModel=u(i.ngModel);this.$$parsedNgModelAssign=this.$$parsedNgModel.assign;this.$$ngModelGet=this.$$parsedNgModel;this.$$ngModelSet=this.$$parsedNgModelAssign;this.$$pendingDebounce=null;this.$$parserValid=void 0;this.$$parserName="parse";this.$$currentValidationRunId=0;this.$$scope=n;this.$$rootScope=n.$root;this.$$attr=i;this.$$element=r;this.$$animate=f;this.$$timeout=e;this.$$parse=u;this.$$q=o;this.$$exceptionHandler=t;dh(this);np(this)}function np(n){n.$$scope.$watch(function(t){return t=n.$$ngModelGet(t),t===n.$modelValue||n.$modelValue!==n.$modelValue&&t!==t||n.$$setModelValue(t),t})}function io(n){this.$$options=n}function uc(n,i){t(i,function(t,i){r(n[i])||(n[i]=t)})}function oi(n,t){n.prop("selected",t);n.attr("selected",t)}var ro={objectMaxDepth:5,urlErrorParamsEnabled:!0},tp=/^\/(.+)\/([a-z]*)$/,vt=Object.prototype.hasOwnProperty,a=function(n){return h(n)?n.toLowerCase():n},gu=function(n){return h(n)?n.toUpperCase():n},bt,f,nf,kt=[].slice,ip=[].splice,rp=[].push,ut=Object.prototype.toString,fc=Object.getPrototypeOf,si=l("ng"),ft=n.angular||(n.angular={}),uo,tf=0,rt,ci,sc,oo,so,hc,pc,dr,i,lo,dc,gc,nl,gr,rr,ll,cf,al;bt=n.document.documentMode;rt=Number.isNaN||function(n){return n!==n};s.$inject=[];vi.$inject=[];var up=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array]$/,y=function(n){return h(n)?n.trim():n},ec=function(n){return n.replace(/([-()[\]{}+?*.$^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},hi=function(){var i,t;if(!r(hi.rules))if(i=n.document.querySelector("[ng-csp]")||n.document.querySelector("[data-ng-csp]"),i)t=i.getAttribute("ng-csp")||i.getAttribute("data-ng-csp"),hi.rules={noUnsafeEval:!t||-1!==t.indexOf("no-unsafe-eval"),noInlineStyle:!t||-1!==t.indexOf("no-inline-style")};else{i=hi;try{new Function("");t=!1}catch(u){t=!0}i.rules={noUnsafeEval:t,noInlineStyle:!1}}return hi.rules},rf=function(){if(r(rf.name_))return rf.name_;for(var u,e=gi.length,i,f,t=0;t<e;++t)if(i=gi[t],u=n.document.querySelector("["+i.replace(":","\\:")+"jq]")){f=u.getAttribute(i+"jq");break}return rf.name_=f},fp=/:/g,gi=["ng-","data-ng-","ng:","x-ng-"],ep=function(t){var i=t.currentScript;return i?(i instanceof n.HTMLScriptElement||i instanceof n.SVGScriptElement)?(i=i.attributes,[i.getNamedItem("src"),i.getNamedItem("href"),i.getNamedItem("xlink:href")].every(function(n){if(!n)return!0;if(!n.value)return!1;var i=t.createElement("a");if(i.href=n.value,t.location.origin===i.origin)return!0;switch(i.protocol){case"http:":case"https:":case"ftp:":case"blob:":case"file:":case"data:":return!0;default:return!1}})):!1:!0}(n.document),op=/[A-Z]/g,oc=!1,ti=3,sp={full:"1.7.2",major:1,minor:7,dot:2,codeName:"extreme-compatiplication"};w.expando="ng339";ci=w.cache={};sc=1;w._data=function(n){return this.cache[n[this.expando]]||{}};var hp=/-([a-z])/g,cp=/^-ms-/,uf={mouseleave:"mouseout",mouseenter:"mouseover"},fo=l("jqLite"),lp=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,eo=/<|&#?\w+;/,ap=/<([\w:-]+)/,vp=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,yt={option:[1,'<select multiple="multiple">',"<\/select>"],thead:[1,"<table>","<\/table>"],col:[2,"<table><colgroup>","<\/colgroup><\/table>"],tr:[2,"<table><tbody>","<\/tbody><\/table>"],td:[3,"<table><tbody><tr>","<\/tr><\/tbody><\/table>"],_default:[0,"",""]};yt.optgroup=yt.option;yt.tbody=yt.tfoot=yt.colgroup=yt.caption=yt.thead;yt.th=yt.td;var yp=n.Node.prototype.contains||function(n){return!!(this.compareDocumentPosition(n)&16)},nr=w.prototype={ready:hs,toString:function(){var n=[];return t(this,function(t){n.push(""+t)}),"["+n.join(", ")+"]"},eq:function(n){return 0<=n?f(this[n]):f(this[this.length+n])},length:0,push:rp,sort:[].sort,splice:[].splice},ff={};t("multiple selected checked disabled readOnly required open".split(" "),function(n){ff[a(n)]=n});oo={};t("input select option textarea button form details".split(" "),function(n){oo[n]=!0});so={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern",ngStep:"step"};t({data:ee,removeData:fe,hasData:function(n){for(var t in ci[n.ng339])return!0;return!1},cleanData:function(n){for(var t=0,i=n.length;t<i;t++)fe(n[t]),es(n[t])}},function(n,t){w[t]=n});t({data:ee,inheritedData:lu,scope:function(n){return f.data(n,"$scope")||lu(n.parentNode||n,["$isolateScope","$scope"])},isolateScope:function(n){return f.data(n,"$isolateScope")||f.data(n,"$isolateScopeNoTemplate")},controller:os,injector:function(n){return lu(n,"$injector")},removeAttr:function(n,t){n.removeAttribute(t)},hasClass:su,css:function(n,t,i){if(t=fu(t.replace(cp,"ms-")),r(i))n.style[t]=i;else return n.style[t]},attr:function(n,t,i){var u=n.nodeType,f;if(u!==ti&&2!==u&&8!==u&&n.getAttribute)if(u=a(t),f=ff[u],r(i))null===i||!1===i&&f?n.removeAttribute(t):n.setAttribute(t,f?u:i);else return n=n.getAttribute(t),f&&null!==n&&(n=u),null===n?void 0:n},prop:function(n,t,i){if(r(i))n[t]=i;else return n[t]},text:function(){function n(n,t){if(u(t)){var i=n.nodeType;return 1===i||i===ti?n.textContent:""}n.textContent=t}return n.$dv="",n}(),val:function(n,i){if(u(i)){if(n.multiple&&"select"===ht(n)){var r=[];return t(n.options,function(n){n.selected&&r.push(n.value||n.text)}),r}return n.value}n.value=i},html:function(n,t){if(u(t))return n.innerHTML;eu(n,!0);n.innerHTML=t},empty:ss},function(n,t){w.prototype[t]=function(t,i){var r,f,e=this.length,s;if(n!==ss&&u(2===n.length&&n!==su&&n!==os?t:i)){if(o(t)){for(r=0;r<e;r++)if(n===ee)n(this[r],t);else for(f in t)n(this[r],f,t[f]);return this}for(r=n.$dv,e=u(r)?Math.min(e,1):e,f=0;f<e;f++)s=n(this[f],t,i),r=r?r+s:s;return r}for(r=0;r<e;r++)n(this[r],t,i);return this}});t({removeData:fe,on:function(n,t,i,u){var f,e,s,o;if(r(u))throw fo("onargs");if(re(n))for(u=ou(n,!0),f=u.events,e=u.handle,e||(e=u.handle=aa(n,f)),u=0<=t.indexOf(" ")?t.split(" "):[t],s=u.length,o=function(t,r,u){var o=f[t];o||(o=f[t]=[],o.specialHandlerWrapper=r,"$destroy"===t||u||n.addEventListener(t,e));o.push(i)};s--;)t=u[s],uf[t]?(o(uf[t],ya),o(t,void 0,!0)):o(t)},off:es,one:function(n,t,i){n=f(n);n.on(t,function r(){n.off(t,i);n.off(t,r)});n.on(t,i)},replaceWith:function(n,i){var r,u=n.parentNode;eu(n);t(new w(i),function(t){r?u.insertBefore(t,r.nextSibling):u.replaceChild(t,n);r=t})},children:function(n){var i=[];return t(n.childNodes,function(n){1===n.nodeType&&i.push(n)}),i},contents:function(n){return n.contentDocument||n.childNodes||[]},append:function(n,t){var i=n.nodeType,r;if(1===i||11===i)for(t=new w(t),i=0,r=t.length;i<r;i++)n.appendChild(t[i])},prepend:function(n,i){if(1===n.nodeType){var r=n.firstChild;t(new w(i),function(t){n.insertBefore(t,r)})}},wrap:function(n,t){var i=f(t).eq(0).clone()[0],r=n.parentNode;r&&r.replaceChild(i,n);i.appendChild(n)},remove:au,detach:function(n){au(n,!0)},after:function(n,t){var u=n,f=n.parentNode,i,e,r;if(f)for(t=new w(t),i=0,e=t.length;i<e;i++)r=t[i],f.insertBefore(r,u.nextSibling),u=r},addClass:cu,removeClass:hu,toggleClass:function(n,i,r){i&&t(i.split(" "),function(t){var i=r;u(i)&&(i=!su(n,t));(i?cu:hu)(n,t)})},parent:function(n){return(n=n.parentNode)&&11!==n.nodeType?n:null},next:function(n){return n.nextElementSibling},find:function(n,t){return n.getElementsByTagName?n.getElementsByTagName(t):[]},clone:ue,triggerHandler:function(n,i,r){var u,e,o=i.type||i,f=ou(n);(f=(f=f&&f.events)&&f[o])&&(u={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:s,type:o,target:n},i.type&&(u=v(u,i)),i=wt(f),e=r?[u].concat(r):[u],t(i,function(t){u.isImmediatePropagationStopped()||t.apply(n,e)}))}},function(n,t){w.prototype[t]=function(t,i,e){for(var o,s=0,h=this.length;s<h;s++)u(o)?(o=n(this[s],t,i,e),r(o)&&(o=f(o))):oe(o,n(this[s],t,i,e));return r(o)?o:this}});w.prototype.bind=w.prototype.on;w.prototype.unbind=w.prototype.off;hc=Object.create(null);ls.prototype={_idx:function(n){return n===this._lastKey?this._lastIndex:(this._lastKey=n,this._lastIndex=this._keys.indexOf(n))},_transformKey:function(n){return rt(n)?hc:n},get:function(n){return n=this._transformKey(n),n=this._idx(n),-1!==n?this._values[n]:void 0},set:function(n,t){n=this._transformKey(n);var i=this._idx(n);-1===i&&(i=this._lastIndex=this._keys.length);this._keys[i]=n;this._values[i]=t},"delete":function(n){return(n=this._transformKey(n),n=this._idx(n),-1===n)?!1:(this._keys.splice(n,1),this._values.splice(n,1),this._lastKey=NaN,this._lastIndex=-1,!0)}};var ef=ls,pp=[function(){this.$get=[function(){return ef}]}],wp=/^([^(]+?)=>/,bp=/^[^(]*\(\s*([^)]*)\)/m,kp=/,/,dp=/^\s*(_?)(\S+?)\1\s*$/,gp=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,li=l("$injector");vr.$$annotate=function(n,i,r){var u;if("function"==typeof n){if(!(u=n.$inject)){if(u=[],n.length){if(i)throw h(r)&&r||(r=n.name||wa(n)),li("strictdi",r);i=as(n);t(i[1].split(kp),function(n){n.replace(dp,function(n,t,i){u.push(i)})})}n.$inject=u}}else c(n)?(i=n.length-1,iu(n[i],"fn"),u=n.slice(0,i)):iu(n,"fn",!0);return u};var cc=l("$animate"),nw=function(){this.$get=s},tw=function(){var n=new ef,i=[];this.$get=["$$AnimateRunner","$rootScope",function(r,u){function f(n,i,r){var u=!1;return i&&(i=h(i)?i.split(" "):c(i)?i:[],t(i,function(t){t&&(u=!0,n[t]=r)})),u}function e(){t(i,function(i){var f=n.get(i);if(f){var e=ka(i.attr("class")),r="",u="";t(f,function(n,t){n!==!!e[t]&&(n?r+=(r.length?" ":"")+t:u+=(u.length?" ":"")+t)});t(i,function(n){r&&cu(n,r);u&&hu(n,u)});n.delete(i)}});i.length=0}return{enabled:s,on:s,off:s,pin:s,push:function(t,o,s,h){return h&&h(),s=s||{},s.from&&t.css(s.from),s.to&&t.css(s.to),(s.addClass||s.removeClass)&&(o=s.addClass,h=s.removeClass,s=n.get(t)||{},o=f(s,o,!0),h=f(s,h,!1),o||h)&&(n.set(t,s),i.push(t),1===i.length&&u.$$postDigest(e)),t=new r,t.complete(),t}}}]},iw=["$provide",function(n){var r=this,t=null,i=null;this.$$registeredAnimations=Object.create(null);this.register=function(t,i){if(t&&"."!==t.charAt(0))throw cc("notcsel",t);var u=t+"-animation";r.$$registeredAnimations[t.substr(1)]=u;n.factory(u,i)};this.customFilter=function(n){return 1===arguments.length&&(i=e(n)?n:null),i};this.classNameFilter=function(n){if(1===arguments.length&&(t=n instanceof RegExp?n:null)&&/[(\s|\/)]ng-animate[(\s|\/)]/.test(t.toString()))throw t=null,cc("nongcls","ng-animate");return t};this.$get=["$$animateQueue",function(n){function t(n,t,i){var r,u;if(i){n:{for(r=0;r<i.length;r++)if(u=i[r],1===u.nodeType){r=u;break n}r=void 0}!r||r.parentNode||r.previousElementSibling||(i=null)}i?i.after(n):t.prepend(n)}return{on:n.on,off:n.off,pin:n.pin,enabled:n.enabled,cancel:function(n){n.cancel&&n.cancel()},enter:function(i,r,u,e){return r=r&&f(r),u=u&&f(u),r=r||u.parent(),t(i,r,u),n.push(i,"enter",ui(e))},move:function(i,r,u,e){return r=r&&f(r),u=u&&f(u),r=r||u.parent(),t(i,r,u),n.push(i,"move",ui(e))},leave:function(t,i){return n.push(t,"leave",ui(i),function(){t.remove()})},addClass:function(t,i,r){return r=ui(r),r.addClass=yr(r.addclass,i),n.push(t,"addClass",r)},removeClass:function(t,i,r){return r=ui(r),r.removeClass=yr(r.removeClass,i),n.push(t,"removeClass",r)},setClass:function(t,i,r,u){return u=ui(u),u.addClass=yr(u.addClass,i),u.removeClass=yr(u.removeClass,r),n.push(t,"setClass",u)},animate:function(t,i,r,u,f){return f=ui(f),f.from=f.from?v(f.from,i):i,f.to=f.to?v(f.to,r):r,f.tempClasses=yr(f.tempClasses,u||"ng-inline-animate"),n.push(t,"animate",f)}}}]}],rw=function(){this.$get=["$$rAF",function(n){function i(i){t.push(i);1<t.length||n(function(){for(var n=0;n<t.length;n++)t[n]();t=[]})}var t=[];return function(){var n=!1;return i(function(){n=!0}),function(t){n?t():i(t)}}}]},uw=function(){this.$get=["$q","$sniffer","$$animateAsyncRun","$$isDocumentHidden","$timeout",function(n,i,r,u,f){function e(n){this.setHost(n);var t=r();this._doneCallbacks=[];this._tick=function(n){u()?f(n,0,!1):t(n)};this._state=0}return e.chain=function(n,t){function r(){i===n.length?t(!0):n[i](function(n){!1===n?t(!1):(i++,r())})}var i=0;r()},e.all=function(n,i){function u(t){r=r&&t;++f===n.length&&i(r)}var f=0,r=!0;t(n,function(n){n.done(u)})},e.prototype={setHost:function(n){this.host=n||{}},done:function(n){2===this._state?n():this._doneCallbacks.push(n)},progress:s,getPromise:function(){if(!this.promise){var t=this;this.promise=n(function(n,i){t.done(function(t){!1===t?i():n()})})}return this.promise},then:function(n,t){return this.getPromise().then(n,t)},"catch":function(n){return this.getPromise()["catch"](n)},"finally":function(n){return this.getPromise()["finally"](n)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end();this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel();this._resolve(!1)},complete:function(n){var t=this;0===t._state&&(t._state=1,t._tick(function(){t._resolve(n)}))},_resolve:function(n){2!==this._state&&(t(this._doneCallbacks,function(t){t(n)}),this._doneCallbacks.length=0,this._state=2)}},e}]},fw=function(){this.$get=["$$rAF","$q","$$AnimateRunner",function(n,t,i){return function(t,r){function e(){return n(function(){u.addClass&&(t.addClass(u.addClass),u.addClass=null);u.removeClass&&(t.removeClass(u.removeClass),u.removeClass=null);u.to&&(t.css(u.to),u.to=null);o||f.complete();o=!0}),f}var u=r||{},o,f;return u.$$prepared||(u=ri(u)),u.cleanupStyles&&(u.from=u.to=null),u.from&&(t.css(u.from),u.from=null),f=new i,{start:e,end:e}}}]},k=l("$compile"),ho=new function(){};vs.$inject=["$provide","$$sanitizeUriProvider"];vu.prototype.isFirstChange=function(){return this.previousValue===ho};var lc=/^((?:x|data)[:\-_])/i,ew=/[:\-_]+(.)/g,ac=l("$controller"),vc=/^(\S+)(\s+as\s+([\w$]+))?$/,ow=function(){this.$get=["$document",function(n){return function(t){return t?!t.nodeType&&t instanceof f&&(t=t[0]):t=n[0].body,t.offsetWidth+1}}]},yc="application/json",co={"Content-Type":yc+";charset=utf-8"},sw=/^\[|^\{(?!\{)/,hw={"[":/]$/,"{":/}$/},cw=/^\)]\}',?\n/,of=l("$http"),ai=ft.$interpolateMinErr=l("$interpolate");ai.throwNoconcat=function(n){throw ai("noconcat",n);};ai.interr=function(n,t){return ai("interr",n,t.toString())};var lw=l("$interval"),aw=function(){this.$get=function(){function i(n){var t=function(n){t.data=n;t.called=!0};return t.id=n,t}var t=ft.callbacks,n={};return{createCallback:function(r){r="_"+(t.$$counter++).toString(36);var u="angular.callbacks."+r,f=i(r);return n[u]=t[r]=f,u},wasCalled:function(t){return n[t].called},getResponse:function(t){return n[t].data},removeCallback:function(i){delete t[n[i].id];delete n[i]}}}},vw=/^([^?#]*)(\?([^#]*))?(#(.*))?$/,yw={http:80,https:443,ftp:21},kr=l("$location"),pw=/^\s*[\\/]{2,}/,ww={$$absUrl:"",$$html5:!1,$$replace:!1,absUrl:yu("$$absUrl"),url:function(n){if(u(n))return this.$$url;var t=vw.exec(n);return(t[1]||""===n)&&this.path(decodeURIComponent(t[1])),(t[2]||t[1]||""===n)&&this.search(t[3]||""),this.hash(t[5]||""),this},protocol:yu("$$protocol"),host:yu("$$host"),port:yu("$$port"),path:th("$$path",function(n){return n=null!==n?n.toString():"","/"===n.charAt(0)?n:"/"+n}),search:function(n,i){switch(arguments.length){case 0:return this.$$search;case 1:if(h(n)||d(n))n=n.toString(),this.$$search=ne(n);else if(o(n))n=ri(n,{}),t(n,function(t,i){null==t&&delete n[i]}),this.$$search=n;else throw kr("isrcharg");break;default:u(i)||null===i?delete this.$$search[n]:this.$$search[n]=i}return this.$$compose(),this},hash:th("$$hash",function(n){return null!==n?n.toString():""}),replace:function(){return this.$$replace=!0,this}};t([nh,ve,ae],function(n){n.prototype=Object.create(ww);n.prototype.state=function(t){if(!arguments.length)return this.$$state;if(n!==ae||!this.$$html5)throw kr("nostate");return this.$$state=u(t)?null:t,this.$$urlUpdatedByLocation=!0,this}});var tr=l("$parse"),bw={}.constructor.prototype.valueOf,sf=p();t("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(n){sf[n]=!0});pc={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'};dr=function(n){this.options=n};dr.prototype={constructor:dr,lex:function(n){for(this.text=n,this.index=0,this.tokens=[];this.index<this.text.length;)if(n=this.text.charAt(this.index),'"'===n||"'"===n)this.readString(n);else if(this.isNumber(n)||"."===n&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdentifierStart(this.peekMultichar()))this.readIdent();else if(this.is(n,"(){}[].,;:?"))this.tokens.push({index:this.index,text:n}),this.index++;else if(this.isWhitespace(n))this.index++;else{var t=n+this.peek(),i=t+this.peek(2),r=sf[t],u=sf[i];sf[n]||r||u?(n=u?i:r?t:n,this.tokens.push({index:this.index,text:n,operator:!0}),this.index+=n.length):this.throwError("Unexpected next character ",this.index,this.index+1)}return this.tokens},is:function(n,t){return-1!==t.indexOf(n)},peek:function(n){return n=n||1,this.index+n<this.text.length?this.text.charAt(this.index+n):!1},isNumber:function(n){return"0"<=n&&"9">=n&&"string"==typeof n},isWhitespace:function(n){return" "===n||"\r"===n||"\t"===n||"\n"===n||"\v"===n||" "===n},isIdentifierStart:function(n){return this.options.isIdentifierStart?this.options.isIdentifierStart(n,this.codePointAt(n)):this.isValidIdentifierStart(n)},isValidIdentifierStart:function(n){return"a"<=n&&"z">=n||"A"<=n&&"Z">=n||"_"===n||"$"===n},isIdentifierContinue:function(n){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(n,this.codePointAt(n)):this.isValidIdentifierContinue(n)},isValidIdentifierContinue:function(n,t){return this.isValidIdentifierStart(n,t)||this.isNumber(n)},codePointAt:function(n){return 1===n.length?n.charCodeAt(0):(n.charCodeAt(0)<<10)+n.charCodeAt(1)-56613888},peekMultichar:function(){var n=this.text.charAt(this.index),t=this.peek(),i,r;return t?(i=n.charCodeAt(0),r=t.charCodeAt(0),55296<=i&&56319>=i&&56320<=r&&57343>=r?n+t:n):n},isExpOperator:function(n){return"-"===n||"+"===n||this.isNumber(n)},throwError:function(n,t,i){i=i||this.index;t=r(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,i)+"]":" "+i;throw tr("lexerr",n,t,this.text);},readNumber:function(){for(var t,i,n="",r=this.index;this.index<this.text.length;){if(t=a(this.text.charAt(this.index)),"."===t||this.isNumber(t))n+=t;else if(i=this.peek(),"e"===t&&this.isExpOperator(i))n+=t;else if(this.isExpOperator(t)&&i&&this.isNumber(i)&&"e"===n.charAt(n.length-1))n+=t;else if(!this.isExpOperator(t)||i&&this.isNumber(i)||"e"!==n.charAt(n.length-1))break;else this.throwError("Invalid exponent");this.index++}this.tokens.push({index:r,text:n,constant:!0,value:Number(n)})},readIdent:function(){var t=this.index,n;for(this.index+=this.peekMultichar().length;this.index<this.text.length;){if(n=this.peekMultichar(),!this.isIdentifierContinue(n))break;this.index+=n.length}this.tokens.push({index:t,text:this.text.slice(t,this.index),identifier:!0})},readString:function(n){var f=this.index,t,u;this.index++;for(var r="",u=n,i=!1;this.index<this.text.length;){if(t=this.text.charAt(this.index),u=u+t,i)"u"===t?(i=this.text.substring(this.index+1,this.index+5),i.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+i+"]"),this.index+=4,r+=String.fromCharCode(parseInt(i,16))):r+=pc[t]||t,i=!1;else if("\\"===t)i=!0;else{if(t===n){this.index++;this.tokens.push({index:f,text:u,constant:!0,value:r});return}r+=t}this.index++}this.throwError("Unterminated quote",f)}};i=function(n,t){this.lexer=n;this.options=t};i.Program="Program";i.ExpressionStatement="ExpressionStatement";i.AssignmentExpression="AssignmentExpression";i.ConditionalExpression="ConditionalExpression";i.LogicalExpression="LogicalExpression";i.BinaryExpression="BinaryExpression";i.UnaryExpression="UnaryExpression";i.CallExpression="CallExpression";i.MemberExpression="MemberExpression";i.Identifier="Identifier";i.Literal="Literal";i.ArrayExpression="ArrayExpression";i.Property="Property";i.ObjectExpression="ObjectExpression";i.ThisExpression="ThisExpression";i.LocalsExpression="LocalsExpression";i.NGValueParameter="NGValueParameter";i.prototype={ast:function(n){return this.text=n,this.tokens=this.lexer.lex(n),n=this.program(),0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),n},program:function(){for(var n=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&n.push(this.expressionStatement()),!this.expect(";"))return{type:i.Program,body:n}},expressionStatement:function(){return{type:i.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var n=this.expression();this.expect("|");)n=this.filter(n);return n},expression:function(){return this.assignment()},assignment:function(){var n=this.ternary();if(this.expect("=")){if(!uh(n))throw tr("lval");n={type:i.AssignmentExpression,left:n,right:this.assignment(),operator:"="}}return n},ternary:function(){var n=this.logicalOR(),t,r;return this.expect("?")&&(t=this.expression(),this.consume(":"))?(r=this.expression(),{type:i.ConditionalExpression,test:n,alternate:t,consequent:r}):n},logicalOR:function(){for(var n=this.logicalAND();this.expect("||");)n={type:i.LogicalExpression,operator:"||",left:n,right:this.logicalAND()};return n},logicalAND:function(){for(var n=this.equality();this.expect("&&");)n={type:i.LogicalExpression,operator:"&&",left:n,right:this.equality()};return n},equality:function(){for(var n=this.relational(),t;t=this.expect("==","!=","===","!==");)n={type:i.BinaryExpression,operator:t.text,left:n,right:this.relational()};return n},relational:function(){for(var n=this.additive(),t;t=this.expect("<",">","<=",">=");)n={type:i.BinaryExpression,operator:t.text,left:n,right:this.additive()};return n},additive:function(){for(var n=this.multiplicative(),t;t=this.expect("+","-");)n={type:i.BinaryExpression,operator:t.text,left:n,right:this.multiplicative()};return n},multiplicative:function(){for(var n=this.unary(),t;t=this.expect("*","/","%");)n={type:i.BinaryExpression,operator:t.text,left:n,right:this.unary()};return n},unary:function(){var n;return(n=this.expect("+","-","!"))?{type:i.UnaryExpression,operator:n.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var n,t;for(this.expect("(")?(n=this.filterChain(),this.consume(")")):this.expect("[")?n=this.arrayDeclaration():this.expect("{")?n=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?n=ri(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?n={type:i.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?n=this.identifier():this.peek().constant?n=this.constant():this.throwError("not a primary expression",this.peek());t=this.expect("(","[",".");)"("===t.text?(n={type:i.CallExpression,callee:n,arguments:this.parseArguments()},this.consume(")")):"["===t.text?(n={type:i.MemberExpression,object:n,property:this.expression(),computed:!0},this.consume("]")):"."===t.text?n={type:i.MemberExpression,object:n,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return n},filter:function(n){n=[n];for(var t={type:i.CallExpression,callee:this.identifier(),arguments:n,filter:!0};this.expect(":");)n.push(this.expression());return t},parseArguments:function(){var n=[];if(")"!==this.peekToken().text)do n.push(this.filterChain());while(this.expect(","));return n},identifier:function(){var n=this.consume();return n.identifier||this.throwError("is not a valid identifier",n),{type:i.Identifier,name:n.text}},constant:function(){return{type:i.Literal,value:this.consume().value}},arrayDeclaration:function(){var n=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;n.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:i.ArrayExpression,elements:n}},object:function(){var t=[],n;if("}"!==this.peekToken().text)do{if(this.peek("}"))break;n={type:i.Property,kind:"init"};this.peek().constant?(n.key=this.constant(),n.computed=!1,this.consume(":"),n.value=this.expression()):this.peek().identifier?(n.key=this.identifier(),n.computed=!1,this.peek(":")?(this.consume(":"),n.value=this.expression()):n.value=n.key):this.peek("[")?(this.consume("["),n.key=this.expression(),this.consume("]"),n.computed=!0,this.consume(":"),n.value=this.expression()):this.throwError("invalid key",this.peek());t.push(n)}while(this.expect(","));return this.consume("}"),{type:i.ObjectExpression,properties:t}},throwError:function(n,t){throw tr("syntax",t.text,n,t.index+1,this.text,this.text.substring(t.index));},consume:function(n){if(0===this.tokens.length)throw tr("ueoe",this.text);var t=this.expect(n);return t||this.throwError("is unexpected, expecting ["+n+"]",this.peek()),t},peekToken:function(){if(0===this.tokens.length)throw tr("ueoe",this.text);return this.tokens[0]},peek:function(n,t,i,r){return this.peekAhead(0,n,t,i,r)},peekAhead:function(n,t,i,r,u){if(this.tokens.length>n){n=this.tokens[n];var f=n.text;if(f===t||f===i||f===r||f===u||!(t||i||r||u))return n}return!1},expect:function(n,t,i,r){return(n=this.peek(n,t,i,r))?(this.tokens.shift(),n):!1},selfReferential:{"this":{type:i.ThisExpression},$locals:{type:i.LocalsExpression}}};lo=2;eh.prototype={compile:function(n){var i=this,r,u;return this.state={nextId:0,filters:{},fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},b(n,i.$filter),r="",this.stage="assign",(u=fh(n))&&(this.state.computing="assign",r=this.nextId(),this.recurse(u,r),this.return_(r),r="fn.assign="+this.generateFunction("assign","s,v,l")),u=rh(n.body),i.stage="inputs",t(u,function(n,t){var r="fn"+t,u;i.state[r]={vars:[],body:[],own:{}};i.state.computing=r;u=i.nextId();i.recurse(n,u);i.return_(u);i.state.inputs.push({name:r,isPure:n.isPure});n.watchId=t}),this.state.computing="fn",this.stage="main",this.recurse(n),n='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+r+this.watchFns()+"return fn;",n=new Function("$filter","getStringValue","ifDefined","plus",n)(this.$filter,bv,kv,ih),this.state=this.stage=void 0,n},USE:"use",STRICT:"strict",watchFns:function(){var n=[],i=this.state.inputs,r=this;return t(i,function(t){n.push("var "+t.name+"="+r.generateFunction(t.name,"s"));t.isPure&&n.push(t.name,".isPure="+JSON.stringify(t.isPure)+";")}),i.length&&n.push("fn.inputs=["+i.map(function(n){return n.name}).join(",")+"];"),n.join("")},generateFunction:function(n,t){return"function("+t+"){"+this.varsPrefix(n)+this.body(n)+"};"},filterPrefix:function(){var n=[],i=this;return t(this.state.filters,function(t,r){n.push(t+"=$filter("+i.escape(r)+")")}),n.length?"var "+n.join(",")+";":""},varsPrefix:function(n){return this.state[n].vars.length?"var "+this.state[n].vars.join(",")+";":""},body:function(n){return this.state[n].body.join("")},recurse:function(n,u,f,e,o,h){var l,a,c=this,y,v,p;if(e=e||s,!h&&r(n.watchId))u=u||this.nextId(),this.if_("i",this.lazyAssign(u,this.computedMember("i",n.watchId)),this.lazyRecurse(n,u,f,e,o,!0));else switch(n.type){case i.Program:t(n.body,function(t,i){c.recurse(t.expression,void 0,void 0,function(n){a=n});i!==n.body.length-1?c.current().body.push(a,";"):c.return_(a)});break;case i.Literal:v=this.escape(n.value);this.assign(u,v);e(u||v);break;case i.UnaryExpression:this.recurse(n.argument,void 0,void 0,function(n){a=n});v=n.operator+"("+this.ifDefined(a,0)+")";this.assign(u,v);e(v);break;case i.BinaryExpression:this.recurse(n.left,void 0,void 0,function(n){l=n});this.recurse(n.right,void 0,void 0,function(n){a=n});v="+"===n.operator?this.plus(l,a):"-"===n.operator?this.ifDefined(l,0)+n.operator+this.ifDefined(a,0):"("+l+")"+n.operator+"("+a+")";this.assign(u,v);e(v);break;case i.LogicalExpression:u=u||this.nextId();c.recurse(n.left,u);c.if_("&&"===n.operator?u:c.not(u),c.lazyRecurse(n.right,u));e(u);break;case i.ConditionalExpression:u=u||this.nextId();c.recurse(n.test,u);c.if_(u,c.lazyRecurse(n.alternate,u),c.lazyRecurse(n.consequent,u));e(u);break;case i.Identifier:u=u||this.nextId();f&&(f.context="inputs"===c.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",n.name)+"?l:s"),f.computed=!1,f.name=n.name);c.if_("inputs"===c.stage||c.not(c.getHasOwnProperty("l",n.name)),function(){c.if_("inputs"===c.stage||"s",function(){o&&1!==o&&c.if_(c.isNull(c.nonComputedMember("s",n.name)),c.lazyAssign(c.nonComputedMember("s",n.name),"{}"));c.assign(u,c.nonComputedMember("s",n.name))})},u&&c.lazyAssign(u,c.nonComputedMember("l",n.name)));e(u);break;case i.MemberExpression:l=f&&(f.context=this.nextId())||this.nextId();u=u||this.nextId();c.recurse(n.object,l,void 0,function(){c.if_(c.notNull(l),function(){n.computed?(a=c.nextId(),c.recurse(n.property,a),c.getStringValue(a),o&&1!==o&&c.if_(c.not(c.computedMember(l,a)),c.lazyAssign(c.computedMember(l,a),"{}")),v=c.computedMember(l,a),c.assign(u,v),f&&(f.computed=!0,f.name=a)):(o&&1!==o&&c.if_(c.isNull(c.nonComputedMember(l,n.property.name)),c.lazyAssign(c.nonComputedMember(l,n.property.name),"{}")),v=c.nonComputedMember(l,n.property.name),c.assign(u,v),f&&(f.computed=!1,f.name=n.property.name))},function(){c.assign(u,"undefined")});e(u)},!!o);break;case i.CallExpression:u=u||this.nextId();n.filter?(a=c.filter(n.callee.name),y=[],t(n.arguments,function(n){var t=c.nextId();c.recurse(n,t);y.push(t)}),v=a+"("+y.join(",")+")",c.assign(u,v),e(u)):(a=c.nextId(),l={},y=[],c.recurse(n.callee,a,l,function(){c.if_(c.notNull(a),function(){t(n.arguments,function(t){c.recurse(t,n.constant?void 0:c.nextId(),void 0,function(n){y.push(n)})});v=l.name?c.member(l.context,l.name,l.computed)+"("+y.join(",")+")":a+"("+y.join(",")+")";c.assign(u,v)},function(){c.assign(u,"undefined")});e(u)}));break;case i.AssignmentExpression:a=this.nextId();l={};this.recurse(n.left,void 0,l,function(){c.if_(c.notNull(l.context),function(){c.recurse(n.right,a);v=c.member(l.context,l.name,l.computed)+n.operator+a;c.assign(u,v);e(u||v)})},1);break;case i.ArrayExpression:y=[];t(n.elements,function(t){c.recurse(t,n.constant?void 0:c.nextId(),void 0,function(n){y.push(n)})});v="["+y.join(",")+"]";this.assign(u,v);e(u||v);break;case i.ObjectExpression:y=[];p=!1;t(n.properties,function(n){n.computed&&(p=!0)});p?(u=u||this.nextId(),this.assign(u,"{}"),t(n.properties,function(n){n.computed?(l=c.nextId(),c.recurse(n.key,l)):l=n.key.type===i.Identifier?n.key.name:""+n.key.value;a=c.nextId();c.recurse(n.value,a);c.assign(c.member(u,l,n.computed),a)})):(t(n.properties,function(t){c.recurse(t.value,n.constant?void 0:c.nextId(),void 0,function(n){y.push(c.escape(t.key.type===i.Identifier?t.key.name:""+t.key.value)+":"+n)})}),v="{"+y.join(",")+"}",this.assign(u,v));e(u||v);break;case i.ThisExpression:this.assign(u,"s");e(u||"s");break;case i.LocalsExpression:this.assign(u,"l");e(u||"l");break;case i.NGValueParameter:this.assign(u,"v");e(u||"v")}},getHasOwnProperty:function(n,t){var i=n+"."+t,r=this.current().own;return r.hasOwnProperty(i)||(r[i]=this.nextId(!1,n+"&&("+this.escape(t)+" in "+n+")")),r[i]},assign:function(n,t){if(n)return this.current().body.push(n,"=",t,";"),n},filter:function(n){return this.state.filters.hasOwnProperty(n)||(this.state.filters[n]=this.nextId(!0)),this.state.filters[n]},ifDefined:function(n,t){return"ifDefined("+n+","+this.escape(t)+")"},plus:function(n,t){return"plus("+n+","+t+")"},return_:function(n){this.current().body.push("return ",n,";")},if_:function(n,t,i){if(!0===n)t();else{var r=this.current().body;r.push("if(",n,"){");t();r.push("}");i&&(r.push("else{"),i(),r.push("}"))}},not:function(n){return"!("+n+")"},isNull:function(n){return n+"==null"},notNull:function(n){return n+"!=null"},nonComputedMember:function(n,t){return/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(t)?n+"."+t:n+'["'+t.replace(/[^$_a-zA-Z0-9]/g,this.stringEscapeFn)+'"]'},computedMember:function(n,t){return n+"["+t+"]"},member:function(n,t,i){return i?this.computedMember(n,t):this.nonComputedMember(n,t)},getStringValue:function(n){this.assign(n,"getStringValue("+n+")")},lazyRecurse:function(n,t,i,r,u,f){var e=this;return function(){e.recurse(n,t,i,r,u,f)}},lazyAssign:function(n,t){var i=this;return function(){i.assign(n,t)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(n){return"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)},escape:function(n){if(h(n))return"'"+n.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(d(n))return n.toString();if(!0===n)return"true";if(!1===n)return"false";if(null===n)return"null";if("undefined"==typeof n)return"undefined";throw tr("esc");},nextId:function(n,t){var i="v"+this.state.nextId++;return n||this.current().vars.push(i+(t?"="+t:"")),i},current:function(){return this.state[this.state.computing]}};oh.prototype={compile:function(n){var f=this,i,e,r,u;return b(n,f.$filter),(i=fh(n))&&(e=this.recurse(i)),i=rh(n.body),i&&(r=[],t(i,function(n,t){var i=f.recurse(n);i.isPure=n.isPure;n.input=i;r.push(i);n.watchId=t})),u=[],t(n.body,function(n){u.push(f.recurse(n.expression))}),n=0===n.body.length?s:1===n.body.length?u[0]:function(n,i){var r;return t(u,function(t){r=t(n,i)}),r},e&&(n.assign=function(n,t,i){return e(n,i,t)}),r&&(n.inputs=r),n},recurse:function(n,r,u){var o,e,s=this,f;if(n.input)return this.inputs(n.input,n.watchId);switch(n.type){case i.Literal:return this.value(n.value,r);case i.UnaryExpression:return e=this.recurse(n.argument),this["unary"+n.operator](e,r);case i.BinaryExpression:return o=this.recurse(n.left),e=this.recurse(n.right),this["binary"+n.operator](o,e,r);case i.LogicalExpression:return o=this.recurse(n.left),e=this.recurse(n.right),this["binary"+n.operator](o,e,r);case i.ConditionalExpression:return this["ternary?:"](this.recurse(n.test),this.recurse(n.alternate),this.recurse(n.consequent),r);case i.Identifier:return s.identifier(n.name,r,u);case i.MemberExpression:return o=this.recurse(n.object,!1,!!u),n.computed||(e=n.property.name),n.computed&&(e=this.recurse(n.property)),n.computed?this.computedMember(o,e,r,u):this.nonComputedMember(o,e,r,u);case i.CallExpression:return f=[],t(n.arguments,function(n){f.push(s.recurse(n))}),n.filter&&(e=this.$filter(n.callee.name)),n.filter||(e=this.recurse(n.callee,!0)),n.filter?function(n,t,i,u){for(var s=[],o=0;o<f.length;++o)s.push(f[o](n,t,i,u));return n=e.apply(void 0,s,u),r?{context:void 0,name:void 0,value:n}:n}:function(n,t,i,u){var h=e(n,t,i,u),o,s;if(null!=h.value){for(o=[],s=0;s<f.length;++s)o.push(f[s](n,t,i,u));o=h.value.apply(h.context,o)}return r?{value:o}:o};case i.AssignmentExpression:return o=this.recurse(n.left,!0,1),e=this.recurse(n.right),function(n,t,i,u){var f=o(n,t,i,u);return n=e(n,t,i,u),f.context[f.name]=n,r?{value:n}:n};case i.ArrayExpression:return f=[],t(n.elements,function(n){f.push(s.recurse(n))}),function(n,t,i,u){for(var e=[],o=0;o<f.length;++o)e.push(f[o](n,t,i,u));return r?{value:e}:e};case i.ObjectExpression:return f=[],t(n.properties,function(n){n.computed?f.push({key:s.recurse(n.key),computed:!0,value:s.recurse(n.value)}):f.push({key:n.key.type===i.Identifier?n.key.name:""+n.key.value,computed:!1,value:s.recurse(n.value)})}),function(n,t,i,u){for(var o={},e=0;e<f.length;++e)f[e].computed?o[f[e].key(n,t,i,u)]=f[e].value(n,t,i,u):o[f[e].key]=f[e].value(n,t,i,u);return r?{value:o}:o};case i.ThisExpression:return function(n){return r?{value:n}:n};case i.LocalsExpression:return function(n,t){return r?{value:t}:t};case i.NGValueParameter:return function(n,t,i){return r?{value:i}:i}}},"unary+":function(n,t){return function(i,u,f,e){return i=n(i,u,f,e),i=r(i)?+i:0,t?{value:i}:i}},"unary-":function(n,t){return function(i,u,f,e){return i=n(i,u,f,e),i=r(i)?-i:-0,t?{value:i}:i}},"unary!":function(n,t){return function(i,r,u,f){return i=!n(i,r,u,f),t?{value:i}:i}},"binary+":function(n,t,i){return function(r,u,f,e){var o=n(r,u,f,e);return r=t(r,u,f,e),o=ih(o,r),i?{value:o}:o}},"binary-":function(n,t,i){return function(u,f,e,o){var s=n(u,f,e,o);return u=t(u,f,e,o),s=(r(s)?s:0)-(r(u)?u:0),i?{value:s}:s}},"binary*":function(n,t,i){return function(r,u,f,e){return r=n(r,u,f,e)*t(r,u,f,e),i?{value:r}:r}},"binary/":function(n,t,i){return function(r,u,f,e){return r=n(r,u,f,e)/t(r,u,f,e),i?{value:r}:r}},"binary%":function(n,t,i){return function(r,u,f,e){return r=n(r,u,f,e)%t(r,u,f,e),i?{value:r}:r}},"binary===":function(n,t,i){return function(r,u,f,e){return r=n(r,u,f,e)===t(r,u,f,e),i?{value:r}:r}},"binary!==":function(n,t,i){return function(r,u,f,e){return r=n(r,u,f,e)!==t(r,u,f,e),i?{value:r}:r}},"binary==":function(n,t,i){return function(r,u,f,e){return r=n(r,u,f,e)==t(r,u,f,e),i?{value:r}:r}},"binary!=":function(n,t,i){return function(r,u,f,e){return r=n(r,u,f,e)!=t(r,u,f,e),i?{value:r}:r}},"binary<":function(n,t,i){return function(r,u,f,e){return r=n(r,u,f,e)<t(r,u,f,e),i?{value:r}:r}},"binary>":function(n,t,i){return function(r,u,f,e){return r=n(r,u,f,e)>t(r,u,f,e),i?{value:r}:r}},"binary<=":function(n,t,i){return function(r,u,f,e){return r=n(r,u,f,e)<=t(r,u,f,e),i?{value:r}:r}},"binary>=":function(n,t,i){return function(r,u,f,e){return r=n(r,u,f,e)>=t(r,u,f,e),i?{value:r}:r}},"binary&&":function(n,t,i){return function(r,u,f,e){return r=n(r,u,f,e)&&t(r,u,f,e),i?{value:r}:r}},"binary||":function(n,t,i){return function(r,u,f,e){return r=n(r,u,f,e)||t(r,u,f,e),i?{value:r}:r}},"ternary?:":function(n,t,i,r){return function(u,f,e,o){return u=n(u,f,e,o)?t(u,f,e,o):i(u,f,e,o),r?{value:u}:u}},value:function(n,t){return function(){return t?{context:void 0,name:void 0,value:n}:n}},identifier:function(n,t,i){return function(r,u){return r=u&&n in u?u:r,i&&1!==i&&r&&null==r[n]&&(r[n]={}),u=r?r[n]:void 0,t?{context:r,name:n,value:u}:u}},computedMember:function(n,t,i,r){return function(u,f,e,o){var s=n(u,f,e,o),h,c;return null!=s&&(h=t(u,f,e,o),h+="",r&&1!==r&&s&&!s[h]&&(s[h]={}),c=s[h]),i?{context:s,name:h,value:c}:c}},nonComputedMember:function(n,t,i,r){return function(u,f,e,o){return u=n(u,f,e,o),r&&1!==r&&u&&null==u[t]&&(u[t]={}),f=null!=u?u[t]:void 0,i?{context:u,name:t,value:f}:f}},inputs:function(n,t){return function(i,r,u,f){return f?f[t]:n(i,r,u)}}};pu.prototype={constructor:pu,parse:function(n){n=this.getAst(n);var r=this.astCompiler.compile(n.ast),t=n.ast;return r.literal=0===t.body.length||1===t.body.length&&(t.body[0].expression.type===i.Literal||t.body[0].expression.type===i.ArrayExpression||t.body[0].expression.type===i.ObjectExpression),r.constant=n.ast.constant,r.oneTime=n.oneTime,r},getAst:function(n){var t=!1;return n=n.trim(),":"===n.charAt(0)&&":"===n.charAt(1)&&(t=!0,n=n.substring(2)),{ast:this.ast.ast(n),oneTime:t}}};var ii=l("$sce"),nt={HTML:"html",CSS:"css",MEDIA_URL:"mediaUrl",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},ao=/_([a-z])/g,kw=l("$templateRequest"),dw=l("$timeout"),tt=n.document.createElement("a"),wc=at(n.location.href),ir;ch.$inject=["$document"];lh.$inject=["$provide"];var bc=22,kc=".",vo="0";ah.$inject=["$locale"];vh.$inject=["$locale"];var gw={yyyy:g("FullYear",4,0,!1,!0),yy:g("FullYear",2,0,!0,!0),y:g("FullYear",1,0,!1,!0),MMMM:wr("Month"),MMM:wr("Month",!0),MM:g("Month",2,1),M:g("Month",1,1),LLLL:wr("Month",!1,!0),dd:g("Date",2),d:g("Date",1),HH:g("Hours",2),H:g("Hours",1),hh:g("Hours",2,-12),h:g("Hours",1,-12),mm:g("Minutes",2),m:g("Minutes",1),ss:g("Seconds",2),s:g("Seconds",1),sss:g("Milliseconds",3),EEEE:wr("Day"),EEE:wr("Day",!0),a:function(n,t){return 12>n.getHours()?t.AMPMS[0]:t.AMPMS[1]},Z:function(n,t,i){return n=-1*i,(0<=n?"+":"")+(wu(Math[0<n?"floor":"ceil"](n/60),2)+wu(Math.abs(n%60),2))},ww:wh(2),w:wh(1),G:be,GG:be,GGG:be,GGGG:function(n,t){return 0>=n.getFullYear()?t.ERANAMES[0]:t.ERANAMES[1]}},nb=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))([\s\S]*)/,tb=/^-?\d+$/;bh.$inject=["$locale"];dc=st(a);gc=st(gu);kh.$inject=["$parse"];nl=st({restrict:"E",compile:function(n,t){if(!t.href&&!t.xlinkHref)return function(n,t){if("a"===t[0].nodeName.toLowerCase()){var i="[object SVGAnimatedString]"===ut.call(t.prop("href"))?"xlink:href":"href";t.on("click",function(n){t.attr(i)||n.preventDefault()})}}}});gr={};t(ff,function(n,t){function r(n,r,u){n.$watch(u[i],function(n){u.$set(t,!!n)})}if("multiple"!==n){var i=lt("ng-"+t),u=r;"checked"===n&&(u=function(n,t,u){u.ngModel!==u[i]&&r(n,t,u)});gr[i]=function(){return{restrict:"A",priority:100,link:u}}}});t(so,function(n,t){gr[t]=function(){return{priority:100,link:function(n,i,r){if("ngPattern"===t&&"/"===r.ngPattern.charAt(0)&&(i=r.ngPattern.match(tp))){r.$set("ngPattern",new RegExp(i[1],i[2]));return}n.$watch(r[t],function(n){r.$set(t,n)})}}}});t(["src","srcset","href"],function(n){var t=lt("ng-"+n);gr[t]=function(){return{priority:99,link:function(i,r,u){var e=n,f=n;"href"===n&&"[object SVGAnimatedString]"===ut.call(r.prop("href"))&&(f="xlinkHref",u.$attr[f]="xlink:href",e=null);u.$observe(t,function(t){t?(u.$set(f,t),bt&&e&&r.prop(e,u[f])):"href"===n&&u.$set(f,null)})}}}});rr={$addControl:s,$$renameControl:function(n,t){n.$name=t},$removeControl:s,$setValidity:s,$setDirty:s,$setPristine:s,$setSubmitted:s,$$setSubmitted:s};bu.$inject=["$element","$attrs","$scope","$animate","$interpolate"];bu.prototype={$rollbackViewValue:function(){t(this.$$controls,function(n){n.$rollbackViewValue()})},$commitViewValue:function(){t(this.$$controls,function(n){n.$commitViewValue()})},$addControl:function(n){pi(n.$name,"input");this.$$controls.push(n);n.$name&&(this[n.$name]=n);n.$$parentForm=this},$$renameControl:function(n,t){var i=n.$name;this[i]===n&&delete this[i];this[t]=n;n.$name=t},$removeControl:function(n){n.$name&&this[n.$name]===n&&delete this[n.$name];t(this.$pending,function(t,i){this.$setValidity(i,null,n)},this);t(this.$error,function(t,i){this.$setValidity(i,null,n)},this);t(this.$$success,function(t,i){this.$setValidity(i,null,n)},this);sr(this.$$controls,n);n.$$parentForm=rr},$setDirty:function(){this.$$animate.removeClass(this.$$element,ur);this.$$animate.addClass(this.$$element,hf);this.$dirty=!0;this.$pristine=!1;this.$$parentForm.$setDirty()},$setPristine:function(){this.$$animate.setClass(this.$$element,ur,hf+" ng-submitted");this.$dirty=!1;this.$pristine=!0;this.$submitted=!1;t(this.$$controls,function(n){n.$setPristine()})},$setUntouched:function(){t(this.$$controls,function(n){n.$setUntouched()})},$setSubmitted:function(){for(var n=this;n.$$parentForm&&n.$$parentForm!==rr;)n=n.$$parentForm;n.$$setSubmitted()},$$setSubmitted:function(){this.$$animate.addClass(this.$$element,"ng-submitted");this.$submitted=!0;t(this.$$controls,function(n){n.$$setSubmitted&&n.$$setSubmitted()})}};gh({clazz:bu,set:function(n,t,i){var r=n[t];r?-1===r.indexOf(i)&&r.push(i):n[t]=[i]},unset:function(n,t,i){var r=n[t];r&&(sr(r,i),0===r.length&&delete n[t])}});var tl=function(n){return["$timeout","$parse",function(t,i){function r(n){return""===n?i('this[""]').assign:i(n).assign||s}return{name:"form",restrict:n?"EAC":"E",require:["form","^^?form"],controller:bu,compile:function(i,u){i.addClass(ur).addClass(nu);var f=u.name?"name":n&&u.ngForm?"ngForm":!1;return{pre:function(n,i,u,e){var o=e[0],c,h;if(!("action"in u)){c=function(t){n.$apply(function(){o.$commitViewValue();o.$setSubmitted()});t.preventDefault()};i[0].addEventListener("submit",c);i.on("$destroy",function(){t(function(){i[0].removeEventListener("submit",c)},0,!1)})}(e[1]||o.$$parentForm).$addControl(o);h=f?r(o.$name):s;f&&(h(n,o),u.$observe(f,function(t){o.$name!==t&&(h(n,void 0),o.$$parentForm.$$renameControl(o,t),h=r(o.$name),h(n,o))}));i.on("$destroy",function(){o.$$parentForm.$removeControl(o);h(n,void 0);v(o,rr)})}}}}}]},ib=tl(),rb=tl(!0),ub=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,fb=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,eb=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/,ob=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,il=/^(\d{4,})-(\d{2})-(\d{2})$/,rl=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,yo=/^(\d{4,})-W(\d\d)$/,ul=/^(\d{4,})-(\d\d)$/,fl=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,el=p();t(["date","datetime-local","month","time","week"],function(n){el[n]=!0});var ol={text:function(n,t,i,r,u,f){ki(n,t,i,r,u,f);de(r)},date:br("date",il,ku(il,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":br("datetimelocal",rl,ku(rl,"yyyy MM dd HH mm ss sss".split(" ")),"yyyy-MM-ddTHH:mm:ss.sss"),time:br("time",fl,ku(fl,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:br("week",yo,function(n,t){var i;if(et(n))return n;if(h(n)&&(yo.lastIndex=0,i=yo.exec(n),i)){var u=+i[1],r=+i[2],f=i=0,e=0,o=0,s=ph(u),r=7*(r-1);return t&&(i=t.getHours(),f=t.getMinutes(),e=t.getSeconds(),o=t.getMilliseconds()),new Date(u,0,s.getDate()+r,i,f,e,o)}return NaN},"yyyy-Www"),month:br("month",ul,ku(ul,["yyyy","MM"]),"yyyy-MM"),number:function(n,t,i,f,e,o){var s,h,c;ge(n,t,i,f,"number");tc(f);ki(n,t,i,f,e,o);(r(i.min)||i.ngMin)&&(f.$validators.min=function(n,t){return f.$isEmpty(t)||u(s)||t>=s},i.$observe("min",function(n){s=di(n);f.$validate()}));(r(i.max)||i.ngMax)&&(f.$validators.max=function(n,t){return f.$isEmpty(t)||u(h)||t<=h},i.$observe("max",function(n){h=di(n);f.$validate()}));(r(i.step)||i.ngStep)&&(f.$validators.step=function(n,t){return f.$isEmpty(t)||u(c)||ic(t,s||0,c)},i.$observe("step",function(n){c=di(n);f.$validate()}))},url:function(n,t,i,r,u,f){ki(n,t,i,r,u,f);de(r);r.$validators.url=function(n,t){var i=n||t;return r.$isEmpty(i)||fb.test(i)}},email:function(n,t,i,r,u,f){ki(n,t,i,r,u,f);de(r);r.$validators.email=function(n,t){var i=n||t;return r.$isEmpty(i)||eb.test(i)}},radio:function(n,t,i,r){var f=!i.ngTrim||"false"!==y(i.ngTrim);u(i.name)&&t.attr("name",++tf);t.on("change",function(n){var u;t[0].checked&&(u=i.value,f&&(u=y(u)),r.$setViewValue(u,n&&n.type))});r.$render=function(){var n=i.value;f&&(n=y(n));t[0].checked=n===r.$viewValue};i.$observe("value",r.$render)},range:function(n,t,i,f,e,o){function l(n,r){t.attr(n,i[n]);i.$observe(n,r)}function p(n){h=di(n);rt(f.$modelValue)||(s?(n=t.val(),h>n&&(n=h,t.val(n)),f.$setViewValue(n)):f.$validate())}function w(n){c=di(n);rt(f.$modelValue)||(s?(n=t.val(),c<n&&(t.val(c),n=c<h?h:c),f.$setViewValue(n)):f.$validate())}function b(n){a=di(n);rt(f.$modelValue)||(s&&f.$viewValue!==t.val()?f.$setViewValue(t.val()):f.$validate())}var y;ge(n,t,i,f,"range");tc(f);ki(n,t,i,f,e,o);var s=f.$$hasNativeValidators&&"range"===t[0].type,h=s?0:void 0,c=s?100:void 0,a=s?1:void 0,v=t[0].validity;n=r(i.min);e=r(i.max);o=r(i.step);y=f.$render;f.$render=s&&r(v.rangeUnderflow)&&r(v.rangeOverflow)?function(){y();f.$setViewValue(t.val())}:y;n&&(f.$validators.min=s?function(){return!0}:function(n,t){return f.$isEmpty(t)||u(h)||t>=h},l("min",p));e&&(f.$validators.max=s?function(){return!0}:function(n,t){return f.$isEmpty(t)||u(c)||t<=c},l("max",w));o&&(f.$validators.step=s?function(){return!v.stepMismatch}:function(n,t){return f.$isEmpty(t)||u(a)||ic(t,h||0,a)},l("step",b))},checkbox:function(n,t,i,r,u,f,e,o){var s=rc(o,n,"ngTrueValue",i.ngTrueValue,!0),h=rc(o,n,"ngFalseValue",i.ngFalseValue,!1);t.on("change",function(n){r.$setViewValue(t[0].checked,n&&n.type)});r.$render=function(){t[0].checked=r.$viewValue};r.$isEmpty=function(n){return!1===n};r.$formatters.push(function(n){return ct(n,s)});r.$parsers.push(function(n){return n?s:h})},hidden:s,button:s,submit:s,reset:s,file:s},sl=["$browser","$sniffer","$filter","$parse",function(n,t,i,r){return{restrict:"E",require:["?ngModel"],link:{pre:function(u,f,e,o){o[0]&&(ol[a(e.type)]||ol.text)(u,f,e,o[0],t,n,i,r)}}}}],sb=/^(true|false|\d+)$/,hb=function(){function n(n,t,i){var u=r(i)?i:9===bt?"":null;n.prop("value",u);t.$set("value",i)}return{restrict:"A",priority:100,compile:function(t,i){return sb.test(i.ngValue)?function(t,i,r){t=t.$eval(r.ngValue);n(i,r,t)}:function(t,i,r){t.$watch(r.ngValue,function(t){n(i,r,t)})}}}},cb=["$compile",function(n){return{restrict:"AC",compile:function(t){return n.$$addBindingClass(t),function(t,i,r){n.$$addBindingInfo(i,r.ngBind);i=i[0];t.$watch(r.ngBind,function(n){i.textContent=ie(n)})}}}}],lb=["$interpolate","$compile",function(n,t){return{compile:function(i){return t.$$addBindingClass(i),function(i,r,f){i=n(r.attr(f.$attr.ngBindTemplate));t.$$addBindingInfo(r,i.expressions);r=r[0];f.$observe("ngBindTemplate",function(n){r.textContent=u(n)?"":n})}}}}],ab=["$sce","$parse","$compile",function(n,t,i){return{restrict:"A",compile:function(r,u){var f=t(u.ngBindHtml),e=t(u.ngBindHtml,function(t){return n.valueOf(t)});return i.$$addBindingClass(r),function(t,r,u){i.$$addBindingInfo(r,u.ngBindHtml);t.$watch(e,function(){var i=f(t);r.html(n.getTrustedHtml(i)||"")})}}}}],vb=st({restrict:"A",require:"ngModel",link:function(n,t,i,r){r.$viewChangeListeners.push(function(){n.$eval(i.ngChange)})}}),yb=to("",!0),pb=to("Odd",0),wb=to("Even",1),bb=bi({compile:function(n,t){t.$set("ngCloak",void 0);n.removeClass("ng-cloak")}}),kb=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],hl={},db={blur:!0,focus:!0};t("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(n){var t=lt("ng-"+n);hl[t]=["$parse","$rootScope",function(i,r){return{restrict:"A",compile:function(u,f){var e=i(f[t]);return function(t,i){i.on(n,function(i){var u=function(){e(t,{$event:i})};db[n]&&r.$$phase?t.$evalAsync(u):t.$apply(u)})}}}}]});var gb=["$animate","$compile",function(n,t){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(i,r,u,f,e){var h,s,o;i.$watch(u.ngIf,function(i){i?s||e(function(i,f){s=f;i[i.length++]=t.$$createComment("end ngIf",u.ngIf);h={clone:i};n.enter(i,r.parent(),r)}):(o&&(o.remove(),o=null),s&&(s.$destroy(),s=null),h&&(o=ru(h.clone),n.leave(o).done(function(n){!1!==n&&(o=null)}),h=null))})}}}],nk=["$templateRequest","$anchorScroll","$animate",function(n,t,i){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:ft.noop,compile:function(u,f){var o=f.ngInclude||f.src,s=f.onload||"",e=f.autoscroll;return function(u,f,h,c,l){var p=0,a,v,y,w=function(){v&&(v.remove(),v=null);a&&(a.$destroy(),a=null);y&&(i.leave(y).done(function(n){!1!==n&&(v=null)}),v=y,y=null)};u.$watch(o,function(o){var v=function(n){!1!==n&&r(e)&&(!e||u.$eval(e))&&t()},h=++p;o?(n(o,!0).then(function(n){if(!u.$$destroyed&&h===p){var t=u.$new();c.template=n;n=l(t,function(n){w();i.enter(n,null,f).done(v)});a=t;y=n;a.$emit("$includeContentLoaded",o);u.$eval(s)}},function(){u.$$destroyed||h!==p||(w(),u.$emit("$includeContentError",o))}),u.$emit("$includeContentRequested",o)):(w(),c.template=null)})}}}}],tk=["$compile",function(t){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(i,r,u,f){ut.call(r[0]).match(/SVG/)?(r.empty(),t(rs(f.template,n.document).childNodes)(i,function(n){r.append(n)},{futureParentElement:r})):(r.html(f.template),t(r.contents())(i))}}}],ik=bi({priority:450,compile:function(){return{pre:function(n,t,i){n.$eval(i.ngInit)}}}}),rk=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(n,i,r,f){var e=r.ngList||", ",o="false"!==r.ngTrim,s=o?y(e):e;f.$parsers.push(function(n){if(!u(n)){var i=[];return n&&t(n.split(s),function(n){n&&i.push(o?y(n):n)}),i}});f.$formatters.push(function(n){if(c(n))return n.join(e)});f.$isEmpty=function(n){return!n||!n.length}}}},nu="ng-valid",cl="ng-invalid",ur="ng-pristine",hf="ng-dirty",tu=l("ngModel");du.$inject="$scope $exceptionHandler $attrs $element $parse $animate $timeout $q $interpolate".split(" ");du.prototype={$$initGetterSetters:function(){if(this.$options.getOption("getterSetter")){var n=this.$$parse(this.$$attr.ngModel+"()"),t=this.$$parse(this.$$attr.ngModel+"($$$p)");this.$$ngModelGet=function(t){var i=this.$$parsedNgModel(t);return e(i)&&(i=n(t)),i};this.$$ngModelSet=function(n,i){e(this.$$parsedNgModel(n))?t(n,{$$$p:i}):this.$$parsedNgModelAssign(n,i)}}else if(!this.$$parsedNgModel.assign)throw tu("nonassign",this.$$attr.ngModel,pt(this.$$element));},$render:s,$isEmpty:function(n){return u(n)||""===n||null===n||n!==n},$$updateEmptyClasses:function(n){this.$isEmpty(n)?(this.$$animate.removeClass(this.$$element,"ng-not-empty"),this.$$animate.addClass(this.$$element,"ng-empty")):(this.$$animate.removeClass(this.$$element,"ng-empty"),this.$$animate.addClass(this.$$element,"ng-not-empty"))},$setPristine:function(){this.$dirty=!1;this.$pristine=!0;this.$$animate.removeClass(this.$$element,hf);this.$$animate.addClass(this.$$element,ur)},$setDirty:function(){this.$dirty=!0;this.$pristine=!1;this.$$animate.removeClass(this.$$element,ur);this.$$animate.addClass(this.$$element,hf);this.$$parentForm.$setDirty()},$setUntouched:function(){this.$touched=!1;this.$untouched=!0;this.$$animate.setClass(this.$$element,"ng-untouched","ng-touched")},$setTouched:function(){this.$touched=!0;this.$untouched=!1;this.$$animate.setClass(this.$$element,"ng-touched","ng-untouched")},$rollbackViewValue:function(){this.$$timeout.cancel(this.$$pendingDebounce);this.$viewValue=this.$$lastCommittedViewValue;this.$render()},$validate:function(){if(!rt(this.$modelValue)){var i=this.$$lastCommittedViewValue,t=this.$$rawModelValue,r=this.$valid,u=this.$modelValue,f=this.$options.getOption("allowInvalid"),n=this;this.$$runValidators(t,i,function(i){f||r===i||(n.$modelValue=i?t:void 0,n.$modelValue!==u&&n.$$writeModelToScope())})}},$$runValidators:function(n,i,r){function l(){var r=!0;return t(f.$validators,function(t,u){var f=Boolean(t(n,i));r=r&&f;o(u,f)}),r?!0:(t(f.$asyncValidators,function(n,t){o(t,null)}),!1)}function a(){var r=[],u=!0;t(f.$asyncValidators,function(t,f){var s=t(n,i);if(!s||!e(s.then))throw tu("nopromise",s);o(f,void 0);r.push(s.then(function(){o(f,!0)},function(){u=!1;o(f,!1)}))});r.length?f.$$q.all(r).then(function(){h(u)},s):h(!0)}function o(n,t){c===f.$$currentValidationRunId&&f.$setValidity(n,t)}function h(n){c===f.$$currentValidationRunId&&r(n)}this.$$currentValidationRunId++;var c=this.$$currentValidationRunId,f=this;(function(){var n=f.$$parserName;if(u(f.$$parserValid))o(n,null);else return f.$$parserValid||(t(f.$validators,function(n,t){o(t,null)}),t(f.$asyncValidators,function(n,t){o(t,null)})),o(n,f.$$parserValid),f.$$parserValid;return!0})()?l()?a():h(!1):h(!1)},$commitViewValue:function(){var n=this.$viewValue;this.$$timeout.cancel(this.$$pendingDebounce);(this.$$lastCommittedViewValue!==n||""===n&&this.$$hasNativeValidators)&&(this.$$updateEmptyClasses(n),this.$$lastCommittedViewValue=n,this.$pristine&&this.$setDirty(),this.$$parseAndValidate())},$$parseAndValidate:function(){var n=this.$$lastCommittedViewValue,t=this,i,r,f;if(this.$$parserValid=u(n)?void 0:!0,this.$setValidity(this.$$parserName,null),this.$$parserName="parse",this.$$parserValid)for(i=0;i<this.$parsers.length;i++)if(n=this.$parsers[i](n),u(n)){this.$$parserValid=!1;break}rt(this.$modelValue)&&(this.$modelValue=this.$$ngModelGet(this.$$scope));r=this.$modelValue;f=this.$options.getOption("allowInvalid");this.$$rawModelValue=n;f&&(this.$modelValue=n,t.$modelValue!==r&&t.$$writeModelToScope());this.$$runValidators(n,this.$$lastCommittedViewValue,function(i){f||(t.$modelValue=i?n:void 0,t.$modelValue!==r&&t.$$writeModelToScope())})},$$writeModelToScope:function(){this.$$ngModelSet(this.$$scope,this.$modelValue);t(this.$viewChangeListeners,function(n){try{n()}catch(t){this.$$exceptionHandler(t)}},this)},$setViewValue:function(n,t){this.$viewValue=n;this.$options.getOption("updateOnDefault")&&this.$$debounceViewValueCommit(t)},$$debounceViewValueCommit:function(n){var t=this.$options.getOption("debounce"),i;d(t[n])?t=t[n]:d(t["default"])&&-1===this.$options.getOption("updateOn").indexOf(n)?t=t["default"]:d(t["*"])&&(t=t["*"]);this.$$timeout.cancel(this.$$pendingDebounce);i=this;0<t?this.$$pendingDebounce=this.$$timeout(function(){i.$commitViewValue()},t):this.$$rootScope.$$phase?this.$commitViewValue():this.$$scope.$apply(function(){i.$commitViewValue()})},$overrideModelOptions:function(n){this.$options=this.$options.createChild(n);this.$$setUpdateOnEvents()},$processModelValue:function(){var n=this.$$format();this.$viewValue!==n&&(this.$$updateEmptyClasses(n),this.$viewValue=this.$$lastCommittedViewValue=n,this.$render(),this.$$runValidators(this.$modelValue,this.$viewValue,s))},$$format:function(){for(var t=this.$formatters,i=t.length,n=this.$modelValue;i--;)n=t[i](n);return n},$$setModelValue:function(n){this.$modelValue=this.$$rawModelValue=n;this.$$parserValid=void 0;this.$processModelValue()},$$setUpdateOnEvents:function(){if(this.$$updateEvents&&this.$$element.off(this.$$updateEvents,this.$$updateEventHandler),this.$$updateEvents=this.$options.getOption("updateOn"))this.$$element.on(this.$$updateEvents,this.$$updateEventHandler)},$$updateEventHandler:function(n){this.$$debounceViewValueCommit(n&&n.type)}};gh({clazz:du,set:function(n,t){n[t]=!0},unset:function(n,t){delete n[t]}});ll=["$rootScope",function(n){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:du,priority:1,compile:function(t){return t.addClass(ur).addClass("ng-untouched").addClass(nu),{pre:function(n,t,i,r){var u=r[0];t=r[1]||u.$$parentForm;(r=r[2])&&(u.$options=r.$options);u.$$initGetterSetters();t.$addControl(u);i.$observe("name",function(n){u.$name!==n&&u.$$parentForm.$$renameControl(u,n)});n.$on("$destroy",function(){u.$$parentForm.$removeControl(u)})},post:function(t,i,r,u){function e(){f.$setTouched()}var f=u[0];f.$$setUpdateOnEvents();i.on("blur",function(){f.$touched||(n.$$phase?t.$evalAsync(e):t.$apply(e))})}}}}}];al=/(\s+|^)default(\s+|$)/;io.prototype={getOption:function(n){return this.$$options[n]},createChild:function(n){var i=!1;return n=v({},n),t(n,function(t,r){"$inherit"===t?"*"===r?i=!0:(n[r]=this.$$options[r],"updateOn"===r&&(n.updateOnDefault=this.$$options.updateOnDefault)):"updateOn"===r&&(n.updateOnDefault=!1,n[r]=y(t.replace(al,function(){return n.updateOnDefault=!0," "})))},this),i&&(delete n["*"],uc(n,this.$$options)),uc(n,cf.$$options),new io(n)}};cf=new io({updateOn:"",updateOnDefault:!0,debounce:0,getterSetter:!1,allowInvalid:!1,timezone:null});var uk=function(){function n(n,t){this.$$attrs=n;this.$$scope=t}return n.$inject=["$attrs","$scope"],n.prototype={$onInit:function(){var n=this.parentCtrl?this.parentCtrl.$options:cf,t=this.$$scope.$eval(this.$$attrs.ngModelOptions);this.$options=n.createChild(t)}},{restrict:"A",priority:10,require:{parentCtrl:"?^^ngModelOptions"},bindToController:!0,controller:n}},fk=bi({terminal:!0,priority:1e3}),ek=l("ngOptions"),ok=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([$\w][$\w]*)|(?:\(\s*([$\w][$\w]*)\s*,\s*([$\w][$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,sk=["$compile","$document","$parse",function(i,u,e){function h(n,t,i){function w(n,t,i,r,u){this.selectValue=n;this.viewValue=t;this.label=i;this.group=r;this.disabled=u}function l(n){var t,i;if(!s&&ni(n))t=n;else{t=[];for(i in n)n.hasOwnProperty(i)&&"$"!==i.charAt(0)&&t.push(i)}return t}var r=n.match(ok),o,s,u;if(!r)throw ek("iexp",n,pt(t));o=r[5]||r[7];s=r[6];n=/ as /.test(r[0])&&r[1];u=r[9];t=e(r[2]?r[1]:o);var b=n&&e(n)||t,k=u&&e(u),h=u?function(n,t){return k(i,t)}:function(n){return wi(n)},a=function(n,t){return h(n,c(n,t))},v=e(r[2]||r[1]),d=e(r[3]||""),y=e(r[4]||""),p=e(r[8]),f={},c=s?function(n,t){return f[s]=t,f[o]=n,f}:function(n){return f[o]=n,f};return{trackBy:u,getTrackByValue:a,getWatchables:e(p,function(n){var f=[];n=n||[];for(var o=l(n),s=o.length,e=0;e<s;e++){var t=n===o?e:o[e],u=n[t],t=c(u,t),u=h(u,t);f.push(u);(r[2]||r[1])&&(u=v(i,t),f.push(u));r[4]&&(t=y(i,t),f.push(t))}return f}),getOptions:function(){for(var k=[],e={},o=p(i)||[],s=l(o),g=s.length,f=0;f<g;f++){var t=o===s?f:s[f],n=c(o[t],t),r=b(i,n),t=h(r,n),nt=v(i,n),tt=d(i,n),n=y(i,n),r=new w(t,r,nt,tt,n);k.push(r);e[t]=r}return{items:k,selectValueMap:e,getOptionFromViewValue:function(n){return e[a(n)]},getViewValueFromOption:function(n){return u?ri(n.viewValue):n.viewValue}}}}}var o=n.document.createElement("option"),l=n.document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(n,t,i,r){r[0].registerOption=s},post:function(n,e,s,a){function tt(n){var t=(n=y.getOptionFromViewValue(n))&&n.element;return t&&!t.selected&&(t.selected=!0),n}function d(n,t){n.element=t;t.disabled=n.disabled;n.label!==t.label&&(t.label=n.label,t.textContent=n.label);t.value=n.selectValue}var v=a[0],p=a[1],g=s.multiple,b,nt,y,w,k;for(a=0,b=e.children(),nt=b.length;a<nt;a++)if(""===b[a].value){v.hasEmptyOption=!0;v.emptyOption=b.eq(a);break}e.empty();a=!!v.emptyOption;f(o.cloneNode(!1)).val("?");w=h(s.ngOptions,e,n);k=u[0].createDocumentFragment();v.generateUnknownOptionValue=function(){return"?"};g?(v.writeValue=function(n){if(y){var t=n&&n.map(tt)||[];y.items.forEach(function(n){n.element.selected&&-1===Array.prototype.indexOf.call(t,n)&&(n.element.selected=!1)})}},v.readValue=function(){var i=e.val()||[],n=[];return t(i,function(t){(t=y.selectValueMap[t])&&!t.disabled&&n.push(y.getViewValueFromOption(t))}),n},w.trackBy&&n.$watchCollection(function(){if(c(p.$viewValue))return p.$viewValue.map(function(n){return w.getTrackByValue(n)})},function(){p.$render()})):(v.writeValue=function(n){if(y){var i=e[0].options[e[0].selectedIndex],t=y.getOptionFromViewValue(n);i&&i.removeAttribute("selected");t?(e[0].value!==t.selectValue&&(v.removeUnknownOption(),e[0].value=t.selectValue,t.element.selected=!0),t.element.setAttribute("selected","selected")):v.selectUnknownOrEmptyOption(n)}},v.readValue=function(){var n=y.selectValueMap[e.val()];return n&&!n.disabled?(v.unselectEmptyOption(),v.removeUnknownOption(),y.getViewValueFromOption(n)):null},w.trackBy&&n.$watch(function(){return w.getTrackByValue(p.$viewValue)},function(){p.$render()}));a&&(i(v.emptyOption)(n),e.prepend(v.emptyOption),8===v.emptyOption[0].nodeType?(v.hasEmptyOption=!1,v.registerOption=function(n,t){""===t.val()&&(v.hasEmptyOption=!0,v.emptyOption=t,v.emptyOption.removeClass("ng-scope"),p.$render(),t.on("$destroy",function(){var n=v.$isEmptyOptionSelected();v.hasEmptyOption=!1;v.emptyOption=void 0;n&&p.$render()}))}):v.emptyOption.removeClass("ng-scope"));n.$watchCollection(w.getWatchables,function(){var i=y&&v.readValue(),n,t,u;if(y)for(n=y.items.length-1;0<=n;n--)t=y.items[n],r(t.group)?au(t.element.parentNode):au(t.element);y=w.getOptions();u={};y.items.forEach(function(n){var t,i;r(n.group)?(t=u[n.group],t||(t=l.cloneNode(!1),k.appendChild(t),t.label=null===n.group?"null":n.group,u[n.group]=t),i=o.cloneNode(!1),t.appendChild(i),d(n,i)):(t=o.cloneNode(!1),k.appendChild(t),d(n,t))});e[0].appendChild(k);p.$render();p.$isEmpty(i)||(n=v.readValue(),(w.trackBy||g?ct(i,n):i===n)||(p.$setViewValue(n),p.$render()))})}}}}],hk=["$locale","$interpolate","$log",function(n,i,r){var f=/{}/g,e=/^when(Minus)?(.+)$/;return{link:function(o,h,c){function p(n){h.text(n||"")}var w=c.count,b=c.$attr.when&&h.attr(c.$attr.when),k=c.offset||0,l=o.$eval(b)||{},d={},g=i.startSymbol(),nt=i.endSymbol(),tt=g+w+"-"+k+nt,v=ft.noop,y;t(c,function(n,t){var i=e.exec(t);i&&(i=(i[1]?"-":"")+a(i[2]),l[i]=h.attr(c.$attr[t]))});t(l,function(n,t){d[t]=i(n.replace(f,tt))});o.$watch(w,function(t){var i=parseFloat(t),f=rt(i);f||i in l||(i=n.pluralCat(i-k));i===y||f&&rt(y)||(v(),f=d[i],u(f)?(null!=t&&r.debug("ngPluralize: no rule defined for '"+i+"' in "+b),v=s,p()):v=o.$watch(f,p),y=i)})}}}],vl=l("ngRef"),ck=["$parse",function(n){return{priority:-1,restrict:"A",compile:function(t,i){var f=lt(ht(t)),r=n(i.ngRef),u=r.assign||function(){throw vl("nonassign",i.ngRef);};return function(n,t,e){var o;if(e.hasOwnProperty("ngRefRead")){if("$element"===e.ngRefRead)o=t;else if(o=t.data("$"+e.ngRefRead+"Controller"),!o)throw vl("noctrl",e.ngRefRead,i.ngRef);}else o=t.data("$"+f+"Controller");o=o||t;u(n,o);t.on("$destroy",function(){r(n)===o&&u(n,null)})}}}}],lk=["$parse","$animate","$compile",function(n,i,r){var u=l("ngRepeat"),f=function(n,t,i,r,u,f,e){n[i]=r;u&&(n[u]=f);n.$index=t;n.$first=0===t;n.$last=t===e-1;n.$middle=!(n.$first||n.$last);n.$odd=!(n.$even=0==(t&1))};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(e,o){var a=o.ngRepeat,nt=r.$$createComment("end ngRepeat",a),s=a.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/),v,c,y,w,d,g,l;if(!s)throw u("iexp",a);var b=s[1],tt=s[2],h=s[3],k=s[4],s=b.match(/^(?:(\s*[$\w]+)|\(\s*([$\w]+)\s*,\s*([$\w]+)\s*\))$/);if(!s)throw u("iidexp",b);if(v=s[3]||s[1],c=s[2],h&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(h)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(h)))throw u("badident",h);return l={$id:wi},k?y=n(k):(d=function(n,t){return wi(t)},g=function(n){return n}),function(n,r,e,o,s){y&&(w=function(t,i,r){return c&&(l[c]=t),l[v]=i,l.$index=r,y(n,l)});var b=p();n.$watchCollection(tt,function(e){var o,et,ot=r[0],tt,st=p(),ut,rt,ft,y,it,l,k;if(h&&(n[h]=e),ni(e))it=e,et=w||d;else for(k in et=w||g,it=[],e)vt.call(e,k)&&"$"!==k.charAt(0)&&it.push(k);for(ut=it.length,k=Array(ut),o=0;o<ut;o++)if(rt=e===it?o:it[o],ft=e[rt],y=et(rt,ft,o),b[y])l=b[y],delete b[y],st[y]=l,k[o]=l;else{if(st[y])throw t(k,function(n){n&&n.scope&&(b[n.id]=n)}),u("dupes",a,y,ft);k[o]={id:y,scope:void 0,clone:void 0};st[y]=!0}for(tt in b){if(l=b[tt],y=ru(l.clone),i.leave(y),y[0].parentNode)for(o=0,et=y.length;o<et;o++)y[o].$$NG_REMOVED=!0;l.scope.$destroy()}for(o=0;o<ut;o++)if(rt=e===it?o:it[o],ft=e[rt],l=k[o],l.scope){tt=ot;do tt=tt.nextSibling;while(tt&&tt.$$NG_REMOVED);l.clone[0]!==tt&&i.move(ru(l.clone),null,ot);ot=l.clone[l.clone.length-1];f(l.scope,o,v,ft,c,rt,ut)}else s(function(n,t){l.scope=t;var r=nt.cloneNode(!1);n[n.length++]=r;i.enter(n,null,ot);ot=r;l.clone=n;st[l.id]=l;f(l.scope,o,v,ft,c,rt,ut)});b=st})}}}}],ak=["$animate",function(n){return{restrict:"A",multiElement:!0,link:function(t,i,r){t.$watch(r.ngShow,function(t){n[t?"removeClass":"addClass"](i,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],vk=["$animate",function(n){return{restrict:"A",multiElement:!0,link:function(t,i,r){t.$watch(r.ngHide,function(t){n[t?"addClass":"removeClass"](i,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],yk=bi(function(n,i,r){n.$watchCollection(r.ngStyle,function(n,r){r&&n!==r&&t(r,function(n,t){i.css(t,"")});n&&i.css(n)})}),pk=["$animate","$compile",function(n,i){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(r,u,f,e){var c=[],h=[],o=[],s=[],l=function(n,t){return function(i){!1!==i&&n.splice(t,1)}};r.$watch(f.ngSwitch||f.on,function(r){for(var u,f,a;o.length;)n.cancel(o.pop());for(u=0,f=s.length;u<f;++u)a=ru(h[u].clone),s[u].$destroy(),(o[u]=n.leave(a)).done(l(o,u));h.length=0;s.length=0;(c=e.cases["!"+r]||e.cases["?"])&&t(c,function(t){t.transclude(function(r,u){s.push(u);var f=t.element;r[r.length++]=i.$$createComment("end ngSwitchWhen");h.push({clone:r});n.enter(r,f.parent(),f)})})})}}}],wk=bi({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(n,i,r,u,f){n=r.ngSwitchWhen.split(r.ngSwitchWhenSeparator).sort().filter(function(n,t,i){return i[t-1]!==n});t(n,function(n){u.cases["!"+n]=u.cases["!"+n]||[];u.cases["!"+n].push({transclude:f,element:i})})}}),bk=bi({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(n,t,i,r,u){r.cases["?"]=r.cases["?"]||[];r.cases["?"].push({transclude:u,element:t})}}),kk=l("ngTransclude"),dk=["$compile",function(n){return{restrict:"EAC",compile:function(t){var i=n(t.contents());return t.empty(),function(n,t,r,u,f){function e(){i(n,function(n){t.append(n)})}if(!f)throw kk("orphan",pt(t));r.ngTransclude===r.$attr.ngTransclude&&(r.ngTransclude="");r=r.ngTransclude||r.ngTranscludeSlot;f(function(n,i){var r,f,u;if(r=n.length)n:{for(r=0,f=n.length;r<f;r++)if(u=n[r],u.nodeType!==ti||u.nodeValue.trim()){r=!0;break n}r=void 0}r?t.append(n):(e(),i.$destroy())},null,r);r&&!f.isSlotFilled(r)&&e()}}}}],gk=["$templateCache",function(n){return{restrict:"E",terminal:!0,compile:function(t,i){"text/ng-template"===i.type&&n.put(i.id,t[0].text)}}}],nd={$setViewValue:s,$render:s},td=["$element","$scope",function(t,i){function l(){h||(h=!0,i.$$postDigest(function(){h=!1;u.ngModelCtrl.$render()}))}function o(n){c||(c=!0,i.$$postDigest(function(){i.$$destroyed||(c=!1,u.ngModelCtrl.$setViewValue(u.readValue()),n&&u.ngModelCtrl.$render())}))}var u=this,e=new ef,h,c;u.selectValueMap={};u.ngModelCtrl=nd;u.multiple=!1;u.unknownOption=f(n.document.createElement("option"));u.hasEmptyOption=!1;u.emptyOption=void 0;u.renderUnknownOption=function(n){n=u.generateUnknownOptionValue(n);u.unknownOption.val(n);t.prepend(u.unknownOption);oi(u.unknownOption,!0);t.val(n)};u.updateUnknownOption=function(n){n=u.generateUnknownOptionValue(n);u.unknownOption.val(n);oi(u.unknownOption,!0);t.val(n)};u.generateUnknownOptionValue=function(n){return"? "+wi(n)+" ?"};u.removeUnknownOption=function(){u.unknownOption.parent()&&u.unknownOption.remove()};u.selectEmptyOption=function(){u.emptyOption&&(t.val(""),oi(u.emptyOption,!0))};u.unselectEmptyOption=function(){u.hasEmptyOption&&oi(u.emptyOption,!1)};i.$on("$destroy",function(){u.renderUnknownOption=s});u.readValue=function(){var n=t.val(),n=n in u.selectValueMap?u.selectValueMap[n]:n;return u.hasOption(n)?n:null};u.writeValue=function(n){var i=t[0].options[t[0].selectedIndex];i&&oi(f(i),!1);u.hasOption(n)?(u.removeUnknownOption(),i=wi(n),t.val(i in u.selectValueMap?i:n),oi(f(t[0].options[t[0].selectedIndex]),!0)):u.selectUnknownOrEmptyOption(n)};u.addOption=function(n,t){if(8!==t[0].nodeType){pi(n,'"option value"');""===n&&(u.hasEmptyOption=!0,u.emptyOption=t);var i=e.get(n)||0;e.set(n,i+1);l()}};u.removeOption=function(n){var t=e.get(n);t&&(1===t?(e.delete(n),""===n&&(u.hasEmptyOption=!1,u.emptyOption=void 0)):e.set(n,t-1))};u.hasOption=function(n){return!!e.get(n)};u.$hasEmptyOption=function(){return u.hasEmptyOption};u.$isUnknownOptionSelected=function(){return t[0].options[0]===u.unknownOption[0]};u.$isEmptyOptionSelected=function(){return u.hasEmptyOption&&t[0].options[t[0].selectedIndex]===u.emptyOption[0]};u.selectUnknownOrEmptyOption=function(n){null==n&&u.emptyOption?(u.removeUnknownOption(),u.selectEmptyOption()):u.unknownOption.parent().length?u.updateUnknownOption(n):u.renderUnknownOption(n)};h=!1;c=!1;u.registerOption=function(n,t,i,f,e){if(i.$attr.ngValue){var s,h=NaN;i.$observe("value",function(n){var i,f=t.prop("selected");r(h)&&(u.removeOption(s),delete u.selectValueMap[h],i=!0);h=wi(n);s=n;u.selectValueMap[h]=n;u.addOption(n,t);t.attr("value",h);i&&f&&o()})}else f?i.$observe("value",function(n){u.readValue();var i,f=t.prop("selected");r(s)&&(u.removeOption(s),i=!0);s=n;u.addOption(n,t);i&&f&&o()}):e?n.$watch(e,function(n,r){i.$set("value",n);var f=t.prop("selected");r!==n&&u.removeOption(r);u.addOption(n,t);r&&f&&o()}):u.addOption(i.value,t);i.$observe("disabled",function(n){("true"===n||n&&t.prop("selected"))&&(u.multiple?o(!0):(u.ngModelCtrl.$setViewValue(null),u.ngModelCtrl.$render()))});t.on("$destroy",function(){var n=u.readValue(),t=i.value;u.removeOption(t);l();(u.multiple&&n&&-1!==n.indexOf(t)||n===t)&&o(!0)})}}],id=function(){return{restrict:"E",require:["select","?ngModel"],controller:td,priority:1,link:{pre:function(n,i,r,u){var e=u[0],o=u[1],c,h;o?(e.ngModelCtrl=o,i.on("change",function(){e.removeUnknownOption();n.$apply(function(){o.$setViewValue(e.readValue())})}),r.multiple)&&(e.multiple=!0,e.readValue=function(){var n=[];return t(i.find("option"),function(t){t.selected&&!t.disabled&&(t=t.value,n.push(t in e.selectValueMap?e.selectValueMap[t]:t))}),n},e.writeValue=function(n){t(i.find("option"),function(t){var i=!!n&&(-1!==Array.prototype.indexOf.call(n,t.value)||-1!==Array.prototype.indexOf.call(n,e.selectValueMap[t.value]));i!==t.selected&&oi(f(t),i)})},h=NaN,n.$watch(function(){h!==o.$viewValue||ct(c,o.$viewValue)||(c=wt(o.$viewValue),o.$render());h=o.$viewValue}),o.$isEmpty=function(n){return!n||0===n.length}):e.registerOption=s},post:function(n,t,i,r){var u=r[1],f;u&&(f=r[0],u.$render=function(){f.writeValue(u.$viewValue)})}}}},rd=["$interpolate",function(n){return{restrict:"E",priority:100,compile:function(t,i){var u,f;return r(i.ngValue)||(r(i.value)?u=n(i.value,!0):(f=n(t.text(),!0))||i.$set("value",t.text())),function(n,t,i){var r=t.parent();(r=r.data("$selectController")||r.parent().data("$selectController"))&&r.registerOption(n,t,i,u,f)}}}}],yl=function(){return{restrict:"A",require:"?ngModel",link:function(n,t,i,r){r&&(i.required=!0,r.$validators.required=function(n,t){return!i.required||!r.$isEmpty(t)},i.$observe("required",function(){r.$validate()}))}}},pl=function(){return{restrict:"A",require:"?ngModel",link:function(n,t,i,r){if(r){var f,e=i.ngPattern||i.pattern;i.$observe("pattern",function(n){if(h(n)&&0<n.length&&(n=new RegExp("^"+n+"$")),n&&!n.test)throw l("ngPattern")("noregexp",e,n,pt(t));f=n||void 0;r.$validate()});r.$validators.pattern=function(n,t){return r.$isEmpty(t)||u(f)||f.test(t)}}}}},wl=function(){return{restrict:"A",require:"?ngModel",link:function(n,t,i,r){if(r){var u=-1;i.$observe("maxlength",function(n){n=it(n);u=rt(n)?-1:n;r.$validate()});r.$validators.maxlength=function(n,t){return 0>u||r.$isEmpty(t)||t.length<=u}}}}},bl=function(){return{restrict:"A",require:"?ngModel",link:function(n,t,i,r){if(r){var u=0;i.$observe("minlength",function(n){u=it(n)||0;r.$validate()});r.$validators.minlength=function(n,t){return r.$isEmpty(t)||t.length>=u}}}}};n.angular.bootstrap?n.console&&console.log("WARNING: Tried to load AngularJS more than once."):(ea(),ca(ft),ft.module("ngLocale",[],["$provide",function(n){function t(n){n+="";var t=n.indexOf(".");return-1==t?0:n.length-t-1}n.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:"January February March April May June July August September October November December".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),STANDALONEMONTH:"January February March April May June July August September October November December".split(" "),WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a",short:"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-¤",negSuf:"",posPre:"¤",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(n,i){var u=n|0,r=i;return void 0===r&&(r=Math.min(t(n),3)),Math.pow(10,r),1==u&&0==r?"one":"other"}})}]),f(function(){ra(n.document,ts)}))})(window);window.angular.$$csp().noInlineStyle||window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}<\/style>'),function(n,t){"use strict";function v(n){var t=[];return f(t,c).chars(n),t.join("")}var u=t.$$minErr("$sanitize"),e,i,o,s,h,r,c,l,a,f;t.module("ngSanitize",[]).provider("$sanitize",function(){function v(n,t){return d(n.split(","),t)}function d(n,t){for(var u={},i=0;i<n.length;i++)u[t?r(n[i]):n[i]]=!0;return u}function w(n,t){t&&t.length&&i(n,d(t))}function ht(n){for(var i,r={},t=0,u=n.length;t<u;t++)i=n[t],r[i.name]=i.value;return r}function rt(n){return n.replace(/&/g,"&amp;").replace(ct,function(n){var t=n.charCodeAt(0);return n=n.charCodeAt(1),"&#"+(1024*(t-55296)+(n-56320)+65536)+";"}).replace(lt,function(n){return"&#"+n.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function ut(t){for(var u,f;t;){if(t.nodeType===n.Node.ELEMENT_NODE)for(var i=t.attributes,r=0,e=i.length;r<e;r++)u=i[r],f=u.name.toLowerCase(),("xmlns:ns1"===f||0===f.lastIndexOf("ns1:",0))&&(t.removeAttributeNode(u),r--,e--);(i=t.firstChild)&&ut(i);t=b("nextSibling",t)}}function b(n,t){var i=t[n];if(i&&l.call(t,i))throw u("elclob",t.outerHTML||t.outerText);return i}var g=!1,nt=!1;this.$get=["$$sanitizeUri",function(n){return g=!0,nt&&i(p,ft),function(t){var i=[];return a(t,f(i,function(t,i){return!/^unsafe:/.test(n(t,i))})),i.join("")}}];this.enableSvg=function(n){return h(n)?(nt=n,this):nt};this.addValidElements=function(n){return g||(s(n)&&(n={htmlElements:n}),w(ft,n.svgElements),w(tt,n.htmlVoidElements),w(p,n.htmlVoidElements),w(p,n.htmlElements)),this};this.addValidAttrs=function(n){return g||i(ot,d(n,!0)),this};e=t.bind;i=t.extend;o=t.forEach;s=t.isArray;h=t.isDefined;r=t.$$lowercase;c=t.noop;a=function(n,t){var r,i,f;if(null===n||void 0===n?n="":"string"!=typeof n&&(n=""+n),r=st(n),!r)return"";i=5;do{if(0===i)throw u("uinput");i--;n=r.innerHTML;r=st(n)}while(n!==r.innerHTML);for(i=r.firstChild;i;){switch(i.nodeType){case 1:t.start(i.nodeName.toLowerCase(),ht(i.attributes));break;case 3:t.chars(i.textContent)}if(!(f=i.firstChild)&&(1===i.nodeType&&t.end(i.nodeName.toLowerCase()),f=b("nextSibling",i),!f))for(;null==f;){if(i=b("parentNode",i),i===r)break;f=b("nextSibling",i);1===i.nodeType&&t.end(i.nodeName.toLowerCase())}i=f}for(;i=r.firstChild;)r.removeChild(i)};f=function(n,t){var u=!1,i=e(n,n.push);return{start:function(n,f){n=r(n);!u&&at[n]&&(u=n);u||!0!==p[n]||(i("<"),i(n),o(f,function(u,f){var e=r(f),o="img"===n&&"src"===e||"background"===e;!0===ot[e]&&(!0!==et[e]||t(u,o))&&(i(" "),i(f),i('="'),i(rt(u)),i('"'))}),i(">"))},end:function(n){n=r(n);u||!0!==p[n]||!0===tt[n]||(i("<\/"),i(n),i(">"));n==u&&(u=!1)},chars:function(n){u||i(rt(n))}}};l=n.Node.prototype.contains||function(n){return!!(this.compareDocumentPosition(n)&16)};var ct=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,lt=/([^#-~ |!])/g,tt=v("area,br,col,hr,img,wbr"),k=v("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),y=v("rp,rt"),it=i({},y,k),k=i({},k,v("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),y=i({},y,v("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),ft=v("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),at=v("script,style"),p=i({},tt,k,y,it),et=v("background,cite,href,longdesc,src,xlink:href,xml:base"),it=v("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"),y=v("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",!0),ot=i({},et,y,it),st=function(n,t){function f(t){t="<remove><\/remove>"+t;try{var i=(new n.DOMParser).parseFromString(t,"text/html").body;return i.firstChild.remove(),i}catch(r){}}function e(n){return i.innerHTML=n,t.documentMode&&ut(i),i}var r,i;if(t&&t.implementation)r=t.implementation.createHTMLDocument("inert");else throw u("noinert");return i=(r.documentElement||r.getDocumentElement()).querySelector("body"),i.innerHTML='<svg><g onload="this.parentNode.remove()"><\/g><\/svg>',i.querySelector("svg")?(i.innerHTML='<svg><p><style><img src="<\/style><img src=x onerror=alert(1)//">',i.querySelector("svg img")?f:e):function(t){t="<remove><\/remove>"+t;try{t=encodeURI(t)}catch(r){return}var i=new n.XMLHttpRequest;return i.responseType="document",i.open("GET","data:text/html;charset=utf-8,"+t,!1),i.send(null),t=i.response.body,t.firstChild.remove(),t}}(n,n.document)}).info({angularVersion:"1.7.2"});t.module("ngSanitize").filter("linky",["$sanitize",function(n){var i=/((s?ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,r=/^mailto:/i,u=t.$$minErr("linky"),f=t.isDefined,e=t.isFunction,o=t.isObject,s=t.isString;return function(t,h,c){function p(n){n&&l.push(v(n))}function b(n,t){var i,r=k(n);l.push("<a ");for(i in r)l.push(i+'="'+r[i]+'" ');!f(h)||"target"in r||l.push('target="',h,'" ');l.push('href="',n.replace(/"/g,"&quot;"),'">');p(t);l.push("<\/a>")}if(null==t||""===t)return t;if(!s(t))throw u("notstring",t);for(var k=e(c)?c:o(c)?function(){return c}:function(){return{}},a=t,l=[],y,w;t=a.match(i);)y=t[0],t[2]||t[4]||(y=(t[3]?"http://":"mailto:")+y),w=t.index,p(a.substr(0,w)),b(y,t[0].replace(r,"")),a=a.substring(w+t[0].length);return p(a),n(l.join(""))}}])}(window,window.angular);angular.module("infinite-scroll",[]).value("THROTTLE_MILLISECONDS",null).directive("infiniteScroll",["$rootScope","$window","$interval","THROTTLE_MILLISECONDS",function(n,t,i,r){return{scope:{infiniteScroll:"&",infiniteScrollContainer:"=",infiniteScrollDistance:"=",infiniteScrollDisabled:"=",infiniteScrollUseDocumentBottom:"=",infiniteScrollListenForEvent:"@"},link:function(u,f,e){var y,h,l,o,w,b,k,d,s,c,g,a,nt,tt,p,ut,v,it,rt;return rt=angular.element(t),tt=null,p=null,l=null,o=null,g=!0,it=!1,v=null,h=!1,c=function(n){return n=n[0]||n,isNaN(n.offsetHeight)?n.document.documentElement.clientHeight:n.offsetHeight},a=function(n){if(n[0].getBoundingClientRect&&!n.css("none"))return n[0].getBoundingClientRect().top+nt(n)},nt=function(n){return n=n[0]||n,isNaN(window.pageYOffset)?n.document.documentElement.scrollTop:n.ownerDocument.defaultView.pageYOffset},s=function(){var r,e,t,s,v;if(o===rt?(r=c(o)+nt(o[0].document.documentElement),t=a(f)+c(f)):(r=c(o),e=0,a(o)!==void 0&&(e=a(o)),t=a(f)-e+c(f)),it&&(t=c((f[0].ownerDocument||f[0].document).documentElement)),s=t-r,v=s<=c(o)*tt+1,v){if(l=!0,p)return u.$$phase||n.$$phase?u.infiniteScroll():u.$apply(u.infiniteScroll)}else return h&&i.cancel(h),l=!1},ut=function(n,t){var f,u,r;return r=null,u=0,f=function(){return u=(new Date).getTime(),i.cancel(r),r=null,n.call()},function(){var e,o;return(e=(new Date).getTime(),o=t-(e-u),o<=0)?(i.cancel(r),r=null,u=e,n.call()):r?void 0:r=i(f,o,1)}},r!=null&&(s=ut(s,r)),u.$on("$destroy",function(){return o.unbind("scroll",s),v!=null&&(v(),v=null),h?i.cancel(h):void 0}),k=function(n){return tt=parseFloat(n)||0},u.$watch("infiniteScrollDistance",k),k(u.infiniteScrollDistance),b=function(n){return p=!n,p&&l?(l=!1,s()):void 0},u.$watch("infiniteScrollDisabled",b),b(u.infiniteScrollDisabled),d=function(n){return it=n},u.$watch("infiniteScrollUseDocumentBottom",d),d(u.infiniteScrollUseDocumentBottom),y=function(n){return o!=null&&o.unbind("scroll",s),o=n,n!=null?o.bind("scroll",s):void 0},y(rt),u.infiniteScrollListenForEvent&&(v=n.$on(u.infiniteScrollListenForEvent,s)),w=function(n){if(n!=null&&n.length!==0){if(n.nodeType&&n.nodeType===1?n=angular.element(n):typeof n.append=="function"?n=angular.element(n[n.length-1]):typeof n=="string"&&(n=angular.element(document.querySelector(n))),n!=null)return y(n);throw new Error("invalid infinite-scroll-container attribute.");}},u.$watch("infiniteScrollContainer",w),w(u.infiniteScrollContainer||[]),e.infiniteScrollParent!=null&&y(angular.element(f.parent())),e.infiniteScrollImmediateCheck!=null&&(g=u.$eval(e.infiniteScrollImmediateCheck)),h=i(function(){return g&&s(),i.cancel(h)})}}}]);typeof module!="undefined"&&typeof exports!="undefined"&&module.exports===exports&&(module.exports="infinite-scroll");angular.module("ngTouch",[]).directive("ngTouchstart",function(){return{controller:["$scope","$element",function(n,t){function i(i){var r=t.attr("ng-touchstart");n.$event=i;n.$apply(r)}t.bind("touchstart",i)}]}}).directive("ngTouchmove",function(){return{controller:["$scope","$element",function(n,t){function u(n){n.preventDefault();t.bind("touchmove",i);t.bind("touchend",r)}function i(i){var r=t.attr("ng-touchmove");n.$event=i;n.$apply(r)}function r(n){n.preventDefault();t.unbind("touchmove",i);t.unbind("touchend",r)}t.bind("touchstart",u)}]}}).directive("ngTouchend",function(){return{controller:["$scope","$element",function(n,t){function i(i){var r=t.attr("ng-touchend");n.$event=i;n.$apply(r)}t.bind("touchend",i)}]}}).directive("ngTap",function(){return{controller:["$scope","$element",function(n,t){function f(){t.bind("touchmove",r);t.bind("touchend",u)}function r(){i=!0}function u(){if(t.unbind("touchmove",r),t.unbind("touchend",u),!i){var f=t.attr("ng-tap");n.$apply(f)}}var i=!1;t.bind("touchstart",f)}]}});!function(){"use strict";function n(n){return{restrict:"EA",template:'<div class="wip-image-zoom {{vm.options.style}}-style {{vm.options.thumbsPos}}-thumbs"\n     ng-class="{\n     \'active\':vm.zoomActive, \n     \'immersive-mode\':vm.immersiveModeActive && !immersive,\n     \'zoom-disabled\':!vm.options.zoomEnable,\n     \'box-style\':vm.options.style == \'box\' ,\n     \'inner-style\':vm.options.style == \'inner\'}">\n\n    <wip-image-zoom-thumbs ng-if="vm.options.thumbsPos === \'top\' && vm.images.length > 1"><\/wip-image-zoom-thumbs>\n\n    <div ng-hide="!vm.options.zoomEnable && immersive" class="main-image-wrapper" ng-class="{\'loading\':vm.largeImageLoading}">\n        <div class="image-zoom-tracker" wip-image-zoom-tracker><\/div>\n        <div class="image-zoom-lens" wip-image-zoom-lens><\/div>\n        <img class="main-image" ng-src="{{vm.mainImage.medium}}" image-on-load="vm.initZoom()">\n        <div class="zoom-mask"\n             ng-class="vm.options.style == \'box\'? vm.options.boxPos : \'\'"\n             wip-image-zoom-mask>\n            <img wip-image-zoom-image class="zoom-image main-image-large" image-on-load="vm.largeImageLoaded()"\n                 ng-src="{{vm.mainImage.large}}">\n        <\/div>\n        <div ng-if="vm.immersiveModeActive && !immersive && vm.options.immersiveModeMessage !== \'\'"\n             class="immersive-mode-message" ng-bind="vm.options.immersiveModeMessage"><\/div>\n    <\/div>\n\n    <div class="immersive-no-zoom-image-wrapper" ng-show="!vm.options.zoomEnable && immersive">\n        <img class="main-image-large" ng-src="{{vm.mainImage.large}}">\n    <\/div>\n\n    <wip-image-zoom-thumbs\n            ng-if="vm.options.thumbsPos === \'bottom\' && vm.images.length > 1"><\/wip-image-zoom-thumbs>\n<\/div>',replace:!0,scope:{selectedModel:"=?",selectedIndex:"=?",wipImageZoom:"=",immersive:"=?"},controllerAs:"vm",link:function(n,t,i,r){r.el=t;r.attrs=i;r.init()},controller:["$scope","$document","$window","$compile","wipImageZoomConfig",function(t,i,r,u,f){function at(){e.options=t.wipImageZoom?angular.extend(lt,t.wipImageZoom):lt,function(){e.options.images.length<=0&&(e.options.images=[{thumb:e.attrs.src,medium:e.attrs.src,large:e.attrs.src}]);e.images=e.options.images;e.mainImage=e.images[e.options.defaultIndex]}();t.selectedIndex=e.options.defaultIndex;t.selectedModel=e.mainImage;bt()}function k(){nt&&1!=nt&&n.cancel(nt);nt=n(function(){wt();vt();st()},400)}function vt(){e.options.zoomEnable&&(ot(),e.zoomTracker.style.cursor=e.options.cursor,e.zoomLens.style.display=e.options.lens?"block":"none",yt(),e.immersiveModeActive=e.options.immersiveMode&&e.options.immersiveMode>r.innerWidth||"always"===e.options.immersiveMode,e.immersiveModeActive&&!t.immersive&&e.zoomTracker.addEventListener("mousedown",pt),e.immersiveModeActive&&!t.immersive||(e.zoomTracker.addEventListener("mousemove",it),e.zoomTracker.addEventListener("touchstart",it),e.zoomTracker.addEventListener("mouseleave",rt),e.zoomTracker.addEventListener("touchend",rt),e.zoomTracker.addEventListener("mousemove",tt),e.zoomTracker.addEventListener("touchmove",tt)))}function yt(){e.zoomTracker.removeEventListener("mousedown",pt);e.zoomTracker.removeEventListener("mousemove",it);e.zoomTracker.removeEventListener("touchstart",it);e.zoomTracker.removeEventListener("mouseleave",rt);e.zoomTracker.removeEventListener("touchend",rt);e.zoomTracker.removeEventListener("mousemove",tt);e.zoomTracker.removeEventListener("touchmove",tt)}function pt(n){n.preventDefault();n.stopPropagation();t.$apply(function(){i.find("html").addClass("wip-image-zoom-immersive-mode-enabled");var n=i.find("body").eq(0);e.immersedImageOpt=angular.extend(angular.copy(e.options),e.options.immersiveModeOptions);e.immersedImageOpt.defaultIndex=t.selectedIndex;e.immersedImageOpt.style="inner";e.immersedEl=u('<div class="immersive-wip-image-zoom">\n    <div class="disable-immersive-mode-button" ng-click="vm.disableImmersiveMode()">&#10006;<\/div>\n    <img src="" wip-image-zoom="vm.immersedImageOpt" immersive="true" selected-index="selectedIndex">\n<\/div>\n')(t);n.append(e.immersedEl);k()})}function wt(){e.images.length<=1||(e.thumbsWrapperWidth=e.thumbsWrapper.clientWidth,e.thumbWidth=Math.round((e.thumbsWrapperWidth+e.options.thumbColPadding)/e.options.thumbCol),e.thumbsWidth=e.thumbWidth*e.images.length,e.maxPosX=e.images.length-e.options.thumbCol,t.$evalAsync(function(){var n,t;for("top"===e.options.thumbsPos?(e.thumbsEl.style.paddingBottom=e.options.thumbColPadding+"px",e.thumbsEl.style.paddingTop=0):(e.thumbsEl.style.paddingTop=e.options.thumbColPadding+"px",e.thumbsEl.style.paddingBottom=0),n=0;n<e.thumbsEl.children.length;n++)t=e.thumbsEl.children[n],t.style.width=e.thumbWidth+"px",t.style.paddingRight=e.options.thumbColPadding+"px"}))}function et(n){n=(n=n<0?0:n)>e.maxPosX?e.maxPosX:n;e.thumbsPos=n;var t=e.thumbsPos*e.thumbWidth*-1;e.thumbsEl.style.transform="translate3d("+t+"px, 0px, 0)"}function ot(){var n=e.zoomTracker.getBoundingClientRect();o=n.width;c=n.height;"box"!==e.options.style||t.immersive?(s=o,h=c,e.zoomMaskEl.style.width="100%",e.zoomMaskEl.style.height="100%"):(s=e.options.boxW,h=e.options.boxH,e.zoomMaskEl.style.width=s+"px",e.zoomMaskEl.style.height=h+"px");e.zoomImageEl.style.width="";e.zoomImageEl.style.height="";e.options.zoomLevel>1?(e.zoomImageEl.style.width=o*e.options.zoomLevel+"px",e.zoomImageEl.style.height=c*e.options.zoomLevel+"px"):(e.zoomImageEl.offsetWidth<=s||e.zoomImageEl.offsetHeight<=h)&&(e.zoomImageEl.offsetWidth/e.zoomImageEl.offsetHeight>1?(e.zoomImageEl.style.height=1.5*h+"px",e.zoomImageEl.style.width=""):(e.zoomImageEl.style.width=1.5*s+"px",e.zoomImageEl.style.height=""));b=e.zoomImageEl.offsetWidth;d=e.zoomImageEl.offsetHeight;v=s*(g=o/b);y=h*g;e.zoomLens.style.width=v+"px";e.zoomLens.style.height=y+"px"}function tt(n){n.preventDefault();var i,r,t="touchmove"===n.type&&n.touches&&n.touches[0];p=t&&t.pageX||n.pageX;w=t&&t.pageY||n.pageY,function(){var i=e.zoomTracker&&e.zoomTracker.ownerDocument,r=(n=i,t=n,null!=t&&t===t.window?n:9===n.nodeType&&n.defaultView),u=i.documentElement,f=e.zoomTracker.getBoundingClientRect(),s=f.top+r.pageYOffset-u.clientTop,h=f.left+r.pageXOffset-u.clientLeft,n,t;l=(l=(l=p-h-.5*v)>o-v?o-v:l)<0?0:l;a=(a=(a=w-s-.5*y)>c-y?c-y:a)<0?0:a;e.zoomLens.style.transform="translate3d("+l+"px,"+a+"px,0)"}();"lens"===e.options.method?(i=[(b-s+1*v/g)*[l/o]],r=[(d-h+1*y/g)*[a/c]],e.zoomImageEl.style.transform="translate3d("+-1*i+"px,"+-1*r+"px,0)"):function(){var n=[(b-s)*[(p-ut)/o]],t=[(d-h)*[(w-ft)/c]];n=p<ut?0:n;t=w<ft?0:t;n=p>ut+o?b-s:n;t=w>ft+c?d-h:t;e.zoomImageEl.style.transform="translate3d("+-1*n+"px,"+-1*t+"px,0)"}()}function st(){if(!(e.images.length<=1||e.images.length<e.options.thumbCol)){var n=function(){for(var n=0;n<e.images.length;n++)if(e.images[n].medium===e.mainImage.medium)return n}();et(e.thumbsPos+e.options.thumbCol>n&&e.thumbsPos<n?e.thumbsPos:n)}}function it(){t.$evalAsync(function(){e.zoomActive=!0})}function rt(){t.$evalAsync(function(){e.zoomActive=!1})}function kt(n,t){angular.isDefined(n)&&n!==t&&(e.mainImage=n,st())}function dt(n,t){angular.isDefined(n)&&n!==t&&(e.mainImage=e.images[n],st())}function bt(){ht=t.$watch("selectedIndex",dt,!0);ct=t.$watch("selectedModel",kt,!0)}var p,w,o,c,ut,ft,s,h,b,d,v,y,l,a,g,ht,ct,e=this,lt=angular.copy(f.defaults),nt=!0;e.el={};e.zoomTracker={};e.zoomLens={};e.zoomImageEl={};e.thumbsWrapper={};e.thumbsEl={};e.mainImage={};e.options={};e.images=[];e.zoomActive=!1;e.largeImageLoading=!0;e.prevThumbActive=!1;e.nextThumbActive=!1;e.thumbWidth=0;e.thumbsWrapperWidth=0;e.thumbsWidth=0;e.thumbsPos=0;e.immersiveModeActive=!1;e.init=at;e.initZoom=vt;e.initThumbs=wt;e.largeImageLoaded=function(){e.largeImageLoading=!1;ot()};e.updateMainImage=function(n){e.largeImageLoading=!0;e.mainImage=n;ct();ht();t.selectedModel=angular.copy(e.mainImage);t.selectedIndex=e.images.indexOf(e.mainImage);bt()};e.nextThumb=function(){et(e.thumbsPos+1)};e.prevThumb=function(){et(e.thumbsPos-1)};e.disableImmersiveMode=function(){i.find("html").removeClass("wip-image-zoom-immersive-mode-enabled");yt();e.immersedEl.remove();k()};angular.element(window).on("resize",function(){k()});r.Ps&&angular.element(document).on("ps-scroll-y",function(){ot()});t.$watch(function(){return{left:e.zoomTracker.getBoundingClientRect().left+r.scrollX,top:e.zoomTracker.getBoundingClientRect().top+r.scrollY}},function(n,t){angular.isDefined(n)&&n!==t&&k()},!0);t.$watch("wipImageZoom",function(n,t){angular.isDefined(n)&&n!==t&&(at(),k())},!0)}]}}function t(n){return{restrict:"A",link:function(t,i,r){i[0].addEventListener("load",function(){t.$apply(r.imageOnLoad)},!1);i[0].addEventListener("error",function(){n.warn("image could not be loaded")})}}}t.$inject=["$log"];n.$inject=["$timeout"];angular.module("wipImageZoom",["ngSanitize","ngTouch"]).provider("wipImageZoomConfig",function(){this.defaults={zoomEnable:!0,defaultIndex:0,images:[],style:"inner",boxPos:"right-top",boxW:400,boxH:400,method:"lens",cursor:"crosshair",lens:!0,zoomLevel:3,immersiveMode:"769",immersiveModeOptions:{},immersiveModeMessage:"Click to Zoom",prevThumbButton:"&#9665;",nextThumbButton:"&#9655;",thumbsPos:"bottom",thumbCol:3,thumbColPadding:4};this.setDefaults=function(n){this.defaults=angular.extend(this.defaults,n)};this.$get=function(){return this}}).directive("imageOnLoad",t).directive("wipImageZoom",n).directive("wipImageZoomTracker",function(){return{restrict:"EA",require:"^wipImageZoom",link:function(n,t,i,r){r.zoomTracker=t[0]}}}).directive("wipImageZoomLens",function(){return{restrict:"EA",require:"^wipImageZoom",link:function(n,t,i,r){r.zoomLens=t[0]}}}).directive("wipImageZoomMask",function(){return{restrict:"EA",require:"^wipImageZoom",link:function(n,t,i,r){r.zoomMaskEl=t[0]}}}).directive("wipImageZoomImage",function(){return{restrict:"EA",require:"^wipImageZoom",link:function(n,t,i,r){r.zoomImageEl=t[0]}}}).directive("wipImageZoomThumbs",function(){return{restrict:"EA",require:"^wipImageZoom",template:'<div class="thumbs-wrapper" ng-swipe-left="vm.nextThumb()" ng-swipe-right="vm.prevThumb()">\n    <div class="thumbs" >\n        <div class="thumb-wrapper" ng-repeat="image in vm.images">\n            <img ng-src="{{image.thumb}}" ng-click="vm.updateMainImage(image)"\n                 ng-class="{\'selected\': vm.mainImage.thumb === image.thumb}">\n        <\/div>\n    <\/div>\n<\/div>\n<div class="prev-button"\n     ng-if="vm.thumbsPos !== 0 && vm.images.length > vm.options.thumbCol"\n     ng-click="vm.prevThumb()"\n     ng-bind-html="vm.options.prevThumbButton">Prev\n<\/div>\n<div class="next-button"\n     ng-if="vm.thumbsPos !== vm.maxPosX && vm.images.length > vm.options.thumbCol"\n     ng-click="vm.nextThumb()"\n     ng-bind-html="vm.options.nextThumbButton">Next\n<\/div>',link:function(n,t,i,r){r.thumbsWrapper=t[0].getElementsByClassName("thumbs-wrapper")[0];r.thumbsEl=t[0].getElementsByClassName("thumbs")[0];r.initThumbs()}}})}(),function(n,t){typeof exports=="object"&&typeof module!="undefined"?module.exports=t():typeof define=="function"&&define.amd?define(t):n.moment=t()}(this,function(){"use strict";function r(){return te.apply(null,arguments)}function kh(n){te=n}function wr(n){return Object.prototype.toString.call(n)==="[object Array]"}function br(n){return n instanceof Date||Object.prototype.toString.call(n)==="[object Date]"}function dh(n,t){for(var r=[],i=0;i<n.length;++i)r.push(t(n[i],i));return r}function ni(n,t){return Object.prototype.hasOwnProperty.call(n,t)}function kr(n,t){for(var i in t)ni(t,i)&&(n[i]=t[i]);return ni(t,"toString")&&(n.toString=t.toString),ni(t,"valueOf")&&(n.valueOf=t.valueOf),n}function tr(n,t,i,r){return fo(n,t,i,r,!0).utc()}function gh(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function o(n){return n._pf==null&&(n._pf=gh()),n._pf}function ie(n){if(n._isValid==null){var t=o(n);n._isValid=!isNaN(n._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated;n._strict&&(n._isValid=n._isValid&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===undefined)}return n._isValid}function re(n){var t=tr(NaN);return n!=null?kr(o(t),n):o(t).userInvalidated=!0,t}function vu(n,t){var u,i,r;if(typeof t._isAMomentObject!="undefined"&&(n._isAMomentObject=t._isAMomentObject),typeof t._i!="undefined"&&(n._i=t._i),typeof t._f!="undefined"&&(n._f=t._f),typeof t._l!="undefined"&&(n._l=t._l),typeof t._strict!="undefined"&&(n._strict=t._strict),typeof t._tzm!="undefined"&&(n._tzm=t._tzm),typeof t._isUTC!="undefined"&&(n._isUTC=t._isUTC),typeof t._offset!="undefined"&&(n._offset=t._offset),typeof t._pf!="undefined"&&(n._pf=o(t)),typeof t._locale!="undefined"&&(n._locale=t._locale),au.length>0)for(u in au)i=au[u],r=t[i],typeof r!="undefined"&&(n[i]=r);return n}function ir(n){vu(this,n);this._d=new Date(n._d!=null?n._d.getTime():NaN);yu===!1&&(yu=!0,r.updateOffset(this),yu=!1)}function yt(n){return n instanceof ir||n!=null&&n._isAMomentObject!=null}function y(n){return n<0?Math.ceil(n):Math.floor(n)}function h(n){var t=+n,i=0;return t!==0&&isFinite(t)&&(i=y(t)),i}function ue(n,t,i){for(var f=Math.min(n.length,t.length),e=Math.abs(n.length-t.length),u=0,r=0;r<f;r++)(i&&n[r]!==t[r]||!i&&h(n[r])!==h(t[r]))&&u++;return u+e}function fe(){}function ee(n){return n?n.toLowerCase().replace("_","-"):n}function nc(n){for(var r=0,i,t,f,u;r<n.length;){for(u=ee(n[r]).split("-"),i=u.length,t=ee(n[r+1]),t=t?t.split("-"):null;i>0;){if(f=oe(u.slice(0,i).join("-")),f)return f;if(t&&t.length>=i&&ue(u,t,!0)>=i-1)break;i--}r++}return null}function oe(n){var t=null;if(!ti[n]&&typeof module!="undefined"&&module&&module.exports)try{t=dr._abbr;require("./locale/"+n);rr(t)}catch(i){}return ti[n]}function rr(n,t){var i;return n&&(i=typeof t=="undefined"?ii(n):se(n,t),i&&(dr=i)),dr._abbr}function se(n,t){return t!==null?(t.abbr=n,ti[n]=ti[n]||new fe,ti[n].set(t),rr(n),ti[n]):(delete ti[n],null)}function ii(n){var t;if(n&&n._locale&&n._locale._abbr&&(n=n._locale._abbr),!n)return dr;if(!wr(n)){if(t=oe(n),t)return t;n=[n]}return nc(n)}function a(n,t){var i=n.toLowerCase();ur[i]=ur[i+"s"]=ur[t]=n}function w(n){return typeof n=="string"?ur[n]||ur[n.toLowerCase()]:undefined}function he(n){var r={},i,t;for(t in n)ni(n,t)&&(i=w(t),i&&(r[i]=n[t]));return r}function vi(n,t){return function(i){return i!=null?(ce(this,n,i),r.updateOffset(this,t),this):gr(this,n)}}function gr(n,t){return n._d["get"+(n._isUTC?"UTC":"")+t]()}function ce(n,t,i){return n._d["set"+(n._isUTC?"UTC":"")+t](i)}function le(n,t){var i;if(typeof n=="object")for(i in n)this.set(i,n[i]);else if(n=w(n),typeof this[n]=="function")return this[n](t);return this}function pu(n,t,i){var r=""+Math.abs(n),u=t-r.length,f=n>=0;return(f?i?"+":"":"-")+Math.pow(10,Math.max(0,u)).toString().substr(1)+r}function u(n,t,i,r){var u=r;typeof r=="string"&&(u=function(){return this[r]()});n&&(yi[n]=u);t&&(yi[t[0]]=function(){return pu(u.apply(this,arguments),t[1],t[2])});i&&(yi[i]=function(){return this.localeData().ordinal(u.apply(this,arguments),n)})}function tc(n){return n.match(/\[[\s\S]/)?n.replace(/^\[|\]$/g,""):n.replace(/\\/g,"")}function ic(n){for(var i=n.match(ae),t=0,r=i.length;t<r;t++)i[t]=yi[i[t]]?yi[i[t]]:tc(i[t]);return function(u){var f="";for(t=0;t<r;t++)f+=i[t]instanceof Function?i[t].call(u,n):i[t];return f}}function bu(n,t){return n.isValid()?(t=ve(t,n.localeData()),wu[t]=wu[t]||ic(t),wu[t](n)):n.localeData().invalidDate()}function ve(n,t){function r(n){return t.longDateFormat(n)||n}var i=5;for(nu.lastIndex=0;i>=0&&nu.test(n);)n=n.replace(nu,r),nu.lastIndex=0,i-=1;return n}function rc(n){return typeof n=="function"&&Object.prototype.toString.call(n)==="[object Function]"}function i(n,t,i){gu[n]=rc(t)?t:function(n){return n&&i?i:t}}function uc(n,t){return ni(gu,n)?gu[n](t._strict,t._locale):new RegExp(fc(n))}function fc(n){return n.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(n,t,i,r,u){return t||i||r||u}).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function l(n,t){var i,r=t;for(typeof n=="string"&&(n=[n]),typeof t=="number"&&(r=function(n,i){i[t]=h(n)}),i=0;i<n.length;i++)nf[n[i]]=r}function er(n,t){l(n,function(n,i,r,u){r._w=r._w||{};t(n,r._w,r,u)})}function ec(n,t,i){t!=null&&ni(nf,n)&&nf[n](t,i._a,i,n)}function tf(n,t){return new Date(Date.UTC(n,t+1,0)).getUTCDate()}function oc(n){return this._months[n.month()]}function sc(n){return this._monthsShort[n.month()]}function hc(n,t,i){var r,u,f;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++)if((u=tr([2e3,r]),i&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(u,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(u,"").replace(".","")+"$","i")),i||this._monthsParse[r]||(f="^"+this.months(u,"")+"|^"+this.monthsShort(u,""),this._monthsParse[r]=new RegExp(f.replace(".",""),"i")),i&&t==="MMMM"&&this._longMonthsParse[r].test(n))||i&&t==="MMM"&&this._shortMonthsParse[r].test(n)||!i&&this._monthsParse[r].test(n))return r}function ke(n,t){var i;return typeof t=="string"&&(t=n.localeData().monthsParse(t),typeof t!="number")?n:(i=Math.min(n.date(),tf(n.year(),t)),n._d["set"+(n._isUTC?"UTC":"")+"Month"](t,i),n)}function de(n){return n!=null?(ke(this,n),r.updateOffset(this,!0),this):gr(this,"Month")}function cc(){return tf(this.year(),this.month())}function rf(n){var i,t=n._a;return t&&o(n).overflow===-2&&(i=t[ht]<0||t[ht]>11?ht:t[ft]<1||t[ft]>tf(t[ut],t[ht])?ft:t[v]<0||t[v]>24||t[v]===24&&(t[ri]!==0||t[ui]!==0||t[fi]!==0)?v:t[ri]<0||t[ri]>59?ri:t[ui]<0||t[ui]>59?ui:t[fi]<0||t[fi]>999?fi:-1,o(n)._overflowDayOfYear&&(i<ut||i>ft)&&(i=ft),o(n).overflow=i),n}function ge(n){r.suppressDeprecationWarnings===!1&&typeof console!="undefined"&&console.warn&&console.warn("Deprecation warning: "+n)}function b(n,t){var i=!0;return kr(function(){return i&&(ge(n+"\n"+(new Error).stack),i=!1),t.apply(this,arguments)},t)}function lc(n,t){uf[n]||(ge(t),uf[n]=!0)}function no(n){var t,i,r=n._i,u=ac.exec(r);if(u){for(o(n).iso=!0,t=0,i=ff.length;t<i;t++)if(ff[t][1].exec(r)){n._f=ff[t][0];break}for(t=0,i=ef.length;t<i;t++)if(ef[t][1].exec(r)){n._f+=(u[6]||" ")+ef[t][0];break}r.match(fu)&&(n._f+="Z");cf(n)}else n._isValid=!1}function yc(n){var t=vc.exec(n._i);if(t!==null){n._d=new Date(+t[1]);return}no(n);n._isValid===!1&&(delete n._isValid,r.createFromInputFallback(n))}function pc(n,t,i,r,u,f,e){var o=new Date(n,t,i,r,u,f,e);return n<1970&&o.setFullYear(n),o}function of(n){var t=new Date(Date.UTC.apply(null,arguments));return n<1970&&t.setUTCFullYear(n),t}function to(n){return io(n)?366:365}function io(n){return n%4==0&&n%100!=0||n%400==0}function wc(){return io(this.year())}function ei(n,t,i){var f=i-t,r=i-n.day(),u;return r>f&&(r-=7),r<f-7&&(r+=7),u=s(n).add(r,"d"),{week:Math.ceil(u.dayOfYear()/7),year:u.year()}}function bc(n){return ei(n,this._week.dow,this._week.doy).week}function kc(){return this._week.dow}function dc(){return this._week.doy}function gc(n){var t=this.localeData().week(this);return n==null?t:this.add((n-t)*7,"d")}function nl(n){var t=ei(this,1,4).week;return n==null?t:this.add((n-t)*7,"d")}function tl(n,t,i,r,u){var o=6+u-r,s=of(n,0,1+o),e=s.getUTCDay(),f;return e<u&&(e+=7),i=i!=null?1*i:u,f=1+o+7*(t-1)-e+i,{year:f>0?n:n-1,dayOfYear:f>0?f:to(n-1)+f}}function il(n){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return n==null?t:this.add(n-t,"d")}function pi(n,t,i){return n!=null?n:t!=null?t:i}function rl(n){var t=new Date;return n._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function hf(n){var t,i,r=[],u,f;if(!n._d){for(u=rl(n),n._w&&n._a[ft]==null&&n._a[ht]==null&&ul(n),n._dayOfYear&&(f=pi(n._a[ut],u[ut]),n._dayOfYear>to(f)&&(o(n)._overflowDayOfYear=!0),i=of(f,0,n._dayOfYear),n._a[ht]=i.getUTCMonth(),n._a[ft]=i.getUTCDate()),t=0;t<3&&n._a[t]==null;++t)n._a[t]=r[t]=u[t];for(;t<7;t++)n._a[t]=r[t]=n._a[t]==null?t===2?1:0:n._a[t];n._a[v]===24&&n._a[ri]===0&&n._a[ui]===0&&n._a[fi]===0&&(n._nextDay=!0,n._a[v]=0);n._d=(n._useUTC?of:pc).apply(null,r);n._tzm!=null&&n._d.setUTCMinutes(n._d.getUTCMinutes()-n._tzm);n._nextDay&&(n._a[v]=24)}}function ul(n){var t,e,u,r,i,f,o;t=n._w;t.GG!=null||t.W!=null||t.E!=null?(i=1,f=4,e=pi(t.GG,n._a[ut],ei(s(),1,4).year),u=pi(t.W,1),r=pi(t.E,1)):(i=n._locale._week.dow,f=n._locale._week.doy,e=pi(t.gg,n._a[ut],ei(s(),i,f).year),u=pi(t.w,1),t.d!=null?(r=t.d,r<i&&++u):r=t.e!=null?t.e+i:i);o=tl(e,u,r,f,i);n._a[ut]=o.year;n._dayOfYear=o.dayOfYear}function cf(n){if(n._f===r.ISO_8601){no(n);return}n._a=[];o(n).empty=!0;for(var t=""+n._i,i,u,s,c=t.length,h=0,e=ve(n._f,n._locale).match(ae)||[],f=0;f<e.length;f++)u=e[f],i=(t.match(uc(u,n))||[])[0],i&&(s=t.substr(0,t.indexOf(i)),s.length>0&&o(n).unusedInput.push(s),t=t.slice(t.indexOf(i)+i.length),h+=i.length),yi[u]?(i?o(n).empty=!1:o(n).unusedTokens.push(u),ec(u,i,n)):n._strict&&!i&&o(n).unusedTokens.push(u);o(n).charsLeftOver=c-h;t.length>0&&o(n).unusedInput.push(t);o(n).bigHour===!0&&n._a[v]<=12&&n._a[v]>0&&(o(n).bigHour=undefined);n._a[v]=fl(n._locale,n._a[v],n._meridiem);hf(n);rf(n)}function fl(n,t,i){var r;return i==null?t:n.meridiemHour!=null?n.meridiemHour(t,i):n.isPM!=null?(r=n.isPM(i),r&&t<12&&(t+=12),r||t!==12||(t=0),t):t}function el(n){var t,f,u,r,i;if(n._f.length===0){o(n).invalidFormat=!0;n._d=new Date(NaN);return}for(r=0;r<n._f.length;r++)(i=0,t=vu({},n),n._useUTC!=null&&(t._useUTC=n._useUTC),t._f=n._f[r],cf(t),ie(t))&&(i+=o(t).charsLeftOver,i+=o(t).unusedTokens.length*10,o(t).score=i,(u==null||i<u)&&(u=i,f=t));kr(n,f||t)}function ol(n){if(!n._d){var t=he(n._i);n._a=[t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond];hf(n)}}function sl(n){var t=new ir(rf(uo(n)));return t._nextDay&&(t.add(1,"d"),t._nextDay=undefined),t}function uo(n){var t=n._i,i=n._f;return(n._locale=n._locale||ii(n._l),t===null||i===undefined&&t==="")?re({nullInput:!0}):(typeof t=="string"&&(n._i=t=n._locale.preparse(t)),yt(t))?new ir(rf(t)):(wr(i)?el(n):i?cf(n):br(t)?n._d=t:hl(n),n)}function hl(n){var t=n._i;t===undefined?n._d=new Date:br(t)?n._d=new Date(+t):typeof t=="string"?yc(n):wr(t)?(n._a=dh(t.slice(0),function(n){return parseInt(n,10)}),hf(n)):typeof t=="object"?ol(n):typeof t=="number"?n._d=new Date(t):r.createFromInputFallback(n)}function fo(n,t,i,r,u){var f={};return typeof i=="boolean"&&(r=i,i=undefined),f._isAMomentObject=!0,f._useUTC=f._isUTC=u,f._l=i,f._i=n,f._f=t,f._strict=r,sl(f)}function s(n,t,i,r){return fo(n,t,i,r,!1)}function so(n,t){var r,i;if(t.length===1&&wr(t[0])&&(t=t[0]),!t.length)return s();for(r=t[0],i=1;i<t.length;++i)(!t[i].isValid()||t[i][n](r))&&(r=t[i]);return r}function cl(){var n=[].slice.call(arguments,0);return so("isBefore",n)}function ll(){var n=[].slice.call(arguments,0);return so("isAfter",n)}function eu(n){var t=he(n),i=t.year||0,r=t.quarter||0,u=t.month||0,f=t.week||0,e=t.day||0,o=t.hour||0,s=t.minute||0,h=t.second||0,c=t.millisecond||0;this._milliseconds=+c+h*1e3+s*6e4+o*36e5;this._days=+e+f*7;this._months=+u+r*3+i*12;this._data={};this._locale=ii();this._bubble()}function lf(n){return n instanceof eu}function ho(n,t){u(n,0,0,function(){var n=this.utcOffset(),i="+";return n<0&&(n=-n,i="-"),i+pu(~~(n/60),2)+t+pu(~~n%60,2)})}function af(n){var i=(n||"").match(fu)||[],u=i[i.length-1]||[],t=(u+"").match(co)||["-",0,0],r=+(t[1]*60)+h(t[2]);return t[0]==="+"?r:-r}function vf(n,t){var i,u;return t._isUTC?(i=t.clone(),u=(yt(n)||br(n)?+n:+s(n))-+i,i._d.setTime(+i._d+u),r.updateOffset(i,!1),i):s(n).local()}function yf(n){return-Math.round(n._d.getTimezoneOffset()/15)*15}function al(n,t){var i=this._offset||0,u;return n!=null?(typeof n=="string"&&(n=af(n)),Math.abs(n)<16&&(n=n*60),!this._isUTC&&t&&(u=yf(this)),this._offset=n,this._isUTC=!0,u!=null&&this.add(u,"m"),i!==n&&(!t||this._changeInProgress?wo(this,pt(n-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?i:yf(this)}function vl(n,t){return n!=null?(typeof n!="string"&&(n=-n),this.utcOffset(n,t),this):-this.utcOffset()}function yl(n){return this.utcOffset(0,n)}function pl(n){return this._isUTC&&(this.utcOffset(0,n),this._isUTC=!1,n&&this.subtract(yf(this),"m")),this}function wl(){return this._tzm?this.utcOffset(this._tzm):typeof this._i=="string"&&this.utcOffset(af(this._i)),this}function bl(n){return n=n?s(n).utcOffset():0,(this.utcOffset()-n)%60==0}function kl(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function dl(){var n,t;return typeof this._isDSTShifted!="undefined"?this._isDSTShifted:(n={},vu(n,this),n=uo(n),n._a?(t=n._isUTC?tr(n._a):s(n._a),this._isDSTShifted=this.isValid()&&ue(n._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted)}function gl(){return!this._isUTC}function na(){return this._isUTC}function lo(){return this._isUTC&&this._offset===0}function pt(n,t){var i=n,r=null,u,f,e;return lf(n)?i={ms:n._milliseconds,d:n._days,M:n._months}:typeof n=="number"?(i={},t?i[t]=n:i.milliseconds=n):(r=ao.exec(n))?(u=r[1]==="-"?-1:1,i={y:0,d:h(r[ft])*u,h:h(r[v])*u,m:h(r[ri])*u,s:h(r[ui])*u,ms:h(r[fi])*u}):(r=vo.exec(n))?(u=r[1]==="-"?-1:1,i={y:oi(r[2],u),M:oi(r[3],u),d:oi(r[4],u),h:oi(r[5],u),m:oi(r[6],u),s:oi(r[7],u),w:oi(r[8],u)}):i==null?i={}:typeof i=="object"&&("from"in i||"to"in i)&&(e=ta(s(i.from),s(i.to)),i={},i.ms=e.milliseconds,i.M=e.months),f=new eu(i),lf(n)&&ni(n,"_locale")&&(f._locale=n._locale),f}function oi(n,t){var i=n&&parseFloat(n.replace(",","."));return(isNaN(i)?0:i)*t}function yo(n,t){var i={milliseconds:0,months:0};return i.months=t.month()-n.month()+(t.year()-n.year())*12,n.clone().add(i.months,"M").isAfter(t)&&--i.months,i.milliseconds=+t-+n.clone().add(i.months,"M"),i}function ta(n,t){var i;return t=vf(t,n),n.isBefore(t)?i=yo(n,t):(i=yo(t,n),i.milliseconds=-i.milliseconds,i.months=-i.months),i}function po(n,t){return function(i,r){var u,f;return r===null||isNaN(+r)||(lc(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period)."),f=i,i=r,r=f),i=typeof i=="string"?+i:i,u=pt(i,r),wo(this,u,n),this}}function wo(n,t,i,u){var o=t._milliseconds,f=t._days,e=t._months;u=u==null?!0:u;o&&n._d.setTime(+n._d+o*i);f&&ce(n,"Date",gr(n,"Date")+f*i);e&&ke(n,gr(n,"Month")+e*i);u&&r.updateOffset(n,f||e)}function ia(n,t){var r=n||s(),f=vf(r,this).startOf("day"),i=this.diff(f,"days",!0),u=i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse";return this.format(t&&t[u]||this.localeData().calendar(u,this,s(r)))}function ra(){return new ir(this)}function ua(n,t){var i;return t=w(typeof t!="undefined"?t:"millisecond"),t==="millisecond"?(n=yt(n)?n:s(n),+this>+n):(i=yt(n)?+n:+s(n),i<+this.clone().startOf(t))}function fa(n,t){var i;return t=w(typeof t!="undefined"?t:"millisecond"),t==="millisecond"?(n=yt(n)?n:s(n),+this<+n):(i=yt(n)?+n:+s(n),+this.clone().endOf(t)<i)}function ea(n,t,i){return this.isAfter(n,i)&&this.isBefore(t,i)}function oa(n,t){var i;return t=w(t||"millisecond"),t==="millisecond"?(n=yt(n)?n:s(n),+this==+n):(i=+s(n),+this.clone().startOf(t)<=i&&i<=+this.clone().endOf(t))}function sa(n,t,i){var f=vf(n,this),e=(f.utcOffset()-this.utcOffset())*6e4,u,r;return t=w(t),t==="year"||t==="month"||t==="quarter"?(r=ha(this,f),t==="quarter"?r=r/3:t==="year"&&(r=r/12)):(u=this-f,r=t==="second"?u/1e3:t==="minute"?u/6e4:t==="hour"?u/36e5:t==="day"?(u-e)/864e5:t==="week"?(u-e)/6048e5:u),i?r:y(r)}function ha(n,t){var r=(t.year()-n.year())*12+(t.month()-n.month()),i=n.clone().add(r,"months"),u,f;return t-i<0?(u=n.clone().add(r-1,"months"),f=(t-i)/(i-u)):(u=n.clone().add(r+1,"months"),f=(t-i)/(u-i)),-(r+f)}function ca(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function go(){var n=this.clone().utc();return 0<n.year()&&n.year()<=9999?"function"==typeof Date.prototype.toISOString?this.toDate().toISOString():bu(n,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):bu(n,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function la(n){var t=bu(this,n||r.defaultFormat);return this.localeData().postformat(t)}function aa(n,t){return this.isValid()?pt({to:this,from:n}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function va(n){return this.from(s(),n)}function ya(n,t){return this.isValid()?pt({from:this,to:n}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function pa(n){return this.to(s(),n)}function ns(n){var t;return n===undefined?this._locale._abbr:(t=ii(n),t!=null&&(this._locale=t),this)}function ts(){return this._locale}function wa(n){n=w(n);switch(n){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return n==="week"&&this.weekday(0),n==="isoWeek"&&this.isoWeekday(1),n==="quarter"&&this.month(Math.floor(this.month()/3)*3),this}function ba(n){return(n=w(n),n===undefined||n==="millisecond")?this:this.startOf(n).add(1,n==="isoWeek"?"week":n).subtract(1,"ms")}function ka(){return+this._d-(this._offset||0)*6e4}function da(){return Math.floor(+this/1e3)}function ga(){return this._offset?new Date(+this):this._d}function nv(){var n=this;return[n.year(),n.month(),n.date(),n.hour(),n.minute(),n.second(),n.millisecond()]}function tv(){var n=this;return{years:n.year(),months:n.month(),date:n.date(),hours:n.hours(),minutes:n.minutes(),seconds:n.seconds(),milliseconds:n.milliseconds()}}function iv(){return ie(this)}function rv(){return kr({},o(this))}function uv(){return o(this).overflow}function ou(n,t){u(0,[n,n.length],0,t)}function is(n,t,i){return ei(s([n,11,31+t-i]),t,i).week}function fv(n){var t=ei(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return n==null?t:this.add(n-t,"y")}function ev(n){var t=ei(this,1,4).year;return n==null?t:this.add(n-t,"y")}function ov(){return is(this.year(),1,4)}function sv(){var n=this.localeData()._week;return is(this.year(),n.dow,n.doy)}function hv(n){return n==null?Math.ceil((this.month()+1)/3):this.month((n-1)*3+this.month()%3)}function cv(n,t){return typeof n!="string"?n:isNaN(n)?(n=t.weekdaysParse(n),typeof n=="number")?n:null:parseInt(n,10)}function lv(n){return this._weekdays[n.day()]}function av(n){return this._weekdaysShort[n.day()]}function vv(n){return this._weekdaysMin[n.day()]}function yv(n){var t,i,r;for(this._weekdaysParse=this._weekdaysParse||[],t=0;t<7;t++)if(this._weekdaysParse[t]||(i=s([2e3,1]).day(t),r="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[t]=new RegExp(r.replace(".",""),"i")),this._weekdaysParse[t].test(n))return t}function pv(n){var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return n!=null?(n=cv(n,this.localeData()),this.add(n-t,"d")):t}function wv(n){var t=(this.day()+7-this.localeData()._week.dow)%7;return n==null?t:this.add(n-t,"d")}function bv(n){return n==null?this.day()||7:this.day(this.day()%7?n:n-7)}function es(n,t){u(n,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function os(n,t){return t._meridiemParse}function kv(n){return(n+"").toLowerCase().charAt(0)==="p"}function dv(n,t,i){return n>11?i?"pm":"PM":i?"am":"AM"}function gv(n,t){t[fi]=h(("0."+n)*1e3)}function ny(){return this._isUTC?"UTC":""}function ty(){return this._isUTC?"Coordinated Universal Time":""}function iy(n){return s(n*1e3)}function ry(){return s.apply(null,arguments).parseZone()}function uy(n,t,i){var r=this._calendar[n];return typeof r=="function"?r.call(t,i):r}function fy(n){var t=this._longDateFormat[n],i=this._longDateFormat[n.toUpperCase()];return t||!i?t:(this._longDateFormat[n]=i.replace(/MMMM|MM|DD|dddd/g,function(n){return n.slice(1)}),this._longDateFormat[n])}function ey(){return this._invalidDate}function oy(n){return this._ordinal.replace("%d",n)}function ds(n){return n}function sy(n,t,i,r){var u=this._relativeTime[i];return typeof u=="function"?u(n,t,i,r):u.replace(/%d/i,n)}function hy(n,t){var i=this._relativeTime[n>0?"future":"past"];return typeof i=="function"?i(t):i.replace(/%s/i,t)}function cy(n){var t,i;for(i in n)t=n[i],typeof t=="function"?this[i]=t:this["_"+i]=t;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function nh(n,t,i,r){var u=ii(),f=tr().set(r,t);return u[i](f,n)}function or(n,t,i,r,u){if(typeof n=="number"&&(t=n,n=undefined),n=n||"",t!=null)return nh(n,t,i,u);for(var e=[],f=0;f<r;f++)e[f]=nh(n,f,i,u);return e}function ly(n,t){return or(n,t,"months",12,"month")}function ay(n,t){return or(n,t,"monthsShort",12,"month")}function vy(n,t){return or(n,t,"weekdays",7,"day")}function yy(n,t){return or(n,t,"weekdaysShort",7,"day")}function py(n,t){return or(n,t,"weekdaysMin",7,"day")}function wy(){var n=this._data;return this._milliseconds=et(this._milliseconds),this._days=et(this._days),this._months=et(this._months),n.milliseconds=et(n.milliseconds),n.seconds=et(n.seconds),n.minutes=et(n.minutes),n.hours=et(n.hours),n.months=et(n.months),n.years=et(n.years),this}function th(n,t,i,r){var u=pt(t,i);return n._milliseconds+=r*u._milliseconds,n._days+=r*u._days,n._months+=r*u._months,n._bubble()}function by(n,t){return th(this,n,t,1)}function ky(n,t){return th(this,n,t,-1)}function ih(n){return n<0?Math.floor(n):Math.ceil(n)}function dy(){var r=this._milliseconds,n=this._days,t=this._months,i=this._data,u,f,e,s,o;return r>=0&&n>=0&&t>=0||r<=0&&n<=0&&t<=0||(r+=ih(bf(t)+n)*864e5,n=0,t=0),i.milliseconds=r%1e3,u=y(r/1e3),i.seconds=u%60,f=y(u/60),i.minutes=f%60,e=y(f/60),i.hours=e%24,n+=y(e/24),o=y(rh(n)),t+=o,n-=ih(bf(o)),s=y(t/12),t%=12,i.days=n,i.months=t,i.years=s,this}function rh(n){return n*4800/146097}function bf(n){return n*146097/4800}function gy(n){var t,r,i=this._milliseconds;if(n=w(n),n==="month"||n==="year")return t=this._days+i/864e5,r=this._months+rh(t),n==="month"?r:r/12;t=this._days+Math.round(bf(this._months));switch(n){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return t*24+i/36e5;case"minute":return t*1440+i/6e4;case"second":return t*86400+i/1e3;case"millisecond":return Math.floor(t*864e5)+i;default:throw new Error("Unknown unit "+n);}}function np(){return this._milliseconds+this._days*864e5+this._months%12*2592e6+h(this._months/12)*31536e6}function bt(n){return function(){return this.as(n)}}function hp(n){return n=w(n),this[n+"s"]()}function si(n){return function(){return this._data[n]}}function bp(){return y(this.days()/7)}function kp(n,t,i,r,u){return u.relativeTime(t||1,!!i,n,r)}function dp(n,t,i){var r=pt(n).abs(),h=hi(r.as("s")),f=hi(r.as("m")),e=hi(r.as("h")),o=hi(r.as("d")),s=hi(r.as("M")),c=hi(r.as("y")),u=h<ct.s&&["s",h]||f===1&&["m"]||f<ct.m&&["mm",f]||e===1&&["h"]||e<ct.h&&["hh",e]||o===1&&["d"]||o<ct.d&&["dd",o]||s===1&&["M"]||s<ct.M&&["MM",s]||c===1&&["y"]||["yy",c];return u[2]=t,u[3]=+n>0,u[4]=i,kp.apply(null,u)}function gp(n,t){return ct[n]===undefined?!1:t===undefined?ct[n]:(ct[n]=t,!0)}function nw(n){var t=this.localeData(),i=dp(this,!n,t);return n&&(i=t.pastFuture(+this,i)),t.postformat(i)}function hu(){var t=su(this._milliseconds)/1e3,a=su(this._days),i=su(this._months),n,e,o;n=y(t/60);e=y(n/60);t%=60;n%=60;o=y(i/12);i%=12;var s=o,h=i,c=a,r=e,u=n,f=t,l=this.asSeconds();return l?(l<0?"-":"")+"P"+(s?s+"Y":"")+(h?h+"M":"")+(c?c+"D":"")+(r||u||f?"T":"")+(r?r+"H":"")+(u?u+"M":"")+(f?f+"S":""):"P0D"}function ew(n,t){var i=n.split("_");return t%10==1&&t%100!=11?i[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?i[1]:i[2]}function ci(n,t,i){var r={mm:t?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:t?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"};return i==="m"?t?"хвіліна":"хвіліну":i==="h"?t?"гадзіна":"гадзіну":n+" "+ew(r[i],+n)}function ow(n,t){var i={nominative:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_"),accusative:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_")},r=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(t)?"accusative":"nominative";return i[r][n.month()]}function sw(n,t){var i={nominative:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),accusative:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_")},r=/\[ ?[Вв] ?(?:мінулую|наступную)? ?\] ?dddd/.test(t)?"accusative":"nominative";return i[r][n.day()]}function df(n,t,i){return n+" "+yw({mm:"munutenn",MM:"miz",dd:"devezh"}[i],n)}function vw(n){switch(eh(n)){case 1:case 3:case 4:case 5:case 9:return n+" bloaz";default:return n+" vloaz"}}function eh(n){return n>9?eh(n%10):n}function yw(n,t){return t===2?pw(n):n}function pw(n){var t={m:"v",b:"v",d:"z"};return t[n.charAt(0)]===undefined?n:t[n.charAt(0)]+n.substring(1)}function li(n,t,i){var r=n+" ";switch(i){case"m":return t?"jedna minuta":"jedne minute";case"mm":return r+(n===1?"minuta":n===2||n===3||n===4?"minute":"minuta");case"h":return t?"jedan sat":"jednog sata";case"hh":return r+(n===1?"sat":n===2||n===3||n===4?"sata":"sati");case"dd":return r+(n===1?"dan":"dana");case"MM":return r+(n===1?"mjesec":n===2||n===3||n===4?"mjeseca":"mjeseci");case"yy":return r+(n===1?"godina":n===2||n===3||n===4?"godine":"godina")}}function sr(n){return n>1&&n<5&&~~(n/10)!=1}function d(n,t,i,r){var u=n+" ";switch(i){case"s":return t||r?"pár sekund":"pár sekundami";case"m":return t?"minuta":r?"minutu":"minutou";case"mm":return t||r?u+(sr(n)?"minuty":"minut"):u+"minutami";case"h":return t?"hodina":r?"hodinu":"hodinou";case"hh":return t||r?u+(sr(n)?"hodiny":"hodin"):u+"hodinami";case"d":return t||r?"den":"dnem";case"dd":return t||r?u+(sr(n)?"dny":"dní"):u+"dny";case"M":return t||r?"měsíc":"měsícem";case"MM":return t||r?u+(sr(n)?"měsíce":"měsíců"):u+"měsíci";case"y":return t||r?"rok":"rokem";case"yy":return t||r?u+(sr(n)?"roky":"let"):u+"lety"}}function kt(n,t,i){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[n+" Tage",n+" Tagen"],M:["ein Monat","einem Monat"],MM:[n+" Monate",n+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[n+" Jahre",n+" Jahren"]};return t?r[i][0]:r[i][1]}function dt(n,t,i){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[n+" Tage",n+" Tagen"],M:["ein Monat","einem Monat"],MM:[n+" Monate",n+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[n+" Jahre",n+" Jahren"]};return t?r[i][0]:r[i][1]}function ot(n,t,i,r){var u={s:["mõne sekundi","mõni sekund","paar sekundit"],m:["ühe minuti","üks minut"],mm:[n+" minuti",n+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[n+" tunni",n+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[n+" kuu",n+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[n+" aasta",n+" aastat"]};return t?u[i][2]?u[i][2]:u[i][1]:r?u[i][0]:u[i][1]}function g(n,t,i,r){var u="";switch(i){case"s":return r?"muutaman sekunnin":"muutama sekunti";case"m":return r?"minuutin":"minuutti";case"mm":u=r?"minuutin":"minuuttia";break;case"h":return r?"tunnin":"tunti";case"hh":u=r?"tunnin":"tuntia";break;case"d":return r?"päivän":"päivä";case"dd":u=r?"päivän":"päivää";break;case"M":return r?"kuukauden":"kuukausi";case"MM":u=r?"kuukauden":"kuukautta";break;case"y":return r?"vuoden":"vuosi";case"yy":u=r?"vuoden":"vuotta"}return ib(n,r)+" "+u}function ib(n,t){return n<10?t?tb[n]:cu[n]:n}function ai(n,t,i){var r=n+" ";switch(i){case"m":return t?"jedna minuta":"jedne minute";case"mm":return r+(n===1?"minuta":n===2||n===3||n===4?"minute":"minuta");case"h":return t?"jedan sat":"jednog sata";case"hh":return r+(n===1?"sat":n===2||n===3||n===4?"sata":"sati");case"dd":return r+(n===1?"dan":"dana");case"MM":return r+(n===1?"mjesec":n===2||n===3||n===4?"mjeseca":"mjeseci");case"yy":return r+(n===1?"godina":n===2||n===3||n===4?"godine":"godina")}}function nt(n,t,i,r){var u=n;switch(i){case"s":return r||t?"néhány másodperc":"néhány másodperce";case"m":return"egy"+(r||t?" perc":" perce");case"mm":return u+(r||t?" perc":" perce");case"h":return"egy"+(r||t?" óra":" órája");case"hh":return u+(r||t?" óra":" órája");case"d":return"egy"+(r||t?" nap":" napja");case"dd":return u+(r||t?" nap":" napja");case"M":return"egy"+(r||t?" hónap":" hónapja");case"MM":return u+(r||t?" hónap":" hónapja");case"y":return"egy"+(r||t?" év":" éve");case"yy":return u+(r||t?" év":" éve")}return""}function ch(n){return(n?"":"[múlt] ")+"["+hh[this.day()]+"] LT[-kor]"}function hb(n,t){var i={nominative:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_"),accusative:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_")},r=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(t)?"accusative":"nominative";return i[r][n.month()]}function cb(n){var t="հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_");return t[n.month()]}function lb(n){var t="կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_");return t[n.day()]}function hr(n){return n%100==11?!0:n%10==1?!1:!0}function st(n,t,i,r){var u=n+" ";switch(i){case"s":return t||r?"nokkrar sekúndur":"nokkrum sekúndum";case"m":return t?"mínúta":"mínútu";case"mm":return hr(n)?u+(t||r?"mínútur":"mínútum"):t?u+"mínúta":u+"mínútu";case"hh":return hr(n)?u+(t||r?"klukkustundir":"klukkustundum"):u+"klukkustund";case"d":return t?"dagur":r?"dag":"degi";case"dd":return hr(n)?t?u+"dagar":u+(r?"daga":"dögum"):t?u+"dagur":u+(r?"dag":"degi");case"M":return t?"mánuður":r?"mánuð":"mánuði";case"MM":return hr(n)?t?u+"mánuðir":u+(r?"mánuði":"mánuðum"):t?u+"mánuður":u+(r?"mánuð":"mánuði");case"y":return t||r?"ár":"ári";case"yy":return hr(n)?u+(t||r?"ár":"árum"):u+(t||r?"ár":"ári")}}function yb(n,t){var i={nominative:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),accusative:"იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს".split("_")},r=/D[oD] *MMMM?/.test(t)?"accusative":"nominative";return i[r][n.month()]}function pb(n,t){var i={nominative:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),accusative:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_")},r=/(წინა|შემდეგ)/.test(t)?"accusative":"nominative";return i[r][n.day()]}function cr(n,t,i){var r={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return t?r[i][0]:r[i][1]}function wb(n){var t=n.substr(0,n.indexOf(" "));return wi(t)?"a "+n:"an "+n}function bb(n){var t=n.substr(0,n.indexOf(" "));return wi(t)?"viru "+n:"virun "+n}function wi(n){if(n=parseInt(n,10),isNaN(n))return!1;if(n<0)return!0;if(n<10)return 4<=n&&n<=7?!0:!1;if(n<100){var t=n%10,i=n/10;return t===0?wi(i):wi(t)}if(n<1e4){while(n>=10)n=n/10;return wi(n)}return n=n/1e3,wi(n)}function gb(n,t,i,r){return t?"kelios sekundės":r?"kelių sekundžių":"kelias sekundes"}function nk(n,t){var i={nominative:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),accusative:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_")},r=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(t)?"accusative":"nominative";return i[r][n.month()]}function bi(n,t,i,r){return t?gt(i)[0]:r?gt(i)[1]:gt(i)[2]}function lh(n){return n%10==0||n>10&&n<20}function gt(n){return kb[n].split("_")}function lr(n,t,i,r){var u=n+" ";return n===1?u+bi(n,t,i[0],r):t?u+(lh(n)?gt(i)[1]:gt(i)[0]):r?u+gt(i)[1]:u+(lh(n)?gt(i)[1]:gt(i)[2])}function tk(n,t){var r=t.indexOf("dddd HH:mm")===-1,i=db[n.day()];return r?i:i.substring(0,i.length-2)+"į"}function ah(n,t,i){return i?t%10==1&&t!==11?n[2]:n[3]:t%10==1&&t!==11?n[0]:n[1]}function ar(n,t,i){return n+" "+ah(gf[i],n,t)}function vr(n,t,i){return ah(gf[i],n,t)}function rk(n,t){return t?"dažas sekundes":"dažām sekundēm"}function lu(n){return n%10<5&&n%10>1&&~~(n/10)%10!=1}function ki(n,t,i){var r=n+" ";switch(i){case"m":return t?"minuta":"minutę";case"mm":return r+(lu(n)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return r+(lu(n)?"godziny":"godzin");case"MM":return r+(lu(n)?"miesiące":"miesięcy");case"yy":return r+(lu(n)?"lata":"lat")}}function yr(n,t,i){var r=" ";return(n%100>=20||n>=100&&n%100==0)&&(r=" de "),n+r+{mm:"minute",hh:"ore",dd:"zile",MM:"luni",yy:"ani"}[i]}function vk(n,t){var i=n.split("_");return t%10==1&&t%100!=11?i[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?i[1]:i[2]}function di(n,t,i){var r={mm:t?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"};return i==="m"?t?"минута":"минуту":n+" "+vk(r[i],+n)}function yk(n,t){var i={nominative:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),accusative:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_")},r=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(t)?"accusative":"nominative";return i[r][n.month()]}function pk(n,t){var i={nominative:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),accusative:"янв_фев_мар_апр_мая_июня_июля_авг_сен_окт_ноя_дек".split("_")},r=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(t)?"accusative":"nominative";return i[r][n.month()]}function wk(n,t){var i={nominative:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),accusative:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_")},r=/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/.test(t)?"accusative":"nominative";return i[r][n.day()]}function pr(n){return n>1&&n<5}function tt(n,t,i,r){var u=n+" ";switch(i){case"s":return t||r?"pár sekúnd":"pár sekundami";case"m":return t?"minúta":r?"minútu":"minútou";case"mm":return t||r?u+(pr(n)?"minúty":"minút"):u+"minútami";case"h":return t?"hodina":r?"hodinu":"hodinou";case"hh":return t||r?u+(pr(n)?"hodiny":"hodín"):u+"hodinami";case"d":return t||r?"deň":"dňom";case"dd":return t||r?u+(pr(n)?"dni":"dní"):u+"dňami";case"M":return t||r?"mesiac":"mesiacom";case"MM":return t||r?u+(pr(n)?"mesiace":"mesiacov"):u+"mesiacmi";case"y":return t||r?"rok":"rokom";case"yy":return t||r?u+(pr(n)?"roky":"rokov"):u+"rokmi"}}function it(n,t,i,r){var u=n+" ";switch(i){case"s":return t||r?"nekaj sekund":"nekaj sekundami";case"m":return t?"ena minuta":"eno minuto";case"mm":return u+(n===1?t?"minuta":"minuto":n===2?t||r?"minuti":"minutama":n<5?t||r?"minute":"minutami":t||r?"minut":"minutami");case"h":return t?"ena ura":"eno uro";case"hh":return u+(n===1?t?"ura":"uro":n===2?t||r?"uri":"urama":n<5?t||r?"ure":"urami":t||r?"ur":"urami");case"d":return t||r?"en dan":"enim dnem";case"dd":return u+(n===1?t||r?"dan":"dnem":n===2?t||r?"dni":"dnevoma":t||r?"dni":"dnevi");case"M":return t||r?"en mesec":"enim mesecem";case"MM":return u+(n===1?t||r?"mesec":"mesecem":n===2?t||r?"meseca":"mesecema":n<5?t||r?"mesece":"meseci":t||r?"mesecev":"meseci");case"y":return t||r?"eno leto":"enim letom";case"yy":return u+(n===1?t||r?"leto":"letom":n===2?t||r?"leti":"letoma":n<5?t||r?"leta":"leti":t||r?"let":"leti")}}function rt(n,t,i,r){var u={s:["viensas secunds","'iensas secunds"],m:["'n míut","'iens míut"],mm:[n+" míuts"," "+n+" míuts"],h:["'n þora","'iensa þora"],hh:[n+" þoras"," "+n+" þoras"],d:["'n ziua","'iensa ziua"],dd:[n+" ziuas"," "+n+" ziuas"],M:["'n mes","'iens mes"],MM:[n+" mesen"," "+n+" mesen"],y:["'n ar","'iens ar"],yy:[n+" ars"," "+n+" ars"]};return r?u[i][0]:t?u[i][0]:u[i][1].trim()}function gk(n,t){var i=n.split("_");return t%10==1&&t%100!=11?i[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?i[1]:i[2]}function gi(n,t,i){return i==="m"?t?"хвилина":"хвилину":i==="h"?t?"година":"годину":n+" "+gk({mm:"хвилина_хвилини_хвилин",hh:"година_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"}[i],+n)}function nd(n,t){var i={nominative:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_"),accusative:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_")},r=/D[oD]? *MMMM?/.test(t)?"accusative":"nominative";return i[r][n.month()]}function td(n,t){var i={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")},r=/(\[[ВвУу]\]) ?dddd/.test(t)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)?"genitive":"nominative";return i[r][n.day()]}function nr(n){return function(){return n+"о"+(this.hours()===11?"б":"")+"] LT"}}var te,au=r.momentProperties=[],yu=!1,ti={},dr,ur={},ae=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,nu=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,wu={},yi={},ye=/\d/,p=/\d\d/,pe=/\d{3}/,ku=/\d{4}/,tu=/[+-]?\d{6}/,c=/\d\d?/,iu=/\d{1,3}/,du=/\d{1,4}/,ru=/[+-]?\d{1,6}/,uu=/[+-]?\d+/,fu=/Z|[+-]\d\d:?\d\d/gi,fr=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,gu={},nf={},ut=0,ht=1,ft=2,v=3,ri=4,ui=5,fi=6,we,be,uf,sf,ro,eo,oo,co,ao,vo,bo,ko,pf,wf,rs,us,fs,ss,hs,cs,ls,wt,as,t,vs,ys,ps,ws,bs,ks,gs,f,et,hi,ct,su,e,ww,bw,ob,hh,sb,ab,vb,ik,gf,ak,bk,kk,dk;u("M",["MM",2],"Mo",function(){return this.month()+1});u("MMM",0,0,function(n){return this.localeData().monthsShort(this,n)});u("MMMM",0,0,function(n){return this.localeData().months(this,n)});a("month","M");i("M",c);i("MM",c,p);i("MMM",fr);i("MMMM",fr);l(["M","MM"],function(n,t){t[ht]=h(n)-1});l(["MMM","MMMM"],function(n,t,i,r){var u=i._locale.monthsParse(n,r,i._strict);u!=null?t[ht]=u:o(i).invalidMonth=n});we="January_February_March_April_May_June_July_August_September_October_November_December".split("_");be="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");uf={};r.suppressDeprecationWarnings=!1;var ac=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ff=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],ef=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],vc=/^\/?Date\((\-?\d+)/i;for(r.createFromInputFallback=b("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(n){n._d=new Date(n._i+(n._useUTC?" UTC":""))}),u(0,["YY",2],0,function(){return this.year()%100}),u(0,["YYYY",4],0,"year"),u(0,["YYYYY",5],0,"year"),u(0,["YYYYYY",6,!0],0,"year"),a("year","y"),i("Y",uu),i("YY",c,p),i("YYYY",du,ku),i("YYYYY",ru,tu),i("YYYYYY",ru,tu),l(["YYYYY","YYYYYY"],ut),l("YYYY",function(n,t){t[ut]=n.length===2?r.parseTwoDigitYear(n):h(n)}),l("YY",function(n,t){t[ut]=r.parseTwoDigitYear(n)}),r.parseTwoDigitYear=function(n){return h(n)+(h(n)>68?1900:2e3)},sf=vi("FullYear",!1),u("w",["ww",2],"wo","week"),u("W",["WW",2],"Wo","isoWeek"),a("week","w"),a("isoWeek","W"),i("w",c),i("ww",c,p),i("W",c),i("WW",c,p),er(["w","ww","W","WW"],function(n,t,i,r){t[r.substr(0,1)]=h(n)}),ro={dow:0,doy:6},u("DDD",["DDDD",3],"DDDo","dayOfYear"),a("dayOfYear","DDD"),i("DDD",iu),i("DDDD",pe),l(["DDD","DDDD"],function(n,t,i){i._dayOfYear=h(n)}),r.ISO_8601=function(){},eo=b("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var n=s.apply(null,arguments);return n<this?this:n}),oo=b("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var n=s.apply(null,arguments);return n>this?this:n}),ho("Z",":"),ho("ZZ",""),i("Z",fu),i("ZZ",fu),l(["Z","ZZ"],function(n,t,i){i._useUTC=!0;i._tzm=af(n)}),co=/([\+\-]|\d\d)/gi,r.updateOffset=function(){},ao=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,vo=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,pt.fn=eu.prototype,bo=po(1,"add"),ko=po(-1,"subtract"),r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",pf=b("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(n){return n===undefined?this.localeData():this.locale(n)}),u(0,["gg",2],0,function(){return this.weekYear()%100}),u(0,["GG",2],0,function(){return this.isoWeekYear()%100}),ou("gggg","weekYear"),ou("ggggg","weekYear"),ou("GGGG","isoWeekYear"),ou("GGGGG","isoWeekYear"),a("weekYear","gg"),a("isoWeekYear","GG"),i("G",uu),i("g",uu),i("GG",c,p),i("gg",c,p),i("GGGG",du,ku),i("gggg",du,ku),i("GGGGG",ru,tu),i("ggggg",ru,tu),er(["gggg","ggggg","GGGG","GGGGG"],function(n,t,i,r){t[r.substr(0,2)]=h(n)}),er(["gg","GG"],function(n,t,i,u){t[u]=r.parseTwoDigitYear(n)}),u("Q",0,0,"quarter"),a("quarter","Q"),i("Q",ye),l("Q",function(n,t){t[ht]=(h(n)-1)*3}),u("D",["DD",2],"Do","date"),a("date","D"),i("D",c),i("DD",c,p),i("Do",function(n,t){return n?t._ordinalParse:t._ordinalParseLenient}),l(["D","DD"],ft),l("Do",function(n,t){t[ft]=h(n.match(c)[0],10)}),wf=vi("Date",!0),u("d",0,"do","day"),u("dd",0,0,function(n){return this.localeData().weekdaysMin(this,n)}),u("ddd",0,0,function(n){return this.localeData().weekdaysShort(this,n)}),u("dddd",0,0,function(n){return this.localeData().weekdays(this,n)}),u("e",0,0,"weekday"),u("E",0,0,"isoWeekday"),a("day","d"),a("weekday","e"),a("isoWeekday","E"),i("d",c),i("e",c),i("E",c),i("dd",fr),i("ddd",fr),i("dddd",fr),er(["dd","ddd","dddd"],function(n,t,i){var r=i._locale.weekdaysParse(n);r!=null?t.d=r:o(i).invalidWeekday=n}),er(["d","e","E"],function(n,t,i,r){t[r]=h(n)}),rs="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),us="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),fs="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),u("H",["HH",2],0,"hour"),u("h",["hh",2],0,function(){return this.hours()%12||12}),es("a",!0),es("A",!1),a("hour","h"),i("a",os),i("A",os),i("H",c),i("h",c),i("HH",c,p),i("hh",c,p),l(["H","HH"],v),l(["a","A"],function(n,t,i){i._isPm=i._locale.isPM(n);i._meridiem=n}),l(["h","hh"],function(n,t,i){t[v]=h(n);o(i).bigHour=!0}),ss=/[ap]\.?m?\.?/i,hs=vi("Hours",!0),u("m",["mm",2],0,"minute"),a("minute","m"),i("m",c),i("mm",c,p),l(["m","mm"],ri),cs=vi("Minutes",!1),u("s",["ss",2],0,"second"),a("second","s"),i("s",c),i("ss",c,p),l(["s","ss"],ui),ls=vi("Seconds",!1),u("S",0,0,function(){return~~(this.millisecond()/100)}),u(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),u(0,["SSS",3],0,"millisecond"),u(0,["SSSS",4],0,function(){return this.millisecond()*10}),u(0,["SSSSS",5],0,function(){return this.millisecond()*100}),u(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),u(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),u(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),u(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),a("millisecond","ms"),i("S",iu,ye),i("SS",iu,p),i("SSS",iu,pe),wt="SSSS";wt.length<=9;wt+="S")i(wt,/\d+/);for(wt="S";wt.length<=9;wt+="S")l(wt,gv);as=vi("Milliseconds",!1);u("z",0,0,"zoneAbbr");u("zz",0,0,"zoneName");t=ir.prototype;t.add=bo;t.calendar=ia;t.clone=ra;t.diff=sa;t.endOf=ba;t.format=la;t.from=aa;t.fromNow=va;t.to=ya;t.toNow=pa;t.get=le;t.invalidAt=uv;t.isAfter=ua;t.isBefore=fa;t.isBetween=ea;t.isSame=oa;t.isValid=iv;t.lang=pf;t.locale=ns;t.localeData=ts;t.max=oo;t.min=eo;t.parsingFlags=rv;t.set=le;t.startOf=wa;t.subtract=ko;t.toArray=nv;t.toObject=tv;t.toDate=ga;t.toISOString=go;t.toJSON=go;t.toString=ca;t.unix=da;t.valueOf=ka;t.year=sf;t.isLeapYear=wc;t.weekYear=fv;t.isoWeekYear=ev;t.quarter=t.quarters=hv;t.month=de;t.daysInMonth=cc;t.week=t.weeks=gc;t.isoWeek=t.isoWeeks=nl;t.weeksInYear=sv;t.isoWeeksInYear=ov;t.date=wf;t.day=t.days=pv;t.weekday=wv;t.isoWeekday=bv;t.dayOfYear=il;t.hour=t.hours=hs;t.minute=t.minutes=cs;t.second=t.seconds=ls;t.millisecond=t.milliseconds=as;t.utcOffset=al;t.utc=yl;t.local=pl;t.parseZone=wl;t.hasAlignedHourOffset=bl;t.isDST=kl;t.isDSTShifted=dl;t.isLocal=gl;t.isUtcOffset=na;t.isUtc=lo;t.isUTC=lo;t.zoneAbbr=ny;t.zoneName=ty;t.dates=b("dates accessor is deprecated. Use date instead.",wf);t.months=b("months accessor is deprecated. Use month instead",de);t.years=b("years accessor is deprecated. Use year instead",sf);t.zone=b("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",vl);vs=t;ys={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};ps={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};ws="Invalid date";bs="%d";ks=/\d{1,2}/;gs={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};f=fe.prototype;f._calendar=ys;f.calendar=uy;f._longDateFormat=ps;f.longDateFormat=fy;f._invalidDate=ws;f.invalidDate=ey;f._ordinal=bs;f.ordinal=oy;f._ordinalParse=ks;f.preparse=ds;f.postformat=ds;f._relativeTime=gs;f.relativeTime=sy;f.pastFuture=hy;f.set=cy;f.months=oc;f._months=we;f.monthsShort=sc;f._monthsShort=be;f.monthsParse=hc;f.week=bc;f._week=ro;f.firstDayOfYear=dc;f.firstDayOfWeek=kc;f.weekdays=lv;f._weekdays=rs;f.weekdaysMin=vv;f._weekdaysMin=fs;f.weekdaysShort=av;f._weekdaysShort=us;f.weekdaysParse=yv;f.isPM=kv;f._meridiemParse=ss;f.meridiem=dv;rr("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(n){var t=n%10,i=h(n%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return n+i}});r.lang=b("moment.lang is deprecated. Use moment.locale instead.",rr);r.langData=b("moment.langData is deprecated. Use moment.localeData instead.",ii);et=Math.abs;var tp=bt("ms"),ip=bt("s"),rp=bt("m"),up=bt("h"),fp=bt("d"),ep=bt("w"),op=bt("M"),sp=bt("y");var cp=si("milliseconds"),lp=si("seconds"),ap=si("minutes"),vp=si("hours"),yp=si("days"),pp=si("months"),wp=si("years");hi=Math.round;ct={s:45,m:45,h:22,d:26,M:11};su=Math.abs;e=eu.prototype;e.abs=wy;e.add=by;e.subtract=ky;e.as=gy;e.asMilliseconds=tp;e.asSeconds=ip;e.asMinutes=rp;e.asHours=up;e.asDays=fp;e.asWeeks=ep;e.asMonths=op;e.asYears=sp;e.valueOf=np;e._bubble=dy;e.get=hp;e.milliseconds=cp;e.seconds=lp;e.minutes=ap;e.hours=vp;e.days=yp;e.weeks=bp;e.months=pp;e.years=wp;e.humanize=nw;e.toISOString=hu;e.toString=hu;e.toJSON=hu;e.locale=ns;e.localeData=ts;e.toIsoString=b("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",hu);e.lang=pf;u("X",0,0,"unix");u("x",0,0,"valueOf");i("x",uu);i("X",/[+-]?\d+(\.\d{1,3})?/);l("X",function(n,t,i){i._d=new Date(parseFloat(n,10)*1e3)});l("x",function(n,t,i){i._d=new Date(h(n))});r.version="2.10.6";kh(s);r.fn=vs;r.min=cl;r.max=ll;r.utc=tr;r.unix=iy;r.months=ly;r.isDate=br;r.locale=rr;r.invalid=re;r.duration=pt;r.isMoment=yt;r.weekdays=vy;r.parseZone=ry;r.localeData=ii;r.isDuration=lf;r.monthsShort=ay;r.weekdaysMin=py;r.defineLocale=se;r.weekdaysShort=yy;r.normalizeUnits=w;r.relativeTimeThreshold=gp;var n=r,id=n.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(n){return/^nm$/i.test(n)},meridiem:function(n,t,i){return n<12?i?"vm":"VM":i?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},ordinalParse:/\d{1,2}(ste|de)/,ordinal:function(n){return n+(n===1||n===8||n>=20?"ste":"de")},week:{dow:1,doy:4}}),rd=n.defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:6,doy:12}}),tw={"1":"١","2":"٢","3":"٣","4":"٤","5":"٥","6":"٦","7":"٧","8":"٨","9":"٩","0":"٠"},iw={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},ud=n.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(n){return"م"===n},meridiem:function(n){return n<12?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(n){return n.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(n){return iw[n]}).replace(/،/g,",")},postformat:function(n){return n.replace(/\d/g,function(n){return tw[n]}).replace(/,/g,"،")},week:{dow:6,doy:12}}),fd=n.defineLocale("ar-tn",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}}),rw={"1":"١","2":"٢","3":"٣","4":"٤","5":"٥","6":"٦","7":"٧","8":"٨","9":"٩","0":"٠"},uw={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},uh=function(n){return n===0?0:n===1?1:n===2?2:n%100>=3&&n%100<=10?3:n%100>=11?4:5},fw={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},k=function(n){return function(t,i){var u=uh(t),r=fw[n][uh(t)];return u===2&&(r=r[i?0:1]),r.replace(/%d/i,t)}},fh=["كانون الثاني يناير","شباط فبراير","آذار مارس","نيسان أبريل","أيار مايو","حزيران يونيو","تموز يوليو","آب أغسطس","أيلول سبتمبر","تشرين الأول أكتوبر","تشرين الثاني نوفمبر","كانون الأول ديسمبر"],ed=n.defineLocale("ar",{months:fh,monthsShort:fh,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(n){return"م"===n},meridiem:function(n){return n<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:k("s"),m:k("m"),mm:k("m"),h:k("h"),hh:k("h"),d:k("d"),dd:k("d"),M:k("M"),MM:k("M"),y:k("y"),yy:k("y")},preparse:function(n){return n.replace(/\u200f/g,"").replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(n){return uw[n]}).replace(/،/g,",")},postformat:function(n){return n.replace(/\d/g,function(n){return rw[n]}).replace(/,/g,"،")},week:{dow:6,doy:12}}),kf={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"},od=n.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"birneçə saniyyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gecə|səhər|gündüz|axşam/,isPM:function(n){return/^(gündüz|axşam)$/.test(n)},meridiem:function(n){return n<4?"gecə":n<12?"səhər":n<17?"gündüz":"axşam"},ordinalParse:/\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,ordinal:function(n){if(n===0)return n+"-ıncı";var t=n%10,i=n%100-t,r=n>=100?100:null;return n+(kf[t]||kf[i]||kf[r])},week:{dow:1,doy:7}});var sd=n.defineLocale("be",{months:ow,monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:sw,weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:ci,mm:ci,h:ci,hh:ci,d:"дзень",dd:ci,M:"месяц",MM:ci,y:"год",yy:ci},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(n){return/^(дня|вечара)$/.test(n)},meridiem:function(n){return n<4?"ночы":n<12?"раніцы":n<17?"дня":"вечара"},ordinalParse:/\d{1,2}-(і|ы|га)/,ordinal:function(n,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return(n%10==2||n%10==3)&&n%100!=12&&n%100!=13?n+"-і":n+"-ы";case"D":return n+"-га";default:return n}},week:{dow:1,doy:7}}),hd=n.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[В изминалата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[В изминалия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дни",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},ordinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(n){var t=n%10,i=n%100;return n===0?n+"-ев":i===0?n+"-ен":i>10&&i<20?n+"-ти":t===1?n+"-ви":t===2?n+"-ри":t===7||t===8?n+"-ми":n+"-ти"},week:{dow:1,doy:7}}),hw={"1":"১","2":"২","3":"৩","4":"৪","5":"৫","6":"৬","7":"৭","8":"৮","9":"৯","0":"০"},cw={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"},cd=n.defineLocale("bn",{months:"জানুয়ারী_ফেবুয়ারী_মার্চ_এপ্রিল_মে_জুন_জুলাই_অগাস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব_মার্চ_এপর_মে_জুন_জুল_অগ_সেপ্ট_অক্টো_নভ_ডিসেম্".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পত্তিবার_শুক্রুবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পত্তি_শুক্রু_শনি".split("_"),weekdaysMin:"রব_সম_মঙ্গ_বু_ব্রিহ_শু_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কএক সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(n){return n.replace(/[১২৩৪৫৬৭৮৯০]/g,function(n){return cw[n]})},postformat:function(n){return n.replace(/\d/g,function(n){return hw[n]})},meridiemParse:/রাত|সকাল|দুপুর|বিকেল|রাত/,isPM:function(n){return/^(দুপুর|বিকেল|রাত)$/.test(n)},meridiem:function(n){return n<4?"রাত":n<10?"সকাল":n<17?"দুপুর":n<20?"বিকেল":"রাত"},week:{dow:0,doy:6}}),lw={"1":"༡","2":"༢","3":"༣","4":"༤","5":"༥","6":"༦","7":"༧","8":"༨","9":"༩","0":"༠"},aw={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"},ld=n.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(n){return n.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,function(n){return aw[n]})},postformat:function(n){return n.replace(/\d/g,function(n){return lw[n]})},meridiemParse:/མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,isPM:function(n){return/^(ཉིན་གུང|དགོང་དག|མཚན་མོ)$/.test(n)},meridiem:function(n){return n<4?"མཚན་མོ":n<10?"ཞོགས་ཀས":n<17?"ཉིན་གུང":n<20?"དགོང་དག":"མཚན་མོ"},week:{dow:0,doy:6}});ww=n.defineLocale("br",{months:"Genver_C'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_C'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Merc'her_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),longDateFormat:{LT:"h[e]mm A",LTS:"h[e]mm:ss A",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY h[e]mm A",LLLL:"dddd, D [a viz] MMMM YYYY h[e]mm A"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warc'hoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Dec'h da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s 'zo",s:"un nebeud segondennoù",m:"ur vunutenn",mm:df,h:"un eur",hh:"%d eur",d:"un devezh",dd:df,M:"ur miz",MM:df,y:"ur bloaz",yy:vw},ordinalParse:/\d{1,2}(añ|vet)/,ordinal:function(n){var t=n===1?"añ":"vet";return n+t},week:{dow:1,doy:4}});var ad=n.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",m:li,mm:li,h:li,hh:li,d:"dan",dd:li,M:"mjesec",MM:li,y:"godinu",yy:li},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),vd=n.defineLocale("ca",{months:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),monthsShort:"gen._febr._mar._abr._mai._jun._jul._ag._set._oct._nov._des.".split("_"),weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"Dg_Dl_Dt_Dc_Dj_Dv_Ds".split("_"),longDateFormat:{LT:"H:mm",LTS:"LT:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd D MMMM YYYY H:mm"},calendar:{sameDay:function(){return"[avui a "+(this.hours()!==1?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(this.hours()!==1?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(this.hours()!==1?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(this.hours()!==1?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(this.hours()!==1?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fa %s",s:"uns segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},ordinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(n,t){var i=n===1?"r":n===2?"n":n===3?"r":n===4?"t":"è";return(t==="w"||t==="W")&&(i="a"),n+i},week:{dow:1,doy:4}}),oh="leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),sh="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_");var yd=n.defineLocale("cs",{months:oh,monthsShort:sh,monthsParse:function(n,t){for(var r=[],i=0;i<12;i++)r[i]=new RegExp("^"+n[i]+"$|^"+t[i]+"$","i");return r}(oh,sh),weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:d,m:d,mm:d,h:d,hh:d,d:d,dd:d,M:d,MM:d,y:d,yy:d},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),pd=n.defineLocale("cv",{months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),monthsShort:"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кҫ_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",LLL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",LLLL:"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ӗнер] LT [сехетре]",nextWeek:"[Ҫитес] dddd LT [сехетре]",lastWeek:"[Иртнӗ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(n){var t=/сехет$/i.exec(n)?"рен":/ҫул$/i.exec(n)?"тан":"ран";return n+t},past:"%s каялла",s:"пӗр-ик ҫеккунт",m:"пӗр минут",mm:"%d минут",h:"пӗр сехет",hh:"%d сехет",d:"пӗр кун",dd:"%d кун",M:"пӗр уйӑх",MM:"%d уйӑх",y:"пӗр ҫул",yy:"%d ҫул"},ordinalParse:/\d{1,2}-мӗш/,ordinal:"%d-мӗш",week:{dow:1,doy:7}}),wd=n.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},ordinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(n){var t=n,i="";return t>20?i=t===40||t===50||t===60||t===80||t===100?"fed":"ain":t>0&&(i=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"][t]),n+i},week:{dow:1,doy:4}}),bd=n.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY HH:mm"},calendar:{sameDay:"[I dag kl.] LT",nextDay:"[I morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[I går kl.] LT",lastWeek:"[sidste] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});bw=n.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[Heute um] LT [Uhr]",sameElse:"L",nextDay:"[Morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[Gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:kt,mm:"%d Minuten",h:kt,hh:"%d Stunden",d:kt,dd:kt,M:kt,MM:kt,y:kt,yy:kt},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var kd=n.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[Heute um] LT [Uhr]",sameElse:"L",nextDay:"[Morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[Gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:dt,mm:"%d Minuten",h:dt,hh:"%d Stunden",d:dt,dd:dt,M:dt,MM:dt,y:dt,yy:dt},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),dd=n.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(n,t){return/D/.test(t.substring(0,t.indexOf("MMMM")))?this._monthsGenitiveEl[n.month()]:this._monthsNominativeEl[n.month()]},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(n,t,i){return n>11?i?"μμ":"ΜΜ":i?"πμ":"ΠΜ"},isPM:function(n){return(n+"").toLowerCase()[0]==="μ"},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[το προηγούμενο] dddd [{}] LT";default:return"[την προηγούμενη] dddd [{}] LT"}},sameElse:"L"},calendar:function(n,t){var i=this._calendarEl[n],r=t&&t.hours();return typeof i=="function"&&(i=i.apply(t)),i.replace("{}",r%12==1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"λίγα δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},ordinalParse:/\d{1,2}η/,ordinal:"%dη",week:{dow:1,doy:4}}),gd=n.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(n){var t=n%10,i=~~(n%100/10)==1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return n+i},week:{dow:1,doy:4}}),ng=n.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"D MMMM, YYYY",LLL:"D MMMM, YYYY h:mm A",LLLL:"dddd, D MMMM, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(n){var t=n%10,i=~~(n%100/10)==1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return n+i}}),tg=n.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(n){var t=n%10,i=~~(n%100/10)==1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return n+i},week:{dow:1,doy:4}}),ig=n.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec".split("_"),weekdays:"Dimanĉo_Lundo_Mardo_Merkredo_Ĵaŭdo_Vendredo_Sabato".split("_"),weekdaysShort:"Dim_Lun_Mard_Merk_Ĵaŭ_Ven_Sab".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Ĵa_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D[-an de] MMMM, YYYY",LLL:"D[-an de] MMMM, YYYY HH:mm",LLLL:"dddd, [la] D[-an de] MMMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(n){return n.charAt(0).toLowerCase()==="p"},meridiem:function(n,t,i){return n>11?i?"p.t.m.":"P.T.M.":i?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd [je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasinta] dddd [je] LT",sameElse:"L"},relativeTime:{future:"je %s",past:"antaŭ %s",s:"sekundoj",m:"minuto",mm:"%d minutoj",h:"horo",hh:"%d horoj",d:"tago",dd:"%d tagoj",M:"monato",MM:"%d monatoj",y:"jaro",yy:"%d jaroj"},ordinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}}),kw="Ene._Feb._Mar._Abr._May._Jun._Jul._Ago._Sep._Oct._Nov._Dic.".split("_"),dw="Ene_Feb_Mar_Abr_May_Jun_Jul_Ago_Sep_Oct_Nov_Dic".split("_"),rg=n.defineLocale("es",{months:"Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre".split("_"),monthsShort:function(n,t){return/-MMM-/.test(t)?dw[n.month()]:kw[n.month()]},weekdays:"Domingo_Lunes_Martes_Miércoles_Jueves_Viernes_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mié._Jue._Vie._Sáb.".split("_"),weekdaysMin:"Do_Lu_Ma_Mi_Ju_Vi_Sá".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(this.hours()!==1?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(this.hours()!==1?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(this.hours()!==1?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(this.hours()!==1?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(this.hours()!==1?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});var ug=n.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:ot,m:ot,mm:ot,h:ot,hh:ot,d:ot,dd:"%d päeva",M:ot,MM:ot,y:ot,yy:ot},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),fg=n.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),gw={"1":"۱","2":"۲","3":"۳","4":"۴","5":"۵","6":"۶","7":"۷","8":"۸","9":"۹","0":"۰"},nb={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"},eg=n.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(n){return/بعد از ظهر/.test(n)},meridiem:function(n){return n<12?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چندین ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(n){return n.replace(/[۰-۹]/g,function(n){return nb[n]}).replace(/،/g,",")},postformat:function(n){return n.replace(/\d/g,function(n){return gw[n]}).replace(/,/g,"،")},ordinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,doy:12}}),cu="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),tb=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",cu[7],cu[8],cu[9]];var og=n.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:g,m:g,mm:g,h:g,hh:g,d:g,dd:g,M:g,MM:g,y:g,yy:g},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),sg=n.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",m:"ein minutt",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaði",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),hg=n.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinalParse:/\d{1,2}(er|e)/,ordinal:function(n){return n+(n===1?"er":"e")}}),cg=n.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinalParse:/\d{1,2}(er|)/,ordinal:function(n){return n+(n===1?"er":"")},week:{dow:1,doy:4}}),rb="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),ub="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),lg=n.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(n,t){return/-MMM-/.test(t)?ub[n.month()]:rb[n.month()]},weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[ôfrûne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},ordinalParse:/\d{1,2}(ste|de)/,ordinal:function(n){return n+(n===1||n===8||n>=20?"ste":"de")},week:{dow:1,doy:4}}),ag=n.defineLocale("gl",{months:"Xaneiro_Febreiro_Marzo_Abril_Maio_Xuño_Xullo_Agosto_Setembro_Outubro_Novembro_Decembro".split("_"),monthsShort:"Xan._Feb._Mar._Abr._Mai._Xuñ._Xul._Ago._Set._Out._Nov._Dec.".split("_"),weekdays:"Domingo_Luns_Martes_Mércores_Xoves_Venres_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mér._Xov._Ven._Sáb.".split("_"),weekdaysMin:"Do_Lu_Ma_Mé_Xo_Ve_Sá".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd D MMMM YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(this.hours()!==1?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(this.hours()!==1?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(this.hours()!==1?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(this.hours()!==1?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(this.hours()!==1?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(n){return n==="uns segundos"?"nuns segundos":"en "+n},past:"hai %s",s:"uns segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:7}}),vg=n.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(n){return n===2?"שעתיים":n+" שעות"},d:"יום",dd:function(n){return n===2?"יומיים":n+" ימים"},M:"חודש",MM:function(n){return n===2?"חודשיים":n+" חודשים"},y:"שנה",yy:function(n){return n===2?"שנתיים":n%10==0&&n!==10?n+" שנה":n+" שנים"}}}),fb={"1":"१","2":"२","3":"३","4":"४","5":"५","6":"६","7":"७","8":"८","9":"९","0":"०"},eb={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},yg=n.defineLocale("hi",{months:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"},calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(n){return n.replace(/[१२३४५६७८९०]/g,function(n){return eb[n]})},postformat:function(n){return n.replace(/\d/g,function(n){return fb[n]})},meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(n,t){return(n===12&&(n=0),t==="रात")?n<4?n:n+12:t==="सुबह"?n:t==="दोपहर"?n>=10?n:n+12:t==="शाम"?n+12:void 0},meridiem:function(n){return n<4?"रात":n<10?"सुबह":n<17?"दोपहर":n<20?"शाम":"रात"},week:{dow:0,doy:6}});ob=n.defineLocale("hr",{months:"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_"),monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",m:ai,mm:ai,h:ai,hh:ai,d:"dan",dd:ai,M:"mjesec",MM:ai,y:"godinu",yy:ai},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});hh="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ");sb=n.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(n){return n.charAt(1).toLowerCase()==="u"},meridiem:function(n,t,i){return n<12?i===!0?"de":"DE":i===!0?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return ch.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return ch.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:nt,m:nt,mm:nt,h:nt,hh:nt,d:nt,dd:nt,M:nt,MM:nt,y:nt,yy:nt},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});ab=n.defineLocale("hy-am",{months:hb,monthsShort:cb,weekdays:lb,weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., HH:mm",LLLL:"dddd, D MMMM YYYY թ., HH:mm"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiemParse:/գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,isPM:function(n){return/^(ցերեկվա|երեկոյան)$/.test(n)},meridiem:function(n){return n<4?"գիշերվա":n<12?"առավոտվա":n<17?"ցերեկվա":"երեկոյան"},ordinalParse:/\d{1,2}|\d{1,2}-(ին|րդ)/,ordinal:function(n,t){switch(t){case"DDD":case"w":case"W":case"DDDo":return n===1?n+"-ին":n+"-րդ";default:return n}},week:{dow:1,doy:7}});vb=n.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(n,t){return(n===12&&(n=0),t==="pagi")?n:t==="siang"?n>=11?n:n+12:t==="sore"||t==="malam"?n+12:void 0},meridiem:function(n){return n<11?"pagi":n<15?"siang":n<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}});var pg=n.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:st,m:st,mm:st,h:"klukkustund",hh:st,d:st,dd:st,M:st,MM:st,y:st,yy:st},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),wg=n.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"Domenica_Lunedì_Martedì_Mercoledì_Giovedì_Venerdì_Sabato".split("_"),weekdaysShort:"Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),weekdaysMin:"D_L_Ma_Me_G_V_S".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(n){return(/^[0-9].+$/.test(n)?"tra":"in")+" "+n},past:"%s fa",s:"alcuni secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}}),bg=n.defineLocale("ja",{months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"Ah時m分",LTS:"Ah時m分s秒",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah時m分",LLLL:"YYYY年M月D日Ah時m分 dddd"},meridiemParse:/午前|午後/i,isPM:function(n){return n==="午後"},meridiem:function(n){return n<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:"[来週]dddd LT",lastDay:"[昨日] LT",lastWeek:"[前週]dddd LT",sameElse:"L"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}}),kg=n.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(n,t){return(n===12&&(n=0),t==="enjing")?n:t==="siyang"?n>=11?n:n+12:t==="sonten"||t==="ndalu"?n+12:void 0},meridiem:function(n){return n<11?"enjing":n<15?"siyang":n<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}});var dg=n.defineLocale("ka",{months:yb,monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:pb,weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(n){return/(წამი|წუთი|საათი|წელი)/.test(n)?n.replace(/ი$/,"ში"):n+"ში"},past:function(n){return/(წამი|წუთი|საათი|დღე|თვე)/.test(n)?n.replace(/(ი|ე)$/,"ის წინ"):/წელი/.test(n)?n.replace(/წელი$/,"წლის წინ"):void 0},s:"რამდენიმე წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},ordinalParse:/0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,ordinal:function(n){return n===0?n:n===1?n+"-ლი":n<20||n<=100&&n%20==0||n%100==0?"მე-"+n:n+"-ე"},week:{dow:1,doy:7}}),gg=n.defineLocale("km",{months:"មករា_កុម្ភៈ_មិនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មិនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysMin:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[ថ្ងៃនៈ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},week:{dow:1,doy:4}}),nn=n.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h시 m분",LTS:"A h시 m분 s초",L:"YYYY.MM.DD",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h시 m분",LLLL:"YYYY년 MMMM D일 dddd A h시 m분"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇초",ss:"%d초",m:"일분",mm:"%d분",h:"한시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한달",MM:"%d달",y:"일년",yy:"%d년"},ordinalParse:/\d{1,2}일/,ordinal:"%d일",meridiemParse:/오전|오후/,isPM:function(n){return n==="오후"},meridiem:function(n){return n<12?"오전":"오후"}});var tn=n.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:wb,past:bb,s:"e puer Sekonnen",m:cr,mm:"%d Minutten",h:cr,hh:"%d Stonnen",d:cr,dd:"%d Deeg",M:cr,MM:"%d Méint",y:cr,yy:"%d Joer"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),kb={m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"},db="sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_");ik=n.defineLocale("lt",{months:nk,monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:tk,weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:gb,m:bi,mm:lr,h:bi,hh:lr,d:bi,dd:lr,M:bi,MM:lr,y:bi,yy:lr},ordinalParse:/\d{1,2}-oji/,ordinal:function(n){return n+"-oji"},week:{dow:1,doy:4}});gf={m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_dienām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};var rn=n.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:rk,m:vr,mm:ar,h:vr,hh:ar,d:vr,dd:ar,M:vr,MM:ar,y:vr,yy:ar},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),lt={words:{m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(n,t){return n===1?t[0]:n>=2&&n<=4?t[1]:t[2]},translate:function(n,t,i){var r=lt.words[i];return i.length===1?t?r[0]:r[1]:n+" "+lt.correctGrammaticalCase(n,r)}},un=n.defineLocale("me",{months:["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar"],monthsShort:["jan.","feb.","mar.","apr.","maj","jun","jul","avg.","sep.","okt.","nov.","dec."],weekdays:["nedjelja","ponedjeljak","utorak","srijeda","četvrtak","petak","subota"],weekdaysShort:["ned.","pon.","uto.","sri.","čet.","pet.","sub."],weekdaysMin:["ne","po","ut","sr","če","pe","su"],longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedjelje] [u] LT","[prošlog] [ponedjeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srijede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",m:lt.translate,mm:lt.translate,h:lt.translate,hh:lt.translate,d:"dan",dd:lt.translate,M:"mjesec",MM:lt.translate,y:"godinu",yy:lt.translate},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),fn=n.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Во изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Во изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"после %s",past:"пред %s",s:"неколку секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",M:"месец",MM:"%d месеци",y:"година",yy:"%d години"},ordinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(n){var t=n%10,i=n%100;return n===0?n+"-ев":i===0?n+"-ен":i>10&&i<20?n+"-ти":t===1?n+"-ви":t===2?n+"-ри":t===7||t===8?n+"-ми":n+"-ти"},week:{dow:1,doy:7}}),en=n.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,isPM:function(n){return/^(ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി)$/.test(n)},meridiem:function(n){return n<4?"രാത്രി":n<12?"രാവിലെ":n<17?"ഉച്ച കഴിഞ്ഞ്":n<20?"വൈകുന്നേരം":"രാത്രി"}}),uk={"1":"१","2":"२","3":"३","4":"४","5":"५","6":"६","7":"७","8":"८","9":"९","0":"०"},fk={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},on=n.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",LTS:"A h:mm:ss वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm वाजता",LLLL:"dddd, D MMMM YYYY, A h:mm वाजता"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%s नंतर",past:"%s पूर्वी",s:"सेकंद",m:"एक मिनिट",mm:"%d मिनिटे",h:"एक तास",hh:"%d तास",d:"एक दिवस",dd:"%d दिवस",M:"एक महिना",MM:"%d महिने",y:"एक वर्ष",yy:"%d वर्षे"},preparse:function(n){return n.replace(/[१२३४५६७८९०]/g,function(n){return fk[n]})},postformat:function(n){return n.replace(/\d/g,function(n){return uk[n]})},meridiemParse:/रात्री|सकाळी|दुपारी|सायंकाळी/,meridiemHour:function(n,t){return(n===12&&(n=0),t==="रात्री")?n<4?n:n+12:t==="सकाळी"?n:t==="दुपारी"?n>=10?n:n+12:t==="सायंकाळी"?n+12:void 0},meridiem:function(n){return n<4?"रात्री":n<10?"सकाळी":n<17?"दुपारी":n<20?"सायंकाळी":"रात्री"},week:{dow:0,doy:6}}),sn=n.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(n,t){return(n===12&&(n=0),t==="pagi")?n:t==="tengahari"?n>=11?n:n+12:t==="petang"||t==="malam"?n+12:void 0},meridiem:function(n){return n<11?"pagi":n<15?"tengahari":n<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}}),hn=n.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(n,t){return(n===12&&(n=0),t==="pagi")?n:t==="tengahari"?n>=11?n:n+12:t==="petang"||t==="malam"?n+12:void 0},meridiem:function(n){return n<11?"pagi":n<15?"tengahari":n<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}}),ek={"1":"၁","2":"၂","3":"၃","4":"၄","5":"၅","6":"၆","7":"၇","8":"၈","9":"၉","0":"၀"},ok={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"},cn=n.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(n){return n.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,function(n){return ok[n]})},postformat:function(n){return n.replace(/\d/g,function(n){return ek[n]})},week:{dow:1,doy:4}}),ln=n.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tirs_ons_tors_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"H.mm",LTS:"H.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H.mm",LLLL:"dddd D. MMMM YYYY [kl.] H.mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"for %s siden",s:"noen sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),sk={"1":"१","2":"२","3":"३","4":"४","5":"५","6":"६","7":"७","8":"८","9":"९","0":"०"},hk={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},an=n.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आइ._सो._मङ्_बु._बि._शु._श.".split("_"),longDateFormat:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, Aको h:mm बजे",LLLL:"dddd, D MMMM YYYY, Aको h:mm बजे"},preparse:function(n){return n.replace(/[१२३४५६७८९०]/g,function(n){return hk[n]})},postformat:function(n){return n.replace(/\d/g,function(n){return sk[n]})},meridiemParse:/राती|बिहान|दिउँसो|बेलुका|साँझ|राती/,meridiemHour:function(n,t){return(n===12&&(n=0),t==="राती")?n<3?n:n+12:t==="बिहान"?n:t==="दिउँसो"?n>=10?n:n+12:t==="बेलुका"||t==="साँझ"?n+12:void 0},meridiem:function(n){return n<3?"राती":n<10?"बिहान":n<15?"दिउँसो":n<18?"बेलुका":n<20?"साँझ":"राती"},calendar:{sameDay:"[आज] LT",nextDay:"[भोली] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडी",s:"केही समय",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:1,doy:7}}),ck="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),lk="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),vn=n.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(n,t){return/-MMM-/.test(t)?lk[n.month()]:ck[n.month()]},weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"Zo_Ma_Di_Wo_Do_Vr_Za".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},ordinalParse:/\d{1,2}(ste|de)/,ordinal:function(n){return n+(n===1||n===8||n>=20?"ste":"de")},week:{dow:1,doy:4}}),yn=n.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"sun_mån_tys_ons_tor_fre_lau".split("_"),weekdaysMin:"su_må_ty_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"for %s sidan",s:"nokre sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),vh="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),yh="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_");var pn=n.defineLocale("pl",{months:function(n,t){return t===""?"("+yh[n.month()]+"|"+vh[n.month()]+")":/D MMMM/.test(t)?yh[n.month()]:vh[n.month()]},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"nie_pon_wt_śr_czw_pt_sb".split("_"),weekdaysMin:"N_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:"[W] dddd [o] LT",lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:ki,mm:ki,h:ki,hh:ki,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:ki,y:"rok",yy:ki},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),wn=n.defineLocale("pt-br",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-Feira_Terça-Feira_Quarta-Feira_Quinta-Feira_Sexta-Feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Dom_2ª_3ª_4ª_5ª_6ª_Sáb".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return this.day()===0||this.day()===6?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"poucos segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinalParse:/\d{1,2}º/,ordinal:"%dº"}),bn=n.defineLocale("pt",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-Feira_Terça-Feira_Quarta-Feira_Quinta-Feira_Sexta-Feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Dom_2ª_3ª_4ª_5ª_6ª_Sáb".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return this.day()===0||this.day()===6?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});ak=n.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",m:"un minut",mm:yr,h:"o oră",hh:yr,d:"o zi",dd:yr,M:"o lună",MM:yr,y:"un an",yy:yr},week:{dow:1,doy:7}});var kn=n.defineLocale("ru",{months:yk,monthsShort:pk,weekdays:wk,weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[й|я]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сегодня в] LT",nextDay:"[Завтра в] LT",lastDay:"[Вчера в] LT",nextWeek:function(){return this.day()===2?"[Во] dddd [в] LT":"[В] dddd [в] LT"},lastWeek:function(n){if(n.week()!==this.week())switch(this.day()){case 0:return"[В прошлое] dddd [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd [в] LT"}else return this.day()===2?"[Во] dddd [в] LT":"[В] dddd [в] LT"},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:di,mm:di,h:"час",hh:di,d:"день",dd:di,M:"месяц",MM:di,y:"год",yy:di},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(n){return/^(дня|вечера)$/.test(n)},meridiem:function(n){return n<4?"ночи":n<12?"утра":n<17?"дня":"вечера"},ordinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(n,t){switch(t){case"M":case"d":case"DDD":return n+"-й";case"D":return n+"-го";case"w":case"W":return n+"-я";default:return n}},week:{dow:1,doy:7}}),dn=n.defineLocale("si",{months:"ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්".split("_"),monthsShort:"ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ".split("_"),weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්‍ර_සි_සෙ".split("_"),longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [වැනි] dddd, a h:mm:ss"},calendar:{sameDay:"[අද] LT[ට]",nextDay:"[හෙට] LT[ට]",nextWeek:"dddd LT[ට]",lastDay:"[ඊයේ] LT[ට]",lastWeek:"[පසුගිය] dddd LT[ට]",sameElse:"L"},relativeTime:{future:"%sකින්",past:"%sකට පෙර",s:"තත්පර කිහිපය",m:"මිනිත්තුව",mm:"මිනිත්තු %d",h:"පැය",hh:"පැය %d",d:"දිනය",dd:"දින %d",M:"මාසය",MM:"මාස %d",y:"වසර",yy:"වසර %d"},ordinalParse:/\d{1,2} වැනි/,ordinal:function(n){return n+" වැනි"},meridiem:function(n,t,i){return n>11?i?"ප.ව.":"පස් වරු":i?"පෙ.ව.":"පෙර වරු"}}),ph="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),wh="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");bk=n.defineLocale("sk",{months:ph,monthsShort:wh,monthsParse:function(n,t){for(var r=[],i=0;i<12;i++)r[i]=new RegExp("^"+n[i]+"$|^"+t[i]+"$","i");return r}(ph,wh),weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 4:case 5:return"[minulý] dddd [o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:tt,m:tt,mm:tt,h:tt,hh:tt,d:tt,dd:tt,M:tt,MM:tt,y:tt,yy:tt},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var gn=n.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prejšnjo] [nedeljo] [ob] LT";case 3:return"[prejšnjo] [sredo] [ob] LT";case 6:return"[prejšnjo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"pred %s",s:it,m:it,mm:it,h:it,hh:it,d:it,dd:it,M:it,MM:it,y:it,yy:it},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),ntt=n.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),meridiemParse:/PD|MD/,isPM:function(n){return n.charAt(0)==="M"},meridiem:function(n){return n<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),at={words:{m:["један минут","једне минуте"],mm:["минут","минуте","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],dd:["дан","дана","дана"],MM:["месец","месеца","месеци"],yy:["година","године","година"]},correctGrammaticalCase:function(n,t){return n===1?t[0]:n>=2&&n<=4?t[1]:t[2]},translate:function(n,t,i){var r=at.words[i];return i.length===1?t?r[0]:r[1]:n+" "+at.correctGrammaticalCase(n,r)}},ttt=n.defineLocale("sr-cyrl",{months:["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар"],monthsShort:["јан.","феб.","мар.","апр.","мај","јун","јул","авг.","сеп.","окт.","нов.","дец."],weekdays:["недеља","понедељак","уторак","среда","четвртак","петак","субота"],weekdaysShort:["нед.","пон.","уто.","сре.","чет.","пет.","суб."],weekdaysMin:["не","по","ут","ср","че","пе","су"],longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){return["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",m:at.translate,mm:at.translate,h:at.translate,hh:at.translate,d:"дан",dd:at.translate,M:"месец",MM:at.translate,y:"годину",yy:at.translate},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),vt={words:{m:["jedan minut","jedne minute"],mm:["minut","minute","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mesec","meseca","meseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(n,t){return n===1?t[0]:n>=2&&n<=4?t[1]:t[2]},translate:function(n,t,i){var r=vt.words[i];return i.length===1?t?r[0]:r[1]:n+" "+vt.correctGrammaticalCase(n,r)}},itt=n.defineLocale("sr",{months:["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar"],monthsShort:["jan.","feb.","mar.","apr.","maj","jun","jul","avg.","sep.","okt.","nov.","dec."],weekdays:["nedelja","ponedeljak","utorak","sreda","četvrtak","petak","subota"],weekdaysShort:["ned.","pon.","uto.","sre.","čet.","pet.","sub."],weekdaysMin:["ne","po","ut","sr","če","pe","su"],longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",m:vt.translate,mm:vt.translate,h:vt.translate,hh:vt.translate,d:"dan",dd:vt.translate,M:"mesec",MM:vt.translate,y:"godinu",yy:vt.translate},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),rtt=n.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},ordinalParse:/\d{1,2}(e|a)/,ordinal:function(n){var t=n%10,i=~~(n%100/10)==1?"e":t===1?"a":t===2?"a":t===3?"e":"e";return n+i},week:{dow:1,doy:4}}),utt=n.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},ordinalParse:/\d{1,2}வது/,ordinal:function(n){return n+"வது"},meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(n){return n<2?" யாமம்":n<6?" வைகறை":n<10?" காலை":n<14?" நண்பகல்":n<18?" எற்பாடு":n<22?" மாலை":" யாமம்"},meridiemHour:function(n,t){return n===12&&(n=0),t==="யாமம்"?n<2?n:n+12:t==="வைகறை"||t==="காலை"?n:t==="நண்பகல்"?n>=10?n:n+12:n+12},week:{dow:0,doy:6}}),ftt=n.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"มกรา_กุมภา_มีนา_เมษา_พฤษภา_มิถุนา_กรกฎา_สิงหา_กันยา_ตุลา_พฤศจิกา_ธันวา".split("_"),weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),longDateFormat:{LT:"H นาฬิกา m นาที",LTS:"H นาฬิกา m นาที s วินาที",L:"YYYY/MM/DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H นาฬิกา m นาที",LLLL:"วันddddที่ D MMMM YYYY เวลา H นาฬิกา m นาที"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(n){return n==="หลังเที่ยง"},meridiem:function(n){return n<12?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}}),ett=n.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"[Ngayon sa] LT",nextDay:"[Bukas sa] LT",nextWeek:"dddd [sa] LT",lastDay:"[Kahapon sa] LT",lastWeek:"dddd [huling linggo] LT",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},ordinalParse:/\d{1,2}/,ordinal:function(n){return n},week:{dow:1,doy:4}}),ne={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"},ott=n.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[haftaya] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen hafta] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinalParse:/\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,ordinal:function(n){if(n===0)return n+"'ıncı";var t=n%10,i=n%100-t,r=n>=100?100:null;return n+(ne[t]||ne[i]||ne[r])},week:{dow:1,doy:7}}),stt=n.defineLocale("tzl",{months:"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),weekdaysShort:"Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),weekdaysMin:"Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),longDateFormat:{LT:"HH.mm",LTS:"LT.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY LT",LLLL:"dddd, [li] D. MMMM [dallas] YYYY LT"},meridiem:function(n,t,i){return n>11?i?"d'o":"D'O":i?"d'a":"D'A"},calendar:{sameDay:"[oxhi à] LT",nextDay:"[demà à] LT",nextWeek:"dddd [à] LT",lastDay:"[ieiri à] LT",lastWeek:"[sür el] dddd [lasteu à] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:rt,m:rt,mm:rt,h:rt,hh:rt,d:rt,dd:rt,M:rt,MM:rt,y:rt,yy:rt},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});kk=n.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}});dk=n.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}});var htt=n.defineLocale("uk",{months:nd,monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:td,weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:nr("[Сьогодні "),nextDay:nr("[Завтра "),lastDay:nr("[Вчора "),nextWeek:nr("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return nr("[Минулої] dddd [").call(this);case 1:case 2:case 4:return nr("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",m:gi,mm:gi,h:"годину",hh:gi,d:"день",dd:gi,M:"місяць",MM:gi,y:"рік",yy:gi},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(n){return/^(дня|вечора)$/.test(n)},meridiem:function(n){return n<4?"ночі":n<12?"ранку":n<17?"дня":"вечора"},ordinalParse:/\d{1,2}-(й|го)/,ordinal:function(n,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return n+"-й";case"D":return n+"-го";default:return n}},week:{dow:1,doy:7}}),ctt=n.defineLocale("uz",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}}),ltt=n.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần rồi lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},ordinalParse:/\d{1,2}/,ordinal:function(n){return n},week:{dow:1,doy:4}}),att=n.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah点mm分",LTS:"Ah点m分s秒",L:"YYYY-MM-DD",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日Ah点mm分",LLLL:"YYYY年MMMD日ddddAh点mm分",l:"YYYY-MM-DD",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日Ah点mm分",llll:"YYYY年MMMD日ddddAh点mm分"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(n,t){return n===12&&(n=0),t==="凌晨"||t==="早上"||t==="上午"?n:t==="下午"||t==="晚上"?n+12:n>=11?n:n+12},meridiem:function(n,t){var i=n*100+t;return i<600?"凌晨":i<900?"早上":i<1130?"上午":i<1230?"中午":i<1800?"下午":"晚上"},calendar:{sameDay:function(){return this.minutes()===0?"[今天]Ah[点整]":"[今天]LT"},nextDay:function(){return this.minutes()===0?"[明天]Ah[点整]":"[明天]LT"},lastDay:function(){return this.minutes()===0?"[昨天]Ah[点整]":"[昨天]LT"},nextWeek:function(){var i,t;return i=n().startOf("week"),t=this.unix()-i.unix()>=604800?"[下]":"[本]",this.minutes()===0?t+"dddAh点整":t+"dddAh点mm"},lastWeek:function(){var i,t;return i=n().startOf("week"),t=this.unix()<i.unix()?"[上]":"[本]",this.minutes()===0?t+"dddAh点整":t+"dddAh点mm"},sameElse:"LL"},ordinalParse:/\d{1,2}(日|月|周)/,ordinal:function(n,t){switch(t){case"d":case"D":case"DDD":return n+"日";case"M":return n+"月";case"w":case"W":return n+"周";default:return n}},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}}),vtt=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah點mm分",LTS:"Ah點m分s秒",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日Ah點mm分",LLLL:"YYYY年MMMD日ddddAh點mm分",l:"YYYY年MMMD日",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日Ah點mm分",llll:"YYYY年MMMD日ddddAh點mm分"},meridiemParse:/早上|上午|中午|下午|晚上/,meridiemHour:function(n,t){return(n===12&&(n=0),t==="早上"||t==="上午")?n:t==="中午"?n>=11?n:n+12:t==="下午"||t==="晚上"?n+12:void 0},meridiem:function(n,t){var i=n*100+t;return i<900?"早上":i<1130?"上午":i<1230?"中午":i<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},ordinalParse:/\d{1,2}(日|月|週)/,ordinal:function(n,t){switch(t){case"d":case"D":case"DDD":return n+"日";case"M":return n+"月";case"w":case"W":return n+"週";default:return n}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"一分鐘",mm:"%d分鐘",h:"一小時",hh:"%d小時",d:"一天",dd:"%d天",M:"一個月",MM:"%d個月",y:"一年",yy:"%d年"}}),bh=n;return bh.locale("en"),bh}),function(n){function t(r){if(i[r])return i[r].exports;var u=i[r]={i:r,l:!1,exports:{}};return n[r].call(u.exports,u,u.exports,t),u.l=!0,u.exports}var i={};return t.m=n,t.c=i,t.d=function(n,i,r){t.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:r})},t.n=function(n){var i=n&&n.__esModule?function(){return n["default"]}:function(){return n};return t.d(i,"a",i),i},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=0)}([function(n,t,i){"use strict";function s(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function r(n){return{controller:["SidebarJS",function(n){this.SidebarJS=n}],link:function(t,i,r,u){if(!u.SidebarJS.elemHasListener(i[0])){var f=r["sidebarjs"+(n.charAt(0).toUpperCase()+n.slice(1))];i[0].addEventListener("click",function(){return u.SidebarJS[n](f)});u.SidebarJS.elemHasListener(i[0],!0)}}}}var f=Object.assign||function(n){for(var i,r,t=1;t<arguments.length;t++){i=arguments[t];for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])}return n},e=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),o=i(1),u;i(3);u=function(){function n(t,i,r){s(this,n);this.$scope=t;this.SidebarJS=r;this.elem=i[0]}return n.$inject=["$scope","$element","SidebarJS"],e(n,[{key:"$onInit",value:function(){this.sidebarjsName=this.sidebarjsName||"";this.elem.setAttribute("sidebarjs",this.sidebarjsName)}},{key:"$postLink",value:function(){var i=this,n=this.sidebarjsConfig||{},t=this.onChangeVisibility||n.onChangeVisibility,r=f({},n,{component:this.elem,container:this.elem.children[0],backdrop:this.elem.children[1],onOpen:this.onOpen||n.onOpen,onClose:this.onClose||n.onClose,onChangeVisibility:function(n){t&&t({$event:n});i.$scope.$applyAsync()}});this.SidebarJS.create(r)}},{key:"$onDestroy",value:function(){this.SidebarJS.destroy(this.sidebarjsName)}}]),n}();angular.module("ngSidebarJS",[]).service("SidebarJS",o.SidebarService).component("sidebarjs",{template:"<div sidebarjs-container ng-transclude><\/div><div sidebarjs-backdrop><\/div>",transclude:!0,controller:u,bindings:{onOpen:"&?",onClose:"&?",onChangeVisibility:"&?",sidebarjsConfig:"<?",sidebarjsName:"@?"}}).directive("sidebarjsOpen",r.bind(null,"open")).directive("sidebarjsClose",r.bind(null,"close")).directive("sidebarjsToggle",r.bind(null,"toggle"))},function(n,t,i){n.exports=i(2)},function(n,t){(function(n,i){i(t)})(this,function(n){"use strict";function r(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n["default"]:n}function u(n,t){return t={exports:{}},n(t,t.exports),t.exports}var t=u(function(n,t){Object.defineProperty(t,"__esModule",{value:!0});var i="sidebarjs",f=i+"--is-visible",r=i+"--is-moving",u="left",e="right",o=[u,e],s=function(){function n(t){var u;t===void 0&&(t={});u=this;this.toggle=function(){u.isVisible()?u.close():u.open()};this.open=function(){u.component.classList.add(f);u.setBackdropOpacity(u.backdropOpacity)};this.close=function(){u.component.classList.remove(f);u.backdrop.removeAttribute("style")};this.__onTouchStart=function(n){u.initialTouch=n.touches[0].pageX};this.__onTouchMove=function(n){var t=Math.abs(u.initialTouch-n.touches[0].clientX),i=u.container.clientWidth-t;i<=u.container.clientWidth&&(u.touchMoveSidebar=t,u.moveSidebar(u.hasLeftPosition()?-t:t))};this.__onTouchEnd=function(){u.component.classList.remove(r);u.container.removeAttribute("style");u.backdrop.removeAttribute("style");u.touchMoveSidebar>u.container.clientWidth/3.5?u.close():u.open();u.initialTouch=null;u.touchMoveSidebar=null};this.__onSwipeOpenStart=function(n){if(!u.targetElementIsBackdrop(n)){var t=n.touches[0].clientX,i=u.hasLeftPosition()?t:document.body.clientWidth-t;i<u.documentSwipeRange&&u.__onTouchStart(n)}};this.__onSwipeOpenMove=function(n){if(!u.targetElementIsBackdrop(n)&&u.initialTouch&&!u.isVisible()){var i=n.touches[0].clientX-u.initialTouch,r=u.hasLeftPosition(),f=r?i:-i,t=u.container.clientWidth-f;t>0&&f>=u.documentMinSwipeX&&(u.openMovement=r?-t:t,u.moveSidebar(u.openMovement))}};this.__onSwipeOpenEnd=function(){u.openMovement&&(u.openMovement=null,u.__onTouchEnd())};this.__onTransitionEnd=function(){var n=u.isVisible();n&&!u.__wasVisible?(u.__wasVisible=!0,u.__emitOnOpen&&u.__emitOnOpen()):!n&&u.__wasVisible&&(u.__wasVisible=!1,u.__emitOnClose&&u.__emitOnClose());u.__emitOnChangeVisibility&&u.__emitOnChangeVisibility({isVisible:n})};var y=t.component,o=t.container,s=t.backdrop,h=t.documentMinSwipeX,p=h===void 0?10:h,c=t.documentSwipeRange,w=c===void 0?40:c,b=t.nativeSwipe,k=t.nativeSwipeOpen,l=t.position,d=l===void 0?"left":l,a=t.backdropOpacity,v=a===void 0?.3:a,g=t.onOpen,nt=t.onClose,tt=t.onChangeVisibility,e=o&&s;if(this.component=y||document.querySelector("["+i+"]"),this.container=e?o:n.create(i+"-container"),this.backdrop=e?s:n.create(i+"-backdrop"),this.documentMinSwipeX=p,this.documentSwipeRange=w,this.nativeSwipe=b!==!1,this.nativeSwipeOpen=k!==!1,this.backdropOpacity=v,this.backdropOpacityRatio=1/v,this.__emitOnOpen=g,this.__emitOnClose=nt,this.__emitOnChangeVisibility=tt,!e)try{this.transcludeContent()}catch(it){throw new Error("You must define an element with [sidebarjs] attribute");}this.nativeSwipe&&(this.addNativeGestures(),this.nativeSwipeOpen&&this.addNativeOpenGestures());this.setPosition(d);this.addAttrsEventsListeners(this.component.getAttribute(i));this.addTransitionListener();this.backdrop.addEventListener("click",this.close,{passive:!0})}return n.prototype.isVisible=function(){return this.component.classList.contains(f)},n.prototype.destroy=function(){var n=this;for(this.component.removeEventListener("touchstart",this.__onTouchStart,{passive:!0}),this.component.removeEventListener("touchmove",this.__onTouchMove,{passive:!0}),this.component.removeEventListener("touchend",this.__onTouchEnd,{passive:!0}),this.container.removeEventListener("transitionend",this.__onTransitionEnd,{passive:!0}),this.backdrop.removeEventListener("click",this.close,{passive:!0}),document.removeEventListener("touchstart",this.__onSwipeOpenStart,{passive:!0}),document.removeEventListener("touchmove",this.__onSwipeOpenMove,{passive:!0}),document.removeEventListener("touchend",this.__onSwipeOpenEnd,{passive:!0}),this.removeAttrsEventsListeners(this.component.getAttribute(i)),this.removeComponentClassPosition();this.container.firstElementChild;)this.component.appendChild(this.container.firstElementChild);this.component.removeChild(this.container);this.component.removeChild(this.backdrop);Object.keys(this).forEach(function(t){return n[t]=null})},n.prototype.setPosition=function(n){var t=this;this.component.classList.add(r);this.position=o.indexOf(n)>=0?n:u;this.removeComponentClassPosition();this.component.classList.add(i+"--"+(this.hasRightPosition()?e:u));setTimeout(function(){return t.component&&t.component.classList.remove(r)},200)},n.prototype.addAttrsEventsListeners=function(t){var i=this;this.forEachActionElement(t,function(t,r){n.elemHasListener(t)||(t.addEventListener("click",i[r],{passive:!0}),n.elemHasListener(t,!0))})},n.prototype.removeAttrsEventsListeners=function(t){var i=this;this.forEachActionElement(t,function(t,r){n.elemHasListener(t)&&(t.removeEventListener("click",i[r]),n.elemHasListener(t,!1))})},n.prototype.addTransitionListener=function(){this.__wasVisible=this.isVisible();this.container.addEventListener("transitionend",this.__onTransitionEnd,{passive:!0})},n.prototype.forEachActionElement=function(n,t){for(var f=["toggle","open","close"],e,u,r=0;r<f.length;r++)for(e=document.querySelectorAll("["+i+"-"+f[r]+'="'+n+'"]'),u=0;u<e.length;u++)t(e[u],f[r])},n.prototype.removeComponentClassPosition=function(){for(var n=0;n<o.length;n++)this.component.classList.remove(i+"--"+o[n])},n.prototype.hasLeftPosition=function(){return this.position===u},n.prototype.hasRightPosition=function(){return this.position===e},n.prototype.transcludeContent=function(){while(this.component.firstChild)this.container.appendChild(this.component.firstChild);while(this.component.firstChild)this.component.removeChild(this.component.firstChild);this.component.appendChild(this.container);this.component.appendChild(this.backdrop)},n.prototype.addNativeGestures=function(){this.component.addEventListener("touchstart",this.__onTouchStart,{passive:!0});this.component.addEventListener("touchmove",this.__onTouchMove,{passive:!0});this.component.addEventListener("touchend",this.__onTouchEnd,{passive:!0})},n.prototype.addNativeOpenGestures=function(){document.addEventListener("touchstart",this.__onSwipeOpenStart,{passive:!0});document.addEventListener("touchmove",this.__onSwipeOpenMove,{passive:!0});document.addEventListener("touchend",this.__onSwipeOpenEnd,{passive:!0})},n.prototype.moveSidebar=function(t){this.component.classList.add(r);n.vendorify(this.container,"transform","translate("+t+"px, 0)");this.updateBackdropOpacity(t)},n.prototype.updateBackdropOpacity=function(n){var t=1-Math.abs(n)/this.container.clientWidth,i=t/this.backdropOpacityRatio;this.setBackdropOpacity(i)},n.prototype.setBackdropOpacity=function(n){this.backdrop.style.opacity=n.toString()},n.prototype.targetElementIsBackdrop=function(n){return n.target.hasAttribute(i+"-backdrop")},n.create=function(n){var t=document.createElement("div");return t.setAttribute(n,""),t},n.vendorify=function(n,t,i){n.style["Webkit"+t.charAt(0).toUpperCase()+t.slice(1)]=i;n.style[t]=i},n.elemHasListener=function(n,t){return n&&typeof t=="boolean"?n.sidebarjsListener=t:!!n.sidebarjsListener},n}();t.SidebarElement=s}),e,i;r(t);e=t.SidebarElement;i=u(function(n,i){Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function n(){this.instances={}}return n.prototype.create=function(n){n===void 0&&(n={});var i=n.component&&n.component.getAttribute("sidebarjs")||"";return this.instances[i]=new t.SidebarElement(n),this.instances[i]},n.prototype.open=function(n){n===void 0&&(n="");this.instances[n]&&this.instances[n].open()},n.prototype.close=function(n){n===void 0&&(n="");this.instances[n]&&this.instances[n].close()},n.prototype.toggle=function(n){n===void 0&&(n="");this.instances[n]&&this.instances[n].toggle()},n.prototype.isVisible=function(n){return n===void 0&&(n=""),!!this.instances[n]&&this.instances[n].isVisible()},n.prototype.setPosition=function(n,t){t===void 0&&(t="");this.instances[t]&&this.instances[t].setPosition(n)},n.prototype.elemHasListener=function(n,i){return t.SidebarElement.elemHasListener(n,i)},n.prototype.destroy=function(n){n===void 0&&(n="");this.instances[n]&&(this.instances[n].destroy(),this.instances[n]=null,delete this.instances[n])},n}();i.SidebarService=r});r(i);var c=i.SidebarService,f=u(function(n,r){Object.defineProperty(r,"__esModule",{value:!0});r.SidebarElement=t.SidebarElement;r.SidebarService=i.SidebarService}),o=r(f),s=f.SidebarElement,h=f.SidebarService;n.default=o;n.SidebarElement=s;n.SidebarService=h;Object.defineProperty(n,"__esModule",{value:!0})})},function(){}]),function(){var r=angular.module("elif",[]),n="elif.conditionals",u=function(n){var i,r,t,u;if(!n||!n.length)return angular.element();if(i=n[0],r=n[n.length-1],i===r)return angular.element(i);t=i;u=[t];do{if(t=t.nextSibling,!t)break;u.push(t)}while(t!==r);return angular.element(u)},t,i;r.factory("elif",[function(){var t=function(t){if(angular.hasOwnProperty.call(t,n)){var i=t[n];return i[i.length-1]}};return{create:function(t,i,r){var u=[{fn:i,callback:r||angular.identity}],f=[];t.$watch(function(){var n,t=u.length;for(f.length=t,n=0;n<t;n++)if(f[n]=!!u[n].fn()){n++;break}for(;n<t;n++)f[n]=!1;return f},function(n){for(var i=-1,t=0,r=u.length;t<r;t++)n[t]?(u[t].callback(!0),i=t):u[t].callback(!1);u.fallthrough&&u.fallthrough(i===-1)},!0);angular.hasOwnProperty.call(t,n)||(t[n]=[]);t[n].push(u)},extend:function(n,i,r){var u=t(n);if(!u)throw new Error("elif.extend: no if found at this level");if(u.fallthrough)throw new Error("elif.extend: else-if after else");u.push({fn:i,callback:r})},fallthrough:function(n,i,r){var u=t(n);if(!u)throw new Error("elif.fallthrough: no if found at this level");if(u.fallthrough)throw new Error("elif.fallthrough: else already found at this level");u.fallthrough=r}}}]);t=function(n,t,i){r.directive(n,["$animate","$document","$injector","elif",function(r,f,e,o){var s=i&&e.invoke(i);return{transclude:"element",restrict:"A",priority:600,terminal:!0,link:function(i,e,h,c,l){var p=s&&s(i,e,h),a,y,v;o[t](i,p,function(t){t?a||(a=i.$new(),l(a,function(t){t[t.length+1]=f[0].createComment(" end "+n+": "+h[n]+" ");y=t;r.enter(t,e.parent(),e)})):(a&&(a.$destroy(),a=null),v&&(v.remove(),v=null),y&&(v=u(y),r.leave(v,function(){v=null}),y=null))})}}}])};i=function(n){return["$parse",function(t){return function(i,r,u){var f=t(u[n]);return function(){return!!f(i)}}}]};r.directive("ngIf",["$injector","elif",function(n,t){var r=n.invoke(i("ngIf"));return{priority:600,link:function(n,i,u){var f=r(n,i,u);t.create(n,f)}}}]);t("ngElseIf","extend",i("ngElseIf"));t("ngElif","extend",i("ngElif"));t("ngElse","fallthrough")}();!function(n){function t(r){if(i[r])return i[r].exports;var u=i[r]={i:r,l:!1,exports:{}};return n[r].call(u.exports,u,u.exports,t),u.l=!0,u.exports}var i={};t.m=n;t.c=i;t.i=function(n){return n};t.d=function(n,i,r){t.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:r})};t.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(i,"a",i),i};t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)};t.p="";t(t.s=17)}([function(n,t,i){"use strict";t.__esModule=!0;var u=i(1),r=i(2);t.KEYS={up:38,down:40,left:37,right:39,escape:27,enter:13};t.isValidMoment=function(n){return r.isMoment(n)&&n.isValid()};t.toValue=function(n,i,r){var u=n;return t.isValidMoment(n)||(u=t.toMoment(n,i,r)),t.momentToValue(u,i)};t.toMoment=function(n,i,u){var f=r(n,i,u);return t.isValidMoment(f)||(f=void 0),f};t.momentToValue=function(n,i){if(t.isValidMoment(n))return i?n.format(i):n.valueOf()};t.valueToMoment=function(n,t){var i,f;return n?((i=t.format?r(n,t.format,t.locale):r(n),t.model)&&(f=t.views.all.slice(0,t.views.all.indexOf(t.detectedMinView)),u.forEach(f,function(n){var r=t.views.precisions[n];i[r](t.model[r]())})),i):i};t.setValue=function(n,i,r,u){var f=t.isValidMoment(n)?n.clone():t.valueToMoment(n,i),e=t.momentToValue(f,i.format);i.model=t.updateMoment(i.model,f,i);r.$modelValue=t.updateMoment(r.$modelValue,f,i);u.ngModel!=u.momentPicker&&(i.value=e);u.ngModel&&(r.$setViewValue(e),r.$render())};t.updateMoment=function(n,i,r){if(t.isValidMoment(n)&&i){if(!n.isSame(i)){var f=r.views.all.slice(0,r.views.all.indexOf(r.detectedMaxView)+1);u.forEach(f,function(t){var u=r.views.precisions[t];n[u](i[u]())})}}else n=i;return n}},function(n){n.exports=angular},function(n){n.exports=moment},function(){},function(){},function(n,t,i){"use strict";var f,r,u;t.__esModule=!0;f=i(1);r=i(9);t.Provider=r.default;u=i(7);t.Directive=u.default;f.module("moment-picker",[]).provider("momentPicker",[function(){return new r.default}]).directive("momentPicker",["$timeout","$sce","$log","$window","momentPicker","$compile","$templateCache",function(n,t,i,r,f,e,o){return new u.default(n,t,i,r,f,e,o)}])},function(n){n.exports='<div class=moment-picker> <div class="moment-picker-container {{view.selected}}-view" ng-class="{\'moment-picker-disabled\': disabled, open: view.isOpen}"> <div ng-if=additions.top class="moment-picker-addition top"><\/div> <table class=header-view ng-if=showHeader> <thead> <tr> <th ng-class="{disabled: !view.previous.selectable}" ng-bind-html=view.previous.label ng-click=view.previous.set()><\/th> <th ng-bind=view.title ng-click=view.setParentView()><\/th> <th ng-class="{disabled: !view.next.selectable}" ng-bind-html=view.next.label ng-click=view.next.set()><\/th> <\/tr> <\/thead> <\/table> <div class=moment-picker-specific-views> <table> <thead ng-if=views[view.selected].headers> <tr> <th ng-repeat="header in views[view.selected].headers" ng-bind=header><\/th> <\/tr> <\/thead> <tbody> <tr ng-repeat="row in views[view.selected].rows"> <td ng-repeat="item in row track by item.index" ng-class=item.class ng-bind=item.label ng-click="!disabled && views[view.selected].set(item)"><\/td> <\/tr> <\/tbody> <\/table> <\/div> <div ng-if=additions.bottom class="moment-picker-addition bottom"><\/div> <\/div> <\/div>'},function(n,t,i){"use strict";t.__esModule=!0;var u=i(1),e=i(2),o=i(8),f=i(13),r=i(0),s=i(6),h=function(){function n(n,t,i,h,c,l,a){var v=this;this.$timeout=n;this.$sce=t;this.$log=i;this.$window=h;this.provider=c;this.$compile=l;this.$templateCache=a;this.restrict="A";this.require="?ngModel";this.transclude=!0;this.template=s;this.scope={value:"=?momentPicker",model:"=?ngModel",locale:"@?",format:"@?",minView:"@?",maxView:"@?",startView:"@?",minDate:"=?",maxDate:"=?",startDate:"=?",disabled:"=?disable",position:"@?",inline:"@?",validate:"=?",autoclose:"=?",setOnSelect:"=?",isOpen:"=?",today:"=?",keyboard:"=?",showHeader:"=?",additions:"=?",change:"&?",selectable:"&?"};this.link=function(n,t,i,s,h){h(function(h){u.forEach(["locale","format","minView","maxView","startView","position","inline","validate","autoclose","setOnSelect","today","keyboard","showHeader","leftArrow","rightArrow","additions"],function(t){u.isDefined(n[t])||(n[t]=v.provider[t]);u.isDefined(i[t])||(i[t]=n[t])});i.ngModel||(s={});n.limits={minDate:r.toMoment(n.minDate,n.format,n.locale),maxDate:r.toMoment(n.maxDate,n.format,n.locale),isAfterOrEqualMin:function(t,i){return!u.isDefined(n.limits.minDate)||t.isAfter(n.limits.minDate,i)||t.isSame(n.limits.minDate,i)},isBeforeOrEqualMax:function(t,i){return!u.isDefined(n.limits.maxDate)||t.isBefore(n.limits.maxDate,i)||t.isSame(n.limits.maxDate,i)},isSelectable:function(t,r){var f=!0;try{u.isFunction(n.selectable)&&i.selectable&&(f=n.selectable({date:t,type:r}))}catch(n){v.$log.error(n)}return n.limits.isAfterOrEqualMin(t,r)&&n.limits.isBeforeOrEqualMax(t,r)&&f},checkValue:function(){r.isValidMoment(s.$modelValue)&&n.validate&&(n.limits.isAfterOrEqualMin(s.$modelValue)||r.setValue(n.limits.minDate,n,s,i),n.limits.isBeforeOrEqualMax(s.$modelValue)||r.setValue(n.limits.maxDate,n,s,i))},checkView:function(){u.isDefined(n.view.moment)||(n.view.moment=e().locale(n.locale));n.limits.isAfterOrEqualMin(n.view.moment)||(n.view.moment=n.limits.minDate.clone());n.limits.isBeforeOrEqualMax(n.view.moment)||(n.view.moment=n.limits.maxDate.clone());n.view.update();n.view.render()}};n.views={all:["decade","year","month","day","hour","minute"],precisions:{decade:"year",year:"month",month:"date",day:"hour",hour:"minute",minute:"second"},formats:{decade:"Y{1,2}(?!Y)|YYYY|[Ll]{1,4}(?!T)",year:"M{1,4}(?![Mo])|Mo|Q",month:"[Dd]{1,4}(?![Ddo])|DDDo|[Dd]o|[Ww]{1,2}(?![Wwo])|[Ww]o|[Ee]|L{1,2}(?!T)|l{1,2}",day:"[Hh]{1,2}|LTS?",hour:"m{1,2}|[Ll]{3,4}|LT(?!S)",minute:"s{1,2}|S{1,}|X|LTS"},detectMinMax:function(){if(n.detectedMinView=n.detectedMaxView=void 0,n.format){var t,i;u.forEach(n.views.formats,function(r,f){var e=new RegExp("("+r+")(?![^[]*])","g");n.format.match(e)&&(u.isDefined(t)||(t=f),i=f)});t=u.isDefined(t)?Math.max(0,n.views.all.indexOf(t)):0;i=u.isDefined(i)?Math.min(n.views.all.length-1,n.views.all.indexOf(i)):n.views.all.length-1;t>n.views.all.indexOf(n.minView)&&(n.minView=n.views.all[t]);i<n.views.all.indexOf(n.maxView)&&(n.maxView=n.views.all[i]);n.detectedMinView=n.views.all[t];n.detectedMaxView=n.views.all[i]}},decade:new f.DecadeView(n,s,v.provider),year:new f.YearView(n,s,v.provider),month:new f.MonthView(n,s,v.provider),day:new f.DayView(n,s,v.provider),hour:new f.HourView(n,s,v.provider),minute:new f.MinuteView(n,s,v.provider)};n.view={moment:void 0,value:void 0,isOpen:!1,selected:n.startView,update:function(){n.view.value=r.momentToValue(n.view.moment,n.format)},toggle:function(){n.view.isOpen?n.view.close():n.view.open()},open:function(){n.disabled||n.view.isOpen||n.inline||(n.isOpen=!0,n.view.isOpen=!0,document.body.appendChild(n.picker[0]),n.view.position())},close:function(){n.view.isOpen&&!n.inline&&(n.isOpen=!1,n.view.isOpen=!1,n.view.selected=n.startView,n.picker[0].parentNode.removeChild(n.picker[0]))},position:function(){if(n.view.isOpen&&!n.position&&!n.inline){var u=t[0],f=n.picker.children()[0],e=n.picker.hasClass("top"),s=n.picker.hasClass("right"),i=o.getOffset(t[0]),h=i.top-v.$window.pageYOffset,p=i.left-v.$window.pageXOffset,w=v.$window.innerWidth,b=v.$window.innerHeight,r=h+v.$window.pageYOffset-f.offsetHeight>0&&h>b/2,c=p+f.offsetWidth>w,l=i.top+(r?0:u.offsetHeight)+"px",a=i.left+"px",y=u.offsetWidth+"px";!e&&r&&n.picker.addClass("top");e&&!r&&n.picker.removeClass("top");!s&&c&&n.picker.addClass("right");s&&!c&&n.picker.removeClass("right");n.picker.css("top")!==l&&n.picker.css("top",l);n.picker.css("left")!==a&&n.picker.css("left",a);n.picker.css("width")!==y&&n.picker.css("width",y)}},keydown:function(t){var f=n.views[n.view.selected],i=n.views.precisions[n.view.selected].replace("date","day"),e=v.provider[i+"sStep"]||1,o=[r.KEYS.up,r.KEYS.left].indexOf(t.keyCode)>=0?"subtract":"add",u=function(t){var u=t?f.perLine:1,r=n.view.moment.clone()[o](e*u,i);n.limits.isSelectable(r,i)&&(n.view.moment=r,n.view.update(),n.view.render())};switch(t.keyCode){case r.KEYS.up:case r.KEYS.down:t.preventDefault();n.view.isOpen?u(!0):n.view.open();break;case r.KEYS.left:case r.KEYS.right:if(!n.view.isOpen)break;t.preventDefault();u();break;case r.KEYS.enter:if(!n.view.isOpen)break;n.view.change(i);t.preventDefault();break;case r.KEYS.escape:n.view.toggle()}n.$evalAsync()},unit:function(){return"decade"==n.view.selected?10:1},precision:function(){return n.view.selected.replace("decade","year")},title:"",previous:{label:v.$sce.trustAsHtml(n.leftArrow),selectable:!0,set:function(){n.view.previous.selectable&&(n.view.moment.subtract(n.view.unit(),n.view.precision()),n.view.update(),n.view.render())}},next:{selectable:!0,label:v.$sce.trustAsHtml(n.rightArrow),set:function(){n.view.next.selectable&&(n.view.moment.add(n.view.unit(),n.view.precision()),n.view.update(),n.view.render())}},setParentView:function(){n.view.change(n.views.all[Math.max(0,n.views.all.indexOf(n.view.selected)-1)])},render:function(){var t=n.view.moment.clone().startOf(n.view.precision()).subtract(n.view.unit(),n.view.precision()),i=n.view.moment.clone().endOf(n.view.precision()).add(n.view.unit(),n.view.precision());n.view.previous.selectable=n.limits.isAfterOrEqualMin(t,n.view.precision());n.view.previous.label=v.$sce.trustAsHtml(n.view.previous.selectable?n.leftArrow:"&nbsp;");n.view.next.selectable=n.limits.isBeforeOrEqualMax(i,n.view.precision());n.view.next.label=v.$sce.trustAsHtml(n.view.next.selectable?n.rightArrow:"&nbsp;");n.view.title=n.views[n.view.selected].render()},change:function(t){var u=n.views.all.indexOf(t),e=n.views.all.indexOf(n.minView),o=n.views.all.indexOf(n.maxView),f=function(){r.setValue(n.view.moment,n,s,i);n.view.update();i.ngModel&&s.$commitViewValue()};n.setOnSelect&&f();u<0||u>o?(n.setOnSelect||f(),n.autoclose&&v.$timeout(n.view.close)):u>=e&&(n.view.selected=t)}};t.prepend(h);n.picker=u.element(t[0].querySelectorAll(".moment-picker"));n.container=u.element(n.picker[0].querySelectorAll(".moment-picker-container"));n.input="input"!=t[0].tagName.toLowerCase()&&t[0].querySelectorAll("input").length>0?u.element(t[0].querySelectorAll("input")):u.element(t[0]);n.input.addClass("moment-picker-input").attr("tabindex",0);(n.position||"").split(" ").forEach(function(t){return n.picker.addClass(t)});n.inline?(t.after(n.picker),n.picker.addClass("inline")):n.picker[0].parentNode.removeChild(n.picker[0]);v.$timeout(function(){u.forEach(n.additions||{},function(t,i){var r=u.element(n.container[0].querySelector(".moment-picker-addition."+i)),f=v.$templateCache.get(t),e=v.$compile(f)(n.$parent);r.append(e)})});n.views.detectMinMax();n.limits.checkView();v.$timeout(function(){i.ngModel?(!s.$modelValue&&n.value&&s.$setViewValue(n.value),s.$commitViewValue(),s.$render()):n.value&&(s.$modelValue=r.valueToMoment(n.value,n));n.startDate?n.view.moment=r.toMoment(n.startDate,n.format,n.locale):r.isValidMoment(s.$modelValue)&&(n.view.moment=s.$modelValue.clone());n.view.update();n.view.render()});i.ngModel&&(s.$parsers.push(function(t){return r.updateMoment(s.$modelValue,r.valueToMoment(t,n),n)||!0}),s.$formatters.push(function(t){return r.momentToValue(t,n.format)||""}),s.$viewChangeListeners.push(function(){i.ngModel!=i.momentPicker&&(n.value=s.$viewValue)}),s.$validators.minDate=function(t){return n.validate||!r.isValidMoment(t)||n.limits.isAfterOrEqualMin(t)},s.$validators.maxDate=function(t){return n.validate||!r.isValidMoment(t)||n.limits.isBeforeOrEqualMax(t)});i.ngModel!=i.momentPicker&&n.$watch("value",function(t,u){t!==u&&r.setValue(t,n,s,i)});n.$watch(function(){return r.momentToValue(s.$modelValue,n.format)},function(t,f){var o,h;t!=f&&(o=r.valueToMoment(t,n),(r.setValue(o,n,s,i),n.limits.checkValue(),n.view.moment=(o||e().locale(n.locale)).clone(),n.view.update(),n.view.render(),u.isFunction(n.change)&&i.change)&&(h=r.valueToMoment(f,n),n.$evalAsync(function(){return n.change({newValue:o,oldValue:h})})))});n.$watch(function(){return s.$modelValue&&s.$modelValue.valueOf()},function(){var t=(r.isValidMoment(s.$modelValue)?s.$modelValue:e().locale(n.locale)).clone();t.isSame(n.view.moment)||(n.view.moment=t,n.view.update(),n.view.render())});n.$watch("view.selected",function(){return n.view.render()});n.$watchGroup(["minView","maxView"],function(){n.views.detectMinMax();n.startView=n.views.all[Math.max(Math.min(n.views.all.indexOf(n.startView),n.views.all.indexOf(n.maxView)),n.views.all.indexOf(n.minView))];n.view.selected=n.startView});n.$watchGroup([function(){return r.toValue(n.minDate,n.format,n.locale)},function(){return r.toValue(n.maxDate,n.format,n.locale)}],function(){u.forEach(["minDate","maxDate"],function(t){n.limits[t]=r.toMoment(n[t],n.format,n.locale)});n.limits.checkValue();n.limits.checkView();n.view.render()});n.$watch(function(){return r.toValue(n.startDate,n.format,n.locale)},function(t,i){t!=i&&(n.view.moment=r.valueToMoment(t,n),n.view.update(),n.view.render())});i.$observe("locale",function(t){return n.locale=t});n.$watch("locale",function(t,f){u.isDefined(f)&&t!=f&&(r.isValidMoment(s.$modelValue)&&r.setValue(s.$modelValue.locale(t),n,s,i),r.isValidMoment(n.view.moment)&&(n.view.moment=n.view.moment.locale(t)),r.isValidMoment(n.limits.minDate)&&(n.limits.minDate=n.limits.minDate.locale(t)),r.isValidMoment(n.limits.maxDate)&&(n.limits.maxDate=n.limits.maxDate.locale(t)),n.view.render())});n.$watch("validate",n.limits.checkValue);n.$watch("isOpen",function(t){n.inline?n.view.isOpen=!0:u.isDefined(t)&&t!=n.view.isOpen&&n.view.toggle()});var c=function(t){t&&t.preventDefault();n.input[0].focus()};n.input.on("focus click touchstart",function(){return n.$evalAsync(n.view.open)}).on("blur",function(){return n.$evalAsync(n.view.close)}).on("keydown",function(t){n.keyboard&&n.view.keydown(t)});t.on("click touchstart",function(){return c()});n.container.on("mousedown",function(n){return c(n)});u.element(v.$window).on("resize scroll",n.view.position);n.$on("$destroy",function(){n.input.off("focus click touchstart blur keydown");t.off("click touchstart");n.container.off("mousedown");n.picker.remove();u.element(v.$window).off("resize scroll",n.view.position)})})}}return n}();t.default=h},function(n,t){"use strict";t.__esModule=!0;t.getOffset=function(n){var i,t;if(n){if(!n.getClientRects().length)return{top:0,left:0};if(i=function(n){return null!=n&&n===n.window},t=n.getBoundingClientRect(),!t.width&&!t.height)return t;var r=n.ownerDocument,u=function(n){return i(n)?n:9===n.nodeType&&n.defaultView}(r),f=r.documentElement;return{top:t.top+u.pageYOffset-f.clientTop,left:t.left+u.pageXOffset-f.clientLeft}}}},function(n,t,i){"use strict";t.__esModule=!0;var r=i(1),u=function(){function n(){this.settings={locale:"en",format:"L LTS",minView:"decade",maxView:"minute",startView:"year",inline:!1,validate:!0,autoclose:!0,setOnSelect:!1,today:!1,keyboard:!1,showHeader:!0,leftArrow:"&larr;",rightArrow:"&rarr;",yearsFormat:"YYYY",monthsFormat:"MMM",daysFormat:"D",hoursFormat:"HH:[00]",hoursStart:0,hoursEnd:23,minutesStep:5,minutesStart:0,minutesEnd:59,secondsFormat:"ss",secondsStep:1,secondsStart:0,secondsEnd:59}}return n.prototype.options=function(n){return r.extend(this.settings,n),r.copy(this.settings)},n.prototype.$get=function(){return this.settings},n}();t.default=u},function(n,t,i){"use strict";t.__esModule=!0;var r=i(0),u=function(){function n(n,t,i){this.$scope=n;this.$ctrl=t;this.provider=i;this.perLine=4;this.rows={}}return n.prototype.render=function(){var n=this.$scope.view.moment.clone().startOf("day").hour(this.provider.hoursStart),t,i,u;for(this.rows={},t=0;t<=this.provider.hoursEnd-this.provider.hoursStart;t++)i=Math.floor(t/this.perLine),u=this.$scope.limits.isSelectable(n,"hour"),this.rows[i]||(this.rows[i]=[]),this.rows[i].push({index:t,label:n.format(this.provider.hoursFormat),year:n.year(),month:n.month(),date:n.date(),hour:n.hour(),"class":[this.$scope.keyboard&&n.isSame(this.$scope.view.moment,"hour")?"highlighted":"",u?r.isValidMoment(this.$ctrl.$modelValue)&&n.isSame(this.$ctrl.$modelValue,"hour")?"selected":"":"disabled"].join(" ").trim(),selectable:u}),n.add(1,"hours");return this.$scope.view.moment.format("LL")},n.prototype.set=function(n){n.selectable&&(this.$scope.view.moment.year(n.year).month(n.month).date(n.date).hour(n.hour),this.$scope.view.update(),this.$scope.view.change("hour"))},n}();t.default=u},function(n,t,i){"use strict";t.__esModule=!0;var r=i(0),u=function(){function n(n,t,i){this.$scope=n;this.$ctrl=t;this.provider=i;this.perLine=4;this.rows={}}return n.prototype.render=function(){var n=this.$scope.view.moment.clone(),f=10*Math.floor(n.year()/10)-1,t,i,u;for(this.rows={},n.year(f),t=0;t<12;t++)i=Math.floor(t/this.perLine),u=this.$scope.limits.isSelectable(n,"year"),this.rows[i]||(this.rows[i]=[]),this.rows[i].push({index:n.year(),label:n.format(this.provider.yearsFormat),year:n.year(),"class":[this.$scope.keyboard&&n.isSame(this.$scope.view.moment,"year")?"highlighted":"",!u||[0,11].indexOf(t)>=0?"disabled":r.isValidMoment(this.$ctrl.$modelValue)&&n.isSame(this.$ctrl.$modelValue,"year")?"selected":""].join(" ").trim(),selectable:u}),n.add(1,"years");return[n.subtract(2,"years").format("YYYY"),n.subtract(9,"years").format("YYYY")].reverse().join(" - ")},n.prototype.set=function(n){n.selectable&&(this.$scope.view.moment.year(n.year),this.$scope.view.update(),this.$scope.view.change("year"))},n}();t.default=u},function(n,t,i){"use strict";t.__esModule=!0;var r=i(1),u=i(2),f=i(0),e=function(){function n(n,t,i){this.$scope=n;this.$ctrl=t;this.provider=i;this.perLine=4;this.rows={}}return n.prototype.render=function(){var e=0,n=this.$scope.view.moment.clone().startOf("hour").minute(this.provider.minutesStart),o=this.provider.minutesFormat||u.localeData(this.$scope.locale).longDateFormat("LT").replace(/[aA]/,"").trim(),i,t,r;for(this.rows={},i=0;i<=this.provider.minutesEnd-this.provider.minutesStart;i+=this.provider.minutesStep)t=Math.floor(e/this.perLine),r=this.$scope.limits.isSelectable(n,"minute"),this.rows[t]||(this.rows[t]=[]),this.rows[t].push({index:n.minute(),label:n.format(o),year:n.year(),month:n.month(),date:n.date(),hour:n.hour(),minute:n.minute(),"class":[this.$scope.keyboard&&n.isSame(this.$scope.view.moment,"minute")?"highlighted":"",r?f.isValidMoment(this.$ctrl.$modelValue)&&n.isSame(this.$ctrl.$modelValue,"minute")?"selected":"":"disabled"].join(" ").trim(),selectable:r}),e++,n.add(this.provider.minutesStep,"minutes");return this.$scope.keyboard&&this.highlightClosest(),this.$scope.view.moment.clone().startOf("hour").format("lll")},n.prototype.set=function(n){n.selectable&&(this.$scope.view.moment.year(n.year).month(n.month).date(n.date).hour(n.hour).minute(n.minute),this.$scope.view.update(),this.$scope.view.change("minute"))},n.prototype.highlightClosest=function(){var n,t=this,i=[];r.forEach(this.rows,function(n){r.forEach(n,function(n){Math.abs(n.minute-t.$scope.view.moment.minute())<t.provider.minutesStep&&i.push(n)})});(n=i.sort(function(n,i){return Math.abs(n.minute-t.$scope.view.moment.minute())>Math.abs(i.minute-t.$scope.view.moment.minute())?1:0})[0])&&n.minute-this.$scope.view.moment.minute()!=0&&(this.$scope.view.moment.year(n.year).month(n.month).date(n.date).hour(n.hour).minute(n.minute),this.$scope.view.update(),n.selectable&&(n.class=(n.class+" highlighted").trim()))},n}();t.default=e},function(n,t,i){"use strict";var r,u,f,e,o,s;t.__esModule=!0;r=i(11);t.DecadeView=r.default;u=i(16);t.YearView=u.default;f=i(15);t.MonthView=f.default;e=i(10);t.DayView=e.default;o=i(12);t.HourView=o.default;s=i(14);t.MinuteView=s.default},function(n,t,i){"use strict";t.__esModule=!0;var r=i(1),u=i(0),f=function(){function n(n,t,i){this.$scope=n;this.$ctrl=t;this.provider=i;this.perLine=6;this.rows={}}return n.prototype.render=function(){var f=0,n=this.$scope.view.moment.clone().startOf("minute").second(this.provider.secondsStart),i,t,r;for(this.rows={},i=0;i<=this.provider.secondsEnd-this.provider.secondsStart;i+=this.provider.secondsStep)t=Math.floor(f/this.perLine),r=this.$scope.limits.isSelectable(n,"second"),this.rows[t]||(this.rows[t]=[]),this.rows[t].push({index:n.second(),label:n.format(this.provider.secondsFormat),year:n.year(),month:n.month(),date:n.date(),hour:n.hour(),minute:n.minute(),second:n.second(),"class":[this.$scope.keyboard&&n.isSame(this.$scope.view.moment,"second")?"highlighted":"",r?u.isValidMoment(this.$ctrl.$modelValue)&&n.isSame(this.$ctrl.$modelValue,"second")?"selected":"":"disabled"].join(" ").trim(),selectable:r}),f++,n.add(this.provider.secondsStep,"seconds");return this.$scope.keyboard&&this.highlightClosest(),this.$scope.view.moment.clone().startOf("minute").format("lll")},n.prototype.set=function(n){n.selectable&&(this.$scope.view.moment.year(n.year).month(n.month).date(n.date).hour(n.hour).minute(n.minute).second(n.second),this.$scope.view.update(),this.$scope.view.change())},n.prototype.highlightClosest=function(){var n,t=this,i=[];r.forEach(this.rows,function(n){r.forEach(n,function(n){Math.abs(n.second-t.$scope.view.moment.second())<t.provider.secondsStep&&i.push(n)})});(n=i.sort(function(n,i){return Math.abs(n.second-t.$scope.view.moment.second())>Math.abs(i.second-t.$scope.view.moment.second())?1:0})[0])&&n.second-this.$scope.view.moment.second()!=0&&(this.$scope.view.moment.year(n.year).month(n.month).date(n.date).hour(n.hour).minute(n.minute).second(n.second),this.$scope.view.update(),n.selectable&&(n.class=(n.class+" highlighted").trim()))},n}();t.default=f},function(n,t,i){"use strict";t.__esModule=!0;var u=i(1),r=i(2),f=i(0),e=function(){function n(n,t,i){this.$scope=n;this.$ctrl=t;this.provider=i;this.perLine=r.weekdays().length;this.rows=[]}return n.prototype.render=function(){var t=this,s=this.$scope.view.moment.month(),n=this.$scope.view.moment.clone().startOf("month").startOf("week").hour(12),e={},o=n.week(),h=o+5,i;for(this.rows=[],i=o;i<=h;i++)e[i]=Array.apply(null,Array(this.perLine)).map(function(){var i=t.$scope.limits.isSelectable(n,"day"),r={index:n.date(),label:n.format(t.provider.daysFormat),year:n.year(),month:n.month(),date:n.date(),"class":[t.$scope.keyboard&&n.isSame(t.$scope.view.moment,"day")?"highlighted":"",t.$scope.today&&n.isSame(new Date,"day")?"today":"",i&&n.month()==s?f.isValidMoment(t.$ctrl.$modelValue)&&n.isSame(t.$ctrl.$modelValue,"day")?"selected":"":"disabled"].join(" ").trim(),selectable:i};return n.add(1,"days"),r});return u.forEach(e,function(n){return t.rows.push(n)}),this.headers=r.weekdays().map(function(n,i){return r().locale(t.$scope.locale).startOf("week").add(i,"day").format("dd")}),this.$scope.view.moment.format("MMMM YYYY")},n.prototype.set=function(n){n.selectable&&(this.$scope.view.moment.year(n.year).month(n.month).date(n.date),this.$scope.view.update(),this.$scope.view.change("day"))},n}();t.default=e},function(n,t,i){"use strict";t.__esModule=!0;var r=i(2),u=i(0),f=function(){function n(n,t,i){this.$scope=n;this.$ctrl=t;this.provider=i;this.perLine=4;this.rows={}}return n.prototype.render=function(){var n=this,t=this.$scope.view.moment.clone().startOf("year"),i=r.monthsShort();return this.rows={},i.forEach(function(i,r){var f=Math.floor(r/n.perLine),e=n.$scope.limits.isSelectable(t,"month");n.rows[f]||(n.rows[f]=[]);n.rows[f].push({index:t.month(),label:t.format(n.provider.monthsFormat),year:t.year(),month:t.month(),"class":[n.$scope.keyboard&&t.isSame(n.$scope.view.moment,"month")?"highlighted":"",e?u.isValidMoment(n.$ctrl.$modelValue)&&t.isSame(n.$ctrl.$modelValue,"month")?"selected":"":"disabled"].join(" ").trim(),selectable:e});t.add(1,"months")}),this.$scope.view.moment.format("YYYY")},n.prototype.set=function(n){n.selectable&&(this.$scope.view.moment.year(n.year).month(n.month),this.$scope.view.update(),this.$scope.view.change("month"))},n}();t.default=f},function(n,t,i){i(5);i(3);n.exports=i(4)}]);app=angular.module("Paperblanks",["paperblanksCtrls","infinite-scroll","wipImageZoom","ngSanitize","ngSidebarJS","elif","moment-picker"]);app.config(["$sceDelegateProvider",function(n){n.resourceUrlWhitelist(["self","**//www.youtube.com/embed/**"])}]);app.config(["$locationProvider",function(n){n.html5Mode({enabled:!0,requireBase:!1,rewriteLinks:!1})}]);app.config(["$httpProvider",function(n){n.defaults.headers.get||(n.defaults.headers.get={});n.defaults.headers.get["If-Modified-Since"]="Mon, 26 Jul 1997 05:00:00 GMT";n.defaults.headers.get["Cache-Control"]="no-cache";n.defaults.headers.get.Pragma="no-cache"}]);app.filter("unique",[function(){return function(n,t){var i=[],r=[];return angular.forEach(n,function(n){if(t==="FormatPageCount")var u=n.Format+n.PageCount;else u=n[t];r.indexOf(u)===-1&&(r.push(u),i.push(n))}),i}}]);app.filter("numkeys",[function(){return function(n){return Object.keys(n).length}}]);app.directive("ngClick",["$timeout",function(n){var t=500;return{restrict:"A",priority:-1,link:function(i,r){function f(i){u?(i.preventDefault(),i.stopImmediatePropagation()):(u=!0,n(function(){u=!1},t,!1))}var u=!1;i.$on("$destroy",function(){r.off("click",f)});r.on("click",f)}}}]);angular.module("core",[]);angular.module("core").filter("euro",function(){return function(n){return angular.isNumber(n)?n.toFixed(2).replace(".",",").toString():n}});paperblanksCtrls=angular.module("paperblanksCtrls",["core"]);paperblanksCtrls.controller("AccountManagementCtrl",["$rootScope","$scope","$http","$location",function(n,t,i,r){document.getElementById("divLoading").style.display="block";t.minDateString="1900-01-01";t.maxDateString="2010-01-01";t.data=[];t.data.Birthday="";t.data.accountDetails=[];t.editingPhoneNo=!1;t.editingPassword=!1;t.editingBirthday=!1;t.data.editingPhoneNo="";t.editType=0;t.base=[];t.base.addresses=[];t.base.editAddress=[];t.base.countryStates=[];t.base.selectedCountry=[];t.base.selectedState=[];t.base.selectedDeleteAddress=[];t.base.addressBookReady=!1;t.base.addOrEditAddress=!1;t.base.retailerInfo=[];t.base.retailerInfoEditCopy=[];t.base.retailerInfoValidation=[];t.retailerValidation=[];t.retailerValidation.invalidFinancialEmail="";t.retailerValidation.invalidPromoEmail="";t.init=function(){t.getAccountDetails();t.getCountryStates();t.getRetailerInfo()};t.getCountryStates=function(){i({method:"POST",url:r.path().substring(0,3)+"/Shop/GetAddressCountriesManage/",data:{}}).then(function(n){if(t.base.countryStates=n.data.CountryList,n.data.DefaultCountry!="??"){let i=!1;for(let r=0;r<n.data.CountryList.length;r++){if(n.data.CountryList[r].CountryCode==n.data.DefaultCountry){t.base.selectedCountry=n.data.CountryList[r];i=!0;break}i||(t.base.selectedCountry=n.data.CountryList[0])}}else t.base.selectedCountry=n.data.CountryList[0];t.base.selectedCountry.States&&(t.base.selectedState=t.base.selectedCountry.States[0])},function(n){console.log(n.statusText)})};t.openAddAddress=function(){t.addressValidation=[];t.base.editAddress=[];t.base.addOrEditAddress=!1;document.getElementById("editAddressBtn").click()};t.AddAddress=function(){document.getElementById("editAddressBtn").click();var n="";t.base.selectedState&&(n=t.base.selectedState.StateCode);i({method:"POST",url:r.path().substring(0,3)+"/Shop/EditUserAddress/",data:{Alias:t.base.editAddress.Alias,FirstName:t.base.editAddress.FirstName,LastName:t.base.editAddress.LastName,CompanyName:t.base.editAddress.CompanyName,Address1:t.base.editAddress.Address,Address2:t.base.editAddress.Address2,City:t.base.editAddress.City,StateCode:n,PostalCode:t.base.editAddress.PostalCode,CountryCode:t.base.selectedCountry.CountryCode,PhoneNo:t.base.editAddress.PhoneNumber,IdentificationNo:t.base.editAddress.IdentificationNo,AddressID:t.base.editAddress.AddressID}}).then(function(){t.getUserAddresses();t.editType=4;document.getElementById("responseBtn").click()},function(n){console.log(n.statusText)})};t.frontValidatePostal=function(){t.base.editAddress.PostalCode=t.base.editAddress.PostalCode.toUpperCase()};t.validateFirstName=function(){t.base.editAddress.FirstName&&(t.base.editAddress.FirstName=t.titleCase(t.base.editAddress.FirstName))};t.validateLastName=function(){t.base.editAddress.LastName&&(t.base.editAddress.LastName=t.titleCase(t.base.editAddress.LastName))};t.frontValidateCity=function(){t.base.editAddress.City&&(t.base.editAddress.City=t.titleCase(t.base.editAddress.City))};t.titleCase=function(n){for(var i=n.toLowerCase().split(" "),t=0;t<i.length;t++)i[t]=i[t].charAt(0).toUpperCase()+i[t].substring(1);return i.join(" ")};t.postAddAddress=function(){document.getElementById("editAddressBtn").click();var n="";t.base.selectedState&&(n=t.base.selectedState.StateCode);i({method:"POST",url:r.path().substring(0,3)+"/Shop/AddUserAddress/",data:{Alias:t.base.editAddress.Alias,FirstName:t.base.editAddress.FirstName,LastName:t.base.editAddress.LastName,CompanyName:t.base.editAddress.CompanyName,Address1:t.base.editAddress.Address,Address2:t.base.editAddress.Address2,City:t.base.editAddress.City,StateCode:n,PostalCode:t.base.editAddress.PostalCode,CountryCode:t.base.selectedCountry.CountryCode,PhoneNo:t.base.editAddress.PhoneNumber,IdentificationNo:t.base.editAddress.IdentificationNo,IsDefault:!1}}).then(function(){t.getUserAddresses();t.editType=5;document.getElementById("responseBtn").click()},function(n){console.log(n.statusText)})};t.postEditAddress=function(){document.getElementById("editAddressBtn").click();var n="";t.base.selectedState&&(n=t.base.selectedState.StateCode);i({method:"POST",url:r.path().substring(0,3)+"/Shop/EditUserAddress/",data:{Alias:t.base.editAddress.Alias,FirstName:t.base.editAddress.FirstName,LastName:t.base.editAddress.LastName,CompanyName:t.base.editAddress.Company,Address1:t.base.editAddress.Address,Address2:t.base.editAddress.Address2,City:t.base.editAddress.City,StateCode:n,PostalCode:t.base.editAddress.PostalCode,CountryCode:t.base.selectedCountry.CountryCode,PhoneNo:t.base.editAddress.PhoneNumber,IdentificationNo:t.base.editAddress.IdentificationNo,AddressID:t.base.editAddress.AddressID}}).then(function(){t.getUserAddresses();t.editType=4;document.getElementById("responseBtn").click()},function(n){console.log(n.statusText)})};t.closeEditAddress=function(){document.getElementById("editAddressBtn").click()};t.closeAddAddress=function(){document.getElementById("addAddressModalBtn").click()};t.editAddress=function(n){t.base.addOrEditAddress=!0;t.addressValidation=[];for(let i=0;i<t.base.addresses.length;i++)if(t.base.addresses[i].AddressID==n){t.base.editAddress=Object.assign({},t.base.addresses[i]);break}for(let n=0;n<t.base.countryStates.length;n++)if(t.base.countryStates[n].CountryCode==t.base.editAddress.CountryCode){t.base.selectedCountry=t.base.countryStates[n];for(let n=0;n<t.base.selectedCountry.States.length;n++)if(t.base.selectedCountry.States[n].StateCode==t.base.editAddress.StateCode){t.base.selectedState=t.base.selectedCountry.States[n];break}}document.getElementById("editAddressBtn").click()};t.saveEditAddress=function(){t.validateUserAddress()};t.deleteAddressModal=function(n){n&&(t.base.selectedDeleteAddress=n);document.getElementById("deleteModalBtn").click()};t.deleteAddress=function(){t.base.selectedDeleteAddress&&i({method:"POST",url:r.path().substring(0,3)+"/Account/DeleteAddress/",data:{AddressID:t.base.selectedDeleteAddress.AddressID}}).then(function(){t.getUserAddresses()})};t.validateUserAddress=function(){var n="";t.base.selectedState&&(n=t.base.selectedState.StateCode);i({method:"POST",url:r.path().substring(0,3)+"/Shop/ValidateAddress/",data:{Alias:t.base.editAddress.Alias,CustomerID:-1,FirstName:t.base.editAddress.FirstName,LastName:t.base.editAddress.LastName,Company:t.base.editAddress.CompanyName,Address:t.base.editAddress.Address,Address2:t.base.editAddress.Address2,City:t.base.editAddress.City,StateCode:n,PostalCode:t.base.editAddress.PostalCode,CountryCode:t.base.selectedCountry.CountryCode,PhoneNumber:t.base.editAddress.PhoneNumber,IdentificationNo:t.base.editAddress.IdentificationNo,Guest:!1,AddressID:t.base.editAddress.AddressID}}).then(function(n){t.addressValidation=[];n.data.Errors?t.fillAddressErrors(n):t.base.addOrEditAddress?t.postEditAddress():t.postAddAddress()},function(n){console.log(n.statusText)})};t.fillAddressErrors=function(n){for(let i=0;i<n.data.Errors.length;i++)n.data.Errors[i].Key==="Alias"&&(t.addressValidation.Alias=n.data.Errors[i].ErrorMsg),n.data.Errors[i].Key==="FirstName"?t.addressValidation.FirstName=n.data.Errors[i].ErrorMsg:n.data.Errors[i].Key==="LastName"?t.addressValidation.LastName=n.data.Errors[i].ErrorMsg:n.data.Errors[i].Key==="Address"?t.addressValidation.Address1=n.data.Errors[i].ErrorMsg:n.data.Errors[i].Key==="Address2"?t.addressValidation.Address2=n.data.Errors[i].ErrorMsg:n.data.Errors[i].Key==="City"?t.addressValidation.City=n.data.Errors[i].ErrorMsg:n.data.Errors[i].Key==="PostalCode"?t.addressValidation.PostalCode=n.data.Errors[i].ErrorMsg:n.data.Errors[i].Key==="PhoneNumber"?t.addressValidation.PhoneNo=n.data.Errors[i].ErrorMsg:n.data.Errors[i].Key==="Email"?t.addressValidation.Email=n.data.Errors[i].ErrorMsg:n.data.Errors[i].Key==="Alias"?t.addressValidation.Alias=n.data.Errors[i].ErrorMsg:n.data.Errors[i].Key==="Invalid_FinancialEmail"?t.retailerValidation.invalidFinancialEmail=n.data.Errors[i].ErrorMsg:n.data.Errors[i].Key==="Invalid_PromoEmail"&&(t.retailerValidation.invalidPromoEmail=n.data.Errors[i].ErrorMsg)};t.setDefaultAddress=function(n){n&&(t.enableSpinner(),i({method:"POST",url:r.path().substring(0,3)+"/account/SetDefaultAddress",data:{addressID:n}}).then(function(n){n.data&&t.getUserAddresses()},function(){}))};t.setDefaultAddressBilling=function(n){n&&(t.enableSpinner(),i({method:"POST",url:r.path().substring(0,3)+"/account/SetDefaultAddressBilling",data:{addressID:n}}).then(function(n){n.data&&t.getUserAddresses()},function(){}))};t.getUserAddresses=function(){t.enableSpinner();i({method:"POST",url:r.path().substring(0,3)+"/account/GetUserAddresses",data:{}}).then(function(n){t.base.addresses=n.data;t.disableSpinner();t.base.addressBookReady=!0},function(){})};t.openEditPassword=function(){t.editingPassword=t.editingPassword?!1:!0;t.data.oldPassword=t.data.accountDetails.HasPassword?"":"placeholder";t.data.newPassword="";t.data.confirmPassword=""};t.saveNewPassword=function(){document.getElementById("divLoading").style.display="block";t.resetErrors();i({method:"Post",url:r.path().substring(0,3)+"/Account/SetNewPassword/",data:{OldPassword:t.data.oldPassword,NewPassword:t.data.newPassword,ConfirmPassword:t.data.confirmPassword}}).then(function(n){document.getElementById("divLoading").style.display="none";n.data.Errors!=null?t.GenerateErrors(n.data.Errors):(t.openEditPassword(),t.editType=1,t.data.accountDetails.HasPassword=!0,document.getElementById("responseBtn").click())},function(n){document.getElementById("divLoading").style.display="none";console.log(n.statusText)})};t.resetErrors=function(){document.getElementById("ConfirmPasswordError").innerText="";document.getElementById("OldPasswordError").innerText="";document.getElementById("NewPasswordError").innerText=""};t.GenerateErrors=function(n){for(let i=0;i<n.length;i++){var t=n[i].Key+"Error";document.getElementById(t).innerText=n[i].ErrorMsg}};t.openEditPhoneNo=function(){t.editingPhoneNo=t.editingPhoneNo?!1:!0;t.data.accountDetails.PhoneNo!=null&&(t.data.editingPhoneNo=t.data.accountDetails.PhoneNo)};t.savePhoneNo=function(){t.enableSpinner();i({method:"Post",url:r.path().substring(0,3)+"/Account/SetAccountPhoneNo/",data:{phoneNo:t.data.editingPhoneNo}}).then(function(n){n.data!=!1?(t.data.accountDetails.PhoneNo=t.data.editingPhoneNo,t.editType=2):t.editType=3;document.getElementById("responseBtn").click();t.openEditPhoneNo();t.disableSpinner()},function(n){console.log(n.statusText);t.disableSpinner()})};t.getAccountDetails=function(){i({method:"Get",url:r.path().substring(0,3)+"/Account/GetAccountDetails/",data:{}}).then(function(n){n.data!=!1&&(t.data.accountDetails=n.data,t.data.Birthday=moment(new Date(n.data.BirthdayVal)));document.getElementById("divLoading").style.display="none";t.getUserAddresses()},function(n){console.log(n.statusText)})};t.openBirthday=function(){t.editingBirthday=!0};t.closeBirthday=function(){t.editingBirthday=!1};t.saveBirthday=function(){i({method:"Post",url:r.path().substring(0,3)+"/Account/SetBirthday/",data:{birthday:t.data.Birthday}}).then(function(n){n.data.Success!=!1?(t.data.accountDetails.BirthdayStr=n.data.BirthdayStr,t.editingBirthday=!1,t.editType=6):t.editType=7;document.getElementById("responseBtn").click()},function(n){console.log(n.statusText)})};t.getRetailerInfo=function(){i({method:"Post",url:r.path().substring(0,3)+"/Account/GetRetailerInfo/",data:{}}).then(function(n){t.base.retailerInfo=n.data;console.log(t.base.retailerInfo)},function(n){console.log(n.statusText)})};t.validateRetailerInfo=function(){t.enableSpinner();t.retailerValidation=[];i({method:"POST",url:r.path().substring(0,3)+"/Account/ValidateRetailerInfo",data:{FinancialEmail:t.base.retailerInfoEditCopy.FinancialEmail,PromotionalEmail:t.base.retailerInfoEditCopy.PromotionalEmail}}).then(function(n){t.base.retailerInfoValidation=n.data;t.base.retailerInfoValidation.Errors.length==0?t.saveRetailerInfo():(t.fillAddressErrors(n),t.disableSpinner())},function(n){console.log(n.statusText)})};t.saveRetailerInfo=function(){i({method:"POST",url:r.path().substring(0,3)+"/Account/saveRetailerInfo",data:{FinancialEmail:t.base.retailerInfoEditCopy.FinancialEmail,PromoEmail:t.base.retailerInfoEditCopy.PromoEmail,BusinessWebsiteURL:t.base.retailerInfoEditCopy.BusinessWebsiteURL,FacebookURL:t.base.retailerInfoEditCopy.FacebookURL,InstagramURL:t.base.retailerInfoEditCopy.InstagramURL}}).then(function(n){t.disableSpinner();n.data.Success&&(alert(n.data.Message),location.reload())},function(n){console.log(n.statusText);t.disableSpinner()})};t.beginEditingRetailerInfo=function(){t.base.retailerInfoEditCopy=Object.assign({},t.base.retailerInfo)};t.enableSpinner=function(){document.getElementById("divLoading").style.display="block"};t.disableSpinner=function(){document.getElementById("divLoading").style.display="none"}}]);paperblanksCtrls.controller("CatalogCtrl",["$rootScope","$scope","$http","$location",function(n,t,i,r){var u=window.location.pathname.split("/");t.selectedSeries=u[4]===undefined||u[4]===""?"all":u[4].replace("series-","");t.selectedSize=u[5]===undefined||u[5]===""?"all":u[5].replace("size-","");t.selectedInterior=u[6]===undefined||u[6]===""?"all":u[6].replace("interior-","");t.selectedTheme=u[7]===undefined||u[7]===""?"all":u[7].replace("theme-","");t.lang=u[1]===undefined||u[1]===""?"en":u[1];t.category=u[3]===undefined||u[3]===""?"n/a":u[3];t.newProductCategory=u[10]===undefined||u[10]===""?t.category:u[10].replace("ac-","");t.sort=u[8]===undefined||u[8]===""?"desc":u[8].replace("sort-","");t.selectedDPLang=u[9]===undefined||u[9]===""?"all":u[9].replace("dplang-","");t.stockRoute=0;t.products=[];t.page=1;t.totalPages=1;t.totalRecords=0;t.productsReady=!1;t.busy=!1;t.filters=[];t.edgePrinting=!1;t.closureCheckList=[];t.selectedClosures=[];t.colourCheckList=[];t.selectedColours=[];t.pageCheckList=[];t.selectedPageCount=[];t.gsmCheckList=[];t.selectedGSM=[];t.firstLoad=!0;t.jumpedToItem=!1;t.AllText="All";t.firstLoadReady=!1;t.activeVideo=!1;t.changedProductCategory=!1;t.base=[];t.base.instockCheck=!0;t.base.outOfStockCheck=!0;t.stockRoute=u[11]===undefined||u[11]===""?"all":u[11].replace("stock-","");t.stockRoute=="all"?(t.base.instockCheck=!0,t.base.outOfStockCheck=!0):t.stockRoute=="in"?(t.base.instockCheck=!0,t.base.outOfStockCheck=!1):t.stockRoute=="out"&&(t.base.instockCheck=!1,t.base.outOfStockCheck=!0);t.changeStockFilter=function(){t.base.instockCheck==!1&&t.base.outOfStockCheck==!1&&(t.base.instockCheck=!0,t.base.outOfStockCheck=!0);t.filterProducts("stock");t.products=[];t.busy=!1;t.page=1};t.$watch(function(){return r.search()},function(n,i){n!==i&&t.$apply(function(){u=window.location.pathname.split("/");t.selectedSeries=u[4]===undefined||u[4]===""?"all":u[4].replace("series-","");t.selectedSize=u[5]===undefined||u[5]===""?"all":u[5].replace("size-","");t.selectedInterior=u[6]===undefined||u[6]===""?"all":u[6].replace("interior-","");t.selectedTheme=u[7]===undefined||u[7]===""?"all":u[7].replace("theme-","");t.sort=u[8]===undefined||u[8]===""?"desc":u[8].replace("sort-","");t.selectedDPLang=u[9]===undefined||u[9]===""?"all":u[9].replace("dplang-","");t.newProductCategory=u[10]===undefined||u[10]===""?t.category:u[10].replace("ac-","");t.stockRoute=u[11]===undefined||u[11]==="all"?t.category:u[11].replace("stock-","");t.stockRoute=="all"?(t.base.outOfStockCheck=!0,t.base.instockCheck=!0):t.stockRoute=="in"?(t.base.outOfStockCheck=!0,t.base.instockCheck=!1):t.stockRoute=="out"&&(t.base.outOfStockCheck=!1,t.base.instockCheck=!0);t.setSelected();t.filterProducts()})});t.init=function(){t.getFilters();var n=sessionStorage.getItem("historyLength");n!=window.history.length&&(sessionStorage.setItem("page",null),sessionStorage.setItem("lastProductID",null))};t.toggleVideo=function(){t.activeVideo=!0};t.setSelected=function(){$("#series").text($("#"+t.selectedSeries).text()).val(t.selectedSeries);$(".series-dropdown a").removeClass("active");$(".series-dropdown #"+t.selectedSeries).addClass("active");$("#size").text($("#"+t.selectedSize).text()).val(t.selectedSize);$(".size-dropdown a").removeClass("active");$(".size-dropdown #"+t.selectedSize).addClass("active");$("#interior").text($("#"+t.selectedInterior).text()).val(t.selectedInterior);$(".interior-dropdown a").removeClass("active");$(".interior-dropdown #"+t.selectedInterior).addClass("active");$("#theme").text($("#"+t.selectedTheme).text()).val(t.selectedTheme);$(".theme-dropdown a").removeClass("active");$(".theme-dropdown #"+t.selectedTheme).addClass("active");$("#sortBy").text($("#"+t.sort).text()).val(t.sort);$(".sortBy-dropdown a").removeClass("active");$(".sortBy-dropdown #"+t.sort).addClass("active");$("#dpLang").text($("#"+t.selectedDPLang).text()).val(t.selectedDPLang);$(".dpLang-dropdown a").removeClass("active");$(".dpLang-dropdown #"+t.selectedDPLang).addClass("active");(t.newProductCategory.includes("all")||t.newProductCategory.includes("seasonal")||t.newProductCategory.includes("cpp"))&&(t.newProductCategory="new");$("#categories").text($("#"+t.newProductCategory).text()).val(t.newProductCategory);$(".categories-dropdown a").removeClass("active");$(".categories-dropdown #"+t.newProductCategory).addClass("active")};t.enableSpinner=function(){document.getElementById("divLoading").style.display="block"};t.disableSpinner=function(){document.getElementById("divLoading").style.display="none"};t.getProducts=function(){t.busy||(t.busy=!0,(t.page<=t.totalPages||t.products.length===0)&&(t.enableSpinner(),i({method:"GET",url:r.path().substring(0,3)+"/Catalog/CatalogAjaxHandler/"+t.category+"/"+t.page,params:{series:t.selectedSeries,format:t.selectedSize,interior:t.selectedInterior,theme:t.selectedTheme,closures:t.selectedClosures,colours:t.selectedColours,gsm:t.selectedGSM,pageCount:t.selectedPageCount,dPLang:t.selectedDPLang,newProductCategory:t.newProductCategory,edgePrinting:t.edgePrinting,inStock:t.base.instockCheck,outofStock:t.base.outOfStockCheck,sort:t.sort}}).then(function(n){t.productsReady=!0;t.page===1&&(t.totalPages=n.data.TotalPages,t.totalRecords=n.data.TotalRecords);t.firstLoad===!0&&(t.setSelected(),t.firstLoad=!1,t.AllText=document.getElementById("all").innerText);t.products=t.products.concat(n.data.Products);t.page++;t.busy=!1;t.jumpedToItem===!1&&sessionStorage.getItem("page")!==null&&(parseInt(sessionStorage.getItem("page"))>parseInt(t.page)?t.getProducts():setTimeout(function(){t.$apply(function(){var i=sessionStorage.getItem("lastProductID"),n=document.getElementById(i);n!==null&&(n.scrollIntoView(),t.jumpedToItem=!0)})},50));t.disableSpinner()},function(n){t.disableSpinner();console.log(n.statusText);t.busy=!1})))};t.clearFilters=function(){t.closureCheckList=[];t.selectedClosures=[];t.colourCheckList=[];t.selectedColours=[];t.pageCheckList=[];t.selectedPageCount=[];t.gsmCheckList=[];t.selectedGSM=[];t.selectedSeries="all";t.selectedSize="all";t.selectedInterior="all";t.selectedTheme="all";t.selectedDPLang="all";t.edgePrinting=!1;t.getFilters()};t.getFilters=function(){i({method:"POST",url:r.path().substring(0,3)+"/Catalog/GetFiltersAjax/"+t.category,data:{seriesSlug:t.selectedSeries?t.selectedSeries:"all",formatSlug:t.selectedSize?t.selectedSize:"all",interiorSlug:t.selectedInterior?t.selectedInterior:"all",themeSlug:t.selectedTheme?t.selectedTheme:"all",dpLangSlug:t.selectedDPLang?t.selectedDPLang:"all",newProductCategory:t.category=="new"||t.category.includes("all")||t.category.includes("seasonal")||t.category.includes("cpp")?t.newProductCategory:""}}).then(function(n){t.filters=n.data;t.applyValidFilters();t.loadPreviousFilters()},function(n){console.log(n.statusText)})};t.applyValidFilters=function(){var u=!1,f,e,o,s,i,n;for(let n=0;n<t.filters.Formats.length;n++)if(t.filters.Formats[n].Slug==t.selectedSize){u=!0;break}u||(t.selectedSize="all");u=!1;for(let n=0;n<t.filters.Interiors.length;n++)if(t.filters.Interiors[n].Slug==t.selectedInterior){u=!0;break}u||(t.selectedInterior="all");u=!1;for(let n=0;n<t.filters.Themes.length;n++)if(t.filters.Themes[n].Slug==t.selectedTheme){u=!0;break}u||(t.selectedTheme="all");u=!1;for(let n=0;n<t.filters.DPLanguages.length;n++)if(t.filters.DPLanguages[n].Slug==t.selectedDPLang){u=!0;break}u||(t.selectedDPLang="all");t.colourCheckList=[];t.removeIndex=[];for(let n=0;n<t.selectedColours.length;n++){f=!1;for(let i=0;i<t.filters.Colours.length;i++)if(t.filters.Colours[i]==t.selectedColours[n]){f=!0;break}f?t.colourCheckList[t.selectedColours[n]]=!0:t.removeIndex.push(t.selectedColours[n])}for(let n=0;n<t.removeIndex.length;n++)i=t.selectedColours.indexOf(t.removeIndex[n]),i!==-1&&t.selectedColours.splice(i,1);t.gsmCheckList=[];t.removeIndex=[];for(let n=0;n<t.selectedGSM.length;n++){e=!1;for(let i=0;i<t.filters.GSM.length;i++)if(t.filters.GSM[i]==t.selectedGSM[n]){e=!0;break}e?t.gsmCheckList[t.selectedGSM[n]]=!0:t.removeIndex.push(t.selectedGSM[n])}for(let n=0;n<t.removeIndex.length;n++)i=t.selectedGSM.indexOf(t.removeIndex[n]),i!==-1&&t.selectedGSM.splice(i,1);t.pageCheckList=[];t.removeIndex=[];for(let n=0;n<t.selectedPageCount.length;n++){o=!1;for(let i=0;i<t.filters.PageCount.length;i++)if(t.filters.PageCount[i]==t.selectedPageCount[n]){o=!0;break}o?t.pageCheckList[t.selectedPageCount[n]]=!0:t.removeIndex.push(t.selectedPageCount[n])}for(let n=0;n<t.removeIndex.length;n++)i=t.selectedPageCount.indexOf(t.removeIndex[n]),i!==-1&&t.selectedPageCount.splice(i,1);t.closureCheckList=[];t.removeIndex=[];for(let n=0;n<t.selectedClosures.length;n++){s=!1;for(let i=0;i<t.filters.Closures.length;i++)if(t.filters.Closures[i]==t.selectedClosures[n]){s=!0;break}s?t.closureCheckList[t.selectedClosures[n]]=!0:t.removeIndex.push(t.selectedClosures[n])}for(let n=0;n<t.removeIndex.length;n++)i=t.selectedClosures.indexOf(t.removeIndex[n]),i!==-1&&t.selectedClosures.splice(i,1);n=t.lang+"/catalog/"+t.category+"/";let h="all";t.base.instockCheck==!0&&t.base.outOfStockCheck==!1?h="in":t.base.instockCheck==!1&&t.base.outOfStockCheck==!0&&(h="out");t.base.instockCheck!=!0||t.base.outOfStockCheck!=!0?n=n+"series-"+t.selectedSeries+"/size-"+t.selectedSize+"/interior-"+t.selectedInterior+"/theme-"+t.selectedTheme+"/sort-"+t.sort+"/dplang-"+t.selectedDPLang+"/ac-"+t.newProductCategory+"/stock-"+h:t.newProductCategory!==t.category?n=n+"series-"+t.selectedSeries+"/size-"+t.selectedSize+"/interior-"+t.selectedInterior+"/theme-"+t.selectedTheme+"/sort-"+t.sort+"/dplang-"+t.selectedDPLang+"/ac-"+t.newProductCategory:t.selectedDPLang!=="all"?n=n+"series-"+t.selectedSeries+"/size-"+t.selectedSize+"/interior-"+t.selectedInterior+"/theme-"+t.selectedTheme+"/sort-"+t.sort+"/dplang-"+t.selectedDPLang:t.sort!=="desc"?n=n+"series-"+t.selectedSeries+"/size-"+t.selectedSize+"/interior-"+t.selectedInterior+"/theme-"+t.selectedTheme+"/sort-"+t.sort+"/":t.selectedTheme!=="all"?n=n+"series-"+t.selectedSeries+"/size-"+t.selectedSize+"/interior-"+t.selectedInterior+"/theme-"+t.selectedTheme+"/":t.selectedInterior!=="all"?n=n+"series-"+t.selectedSeries+"/size-"+t.selectedSize+"/interior-"+t.selectedInterior+"/":t.selectedSize!=="all"?n=n+"series-"+t.selectedSeries+"/size-"+t.selectedSize+"/":t.selectedSeries!=="all"&&(n=n+"series-"+t.selectedSeries+"/");r.path(n)};t.loadPreviousFilters=function(){setTimeout(function(){u=window.location.pathname.split("/");t.selectedSeries=u[4]===undefined||u[4]===""?"all":u[4].replace("series-","");t.selectedSize=u[5]===undefined||u[5]===""?"all":u[5].replace("size-","");t.selectedInterior=u[6]===undefined||u[6]===""?"all":u[6].replace("interior-","");t.selectedTheme=u[7]===undefined||u[7]===""?"all":u[7].replace("theme-","");t.sort=u[8]===undefined||u[8]===""?"desc":u[8].replace("sort-","");t.selectedDPLang=u[9]===undefined||u[9]===""?"all":u[9].replace("dplang-","");t.stockRoute=u[11]===undefined||u[11]==="all"?t.category:u[11].replace("stock-","");t.stockRoute=="all"?(t.base.instockCheck=!0,t.base.outOfStockCheck=!0):t.stockRoute=="in"?(t.base.instockCheck=!0,t.base.outOfStockCheck=!1):t.stockRoute=="out"&&(t.base.instockCheck=!1,t.base.outOfStockCheck=!0);t.setSelected();t.filterProducts()},100)};t.filterProducts=function(n,i,u,f){var o,e;if(n){f&&f.preventDefault();o=t.lang+"/catalog/"+t.category+"/";u==="All"&&(u=t.AllText);switch(n){case"categories":$("#categories").text(u).val(i);$(".categories-dropdown a").removeClass("active");$(".categories-dropdown #"+i).addClass("active");t.newProductCategory=i;t.changedProductCategory=!0;break;case"series":$("#series").text(u).val(i);$(".series-dropdown a").removeClass("active");$(".series-dropdown #"+i).addClass("active");t.selectedSeries=i;break;case"size":$("#size").text(u).val(i);$(".size-dropdown a").removeClass("active");$(".size-dropdown #"+i).addClass("active");t.selectedSize=i;break;case"interior":$("#interior").text(u).val(i);$(".interior-dropdown a").removeClass("active");$(".interior-dropdown #"+i).addClass("active");t.selectedInterior=i;break;case"theme":$("#theme").text(u).val(i);$(".theme-dropdown a").removeClass("active");$(".theme-dropdown #"+i).addClass("active");t.selectedTheme=i;break;case"dpLang":$("#dpLang").text(u).val(i);$(".dpLang-dropdown a").removeClass("active");$(".dpLang-dropdown #"+i).addClass("active");t.selectedDPLang=i;break;case"sortBy":$("#sortBy").text(u).val(i);$(".sortBy-dropdown a").removeClass("active");$(".sortBy-dropdown #"+i).addClass("active");t.sort=i;break;case"edgePrinting":t.edgePrinting=i}let s=0;t.base.instockCheck==!0&&t.base.outOfStockCheck==!1?s=1:t.base.instockCheck==!1&&t.base.outOfStockCheck==!0&&(s=2);e=o;t.base.instockCheck!=!0||t.base.outOfStockCheck!=!0?e=e+"series-"+t.selectedSeries+"/size-"+t.selectedSize+"/interior-"+t.selectedInterior+"/theme-"+t.selectedTheme+"/sort-"+t.sort+"/dplang-"+t.selectedDPLang+"/ac-"+t.newProductCategory+"/stock-"+s:t.newProductCategory!==t.category?e=e+"series-"+t.selectedSeries+"/size-"+t.selectedSize+"/interior-"+t.selectedInterior+"/theme-"+t.selectedTheme+"/sort-"+t.sort+"/dplang-"+t.selectedDPLang+"/ac-"+t.newProductCategory+"/":t.selectedDPLang!=="all"?e=e+"series-"+t.selectedSeries+"/size-"+t.selectedSize+"/interior-"+t.selectedInterior+"/theme-"+t.selectedTheme+"/sort-"+t.sort+"/dplang-"+t.selectedDPLang:t.sort!=="desc"?e=e+"series-"+t.selectedSeries+"/size-"+t.selectedSize+"/interior-"+t.selectedInterior+"/theme-"+t.selectedTheme+"/sort-"+t.sort+"/":t.selectedTheme!=="all"?e=e+"series-"+t.selectedSeries+"/size-"+t.selectedSize+"/interior-"+t.selectedInterior+"/theme-"+t.selectedTheme+"/":t.selectedInterior!=="all"?e=e+"series-"+t.selectedSeries+"/size-"+t.selectedSize+"/interior-"+t.selectedInterior+"/":t.selectedSize!=="all"?e=e+"series-"+t.selectedSeries+"/size-"+t.selectedSize+"/":t.selectedSeries!=="all"&&(e=e+"series-"+t.selectedSeries+"/");r.path(e);t.changedProductCategory?(t.clearFilters(),t.changedProductCategory=!1):t.getFilters()}t.products=[];t.busy=!1;t.page=1;n||t.getProducts()};t.filterCheckList=function(n,i){var r=[];Object.keys(i).map(function(n){i[n]===!0&&r.push(n)});switch(n){case"colour":t.selectedColours=r;break;case"page":t.selectedPageCount=r;break;case"gsm":t.selectedGSM=r;break;case"closure":t.selectedClosures=r}t.filterProducts()};t.saveScrollPosition=function(n){sessionStorage.setItem("page",t.page);sessionStorage.setItem("lastProductID",n);sessionStorage.setItem("lastCatalog",t.category)}}]);paperblanksCtrls.controller("FeatureVideoCtrl",["$rootScope","$scope","$http","$location",function(n,t){t.activeVideo=!1;t.init=function(){};t.toggleVideo=function(){t.activeVideo=!0}}]);paperblanksCtrls.controller("EcomCheckoutCtrl",["$rootScope","$scope","$q","$http","$location",function(n,t,i,r,u){t.cartItemsReady=!1;t.base=[];t.base.initData=!1;t.base.initTotal=!1;t.base.isGuest=!0;t.base.username="";t.base.userEditingAddress=!1;t.base.userNewAddress=!1;t.base.userAddresses=[];t.base.selectedUserAddress=[];t.base.selectedUserAddressBilling=[];t.base.userHasNoAddresses=!1;t.base.language=u.path().substring(0,3);t.base.orderNote="";t.base.subscribeToNews=!0;t.base.countryCode="";t.base.forceFillAddress=!1;t.base.usedPromoID=0;t.base.usedVoucherID=0;t.base.promoCode="";t.base.applyPromoResponse="";t.base.promoValid=!1;t.base.giftCardCode="";t.base.applyGCResponse="";t.base.usedGiftCardCode="";t.spinner=!1;t.base.stepOn=0;t.stepCompleted=[];t.input=[];t.input.contactInfo=[];t.input.address=[];t.input.address.Alias="";t.input.address.IsUnit=!1;t.input.address.UnitTypeID=1;t.input.addressCopy=[];t.input.selectedStateCopy="";t.input.selectedCountryCopy="";t.input.billingAddress=[];t.contactValidation=[];t.addressValidation=[];t.base.countryStates=[];t.base.selectedCountry=[];t.base.selectedState=[];t.base.selectedCountryBilling=[];t.base.selectedStateBilling=[];t.shippingMethods=[];t.allShippingMethods=[];t.selectedShippingMethod="";t.selectedCarrier="";t.shippingError=!1;t.shippingMethodChanged=!1;t.countryCodeShipping="";t.base.cartItems=[];t.base.AdjustedItems=[];t.base.cartWeight=0;t.base.cartWidth=0;t.base.cartLength=0;t.base.cartHeight=0;t.base.useOfferFirstShippingMethod=!0;t.base.orderSummary=[];t.base.taxAmount=0;t.base.subTotal=0;t.base.subTotalExVAT=0;t.base.stripeTotal=0;t.base.taxRate=12;t.base.hasTax=!1;t.base.discountUnrounded=0;t.base.promoProducts=[];t.base.selectedGiftProductID=[];t.base.selectedGiftSpecs=[];t.base.promoProductError=!1;t.customerID=-1;t.addressID=-1;t.addressBillingID=-1;t.base.paymentSelected="";t.base.invalidPayment=!1;t.base.email="test@gmail.com";t.base.PaymentOrderNo="";t.base.recreatePaypalTransaction=!0;t.base.alreadySelectedShipping=!1;t.base.offerCreateAccount=!1;t.base.rejectedAcctCreation=!1;t.guestPasswordErrorKey="";t.input.contactInfo.newPassword="";t.input.contactInfo.newPasswordConfirm="";t.base.sameAddressBilling=!0;t.base.editingShipAddressOnBill=!1;t.base.editingBillAddressOnShip=!1;t.base.autoPromoCode="";t.base.myVouchers=[];t.base.paypalPaymentURL="";t.base.NewSubscriptionNA=!1;t.base.paypalEnabled=!0;t.base.unitTypes=[];t.base.selectedUnitTypeShipping=[];t.base.selectedUnitTypeBilling=[];t.base.giftCardInfo=[];t.loadingPaypal=!1;t.base.minDate="";t.init=function(){t.enableSpinner();t.setDefaultStep();let n=t.getUserDetails(),i=t.getCarriers();n.then(function(){i.then(function(){let n=t.getCartItems();n.then(function(){t.sizeTotalContainer();setTimeout(function(){t.sizeTotalContainer()},1e3)})})})};t.redirectToCart=function(){t.base.AdjustedItems&&t.base.AdjustedItems.length!=0||(window.location.href=u.path().substring(0,3)+"/Shop/Cart/")};t.sizeTotalContainer=function(){sizeTotalContainer()};t.enableSpinner=function(){document.getElementById("divLoading").style.display="block"};t.disableSpinner=function(){document.getElementById("divLoading").style.display="none"};t.setDefaultStep=function(){t.stepCompleted[0]=!1;t.stepCompleted[1]=!1;t.stepCompleted[2]=!1;t.stepCompleted[3]=!1;t.stepCompleted[4]=!1;t.stepCompleted[15]=!1};t.getUserDetails=function(){let n=i.defer();return r({method:"GET",url:u.path().substring(0,3)+"/Shop/GetCheckoutInit"}).then(function(i){t.base.isGuest=i.data.IsGuest;t.base.username=i.data.UserEmail;t.input.contactInfo.FirstName=i.data.ContactFirstName;t.input.contactInfo.LastName=i.data.ContactLastName;t.input.contactInfo.Email=i.data.UserEmail;t.customerID=i.data.CustomerID;t.base.currencySymbol=i.data.CurrencySymbol;t.base.currencyCode=i.data.CurrencyCode;t.base.myVouchers=i.data.UserVouchers;t.gTagBeginCheckout(i.data);t.base.countryCode=i.data.CountryCode;t.base.unitTypes=i.data.UnitTypes;t.base.selectedUnitTypeShipping=t.base.unitTypes[0];t.base.selectedUnitTypeBilling=t.base.unitTypes[0];t.base.region=i.data.Region;t.base.minDate=i.data.MinGiftCardDate;t.base.paypalEnabled=i.data.PaypalEnabled;t.base.isGuest==!1?i.data.Addresses.length>0?t.base.userAddresses=i.data.Addresses:(t.base.userHasNoAddresses=!0,t.base.userEditingAddress=!0,t.base.userNewAddress=!0):t.input.address.Alias="Default";t.setupCountryStates(i.data.AddressCountriesList);t.base.isGuest==!1&&t.base.countryCode=="IT"&&i.data&&i.data.Addresses&&i.data.Addresses.length>0&&(t.input.address.IdentificationNo||(t.base.userHasNoAddresses=!1,t.base.userNewAddress=!1,t.base.forceFillAddress=!0,t.enableEditUserAddress()));t.base.initData=!0;t.base.stepOn=t.base.isGuest?0:1;isRetailer=="True"&&document.getElementById("openretailerWarningModal").click();i.data.AutoPromoValid?(t.base.promoCode=i.data.AutoPromoCode,t.base.promoCode&&setTimeout(function(){t.applyPromo()},500)):i.data.ReferVoucher&&(t.base.promoCode=i.data.ReferVoucher);n.resolve(!0)},function(){}),n.promise};t.selectMyVoucher=function(n){t.base.promoCode=n;t.applyPromo();document.getElementById("closeMyVouchers").click()};t.gTagBeginCheckout=function(n){window.dataLayer=window.dataLayer||[];var t=[];if(n.AnalyticProductData){for(let i=0;i<n.AnalyticProductData.length;i++)t.push({id:n.AnalyticProductData[i].ID,name:n.AnalyticProductData[i].Name,brand:"Paperblanks",category:n.AnalyticProductData[i].Category,variant:n.AnalyticProductData[i].Variant,quantity:n.AnalyticProductData[i].Quantity,price:n.AnalyticProductData[i].Price});dataLayer.push({event:"begin_checkout",ecommerce:{items:t}})}};t.gTagCheckoutProgress=function(n){window.dataLayer=window.dataLayer||[];var t=[];if(n.AnalyticProductData){for(let i=0;i<n.AnalyticProductData.length;i++)t.push({id:n.AnalyticProductData[i].ID,name:n.AnalyticProductData[i].Name,brand:"Paperblanks",category:n.AnalyticProductData[i].Category,variant:n.AnalyticProductData[i].Variant,quantity:n.AnalyticProductData[i].Quantity,price:n.AnalyticProductData[i].Price});dataLayer.push({event:"checkout_progress",items:t,coupon:n.PromoCode?n.PromoCode:""})}};t.idToUpperCase=function(){t.input.address.IdentificationNo&&(t.input.address.IdentificationNo=t.input.address.IdentificationNo.toUpperCase());t.billingAddress.address.IdentificationNo&&(t.input.billingAddress.IdentificationNo=t.input.billingAddress.IdentificationNo.toUpperCase())};t.newUserAddressBegin=function(){t.addressValidation=[];t.input.addressCopy=Object.assign({},t.input.address);t.input.selectedStateCopy=Object.assign({},t.base.selectedState);t.input.selectedCountryCopy=Object.assign({},t.base.selectedCountry);t.base.userEditingAddress=!0;t.input.address=[];t.base.userNewAddress=!0};t.enableEditUserAddress=function(){t.base.editingBillAddressOnShip=!1;t.base.editingShipAddressOnBill=!1;t.base.selectedUserAddress.AddressID==t.input.billingAddress.AddressID&&(t.base.editingBillAddressOnShip=!0,t.base.sameAddressBilling||document.getElementById("editingShippingOnBillingWarningModalBtn").click());for(let n=0;n<t.base.unitTypes.length;n++)if(t.input.address.UnitTypeID==t.base.unitTypes[n].UnitTypeID){t.base.selectedUnitTypeShipping=t.base.unitTypes[n];break}t.base.userEditingAddress=!0;t.input.addressCopy=Object.assign({},t.input.address);t.input.selectedStateCopy=Object.assign({},t.base.selectedState);t.input.selectedCountryCopy=Object.assign({},t.base.selectedCountry);t.addressValidation=[];t.forceFillAddress=!1};t.newUserAddressBeginBilling=function(){t.addressValidation=[];t.input.addressCopy=Object.assign({},t.input.billingAddress);t.input.selectedStateCopy=Object.assign({},t.base.selectedStateBilling);t.input.selectedCountryCopy=Object.assign({},t.base.selectedCountryBilling);t.base.userEditingAddress=!0;t.input.billingAddress=[];t.base.userNewAddress=!0};t.enableEditUserAddressBilling=function(){t.base.editingBillAddressOnShip=!1;t.base.editingShipAddressOnBill=!1;t.base.selectedUserAddressBilling.AddressID==t.input.address.AddressID&&(t.base.editingShipAddressOnBill=!0,document.getElementById("editingShippingOnBillingWarningModalBtn").click());for(let n=0;n<t.base.unitTypes.length;n++)if(t.input.billingAddress.UnitTypeID==t.base.unitTypes[n].UnitTypeID){t.base.selectedUnitTypeBilling=t.base.unitTypes[n];break}t.base.userEditingAddress=!0;t.input.addressCopy=Object.assign({},t.input.billingAddress);t.input.selectedStateCopy=Object.assign({},t.base.selectedStateBilling);t.input.selectedCountryCopy=Object.assign({},t.base.selectedCountryBilling);t.addressValidation=[]};t.cancelAddressEdit=function(){t.base.userEditingAddress=!1;t.base.userNewAddress&&(t.base.userNewAddress=!1);t.input.address=Object.assign({},t.input.addressCopy);t.base.selectedState=Object.assign({},t.input.selectedStateCopy);t.base.selectedCountry=Object.assign({},t.input.selectedCountryCopy)};t.cancelAddressEditBilling=function(){t.base.userEditingAddress=!1;t.base.userNewAddress&&(t.base.userNewAddress=!1);t.input.billingAddress=Object.assign({},t.input.addressCopy);t.base.selectedStateBilling=Object.assign({},t.input.selectedStateCopy);t.base.selectedCountryBilling=Object.assign({},t.input.selectedCountryCopy)};t.saveNewAddressBilling=function(){t.validateUserAddressBilling(!1)};t.saveNewAddress=function(){t.validateUserAddress(!1)};t.saveEditAddress=function(){t.validateUserAddress(!0)};t.saveEditAddressBilling=function(){t.validateUserAddressBilling(!0)};t.frontValidatePostal=function(){t.input.address.PostalCode&&(t.input.address.PostalCode=t.input.address.PostalCode.toUpperCase())};t.validateFirstName=function(){t.input.address.FirstName&&(t.input.address.FirstName=t.titleCase(t.input.address.FirstName))};t.validateLastName=function(){t.input.address.LastName&&(t.input.address.LastName=t.titleCase(t.input.address.LastName))};t.frontValidateCity=function(){t.input.address.City&&(t.input.address.City=t.titleCase(t.input.address.City))};t.titleCase=function(n){for(var i=n.toLowerCase().split(" "),t=0;t<i.length;t++)i[t]=i[t].charAt(0).toUpperCase()+i[t].substring(1);return i.join(" ")};t.validateUserAddress=function(n){t.input.address.IdentificationNo&&(t.input.address.IdentificationNo=t.input.address.IdentificationNo.toUpperCase());r({method:"POST",url:u.path().substring(0,3)+"/Shop/ValidateAddress/",data:{Alias:t.input.address.Alias,CustomerID:t.customerID,FirstName:t.input.address.FirstName,LastName:t.input.address.LastName,Company:t.input.address.CompanyName,Address:t.input.address.Address1,Address2:t.input.address.Address2,City:t.input.address.City,StateCode:t.base.selectedState.StateCode,PostalCode:t.input.address.PostalCode,CountryCode:t.base.selectedCountry.CountryCode,PhoneNumber:t.input.address.PhoneNo,IdentificationNo:t.input.address.IdentificationNo,Guest:t.base.isGuest,AddressID:t.input.address.AddressID,IsUnit:t.input.address.IsUnit,UnitNo:t.input.address.UnitNo,UnitTypeID:t.base.selectedUnitTypeShipping.UnitTypeID}}).then(function(i){t.addressValidation=[];i.data.Errors?t.fillAddressErrors(i):n?t.editUserAddress():t.newUserAddress()},function(n){console.log(n.statusText)})};t.validateUserAddressBilling=function(n){r({method:"POST",url:u.path().substring(0,3)+"/Shop/ValidateAddress/",data:{Alias:t.input.billingAddress.Alias,CustomerID:t.customerID,FirstName:t.input.billingAddress.FirstName,LastName:t.input.billingAddress.LastName,Company:t.input.billingAddress.CompanyName,Address:t.input.billingAddress.Address1,Address2:t.input.billingAddress.Address2,City:t.input.billingAddress.City,StateCode:t.base.selectedStateBilling.StateCode,PostalCode:t.input.billingAddress.PostalCode,CountryCode:t.base.selectedCountryBilling.CountryCode,PhoneNumber:t.input.billingAddress.PhoneNo,IdentificationNo:t.input.billingAddress.IdentificationNo,Guest:t.base.isGuest,AddressID:n?t.input.billingAddress.AddressID:-1,IsUnit:t.input.address.IsUnit,UnitNo:t.input.address.UnitNo,UnitTypeID:t.base.selectedUnitTypeBilling.UnitTypeID}}).then(function(i){t.addressValidation=[];i.data.Errors?t.fillAddressErrors(i):n?t.editUserAddressBilling():t.newUserAddressBilling()},function(n){console.log(n.statusText)})};t.newUserAddressBilling=function(){r({method:"POST",url:u.path().substring(0,3)+"/Shop/NewUserAddress/",data:{Alias:t.input.billingAddress.Alias,FirstName:t.input.billingAddress.FirstName,LastName:t.input.billingAddress.LastName,CompanyName:t.input.billingAddress.CompanyName,Address1:t.input.billingAddress.Address1,Address2:t.input.billingAddress.Address2,City:t.input.billingAddress.City,PostalCode:t.input.billingAddress.PostalCode,PhoneNo:t.input.billingAddress.PhoneNo,IdentificationNo:t.input.billingAddress.IdentificationNo,StateCode:t.base.selectedStateBilling.StateCode,CountryCode:t.base.selectedCountryBilling.CountryCode,IsUnit:t.input.billingAddress.IsUnit,UnitNo:t.input.billingAddress.UnitNo,UnitTypeID:t.base.selectedUnitTypeBilling.UnitTypeID,IsDefault:!1}}).then(function(n){var i=-9;i=n.data;t.input.billingAddress.AddressID=i;t.reloadAddressList(i,!1);t.billingAddressID=i;t.base.userHasNoAddresses=!1;t.base.userEditingAddress=!1;t.base.userNewAddress=!1},function(n){console.log(n.statusText)})};t.newUserAddress=function(){r({method:"POST",url:u.path().substring(0,3)+"/Shop/NewUserAddress/",data:{Alias:t.input.address.Alias,FirstName:t.input.address.FirstName,LastName:t.input.address.LastName,CompanyName:t.input.address.CompanyName,Address1:t.input.address.Address1,Address2:t.input.address.Address2,City:t.input.address.City,PostalCode:t.input.address.PostalCode,PhoneNo:t.input.address.PhoneNo,IdentificationNo:t.input.address.IdentificationNo,StateCode:t.base.selectedState.StateCode,CountryCode:t.base.selectedCountry.CountryCode,IsUnit:t.input.address.IsUnit,UnitNo:t.input.address.UnitNo,UnitTypeID:t.base.selectedUnitTypeShipping.UnitTypeID,IsDefault:!1}}).then(function(n){var i=-9;i=n.data;t.input.address.AddressID=i;t.reloadAddressList(i,!0);t.addressID=i;t.base.userHasNoAddresses=!1;t.base.userEditingAddress=!1;t.base.userNewAddress=!1},function(n){console.log(n.statusText)})};t.editUserAddressBilling=function(){r({method:"POST",url:u.path().substring(0,3)+"/Shop/EditUserAddress/",data:{Alias:t.input.billingAddress.Alias,FirstName:t.input.billingAddress.FirstName,LastName:t.input.billingAddress.LastName,CompanyName:t.input.billingAddress.CompanyName,Address1:t.input.billingAddress.Address1,Address2:t.input.billingAddress.Address2,City:t.input.billingAddress.City,PostalCode:t.input.billingAddress.PostalCode,PhoneNo:t.input.billingAddress.PhoneNo,IdentificationNo:t.input.billingAddress.IdentificationNo,StateCode:t.base.selectedStateBilling.StateCode,CountryCode:t.base.selectedCountryBilling.CountryCode,AddressID:t.input.billingAddress.AddressID,IsUnit:t.input.billingAddress.IsUnit,UnitNo:t.input.billingAddress.UnitNo,UnitTypeID:t.base.selectedUnitTypeBilling.UnitTypeID}}).then(function(){t.reloadAddressList(t.input.billingAddress.AddressID,!1)},function(n){console.log(n.statusText)})};t.editUserAddress=function(){r({method:"POST",url:u.path().substring(0,3)+"/Shop/EditUserAddress/",data:{Alias:t.input.address.Alias,FirstName:t.input.address.FirstName,LastName:t.input.address.LastName,CompanyName:t.input.address.CompanyName,Address1:t.input.address.Address1,Address2:t.input.address.Address2,City:t.input.address.City,PostalCode:t.input.address.PostalCode,PhoneNo:t.input.address.PhoneNo,IdentificationNo:t.input.address.IdentificationNo,StateCode:t.base.selectedState.StateCode,CountryCode:t.base.selectedCountry.CountryCode,AddressID:t.input.address.AddressID,IsUnit:t.input.address.IsUnit,UnitNo:t.input.address.UnitNo,UnitTypeID:t.base.selectedUnitTypeShipping.UnitTypeID}}).then(function(){t.reloadAddressList(t.input.address.AddressID,!0)},function(n){console.log(n.statusText)})};t.reloadAddressList=function(n,i){t.base.userAddresses=[];t.base.selectedUserAddress=[];t.base.selectedUserAddressBilling=[];r({method:"POST",url:u.path().substring(0,3)+"/Shop/GetAddressList/",data:{}}).then(function(r){if(t.base.userAddresses=r.data,i){for(let n=0;n<t.base.userAddresses.length;n++)if(t.base.userAddresses[n].AddressID==t.input.address.AddressID){t.base.selectedUserAddress=t.base.userAddresses[n];break}}else if(t.input.billingAddress.AddressID){for(let n=0;n<t.base.userAddresses.length;n++)if(t.base.userAddresses[n].AddressID==t.input.billingAddress.AddressID){t.base.selectedUserAddressBilling=t.base.userAddresses[n];break}}else t.base.userAddresses.length==1&&(t.base.selectedUserAddressBilling=t.base.userAddresses[0],t.changeUserAddressBilling());for(let r=0;r<t.base.userAddresses.length;r++)if(t.base.userAddresses[r].AddressID==n){i?t.base.selectedUserAddress=t.base.userAddresses[r]:t.base.selectedUserAddressBilling=t.base.userAddresses[r];t.changeUserAddressBilling();break}t.base.editingShipAddressOnBill&&t.changeUserAddress();t.base.editingBillAddressOnShip&&t.changeUserAddressBilling();t.base.userEditingAddress=!1},function(n){console.log(n.statusText)})};t.changeUserAddressBilling=function(){if(t.addressBillingID=t.base.selectedUserAddressBilling.AddressID,t.base.selectedUserAddressBilling.AddressID||(t.addressBillingID=-9),t.addressBillingID==-9){var n=!1;for(let i=0;i<t.base.userAddresses.length;i++)if(t.base.userAddresses[i].IsDefaultBilling){n=!0;t.base.selectedUserAddressBilling=t.base.userAddresses[i];t.addressBillingID=t.base.userAddresses[i].AddressID;break}if(!n)for(let n=0;n<t.base.userAddresses.length;n++)if(t.base.userAddresses[n].IsDefault){t.base.selectedUserAddressBilling=t.base.userAddresses[n];t.addressBillingID=t.base.userAddresses[n].AddressID;break}}else for(let n=0;n<t.base.userAddresses.length;n++)if(t.base.userAddresses[n].AddressID==t.addressBillingID){t.base.selectedUserAddressBilling=t.base.userAddresses[n];break}t.input.billingAddress.FirstName=t.base.selectedUserAddressBilling.FirstName;t.input.billingAddress.LastName=t.base.selectedUserAddressBilling.LastName;t.input.billingAddress.CompanyName=t.base.selectedUserAddressBilling.Company;t.input.billingAddress.Address1=t.base.selectedUserAddressBilling.Address;t.input.billingAddress.Address2=t.base.selectedUserAddressBilling.Address2;t.input.billingAddress.City=t.base.selectedUserAddressBilling.City;t.input.billingAddress.PostalCode=t.base.selectedUserAddressBilling.PostalCode;t.input.billingAddress.PhoneNo=t.base.selectedUserAddressBilling.PhoneNumber;t.input.billingAddress.IdentificationNo=t.base.selectedUserAddressBilling.IdentificationNo;t.input.billingAddress.Alias=t.base.selectedUserAddressBilling.Alias;t.input.billingAddress.AddressID=t.base.selectedUserAddressBilling.AddressID;t.input.billingAddress.IsUnit=t.base.region=="North America"?!1:!1;t.input.billingAddress.UnitTypeID=t.base.selectedUserAddressBilling.UnitTypeID;t.input.billingAddress.UnitNo=t.base.selectedUserAddressBilling.UnitNo;for(let n=0;n<t.base.unitTypes.length;n++)if(t.base.unitTypes[n].UnitTypeID==t.input.billingAddress.UnitTypeID){t.base.selectedUnitTypeBilling=t.base.unitTypes[n];break}for(let n=0;n<t.base.countryStates.length;n++)if(t.base.countryStates[n].CountryCode==t.base.selectedUserAddressBilling.CountryCode){t.base.selectedCountryBilling=t.base.countryStates[n];for(let n=0;n<t.base.selectedCountry.States.length;n++)if(t.base.selectedCountryBilling.States[n].StateCode==t.base.selectedUserAddressBilling.StateCode){t.base.selectedStateBilling=t.base.selectedCountryBilling.States[n];break}}};t.changeUserAddress=function(){if(t.addressID=t.base.selectedUserAddress.AddressID,t.base.selectedUserAddress.AddressID||(t.addressID=-9),t.addressID==-9){for(let n=0;n<t.base.userAddresses.length;n++)if(t.base.userAddresses[n].IsDefault){t.base.selectedUserAddress=t.base.userAddresses[n];t.addressID=t.base.userAddresses[n].AddressID;break}}else for(let n=0;n<t.base.userAddresses.length;n++)if(t.base.userAddresses[n].AddressID==t.addressID){t.base.selectedUserAddress=t.base.userAddresses[n];break}t.input.address.FirstName=t.base.selectedUserAddress.FirstName;t.input.address.LastName=t.base.selectedUserAddress.LastName;t.input.address.CompanyName=t.base.selectedUserAddress.Company;t.input.address.Address1=t.base.selectedUserAddress.Address;t.input.address.Address2=t.base.selectedUserAddress.Address2;t.input.address.City=t.base.selectedUserAddress.City;t.input.address.PostalCode=t.base.selectedUserAddress.PostalCode;t.input.address.PhoneNo=t.base.selectedUserAddress.PhoneNumber;t.input.address.IdentificationNo=t.base.selectedUserAddress.IdentificationNo;t.input.address.Alias=t.base.selectedUserAddress.Alias;t.input.address.AddressID=t.base.selectedUserAddress.AddressID;t.input.address.IsUnit=t.base.region=="North America"?!0:!1;t.input.address.UnitTypeID=t.base.selectedUserAddress.UnitTypeID;t.input.address.UnitNo=t.base.selectedUserAddress.UnitNo;for(let n=0;n<t.base.unitTypes.length;n++)if(t.base.unitTypes[n].UnitTypeID==t.input.address.UnitTypeID){t.base.selectedUnitTypeShipping=t.base.unitTypes[n];break}for(let n=0;n<t.base.countryStates.length;n++)if(t.base.countryStates[n].CountryCode==t.base.selectedUserAddress.CountryCode){t.base.selectedCountry=t.base.countryStates[n];for(let n=0;n<t.base.selectedCountry.States.length;n++)if(t.base.selectedCountry.States[n].StateCode==t.base.selectedUserAddress.StateCode){t.base.selectedState=t.base.selectedCountry.States[n];break}}};t.enterKeyStep0=function(n){n.keyCode==13&&t.continueStep0()};t.continueStep0=function(n){t.enableSpinner();t.input.contactInfo.FirstName&&t.input.contactInfo.LastName&&(t.input.contactInfo.FirstName=t.firstCharUpper(t.input.contactInfo.FirstName),t.input.contactInfo.LastName=t.firstCharUpper(t.input.contactInfo.LastName));r({method:"POST",url:u.path().substring(0,3)+"/Shop/ValidateCustomerContact/",data:{FirstName:t.input.contactInfo.FirstName,LastName:t.input.contactInfo.LastName,Email:t.input.contactInfo.Email,SubscribeChecked:t.base.subscribeToNews}}).then(function(i){t.disableSpinner();t.contactValidation=[];i.data.Errors!=null?t.fillContactErrors(i):n||t.base.rejectedAcctCreation?(t.stepCompleted[0]=!0,t.base.stepOn=1,t.base.rejectedAcctCreation=!0):(i.data.IsRetailer&&t.triggerRetailerModal(),t.previousGuestShopperCheck(i.data.PreviousGuestShopperCheck));document.getElementById("divLoading").style.display="none";t.base.promoCode&&t.applyPromo();t.base.NewSubscriptionNA=i.data.NewSubscriptionNA},function(n){t.disableSpinner();console.log(n.statusText)});t.returnToStep0=function(){t.base.stepOn=0;t.clearPaymentSelection()}};t.triggerRetailerModal=function(){document.getElementById("openretailerWarningModal").click()};t.subscribeToNews=function(){r({method:"POST",url:u.path().substring(0,3)+"/Shop/SubscribeToMailListAjax/",data:{email:t.input.contactInfo.Email,firstName:t.input.contactInfo.FirstName,lastName:t.input.contactInfo.LastName}}).then(function(){},function(n){console.log(n.statusText)})};t.previousGuestShopperCheck=function(n){n?(t.base.offerCreateAccount=!0,setTimeout(function(){document.getElementById("guestPasswordCreate").focus()},50),t.disableSpinner()):(t.stepCompleted[0]=!0,t.base.stepOn=1)};t.enterConvertGuestCust=function(n){n.keyCode==13&&t.convertGuestCustomer()};t.convertGuestCustomer=function(){t.enableSpinner();r({method:"POST",url:u.path().substring(0,3)+"/Account/GuestRegisterAccountLogin/",data:{email:t.input.contactInfo.Email,firstName:t.input.contactInfo.FirstName,lastName:t.input.contactInfo.LastName,password:t.input.contactInfo.newPassword,confirmPassword:t.input.contactInfo.newPasswordConfirm}}).then(function(n){n.data.Success?location.reload():t.guestPasswordErrorKey=n.data.ErrorKey;t.disableSpinner()},function(n){console.log(n.statusText)})};t.fillContactErrors=function(n){for(let i=0;i<n.data.Errors.length;i++)n.data.Errors[i].Key==="FirstName"?t.contactValidation.FirstName=n.data.Errors[i].ErrorMsg:n.data.Errors[i].Key==="LastName"?t.contactValidation.LastName=n.data.Errors[i].ErrorMsg:n.data.Errors[i].Key==="Email"&&(t.contactValidation.Email=n.data.Errors[i].ErrorMsg)};t.getCountryStates=function(){r({method:"POST",url:u.path().substring(0,3)+"/Shop/GetAddressCountries/",data:{}}).then(function(n){t.setupCountryStates(n.data)},function(n){console.log(n.statusText)})};t.setupCountryStates=function(n){if(t.base.countryStates=n.CountryList,n.DefaultCountry!="??"){let i=!1;for(let r=0;r<n.CountryList.length;r++){if(n.CountryList[r].CountryCode==n.DefaultCountry){t.base.selectedCountry=n.CountryList[r];t.base.selectedCountryBilling=n.CountryList[r];i=!0;break}i||(t.base.selectedCountry=n.CountryList[0],t.base.selectedCountryBilling=n.CountryList[0])}}else t.base.selectedCountry=n.CountryList[0],t.base.selectedCountryBilling=n.CountryList[0];t.base.selectedCountry.States[0]?(t.base.selectedState=t.base.selectedCountry.States[0],t.base.selectedStateBilling=t.base.selectedCountry.States[0]):t.base.selectedState="";t.changeUserAddress(-9);t.changeUserAddressBilling(-9)};t.changeCountry=function(n){n.States[0]&&(t.base.selectedState=n.States[0])};t.continueUserStep1=function(){t.stepCompleted[1]=!0;t.base.stepOn=15;t.base.selectedUserAddress.CountryCode!=t.countryCodeShipping?(t.countryCodeShipping=t.base.selectedUserAddress.CountryCode,t.getCarriers(!0)):t.selectOnlyShipping();t.reloadPaymentTotal()};t.continueUserStep15=function(){t.stepCompleted[15]=!0;t.base.stepOn=2;t.selectOnlyShipping();t.reloadPaymentTotal()};t.selectOnlyShipping=function(){let i=0,n=-1;for(let r=0;r<t.shippingMethods.length;r++)t.shippingMethods[r].Methods.length>0&&(i=i+1,n=r);t.base.alreadySelectedShipping==!1&&i==1&&t.shippingMethods[n].Methods.length==1&&n!=-1&&(t.selectShippingMethod(t.shippingMethods[n].Methods[0],t.shippingMethods[n]),t.base.alreadySelectedShipping=!0)};t.continueStep1=function(){r({method:"POST",url:u.path().substring(0,3)+"/Shop/ValidateAddress/",data:{Alias:t.input.address.Alias,CustomerID:t.customerID,FirstName:t.input.address.FirstName,LastName:t.input.address.LastName,Company:t.input.address.CompanyName,Address:t.input.address.Address1,Address2:t.input.address.Address2,City:t.input.address.City,StateCode:t.base.selectedState.StateCode,PostalCode:t.input.address.PostalCode,CountryCode:t.base.selectedCountry.CountryCode,PhoneNumber:t.input.address.PhoneNo,IdentificationNo:t.input.address.IdentificationNo,Guest:t.base.isGuest,IsUnit:t.input.address.IsUnit,UnitNo:t.input.address.UnitNo,UnitTypeID:t.base.selectedUnitTypeShipping.UnitTypeID}}).then(function(n){t.addressValidation=[];n.data.Errors?t.fillAddressErrors(n):(t.stepCompleted[1]=!0,t.base.selectedCountry.CountryCode!=t.countryCodeShipping?(t.countryCodeShipping=t.base.selectedCountry.CountryCode,t.getCarriers(!0)):t.selectOnlyShipping(),t.reloadPaymentTotal(),t.base.stepOn=15)},function(n){console.log(n.statusText)})};t.continueStep15=function(){if(t.base.sameAddressBilling){t.base.stepOn=2;t.stepCompleted[15]=!0;t.selectOnlyShipping();return}r({method:"POST",url:u.path().substring(0,3)+"/Shop/ValidateAddress/",data:{Alias:t.input.billingAddress.Alias,CustomerID:t.customerID,FirstName:t.input.billingAddress.FirstName,LastName:t.input.billingAddress.LastName,Company:t.input.billingAddress.CompanyName,Address:t.input.billingAddress.Address1,Address2:t.input.billingAddress.Address2,City:t.input.billingAddress.City,StateCode:t.base.selectedStateBilling.StateCode,PostalCode:t.input.billingAddress.PostalCode,CountryCode:t.base.selectedCountryBilling.CountryCode,PhoneNumber:t.input.billingAddress.PhoneNo,IdentificationNo:t.input.billingAddress.IdentificationNo,Guest:t.base.isGuest,IsUnit:t.input.address.IsUnit,UnitNo:t.input.address.UnitNo,UnitTypeID:t.base.selectedUnitTypeShipping.UnitTypeID}}).then(function(n){t.addressValidation=[];n.data.Errors?t.fillAddressErrors(n):(t.stepCompleted[15]=!0,t.base.stepOn=2,t.selectOnlyShipping())},function(n){console.log(n.statusText)})};t.getCarriers=function(n){let f=i.defer();return r({method:"POST",url:u.path().substring(0,3)+"/Shop/GetCarriers/",data:{selectedCountryCode:t.countryCodeShipping,usedPromoID:t.base.usedPromoID}}).then(function(i){t.setCarriers(i.data,n);f.resolve(!0)},function(n){console.log(n.statusText)}),f.promise};t.setCarriers=function(n,i){t.countryCodeShipping=n.CountryCode;t.shippingMethods=n.Carriers;t.allShippingMethods=n.Carriers;t.selectedShippingMethod=[];t.selectedCarrier=[];t.base.alreadySelectedShipping=!1;i&&t.selectOnlyShipping()};t.revalidateCarrierMethod=function(){let n=[];n=t.allShippingMethods;let i=!1,r=!1;for(let u=0;u<n.length;u++)for(let f=0;f<n[u].Methods.length;f++)if(n[u].Methods[f].OfferMethodFirst!=!1){r=!0;let e=!0;t.base.cartHeight>n[u].Methods[f].MaxHeightMM&&(e=!1);t.base.cartLength>n[u].Methods[f].MaxLengthMM&&(e=!1);t.base.cartWidth>n[u].Methods[f].MaxWidthMM&&(e=!1);(t.base.cartWeight<n[u].Methods[f].MinWeightKG||t.base.cartWeight>n[u].Methods[f].MaxWeightKG)&&(e=!1);e==!0&&(i=!0)}if(i==!1){for(let n=0;n<t.shippingMethods.length;n++)for(let i=0;i<t.shippingMethods[n].Methods.length;i++){let u=!0;t.base.cartHeight>t.shippingMethods[n].Methods[i].MaxHeightMM&&(u=!1);t.base.cartLength>t.shippingMethods[n].Methods[i].MaxLengthMM&&(u=!1);t.base.cartWidth>t.shippingMethods[n].Methods[i].MaxWidthMM&&(u=!1);(t.base.cartWeight<t.shippingMethods[n].Methods[i].MinWeightKG||t.base.cartWeight>t.shippingMethods[n].Methods[i].MaxWeightKG)&&!r&&(u=!1);t.shippingMethods[n].Methods[i].ValidatedMethod=u;u==!1&&t.selectedShippingMethod.MethodID==t.shippingMethods[n].Methods[i].MethodID&&(t.selectedShippingMethod=[],t.selectedCarrier=[],t.shippingMethodChanged=!0,t.returnToStep2())}t.base.useOfferFirstShippingMethod==!0&&(t.base.useOfferFirstShippingMethod=!1,t.base.stepOn==3&&(t.selectedShippingMethod=[],t.selectedCarrier=[],t.shippingMethodChanged=!0,t.resetValidMethods(),t.returnToStep2()))}else t.base.useOfferFirstShippingMethod==!1&&(t.base.useOfferFirstShippingMethod=!0,t.selectedShippingMethod=[],t.selectedCarrier=[],t.resetValidMethods(),t.shippingMethodChanged=!0,t.returnToStep2())};t.resetValidMethods=function(){for(let n=0;n<t.shippingMethods.length;n++)for(let i=0;i<t.shippingMethods[n].Methods.length;i++)t.shippingMethods[n].Methods[i].ValidatedMethod=!0};t.selectShippingMethod=function(n,i){t.shippingError=!1;t.shippingMethodChanged=!1;t.selectedShippingMethod=n;t.selectedCarrier=i;t.enableSpinner();t.reloadPaymentTotal()};t.returnToStep1=function(){t.base.stepOn=1;t.clearPaymentSelection()};t.returnToStep15=function(){t.base.stepOn=15;t.clearPaymentSelection()};t.continueStep2=function(){if(t.shippingMethodChanged=!1,t.selectedShippingMethod==""){t.shippingError=!0;return}t.base.isGuest?t.createEditGuestCustomer():(t.stepCompleted[2]=!0,t.base.stepOn=3,t.getCartItems())};t.returnToStep2=function(){t.base.stepOn=2;t.clearPaymentSelection()};t.createEditGuestCustomer=function(){t.addressValidation=[];r({method:"POST",url:u.path().substring(0,3)+"/Shop/CreateEditGuestCustomer/",data:{firstNameContact:t.input.contactInfo.FirstName,lastNameContact:t.input.contactInfo.LastName,email:t.input.contactInfo.Email,FirstName:t.input.address.FirstName,LastName:t.input.address.LastName,Company:t.input.address.CompanyName,Address:t.input.address.Address1,Address2:t.input.address.Address2,City:t.input.address.City,StateCode:t.base.selectedState.StateCode,PostalCode:t.input.address.PostalCode,CountryCode:t.base.selectedCountry.CountryCode,PhoneNumber:t.input.address.PhoneNo,IdentificationNo:t.input.address.IdentificationNo,IsGuest:t.base.isGuest,CustomerID:t.customerID,AddressID:t.addressID,isBillingAddress:!1,IsUnit:t.input.address.IsUnit,UnitNo:t.input.address.UnitNo,UnitTypeID:t.base.selectedUnitTypeShipping.UnitTypeID}}).then(function(n){t.addressID=n.data.AddressID;t.customerID=n.data.CustomerID;t.createEditGuestCustomerBilling()},function(n){console.log(n.statusText)})};t.createEditGuestCustomerBilling=function(){t.sameAddressBilling&&(t.stepCompleted[2]=!0,t.base.stepOn=3,t.getCartItems());t.addressValidation=[];r({method:"POST",url:u.path().substring(0,3)+"/Shop/CreateEditGuestCustomer/",data:{firstNameContact:t.input.contactInfo.FirstName,lastNameContact:t.input.contactInfo.LastName,email:t.input.contactInfo.Email,FirstName:t.input.billingAddress.FirstName,LastName:t.input.billingAddress.LastName,Company:t.input.billingAddress.CompanyName,Address:t.input.billingAddress.Address1,Address2:t.input.billingAddress.Address2,City:t.input.billingAddress.City,StateCode:t.base.selectedStateBilling.StateCode,PostalCode:t.input.billingAddress.PostalCode,CountryCode:t.base.selectedCountryBilling.CountryCode,PhoneNumber:t.input.billingAddress.PhoneNo,IdentificationNo:t.input.billingAddress.IdentificationNo,IsGuest:t.base.isGuest,CustomerID:t.customerID,AddressID:t.addressBillingID,isBillingAddress:!0,IsUnit:t.input.billingAddress.IsUnit,UnitNo:t.input.billingAddress.UnitNo,UnitTypeID:t.base.selectedUnitTypeBilling.UnitTypeID}}).then(function(n){t.addressBillingID=n.data.AddressID;t.customerID=n.data.CustomerID;t.stepCompleted[2]=!0;t.base.stepOn=3;t.getCartItems()},function(n){console.log(n.statusText)})};t.getCartItems=function(){let n=i.defer();return r({method:"POST",url:u.path().substring(0,3)+"/Shop/GetCartItems",data:{usedPromoID:t.base.usedPromoID!=0?t.base.usedPromoID:0}}).then(function(i){t.base.AdjustedItems=i.data.AdjustedItems;t.base.cartItems=t.updateGiftCardInfo(i.data.Items);t.cartItemsReady=!0;t.base.cartWeight=i.data.CartTotalWeightKG;t.base.cartLength=i.data.CartLengthMM;t.base.cartWidth=i.data.CartWidthMM;t.base.cartHeight=i.data.CartHeightMM;i.data.QuantityAdjusted&&(document.getElementById("openCartAdjustmentModal").click(),t.getCartCounter());let r=t.reloadPaymentTotal();r.then(function(){n.resolve(!0)});t.setupDateGiftCardDates();t.revalidateCarrierMethod()},function(){}),n.promise};t.setupDateGiftCardDates=function(){for(let n=0;n<t.base.cartItems.length;n++)if(t.base.cartItems[n].IsGifCard)for(let i=0;i<t.base.cartItems[n].GiftCardPurchaseDetails.length;i++)t.base.cartItems[n].GiftCardPurchaseDetails[i].LaterDate&&(t.base.cartItems[n].GiftCardPurchaseDetails[i].LaterDate=moment(t.base.cartItems[n].GiftCardPurchaseDetails[i].LaterDate))};t.updateGiftCardInfo=function(n){for(let i=0;i<t.base.cartItems.length;i++)if(t.base.cartItems[i].IsGifCard)for(let r=0;r<n.length;r++)if(n[r].ProductID==t.base.cartItems[i].ProductID)if(n[r].GiftCardPurchaseDetails.length>=t.base.cartItems[i].GiftCardPurchaseDetails.length)for(let u=0;u<t.base.cartItems[i].GiftCardPurchaseDetails.length;u++)n[r].GiftCardPurchaseDetails[u]=t.base.cartItems[i].GiftCardPurchaseDetails[u];else for(let u=0;u<n[r].GiftCardPurchaseDetails.length;u++)n[r].GiftCardPurchaseDetails[u]=t.base.cartItems[i].GiftCardPurchaseDetails[u];return n};t.getCartCounter=function(){r({method:"GET",url:u.path().substring(0,3)+"/Shop/GetCartCount"}).then(function(n){n.data&&(document.getElementById("cartitemCount").innerText=n.data)},function(){})};t.hasBogo=function(n){for(let i=0;i<t.base.cartItems.length;i++)if(t.base.cartItems[i].IsBogo&&t.base.cartItems[i].ProductID==n)return!0;return!1};t.hasBogoParent=function(n){for(let i=0;i<t.base.cartItems.length;i++)if(t.base.cartItems[i].ProductID==n&&t.base.cartItems[i].IsBogo)return t.base.cartItems[i].HasBogoParent;return!0};t.getBogoQuantity=function(n){for(let i=0;i<t.base.cartItems.length;i++)if(t.base.cartItems[i].ProductID==n&&t.base.cartItems[i].IsBogo)return t.base.cartItems[i].Quantity};t.increaseQty=function(n){if(n.Quantity!=99){for(let i=0;i<t.base.cartItems.length;i++){if(t.base.cartItems[i].ProductID==n.ProductID&&!t.base.cartItems[i].IsBogo){if(t.hasBogo(n.ProductID)){t.base.cartItems[i].Quantity=t.base.cartItems[i].Quantity+1;t.setNewRecordQty(n.ProductID,t.base.cartItems[i].Quantity+t.getBogoQuantity(n.ProductID));return}t.base.cartItems[i].Quantity=t.base.cartItems[i].Quantity+1;t.setNewRecordQty(n.ProductID,t.base.cartItems[i].Quantity);return}if(t.base.cartItems[i].ProductID==n.ProductID&&t.base.cartItems[i].IsBogo){t.base.cartItems[i].Quantity=t.base.cartItems[i].Quantity+1;t.setNewRecordQty(n.ProductID,t.base.cartItems[i].Quantity);return}}for(let i=0;i<t.base.cartItems.length;i++)if(t.base.cartItems[i].ProductID==n.ProductID&&t.base.cartItems[i].IsBogo){t.base.cartItems[i].Quantity=t.base.cartItems[i].Quantity+1;t.setNewRecordQty(n.ProductID,t.base.cartItems[i].Quantity);return}}};t.decreaseQty=function(n){var i=n.Quantity;if(!(i<=1)||t.hasBogo(n.ProductID)){for(let i=0;i<t.base.cartItems.length;i++){if(t.base.cartItems[i].ProductID==n.ProductID&&!t.base.cartItems[i].IsBogo){if(t.hasBogo(n.ProductID)){t.base.cartItems[i].Quantity=t.base.cartItems[i].Quantity-1;t.setNewRecordQty(n.ProductID,t.base.cartItems[i].Quantity+t.getBogoQuantity(n.ProductID));return}t.base.cartItems[i].Quantity=t.base.cartItems[i].Quantity-1;t.setNewRecordQty(n.ProductID,t.base.cartItems[i].Quantity);return}if(t.base.cartItems[i].ProductID==n.ProductID&&t.base.cartItems[i].IsBogo){t.base.cartItems[i].Quantity=t.base.cartItems[i].Quantity-1;t.setNewRecordQty(n.ProductID,t.base.cartItems[i].Quantity);return}}for(let i=0;i<t.base.cartItems.length;i++)if(t.base.cartItems[i].ProductID==n.ProductID&&t.base.cartItems[i].IsBogo){t.base.cartItems[i].Quantity=t.base.cartItems[i].Quantity-1;t.setNewRecordQty(n.ProductID,t.base.cartItems[i].Quantity);return}}};t.setNewRecordQty=function(n,i){var f=parseInt(i);if(!f||f<1||isNaN(f)||f>99)for(let r=0;r<t.base.cartItems.length;r++)if(t.base.cartItems[r].ProductID==n){t.base.cartItems[r].Quantity=1;i=t.base.cartItems[r].Quantity;break}t.enableSpinner();r({method:"POST",url:u.path().substring(0,3)+"/Shop/ChangeProductCartQty",data:{productID:n,newQty:parseInt(i)}}).then(function(){t.getCartItems();t.getCartCounter()},function(){})};t.removeCartItem=function(n){t.enableSpinner();r({method:"POST",url:u.path().substring(0,3)+"/Shop/RemoveCartItem",data:{recordID:n,shippingCountryCode:t.countryCodeShipping,checkout:!0}}).then(function(n){n.data&&n.data.Success&&(t.gTagRemoveCart(n.data),t.getCartItems(),t.reloadPaymentTotal(),t.getCartCounter(),n.data.GiftCardsOnly&&n.data.UpdatedShippingMethods&&t.setCarriers(n.data.UpdatedShippingMethods,!0))},function(){})};t.gTagRemoveCart=function(n){n&&n.Product&&n.Product.ID&&(window.dataLayer=window.dataLayer||[],dataLayer.push({event:"remove_from_cart",items:[{id:n.Product.ID,name:n.Product.Name,brand:"Paperblanks",category:n.Product.Category,variant:n.Product.Variant,quantity:n.Product.Quantity,price:n.Product.Price}]}))};t.continueStep3=function(){if(t.base.promoProducts.length!=0&&t.base.selectedGiftProductID.length!=t.base.promoProducts.length){t.base.promoProductError=!0;return}t.enableSpinner();let n=t.getGiftCardLines();n&&n.length>0?t.validateGiftCardInfo(n):(t.base.stepOn=4,t.stepCompleted[3]=!0,t.getCartItems())};t.validateGiftCardInfo=function(n){r({method:"POST",url:u.path().substring(0,3)+"/Shop/ValidateGiftCardLines",data:{giftCardLines:n}}).then(function(n){let i=!1;for(let r=0;r<n.data.length;r++)for(let u=0;u<t.base.cartItems.length;u++)if(t.base.cartItems[u].ProductID==n.data[r].ProductID)for(let f=0;f<t.base.cartItems[u].GiftCardPurchaseDetails.length;f++)t.base.cartItems[u].GiftCardPurchaseDetails[f].Index==n.data[r].Index&&((n.data[r].NameError||n.data[r].EmailError||n.data[r].MessageError||n.data[r].LaterDateError)&&(i=!0),t.base.cartItems[u].GiftCardPurchaseDetails[f]=n.data[r],t.base.cartItems[u].GiftCardPurchaseDetails[f].LaterDate=moment(n.data[r].LaterDate));i?t.disableSpinner():(t.base.stepOn=4,t.stepCompleted[3]=!0,t.getCartItems())},function(){})};t.returnToStep3=function(){t.base.stepOn=3;t.clearPaymentSelection()};t.reloadPaymentTotal=function(){let n=i.defer();var f=-5;return t.selectedShippingMethod&&(f=t.selectedShippingMethod.MethodID),r({method:"POST",url:u.path().substring(0,3)+"/Shop/GetOrderTotalPaypal",data:{shippingMethod:f,addressID:t.addressID,usedPromoID:t.base.usedPromoID!=0?t.base.usedPromoID:0,usedVoucherID:t.base.usedVoucherID,usedGiftCardCode:t.base.usedGiftCardCode,selectedCountryCode:t.base.selectedCountry.CountryCode,selectedStateCode:t.base.selectedState.StateCode}}).then(function(i){t.base.promoProducts=i.data.GiftProducts.Products;t.base.promoProducts.length==0?(t.base.selectedGiftProductID=[],t.base.selectedGiftSpecs=[]):t.base.promoProducts[0].Products.length==1&&t.selectPromoGiftProduct(t.base.promoProducts[0].Products[0],t.base.promoProducts[0].PromoID);t.base.isVAT=i.data.IsVATIncludedPayment;t.base.orderSummary=i.data.CheckoutDisplay;t.base.stripeTotal=i.data.TotalStripe;t.base.taxRate=i.data.TaxPercentage;t.base.hasTax=i.data.HasTaxRate;t.base.discountUnrounded=i.data.DiscountUnrounded;t.base.orderSummary.OrgTotal=(Number(t.base.orderSummary.GiftCardCredit)+Number(t.base.orderSummary.Total)).toFixed(2);t.base.taxAmount=Number(t.base.orderSummary.Taxes).toFixed(2);t.base.subTotal=Number(t.base.orderSummary.SubTotal).toFixed(2);t.base.hasTax&&(t.base.subTotalExVAT=(Number(t.base.subTotal)-Number(t.base.taxAmount)).toFixed(2),t.base.taxesEU=(t.base.subTotal-t.base.subTotalExVAT).toFixed(2));t.stepCompleted[3]&&t.initializePayment();i.data.PromoValid||(t.base.usedPromoID=0,t.base.usedVoucherID=0,t.base.promoValid=!1,i.data.PromoMsg&&(t.base.applyPromoResponse=i.data.PromoMsg));i.data.GiftCardValid?(t.base.UsedGiftCard=!0,t.base.giftCardValid=!0,i.data.GiftCardMsg&&(t.base.applyGCResponse=i.data.GiftCardMsg)):(t.base.giftCardValid=!1,t.base.UsedGiftCard=!1,i.data.GiftCardMsg&&(t.base.applyGCResponse=i.data.GiftCardMsg));i&&i.data&&t.gTagCheckoutProgress(i.data);t.base.paymentSelected!="paypal"&&t.disableSpinner();t.base.initTotal=!0;t.base.orderSummary.Total==0&&t.selectVoucher();t.reloading=!1;n.resolve(!0)},function(){t.reloading=!1;n.resolve(!0)}),n.promise};t.getGiftCardLines=function(){let n=[];for(let i=0;i<t.base.cartItems.length;i++)if(t.base.cartItems[i].GiftCardPurchaseDetails&&t.base.cartItems[i].GiftCardPurchaseDetails.length>0)for(let r=0;r<t.base.cartItems[i].GiftCardPurchaseDetails.length;r++)n.push(t.base.cartItems[i].GiftCardPurchaseDetails[r]);return n};t.createPaypalTransaction=function(){var i,n;if(t.enableSpinner(),t.base.paypalPaymentURL="",!t.base.recreatePaypalTransaction){t.loadingPaypal=!1;t.disableSpinner();return}i=-5;t.selectedShippingMethod&&(i=t.selectedShippingMethod.MethodID);n=-1;t.base.sameAddressBilling||(n=t.addressBillingID);let f=t.getGiftCardLines();return r({method:"POST",url:u.path().substring(0,3)+"/Shop/CreatePaypalTransaction",data:{ShippingMethodID:t.selectedShippingMethod.MethodID,AddressID:t.addressID,BillingAddressID:n,Currency:t.base.orderSummary.CurrencyCode,UsedPromoID:t.base.usedPromoID,UsedVoucherID:t.base.usedVoucherID,UsedGiftCardCode:t.base.usedGiftCardCode,SelectedGiftProductID:t.base.selectedGiftProductID,OrderNote:t.base.orderNote,GiftCardRecords:f}}).then(function(n){t.base.recreatePaypalTransaction=!1;for(let i=0;i<n.data.links.length;i++)if(n.data.links[i].rel=="approve"){t.base.paypalPaymentURL=n.data.links[i].href;window.location.href=t.base.paypalPaymentURL;break}t.loadingPaypal=!1},function(){t.disableSpinner()})};t.rateBeforeTax=function(n){return parseFloat(n/(1+t.base.taxRate/100)).toFixed(2)};t.calculateTaxAmount=function(n){return(n*(t.base.taxRate/100)).toFixed(2)};t.subTotalDiscount=function(){return t.base.subTotal-parseFloat(t.base.orderSummary.amount.breakdown.shipping_discount.value/(1+t.base.taxRate/100)).toFixed(2)};t.initializePayment=function(){totalAmount=t.base.stripeTotal;emailAddress=t.input.contactInfo.Email};t.createStripeOrder=function(n,i,f,e,o,s){r({method:"POST",url:u.path().substring(0,3)+"/Shop/PostNewOrder",data:{ShippingMethodID:t.selectedShippingMethod.MethodID,AddressID:t.addressID,PaymentType:n,PaymentID:i,RecieptURL:f,Currency:e,UsedPromoID:t.base.usedPromoID,UsedVoucherID:t.base.usedVoucherID,CCBrand:o,CCLast4Digits:s}}).then(function(){t.disableSpinner();window.location=u.path().substring(0,3)+"/Shop/Confirmation/"},function(){})};t.enterApplyGiftCardCode=function(n){n.keyCode==13&&t.applyGiftCardCode()};t.applyGiftCardCode=function(){if(t.base.applyGCResponse="",!t.base.giftCardCode||t.base.giftCardCode==""){t.base.applyGCResponse=invalidGiftCardMsg;t.base.giftCardValid=!1;return}t.enableSpinner();r({method:"POST",url:u.path().substring(0,3)+"/Shop/ValidateGiftCard",data:{giftCardCode:t.base.giftCardCode}}).then(function(n){t.base.usedGiftCardCode="";let i=n.data;n.data.IsGiftCard?i.HasExpired?(t.base.applyGCResponse=i.Message,t.base.giftCardValid=!1):(t.base.applyGCResponse=i.Message,t.base.giftCardValid=!0,t.base.usedGiftCardCode=i.GiftCardCode):(t.base.applyGCResponse=i.Message,t.base.giftCardValid=!1,t.base.usedGiftCardCode=!1);t.getCartItems()},function(){})};t.applyWelcomePromo=function(){t.base.promoCode="Welcome15";t.applyPromo()};t.enterApplyPromo=function(n){n.keyCode==13&&t.applyPromo()};t.applyPromo=function(){if(t.base.applyPromoResponse="",!t.base.promoCode||t.base.promoCode==""){t.base.applyPromoResponse=invalidPromoMsg;t.base.promoValid=!1;return}t.enableSpinner();r({method:"POST",url:u.path().substring(0,3)+"/Shop/ValidatePromoCode",data:{promoCode:t.base.promoCode,email:t.input.contactInfo.Email,customerID:t.customerID}}).then(function(n){t.base.usedVoucherID=0;t.base.usedPromoID=0;let i=n.data;i.HasExpired?(t.base.applyPromoResponse=i.Message,t.base.promoValid=!1,t.base.usedPromoID=0):(i.IsVoucher?t.base.usedVoucherID=i.PromoID:t.base.usedPromoID=i.PromoID,t.base.applyPromoResponse=i.Message,t.base.promoValid=!0);t.getCarriers(!0);t.getCartItems()},function(){})};t.selectPaypal=function(){t.loadingPaypal||(t.loadingPaypal=!0,t.base.invalidPayment=!1,t.base.paymentSelected="paypal",document.getElementById("paypalPaymentContainer").classList.add("paymentMethodSelected"),document.getElementById("stripePaymentContainer").classList.remove("paymentMethodSelected"),document.getElementById("voucherContinue").classList.remove("paymentMethodSelected"),document.getElementById("paypal-button-container").style.display="block",document.getElementById("paypal-button-container").style.pointerEvents="auto")};t.selectStripe=function(){t.base.invalidPayment=!1;t.base.paymentSelected="stripe";document.getElementById("stripePaymentContainer").classList.add("paymentMethodSelected");document.getElementById("paypalPaymentContainer").classList.remove("paymentMethodSelected");document.getElementById("voucherContinue").classList.remove("paymentMethodSelected");document.getElementById("paypal-button-container").style.display="none";document.getElementById("paypal-button-container").style.pointerEvents="none"};t.selectVoucher=function(){t.base.invalidPayment=!1;t.base.paymentSelected="voucher";document.getElementById("stripePaymentContainer").classList.remove("paymentMethodSelected");document.getElementById("paypalPaymentContainer").classList.remove("paymentMethodSelected");document.getElementById("voucherContinue").classList.add("paymentMethodSelected");document.getElementById("paypal-button-container").style.display="none";document.getElementById("paypal-button-container").style.pointerEvents="none"};t.clearPaymentSelection=function(){t.deleteAbandonedOrders();t.base.paymentSelected="";t.base.recreatePaypalTransaction=!0;document.getElementById("paypalPaymentContainer").classList.remove("paymentMethodSelected");document.getElementById("paypal-button-container").style.display="none";document.getElementById("paypal-button-container").style.pointerEvents="none";document.getElementById("stripePaymentContainer").classList.remove("paymentMethodSelected")};t.deleteAbandonedOrders=function(){r({method:"POST",url:u.path().substring(0,3)+"/Shop/DeleteAbandonedOrders",data:{}}).then(function(){},function(){})};t.continueStep4=function(){if(t.base.paymentSelected==""||!t.base.paymentSelected){t.base.invalidPayment=!0;return}t.base.paymentSelected=="paypal"?(t.enableSpinner(),t.base.recreatePaypalTransaction=!0,t.createPaypalTransaction()):t.base.paymentSelected=="stripe"?(t.enableSpinner(),t.createStripeOrder()):t.base.paymentSelected=="voucher"&&(t.enableSpinner(),t.createVoucherOrder())};t.createVoucherOrder=function(){r({method:"POST",url:u.path().substring(0,3)+"/Shop/CreateVoucherOrder",data:{ShippingMethodID:t.selectedShippingMethod.MethodID,AddressID:t.addressID,BillingAddressID:t.addressBillingID,Currency:t.base.orderSummary.CurrencyCode,UsedPromoID:t.base.usedPromoID,UsedVoucherID:t.base.usedVoucherID,UsedGiftCardCode:t.base.usedGiftCardCode,PaymentType:"Voucher",PaymentID:"",SelectedGiftProductID:t.base.selectedGiftProductID,OrderNote:t.base.orderNote}}).then(function(n){window.location.href=u.path().substring(0,3)+"/Shop/Confirmation/"+n.data.OrderRefID},function(){})};t.createStripeOrder=function(){let n=t.getGiftCardLines();r({method:"POST",url:u.path().substring(0,3)+"/Shop/CreateStripeOrderSession",data:{ShippingMethodID:t.selectedShippingMethod.MethodID,AddressID:t.addressID,BillingAddressID:t.addressBillingID,Currency:t.base.orderSummary.CurrencyCode,UsedPromoID:t.base.usedPromoID,UsedVoucherID:t.base.usedVoucherID,UsedGiftCardCode:t.base.usedGiftCardCode,PaymentType:"Stripe",PaymentID:"",SelectedGiftProductID:t.base.selectedGiftProductID,OrderNote:t.base.orderNote,GiftCardRecords:n}}).then(function(n){stripe.redirectToCheckout({sessionId:n.data.Id}).then(function(){})},function(){})};t.finalizeOrder=function(){r({method:"POST",url:u.path().substring(0,3)+"/Shop/FinalizeOrderRecord",data:{axOrderNo:t.base.PaymentOrderNo}}).then(function(n){n.data.PaymentSuccess&&(window.location.href=u.path().substring(0,3)+"/Shop/Confirmation/"+n.data.OrderRefID)},function(){})};t.finalizeOrderPaypal=function(n){r({method:"POST",url:u.path().substring(0,3)+"/Shop/FinalizeRecordPaypal",data:{paypalTransID:n}}).then(function(n){n.data.PaymentSuccess&&(window.location.href=u.path().substring(0,3)+"/Shop/Confirmation/"+n.data.OrderRefID)},function(){})};t.firstCharUpper=function(n){if(n!==null)return n.charAt(0).toUpperCase()+n.slice(1)};t.getCartCounter=function(){r({method:"GET",url:u.path().substring(0,3)+"/Shop/GetCartCount"}).then(function(n){n.data&&(document.getElementById("cartitemCount").innerText=n.data)},function(){})};t.closeNotification=function(){document.getElementById("ecomCheckoutCtrl").classList.add("mt-3")};t.selectPromoGiftProduct=function(n,i){n.PromoID=i;let r=-1;for(let n=0;n<t.base.selectedGiftProductID.length;n++)if(t.base.selectedGiftProductID[n].PromoID==i){r=n;break}r!=-1&&t.base.selectedGiftProductID.splice(r,1);t.base.selectedGiftProductID.push(n);t.base.selectedGiftSpecs=[];for(let i=0;i<t.base.promoProducts.length;i++)for(let r=0;r<t.base.promoProducts[i].length;r++)if(t.base.promoProducts[i][r].ProductID==n.ProductID){t.base.selectedGiftSpecs.push(t.base.selectedGiftProductID);return}};t.isSelectedGiftItem=function(n,i){for(let r=0;r<t.base.selectedGiftProductID.length;r++)if(t.base.selectedGiftProductID[r].ProductID==n.ProductID&&t.base.selectedGiftProductID[r].PromoID==i)return!0;return!1};t.fillAddressErrors=function(n){for(let i=0;i<n.data.Errors.length;i++)n.data.Errors[i].Key==="Alias"&&(t.addressValidation.Alias=n.data.Errors[i].ErrorMsg),n.data.Errors[i].Key==="FirstName"?t.addressValidation.FirstName=n.data.Errors[i].ErrorMsg:n.data.Errors[i].Key==="LastName"?t.addressValidation.LastName=n.data.Errors[i].ErrorMsg:n.data.Errors[i].Key==="Address"?t.addressValidation.Address1=n.data.Errors[i].ErrorMsg:n.data.Errors[i].Key==="Address2"?t.addressValidation.Address2=n.data.Errors[i].ErrorMsg:n.data.Errors[i].Key==="City"?t.addressValidation.City=n.data.Errors[i].ErrorMsg:n.data.Errors[i].Key==="PostalCode"?t.addressValidation.PostalCode=n.data.Errors[i].ErrorMsg:n.data.Errors[i].Key==="PhoneNumber"?t.addressValidation.PhoneNo=n.data.Errors[i].ErrorMsg:n.data.Errors[i].Key==="Email"?t.addressValidation.Email=n.data.Errors[i].ErrorMsg:n.data.Errors[i].Key==="Alias"?t.addressValidation.Alias=n.data.Errors[i].ErrorMsg:n.data.Errors[i].Key==="IdentificationNo"?t.addressValidation.IdentificationNo=n.data.Errors[i].ErrorMsg:n.data.Errors[i].Key==="UnitNo"?t.addressValidation.UnitNo=n.data.Errors[i].ErrorMsg:n.data.Errors[i].Key==="ValidationFailed"&&(t.addressValidation.validationFailed=n.data.Errors[i].ErrorMsg)};t.transferCartToRetailerPortal=function(){r({method:"POST",url:u.path().substring(0,3)+"/Retailer/TransferCartToRetailerCart",data:{}}).then(function(){window.location.href=u.path().substring(0,3)+"/Retailer/Catalog?openCart=1"},function(){})};t.sumStockAlertQty=function(n){let i=0;for(let r=0;r<t.base.cartItems.length;r++)(t.base.cartItems[r].ProductID=n)&&(i=i+t.base.cartItems[r].Quantity);return i};t.changeItalianID=function(){}}]);paperblanksCtrls.controller("EcomMyCartCtrl",["$rootScope","$scope","$http","$location","$timeout",function(n,t,i,r){t.base=[];t.base.cartItems=[];t.base.suggestedItems=[];t.language=r.path().substring(0,3);t.base.currencySymbol="";t.base.currencyCode="";t.cartItemsReady=!1;t.freeShippingAmnt=50;t.cartQuantity=0;t.numberOfFreebies=0;t.forgotPasswordToggle=!1;t.base.giftItems=[];t.recoveryEmail="";t.recoveryErrors=[];t.passwordRecoveryMsg=!1;t.base.categoryBogos=[];t.stock=0;t.product=[];t.base.giftBagInCart=!1;t.base.midiBoxInCart=!1;t.base.ultraBoxInCart=!1;t.base.giftPouchInCart=!1;t.base.selectedBoxSize="Midi";t.base.giftBagPrice=0;t.base.giftBagStock=0;t.base.giftBagCopy="";t.base.giftBoxMidiCopy="";t.base.giftBoxUltraCopy="";t.base.giftPouchCopy="";t.base.giftBagName="";t.base.boxMidiName="";t.base.boxUltraName="";t.base.giftPouchName="";t.base.giftBoxMidiPrice=0;t.base.giftBoxMidiStock=0;t.base.giftBoxUltraPrice=0;t.base.giftBoxUltraStock=0;t.base.giftPouchPrice=0;t.base.giftPouchStock=0;t.base.discountedSuggestion=[];t.base.DiscountedPromo=[];t.base.has13or18MDPs=!0;t.init=function(){t.enableSpinner();t.getCartInit()};t.getCartInit=function(){i({method:"POST",url:r.path().substring(0,3)+"/Shop/MyCartInit",data:{}}).then(function(n){t.freeShippingAmnt=n.data.FreeShippingLimit;t.base.suggestedItems=n.data.SuggestedItems;n.data.CartItems&&t.processCartItems(n.data.CartItems);n.data.GiftADProducts&&t.processGiftADProducts(n.data.GiftADProducts)},function(){})};t.getGiftADProducts=function(){i({method:"GET",url:r.path().substring(0,3)+"/Shop/GetGiftProducts"}).then(function(n){console.log(n.data);t.processGiftADProducts(n.data)},function(n){console.log(n.statusText)})};t.processGiftADProducts=function(n){for(let i=0;i<n.Products.length;i++)n.Products[i].ProductID=="AD1346-8"&&(t.base.giftBoxMidiPrice=n.Products[i].SelectedPrice.toFixed(2),t.base.giftBoxMidiCopy=n.Products[i].Story,t.base.boxMidiName=n.Products[i].ProductName),n.Products[i].ProductID=="AD1345-1"&&(t.base.giftBoxUltraPrice=n.Products[i].SelectedPrice.toFixed(2),t.base.giftBoxUltraCopy=n.Products[i].Story,t.base.boxUltraName=n.Products[i].ProductName),n.Products[i].ProductID=="AD1525-7"&&(t.base.giftBagPrice=n.Products[i].SelectedPrice.toFixed(2),t.base.giftBagCopy=n.Products[i].Story,t.base.giftBagName=n.Products[i].ProductName),n.Products[i].ProductID=="AD1742-8"&&(t.base.giftPouchPrice=n.Products[i].SelectedPrice.toFixed(2),t.base.giftPouchCopy=n.Products[i].Story,t.base.giftPouchName=n.Products[i].ProductName);for(let i=0;i<n.Stock.length;i++)n.Stock[i].ProductID=="AD1346-8"&&(t.base.giftBoxMidiStock=n.Stock[i].AvailableStock),n.Stock[i].ProductID=="AD1345-1"&&(t.base.giftBoxUltraStock=n.Stock[i].AvailableStock),n.Stock[i].ProductID=="AD1525-7"&&(t.base.giftBagStock=n.Stock[i].AvailableStock),n.Stock[i].ProductID=="AD1742-8"&&(t.base.giftPouchStock=n.Stock[i].AvailableStock)};t.getStock=function(){var n=t.selectedCompany=="HMP"||t.selectedCompany=="PAM"?t.product.HMPAXNo:t.product.IREAXNo;i({method:"GET",url:r.path().substring(0,3)+"/Shop/GetAXProductStock?axProductID="+n}).then(function(n){t.stock=n.data},function(){t.stock=0})};t.boxID="AD1183-9";t.addToCart=function(){t.productAlreadyInCart=!0;setTimeout(function(){i({method:"POST",url:r.path().substring(0,3)+"/Shop/AddProductToCart",data:{productID:t.boxID,quantity:1}}).then(function(){location.reload()},function(){})},500)};t.transferCartToRetailerPortal=function(){i({method:"POST",url:r.path().substring(0,3)+"/Retailer/TransferCartToRetailerCart",data:{}}).then(function(){window.location.href=r.path().substring(0,3)+"/Retailer/Catalog?openCart=1"},function(){})};t.loadLogin=function(){loadLogin()};t.sendRecoveryAttempt=function(){t.enableSpinner();i({method:"POST",url:r.path().substring(0,3)+"/Account/ForgotPasswordAjax",data:{email:t.recoveryEmail,gCaptcha:grecaptcha.getResponse()}}).then(function(n){var r,i;if(t.disableSpinner(),t.recoveryErrors=[],n.data.Success){for(t.passwordRecoveryMsg=!0,t.recoveryEmail="",r=$(".g-recaptcha").length,i=0;i<r;i++)grecaptcha.reset(i);t.recoveryErrors=[];t.goToLogin()}else t.recoveryErrors=n.data.Errors},function(){})};t.goToForgotPassword=function(){t.forgotPasswordToggle=!0};t.goToLogin=function(){t.forgotPasswordToggle=!1};t.getCartCounter=function(){i({method:"GET",url:r.path().substring(0,3)+"/Shop/GetCartCount"}).then(function(n){n.data&&(document.getElementById("cartitemCount").innerText=n.data)},function(){})};t.increaseQty=function(n,i){if(i!=99){for(let i=0;i<t.base.cartItems.length;i++){if(t.base.cartItems[i].ProductID==n&&!t.base.cartItems[i].IsBogo){if(t.hasBogo(n)){t.base.cartItems[i].Quantity=t.base.cartItems[i].Quantity+1;t.setNewRecordQty(n,t.base.cartItems[i].Quantity+t.getBogoQuantity(n));return}t.base.cartItems[i].Quantity=t.base.cartItems[i].Quantity+1;t.setNewRecordQty(n,t.base.cartItems[i].Quantity);return}if(t.base.cartItems[i].ProductID==n&&t.base.cartItems[i].IsBogo){t.base.cartItems[i].Quantity=t.base.cartItems[i].Quantity+1;t.setNewRecordQty(n,t.base.cartItems[i].Quantity);return}}for(let i=0;i<t.base.cartItems.length;i++)if(t.base.cartItems[i].ProductID==n&&t.base.cartItems[i].IsBogo){t.base.cartItems[i].Quantity=t.base.cartItems[i].Quantity+1;t.setNewRecordQty(n,t.base.cartItems[i].Quantity);return}}};t.decreaseQty=function(n,i){var r=i;if(!(r<=1)||t.hasBogo(n)){for(let i=0;i<t.base.cartItems.length;i++){if(t.base.cartItems[i].ProductID==n&&!t.base.cartItems[i].IsBogo){if(t.hasBogo(n)){t.base.cartItems[i].Quantity=t.base.cartItems[i].Quantity-1;t.setNewRecordQty(n,t.base.cartItems[i].Quantity+t.getBogoQuantity(n));return}t.base.cartItems[i].Quantity=t.base.cartItems[i].Quantity-1;t.setNewRecordQty(n,t.base.cartItems[i].Quantity);return}if(t.base.cartItems[i].ProductID==n&&t.base.cartItems[i].IsBogo){t.base.cartItems[i].Quantity=t.base.cartItems[i].Quantity-1;t.setNewRecordQty(n,t.base.cartItems[i].Quantity);return}}for(let i=0;i<t.base.cartItems.length;i++)if(t.base.cartItems[i].ProductID==n&&t.base.cartItems[i].IsBogo){t.base.cartItems[i].Quantity=t.base.cartItems[i].Quantity-1;t.setNewRecordQty(n,t.base.cartItems[i].Quantity);return}}};t.hasBogo=function(n){for(let i=0;i<t.base.cartItems.length;i++)if(t.base.cartItems[i].IsBogo&&t.base.cartItems[i].ProductID==n)return!0;return!1};t.hasBogoParent=function(n){for(let i=0;i<t.base.cartItems.length;i++)if(t.base.cartItems[i].ProductID==n&&t.base.cartItems[i].IsBogo)return t.base.cartItems[i].HasBogoParent;return!0};t.getBogoQuantity=function(n){for(let i=0;i<t.base.cartItems.length;i++)if(t.base.cartItems[i].ProductID==n&&t.base.cartItems[i].IsBogo)return t.base.cartItems[i].Quantity};t.setNewRecordQty=function(n,u){var f=parseInt(u);if(!f||f<1||isNaN(f)||f>99)for(let i=0;i<t.base.cartItems.length;i++)if(t.base.cartItems[i].ProductID==n){t.base.cartItems[i].Quantity=1;u=t.base.cartItems[i].Quantity;break}t.enableSpinner();i({method:"POST",url:r.path().substring(0,3)+"/Shop/ChangeProductCartQty",data:{productID:n,newQty:parseInt(u)}}).then(function(){t.getCartItems()},function(){})};t.getCartItems=function(){i({method:"GET",url:r.path().substring(0,3)+"/Shop/GetCartItems"}).then(function(n){t.processCartItems(n.data)},function(){})};t.processCartItems=function(n){t.base.categoryBogos=n.CategoryBOGOs;t.base.cartItems=n.Items;t.base.AdjustedItems=n.AdjustedItems;t.base.currencySymbol=n.CurrencySymbol;t.base.currencyCode=n.CurrencyCode;t.base.giftItems=n.GiftProducts.Products;console.log(t.base.giftItems);t.cartQuantity=n.CartItemQuantity;t.numberOfFreebies=n.NumberOfFreebies;t.base.discountedSuggestion=n.SuggestedDiscountedItems;t.base.DiscountedPromo=n.Discounted;t.base.has13or18MDPs=n.Has13or18MDP;t.base.DiscountedPromo&&t.base.DiscountedPromo.DiscountAmount&&(t.base.DiscountedPromo.DiscountAmount=t.base.DiscountedPromo.DiscountAmount.toFixed(2));t.base.DiscountedPromo;t.calculateNewSubtotal();t.cartItemsReady=!0;n.QuantityAdjusted&&document.getElementById("openCartAdjustmentModal").click();isRetailer=="True"&&document.getElementById("openretailerWarningModal").click();t.giftInCart()};t.inCart=function(n){for(let i=0;i<t.base.cartItems.length;i++)if(t.base.cartItems[i].ProductID==n)return!0;return!1};t.addItemToCart=function(n){t.enableSpinner();setTimeout(function(){i({method:"POST",url:r.path().substring(0,3)+"/Shop/AddProductToCart",data:{productID:n,quantity:1}}).then(function(n){n.data.Success&&(document.getElementById("cartitemCount").innerText=n.data.Quantity,t.disableSpinner(),t.getCartItems(),n.data.RecordID!=0&&t.gTagAddCart(n.data))},function(){})},500)};t.addGiftBagPouchToCart=function(n){t.enableSpinner();setTimeout(function(){i({method:"POST",url:r.path().substring(0,3)+"/Shop/AddProductToCart",data:{productID:n,quantity:1}}).then(function(n){n.data.Success&&(document.getElementById("cartitemCount").innerText=n.data.Quantity,t.disableSpinner(),t.getCartItems(),n.data.RecordID!=0&&t.gTagAddCart(n.data))},function(){})},500)};t.addGiftBagToCart=function(){t.enableSpinner();setTimeout(function(){i({method:"POST",url:r.path().substring(0,3)+"/Shop/AddProductToCart",data:{productID:"AD1525-7",quantity:1}}).then(function(n){n.data.Success&&(document.getElementById("cartitemCount").innerText=n.data.Quantity,t.disableSpinner(),t.getCartItems(),n.data.RecordID!=0&&t.gTagAddCart(n.data))},function(){})},500)};t.addBoxToCart=function(){t.enableSpinner();setTimeout(function(){i({method:"POST",url:r.path().substring(0,3)+"/Shop/AddProductToCart",data:{productID:"AD1346-8",quantity:1}}).then(function(n){n.data.Success&&(document.getElementById("cartitemCount").innerText=n.data.Quantity,t.disableSpinner(),t.getCartItems(),n.data.RecordID!=0&&t.gTagAddCart(n.data))},function(){})},500)};t.addUltraBoxToCart=function(){t.enableSpinner();setTimeout(function(){i({method:"POST",url:r.path().substring(0,3)+"/Shop/AddBoxUltraToCart",data:{}}).then(function(n){n.data.Success&&(document.getElementById("cartitemCount").innerText=n.data.Quantity,t.disableSpinner(),t.getCartItems(),n.data.RecordID!=0&&t.gTagAddCart(n.data))},function(){})},500)};t.changeGiftBoxSize=function(){};t.giftInCart=function(){let n=!1,i=!1,r=!1,u=!1,f=0,e=0;for(let o=0;o<t.base.cartItems.length;o++)t.base.cartItems[o].ProductID=="AD1525-7"?(t.base.giftBagInCart=!0,n=!0):t.base.cartItems[o].ProductID=="AD1346-8"?(t.base.midiBoxInCart=!0,r=!0,f=t.base.cartItems[o].Quantity):t.base.cartItems[o].ProductID=="AD1345-1"?(t.base.ultraBoxInCart=!0,u=!0,e=t.base.cartItems[o].Quantity):t.base.cartItems[o].ProductID=="AD1742-8"&&(t.base.giftPouchInCart=!0,i=!0);n||(t.base.giftBagInCart=!1);r||(t.base.midiBoxInCart=!1);u||(t.base.ultraBoxInCart=!1);i||(t.base.giftPouchInCart=!1)};t.gTagAddCart=function(n){window.dataLayer=window.dataLayer||[];dataLayer.push({event:"add_to_cart",ecommerce:{items:[{item_id:n.Product.ID,item_name:n.Product.Name,item_brand:"Paperblanks",item_category:n.Product.Category,item_variant:n.Product.Variant,quantity:n.Product.Quantity,price:n.Product.Price}]}})};t.deleteCartRecord=function(n){t.enableSpinner();i({method:"POST",url:r.path().substring(0,3)+"/Shop/RemoveCartItem",data:{recordID:n}}).then(function(n){n.data.Success&&(t.gTagRemoveCart(n.data),t.getCartItems())},function(){})};t.gTagRemoveCart=function(n){return n&&n.Product&&n.Product.ID&&(window.dataLayer=window.dataLayer||[],dataLayer.push({event:"remove_from_cart",items:[{id:n.Product.ID,name:n.Product.Name,brand:"Paperblanks",category:n.Product.Category,variant:n.Product.Variant,quantity:n.Product.Quantity,price:n.Product.Price}]})),!0};t.calculateNewSubtotal=function(){var n=0;for(let i=0;i<t.base.cartItems.length;i++)n=t.base.cartItems[i].OnSale?parseFloat(parseFloat(n)+t.base.cartItems[i].SalePrice*t.base.cartItems[i].Quantity).toFixed(2):parseFloat(parseFloat(n)+t.base.cartItems[i].Price*t.base.cartItems[i].Quantity).toFixed(2);t.base.subtotal=parseFloat(n).toFixed(2);t.freeShippingLeft=parseFloat(t.freeShippingAmnt-t.base.subtotal).toFixed(2);t.getCartCounter();t.disableSpinner()};t.getFreeShippingLimit=function(){i({method:"POST",url:r.path().substring(0,3)+"/Shop/GetFreeShippingLimit",data:{}}).then(function(n){t.freeShippingAmnt=n.data;t.getCartItems()},function(){t.getCartItems()})};t.getSuggestedProducts=function(){i({method:"POST",url:r.path().substring(0,3)+"/Shop/GetSuggestedItems",data:{}}).then(function(n){t.base.suggestedItems=n.data;t.disableSpinner()},function(){})};t.enableSpinner=function(){document.getElementById("divLoading").style.display="block"};t.disableSpinner=function(){document.getElementById("divLoading").style.display="none"};t.hasRemain=function(n,i,r){return n.includes("%REMAINAMOUNT%")&&(t.base.subtotal>=r?n=i:(r=(r-t.base.subtotal).toFixed(2),n=n.replace("%REMAINAMOUNT%",t.base.currencySymbol+r))),n};t.getRemain=function(n){return n=(n-t.base.subtotal).toFixed(2),t.base.currencySymbol+n};t.sumStockAlertQty=function(n){let i=0;for(let r=0;r<t.base.cartItems.length;r++)(t.base.cartItems[r].ProductID=n)&&(i=i+t.base.cartItems[r].Quantity);return i}}]);paperblanksCtrls.controller("EcomOrderDetails",["$rootScope","$scope","$http","$location",function(n,t){t.base=[];t.base.selectedGiftCard=[];t.init=function(){console.log("ready")};t.selectGiftCard=function(n,i,r,u,f){t.base.selectedGiftCard.email=n;t.base.selectedGiftCard.giftcardCode=i;t.base.selectedGiftCard.balance=r;t.base.selectedGiftCard.currency=u;t.base.selectedGiftCard.thumbnail=f}}]);paperblanksCtrls.controller("EcomOrderHistory",["$rootScope","$scope","$http","$location",function(n,t,i,r){t.page=0;t.base=[];t.base.orders=[];t.base.infScrollBusy=!1;t.base.doneInfScroll=!1;t.base.languageCode=r.path().substring(0,3);t.base.pageReady=!1;t.base.sortByFilter=[];t.base.orderStatusFilter=[];t.base.selectedSortByFilter=[];t.base.selectedOrderStatusFilter=[];t.base.filterKeyword="";t.base.numberOfOrders=0;t.init=function(){t.getFilters()};t.loadPopper=function(){loadPoppers()};t.getOrders=function(){t.base.infScrollBusy||t.base.doneInfScroll||(t.base.infScrollBusy=!0,t.enableSpinner(),i({method:"POST",url:r.path().substring(0,3)+"/Shop/GetOrders",data:{page:t.page,orderStatusFilterID:t.base.selectedOrderStatusFilter.FilterID,sortByFilterID:t.base.selectedSortByFilter.FilterID,searchKeyword:t.base.filterKeyword}}).then(function(n){t.page==0?(t.base.orders=n.data.Orders,t.base.pageReady=!0):t.base.orders=t.base.orders.concat(n.data.Orders);n.data.Orders.length<=0&&(t.base.doneInfScroll=!0);t.page=t.page+1;t.base.infScrollBusy=!1;t.disableSpinner();loadPoppers()},function(){}))};t.getFilters=function(){i({method:"POST",url:r.path().substring(0,3)+"/Shop/GetOrderHistoryFilters",data:{}}).then(function(n){t.base.orderStatusFilter=n.data.OrderStatusFilter;t.base.sortByFilter=n.data.SortByFilter;t.base.selectedOrderStatusFilter=t.base.orderStatusFilter[0];t.base.selectedSortByFilter=t.base.sortByFilter[0];t.base.numberOfOrders=n.data.OrderCount;t.getOrders()},function(){})};t.submitSearchKeyword=function(){event.keyCode==13&&t.changeFilter()};t.changeFilter=function(){t.page=0;t.base.doneInfScroll=!1;t.getOrders()};t.enableSpinner=function(){document.getElementById("divLoading").style.display="block"};t.disableSpinner=function(){document.getElementById("divLoading").style.display="none"}}]);paperblanksCtrls.controller("EcomSaleCtrl",["$rootScope","$scope","$http","$location",function(n,t,i,r){var u=window.location.pathname.split("/");t.base=[];t.base.page=0;t.base.salesProducts=[];t.filters=[];t.filters.productCategories=[];t.filters.selectedProductCategory=[];t.filters.selectedProductCategory.ID=u[4]===undefined||u[4]===""?0:u[4];t.currentFilters=[];t.filters.selectedSeries=[];t.filters.selectedSeries.Slug=u[5]===undefined||u[5]===""?"all":u[5].replace("series-","");t.filters.selectedFormat=[];t.filters.selectedFormat.Slug=u[6]===undefined||u[6]===""?"all":u[6].replace("format-","");t.filters.selectedInterior=[];t.filters.selectedInterior.Slug=u[7]===undefined||u[7]===""?"all":u[7].replace("interior-","");t.filters.selectedTheme=[];t.filters.selectedTheme.Slug=u[8]===undefined||u[8]===""?"all":u[8].replace("theme-","");t.filters.selectedCollection=[];t.filters.selectedCollection.Slug="all";t.filters.selectedSortBy=[];t.filters.selectedSortBy.ID=u[9]===undefined||u[9]===""?1:u[9].replace("sortby-","");t.closureCheckList=[];t.selectedClosures=[];t.colourCheckList=[];t.selectedColours=[];t.pageCheckList=[];t.selectedPageCount=[];t.gsmCheckList=[];t.selectedGSM=[];t.doneInfScroll=!1;t.busyScroll=!1;t.resetProducts=!0;t.firstFilter=!0;t.doneFirstRun=!1;t.upToPercentage=0;t.setFilterByURL=function(){t.filters.selectedProductCategory.ID=u[4]===undefined||u[4]===""?0:u[4];t.filters.selectedSeries.Slug=u[5]===undefined||u[5]===""?"all":u[5].replace("series-","");t.filters.selectedFormat.Slug=u[6]===undefined||u[6]===""?"all":u[6].replace("format-","");t.filters.selectedInterior.Slug=u[7]===undefined||u[7]===""?"all":u[7].replace("interior-","");t.filters.selectedSortBy.ID=u[9]===undefined||u[9]===""?1:u[9].replace("sortby-","")};t.lang=u[1]===undefined||u[1]===""?"en":u[1];t.init=function(){t.enableSpinner();t.checkRouteFilter();t.getProductCategories()};t.checkRouteFilter=function(){t.firstFilter=t.filters.selectedProductCategory.ID==0&&t.filters.selectedSeries.Slug=="all"&&t.filters.selectedFormat.Slug=="all"&&t.filters.selectedInterior.Slug=="all"&&t.filters.selectedSortBy.ID==7?!0:!1};t.getProductCategories=function(){i({method:"GET",url:r.path().substring(0,3)+"/Shop/GetProductCategories/",data:{}}).then(function(n){if(t.filters.productCategories=n.data,t.filters.selectedProductCategory.ID==0)t.filters.selectedProductCategory=t.filters.productCategories[0];else{let n=!1;for(let i=0;i<t.filters.productCategories.length;i++)if(t.filters.productCategories[i].ID==t.filters.selectedProductCategory.ID){t.filters.selectedProductCategory=t.filters.productCategories[i];n=!0;break}n}t.getFilters()},function(){})};t.changeProductCategory=function(n){for(let i=0;i<t.filters.productCategories.length;i++)if(t.filters.productCategories[i].ID==n){t.filters.selectedProductCategory=t.filters.productCategories[i];break}t.base.page=0;t.firstFilter=!0;t.reloadProducts=!0;t.getFilters()};t.resetMoreFilters=function(){t.closureCheckList=[];t.selectedClosures=[];t.colourCheckList=[];t.selectedColours=[];t.pageCheckList=[];t.selectedPageCount=[];t.gsmCheckList=[];t.selectedGSM=[]};t.changeSeries=function(n){for(let i=0;i<t.filters.series.length;i++)if(t.filters.series[i].Slug==n){t.filters.selectedSeries=t.filters.series[i];break}t.doneInfScroll=!1;t.base.page=0;t.resetProducts=!0;t.getFilters()};t.changeCollection=function(n){for(let i=0;i<t.filters.collections.length;i++)if(t.filters.collections[i].Slug==n){t.filters.selectedCollection=t.filters.collections[i];break}t.doneInfScroll=!1;t.base.page=0;t.resetProducts=!0;t.getSaleProducts()};t.changeFormat=function(n){for(let i=0;i<t.filters.formats.length;i++)if(t.filters.formats[i].Slug==n){t.filters.selectedFormat=t.filters.formats[i];break}t.doneInfScroll=!1;t.base.page=0;t.resetProducts=!0;t.getFilters()};t.changeInterior=function(n){for(let i=0;i<t.filters.interiors.length;i++)if(t.filters.interiors[i].Slug==n){t.filters.selectedInterior=t.filters.interiors[i];break}t.doneInfScroll=!1;t.base.page=0;t.resetProducts=!0;t.getFilters()};t.changeTheme=function(n){for(let i=0;i<t.filters.themes.length;i++)if(t.filters.themes[i].Slug==n){t.filters.selectedTheme=t.filters.themes[i];break}t.doneInfScroll=!1;t.base.page=0;t.resetProducts=!0;t.getFilters()};t.changeSortBy=function(n){for(let i=0;i<t.filters.sortBy.length;i++)if(t.filters.sortBy[i].ID==n){t.filters.selectedSortBy=t.filters.sortBy[i];break}t.doneInfScroll=!1;t.base.page=0;t.resetProducts=!0;t.getSaleProducts()};t.filterCheckList=function(n,i){var r=[];Object.keys(i).map(function(n){i[n]===!0&&r.push(n)});switch(n){case"colour":t.selectedColours=r;break;case"page":t.selectedPageCount=r;break;case"gsm":t.selectedGSM=r;break;case"closure":t.selectedClosures=r}t.base.page=0;t.resetProducts=!0;t.doneInfScroll=!1;t.getSaleProducts()};t.clearFilterCheckList=function(){t.closureCheckList=[];t.selectedClosures=[];t.colourCheckList=[];t.selectedColours=[];t.pageCheckList=[];t.selectedPageCount=[];t.gsmCheckList=[];t.selectedGSM=[]};t.getFilters=function(){i({method:"POST",url:r.path().substring(0,3)+"/Shop/GetFiltersAjax/",data:{categoryID:t.filters.selectedProductCategory.ID,seriesSlug:t.filters.selectedSeries.Slug?t.filters.selectedSeries.Slug:"all",formatSlug:t.filters.selectedFormat.Slug?t.filters.selectedFormat.Slug:"all",interiorSlug:t.filters.selectedInterior.Slug?t.filters.selectedInterior.Slug:"all",themeSlug:t.filters.selectedTheme.Slug?t.filters.selectedTheme.Slug:"all",changedCategory:t.firstFilter}}).then(function(n){var u,f,e,o,r,i;t.currentFilters=n.data;t.filters.series=[];t.filters.series=t.currentFilters.Series;i=!1;for(let n=0;n<t.filters.series.length;n++)if(t.filters.series[n].Slug==t.filters.selectedSeries.Slug){t.filters.selectedSeries=t.filters.series[n];i=!0;break}(!i||t.firstFilter)&&(t.filters.selectedSeries=t.filters.series[0]);i=!1;t.filters.formats=[];t.filters.formats=t.currentFilters.Formats;i=!1;for(let n=0;n<t.filters.formats.length;n++)if(t.filters.formats[n].Slug==t.filters.selectedFormat.Slug){t.filters.selectedFormat=t.filters.formats[n];i=!0;break}(!i||t.firstFilter)&&(t.filters.selectedFormat=t.filters.formats[0]);i=!1;t.filters.interiors=[];t.filters.interiors=t.currentFilters.Interiors;i=!1;for(let n=0;n<t.filters.interiors.length;n++)if(t.filters.interiors[n].Slug==t.filters.selectedInterior.Slug){t.filters.selectedInterior=t.filters.interiors[n];i=!0;break}(!i||t.firstFilter)&&(t.filters.selectedInterior=t.filters.interiors[0]);i=!1;t.filters.themes=[];t.filters.themes=t.currentFilters.Themes;i=!1;for(let n=0;n<t.filters.themes.length;n++)if(t.filters.themes[n].Slug==t.filters.selectedTheme.Slug){t.filters.selectedTheme=t.filters.themes[n];i=!0;break}(!i||t.firstFilter)&&(t.filters.selectedTheme=t.filters.themes[0]);i=!1;t.filters.collections=[];t.filters.collections=t.currentFilters.Collections;t.filters.selectedCollection=t.filters.collections[0];t.filters.colours=[];t.filters.colours=t.currentFilters.Colours;t.colourCheckList=[];t.removeIndex=[];for(let n=0;n<t.selectedColours.length;n++){u=!1;for(let i=0;i<t.filters.colours.length;i++)if(t.filters.colours[i]==t.selectedColours[n]){u=!0;break}u?t.colourCheckList[t.selectedColours[n]]=!0:t.removeIndex.push(t.selectedColours[n])}for(let n=0;n<t.removeIndex.length;n++)r=t.selectedColours.indexOf(t.removeIndex[n]),r!==-1&&t.selectedColours.splice(r,1);t.filters.GSMs=[];t.filters.GSMs=t.currentFilters.GSM;t.gsmCheckList=[];t.removeIndex=[];for(let n=0;n<t.selectedGSM.length;n++){f=!1;for(let i=0;i<t.filters.GSMs.length;i++)if(t.filters.GSMs[i]==t.selectedGSM[n]){f=!0;break}f?t.gsmCheckList[t.selectedGSM[n]]=!0:t.removeIndex.push(t.selectedGSM[n])}for(let n=0;n<t.removeIndex.length;n++)r=t.selectedGSM.indexOf(t.removeIndex[n]),r!==-1&&t.selectedGSM.splice(r,1);t.filters.pageCount=[];t.filters.pageCount=t.currentFilters.PageCount;t.pageCheckList=[];t.removeIndex=[];for(let n=0;n<t.selectedPageCount.length;n++){e=!1;for(let i=0;i<t.filters.pageCount.length;i++)if(t.filters.pageCount[i]==t.selectedPageCount[n]){e=!0;break}e?t.pageCheckList[t.selectedPageCount[n]]=!0:t.removeIndex.push(t.selectedPageCount[n])}for(let n=0;n<t.removeIndex.length;n++)r=t.selectedPageCount.indexOf(t.removeIndex[n]),r!==-1&&t.selectedPageCount.splice(r,1);t.filters.closures=[];t.filters.closures=t.currentFilters.Closures;t.closureCheckList=[];t.removeIndex=[];for(let n=0;n<t.selectedClosures.length;n++){o=!1;for(let i=0;i<t.filters.closures.length;i++)if(t.filters.closures[i]==t.selectedClosures[n]){o=!0;break}o?t.closureCheckList[t.selectedClosures[n]]=!0:t.removeIndex.push(t.selectedClosures[n])}for(let n=0;n<t.removeIndex.length;n++)r=t.selectedClosures.indexOf(t.removeIndex[n]),r!==-1&&t.selectedClosures.splice(r,1);t.filters.sortBy=t.currentFilters.Sorts;i=!1;for(let n=0;n<t.filters.sortBy.length;n++)if(t.filters.sortBy[n].ID==t.filters.selectedSortBy.ID){t.filters.selectedSortBy=t.filters.sortBy[n];i=!0;break}i||(t.filters.selectedSortBy=t.filters.sortBy[0]);i=!1;t.filterReady=!0;t.firstFilter?(t.doneInfScroll=!1,t.resetProducts=!0,t.getSaleProducts(),t.firstFilter=!1):t.resetProducts&&t.getSaleProducts()},function(n){console.log(n.statusText)})};t.setURLFilter=function(){var n=t.lang+"/shop/sale";n=t.filters.selectedProductCategory.ID?n+"/"+t.filters.selectedProductCategory.ID:n+"/0";t.filters.selectedSeries.Slug&&(n=n+"/series-"+t.filters.selectedSeries.Slug);t.filters.selectedFormat.Slug&&(n=n+"/format-"+t.filters.selectedFormat.Slug);t.filters.selectedInterior.Slug&&(n=n+"/interior-"+t.filters.selectedInterior.Slug);t.filters.selectedTheme.Slug&&(n=n+"/theme-"+t.filters.selectedTheme.Slug);t.filters.selectedSortBy.ID&&(n=n+"/sortby-"+t.filters.selectedSortBy.ID);r.path(n)};t.getSaleProducts=function(){t.doneInfScroll||t.busyScroll||(t.busyScroll=!0,t.enableSpinner(),i({method:"POST",url:r.path().substring(0,3)+"/Shop/GetSalesWebProductsByPage",data:{page:t.base.page,CategoryID:t.filters.selectedProductCategory.ID,Series:t.filters.selectedSeries.Slug,Format:t.filters.selectedFormat.Slug,Theme:t.filters.selectedTheme.Slug,Interior:t.filters.selectedInterior.Slug,Collection:t.filters.selectedCollection.Slug,SortBy:t.filters.selectedSortBy.ID,Closures:t.selectedClosures,Colours:t.selectedColours,PageCounts:t.selectedPageCount,GSMs:t.selectedGSM}}).then(function(n){if(t.setURLFilter(),t.doneFirstRun=!0,t.busyScroll=!1,t.base.salesProducts.length==0||t.resetProducts)t.base.salesProducts=n.data;else{var i=!0;for(let t=0;t<n.data.length;t++)n.data[t].Instock&&(i=!1);t.base.salesProducts=t.base.salesProducts.concat(n.data)}n.data.length<20&&(t.doneInfScroll=!0);t.base.page=t.base.page+1;t.resetProducts=!1;i&&t.getSaleProducts();t.disableSpinner()},function(){t.disableSpinner()}))};t.enableSpinner=function(){document.getElementById("divLoading").style.display="block"};t.disableSpinner=function(){document.getElementById("divLoading").style.display="none"}}]);paperblanksCtrls.controller("ProductCtrl",["$rootScope","$scope","$http","$location","$timeout",function(n,t,i,r,u){t.productID=window.location.pathname.split("/")[5];t.activeShot="";t.productGroups=[];t.product={};t.formats=[];t.interiors=[];t.alsoAvailable=[];t.allProducts=[];t.base=[];t.base.inputQty=1;t.productAlreadyInCart=!1;t.addCartBtnReady=!1;t.selectedCompany="HMP";t.activeVideo=!1;t.singleImage=!1;t.previousProductID="";t.productRibbonCount=0;t.base.isRecentRelease=!1;t.base.imagePadding=0;t.base.notifyInstockEmail="";t.base.invalidNotifyEmail=!1;t.base.notifyInstockSuccess="";t.base.alreadyNotifiedEmail=!1;t.base.notifyInstockFail="";t.base.addtoCartResult=[];t.base.giftPromos=[];t.base.selectedGiftRestrictionPromo=[];t.base.giftAlertMsg="";t.base.selectedImage="https://paperblanks.azureedge.net/product_images/9781439777350_Front.jpg?4/22/2021";t.vm=[];t.vm.selected=[];t.vm.options={zoomEnable:!0,defaultIndex:0,images:[],style:"box",boxPos:"right-middle",boxW:475,boxH:475,method:"lens",cursor:"crosshair",lens:!0,zoomLevel:3,immersiveMode:!1,immersiveModeOptions:{},immersiveModeMessage:"Click to Zoom",prevThumbButton:"&#9665;",nextThumbButton:"&#9655;",thumbsPos:"bottom",thumbCol:0,thumbColPadding:0};t.init=function(){t.getCompanyID().then(function(){t.getActiveGiftPromosRestricted();t.getActiveGiftPromoResource();t.checkProductAlreadyInCart();t.getProducts();t.iEInclude();var n=window.history;sessionStorage.setItem("historyLength",n.length)}).catch(function(){})};t.getActiveGiftPromoResource=function(){i({method:"GET",url:r.path().substring(0,3)+"/Product/GetPromoGiftResource"}).then(function(n){n.data?(t.base.giftAlertMsg=n.data,t.base.giftAlertMsg.BackgroundColour&&t.base.giftAlertMsg.TextColour&&(t.base.giftAlertMsg.style="background-color: "+t.base.giftAlertMsg.BackgroundColour+"; border-color: "+t.base.giftAlertMsg.BackgroundColour+"; color: "+t.base.giftAlertMsg.TextColour+";")):(t.base.giftAlertMsg=[],t.base.giftAlertMsg.style="")},function(){})};t.getActiveGiftPromosRestricted=function(){i({method:"GET",url:r.path().substring(0,3)+"/Product/GetPromoGiftAlert"}).then(function(n){t.base.giftPromos&&(console.log(n.data),t.base.giftPromos=n.data)},function(){})};t.iEInclude=function(){String.prototype.includes||(String.prototype.includes=function(n,t){return typeof t!="number"&&(t=0),t+n.length>this.length?!1:this.indexOf(n,t)!==-1})};t.singleImageCheck=function(){var n=0;t.product.FrontURL&&n++;t.product.AngleURL&&n++;t.product.BackURL&&n++;t.product.EdgeURL&&n++;t.product.InteriorOneURL&&n++;t.product.InteriorTwoURL&&n++;t.product.InteriorThreeURL&&n++;n<=1&&(t.singleImage=!0)};t.$watch(function(){return r.search()},function(n,i){if(n!==i){t.changeProduct(r.path().split("/").pop());var u=window.history;sessionStorage.setItem("historyLength",u.length)}});t.paperOhUL=function(){paperOhUL()};t.hasProductDesign=function(){let n=t.product;return(n.Artwork&&n.Artwork!="N/A"||n.Era&&n.Era!="N/A"||n.Region&&n.Region!="N/A"||n.Story&&n.Story!="N/A"||n.DesignVideo)&&n.ProductCategoryID!=29};t.hasAdditionalSpecs=function(){let n=t.product;return n.ProductCategoryID!=29&&n.ProductCategoryID!=31&&n.ProductCategoryID!=32&&n.ProductCategoryID!=26&&n.ProductCategoryID!=30&&n.ProductCategoryID!=37&&n.ProductCategoryID!=41&&n.ProductCategoryID!=38};t.getProducts=function(){i({method:"GET",url:r.path().substring(0,3)+"/Product/GetProductGroupAjax/"+t.productID}).then(function(n){t.previousProductID=t.productID.toUpperCase();t.productGroups=n.data;t.product=$.grep(t.productGroups,function(n){return n.ProductID.toLowerCase()===t.productID.toLowerCase()})[0];t.initImage();t.productRibbonCount=0;t.product.RibbonOneName&&(t.productRibbonCount=t.productRibbonCount+1);t.product.RibbonTwoName&&(t.productRibbonCount=t.productRibbonCount+1);t.product.RibbonThreeName&&(t.productRibbonCount=t.productRibbonCount+1);t.alsoAvailable=groupBy(t.productGroups,["ProductCategoryName"],1);t.setSizes();t.contentLoaded=!0;startSlider();t.singleImageCheck();setTimeout(function(){document.getElementById("executeSelect").click();t.getStock()},100);const i=t.product.ReleaseDate,r=parseInt(i.replace(/[^0-9]/g,""),10),u=new Date(r);var f=new Date(2024,6,1);t.base.isRecentRelease=u>=f;t.product.ProductID=="PA9866-9"&&(t.base.isRecentRelease=!0);t.base.imagePadding=5;t.product.ProductCategoryID==45&&(t.base.imagePadding=5,t.base.isRecentRelease=!0);console.log(t.base.imagePadding);console.log(t.base.isRecentRelease)},function(n){console.log(n.statusText)})};t.initImage=function(){let n=!0;if(n=t.product.FrontURL?!0:!1,t.vm.options.images=[],n){let n={thumb:t.product.FrontThumbURL,medium:t.product.FrontURL,large:t.product.FrontHighResURL?t.product.FrontHighResURL:t.product.FrontURL};t.vm.options.images.push(n);console.log(t.vm.options)}else{let n={thumb:t.product.AngleThumbURL,medium:t.product.AngleURL,large:t.product.AngleHighResURL?t.product.AngleHighResURL:t.product.AngleURL};t.vm.options.images.push(n);console.log(t.vm.options)}};t.getSizeChart=function(n,t){if(n)return r.path().substring(0,3)+"/product/_sizechartonly/?productCategoryID= "+n+"&subProductCategoryID="+t};t.changeProduct=function(n,i,r){if(r=r||!1,i&&i.preventDefault(),!r){var u=t.findSameLangDP(n);if(u!=n){t.changeProductBack(u);return}}t.changeProductBack(n)};t.changeProductBack=function(n){t.productID=n.toLowerCase();t.product=$.grep(t.productGroups,function(n){return n.ProductID.toLowerCase()===t.productID})[0];document.title=t.product.ProductName+" - "+t.product.SeriesName+" - Paperblanks";t.selectedDropdown(n);t.setSizes();t.getStock();t.base.inputQty=1;r.path(r.path().substring(0,3)+t.product.ProductSlug);$("body,html").animate({scrollTop:0},800);t.selectedDropdown(n);t.checkProductAlreadyInCart();t.previousProductID=n;t.initImage()};t.checkProductGiftPromoValid=function(){let n=!0;if(Array.isArray(t.base.giftPromos))for(let i=0;i<t.base.giftPromos.length;i++)if(n=!0,t.base.giftPromos[i].CollectionID&&t.base.giftPromos[i].CollectionID!=t.product.CollectionID&&(n=!1),t.base.giftPromos[i].ProductCategoryID&&t.base.giftPromos[i].ProductCategoryID!=t.product.ProductCategoryID&&(n=!1),t.base.giftPromos[i].FormatID&&t.base.giftPromos[i].FormatID!=t.product.FormatID&&(n=!1),t.base.giftPromos[i].ProductIDs&&!String(t.base.giftPromos[i].ProductIDs).includes(String(t.product.ProductID))&&(n=!1),n)return t.base.selectedGiftRestrictionPromo=t.base.giftPromos[i],!0;return!1};t.checkValidGiftPromoNotRestricted=function(){GetPromoGiftResource};t.findSameLangDP=function(n){var r=t.previousProductID.substring(0,2);let i=[];return Object.keys(t.formats).forEach(function(r){for(let u=0;u<t.formats[r].length;u++)t.formats[r][u].ProductID==n&&(i=t.formats[r][u])}),Object.keys(t.formats).forEach(function(u){for(let f=0;f<t.formats[u].length;f++)t.formats[u][f].ProductID.includes(r)&&i.DropDownHash==t.formats[u][f].DropDownHash&&(n=t.formats[u][f].ProductID)}),n};t.selectedDropdown=function(n){var i=[];Object.keys(t.formats).forEach(function(r){for(let u=0;u<t.formats[r].length;u++)if(t.formats[r][u].DropDownShow=t.formats[r][u].DropDownShowDefault,t.formats[r][u].ProductID==n){i=t.formats[r][u];break}});Object.keys(t.formats).forEach(function(r){for(let u=0;u<t.formats[r].length;u++)t.formats[r][u].DropDownHash==i.DropDownHash&&(t.formats[r][u].DropDownShow=!1),t.formats[r][u].ProductID==n&&(t.formats[r][u].DropDownShow=!0)})};t.setSizes=function(){t.allProducts=$.grep(t.productGroups,function(n){return n.ProductCategoryID===t.product.ProductCategoryID});t.formats=groupBy(t.allProducts,["Format"]);u(function(){$(".product-dropdown a").removeClass("active");$(".product-dropdown #"+t.productID).addClass("active")})};t.changeImage=function(n,i){if(t.vm.options.images=[],i=="front"){let n={thumb:t.product.FrontThumbURL,medium:t.product.FrontURL,large:t.product.FrontHighResURL?t.product.FrontHighResURL:t.product.FrontURL};console.log(n);t.vm.options.images.push(n)}else if(i=="angle"){let n={thumb:t.product.AngleThumbURL,medium:t.product.AngleURL,large:t.product.AngleHighResURL?t.product.AngleHighResURL:t.product.AngleURL};t.vm.options.images.push(n)}else if(i=="back"){let n={thumb:t.product.BackThumbURL,medium:t.product.BackURL,large:t.product.FrontHighResURL?t.product.BackHighResURL:t.product.BackURL};t.vm.options.images.push(n)}else if(i=="edge"){let n={thumb:t.product.EdgeThumbURL,medium:t.product.EdgeURL,large:t.product.EdgeHighResURL?t.product.EdgeHighResURL:t.product.EdgeURL};t.vm.options.images.push(n)}else if(i=="int1"){let n={thumb:t.product.InteriorOneURL,medium:t.product.InteriorOneURL,large:t.product.InteriorOneHighResURL?t.product.InteriorOneHighResURL:t.product.InteriorOneURL};t.vm.options.images.push(n)}else if(i=="int2"){let n={thumb:t.product.InteriorTwoURL,medium:t.product.InteriorTwoURL,large:t.product.InteriorTwoHighResURL?t.product.InteriorTwoHighResURL:t.product.InteriorTwoURL};t.vm.options.images.push(n)}else if(i=="int3"){let n={thumb:t.product.InteriorThreeURL,medium:t.product.InteriorThreeURL,large:t.product.InteriorThreeHighResURL?t.product.InteriorThreeHighResURL:t.product.InteriorThreeURL};t.vm.options.images.push(n)}else if(i=="intShot"){let i={thumb:n,medium:n,large:n};t.vm.options.images.push(i)}n.includes("Interior")?$("#interiorExampleText").css("display","block"):$("#interiorExampleText").css("display","none")};t.addToCart=function(){t.enableSpinner();setTimeout(function(){i({method:"POST",url:r.path().substring(0,3)+"/Shop/AddProductToCart",data:{productID:t.productID,quantity:t.base.inputQty}}).then(function(n){n.data.Success?(document.getElementById("cartitemCount").innerText=n.data.Quantity,n.data.RecordID!=0&&t.gTagAddCart(n.data),n.data.OutOfStock||(t.productAlreadyInCart=!0,document.getElementById("productShot")&&flyToElement(document.getElementById("productShot"),document.getElementById("cart"))),t.base.addtoCartResult=n.data,t.base.addtoCartResult.OriginalAddQty!=t.base.addtoCartResult.AdjustedAddQty&&document.getElementById("openCartAdjustmentModal").click(),t.disableSpinner()):location.reload()},function(){})},500);document.getElementById("closeDPConfirmModalBtn").click()};t.gTagAddCart=function(n){window.dataLayer=window.dataLayer||[];dataLayer.push({event:"add_to_cart",ecommerce:{items:[{item_id:n.Product.ID,item_name:n.Product.Name,item_brand:"Paperblanks",item_category:n.Product.Category,item_variant:n.Product.Variant,quantity:n.Product.Quantity,price:n.Product.Price}]}})};t.checkProductAlreadyInCart=function(){i({method:"GET",url:r.path().substring(0,3)+"/Shop/CheckProductAlreadyInCart?productID="+t.productID}).then(function(n){t.productAlreadyInCart=n.data.productInCart;t.productAlreadyInCart&&(t.base.inputQty=n.data.productCartCount);t.addCartBtnReady=!0},function(){})};t.getCompanyID=function(){return i({method:"GET",url:r.path().substring(0,3)+"/Product/GetCompanyID"}).then(function(n){t.selectedCompany=n.data},function(){})};t.getStock=function(){var n=t.selectedCompany=="HMP"?t.product.HMPAXNo:t.product.IREAXNo;i({method:"GET",url:r.path().substring(0,3)+"/Shop/GetAXProductStock?axProductID="+n}).then(function(n){console.log(n.data);t.stock=n.data},function(){t.stock=0})};t.validateInputQty=function(){if(!t.base.inputQty){t.base.inputQty=1;return}if(isNaN(t.base.inputQty)){t.base.inputQty=1;return}if(t.base.inputQty>t.stock&&(t.base.inputQty=parseInt(t.stock)),t.base.inputQty<=0){t.base.inputQty=1;return}if(t.base.inputQty>99){t.base.inputQty=99;return}};t.toggleVideo=function(){t.activeVideo=!0};t.notifyInstockSubmit=function(){i({method:"POST",url:r.path().substring(0,3)+"/Shop/NotifyInstock",data:{email:t.base.notifyInstockEmail,productID:t.productID}}).then(function(n){t.base.invalidNotifyEmail=!1;t.base.notifyInstockFail="";n.data.Success?(t.base.invalidNotifyEmail=!1,t.base.notifyInstockSuccess=n.data.Message):t.base.notifyInstockFail=n.data.Message},function(){})};t.resetStockNotificationModal=function(){t.base.notifyInstockEmail="";t.base.invalidNotifyEmail=!1;t.base.notifyInstockSuccess="";t.base.alreadyNotifiedEmail=!1;t.base.notifyInstockFail=""};t.enableSpinner=function(){document.getElementById("divLoading").style.display="block"};t.disableSpinner=function(){document.getElementById("divLoading").style.display="none"};t.sumRemovedQty=function(){return t.base.addtoCartResult?t.base.addtoCartResult.OriginalAddQty-t.base.addtoCartResult.AdjustedAddQty:0}}]);paperblanksCtrls.controller("RetailerCatalogCtrl",["$rootScope","$scope","$http","$location",function(n,t,i,r){t.productCategories=[];t.series=[];t.formats=[];t.interiors=[];t.collections=[];t.sortBy=[];t.base=[];t.frontData=[];t.frontData.selectedProductCategory=[];t.frontData.selectedSeries=[];t.frontData.selectedFormat=[];t.frontData.selectedInterior=[];t.frontData.selectedCollection=[];t.frontData.selectedSortBy=[];t.frontData.keyword="";t.frontData.responseMessage="";t.frontData.selectedShippingAddress="";t.frontData.orderNote="";t.frontData.purchaseOrderNo="";t.frontData.acceptBackorder="1";t.frontData.invalidAddress=!1;t.productCategoryReady=!1;t.firstFilter=!0;t.firstTotal=!0;t.subTotal=0;t.shipping=0;t.taxes=0;t.total=0;t.taxRate=0;t.lineDiscount=0;t.discount=0;t.totalDiscounted=0;t.itemCount=0;t.promoDiscount=0;t.base=[];t.base.products=[];t.base.selectedProducts=[];t.base.checkoutSelectedProducts=[];t.pageCount=0;t.ready=!1;t.filterReady=!1;t.foundNoProduct=!1;t.placeOrderAddresses=[];t.infScrollBusy=!1;t.doneInfScroll=!1;t.countryIsNA=!1;t.checkedRegion=!1;t.discountedTotal=0;t.base.bookmarkError="";t.minDateString=moment().format("YYYY-MM-DD");t.frontData.shipDate="";t.frontData.cancelDate="";t.minReq=[];t.minReqMet=!1;t.base.retailPromos=[];t.base.selectedPromoCode="";t.base.selectedPromo=[];t.base.selectedPromoAdditionalDiscount=0;t.base.validPromoDiscount=!1;t.firstLoad=!0;t.base.instockCheck=!0;t.base.outOfStockCheck=!0;t.base.saleCatalog=!1;t.base.dpCart=!1;t.onSidebarClose=function(){};t.init=function(n){n=="saleCatalog"?(t.base.saleCatalog=!0,t.IsSessionNA(),t.GetLineDiscount(),t.GetTaxRate(),t.getParentChildAccounts(),t.getUserRetailCart(),t.getProductCategories(),t.getRetailPromos(),t.checkAllowedBackorders()):(t.IsSessionNA(),t.GetLineDiscount(),t.GetTaxRate(),t.getParentChildAccounts(),t.getUserRetailCart(),t.getProductCategories(),t.getRetailPromos(),t.checkAllowedBackorders())};t.checkAllowedBackorders=function(){i({method:"POST",url:r.path().substring(0,3)+"/Retailer/CheckAllowedBackorders/",data:{}}).then(function(n){t.frontData.acceptBackorder=n.data==!0?"1":"0"},function(n){console.log(n.statusText)})};t.getParentChildAccounts=function(){i({method:"POST",url:r.path().substring(0,3)+"/Retailer/GetParentChildAccounts/",data:{SaleCatalog:t.base.saleCatalog}}).then(function(n){t.placeOrderAddresses=n.data;t.placeOrderAddresses.length<=1&&(t.frontData.selectedShippingAddress=t.placeOrderAddresses[0],document.getElementById("subAcctSelect").disabled=!0);t.frontData.acceptBackorder="1"},function(n){console.log(n.statusText)})};t.GetTaxRate=function(){i({method:"POST",url:r.path().substring(0,3)+"/Retailer/GetUserTaxRate/",data:{}}).then(function(n){t.taxRate=n.data;t.getNewTotal()},function(n){console.log(n.statusText)})};t.loadspinner=function(){document.getElementById("divLoading").style.display="block"};t.GetLineDiscount=function(){i({method:"POST",url:r.path().substring(0,3)+"/Retailer/GetLineDiscount/",data:{SaleCatalog:t.base.saleCatalog}}).then(function(n){t.lineDiscount=n.data;t.getNewTotal()},function(n){console.log(n.statusText)})};t.changeShippingAddress=function(n){t.minReqMet=!1;t.minReqMet=n.MinOrderAmount&&t.subTotal>=n.MinOrderAmount?!0:n.MinOrderQty&&t.itemCount>=n.MinOrderQty?!0:t.itemCount>=1e3?!0:!1;t.frontData.invalidAddress=!1};t.checkMinOrder=function(){helperOpen&&openHelper();t.minReqMet=t.frontData.selectedShippingAddress.MinOrderAmount&&t.subTotal>=t.frontData.selectedShippingAddress.MinOrderAmount?!0:t.frontData.selectedShippingAddress.MinOrderQty&&t.itemCount>=t.frontData.selectedShippingAddress.MinOrderQty?!0:t.itemCount>=1e3?!0:!1;Object.keys(t.base.selectedPromo).length===0?document.getElementById("placeOrderPopupBtn").click():t.base.validPromoDiscount?t.openPlaceOrderModal():document.getElementById("invalidPromoModalBtn").click()};t.openPlaceOrderModal=function(){document.getElementById("closePromoWarningModal").click();document.getElementById("placeOrderPopupBtn").click()};t.placeOrder=function(){if(t.frontData.selectedShippingAddress===""){t.frontData.invalidAddress=!0;return}if(!(t.base.selectedProducts<=0)){document.getElementById("divLoading").style.display="block";var n=!0;t.frontData.acceptBackorder==0&&(n=!1);t.simplifyProducts();i({method:"POST",url:r.path().substring(0,3)+"/Retailer/PlaceRetailOrder/",data:{products:t.base.checkoutSelectedProducts,OrderingAccountNo:t.frontData.selectedShippingAddress.AXCustNo,OrderNote:t.frontData.orderNote,ReqShipDate:t.frontData.shipDate,CancelDate:t.frontData.cancelDate,PurchaseOrderNo:t.frontData.purchaseOrderNo,AllowBO:n,RetailPromoCode:t.base.selectedPromoCode,SaleCatalog:t.base.saleCatalog}}).then(function(n){n.data.Success?window.location=r.path().substring(0,3)+"/retailer/order-confirmation/":($("#confirmationBtn").click(),$("#responseBtn").click(),t.frontData.responseMessage=n.data.Message,document.getElementById("divLoading").style.display="none")},function(n){console.log(n.statusText);document.getElementById("divLoading").style.display="none"})}};t.simplifyProducts=function(){t.base.checkoutSelectedProducts=[];for(let n=0;n<t.base.selectedProducts.length;n++){let i={};i.ProductID=t.base.selectedProducts[n].ProductID;i.Quantity=t.base.selectedProducts[n].Quantity;t.base.checkoutSelectedProducts.push(i)}};t.getFilters=function(){t.firstFilter&&(t.firstFilter=!1);i({method:"POST",url:r.path().substring(0,3)+"/Retailer/GetFiltersAjax/",data:{categoryID:t.frontData.selectedProductCategory.ID}}).then(function(n){t.filters=n.data;t.series=[];t.series=t.series.concat(t.filters.Series);t.frontData.selectedSeries=t.series[0];t.formats=[];t.formats=t.formats.concat(t.filters.Formats);t.frontData.selectedFormat=t.formats[0];t.interiors=[];t.interiors=t.interiors.concat(t.filters.Interiors);t.frontData.selectedInterior=t.interiors[0];t.collections=[];t.collections=t.collections.concat(t.filters.Collections);t.frontData.selectedCollection=t.collections[0];t.sortBy=t.filters.Sorts;t.frontData.selectedSortBy=t.sortBy[0];t.getProducts();t.filterReady=!0},function(n){console.log(n.statusText)})};t.changeCategory=function(n){for(let i=0;i<t.productCategories.length;i++)if(t.productCategories[i].ID==n){t.frontData.selectedProductCategory=t.productCategories[i];break}t.selectedProductCategory=n;t.getFilters()};t.changeSeries=function(n){t.frontData.selectedSeries=n;t.getProducts()};t.changeFormat=function(n){t.frontData.selectedFormat=n;t.getProducts()};t.changeInterior=function(n){t.frontData.selectedInterior=n;t.getProducts()};t.changeCollection=function(n){t.frontData.selectedCollection=n;t.getProducts()};t.changeSortBy=function(n){t.frontData.selectedSortBy=n;t.getProducts()};t.keySubmit=function(n){n.which===13&&t.searchKeyword()};t.searchKeyword=function(){t.getProducts()};t.changeStockFilter=function(){t.getProducts()};t.getProductCategories=function(){i({method:"GET",url:r.path().substring(0,3)+"/Retailer/GetProductCategories/",data:{}}).then(function(n){t.productCategories=[];t.productCategories=t.productCategories.concat(n.data);t.frontData.selectedProductCategory=t.productCategories[0];t.productCategoryReady=!0;t.getFilters()},function(){})};t.dismissBookmarkError=function(){t.base.bookmarkError=""};t.IsSessionNA=function(){i({method:"GET",url:r.path().substring(0,3)+"/Retailer/IsSessionNA/",data:{}}).then(function(n){t.countryIsNA=n.data;t.checkedRegion=!0},function(){})};t.updateQuantity=function(n){n&&(document.getElementById("divLoading").style.display="block",n.Quantity%n.MinQty!=0&&(n.Quantity=n.MinQty),i({method:"POST",url:r.path().substring(0,3)+"/Retailer/UpdateCartQty/",data:{productID:n.ProductID,newQTY:n.Quantity,SaleCatalog:t.base.saleCatalog}}).then(function(){t.getNewTotal()},function(n){console.log(n.statusText)}))};t.selectedProductCheck=function(n){for(let i=0;i<t.base.selectedProducts.length;i++)if(t.base.selectedProducts[i].ProductID===n)return!0;return!1};t.selectRetailProduct=function(n){if(t.selectedProductCheck(n.ProductID))t.removeItemFromCart(n);else{if(!t.allowDPtoCart(n)){$("#DPWarningModal").modal("show");return}n.Quantity=n.MinQty;t.pushToCart(n)}if(openSidebar===!1){var i=$(window).width();i>=763&&document.getElementById("openSidebarBtn").click()}};t.allowDPtoCart=function(){return!0};t.isDP=function(n){return n&&(n.ProductCategoryID==1||n.ProductCategoryID==2||n.ProductCategoryID==3||n.ProductCategoryID==23||n.ProductCategoryID==24||n.ProductCategoryID==25||n.ProductCategoryID==33||n.ProductCategoryID==34)?!0:!1};t.openSlider=function(){openCart=="True"&&document.getElementById("openSidebarBtn")&&t.firstLoad&&(document.getElementById("openSidebarBtn").click(),t.firstLoad=!1)};t.getUserRetailCart=function(){i({method:"POST",url:r.path().substring(0,3)+"/Retailer/GetUserRetailCart/",data:{SaleCatalog:t.base.saleCatalog}}).then(function(n){n.data!=null&&(t.base.selectedProducts=n.data,t.getNewTotal(),t.ready=!0)},function(n){console.log(n.statusText)})};t.checkDiscountRestrictions=function(){t.base.selectedPromoAdditionalDiscount=0;for(let n=0;n<t.base.retailPromos.length;n++)if(t.base.retailPromos[n].RetailPromoCode==t.base.selectedPromoCode){for(let i=0;i<t.base.retailPromos[n].PromoRestrictions.length;i++){let r=0;if(t.base.retailPromos[n].PromoRestrictions[i].RestrictionList.length>0){for(let u=0;u<t.base.selectedProducts.length;u++){let f=!1;for(let e=0;e<t.base.retailPromos[n].PromoRestrictions[i].RestrictionList.length;e++)t.base.selectedProducts[u].ProductCategoryID==t.base.retailPromos[n].PromoRestrictions[i].RestrictionList[e].ProductCategoryID&&(r=r+t.base.selectedProducts[u].Quantity,f=!0);if(!f){t.base.validPromoDiscount=!1;t.base.selectedPromoAdditionalDiscount=0;return}}if(r>=t.base.retailPromos[n].PromoRestrictions[i].MinQuantity){t.base.validPromoDiscount=!0;t.base.selectedPromoAdditionalDiscount=parseFloat(t.base.retailPromos[n].AdditionalLineDiscount);return}}else for(let u=0;u<t.base.selectedProducts.length;u++)if(r=r+t.base.selectedProducts[u].Quantity,r>=t.base.retailPromos[n].PromoRestrictions[i].MinQuantity){t.base.validPromoDiscount=!0;t.base.selectedPromoAdditionalDiscount=parseFloat(t.base.retailPromos[n].AdditionalLineDiscount);return}}break}};t.getNewTotal=function(){var i,r;t.discountedTotal=0;let n=0;i=0;t.base.validPromoDiscount=!1;t.checkDiscountRestrictions();r=parseFloat(t.lineDiscount)+parseFloat(t.base.selectedPromoAdditionalDiscount);for(let u=0;u<t.base.selectedProducts.length;u++){if(t.base.validPromoDiscount){let n=((t.base.selectedProducts[u].OriginalPrice-t.base.selectedProducts[u].OriginalPrice*r).toFixed(4)*t.base.selectedProducts[u].Quantity).toFixed(2);t.discountedTotal=parseFloat(t.discountedTotal)+parseFloat(n)}n=t.base.selectedProducts[u].RPActiveSale&&!t.base.selectedProducts[u].RPSaleCatalogExclusive?parseFloat(parseFloat(n)+t.base.selectedProducts[u].RPDiscountUnroundedPrice*t.base.selectedProducts[u].Quantity).toFixed(2):parseFloat(parseFloat(n)+t.base.selectedProducts[u].DiscountUnroundedPrice*t.base.selectedProducts[u].Quantity).toFixed(2);i=parseInt(i)+t.base.selectedProducts[u].Quantity}t.subTotal=parseFloat(n).toFixed(2);t.discountedTotal=t.discountedTotal.toFixed(2);t.shipping=parseFloat(t.shipping).toFixed(2);t.taxes=parseFloat(t.subTotal*t.taxRate).toFixed(2);t.total=parseFloat(t.subTotal*(1+t.taxRate)+t.shipping).toFixed(2);t.lineDiscount=t.lineDiscount;t.discount=parseFloat(parseFloat(n)*parseFloat(t.lineDiscount)).toFixed(2);t.totalDiscounted=parseFloat(parseFloat(t.total)-parseFloat(t.discount)).toFixed(2);t.itemCount=i;document.getElementById("divLoading").style.display="none"};t.removeItemFromCart=function(n){var u=-1;for(let i=0;i<t.base.selectedProducts.length;i++)if(t.base.selectedProducts[i].ProductID===n.ProductID){u=i;break}u!==-1&&(selectedProducts=t.base.selectedProducts.splice(u,1));i({method:"POST",url:r.path().substring(0,3)+"/Retailer/RemoveItemFromCart/",data:{productID:n.ProductID,SaleCatalog:t.base.saleCatalog}}).then(function(){t.getNewTotal()},function(n){console.log(n.statusText)})};t.pushToCart=function(n){t.base.selectedProducts||(t.base.selectedProducts=[]);t.base.selectedProducts.push(n);i({method:"POST",url:r.path().substring(0,3)+"/Retailer/PushItemToCart/",data:{productID:n.ProductID,Qty:n.Quantity,SaleCatalog:t.base.saleCatalog}}).then(function(){t.getNewTotal()},function(n){console.log(n.statusText)})};t.getProducts=function(){helperOpen&&openHelper();t.doneInfScroll=!1;t.infScrollBusy=!1;t.base.products=[];t.pageCount=0;document.getElementById("divLoading").style.display="block";t.pageCount=t.pageCount+1;i({method:"POST",url:r.path().substring(0,3)+"/Retailer/GetRetailerProductsAjax/",data:{page:t.pageCount,productCategory:t.frontData.selectedProductCategory.ID,series:t.frontData.selectedSeries.Slug,format:t.frontData.selectedFormat.Slug,interior:t.frontData.selectedInterior.Slug,collection:t.frontData.selectedCollection.Slug,sortBy:t.frontData.selectedSortBy.ID,keyword:t.frontData.keyword,inStockCheck:t.base.instockCheck,outOfStockCheck:t.base.outOfStockCheck,SaleCatalog:t.base.saleCatalog}}).then(function(n){t.base.products=n.data;document.getElementById("divLoading").style.display="none";t.foundNoProduct=t.base.products.length<=0?!0:!1})};t.loadPopper=function(){loadPoppers()};t.getProductsScroll=function(){if(!t.infScrollBusy&&(t.infScrollBusy=!0,!t.doneInfScroll)){var n=t.base.products.length;document.getElementById("divLoading").style.display="block";t.pageCount=t.pageCount+1;i({method:"POST",url:r.path().substring(0,3)+"/Retailer/GetRetailerProductsAjax/",data:{page:t.pageCount,productCategory:t.frontData.selectedProductCategory.ID,series:t.frontData.selectedSeries.Slug,format:t.frontData.selectedFormat.Slug,interior:t.frontData.selectedInterior.Slug,collection:t.frontData.selectedCollection.Slug,sortBy:t.frontData.selectedSortBy.ID,keyword:t.frontData.keyword,inStockCheck:t.base.instockCheck,outOfStockCheck:t.base.outOfStockCheck,SaleCatalog:t.base.saleCatalog}}).then(function(n){t.base.products=t.base.products.concat(n.data);t.firstLoad&&t.openSlider();console.log(n.data.length);n.data.length<=0&&(t.doneInfScroll=!0);t.infScrollBusy=!1;document.getElementById("divLoading").style.display="none"},function(n){console.log(n.statusText)})}};t.getRetailPromos=function(){i({method:"POST",url:r.path().substring(0,3)+"/Retailer/GetRetailPromos/",data:{}}).then(function(n){t.base.retailPromos=n.data})};t.selectRetailPromo=function(n){for(let i=0;i<t.base.retailPromos.length;i++)t.base.retailPromos[i].RetailPromoID==n?t.base.retailPromos[i].Selected?(t.base.retailPromos[i].Selected=!1,t.base.selectedPromoCode="",t.base.selectedPromo=[]):(t.base.retailPromos[i].Selected=!0,t.base.selectedPromoCode=t.base.retailPromos[i].RetailPromoCode,t.base.selectedPromo=t.base.retailPromos[i]):t.base.retailPromos[i].Selected=!1;t.base.validPromoDiscount=!1;t.getNewTotal()}}]);paperblanksCtrls.controller("RetailerImageLifestyleCtrl",["$rootScope","$scope","$http","$location",function(n,t,i,r){t.infScrollBusy=!1;t.doneInfScroll=!1;t.productLines=[];t.categories=[];t.subCategories=[];t.base=[];t.productLinesReady=!1;t.categoriesReady=!1;t.subCategoriesReady=!1;t.images=[];t.pageCount=-1;t.frontData=[];t.gettingImages=!1;t.frontData.isNew=!1;t.frontData.selectedCategory={};t.frontData.selectedCategory.ID=0;t.frontData.selectedCategory.CategoryName="All";t.frontData.selectedSubCategory={};t.frontData.selectedSubCategory.ID=0;t.frontData.selectedSubCategory.subCategoryName="All";t.changedSubCategoryed=!1;t.frontData.zipBtnVal=[];t.resetPage=!1;t.firstLoad=!0;t.infScrollBusy=!1;t.lastImageCount=0;t.doneImageScroll=!1;t.filters=[];t.filters.series=[];t.filters.selectedSeries=[];t.filters.productType=[];t.filters.selectedProductType=[];t.filters.season=[];t.filters.selectedSeason=[];t.filters.tags=[];t.filters.selectedTags=[];t.base.tagCategory="Lifestyle";t.init=function(n){t.base.tagCategory=n;t.getImagecart();t.getLifestyleFilters();t.getTags()};t.getImagecart=function(){i({method:"POST",url:r.path().substring(0,3)+"/Retailer/GetCartImages/",data:{}}).then(function(n){t.frontData.zipBtnVal=[];for(let r=0;r<n.data.length;r++){var i={};i.ID=n.data[r].SelectedID;i.URL=n.data[r].SelectedURL;i.ThumbURL=n.data[r].SelectedThumbnail;i.Filename=n.data[r].SelectedFilename;t.frontData.zipBtnVal.push(i)}},function(n){console.log(n.statusText)})};t.getLifestyleFilters=function(){i({method:"POST",url:r.path().substring(0,3)+"/Retailer/GetLifestyleFilters/",data:{productTypeID:t.filters.selectedProductType!=null?t.filters.selectedProductType.ImageProductTypeID:0,seasonID:t.filters.selectedSeason!=null?t.filters.selectedSeason.ImageSeasonID:0,seriesID:t.filters.selectedSeries!=null?t.filters.selectedSeries.SeriesID:0,tagCategory:t.base.tagCategory}}).then(function(n){var i;if(t.filters.productType=n.data.ProductTypeFilter,i=!1,t.filters.selectedProductType){for(let n=0;n<t.filters.productType.length;n++)if(t.filters.productType[n].ImageProductTypeID==t.filters.selectedProductType.ImageProductTypeID){t.filters.selectedProductType=t.filters.productType[n];i=!0;break}i||(t.filters.selectedProductType=t.filters.productType[0])}if(t.filters.season=n.data.SeasonFilter,i=!1,t.filters.selectedSeason){for(let n=0;n<t.filters.season.length;n++)if(t.filters.season[n].ImageSeasonID==t.filters.selectedSeason.ImageSeasonID){t.filters.selectedSeason=t.filters.season[n];i=!0;break}i||(t.filters.selectedSeason=t.filters.season[0])}if(t.filters.series=n.data.SeriesFilter,i=!1,t.filters.selectedSeries){for(let n=0;n<t.filters.series.length;n++)if(t.filters.series[n].SeriesID==t.filters.selectedSeries.SeriesID){t.filters.selectedSeries=t.filters.series[n];i=!0;break}i||(t.filters.selectedSeries=t.filters.series[0])}t.getImagesScroll()},function(n){console.log(n.statusText)})};t.clearImages=function(){var u,n;for(let i=0;i<t.frontData.zipBtnVal.length;i++)u=document.getElementById(t.frontData.zipBtnVal[i].ID),u&&(u.style.border="1px #dfdfdf solid",n=document.getElementById(t.frontData.zipBtnVal[i].ID+"SelectIcon"),n.className="fa fa-plus-circle",n.parentElement.style.backgroundColor="",n.parentElement.className="btn btn-secondary");i({method:"POST",url:r.path().substring(0,3)+"/Retailer/ClearCartImages/",data:{}}).then(function(){t.frontData.zipBtnVal=[]},function(n){console.log(n.statusText)})};t.sendFilterZipParm=function(){var n=t.frontData.keyword;n===null&&(n="");i({method:"POST",url:r.path().substring(0,3)+"/Retailer/SendFilterZipParmLifeStyle/",data:{Keyword:t.frontData.keyword,SelectedTags:t.filters.selectedTags,SeasonID:t.filters.selectedSeason.ImageSeasonID?t.filters.selectedSeason.ImageSeasonID:0,SeriesID:t.filters.selectedSeries.SeriesID?t.filters.selectedSeries.SeriesID:0,tagCategory:t.base.tagCategory}}).then(function(){t.downloadFilterZip()},function(n){console.log(n.statusText)})};t.downloadFilterZip=function(){document.getElementById("divLoadingDownloading").style.display="block";document.location=r.path().substring(0,3)+"/retailer/DownloadFilterZipLifestyle?nocache="+(new Date).getTime();setTimeout(function(){t.downloadContextFree()},1e3)};t.downloadContextFree=function(){i({method:"POST",url:r.path().substring(0,3)+"/Retailer/SpinLoader/",data:{}}).then(function(){document.getElementById("divLoadingDownloading").style.display="none"},function(n){document.getElementById("divLoadingDownloading").style.display="none";console.log(n.statusText)})};t.selectZipImage=function(n,u,f,e){var s={},c,o,h,l;for(s.ID=n,s.URL=u,s.ThumbURL=f,s.Filename=e,c=!1,o=document.getElementById(n+"SelectIcon"),h=0;h<t.frontData.zipBtnVal.length;h++)if(s.ID===t.frontData.zipBtnVal[h].ID){document.getElementById(n).style.border="1px #dfdfdf solid";o.className="fa fa-plus-circle";o.parentElement.style.backgroundColor="";o.parentElement.className="btn btn-secondary";t.frontData.zipBtnVal.splice(h,1);c=!0;i({method:"POST",url:r.path().substring(0,3)+"/Retailer/RemoveImageFromCart/",data:{imageID:n}}).then(function(){},function(n){console.log(n.statusText)});break}c===!1&&(document.getElementById(n).style.border="1px #538ab6 solid",o.className="fa fa-minus-circle",o.parentElement.className="btn btn-danger",o.parentElement.style.backgroundColor="#9E2A2B",t.frontData.zipBtnVal.push(s),i({method:"POST",url:r.path().substring(0,3)+"/Retailer/AddImageToCart/",data:{SelectedID:n,SelectedURL:u,SelectedThumbnail:f,SelectedFilename:e}}).then(function(){},function(n){console.log(n.statusText)}));openSidebar===!1&&(l=$(window).width(),l>=763&&document.getElementById("openSidebarBtn").click())};t.changeIsNew=function(){t.pageCount=-1;t.images=[];t.getImagesScroll()};t.changeSeries=function(n){t.pageCount=-1;t.doneImageScroll=!1;t.images=[];t.filters.selectedSeries=n;t.getLifestyleFilters()};t.changeProductCategory=function(n){t.pageCount=-1;t.doneImageScroll=!1;t.images=[];t.filters.selectedProductType=n;t.getLifestyleFilters()};t.changeSeason=function(n){t.infScrollBusy=!1;t.doneImageScroll=!1;t.pageCount=-1;t.filters.selectedSeason=n;t.images=[];t.getLifestyleFilters()};t.updateSelectedTag=function(){};t.changeTag=function(){t.infScrollBusy=!1;t.gettingImages=!0;t.pageCount=-1;t.doneImageScroll=!1;t.images=[];var n=[];for(let i=0;i<t.filters.tags.length;i++)t.filters.tags[i].Selected&&n.push(t.filters.tags[i].TagID);t.filters.selectedTags=n;t.getLifestyleFilters()};t.keySubmit=function(n){n.which===13&&t.searchKeyword()};t.searchKeyword=function(){t.infScrollBusy=!1;t.doneImageScroll=!1;t.pageCount=-1;t.images=[];t.getImagesScroll()};t.getImagesScroll=function(){t.infScrollBusy||(t.infScrollBusy=!0,t.resetPage=!1,t.doneImageScroll||t.getImages())};t.getImages=function(){t.resetPage===!1&&(t.pageCount=parseInt(t.pageCount)+1);t.lastImageCount=t.images.length;t.resetPage=!0;document.getElementById("divLoading").style.display="block";t.gettingImages=!0;i({method:"POST",url:r.path().substring(0,3)+"/Retailer/GetNewImagesAjax/",data:{page:t.pageCount,seasonID:t.filters.selectedSeason.ImageSeasonID?t.filters.selectedSeason.ImageSeasonID:0,seriesID:t.filters.selectedSeries.SeriesID?t.filters.selectedSeries.SeriesID:0,keyword:t.frontData.keyword,selectedTags:t.filters.selectedTags,tagCategory:t.base.tagCategory}}).then(function(n){t.infScrollBusy=!1;t.gettingImages=!1;t.images=t.images.concat(n.data.ImageList);setTimeout(function(){for(var r,i=0;i<t.frontData.zipBtnVal.length;i++)for(let u=0;u<n.data.ImageList.length;u++)n.data.ImageList[u].ImageID===t.frontData.zipBtnVal[i].ID&&(r=document.getElementById(n.data.ImageList[u].ImageID+"SelectIcon"),document.getElementById(n.data.ImageList[u].ImageID).style.border="1px #538ab6 solid",r.className="fa fa-minus-circle",r.parentElement.className="btn btn-danger",r.parentElement.style.backgroundColor="#9E2A2B");t.lastImageCount==t.images.length&&(t.doneImageScroll=!0);document.getElementById("divLoading").style.display="none"},50)},function(n){t.gettingImages=!1;console.log(n.statusText)})};t.sendDownloadList=function(){if(t.frontData.zipBtnVal.length<=0){t.frontData.zipImgResp="Please select images to download";return}t.frontData.zipImgResp="";i({method:"POST",url:r.path().substring(0,3)+"/Retailer/SendZipDetails/",data:{files:t.frontData.zipBtnVal}}).then(function(){t.downloadZip()},function(n){console.log(n.statusText)})};t.downloadZip=function(){document.location=r.path().substring(0,3)+"/retailer/SubmitRetailImageZip?nocache="+(new Date).getTime()};t.downloadSingleImg=function(n){document.location=r.path().substring(0,3)+"/retailer/DownloadImageURL?retailImgID="+n};t.getTags=function(){i({method:"POST",url:r.path().substring(0,3)+"/Retailer/GetTags/",data:{categoryTag:t.base.tagCategory}}).then(function(n){t.filters.tags=n.data},function(n){console.log(n.statusText)})};t.clearTags=function(){for(let n=0;n<t.filters.tags.length;n++)t.filters.tags[n].Selected=!1;t.changeTag()}}]);paperblanksCtrls.controller("RetailGetOrderCtrl",["$rootScope","$scope","$http","$location","$timeout",function(n,t,i,r){t.infScrollCounter=0;t.infScrollBusy=!1;t.doneInfScroll=!1;t.base=[];t.childAcctFilter=[];t.orderStatusFilter=[];t.base.orders=[];t.frontData=[];t.frontData.selectedSubAccount="";t.frontData.selectedOrderStatus="";t.frontData.Invoice=[];t.childAccountFilterReady=!1;t.orderStatusFilterReady=!1;t.init=function(){t.getChildAccounts();t.getOrderStatusFilter();t.getRetailOrders()};t.getOrderStatusFilter=function(){i({method:"Post",url:r.path().substring(0,3)+"/Retailer/GetOrderStatusFilter/",data:{}}).then(function(n){t.orderStatusFilter=n.data;t.frontData.selectedOrderStatus=t.orderStatusFilter[0];t.orderStatusFilterReady=!0},function(n){console.log(n.statusText)})};t.changeOrderStatus=function(){t.doneInfScroll=!1;t.infScrollCounter=0;t.base.orders=[];t.getRetailOrders()};t.changeSubAccount=function(){t.doneInfScroll=!1;t.infScrollCounter=0;t.base.orders=[];t.getRetailOrders()};t.getChildAccounts=function(){i({method:"Post",url:r.path().substring(0,3)+"/Retailer/GetChildAccountFilter/",data:{infScrollCount:t.infScrollCounter}}).then(function(n){t.childAcctFilter=n.data;t.frontData.selectedSubAccount=t.childAcctFilter[0];t.childAccountFilterReady=!0},function(n){console.log(n.statusText)})};t.getRetailOrders=function(){var n,u;t.doneInfScroll||(document.getElementById("divLoading").style.display="block",t.infScrollBusy)||(t.infScrollBusy=!0,n="",t.frontData.selectedSubAccount!==""&&(n=t.frontData.selectedSubAccount.AXCustNo),u=-5,t.frontData.selectedOrderStatus!==""&&(u=t.frontData.selectedOrderStatus.OrderStatusNo),i({method:"Post",url:r.path().substring(0,3)+"/Retailer/GetRetailOrdersAjax/",data:{infScrollCount:t.infScrollCounter,subAcctNo:n,orderStatusIDFilter:u}}).then(function(n){t.base.orders=t.base.orders.concat(n.data.Orders);t.infScrollBusy=!1;t.infScrollCounter=t.infScrollCounter+1;n.data.Orders.length<20&&(t.doneInfScroll=!0);document.getElementById("divLoading").style.display="none"},function(n){document.getElementById("divLoading").style.display="none";console.log(n.statusText)}))};t.getInvoice=function(n){var u=n;document.getElementById("divLoading").style.display="block";i({method:"POST",url:r.path().substring(0,3)+"/Retailer/GetRetailInvoiceAjax/",data:{invoiceID:u}}).then(function(n){document.getElementById("divLoading").style.display="none";t.frontData.Invoice=n.data;document.getElementById("invoiceAddress").innerHTML=t.frontData.Invoice.ContactInfo.Address;t.frontData.Invoice.InvoiceDate=new Date(parseInt(t.frontData.Invoice.InvoiceDate.substr(6)));t.frontData.Invoice.OrderDate=new Date(parseInt(t.frontData.Invoice.OrderDate.substr(6)));t.frontData.Invoice.ShipDate=new Date(parseInt(t.frontData.Invoice.ShipDate.substr(6)));t.frontData.Invoice.DueDate=new Date(parseInt(t.frontData.Invoice.DueDate.substr(6)));document.getElementById("openModal").click()},function(n){console.log(n.statusText)})};t.printInvoice=function(){var t=document.getElementById("invoiceBody"),n=window.open("","PrintWindow","width=750,height=650,top=50,left=50,toolbars=no,scrollbars=yes,status=no,resizable=yes");n.document.writeln(t.innerHTML);n.document.close();n.focus();n.print();n.close()}}]);paperblanksCtrls.controller("RetailViewOrderCtrl",["$rootScope","$scope","$http","$location",function(n,t,i,r){t.frontData=[];t.frontData.Invoice=[];t.base=[];t.base.returnableItems=[];t.base.returnNote="";t.subTotal=parseFloat(0).toFixed(2);t.estimatedTotal=parseFloat(0).toFixed(2);t.estimatedTaxTotal=parseFloat(0).toFixed(2);t.base.selectedRMAProducts=[];t.base.unpaidOrders=[];t.base.selectedRMAOrder=[];t.base.RMAResult="";t.base.RMASuccess=!1;t.base.noSelectedProductsError=!1;t.base.noCreditOrderError=!1;t.init=function(){};t.enableSpinLoad=function(){document.getElementById("divLoading").style.display="block"};t.disableSpinLoad=function(){document.getElementById("divLoading").style.display="none"};t.getInvoice=function(n){var u=n;t.enableSpinLoad();i({method:"POST",url:r.path().substring(0,3)+"/Retailer/GetRetailInvoiceAjax/",data:{invoiceID:u,orderRef:orderRef}}).then(function(n){t.disableSpinLoad();t.frontData.Invoice=n.data;document.getElementById("invoiceAddress").innerHTML=t.frontData.Invoice.ContactInfo.Address;t.frontData.Invoice.InvoiceDate=new Date(parseInt(t.frontData.Invoice.InvoiceDate.substr(6)));t.frontData.Invoice.OrderDate=new Date(parseInt(t.frontData.Invoice.OrderDate.substr(6)));t.frontData.Invoice.ShipDate=new Date(parseInt(t.frontData.Invoice.ShipDate.substr(6)));t.frontData.Invoice.DueDate=new Date(parseInt(t.frontData.Invoice.DueDate.substr(6)));document.getElementById("openModal").click()},function(n){console.log(n.statusText)})};t.printInvoice=function(){var t=document.getElementById("invoiceBody"),n=window.open("","PrintWindow","width=750,height=650,top=50,left=50,toolbars=no,scrollbars=yes,status=no,resizable=yes");n.document.writeln(t.innerHTML);n.document.close();n.focus();n.print();n.close()};t.getInvoiceItems=function(n){t.base.RMAResult="";t.base.RMASuccess=!1;t.base.noSelectedProductsError=!1;t.base.noCreditOrderError=!1;t.enableSpinLoad();i({method:"POST",url:r.path().substring(0,3)+"/Retailer/GetOrderLinesForRMA/",data:{invoiceID:n}}).then(function(i){t.base.returnableItems=i.data;t.findUnpaidSalesOrders(n)},function(n){console.log(n.statusText)})};t.updateRMAQuantity=function(n){if(!n.SubmitRMAQty)for(let i=0;i<t.base.returnableItems.length;i++)if(t.base.returnableItems[i].ProductID==n.ProductID){t.base.returnableItems[i].SubmitRMAQty=t.base.returnableItems[i].MaxRMAQty;break}t.getNewTotal()};t.getNewTotal=function(){var n=0,i=0;for(let r=0;r<t.base.returnableItems.length;r++)t.base.returnableItems[r].SelectedForRMA&&(n=parseFloat(parseFloat(n)+t.base.returnableItems[r].DiscountUnroundedPrice*t.base.returnableItems[r].SubmitRMAQty).toFixed(2),t.base.returnableItems[r].LineTotal=(t.base.returnableItems[r].DiscountUnroundedPrice*t.base.returnableItems[r].SubmitRMAQty).toFixed(2),i=parseInt(i)+t.base.returnableItems[r].SubmitRMAQty);t.subTotal=parseFloat(n).toFixed(2);t.estimatedTaxTotal=(t.subTotal*taxRate).toFixed(2);t.estimatedTotal=(t.subTotal*(1+taxRate)).toFixed(2);document.getElementById("divLoading").style.display="none"};t.selectAllRMA=function(){for(let n=0;n<t.base.returnableItems.length;n++)t.base.returnableItems[n].SelectedForRMA=!0;t.getNewTotal()};t.unselectAllRMA=function(){for(let n=0;n<t.base.returnableItems.length;n++)t.base.returnableItems[n].SelectedForRMA=!1;t.getNewTotal()};t.createRMAOrder=function(){if(t.simplifyProducts(),t.base.selectedRMAProducts.length==0){t.base.noSelectedProductsError=!0;return}if(t.base.noSelectedProductsError=!1,!t.base.selectedRMAOrder||t.base.unpaidOrders.length==0){t.base.noCreditOrder=!0;return}t.enableSpinLoad();i({method:"POST",url:r.path().substring(0,3)+"/Retailer/CreateRMAOrder/",data:{axOrderNo:axOrderID,selectedCreditOrder:t.base.selectedRMAOrder,products:t.base.selectedRMAProducts}}).then(function(n){t.base.RMAResult=n.data.Message;t.base.RMASuccess=n.data.Success;t.disableSpinLoad()},function(n){console.log(n.statusText);t.disableSpinLoad();closeModal()})};t.simplifyProducts=function(){t.base.selectedRMAProducts=[];for(let n=0;n<t.base.returnableItems.length;n++)if(t.base.returnableItems[n].SelectedForRMA){let i={};i.ProductID=t.base.returnableItems[n].ProductID;i.Quantity=t.base.returnableItems[n].SubmitRMAQty;t.base.selectedRMAProducts.push(i)}};t.findUnpaidSalesOrders=function(n){i({method:"POST",url:r.path().substring(0,3)+"/Retailer/RMAFindOrderToCredit/",data:{invoiceID:n}}).then(function(n){t.base.unpaidOrders=n.data;t.base.unpaidOrders.length>0&&(t.base.selectedRMAOrder=t.base.unpaidOrders[0].OrderNo);t.getNewTotal()},function(n){console.log(n.statusText);document.getElementById("divLoading").style.display="none"})}}]);paperblanksCtrls.controller("SearchResultCtrl",["$rootScope","$scope","$http","$location","$timeout",function(n,t,i,r){t.query=queryStr;t.closureCheckList=[];t.selectedClosures=[];t.colourCheckList=[];t.selectedColours=[];t.pageCheckList=[];t.selectedPageCount=[];t.gsmCheckList=[];t.selectedGSM=[];t.selectedSeries="all";t.selectedSize="all";t.selectedInterior="all";t.selectedTheme="all";t.init=function(n,i,r,u){t.query=t.decodeHtmlEntities(t.query);t.selectedSeries=i.replace("series-","");t.selectedSize=n.replace("format-","");t.selectedInterior=r.replace("interior-","");t.selectedTheme=u.replace("theme-","");t.getFilters()};t.decodeHtmlEntities=function(n){var t=new DOMParser;return t.parseFromString(n,"text/html").body.textContent};t.clearFilters=function(){t.closureCheckList=[];t.selectedClosures=[];t.colourCheckList=[];t.selectedColours=[];t.pageCheckList=[];t.selectedPageCount=[];t.gsmCheckList=[];t.selectedGSM=[];t.selectedSeries="all";t.selectedSize="all";t.selectedInterior="all";t.selectedTheme="all";t.getSearchResults()};t.frontData=[];t.frontData.Categories=[];t.productsByCategories=[];t.numberOfResults=0;t.language=r.path().substring(0,3);t.loading=!1;t.pageReady=!1;t.goToCategory=function(n){window.location.href=t.language+"/catalog/"+n};t.getFilters=function(n){i({method:"POST",url:r.path().substring(0,3)+"/Catalog/GetFiltersAjaxSearchResult/"+t.category,data:{seriesSlug:t.selectedSeries?t.selectedSeries:"all",formatSlug:t.selectedFormat?t.selectedSize:"all",interiorSlug:t.selectedInterior?t.selectedInterior:"all",themeSlug:t.selectedTheme?t.selectedTheme:"all",keyword:t.query}}).then(function(i){if(t.filters=i.data,!n){for(let n=0;n<t.filters.Series.length;n++)if(t.filters.Series[n].Slug==t.selectedSeries){t.filterProducts("series",t.filters.Series[n].Slug,t.filters.Series[n].Value,null);break}for(let n=0;n<t.filters.Formats.length;n++)if(t.filters.Formats[n].Slug==t.selectedSize){t.filterProducts("size",t.filters.Formats[n].Slug,t.filters.Formats[n].Value,null);break}for(let n=0;n<t.filters.Interiors.length;n++)if(t.filters.Interiors[n].Slug==t.selectedInterior){t.filterProducts("interior",t.filters.Interiors[n].Slug,t.filters.Interiors[n].Value,null);break}for(let n=0;n<t.filters.Themes.length;n++)if(t.filters.Themes[n].Slug==t.selectedTheme){t.filterProducts("theme",t.filters.Themes[n].Slug,t.filters.Themes[n].Value,null);break}}t.applyValidFilters();t.AllText=document.getElementById("all").innerText},function(n){console.log(n.statusText)})};t.filterCheckList=function(n,i){var r=[];Object.keys(i).map(function(n){i[n]===!0&&r.push(n)});switch(n){case"colour":t.selectedColours=r;break;case"page":t.selectedPageCount=r;break;case"gsm":t.selectedGSM=r;break;case"closure":t.selectedClosures=r}t.resetProducts=!0;t.doneInfScroll=!1;t.getSearchResults()};t.clearFilterCheckList=function(){t.closureCheckList=[];t.selectedClosures=[];t.colourCheckList=[];t.selectedColours=[];t.pageCheckList=[];t.selectedPageCount=[];t.gsmCheckList=[];t.selectedGSM=[]};t.applyValidFilters=function(){var i=!1,r,u,f,e,n;for(let n=0;n<t.filters.Series.length;n++)if(t.filters.Series[n].Slug==t.selectedSeries){i=!0;break}!i;i=!1;for(let n=0;n<t.filters.Formats.length;n++)if(t.filters.Formats[n].Slug==t.selectedSize){i=!0;break}i||t.resetFilterOnly("size","all","All");i=!1;for(let n=0;n<t.filters.Interiors.length;n++)if(t.filters.Interiors[n].Slug==t.selectedInterior){i=!0;break}i||t.resetFilterOnly("interior","all","All");i=!1;for(let n=0;n<t.filters.Themes.length;n++)if(t.filters.Themes[n].Slug==t.selectedTheme){i=!0;break}i||t.resetFilterOnly("theme","all","All");t.colourCheckList=[];t.removeIndex=[];for(let n=0;n<t.selectedColours.length;n++){r=!1;for(let i=0;i<t.filters.Colours.length;i++)if(t.filters.Colours[i]==t.selectedColours[n]){r=!0;break}r?t.colourCheckList[t.selectedColours[n]]=!0:t.removeIndex.push(t.selectedColours[n])}for(let i=0;i<t.removeIndex.length;i++)n=t.selectedColours.indexOf(t.removeIndex[i]),n!==-1&&t.selectedColours.splice(n,1);t.gsmCheckList=[];t.removeIndex=[];for(let n=0;n<t.selectedGSM.length;n++){u=!1;for(let i=0;i<t.filters.GSM.length;i++)if(t.filters.GSM[i]==t.selectedGSM[n]){u=!0;break}u?t.gsmCheckList[t.selectedGSM[n]]=!0:t.removeIndex.push(t.selectedGSM[n])}for(let i=0;i<t.removeIndex.length;i++)n=t.selectedGSM.indexOf(t.removeIndex[i]),n!==-1&&t.selectedGSM.splice(n,1);t.pageCheckList=[];t.removeIndex=[];for(let n=0;n<t.selectedPageCount.length;n++){f=!1;for(let i=0;i<t.filters.PageCount.length;i++)if(t.filters.PageCount[i]==t.selectedPageCount[n]){f=!0;break}f?t.pageCheckList[t.selectedPageCount[n]]=!0:t.removeIndex.push(t.selectedPageCount[n])}for(let i=0;i<t.removeIndex.length;i++)n=t.selectedPageCount.indexOf(t.removeIndex[i]),n!==-1&&t.selectedPageCount.splice(n,1);t.closureCheckList=[];t.removeIndex=[];for(let n=0;n<t.selectedClosures.length;n++){e=!1;for(let i=0;i<t.filters.Closures.length;i++)if(t.filters.Closures[i]==t.selectedClosures[n]){e=!0;break}e?t.closureCheckList[t.selectedClosures[n]]=!0:t.removeIndex.push(t.selectedClosures[n])}for(let i=0;i<t.removeIndex.length;i++)n=t.selectedClosures.indexOf(t.removeIndex[i]),n!==-1&&t.selectedClosures.splice(n,1);t.getSearchResults(!0)};t.filterProducts=function(n,i,r,u){if(n){u&&u.preventDefault();r==="All"&&(r=t.AllText);switch(n){case"series":$("#series").text(r).val(i);$(".series-dropdown a").removeClass("active");$(".series-dropdown #"+i).addClass("active");t.selectedSeries=i;break;case"size":$("#size").text(r).val(i);$(".size-dropdown a").removeClass("active");$(".size-dropdown #"+i).addClass("active");t.selectedSize=i;break;case"interior":$("#interior").text(r).val(i);$(".interior-dropdown a").removeClass("active");$(".interior-dropdown #"+i).addClass("active");t.selectedInterior=i;break;case"theme":$("#theme").text(r).val(i);$(".theme-dropdown a").removeClass("active");$(".theme-dropdown #"+i).addClass("active");t.selectedTheme=i;break;case"sortBy":$("#sortBy").text(r).val(i);$(".sortBy-dropdown a").removeClass("active");$(".sortBy-dropdown #"+i).addClass("active");t.sort=i}}t.getFilters(!0)};t.resetFilterOnly=function(n,i,r){switch(n){case"series":$("#series").text(r).val(i);$(".series-dropdown a").removeClass("active");$(".series-dropdown #"+i).addClass("active");t.selectedSeries=i;break;case"size":$("#size").text(r).val(i);$(".size-dropdown a").removeClass("active");$(".size-dropdown #"+i).addClass("active");t.selectedSize=i;break;case"interior":$("#interior").text(r).val(i);$(".interior-dropdown a").removeClass("active");$(".interior-dropdown #"+i).addClass("active");t.selectedInterior=i;break;case"theme":$("#theme").text(r).val(i);$(".theme-dropdown a").removeClass("active");$(".theme-dropdown #"+i).addClass("active");t.selectedTheme=i;break;case"sortBy":$("#sortBy").text(r).val(i);$(".sortBy-dropdown a").removeClass("active");$(".sortBy-dropdown #"+i).addClass("active");t.sort=i}};t.getSearchResults=function(n){if(r.path(r.path().substring(0,3)+"/Catalog/Search/"+t.query+"/format-"+t.selectedSize+"/series-"+t.selectedSeries+"/interior-"+t.selectedInterior+"/theme-"+t.selectedTheme),!t.query){t.frontData.Categories=[];t.productsByCategories=[];t.numberOfResults=0;return}t.loading=!0;i({method:"POST",url:r.path().substring(0,3)+"/Catalog/GetCatalogSearchQuery/",data:{q:t.query,series:t.selectedSeries,format:t.selectedSize,interior:t.selectedInterior,theme:t.selectedTheme,closures:t.selectedClosures,colours:t.selectedColours,gsm:t.selectedGSM,pageCount:t.selectedPageCount,sort:t.sort}}).then(function(i){t.loading=!1;t.frontData.Categories=i.data.Categories;t.productsByCategories=i.data.ProductsByCategories;t.numberOfResults=i.data.NumberOfResults;t.pageReady=!0;n||t.getFilters()},function(n){t.loading=!1;console.log(n.statusText)})}}]);paperblanksCtrls.controller("MediaLibraryCtrl",["$rootScope","$scope","$http","$location","$timeout",function(n,t,i,r){t.page=0;t.scrollBusy=!1;t.completedScroll=!1;t.base=[];t.base.mediaCollections=[];t.base.selectedCollection=[];t.base.selectedCollection.MediaCollectionID=0;t.base.youtubeURL="";t.base.mediaTypes=[];t.base.selectedMediaType=[];t.base.selectedMediaType.MediaTypeID=0;t.base.mediaFileTypes=[];t.base.selectedFileType=[];t.base.selectedFileType.MediaFileTypeID=0;t.base.sortBy=[];t.base.selectedSortBy=[];t.base.selectedSortBy.SortByID=1;t.base.searchKeyword="";var u=window.location.pathname.split("/");t.lang=u[1]===undefined||u[1]===""?"en":u[1];try{t.base.searchKeyword=u[4]===undefined||u[4]==="nkw"?"":decodeURIComponent(u[4]);t.page=u[5]===undefined||u[5]===""?0:parseInt(u[5].replace("page-",""));t.base.selectedCollection.MediaCollectionID=u[6]===undefined||u[6]===""?0:parseInt(u[6].replace("collection-",""));t.base.selectedMediaType.MediaTypeID=u[7]===undefined||u[7]===""?0:parseInt(u[7].replace("mediatype-",""));t.base.selectedMediaType.fileTypeID=u[8]===undefined||u[8]===""?0:parseInt(u[8].replace("filetype-",""));t.base.selectedSortBy.SortByID=u[9]===undefined||u[9]===""?1:parseInt(u[9].replace("sortby-",""))}catch(f){console.log(f);t.base.searchKeyword="";t.base.page=0;t.base.selectedCollection.MediaCollectionID=0;t.base.selectedMediaType.MediaTypeID=0;t.base.selectedMediaType.SortByID=1}t.base.mediaLib=[];t.init=function(){t.getMediaDropdowns();t.getMediLibraryScroll()};t.changeDropdown=function(){t.getMediaDropdowns();t.base.mediaLib=[];t.scrollBusy=!1;t.completedScroll=!1;t.page=0;t.updateURL();t.getMediLibraryScroll()};t.keySubmit=function(n){n.which===13&&t.searchKeyword()};t.searchKeyword=function(){t.base.mediaLib=[];t.scrollBusy=!1;t.completedScroll=!1;t.page=0;t.getMediLibraryScroll()};t.getMediaDropdowns=function(){i({method:"POST",url:r.path().substring(0,3)+"/Media/GetMediaDropdowns/",data:{collectionID:t.base.selectedCollection.MediaCollectionID,mediaTypeID:t.base.selectedMediaType.MediaTypeID}}).then(function(n){t.base.mediaCollections=n.data.MediaCollection;let i=!1;for(let n=0;n<t.base.mediaCollections.length;n++)if(t.base.selectedCollection.MediaCollectionID==t.base.mediaCollections[n].MediaCollectionID){t.base.selectedCollection=t.base.mediaCollections[n];i=!0;break}i||(t.base.selectedCollection=t.base.mediaCollections[0]);t.base.mediaTypes=n.data.MediaType;i=!1;for(let n=0;n<t.base.mediaTypes.length;n++)t.base.mediaTypes[n].MediaTypeID==t.base.selectedMediaType.MediaTypeID&&(t.base.selectedMediaType=t.base.mediaTypes[n],i=!0);i||(t.base.selectedMediaType=t.base.mediaTypes[0]);t.base.mediaFileTypes=n.data.MediaFileType;i=!1;for(let n=0;n<t.base.mediaFileTypes.length;n++)t.base.mediaFileTypes[n].MediaFileTypeID==t.base.selectedFileType.MediaFileTypeID&&(t.base.selectedFileType=t.base.mediaFileTypes[n],i=!0);i||(t.base.selectedFileType=t.base.mediaFileTypes[0]);t.base.sortBy=n.data.SortBy;i=!1;for(let n=0;n<t.base.sortBy.length;n++)t.base.sortBy[n].SortByID==t.base.selectedSortBy.SortByID&&(t.base.selectedSortBy=t.base.sortBy[n],i=!0);i||(t.base.selectedSortBy=t.base.sortBy[0])},function(n){console.log(n.statusText)})};t.getMediLibraryScroll=function(){t.scrollBusy||t.completedScroll||(t.enabledSpinner(),t.scrollBusy=!0,i({method:"POST",url:r.path().substring(0,3)+"/Media/GetMediaLibraryAjax/",data:{page:t.page,keyword:t.base.searchKeyword,collectionID:t.base.selectedCollection.MediaCollectionID,mediaTypeID:t.base.selectedMediaType.MediaTypeID,fileTypeID:t.base.selectedFileType.MediaFileTypeID,sortByID:t.base.selectedSortBy.SortByID}}).then(function(n){t.scrollBusy=!1;n.data.length<20&&(t.completedScroll=!0);t.base.mediaLib=t.base.mediaLib.concat(n.data);t.page=t.page+1;t.disableSpinner()},function(n){t.scrollBusy=!1;console.log(n.statusText)}))};t.toggleVideo=function(n){t.activeVideo=!0;var i="//www.youtube.com/embed/"+n+"?rel=0";t.base.youtubeURL=i};t.enabledSpinner=function(){document.getElementById("divLoading").style.display="block"};t.disableSpinner=function(){document.getElementById("divLoading").style.display="none"};t.updateURL=function(){let n=t.lang+"/media/resources";n=t.base.searchKeyword?n+"/"+encodeURIComponent(t.base.searchKeyword):n+"/nkw";n=t.page?n+"/page-"+t.page:n+"/page-0";n=t.base.selectedCollection.MediaCollectionID?n+"/collection-"+t.base.selectedCollection.MediaCollectionID:n+"/collection-0";n=t.base.selectedMediaType.MediaTypeID?n+"/mediatype-"+t.base.selectedMediaType.MediaTypeID:n+"/mediatype-0";n=t.base.selectedFileType.MediaFileTypeID?n+"/filetype-"+t.base.selectedFileType.MediaFileTypeID:n+"/filetype-0";n=t.base.selectedSortBy.SortByID?n+"/sortby-"+t.base.selectedSortBy.SortByID:n+"/sortby-0";r.path(n)}}]);paperblanksCtrls.controller("WishListCtrl",["$rootScope","$scope","$http","$location",function(n,t,i,r){t.base=[];t.base.wishList=[];t.base.page=0;t.base.infScrollBusy=!1;t.base.doneInfScroll=!1;t.init=function(){console.log("init")};t.getWishlistProducts=function(){t.base.infScrollBusy||t.base.doneInfScroll||(t.base.infScrollBusy=!0,i({method:"POST",url:r.path().substring(0,3)+"/Shop/GetWishListByPage/",data:{page:t.base.page}}).then(function(n){t.base.wishList=t.base.page==0?n.data:t.base.wishList.concat(n.data);n.data.length<=0&&(t.base.doneInfScroll=!0);t.base.page=t.base.page+1;t.base.infScrollBusy=!1;t.disableSpinner()},function(n){console.log(n.statusText)}))};t.removeFromWishlist=function(n){i({method:"POST",url:r.path().substring(0,3)+"/Shop/RemoveFromWishList",data:{productID:n}}).then(function(){let i=-1;for(let r=0;r<t.base.wishList.length;r++)if(t.base.wishList[r].ProductID==n){i=r;break}t.base.wishList.splice(i,1)},function(){})};t.addToCart=function(n){flyToElement(document.getElementById(n+"Img"),document.getElementById("cart"));setTimeout(function(){i({method:"POST",url:r.path().substring(0,3)+"/Shop/AddProductToCart",data:{productID:n,quantity:1}}).then(function(i){if(i.data.Success){document.getElementById("cartitemCount").innerText=i.data.Quantity;for(let r=0;r<t.base.wishList.length;r++)if(t.base.wishList[r].ProductID==n){t.base.wishList[r].RecordID=i.data.RecordID;break}}},function(){})},500)};t.enableSpinner=function(){document.getElementById("divLoading").style.display="block"};t.disableSpinner=function(){document.getElementById("divLoading").style.display="none"}}]);paperblanksCtrls.controller("ProductImageLibraryCtrl",["$rootScope","$scope","$http","$location",function(n,t,i,r){t.infScrollBusy=!0;t.doneInfScroll=!1;t.productLines=[];t.categories=[];t.subCategories=[];t.productLinesReady=!1;t.categoriesReady=!1;t.subCategoriesReady=!1;t.images=[];t.pageCount=-1;t.frontData=[];t.gettingImages=!1;t.frontData.isNew=!1;t.frontData.selectedCategory={};t.frontData.selectedCategory.ID=0;t.frontData.selectedCategory.CategoryName="All";t.frontData.selectedSubCategory={};t.frontData.selectedSubCategory.ID=0;t.frontData.selectedSubCategory.subCategoryName="All";t.changedSubCategoryed=!1;t.frontData.zipBtnVal=[];t.resetPage=!1;t.firstLoad=!0;t.infScrollBusy=!1;t.lastImageCount=0;t.doneImageScroll=!1;t.productCategories=[];t.series=[];t.formats=[];t.interiors=[];t.collections=[];t.sortBy=[];t.frontData.selectedProductCategory=[];t.frontData.selectedSeries=[];t.frontData.selectedFormat=[];t.frontData.selectedInterior=[];t.frontData.selectedCollection=[];t.frontData.selectedSortBy=[];t.getImagecart=function(){i({method:"POST",url:r.path().substring(0,3)+"/Retailer/GetCartImages/",data:{}}).then(function(n){t.frontData.zipBtnVal=[];for(let r=0;r<n.data.length;r++){var i={};i.ID=n.data[r].SelectedID;i.URL=n.data[r].SelectedURL;i.ThumbURL=n.data[r].SelectedThumbnail;i.Filename=n.data[r].SelectedFilename;t.frontData.zipBtnVal.push(i)}},function(n){console.log(n.statusText)})};t.getProductCategories=function(){i({method:"GET",url:r.path().substring(0,3)+"/Retailer/GetProductCategories/",data:{}}).then(function(n){t.productCategories=[];t.productCategories=t.productCategories.concat(n.data);t.frontData.selectedProductCategory=t.productCategories[0];t.productCategoryReady=!0;t.getFilters()},function(){})};t.getFilters=function(){t.firstFilter&&(t.firstFilter=!1);i({method:"POST",url:r.path().substring(0,3)+"/Retailer/GetFiltersAjax/",data:{categoryID:t.frontData.selectedProductCategory.ID,imageLookup:!0}}).then(function(n){t.filters=n.data;t.series=[];t.series=t.series.concat(t.filters.Series);t.frontData.selectedSeries=t.series[0];t.formats=[];t.formats=t.formats.concat(t.filters.Formats);t.frontData.selectedFormat=t.formats[0];t.interiors=[];t.interiors=t.interiors.concat(t.filters.Interiors);t.frontData.selectedInterior=t.interiors[0];t.collections=[];t.collections=t.collections.concat(t.filters.Collections);t.frontData.selectedCollection=t.collections[0];t.sortBy=t.filters.Sorts;t.frontData.selectedSortBy=t.sortBy[0];t.filterReady=!0;t.pageCount=0;t.infScrollBusy=!1;t.getImages()},function(n){console.log(n.statusText)})};t.clearChange=function(){t.pageCount=0;t.doneImageScroll=!1;t.infScrollBusy=!1;t.gettingImages=!1;t.resetPage=!0;t.images=[]};t.changeCategory=function(n){for(let i=0;i<t.productCategories.length;i++)if(t.productCategories[i].ID==n){t.frontData.selectedProductCategory=t.productCategories[i];break}t.selectedProductCategory=n;t.clearChange();t.getFilters()};t.changeSeries=function(n){t.frontData.selectedSeries=n;t.clearChange();t.getImages()};t.changeFormat=function(n){t.frontData.selectedFormat=n;t.clearChange();t.getImages()};t.changeInterior=function(n){t.frontData.selectedInterior=n;t.clearChange();t.getImages()};t.changeCollection=function(n){t.frontData.selectedCollection=n;t.clearChange();t.getImages()};t.changeSortBy=function(n){t.frontData.selectedSortBy=n;t.clearChange();t.getImages()};t.keySubmit=function(n){n.which===13&&t.searchKeyword()};t.searchKeyword=function(){t.clearChange();t.getImages()};t.init=function(){t.getImagecart();t.getProductCategories()};t.clearImages=function(){var u,n;for(let i=0;i<t.frontData.zipBtnVal.length;i++)u=document.getElementById(t.frontData.zipBtnVal[i].ID),u&&(u.style.border="1px #dfdfdf solid",n=document.getElementById(t.frontData.zipBtnVal[i].ID+"SelectIcon"),n.className="fa fa-plus-circle",n.parentElement.style.backgroundColor="",n.parentElement.className="btn btn-secondary");i({method:"POST",url:r.path().substring(0,3)+"/Retailer/ClearCartImages/",data:{}}).then(function(){t.frontData.zipBtnVal=[]},function(n){console.log(n.statusText)})};t.sendFilterZipParm=function(){i({method:"POST",url:r.path().substring(0,3)+"/Retailer/SendFilterZipParm/",data:{ProductCategoryID:t.frontData.selectedProductCategory.ID,Series:t.frontData.selectedSeries.Slug,Format:t.frontData.selectedFormat.Slug,Interior:t.frontData.selectedInterior.Slug,Collection:t.frontData.selectedCollection.Slug,Keyword:t.frontData.keyword}}).then(function(){t.downloadFilterZip()},function(n){console.log(n.statusText)})};t.downloadFilterZip=function(){document.getElementById("divLoadingDownloading").style.display="block";document.location=r.path().substring(0,3)+"/retailer/DownloadFilterZip?nocache="+(new Date).getTime();setTimeout(function(){t.downloadContextFree()},1e3)};t.downloadContextFree=function(){i({method:"POST",url:r.path().substring(0,3)+"/Retailer/SpinLoader/",data:{}}).then(function(){document.getElementById("divLoadingDownloading").style.display="none"},function(n){document.getElementById("divLoadingDownloading").style.display="none";console.log(n.statusText)})};t.selectZipImage=function(n,u,f,e){var s={},c,o,h,l;for(s.ID=n,s.URL=u,s.ThumbURL=f,s.Filename=e,c=!1,o=document.getElementById(n+"SelectIcon"),h=0;h<t.frontData.zipBtnVal.length;h++)if(s.ID===t.frontData.zipBtnVal[h].ID){document.getElementById(n).style.border="1px #dfdfdf solid";o.className="fa fa-plus-circle";o.parentElement.style.backgroundColor="";o.parentElement.className="btn btn-secondary";t.frontData.zipBtnVal.splice(h,1);c=!0;i({method:"POST",url:r.path().substring(0,3)+"/Retailer/RemoveImageFromCart/",data:{imageID:n}}).then(function(){},function(n){console.log(n.statusText)});break}c===!1&&(document.getElementById(n).style.border="1px #538ab6 solid",o.className="fa fa-minus-circle",o.parentElement.className="btn btn-danger",o.parentElement.style.backgroundColor="#9E2A2B",t.frontData.zipBtnVal.push(s),i({method:"POST",url:r.path().substring(0,3)+"/Retailer/AddImageToCart/",data:{SelectedID:n,SelectedURL:u,SelectedThumbnail:f,SelectedFilename:e}}).then(function(){},function(n){console.log(n.statusText)}));openSidebar===!1&&(l=$(window).width(),l>=763&&document.getElementById("openSidebarBtn").click())};t.getImagesScroll=function(){t.infScrollBusy||(t.infScrollBusy=!0,t.resetPage=!1,t.doneImageScroll||t.getImages())};t.getImages=function(){t.resetPage===!1&&(t.pageCount=parseInt(t.pageCount)+1);t.lastImageCount=t.images.length;t.resetPage=!0;document.getElementById("divLoading").style.display="block";t.gettingImages=!0;i({method:"POST",url:r.path().substring(0,3)+"/Retailer/GetProductImagesAjax/",data:{page:t.pageCount,productCategory:t.frontData.selectedProductCategory.ID,series:t.frontData.selectedSeries.Slug,format:t.frontData.selectedFormat.Slug,interior:t.frontData.selectedInterior.Slug,collection:t.frontData.selectedCollection.Slug,sortBy:t.frontData.selectedSortBy.ID,keyword:t.frontData.keyword}}).then(function(n){t.gettingImages=!1;t.infScrollBusy=!1;t.images=t.images.concat(n.data.ImageList);setTimeout(function(){for(var r,i=0;i<t.frontData.zipBtnVal.length;i++)for(let u=0;u<n.data.ImageList.length;u++)n.data.ImageList[u].ImageID===t.frontData.zipBtnVal[i].ID&&(r=document.getElementById(n.data.ImageList[u].ImageID+"SelectIcon"),document.getElementById(n.data.ImageList[u].ImageID).style.border="1px #538ab6 solid",r.className="fa fa-minus-circle",r.parentElement.className="btn btn-danger",r.parentElement.style.backgroundColor="#9E2A2B")},50);t.lastImageCount==t.images.length&&(t.doneImageScroll=!0);document.getElementById("divLoading").style.display="none"},function(n){t.gettingImages=!1;console.log(n.statusText)})};t.sendDownloadList=function(){if(t.frontData.zipBtnVal.length<=0){t.frontData.zipImgResp="Please select images to download";return}t.frontData.zipImgResp="";i({method:"POST",url:r.path().substring(0,3)+"/Retailer/SendZipDetails/",data:{files:t.frontData.zipBtnVal}}).then(function(){t.downloadZip()},function(n){console.log(n.statusText)})};t.downloadZip=function(){document.location=r.path().substring(0,3)+"/retailer/SubmitRetailImageZip?nocache="+(new Date).getTime()}}]);paperblanksCtrls.controller("SupportTicketsCtrl",["$rootScope","$scope","$http","$location","$timeout",function(n,t,i,r){t.page=0;t.base=[];t.base.supportTickets=[];t.base.infScrollBusy=!1;t.base.doneInfScroll=!1;t.base.pageReady=!1;t.base.languageCode=r.path().substring(0,3);t.init=function(){console.log("init")};t.getSupportTickets=function(){t.base.infScrollBusy||t.base.doneInfScroll||(t.base.infScrollBusy=!0,t.enableSpinner(),i({method:"POST",url:r.path().substring(0,3)+"/Support/GetSupportTickets",data:{page:t.page}}).then(function(n){t.page==0?(t.base.supportTickets=n.data,t.base.pageReady=!0):n.data&&(t.base.supportTickets=t.base.supportTickets.concat(n.data));n.data.length<=0&&(t.base.doneInfScroll=!0);t.page=t.page+1;t.base.infScrollBusy=!1;t.disableSpinner()},function(){}))};t.enableSpinner=function(){document.getElementById("divLoading").style.display="block"};t.disableSpinner=function(){document.getElementById("divLoading").style.display="none"}}]);paperblanksCtrls.controller("TellAFriendCtrl",["$rootScope","$scope","$http","$location",function(n,t,i,r){t.base=[];t.base.friendList=[];t.base.suggestedItems=[];t.init=function(){console.log("init")};t.getTellAFriendList=function(){i({method:"POST",url:r.path().substring(0,3)+"/Shop/GetTellAFriendList",data:{}}).then(function(n){t.base.friendList=n.data},function(){})};t.getSuggestedProducts=function(){i({method:"POST",url:r.path().substring(0,3)+"/Shop/GetSuggestedItems",data:{numberOfSuggestions:6}}).then(function(n){t.base.suggestedItems=n.data;t.disableSpinner()},function(){})};t.enableSpinner=function(){document.getElementById("divLoading").style.display="block"};t.disableSpinner=function(){document.getElementById("divLoading").style.display="none"};t.copyLink=function(n){var t=document.getElementById(n+"Link");t.select();t.setSelectionRange(0,99999);document.execCommand("copy")}}]);paperblanksCtrls.controller("NYPLCtrl",["$rootScope","$scope","$http","$location",function(n,t){t.videoOne="//www.youtube.com/embed/Te6oABL6chc?rel=0";t.videoTwo="//www.youtube.com/embed/m7Wj3dY0HMw?rel=0";t.videoThree="//www.youtube.com/embed/E6EN-Es8IBs?rel=0";t.videoFour="//www.youtube.com/embed/-JLInZU-AdA?rel=0";t.base=[];t.base.selectedVideo="";t.init=function(){console.log("init")};t.selectVideo=function(n){t.base.selectedVideo=n==1?t.videoOne:n==2?t.videoTwo:n==3?t.videoThree:n==4?t.videoFour:""}}]);paperblanksCtrls.controller("PressKitCtrl",["$rootScope","$scope","$http","$location",function(n,t,i,r){t.base=[];t.base.pressReleases=[];t.base.otherReleases=[];t.expanded=[];t.expanded.pressReleases=!1;t.expanded.pressPostOther=!1;t.expanded.story=!1;t.init=function(){console.log("init");t.getPressReleases();t.getOtherReleases()};t.getPressReleases=function(){i({method:"POST",url:r.path().substring(0,3)+"/Media/GetPressKitPressReleasesAjax/",data:{}}).then(function(n){t.base.pressReleases=n.data},function(n){console.log(n.statusText)})};t.getOtherReleases=function(){i({method:"POST",url:r.path().substring(0,3)+"/Media/GetPressKitOtherPostsAjax/",data:{}}).then(function(n){t.base.otherReleases=n.data},function(n){console.log(n.statusText)})};t.expandPressReleases=function(){t.expanded.pressReleases=t.expanded.pressReleases?!1:!0};t.expandPressOther=function(){t.expanded.pressPostOther=t.expanded.pressPostOther?!1:!0};t.expandStory=function(){t.expanded.story=t.expanded.story?!1:!0};t.goTo=function(n){document.getElementById(n).scrollIntoView({behavior:"smooth"})}}]);paperblanksCtrls.controller("ProductWizardCtrl",["$rootScope","$scope","$http","$location","$timeout",function(n,t,i,r){t.base=[];t.base.selectedProductTypes=[];t.base.selectedProductGroupThemes=[];t.base.selectedFormats=[];t.base.selectedInteriors=[];t.base.selectedPaperPages=[];t.base.selectedClosures=[];t.base.step=0;t.base.stepCompleted=[];t.base.showingResult=!1;t.base.products=[];t.base.fetchingProducts=!1;t.base.page=0;t.base.doneFetchingProducts=!1;t.base.lastStepBeforeResult=0;t.base.productCount=0;t.base.filtersLoaded=!1;t.base.resultWizardKey="";t.filters=[];t.edgePrinting=!1;t.closureCheckList=[];t.selectedClosures=[];t.colourCheckList=[];t.selectedColours=[];t.pageCheckList=[];t.selectedPageCount=[];t.gsmCheckList=[];t.selectedGSM=[];t.closureCheckList=[];t.selectedClosures=[];t.colourCheckList=[];t.selectedColours=[];t.pageCheckList=[];t.selectedPageCount=[];t.gsmCheckList=[];t.selectedGSM=[];t.sort="desc";t.sortText="";t.selectedSeries=[];t.selectedSeries.Slug="all";t.selectedSize=[];t.selectedSize.Slug="all";t.selectedInterior=[];t.selectedInterior.Slug="all";t.selectedTheme=[];t.selectedTheme.Slug="all";t.selectedDPLang=[];t.selectedDPLang.Slug="all";t.newProductCategory=[];t.newProductCategory.Slug="all";t.edgePrinting=!1;t.init=function(){console.log("init");t.resetSteps();t.getFilters();filterHash||t.resetURL()};t.getFilters=function(){i({method:"POST",url:r.path().substring(0,3)+"/Product/GetWizardFilters/",data:{filterHash:filterHash}}).then(function(n){if(t.base.selectedProductTypes=n.data.ProductTypes,t.base.selectedProductGroupThemes=n.data.ProductGroupThemes,t.base.selectedFormats=n.data.Formats,t.base.selectedInteriors=n.data.Interiors,t.base.selectedPaperPages=n.data.PaperPages,t.base.selectedClosures=n.data.Closures,n.data.CompletedSteps){t.base.stepCompleted[0]=!0;for(let i=0;i<n.data.CompletedSteps.length;i++)t.base.stepCompleted[n.data.CompletedSteps[i]]=!0;t.base.step=n.data.CompletedSteps[n.data.CompletedSteps.length-1];t.showResults()}t.base.filtersLoaded=!0},function(n){console.log(n.statusText)})};t.resetSteps=function(){t.base.stepCompleted=[];t.base.stepCompleted.push(!1);t.base.stepCompleted.push(!1);t.base.stepCompleted.push(!1);t.base.stepCompleted.push(!1);t.base.stepCompleted.push(!1);t.base.stepCompleted.push(!1);t.base.stepCompleted.push(!1)};t.selectProductType=function(n){for(let i=0;i<t.base.selectedProductTypes.length;i++)if(t.base.selectedProductTypes[i].ProductTypeID==n){t.base.selectedProductTypes[i].Selected=t.base.selectedProductTypes[i].Selected?!1:!0;break}};t.selectProductGroupTheme=function(n){t.base.selectedProductGroupThemes[n].Selected=t.base.selectedProductGroupThemes[n].Selected?!1:!0};t.getProductTypes=function(){i({method:"POST",url:r.path().substring(0,3)+"/Product/GetProductTypes/",data:{}}).then(function(n){t.base.selectedProductTypes=n.data},function(n){console.log(n.statusText)})};t.getProductGroupThemes=function(){i({method:"POST",url:r.path().substring(0,3)+"/Product/GetProductGroupThemes/",data:{}}).then(function(n){t.base.selectedProductGroupThemes=n.data},function(n){console.log(n.statusText)})};t.getWizardFormats=function(){i({method:"POST",url:r.path().substring(0,3)+"/Product/GetWizardFormats/",data:{}}).then(function(n){t.base.selectedFormats=n.data},function(n){console.log(n.statusText)})};t.selectWizardFormat=function(n){for(let i=0;i<t.base.selectedFormats.length;i++)if(t.base.selectedFormats[i].FormatWizardID==n){t.base.selectedFormats[i].Selected=t.base.selectedFormats[i].Selected?!1:!0;break}};t.getWizardInteriors=function(){i({method:"POST",url:r.path().substring(0,3)+"/Product/GetWizardInteriors/",data:{}}).then(function(n){t.base.selectedInteriors=n.data},function(n){console.log(n.statusText)})};t.selectWizardInterior=function(n){for(let i=0;i<t.base.selectedInteriors.length;i++)if(t.base.selectedInteriors[i].WizardInteriorID==n){t.base.selectedInteriors[i].Selected=t.base.selectedInteriors[i].Selected?!1:!0;break}};t.getWizardPaperPage=function(){i({method:"POST",url:r.path().substring(0,3)+"/Product/GetWizardPaperPage/",data:{}}).then(function(n){t.base.selectedPaperPages=n.data},function(n){console.log(n.statusText)})};t.selectPaperPage=function(n){for(let i=0;i<t.base.selectedPaperPages.length;i++)if(t.base.selectedPaperPages[i].WizardPaperPageID==n){t.base.selectedPaperPages[i].Selected=t.base.selectedPaperPages[i].Selected?!1:!0;break}};t.getWizardClosure=function(){i({method:"POST",url:r.path().substring(0,3)+"/Product/GetWizardClosure/",data:{}}).then(function(n){t.base.selectedClosures=n.data},function(n){console.log(n.statusText)})};t.selectClosure=function(n){for(let i=0;i<t.base.selectedClosures.length;i++)if(t.base.selectedClosures[i].WizardClosureID==n){t.base.selectedClosures[i].Selected=t.base.selectedClosures[i].Selected?!1:!0;break}};t.goToStep=function(n){if(t.resetURL(),t.base.stepCompleted[n])t.base.step=n;else return;if(t.base.step=n,t.base.showingResult=!1,n>2){var i=!0;for(let n=0;n<t.base.selectedProductTypes.length;n++)t.base.selectedProductTypes[n].Selected&&t.base.selectedProductTypes[n].ProductTypeID!=6&&(i=!1);i&&t.showResults()}};t.validateStep=function(){let n=0;if(t.base.step==0&&(n=1),t.base.step==1){for(let i=0;i<t.base.selectedProductTypes.length;i++)t.base.selectedProductTypes[i].Selected&&n++;t.base.stepCompleted[1]=n>0?!0:!1}else if(t.base.step==2){for(let i=0;i<t.base.selectedProductGroupThemes.length;i++)t.base.selectedProductGroupThemes[i].Selected&&n++;t.base.stepCompleted[2]=n>0?!0:!1}else if(t.base.step==3){for(let i=0;i<t.base.selectedFormats.length;i++)t.base.selectedFormats[i].Selected&&n++;t.base.stepCompleted[3]=n>0?!0:!1}else if(t.base.step==4){for(let i=0;i<t.base.selectedInteriors.length;i++)t.base.selectedInteriors[i].Selected&&n++;t.base.stepCompleted[4]=n>0?!0:!1}else if(t.base.step==5){let i=!1,r=!1,u=!1;for(let f=0;f<t.base.selectedPaperPages.length;f++)t.base.selectedPaperPages[f].Selected&&(f==0||f==1?i=!0:f==2||f==3||f==4?r=!0:u=!0,n++);(i==!1||r==!1||u==!1)&&(n=0);t.base.stepCompleted[5]=n>0?!0:!1}else if(t.base.step==6){for(let i=0;i<t.base.selectedClosures.length;i++)t.base.selectedClosures[i].Selected&&n++;t.base.stepCompleted[6]=n>0?!0:!1}return n};t.goToNextStep=function(){let n=0;if(t.base.step>=0&&t.base.step<=6&&(n=t.validateStep()),t.base.step==2){var i=!0;for(let n=0;n<t.base.selectedProductTypes.length;n++)t.base.selectedProductTypes[n].Selected&&t.base.selectedProductTypes[n].ProductTypeID!=6&&(i=!1);if(i){t.showResults();return}}if(n>0){if(t.base.step==6){t.showResults();return}t.base.step=t.base.step+1}else t.selectAllThatApplyAlert();enableToolTips()};t.selectAllThatApplyAlert=function(){var n=document.getElementsByClassName("selectAllThatApply");for(let t=0;t<n.length;t++)n[t].classList.add("wizardWarningText");setTimeout(function(){for(let t=0;t<n.length;t++)n[t].classList.remove("wizardWarningText")},500)};t.goBackStep=function(){t.resetURL();t.base.step==7?(t.base.step=t.base.lastStepBeforeResult,t.base.showingResult=!1):t.base.step>=2&&(t.base.step=t.base.step-1)};t.showResults=function(){t.base.step>=2&&t.base.step<=6?(t.base.lastStepBeforeResult=t.base.step,t.validateStep()):t.base.step==6&&(t.base.lastStepBeforeResult=6);t.base.step=7;t.base.showingResult=!0;t.base.products=[];t.base.page=0;t.base.doneFetchingProducts=!1;t.base.fetchingProducts=!1;t.getProductResultsAjax()};t.returnToFilter=function(){t.base.showingResult=!1};t.getProductResultsAjax=function(){if(!t.base.fetchingProducts&&!t.base.doneFetchingProducts){t.base.fetchingProducts=!0;let n=[],u=[],f=[],e=[],o=[],s=[];for(let i=0;i<t.base.selectedClosures.length;i++)t.base.selectedClosures[i].Selected&&n.push(t.base.selectedClosures[i].WizardClosureID);for(let n=0;n<t.base.selectedFormats.length;n++)t.base.selectedFormats[n].Selected&&u.push(t.base.selectedFormats[n].FormatWizardID);for(let n=0;n<t.base.selectedInteriors.length;n++)t.base.selectedInteriors[n].Selected&&f.push(t.base.selectedInteriors[n].WizardInteriorID);for(let n=0;n<t.base.selectedPaperPages.length;n++)t.base.selectedPaperPages[n].Selected&&e.push(t.base.selectedPaperPages[n].WizardPaperPageID);for(let n=0;n<t.base.selectedProductGroupThemes.length;n++)t.base.selectedProductGroupThemes[n].Selected&&o.push(t.base.selectedProductGroupThemes[n].ProductGroupThemeID);for(let n=0;n<t.base.selectedProductTypes.length;n++)t.base.selectedProductTypes[n].Selected&&s.push(t.base.selectedProductTypes[n].ProductTypeID);i({method:"POST",url:r.path().substring(0,3)+"/Product/GetProductWizardResults/",data:{ProductTypes:s,ProductGroupThemes:o,Formats:u,Interiors:f,PaperPages:e,Closures:n,Page:t.base.page,seriesF:t.selectedSeries.Slug,formatF:t.selectedSize.Slug,interiorF:t.selectedInterior.Slug,themeF:t.selectedTheme.Slug,closuresF:t.selectedClosures.Slug,coloursF:t.selectedColours,dPLangF:t.selectedDPLang,newProductCategoryF:t.newProductCategory,edgePrintingF:t.edgePrinting,sortF:t.sort,gSMF:t.selectedGSM,pageCountF:t.selectedPageCount}}).then(function(n){if(t.base.productCount=n.data.Count,n.data.length==0){t.base.doneFetchingProducts=!0;return}t.base.products=t.base.products.length>0?t.base.products.concat(n.data.Products):n.data.Products;t.base.page==0&&n.data.GUID&&(t.base.resultWizardKey=n.data.GUID,r.path(r.path().substring(0,3)+"/product/wizard/"+n.data.GUID),t.getResultFilters());t.base.page=t.base.page+1;t.base.fetchingProducts=!1},function(n){t.base.fetchingProducts=!1;console.log(n.statusText)})}};t.resetURL=function(){r.path(r.path().substring(0,3)+"/product/wizard/")};t.startOver=function(){t.resetURL();t.resetSteps();t.base.step=1;t.clearAllSelections();t.base.showingResult=!1};t.clearAllSelections=function(){t.clearProductTypes();t.clearThemes();t.clearFormats();t.clearInteriors();t.clearPaperPages();t.clearClosures()};t.clearProductTypes=function(){for(let n=0;n<t.base.selectedProductTypes.length;n++)t.base.selectedProductTypes[n].Selected=!1};t.clearThemes=function(){for(let n=0;n<t.base.selectedProductGroupThemes.length;n++)t.base.selectedProductGroupThemes[n].Selected=!1};t.clearFormats=function(){for(let n=0;n<t.base.selectedFormats.length;n++)t.base.selectedFormats[n].Selected=!1};t.clearInteriors=function(){for(let n=0;n<t.base.selectedInteriors.length;n++)t.base.selectedInteriors[n].Selected=!1};t.clearPaperPages=function(){for(let n=0;n<t.base.selectedPaperPages.length;n++)t.base.selectedPaperPages[n].Selected=!1};t.clearClosures=function(){for(let n=0;n<t.base.selectedClosures.length;n++)t.base.selectedClosures[n].Selected=!1};t.getResultFilters=function(){i({method:"POST",url:r.path().substring(0,3)+"/Catalog/GetFiltersAjax/wizard",data:{seriesSlug:t.selectedSeries.Slug,formatSlug:t.selectedSize.Slug,interiorSlug:t.selectedInterior.Slug,themeSlug:t.selectedTheme.Slug,dpLangSlug:t.selectedDPLang.Slug,newProductCategory:t.newProductCategory.Slug,wizardKey:t.base.resultWizardKey}}).then(function(n){t.filters=n.data;t.applyValidFilters()},function(n){console.log(n.statusText)})};t.getSortText=function(){return t.sort&&(t.sortText=document.getElementById(t.sort).innerText),t.sortText};t.filterProducts=function(n,i){if(i&&i=="all"&&(i=[],i.Slug="all"),n){switch(n){case"categories":t.newProductCategory=i;t.changedProductCategory=!0;break;case"series":t.selectedSeries=i;break;case"size":t.selectedSize=i;break;case"interior":t.selectedInterior=i;break;case"theme":t.selectedTheme=i;break;case"dpLang":t.selectedDPLang=i;break;case"sortBy":t.sort=i;t.sortText=document.getElementById(i).innerText;break;case"edgePrinting":t.edgePrinting=i}t.changedProductCategory?(t.clearFilters(),t.changedProductCategory=!1):t.getResultFilters()}n||t.getResultFilters();t.base.products=[];t.base.page=0;t.base.doneFetchingProducts=!1;t.base.fetchingProducts=!1;t.getProductResultsAjax()};t.clearFilters=function(){t.closureCheckList=[];t.selectedClosures=[];t.colourCheckList=[];t.selectedColours=[];t.pageCheckList=[];t.selectedPageCount=[];t.gsmCheckList=[];t.selectedGSM=[];t.selectedSeries=[];t.selectedSeries.Slug="all";t.selectedSize=[];t.selectedSize.Slug="all";t.selectedInterior=[];t.selectedInterior.Slug="all";t.selectedTheme=[];t.selectedTheme.Slug="all";t.selectedDPLang=[];t.selectedDPLang.Slug="all";t.edgePrinting=!1;t.getResultFilters();t.base.products=[];t.base.page=0;t.base.doneFetchingProducts=!1;t.base.fetchingProducts=!1;t.getProductResultsAjax()};t.applyValidFilters=function(){var i=!1,r,u,f,e,n;for(let n=0;n<t.filters.Series.length;n++)if(t.filters.Series[n].Slug==t.selectedSeries.Slug){i=!0;break}i||(t.selectedSeries=[],t.selectedSeries.Slug="all");for(let n=0;n<t.filters.Formats.length;n++)if(t.filters.Formats[n].Slug==t.selectedSize.Slug){i=!0;break}i||(t.selectedSize=[],t.selectedSize.Slug="all");i=!1;for(let n=0;n<t.filters.Interiors.length;n++)if(t.filters.Interiors[n].Slug==t.selectedInterior.Slug){i=!0;break}i||(t.selectedInterior=[],t.selectedInterior.Slug="all");i=!1;for(let n=0;n<t.filters.Themes.length;n++)if(t.filters.Themes[n].Slug==t.selectedTheme.Slug){i=!0;break}i||(t.selectedTheme=[],t.selectedTheme.Slug="all");i=!1;for(let n=0;n<t.filters.DPLanguages.length;n++)if(t.filters.DPLanguages[n].Slug==t.selectedDPLang.Slug){i=!0;break}i||(t.selectedDPLang=[],t.selectedDPLang.Slug="all");t.colourCheckList=[];t.removeIndex=[];for(let n=0;n<t.selectedColours.length;n++){r=!1;for(let i=0;i<t.filters.Colours.length;i++)if(t.filters.Colours[i]==t.selectedColours[n]){r=!0;break}r?t.colourCheckList[t.selectedColours[n]]=!0:t.removeIndex.push(t.selectedColours[n])}for(let i=0;i<t.removeIndex.length;i++)n=t.selectedColours.indexOf(t.removeIndex[i]),n!==-1&&t.selectedColours.splice(n,1);t.gsmCheckList=[];t.removeIndex=[];for(let n=0;n<t.selectedGSM.length;n++){u=!1;for(let i=0;i<t.filters.GSM.length;i++)if(t.filters.GSM[i]==t.selectedGSM[n]){u=!0;break}u?t.gsmCheckList[t.selectedGSM[n]]=!0:t.removeIndex.push(t.selectedGSM[n])}for(let i=0;i<t.removeIndex.length;i++)n=t.selectedGSM.indexOf(t.removeIndex[i]),n!==-1&&t.selectedGSM.splice(n,1);t.pageCheckList=[];t.removeIndex=[];for(let n=0;n<t.selectedPageCount.length;n++){f=!1;for(let i=0;i<t.filters.PageCount.length;i++)if(t.filters.PageCount[i]==t.selectedPageCount[n]){f=!0;break}f?t.pageCheckList[t.selectedPageCount[n]]=!0:t.removeIndex.push(t.selectedPageCount[n])}for(let i=0;i<t.removeIndex.length;i++)n=t.selectedPageCount.indexOf(t.removeIndex[i]),n!==-1&&t.selectedPageCount.splice(n,1);t.closureCheckList=[];t.removeIndex=[];for(let n=0;n<t.selectedClosures.length;n++){e=!1;for(let i=0;i<t.filters.Closures.length;i++)if(t.filters.Closures[i]==t.selectedClosures[n]){e=!0;break}e?t.closureCheckList[t.selectedClosures[n]]=!0:t.removeIndex.push(t.selectedClosures[n])}for(let i=0;i<t.removeIndex.length;i++)n=t.selectedClosures.indexOf(t.removeIndex[i]),n!==-1&&t.selectedClosures.splice(n,1)};t.filterCheckList=function(n,i){var r=[];Object.keys(i).map(function(n){i[n]===!0&&r.push(n)});switch(n){case"colour":t.selectedColours=r;break;case"page":t.selectedPageCount=r;break;case"gsm":t.selectedGSM=r;break;case"closure":t.selectedClosures=r}t.filterProducts()}}]);paperblanksCtrls.controller("GiftCardCtrl",["$rootScope","$scope","$http","$location","$anchorScroll",function(n,t,i,r){t.base=[];t.base.giftCards=[];t.base.currencySymbol="$";t.base.cartItems=[];t.base.giftCardCode="";t.base.giftCodeCheckResult=[];t.init=function(){console.log("init");t.getCartItems();t.getRegionGiftCards()};t.getGiftCardBalance=function(){i({method:"POST",url:r.path().substring(0,3)+"/Shop/GetGiftCardbalance/",data:{giftCardCode:t.base.giftCardCode}}).then(function(n){t.base.giftCodeCheckResult=n.data},function(n){console.log(n.statusText)})};t.getRegionGiftCards=function(){i({method:"POST",url:r.path().substring(0,3)+"/Shop/GetRegionGiftCards/",data:{}}).then(function(n){t.base.giftCards=n.data.GiftCards;t.base.currencySymbol=n.data.CurrencySymbol;for(let n=0;n<t.base.giftCards.length;n++)t.base.giftCards[n].SelectedPrice=Number(t.base.giftCards[n].SelectedPrice).toFixed(2)},function(n){console.log(n.statusText)})};t.addToCart=function(n){t.enableSpinner();setTimeout(function(){i({method:"POST",url:r.path().substring(0,3)+"/Shop/AddProductToCart",data:{productID:n,quantity:1}}).then(function(i){i.data.Success&&(document.getElementById("cartitemCount").innerText=i.data.Quantity,i.data.RecordID!=0&&t.gTagAddCart(i.data),i.data.OutOfStock||(t.productAlreadyInCart=!0,flyToElement(document.getElementById(n),document.getElementById("cart"))),t.base.addtoCartResult=i.data,t.checkProductAlreadyInCart(n))},function(){})},500)};t.checkInCart=function(n){for(let i=0;i<t.base.cartItems.length;i++)if(t.base.cartItems[i].ProductID==n)return!0;return!1};t.checkProductAlreadyInCart=function(n){i({method:"GET",url:r.path().substring(0,3)+"/Shop/CheckProductAlreadyInCart?productID="+n}).then(function(i){if(i.data.productInCart==!0){let i=[];i.ProductID=n;t.base.cartItems.push(i)}else t.removeCartItem();t.disableSpinner()},function(){})};t.removeCartItem=function(n){let i=-1;for(let r=0;r<t.base.cartItems.length;r++)if(t.base.cartItems[r].ProductID==n){i=r;break}i!=-1&&t.base.cartItems.splice(i,1)};t.getCartItems=function(){i({method:"POST",url:r.path().substring(0,3)+"/Shop/GetCartItems",data:{}}).then(function(n){t.base.cartItems=n.data.Items;t.disableSpinner()},function(){})};t.gTagAddCart=function(n){window.dataLayer=window.dataLayer||[];dataLayer.push({event:"add_to_cart",ecommerce:{items:[{item_id:n.Product.ID,item_name:n.Product.Name,item_brand:"Paperblanks",item_category:n.Product.Category,item_variant:n.Product.Variant,quantity:n.Product.Quantity,price:n.Product.Price}]}})};t.enableSpinner=function(){document.getElementById("divLoading").style.display="block"};t.disableSpinner=function(){document.getElementById("divLoading").style.display="none"}}]);paperblanksCtrls.controller("InventoryTestCtrl",["$rootScope","$scope","$http","$location",function(n,t,i,r){t.base=[];t.base.skus="DC7381-9\nDC7382-6\nDC7383-3\nDC7384-0\nDC7385-7\nDC7386-4\nDC7387-1\nDC7388-8\nDC7389-5\nDC7390-1\nDC7391-8\nDC7392-5\nDC7394-9\nDC7395-6\nDC7396-3\nDC7397-0\nDC7398-7\nDC7399-4\nDC7400-7\nFB2841-3\nFB2842-0\nFB2843-7\nFB2844-4\nFB4435-2\nFB4436-9\nFB4437-6\nFB4438-3\nFB4439-0\nFB4440-6\nFB4441-3\nFB4442-0";t.base.result="";t.base.inventoryResults=[];t.init=function(){console.log("init")};t.requestInventory=function(){t.base.skus;t.base.requesting=!0;i({method:"POST",url:r.path().substring(0,3)+"/Admin/GetInventory/",data:{requestList:t.base.skus}}).then(function(n){console.log(n.data);t.base.result=n.data.ResultMsg;t.base.inventoryResults=n.data.Result;t.base.requesting=!1},function(n){console.log(n.statusText)})}}]);paperblanksCtrls.controller("PB30Ctrl",["$rootScope","$scope","$http","$location",function(n,t){t.base=[];t.base.hidePosts=!0;t.init=function(){console.log("init")};t.togglePost=function(){t.base.hidePosts=t.base.hidePosts?!1:!0}}]);paperblanksCtrls.controller("ArchivesCtrl",["$rootScope","$scope","$http","$location",function(n,t,i,r){t.base=[];t.base.hidePosts=!0;t.base.page=0;t.base.products=[];t.base.loading=!1;t.base.finishedLoading=!1;t.base.filters=[];t.selectedFilters=[];t.selectedFilters.Series=[];t.selectedFilters.Series.ID=0;t.selectedFilters.DesignThemes=[];t.selectedFilters.DesignThemes.ID=0;t.selectedFilters.Seasons=[];t.selectedFilters.Seasons.ID=0;t.selectedFilters.SortBy=[];t.selectedFilters.SortBy.ID=0;t.totalRecords=0;t.base.products=[];t.init=function(){console.log("init");t.getFilters()};t.getFilters=function(){i({method:"POST",url:r.path().substring(0,3)+"/Archives/GetArchiveFilters",data:{}}).then(function(n){console.log(n.data);t.base.filters=n.data;t.selectedFilters.Series=t.base.filters.Series[0];t.selectedFilters.DesignThemes=t.base.filters.DesignThemes[0];t.selectedFilters.Seasons=t.base.filters.Seasons[0];t.selectedFilters.SortBy=t.base.filters.SortBy[0]},function(){})};t.changeSeriesFilter=function(n){t.selectedFilters.Series=n;t.resetProducts()};t.changeDesignThemeFilter=function(n){t.selectedFilters.DesignThemes=n;t.resetProducts()};t.changeSeasonsFilter=function(n){t.selectedFilters.Seasons=n;t.resetProducts()};t.changeSortByFilter=function(n){t.selectedFilters.SortBy=n;t.resetProducts()};t.resetProducts=function(){t.base.products=[];t.base.page=0;t.base.finishedLoading=!1;t.getDesignArchives()};t.getDesignArchives=function(){t.base.loading||t.base.finishedLoading||(t.base.loading=!0,t.enableSpinner(),i({method:"POST",url:r.path().substring(0,3)+"/Archives/GetDesignArchivesAjax",data:{page:t.base.page,series:t.selectedFilters.Series!=null&&t.selectedFilters.Series.ID!=0?t.selectedFilters.Series.ID:0,designTheme:t.selectedFilters.DesignThemes!=null&&t.selectedFilters.DesignThemes.ID!=0?t.selectedFilters.DesignThemes.ID:0,seasons:t.selectedFilters.Seasons!=null&&t.selectedFilters.Seasons.ID!=0?t.selectedFilters.Seasons.ID:0,sortBy:t.selectedFilters.SortBy!=null&&t.selectedFilters.SortBy!=0?t.selectedFilters.SortBy.ID:1}}).then(function(n){(n.data.Products.length==0||n.data.Products.length<40)&&(t.base.finishedLoading=!0);t.base.products=t.base.products.concat(n.data.Products);t.base.totalRecords=n.data.Total;t.base.page=t.base.page+1;t.disableSpinner();t.base.loading=!1},function(){t.base.loading=!1}))};t.enableSpinner=function(){document.getElementById("divLoading").style.display="block"};t.disableSpinner=function(){document.getElementById("divLoading").style.display="none"}}]);paperblanksCtrls.controller("RetailerResourcesCtrl",["$rootScope","$scope","$http","$location",function(n,t,i,r){t.base=[];t.base.wholeSaleContacts=[];t.base.selectedWholeSaleContact=[];t.base.selectedState=[];t.init=function(){console.log("Init");t.enableSpinner();t.getWholesaleContactDropdown()};t.getWholesaleContactDropdown=function(){i({method:"POST",url:r.path().substring(0,3)+"/retailer/GetWholeSaleResourceDropDown",data:{}}).then(function(n){t.base.wholeSaleContacts=n.data;t.base.selectedWholeSaleContact=n.data[0];t.disableSpinner()},function(){})};t.enableSpinner=function(){document.getElementById("divLoading").style.display="block"};t.disableSpinner=function(){document.getElementById("divLoading").style.display="none"};t.changeCountry=function(){t.base.selectedState=[];t.base.selectedWholeSaleContact.WholeSaleStates.length>0&&(t.base.selectedState=t.base.selectedWholeSaleContact.WholeSaleStates[0])}}]);paperblanksCtrls.controller("BarcodeIndexCtrl",["$rootScope","$scope","$http","$location",function(n,t,i,r){t.base=[];t.base.regions=[];t.base.selectedRegion=[];t.base.instockItemsOnly=!0;t.base.catalogues=[];t.base.selectedCatalogue=[];t.base.target="";t.init=function(){console.log("init");t.getRegions();t.getCatalogues()};t.getRegions=function(){i({method:"POST",url:r.path().substring(0,3)+"/Retailer/BarcodeRegionListAjax",data:{}}).then(function(n){console.log(n);t.base.regions=n.data;t.base.regions.length>0&&(t.base.selectedRegion=t.base.regions[0])},function(){})};t.getCatalogues=function(){i({method:"POST",url:r.path().substring(0,3)+"/Retailer/BarcodeCatalogListAjax",data:{}}).then(function(n){console.log(n);t.base.catalogues=n.data;t.base.catalogues.length>0&&(t.base.selectedCatalogue=t.base.catalogues[0])},function(){})};t.generateBCIndex=function(n){let i="/"+n+"/retailer/barcodeindexresult/?catalogueID="+t.base.selectedCatalogue.Value+"&warehouse="+t.base.selectedRegion.Value+"&instockOnly="+t.base.instockItemsOnly;console.log(i);document.getElementById("frame").src=i;t.base.target=i};t.enableSpinner=function(){document.getElementById("divLoading").style.display="block"};t.disableSpinner=function(){document.getElementById("divLoading").style.display="none"}}]);paperblanksCtrls.controller("DPOrderFormCtrl",["$rootScope","$scope","$http","$location","$timeout","$window",function(n,t,i,r,u,f){t.base=[];t.base.dayplanners=[];t.base.orderedDPs=[];t.base.result="";t.base.axCustNo="";t.base.completed=!1;t.base.refNo="";t.base.confirmedProducts=[];t.base.category="12month";t.base.region="german";t.base.totalQty=0;t.base.totalPrice=0;t.init=function(){console.log("init");t.base.category=f.category;t.base.region=f.region;t.getDPs();t.enableSpinner()};t.getDPs=function(){i({method:"POST",url:r.path().substring(0,3)+"/Retailer/GetOrderFormDayPlannersAjax/",data:{category:t.base.category,region:t.base.region}}).then(function(n){t.base.dayplanners=n.data;t.initDPs();t.disableSpinner();console.log(t.base.dayplanners);console.log(t.base.dayplanners)},function(n){console.log(n.statusText)})};t.initDPs=function(){for(let n=0;n<t.base.dayplanners.length;n++)t.base.dayplanners[n].InCart=!1,t.base.dayplanners[n].Quantity=0,t.base.dayplanners[n].LastQty=0};t.adjustToStep=function(n){if(!n.Quantity){n.Quantity=n.LastQty;return}let i=n.FormatID==19?1:2;n.Quantity=parseInt(Math.round(n.Quantity/i)*i);n.LastQty=n.Quantity;t.calcTotalQty()};t.calcTotalQty=function(){t.base.totalQty=0;t.base.totalPrice=0;for(let n=0;n<t.base.dayplanners.length;n++)t.base.dayplanners[n].Quantity>0&&(t.base.totalQty=t.base.totalQty+t.base.dayplanners[n].Quantity,t.base.totalPrice=t.base.totalPrice+t.base.dayplanners[n].Quantity*t.base.dayplanners[n].SelectedPrice)};t.submitOrder=function(){t.base.result="";t.enableSpinner();u(function(){t.base.orderedDPs=[];for(let n=0;n<t.base.dayplanners.length;n++)if(t.base.dayplanners[n].Quantity>0){let i={};i.ProductID=t.base.dayplanners[n].ProductID;i.Quantity=t.base.dayplanners[n].Quantity;i.AXProductID=t.base.dayplanners[n].ProductID;t.base.orderedDPs.push(i)}if(t.base.orderedDPs.length==0){t.base.result="*Error* Please select at least one product before submitting your order";t.disableSpinner();return}if(!t.base.axCustNo){t.base.result="*Error* Please enter your Paperblanks retailer account number";t.disableSpinner();return}console.log(t.base.orderedDPs);i({method:"POST",url:r.path().substring(0,3)+"/Retailer/SubmitDPOrderForm/",data:{axCustNo:t.base.axCustNo,orderLines:t.base.orderedDPs,category:t.base.category,region:t.base.region}}).then(function(n){n.data.Success&&(t.base.completed=!0,t.base.refNo=n.data.Message);t.confirmationProducts();t.disableSpinner()},function(n){console.log(n.statusText)})},1e3)};t.confirmationProducts=function(){for(let n=0;n<t.base.dayplanners.length;n++)t.base.dayplanners[n].Quantity>0&&t.base.confirmedProducts.push(t.base.dayplanners[n])};t.enableSpinner=function(){document.getElementById("divLoading").style.display="block"};t.disableSpinner=function(){document.getElementById("divLoading").style.display="none"}}]);paperblanksCtrls.controller("ImageDownloaderCtrl",["$rootScope","$scope","$http","$location",function(n,t,i,r){t.base=[];t.base.imageRequest={ISBNRaw:"",FrontWildcard:"_Front",FrontChecked:!0,AngleWildcard:"_Angle",AngleChecked:!0,BackWildcard:"_Back",BackChecked:!0,EdgeWildcard:"_Edge",EdgeChecked:!0,InteriorOneWildcard:"_InteriorOne",InteriorOneChecked:!0,InteriorTwoWildcard:"_InteriorTwo",InteriorTwoChecked:!0,InteriorThreeWildcard:"_InteriorThree",InteriorThreeChecked:!0,InteriorShotWildcard:"_InteriorShot",InteriorShotChecked:!0,NumberImage:!1,StartingIndex:1,CoverOnly:!1,Named:!0,Email:""};t.base.selectedAll=!0;t.base.message="";t.base.validateISBNRes="";t.base.validatedISBNData=[];t.base.hasValidated=!1;t.base.invalidEmail=!1;t.init=function(){console.log("init")};t.selectAll=function(){t.base.selectedAll?(t.base.imageRequest.FrontChecked=!0,t.base.imageRequest.AngleChecked=!0,t.base.imageRequest.BackChecked=!0,t.base.imageRequest.EdgeChecked=!0,t.base.imageRequest.InteriorOneChecked=!0,t.base.imageRequest.InteriorTwoChecked=!0,t.base.imageRequest.InteriorThreeChecked=!0,t.base.imageRequest.InteriorShotChecked=!0):(t.base.imageRequest.FrontChecked=!1,t.base.imageRequest.AngleChecked=!1,t.base.imageRequest.BackChecked=!1,t.base.imageRequest.EdgeChecked=!1,t.base.imageRequest.InteriorOneChecked=!1,t.base.imageRequest.InteriorTwoChecked=!1,t.base.imageRequest.InteriorThreeChecked=!1,t.base.imageRequest.InteriorShotChecked=!1)};t.disableOtherModes=function(n){n=="Cover"?(t.base.imageRequest.CoverOnly=!0,t.base.imageRequest.NumberImage=!1,t.base.imageRequest.Named=!1):n=="Number"?(t.base.imageRequest.CoverOnly=!1,t.base.imageRequest.NumberImage=!0,t.base.imageRequest.Named=!1):n=="Named"&&(t.base.imageRequest.CoverOnly=!1,t.base.imageRequest.NumberImage=!1,t.base.imageRequest.Named=!0)};t.isValidEmail=function(n){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n)};t.queueDownloadImage=function(){if(t.base.invalidEmail=!1,!t.base.imageRequest.Email||!t.isValidEmail(t.base.imageRequest.Email)){t.base.invalidEmail=!0;return}i({method:"POST",url:r.path().substring(0,3)+"/Retailer/SubmitImageDownloadRequest",data:{imageRequest:t.base.imageRequest}}).then(function(n){t.base.submitted=n.data.Success;t.base.message=n.data.Message},function(){})};t.validateISBNs=function(){i({method:"POST",url:r.path().substring(0,3)+"/Retailer/ValidateISBNs",data:{imageRequest:t.base.imageRequest}}).then(function(n){t.base.validateISBNRes=n.data.Message;n.data.Success&&n.data.Data&&(t.base.validatedISBNData=n.data.Data,t.base.hasValidated=!0)},function(){})};t.refreshPage=function(){location.reload()}}]);paperblanksCtrls.controller("LaurelBurchCtrl",["$rootScope","$scope","$http","$location",function(n,t,i,r){t.base=[];t.base.email="";t.base.submitted=!1;t.base.capResponse="";t.base.error=!1;t.init=function(){console.log("init")};t.submitGiveaway=function(){if(!t.base.capResponse||!t.base.email){t.base.error=!0;return}i({method:"POST",url:r.path().substring(0,3)+"/Collaboration/PostLaurelBurchGiveaway/",data:{email:t.base.email,capResponse:t.base.capResponse}}).then(function(n){n.data&&(t.base.submitted=!0)},function(n){console.log(n.statusText)})};t.enableSpinner=function(){document.getElementById("divLoading").style.display="block"};t.disableSpinner=function(){document.getElementById("divLoading").style.display="none"}}]);paperblanksCtrls.controller("SurveyCtrl",["$rootScope","$scope","$http","$location",function(n,t,i,r){t.base=[];t.base.surveyQuestions=[];t.base.answers={};t.base.surveyComplete=!1;t.invalidCap=!1;t.base.capResponse="";t.init=function(){t.getSurvey()};t.getSurvey=function(){i({method:"POST",url:r.path().substring(0,3)+"/Home/GetSurvey",data:{}}).then(function(n){t.base.surveyQuestions=n.data},function(){})};t.submitSurvey=function(){let n=grecaptcha.getResponse();console.log(n);i({method:"POST",url:r.path().substring(0,3)+"/Home/SubmitSurvey",data:{questions:t.base.surveyQuestions,capResponse:t.base.capResponse}}).then(function(n){console.log(n);n.data==!1?t.invalidCap=!0:(t.invalidCap=!1,t.base.surveyComplete=!0)},function(){})};t.checkOption=function(){}}]);paperblanksCtrls.controller("ProductSizeChartCtrl",["$rootScope","$scope","$http","$location",function(n,t,i,r){t.base=[];t.base.sizeChart=[];t.base.windowMultiplier=1;t.base.divider=1;t.base.lastZIndex=1;t.base.selectedMeasurement=0;t.init=function(){console.log("init");t.getSizeChartV2();t.calculateMultipler()};t.base.selectedSizes=[];t.base.sections=[{title:"Hardcover and Softcover Journals",sizeGroupId:1,collapseId:"collapse1",isCollapsed:!1},{title:"Cahier Notebooks",sizeGroupId:2,collapseId:"collapse2",isCollapsed:!0},{title:"Speciality Stationary",sizeGroupId:3,collapseId:"collapse3",isCollapsed:!0},{title:"12-Month Planners",sizeGroupId:4,collapseId:"collapse4",isCollapsed:!0},{title:"18 & 13-Month Planners",sizeGroupId:5,collapseId:"collapse5",isCollapsed:!0}];t.toggleCollapse=function(n){n.isCollapsed=!n.isCollapsed};t.getSizeChartV2=function(){i({method:"POST",url:r.path().substring(0,3)+"/Product/GetSizeChartV2/",data:{}}).then(function(n){console.log(n.data);t.base.sizeChart=n.data},function(n){console.log(n.statusText)})};t.selectedSize=function(n){if(n.Selected==!0){n.Selected=!1;return}n.Selected=!0;t.selectFocusBox(n)};t.calculateMultipler=function(){let r=document.getElementById("sizeGridFrameID"),e=r.offsetWidth,o=r.offsetHeight,n=e/230,i=o/300;console.log(n);console.log(i);t.base.windowMultiplier=n>i?i*t.base.divider:n*t.base.divider;let u=document.getElementById("rulerFrame"),f=document.getElementById("sizeGridFrameID");u.style.width=f.offsetWidth+"px";u.style.height=f.offsetHeight+"px"};t.selectFocusBox=function(n){t.base.lastZIndex=t.base.lastZIndex+1;n.ZIndex=t.base.lastZIndex};t.selectMeasurement=function(n){t.base.selectedMeasurement=n};t.clearSelected=function(){for(let n=0;n<t.base.sizeChart.length;n++)t.base.sizeChart[n].Selected=!1}}]);paperblanksCtrls.controller("CahiersFeatureCtrl",["$rootScope","$scope","$http","$location",function(n,t){t.base=[];t.base.selectedMM=!0;t.init=function(){console.log("init")};t.changeToMM=function(){t.base.selectedMM=!0};t.changeToInches=function(){t.base.selectedMM=!1}}])